aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
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 /addressbook
parent16af69fb17d52a18b0c308e8ed137f71d2dba1fa (diff)
downloadgsoc2013-evolution-b37af8f269484ebd836996c140ea718885954ca3.tar.gz
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 'addressbook')
-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
6 files changed, 83 insertions, 53 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);
}