[gnome-clocks] Rename "MainPanel" to "Face", it is a better name for clocks



commit e3a34e763c049911eb124ddd357f160220e7f73f
Author: Paolo Borelli <pborelli gnome org>
Date:   Tue Sep 2 09:23:28 2014 +0200

    Rename "MainPanel" to "Face", it is a better name for clocks

 data/ui/alarm.ui     |    2 +-
 data/ui/stopwatch.ui |    2 +-
 data/ui/timer.ui     |    2 +-
 data/ui/world.ui     |    2 +-
 src/alarm.vala       |    8 +++++---
 src/stopwatch.vala   |    8 +++++---
 src/timer.vala       |    9 ++++++---
 src/window.vala      |   22 +++++++++++-----------
 src/world.vala       |    9 ++++++---
 9 files changed, 37 insertions(+), 27 deletions(-)
---
diff --git a/data/ui/alarm.ui b/data/ui/alarm.ui
index e0771d4..daa553b 100644
--- a/data/ui/alarm.ui
+++ b/data/ui/alarm.ui
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <!-- interface-requires gtk+ 3.6 -->
-  <template class="ClocksAlarmMainPanel" parent="GtkStack">
+  <template class="ClocksAlarmFace" parent="GtkStack">
     <property name="visible">True</property>
     <signal name="notify::visible-child" handler="visible_child_changed" swapped="no"/>
     <child>
diff --git a/data/ui/stopwatch.ui b/data/ui/stopwatch.ui
index 7ea320c..eb98654 100644
--- a/data/ui/stopwatch.ui
+++ b/data/ui/stopwatch.ui
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <!-- interface-requires gtk+ 3.6 -->
-  <template class="ClocksStopwatchMainPanel" parent="GtkBox">
+  <template class="ClocksStopwatchFace" parent="GtkBox">
     <property name="visible">True</property>
     <child>
       <object class="GtkGrid" id="stopwatch_panel">
diff --git a/data/ui/timer.ui b/data/ui/timer.ui
index 9ec8fc4..cfee59c 100644
--- a/data/ui/timer.ui
+++ b/data/ui/timer.ui
@@ -16,7 +16,7 @@
     <property name="step_increment">1</property>
     <property name="page_increment">10</property>
   </object>
-  <template class="ClocksTimerMainPanel" parent="GtkStack">
+  <template class="ClocksTimerFace" parent="GtkStack">
     <property name="visible">True</property>
     <child>
       <object class="ClocksAnalogFrame" id="setup_frame">
diff --git a/data/ui/world.ui b/data/ui/world.ui
index c809124..d87709d 100644
--- a/data/ui/world.ui
+++ b/data/ui/world.ui
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <!-- interface-requires gtk+ 3.0 -->
-  <template class="ClocksWorldMainPanel" parent="GtkStack">
+  <template class="ClocksWorldFace" parent="GtkStack">
     <property name="visible">True</property>
     <signal name="notify::visible-child" handler="visible_child_changed" swapped="no"/>
     <child>
diff --git a/src/alarm.vala b/src/alarm.vala
index fb63772..1a2851c 100644
--- a/src/alarm.vala
+++ b/src/alarm.vala
@@ -517,7 +517,7 @@ private class RingingPanel : Gtk.Grid {
 }
 
 [GtkTemplate (ui = "/org/gnome/clocks/ui/alarm.ui")]
-public class MainPanel : Gtk.Stack, Clocks.Clock {
+public class Face : Gtk.Stack, Clocks.Clock {
     public string label { get; construct set; }
     public HeaderBar header_bar { get; construct set; }
     public PanelId panel_id { get; construct set; }
@@ -532,8 +532,10 @@ public class MainPanel : Gtk.Stack, Clocks.Clock {
     [GtkChild]
     private RingingPanel ringing_panel;
 
-    public MainPanel (HeaderBar header_bar) {
-        Object (label: _("Alarm"), header_bar: header_bar, panel_id: PanelId.ALARM);
+    public Face (HeaderBar header_bar) {
+        Object (label: _("Alarm"),
+                header_bar: header_bar,
+                panel_id: PanelId.ALARM);
 
         alarms = new List<Item> ();
         settings = new GLib.Settings ("org.gnome.clocks");
diff --git a/src/stopwatch.vala b/src/stopwatch.vala
index 077ad64..0cff95b 100644
--- a/src/stopwatch.vala
+++ b/src/stopwatch.vala
@@ -90,7 +90,7 @@ private class LapsRow : Gtk.ListBoxRow {
 }
 
 [GtkTemplate (ui = "/org/gnome/clocks/ui/stopwatch.ui")]
-public class MainPanel : Gtk.Box, Clocks.Clock {
+public class Face : Gtk.Box, Clocks.Clock {
     public enum State {
         RESET,
         RUNNING,
@@ -126,8 +126,10 @@ public class MainPanel : Gtk.Box, Clocks.Clock {
     [GtkChild]
     private Gtk.ListBox laps_list;
 
-    public MainPanel (HeaderBar header_bar) {
-        Object (label: _("Stopwatch"), header_bar: header_bar, panel_id: PanelId.STOPWATCH);
+    public Face (HeaderBar header_bar) {
+        Object (label: _("Stopwatch"),
+                header_bar: header_bar,
+                panel_id: PanelId.STOPWATCH);
 
         timer = new GLib.Timer ();
         tick_id = 0;
diff --git a/src/timer.vala b/src/timer.vala
index ab1d79f..358e4aa 100644
--- a/src/timer.vala
+++ b/src/timer.vala
@@ -65,7 +65,7 @@ public class CountdownFrame : AnalogFrame {
 }
 
 [GtkTemplate (ui = "/org/gnome/clocks/ui/timer.ui")]
-public class MainPanel : Gtk.Stack, Clocks.Clock {
+public class Face : Gtk.Stack, Clocks.Clock {
     public enum State {
         STOPPED,
         RUNNING,
@@ -110,8 +110,11 @@ public class MainPanel : Gtk.Stack, Clocks.Clock {
     [GtkChild]
     private Gtk.Button left_button;
 
-    public MainPanel (HeaderBar header_bar) {
-        Object (label: _("Timer"), header_bar: header_bar, transition_type: 
Gtk.StackTransitionType.CROSSFADE, panel_id: PanelId.TIMER);
+    public Face (HeaderBar header_bar) {
+        Object (label: _("Timer"),
+                header_bar: header_bar,
+                panel_id: PanelId.TIMER,
+                transition_type: Gtk.StackTransitionType.CROSSFADE);
 
         settings = new GLib.Settings ("org.gnome.clocks");
 
diff --git a/src/window.vala b/src/window.vala
index fa72fde..27e40e3 100644
--- a/src/window.vala
+++ b/src/window.vala
@@ -64,15 +64,15 @@ public class Window : Gtk.ApplicationWindow {
 
         panels = new Gtk.Widget[N_PANELS];
 
-        panels[PanelId.WORLD] = new World.MainPanel (header_bar);
-        panels[PanelId.ALARM] =  new Alarm.MainPanel (header_bar);
-        panels[PanelId.STOPWATCH] = new Stopwatch.MainPanel (header_bar);
-        panels[PanelId.TIMER] = new Timer.MainPanel (header_bar);
+        panels[PanelId.WORLD] = new World.Face (header_bar);
+        panels[PanelId.ALARM] =  new Alarm.Face (header_bar);
+        panels[PanelId.STOPWATCH] = new Stopwatch.Face (header_bar);
+        panels[PanelId.TIMER] = new Timer.Face (header_bar);
 
-        var world = (World.MainPanel)panels[PanelId.WORLD];
-        var alarm = (Alarm.MainPanel)panels[PanelId.ALARM];
-        var stopwatch = (Stopwatch.MainPanel)panels[PanelId.STOPWATCH];
-        var timer = (Timer.MainPanel)panels[PanelId.TIMER];
+        var world = (World.Face)panels[PanelId.WORLD];
+        var alarm = (Alarm.Face)panels[PanelId.ALARM];
+        var stopwatch = (Stopwatch.Face)panels[PanelId.STOPWATCH];
+        var timer = (Timer.Face)panels[PanelId.TIMER];
 
         foreach (var clock in panels) {
             stack.add_titled (clock, ((Clock)clock).label, ((Clock)clock).label);
@@ -101,7 +101,7 @@ public class Window : Gtk.ApplicationWindow {
         });
 
         stopwatch.notify["state"].connect ((w) => {
-            stack.child_set_property (stopwatch, "needs-attention", stopwatch.state == 
Stopwatch.MainPanel.State.RUNNING);
+            stack.child_set_property (stopwatch, "needs-attention", stopwatch.state == 
Stopwatch.Face.State.RUNNING);
         });
 
         timer.ring.connect ((w) => {
@@ -110,7 +110,7 @@ public class Window : Gtk.ApplicationWindow {
         });
 
         timer.notify["state"].connect ((w) => {
-            stack.child_set_property (timer, "needs-attention", timer.state == 
Timer.MainPanel.State.RUNNING);
+            stack.child_set_property (timer, "needs-attention", timer.state == Timer.Face.State.RUNNING);
         });
 
         stack.visible_child = panels[settings.get_enum ("panel-id")];
@@ -133,7 +133,7 @@ public class Window : Gtk.ApplicationWindow {
     }
 
     public void show_world () {
-        ((World.MainPanel) panels[PanelId.WORLD]).reset_view ();
+        ((World.Face) panels[PanelId.WORLD]).reset_view ();
         stack.visible_child = panels[PanelId.WORLD];;
     }
 
diff --git a/src/world.vala b/src/world.vala
index d04382d..2bf8ce1 100644
--- a/src/world.vala
+++ b/src/world.vala
@@ -216,7 +216,7 @@ private class LocationDialog : Gtk.Dialog {
 }
 
 [GtkTemplate (ui = "/org/gnome/clocks/ui/world.ui")]
-public class MainPanel : Gtk.Stack, Clocks.Clock {
+public class Face : Gtk.Stack, Clocks.Clock {
     public string label { get; construct set; }
     public HeaderBar header_bar { get; construct set; }
     public PanelId panel_id { get; construct set; }
@@ -243,8 +243,11 @@ public class MainPanel : Gtk.Stack, Clocks.Clock {
     [GtkChild]
     private Gtk.Label standalone_sunset_label;
 
-    public MainPanel (HeaderBar header_bar) {
-        Object (label: _("World"), header_bar: header_bar, transition_type: 
Gtk.StackTransitionType.CROSSFADE, panel_id: PanelId.WORLD);
+    public Face (HeaderBar header_bar) {
+        Object (label: _("World"),
+                header_bar: header_bar,
+                panel_id: PanelId.WORLD,
+                transition_type: Gtk.StackTransitionType.CROSSFADE);
 
         locations = new List<Item> ();
         settings = new GLib.Settings ("org.gnome.clocks");


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