--- evolution-2.11.2/widgets/misc/e-pilot-settings.c.e-source-combo-box 2007-04-18 06:18:34.000000000 -0400 +++ evolution-2.11.2/widgets/misc/e-pilot-settings.c 2007-05-18 15:49:15.000000000 -0400 @@ -27,7 +27,7 @@ #include #include -#include +#include #include "e-pilot-settings.h" struct _EPilotSettingsPrivate @@ -102,7 +102,7 @@ lbl = gtk_label_new (_("Sync with:")); gtk_misc_set_alignment (GTK_MISC (lbl), 0.0, 0.5); - priv->source = e_source_option_menu_new (source_list); + priv->source = e_source_combo_box_new (source_list); gtk_table_attach_defaults (GTK_TABLE (ps), lbl, 0, 1, 0, 1); gtk_table_attach_defaults (GTK_TABLE (ps), priv->source, 1, 2, 0, 1); gtk_widget_show (lbl); @@ -152,8 +152,9 @@ g_return_val_if_fail (E_IS_PILOT_SETTINGS (ps), FALSE); priv = ps->priv; - - return e_source_option_menu_peek_selected (E_SOURCE_OPTION_MENU (priv->source)); + + return e_source_combo_box_get_active ( + E_SOURCE_COMBO_BOX (priv->source)); } void @@ -166,7 +167,8 @@ priv = ps->priv; - e_source_option_menu_select (E_SOURCE_OPTION_MENU (priv->source), source); + e_source_combo_box_set_active ( + E_SOURCE_COMBO_BOX (priv->source), source); } gboolean --- evolution-2.11.2/plugins/itip-formatter/itip-formatter.c.e-source-combo-box 2007-04-18 06:17:20.000000000 -0400 +++ evolution-2.11.2/plugins/itip-formatter/itip-formatter.c 2007-05-18 15:48:37.000000000 -0400 @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include #include --- evolution-2.11.2/plugins/itip-formatter/itip-view.c.e-source-combo-box 2007-05-13 13:41:08.000000000 -0400 +++ evolution-2.11.2/plugins/itip-formatter/itip-view.c 2007-05-18 15:48:37.000000000 -0400 @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include #include @@ -103,8 +103,8 @@ char *description; GtkWidget *selector_box; - GtkWidget *esom; - GtkWidget *esom_header; + GtkWidget *escb; + GtkWidget *escb_header; ESourceList *source_list; GtkWidget *rsvp_box; @@ -1671,10 +1671,12 @@ } static void -source_selected_cb (ESourceOptionMenu *esom, ESource *source, gpointer data) +source_changed_cb (ESourceComboBox *escb, ItipView *view) { - ItipView *view = data; - + ESource *source; + + source = e_source_combo_box_get_active (escb); + g_signal_emit (view, signals[SOURCE_SELECTED], 0, source); } @@ -1691,40 +1693,42 @@ if (priv->source_list) g_object_unref (priv->source_list); - if (priv->esom) - gtk_widget_destroy (priv->esom); + if (priv->escb) + gtk_widget_destroy (priv->escb); if (!source_list) { - if (priv->esom_header) - gtk_widget_destroy (priv->esom_header); + if (priv->escb_header) + gtk_widget_destroy (priv->escb_header); priv->source_list = NULL; - priv->esom = NULL; - priv->esom_header = NULL; + priv->escb = NULL; + priv->escb_header = NULL; return; } priv->source_list = g_object_ref (source_list); - priv->esom = e_source_option_menu_new (source_list); - gtk_widget_show (priv->esom); - g_signal_connect (priv->esom, "source_selected", G_CALLBACK (source_selected_cb), view); + priv->escb = e_source_combo_box_new (source_list); + gtk_widget_show (priv->escb); + g_signal_connect ( + priv->escb, "changed", + G_CALLBACK (source_changed_cb), view); - if (!priv->esom_header) { + if (!priv->escb_header) { if (priv->type == E_CAL_SOURCE_TYPE_EVENT) - priv->esom_header = gtk_label_new_with_mnemonic (_("_Calendar:")); + priv->escb_header = gtk_label_new_with_mnemonic (_("_Calendar:")); else if (priv->type == E_CAL_SOURCE_TYPE_TODO) - priv->esom_header = gtk_label_new_with_mnemonic (_("_Tasks :")); + priv->escb_header = gtk_label_new_with_mnemonic (_("_Tasks :")); else if (priv->type == E_CAL_SOURCE_TYPE_JOURNAL) - priv->esom_header = gtk_label_new_with_mnemonic (_("Memos :")); + priv->escb_header = gtk_label_new_with_mnemonic (_("Memos :")); - gtk_label_set_mnemonic_widget (GTK_LABEL (priv->esom_header), priv->esom); - gtk_widget_show (priv->esom_header); + gtk_label_set_mnemonic_widget (GTK_LABEL (priv->escb_header), priv->escb); + gtk_widget_show (priv->escb_header); } - gtk_box_pack_start (GTK_BOX (priv->selector_box), priv->esom_header, FALSE, TRUE, 6); - gtk_box_pack_start (GTK_BOX (priv->selector_box), priv->esom, FALSE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (priv->selector_box), priv->escb_header, FALSE, TRUE, 6); + gtk_box_pack_start (GTK_BOX (priv->selector_box), priv->escb, FALSE, TRUE, 0); } ESourceList * @@ -1750,10 +1754,11 @@ priv = view->priv; - if (!priv->esom) + if (!priv->escb) return; - e_source_option_menu_select (E_SOURCE_OPTION_MENU (priv->esom), source); + e_source_combo_box_set_active ( + E_SOURCE_COMBO_BOX (priv->escb), source); } ESource * @@ -1766,10 +1771,11 @@ priv = view->priv; - if (!priv->esom) + if (!priv->escb) return NULL; - return e_source_option_menu_peek_selected (E_SOURCE_OPTION_MENU (priv->esom)); + return e_source_combo_box_get_active ( + E_SOURCE_COMBO_BOX (priv->escb)); } void --- evolution-2.11.2/plugins/bbdb/gaimbuddies.c.e-source-combo-box 2007-05-13 13:41:06.000000000 -0400 +++ evolution-2.11.2/plugins/bbdb/gaimbuddies.c 2007-05-18 15:48:37.000000000 -0400 @@ -44,7 +44,7 @@ #include #include -#include +#include #include #include --- evolution-2.11.2/plugins/bbdb/bbdb.c.e-source-combo-box 2007-04-18 06:17:14.000000000 -0400 +++ evolution-2.11.2/plugins/bbdb/bbdb.c 2007-05-18 15:48:37.000000000 -0400 @@ -40,7 +40,7 @@ #include #include -#include +#include #include #include @@ -341,7 +341,8 @@ gtk_widget_set_sensitive (stuff->option_menu, active); if (active && !gconf_client_get_string (stuff->target->gconf, GCONF_KEY_WHICH_ADDRESSBOOK, NULL)) { - selected_source = e_source_option_menu_peek_selected (E_SOURCE_OPTION_MENU (stuff->option_menu)); + selected_source = e_source_combo_box_get_active ( + E_SOURCE_COMBO_BOX (stuff->option_menu)); gconf_client_set_string (stuff->target->gconf, GCONF_KEY_WHICH_ADDRESSBOOK, e_source_get_uri (selected_source), NULL); } } @@ -360,7 +361,8 @@ gtk_widget_set_sensitive (stuff->gaim_option_menu, active); if (active && !gconf_client_get_string (stuff->target->gconf, GCONF_KEY_WHICH_ADDRESSBOOK_GAIM, NULL)) { - selected_source = e_source_option_menu_peek_selected (E_SOURCE_OPTION_MENU (stuff->gaim_option_menu)); + selected_source = e_source_combo_box_get_active ( + E_SOURCE_COMBO_BOX (stuff->gaim_option_menu)); gconf_client_set_string (stuff->target->gconf, GCONF_KEY_WHICH_ADDRESSBOOK_GAIM, e_source_get_uri (selected_source), NULL); } } @@ -389,31 +391,32 @@ static GtkWidget * create_addressbook_option_menu (struct bbdb_stuff *stuff, int type) { - GtkWidget *menu; + GtkWidget *combo_box; ESourceList *source_list; char *selected_source_uri; - ESource *selected_source; GConfClient *gconf = stuff->target->gconf; source_list = e_source_list_new_for_gconf (gconf, "/apps/evolution/addressbook/sources"); - menu = e_source_option_menu_new (source_list); + combo_box = e_source_combo_box_new (source_list); if (type == GAIM_ADDRESSBOOK) selected_source_uri = gconf_client_get_string (gconf, GCONF_KEY_WHICH_ADDRESSBOOK_GAIM, NULL); else selected_source_uri = gconf_client_get_string (gconf, GCONF_KEY_WHICH_ADDRESSBOOK, NULL); if (selected_source_uri != NULL) { - selected_source = e_source_new_with_absolute_uri ("", selected_source_uri); - e_source_option_menu_select (E_SOURCE_OPTION_MENU (menu), selected_source); + e_source_combo_box_set_active ( + E_SOURCE_COMBO_BOX (combo_box), + e_source_new_with_absolute_uri ( + "", selected_source_uri)); g_free (selected_source_uri); } - gtk_widget_show (menu); + gtk_widget_show (combo_box); stuff->source_list = source_list; - return menu; + return combo_box; } GtkWidget * --- evolution-2.11.2/addressbook/gui/contact-list-editor/contact-list-editor.glade.e-source-combo-box 2007-05-14 00:24:02.000000000 -0400 +++ evolution-2.11.2/addressbook/gui/contact-list-editor/contact-list-editor.glade 2007-05-18 15:48:37.000000000 -0400 @@ -158,9 +158,9 @@ - + True - e_contact_list_editor_create_source_option_menu + e_contact_list_editor_create_source_combo_box 0 0 Tue, 01 Jun 2004 18:22:38 GMT --- evolution-2.11.2/addressbook/gui/contact-list-editor/e-contact-list-editor.c.e-source-combo-box 2007-04-18 06:15:40.000000000 -0400 +++ evolution-2.11.2/addressbook/gui/contact-list-editor/e-contact-list-editor.c 2007-05-18 15:48:37.000000000 -0400 @@ -33,7 +33,7 @@ #include #include -#include +#include #include #include @@ -78,7 +78,7 @@ static void list_name_changed_cb (GtkWidget *w, EContactListEditor *editor); static void list_image_changed_cb (GtkWidget *w, EContactListEditor *editor); static void visible_addrs_toggled_cb (GtkWidget *w, EContactListEditor *editor); -static void source_selected (GtkWidget *source_option_menu, ESource *source, EContactListEditor *editor); +static void source_changed_cb (ESourceComboBox *source_combo_box, EContactListEditor *editor); static gboolean email_key_pressed (GtkWidget *w, GdkEventKey *event, EContactListEditor *editor); static void email_match_selected (GtkWidget *w, EDestination *destination, EContactListEditor *editor); @@ -233,7 +233,7 @@ editor->list_name_entry = glade_xml_get_widget (gui, "list-name-entry"); editor->list_image = glade_xml_get_widget (gui, "list-image"); editor->visible_addrs_checkbutton = glade_xml_get_widget (gui, "visible-addrs-checkbutton"); - editor->source_menu = glade_xml_get_widget (gui, "source-option-menu-source"); + editor->source_menu = glade_xml_get_widget (gui, "source-combo-box-source"); editor->ok_button = glade_xml_get_widget (gui, "ok-button"); editor->cancel_button = glade_xml_get_widget (gui, "cancel-button"); @@ -276,7 +276,7 @@ "changed", G_CALLBACK(list_image_changed_cb), editor); g_signal_connect (editor->source_menu, - "source_selected", G_CALLBACK (source_selected), editor); + "changed", G_CALLBACK (source_changed_cb), editor); command_state_changed (editor); @@ -306,8 +306,9 @@ if (status != E_BOOK_ERROR_OK || new_book == NULL) { eab_load_error_dialog (NULL, e_book_get_source (new_book), status); - e_source_option_menu_select (E_SOURCE_OPTION_MENU (editor->source_menu), - e_book_get_source (editor->book)); + e_source_combo_box_set_active ( + E_SOURCE_COMBO_BOX (editor->source_menu), + e_book_get_source (editor->book)); if (new_book) g_object_unref (new_book); @@ -332,8 +333,12 @@ } static void -source_selected (GtkWidget *source_option_menu, ESource *source, EContactListEditor *editor) +source_changed_cb (ESourceComboBox *source_combo_box, EContactListEditor *editor) { + ESource *source; + + source = e_source_combo_box_get_active (source_combo_box); + cancel_load (editor); if (e_source_equal (e_book_get_source (editor->book), source)) @@ -795,28 +800,28 @@ } GtkWidget * -e_contact_list_editor_create_source_option_menu (gchar *name, - gchar *string1, gchar *string2, - gint int1, gint int2); +e_contact_list_editor_create_source_combo_box (gchar *name, + gchar *string1, gchar *string2, + gint int1, gint int2); GtkWidget * -e_contact_list_editor_create_source_option_menu (gchar *name, - gchar *string1, gchar *string2, - gint int1, gint int2) +e_contact_list_editor_create_source_combo_box (gchar *name, + gchar *string1, gchar *string2, + gint int1, gint int2) { - 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/addressbook/sources"); - menu = e_source_option_menu_new (source_list); + combo_box = e_source_combo_box_new (source_list); g_object_unref (source_list); - gtk_widget_show (menu); - return menu; + gtk_widget_show (combo_box); + return combo_box; } GtkWidget * @@ -1262,10 +1267,9 @@ } if (editor->book) { - ESource *source; - - source = e_book_get_source (editor->book); - e_source_option_menu_select (E_SOURCE_OPTION_MENU (editor->source_menu), source); + e_source_combo_box_set_active ( + E_SOURCE_COMBO_BOX (editor->source_menu), + e_book_get_source (editor->book)); gtk_widget_set_sensitive (editor->source_menu, editor->is_new_list); gtk_widget_set_sensitive (glade_xml_get_widget (editor->gui, "source-label"), editor->is_new_list); } --- evolution-2.11.2/addressbook/gui/contact-editor/contact-editor.glade.e-source-combo-box 2007-04-18 06:15:34.000000000 -0400 +++ evolution-2.11.2/addressbook/gui/contact-editor/contact-editor.glade 2007-05-18 15:48:37.000000000 -0400 @@ -356,9 +356,9 @@ - + True - e_contact_editor_create_source_option_menu + e_contact_editor_create_source_combo_box 0 0 Tue, 13 Apr 2004 20:47:50 GMT --- evolution-2.11.2/addressbook/gui/contact-editor/e-contact-editor.c.e-source-combo-box 2007-05-09 00:14:39.000000000 -0400 +++ evolution-2.11.2/addressbook/gui/contact-editor/e-contact-editor.c 2007-05-18 15:48:37.000000000 -0400 @@ -46,7 +46,7 @@ #include #include -#include +#include #include @@ -589,15 +589,16 @@ fill_in_source_field (EContactEditor *editor) { GtkWidget *source_menu; - ESource *source; if (!editor->target_book) return; - source_menu = glade_xml_get_widget (editor->gui, "source-option-menu-source"); - source = e_book_get_source (editor->target_book); + source_menu = glade_xml_get_widget ( + editor->gui, "source-combo-box-source"); - e_source_option_menu_select (E_SOURCE_OPTION_MENU (source_menu), source); + e_source_combo_box_set_active ( + E_SOURCE_COMBO_BOX (source_menu), + e_book_get_source (editor->target_book)); } static void @@ -2521,13 +2522,15 @@ editor->load_book = NULL; if (status != E_BOOK_ERROR_OK || new_book == NULL) { - GtkWidget *source_option_menu; + GtkWidget *source_combo_box; eab_load_error_dialog (NULL, e_book_get_source (new_book), status); - source_option_menu = glade_xml_get_widget (editor->gui, "source-option-menu-source"); - e_source_option_menu_select (E_SOURCE_OPTION_MENU (source_option_menu), - e_book_get_source (editor->target_book)); + source_combo_box = glade_xml_get_widget ( + editor->gui, "source-combo-box-source"); + e_source_combo_box_set_active ( + E_SOURCE_COMBO_BOX (source_combo_box), + e_book_get_source (editor->target_book)); if (new_book) g_object_unref (new_book); @@ -2551,8 +2554,12 @@ } static void -source_selected (GtkWidget *source_option_menu, ESource *source, EContactEditor *editor) +source_changed (ESourceComboBox *source_combo_box, EContactEditor *editor) { + ESource *source; + + source = e_source_combo_box_get_active (source_combo_box); + cancel_load (editor); if (e_source_equal (e_book_get_source (editor->target_book), source)) @@ -3323,8 +3330,8 @@ g_signal_connect (widget, "clicked", G_CALLBACK (full_name_clicked), e_contact_editor); widget = glade_xml_get_widget(e_contact_editor->gui, "button-categories"); g_signal_connect (widget, "clicked", G_CALLBACK (categories_clicked), e_contact_editor); - widget = glade_xml_get_widget (e_contact_editor->gui, "source-option-menu-source"); - g_signal_connect (widget, "source_selected", G_CALLBACK (source_selected), e_contact_editor); + widget = glade_xml_get_widget (e_contact_editor->gui, "source-combo-box-source"); + g_signal_connect (widget, "changed", G_CALLBACK (source_changed), e_contact_editor); label = glade_xml_get_widget (e_contact_editor->gui, "where-label"); gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget); widget = glade_xml_get_widget (e_contact_editor->gui, "button-ok"); @@ -3775,25 +3782,25 @@ } GtkWidget * -e_contact_editor_create_source_option_menu (gchar *name, - gchar *string1, gchar *string2, - gint int1, gint int2); +e_contact_editor_create_source_combo_box (gchar *name, + gchar *string1, gchar *string2, + gint int1, gint int2); GtkWidget * -e_contact_editor_create_source_option_menu (gchar *name, - gchar *string1, gchar *string2, - gint int1, gint int2) +e_contact_editor_create_source_combo_box (gchar *name, + gchar *string1, gchar *string2, + gint int1, gint int2) { - 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/addressbook/sources"); - menu = e_source_option_menu_new (source_list); + combo_box = e_source_combo_box_new (source_list); g_object_unref (source_list); - gtk_widget_show (menu); - return menu; + gtk_widget_show (combo_box); + return combo_box; } --- evolution-2.11.2/addressbook/gui/contact-editor/e-contact-quick-add.c.e-source-combo-box 2007-04-18 06:15:34.000000000 -0400 +++ evolution-2.11.2/addressbook/gui/contact-editor/e-contact-quick-add.c 2007-05-18 15:48:37.000000000 -0400 @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include #include "e-contact-editor.h" @@ -267,8 +267,12 @@ } static void -source_selected (GtkWidget *source_option_menu, ESource *source, QuickAdd *qa) +source_changed (ESourceComboBox *source_combo_box, QuickAdd *qa) { + ESource *source; + + source = e_source_combo_box_get_active (source_combo_box); + if (qa->book) { g_object_unref (qa->book); qa->book = NULL; @@ -316,16 +320,20 @@ gconf_client = gconf_client_get_default (); source_list = e_source_list_new_for_gconf (gconf_client, "/apps/evolution/addressbook/sources"); - qa->option_menu = e_source_option_menu_new (source_list); + qa->option_menu = e_source_combo_box_new (source_list); book = e_book_new_default_addressbook (NULL); - e_source_option_menu_select (E_SOURCE_OPTION_MENU (qa->option_menu), e_book_get_source(book)); + e_source_combo_box_set_active ( + E_SOURCE_COMBO_BOX (qa->option_menu), + e_book_get_source (book)); if (qa->book) { g_object_unref (qa->book); qa->book = NULL; } qa->book = book ; - source_selected(qa->option_menu, e_source_option_menu_peek_selected ((ESourceOptionMenu *)qa->option_menu), qa); - g_signal_connect (qa->option_menu, "source_selected", G_CALLBACK (source_selected), qa); + source_changed (E_SOURCE_COMBO_BOX (qa->option_menu), qa); + g_signal_connect ( + qa->option_menu, "changed", + G_CALLBACK (source_changed), qa); g_object_unref (source_list); --- evolution-2.11.2/calendar/gui/dialogs/memo-page.glade.e-source-combo-box 2007-04-18 06:18:36.000000000 -0400 +++ evolution-2.11.2/calendar/gui/dialogs/memo-page.glade 2007-05-18 15:48:37.000000000 -0400 @@ -141,7 +141,7 @@ True - memo_page_create_source_option_menu + memo_page_create_source_combo_box 0 0 Tue, 13 Jan 2004 22:00:00 GMT --- evolution-2.11.2/calendar/gui/dialogs/event-page.glade.e-source-combo-box 2007-04-18 06:18:36.000000000 -0400 +++ evolution-2.11.2/calendar/gui/dialogs/event-page.glade 2007-05-18 15:48:37.000000000 -0400 @@ -774,7 +774,7 @@ True - event_page_create_source_option_menu + event_page_create_source_combo_box 0 0 Wed, 17 Dec 2003 18:20:26 GMT --- evolution-2.11.2/calendar/gui/dialogs/task-page.glade.e-source-combo-box 2007-05-09 00:14:46.000000000 -0400 +++ evolution-2.11.2/calendar/gui/dialogs/task-page.glade 2007-05-18 15:48:37.000000000 -0400 @@ -618,7 +618,7 @@ 24 True - task_page_create_source_option_menu + task_page_create_source_combo_box 0 0 Thu, 18 Dec 2003 01:58:48 GMT --- evolution-2.11.2/calendar/gui/dialogs/memo-page.c.e-source-combo-box 2007-04-20 00:28:26.000000000 -0400 +++ evolution-2.11.2/calendar/gui/dialogs/memo-page.c 2007-05-18 15:48:37.000000000 -0400 @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include #include @@ -339,7 +339,6 @@ ECalComponentDateTime d; GSList *l; const char *categories; - ESource *source; mpage = MEMO_PAGE (page); priv = mpage->priv; @@ -432,8 +431,9 @@ } /* 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; @@ -842,13 +842,12 @@ } 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; @@ -860,8 +859,9 @@ 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, @@ -971,7 +971,7 @@ 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" @@ -1165,21 +1165,22 @@ 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); - gtk_widget_show (menu); - return menu; + gtk_widget_show (combo_box); + return combo_box; } --- evolution-2.11.2/calendar/gui/dialogs/event-page.c.e-source-combo-box 2007-05-09 00:14:46.000000000 -0400 +++ evolution-2.11.2/calendar/gui/dialogs/event-page.c 2007-05-18 15:48:37.000000000 -0400 @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include "common/authentication.h" #include "e-util/e-categories-config.h" #include "e-util/e-dialog-widgets.h" @@ -969,7 +969,6 @@ ECalComponentDateTime start_date, end_date; const char *location, *uid = NULL; const char *categories; - ESource *source; GSList *l; gboolean validated = TRUE; @@ -1165,8 +1164,9 @@ 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) @@ -2566,7 +2566,8 @@ 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; } @@ -2595,13 +2596,12 @@ } 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; @@ -2620,8 +2620,9 @@ 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, @@ -2847,7 +2848,7 @@ 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 (); @@ -3148,23 +3149,24 @@ 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); - gtk_widget_show (menu); - return menu; + gtk_widget_show (combo_box); + return combo_box; } GtkWidget *make_status_icons (void); --- evolution-2.11.2/calendar/gui/dialogs/task-page.c.e-source-combo-box 2007-04-20 00:28:26.000000000 -0400 +++ evolution-2.11.2/calendar/gui/dialogs/task-page.c 2007-05-18 15:48:37.000000000 -0400 @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include #include "common/authentication.h" @@ -513,7 +513,6 @@ icalcomponent *icalcomp; const char *categories, *uid; icaltimezone *zone, *default_zone; - ESource *source; tpage = TASK_PAGE (page); priv = tpage->priv; @@ -657,8 +656,9 @@ 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)); if (priv->is_assignment) { ECalComponentOrganizer organizer; @@ -1615,13 +1615,12 @@ } 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; @@ -1640,8 +1639,9 @@ 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, @@ -1653,7 +1653,7 @@ 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 @@ -1677,7 +1677,8 @@ 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"); } @@ -1732,7 +1733,7 @@ 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" @@ -1953,21 +1954,22 @@ 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); - gtk_widget_show (menu); - return menu; + gtk_widget_show (combo_box); + return combo_box; } --- evolution-2.11.2/calendar/gui/e-itip-control.c.e-source-combo-box 2007-04-20 00:28:27.000000000 -0400 +++ evolution-2.11.2/calendar/gui/e-itip-control.c 2007-05-18 15:48:37.000000000 -0400 @@ -44,7 +44,7 @@ #include #include #include -#include +#include #include #include #include @@ -226,13 +226,13 @@ } 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 @@ 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 @@ 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 */ }