aboutsummaryrefslogtreecommitdiffstats
path: root/shell/evolution-test-component.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2001-06-24 18:39:51 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2001-06-24 18:39:51 +0800
commit5b52672a1524bd6fda554c2abab496f856a5bbee (patch)
treec8784249c7572a620eb50dcf170d2b57c5c0e91c /shell/evolution-test-component.c
parent8677833cfac274823f23f8ef4669cbeda1293780 (diff)
downloadgsoc2013-evolution-5b52672a1524bd6fda554c2abab496f856a5bbee.tar.gz
gsoc2013-evolution-5b52672a1524bd6fda554c2abab496f856a5bbee.tar.zst
gsoc2013-evolution-5b52672a1524bd6fda554c2abab496f856a5bbee.zip
Add code to query the ::Activity interface in the
EvolutionShellComponent class and get the test component to use it. svn path=/trunk/; revision=10448
Diffstat (limited to 'shell/evolution-test-component.c')
-rw-r--r--shell/evolution-test-component.c32
1 files changed, 9 insertions, 23 deletions
diff --git a/shell/evolution-test-component.c b/shell/evolution-test-component.c
index 1b5b428059..40ea6b6e7c 100644
--- a/shell/evolution-test-component.c
+++ b/shell/evolution-test-component.c
@@ -45,7 +45,6 @@ static const EvolutionShellComponentFolderType folder_types[] = {
static EvolutionShellClient *parent_shell = NULL;
-static GNOME_Evolution_Activity activity_interface = CORBA_OBJECT_NIL;
static CORBA_long activity_id = 0;
@@ -133,9 +132,8 @@ timeout_callback_3 (void *data)
CORBA_exception_init (&ev);
- GNOME_Evolution_Activity_operationFinished (activity_interface,
- activity_id,
- &ev);
+ GNOME_Evolution_Activity_operationFinished (evolution_shell_client_get_activity_interface (parent_shell),
+ activity_id, &ev);
if (ev._major != CORBA_NO_EXCEPTION) {
g_warning ("Cannot report operation as finished; exception returned -- %s\n",
@@ -160,7 +158,7 @@ timeout_callback_2 (void *data)
CORBA_exception_init (&ev);
- GNOME_Evolution_Activity_operationProgressing (activity_interface,
+ GNOME_Evolution_Activity_operationProgressing (evolution_shell_client_get_activity_interface (parent_shell),
activity_id,
"Operation Foo in progress",
(CORBA_float) progress / 100.0,
@@ -191,13 +189,13 @@ timeout_callback_1 (void *data)
CORBA_boolean suggest_display;
CORBA_Environment ev;
GNOME_Evolution_AnimatedIcon *animated_icon;
+ GNOME_Evolution_Activity activity_interface;
- CORBA_exception_init (&ev);
-
- if (CORBA_Object_is_nil (activity_interface, &ev)) {
- CORBA_exception_free (&ev);
+ activity_interface = evolution_shell_client_get_activity_interface (parent_shell);
+ if (activity_interface== CORBA_OBJECT_NIL)
return FALSE;
- }
+
+ CORBA_exception_init (&ev);
g_print ("Component becoming busy -- %s\n", COMPONENT_ID);
@@ -284,26 +282,14 @@ owner_set_callback (EvolutionShellComponent *shell_component,
EvolutionShellClient *shell_client,
const char *evolution_homedir)
{
- CORBA_Environment ev;
-
g_assert (parent_shell == NULL);
g_print ("We have an owner -- home directory is `%s'\n", evolution_homedir);
parent_shell = shell_client;
- CORBA_exception_init (&ev);
-
- activity_interface = Bonobo_Unknown_queryInterface (bonobo_object_corba_objref (BONOBO_OBJECT (shell_client)),
- "IDL:GNOME/Evolution/Activity:1.0",
- &ev);
- if (ev._major != CORBA_NO_EXCEPTION)
- activity_interface = CORBA_OBJECT_NIL;
-
- if (CORBA_Object_is_nil (activity_interface, &ev))
+ if (evolution_shell_client_get_activity_interface (parent_shell) == CORBA_OBJECT_NIL)
g_warning ("Shell doesn't have a ::Activity interface -- weird!");
-
- CORBA_exception_free (&ev);
}
static int