gnome-panel r11098 - trunk/applets/clock



Author: vuntz
Date: Tue May 13 11:53:40 2008
New Revision: 11098
URL: http://svn.gnome.org/viewvc/gnome-panel?rev=11098&view=rev

Log:
2008-05-13  Vincent Untz  <vuntz gnome org>

	* clock.c: (run_prefs_locations_add), (edit_tree_row): put the focus in
	the name entry


Modified:
   trunk/applets/clock/ChangeLog
   trunk/applets/clock/clock.c

Modified: trunk/applets/clock/clock.c
==============================================================================
--- trunk/applets/clock/clock.c	(original)
+++ trunk/applets/clock/clock.c	Tue May 13 11:53:40 2008
@@ -3870,6 +3870,7 @@
 run_prefs_locations_add (GtkButton *button, ClockData *cd)
 {
         GtkWidget *edit_window = glade_xml_get_widget (cd->glade_xml, "edit-location-window");
+        GtkWidget *name_entry = glade_xml_get_widget (cd->glade_xml, "edit-location-name-entry");
         GtkWidget *zone_combo = glade_xml_get_widget (cd->glade_xml, "edit-location-timezone-combo");
 
         fill_timezone_combo_from_location (cd, zone_combo, NULL);
@@ -3884,6 +3885,9 @@
 				   GINT_TO_POINTER (g_signal_connect (edit_window, "delete_event", G_CALLBACK (edit_delete), cd)));
 	}
 
+	gtk_widget_grab_focus (name_entry);
+	gtk_editable_set_position (GTK_EDITABLE (name_entry), -1);
+
         gtk_window_present_with_time (GTK_WINDOW (edit_window), gtk_get_current_event_time ());
 }
 
@@ -3948,6 +3952,9 @@
 
         g_object_set_data (G_OBJECT (edit_window), "clock-location", loc);
 
+	gtk_widget_grab_focus (name_entry);
+	gtk_editable_set_position (GTK_EDITABLE (name_entry), -1);
+
         gtk_window_present (GTK_WINDOW (edit_window));
 }
 



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