[gnome-tweak-tool] Remove the use of deprecated properties



commit f3878f2c641ca92efffba0c1a788a9dad29cb578
Author: Dominique Leuenberger <dimstar opensuse org>
Date:   Sat Oct 18 19:08:57 2014 +0200

    Remove the use of deprecated properties
    
    /usr/lib/python2.7/site-packages/gtweak/tweaks/tweak_group_startup.py:138:
    Warning: The property GtkWidget:margin-left is deprecated and shouldn't
    be used anymore. It will be removed in a future version.
      self.props.margin_left = 1
    
    /usr/lib/python2.7/site-packages/gtweak/tweaks/tweak_group_startup.py:139:
    Warning: The property GtkWidget:margin-right is deprecated and shouldn't
    be used anymore. It will be removed in a future version.
      self.props.margin_right = 1
    
    /usr/lib/python2.7/site-packages/gtweak/tweaks/tweak_group_startup.py:155:
    Warning: The property GtkSettings:gtk-button-images is deprecated and
    shouldn't be used anymore. It will be removed in a future version.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=738772

 gtweak/tweaks/tweak_group_startup.py |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/gtweak/tweaks/tweak_group_startup.py b/gtweak/tweaks/tweak_group_startup.py
index 0dc1c2c..5e1ca94 100644
--- a/gtweak/tweaks/tweak_group_startup.py
+++ b/gtweak/tweaks/tweak_group_startup.py
@@ -135,8 +135,8 @@ class _StartupTweak(Gtk.ListBoxRow, Tweak):
 
         self.add(grid)
 
-        self.props.margin_left = 1
-        self.props.margin_right = 1
+        self.props.margin_start = 1
+        self.props.margin_end = 1
         self.get_style_context().add_class('tweak-startup')
 
         self.btn = btn
@@ -148,12 +148,10 @@ class AddStartupTweak(Gtk.ListBoxRow, Tweak):
                        _("Add a new application to be run at startup"),
                        **options)
 
-        self.btn = Gtk.Button(label="")
-        self.btn.get_style_context().remove_class("button")
         img = Gtk.Image()
         img.set_from_icon_name("list-add-symbolic", Gtk.IconSize.BUTTON)
-        self.btn.set_image(img)
-        self.btn.props.always_show_image = True
+        self.btn = Gtk.Button(label="", image=img, always_show_image=True)
+        self.btn.get_style_context().remove_class("button")
         self.add(self.btn)
         self.get_style_context().add_class('tweak-startup')
 


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