Skip to content

Commit

Permalink
gmoccapy: ensure usage of lowercase for settings in pref file
Browse files Browse the repository at this point in the history
  • Loading branch information
hansu committed Nov 15, 2024
1 parent 5793a0b commit 4accaa4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/emc/usr_intf/gmoccapy/gmoccapy.py
Original file line number Diff line number Diff line change
Expand Up @@ -1960,7 +1960,7 @@ def _init_themes(self):
except:
pass
temp = 0
theme_name = self.prefs.getpref("Gtk_theme", "Follow System Theme", str)
theme_name = self.prefs.getpref("gtk_theme", "Follow System Theme", str)
for index, theme in enumerate(themes):
model.append((theme,))
if theme == theme_name:
Expand Down Expand Up @@ -2206,7 +2206,7 @@ def _init_offsetpage(self):
names = []
default_names = self.widgets.offsetpage1.get_names()
for system, name in default_names:
system_name = "system_name_{0}".format(system)
system_name = "system_name_{0}".format(system).lower()
name = self.prefs.getpref(system_name, name, str)
names.append([system, name])
self.widgets.offsetpage1.set_names(names)
Expand Down Expand Up @@ -2327,7 +2327,7 @@ def _show_offset_tab(self, state):
else:
names = self.widgets.offsetpage1.get_names()
for system, name in names:
system_name = "system_name_{0}".format(system)
system_name = "system_name_{0}".format(system).lower()
self.prefs.putpref(system_name, name)
page.hide()

Expand Down Expand Up @@ -4408,7 +4408,7 @@ def on_theme_choice_changed(self, widget):
if active is None:
return
theme = widget.get_model()[active][0]
self.prefs.putpref('Gtk_theme', theme)
self.prefs.putpref("gtk_theme", theme)
if theme == "Follow System Theme":
theme = self.default_theme
settings = Gtk.Settings.get_default()
Expand Down

0 comments on commit 4accaa4

Please sign in to comment.