aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--shell/ChangeLog13
-rw-r--r--shell/e-shell.c18
-rw-r--r--shell/evolution-shell-client.c21
-rw-r--r--shell/evolution-shell-client.h9
4 files changed, 58 insertions, 3 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 2fb964e268..f390c83f56 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,3 +1,16 @@
+2001-08-15 Jason Leach <jleach@ximian.com>
+
+ * Evolution-Shell.idl: Add a new IDL function,
+ Evolution::Shell::setLineStatus (in boolean). Bug #3030.
+
+ * e-shell.c (impl_Shell_setLineStatus): Implementation of the
+ above.
+
+ * evolution-shell-client.c
+ (evolution_shell_client_set_line_status): A wrapper function for
+ the above, this is what a component can call to set the shell
+ on/offline.
+
2001-08-14 Dan Winship <danw@ximian.com>
* evolution-storage.c (evolution_storage_new_folder): Use the
diff --git a/shell/e-shell.c b/shell/e-shell.c
index 5c8a7c53cc..2bbe551709 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -412,6 +412,23 @@ impl_Shell_createStorageSetView (PortableServer_Servant servant,
return bonobo_object_corba_objref (BONOBO_OBJECT (control));
}
+static void
+impl_Shell_setLineStatus (PortableServer_Servant servant,
+ CORBA_boolean online,
+ CORBA_Environment *ev)
+{
+ BonoboObject *bonobo_object;
+ EShell *shell;
+
+ bonobo_object = bonobo_object_from_servant (servant);
+ shell = E_SHELL (bonobo_object);
+
+ if (online)
+ e_shell_go_online (shell, NULL);
+ else
+ e_shell_go_offline (shell, NULL);
+}
+
/* Set up the ::Activity interface. */
@@ -793,6 +810,7 @@ class_init (EShellClass *klass)
epv->selectUserFolder = impl_Shell_selectUserFolder;
epv->getLocalStorage = impl_Shell_getLocalStorage;
epv->createStorageSetView = impl_Shell_createStorageSetView;
+ epv->setLineStatus = impl_Shell_setLineStatus;
}
static void
diff --git a/shell/evolution-shell-client.c b/shell/evolution-shell-client.c
index f3aaf036d7..b907f7e97a 100644
--- a/shell/evolution-shell-client.c
+++ b/shell/evolution-shell-client.c
@@ -471,5 +471,26 @@ evolution_shell_client_get_local_storage (EvolutionShellClient *shell_client)
return corba_local_storage;
}
+void
+evolution_shell_client_set_line_status (EvolutionShellClient *shell_client,
+ gboolean line_status)
+{
+ GNOME_Evolution_Shell corba_shell;
+ CORBA_Environment ev;
+
+ g_return_val_if_fail (shell_client != NULL, CORBA_OBJECT_NIL);
+ g_return_val_if_fail (EVOLUTION_IS_SHELL_CLIENT (shell_client), CORBA_OBJECT_NIL);
+
+ CORBA_exception_init (&ev);
+
+ corba_shell = bonobo_object_corba_objref (BONOBO_OBJECT (shell_client));
+ if (corba_shell == CORBA_OBJECT_NIL)
+ return;
+
+ GNOME_Evolution_Shell_setLineStatus (corba_shell, line_status, &ev);
+
+ CORBA_exception_free (&ev);
+}
+
E_MAKE_TYPE (evolution_shell_client, "EvolutionShellClient", EvolutionShellClient, class_init, init, PARENT_TYPE)
diff --git a/shell/evolution-shell-client.h b/shell/evolution-shell-client.h
index ac23fb98e9..f4fd194f58 100644
--- a/shell/evolution-shell-client.h
+++ b/shell/evolution-shell-client.h
@@ -67,10 +67,13 @@ void evolution_shell_client_user_select_folder (EvolutionShe
char **uri_return,
char **physical_uri_return);
-GNOME_Evolution_Activity evolution_shell_client_get_activity_interface (EvolutionShellClient *shell_client);
-GNOME_Evolution_Shortcuts evolution_shell_client_get_shortcuts_interface (EvolutionShellClient *shell_client);
+GNOME_Evolution_Activity evolution_shell_client_get_activity_interface (EvolutionShellClient *shell_client);
+GNOME_Evolution_Shortcuts evolution_shell_client_get_shortcuts_interface (EvolutionShellClient *shell_client);
-GNOME_Evolution_Storage evolution_shell_client_get_local_storage (EvolutionShellClient *shell_client);
+GNOME_Evolution_Storage evolution_shell_client_get_local_storage (EvolutionShellClient *shell_client);
+
+void evolution_shell_client_set_line_status (EvolutionShellClient *shell_client,
+ gboolean online);
#ifdef __cplusplus
}