/jds/bin/diff -uprN gnome-panel-2.27.91.old/applets/clock/clock.c gnome-panel-2.27.91/applets/clock/clock.c
--- gnome-panel-2.27.91.old/applets/clock/clock.c	2009-08-27 18:45:22.763599000 +0100
+++ gnome-panel-2.27.91/applets/clock/clock.c	2009-08-27 18:57:31.552271000 +0100
@@ -146,6 +146,8 @@ struct _ClockData {
 	GtkWidget *minutes_spin;
 	GtkWidget *seconds_spin;
 	GtkWidget *set_time_button;
+	GtkWidget *show_weather_toggle;
+	GtkWidget *show_temperature_toggle;
 
 	GtkListStore *cities_store;
         GtkWidget *cities_section;
@@ -234,6 +236,7 @@ static void applet_change_orient (PanelA
 				  ClockData         *cd);
 
 static void edit_hide (GtkWidget *unused, ClockData *cd);
+static void update_show_weather_toggles (ClockData *cd);
 static gboolean edit_delete (GtkWidget *unused, GdkEvent *event, ClockData *cd);
 static void save_cities_store (ClockData *cd);
 
@@ -1975,11 +1978,38 @@ update_panel_weather (ClockData *cd)
                 gtk_widget_hide (cd->panel_temperature_label);
 
 	if ((cd->show_weather || cd->show_temperature) &&
-	    g_list_length (cd->locations) > 0)
-                gtk_widget_show (cd->weather_obox);
-        else
-                gtk_widget_hide (cd->weather_obox);
+	    g_list_length (cd->locations) > 0) {
+        ClockLocation *loc = NULL;
+        GList *locations, *l;
+        gboolean current_found = FALSE;
 
+        /* need to process locations, if there is no current
+           location then hide the weather/temperature on panel */
+        locations = cd->locations;
+        for (l = locations; l; l = l->next) {
+            loc = l->data;
+            if (clock_location_is_current (loc)) {
+                current_found = TRUE;
+                break;
+            }
+        }
+        if (current_found == FALSE) {
+            /* There is no current location so hide the obox */
+            gtk_widget_hide(cd->weather_obox);
+        } else {
+            gtk_widget_show(cd->weather_obox);
+        }
+    } else {
+        gtk_widget_hide (cd->weather_obox);
+    }
+        
+    if (g_list_length (cd->locations) <= 0) {
+        if (cd->panel_weather_icon)
+            gtk_image_set_from_pixbuf (GTK_IMAGE (cd->panel_weather_icon),
+                                       NULL);
+        if (cd->panel_temperature_label)
+            gtk_label_set_text (GTK_LABEL (cd->panel_temperature_label), "");
+    }
 	gtk_widget_queue_resize (cd->applet);
 }
 
@@ -2074,19 +2104,7 @@ locations_changed (ClockData *cd)
 	ClockLocation *loc;
 	glong id;
 
-	if (!cd->locations) {
-		if (cd->weather_obox)
-			gtk_widget_hide (cd->weather_obox);
-		if (cd->panel_weather_icon)
-			gtk_image_set_from_pixbuf (GTK_IMAGE (cd->panel_weather_icon),
-						   NULL);
-		if (cd->panel_temperature_label)
-			gtk_label_set_text (GTK_LABEL (cd->panel_temperature_label),
-					    "");
-	} else {
-		if (cd->weather_obox)
-			gtk_widget_show (cd->weather_obox);
-	}
+    update_panel_weather (cd);
 
 	for (l = cd->locations; l; l = l->next) {
 		loc = l->data;
@@ -3121,12 +3139,25 @@ edit_clear (ClockData *cd)
 }
 
 static void
+update_show_weather_toggles(ClockData *cd)
+{
+        if (g_list_length (cd->locations) <= 0) {
+            gtk_widget_set_sensitive (cd->show_weather_toggle, FALSE);
+            gtk_widget_set_sensitive (cd->show_temperature_toggle, FALSE);
+        } else {
+            gtk_widget_set_sensitive (cd->show_weather_toggle, TRUE);
+            gtk_widget_set_sensitive (cd->show_temperature_toggle, TRUE);
+        }
+}
+
+static void
 edit_hide (GtkWidget *unused, ClockData *cd)
 {
         GtkWidget *edit_window = _clock_get_widget (cd, "edit-location-window");
 
         gtk_widget_hide (edit_window);
         edit_clear (cd);
+        update_show_weather_toggles (cd);
 }
 
 static gboolean
@@ -3197,6 +3228,8 @@ run_prefs_locations_remove (GtkButton *b
         GtkTreeSelection *sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (cd->prefs_locations));
 
         gtk_tree_selection_selected_foreach (sel, remove_tree_row, cd);
+        update_panel_weather (cd);
+        update_show_weather_toggles (cd);
 }
 
 static void
@@ -3413,17 +3446,22 @@ fill_prefs_window (ClockData *cd)
                           G_CALLBACK (set_show_seconds_cb), cd);
 
 	/* Set the "Show weather" checkbox */
-	widget = _clock_get_widget (cd, "weather_check");
-	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), cd->show_weather);
-	g_signal_connect (widget, "toggled",
+	cd->show_weather_toggle = _clock_get_widget (cd, "weather_check");
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (cd->show_weather_toggle),
+                                  cd->show_weather);
+	g_signal_connect (cd->show_weather_toggle, "toggled",
                           G_CALLBACK (set_show_weather_cb), cd);
 
 	/* Set the "Show temperature" checkbox */
-	widget = _clock_get_widget (cd, "temperature_check");
-	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), cd->show_temperature);
-	g_signal_connect (widget, "toggled",
+	cd->show_temperature_toggle = _clock_get_widget (cd, "temperature_check");
+	gtk_toggle_button_set_active (
+        GTK_TOGGLE_BUTTON (cd->show_temperature_toggle), cd->show_temperature);
+	g_signal_connect (cd->show_temperature_toggle, "toggled",
                           G_CALLBACK (set_show_temperature_cb), cd);
 
+    /* If no Locations then cannot show/hide weather/temperature */
+    update_show_weather_toggles (cd);
+
 	/* Fill the Cities list */
 	widget = _clock_get_widget (cd, "cities_list");
 
@@ -3490,8 +3528,10 @@ ensure_prefs_window_is_created (ClockDat
         GtkTreeSelection *selection;
         GWeatherLocation *world;
 
-        if (cd->prefs_window)
+        if (cd->prefs_window) {
+                update_show_weather_toggles (cd);
                 return;
+        }
 
         cd->prefs_window = _clock_get_widget (cd, "prefs-window");
 
