aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/component
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2002-11-06 18:48:35 +0800
committerChris Toshok <toshok@src.gnome.org>2002-11-06 18:48:35 +0800
commit01044271e5c892367d6b51680ca63cec154d42f9 (patch)
treef1d0656578d88c2fd9c5a0f0fa1f2876a56ca784 /addressbook/gui/component
parentc3223fe1a09692bd2f2a4b4d37dafafd97a7bf32 (diff)
downloadgsoc2013-evolution-01044271e5c892367d6b51680ca63cec154d42f9.tar.gz
gsoc2013-evolution-01044271e5c892367d6b51680ca63cec154d42f9.tar.zst
gsoc2013-evolution-01044271e5c892367d6b51680ca63cec154d42f9.zip
fix the gnome-xml headers.
2002-11-06 Chris Toshok <toshok@ximian.com> * gui/widgets/gal-view-minicard.c: fix the gnome-xml headers. * gui/widgets/e-addressbook-view.c (e_addressbook_view_class_init): convert from gtk signals and args to GSignal and GObject properties. (e_addressbook_view_dispose): rename _destroy to this. (e_addressbook_view_set_property): rework _set_arg to this. (e_addressbook_view_get_property): rework _get_arg to this. (display_view): if we're here we need to choose a view, regardless of whether or not the GAL_IS_VIEW_* macros tell us which type it is. * gui/widgets/e-addressbook-table-adapter.c: fix the gnome-xml headers. * gui/widgets/e-addressbook-model.c (e_addressbook_model_class_init): use INT, not ENUM in the signal here. * gui/component/addressbook-config.c: another big gtk_* -> g_* renaming. * gui/component/addressbook.c: same. * gui/component/e-address-popup.c: same. * gui/component/e-address-widget.c: same. * gui/component/e-cardlist-model.c: fix the gnome-xml headers, and more gtk_* -> g_* renaming. * gui/component/addressbook-component.c (owner_set_cb): use evolution_shell_client_corba_objref as per ettore's change to EvolutionShellClient.. (create_view): fix the call to bonobo_control_set_property. (create_component): gtk_signal_connect -> g_signal_connect. * gui/component/addressbook-storage.c: fix the gnome-xml headers. (addressbook_storage_setup): use evolution_shell_client_corba_objref as per ettore's change to EvolutionShellClient.. (addressbook_get_other_contact_storage): gtk_signal_connect -> g_signal_connect. (load_source_data): root->childs -> root->childrens. svn path=/trunk/; revision=18598
Diffstat (limited to 'addressbook/gui/component')
-rw-r--r--addressbook/gui/component/addressbook-component.c16
-rw-r--r--addressbook/gui/component/addressbook-config.c132
-rw-r--r--addressbook/gui/component/addressbook-storage.c20
-rw-r--r--addressbook/gui/component/addressbook.c124
-rw-r--r--addressbook/gui/component/e-address-popup.c96
-rw-r--r--addressbook/gui/component/e-address-widget.c8
-rw-r--r--addressbook/gui/component/e-cardlist-model.c26
7 files changed, 212 insertions, 210 deletions
diff --git a/addressbook/gui/component/addressbook-component.c b/addressbook/gui/component/addressbook-component.c
index 77b386ce77..63e4172414 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, NULL, "folder_uri", physical_uri);
+ bonobo_control_set_property (control, NULL, "folder_uri", TC_CORBA_string, physical_uri, NULL);
*control_return = control;
@@ -372,7 +372,7 @@ owner_set_cb (EvolutionShellComponent *shell_component,
if (global_shell_client == NULL)
global_shell_client = shell_client;
- addressbook_config_register_factory (bonobo_object_corba_objref (BONOBO_OBJECT (shell_client)));
+ addressbook_config_register_factory (evolution_shell_client_corba_objref (shell_client));
addressbook_storage_setup (shell_component, evolution_homedir);
}
@@ -572,12 +572,12 @@ create_component (void)
_("Create a new contact list"), 'l',
"contact-list-16.png");
- gtk_signal_connect (GTK_OBJECT (shell_component), "owner_set",
- GTK_SIGNAL_FUNC (owner_set_cb), NULL);
- gtk_signal_connect (GTK_OBJECT (shell_component), "owner_unset",
- GTK_SIGNAL_FUNC (owner_unset_cb), NULL);
- gtk_signal_connect (GTK_OBJECT (shell_component), "user_create_new_item",
- GTK_SIGNAL_FUNC (user_create_new_item_cb), NULL);
+ g_signal_connect (shell_component, "owner_set",
+ G_CALLBACK (owner_set_cb), NULL);
+ g_signal_connect (shell_component, "owner_unset",
+ G_CALLBACK (owner_unset_cb), NULL);
+ g_signal_connect (shell_component, "user_create_new_item",
+ G_CALLBACK (user_create_new_item_cb), NULL);
return BONOBO_OBJECT (shell_component);
}
diff --git a/addressbook/gui/component/addressbook-config.c b/addressbook/gui/component/addressbook-config.c
index 6404edc86d..39a716f358 100644
--- a/addressbook/gui/component/addressbook-config.c
+++ b/addressbook/gui/component/addressbook-config.c
@@ -320,7 +320,7 @@ static void
addressbook_source_dialog_destroy (GtkWidget *widget, AddressbookSourceDialog *dialog)
{
#ifdef NEW_ADVANCED_UI
-#define IF_UNREF(x) if (x) gtk_object_unref (GTK_OBJECT ((x)))
+#define IF_UNREF(x) if (x) g_object_unref ((x))
int i;
@@ -418,8 +418,8 @@ auth_optionmenu_activated (GtkWidget *item, AddressbookSourceDialog *dialog)
static void
add_auth_activate_cb (GtkWidget *item, AddressbookSourceDialog *dialog)
{
- gtk_signal_connect (GTK_OBJECT (item), "activate",
- GTK_SIGNAL_FUNC (auth_optionmenu_activated), dialog);
+ g_signal_connect (item, "activate",
+ G_CALLBACK (auth_optionmenu_activated), dialog);
}
static void
@@ -524,10 +524,10 @@ ssl_optionmenu_selected (GtkWidget *item, AddressbookSourceDialog *dialog)
static void
add_ssl_activate_cb (GtkWidget *item, AddressbookSourceDialog *dialog)
{
- gtk_signal_connect (GTK_OBJECT (item), "activate",
- GTK_SIGNAL_FUNC (ssl_optionmenu_activated), dialog);
- gtk_signal_connect (GTK_OBJECT (item), "select",
- GTK_SIGNAL_FUNC (ssl_optionmenu_selected), dialog);
+ g_signal_connect (item, "activate",
+ G_CALLBACK (ssl_optionmenu_activated), dialog);
+ g_signal_connect (item, "select",
+ G_CALLBACK (ssl_optionmenu_selected), dialog);
}
static void
@@ -634,7 +634,7 @@ supported_bases_create_table (char *name, char *string1, char *string2, int num1
table = e_table_scrolled_new (model, NULL, BASES_TABLE_SPEC, NULL);
- gtk_object_set_data (GTK_OBJECT (table), "model", model);
+ g_object_set_data (G_OBJECT (table), "model", model);
return table;
}
@@ -712,7 +712,7 @@ query_for_supported_bases (GtkWidget *button, AddressbookSourceDialog *sdialog)
supported_bases_table = glade_xml_get_widget (sdialog->gui, "supported-bases-table");
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");
+ model = g_object_get_data (G_OBJECT (supported_bases_table), "model");
g_signal_connect (selection_model, "selection_changed",
G_CALLBACK (search_base_selection_model_changed), dialog);
@@ -758,8 +758,8 @@ scope_optionmenu_activated (GtkWidget *item, AddressbookSourceDialog *dialog)
static void
add_scope_activate_cb (GtkWidget *item, AddressbookSourceDialog *dialog)
{
- gtk_signal_connect (GTK_OBJECT (item), "activate",
- GTK_SIGNAL_FUNC (scope_optionmenu_activated), dialog);
+ g_signal_connect (item, "activate",
+ G_CALLBACK (scope_optionmenu_activated), dialog);
}
static void
@@ -879,7 +879,7 @@ objectclasses_create_server_table (char *name, char *string1, char *string2,
table = e_table_scrolled_new (model, NULL, OBJECTCLASSES_TABLE_SPEC, NULL);
- gtk_object_set_data (GTK_OBJECT (table), "model", model);
+ g_object_set_data (G_OBJECT (table), "model", model);
return table;
}
@@ -895,7 +895,7 @@ objectclasses_create_evolution_table (char *name, char *string1, char *string2,
table = e_table_scrolled_new (model, NULL, OBJECTCLASSES_TABLE_SPEC, NULL);
- gtk_object_set_data (GTK_OBJECT (table), "model", model);
+ g_object_set_data (G_OBJECT (table), "model", model);
return table;
}
@@ -1006,36 +1006,36 @@ setup_objectclasses_tab (AddressbookSourceDialog *dialog, GtkSignalFunc modify_f
dialog->objectclasses_modify_func = modify_func;
dialog->objectclasses_server_table = glade_xml_get_widget (dialog->gui, "objectclasses-server-table");
- dialog->objectclasses_server_model = gtk_object_get_data (GTK_OBJECT (dialog->objectclasses_server_table), "model");
+ dialog->objectclasses_server_model = g_object_get_data (G_OBJECT (dialog->objectclasses_server_table), "model");
dialog->objectclasses_evolution_table = glade_xml_get_widget (dialog->gui, "objectclasses-evolution-table");
- dialog->objectclasses_evolution_model = gtk_object_get_data (GTK_OBJECT (dialog->objectclasses_evolution_table), "model");
+ dialog->objectclasses_evolution_model = g_object_get_data (G_OBJECT (dialog->objectclasses_evolution_table), "model");
table = e_table_scrolled_get_table (E_TABLE_SCROLLED(dialog->objectclasses_server_table));
- gtk_signal_connect (GTK_OBJECT (table), "double_click",
- GTK_SIGNAL_FUNC (objectclasses_server_double_click), dialog);
+ g_signal_connect (table, "double_click",
+ G_CALLBACK (objectclasses_server_double_click), dialog);
esm = e_table_get_selection_model (table);
- gtk_signal_connect (GTK_OBJECT (esm), "selection_changed",
+ g_signal_connect (esm, "selection_changed",
server_selection_model_changed, dialog);
table = e_table_scrolled_get_table (E_TABLE_SCROLLED(dialog->objectclasses_evolution_table));
- gtk_signal_connect (GTK_OBJECT (table), "double_click",
- GTK_SIGNAL_FUNC (objectclasses_evolution_double_click), dialog);
+ g_signal_connect (table, "double_click",
+ G_CALLBACK (objectclasses_evolution_double_click), dialog);
esm = e_table_get_selection_model (table);
- gtk_signal_connect (GTK_OBJECT (esm), "selection_changed",
+ g_signal_connect (esm, "selection_changed",
evolution_selection_model_changed, dialog);
dialog->objectclasses_add_button = glade_xml_get_widget (dialog->gui, "objectclasses-add-button");
- gtk_signal_connect (GTK_OBJECT (dialog->objectclasses_add_button), "clicked",
- GTK_SIGNAL_FUNC(objectclasses_add), dialog);
+ g_signal_connect (dialog->objectclasses_add_button, "clicked",
+ G_CALLBACK(objectclasses_add), dialog);
dialog->objectclasses_remove_button = glade_xml_get_widget (dialog->gui, "objectclasses-remove-button");
- gtk_signal_connect (GTK_OBJECT (dialog->objectclasses_remove_button), "clicked",
- GTK_SIGNAL_FUNC(objectclasses_remove), dialog);
+ g_signal_connect (dialog->objectclasses_remove_button, "clicked",
+ G_CALLBACK(objectclasses_remove), dialog);
restore_default = glade_xml_get_widget (dialog->gui, "objectclasses-default-button");
- gtk_signal_connect (GTK_OBJECT (restore_default), "clicked",
- GTK_SIGNAL_FUNC(objectclasses_restore_default), dialog);
+ g_signal_connect (restore_default, "clicked",
+ G_CALLBACK(objectclasses_restore_default), dialog);
}
#endif
@@ -1384,17 +1384,17 @@ addressbook_edit_server_dialog (AddressbookDialog *dialog, int model_row)
sdialog->notebook = glade_xml_get_widget (sdialog->gui, "account-editor-notebook");
#ifdef NEW_ADVANCED_UI
sdialog->objectclasses_label = glade_xml_get_widget (sdialog->gui, "account-editor-objectclasses-label");
- gtk_object_ref (GTK_OBJECT (sdialog->objectclasses_label));
+ g_object_ref (sdialog->objectclasses_label);
sdialog->objectclasses_tab = glade_xml_get_widget (sdialog->gui, "account-editor-objectclasses-vbox");
- gtk_object_ref (GTK_OBJECT (sdialog->objectclasses_tab));
+ g_object_ref (sdialog->objectclasses_tab);
sdialog->mappings_label = glade_xml_get_widget (sdialog->gui, "account-editor-mappings-label");
- gtk_object_ref (GTK_OBJECT (sdialog->mappings_label));
+ g_object_ref (sdialog->mappings_label);
sdialog->mappings_tab = glade_xml_get_widget (sdialog->gui, "account-editor-mappings-vbox");
- gtk_object_ref (GTK_OBJECT (sdialog->mappings_tab));
+ g_object_ref (sdialog->mappings_tab);
sdialog->dn_customization_label = glade_xml_get_widget (sdialog->gui, "account-editor-dn-customization-label");
- gtk_object_ref (GTK_OBJECT (sdialog->dn_customization_label));
+ g_object_ref (sdialog->dn_customization_label);
sdialog->dn_customization_tab = glade_xml_get_widget (sdialog->gui, "account-editor-dn-customization-vbox");
- gtk_object_ref (GTK_OBJECT (sdialog->dn_customization_tab));
+ g_object_ref (sdialog->dn_customization_tab);
#endif
addressbook_source_dialog_set_source (sdialog, source);
@@ -1402,9 +1402,9 @@ addressbook_edit_server_dialog (AddressbookDialog *dialog, int model_row)
set_advanced_button_state (sdialog);
#ifdef NEW_ADVANCED_UI
- gtk_signal_connect (GTK_OBJECT (fewer_options_button),
+ g_signal_connect (fewer_options_button,
"clicked", advanced_button_clicked, sdialog);
- gtk_signal_connect (GTK_OBJECT (more_options_button),
+ g_signal_connect (more_options_button,
"clicked", advanced_button_clicked, sdialog);
#else
@@ -1413,18 +1413,18 @@ addressbook_edit_server_dialog (AddressbookDialog *dialog, int model_row)
#ifdef NEW_ADVANCED_UI
/* set up a signal handler to query for schema info if the user switches to the advanced tabs */
- gtk_signal_connect (GTK_OBJECT (sdialog->notebook), "switch_page",
- GTK_SIGNAL_FUNC (edit_dialog_switch_page), sdialog);
+ g_signal_connect (sdialog->notebook, "switch_page",
+ G_CALLBACK (edit_dialog_switch_page), sdialog);
#endif
- gtk_signal_connect (GTK_OBJECT (sdialog->ok_button),
- "clicked", GTK_SIGNAL_FUNC(edit_dialog_ok_clicked), sdialog);
- gtk_signal_connect (GTK_OBJECT (sdialog->apply_button),
- "clicked", GTK_SIGNAL_FUNC(edit_dialog_apply_clicked), sdialog);
- gtk_signal_connect (GTK_OBJECT (sdialog->close_button),
- "clicked", GTK_SIGNAL_FUNC(edit_dialog_close_clicked), sdialog);
- gtk_signal_connect (GTK_OBJECT(sdialog->window), "destroy",
- GTK_SIGNAL_FUNC(addressbook_source_dialog_destroy), sdialog);
+ g_signal_connect (sdialog->ok_button,
+ "clicked", G_CALLBACK(edit_dialog_ok_clicked), sdialog);
+ g_signal_connect (sdialog->apply_button,
+ "clicked", G_CALLBACK(edit_dialog_apply_clicked), sdialog);
+ g_signal_connect (sdialog->close_button,
+ "clicked", G_CALLBACK(edit_dialog_close_clicked), sdialog);
+ g_signal_connect (sdialog->window, "destroy",
+ G_CALLBACK(addressbook_source_dialog_destroy), sdialog);
gtk_widget_set_sensitive (sdialog->ok_button, FALSE);
gtk_widget_set_sensitive (sdialog->apply_button, FALSE);
@@ -1512,7 +1512,7 @@ ldap_config_control_destroy_callback (EvolutionConfigControl *config_control,
dialog = (AddressbookDialog *) data;
- gtk_object_unref (GTK_OBJECT (dialog->gui));
+ g_object_unref (dialog->gui);
/* XXX free more stuff here */
@@ -1572,25 +1572,25 @@ ldap_dialog_new (GNOME_Evolution_Shell shell)
dialog->sourcesTable = glade_xml_get_widget (dialog->gui, "sourcesTable");
et = e_table_scrolled_get_table (E_TABLE_SCROLLED(dialog->sourcesTable));
- gtk_signal_connect (GTK_OBJECT (et), "double_click",
- GTK_SIGNAL_FUNC (sources_table_double_click), dialog);
+ g_signal_connect (et, "double_click",
+ G_CALLBACK (sources_table_double_click), dialog);
- dialog->sourcesModel = gtk_object_get_data (GTK_OBJECT (dialog->sourcesTable), "model");
+ dialog->sourcesModel = g_object_get_data (G_OBJECT (dialog->sourcesTable), "model");
dialog->addSource = glade_xml_get_widget (dialog->gui, "addSource");
- gtk_signal_connect (GTK_OBJECT(dialog->addSource), "clicked",
- GTK_SIGNAL_FUNC (add_source_clicked),
- dialog);
+ g_signal_connect (dialog->addSource, "clicked",
+ G_CALLBACK (add_source_clicked),
+ dialog);
dialog->editSource = glade_xml_get_widget (dialog->gui, "editSource");
- gtk_signal_connect (GTK_OBJECT(dialog->editSource), "clicked",
- GTK_SIGNAL_FUNC (edit_source_clicked),
- dialog);
+ g_signal_connect (dialog->editSource, "clicked",
+ G_CALLBACK (edit_source_clicked),
+ dialog);
dialog->deleteSource = glade_xml_get_widget (dialog->gui, "deleteSource");
- gtk_signal_connect (GTK_OBJECT(dialog->deleteSource), "clicked",
- GTK_SIGNAL_FUNC (delete_source_clicked),
- dialog);
+ g_signal_connect (dialog->deleteSource, "clicked",
+ G_CALLBACK (delete_source_clicked),
+ dialog);
l = addressbook_storage_get_sources ();
for (; l != NULL; l = l->next) {
@@ -1603,8 +1603,8 @@ ldap_dialog_new (GNOME_Evolution_Shell shell)
}
esm = e_table_get_selection_model (et);
- gtk_signal_connect (GTK_OBJECT (esm), "selection_changed",
- GTK_SIGNAL_FUNC (sources_selection_changed), dialog);
+ g_signal_connect (esm, "selection_changed",
+ G_CALLBACK (sources_selection_changed), dialog);
sources_selection_changed (esm, dialog);
@@ -1632,7 +1632,7 @@ addressbook_dialog_create_sources_table (char *name, char *string1, char *string
EVOLUTION_ETSPECDIR "/addressbook-config.etspec",
NULL);
- gtk_object_set_data (GTK_OBJECT (table), "model", model);
+ g_object_set_data (G_OBJECT (table), "model", model);
return table;
}
@@ -1664,10 +1664,10 @@ ldap_config_control_new (GNOME_Evolution_Shell shell)
#ifdef HAVE_LDAP
dialog->config_control = control;
- gtk_signal_connect (GTK_OBJECT (dialog->config_control), "apply",
- GTK_SIGNAL_FUNC (ldap_config_control_apply_callback), dialog);
- gtk_signal_connect (GTK_OBJECT (dialog->config_control), "destroy",
- GTK_SIGNAL_FUNC (ldap_config_control_destroy_callback), dialog);
+ g_signal_connect (dialog->config_control, "apply",
+ G_CALLBACK (ldap_config_control_apply_callback), dialog);
+ g_signal_connect (dialog->config_control, "destroy",
+ G_CALLBACK (ldap_config_control_destroy_callback), dialog);
gtk_widget_unref (dialog->page);
#endif
@@ -1735,7 +1735,7 @@ addressbook_config_create_new_source (const char *new_source, GtkWidget *parent)
dialog->id = gnome_dialog_run_and_close (GNOME_DIALOG (dialog->dialog));
- gtk_object_unref (GTK_OBJECT (dialog->gui));
+ g_object_unref (dialog->gui);
if (dialog->id == 0) {
/* Ok was clicked */
diff --git a/addressbook/gui/component/addressbook-storage.c b/addressbook/gui/component/addressbook-storage.c
index 657762edca..7eb40281cf 100644
--- a/addressbook/gui/component/addressbook-storage.c
+++ b/addressbook/gui/component/addressbook-storage.c
@@ -50,8 +50,8 @@
#include <glib.h>
#include <gtk/gtk.h>
-#include <gnome-xml/parser.h>
-#include <gnome-xml/xmlmemory.h>
+#include <libxml/parser.h>
+#include <libxml/xmlmemory.h>
#include <libgnome/gnome-i18n.h>
#include <libgnome/gnome-util.h>
@@ -91,7 +91,7 @@ addressbook_storage_setup (EvolutionShellComponent *shell_component,
return;
}
- corba_shell = bonobo_object_corba_objref (BONOBO_OBJECT (shell_client));
+ corba_shell = evolution_shell_client_corba_objref (shell_client);
sources = NULL;
@@ -164,12 +164,12 @@ addressbook_get_other_contact_storage (void)
if (storage == NULL) {
storage = evolution_storage_new (_("Other Contacts"), FALSE);
- gtk_signal_connect (GTK_OBJECT (storage),
- "remove_folder",
- GTK_SIGNAL_FUNC(remove_ldap_folder), NULL);
- gtk_signal_connect (GTK_OBJECT (storage),
- "create_folder",
- GTK_SIGNAL_FUNC(create_ldap_folder), NULL);
+ g_signal_connect (storage,
+ "remove_folder",
+ G_CALLBACK (remove_ldap_folder), NULL);
+ g_signal_connect (storage,
+ "create_folder",
+ G_CALLBACK (create_ldap_folder), NULL);
result = evolution_storage_register_on_shell (storage, corba_shell);
switch (result) {
case EVOLUTION_STORAGE_OK:
@@ -427,7 +427,7 @@ load_source_data (const char *file_path)
return FALSE;
}
- for (child = root->childs; child; child = child->next) {
+ for (child = root->children; child; child = child->next) {
char *path;
AddressbookSource *source;
diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c
index a13fed5c6d..8456c5abed 100644
--- a/addressbook/gui/component/addressbook.c
+++ b/addressbook/gui/component/addressbook.c
@@ -298,7 +298,7 @@ update_command_state (EAddressbookView *eav, AddressbookView *view)
static void
change_view_type (AddressbookView *view, EAddressbookViewType view_type)
{
- gtk_object_set (GTK_OBJECT (view->view), "type", view_type, NULL);
+ g_object_set (view->view, "type", view_type, NULL);
}
static BonoboUIVerb verbs [] = {
@@ -431,10 +431,10 @@ addressbook_view_clear (AddressbookView *view)
EBook *book;
if (view->uri && view->view) {
- gtk_object_get(GTK_OBJECT(view->view),
- "book", &book,
- NULL);
- gtk_object_unref (GTK_OBJECT (book));
+ g_object_get(view->view,
+ "book", &book,
+ NULL);
+ g_object_unref (book);
}
if (view->properties) {
@@ -457,8 +457,8 @@ addressbook_view_clear (AddressbookView *view)
g_free(view);
if (view->ecml_changed_id != 0) {
- gtk_signal_disconnect (GTK_OBJECT(get_master_list()),
- view->ecml_changed_id);
+ g_signal_handler_disconnect (get_master_list(),
+ view->ecml_changed_id);
view->ecml_changed_id = 0;
}
}
@@ -469,9 +469,9 @@ book_open_cb (EBook *book, EBookStatus status, gpointer closure)
AddressbookView *view = closure;
if (status == E_BOOK_STATUS_SUCCESS) {
- gtk_object_set(GTK_OBJECT(view->view),
- "book", book,
- NULL);
+ g_object_set(view->view,
+ "book", book,
+ NULL);
}
else {
GtkWidget *warning_dialog, *label;
@@ -755,9 +755,9 @@ set_prop (BonoboPropertyBag *bag,
switch (arg_id) {
case PROPERTY_FOLDER_URI_IDX:
- gtk_object_get(GTK_OBJECT(view->view),
- "book", &book,
- NULL);
+ g_object_get(view->view,
+ "book", &book,
+ NULL);
if (view->uri) {
/* we've already had a uri set on this view, so unload it */
e_book_unload_uri (book);
@@ -825,10 +825,10 @@ addressbook_search_activated (ESearchBar *esb, AddressbookView *view)
return;
}
- gtk_object_get(GTK_OBJECT(esb),
- "text", &search_word,
- "item_id", &search_type,
- NULL);
+ g_object_get(esb,
+ "text", &search_word,
+ "item_id", &search_type,
+ NULL);
if (search_type == ESB_ADVANCED) {
#ifdef PENDING_PORT_WORK
@@ -873,9 +873,9 @@ addressbook_search_activated (ESearchBar *esb, AddressbookView *view)
search_query = g_strdup ("(contains \"x-evolution-any-field\" \"\")");
if (search_query)
- gtk_object_set (GTK_OBJECT(view->view),
- "query", search_query,
- NULL);
+ g_object_set (view->view,
+ "query", search_query,
+ NULL);
g_free (search_query);
}
@@ -888,9 +888,9 @@ addressbook_query_changed (ESearchBar *esb, AddressbookView *view)
{
int search_type;
- gtk_object_get(GTK_OBJECT(esb),
- "item_id", &search_type,
- NULL);
+ g_object_get(esb,
+ "item_id", &search_type,
+ NULL);
if (search_type == ESB_ADVANCED) {
#ifdef PENDING_PORT_WORK
@@ -906,8 +906,8 @@ retrieve_shell_view_interface_from_control (BonoboControl *control)
GNOME_Evolution_ShellView shell_view_interface;
CORBA_Environment ev;
- shell_view_interface = gtk_object_get_data (GTK_OBJECT (control),
- "shell_view_interface");
+ shell_view_interface = g_object_get_data (G_OBJECT (control),
+ "shell_view_interface");
if (shell_view_interface)
return shell_view_interface;
@@ -924,9 +924,9 @@ retrieve_shell_view_interface_from_control (BonoboControl *control)
CORBA_exception_free (&ev);
if (shell_view_interface != CORBA_OBJECT_NIL)
- gtk_object_set_data (GTK_OBJECT (control),
- "shell_view_interface",
- shell_view_interface);
+ g_object_set_data (G_OBJECT (control),
+ "shell_view_interface",
+ shell_view_interface);
else
g_warning ("Control frame doesn't have Evolution/ShellView.");
@@ -939,7 +939,7 @@ set_status_message (EAddressbookView *eav, const char *message, AddressbookView
if (!message || !*message) {
if (view->activity) {
- gtk_object_unref (GTK_OBJECT (view->activity));
+ g_object_unref (view->activity);
view->activity = NULL;
}
}
@@ -1055,6 +1055,7 @@ compare_subitems (const void *a, const void *b)
static void
make_suboptions (AddressbookView *view)
{
+#if PENDING_PORT_WORK
ESearchBarSubitem *subitems;
ECategoriesMasterList *master_list;
gint i, N;
@@ -1080,6 +1081,7 @@ make_suboptions (AddressbookView *view)
qsort (subitems + 1, N, sizeof (subitems[0]), compare_subitems);
e_search_bar_set_suboption (view->search, ESB_CATEGORY, subitems);
+#endif
}
static void
@@ -1092,8 +1094,8 @@ static void
connect_master_list_changed (AddressbookView *view)
{
view->ecml_changed_id =
- gtk_signal_connect (GTK_OBJECT (get_master_list()), "changed",
- GTK_SIGNAL_FUNC (ecml_changed), view);
+ g_signal_connect (get_master_list(), "changed",
+ G_CALLBACK (ecml_changed), view);
}
BonoboControl *
@@ -1111,9 +1113,9 @@ addressbook_factory_new_control (void)
view->vbox = gtk_vbox_new (FALSE, 0);
- gtk_signal_connect (GTK_OBJECT (view->vbox), "destroy",
- GTK_SIGNAL_FUNC (destroy_callback),
- (gpointer) view);
+ g_signal_connect (view->vbox, "destroy",
+ G_CALLBACK (destroy_callback),
+ (gpointer) view);
/* Create the control. */
view->control = bonobo_control_new (view->vbox);
@@ -1124,10 +1126,10 @@ addressbook_factory_new_control (void)
gtk_box_pack_start (GTK_BOX (view->vbox), GTK_WIDGET (view->search),
FALSE, FALSE, 0);
- gtk_signal_connect (GTK_OBJECT (view->search), "query_changed",
- GTK_SIGNAL_FUNC (addressbook_query_changed), view);
- gtk_signal_connect (GTK_OBJECT (view->search), "search_activated",
- GTK_SIGNAL_FUNC (addressbook_search_activated), view);
+ g_signal_connect (view->search, "query_changed",
+ G_CALLBACK (addressbook_query_changed), view);
+ g_signal_connect (view->search, "search_activated",
+ G_CALLBACK (addressbook_search_activated), view);
view->view = E_ADDRESSBOOK_VIEW(e_addressbook_view_new());
gtk_container_add (GTK_CONTAINER (frame), GTK_WIDGET (view->view));
@@ -1152,30 +1154,30 @@ addressbook_factory_new_control (void)
bonobo_object_corba_objref (BONOBO_OBJECT (view->properties)),
NULL);
- gtk_signal_connect (GTK_OBJECT (view->view),
- "status_message",
- GTK_SIGNAL_FUNC(set_status_message),
- view);
-
- gtk_signal_connect (GTK_OBJECT (view->view),
- "search_result",
- GTK_SIGNAL_FUNC(search_result),
- view);
-
- gtk_signal_connect (GTK_OBJECT (view->view),
- "folder_bar_message",
- GTK_SIGNAL_FUNC(set_folder_bar_label),
- view);
-
- gtk_signal_connect (GTK_OBJECT (view->view),
- "command_state_change",
- GTK_SIGNAL_FUNC(update_command_state),
- view);
+ g_signal_connect (view->view,
+ "status_message",
+ G_CALLBACK(set_status_message),
+ view);
+
+ g_signal_connect (view->view,
+ "search_result",
+ G_CALLBACK(search_result),
+ view);
+
+ g_signal_connect (view->view,
+ "folder_bar_message",
+ G_CALLBACK(set_folder_bar_label),
+ view);
+
+ g_signal_connect (view->view,
+ "command_state_change",
+ G_CALLBACK(update_command_state),
+ view);
- gtk_signal_connect (GTK_OBJECT (view->view),
- "alphabet_state_change",
- GTK_SIGNAL_FUNC(alphabet_state_changed),
- view);
+ g_signal_connect (view->view,
+ "alphabet_state_change",
+ G_CALLBACK(alphabet_state_changed),
+ view);
view->uri = NULL;
diff --git a/addressbook/gui/component/e-address-popup.c b/addressbook/gui/component/e-address-popup.c
index a545d2762c..540d1fc734 100644
--- a/addressbook/gui/component/e-address-popup.c
+++ b/addressbook/gui/component/e-address-popup.c
@@ -151,18 +151,18 @@ mini_wizard_new (void)
gtk_widget_show_all (wiz->body);
- gtk_signal_connect (GTK_OBJECT (wiz->ok_button),
- "clicked",
- GTK_SIGNAL_FUNC (mini_wizard_ok_cb),
- wiz);
- gtk_signal_connect (GTK_OBJECT (wiz->cancel_button),
- "clicked",
- GTK_SIGNAL_FUNC (mini_wizard_cancel_cb),
- wiz);
- gtk_signal_connect (GTK_OBJECT (wiz->body),
- "destroy",
- GTK_SIGNAL_FUNC (mini_wizard_destroy_cb),
- wiz);
+ g_signal_connect (wiz->ok_button,
+ "clicked",
+ G_CALLBACK (mini_wizard_ok_cb),
+ wiz);
+ g_signal_connect (wiz->cancel_button,
+ "clicked",
+ G_CALLBACK (mini_wizard_cancel_cb),
+ wiz);
+ g_signal_connect (wiz->body,
+ "destroy",
+ G_CALLBACK (mini_wizard_destroy_cb),
+ wiz);
return wiz;
@@ -214,7 +214,7 @@ static void
menu_activate_cb (GtkWidget *w, gpointer closure)
{
EMailMenu *menu = (EMailMenu *) closure;
- gchar *addr = (gchar *) gtk_object_get_data (GTK_OBJECT (w), "addr");
+ gchar *addr = (gchar *) g_object_get_data (G_OBJECT (w), "addr");
menu->current_selection = addr;
}
@@ -233,7 +233,7 @@ email_menu_add_option (EMailMenu *menu, const gchar *addr)
menu->options = g_list_append (menu->options, addr_cpy);
menu_item = gtk_menu_item_new_with_label (addr);
- gtk_object_set_data (GTK_OBJECT (menu_item), "addr", addr_cpy);
+ g_object_set_data (G_OBJECT (menu_item), "addr", addr_cpy);
gtk_widget_show_all (menu_item);
gtk_menu_append (GTK_MENU (gtk_option_menu_get_menu (GTK_OPTION_MENU (menu->option_menu))), menu_item);
@@ -260,7 +260,7 @@ email_menu_add_options_from_card (EMailMenu *menu, ECard *card, const gchar *ext
email_menu_add_option (menu, extra_addr);
email_menu_add_option (menu, EMPTY_ENTRY);
- gtk_object_unref (GTK_OBJECT (simple));
+ g_object_unref (simple);
}
static void
@@ -334,7 +334,7 @@ email_table_cleanup_cb (gpointer closure)
if (et == NULL)
return;
- gtk_object_unref (GTK_OBJECT (et->card));
+ g_object_unref (et->card);
email_menu_free (et->primary);
email_menu_free (et->email2);
email_menu_free (et->email3);
@@ -353,7 +353,7 @@ email_table_from_card (EMailTable *et)
email_menu_set_option (et->primary, e_card_simple_get_email (simple, E_CARD_SIMPLE_EMAIL_ID_EMAIL));
email_menu_set_option (et->email2, e_card_simple_get_email (simple, E_CARD_SIMPLE_EMAIL_ID_EMAIL_2));
email_menu_set_option (et->email3, e_card_simple_get_email (simple, E_CARD_SIMPLE_EMAIL_ID_EMAIL_3));
- gtk_object_unref (GTK_OBJECT (simple));
+ g_object_unref (simple);
}
static void
@@ -382,7 +382,7 @@ email_table_to_card (EMailTable *et)
e_card_simple_set_email (simple, E_CARD_SIMPLE_EMAIL_ID_EMAIL_3, curr);
e_card_simple_sync_card (simple);
- gtk_object_unref (GTK_OBJECT (simple));
+ g_object_unref (simple);
}
static void
@@ -392,9 +392,9 @@ email_table_save_card_cb (EBook *book, EBookStatus status, gpointer closure)
if (book) {
e_book_commit_card (book, card, NULL, NULL);
- gtk_object_unref (GTK_OBJECT (book));
+ g_object_unref (book);
}
- gtk_object_unref (GTK_OBJECT (card));
+ g_object_unref (card);
}
/*
@@ -408,7 +408,7 @@ add_card_idle_cb (gpointer closure)
book = e_book_new ();
if (!addressbook_load_default_book (book, email_table_save_card_cb, closure)) {
- gtk_object_unref (GTK_OBJECT (book));
+ g_object_unref (book);
email_table_save_card_cb (NULL, E_BOOK_STATUS_OTHER_ERROR, closure);
}
@@ -422,7 +422,7 @@ email_table_ok_cb (MiniWizard *wiz, gpointer closure)
email_table_to_card (et);
- gtk_object_ref (GTK_OBJECT (et->card));
+ g_object_ref (et->card);
gtk_idle_add (add_card_idle_cb, et->card);
mini_wizard_destroy (wiz);
@@ -443,7 +443,7 @@ email_table_init (MiniWizard *wiz, ECard *card, const gchar *extra_address)
et = g_new (EMailTable, 1);
et->card = card;
- gtk_object_ref (GTK_OBJECT (et->card));
+ g_object_ref (et->card);
et->table = gtk_table_new (4, 2, FALSE);
@@ -566,7 +566,7 @@ card_picker_cleanup_cb (gpointer closure)
{
CardPicker *pick = (CardPicker *) closure;
- g_list_foreach (pick->cards, (GFunc) gtk_object_unref, NULL);
+ g_list_foreach (pick->cards, (GFunc) g_object_unref, NULL);
g_list_free (pick->cards);
g_free (pick->new_name);
@@ -601,7 +601,7 @@ card_picker_init (MiniWizard *wiz, const GList *cards, const gchar *new_name, co
gchar *name_str = e_card_name_to_string (card->name);
pick->cards = g_list_append (pick->cards, card);
- gtk_object_ref (GTK_OBJECT (card));
+ g_object_ref (card);
str = g_strdup_printf (_("Add address to existing contact \"%s\""), name_str);
gtk_clist_append (GTK_CLIST (pick->clist), &str);
@@ -624,14 +624,14 @@ card_picker_init (MiniWizard *wiz, const GList *cards, const gchar *new_name, co
wiz->ok_cb = card_picker_ok_cb;
wiz->cleanup_cb = card_picker_cleanup_cb;
- gtk_signal_connect (GTK_OBJECT (pick->clist),
- "select-row",
- GTK_SIGNAL_FUNC (card_picker_row_select_cb),
- wiz);
- gtk_signal_connect (GTK_OBJECT (pick->clist),
- "unselect-row",
- GTK_SIGNAL_FUNC (card_picker_row_unselect_cb),
- wiz);
+ g_signal_connect (pick->clist,
+ "select-row",
+ G_CALLBACK (card_picker_row_select_cb),
+ wiz);
+ g_signal_connect (pick->clist,
+ "unselect-row",
+ G_CALLBACK (card_picker_row_unselect_cb),
+ wiz);
/* Build our widget */
@@ -689,7 +689,7 @@ static void
e_address_popup_cleanup (EAddressPopup *pop)
{
if (pop->card) {
- gtk_object_unref (GTK_OBJECT (pop->card));
+ g_object_unref (pop->card);
pop->card = NULL;
}
@@ -704,7 +704,7 @@ e_address_popup_cleanup (EAddressPopup *pop)
}
if (pop->book) {
- gtk_object_unref (GTK_OBJECT (pop->book));
+ g_object_unref (pop->book);
pop->book = NULL;
}
@@ -950,7 +950,7 @@ edit_contact_info_cb (EAddressPopup *pop)
book = e_book_new ();
if (!addressbook_load_default_book (book, contact_editor_cb, pop)) {
- gtk_object_unref (GTK_OBJECT (book));
+ g_object_unref (book);
contact_editor_cb (NULL, E_BOOK_STATUS_OTHER_ERROR, pop);
}
}
@@ -965,7 +965,7 @@ e_address_popup_cardify (EAddressPopup *pop, ECard *card)
g_return_if_fail (pop->card == NULL);
pop->card = card;
- gtk_object_ref (GTK_OBJECT (pop->card));
+ g_object_ref (pop->card);
e_minicard_widget_set_card (E_MINICARD_WIDGET (pop->minicard_view), card);
gtk_widget_show (pop->minicard_view);
@@ -1024,14 +1024,14 @@ popup_size_allocate_cb (GtkWidget *widget, GtkAllocation *alloc, gpointer user_d
xmax = gdk_screen_width ();
ymax = gdk_screen_height ();
- if (gtk_object_get_data (GTK_OBJECT (widget), "size_allocate") == NULL) {
+ if (g_object_get_data (G_OBJECT (widget), "size_allocate") == NULL) {
gdk_window_get_pointer (NULL, &x, &y, NULL);
w = alloc->width;
h = alloc->height;
x = CLAMP (x - w/2, 0, xmax - w);
y = CLAMP (y - h/2, 0, ymax - h);
gtk_widget_set_uposition (widget, x, y);
- gtk_object_set_data (GTK_OBJECT (widget), "size_allocate", widget);
+ g_object_set_data (G_OBJECT (widget), "size_allocate", widget);
}
}
@@ -1045,10 +1045,10 @@ e_address_popup_ambiguous_email_add (EAddressPopup *pop, const GList *cards)
wiz->destroy_closure = win;
gtk_window_set_title (GTK_WINDOW (win), _("Merge E-Mail Address"));
- gtk_signal_connect (GTK_OBJECT (win),
- "size_allocate",
- GTK_SIGNAL_FUNC (popup_size_allocate_cb),
- NULL);
+ g_signal_connect (win,
+ "size_allocate",
+ G_CALLBACK (popup_size_allocate_cb),
+ NULL);
/* FIXME: This hard-wired size is evil. */
gtk_widget_set_usize (win, 275, 170);
@@ -1142,15 +1142,15 @@ start_query (EBook *book, EBookStatus status, gpointer closure)
e_book_simple_query_cancel (book, pop->query_tag);
if (pop->book != book) {
- gtk_object_ref (GTK_OBJECT (book));
+ g_object_ref (book);
if (pop->book)
- gtk_object_unref (GTK_OBJECT (pop->book));
+ g_object_unref (pop->book);
pop->book = book;
}
pop->query_tag = e_book_name_and_email_query (book, pop->name, pop->email, query_cb, pop);
- gtk_object_unref (GTK_OBJECT (pop));
+ g_object_unref (pop);
}
static void
@@ -1161,10 +1161,10 @@ e_address_popup_query (EAddressPopup *pop)
g_return_if_fail (pop && E_IS_ADDRESS_POPUP (pop));
book = e_book_new ();
- gtk_object_ref (GTK_OBJECT (pop));
+ g_object_ref (pop);
if (!addressbook_load_default_book (book, start_query, pop)) {
- gtk_object_unref (GTK_OBJECT (book));
+ g_object_unref (book);
start_query (NULL, E_BOOK_STATUS_OTHER_ERROR, pop);
}
}
diff --git a/addressbook/gui/component/e-address-widget.c b/addressbook/gui/component/e-address-widget.c
index 1a1786614f..2b58fd3db9 100644
--- a/addressbook/gui/component/e-address-widget.c
+++ b/addressbook/gui/component/e-address-widget.c
@@ -242,9 +242,9 @@ e_address_widget_cardify (EAddressWidget *addr, ECard *card, gboolean known_emai
if (addr->card != card) {
if (addr->card)
- gtk_object_unref (GTK_OBJECT (addr->card));
+ g_object_unref (addr->card);
addr->card = card;
- gtk_object_ref (GTK_OBJECT (addr->card));
+ g_object_ref (addr->card);
}
addr->known_email = known_email;
@@ -285,9 +285,9 @@ book_ready_cb (EBook *book, EBookStatus status, gpointer user_data)
if (common_book == NULL) {
common_book = book;
- gtk_object_ref (GTK_OBJECT (common_book));
+ g_object_ref (common_book);
} else
- gtk_object_unref (GTK_OBJECT (book));
+ g_object_unref (book);
e_address_widget_do_query (addr);
}
diff --git a/addressbook/gui/component/e-cardlist-model.c b/addressbook/gui/component/e-cardlist-model.c
index 5d9b053934..2066d058bf 100644
--- a/addressbook/gui/component/e-cardlist-model.c
+++ b/addressbook/gui/component/e-cardlist-model.c
@@ -8,9 +8,9 @@
*/
#include <config.h>
-#include <gnome-xml/tree.h>
-#include <gnome-xml/parser.h>
-#include <gnome-xml/xmlmemory.h>
+#include <libxml/tree.h>
+#include <libxml/parser.h>
+#include <libxml/xmlmemory.h>
#include "e-cardlist-model.h"
#define PARENT_TYPE e_table_model_get_type()
@@ -22,7 +22,7 @@ e_cardlist_model_destroy(GtkObject *object)
int i;
for ( i = 0; i < model->data_count; i++ ) {
- gtk_object_unref(GTK_OBJECT(model->data[i]));
+ g_object_unref(model->data[i]);
}
g_free(model->data);
}
@@ -67,9 +67,9 @@ e_cardlist_model_set_value_at (ETableModel *etc, int col, int row, const void *v
e_card_simple_set(e_cardlist_model->data[row],
col + 1,
val);
- gtk_object_get(GTK_OBJECT(e_cardlist_model->data[row]),
- "card", &card,
- NULL);
+ g_object_get(e_cardlist_model->data[row],
+ "card", &card,
+ NULL);
e_table_model_cell_changed(etc, col, row);
}
@@ -131,7 +131,7 @@ e_cardlist_model_add(ECardlistModel *model,
}
if (!found) {
e_table_model_pre_change(E_TABLE_MODEL(model));
- gtk_object_ref(GTK_OBJECT(cards[i]));
+ g_object_ref(cards[i]);
model->data[model->data_count++] = e_card_simple_new (cards[i]);
e_table_model_row_inserted(E_TABLE_MODEL(model), model->data_count - 1);
}
@@ -146,7 +146,7 @@ e_cardlist_model_remove(ECardlistModel *model,
for ( i = 0; i < model->data_count; i++) {
if ( !strcmp(e_card_simple_get_id(model->data[i]), id) ) {
e_table_model_pre_change(E_TABLE_MODEL(model));
- gtk_object_unref(GTK_OBJECT(model->data[i]));
+ g_object_unref(model->data[i]);
memmove(model->data + i, model->data + i + 1, (model->data_count - i - 1) * sizeof (ECard *));
e_table_model_row_deleted(E_TABLE_MODEL(model), i);
}
@@ -186,10 +186,10 @@ e_cardlist_model_get(ECardlistModel *model,
{
if (model->data && row < model->data_count) {
ECard *card;
- gtk_object_get(GTK_OBJECT(model->data[row]),
- "card", &card,
- NULL);
- gtk_object_ref(GTK_OBJECT(card));
+ g_object_get(model->data[row],
+ "card", &card,
+ NULL);
+ g_object_ref(card);
return card;
}
return NULL;