ayatana-commits team mailing list archive
-
ayatana-commits team
-
Mailing list archive
-
Message #03463
[Merge] lp:~mterry/indicator-datetime/bevel+utc into lp:indicator-datetime
Michael Terry has proposed merging lp:~mterry/indicator-datetime/bevel+utc into lp:indicator-datetime with lp:~mterry/indicator-datetime/sort-names-and-cleanup as a prerequisite.
Requested reviews:
Indicator Applet Developers (indicator-applet-developers)
Related bugs:
Bug #740938 in indicator-datetime (Ubuntu): ""UTC" location can be removed but not re-added"
https://bugs.launchpad.net/ubuntu/+source/indicator-datetime/+bug/740938
Bug #740941 in indicator-datetime (Ubuntu): ""Locations" window bottom bar is missing a border"
https://bugs.launchpad.net/ubuntu/+source/indicator-datetime/+bug/740941
For more details, see:
https://code.launchpad.net/~mterry/indicator-datetime/bevel+utc/+merge/54684
Add a bevel and add UTC to completion results.
--
https://code.launchpad.net/~mterry/indicator-datetime/bevel+utc/+merge/54684
Your team ayatana-commits is subscribed to branch lp:indicator-datetime.
=== modified file 'data/datetime-dialog.ui'
--- data/datetime-dialog.ui 2011-03-23 12:20:47 +0000
+++ data/datetime-dialog.ui 2011-03-24 11:53:23 +0000
@@ -7,11 +7,6 @@
<property name="step_increment">86400</property>
<property name="page_increment">864000</property>
</object>
- <object class="GtkAdjustment" id="timeAdjustment">
- <property name="upper">1.8446744073709552e+19</property>
- <property name="step_increment">60</property>
- <property name="page_increment">3600</property>
- </object>
<object class="GtkWindow" id="locationsDialog">
<property name="can_focus">False</property>
<property name="title" translatable="yes">Locations</property>
@@ -47,6 +42,17 @@
</packing>
</child>
<child>
+ <object class="GtkHSeparator" id="hseparator1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkHBox" id="hbox10">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -55,7 +61,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="tooltip_text" translatable="yes">Add a Locationâ¦</property>
<property name="use_action_appearance">False</property>
<child>
<object class="GtkImage" id="addImage">
@@ -76,7 +81,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="tooltip_text" translatable="yes">Remove This Location</property>
<property name="use_action_appearance">False</property>
<child>
<object class="GtkImage" id="removeImage">
@@ -96,7 +100,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">1</property>
+ <property name="position">2</property>
</packing>
</child>
</object>
@@ -112,6 +116,11 @@
<column type="gchararray"/>
</columns>
</object>
+ <object class="GtkAdjustment" id="timeAdjustment">
+ <property name="upper">1.8446744073709552e+19</property>
+ <property name="step_increment">60</property>
+ <property name="page_increment">3600</property>
+ </object>
<object class="GtkWindow" id="timeDateDialog">
<property name="can_focus">False</property>
<property name="border_width">5</property>
=== modified file 'src/timezone-completion.c'
--- src/timezone-completion.c 2011-03-24 11:53:23 +0000
+++ src/timezone-completion.c 2011-03-24 11:53:23 +0000
@@ -229,6 +229,20 @@
json_reader_end_element (reader);
}
+ if (strlen (priv->request_text) < 4) {
+ gchar * lower_text = g_ascii_strdown (priv->request_text, -1);
+ if (g_strcmp0 (lower_text, "ut") == 0 ||
+ g_strcmp0 (lower_text, "utc") == 0) {
+ GtkTreeIter iter;
+ gtk_list_store_append (store, &iter);
+ gtk_list_store_set (store, &iter,
+ TIMEZONE_COMPLETION_ZONE, "UTC",
+ TIMEZONE_COMPLETION_NAME, "UTC",
+ -1);
+ }
+ g_free (lower_text);
+ }
+
save_and_use_model (completion, GTK_TREE_MODEL (store));
g_object_unref (G_OBJECT (reader));
}
@@ -372,6 +386,13 @@
g_free (name);
}
+ GtkTreeIter iter;
+ gtk_list_store_append (store, &iter);
+ gtk_list_store_set (store, &iter,
+ TIMEZONE_COMPLETION_ZONE, "UTC",
+ TIMEZONE_COMPLETION_NAME, "UTC",
+ -1);
+
tz_db_free (db);
return store;
}
@@ -389,7 +410,9 @@
-1);
gchar * user_name;
- if (admin1 == NULL || admin1[0] == 0) {
+ if (country == NULL || country[0] == 0) {
+ user_name = g_strdup (name);
+ } else if (admin1 == NULL || admin1[0] == 0) {
user_name = g_strdup_printf ("%s <small>(%s)</small>", name, country);
} else {
user_name = g_strdup_printf ("%s <small>(%s, %s)</small>", name, admin1, country);
Follow ups