gnome-panel r11036 - trunk/applets/clock



Author: vuntz
Date: Thu Apr 10 07:49:08 2008
New Revision: 11036
URL: http://svn.gnome.org/viewvc/gnome-panel?rev=11036&view=rev

Log:
2008-04-10  Vincent Untz  <vuntz gnome org>

	* clock.c: (edit_clear): when clearing the "edit location" window, also
	clear the "find location" window, so that next time it gets opened,
	there's no weird pre-filled text
	* clock.glade: name the scrolled window in the find location window


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

Modified: trunk/applets/clock/clock.c
==============================================================================
--- trunk/applets/clock/clock.c	(original)
+++ trunk/applets/clock/clock.c	Thu Apr 10 07:49:08 2008
@@ -3587,6 +3587,8 @@
         GtkWidget *lon_entry = glade_xml_get_widget (cd->glade_xml, "edit-location-longitude-entry");
         GtkWidget *lat_combo = glade_xml_get_widget (cd->glade_xml, "edit-location-latitude-combo");
         GtkWidget *lon_combo = glade_xml_get_widget (cd->glade_xml, "edit-location-longitude-combo");
+        GtkWidget *scroll = glade_xml_get_widget (cd->glade_xml, "find-location-scroll");
+	GtkAdjustment *adjustment;
 
         /* clear out the old data */
         gtk_combo_box_set_active (GTK_COMBO_BOX (zone_combo), -1);
@@ -3598,6 +3600,14 @@
 
         gtk_combo_box_set_active (GTK_COMBO_BOX (lat_combo), -1);
         gtk_combo_box_set_active (GTK_COMBO_BOX (lon_combo), -1);
+
+	if (cd->find_location_entry)
+		gtk_entry_set_text (GTK_ENTRY (cd->find_location_entry), "");
+
+	adjustment = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (scroll));
+	gtk_adjustment_set_value (adjustment, 0);
+	gtk_scrolled_window_set_vadjustment (GTK_SCROLLED_WINDOW (scroll),
+					     adjustment);
 }
 
 static void

Modified: trunk/applets/clock/clock.glade
==============================================================================
--- trunk/applets/clock/clock.glade	(original)
+++ trunk/applets/clock/clock.glade	Thu Apr 10 07:49:08 2008
@@ -2386,7 +2386,7 @@
 	  <property name="spacing">6</property>
 
 	  <child>
-	    <widget class="GtkScrolledWindow" id="scrolledwindow13">
+	    <widget class="GtkScrolledWindow" id="find-location-scroll">
 	      <property name="visible">True</property>
 	      <property name="can_focus">True</property>
 	      <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>



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