diff options
Diffstat (limited to 'widgets/e-timezone-dialog')
-rw-r--r-- | widgets/e-timezone-dialog/.cvsignore | 7 | ||||
-rw-r--r-- | widgets/e-timezone-dialog/Makefile.am | 16 | ||||
-rw-r--r-- | widgets/e-timezone-dialog/e-timezone-dialog.c | 684 | ||||
-rw-r--r-- | widgets/e-timezone-dialog/e-timezone-dialog.glade | 302 | ||||
-rw-r--r-- | widgets/e-timezone-dialog/e-timezone-dialog.h | 68 |
5 files changed, 0 insertions, 1077 deletions
diff --git a/widgets/e-timezone-dialog/.cvsignore b/widgets/e-timezone-dialog/.cvsignore deleted file mode 100644 index d6c55c7345..0000000000 --- a/widgets/e-timezone-dialog/.cvsignore +++ /dev/null @@ -1,7 +0,0 @@ -.deps -.libs -.pure -Makefile -Makefile.in -*.lo -*.la diff --git a/widgets/e-timezone-dialog/Makefile.am b/widgets/e-timezone-dialog/Makefile.am deleted file mode 100644 index ed4502a080..0000000000 --- a/widgets/e-timezone-dialog/Makefile.am +++ /dev/null @@ -1,16 +0,0 @@ -INCLUDES = \ - -I$(top_srcdir) \ - -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \ - -DG_LOG_DOMAIN=__FILE__ \ - $(TZDIALOG_CFLAGS) - -noinst_LTLIBRARIES = \ - libetimezonedialog.la - -libetimezonedialog_la_SOURCES = \ - e-timezone-dialog.c \ - e-timezone-dialog.h - -glade_DATA = e-timezone-dialog.glade - -EXTRA_DIST = $(glade_DATA) diff --git a/widgets/e-timezone-dialog/e-timezone-dialog.c b/widgets/e-timezone-dialog/e-timezone-dialog.c deleted file mode 100644 index 77002b4b7c..0000000000 --- a/widgets/e-timezone-dialog/e-timezone-dialog.c +++ /dev/null @@ -1,684 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* Evolution calendar - Timezone selector dialog - * - * Copyright (C) 2001 Ximian, Inc. - * - * Authors: Damon Chaplin <damon@ximian.com> - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include <config.h> -#include <gtk/gtksignal.h> -#include <gtk/gtkcombo.h> -#include <gtk/gtkentry.h> -#include <gtk/gtklabel.h> -#include <gnome.h> -#include <glade/glade.h> -#include <widgets/misc/e-map.h> - -#include "e-timezone-dialog.h" - -#include <gal/util/e-util.h> - -#define E_TIMEZONE_DIALOG_MAP_POINT_NORMAL_RGBA 0xc070a0ff -#define E_TIMEZONE_DIALOG_MAP_POINT_HOVER_RGBA 0xffff60ff -#define E_TIMEZONE_DIALOG_MAP_POINT_SELECTED_1_RGBA 0xff60e0ff -#define E_TIMEZONE_DIALOG_MAP_POINT_SELECTED_2_RGBA 0x000000ff - -struct _ETimezoneDialogPrivate { - /* The selected timezone. May be NULL for a 'local time' (i.e. when - the displayed name is ""). */ - icaltimezone *zone; - - /* Glade XML data */ - GladeXML *xml; - - EMapPoint *point_selected; - EMapPoint *point_hover; - - EMap *map; - - /* The timeout used to flash the nearest point. */ - guint timeout_id; - - /* Widgets from the Glade file */ - GtkWidget *app; - GtkWidget *table; - GtkWidget *map_window; - GtkWidget *timezone_preview; - GtkWidget *timezone_combo; -}; - - -static void e_timezone_dialog_class_init (ETimezoneDialogClass *class); -static void e_timezone_dialog_init (ETimezoneDialog *etd); -static void e_timezone_dialog_dispose (GObject *object); -static void e_timezone_dialog_finalize (GObject *object); - -static gboolean get_widgets (ETimezoneDialog *etd); -static gboolean on_map_timeout (gpointer data); -static gboolean on_map_motion (GtkWidget *widget, - GdkEventMotion *event, - gpointer data); -static gboolean on_map_leave (GtkWidget *widget, - GdkEventCrossing *event, - gpointer data); -static gboolean on_map_visibility_changed (GtkWidget *w, - GdkEventVisibility *event, - gpointer data); -static gboolean on_map_button_pressed (GtkWidget *w, - GdkEventButton *event, - gpointer data); - -static icaltimezone* get_zone_from_point (ETimezoneDialog *etd, - EMapPoint *point); -static void set_map_timezone (ETimezoneDialog *etd, - icaltimezone *zone); -static void on_combo_changed (GtkEditable *entry, - ETimezoneDialog *etd); - - -static GObjectClass *parent_class; - - -/* Class initialization function for the event editor */ -static void -e_timezone_dialog_class_init (ETimezoneDialogClass *class) -{ - GObjectClass *object_class; - - object_class = G_OBJECT_CLASS (class); - object_class->dispose = e_timezone_dialog_dispose; - object_class->finalize = e_timezone_dialog_finalize; - - parent_class = gtk_type_class (G_TYPE_OBJECT); -} - -/* Object initialization function for the event editor */ -static void -e_timezone_dialog_init (ETimezoneDialog *etd) -{ - ETimezoneDialogPrivate *priv; - - priv = g_new0 (ETimezoneDialogPrivate, 1); - etd->priv = priv; - - priv->point_selected = NULL; - priv->point_hover = NULL; - priv->timeout_id = 0; -} - -/* Dispose handler for the event editor */ -static void -e_timezone_dialog_dispose (GObject *object) -{ - ETimezoneDialog *etd; - ETimezoneDialogPrivate *priv; - GtkWidget *dialog; - - g_return_if_fail (object != NULL); - g_return_if_fail (E_IS_TIMEZONE_DIALOG (object)); - - etd = E_TIMEZONE_DIALOG (object); - priv = etd->priv; - - /* Destroy the actual dialog. */ - if (dialog != NULL) { - dialog = e_timezone_dialog_get_toplevel (etd); - gtk_widget_destroy (dialog); - } - - if (priv->timeout_id) { - g_source_remove (priv->timeout_id); - priv->timeout_id = 0; - } - - if (priv->xml) { - g_object_unref (priv->xml); - priv->xml = NULL; - } - - (* G_OBJECT_CLASS (parent_class)->dispose) (object); -} - -/* Finalize handler for the event editor */ -static void -e_timezone_dialog_finalize (GObject *object) -{ - ETimezoneDialog *etd; - ETimezoneDialogPrivate *priv; - - g_return_if_fail (object != NULL); - g_return_if_fail (E_IS_TIMEZONE_DIALOG (object)); - - etd = E_TIMEZONE_DIALOG (object); - priv = etd->priv; - - g_free (priv); - - (* G_OBJECT_CLASS (parent_class)->finalize) (object); -} - - -static void -e_timezone_dialog_add_timezones (ETimezoneDialog *etd) -{ - ETimezoneDialogPrivate *priv; - icalarray *zones; - GtkWidget *listitem; - GtkCombo *combo; - int i; - - priv = etd->priv; - - combo = GTK_COMBO (priv->timezone_combo); - - /* Clear any existing items in the combo. */ - gtk_list_clear_items (GTK_LIST (combo->list), 0, -1); - - /* Put the "None" and "UTC" entries at the top of the combo's list. - When "None" is selected we want the field to be cleared. */ - listitem = gtk_list_item_new_with_label (_("None")); - gtk_combo_set_item_string (combo, GTK_ITEM (listitem), ""); - gtk_widget_show (listitem); - gtk_container_add (GTK_CONTAINER (combo->list), listitem); - - listitem = gtk_list_item_new_with_label (_("UTC")); - gtk_widget_show (listitem); - gtk_container_add (GTK_CONTAINER (combo->list), listitem); - - /* Get the array of builtin timezones. */ - zones = icaltimezone_get_builtin_timezones (); - - for (i = 0; i < zones->num_elements; i++) { - icaltimezone *zone; - char *location; - - zone = icalarray_element_at (zones, i); - - location = _(icaltimezone_get_location (zone)); - - e_map_add_point (priv->map, location, - icaltimezone_get_longitude (zone), - icaltimezone_get_latitude (zone), - E_TIMEZONE_DIALOG_MAP_POINT_NORMAL_RGBA); - - listitem = gtk_list_item_new_with_label (location); - gtk_widget_show (listitem); - gtk_container_add (GTK_CONTAINER (combo->list), listitem); - } -} - - -ETimezoneDialog * -e_timezone_dialog_construct (ETimezoneDialog *etd) -{ - ETimezoneDialogPrivate *priv; - GtkWidget *map; - - g_return_val_if_fail (etd != NULL, NULL); - g_return_val_if_fail (E_IS_TIMEZONE_DIALOG (etd), NULL); - - priv = etd->priv; - - /* Load the content widgets */ - - priv->xml = glade_xml_new (EVOLUTION_GLADEDIR "/e-timezone-dialog.glade", NULL, NULL); - if (!priv->xml) { - g_message ("e_timezone_dialog_construct(): Could not load the Glade XML file!"); - goto error; - } - - if (!get_widgets (etd)) { - g_message ("e_timezone_dialog_construct(): Could not find all widgets in the XML file!"); - goto error; - } - - priv->map = e_map_new (); - map = GTK_WIDGET (priv->map); - gtk_widget_set_events (map, gtk_widget_get_events (map) - | GDK_LEAVE_NOTIFY_MASK - | GDK_VISIBILITY_NOTIFY_MASK); - - gtk_entry_set_editable (GTK_ENTRY (GTK_COMBO (priv->timezone_combo)->entry), FALSE); - - e_timezone_dialog_add_timezones (etd); - - gtk_container_add (GTK_CONTAINER (priv->map_window), map); - gtk_widget_show (map); - - /* Ensure a reasonable minimum amount of map is visible */ - gtk_widget_set_size_request (priv->map_window, 200, 200); - - g_signal_connect (map, "motion-notify-event", G_CALLBACK (on_map_motion), etd); - g_signal_connect (map, "leave-notify-event", G_CALLBACK (on_map_leave), 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); - - return etd; - - error: - - g_object_unref (etd); - return NULL; -} - -/* Gets the widgets from the XML file and returns if they are all available. - * For the widgets whose values can be simply set with e-dialog-utils, it does - * that as well. - */ -static gboolean -get_widgets (ETimezoneDialog *etd) -{ - ETimezoneDialogPrivate *priv; - - priv = etd->priv; - -#define GW(name) glade_xml_get_widget (priv->xml, name) - - 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"); - - return (priv->app - && priv->map_window - && priv->timezone_combo - && priv->timezone_preview - && priv->table); -} - - -/** - * e_timezone_dialog_new: - * - * Creates a new event editor dialog. - * - * Return value: A newly-created event editor dialog, or NULL if the event - * editor could not be created. - **/ -ETimezoneDialog * -e_timezone_dialog_new (void) -{ - ETimezoneDialog *etd; - - etd = E_TIMEZONE_DIALOG (g_object_new (E_TYPE_TIMEZONE_DIALOG, NULL)); - return e_timezone_dialog_construct (E_TIMEZONE_DIALOG (etd)); -} - - -static const char * -zone_display_name (icaltimezone *zone) -{ - const char *display_name; - - display_name = icaltimezone_get_display_name (zone); - if (icaltimezone_get_builtin_timezone (display_name)) - display_name = _(display_name); - - return display_name; -} - - -/* This flashes the currently selected timezone in the map. */ -static gboolean -on_map_timeout (gpointer data) -{ - ETimezoneDialog *etd; - ETimezoneDialogPrivate *priv; - - etd = E_TIMEZONE_DIALOG (data); - priv = etd->priv; - - if (!priv->point_selected) - return TRUE; - - if (e_map_point_get_color_rgba (priv->point_selected) - == E_TIMEZONE_DIALOG_MAP_POINT_SELECTED_1_RGBA) - e_map_point_set_color_rgba (priv->map, priv->point_selected, - E_TIMEZONE_DIALOG_MAP_POINT_SELECTED_2_RGBA); - else - e_map_point_set_color_rgba (priv->map, priv->point_selected, - E_TIMEZONE_DIALOG_MAP_POINT_SELECTED_1_RGBA); - - return TRUE; -} - - -static gboolean -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; - - e_map_window_to_world (priv->map, (double) event->x, (double) event->y, - &longitude, &latitude); - - if (priv->point_hover && priv->point_hover != priv->point_selected) - e_map_point_set_color_rgba (priv->map, priv->point_hover, - E_TIMEZONE_DIALOG_MAP_POINT_NORMAL_RGBA); - - priv->point_hover = e_map_get_closest_point (priv->map, longitude, - latitude, TRUE); - - if (priv->point_hover != priv->point_selected) - 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; -} - - -static gboolean -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. */ - if (event->mode != GDK_CROSSING_NORMAL) - return FALSE; - - if (priv->point_hover && priv->point_hover != priv->point_selected) - e_map_point_set_color_rgba (priv->map, priv->point_hover, - E_TIMEZONE_DIALOG_MAP_POINT_NORMAL_RGBA); - - 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; -} - - -static gboolean -on_map_visibility_changed (GtkWidget *w, GdkEventVisibility *event, - gpointer data) -{ - ETimezoneDialog *etd; - ETimezoneDialogPrivate *priv; - - etd = E_TIMEZONE_DIALOG (data); - priv = etd->priv; - - if (event->state != GDK_VISIBILITY_FULLY_OBSCURED) { - /* Map is visible, at least partly, so make sure we flash the - selected point. */ - if (!priv->timeout_id) - priv->timeout_id = gtk_timeout_add (100, on_map_timeout, etd); - } else { - /* Map is invisible, so don't waste resources on the timeout.*/ - if (priv->timeout_id) { - g_source_remove (priv->timeout_id); - priv->timeout_id = 0; - } - } - - return FALSE; -} - - -static gboolean -on_map_button_pressed (GtkWidget *w, GdkEventButton *event, gpointer data) -{ - ETimezoneDialog *etd; - ETimezoneDialogPrivate *priv; - double longitude, latitude; - - etd = E_TIMEZONE_DIALOG (data); - priv = etd->priv; - - e_map_window_to_world (priv->map, (double) event->x, (double) event->y, - &longitude, &latitude); - - if (event->button != 1) { - e_map_zoom_out (priv->map); - } else { - if (e_map_get_magnification (priv->map) <= 1.0) - e_map_zoom_to_location (priv->map, longitude, - latitude); - - if (priv->point_selected) - e_map_point_set_color_rgba (priv->map, - priv->point_selected, - E_TIMEZONE_DIALOG_MAP_POINT_NORMAL_RGBA); - priv->point_selected = priv->point_hover; - - priv->zone = get_zone_from_point (etd, priv->point_selected); - gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (priv->timezone_combo)->entry), - zone_display_name (priv->zone)); - } - - return TRUE; -} - - -/* Returns the translated timezone location of the given EMapPoint, - e.g. "Europe/London". */ -static icaltimezone * -get_zone_from_point (ETimezoneDialog *etd, - EMapPoint *point) -{ - ETimezoneDialogPrivate *priv; - icalarray *zones; - double longitude, latitude; - int i; - - priv = etd->priv; - - if (point == NULL) - return NULL; - - e_map_point_get_location (point, &longitude, &latitude); - - /* Get the array of builtin timezones. */ - zones = icaltimezone_get_builtin_timezones (); - - for (i = 0; i < zones->num_elements; i++) { - icaltimezone *zone; - double zone_longitude, zone_latitude; - - zone = icalarray_element_at (zones, i); - zone_longitude = icaltimezone_get_longitude (zone); - zone_latitude = icaltimezone_get_latitude (zone); - - if (zone_longitude - 0.005 <= longitude && - zone_longitude + 0.005 >= longitude && - zone_latitude - 0.005 <= latitude && - zone_latitude + 0.005 >= latitude) - { - return zone; - } - } - - g_assert_not_reached (); - - return NULL; -} - - -/** - * e_timezone_dialog_get_timezone: - * @etd: the timezone dialog - * - * Return value: the currently-selected timezone, or %NULL if no timezone - * is selected. - **/ -icaltimezone * -e_timezone_dialog_get_timezone (ETimezoneDialog *etd) -{ - ETimezoneDialogPrivate *priv; - - g_return_val_if_fail (E_IS_TIMEZONE_DIALOG (etd), NULL); - - priv = etd->priv; - - return priv->zone; -} - -/** - * e_timezone_dialog_set_timezone: - * @etd: the timezone dialog - * @zone: the timezone - * - * Sets the timezone of @etd to @zone. Updates the display name and - * selected location. The caller must ensure that @zone is not freed - * before @etd is destroyed. - **/ -void -e_timezone_dialog_set_timezone (ETimezoneDialog *etd, - icaltimezone *zone) -{ - ETimezoneDialogPrivate *priv; - - g_return_if_fail (E_IS_TIMEZONE_DIALOG (etd)); - - priv = etd->priv; - - priv->zone = zone; - - gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (priv->timezone_combo)->entry), - zone ? zone_display_name (zone) : ""); - - set_map_timezone (etd, zone); -} - - -GtkWidget * -e_timezone_dialog_get_toplevel (ETimezoneDialog *etd) -{ - ETimezoneDialogPrivate *priv; - - g_return_val_if_fail (etd != NULL, NULL); - g_return_val_if_fail (E_IS_TIMEZONE_DIALOG (etd), NULL); - - priv = etd->priv; - - return priv->app; -} - - -static void -set_map_timezone (ETimezoneDialog *etd, icaltimezone *zone) -{ - ETimezoneDialogPrivate *priv; - EMapPoint *point; - double zone_longitude, zone_latitude; - - priv = etd->priv; - - if (zone) { - zone_longitude = icaltimezone_get_longitude (zone); - zone_latitude = icaltimezone_get_latitude (zone); - point = e_map_get_closest_point (priv->map, - zone_longitude, - zone_latitude, - FALSE); - } else - point = NULL; - - if (priv->point_selected) - e_map_point_set_color_rgba (priv->map, priv->point_selected, - E_TIMEZONE_DIALOG_MAP_POINT_NORMAL_RGBA); - - priv->point_selected = point; -} - - -static void -on_combo_changed (GtkEditable *entry, ETimezoneDialog *etd) -{ - ETimezoneDialogPrivate *priv; - const char *new_zone_name; - icalarray *zones; - icaltimezone *map_zone = NULL; - char *location; - int i; - - priv = etd->priv; - - new_zone_name = gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (priv->timezone_combo)->entry)); - - if (!*new_zone_name) - priv->zone = NULL; - else if (!strcmp (new_zone_name, _("UTC"))) - priv->zone = icaltimezone_get_utc_timezone (); - else { - priv->zone = NULL; - - zones = icaltimezone_get_builtin_timezones (); - for (i = 0; i < zones->num_elements; i++) { - map_zone = icalarray_element_at (zones, i); - location = _(icaltimezone_get_location (map_zone)); - if (!strcmp (new_zone_name, location)) { - priv->zone = map_zone; - break; - } - } - } - - set_map_timezone (etd, map_zone); -} - -/** - * e_timezone_dialog_reparent: - * @etd: #ETimezoneDialog. - * @new_parent: The new parent widget. - * - * Takes the internal widgets out of the dialog and put them into @new_parent - */ -void -e_timezone_dialog_reparent (ETimezoneDialog *etd, - GtkWidget *new_parent) -{ - ETimezoneDialogPrivate *priv; - - priv = etd->priv; - - gtk_widget_reparent (priv->table, new_parent); -} - -E_MAKE_TYPE (e_timezone_dialog, "ETimezoneDialog", ETimezoneDialog, - e_timezone_dialog_class_init, e_timezone_dialog_init, G_TYPE_OBJECT) diff --git a/widgets/e-timezone-dialog/e-timezone-dialog.glade b/widgets/e-timezone-dialog/e-timezone-dialog.glade deleted file mode 100644 index 9e1bbb945b..0000000000 --- a/widgets/e-timezone-dialog/e-timezone-dialog.glade +++ /dev/null @@ -1,302 +0,0 @@ -<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> -<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> - -<glade-interface> - -<widget class="GtkDialog" id="timezone-dialog"> - <property name="border_width">6</property> - <property name="title" translatable="yes">Select a Time Zone</property> - <property name="type">GTK_WINDOW_TOPLEVEL</property> - <property name="window_position">GTK_WIN_POS_NONE</property> - <property name="modal">False</property> - <property name="default_width">500</property> - <property name="default_height">400</property> - <property name="resizable">True</property> - <property name="destroy_with_parent">False</property> - <property name="has_separator">True</property> - - <child internal-child="vbox"> - <widget class="GtkVBox" id="dialog-vbox1"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">6</property> - - <child internal-child="action_area"> - <widget class="GtkHButtonBox" id="dialog-action_area1"> - <property name="visible">True</property> - <property name="layout_style">GTK_BUTTONBOX_END</property> - - <child> - <widget class="GtkButton" id="cancel-button"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-cancel</property> - <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="response_id">-2</property> - </widget> - </child> - - <child> - <widget class="GtkButton" id="ok-button"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="has_default">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-ok</property> - <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="response_id">-3</property> - </widget> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="pack_type">GTK_PACK_END</property> - </packing> - </child> - - <child> - <widget class="GtkTable" id="table1"> - <property name="border_width">6</property> - <property name="visible">True</property> - <property name="n_rows">3</property> - <property name="n_columns">1</property> - <property name="homogeneous">False</property> - <property name="row_spacing">6</property> - <property name="column_spacing">6</property> - - <child> - <widget class="GtkLabel" id="label1"> - <property name="visible">True</property> - <property name="label" translatable="yes">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.</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="y_padding">2</property> - <property name="x_options">expand</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkFrame" id="frame1"> - <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property> - - <child> - <widget class="GtkVBox" id="vbox1"> - <property name="border_width">6</property> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">6</property> - - <child> - <widget class="GtkScrolledWindow" id="map-window"> - <property name="visible">True</property> - <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property> - <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property> - <property name="shadow_type">GTK_SHADOW_IN</property> - <property name="window_placement">GTK_CORNER_TOP_LEFT</property> - - <child> - <placeholder/> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkVBox" id="vbox2"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkLabel" id="timezone-preview"> - <property name="visible">True</property> - <property name="label" translatable="yes"></property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - </child> - - <child> - <widget class="GtkLabel" id="label2"> - <property name="visible">True</property> - <property name="label" translatable="yes">Time Zones</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="type">label_item</property> - </packing> - </child> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - </packing> - </child> - - <child> - <widget class="GtkHBox" id="hbox1"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">6</property> - - <child> - <widget class="GtkLabel" id="label3"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Selection:</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="mnemonic_widget">combo-entry1</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkCombo" id="timezone-combo"> - <property name="visible">True</property> - <property name="value_in_list">False</property> - <property name="allow_empty">True</property> - <property name="case_sensitive">False</property> - <property name="enable_arrow_keys">True</property> - <property name="enable_arrows_always">False</property> - - <child internal-child="entry"> - <widget class="GtkEntry" id="combo-entry1"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char" translatable="yes">*</property> - <property name="activates_default">False</property> - </widget> - </child> - - <child internal-child="list"> - <widget class="GtkList" id="convertwidget3"> - <property name="visible">True</property> - <property name="selection_mode">GTK_SELECTION_BROWSE</property> - - <child> - <widget class="GtkListItem" id="convertwidget4"> - <property name="visible">True</property> - - <child> - <widget class="GtkLabel" id="convertwidget5"> - <property name="visible">True</property> - <property name="label" translatable="yes"></property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - </child> - </widget> - </child> - </widget> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">fill</property> - <property name="y_options">fill</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - </widget> - </child> -</widget> - -</glade-interface> diff --git a/widgets/e-timezone-dialog/e-timezone-dialog.h b/widgets/e-timezone-dialog/e-timezone-dialog.h deleted file mode 100644 index d9e8366fbe..0000000000 --- a/widgets/e-timezone-dialog/e-timezone-dialog.h +++ /dev/null @@ -1,68 +0,0 @@ -/* Evolution calendar - Timezone selector dialog - * - * Copyright (C) 2001 Ximian, Inc. - * - * Authors: Damon Chaplin <damon@ximian.com> - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef __E_TIMEZONE_DIALOG_H__ -#define __E_TIMEZONE_DIALOG_H__ - -#include <gtk/gtkwidget.h> -#include <libical/ical.h> - - - -#define E_TYPE_TIMEZONE_DIALOG (e_timezone_dialog_get_type ()) -#define E_TIMEZONE_DIALOG(obj) (GTK_CHECK_CAST ((obj), E_TYPE_TIMEZONE_DIALOG, ETimezoneDialog)) -#define E_TIMEZONE_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_TIMEZONE_DIALOG, \ - ETimezoneDialogClass)) -#define E_IS_TIMEZONE_DIALOG(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_TIMEZONE_DIALOG)) -#define E_IS_TIMEZONE_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), E_TYPE_TIMEZONE_DIALOG)) - - -typedef struct _ETimezoneDialog ETimezoneDialog; -typedef struct _ETimezoneDialogClass ETimezoneDialogClass; -typedef struct _ETimezoneDialogPrivate ETimezoneDialogPrivate; - -struct _ETimezoneDialog { - GObject object; - - /* Private data */ - ETimezoneDialogPrivate *priv; -}; - -struct _ETimezoneDialogClass { - GObjectClass parent_class; -}; - - -GType e_timezone_dialog_get_type (void); -ETimezoneDialog *e_timezone_dialog_construct (ETimezoneDialog *etd); - -ETimezoneDialog *e_timezone_dialog_new (void); - -icaltimezone *e_timezone_dialog_get_timezone (ETimezoneDialog *etd); -void e_timezone_dialog_set_timezone (ETimezoneDialog *etd, - icaltimezone *zone); - -GtkWidget *e_timezone_dialog_get_toplevel (ETimezoneDialog *etd); - -void e_timezone_dialog_reparent (ETimezoneDialog *etd, - GtkWidget *new_parent); - -#endif /* __E_TIMEZONE_DIALOG_H__ */ |