[meld] settings, meldbuffer: Tidy up some instance use



commit cc6e7d50677c89b0e6e775a0120e42646cab9cfa
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Fri Oct 10 07:03:20 2014 +1000

    settings, meldbuffer: Tidy up some instance use

 meld/meldbuffer.py |    6 +++---
 meld/settings.py   |    3 +--
 2 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/meld/meldbuffer.py b/meld/meldbuffer.py
index 7599eee..087e49b 100644
--- a/meld/meldbuffer.py
+++ b/meld/meldbuffer.py
@@ -24,7 +24,7 @@ from gi.repository import GObject
 from gi.repository import GtkSource
 
 from meld.conf import _
-from meld.settings import bind_settings,meldsettings
+from meld.settings import bind_settings, meldsettings
 from meld.util.compat import text_type
 
 
@@ -42,11 +42,11 @@ class MeldBuffer(GtkSource.Buffer):
         self.data = MeldBufferData(filename)
         self.user_action_count = 0
         meldsettings.connect('changed', self.on_setting_changed)
-        GtkSource.Buffer.set_style_scheme(self, meldsettings.style_scheme)
+        self.set_style_scheme(meldsettings.style_scheme)
 
     def on_setting_changed(self, meldsettings, key):
         if key == 'style-scheme':
-            GtkSource.Buffer.set_style_scheme(self, meldsettings.style_scheme)
+            self.set_style_scheme(meldsettings.style_scheme)
 
     def do_begin_user_action(self, *args):
         self.user_action_count += 1
diff --git a/meld/settings.py b/meld/settings.py
index c651bca..51f2b79 100644
--- a/meld/settings.py
+++ b/meld/settings.py
@@ -63,8 +63,7 @@ class MeldSettings(GObject.GObject):
 
     def _style_scheme_from_gsettings(self):
         manager = GtkSource.StyleSchemeManager.get_default()
-        return GtkSource.StyleSchemeManager.get_scheme(manager,
-                settings.get_string('style-scheme'))
+        return manager.get_scheme(settings.get_string('style-scheme'))
 
     def _filters_from_gsetting(self, key, filt_type):
         filter_params = settings.get_value(key)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]