aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2007-10-23 02:49:30 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2007-10-23 02:49:30 +0800
commitb37af8f269484ebd836996c140ea718885954ca3 (patch)
tree8ed883fcc7c60b5200be9438514902accd991cd1
parent16af69fb17d52a18b0c308e8ed137f71d2dba1fa (diff)
downloadgsoc2013-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
-rw-r--r--addressbook/ChangeLog11
-rw-r--r--addressbook/gui/contact-editor/contact-editor.glade4
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c51
-rw-r--r--addressbook/gui/contact-editor/e-contact-quick-add.c20
-rw-r--r--addressbook/gui/contact-list-editor/contact-list-editor.glade4
-rw-r--r--addressbook/gui/contact-list-editor/e-contact-list-editor.c46
-rw-r--r--calendar/ChangeLog13
-rw-r--r--calendar/gui/dialogs/event-page.c42
-rw-r--r--calendar/gui/dialogs/event-page.glade2
-rw-r--r--calendar/gui/dialogs/memo-page.c39
-rw-r--r--calendar/gui/dialogs/memo-page.glade2
-rw-r--r--calendar/gui/dialogs/task-page.c44
-rw-r--r--calendar/gui/dialogs/task-page.glade2
-rw-r--r--calendar/gui/e-itip-control.c28
-rw-r--r--plugins/bbdb/ChangeLog8
-rw-r--r--plugins/bbdb/bbdb.c132
-rw-r--r--plugins/bbdb/gaimbuddies.c2
-rw-r--r--plugins/itip-formatter/ChangeLog7
-rw-r--r--plugins/itip-formatter/itip-formatter.c1
-rw-r--r--plugins/itip-formatter/itip-view.c60
-rw-r--r--widgets/misc/ChangeLog7
-rw-r--r--widgets/misc/e-pilot-settings.c12
22 files changed, 349 insertions, 188 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index f992558f14..775d089e9d 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,14 @@
+2007-10-22 Matthew Barnes <mbarnes@redhat.com>
+
+ ** Fixes part of bug #417999
+
+ * gui/contact-editor/e-contact-editor.c:
+ * gui/contact-editor/contact-editor.glade:
+ * gui/contact-editor/e-contact-quick-add.c:
+ * gui/contact-list-editor/contact-list-editor.c:
+ * gui/contact-list-editor/contact-list-editor.glade:
+ Use ESourceComboBox instead of ESourceOptionMenu (deprecated).
+
2007-10-18 Tobias Mueller <tobiasmue@svn.gnome.org>
Patch by Michael Monreal <michael.monreal@gmx.net>
diff --git a/addressbook/gui/contact-editor/contact-editor.glade b/addressbook/gui/contact-editor/contact-editor.glade
index afc6f114c8..93ba4336bb 100644
--- a/addressbook/gui/contact-editor/contact-editor.glade
+++ b/addressbook/gui/contact-editor/contact-editor.glade
@@ -356,9 +356,9 @@
</child>
<child>
- <widget class="Custom" id="source-option-menu-source">
+ <widget class="Custom" id="source-combo-box-source">
<property name="visible">True</property>
- <property name="creation_function">e_contact_editor_create_source_option_menu</property>
+ <property name="creation_function">e_contact_editor_create_source_combo_box</property>
<property name="int1">0</property>
<property name="int2">0</property>
<property name="last_modification_time">Tue, 13 Apr 2004 20:47:50 GMT</property>
diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c
index 6bbc80e9bb..20a48a511d 100644
--- a/addressbook/gui/contact-editor/e-contact-editor.c
+++ b/addressbook/gui/contact-editor/e-contact-editor.c
@@ -46,7 +46,7 @@
#include <text/e-entry.h>
#include <libebook/e-address-western.h>
-#include <libedataserverui/e-source-option-menu.h>
+#include <libedataserverui/e-source-combo-box.h>
#include <camel/camel.h>
@@ -589,15 +589,16 @@ static void
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
@@ -2532,13 +2533,15 @@ new_target_cb (EBook *new_book, EBookStatus status, EContactEditor *editor)
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);
@@ -2562,8 +2565,12 @@ cancel_load (EContactEditor *editor)
}
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))
@@ -3350,8 +3357,8 @@ e_contact_editor_init (EContactEditor *e_contact_editor)
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");
@@ -3802,26 +3809,26 @@ e_contact_editor_create_web(gchar *name,
}
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);
g_object_unref (gconf_client);
- gtk_widget_show (menu);
- return menu;
+ gtk_widget_show (combo_box);
+ return combo_box;
}
diff --git a/addressbook/gui/contact-editor/e-contact-quick-add.c b/addressbook/gui/contact-editor/e-contact-quick-add.c
index 15b0de4925..1fc68734f0 100644
--- a/addressbook/gui/contact-editor/e-contact-quick-add.c
+++ b/addressbook/gui/contact-editor/e-contact-quick-add.c
@@ -37,7 +37,7 @@
#include <libgnomeui/gnome-app.h>
#include <libebook/e-book.h>
#include <libebook/e-contact.h>
-#include <libedataserverui/e-source-option-menu.h>
+#include <libedataserverui/e-source-combo-box.h>
#include <addressbook/gui/component/addressbook.h>
#include <addressbook/util/eab-book-util.h>
#include "e-contact-editor.h"
@@ -269,8 +269,12 @@ clicked_cb (GtkWidget *w, gint button, gpointer closure)
}
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;
@@ -319,16 +323,20 @@ build_quick_add_dialog (QuickAdd *qa)
gconf_client = gconf_client_get_default ();
source_list = e_source_list_new_for_gconf (gconf_client, "/apps/evolution/addressbook/sources");
g_object_unref (gconf_client);
- 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);
diff --git a/addressbook/gui/contact-list-editor/contact-list-editor.glade b/addressbook/gui/contact-list-editor/contact-list-editor.glade
index f97e7df944..64280c2c52 100644
--- a/addressbook/gui/contact-list-editor/contact-list-editor.glade
+++ b/addressbook/gui/contact-list-editor/contact-list-editor.glade
@@ -158,9 +158,9 @@
</child>
<child>
- <widget class="Custom" id="source-option-menu-source">
+ <widget class="Custom" id="source-combo-box-source">
<property name="visible">True</property>
- <property name="creation_function">e_contact_list_editor_create_source_option_menu</property>
+ <property name="creation_function">e_contact_list_editor_create_source_combo_box</property>
<property name="int1">0</property>
<property name="int2">0</property>
<property name="last_modification_time">Tue, 01 Jun 2004 18:22:38 GMT</property>
diff --git a/addressbook/gui/contact-list-editor/e-contact-list-editor.c b/addressbook/gui/contact-list-editor/e-contact-list-editor.c
index ebc89c4b2a..67b92c904a 100644
--- a/addressbook/gui/contact-list-editor/e-contact-list-editor.c
+++ b/addressbook/gui/contact-list-editor/e-contact-list-editor.c
@@ -33,7 +33,7 @@
#include <gtk/gtktogglebutton.h>
#include <gtk/gtkdialog.h>
-#include <libedataserverui/e-source-option-menu.h>
+#include <libedataserverui/e-source-combo-box.h>
#include <table/e-table-scrolled.h>
#include <libgnomevfs/gnome-vfs-ops.h>
@@ -78,7 +78,7 @@ static void select_cb (GtkWidget *w, EContactListEditor *editor);
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 @@ e_contact_list_editor_init (EContactListEditor *editor)
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 @@ e_contact_list_editor_init (EContactListEditor *editor)
"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 @@ new_target_cb (EBook *new_book, EBookStatus status, EContactListEditor *editor)
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 @@ cancel_load (EContactListEditor *editor)
}
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 @@ select_cb (GtkWidget *w, EContactListEditor *editor)
}
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 @@ fill_in_info(EContactListEditor *editor)
}
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);
}
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 */
}
diff --git a/plugins/bbdb/ChangeLog b/plugins/bbdb/ChangeLog
index bb17fd32c8..78810928ba 100644
--- a/plugins/bbdb/ChangeLog
+++ b/plugins/bbdb/ChangeLog
@@ -1,3 +1,11 @@
+2007-10-22 Matthew Barnes <mbarnes@redhat.com>
+
+ ** Fixes part of bug #417999
+
+ * bbdb.c:
+ * gaimbuddies.c:
+ Use ESourceComboBox instead of ESourceOptionMenu (deprecated).
+
2007-10-09 Matthew Barnes <mbarnes@redhat.com>
** Fixes part of bug #437579
diff --git a/plugins/bbdb/bbdb.c b/plugins/bbdb/bbdb.c
index 17eb26f176..a4b363af51 100644
--- a/plugins/bbdb/bbdb.c
+++ b/plugins/bbdb/bbdb.c
@@ -40,7 +40,7 @@
#include <string.h>
#include <libebook/e-book.h>
-#include <libedataserverui/e-source-option-menu.h>
+#include <libedataserverui/e-source-combo-box.h>
#include <e-util/e-config.h>
#include <mail/em-config.h>
@@ -71,10 +71,49 @@ static gboolean bbdb_timeout (gpointer data);
static void bbdb_do_it (EBook *book, const char *name, const char *email);
static void add_email_to_contact (EContact *contact, const char *email);
static void enable_toggled_cb (GtkWidget *widget, gpointer data);
-static void source_changed_cb (GtkWidget *widget, ESource *source, gpointer data);
+static void source_changed_cb (ESourceComboBox *source_combo_box, struct bbdb_stuff *stuff);
static GtkWidget *create_addressbook_option_menu (struct bbdb_stuff *stuff, int type);
static void cleanup_cb (GObject *o, gpointer data);
+static ESource *
+find_esource_by_uri (ESourceList *source_list, const gchar *target_uri)
+{
+ GSList *groups;
+
+ /* XXX This would be unnecessary if the plugin had stored
+ * the addressbook's UID instead of the URI in GConf.
+ * Too late to change it now, I suppose. */
+
+ if (source_list == NULL || target_uri == NULL)
+ return NULL;
+
+ groups = e_source_list_peek_groups (source_list);
+
+ while (groups != NULL) {
+ GSList *sources;
+
+ sources = e_source_group_peek_sources (groups->data);
+
+ while (sources != NULL) {
+ gchar *uri;
+ gboolean match;
+
+ uri = e_source_get_uri (sources->data);
+ match = (strcmp (uri, target_uri) == 0);
+ g_free (uri);
+
+ if (match)
+ return sources->data;
+
+ sources = g_slist_next (sources);
+ }
+
+ groups = g_slist_next (groups);
+ }
+
+ return NULL;
+}
+
int
e_plugin_lib_enable (EPluginLib *ep, int enable)
{
@@ -343,8 +382,23 @@ enable_toggled_cb (GtkWidget *widget, gpointer data)
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));
- gconf_client_set_string (stuff->target->gconf, GCONF_KEY_WHICH_ADDRESSBOOK, e_source_get_uri (selected_source), NULL);
+ const gchar *uri = NULL;
+ GError *error = NULL;
+
+ selected_source = e_source_combo_box_get_active (
+ E_SOURCE_COMBO_BOX (stuff->option_menu));
+ if (selected_source != NULL)
+ uri = e_source_get_uri (selected_source);
+
+ gconf_client_set_string (
+ stuff->target->gconf,
+ GCONF_KEY_WHICH_ADDRESSBOOK,
+ uri, &error);
+
+ if (error != NULL) {
+ g_warning ("%s", error->message);
+ g_error_free (error);
+ }
}
}
@@ -362,7 +416,8 @@ enable_gaim_toggled_cb (GtkWidget *widget, gpointer data)
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);
}
}
@@ -374,48 +429,77 @@ synchronize_button_clicked_cb (GtkWidget *button)
}
static void
-source_changed_cb (GtkWidget *widget, ESource *source, gpointer data)
+source_changed_cb (ESourceComboBox *source_combo_box,
+ struct bbdb_stuff *stuff)
{
- struct bbdb_stuff *stuff = (struct bbdb_stuff *) data;
-
- gconf_client_set_string (stuff->target->gconf, GCONF_KEY_WHICH_ADDRESSBOOK, e_source_get_uri (source), NULL);
+ ESource *source;
+ GError *error = NULL;
+
+ source = e_source_combo_box_get_active (source_combo_box);
+ g_return_if_fail (source != NULL);
+
+ gconf_client_set_string (
+ stuff->target->gconf,
+ GCONF_KEY_WHICH_ADDRESSBOOK,
+ e_source_get_uri (source), &error);
+
+ if (error != NULL) {
+ g_warning ("%s", error->message);
+ g_error_free (error);
+ }
}
static void
-gaim_source_changed_cb (GtkWidget *widget, ESource *source, gpointer data)
+gaim_source_changed_cb (ESourceComboBox *source_combo_box,
+ struct bbdb_stuff *stuff)
{
- struct bbdb_stuff *stuff = (struct bbdb_stuff *) data;
- gconf_client_set_string (stuff->target->gconf, GCONF_KEY_WHICH_ADDRESSBOOK_GAIM, e_source_get_uri (source), NULL);
+ ESource *source;
+ GError *error = NULL;
+
+ source = e_source_combo_box_get_active (source_combo_box);
+ g_return_if_fail (source != NULL);
+
+ gconf_client_set_string (
+ stuff->target->gconf,
+ GCONF_KEY_WHICH_ADDRESSBOOK_GAIM,
+ e_source_get_uri (source), &error);
+
+ if (error != NULL) {
+ g_warning ("%s", error->message);
+ g_error_free (error);
+ }
}
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;
+ char *selected_source_uri;
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);
- g_free (selected_source_uri);
- }
+ selected_source = find_esource_by_uri (
+ source_list, selected_source_uri);
+ g_free (selected_source_uri);
+
+ if (selected_source != NULL)
+ e_source_combo_box_set_active (
+ E_SOURCE_COMBO_BOX (combo_box), selected_source);
- gtk_widget_show (menu);
+ gtk_widget_show (combo_box);
stuff->source_list = source_list;
- return menu;
+ return combo_box;
}
GtkWidget *
@@ -481,7 +565,7 @@ bbdb_page_factory (EPlugin *ep, EConfigHookItemFactoryData *hook_data)
/* Source selection option menu */
option = create_addressbook_option_menu (stuff, AUTOMATIC_CONTACTS_ADDRESSBOOK);
- g_signal_connect (option, "source_selected", G_CALLBACK (source_changed_cb), stuff);
+ g_signal_connect (option, "changed", G_CALLBACK (source_changed_cb), stuff);
gtk_widget_set_sensitive (option, gconf_client_get_bool (target->gconf, GCONF_KEY_ENABLE, NULL));
gtk_box_pack_start (GTK_BOX (inner_vbox), option, FALSE, FALSE, 0);
stuff->option_menu = option;
@@ -517,7 +601,7 @@ bbdb_page_factory (EPlugin *ep, EConfigHookItemFactoryData *hook_data)
/* Gaim Source Selection Option Menu */
gaim_option = create_addressbook_option_menu (stuff, GAIM_ADDRESSBOOK);
- g_signal_connect (gaim_option, "source_selected", G_CALLBACK (gaim_source_changed_cb), stuff);
+ g_signal_connect (gaim_option, "changed", G_CALLBACK (gaim_source_changed_cb), stuff);
gtk_widget_set_sensitive (gaim_option, gconf_client_get_bool (target->gconf, GCONF_KEY_ENABLE_GAIM, NULL));
gtk_box_pack_start (GTK_BOX (inner_vbox), gaim_option, FALSE, FALSE, 0);
stuff->gaim_option_menu = gaim_option;
diff --git a/plugins/bbdb/gaimbuddies.c b/plugins/bbdb/gaimbuddies.c
index 09a2f1d6c6..6c91b06be4 100644
--- a/plugins/bbdb/gaimbuddies.c
+++ b/plugins/bbdb/gaimbuddies.c
@@ -44,7 +44,7 @@
#include <string.h>
#include <libebook/e-book.h>
-#include <libedataserverui/e-source-option-menu.h>
+#include <libedataserverui/e-source-combo-box.h>
#include <sys/time.h>
#include <sys/stat.h>
diff --git a/plugins/itip-formatter/ChangeLog b/plugins/itip-formatter/ChangeLog
index b453e46dcd..5aed2a1f68 100644
--- a/plugins/itip-formatter/ChangeLog
+++ b/plugins/itip-formatter/ChangeLog
@@ -1,3 +1,10 @@
+2007-10-22 Matthew Barnes <mbarnes@redhat.com>
+
+ ** Fixes part of bug #417999
+
+ * itip-view.c:
+ Use ESourceComboBox instead of ESourceOptionMenu (deprecated).
+
2007-10-04 Milan Crha <mcrha@redhat.com>
** Fix for bug #331578
diff --git a/plugins/itip-formatter/itip-formatter.c b/plugins/itip-formatter/itip-formatter.c
index 952f45a622..e44740ff6e 100644
--- a/plugins/itip-formatter/itip-formatter.c
+++ b/plugins/itip-formatter/itip-formatter.c
@@ -40,7 +40,6 @@
#include <camel/camel-store.h>
#include <libecal/e-cal.h>
#include <libecal/e-cal-time-util.h>
-#include <libedataserverui/e-source-option-menu.h>
#include <libedataserverui/e-source-selector.h>
#include <gtkhtml/gtkhtml-embedded.h>
#include <mail/em-format-hook.h>
diff --git a/plugins/itip-formatter/itip-view.c b/plugins/itip-formatter/itip-view.c
index acc4f50fb2..f6e2e06855 100644
--- a/plugins/itip-formatter/itip-view.c
+++ b/plugins/itip-formatter/itip-view.c
@@ -35,7 +35,7 @@
#include <camel/camel-mime-message.h>
#include <libedataserver/e-time-utils.h>
#include <libedataserver/e-data-server-util.h>
-#include <libedataserverui/e-source-option-menu.h>
+#include <libedataserverui/e-source-combo-box.h>
#include <libecal/e-cal.h>
#include <libecal/e-cal-time-util.h>
#include <gtkhtml/gtkhtml-embedded.h>
@@ -105,8 +105,8 @@ struct _ItipViewPrivate {
char *description;
GtkWidget *selector_box;
- GtkWidget *esom;
- GtkWidget *esom_header;
+ GtkWidget *escb;
+ GtkWidget *escb_header;
ESourceList *source_list;
GtkWidget *rsvp_box;
@@ -1791,10 +1791,12 @@ itip_view_clear_lower_info_items (ItipView *view)
}
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);
}
@@ -1811,40 +1813,42 @@ itip_view_set_source_list (ItipView *view, ESourceList *source_list)
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 *
@@ -1870,10 +1874,11 @@ itip_view_set_source (ItipView *view, ESource *source)
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 *
@@ -1886,10 +1891,11 @@ itip_view_get_source (ItipView *view)
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
diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog
index b5c74cbb2d..e3e8103e9f 100644
--- a/widgets/misc/ChangeLog
+++ b/widgets/misc/ChangeLog
@@ -1,3 +1,10 @@
+2007-10-22 Matthew Barnes <mbarnes@redhat.com>
+
+ ** Fixes part of bug #417999
+
+ * e-pilot-settings.c:
+ Use ESourceComboBox instead of ESourceOptionMenu (deprecated).
+
2007-10-09 Matthew Barnes <mbarnes@redhat.com>
** Fixes part of bug #437579
diff --git a/widgets/misc/e-pilot-settings.c b/widgets/misc/e-pilot-settings.c
index cbf838e71f..dcee88fa73 100644
--- a/widgets/misc/e-pilot-settings.c
+++ b/widgets/misc/e-pilot-settings.c
@@ -27,7 +27,7 @@
#include <gtk/gtk.h>
#include <glib/gi18n.h>
-#include <libedataserverui/e-source-option-menu.h>
+#include <libedataserverui/e-source-combo-box.h>
#include "e-pilot-settings.h"
struct _EPilotSettingsPrivate
@@ -102,7 +102,7 @@ build_ui (EPilotSettings *ps, ESourceList *source_list)
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 @@ e_pilot_settings_get_source (EPilotSettings *ps)
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 @@ e_pilot_settings_set_source (EPilotSettings *ps, ESource *source)
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