aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/ChangeLog27
-rw-r--r--addressbook/gui/component/.cvsignore4
-rw-r--r--addressbook/gui/component/GNOME_Evolution_Addressbook.server.in (renamed from addressbook/gui/component/GNOME_Evolution_Addressbook.oaf.in)0
-rw-r--r--addressbook/gui/component/Makefile.am28
-rw-r--r--addressbook/gui/component/addressbook-component.c23
-rw-r--r--addressbook/gui/component/addressbook-config.c204
-rw-r--r--addressbook/gui/component/addressbook-factory.c48
-rw-r--r--addressbook/gui/component/addressbook-storage.c4
-rw-r--r--addressbook/gui/component/addressbook.c46
-rw-r--r--addressbook/gui/component/addressbook.h4
-rw-r--r--addressbook/gui/component/e-address-popup.c19
-rw-r--r--addressbook/gui/component/e-address-popup.h5
-rw-r--r--addressbook/gui/component/e-address-widget.c10
-rw-r--r--addressbook/gui/component/e-address-widget.h21
-rw-r--r--addressbook/gui/component/e-cardlist-model.h11
15 files changed, 245 insertions, 209 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index fa3958a0f0..2078ac932b 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,5 +1,32 @@
2002-11-05 Chris Toshok <toshok@ximian.com>
+ * gui/component/.cvsignore: ignore the new .server file.
+
+ * gui/component/Makefile.am: typical port stuff. switch the .oaf
+ to .server, and leave out a lot of libs so we can actually get
+ things linking.
+
+ * gui/component/GNOME_Evolution_Addressbook.server.in: rename
+ .oaf.in here.
+
+ * gui/component/addressbook-component.c: Port to GObject/gnome2.
+
+ * gui/component/addressbook-config.c: Port to GObject/gnome2.
+
+ * gui/component/addressbook-factory.c: Port to GObject/gnome2.
+
+ * gui/component/addressbook-storage.c: Port to GObject/gnome2.
+
+ * gui/component/addressbook.[ch]: Port to GObject/gnome2.
+
+ * gui/component/e-address-popup.[ch]: Port to GObject/gnome2.
+
+ * gui/component/e-address-widget.[ch]: Port to GObject/gnome2.
+
+ * gui/component/e-cardlist-model.h: Port to GObject/gnome2.
+
+2002-11-05 Chris Toshok <toshok@ximian.com>
+
* gui/contact-list-editor/.cvsignore: ignore the marshal generated
stuff.
diff --git a/addressbook/gui/component/.cvsignore b/addressbook/gui/component/.cvsignore
index 8bcb766191..8f4a262e0a 100644
--- a/addressbook/gui/component/.cvsignore
+++ b/addressbook/gui/component/.cvsignore
@@ -8,4 +8,6 @@ Makefile.in
evolution-addressbook
evolution-addressbook.pure
test-addressbook
-GNOME_Evolution_Addressbook.oaf \ No newline at end of file
+GNOME_Evolution_Addressbook.server
+addressbook-marshal.c
+addressbook-marshal.h
diff --git a/addressbook/gui/component/GNOME_Evolution_Addressbook.oaf.in b/addressbook/gui/component/GNOME_Evolution_Addressbook.server.in
index 294db83fe9..294db83fe9 100644
--- a/addressbook/gui/component/GNOME_Evolution_Addressbook.oaf.in
+++ b/addressbook/gui/component/GNOME_Evolution_Addressbook.server.in
diff --git a/addressbook/gui/component/Makefile.am b/addressbook/gui/component/Makefile.am
index 842d0489b5..445c47c83a 100644
--- a/addressbook/gui/component/Makefile.am
+++ b/addressbook/gui/component/Makefile.am
@@ -2,6 +2,10 @@ SUBDIRS = select-names
INCLUDES = \
-DG_LOG_DOMAIN=\"evolution-addressbook\" \
+ -DPREFIX=\"$(prefix)\" \
+ -DSYSCONFDIR=\"$(sysconfdir)\" \
+ -DDATADIR=\"$(datadir)\" \
+ -DLIBDIR=\"$(libdir)\" \
-I$(top_srcdir) \
-I$(top_builddir) \
-I$(top_srcdir)/shell \
@@ -48,27 +52,29 @@ evolution_addressbook_LDADD = \
$(top_builddir)/shell/libeshell.la \
$(top_builddir)/addressbook/gui/widgets/libeminicard.a \
$(top_builddir)/addressbook/backend/ebook/libebook.la \
- $(top_builddir)/camel/libcamel.la \
$(top_builddir)/e-util/ename/libename.la \
$(top_builddir)/addressbook/gui/contact-list-editor/libecontactlisteditor.a \
$(top_builddir)/addressbook/gui/contact-editor/libecontacteditor.a \
$(top_builddir)/libversit/libversit.a \
$(top_builddir)/widgets/misc/libemiscwidgets.a \
- $(top_builddir)/addressbook/printing/libecontactprint.a \
- $(top_builddir)/addressbook/gui/search/libeaddressbooksearch.a \
$(top_builddir)/addressbook/gui/merging/libecardmerging.a \
- $(top_builddir)/filter/libfilter.la \
$(top_builddir)/e-util/libeutil.la \
$(top_builddir)/widgets/menus/libmenus.la \
$(EVOLUTION_ADDRESSBOOK_LIBS) $(LDAP_LIBS)
-evolution_addressbook_LDFLAGS = `gnome-config --libs gdk_pixbuf` -export-dynamic
+# not done yet:
+# $(top_builddir)/addressbook/gui/search/libeaddressbooksearch.a
+# $(top_builddir)/filter/libfilter.la
+# $(top_builddir)/addressbook/printing/libecontactprint.a
+# $(top_builddir)/camel/libcamel.la
-@XML_I18N_MERGE_OAF_RULE@
+#evolution_addressbook_LDFLAGS = `gnome-config --libs gdk_pixbuf` -export-dynamic
-oafdir = $(datadir)/oaf
-oaf_in_files = GNOME_Evolution_Addressbook.oaf.in
-oaf_DATA = $(oaf_in_files:.oaf.in=.oaf)
+@INTLTOOL_SERVER_RULE@
+
+serversdir = $(libdir)/bonobo/servers
+server_in_files = GNOME_Evolution_Addressbook.server.in
+servers_DATA = $(server_in_files:.server.in=.server)
gladedir = $(datadir)/evolution/glade
glade_DATA = ldap-config.glade
@@ -80,8 +86,8 @@ etspec_DATA = addressbook-config.etspec
EXTRA_DIST = \
$(glade_DATA) \
- $(oaf_DATA) \
- $(oaf_in_files) \
+ $(servers_DATA) \
+ $(server_in_files) \
$(etspec_DATA)
if ENABLE_PURIFY
diff --git a/addressbook/gui/component/addressbook-component.c b/addressbook/gui/component/addressbook-component.c
index ad7fa563a4..77b386ce77 100644
--- a/addressbook/gui/component/addressbook-component.c
+++ b/addressbook/gui/component/addressbook-component.c
@@ -97,7 +97,7 @@ create_view (EvolutionShellComponent *shell_component,
return EVOLUTION_SHELL_COMPONENT_UNSUPPORTEDTYPE;
control = addressbook_factory_new_control ();
- bonobo_control_set_property (control, "folder_uri", physical_uri, NULL);
+ bonobo_control_set_property (control, NULL, "folder_uri", physical_uri);
*control_return = control;
@@ -524,7 +524,7 @@ add_creatable_item (EvolutionShellComponent *shell_component,
icon = NULL;
} else {
icon_path = g_concat_dir_and_file (EVOLUTION_ICONSDIR, icon_name);
- icon = gdk_pixbuf_new_from_file (icon_path);
+ icon = gdk_pixbuf_new_from_file (icon_path, NULL);
}
evolution_shell_component_add_user_creatable_item (shell_component,
@@ -587,15 +587,12 @@ ensure_completion_uris_exist()
{
/* Initialize the completion uris if they aren't set yet. The
default set is just the local Contacts folder. */
- Bonobo_ConfigDatabase db;
- CORBA_Environment ev;
+ EConfigListener *db;
char *val;
- CORBA_exception_init (&ev);
-
- db = addressbook_config_database (&ev);
+ db = e_book_get_config_database ();
- val = bonobo_config_get_string (db, "/Addressbook/Completion/uris", &ev);
+ val = e_config_listener_get_string (db, "/Addressbook/Completion/uris");
if (!val) {
EFolderListItem f[2];
@@ -616,12 +613,10 @@ ensure_completion_uris_exist()
g_free (dirname);
g_free (uri);
- bonobo_config_set_string (db, "/Addressbook/Completion/uris", val, &ev);
+ e_config_listener_set_string (db, "/Addressbook/Completion/uris", val);
g_free (val);
}
-
- CORBA_exception_free (&ev);
}
@@ -636,9 +631,9 @@ addressbook_component_factory_init (void)
/* FIXME: Handle errors better? */
- result = oaf_active_server_register (GNOME_EVOLUTION_ADDRESSBOOK_COMPONENT_ID,
- bonobo_object_corba_objref (object));
- if (result == OAF_REG_ERROR)
+ result = bonobo_activation_active_server_register (GNOME_EVOLUTION_ADDRESSBOOK_COMPONENT_ID,
+ bonobo_object_corba_objref (object));
+ if (result == Bonobo_ACTIVATION_REG_ERROR)
g_error ("Cannot register -- %s", GNOME_EVOLUTION_ADDRESSBOOK_COMPONENT_ID);
/* XXX this could probably go someplace else, but I'll leave
diff --git a/addressbook/gui/component/addressbook-config.c b/addressbook/gui/component/addressbook-config.c
index 33e67c6a4e..6404edc86d 100644
--- a/addressbook/gui/component/addressbook-config.c
+++ b/addressbook/gui/component/addressbook-config.c
@@ -10,32 +10,34 @@
#include <config.h>
-#include "addressbook-config.h"
+#include <stdlib.h>
+#include <sys/time.h>
+
+#include <gtk/gtkcombo.h>
+#include <gtk/gtkdialog.h>
+#include <gtk/gtkmessagedialog.h>
+#include <libgnome/gnome-i18n.h>
+#include <libgnomeui/gnome-dialog.h>
+#include <libgnomeui/gnome-druid.h>
+#include <libgnomeui/gnome-druid-page.h>
+
+#include <bonobo/bonobo-generic-factory.h>
+
+#include <glade/glade.h>
#include "addressbook.h"
+#include "addressbook-config.h"
#include "addressbook-storage.h"
#include "evolution-config-control.h"
#include <shell/e-folder-list.h>
+#include <e-util/e-html-utils.h>
+
#include <gal/widgets/e-unicode.h>
#include <gal/e-table/e-table-memory-store.h>
#include <gal/e-table/e-table-scrolled.h>
-#include <e-util/e-html-utils.h>
-
-#include <gtkhtml/gtkhtml.h>
-
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-stock.h>
-#include <bonobo/bonobo-generic-factory.h>
-
-#include <glade/glade.h>
-
-#include <stdlib.h>
-#include <sys/time.h>
#ifdef HAVE_LDAP
#include "ldap.h"
@@ -97,8 +99,11 @@ add_focus_handler (GtkWidget *widget, GtkWidget *notebook, int page_num)
FALSE, FALSE);
}
+typedef struct _AddressbookDialog AddressbookDialog;
+typedef struct _AddressbookSourceDialog AddressbookSourceDialog;
+typedef void (*ModifyFunc)(GtkWidget *item, AddressbookSourceDialog *dialog);
-typedef struct {
+struct _AddressbookDialog {
EvolutionConfigControl *config_control;
GtkWidget *page;
@@ -111,9 +116,10 @@ typedef struct {
GtkWidget *editSource;
GtkWidget *deleteSource;
-} AddressbookDialog;
+};
-typedef struct {
+
+struct _AddressbookSourceDialog {
AddressbookDialog *addressbook_dialog;
GladeXML *gui;
@@ -121,7 +127,7 @@ typedef struct {
GtkWidget *druid; /* only used (obviously) in the druid */
/* info page fields */
- GtkSignalFunc general_modify_func;
+ ModifyFunc general_modify_func;
GtkWidget *host;
GtkWidget *auth_optionmenu;
AddressbookLDAPAuthType auth;
@@ -131,13 +137,13 @@ typedef struct {
GtkWidget *binddn;
/* connecting page fields */
- GtkSignalFunc connecting_modify_func;
+ ModifyFunc connecting_modify_func;
GtkWidget *port_combo;
GtkWidget *ssl_optionmenu;
AddressbookLDAPSSLType ssl;
/* searching page fields */
- GtkSignalFunc searching_modify_func;
+ ModifyFunc searching_modify_func;
GtkWidget *rootdn;
AddressbookLDAPScopeType scope;
GtkWidget *scope_optionmenu;
@@ -156,7 +162,7 @@ typedef struct {
GPtrArray *evolution_objectclasses; /* the objectclasses evolution will use */
GPtrArray *default_objectclasses; /* the objectclasses we default to (actually the
intersection between defaults and server_objectclasses) */
- GtkSignalFunc objectclasses_modify_func;
+ ModifyFunc objectclasses_modify_func;
GtkWidget *objectclasses_server_table;
ETableModel *objectclasses_server_model;
GtkWidget *objectclasses_evolution_table;
@@ -183,7 +189,7 @@ typedef struct {
gboolean advanced;
-} AddressbookSourceDialog;
+};
/* ldap api foo */
@@ -194,8 +200,14 @@ addressbook_ldap_init (GtkWidget *window, AddressbookSource *source)
if (!ldap) {
GtkWidget *dialog;
- dialog = gnome_error_dialog_parented (_("Failed to connect to LDAP server"), GTK_WINDOW(window));
- gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
+ dialog = gtk_message_dialog_new (GTK_WINDOW(window),
+ GTK_DIALOG_MODAL,
+ GTK_MESSAGE_ERROR,
+ GTK_BUTTONS_OK,
+ _("Failed to connect to LDAP server"));
+
+ gtk_widget_show (dialog);
+
return NULL;
}
@@ -213,8 +225,12 @@ addressbook_ldap_auth (GtkWidget *window, AddressbookSource *source, LDAP *ldap)
ldap_error = ldap_simple_bind_s (ldap, NULL, NULL);
if (LDAP_SUCCESS != ldap_error) {
GtkWidget *dialog;
- dialog = gnome_error_dialog_parented (_("Failed to authenticate with LDAP server"), GTK_WINDOW (window));
- gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
+ dialog = gtk_message_dialog_new (GTK_WINDOW (window),
+ GTK_DIALOG_MODAL,
+ GTK_MESSAGE_ERROR,
+ GTK_BUTTONS_OK,
+ _("Failed to authenticate with LDAP server"));
+ gtk_widget_show (dialog);
}
return ldap_error;
@@ -236,8 +252,12 @@ addressbook_root_dse_query (GtkWindow *window, AddressbookSource *source, LDAP *
attrs, 0, NULL, NULL, &timeout, LDAP_NO_LIMIT, resp);
if (LDAP_SUCCESS != ldap_error) {
GtkWidget *dialog;
- dialog = gnome_error_dialog_parented (_("Could not perform query on Root DSE"), window);
- gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
+ dialog = gtk_message_dialog_new (window,
+ GTK_DIALOG_MODAL,
+ GTK_MESSAGE_ERROR,
+ GTK_BUTTONS_OK,
+ _("Could not perform query on Root DSE"));
+ gtk_widget_show (dialog);
}
return ldap_error;
@@ -403,7 +423,7 @@ add_auth_activate_cb (GtkWidget *item, AddressbookSourceDialog *dialog)
}
static void
-setup_general_tab (AddressbookSourceDialog *dialog, GtkSignalFunc modify_func)
+setup_general_tab (AddressbookSourceDialog *dialog, ModifyFunc modify_func)
{
GtkWidget *general_tab_help;
GtkWidget *menu;
@@ -412,19 +432,19 @@ setup_general_tab (AddressbookSourceDialog *dialog, GtkSignalFunc modify_func)
dialog->general_modify_func = modify_func;
dialog->host = glade_xml_get_widget (dialog->gui, "server-name-entry");
- gtk_signal_connect (GTK_OBJECT (dialog->host), "changed",
- modify_func, dialog);
+ g_signal_connect (dialog->host, "changed",
+ G_CALLBACK (modify_func), dialog);
add_focus_handler (dialog->host, general_tab_help, 0);
dialog->auth_label_notebook = glade_xml_get_widget (dialog->gui, "auth-label-notebook");
dialog->auth_entry_notebook = glade_xml_get_widget (dialog->gui, "auth-entry-notebook");
dialog->email = glade_xml_get_widget (dialog->gui, "email-entry");
- gtk_signal_connect (GTK_OBJECT (dialog->email), "changed",
- modify_func, dialog);
+ g_signal_connect (dialog->email, "changed",
+ G_CALLBACK (modify_func), dialog);
add_focus_handler (dialog->email, general_tab_help, 1);
dialog->binddn = glade_xml_get_widget (dialog->gui, "dn-entry");
- gtk_signal_connect (GTK_OBJECT (dialog->binddn), "changed",
- modify_func, dialog);
+ g_signal_connect (dialog->binddn, "changed",
+ G_CALLBACK (modify_func), dialog);
add_focus_handler (dialog->binddn, general_tab_help, 2);
dialog->auth_optionmenu = glade_xml_get_widget (dialog->gui, "auth-optionmenu");
@@ -466,7 +486,8 @@ druid_info_page_modify_cb (GtkWidget *item, AddressbookSourceDialog *dialog)
gnome_druid_set_buttons_sensitive (GNOME_DRUID(dialog->druid),
TRUE, /* back */
general_tab_check (dialog), /* next */
- TRUE /* cancel */);
+ TRUE, /* cancel */
+ FALSE /* help */);
}
static void
@@ -534,7 +555,7 @@ port_changed_func (GtkWidget *item, AddressbookSourceDialog *dialog)
}
static void
-setup_connecting_tab (AddressbookSourceDialog *dialog, GtkSignalFunc modify_func)
+setup_connecting_tab (AddressbookSourceDialog *dialog, ModifyFunc modify_func)
{
GtkWidget *menu;
GtkWidget *connecting_tab_help;
@@ -546,10 +567,10 @@ setup_connecting_tab (AddressbookSourceDialog *dialog, GtkSignalFunc modify_func
dialog->port_combo = glade_xml_get_widget (dialog->gui, "port-combo");
add_focus_handler (dialog->port_combo, connecting_tab_help, 0);
add_focus_handler (GTK_COMBO(dialog->port_combo)->entry, connecting_tab_help, 0);
- gtk_signal_connect (GTK_OBJECT (GTK_COMBO(dialog->port_combo)->entry), "changed",
- modify_func, dialog);
- gtk_signal_connect (GTK_OBJECT (GTK_COMBO(dialog->port_combo)->entry), "changed",
- port_changed_func, dialog);
+ g_signal_connect (GTK_COMBO(dialog->port_combo)->entry, "changed",
+ G_CALLBACK (modify_func), dialog);
+ g_signal_connect (GTK_COMBO(dialog->port_combo)->entry, "changed",
+ G_CALLBACK (port_changed_func), dialog);
dialog->ssl_optionmenu = glade_xml_get_widget (dialog->gui, "ssl-optionmenu");
menu = gtk_option_menu_get_menu (GTK_OPTION_MENU(dialog->ssl_optionmenu));
gtk_container_foreach (GTK_CONTAINER (menu), (GtkCallback)add_ssl_activate_cb, dialog);
@@ -575,7 +596,8 @@ druid_connecting_page_modify_cb (GtkWidget *item, AddressbookSourceDialog *dialo
gnome_druid_set_buttons_sensitive (GNOME_DRUID(dialog->druid),
TRUE, /* back */
connecting_tab_check (dialog), /* next */
- TRUE /* cancel */);
+ TRUE, /* cancel */
+ FALSE /* help */);
}
static void
@@ -645,8 +667,12 @@ do_ldap_root_dse_query (GtkWidget *dialog, ETableModel *model, AddressbookSource
values = ldap_get_values (ldap, resp, "namingContexts");
if (!values || values[0] == NULL) {
GtkWidget *error_dialog;
- error_dialog = gnome_ok_dialog_parented (_("The server responded with no supported search bases"), GTK_WINDOW (dialog));
- gtk_window_set_modal (GTK_WINDOW (error_dialog), TRUE);
+ error_dialog = gtk_message_dialog_new (GTK_WINDOW (dialog),
+ GTK_DIALOG_MODAL,
+ GTK_MESSAGE_ERROR,
+ GTK_BUTTONS_OK,
+ _("The server responded with no supported search bases"));
+ gtk_widget_show (error_dialog);
goto fail;
}
@@ -688,8 +714,8 @@ query_for_supported_bases (GtkWidget *button, AddressbookSourceDialog *sdialog)
selection_model = e_table_get_selection_model (e_table_scrolled_get_table (E_TABLE_SCROLLED(supported_bases_table)));
model = gtk_object_get_data (GTK_OBJECT (supported_bases_table), "model");
- gtk_signal_connect (GTK_OBJECT (selection_model), "selection_changed",
- search_base_selection_model_changed, dialog);
+ g_signal_connect (selection_model, "selection_changed",
+ G_CALLBACK (search_base_selection_model_changed), dialog);
search_base_selection_model_changed (selection_model, dialog);
@@ -737,7 +763,7 @@ add_scope_activate_cb (GtkWidget *item, AddressbookSourceDialog *dialog)
}
static void
-setup_searching_tab (AddressbookSourceDialog *dialog, GtkSignalFunc modify_func)
+setup_searching_tab (AddressbookSourceDialog *dialog, ModifyFunc modify_func)
{
GtkWidget *menu;
GtkWidget *rootdn_button;
@@ -750,8 +776,8 @@ setup_searching_tab (AddressbookSourceDialog *dialog, GtkSignalFunc modify_func)
dialog->rootdn = glade_xml_get_widget (dialog->gui, "rootdn-entry");
add_focus_handler (dialog->rootdn, searching_tab_help, 0);
if (modify_func)
- gtk_signal_connect (GTK_OBJECT (dialog->rootdn), "changed",
- modify_func, dialog);
+ g_signal_connect (dialog->rootdn, "changed",
+ G_CALLBACK (modify_func), dialog);
dialog->scope_optionmenu = glade_xml_get_widget (dialog->gui, "scope-optionmenu");
add_focus_handler (dialog->scope_optionmenu, searching_tab_help, 1);
@@ -761,19 +787,19 @@ setup_searching_tab (AddressbookSourceDialog *dialog, GtkSignalFunc modify_func)
dialog->timeout_scale = glade_xml_get_widget (dialog->gui, "timeout-scale");
add_focus_handler (dialog->timeout_scale, searching_tab_help, 2);
if (modify_func)
- gtk_signal_connect (GTK_OBJECT (GTK_RANGE(dialog->timeout_scale)->adjustment),
- "value_changed",
- modify_func, dialog);
+ g_signal_connect (GTK_RANGE(dialog->timeout_scale)->adjustment,
+ "value_changed",
+ G_CALLBACK (modify_func), dialog);
dialog->limit_spinbutton = glade_xml_get_widget (dialog->gui, "download-limit-spinbutton");
if (modify_func)
- gtk_signal_connect (GTK_OBJECT (dialog->limit_spinbutton), "changed",
- modify_func, dialog);
+ g_signal_connect (dialog->limit_spinbutton, "changed",
+ G_CALLBACK (modify_func), dialog);
/* special handling for the "Show Supported Bases button" */
rootdn_button = glade_xml_get_widget (dialog->gui, "rootdn-button");
- gtk_signal_connect (GTK_OBJECT (rootdn_button), "clicked",
- GTK_SIGNAL_FUNC(query_for_supported_bases), dialog);
+ g_signal_connect (rootdn_button, "clicked",
+ G_CALLBACK(query_for_supported_bases), dialog);
}
static void
@@ -782,7 +808,8 @@ druid_searching_page_prepare (GnomeDruidPage *dpage, GtkWidget *gdruid, Addressb
gnome_druid_set_buttons_sensitive (GNOME_DRUID(dialog->druid),
TRUE, /* back */
TRUE, /* next */
- TRUE /* cancel */);
+ TRUE, /* cancel */
+ FALSE /* help */);
}
@@ -813,7 +840,8 @@ display_name_page_prepare (GtkWidget *page, GtkWidget *gnome_druid, AddressbookS
gnome_druid_set_buttons_sensitive (GNOME_DRUID(dialog->druid),
TRUE, /* back */
display_name_check (dialog), /* next */
- TRUE /* cancel */);
+ TRUE, /* cancel */
+ FALSE /* help */);
}
static void
@@ -1020,7 +1048,7 @@ addressbook_add_server_druid (AddressbookDialog *dialog)
sdialog->addressbook_dialog = dialog;
- sdialog->gui = glade_xml_new (EVOLUTION_GLADEDIR "/" GLADE_FILE_NAME, NULL);
+ sdialog->gui = glade_xml_new (EVOLUTION_GLADEDIR "/" GLADE_FILE_NAME, NULL, NULL);
sdialog->window = glade_xml_get_widget (sdialog->gui, "account-druid-window");
sdialog->druid = glade_xml_get_widget (sdialog->gui, "account-druid");
@@ -1028,39 +1056,39 @@ addressbook_add_server_druid (AddressbookDialog *dialog)
/* info page */
page = glade_xml_get_widget (sdialog->gui, "add-server-druid-info-page");
reparent_to_vbox (sdialog, "account-druid-general-vbox", "general-tab");
- setup_general_tab (sdialog, GTK_SIGNAL_FUNC (druid_info_page_modify_cb));
- gtk_signal_connect (GTK_OBJECT(page), "prepare",
- GTK_SIGNAL_FUNC(druid_info_page_prepare), sdialog);
+ setup_general_tab (sdialog, druid_info_page_modify_cb);
+ g_signal_connect (page, "prepare",
+ G_CALLBACK(druid_info_page_prepare), sdialog);
/* connecting page */
page = glade_xml_get_widget (sdialog->gui, "add-server-druid-connecting-page");
reparent_to_vbox (sdialog, "account-druid-connecting-vbox", "connecting-tab");
setup_connecting_tab (sdialog, druid_connecting_page_modify_cb);
- gtk_signal_connect (GTK_OBJECT(page), "prepare",
- GTK_SIGNAL_FUNC(druid_connecting_page_prepare), sdialog);
+ g_signal_connect (page, "prepare",
+ G_CALLBACK(druid_connecting_page_prepare), sdialog);
/* searching page */
page = glade_xml_get_widget (sdialog->gui, "add-server-druid-searching-page");
reparent_to_vbox (sdialog, "account-druid-searching-vbox", "searching-tab");
setup_searching_tab (sdialog, NULL);
- gtk_signal_connect (GTK_OBJECT(page), "prepare",
- GTK_SIGNAL_FUNC(druid_searching_page_prepare), sdialog);
+ g_signal_connect (page, "prepare",
+ G_CALLBACK(druid_searching_page_prepare), sdialog);
/* display name page */
page = glade_xml_get_widget (sdialog->gui, "add-server-druid-display-name-page");
sdialog->display_name = glade_xml_get_widget (sdialog->gui, "druid-display-name-entry");
- gtk_signal_connect (GTK_OBJECT (sdialog->display_name), "changed",
- druid_display_name_page_modify_cb, sdialog);
- gtk_signal_connect (GTK_OBJECT(page), "prepare",
- GTK_SIGNAL_FUNC(display_name_page_prepare), sdialog);
+ g_signal_connect (sdialog->display_name, "changed",
+ G_CALLBACK(druid_display_name_page_modify_cb), sdialog);
+ g_signal_connect (page, "prepare",
+ G_CALLBACK(display_name_page_prepare), sdialog);
page = glade_xml_get_widget (sdialog->gui, "add-server-druid-finish-page");
- gtk_signal_connect (GTK_OBJECT(page), "finish",
- GTK_SIGNAL_FUNC(addressbook_add_server_druid_finish), sdialog);
- gtk_signal_connect (GTK_OBJECT(sdialog->druid), "cancel",
- GTK_SIGNAL_FUNC(addressbook_add_server_druid_cancel), sdialog);
- gtk_signal_connect (GTK_OBJECT(sdialog->window), "destroy",
- GTK_SIGNAL_FUNC(addressbook_source_dialog_destroy), sdialog);
+ g_signal_connect (page, "finish",
+ G_CALLBACK(addressbook_add_server_druid_finish), sdialog);
+ g_signal_connect (sdialog->druid, "cancel",
+ G_CALLBACK(addressbook_add_server_druid_cancel), sdialog);
+ g_signal_connect (sdialog->window, "destroy",
+ G_CALLBACK(addressbook_source_dialog_destroy), sdialog);
/* make sure we fill in the default values */
addressbook_source_dialog_set_source (sdialog, NULL);
@@ -1310,31 +1338,31 @@ addressbook_edit_server_dialog (AddressbookDialog *dialog, int model_row)
sdialog->addressbook_dialog = dialog;
sdialog->source_model_row = model_row;
- sdialog->gui = glade_xml_new (EVOLUTION_GLADEDIR "/" GLADE_FILE_NAME, NULL);
+ sdialog->gui = glade_xml_new (EVOLUTION_GLADEDIR "/" GLADE_FILE_NAME, NULL, NULL);
sdialog->window = glade_xml_get_widget (sdialog->gui, "account-editor-window");
/* general tab */
general_tab_help = glade_xml_get_widget (dialog->gui, "general-tab-help");
reparent_to_vbox (sdialog, "account-editor-general-vbox", "general-tab");
- setup_general_tab (sdialog, GTK_SIGNAL_FUNC (editor_modify_cb));
+ setup_general_tab (sdialog, editor_modify_cb);
sdialog->display_name = glade_xml_get_widget (sdialog->gui, "account-editor-display-name-entry");
- gtk_signal_connect (GTK_OBJECT (sdialog->display_name), "changed",
- editor_modify_cb, sdialog);
+ g_signal_connect (sdialog->display_name, "changed",
+ G_CALLBACK (editor_modify_cb), sdialog);
add_focus_handler (sdialog->display_name, general_tab_help, 4);
/* connecting tab */
reparent_to_vbox (sdialog, "account-editor-connecting-vbox", "connecting-tab");
- setup_connecting_tab (sdialog, GTK_SIGNAL_FUNC (editor_modify_cb));
+ setup_connecting_tab (sdialog, editor_modify_cb);
/* searching tab */
reparent_to_vbox (sdialog, "account-editor-searching-vbox", "searching-tab");
- setup_searching_tab (sdialog, GTK_SIGNAL_FUNC (editor_modify_cb));
+ setup_searching_tab (sdialog, editor_modify_cb);
#ifdef NEW_ADVANCED_UI
/* objectclasses tab */
reparent_to_vbox (sdialog, "account-editor-objectclasses-vbox", "objectclasses-tab");
- setup_objectclasses_tab (sdialog, GTK_SIGNAL_FUNC (editor_modify_cb));
+ setup_objectclasses_tab (sdialog, editor_modify_cb);
/* mappings tab */
reparent_to_vbox (sdialog, "account-editor-mappings-vbox", "mappings-tab");
@@ -1539,7 +1567,7 @@ ldap_dialog_new (GNOME_Evolution_Shell shell)
dialog = g_new0 (AddressbookDialog, 1);
- dialog->gui = glade_xml_new (EVOLUTION_GLADEDIR "/" GLADE_FILE_NAME, NULL);
+ dialog->gui = glade_xml_new (EVOLUTION_GLADEDIR "/" GLADE_FILE_NAME, NULL, NULL);
dialog->shell = shell;
dialog->sourcesTable = glade_xml_get_widget (dialog->gui, "sourcesTable");
@@ -1677,9 +1705,9 @@ addressbook_config_register_factory (GNOME_Evolution_Shell shell)
{
g_return_val_if_fail (shell != CORBA_OBJECT_NIL, FALSE);
- factory = bonobo_generic_factory_new_multi (CONFIG_CONTROL_FACTORY_ID,
- config_control_factory_fn,
- shell);
+ factory = bonobo_generic_factory_new (CONFIG_CONTROL_FACTORY_ID,
+ config_control_factory_fn,
+ shell);
if (factory != NULL) {
return TRUE;
diff --git a/addressbook/gui/component/addressbook-factory.c b/addressbook/gui/component/addressbook-factory.c
index 6f675894e0..3e6f4e4598 100644
--- a/addressbook/gui/component/addressbook-factory.c
+++ b/addressbook/gui/component/addressbook-factory.c
@@ -10,22 +10,14 @@
#include <config.h>
#include <glib.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-init.h>
-#include <liboaf/liboaf.h>
+#include <libgnomeui/gnome-ui-init.h>
#include <bonobo/bonobo-main.h>
-#include <libgnomevfs/gnome-vfs-init.h>
#include <glade/glade.h>
#include <gal/widgets/e-cursors.h>
#include <e-util/e-passwords.h>
#include <camel/camel.h>
-#ifdef GTKHTML_HAVE_GCONF
-#include <gconf/gconf.h>
-#endif
-
#include "addressbook.h"
#include "addressbook-component.h"
#include "e-address-widget.h"
@@ -33,29 +25,6 @@
#include "addressbook/gui/widgets/e-minicard-control.h"
#include "select-names/e-select-names-factory.h"
-
-static void
-init_corba (int *argc, char **argv)
-{
- gnome_init_with_popt_table ("evolution-addressbook", "0.0",
- *argc, argv, oaf_popt_options, 0, NULL);
-
- oaf_init (*argc, argv);
-}
-
-static void
-init_bonobo (int argc, char **argv)
-{
- if (bonobo_init (CORBA_OBJECT_NIL, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL) == FALSE)
- g_error (_("Could not initialize Bonobo"));
-
-#ifdef GTKHTML_HAVE_GCONF
- gconf_init (argc, argv, NULL);
-#endif
-
- glade_gnome_init ();
-}
-
int
main (int argc, char **argv)
{
@@ -63,13 +32,11 @@ main (int argc, char **argv)
textdomain (PACKAGE);
free (malloc (5));
-
- init_corba (&argc, argv);
- init_bonobo (argc, argv);
-
- if (!gnome_vfs_init ())
- g_error (_("Could not initialize gnome-vfs"));
+ gnome_program_init ("evolution-addressbook", VERSION,
+ LIBGNOMEUI_MODULE, argc, argv,
+ GNOME_PROGRAM_STANDARD_PROPERTIES,
+ NULL);
/* FIXME: Messy names here. This file should be `main.c'. `addressbook.c' should
be `addressbook-control-factory.c' and the functions should be called
@@ -86,16 +53,21 @@ main (int argc, char **argv)
e_address_widget_factory_init ();
e_address_popup_factory_init ();
+ glade_gnome_init ();
e_cursors_init();
+#ifdef PENDING_PORT_WORK
e_passwords_init("Addressbook");
+#endif
#if 0
g_log_set_always_fatal (G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING);
#endif
/*g_thread_init (NULL);*/
+#ifdef PENDING_PORT_WORK
camel_type_init ();
+#endif
gtk_widget_push_visual (gdk_rgb_get_visual ());
gtk_widget_push_colormap (gdk_rgb_get_cmap ());
diff --git a/addressbook/gui/component/addressbook-storage.c b/addressbook/gui/component/addressbook-storage.c
index dcff420a63..657762edca 100644
--- a/addressbook/gui/component/addressbook-storage.c
+++ b/addressbook/gui/component/addressbook-storage.c
@@ -53,12 +53,10 @@
#include <gnome-xml/parser.h>
#include <gnome-xml/xmlmemory.h>
-#include <libgnome/gnome-defs.h>
#include <libgnome/gnome-i18n.h>
#include <libgnome/gnome-util.h>
#include <bonobo/bonobo-object.h>
-#include <gal/util/e-unicode-i18n.h>
#include <gal/util/e-util.h>
#include <gal/util/e-xml-utils.h>
#include <libgnome/gnome-i18n.h>
@@ -165,7 +163,7 @@ addressbook_get_other_contact_storage (void)
EvolutionStorageResult result;
if (storage == NULL) {
- storage = evolution_storage_new (U_("Other Contacts"), FALSE);
+ storage = evolution_storage_new (_("Other Contacts"), FALSE);
gtk_signal_connect (GTK_OBJECT (storage),
"remove_folder",
GTK_SIGNAL_FUNC(remove_ldap_folder), NULL);
diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c
index 23997a9984..a13fed5c6d 100644
--- a/addressbook/gui/component/addressbook.c
+++ b/addressbook/gui/component/addressbook.c
@@ -10,15 +10,16 @@
#include <config.h>
+#include <string.h>
#include <glib.h>
-#include <libgnome/gnome-defs.h>
#include <libgnome/gnome-i18n.h>
#include <libgnomeui/gnome-app.h>
-#include <libgnomeui/gnome-stock.h>
#include <libgnomeui/gnome-uidefs.h>
+#include <libgnomeui/gnome-dialog.h>
#include <bonobo/bonobo-generic-factory.h>
#include <bonobo/bonobo-ui-util.h>
#include <bonobo/bonobo-exception.h>
+#include <bonobo/bonobo-property-bag.h>
#include <gal/util/e-util.h>
#include <gal/widgets/e-unicode.h>
@@ -94,10 +95,12 @@ view_contact_cb (BonoboUIComponent *uih, void *user_data, const char *path)
static void
search_cb (BonoboUIComponent *uih, void *user_data, const char *path)
{
+#ifdef PENDING_PORT_WORK
AddressbookView *view = (AddressbookView *) user_data;
if (view->view)
gtk_widget_show(e_addressbook_search_dialog_new(view->view));
+#endif
}
static void
@@ -201,7 +204,9 @@ move_contact_to_cb (BonoboUIComponent *uih, void *user_data, const char *path)
static void
forget_passwords_cb (BonoboUIComponent *uih, void *user_data, const char *path)
{
+#ifdef PENDING_PORT_WORK
e_passwords_forget_passwords();
+#endif
}
static void
@@ -345,8 +350,8 @@ control_activate (BonoboControl *control,
{
Bonobo_UIContainer remote_ui_container;
- remote_ui_container = bonobo_control_get_remote_ui_container (control);
- bonobo_ui_component_set_container (uic, remote_ui_container);
+ remote_ui_container = bonobo_control_get_remote_ui_container (control, NULL);
+ bonobo_ui_component_set_container (uic, remote_ui_container, NULL);
bonobo_object_release_unref (remote_ui_container, NULL);
e_search_bar_set_ui_component (view->search, uic);
@@ -358,7 +363,7 @@ control_activate (BonoboControl *control,
bonobo_ui_util_set_ui (uic, EVOLUTION_DATADIR,
"evolution-addressbook.xml",
- "evolution-addressbook");
+ "evolution-addressbook", NULL);
e_addressbook_view_setup_menus (view->view, uic);
@@ -386,7 +391,7 @@ control_activate_cb (BonoboControl *control,
e_addressbook_model_force_folder_bar_message (view->view->model);
} else {
- bonobo_ui_component_unset_container (uic);
+ bonobo_ui_component_unset_container (uic, NULL);
e_addressbook_view_discard_menus (view->view);
}
}
@@ -412,9 +417,11 @@ static ECategoriesMasterList *
get_master_list (void)
{
static ECategoriesMasterList *category_list = NULL;
+#ifdef PENDING_PORT_WORK
if (category_list == NULL)
category_list = e_categories_master_list_wombat_new ();
+#endif
return category_list;
}
@@ -586,7 +593,9 @@ load_uri_auth_cb (EBook *book, EBookStatus status, gpointer closure)
return;
}
else {
+#ifdef PENDING_PORT_WORK
e_passwords_forget_password (data->clean_uri);
+#endif
addressbook_authenticate (book, TRUE, data->source, load_uri_auth_cb, closure);
return;
}
@@ -603,7 +612,7 @@ addressbook_authenticate (EBook *book, gboolean previous_failure, AddressbookSou
EBookCallback cb, gpointer closure)
{
LoadUriData *load_uri_data = closure;
- const char *password;
+ const char *password = NULL;
char *pass_dup = NULL;
char *semicolon;
@@ -614,7 +623,9 @@ addressbook_authenticate (EBook *book, gboolean previous_failure, AddressbookSou
if (semicolon)
*semicolon = '\0';
+#ifdef PENDING_PORT_WORK
password = e_passwords_get_password (load_uri_data->clean_uri);
+#endif
if (!password) {
char *prompt;
@@ -636,9 +647,11 @@ addressbook_authenticate (EBook *book, gboolean previous_failure, AddressbookSou
prompt = g_strdup_printf (_("%sEnter password for %s (user %s)"),
failed_auth, source->name, source->email_addr);
remember = source->remember_passwd;
+#ifdef PENDING_PORT_WORK
pass_dup = e_passwords_ask_password (prompt, load_uri_data->clean_uri, prompt, TRUE,
E_PASSWORDS_REMEMBER_FOREVER, &remember,
NULL);
+#endif
if (remember != source->remember_passwd) {
source->remember_passwd = remember;
addressbook_storage_write_sources ();
@@ -818,7 +831,9 @@ addressbook_search_activated (ESearchBar *esb, AddressbookView *view)
NULL);
if (search_type == ESB_ADVANCED) {
+#ifdef PENDING_PORT_WORK
gtk_widget_show(e_addressbook_search_dialog_new(view->view));
+#endif
}
else {
if ((search_word && strlen (search_word)) || search_type == ESB_CATEGORY) {
@@ -878,7 +893,9 @@ addressbook_query_changed (ESearchBar *esb, AddressbookView *view)
NULL);
if (search_type == ESB_ADVANCED) {
+#ifdef PENDING_PORT_WORK
gtk_widget_show(e_addressbook_search_dialog_new(view->view));
+#endif
}
}
@@ -895,7 +912,7 @@ retrieve_shell_view_interface_from_control (BonoboControl *control)
if (shell_view_interface)
return shell_view_interface;
- control_frame = bonobo_control_get_control_frame (control);
+ control_frame = bonobo_control_get_control_frame (control, NULL);
if (control_frame == NULL)
return CORBA_OBJECT_NIL;
@@ -931,7 +948,7 @@ set_status_message (EAddressbookView *eav, const char *message, AddressbookView
char *clientid = g_strdup_printf ("%p", view);
if (progress_icon[0] == NULL)
- progress_icon[0] = gdk_pixbuf_new_from_file (EVOLUTION_IMAGESDIR "/" EVOLUTION_CONTACTS_PROGRESS_IMAGE);
+ progress_icon[0] = gdk_pixbuf_new_from_file (EVOLUTION_IMAGESDIR "/" EVOLUTION_CONTACTS_PROGRESS_IMAGE, NULL);
view->activity = evolution_activity_client_new (addressbook_component_get_shell_client(), clientid,
progress_icon, message, TRUE, &display);
@@ -1132,7 +1149,8 @@ addressbook_factory_new_control (void)
BONOBO_ARG_STRING, NULL, _("The URI that the Folder Browser will display"), 0);
bonobo_control_set_properties (view->control,
- view->properties);
+ bonobo_object_corba_objref (BONOBO_OBJECT (view->properties)),
+ NULL);
gtk_signal_connect (GTK_OBJECT (view->view),
"status_message",
@@ -1161,14 +1179,16 @@ addressbook_factory_new_control (void)
view->uri = NULL;
- gtk_signal_connect (GTK_OBJECT (view->control), "activate",
- control_activate_cb, view);
+ g_signal_connect (view->control, "activate",
+ G_CALLBACK (control_activate_cb), view);
return view->control;
}
static BonoboObject *
-addressbook_factory (BonoboGenericFactory *Factory, void *closure)
+addressbook_factory (BonoboGenericFactory *Factory,
+ const char *component_id,
+ void *closure)
{
return BONOBO_OBJECT (addressbook_factory_new_control ());
}
diff --git a/addressbook/gui/component/addressbook.h b/addressbook/gui/component/addressbook.h
index 6fb82b710d..4caff70201 100644
--- a/addressbook/gui/component/addressbook.h
+++ b/addressbook/gui/component/addressbook.h
@@ -2,13 +2,11 @@
#define __ADDRESSBOOK_H__
#include <bonobo/bonobo-control.h>
-#include <bonobo-conf/bonobo-config-database.h>
+#include <e-util/e-config-listener.h>
#include <bonobo/bonobo-object.h>
#include <bonobo/bonobo-moniker-util.h>
#include <ebook/e-book.h>
-Bonobo_ConfigDatabase addressbook_config_database (CORBA_Environment *ev);
-
/* use this instead of e_book_load_uri everywhere where you want the
authentication to be handled for you. */
gboolean addressbook_load_uri (EBook *book, const char *uri, EBookCallback cb, gpointer closure);
diff --git a/addressbook/gui/component/e-address-popup.c b/addressbook/gui/component/e-address-popup.c
index 553ba642c8..a545d2762c 100644
--- a/addressbook/gui/component/e-address-popup.c
+++ b/addressbook/gui/component/e-address-popup.c
@@ -29,6 +29,7 @@
*/
#include <config.h>
+#include <string.h>
#include "addressbook.h"
#include "e-address-popup.h"
#include <bonobo/bonobo-control.h>
@@ -130,8 +131,8 @@ mini_wizard_new (void)
wiz->body = gtk_vbox_new (FALSE, 2);
wiz->vbox = gtk_vbox_new (FALSE, 2);
- wiz->ok_button = gnome_stock_button (GNOME_STOCK_BUTTON_OK);
- wiz->cancel_button = gnome_stock_button (GNOME_STOCK_BUTTON_CANCEL);
+ wiz->ok_button = gtk_button_new_from_stock (GTK_STOCK_OK);
+ wiz->cancel_button = gtk_button_new_from_stock (GTK_STOCK_CANCEL);
wiz->ok_cb = NULL;
wiz->cleanup_cb = NULL;
@@ -236,10 +237,10 @@ email_menu_add_option (EMailMenu *menu, const gchar *addr)
gtk_widget_show_all (menu_item);
gtk_menu_append (GTK_MENU (gtk_option_menu_get_menu (GTK_OPTION_MENU (menu->option_menu))), menu_item);
- gtk_signal_connect (GTK_OBJECT (menu_item),
- "activate",
- menu_activate_cb,
- menu);
+ g_signal_connect (menu_item,
+ "activate",
+ G_CALLBACK (menu_activate_cb),
+ menu);
}
static void
@@ -1247,7 +1248,7 @@ e_address_popup_factory_new_control (void)
BONOBO_ARG_BOOLEAN, NULL, NULL,
BONOBO_PROPERTY_READABLE);
- bonobo_control_set_properties (control, bag);
+ bonobo_control_set_properties (control, bonobo_object_corba_objref (BONOBO_OBJECT (bag)), NULL);
bonobo_object_unref (BONOBO_OBJECT (bag));
addy->es = bonobo_event_source_new ();
@@ -1258,7 +1259,9 @@ e_address_popup_factory_new_control (void)
}
static BonoboObject *
-e_address_popup_factory (BonoboGenericFactory *factory, gpointer user_data)
+e_address_popup_factory (BonoboGenericFactory *factory,
+ const char *component_id,
+ gpointer user_data)
{
return BONOBO_OBJECT (e_address_popup_factory_new_control ());
}
diff --git a/addressbook/gui/component/e-address-popup.h b/addressbook/gui/component/e-address-popup.h
index b648b79d4f..d2a390e400 100644
--- a/addressbook/gui/component/e-address-popup.h
+++ b/addressbook/gui/component/e-address-popup.h
@@ -28,12 +28,11 @@
#define __E_ADDRESS_POPUP_H__
#include <gtk/gtk.h>
-#include <libgnome/gnome-defs.h>
#include <addressbook/backend/ebook/e-book.h>
#include <addressbook/backend/ebook/e-card.h>
#include <bonobo/bonobo-event-source.h>
-BEGIN_GNOME_DECLS
+G_BEGIN_DECLS
#define E_ADDRESS_POPUP_TYPE (e_address_popup_get_type ())
#define E_ADDRESS_POPUP(o) (GTK_CHECK_CAST ((o), E_ADDRESS_POPUP_TYPE, EAddressPopup))
@@ -83,7 +82,7 @@ GtkWidget *e_address_popup_new (void);
void e_address_popup_factory_init (void);
-END_GNOME_DECLS
+G_END_DECLS
#endif /* __E_ADDRESS_POPUP_H__ */
diff --git a/addressbook/gui/component/e-address-widget.c b/addressbook/gui/component/e-address-widget.c
index d01999d34f..1a1786614f 100644
--- a/addressbook/gui/component/e-address-widget.c
+++ b/addressbook/gui/component/e-address-widget.c
@@ -26,6 +26,8 @@
#include <config.h>
#include <ctype.h>
+#include <gtk/gtklabel.h>
+#include <libgnomeui/gnome-popup-menu.h>
#include <bonobo/bonobo-control.h>
#include <bonobo/bonobo-property-bag.h>
#include <bonobo/bonobo-generic-factory.h>
@@ -441,7 +443,7 @@ e_address_widget_popup (EAddressWidget *addr, GdkEventButton *ev)
pop = addr->card ? popup_menu_card (addr) : popup_menu_nocard (addr);
if (pop)
- gnome_popup_menu_do_popup (pop, NULL, NULL, ev, addr);
+ gnome_popup_menu_do_popup (pop, NULL, NULL, ev, addr, GTK_WIDGET (addr));
}
/*
@@ -547,14 +549,16 @@ e_address_widget_factory_new_control (void)
BONOBO_ARG_INT, NULL, NULL,
BONOBO_PROPERTY_WRITEABLE);
- bonobo_control_set_properties (control, bag);
+ bonobo_control_set_properties (control, bonobo_object_corba_objref (BONOBO_OBJECT (bag)), NULL);
bonobo_object_unref (BONOBO_OBJECT (bag));
return control;
}
static BonoboObject *
-e_address_widget_factory (BonoboGenericFactory *factory, gpointer user_data)
+e_address_widget_factory (BonoboGenericFactory *factory,
+ const char *component_id,
+ gpointer user_data)
{
return BONOBO_OBJECT (e_address_widget_factory_new_control ());
}
diff --git a/addressbook/gui/component/e-address-widget.h b/addressbook/gui/component/e-address-widget.h
index 535e51028c..f189392288 100644
--- a/addressbook/gui/component/e-address-widget.h
+++ b/addressbook/gui/component/e-address-widget.h
@@ -31,12 +31,10 @@
#include <gtk/gtkhbox.h>
#include <gtk/gtkobject.h>
#include <gtk/gtkwidget.h>
-#include <libgnome/gnome-defs.h>
-#include <addressbook/backend/ebook/e-book.h>
#include <addressbook/backend/ebook/e-book-util.h>
#include <addressbook/backend/ebook/e-card.h>
-BEGIN_GNOME_DECLS
+G_BEGIN_DECLS
#define E_ADDRESS_WIDGET_TYPE (e_address_widget_get_type ())
#define E_ADDRESS_WIDGET(o) (GTK_CHECK_CAST ((o), E_ADDRESS_WIDGET_TYPE, EAddressWidget))
@@ -82,21 +80,6 @@ void e_address_widget_factory_init (void);
-END_GNOME_DECLS
+G_END_DECLS
#endif /* __E_ADDRESS_WIDGET_H__ */
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/addressbook/gui/component/e-cardlist-model.h b/addressbook/gui/component/e-cardlist-model.h
index 0b9a7a2265..dc2da509e0 100644
--- a/addressbook/gui/component/e-cardlist-model.h
+++ b/addressbook/gui/component/e-cardlist-model.h
@@ -2,16 +2,17 @@
#ifndef _E_CARDLIST_MODEL_H_
#define _E_CARDLIST_MODEL_H_
+#include <gtk/gtk.h>
#include <gal/e-table/e-table-model.h>
#include <ebook/e-book.h>
#include <ebook/e-book-view.h>
#include <ebook/e-card-simple.h>
-#define E_CARDLIST_MODEL_TYPE (e_cardlist_model_get_type ())
-#define E_CARDLIST_MODEL(o) (GTK_CHECK_CAST ((o), E_CARDLIST_MODEL_TYPE, ECardlistModel))
-#define E_CARDLIST_MODEL_CLASS(k) (GTK_CHECK_CLASS_CAST((k), E_CARDLIST_MODEL_TYPE, ECardlistModelClass))
-#define E_IS_CARDLIST_MODEL(o) (GTK_CHECK_TYPE ((o), E_CARDLIST_MODEL_TYPE))
-#define E_IS_CARDLIST_MODEL_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_CARDLIST_MODEL_TYPE))
+#define E_TYPE_CARDLIST_MODEL (e_cardlist_model_get_type ())
+#define E_CARDLIST_MODEL(o) (GTK_CHECK_CAST ((o), E_TYPE_CARDLIST_MODEL, ECardlistModel))
+#define E_CARDLIST_MODEL_CLASS(k) (GTK_CHECK_CLASS_CAST((k), E_TYPE_CARDLIST_MODEL, ECardlistModelClass))
+#define E_IS_CARDLIST_MODEL(o) (GTK_CHECK_TYPE ((o), E_TYPE_CARDLIST_MODEL))
+#define E_IS_CARDLIST_MODEL_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_TYPE_CARDLIST_MODEL))
typedef struct {
ETableModel parent;