mirror of
https://github.com/GradienceTeam/Gradience.git
synced 2024-08-29 18:32:32 +00:00
Change methods not using its bound instance to staticmethods
This commit is contained in:
parent
40b74723e9
commit
eab6edc630
3 changed files with 14 additions and 7 deletions
12
src/main.py
12
src/main.py
|
@ -189,7 +189,8 @@ class GradienceApplication(Adw.Application):
|
|||
|
||||
self.reload_variables()
|
||||
|
||||
def rgba_from_argb(self, argb, alpha=None) -> str:
|
||||
@staticmethod
|
||||
def rgba_from_argb(argb, alpha=None) -> str:
|
||||
base = "rgba({}, {}, {}, {})"
|
||||
|
||||
red = redFromArgb(argb)
|
||||
|
@ -812,15 +813,18 @@ This app is written in Python and uses GTK 4 and libadwaita.
|
|||
self.props.active_window.update_errors(
|
||||
self.global_errors + plugins_errors)
|
||||
|
||||
def show_adwaita_demo(self, *_args):
|
||||
@staticmethod
|
||||
def show_adwaita_demo(*_args):
|
||||
GLib.spawn_command_line_async(
|
||||
'sh -c "/bin/adwaita-1-demo > /dev/null 2>&1"')
|
||||
|
||||
def show_gtk4_demo(self, *_args):
|
||||
@staticmethod
|
||||
def show_gtk4_demo(*_args):
|
||||
GLib.spawn_command_line_async(
|
||||
'sh -c "/bin/gtk4-demo > /dev/null 2>&1"')
|
||||
|
||||
def show_gtk4_widget_factory(self, *_args):
|
||||
@staticmethod
|
||||
def show_gtk4_widget_factory(*_args):
|
||||
GLib.spawn_command_line_async(
|
||||
'sh -c "/bin/gtk4-widget-factory > /dev/null 2>&1"'
|
||||
)
|
||||
|
|
|
@ -211,10 +211,12 @@ class GradiencePresetWindow(Adw.Window):
|
|||
self.search_entry.connect("search-changed", self.on_search_changed)
|
||||
self.search_entry.connect("realize", self.on_search_realize)
|
||||
|
||||
def on_search_changed(self, widget):
|
||||
@staticmethod
|
||||
def on_search_changed(widget):
|
||||
print("search changed")
|
||||
|
||||
def on_search_realize(self, widget):
|
||||
@staticmethod
|
||||
def on_search_realize(widget):
|
||||
print("search realized")
|
||||
|
||||
@Gtk.Template.Callback()
|
||||
|
|
|
@ -120,7 +120,8 @@ class GradienceWelcomeWindow(Adw.Window):
|
|||
sys.exit()
|
||||
|
||||
# TODO: Add adw-gtk3 check
|
||||
def check_adw_gtk3(self):
|
||||
@staticmethod
|
||||
def check_adw_gtk3():
|
||||
buglog("check if adw-gtk3 installed")
|
||||
return True
|
||||
|
||||
|
|
Loading…
Reference in a new issue