mirror of
https://github.com/AdnanHodzic/auto-cpufreq.git
synced 2025-07-28 16:14:14 +02:00
Merge branch 'dev' into shadeyg56-dev
This commit is contained in:
commit
2bbcdcb8e4
@ -52,8 +52,6 @@ def get_version():
|
|||||||
class RadioButtonView(Gtk.Box):
|
class RadioButtonView(Gtk.Box):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__(orientation=Gtk.Orientation.HORIZONTAL)
|
super().__init__(orientation=Gtk.Orientation.HORIZONTAL)
|
||||||
# this keeps track of whether or not the button was toggled by the app or the user to prompt for authorization
|
|
||||||
self.set_by_app = True
|
|
||||||
|
|
||||||
self.set_hexpand(True)
|
self.set_hexpand(True)
|
||||||
self.hbox = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL)
|
self.hbox = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL)
|
||||||
@ -70,6 +68,9 @@ class RadioButtonView(Gtk.Box):
|
|||||||
self.performance.connect("toggled", self.on_button_toggled, "performance")
|
self.performance.connect("toggled", self.on_button_toggled, "performance")
|
||||||
self.performance.set_halign(Gtk.Align.END)
|
self.performance.set_halign(Gtk.Align.END)
|
||||||
|
|
||||||
|
|
||||||
|
# this keeps track of whether or not the button was toggled by the app or the user to prompt for authorization
|
||||||
|
self.set_by_app = True
|
||||||
self.set_selected()
|
self.set_selected()
|
||||||
|
|
||||||
self.pack_start(self.label, False, False, 0)
|
self.pack_start(self.label, False, False, 0)
|
||||||
@ -99,6 +100,9 @@ class RadioButtonView(Gtk.Box):
|
|||||||
case "performance":
|
case "performance":
|
||||||
self.performance.set_active(True)
|
self.performance.set_active(True)
|
||||||
case "default":
|
case "default":
|
||||||
|
# because this is the default button, it does not trigger the callback when set by the app
|
||||||
|
if self.set_by_app:
|
||||||
|
self.set_by_app = False
|
||||||
self.default.set_active(True)
|
self.default.set_active(True)
|
||||||
|
|
||||||
class CurrentGovernorBox(Gtk.Box):
|
class CurrentGovernorBox(Gtk.Box):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user