From 24c56f175744c852ef211207405ea40ae3fba450 Mon Sep 17 00:00:00 2001 From: Rodney Dawes Date: Wed, 14 Apr 2004 21:30:54 +0000 Subject: Set the border widths on the dialog's vbox and action area to be 2004-04-09 Rodney Dawes * e-timezone-dialog/e-timezone-dialog.c (e_timezone_dialog_construct): Set the border widths on the dialog's vbox and action area to be HIG-complaint Get rid of the timezone preview widget in here Point the internal 'table' to the right widget (on_map_motion): Get rid of the extra-hacky code to set the preview widget's label to the timezone, now that that widget is gone (on_map_leave): Update the comment to not reference the preview widget that is now gone Get rid of the code to set the preview widget's label to empty string * e-timezone-dialog/e-timezone-dialog.glade: Update for HIG-compliance 2004-04-09 Rodney Dawes * e-charset-picker.c: Include gtkhbox.h in here to avoid the warnings (activate_other): (e_charset_picker_dialog): Make these dialogs be more HIG-compliant * e-filter-bar.c (do_advanced): (menubar_activated): Make these dialogs be more HIG-compliant svn path=/trunk/; revision=25468 --- widgets/e-timezone-dialog/e-timezone-dialog.c | 33 +--- widgets/e-timezone-dialog/e-timezone-dialog.glade | 227 ++++++++++++---------- 2 files changed, 130 insertions(+), 130 deletions(-) (limited to 'widgets/e-timezone-dialog') diff --git a/widgets/e-timezone-dialog/e-timezone-dialog.c b/widgets/e-timezone-dialog/e-timezone-dialog.c index 3a31bbbf5d..d586fc8a76 100644 --- a/widgets/e-timezone-dialog/e-timezone-dialog.c +++ b/widgets/e-timezone-dialog/e-timezone-dialog.c @@ -58,7 +58,6 @@ struct _ETimezoneDialogPrivate { GtkWidget *app; GtkWidget *table; GtkWidget *map_window; - GtkWidget *timezone_preview; GtkWidget *timezone_combo; }; @@ -246,6 +245,9 @@ e_timezone_dialog_construct (ETimezoneDialog *etd) goto error; } + gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (priv->app)->vbox), 0); + gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (priv->app)->action_area), 12); + priv->map = e_map_new (); map = GTK_WIDGET (priv->map); gtk_widget_set_events (map, gtk_widget_get_events (map) @@ -293,13 +295,11 @@ get_widgets (ETimezoneDialog *etd) priv->app = GW ("timezone-dialog"); priv->map_window = GW ("map-window"); priv->timezone_combo = GW ("timezone-combo"); - priv->timezone_preview = GW ("timezone-preview"); - priv->table = GW ("table1"); + priv->table = GW ("timezone-table"); return (priv->app && priv->map_window && priv->timezone_combo - && priv->timezone_preview && priv->table); } @@ -366,9 +366,6 @@ on_map_motion (GtkWidget *widget, GdkEventMotion *event, gpointer data) ETimezoneDialog *etd; ETimezoneDialogPrivate *priv; double longitude, latitude; - char *old_zone_name; - const char *new_zone_name; - icaltimezone *new_zone; etd = E_TIMEZONE_DIALOG (data); priv = etd->priv; @@ -387,16 +384,6 @@ 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); - gtk_label_get (GTK_LABEL (priv->timezone_preview), &old_zone_name); - new_zone = get_zone_from_point (etd, priv->point_hover); - if (new_zone) { - new_zone_name = zone_display_name (new_zone); - if (strcmp (old_zone_name, new_zone_name)) { - gtk_label_set_text (GTK_LABEL (priv->timezone_preview), - new_zone_name); - } - } - return TRUE; } @@ -406,14 +393,13 @@ on_map_leave (GtkWidget *widget, GdkEventCrossing *event, gpointer data) { ETimezoneDialog *etd; ETimezoneDialogPrivate *priv; - char *old_zone; etd = E_TIMEZONE_DIALOG (data); priv = etd->priv; - /* We only want to reset the hover point and the preview text if this - is a normal leave event. For some reason we are getting leave events - when the button is pressed in the map, which causes problems. */ + /* We only want to reset the hover point if this is a normal leave + event. For some reason we are getting leave events when the + button is pressed in the map, which causes problems. */ if (event->mode != GDK_CROSSING_NORMAL) return FALSE; @@ -423,11 +409,6 @@ on_map_leave (GtkWidget *widget, GdkEventCrossing *event, gpointer data) priv->point_hover = NULL; - /* Clear the timezone preview label, if it isn't already empty. */ - gtk_label_get (GTK_LABEL (priv->timezone_preview), &old_zone); - if (strcmp (old_zone, "")) - gtk_label_set_text (GTK_LABEL (priv->timezone_preview), ""); - return FALSE; } diff --git a/widgets/e-timezone-dialog/e-timezone-dialog.glade b/widgets/e-timezone-dialog/e-timezone-dialog.glade index 9e1bbb945b..3bcc8df73c 100644 --- a/widgets/e-timezone-dialog/e-timezone-dialog.glade +++ b/widgets/e-timezone-dialog/e-timezone-dialog.glade @@ -2,9 +2,9 @@ + - 6 Select a Time Zone GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE @@ -13,7 +13,7 @@ 400 True False - True + False @@ -60,22 +60,70 @@ - - 6 + + 12 True - 3 - 1 False - 6 - 6 + 12 - + True - Use the left mouse button to zoom in on an area of the map and select a time zone. + False + 12 + + + + True + gtk-dialog-info + 6 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + Use the left mouse button to zoom in on an area of the map and select a time zone. Use the right mouse button to zoom out. + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + 0 + False + False + + + + + + True + <b>Time Zones</b> False - False + True GTK_JUSTIFY_LEFT False False @@ -85,89 +133,22 @@ Use the right mouse button to zoom out. 0 - 0 - 1 - 0 - 1 - 2 - expand - + 0 + False + False - + True - 0 - 0.5 - GTK_SHADOW_ETCHED_IN - - - - 6 - True - False - 6 - - - - True - GTK_POLICY_ALWAYS - GTK_POLICY_ALWAYS - GTK_SHADOW_IN - GTK_CORNER_TOP_LEFT - - - - - - - 0 - True - True - - - - - - True - False - 0 - - - - True - - False - False - GTK_JUSTIFY_CENTER - False - False - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - 0 - False - False - - - - + False + 12 - + True - Time Zones + False False GTK_JUSTIFY_LEFT @@ -179,16 +160,58 @@ Use the right mouse button to zoom out. 0 - label_item + 0 + False + False + + + + + + True + True + GTK_POLICY_ALWAYS + GTK_POLICY_ALWAYS + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + + + + + 0 + True + True - 0 - 1 - 1 - 2 - fill + 0 + True + True + + + + + + True + <b>_Selection</b> + True + True + GTK_JUSTIFY_CENTER + False + False + 0 + 0.5 + 0 + 0 + combo-entry1 + + + 0 + False + False @@ -196,22 +219,21 @@ Use the right mouse button to zoom out. True False - 6 + 12 - + True - _Selection: - True + + False False - GTK_JUSTIFY_CENTER + GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 - combo-entry1 0 @@ -280,12 +302,9 @@ Use the right mouse button to zoom out. - 0 - 1 - 2 - 3 - fill - fill + 0 + False + False -- cgit v1.2.3