[gnome-clocks] Set the title in the standalone toolbar



commit 831a1a685ade563d1e3195c113ef12a0ed8cad0f
Author: Paolo Borelli <pborelli gnome org>
Date:   Sun Dec 30 18:19:53 2012 +0100

    Set the title in the standalone toolbar
    
    This got lost in the previous refactoring

 gnomeclocks/alarm.py |    5 +----
 gnomeclocks/world.py |    4 +---
 2 files changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/gnomeclocks/alarm.py b/gnomeclocks/alarm.py
index d64cf33..a7d26f8 100644
--- a/gnomeclocks/alarm.py
+++ b/gnomeclocks/alarm.py
@@ -426,10 +426,6 @@ class AlarmStandalone(Gtk.EventBox):
             self.alarm.set_active(switch_active)
             self.view.save_alarms()
 
-    def get_name(self):
-        name = self.alarm.name
-        return GLib.markup_escape_text(name)
-
     def open_edit_dialog(self):
         # implicitely disable, we do not want to ring while editing.
         self.edited_active = self.alarm.active
@@ -619,6 +615,7 @@ class Alarm(Clock):
             self.toolbar.set_mode(Toolbar.Mode.STANDALONE)
             self.toolbar.add_widget(self.back_button)
             self.toolbar.add_widget(self.edit_button, Gtk.PackType.END)
+            self.toolbar.set_title(GLib.markup_escape_text(self.standalone.alarm.name))
 
     def activate_new(self):
         window = AlarmDialog(self.get_toplevel())
diff --git a/gnomeclocks/world.py b/gnomeclocks/world.py
index 7ec1b6c..f2d6a21 100644
--- a/gnomeclocks/world.py
+++ b/gnomeclocks/world.py
@@ -288,9 +288,6 @@ class WorldStandalone(Gtk.EventBox):
             else:
                 self.sun_grid.hide()
 
-    def get_name(self):
-        return GLib.markup_escape_text(self.clock.name)
-
 
 class World(Clock):
     def __init__(self, embed, toolbar):
@@ -442,6 +439,7 @@ class World(Clock):
         elif self.mode is Clock.Mode.STANDALONE:
             self.toolbar.set_mode(Toolbar.Mode.STANDALONE)
             self.toolbar.add_widget(self.back_button)
+            self.toolbar.set_title(GLib.markup_escape_text(self.standalone.clock.name))
 
     def activate_new(self):
         window = NewWorldClockDialog(self.get_toplevel())



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