Replace get_value(X).get_Y() with get_Y(X) for Settings

github/fork/yochananmarqos/patch-1
Gonçalo Silva 2019-04-27 04:13:48 +01:00
parent c2a43c374a
commit a0a19ffbe7
3 changed files with 4 additions and 5 deletions

View File

@ -457,8 +457,7 @@ class InlinePreview:
path = path[7:]
elif not path.startswith("/"):
# then the path is relative
base_path = self.settings.get_value(
"open-file-path").get_string()
base_path = self.settings.get_string("open-file-path")
path = base_path + "/" + path
LOGGER.info(path)

View File

@ -83,7 +83,7 @@ class PreferencesDialog:
self.gradient_overlay_switch.connect("state-set", self.on_gradient_overlay)
input_format_store = Gtk.ListStore(int, str)
input_format = self.settings.get_value("input-format").get_string()
input_format = self.settings.get_string("input-format")
input_format_active = 0
for i, fmt in enumerate(self.formats):
input_format_store.append([i, fmt["name"]])

View File

@ -31,8 +31,8 @@ class Theme:
@classmethod
def get_current_changed(cls):
theme_name = Gtk.Settings.get_default().get_property('gtk-theme-name')
dark_mode_auto = cls.settings.get_value('dark-mode-auto').get_boolean()
dark_mode = cls.settings.get_value('dark-mode').get_boolean()
dark_mode_auto = cls.settings.get_boolean('dark-mode-auto')
dark_mode = cls.settings.get_boolean('dark-mode')
current_theme = cls.get_for_name(theme_name)
if not dark_mode_auto and dark_mode != current_theme.is_dark and current_theme.inverse_name:
current_theme = cls.get_for_name(current_theme.inverse_name, current_theme.name)