[gnome-clocks] AlarmStandalone: Don't be too self-ish



commit 2619314838b87d8b5ad990edbc548331197023ba
Author: Volker Sobek <reklov live com>
Date:   Sun Dec 16 21:45:34 2012 +0100

    AlarmStandalone: Don't be too self-ish
    
    Remove some unneeded self.

 gnomeclocks/alarm.py |   52 +++++++++++++++++++++++++-------------------------
 1 files changed, 26 insertions(+), 26 deletions(-)
---
diff --git a/gnomeclocks/alarm.py b/gnomeclocks/alarm.py
index fd25d62..010685c 100644
--- a/gnomeclocks/alarm.py
+++ b/gnomeclocks/alarm.py
@@ -339,16 +339,16 @@ class AlarmStandalone(Gtk.EventBox):
         self.left_button = Gtk.Button()
         self.left_button.get_style_context().add_class("clocks-stop")
         self.left_button.set_size_request(200, -1)
-        self.left_label = Gtk.Label()
-        self.left_button.add(self.left_label)
+        left_label = Gtk.Label()
+        self.left_button.add(left_label)
         self.right_button = Gtk.Button()
         self.right_button.set_size_request(200, -1)
-        self.right_label = Gtk.Label()
-        self.right_button.add(self.right_label)
-        self.left_label.set_markup("<span font_desc=\"18.0\">%s</span>" % (_("Stop")))
-        self.left_label.set_padding(6, 0)
-        self.right_label.set_markup("<span font_desc=\"18.0\">%s</span>" % (_("Snooze")))
-        self.right_label.set_padding(6, 0)
+        right_label = Gtk.Label()
+        self.right_button.add(right_label)
+        left_label.set_markup("<span font_desc=\"18.0\">%s</span>" % (_("Stop")))
+        left_label.set_padding(6, 0)
+        right_label.set_markup("<span font_desc=\"18.0\">%s</span>" % (_("Snooze")))
+        right_label.set_padding(6, 0)
         self.left_button.connect('clicked', self._on_stop_clicked)
         self.right_button.connect('clicked', self._on_snooze_clicked)
 
@@ -358,19 +358,19 @@ class AlarmStandalone(Gtk.EventBox):
         self.switch.set_valign(Gtk.Align.START)
         self.switch.connect("notify::active", self._on_switch)
 
-        self.buttons = Gtk.Box()
-        self.buttons.show()
-        self.buttons.set_halign(Gtk.Align.CENTER)
-        self.buttons.set_valign(Gtk.Align.START)
-        self.buttons.pack_start(self.left_button, True, True, 0)
-        self.buttons.pack_start(Gtk.Label(), True, True, 12)
-        self.buttons.pack_start(self.right_button, True, True, 0)
+        buttons = Gtk.Box()
+        buttons.show()
+        buttons.set_halign(Gtk.Align.CENTER)
+        buttons.set_valign(Gtk.Align.START)
+        buttons.pack_start(self.left_button, True, True, 0)
+        buttons.pack_start(Gtk.Label(), True, True, 12)
+        buttons.pack_start(self.right_button, True, True, 0)
 
         self.controls_notebook = Gtk.Notebook()
         self.controls_notebook.set_margin_top(24)
         self.controls_notebook.set_show_tabs(False)
         self.controls_notebook.append_page(self.switch, None)
-        self.controls_notebook.append_page(self.buttons, None)
+        self.controls_notebook.append_page(buttons, None)
 
         label_top = Gtk.Label()
         label_top.set_vexpand(True)
@@ -380,16 +380,16 @@ class AlarmStandalone(Gtk.EventBox):
         label_padding = Gtk.Label()
         label_padding.set_size_request(-1, 30)
 
-        self.grid = Gtk.Grid()
-        self.grid.set_orientation(Gtk.Orientation.VERTICAL)
-        self.grid.add(label_top)
-        self.grid.add(label_padding)
-        self.grid.add(self.alarm_label)
-        self.grid.add(self.repeat_label)
-        self.grid.add(self.controls_notebook)
-        self.grid.add(label_bottom)
-
-        self.add(self.grid)
+        grid = Gtk.Grid()
+        grid.set_orientation(Gtk.Orientation.VERTICAL)
+        grid.add(label_top)
+        grid.add(label_padding)
+        grid.add(self.alarm_label)
+        grid.add(self.repeat_label)
+        grid.add(self.controls_notebook)
+        grid.add(label_bottom)
+
+        self.add(grid)
 
         self.alarm = None
 



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