aboutsummaryrefslogtreecommitdiffstats
path: root/shell/evolution-shell-client.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2002-11-06 01:21:39 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2002-11-06 01:21:39 +0800
commit1bb3a9f0a8a0a54f9d563e637c2c4e52eaf77ef3 (patch)
tree9892437935470e600ea1cf4715403ba121d3f6d1 /shell/evolution-shell-client.c
parentf8172191adf212f4829e05be6a224c13e10b898c (diff)
downloadgsoc2013-evolution-1bb3a9f0a8a0a54f9d563e637c2c4e52eaf77ef3.tar.gz
gsoc2013-evolution-1bb3a9f0a8a0a54f9d563e637c2c4e52eaf77ef3.tar.zst
gsoc2013-evolution-1bb3a9f0a8a0a54f9d563e637c2c4e52eaf77ef3.zip
New. (impl_finalize): New. (destroy): Removed. (class_init): Install
* 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. (class_init): Install finalize handler, not destroy. * e-shell-about-box.c (e_shell_about_box_construct): Removed. svn path=/trunk/; revision=18554
Diffstat (limited to 'shell/evolution-shell-client.c')
-rw-r--r--shell/evolution-shell-client.c46
1 files changed, 31 insertions, 15 deletions
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)) {