Compare commits
1 Commits
master
...
convert-to
Author | SHA1 | Date |
---|---|---|
itdominator | 09c5af3821 |
|
@ -11,7 +11,7 @@ tracemalloc.start()
|
||||||
|
|
||||||
# Lib imports
|
# Lib imports
|
||||||
import gi
|
import gi
|
||||||
gi.require_version('Gtk', '3.0')
|
gi.require_version('Gtk', '4.0')
|
||||||
from gi.repository import Gtk
|
from gi.repository import Gtk
|
||||||
|
|
||||||
# Application imports
|
# Application imports
|
||||||
|
|
|
@ -4,7 +4,7 @@ from os.path import isfile
|
||||||
|
|
||||||
# Gtk imports
|
# Gtk imports
|
||||||
import gi
|
import gi
|
||||||
gi.require_version('Gtk', '3.0')
|
gi.require_version('Gtk', '4.0')
|
||||||
from gi.repository import Gtk
|
from gi.repository import Gtk
|
||||||
|
|
||||||
# Application imports
|
# Application imports
|
||||||
|
@ -21,7 +21,7 @@ class DesktopIconMixin:
|
||||||
if "steam" in icon:
|
if "steam" in icon:
|
||||||
name = xdgObj.getName()
|
name = xdgObj.getName()
|
||||||
file_hash = hashlib.sha256(str.encode(name)).hexdigest()
|
file_hash = hashlib.sha256(str.encode(name)).hexdigest()
|
||||||
hash_img_pth = self.STEAM_ICONS_PTH + "/" + file_hash + ".jpg"
|
hash_img_pth = f"{self.STEAM_ICONS_PTH}/{file_hash}.jpg"
|
||||||
|
|
||||||
if isfile(hash_img_pth) == True:
|
if isfile(hash_img_pth) == True:
|
||||||
# Use video sizes since headers are bigger
|
# Use video sizes since headers are bigger
|
||||||
|
@ -30,7 +30,7 @@ class DesktopIconMixin:
|
||||||
exec_str = xdgObj.getExec()
|
exec_str = xdgObj.getExec()
|
||||||
parts = exec_str.split("steam://rungameid/")
|
parts = exec_str.split("steam://rungameid/")
|
||||||
id = parts[len(parts) - 1]
|
id = parts[len(parts) - 1]
|
||||||
imageLink = self.STEAM_BASE_URL + id + "/header.jpg"
|
imageLink = f"{self.STEAM_BASE_URL}{id}/header.jpg"
|
||||||
proc = subprocess.Popen(["wget", "-O", hash_img_pth, imageLink])
|
proc = subprocess.Popen(["wget", "-O", hash_img_pth, imageLink])
|
||||||
proc.wait()
|
proc.wait()
|
||||||
|
|
||||||
|
@ -57,9 +57,9 @@ class DesktopIconMixin:
|
||||||
|
|
||||||
for (dirpath, dirnames, filenames) in os.walk(path):
|
for (dirpath, dirnames, filenames) in os.walk(path):
|
||||||
for file in filenames:
|
for file in filenames:
|
||||||
appNM = "application-x-" + icon
|
appNM = f"application-x-{icon}"
|
||||||
if icon in file or appNM in file:
|
if icon in file or appNM in file:
|
||||||
alt_icon_path = dirpath + "/" + file
|
alt_icon_path = "{dirpath}/{file}"
|
||||||
break
|
break
|
||||||
|
|
||||||
return alt_icon_path
|
return alt_icon_path
|
||||||
|
|
|
@ -3,7 +3,7 @@ import sys, traceback, threading, signal, inspect, os, time
|
||||||
|
|
||||||
# Lib imports
|
# Lib imports
|
||||||
import gi
|
import gi
|
||||||
gi.require_version('Gtk', '3.0')
|
gi.require_version('Gtk', '4.0')
|
||||||
from gi.repository import Gtk, GLib
|
from gi.repository import Gtk, GLib
|
||||||
|
|
||||||
# Application imports
|
# Application imports
|
||||||
|
|
|
@ -3,8 +3,8 @@ import re
|
||||||
|
|
||||||
# Lib imports
|
# Lib imports
|
||||||
import gi
|
import gi
|
||||||
gi.require_version('Gtk', '3.0')
|
gi.require_version('Gtk', '4.0')
|
||||||
gi.require_version('Gdk', '3.0')
|
gi.require_version('Gdk', '4.0')
|
||||||
from gi.repository import Gtk, Gdk
|
from gi.repository import Gtk, Gdk
|
||||||
|
|
||||||
# Application imports
|
# Application imports
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
# Gtk imports
|
# Gtk imports
|
||||||
import gi
|
import gi
|
||||||
gi.require_version('Gtk', '3.0')
|
gi.require_version('Gtk', '4.0')
|
||||||
gi.require_version('Gdk', '3.0')
|
gi.require_version('Gdk', '4.0')
|
||||||
from gi.repository import Gtk, Gdk, Gio
|
from gi.repository import Gtk, Gdk, Gio
|
||||||
|
|
||||||
# Application imports
|
# Application imports
|
||||||
|
|
|
@ -3,8 +3,8 @@ import os
|
||||||
|
|
||||||
# Lib imports
|
# Lib imports
|
||||||
import gi
|
import gi
|
||||||
gi.require_version('Gtk', '3.0')
|
gi.require_version('Gtk', '4.0')
|
||||||
gi.require_version('Gdk', '3.0')
|
gi.require_version('Gdk', '4.0')
|
||||||
from gi.repository import Gtk, Gdk
|
from gi.repository import Gtk, Gdk
|
||||||
|
|
||||||
# Application imports
|
# Application imports
|
||||||
|
|
|
@ -3,7 +3,7 @@ import os
|
||||||
|
|
||||||
# Lib imports
|
# Lib imports
|
||||||
import gi
|
import gi
|
||||||
gi.require_version('Gtk', '3.0')
|
gi.require_version('Gtk', '4.0')
|
||||||
from gi.repository import Gtk, GObject, Gio
|
from gi.repository import Gtk, GObject, Gio
|
||||||
|
|
||||||
# Application imports
|
# Application imports
|
||||||
|
|
|
@ -4,8 +4,8 @@ import os, threading, subprocess
|
||||||
# Lib imports
|
# Lib imports
|
||||||
import gi
|
import gi
|
||||||
|
|
||||||
gi.require_version("Gtk", "3.0")
|
gi.require_version("Gtk", "4.0")
|
||||||
gi.require_version('Gdk', '3.0')
|
gi.require_version('Gdk', '4.0')
|
||||||
from gi.repository import Gtk, Gdk, GLib, Gio, GdkPixbuf
|
from gi.repository import Gtk, Gdk, GLib, Gio, GdkPixbuf
|
||||||
|
|
||||||
# Application imports
|
# Application imports
|
||||||
|
|
|
@ -5,7 +5,7 @@ from os.path import isdir, isfile
|
||||||
|
|
||||||
# Lib imports
|
# Lib imports
|
||||||
import gi
|
import gi
|
||||||
gi.require_version('Gdk', '3.0')
|
gi.require_version('Gdk', '4.0')
|
||||||
from gi.repository import Gdk, Gio
|
from gi.repository import Gdk, Gio
|
||||||
|
|
||||||
# Application imports
|
# Application imports
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 2.2 MiB |
|
@ -4,8 +4,8 @@ from os import path
|
||||||
|
|
||||||
# Gtk imports
|
# Gtk imports
|
||||||
import gi, cairo
|
import gi, cairo
|
||||||
gi.require_version('Gtk', '3.0')
|
gi.require_version('Gtk', '4.0')
|
||||||
gi.require_version('Gdk', '3.0')
|
gi.require_version('Gdk', '4.0')
|
||||||
|
|
||||||
from gi.repository import Gtk as gtk
|
from gi.repository import Gtk as gtk
|
||||||
from gi.repository import Gdk as gdk
|
from gi.repository import Gdk as gdk
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!-- Generated with glade 3.38.2 -->
|
<!-- Generated with glade 3.38.2 -->
|
||||||
<interface>
|
<interface>
|
||||||
<requires lib="gtk+" version="3.22"/>
|
<requires lib="gtk+" version="3.24"/>
|
||||||
<object class="GtkAboutDialog" id="about_page">
|
<object class="GtkAboutDialog" id="about_page">
|
||||||
<property name="can-focus">False</property>
|
<property name="can-focus">False</property>
|
||||||
<property name="border-width">5</property>
|
<property name="border-width">5</property>
|
||||||
|
|
Loading…
Reference in New Issue