[gnome-panel] [clock] Add missing mnemonics and window title



commit 92d90739bd54472a4aa36d994b5685185ee58922
Author: Gabor Kelemen <kelemeng gnome hu>
Date:   Tue Aug 11 21:19:14 2009 +0200

    [clock] Add missing mnemonics and window title
    
    http://bugzilla.gnome.org/show_bug.cgi?id=567811

 applets/clock/clock.c  |   12 ++++++++++++
 applets/clock/clock.ui |   28 ++++++++++++++++++----------
 2 files changed, 30 insertions(+), 10 deletions(-)
---
diff --git a/applets/clock/clock.c b/applets/clock/clock.c
index ab199f1..b926412 100644
--- a/applets/clock/clock.c
+++ b/applets/clock/clock.c
@@ -3159,6 +3159,7 @@ run_prefs_locations_add (GtkButton *button, ClockData *cd)
         fill_timezone_combo_from_location (cd, NULL);
 
         g_object_set_data (G_OBJECT (edit_window), "clock-location", NULL);
+        gtk_window_set_title (GTK_WINDOW (edit_window), _("Choose Location"));
         gtk_window_set_transient_for (GTK_WINDOW (edit_window), GTK_WINDOW (cd->prefs_window));
 
 	if (g_object_get_data (G_OBJECT (edit_window), "delete-handler") == NULL) {
@@ -3228,6 +3229,7 @@ edit_tree_row (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpoint
 	gtk_widget_grab_focus (GTK_WIDGET (cd->location_entry));
 	gtk_editable_set_position (GTK_EDITABLE (cd->location_entry), -1);
 
+        gtk_window_set_title (GTK_WINDOW (edit_window), _("Edit Location"));
         gtk_window_present (GTK_WINDOW (edit_window));
 }
 
@@ -3430,6 +3432,8 @@ ensure_prefs_window_is_created (ClockData *cd)
         GtkWidget *edit_ok_button;
         GtkWidget *location_box;
         GtkWidget *zone_box;
+        GtkWidget *location_name_label;
+        GtkWidget *timezone_label;
         GtkTreeSelection *selection;
         GWeatherLocation *world;
 
@@ -3444,6 +3448,9 @@ ensure_prefs_window_is_created (ClockData *cd)
         prefs_help_button = _clock_get_widget (cd, "prefs-help-button");
         clock_options = _clock_get_widget (cd, "clock-options");
         cd->prefs_locations = GTK_TREE_VIEW (_clock_get_widget (cd, "cities_list"));
+        location_name_label = _clock_get_widget (cd, "location-name-label");
+        timezone_label = _clock_get_widget (cd, "timezone-label");
+
 
 	if (!clock_locale_supports_am_pm ())
 		gtk_widget_hide (clock_options);
@@ -3494,6 +3501,9 @@ ensure_prefs_window_is_created (ClockData *cd)
         cd->location_entry = GWEATHER_LOCATION_ENTRY (gweather_location_entry_new (world));
         gtk_widget_show (GTK_WIDGET (cd->location_entry));
         gtk_container_add (GTK_CONTAINER (location_box), GTK_WIDGET (cd->location_entry));
+        gtk_label_set_mnemonic_widget (GTK_LABEL (location_name_label),
+                                       GTK_WIDGET (cd->location_entry));
+
         g_signal_connect (G_OBJECT (cd->location_entry), "notify::location",
                           G_CALLBACK (location_changed), cd);
 
@@ -3501,6 +3511,8 @@ ensure_prefs_window_is_created (ClockData *cd)
         cd->zone_combo = GWEATHER_TIMEZONE_MENU (gweather_timezone_menu_new (world));
         gtk_widget_show (GTK_WIDGET (cd->zone_combo));
         gtk_container_add (GTK_CONTAINER (zone_box), GTK_WIDGET (cd->zone_combo));
+        gtk_label_set_mnemonic_widget (GTK_LABEL (timezone_label),
+                                       GTK_WIDGET (cd->zone_combo));
 
         gweather_location_unref (world);
 
diff --git a/applets/clock/clock.ui b/applets/clock/clock.ui
index 78f6b59..11d9f8d 100644
--- a/applets/clock/clock.ui
+++ b/applets/clock/clock.ui
@@ -102,10 +102,11 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkLabel" id="label242">
+                      <object class="GtkLabel" id="timezone-label">
                         <property name="visible">True</property>
                         <property name="xalign">0</property>
-                        <property name="label" translatable="yes">Timezone:</property>
+                        <property name="label" translatable="yes">_Timezone:</property>
+                        <property name="use_underline">True</property>
                       </object>
                       <packing>
                         <property name="top_attach">2</property>
@@ -115,10 +116,11 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkLabel" id="label241">
+                      <object class="GtkLabel" id="location-name-label">
                         <property name="visible">True</property>
                         <property name="xalign">0</property>
-                        <property name="label" translatable="yes">Location Name:</property>
+                        <property name="label" translatable="yes">_Location Name:</property>
+                        <property name="use_underline">True</property>
                       </object>
                       <packing>
                         <property name="x_options">GTK_FILL</property>
@@ -229,7 +231,9 @@
                       <object class="GtkLabel" id="label238">
                         <property name="visible">True</property>
                         <property name="xalign">0</property>
-                        <property name="label" translatable="yes">Longitude:</property>
+                        <property name="label" translatable="yes">L_ongitude:</property>
+                        <property name="use_underline">True</property>
+                        <property name="mnemonic_widget">edit-location-longitude-entry</property>
                       </object>
                       <packing>
                         <property name="top_attach">4</property>
@@ -248,7 +252,9 @@
                           <object class="GtkLabel" id="label237">
                             <property name="visible">True</property>
                             <property name="xalign">0</property>
-                            <property name="label" translatable="yes">Latitude:</property>
+                            <property name="label" translatable="yes">L_atitude:</property>
+                            <property name="use_underline">True</property>
+                            <property name="mnemonic_widget">edit-location-latitude-entry</property>
                           </object>
                           <packing>
                             <property name="expand">False</property>
@@ -447,7 +453,9 @@
                       <object class="GtkLabel" id="label236">
                         <property name="visible">True</property>
                         <property name="xalign">0</property>
-                        <property name="label" translatable="yes">Time:</property>
+                        <property name="label" translatable="yes">_Time:</property>
+                        <property name="use_underline">True</property>
+                        <property name="mnemonic_widget">hours_spin</property>
                       </object>
                       <packing>
                         <property name="top_attach">1</property>
@@ -504,7 +512,7 @@
             </child>
             <child>
               <object class="GtkButton" id="set-time-button">
-                <property name="label" translatable="yes">Set System Time</property>
+                <property name="label" translatable="yes">_Set System Time</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">False</property>
@@ -532,7 +540,7 @@
   </object>
   <object class="GtkListStore" id="liststore1">
     <columns>
-      <!-- column-name item text -->
+      <!-- column-name item -->
       <column type="gchararray"/>
     </columns>
     <data>
@@ -546,7 +554,7 @@
   </object>
   <object class="GtkListStore" id="liststore2">
     <columns>
-      <!-- column-name item text -->
+      <!-- column-name item -->
       <column type="gchararray"/>
     </columns>
     <data>



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