aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRodney Dawes <dobey@ximian.com>2004-05-21 04:13:12 +0800
committerRodney Dawes <dobey@src.gnome.org>2004-05-21 04:13:12 +0800
commitcbe504718b4f65fd35ac4ae5780728862f7b6e88 (patch)
tree15a9557d4bf1b6d74774c38b12f7c3bb78475509
parentbb332fc6a0c1ad636ebc7aeaa0db42deabe19407 (diff)
downloadgsoc2013-evolution-cbe504718b4f65fd35ac4ae5780728862f7b6e88.tar.gz
gsoc2013-evolution-cbe504718b4f65fd35ac4ae5780728862f7b6e88.tar.zst
gsoc2013-evolution-cbe504718b4f65fd35ac4ae5780728862f7b6e88.zip
Use the activate signal, instead of changed, for the combo box
2004-05-20 Rodney Dawes <dobey@ximian.com> * e-timezone-dialog/e-timezone-dialog.c (e_timezone_dialog_construct): Use the activate signal, instead of changed, for the combo box (on_map_motion): Set the text in the combo's entry when we mouse over one of the points on the map, as a preview for the timezone (on_map_leave): Reset the combo's entry to the timezone we started with when we leave the map Fixes #57122 svn path=/trunk/; revision=26020
-rw-r--r--widgets/ChangeLog11
-rw-r--r--widgets/e-timezone-dialog/e-timezone-dialog.c11
2 files changed, 21 insertions, 1 deletions
diff --git a/widgets/ChangeLog b/widgets/ChangeLog
index 765112025a..e1674cc07f 100644
--- a/widgets/ChangeLog
+++ b/widgets/ChangeLog
@@ -1,3 +1,14 @@
+2004-05-20 Rodney Dawes <dobey@ximian.com>
+
+ * e-timezone-dialog/e-timezone-dialog.c (e_timezone_dialog_construct):
+ Use the activate signal, instead of changed, for the combo box
+ (on_map_motion): Set the text in the combo's entry when we mouse over
+ one of the points on the map, as a preview for the timezone
+ (on_map_leave): Reset the combo's entry to the timezone we started with
+ when we leave the map
+
+ Fixes #57122
+
2004-04-09 Rodney Dawes <dobey@ximian.com>
* e-timezone-dialog/e-timezone-dialog.c
diff --git a/widgets/e-timezone-dialog/e-timezone-dialog.c b/widgets/e-timezone-dialog/e-timezone-dialog.c
index d586fc8a76..088ceaf26f 100644
--- a/widgets/e-timezone-dialog/e-timezone-dialog.c
+++ b/widgets/e-timezone-dialog/e-timezone-dialog.c
@@ -269,7 +269,7 @@ e_timezone_dialog_construct (ETimezoneDialog *etd)
g_signal_connect (map, "visibility-notify-event", G_CALLBACK (on_map_visibility_changed), etd);
g_signal_connect (map, "button-press-event", G_CALLBACK (on_map_button_pressed), etd);
- g_signal_connect (GTK_COMBO (priv->timezone_combo)->entry, "changed", G_CALLBACK (on_combo_changed), etd);
+ g_signal_connect (GTK_COMBO (priv->timezone_combo)->entry, "activate", G_CALLBACK (on_combo_changed), etd);
return etd;
@@ -366,6 +366,7 @@ on_map_motion (GtkWidget *widget, GdkEventMotion *event, gpointer data)
ETimezoneDialog *etd;
ETimezoneDialogPrivate *priv;
double longitude, latitude;
+ icaltimezone *new_zone;
etd = E_TIMEZONE_DIALOG (data);
priv = etd->priv;
@@ -384,6 +385,11 @@ on_map_motion (GtkWidget *widget, GdkEventMotion *event, gpointer data)
e_map_point_set_color_rgba (priv->map, priv->point_hover,
E_TIMEZONE_DIALOG_MAP_POINT_HOVER_RGBA);
+ new_zone = get_zone_from_point (etd, priv->point_hover);
+
+ gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (priv->timezone_combo)->entry),
+ zone_display_name (new_zone));
+
return TRUE;
}
@@ -407,6 +413,9 @@ on_map_leave (GtkWidget *widget, GdkEventCrossing *event, gpointer data)
e_map_point_set_color_rgba (priv->map, priv->point_hover,
E_TIMEZONE_DIALOG_MAP_POINT_NORMAL_RGBA);
+ gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (priv->timezone_combo)->entry),
+ zone_display_name (priv->zone));
+
priv->point_hover = NULL;
return FALSE;