aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--shell/ChangeLog103
-rw-r--r--shell/GNOME_Evolution_TestComponent.server (renamed from shell/GNOME_Evolution_TestComponent.oaf)0
-rw-r--r--shell/Makefile.am24
-rw-r--r--shell/e-component-registry.c10
-rw-r--r--shell/e-corba-config-page.c2
-rw-r--r--shell/e-folder-list.c3
-rw-r--r--shell/e-folder-type-registry.c6
-rw-r--r--shell/e-folder.c2
-rw-r--r--shell/e-gray-bar.c2
-rw-r--r--shell/e-history.c2
-rw-r--r--shell/e-local-folder.c4
-rw-r--r--shell/e-local-storage.c2
-rw-r--r--shell/e-shell-about-box.c2
-rw-r--r--shell/e-shell-config-autocompletion.c2
-rw-r--r--shell/e-shell-config-default-folders.c4
-rw-r--r--shell/e-shell-folder-selection-dialog.c2
-rw-r--r--shell/e-shell-folder-title-bar.c2
-rw-r--r--shell/e-shell-offline-handler.c2
-rw-r--r--shell/e-shell-settings-dialog.c2
-rw-r--r--shell/e-shell-user-creatable-items-handler.c6
-rw-r--r--shell/e-shell-view.c4
-rw-r--r--shell/e-shell.c12
-rw-r--r--shell/e-shortcuts-view-model.c2
-rw-r--r--shell/e-shortcuts-view.c2
-rw-r--r--shell/e-shortcuts.c2
-rw-r--r--shell/e-splash.c2
-rw-r--r--shell/e-storage-set-view.c4
-rw-r--r--shell/e-storage-set.c2
-rw-r--r--shell/e-storage.c2
-rw-r--r--shell/e-task-bar.c2
-rw-r--r--shell/e-task-widget.c2
-rw-r--r--shell/e-uri-schema-registry.c2
-rw-r--r--shell/evolution-activity-client.c2
-rw-r--r--shell/evolution-folder-selector-button.c2
-rw-r--r--shell/evolution-shell-client.c46
-rw-r--r--shell/evolution-shell-component-client.c122
-rw-r--r--shell/evolution-shell-component-client.h2
-rw-r--r--shell/evolution-shell-component.c4
-rw-r--r--shell/evolution-shell-view.c2
-rw-r--r--shell/evolution-storage-listener.c2
-rw-r--r--shell/evolution-storage-set-view-listener.c2
-rw-r--r--shell/evolution-storage-set-view.c2
-rw-r--r--shell/evolution-test-component.c109
-rw-r--r--shell/evolution-wizard.c2
-rw-r--r--shell/main.c4
45 files changed, 320 insertions, 201 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 3b6b1f0969..4470fcdf7e 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,4 +1,105 @@
-2002-11-04 Ettore Perazzoli <ettore@ximian.com>
+2002-11-05 Ettore Perazzoli <ettore@ximian.com>
+
+ * evolution-shell-client.c (impl_dispose): New.
+ (impl_finalize): New.
+ (destroy): Removed.
+ (class_init): Install dispose, finalize handlers.
+
+ * All: Use evolution_shell_client_corba_objref() or
+ evolution_shell_component_client_corba_objref() instead of
+ BONOBO_OBJREF() or bonobo_object_corba_objref() where needed.
+
+ * e-folder-type-registry.c (set_handler): Use g_object_ref() for
+ the handler, not bonobo_object_ref().
+ (folder_type_free): Likewise for unref.
+
+ * evolution-shell-component-client.c
+ (evolution_shell_component_client_corba_objref): New.
+ (impl_dispose): Moved from impl_destroy; only unref things.
+ (impl_finalize) New.
+ (class_init): Install dispose/finalize.
+ (evolution_shell_component_client_get_dnd_source_interface): Use
+ priv->corba_objref instead of bonobo_object_corba_objref() since
+ we are not a BonoboObject anymore.
+ (evolution_shell_component_client_get_dnd_destination_interface):
+ Likewise.
+ (evolution_shell_component_client_get_offline_interface): Likewise.
+ (evolution_shell_component_client_set_owner): Likewise.
+ (evolution_shell_component_client_unset_owner): Likewise.
+ (evolution_shell_component_client_create_view): Likewise.
+ (evolution_shell_component_client_handle_external_uri): Likewise.
+ (evolution_shell_component_client_async_create_folder): Likewise.
+ (evolution_shell_component_client_async_xfer_folder): Likewise.
+ (evolution_shell_component_client_populate_folder_context_menu): Likewise.
+ (evolution_shell_component_client_unpopulate_folder_context_menu): Likewise.
+
+ * e-component-registry.c (register_component): Use
+ evolution_shell_component_client_corba_objref().
+ (e_component_registry_restart_component): Likewise.
+ (component_free): Likewise.
+
+ * evolution-shell-component-client.c: g_object_new() instead of gtk_type_new().
+ * e-component-registry.c: Likewise.
+ * e-corba-config-page.c
+ * e-folder-list.c: Likewise.
+ * e-folder-type-registry.c: Likewise.
+ * e-folder.c: Likewise.
+ * e-gray-bar.c: Likewise.
+ * e-history.c: Likewise.
+ * e-local-folder.c: Likewise.
+ * e-local-folder.c: Likewise.
+ * e-local-storage.c: Likewise.
+ * e-shell-about-box.c: Likewise.
+ * e-shell-config-default-folders.c: Likewise.
+ * e-shell-folder-selection-dialog.c: Likewise.
+ * e-shell-folder-title-bar.c: Likewise.
+ * e-shell-offline-handler.c: Likewise.
+ * e-shell-settings-dialog.c: Likewise.
+ * e-shell-user-creatable-items-handler.c: Likewise.
+ * e-shell-view.c: Likewise.
+ * e-shortcuts-view-model.c: Likewise.
+ * e-shortcuts-view.c: Likewise.
+ * e-shortcuts.c: Likewise.
+ * e-splash.c: Likewise.
+ * e-storage-set-view.c: Likewise.
+ * e-storage-set.c: Likewise.
+ * e-storage.c: Likewise.
+ * e-task-bar.c: Likewise.
+ * e-task-widget.c: Likewise.
+ * e-uri-schema-registry.c: Likewise.
+ * evolution-activity-client.c: Likewise.
+ * evolution-folder-selector-button.c: Likewise.
+ * evolution-shell-client.c: Likewise.
+ * evolution-shell-view.c: Likewise.
+ * evolution-storage-listener.c: Likewise.
+ * evolution-storage-set-view-listener.c: Likewise.
+ * evolution-storage-set-view.c: Likewise.
+ * evolution-wizard.c: Likewise.
+
+ * GNOME_Evolution_TestComponent.server: Renamed from
+ GNOME_Evolution_TestComponent.oaf.
+
+ * evolution-test-component.c (spit_out_shortcuts): Use
+ BONOBO_EX_REPOID().
+ (create_new_folder_selector): Ported to use GtkDialog instead of
+ GnomeDialog.
+ (storage_cancel_discover_shared_folder_callback): Add missing
+ G_OBJECT() cast.
+ (shared_folder_discovery_timeout_callback): Likewise.
+ (storage_discover_shared_folder_callback): Likewise.
+ (timeout_callback_2): Likewise.
+ (timeout_callback_1): Likewise.
+ (shared_folder_discovery_timeout_callback): Use
+ g_object_get_data() instead of gtk_object_get_data().
+ (storage_cancel_discover_shared_folder_callback): Likewise.
+ (timeout_callback_2): Likewise.
+ (timeout_callback_2): g_timeout_add() instead of
+ gtk_timeout_add().
+ (create_view_fn): Likewise.
+ (timeout_callback_1): Likewise.
+ (timeout_callback_1): Pass NULL as the error arg to
+ gdk_pixbuf_new_from_file().
+ (register_component): Use bonobo-activation instead of OAF.
* e-shell-about-box.c (impl_destroy): Removed.
(impl_finalize): New.
diff --git a/shell/GNOME_Evolution_TestComponent.oaf b/shell/GNOME_Evolution_TestComponent.server
index ce42825943..ce42825943 100644
--- a/shell/GNOME_Evolution_TestComponent.oaf
+++ b/shell/GNOME_Evolution_TestComponent.server
diff --git a/shell/Makefile.am b/shell/Makefile.am
index ee072d1854..81ad69cec4 100644
--- a/shell/Makefile.am
+++ b/shell/Makefile.am
@@ -236,21 +236,21 @@ evolution_LDADD = \
# Test component
-# noinst_PROGRAMS = \
-# evolution-test-component
+noinst_PROGRAMS = \
+ evolution-test-component
-# evolution_test_component_SOURCES = \
-# evolution-test-component.c
+evolution_test_component_SOURCES = \
+ evolution-test-component.c
-# evolution_test_component_LDADD = \
-# libeshell.la \
-# $(SHELL_LIBS)
+evolution_test_component_LDADD = \
+ libeshell.la \
+ $(SHELL_LIBS)
-# install-test-component: evolution-test-component
-# $(mkinstalldirs) $(DESTDIR)$(bindir)
-# $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) evolution-test-component $(DESTDIR)$(bindir)/evolution-test-component
-# $(mkinstalldirs) $(DESTDIR)$(serverdir)
-# $(INSTALL_DATA) $(srcdir)/GNOME_Evolution_TestComponent.server $(DESTDIR)$(serverdir)/GNOME_Evolution_TestComponent.server
+install-test-component: evolution-test-component
+ $(mkinstalldirs) $(DESTDIR)$(bindir)
+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) evolution-test-component $(DESTDIR)$(bindir)/evolution-test-component
+ $(mkinstalldirs) $(DESTDIR)$(serverdir)
+ $(INSTALL_DATA) $(srcdir)/GNOME_Evolution_TestComponent.server $(DESTDIR)$(serverdir)/GNOME_Evolution_TestComponent.server
# Misc stuff
diff --git a/shell/e-component-registry.c b/shell/e-component-registry.c
index 39f3f42cf6..204546803e 100644
--- a/shell/e-component-registry.c
+++ b/shell/e-component-registry.c
@@ -133,7 +133,7 @@ component_free (Component *component)
CORBA_exception_init (&ev);
- corba_shell_component = bonobo_object_corba_objref (BONOBO_OBJECT (component->client));
+ corba_shell_component = evolution_shell_component_client_corba_objref (component->client);
corba_shell_component = CORBA_Object_duplicate (corba_shell_component, &ev);
GNOME_Evolution_ShellComponent_unsetOwner (corba_shell_component, &ev);
@@ -229,8 +229,8 @@ register_component (EComponentRegistry *component_registry,
/* FIXME we could use the EvolutionShellComponentClient API here instead, but for
now we don't care. */
- component_corba_interface = bonobo_object_corba_objref (BONOBO_OBJECT (client));
- shell_corba_interface = bonobo_object_corba_objref (BONOBO_OBJECT (priv->shell));
+ component_corba_interface = evolution_shell_component_client_corba_objref (client);
+ shell_corba_interface = BONOBO_OBJREF (priv->shell);
CORBA_exception_init (&my_ev);
@@ -373,7 +373,7 @@ e_component_registry_new (EShell *shell)
g_return_val_if_fail (shell != NULL, NULL);
g_return_val_if_fail (E_IS_SHELL (shell), NULL);
- component_registry = gtk_type_new (e_component_registry_get_type ());
+ component_registry = g_object_new (e_component_registry_get_type (), NULL);
e_component_registry_construct (component_registry, shell);
return component_registry;
@@ -488,7 +488,7 @@ e_component_registry_restart_component (EComponentRegistry *component_registry,
g_hash_table_remove (priv->component_id_to_component, id);
- corba_objref = CORBA_Object_duplicate (bonobo_object_corba_objref (BONOBO_OBJECT (component->client)), &my_ev);
+ corba_objref = CORBA_Object_duplicate (evolution_shell_component_client_corba_objref (component->client), &my_ev);
component_free (component);
diff --git a/shell/e-corba-config-page.c b/shell/e-corba-config-page.c
index bf51097b4a..d792e4db9b 100644
--- a/shell/e-corba-config-page.c
+++ b/shell/e-corba-config-page.c
@@ -236,7 +236,7 @@ e_corba_config_page_new_from_objref (GNOME_Evolution_ConfigControl corba_object)
g_return_val_if_fail (corba_object != CORBA_OBJECT_NIL, NULL);
g_return_val_if_fail (corba_object != CORBA_OBJECT_NIL, NULL);
- corba_config_page = gtk_type_new (e_corba_config_page_get_type ());
+ corba_config_page = g_object_new (e_corba_config_page_get_type (), NULL);
if (! e_corba_config_page_construct (corba_config_page, corba_object)) {
gtk_widget_destroy (GTK_WIDGET (corba_config_page));
return NULL;
diff --git a/shell/e-folder-list.c b/shell/e-folder-list.c
index 7aef708dae..518e193b78 100644
--- a/shell/e-folder-list.c
+++ b/shell/e-folder-list.c
@@ -559,7 +559,8 @@ e_folder_list_get_type (void)
GtkWidget*
e_folder_list_new (EvolutionShellClient *client, char *xml)
{
- GtkWidget *widget = GTK_WIDGET (gtk_type_new (e_folder_list_get_type ()));
+ GtkWidget *widget = GTK_WIDGET (g_object_new (e_folder_list_get_type (), NULL));
+
e_folder_list_construct (E_FOLDER_LIST (widget), client, xml);
return widget;
}
diff --git a/shell/e-folder-type-registry.c b/shell/e-folder-type-registry.c
index 40987086a7..c80f629af9 100644
--- a/shell/e-folder-type-registry.c
+++ b/shell/e-folder-type-registry.c
@@ -139,7 +139,7 @@ folder_type_free (FolderType *folder_type)
gdk_pixbuf_unref (folder_type->mini_icon_pixbuf);
if (folder_type->handler != NULL)
- bonobo_object_unref (BONOBO_OBJECT (folder_type->handler));
+ g_object_unref (folder_type->handler);
g_free (folder_type);
}
@@ -202,7 +202,7 @@ set_handler (EFolderTypeRegistry *folder_type_registry,
if (folder_type->handler != NULL)
return FALSE;
- bonobo_object_ref (BONOBO_OBJECT (handler));
+ g_object_ref (handler);
folder_type->handler = handler;
return TRUE;
@@ -278,7 +278,7 @@ e_folder_type_registry_new (void)
{
EFolderTypeRegistry *new;
- new = gtk_type_new (e_folder_type_registry_get_type ());
+ new = g_object_new (e_folder_type_registry_get_type (), NULL);
e_folder_type_registry_construct (new);
diff --git a/shell/e-folder.c b/shell/e-folder.c
index 112b8d7def..54a80bfc17 100644
--- a/shell/e-folder.c
+++ b/shell/e-folder.c
@@ -217,7 +217,7 @@ e_folder_new (const char *name,
g_return_val_if_fail (type != NULL, NULL);
g_return_val_if_fail (description != NULL, NULL);
- folder = gtk_type_new (E_TYPE_FOLDER);
+ folder = g_object_new (E_TYPE_FOLDER, NULL);
e_folder_construct (folder, name, type, description);
diff --git a/shell/e-gray-bar.c b/shell/e-gray-bar.c
index 2060af2229..0e8aab0332 100644
--- a/shell/e-gray-bar.c
+++ b/shell/e-gray-bar.c
@@ -98,7 +98,7 @@ e_gray_bar_new (void)
{
GtkWidget *new;
- new = gtk_type_new (e_gray_bar_get_type ());
+ new = g_object_new (e_gray_bar_get_type (), NULL);
return new;
}
diff --git a/shell/e-history.c b/shell/e-history.c
index d75182bba3..78dfdabe51 100644
--- a/shell/e-history.c
+++ b/shell/e-history.c
@@ -105,7 +105,7 @@ e_history_new (EHistoryItemFreeFunc item_free_function)
{
EHistory *history;
- history = gtk_type_new (e_history_get_type ());
+ history = g_object_new (e_history_get_type (), NULL);
e_history_construct (history, item_free_function);
return history;
diff --git a/shell/e-local-folder.c b/shell/e-local-folder.c
index 46de41334a..ecbf61d018 100644
--- a/shell/e-local-folder.c
+++ b/shell/e-local-folder.c
@@ -430,7 +430,7 @@ e_local_folder_new (const char *name,
g_return_val_if_fail (name != NULL, NULL);
g_return_val_if_fail (type != NULL, NULL);
- local_folder = gtk_type_new (e_local_folder_get_type ());
+ local_folder = g_object_new (e_local_folder_get_type (), NULL);
e_local_folder_construct (local_folder, name, type, description);
@@ -444,7 +444,7 @@ e_local_folder_new_from_path (const char *path)
g_return_val_if_fail (g_path_is_absolute (path), NULL);
- folder = gtk_type_new (e_local_folder_get_type ());
+ folder = g_object_new (e_local_folder_get_type (), NULL);
if (! construct_loading_metadata (E_LOCAL_FOLDER (folder), path)) {
g_object_unref (folder);
diff --git a/shell/e-local-storage.c b/shell/e-local-storage.c
index 721ec40a27..45f9ae2bc9 100644
--- a/shell/e-local-storage.c
+++ b/shell/e-local-storage.c
@@ -1149,7 +1149,7 @@ e_local_storage_open (EFolderTypeRegistry *folder_type_registry,
g_return_val_if_fail (E_IS_FOLDER_TYPE_REGISTRY (folder_type_registry), NULL);
g_return_val_if_fail (base_path != NULL, NULL);
- new = gtk_type_new (e_local_storage_get_type ());
+ new = g_object_new (e_local_storage_get_type (), NULL);
if (! construct (E_LOCAL_STORAGE (new), folder_type_registry, base_path)) {
g_object_unref (new);
diff --git a/shell/e-shell-about-box.c b/shell/e-shell-about-box.c
index 49382cdf99..a71fb553aa 100644
--- a/shell/e-shell-about-box.c
+++ b/shell/e-shell-about-box.c
@@ -385,7 +385,7 @@ e_shell_about_box_new (void)
{
EShellAboutBox *about_box;
- about_box = gtk_type_new (e_shell_about_box_get_type ());
+ about_box = g_object_new (e_shell_about_box_get_type (), NULL);
return GTK_WIDGET (about_box);
}
diff --git a/shell/e-shell-config-autocompletion.c b/shell/e-shell-config-autocompletion.c
index bc0bf8a3cd..fa993fa15d 100644
--- a/shell/e-shell-config-autocompletion.c
+++ b/shell/e-shell-config-autocompletion.c
@@ -92,7 +92,7 @@ e_shell_config_autocompletion_create_widget (EShell *shell, EvolutionConfigContr
CORBA_exception_init (&ev);
- shell_dup = CORBA_Object_duplicate (bonobo_object_corba_objref (BONOBO_OBJECT (shell)), &ev);
+ shell_dup = CORBA_Object_duplicate (BONOBO_OBJREF (shell), &ev);
ac->shell_client = evolution_shell_client_new (shell_dup);
xml = e_config_listener_get_string_with_default (ac->config_listener,
diff --git a/shell/e-shell-config-default-folders.c b/shell/e-shell-config-default-folders.c
index 853d6cfbd1..4abeb9b5ae 100644
--- a/shell/e-shell-config-default-folders.c
+++ b/shell/e-shell-config-default-folders.c
@@ -77,7 +77,7 @@ e_shell_config_default_folder_selector_button_new (char *widget_name,
char *string2,
int int1, int int2)
{
- return (GtkWidget *)gtk_type_new (EVOLUTION_TYPE_FOLDER_SELECTOR_BUTTON);
+ return (GtkWidget *) g_object_new (EVOLUTION_TYPE_FOLDER_SELECTOR_BUTTON, NULL);
}
static void
@@ -156,7 +156,7 @@ e_shell_config_default_folders_create_widget (EShell *shell, EvolutionConfigCont
dfc->config_listener = e_config_listener_new ();
CORBA_exception_init (&ev);
- shell_dup = CORBA_Object_duplicate (bonobo_object_corba_objref (BONOBO_OBJECT (shell)), &ev);
+ shell_dup = CORBA_Object_duplicate (BONOBO_OBJREF (shell), &ev);
CORBA_exception_free (&ev);
dfc->shell_client = evolution_shell_client_new (shell_dup);
diff --git a/shell/e-shell-folder-selection-dialog.c b/shell/e-shell-folder-selection-dialog.c
index 66a4b60066..e9e692bc6c 100644
--- a/shell/e-shell-folder-selection-dialog.c
+++ b/shell/e-shell-folder-selection-dialog.c
@@ -500,7 +500,7 @@ e_shell_folder_selection_dialog_new (EShell *shell,
g_return_val_if_fail (shell != NULL, NULL);
g_return_val_if_fail (E_IS_SHELL (shell), NULL);
- folder_selection_dialog = gtk_type_new (e_shell_folder_selection_dialog_get_type ());
+ folder_selection_dialog = g_object_new (e_shell_folder_selection_dialog_get_type (), NULL);
e_shell_folder_selection_dialog_construct (folder_selection_dialog, shell,
title, caption, default_uri, allowed_types,
allow_creation);
diff --git a/shell/e-shell-folder-title-bar.c b/shell/e-shell-folder-title-bar.c
index 93549bf1b5..7fa0aa73aa 100644
--- a/shell/e-shell-folder-title-bar.c
+++ b/shell/e-shell-folder-title-bar.c
@@ -600,7 +600,7 @@ e_shell_folder_title_bar_new (void)
gtk_widget_push_colormap (gdk_rgb_get_cmap ());
gtk_widget_push_visual (gdk_rgb_get_visual ());
- new = gtk_type_new (e_shell_folder_title_bar_get_type ());
+ new = g_object_new (e_shell_folder_title_bar_get_type (), NULL);
e_shell_folder_title_bar_construct (new);
gtk_widget_pop_visual ();
diff --git a/shell/e-shell-offline-handler.c b/shell/e-shell-offline-handler.c
index 6c782ec406..c743a41644 100644
--- a/shell/e-shell-offline-handler.c
+++ b/shell/e-shell-offline-handler.c
@@ -786,7 +786,7 @@ e_shell_offline_handler_new (EShell *shell)
g_return_val_if_fail (E_IS_SHELL (shell), NULL);
- offline_handler = (EShellOfflineHandler *) gtk_type_new (e_shell_offline_handler_get_type ());
+ offline_handler = (EShellOfflineHandler *) g_object_new (e_shell_offline_handler_get_type (), NULL);
e_shell_offline_handler_construct (offline_handler, shell);
return offline_handler;
diff --git a/shell/e-shell-settings-dialog.c b/shell/e-shell-settings-dialog.c
index 106e1c8e97..94eb75e2ce 100644
--- a/shell/e-shell-settings-dialog.c
+++ b/shell/e-shell-settings-dialog.c
@@ -333,7 +333,7 @@ e_shell_settings_dialog_new ()
{
EShellSettingsDialog *new;
- new = gtk_type_new (e_shell_settings_dialog_get_type ());
+ new = g_object_new (e_shell_settings_dialog_get_type (), NULL);
return GTK_WIDGET (new);
}
diff --git a/shell/e-shell-user-creatable-items-handler.c b/shell/e-shell-user-creatable-items-handler.c
index d3961bb8c4..5537de5589 100644
--- a/shell/e-shell-user-creatable-items-handler.c
+++ b/shell/e-shell-user-creatable-items-handler.c
@@ -110,7 +110,7 @@ component_new (const char *id,
CORBA_exception_init (&ev);
- objref = bonobo_object_corba_objref (BONOBO_OBJECT (client));
+ objref = evolution_shell_component_client_corba_objref (client);
new->type_list = GNOME_Evolution_ShellComponent__get_userCreatableItemTypes (objref, &ev);
if (ev._major != CORBA_NO_EXCEPTION)
@@ -474,7 +474,7 @@ execute_verb (EShellUserCreatableItemsHandler *handler,
CORBA_exception_init (&ev);
GNOME_Evolution_ShellComponent_userCreateNewItem
- (bonobo_object_corba_objref (BONOBO_OBJECT (component->component_client)),
+ (evolution_shell_component_client_corba_objref (component->component_client),
id,
e_safe_corba_string (e_shell_view_get_current_physical_uri (shell_view)),
e_safe_corba_string (e_shell_view_get_current_folder_type (shell_view)),
@@ -708,7 +708,7 @@ e_shell_user_creatable_items_handler_new (void)
{
EShellUserCreatableItemsHandler *new;
- new = gtk_type_new (e_shell_user_creatable_items_handler_get_type ());
+ new = g_object_new (e_shell_user_creatable_items_handler_get_type (), NULL);
return new;
}
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c
index 1d0da0db5c..92d728cf08 100644
--- a/shell/e-shell-view.c
+++ b/shell/e-shell-view.c
@@ -1727,7 +1727,7 @@ e_shell_view_new (EShell *shell)
g_return_val_if_fail (shell != NULL, NULL);
g_return_val_if_fail (E_IS_SHELL (shell), NULL);
- new = gtk_type_new (e_shell_view_get_type ());
+ new = g_object_new (e_shell_view_get_type (), NULL);
return e_shell_view_construct (E_SHELL_VIEW (new), shell);
}
@@ -2160,7 +2160,7 @@ get_view_for_uri (EShellView *shell_view,
if (handler_client == CORBA_OBJECT_NIL)
return NULL;
- handler = bonobo_object_corba_objref (BONOBO_OBJECT (handler_client));
+ handler = evolution_shell_component_client_corba_objref (handler_client);
CORBA_exception_init (&ev);
diff --git a/shell/e-shell.c b/shell/e-shell.c
index 5556e585f3..bf55bf0da7 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -205,7 +205,7 @@ set_interactive (EShell *shell,
id = (const char *) p->data;
shell_component_client = e_component_registry_get_component_by_id (priv->component_registry, id);
- shell_component_objref = bonobo_object_corba_objref (BONOBO_OBJECT (shell_component_client));
+ shell_component_objref = evolution_shell_component_client_corba_objref (shell_component_client);
CORBA_exception_init (&ev);
@@ -356,7 +356,7 @@ impl_Shell_getComponentByType (PortableServer_Servant servant,
return CORBA_OBJECT_NIL;
}
- corba_component = bonobo_object_corba_objref (BONOBO_OBJECT (handler));
+ corba_component = evolution_shell_component_client_corba_objref (handler);
Bonobo_Unknown_ref (corba_component, ev);
return CORBA_Object_duplicate (corba_component, ev);
@@ -870,7 +870,7 @@ set_owner_on_components (EShell *shell,
priv = shell->priv;
local_directory = e_shell_get_local_directory (shell);
- corba_shell = bonobo_object_corba_objref (BONOBO_OBJECT (shell));
+ corba_shell = BONOBO_OBJREF (shell);
id_list = e_component_registry_get_id_list (priv->component_registry);
for (p = id_list; p != NULL; p = p->next) {
@@ -1623,7 +1623,7 @@ save_settings_for_component (EShell *shell,
char *prefix;
gboolean retval;
- unknown_interface = bonobo_object_corba_objref (BONOBO_OBJECT (client));
+ unknown_interface = evolution_shell_component_client_corba_objref (client);
g_assert (unknown_interface != CORBA_OBJECT_NIL);
CORBA_exception_init (&ev);
@@ -1832,7 +1832,7 @@ e_shell_component_maybe_crashed (EShell *shell,
component = e_folder_type_registry_get_handler_for_type (priv->folder_type_registry, type_name);
if (component != NULL
- && bonobo_unknown_ping (bonobo_object_corba_objref (BONOBO_OBJECT (component)), NULL))
+ && bonobo_unknown_ping (evolution_shell_component_client_corba_objref (component), NULL))
return;
/* See if that type has caused a crash already. */
@@ -2038,7 +2038,7 @@ e_shell_send_receive (EShell *shell)
CORBA_exception_init (&ev);
GNOME_Evolution_ShellComponent_sendReceive
- (bonobo_object_corba_objref (BONOBO_OBJECT (component_client)), TRUE, &ev);
+ (evolution_shell_component_client_corba_objref (component_client), TRUE, &ev);
if (BONOBO_EX (&ev))
g_warning ("Error invoking Send/Receive on %s -- %s", id, BONOBO_EX_REPOID (&ev));
diff --git a/shell/e-shortcuts-view-model.c b/shell/e-shortcuts-view-model.c
index 86ff02158a..7c7bc6bded 100644
--- a/shell/e-shortcuts-view-model.c
+++ b/shell/e-shortcuts-view-model.c
@@ -331,7 +331,7 @@ e_shortcuts_view_model_new (EShortcuts *shortcuts)
g_return_val_if_fail (shortcuts != NULL, NULL);
g_return_val_if_fail (E_IS_SHORTCUTS (shortcuts), NULL);
- new = gtk_type_new (e_shortcuts_view_model_get_type ());
+ new = g_object_new (e_shortcuts_view_model_get_type (), NULL);
e_shortcuts_view_model_construct (new, shortcuts);
diff --git a/shell/e-shortcuts-view.c b/shell/e-shortcuts-view.c
index 87092d91f3..0f4a8416de 100644
--- a/shell/e-shortcuts-view.c
+++ b/shell/e-shortcuts-view.c
@@ -763,7 +763,7 @@ e_shortcuts_view_new (EShortcuts *shortcuts)
g_return_val_if_fail (shortcuts != NULL, NULL);
g_return_val_if_fail (E_IS_SHORTCUTS (shortcuts), NULL);
- new = gtk_type_new (e_shortcuts_view_get_type ());
+ new = g_object_new (e_shortcuts_view_get_type (), NULL);
e_shortcuts_view_construct (E_SHORTCUTS_VIEW (new), shortcuts);
return new;
diff --git a/shell/e-shortcuts.c b/shell/e-shortcuts.c
index e05d688812..c76a12cbd1 100644
--- a/shell/e-shortcuts.c
+++ b/shell/e-shortcuts.c
@@ -779,7 +779,7 @@ e_shortcuts_new_from_file (EShell *shell,
g_return_val_if_fail (E_IS_SHELL (shell), NULL);
g_return_val_if_fail (file_name != NULL, NULL);
- new = gtk_type_new (e_shortcuts_get_type ());
+ new = g_object_new (e_shortcuts_get_type (), NULL);
e_shortcuts_construct (new, shell);
if (! e_shortcuts_load (new, file_name))
diff --git a/shell/e-splash.c b/shell/e-splash.c
index cb75d35423..c2112eb3af 100644
--- a/shell/e-splash.c
+++ b/shell/e-splash.c
@@ -355,7 +355,7 @@ e_splash_new (void)
splash_image_pixbuf = gdk_pixbuf_new_from_file (EVOLUTION_IMAGES "/splash.png", NULL);
g_return_val_if_fail (splash_image_pixbuf != NULL, NULL);
- new = gtk_type_new (e_splash_get_type ());
+ new = g_object_new (e_splash_get_type (), NULL);
e_splash_construct (new, splash_image_pixbuf);
/* gdk_pixbuf_unref (splash_image_pixbuf); */
diff --git a/shell/e-storage-set-view.c b/shell/e-storage-set-view.c
index 4b47bec962..5a0f0d43ab 100644
--- a/shell/e-storage-set-view.c
+++ b/shell/e-storage-set-view.c
@@ -961,7 +961,7 @@ impl_tree_drag_begin (ETree *etree,
CORBA_exception_init (&ev);
- corba_component = bonobo_object_corba_objref (BONOBO_OBJECT (component_client));
+ corba_component = evolution_shell_component_client_corba_objref (component_client);
priv->drag_corba_source_interface = Bonobo_Unknown_queryInterface (corba_component,
"IDL:GNOME/Evolution/ShellComponentDnd/SourceFolder:1.0",
&ev);
@@ -2160,7 +2160,7 @@ e_storage_set_view_new (EStorageSet *storage_set,
g_return_val_if_fail (E_IS_STORAGE_SET (storage_set), NULL);
- new = gtk_type_new (e_storage_set_view_get_type ());
+ new = g_object_new (e_storage_set_view_get_type (), NULL);
e_storage_set_view_construct (E_STORAGE_SET_VIEW (new), storage_set, ui_container);
diff --git a/shell/e-storage-set.c b/shell/e-storage-set.c
index 3a105b924b..163f98758d 100644
--- a/shell/e-storage-set.c
+++ b/shell/e-storage-set.c
@@ -461,7 +461,7 @@ e_storage_set_new (EFolderTypeRegistry *folder_type_registry)
{
EStorageSet *new;
- new = gtk_type_new (e_storage_set_get_type ());
+ new = g_object_new (e_storage_set_get_type (), NULL);
e_storage_set_construct (new, folder_type_registry);
diff --git a/shell/e-storage.c b/shell/e-storage.c
index 4d2a924b42..62ae4b9e77 100644
--- a/shell/e-storage.c
+++ b/shell/e-storage.c
@@ -358,7 +358,7 @@ e_storage_new (const char *name,
{
EStorage *new;
- new = gtk_type_new (e_storage_get_type ());
+ new = g_object_new (e_storage_get_type (), NULL);
e_storage_construct (new, name, root_folder);
diff --git a/shell/e-task-bar.c b/shell/e-task-bar.c
index 745e8f1a5e..0df785fd10 100644
--- a/shell/e-task-bar.c
+++ b/shell/e-task-bar.c
@@ -125,7 +125,7 @@ e_task_bar_new (void)
{
ETaskBar *task_bar;
- task_bar = gtk_type_new (e_task_bar_get_type ());
+ task_bar = g_object_new (e_task_bar_get_type (), NULL);
e_task_bar_construct (task_bar);
return GTK_WIDGET (task_bar);
diff --git a/shell/e-task-widget.c b/shell/e-task-widget.c
index e8ea253595..a6d7e773c6 100644
--- a/shell/e-task-widget.c
+++ b/shell/e-task-widget.c
@@ -165,7 +165,7 @@ e_task_widget_new (GdkPixbuf *icon_pixbuf,
g_return_val_if_fail (icon_pixbuf != NULL, NULL);
g_return_val_if_fail (information != NULL, NULL);
- task_widget = gtk_type_new (e_task_widget_get_type ());
+ task_widget = g_object_new (e_task_widget_get_type (), NULL);
e_task_widget_construct (task_widget, icon_pixbuf, component_id, information);
return GTK_WIDGET (task_widget);
diff --git a/shell/e-uri-schema-registry.c b/shell/e-uri-schema-registry.c
index f6a64b06b9..f288bf16f3 100644
--- a/shell/e-uri-schema-registry.c
+++ b/shell/e-uri-schema-registry.c
@@ -125,7 +125,7 @@ e_uri_schema_registry_new (void)
{
EUriSchemaRegistry *registry;
- registry = gtk_type_new (e_uri_schema_registry_get_type ());
+ registry = g_object_new (e_uri_schema_registry_get_type (), NULL);
return registry;
}
diff --git a/shell/evolution-activity-client.c b/shell/evolution-activity-client.c
index 4f9cf01cc4..0e78e27cf6 100644
--- a/shell/evolution-activity-client.c
+++ b/shell/evolution-activity-client.c
@@ -323,7 +323,7 @@ evolution_activity_client_new (EvolutionShellClient *shell_client,
g_return_val_if_fail (information != NULL, NULL);
g_return_val_if_fail (suggest_display_return != NULL, NULL);
- activity_client = gtk_type_new (evolution_activity_client_get_type ());
+ activity_client = g_object_new (evolution_activity_client_get_type (), NULL);
if (! evolution_activity_client_construct (activity_client,
shell_client,
diff --git a/shell/evolution-folder-selector-button.c b/shell/evolution-folder-selector-button.c
index 7c1d6afeab..a2d792e6f2 100644
--- a/shell/evolution-folder-selector-button.c
+++ b/shell/evolution-folder-selector-button.c
@@ -342,7 +342,7 @@ evolution_folder_selector_button_new (EvolutionShellClient *shell_client,
{
EvolutionFolderSelectorButton *folder_selector_button;
- folder_selector_button = gtk_type_new (evolution_folder_selector_button_get_type ());
+ folder_selector_button = g_object_new (evolution_folder_selector_button_get_type (), NULL);
evolution_folder_selector_button_construct (folder_selector_button,
shell_client,
diff --git a/shell/evolution-shell-client.c b/shell/evolution-shell-client.c
index 1d2db19203..27739c1193 100644
--- a/shell/evolution-shell-client.c
+++ b/shell/evolution-shell-client.c
@@ -79,7 +79,7 @@ query_shell_interface (EvolutionShellClient *shell_client,
CORBA_exception_init (&ev);
- interface_object = Bonobo_Unknown_queryInterface (bonobo_object_corba_objref (BONOBO_OBJECT (shell_client)),
+ interface_object = Bonobo_Unknown_queryInterface (evolution_shell_client_corba_objref (shell_client),
interface_name, &ev);
if (BONOBO_EX (&ev)) {
@@ -229,7 +229,7 @@ user_select_folder (EvolutionShellClient *shell_client,
CORBA_exception_init (&ev);
- corba_shell = bonobo_object_corba_objref (BONOBO_OBJECT (shell_client));
+ corba_shell = evolution_shell_client_corba_objref (shell_client);
num_possible_types = count_string_items (possible_types);
@@ -259,7 +259,7 @@ user_select_folder (EvolutionShellClient *shell_client,
}
-/* GtkObject methods. */
+/* GObject methods. */
static void
unref_pixbuf (gpointer name, gpointer pixbuf, gpointer data)
@@ -269,7 +269,7 @@ unref_pixbuf (gpointer name, gpointer pixbuf, gpointer data)
}
static void
-destroy (GtkObject *object)
+impl_dispose (GObject *object)
{
EvolutionShellClient *shell_client;
EvolutionShellClientPrivate *priv;
@@ -287,6 +287,7 @@ destroy (GtkObject *object)
"Error unreffing the ::Shell interface -- %s\n",
BONOBO_EX_REPOID (&ev));
CORBA_Object_release (priv->corba_objref, &ev);
+ priv->corba_objref = CORBA_OBJECT_NIL;
}
if (priv->activity_interface != CORBA_OBJECT_NIL) {
@@ -305,6 +306,7 @@ destroy (GtkObject *object)
"Error unreffing the ::Shortcuts interface -- %s\n",
BONOBO_EX_REPOID (&ev));
CORBA_Object_release (priv->shortcuts_interface, &ev);
+ priv->shortcuts_interface = CORBA_OBJECT_NIL;
}
if (priv->storage_registry_interface != CORBA_OBJECT_NIL) {
@@ -314,6 +316,7 @@ destroy (GtkObject *object)
"Error unreffing the ::StorageRegistry interface -- %s\n",
BONOBO_EX_REPOID (&ev));
CORBA_Object_release (priv->storage_registry_interface, &ev);
+ priv->storage_registry_interface = CORBA_OBJECT_NIL;
}
CORBA_exception_free (&ev);
@@ -321,22 +324,35 @@ destroy (GtkObject *object)
g_hash_table_foreach (priv->icons, unref_pixbuf, NULL);
g_hash_table_destroy (priv->icons);
+ (* G_OBJECT_CLASS (parent_class)->dispose) (object);
+}
+
+static void
+impl_finalize (GObject *object)
+{
+ EvolutionShellClient *shell_client;
+ EvolutionShellClientPrivate *priv;
+
+ shell_client = EVOLUTION_SHELL_CLIENT (object);
+ priv = shell_client->priv;
+
g_free (priv);
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
+ (* G_OBJECT_CLASS (parent_class)->finalize) (object);
}
static void
class_init (EvolutionShellClientClass *klass)
{
- GtkObjectClass *object_class;
+ GObjectClass *object_class;
parent_class = gtk_type_class (bonobo_object_get_type ());
- object_class = GTK_OBJECT_CLASS (klass);
+ object_class = G_OBJECT_CLASS (klass);
- object_class->destroy = destroy;
+ object_class->dispose = impl_dispose;
+ object_class->finalize = impl_finalize;
}
static void
@@ -398,12 +414,12 @@ evolution_shell_client_new (GNOME_Evolution_Shell corba_shell)
{
EvolutionShellClient *shell_client;
- shell_client = gtk_type_new (evolution_shell_client_get_type ());
+ shell_client = g_object_new (evolution_shell_client_get_type (), NULL);
evolution_shell_client_construct (shell_client, corba_shell);
- if (bonobo_object_corba_objref (BONOBO_OBJECT (shell_client)) == CORBA_OBJECT_NIL) {
- bonobo_object_unref (BONOBO_OBJECT (shell_client));
+ if (evolution_shell_client_corba_objref (shell_client) == CORBA_OBJECT_NIL) {
+ g_object_unref (shell_client);
return NULL;
}
@@ -543,7 +559,7 @@ evolution_shell_client_get_local_storage (EvolutionShellClient *shell_client)
CORBA_exception_init (&ev);
- corba_shell = bonobo_object_corba_objref (BONOBO_OBJECT (shell_client));
+ corba_shell = evolution_shell_client_corba_objref (shell_client);
if (corba_shell == CORBA_OBJECT_NIL) {
g_warning ("evolution_shell_client_get_local_storage() invoked on an "
"EvolutionShellClient that doesn't have a CORBA objref???");
@@ -576,7 +592,7 @@ evolution_shell_client_set_line_status (EvolutionShellClient *shell_client,
CORBA_exception_init (&ev);
- corba_shell = bonobo_object_corba_objref (BONOBO_OBJECT (shell_client));
+ corba_shell = evolution_shell_client_corba_objref (shell_client);
if (corba_shell == CORBA_OBJECT_NIL)
return;
@@ -603,7 +619,7 @@ evolution_shell_client_get_pixbuf_for_type (EvolutionShellClient *shell_client,
mini ? "mini" : "large");
pixbuf = g_hash_table_lookup (shell_client->priv->icons, hash_name);
if (!pixbuf) {
- corba_shell = bonobo_object_corba_objref (BONOBO_OBJECT (shell_client));
+ corba_shell = evolution_shell_client_corba_objref (shell_client);
g_return_val_if_fail (corba_shell != CORBA_OBJECT_NIL, NULL);
CORBA_exception_init (&ev);
@@ -648,7 +664,7 @@ evolution_shell_client_create_storage_set_view (EvolutionShellClient *shell_clie
if (ev == NULL)
ev = &my_ev;
- corba_shell = BONOBO_OBJREF (shell_client);
+ corba_shell = evolution_shell_client_corba_objref (shell_client);
control = GNOME_Evolution_Shell_createStorageSetView (corba_shell, ev);
if (BONOBO_EX (ev)) {
diff --git a/shell/evolution-shell-component-client.c b/shell/evolution-shell-component-client.c
index 3ea637410b..769b3a2e5d 100644
--- a/shell/evolution-shell-component-client.c
+++ b/shell/evolution-shell-component-client.c
@@ -293,10 +293,10 @@ dispatch_callback (EvolutionShellComponentClient *shell_component_client,
}
-/* GtkObject methods. */
+/* GObject methods. */
static void
-impl_destroy (GtkObject *object)
+impl_dispose (GObject *object)
{
EvolutionShellComponentClient *shell_component_client;
EvolutionShellComponentClientPrivate *priv;
@@ -349,22 +349,32 @@ impl_destroy (GtkObject *object)
CORBA_exception_free (&ev);
- g_free (priv);
- shell_component_client->priv = NULL;
+ (* G_OBJECT_CLASS (parent_class)->dispose) (object);
+}
+
+static void
+impl_finalize (GObject *object)
+{
+ EvolutionShellComponentClient *client;
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
+ client = EVOLUTION_SHELL_COMPONENT_CLIENT (object);
+
+ g_free (client->priv);
+
+ (* G_OBJECT_CLASS (parent_class)->finalize) (object);
}
static void
class_init (EvolutionShellComponentClientClass *klass)
{
- GtkObjectClass *object_class;
+ GObjectClass *object_class;
- object_class = GTK_OBJECT_CLASS (klass);
+ object_class = G_OBJECT_CLASS (klass);
parent_class = gtk_type_class (PARENT_TYPE);
- object_class->destroy = impl_destroy;
+ object_class->dispose = impl_dispose;
+ object_class->finalize = impl_finalize;
}
static void
@@ -436,12 +446,20 @@ evolution_shell_component_client_new (const char *id,
CORBA_exception_free (&static_ev);
- new = gtk_type_new (evolution_shell_component_client_get_type ());
+ new = g_object_new (evolution_shell_component_client_get_type (), NULL);
evolution_shell_component_client_construct (new, id, corba_object);
return new;
}
+GNOME_Evolution_ShellComponent
+evolution_shell_component_client_corba_objref (EvolutionShellComponentClient *component_client)
+{
+ g_return_val_if_fail (EVOLUTION_IS_SHELL_COMPONENT_CLIENT (component_client), NULL);
+
+ return component_client->priv->corba_objref;
+}
+
/* Properties. */
@@ -478,7 +496,7 @@ evolution_shell_component_client_get_dnd_source_interface (EvolutionShellCompone
CORBA_exception_init (&ev);
- interface = Bonobo_Unknown_queryInterface (bonobo_object_corba_objref (BONOBO_OBJECT (shell_component_client)),
+ interface = Bonobo_Unknown_queryInterface (priv->corba_objref,
"IDL:GNOME/Evolution/ShellComponentDnd/SourceFolder:1.0",
&ev);
@@ -508,7 +526,7 @@ evolution_shell_component_client_get_dnd_destination_interface (EvolutionShellCo
CORBA_exception_init (&ev);
- interface = Bonobo_Unknown_queryInterface (bonobo_object_corba_objref (BONOBO_OBJECT (shell_component_client)),
+ interface = Bonobo_Unknown_queryInterface (priv->corba_objref,
"IDL:GNOME/Evolution/ShellComponentDnd/DestinationFolder:1.0",
&ev);
@@ -538,9 +556,7 @@ evolution_shell_component_client_get_offline_interface (EvolutionShellComponentC
CORBA_exception_init (&ev);
- interface = Bonobo_Unknown_queryInterface (bonobo_object_corba_objref (BONOBO_OBJECT (shell_component_client)),
- "IDL:GNOME/Evolution/Offline:1.0",
- &ev);
+ interface = Bonobo_Unknown_queryInterface (priv->corba_objref, "IDL:GNOME/Evolution/Offline:1.0", &ev);
if (ev._major != CORBA_NO_EXCEPTION)
interface = CORBA_OBJECT_NIL;
@@ -560,21 +576,23 @@ evolution_shell_component_client_set_owner (EvolutionShellComponentClient *shell
const char *evolution_homedir)
{
EvolutionShellComponentResult result;
+ EvolutionShellComponentClientPrivate *priv;
CORBA_Environment ev;
RETURN_ERROR_IF_FAIL (shell_component_client != NULL);
RETURN_ERROR_IF_FAIL (EVOLUTION_IS_SHELL_COMPONENT_CLIENT (shell_component_client));
RETURN_ERROR_IF_FAIL (shell != CORBA_OBJECT_NIL);
+ priv = shell_component_client->priv;
+
CORBA_exception_init (&ev);
- GNOME_Evolution_ShellComponent_setOwner (bonobo_object_corba_objref (BONOBO_OBJECT (shell_component_client)),
- shell, evolution_homedir, &ev);
+ GNOME_Evolution_ShellComponent_setOwner (priv->corba_objref, shell, evolution_homedir, &ev);
result = corba_exception_to_result (&ev);
if (result == EVOLUTION_SHELL_COMPONENT_OK && evolution_debug_log)
- GNOME_Evolution_ShellComponent_debug (bonobo_object_corba_objref (BONOBO_OBJECT (shell_component_client)), evolution_debug_log, &ev);
+ GNOME_Evolution_ShellComponent_debug (priv->corba_objref, evolution_debug_log, &ev);
CORBA_exception_free (&ev);
@@ -586,7 +604,6 @@ evolution_shell_component_client_unset_owner (EvolutionShellComponentClient *she
GNOME_Evolution_Shell shell)
{
EvolutionShellComponentResult result;
- GNOME_Evolution_ShellComponent corba_component;
CORBA_Environment ev;
RETURN_ERROR_IF_FAIL (shell_component_client != NULL);
@@ -595,9 +612,7 @@ evolution_shell_component_client_unset_owner (EvolutionShellComponentClient *she
CORBA_exception_init (&ev);
- corba_component = bonobo_object_corba_objref (BONOBO_OBJECT (shell_component_client));
-
- GNOME_Evolution_ShellComponent_unsetOwner (corba_component, &ev);
+ GNOME_Evolution_ShellComponent_unsetOwner (shell_component_client->priv->corba_objref, &ev);
result = corba_exception_to_result (&ev);
@@ -616,7 +631,7 @@ evolution_shell_component_client_create_view (EvolutionShellComponentClient *she
{
EvolutionShellComponentResult result;
CORBA_Environment ev;
- GNOME_Evolution_ShellComponent corba_component;
+ EvolutionShellComponentClientPrivate *priv;
Bonobo_Control corba_control;
RETURN_ERROR_IF_FAIL (shell_component_client != NULL);
@@ -628,10 +643,11 @@ evolution_shell_component_client_create_view (EvolutionShellComponentClient *she
RETURN_ERROR_IF_FAIL (view_info != NULL);
RETURN_ERROR_IF_FAIL (control_return != NULL);
+ priv = shell_component_client->priv;
+
CORBA_exception_init (&ev);
- corba_component = bonobo_object_corba_objref (BONOBO_OBJECT (shell_component_client));
- corba_control = GNOME_Evolution_ShellComponent_createView (corba_component, physical_uri, type_string, view_info, &ev);
+ corba_control = GNOME_Evolution_ShellComponent_createView (priv->corba_objref, physical_uri, type_string, view_info, &ev);
result = corba_exception_to_result (&ev);
@@ -641,8 +657,7 @@ evolution_shell_component_client_create_view (EvolutionShellComponentClient *she
Bonobo_UIContainer corba_uih;
corba_uih = bonobo_object_corba_objref (BONOBO_OBJECT (uih));
- *control_return = BONOBO_CONTROL (bonobo_widget_new_control_from_objref (corba_control,
- corba_uih));
+ *control_return = BONOBO_CONTROL (bonobo_widget_new_control_from_objref (corba_control, corba_uih));
}
CORBA_exception_free (&ev);
@@ -654,9 +669,9 @@ EvolutionShellComponentResult
evolution_shell_component_client_handle_external_uri (EvolutionShellComponentClient *shell_component_client,
const char *uri)
{
- GNOME_Evolution_ShellComponent corba_component;
- CORBA_Environment ev;
EvolutionShellComponentResult result;
+ EvolutionShellComponentClientPrivate *priv;
+ CORBA_Environment ev;
RETURN_ERROR_IF_FAIL (shell_component_client != NULL);
RETURN_ERROR_IF_FAIL (EVOLUTION_IS_SHELL_COMPONENT_CLIENT (shell_component_client));
@@ -664,8 +679,9 @@ evolution_shell_component_client_handle_external_uri (EvolutionShellComponentCl
CORBA_exception_init (&ev);
- corba_component = bonobo_object_corba_objref (BONOBO_OBJECT (shell_component_client));
- GNOME_Evolution_ShellComponent_handleExternalURI (corba_component, uri, &ev);
+ priv = shell_component_client->priv;
+
+ GNOME_Evolution_ShellComponent_handleExternalURI (priv->corba_objref, uri, &ev);
result = corba_exception_to_result (&ev);
@@ -685,7 +701,6 @@ evolution_shell_component_client_async_create_folder (EvolutionShellComponentCli
void *data)
{
EvolutionShellComponentClientPrivate *priv;
- GNOME_Evolution_ShellComponent corba_shell_component;
CORBA_Environment ev;
g_return_if_fail (shell_component_client != NULL);
@@ -705,15 +720,10 @@ evolution_shell_component_client_async_create_folder (EvolutionShellComponentCli
CORBA_exception_init (&ev);
- corba_shell_component = bonobo_object_corba_objref (BONOBO_OBJECT (shell_component_client));
-
priv->callback = callback;
priv->callback_data = data;
- GNOME_Evolution_ShellComponent_createFolderAsync (corba_shell_component,
- priv->listener_interface,
- physical_uri, type,
- &ev);
+ GNOME_Evolution_ShellComponent_createFolderAsync (priv->corba_objref, priv->listener_interface, physical_uri, type, &ev);
if (ev._major != CORBA_NO_EXCEPTION && priv->callback != NULL) {
(* callback) (shell_component_client,
@@ -734,7 +744,6 @@ evolution_shell_component_client_async_remove_folder (EvolutionShellComponentCli
void *data)
{
EvolutionShellComponentClientPrivate *priv;
- GNOME_Evolution_ShellComponent corba_shell_component;
CORBA_Environment ev;
g_return_if_fail (shell_component_client != NULL);
@@ -753,16 +762,10 @@ evolution_shell_component_client_async_remove_folder (EvolutionShellComponentCli
CORBA_exception_init (&ev);
- corba_shell_component = bonobo_object_corba_objref (BONOBO_OBJECT (shell_component_client));
-
priv->callback = callback;
priv->callback_data = data;
- GNOME_Evolution_ShellComponent_removeFolderAsync (corba_shell_component,
- priv->listener_interface,
- physical_uri,
- type,
- &ev);
+ GNOME_Evolution_ShellComponent_removeFolderAsync (priv->corba_objref, priv->listener_interface, physical_uri, type, &ev);
if (ev._major != CORBA_NO_EXCEPTION && priv->callback != NULL) {
(* callback) (shell_component_client,
@@ -785,7 +788,6 @@ evolution_shell_component_client_async_xfer_folder (EvolutionShellComponentClien
void *data)
{
EvolutionShellComponentClientPrivate *priv;
- GNOME_Evolution_ShellComponent corba_shell_component;
CORBA_Environment ev;
g_return_if_fail (shell_component_client != NULL);
@@ -805,17 +807,11 @@ evolution_shell_component_client_async_xfer_folder (EvolutionShellComponentClien
CORBA_exception_init (&ev);
- corba_shell_component = bonobo_object_corba_objref (BONOBO_OBJECT (shell_component_client));
-
priv->callback = callback;
priv->callback_data = data;
- GNOME_Evolution_ShellComponent_xferFolderAsync (corba_shell_component,
- priv->listener_interface,
- source_physical_uri,
- destination_physical_uri,
- type,
- remove_source,
+ GNOME_Evolution_ShellComponent_xferFolderAsync (priv->corba_objref, priv->listener_interface,
+ source_physical_uri, destination_physical_uri, type, remove_source,
&ev);
if (ev._major != CORBA_NO_EXCEPTION && priv->callback != NULL) {
@@ -837,7 +833,6 @@ evolution_shell_component_client_populate_folder_context_menu (EvolutionShellCom
{
Bonobo_UIContainer corba_container;
EvolutionShellComponentClientPrivate *priv;
- GNOME_Evolution_ShellComponent corba_shell_component;
CORBA_Environment ev;
g_return_if_fail (shell_component_client != NULL);
@@ -849,14 +844,9 @@ evolution_shell_component_client_populate_folder_context_menu (EvolutionShellCom
CORBA_exception_init (&ev);
- corba_shell_component = bonobo_object_corba_objref (BONOBO_OBJECT (shell_component_client));
corba_container = bonobo_object_corba_objref (BONOBO_OBJECT (container));
- GNOME_Evolution_ShellComponent_populateFolderContextMenu (corba_shell_component,
- corba_container,
- physical_uri,
- type,
- &ev);
+ GNOME_Evolution_ShellComponent_populateFolderContextMenu (priv->corba_objref, corba_container, physical_uri, type, &ev);
CORBA_exception_free (&ev);
}
@@ -869,7 +859,6 @@ evolution_shell_component_client_unpopulate_folder_context_menu (EvolutionShellC
{
Bonobo_UIContainer corba_container;
EvolutionShellComponentClientPrivate *priv;
- GNOME_Evolution_ShellComponent corba_shell_component;
CORBA_Environment ev;
g_return_if_fail (shell_component_client != NULL);
@@ -881,14 +870,9 @@ evolution_shell_component_client_unpopulate_folder_context_menu (EvolutionShellC
CORBA_exception_init (&ev);
- corba_shell_component = bonobo_object_corba_objref (BONOBO_OBJECT (shell_component_client));
corba_container = bonobo_object_corba_objref (BONOBO_OBJECT (container));
- GNOME_Evolution_ShellComponent_unpopulateFolderContextMenu (corba_shell_component,
- corba_container,
- physical_uri,
- type,
- &ev);
+ GNOME_Evolution_ShellComponent_unpopulateFolderContextMenu (priv->corba_objref, corba_container, physical_uri, type, &ev);
CORBA_exception_free (&ev);
}
@@ -917,7 +901,7 @@ evolution_shell_component_client_request_quit (EvolutionShellComponentClient *sh
CORBA_exception_init (&ev);
- corba_shell_component = BONOBO_OBJREF (shell_component_client);
+ corba_shell_component = evolution_shell_component_client_corba_objref (shell_component_client);
priv->callback = callback;
priv->callback_data = data;
diff --git a/shell/evolution-shell-component-client.h b/shell/evolution-shell-component-client.h
index 584d04703c..e396b17082 100644
--- a/shell/evolution-shell-component-client.h
+++ b/shell/evolution-shell-component-client.h
@@ -69,6 +69,8 @@ void evolution_shell_component_client_construct (Evol
EvolutionShellComponentClient *evolution_shell_component_client_new (const char *id,
CORBA_Environment *optional_ev);
+GNOME_Evolution_ShellComponent evolution_shell_component_client_corba_objref (EvolutionShellComponentClient *client);
+
/* Properties. */
const char *evolution_shell_component_client_get_id (EvolutionShellComponentClient *shell_component_client);
diff --git a/shell/evolution-shell-component.c b/shell/evolution-shell-component.c
index 883818640c..3218425e9c 100644
--- a/shell/evolution-shell-component.c
+++ b/shell/evolution-shell-component.c
@@ -213,7 +213,7 @@ owner_ping_callback (void *data)
shell_component = EVOLUTION_SHELL_COMPONENT (data);
priv = shell_component->priv;
- owner_objref = bonobo_object_corba_objref (BONOBO_OBJECT (priv->owner_client));
+ owner_objref = evolution_shell_client_corba_objref (priv->owner_client);
if (owner_objref == CORBA_OBJECT_NIL)
return FALSE;
@@ -409,7 +409,7 @@ impl_setOwner (PortableServer_Servant servant,
int owner_is_dead;
owner_is_dead = CORBA_Object_non_existent
- (bonobo_object_corba_objref (BONOBO_OBJECT (priv->owner_client)), ev);
+ (evolution_shell_client_corba_objref (priv->owner_client), ev);
if (ev->_major != CORBA_NO_EXCEPTION)
owner_is_dead = TRUE;
diff --git a/shell/evolution-shell-view.c b/shell/evolution-shell-view.c
index 340a9b04d3..943d981ee1 100644
--- a/shell/evolution-shell-view.c
+++ b/shell/evolution-shell-view.c
@@ -230,7 +230,7 @@ init (EvolutionShellView *shell_view)
EvolutionShellView *
evolution_shell_view_new (void)
{
- return gtk_type_new (evolution_shell_view_get_type ());
+ return g_object_new (evolution_shell_view_get_type (), NULL);
}
diff --git a/shell/evolution-storage-listener.c b/shell/evolution-storage-listener.c
index d9bd3c6aa5..a0b82dc3c1 100644
--- a/shell/evolution-storage-listener.c
+++ b/shell/evolution-storage-listener.c
@@ -338,7 +338,7 @@ evolution_storage_listener_new (void)
EvolutionStorageListenerPrivate *priv;
GNOME_Evolution_StorageListener corba_objref;
- new = gtk_type_new (evolution_storage_listener_get_type ());
+ new = g_object_new (evolution_storage_listener_get_type (), NULL);
priv = new->priv;
priv->servant = create_servant (new);
diff --git a/shell/evolution-storage-set-view-listener.c b/shell/evolution-storage-set-view-listener.c
index f397601e49..9d21f2c23b 100644
--- a/shell/evolution-storage-set-view-listener.c
+++ b/shell/evolution-storage-set-view-listener.c
@@ -254,7 +254,7 @@ evolution_storage_set_view_listener_new (void)
EvolutionStorageSetViewListenerPrivate *priv;
GNOME_Evolution_StorageSetViewListener corba_listener;
- new = gtk_type_new (evolution_storage_set_view_listener_get_type ());
+ new = g_object_new (evolution_storage_set_view_listener_get_type (), NULL);
priv = new->priv;
priv->servant = create_servant (new);
diff --git a/shell/evolution-storage-set-view.c b/shell/evolution-storage-set-view.c
index 17ff341cb8..83a5a9063a 100644
--- a/shell/evolution-storage-set-view.c
+++ b/shell/evolution-storage-set-view.c
@@ -456,7 +456,7 @@ evolution_storage_set_view_new (EStorageSetView *storage_set_view_widget)
g_return_val_if_fail (storage_set_view_widget != NULL, NULL);
g_return_val_if_fail (E_IS_STORAGE_SET_VIEW (storage_set_view_widget), NULL);
- new = gtk_type_new (evolution_storage_set_view_get_type ());
+ new = g_object_new (evolution_storage_set_view_get_type (), NULL);
evolution_storage_set_view_construct (new, storage_set_view_widget);
diff --git a/shell/evolution-test-component.c b/shell/evolution-test-component.c
index 8f1c5f0502..066251a364 100644
--- a/shell/evolution-test-component.c
+++ b/shell/evolution-test-component.c
@@ -32,13 +32,26 @@
#include "evolution-config-control.h"
#include "evolution-storage.h"
+#include <bonobo-activation/bonobo-activation.h>
+
#include <bonobo/bonobo-exception.h>
#include <bonobo/bonobo-generic-factory.h>
#include <bonobo/bonobo-main.h>
#include <bonobo/bonobo-widget.h>
+#include <libgnomeui/gnome-ui-init.h>
+
+#include <gtk/gtkdialog.h>
+#include <gtk/gtkeventbox.h>
+#include <gtk/gtklabel.h>
+#include <gtk/gtkmain.h>
+#include <gtk/gtkstock.h>
+#include <gtk/gtkvbox.h>
+
#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <stdlib.h>
+
#define COMPONENT_ID "OAFIID:GNOME_Evolution_TestComponent_ShellComponent"
@@ -87,9 +100,9 @@ configuration_control_factory_fn (BonoboGenericFactory *factory,
static void
register_configuration_control_factory (void)
{
- configuration_control_factory = bonobo_generic_factory_new_multi (CONFIGURATION_CONTROL_FACTORY_ID,
- configuration_control_factory_fn,
- NULL);
+ configuration_control_factory = bonobo_generic_factory_new (CONFIGURATION_CONTROL_FACTORY_ID,
+ configuration_control_factory_fn,
+ NULL);
if (configuration_control_factory == NULL)
g_warning ("Cannot register configuration control factory!");
@@ -117,7 +130,7 @@ spit_out_shortcuts (EvolutionShellClient *shell_client)
groups = GNOME_Evolution_Shortcuts__get_groups (shortcuts_interface, &ev);
if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("Exception getting the groups: %s", ev._repo_id);
+ g_warning ("Exception getting the groups: %s", BONOBO_EX_REPOID (&ev));
CORBA_exception_free (&ev);
return;
}
@@ -151,7 +164,7 @@ spit_out_shortcuts (EvolutionShellClient *shell_client)
/* TEST #4: The multiple folder selector. */
static void
-dialog_clicked_callback (GnomeDialog *dialog,
+dialog_clicked_callback (GtkDialog *dialog,
int button_num,
void *data)
{
@@ -171,7 +184,7 @@ dialog_clicked_callback (GnomeDialog *dialog,
folder_list = GNOME_Evolution_StorageSetView__get_checkedFolders (storage_set_view_iface, &ev);
if (BONOBO_EX (&ev)) {
- g_warning ("Cannot get checkedFolders -- %s", BONOBO_EX_ID (&ev));
+ g_warning ("Cannot get checkedFolders -- %s", BONOBO_EX_REPOID (&ev));
} else {
int i;
@@ -221,7 +234,7 @@ create_new_folder_selector (EvolutionShellComponent *shell_component)
shell_client = evolution_shell_component_get_owner (shell_component);
g_assert (shell_client != NULL);
- corba_shell = bonobo_object_corba_objref (BONOBO_OBJECT (shell_client));
+ corba_shell = evolution_shell_client_corba_objref (shell_client);
control_widget = evolution_shell_client_create_storage_set_view (shell_client,
CORBA_OBJECT_NIL,
@@ -229,20 +242,24 @@ create_new_folder_selector (EvolutionShellComponent *shell_component)
&storage_set_view_iface,
&ev);
if (control_widget == NULL) {
- g_warning ("Can't create the StorageSetView control -- %s", BONOBO_EX_ID (&ev));
+ g_warning ("Can't create the StorageSetView control -- %s", BONOBO_EX_REPOID (&ev));
CORBA_exception_free (&ev);
return;
}
- dialog = gnome_dialog_new ("Test the Selector here.", GNOME_STOCK_BUTTON_APPLY, GNOME_STOCK_BUTTON_CLOSE, NULL);
+ dialog = gtk_dialog_new_with_buttons ("Test the Selector here.", NULL,
+ GTK_DIALOG_MODAL,
+ GTK_STOCK_APPLY, GTK_RESPONSE_ACCEPT,
+ GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
+ NULL);
gtk_window_set_default_size (GTK_WINDOW (dialog), 200, 400);
gtk_window_set_policy (GTK_WINDOW (dialog), FALSE, TRUE, FALSE);
- gtk_container_add (GTK_CONTAINER (GNOME_DIALOG (dialog)->vbox), control_widget);
+ gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), control_widget);
GNOME_Evolution_StorageSetView__set_showCheckboxes (storage_set_view_iface, TRUE, &ev);
if (BONOBO_EX (&ev))
- g_warning ("Cannot show checkboxes -- %s", BONOBO_EX_ID (&ev));
+ g_warning ("Cannot show checkboxes -- %s", BONOBO_EX_REPOID (&ev));
g_signal_connect (dialog, "clicked",
G_CALLBACK (dialog_clicked_callback), storage_set_view_iface);
@@ -272,7 +289,7 @@ shared_folder_discovery_timeout_callback (void *data)
storage = EVOLUTION_STORAGE (data);
- listener = (Bonobo_Listener) gtk_object_get_data (GTK_OBJECT (storage), "listener");
+ listener = (Bonobo_Listener) g_object_get_data (G_OBJECT (storage), "listener");
result.result = GNOME_Evolution_Storage_OK;
result.path = "/Shared Folders/The Public Folder";
@@ -285,15 +302,15 @@ shared_folder_discovery_timeout_callback (void *data)
Bonobo_Listener_event (listener, "result", &any, &ev);
if (BONOBO_EX (&ev))
g_warning ("Cannot report result for shared folder discovery -- %s",
- BONOBO_EX_ID (&ev));
+ BONOBO_EX_REPOID (&ev));
Bonobo_Unknown_unref (listener, &ev);
CORBA_Object_release (listener, &ev);
CORBA_exception_free (&ev);
- g_object_set_data (storage, "listener", NULL);
- g_object_set_data (storage, "timeout_id", NULL);
+ g_object_set_data (G_OBJECT (storage), "listener", NULL);
+ g_object_set_data (G_OBJECT (storage), "timeout_id", NULL);
return FALSE;
}
@@ -317,8 +334,8 @@ storage_discover_shared_folder_callback (EvolutionStorage *storage,
timeout_id = g_timeout_add (1000, shared_folder_discovery_timeout_callback, storage);
- g_object_set_data (storage, "listener", listener_copy);
- g_object_set_data (storage, "timeout_id", GINT_TO_POINTER (timeout_id));
+ g_object_set_data (G_OBJECT (storage), "listener", listener_copy);
+ g_object_set_data (G_OBJECT (storage), "timeout_id", GINT_TO_POINTER (timeout_id));
}
static void
@@ -331,21 +348,21 @@ storage_cancel_discover_shared_folder_callback (EvolutionStorage *storage,
CORBA_Environment ev;
int timeout_id;
- timeout_id = GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (storage), "timeout_id"));
+ timeout_id = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (storage), "timeout_id"));
if (timeout_id == 0)
return;
g_source_remove (timeout_id);
- g_object_set_data (storage, "timeout_id", NULL);
+ g_object_set_data (G_OBJECT (storage), "timeout_id", NULL);
- listener = (Bonobo_Listener) gtk_object_get_data (GTK_OBJECT (storage), "listener");
+ listener = (Bonobo_Listener) g_object_get_data (G_OBJECT (storage), "listener");
CORBA_exception_init (&ev);
Bonobo_Unknown_unref (listener, &ev);
CORBA_Object_release (listener, &ev);
CORBA_exception_free (&ev);
- g_object_set_data (storage, "listener", NULL);
+ g_object_set_data (G_OBJECT (storage), "listener", NULL);
}
static void
@@ -380,7 +397,7 @@ setup_custom_storage (EvolutionShellClient *shell_client)
g_signal_connect (the_storage, "show_folder_properties",
G_CALLBACK (storage_show_folder_properties_callback), NULL);
- result = evolution_storage_register_on_shell (the_storage, BONOBO_OBJREF (shell_client));
+ result = evolution_storage_register_on_shell (the_storage, evolution_shell_client_corba_objref (shell_client));
if (result != EVOLUTION_STORAGE_OK) {
g_warning ("Cannot register storage on the shell.");
bonobo_object_unref (BONOBO_OBJECT (the_storage));
@@ -439,7 +456,7 @@ timeout_callback_2 (void *data)
int progress;
activity_client = EVOLUTION_ACTIVITY_CLIENT (data);
- progress = GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (activity_client), "my_progress"));
+ progress = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (activity_client), "my_progress"));
if (progress < 0)
progress = 0;
@@ -453,10 +470,10 @@ timeout_callback_2 (void *data)
}
progress ++;
- g_object_set_data (activity_client, "my_progress", GINT_TO_POINTER (progress));
+ g_object_set_data (G_OBJECT (activity_client), "my_progress", GINT_TO_POINTER (progress));
if (progress > 100) {
- gtk_timeout_add (200, timeout_callback_3, activity_client);
+ g_timeout_add (200, timeout_callback_3, activity_client);
return FALSE;
}
@@ -474,7 +491,7 @@ timeout_callback_1 (void *data)
#define NUM_ACTIVITIES 10
- animated_icon[0] = gdk_pixbuf_new_from_file (gnome_pixmap_file ("gnome-money.png"));
+ animated_icon[0] = gdk_pixbuf_new_from_file (EVOLUTION_IMAGES "outbox-16.png", NULL);
animated_icon[1] = NULL;
g_assert (animated_icon[0] != NULL);
@@ -489,7 +506,7 @@ timeout_callback_1 (void *data)
return FALSE;
}
- g_object_set_data (activity_client, "my_progress", GINT_TO_POINTER (-1));
+ g_object_set_data (G_OBJECT (activity_client), "my_progress", GINT_TO_POINTER (-1));
g_signal_connect (activity_client, "cancel",
G_CALLBACK (activity_client_cancel_callback), NULL);
@@ -500,11 +517,11 @@ timeout_callback_1 (void *data)
if (suggest_display)
g_print (" --> Could display dialog box.\n");
- gtk_timeout_add (100, timeout_callback_2, activity_client);
+ g_timeout_add (100, timeout_callback_2, activity_client);
if (count < NUM_ACTIVITIES) {
count ++;
- gtk_timeout_add ((rand () % 5 + 1) * 500, timeout_callback_1, NULL);
+ g_timeout_add ((rand () % 5 + 1) * 500, timeout_callback_1, NULL);
}
return FALSE;
@@ -551,7 +568,7 @@ create_view_fn (EvolutionShellComponent *shell_component,
*control_return = bonobo_control_new (vbox);
g_assert (timeout_id == 0);
- timeout_id = gtk_timeout_add (2000, timeout_callback_1, NULL);
+ timeout_id = g_timeout_add (2000, timeout_callback_1, NULL);
return EVOLUTION_SHELL_COMPONENT_OK;
}
@@ -562,17 +579,20 @@ request_quit_fn (EvolutionShellComponent *shell_component,
{
GtkWidget *confirm_dialog;
GtkWidget *label;
- int button;
+ int response;
- confirm_dialog = gnome_dialog_new ("Quit?", GNOME_STOCK_BUTTON_OK, GNOME_STOCK_BUTTON_CANCEL, NULL);
+ confirm_dialog = gtk_dialog_new_with_buttons ("Quit?", NULL, GTK_DIALOG_MODAL,
+ GTK_STOCK_OK, GTK_RESPONSE_ACCEPT,
+ GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT,
+ NULL);
label = gtk_label_new ("Please confirm that you want to quit now.");
- gtk_container_add (GTK_CONTAINER (GNOME_DIALOG (confirm_dialog)->vbox), label);
+ gtk_container_add (GTK_CONTAINER (GTK_DIALOG (confirm_dialog)->vbox), label);
gtk_widget_show_all (confirm_dialog);
- button = gnome_dialog_run (GNOME_DIALOG (confirm_dialog));
+ response = gtk_dialog_run (GTK_DIALOG (confirm_dialog));
gtk_widget_destroy (confirm_dialog);
- if (button == 0)
+ if (response == GTK_RESPONSE_ACCEPT)
return TRUE; /* OK */
else
return FALSE; /* Cancel */
@@ -665,10 +685,10 @@ register_component (void)
g_signal_connect (shell_component, "user_create_new_item",
G_CALLBACK (user_create_new_item_callback), NULL);
- result = oaf_active_server_register (COMPONENT_ID,
- bonobo_object_corba_objref (BONOBO_OBJECT (shell_component)));
+ result = bonobo_activation_active_server_register (COMPONENT_ID,
+ bonobo_object_corba_objref (BONOBO_OBJECT (shell_component)));
- if (result == OAF_REG_ERROR)
+ if (result != Bonobo_ACTIVATION_REG_SUCCESS)
g_error ("Cannot register active server into OAF");
}
@@ -676,18 +696,13 @@ register_component (void)
int
main (int argc, char **argv)
{
- CORBA_ORB orb;
-
bindtextdomain (PACKAGE, EVOLUTION_LOCALEDIR);
textdomain (PACKAGE);
- gnome_init_with_popt_table ("evolution-test-component", VERSION,
- argc, argv, oaf_popt_options, 0, NULL);
-
- orb = oaf_init (argc, argv);
-
- if (bonobo_init (orb, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL) == FALSE)
- g_error ("Cannot initialize the test component.");
+ gnome_program_init (PACKAGE, VERSION, LIBGNOMEUI_MODULE, argc, argv,
+ GNOME_PROGRAM_STANDARD_PROPERTIES,
+ GNOME_PARAM_HUMAN_READABLE_NAME, _("Evolution Test Component"),
+ NULL);
register_configuration_control_factory ();
diff --git a/shell/evolution-wizard.c b/shell/evolution-wizard.c
index 3a6dd2242b..2582b8d6dd 100644
--- a/shell/evolution-wizard.c
+++ b/shell/evolution-wizard.c
@@ -261,7 +261,7 @@ evolution_wizard_new_full (EvolutionWizardGetControlFn get_fn,
g_return_val_if_fail (num_pages > 0, NULL);
g_return_val_if_fail (BONOBO_IS_EVENT_SOURCE (event_source), NULL);
- wizard = gtk_type_new (evolution_wizard_get_type ());
+ wizard = g_object_new (evolution_wizard_get_type (), NULL);
return evolution_wizard_construct (wizard, event_source, get_fn, num_pages, closure);
}
diff --git a/shell/main.c b/shell/main.c
index 612eae7401..2261aa84d1 100644
--- a/shell/main.c
+++ b/shell/main.c
@@ -490,8 +490,6 @@ main (int argc, char **argv)
{ NULL, '\0', 0, NULL, 0, NULL, NULL }
};
GSList *uri_list;
- const char **args;
- poptContext popt_context;
/* Make ElectricFence work. */
free (malloc (10));
@@ -534,6 +532,7 @@ main (int argc, char **argv)
uri_list = NULL;
+#if 0
args = poptGetArgs (popt_context);
if (args != NULL) {
const char **p;
@@ -541,6 +540,7 @@ main (int argc, char **argv)
for (p = args; *p != NULL; p++)
uri_list = g_slist_prepend (uri_list, (char *) *p);
}
+#endif
gtk_idle_add (idle_cb, uri_list);