diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2007-10-23 02:49:30 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@src.gnome.org> | 2007-10-23 02:49:30 +0800 |
commit | b37af8f269484ebd836996c140ea718885954ca3 (patch) | |
tree | 8ed883fcc7c60b5200be9438514902accd991cd1 /calendar | |
parent | 16af69fb17d52a18b0c308e8ed137f71d2dba1fa (diff) | |
download | gsoc2013-evolution-b37af8f269484ebd836996c140ea718885954ca3.tar gsoc2013-evolution-b37af8f269484ebd836996c140ea718885954ca3.tar.gz gsoc2013-evolution-b37af8f269484ebd836996c140ea718885954ca3.tar.bz2 gsoc2013-evolution-b37af8f269484ebd836996c140ea718885954ca3.tar.lz gsoc2013-evolution-b37af8f269484ebd836996c140ea718885954ca3.tar.xz gsoc2013-evolution-b37af8f269484ebd836996c140ea718885954ca3.tar.zst gsoc2013-evolution-b37af8f269484ebd836996c140ea718885954ca3.zip |
** Fixes part of bug #417999
2007-10-22 Matthew Barnes <mbarnes@redhat.com>
** Fixes part of bug #417999
* addressbook/gui/contact-editor/contact-editor.glade:
* addressbook/gui/contact-editor/e-contact-editor.c:
* addressbook/gui/contact-editor/e-contact-quick-add.c:
* addressbook/gui/contact-list-editor/contact-list-editor.c:
* addressbook/gui/contact-list-editor/contact-list-editor.glade:
* calendar/gui/dialogs/event-page.c:
* calendar/gui/dialogs/event-page.glade:
* calendar/gui/dialogs/memo-page.c:
* calendar/gui/dialogs/memo-page.glade:
* calendar/gui/dialogs/task-page.c:
* calendar/gui/dialogs/task-page.glade:
* calendar/gui/e-itip-control.c:
* plugins/bbdb/bbdb.c:
* plugins/bbdb/gaimbuddies.c:
* plugins/itip-formatter/itip-view.c:
* widgets/misc/e-pilot-settings.c:
Use ESourceComboBox instead of ESourceOptionMenu (deprecated).
svn path=/trunk/; revision=34408
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/ChangeLog | 13 | ||||
-rw-r--r-- | calendar/gui/dialogs/event-page.c | 42 | ||||
-rw-r--r-- | calendar/gui/dialogs/event-page.glade | 2 | ||||
-rw-r--r-- | calendar/gui/dialogs/memo-page.c | 39 | ||||
-rw-r--r-- | calendar/gui/dialogs/memo-page.glade | 2 | ||||
-rw-r--r-- | calendar/gui/dialogs/task-page.c | 44 | ||||
-rw-r--r-- | calendar/gui/dialogs/task-page.glade | 2 | ||||
-rw-r--r-- | calendar/gui/e-itip-control.c | 28 |
8 files changed, 95 insertions, 77 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 6f51cdd8cd..31e54d86f9 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,16 @@ +2007-10-22 Matthew Barnes <mbarnes@redhat.com> + + ** Fixes part of bug #417999 + + * gui/dialogs/event-page.c: + * gui/dialogs/event-page.glade: + * gui/dialogs/memo-page.c: + * gui/dialogs/memo-page.glade: + * gui/dialogs/task-page.c: + * gui/dialogs/task-page.glade: + * gui/e-itip-control.c: + Use ESourceComboBox instead of ESourceOptionMenu (deprecated). + 2007-10-12 Michael Monreal <michael.monreal@gmail.com> ** New view-calendar icons (bug #479257) diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c index f43640c264..ed8f1ddb93 100644 --- a/calendar/gui/dialogs/event-page.c +++ b/calendar/gui/dialogs/event-page.c @@ -33,7 +33,7 @@ #include <gdk/gdkkeysyms.h> #include <glib/gi18n.h> #include <glade/glade.h> -#include <libedataserverui/e-source-option-menu.h> +#include <libedataserverui/e-source-combo-box.h> #include "common/authentication.h" #include "e-util/e-categories-config.h" #include "e-util/e-dialog-widgets.h" @@ -1000,7 +1000,6 @@ event_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) const char *location, *uid = NULL; const char *categories; gchar *backend_addr = NULL; - ESource *source; GSList *l; gboolean validated = TRUE; @@ -1215,8 +1214,9 @@ event_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) e_dialog_editable_set (priv->categories, categories); /* Source */ - source = e_cal_get_source (page->client); - e_source_option_menu_select (E_SOURCE_OPTION_MENU (priv->source_selector), source); + e_source_combo_box_set_active ( + E_SOURCE_COMBO_BOX (priv->source_selector), + e_cal_get_source (page->client)); e_cal_component_get_uid (comp, &uid); if (!(COMP_EDITOR_PAGE (epage)->flags & COMP_EDITOR_PAGE_DELEGATE) @@ -2662,7 +2662,8 @@ event_page_sendoptions_clicked_cb (EventPage *epage) if (!priv->sod) { priv->sod = e_sendoptions_dialog_new (); - source = e_source_option_menu_peek_selected (E_SOURCE_OPTION_MENU (priv->source_selector)); + source = e_source_combo_box_get_active ( + E_SOURCE_COMBO_BOX (priv->source_selector)); e_sendoptions_utils_set_default_data (priv->sod, source, "calendar"); priv->sod->data->initialized = TRUE; } @@ -2691,13 +2692,12 @@ field_changed_cb (GtkWidget *widget, gpointer data) } static void -source_changed_cb (GtkWidget *widget, ESource *source, gpointer data) +source_changed_cb (ESourceComboBox *source_combo_box, EventPage *epage) { - EventPage *epage; - EventPagePrivate *priv; + EventPagePrivate *priv = epage->priv; + ESource *source; - epage = EVENT_PAGE (data); - priv = epage->priv; + source = e_source_combo_box_get_active (source_combo_box); if (!priv->updating) { ECal *client; @@ -2716,8 +2716,9 @@ source_changed_cb (GtkWidget *widget, ESource *source, gpointer data) if (client) g_object_unref (client); - e_source_option_menu_select (E_SOURCE_OPTION_MENU (priv->source_selector), - e_cal_get_source (COMP_EDITOR_PAGE (epage)->client)); + e_source_combo_box_set_active ( + E_SOURCE_COMBO_BOX (priv->source_selector), + e_cal_get_source (COMP_EDITOR_PAGE (epage)->client)); dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_WARNING, GTK_BUTTONS_OK, @@ -2980,7 +2981,7 @@ init_widgets (EventPage *epage) G_CALLBACK (categories_clicked_cb), epage); /* Source selector */ - g_signal_connect((priv->source_selector), "source_selected", + g_signal_connect((priv->source_selector), "changed", G_CALLBACK (source_changed_cb), epage); /* Alarms */ priv->alarm_list_store = e_alarm_list_new (); @@ -3306,24 +3307,25 @@ make_timezone_entry (void) return w; } -GtkWidget *event_page_create_source_option_menu (void); +GtkWidget *event_page_create_source_combo_box (void); GtkWidget * -event_page_create_source_option_menu (void) +event_page_create_source_combo_box (void) { - GtkWidget *menu; + GtkWidget *combo_box; GConfClient *gconf_client; ESourceList *source_list; gconf_client = gconf_client_get_default (); - source_list = e_source_list_new_for_gconf (gconf_client, "/apps/evolution/calendar/sources"); + source_list = e_source_list_new_for_gconf ( + gconf_client, "/apps/evolution/calendar/sources"); - menu = e_source_option_menu_new (source_list); + combo_box = e_source_combo_box_new (source_list); g_object_unref (source_list); g_object_unref (gconf_client); - gtk_widget_show (menu); - return menu; + gtk_widget_show (combo_box); + return combo_box; } GtkWidget *make_status_icons (void); diff --git a/calendar/gui/dialogs/event-page.glade b/calendar/gui/dialogs/event-page.glade index 86a7cbf0b6..f593357a65 100644 --- a/calendar/gui/dialogs/event-page.glade +++ b/calendar/gui/dialogs/event-page.glade @@ -827,7 +827,7 @@ <child> <widget class="Custom" id="source"> <property name="visible">True</property> - <property name="creation_function">event_page_create_source_option_menu</property> + <property name="creation_function">event_page_create_source_combo_box</property> <property name="int1">0</property> <property name="int2">0</property> <property name="last_modification_time">Wed, 17 Dec 2003 18:20:26 GMT</property> diff --git a/calendar/gui/dialogs/memo-page.c b/calendar/gui/dialogs/memo-page.c index fb6ce991d1..56d422bc18 100644 --- a/calendar/gui/dialogs/memo-page.c +++ b/calendar/gui/dialogs/memo-page.c @@ -35,7 +35,7 @@ #include <gtk/gtkmessagedialog.h> #include <glib/gi18n.h> #include <glade/glade.h> -#include <libedataserverui/e-source-option-menu.h> +#include <libedataserverui/e-source-combo-box.h> #include <libedataserverui/e-name-selector.h> #include <libedataserverui/e-name-selector-entry.h> #include <libedataserverui/e-name-selector-list.h> @@ -352,7 +352,6 @@ memo_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) GSList *l; const char *categories; gchar *backend_addr = NULL; - ESource *source; mpage = MEMO_PAGE (page); priv = mpage->priv; @@ -451,8 +450,9 @@ memo_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) g_free (backend_addr); /* Source */ - source = e_cal_get_source (page->client); - e_source_option_menu_select (E_SOURCE_OPTION_MENU (priv->source_selector), source); + e_source_combo_box_set_active ( + E_SOURCE_COMBO_BOX (priv->source_selector), + e_cal_get_source (page->client)); priv->updating = FALSE; @@ -893,13 +893,12 @@ field_changed_cb (GtkWidget *widget, gpointer data) } static void -source_changed_cb (GtkWidget *widget, ESource *source, gpointer data) +source_changed_cb (ESourceComboBox *source_combo_box, MemoPage *mpage) { - MemoPage *mpage; - MemoPagePrivate *priv; + MemoPagePrivate *priv = mpage->priv; + ESource *source; - mpage = MEMO_PAGE (data); - priv = mpage->priv; + source = e_source_combo_box_get_active (source_combo_box); if (!priv->updating) { ECal *client; @@ -911,8 +910,9 @@ source_changed_cb (GtkWidget *widget, ESource *source, gpointer data) if (client) g_object_unref (client); - e_source_option_menu_select (E_SOURCE_OPTION_MENU (priv->source_selector), - e_cal_get_source (COMP_EDITOR_PAGE (mpage)->client)); + e_source_combo_box_set_active ( + E_SOURCE_COMBO_BOX (priv->source_selector), + e_cal_get_source (COMP_EDITOR_PAGE (mpage)->client)); dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_WARNING, GTK_BUTTONS_OK, @@ -1055,7 +1055,7 @@ init_widgets (MemoPage *mpage) G_CALLBACK (categories_clicked_cb), mpage); /* Source selector */ - g_signal_connect((priv->source_selector), "source_selected", + g_signal_connect((priv->source_selector), "changed", G_CALLBACK (source_changed_cb), mpage); /* Connect the default signal handler to use to make sure the "changed" @@ -1271,22 +1271,23 @@ memo_page_create_date_edit (void) return dedit; } -GtkWidget *memo_page_create_source_option_menu (void); +GtkWidget *memo_page_create_source_combo_box (void); GtkWidget * -memo_page_create_source_option_menu (void) +memo_page_create_source_combo_box (void) { - GtkWidget *menu; + GtkWidget *combo_box; GConfClient *gconf_client; ESourceList *source_list; gconf_client = gconf_client_get_default (); - source_list = e_source_list_new_for_gconf (gconf_client, "/apps/evolution/memos/sources"); + source_list = e_source_list_new_for_gconf ( + gconf_client, "/apps/evolution/memos/sources"); - menu = e_source_option_menu_new (source_list); + combo_box = e_source_combo_box_new (source_list); g_object_unref (source_list); g_object_unref (gconf_client); - gtk_widget_show (menu); - return menu; + gtk_widget_show (combo_box); + return combo_box; } diff --git a/calendar/gui/dialogs/memo-page.glade b/calendar/gui/dialogs/memo-page.glade index 4a76ecf82c..93bc1a9b5c 100644 --- a/calendar/gui/dialogs/memo-page.glade +++ b/calendar/gui/dialogs/memo-page.glade @@ -194,7 +194,7 @@ <child> <widget class="Custom" id="source"> <property name="visible">True</property> - <property name="creation_function">memo_page_create_source_option_menu</property> + <property name="creation_function">memo_page_create_source_combo_box</property> <property name="int1">0</property> <property name="int2">0</property> <property name="last_modification_time">Tue, 13 Jan 2004 22:00:00 GMT</property> diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c index 5a6d685524..eb52dd1445 100644 --- a/calendar/gui/dialogs/task-page.c +++ b/calendar/gui/dialogs/task-page.c @@ -35,7 +35,7 @@ #include <gtk/gtkmessagedialog.h> #include <glib/gi18n.h> #include <glade/glade.h> -#include <libedataserverui/e-source-option-menu.h> +#include <libedataserverui/e-source-combo-box.h> #include <misc/e-dateedit.h> #include <e-util/e-dialog-utils.h> #include "common/authentication.h" @@ -533,7 +533,6 @@ task_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) const char *categories, *uid; icaltimezone *zone, *default_zone; gchar *backend_addr = NULL; - ESource *source; tpage = TASK_PAGE (page); priv = tpage->priv; @@ -677,8 +676,9 @@ task_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) e_dialog_editable_set (priv->categories, categories); /* Source */ - source = e_cal_get_source (page->client); - e_source_option_menu_select (E_SOURCE_OPTION_MENU (priv->source_selector), source); + e_source_combo_box_set_active ( + E_SOURCE_COMBO_BOX (priv->source_selector), + e_cal_get_source (page->client)); e_cal_get_cal_address (COMP_EDITOR_PAGE (tpage)->client, &backend_addr, NULL); set_subscriber_info_string (tpage, backend_addr); @@ -1688,13 +1688,12 @@ field_changed_cb (GtkWidget *widget, gpointer data) } static void -source_changed_cb (GtkWidget *widget, ESource *source, gpointer data) +source_changed_cb (ESourceComboBox *source_combo_box, TaskPage *tpage) { - TaskPage *tpage; - TaskPagePrivate *priv; + TaskPagePrivate *priv = tpage->priv; + ESource *source; - tpage = TASK_PAGE (data); - priv = tpage->priv; + source = e_source_combo_box_get_active (source_combo_box); if (!priv->updating) { ECal *client; @@ -1713,8 +1712,9 @@ source_changed_cb (GtkWidget *widget, ESource *source, gpointer data) if (client) g_object_unref (client); - e_source_option_menu_select (E_SOURCE_OPTION_MENU (priv->source_selector), - e_cal_get_source (COMP_EDITOR_PAGE (tpage)->client)); + e_source_combo_box_set_active ( + E_SOURCE_COMBO_BOX (priv->source_selector), + e_cal_get_source (COMP_EDITOR_PAGE (tpage)->client)); dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_WARNING, GTK_BUTTONS_OK, @@ -1726,7 +1726,7 @@ source_changed_cb (GtkWidget *widget, ESource *source, gpointer data) comp_editor_notify_client_changed ( COMP_EDITOR (gtk_widget_get_toplevel (priv->main)), client); - field_changed_cb (widget, data); + field_changed_cb (GTK_WIDGET (source_combo_box), tpage); if (e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_REQ_SEND_OPTIONS) && priv->is_assignment) task_page_show_options (tpage); else @@ -1778,7 +1778,8 @@ task_page_sendoptions_clicked_cb (TaskPage *tpage) if (!priv->sod) { priv->sod = e_sendoptions_dialog_new (); priv->sod->data->initialized = TRUE; - source = e_source_option_menu_peek_selected (E_SOURCE_OPTION_MENU (priv->source_selector)); + source = e_source_combo_box_get_active ( + E_SOURCE_COMBO_BOX (priv->source_selector)); e_sendoptions_utils_set_default_data (priv->sod, source, "task"); } @@ -1836,7 +1837,7 @@ init_widgets (TaskPage *tpage) G_CALLBACK (categories_clicked_cb), tpage); /* Source selector */ - g_signal_connect((priv->source_selector), "source_selected", + g_signal_connect((priv->source_selector), "source_changed", G_CALLBACK (source_changed_cb), tpage); /* Connect the default signal handler to use to make sure the "changed" @@ -2081,22 +2082,23 @@ task_page_create_date_edit (void) return dedit; } -GtkWidget *task_page_create_source_option_menu (void); +GtkWidget *task_page_create_source_combo_box (void); GtkWidget * -task_page_create_source_option_menu (void) +task_page_create_source_combo_box (void) { - GtkWidget *menu; + GtkWidget *combo_box; GConfClient *gconf_client; ESourceList *source_list; gconf_client = gconf_client_get_default (); - source_list = e_source_list_new_for_gconf (gconf_client, "/apps/evolution/tasks/sources"); + source_list = e_source_list_new_for_gconf ( + gconf_client, "/apps/evolution/tasks/sources"); - menu = e_source_option_menu_new (source_list); + combo_box = e_source_combo_box_new (source_list); g_object_unref (source_list); g_object_unref (gconf_client); - gtk_widget_show (menu); - return menu; + gtk_widget_show (combo_box); + return combo_box; } diff --git a/calendar/gui/dialogs/task-page.glade b/calendar/gui/dialogs/task-page.glade index a4a105606c..17e2f9071c 100644 --- a/calendar/gui/dialogs/task-page.glade +++ b/calendar/gui/dialogs/task-page.glade @@ -671,7 +671,7 @@ <widget class="Custom" id="source"> <property name="height_request">24</property> <property name="visible">True</property> - <property name="creation_function">task_page_create_source_option_menu</property> + <property name="creation_function">task_page_create_source_combo_box</property> <property name="int1">0</property> <property name="int2">0</property> <property name="last_modification_time">Thu, 18 Dec 2003 01:58:48 GMT</property> diff --git a/calendar/gui/e-itip-control.c b/calendar/gui/e-itip-control.c index 8e408604fb..2a082c7ba3 100644 --- a/calendar/gui/e-itip-control.c +++ b/calendar/gui/e-itip-control.c @@ -44,7 +44,7 @@ #include <gtkhtml/gtkhtml-embedded.h> #include <gtkhtml/gtkhtml-stream.h> #include <libedataserver/e-source-list.h> -#include <libedataserverui/e-source-option-menu.h> +#include <libedataserverui/e-source-combo-box.h> #include <libical/ical.h> #include <libecal/e-cal-component.h> #include <libecal/e-cal-time-util.h> @@ -226,13 +226,13 @@ typedef struct { } EItipControlFindData; static void -source_selected_cb (ESourceOptionMenu *esom, ESource *source, gpointer data) +source_changed_cb (ESourceComboBox *escb, EItipControl *itip) { - EItipControl *itip = data; - EItipControlPrivate *priv; - - priv = itip->priv; + EItipControlPrivate *priv = itip->priv; + ESource *source; + source = e_source_combo_box_get_active (escb); + if (priv->ok) gtk_widget_set_sensitive (priv->ok, FALSE); @@ -273,7 +273,7 @@ find_cal_opened_cb (ECal *ecal, ECalendarStatus status, gpointer data) cleanup: if (fd->count == 0) { if (fd->show_selector && !priv->current_ecal && priv->vbox) { - GtkWidget *esom; + GtkWidget *escb; char *uid; switch (priv->type) { @@ -297,17 +297,17 @@ find_cal_opened_cb (ECal *ecal, ECalendarStatus status, gpointer data) if (!source) source = e_source_list_peek_source_any (priv->source_lists[priv->type]); - esom = e_source_option_menu_new (priv->source_lists[priv->type]); - g_signal_connect_object (esom, "source_selected", - G_CALLBACK (source_selected_cb), - fd->itip, 0); + escb = e_source_combo_box_new (priv->source_lists[priv->type]); + g_signal_connect_object ( + escb, "changed", + G_CALLBACK (source_changed_cb), fd->itip, 0); - gtk_box_pack_start (GTK_BOX (priv->vbox), esom, FALSE, TRUE, 0); - gtk_widget_show (esom); + gtk_box_pack_start (GTK_BOX (priv->vbox), escb, FALSE, TRUE, 0); + gtk_widget_show (escb); /* FIXME What if there is no source? */ if (source) - e_source_option_menu_select (E_SOURCE_OPTION_MENU (esom), source); + e_source_combo_box_set_active (E_SOURCE_COMBO_BOX (escb), source); } else { /* FIXME Display error message to user */ } |