diff options
author | Thomas Wood <thos@gnome.org> | 2010-07-07 22:45:05 +0100 |
---|---|---|
committer | Thomas Wood <thos@gnome.org> | 2010-07-07 22:45:05 +0100 |
commit | a582fd4d75f6b9ed7665125b01d34b630c9ab259 (patch) | |
tree | 50ccda0253d1ea4c09af01c51180f705fd9e727c | |
parent | 40232421bf84258efe8afef42b9ca79b3e891e19 (diff) |
datetime: remove "seconds" spin button
It is not necessary to be able to set the "seconds" of the current time.
Resetting the seconds to zero is appropriate for most users.
-rw-r--r-- | panels/datetime/cc-datetime-panel.c | 10 | ||||
-rw-r--r-- | panels/datetime/datetime.ui | 16 |
2 files changed, 7 insertions, 19 deletions
diff --git a/panels/datetime/cc-datetime-panel.c b/panels/datetime/cc-datetime-panel.c index 450782b59..11a809e12 100644 --- a/panels/datetime/cc-datetime-panel.c +++ b/panels/datetime/cc-datetime-panel.c @@ -163,7 +163,7 @@ apply_button_clicked_cb (GtkButton *button, { GtkWidget *widget; CcDateTimePanelPrivate *priv = self->priv; - guint h, mon, s, y, min, d; + guint h, mon, y, min, d; struct tm fulltime; time_t unixtime; gchar *filename; @@ -172,13 +172,11 @@ apply_button_clicked_cb (GtkButton *button, h = gtk_spin_button_get_value (GTK_SPIN_BUTTON (widget)); widget = (GtkWidget *) gtk_builder_get_object (priv->builder, "spin_minute"); min = gtk_spin_button_get_value (GTK_SPIN_BUTTON (widget)); - widget = (GtkWidget *) gtk_builder_get_object (priv->builder, "spin_second"); - s = gtk_spin_button_get_value (GTK_SPIN_BUTTON (widget)); widget = (GtkWidget *) gtk_builder_get_object (priv->builder, "calendar"); gtk_calendar_get_date (GTK_CALENDAR (widget), &y, &mon, &d); - fulltime.tm_sec = s; + fulltime.tm_sec = 0; fulltime.tm_min = min; fulltime.tm_hour = h; fulltime.tm_mday = d; @@ -241,8 +239,6 @@ location_changed_cb (CcTimezoneMap *map, gtk_spin_button_set_value (GTK_SPIN_BUTTON (widget), ltime->tm_hour); widget = (GtkWidget *) gtk_builder_get_object (priv->builder, "spin_minute"); gtk_spin_button_set_value (GTK_SPIN_BUTTON (widget), ltime->tm_min); - widget = (GtkWidget *) gtk_builder_get_object (priv->builder, "spin_second"); - gtk_spin_button_set_value (GTK_SPIN_BUTTON (widget), ltime->tm_sec); widget = (GtkWidget*) gtk_builder_get_object (priv->builder, "label_current_time"); @@ -316,8 +312,6 @@ cc_date_time_panel_init (CcDateTimePanel *self) gtk_spin_button_set_value (GTK_SPIN_BUTTON (widget), ltime->tm_hour); widget = (GtkWidget *) gtk_builder_get_object (priv->builder, "spin_minute"); gtk_spin_button_set_value (GTK_SPIN_BUTTON (widget), ltime->tm_min); - widget = (GtkWidget *) gtk_builder_get_object (priv->builder, "spin_second"); - gtk_spin_button_set_value (GTK_SPIN_BUTTON (widget), ltime->tm_sec); g_signal_connect ((GtkWidget*) gtk_builder_get_object (priv->builder, "button_apply"), "clicked", diff --git a/panels/datetime/datetime.ui b/panels/datetime/datetime.ui index fdd2a74b5..ebe4b3d1f 100644 --- a/panels/datetime/datetime.ui +++ b/panels/datetime/datetime.ui @@ -123,24 +123,22 @@ </packing> </child> <child> - <object class="GtkSpinButton" id="spin_minute"> + <object class="GtkLabel" id="label2"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="invisible_char">•</property> - <property name="width_chars">2</property> - <property name="adjustment">adjustment_min</property> + <property name="label" translatable="yes">:</property> </object> <packing> + <property name="expand">False</property> <property name="position">1</property> </packing> </child> <child> - <object class="GtkSpinButton" id="spin_second"> + <object class="GtkSpinButton" id="spin_minute"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="invisible_char">•</property> <property name="width_chars">2</property> - <property name="adjustment">adjustment_sec</property> + <property name="adjustment">adjustment_min</property> </object> <packing> <property name="position">2</property> @@ -235,8 +233,4 @@ <property name="upper">60</property> <property name="step_increment">1</property> </object> - <object class="GtkAdjustment" id="adjustment_sec"> - <property name="upper">60</property> - <property name="step_increment">1</property> - </object> </interface> |