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
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
(* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
|
||||
static void
|
||||
impl_finalize (GObject *object)
|
||||
{
|
||||
EvolutionShellComponentClient *client;
|
||||
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user