aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2001-05-03 09:10:46 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2001-05-03 09:10:46 +0800
commit483ebae5399d6aa7d63e471ea6000021a4be94fb (patch)
tree8de0a4611e800febfffa59c25d3b9d806d380757 /shell/e-shell.c
parent0ac06ee5b0cf27803e037b8bb5f3998898200bd1 (diff)
downloadgsoc2013-evolution-483ebae5399d6aa7d63e471ea6000021a4be94fb.tar.gz
gsoc2013-evolution-483ebae5399d6aa7d63e471ea6000021a4be94fb.tar.zst
gsoc2013-evolution-483ebae5399d6aa7d63e471ea6000021a4be94fb.zip
Add interfaces to the shell to handle off-line operation, as well as a
first (unfinished/untested) implementation for them. svn path=/trunk/; revision=9653
Diffstat (limited to 'shell/e-shell.c')
-rw-r--r--shell/e-shell.c105
1 files changed, 105 insertions, 0 deletions
diff --git a/shell/e-shell.c b/shell/e-shell.c
index f9b38e666a..c2c5f39893 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -44,6 +44,7 @@
#include "e-local-storage.h"
#include "e-shell-constants.h"
#include "e-shell-folder-selection-dialog.h"
+#include "e-shell-offline-handler.h"
#include "e-shell-view.h"
#include "e-shortcuts.h"
#include "e-storage-set.h"
@@ -74,8 +75,15 @@ struct _EShellPrivate {
ECorbaStorageRegistry *corba_storage_registry;
+ /* This object handles going off-line. If the pointer is not NULL, it
+ means we have a going-off-line process in progress. */
+ EShellOfflineHandler *offline_handler;
+
/* Names for the types of the folders that have maybe crashed. */
GList *crash_type_names; /* char * */
+
+ /* Whether the shell is off-line or not. */
+ guint is_offline : 1;
};
@@ -606,6 +614,10 @@ destroy (GtkObject *object)
if (priv->corba_storage_registry != NULL)
bonobo_object_unref (BONOBO_OBJECT (priv->corba_storage_registry));
+ /* FIXME. Maybe we should do something special here. */
+ if (priv->offline_handler != NULL)
+ gtk_object_unref (GTK_OBJECT (priv->offline_handler));
+
e_free_string_list (priv->crash_type_names);
g_free (priv);
@@ -680,7 +692,9 @@ init (EShell *shell)
priv->component_registry = NULL;
priv->folder_type_registry = NULL;
priv->corba_storage_registry = NULL;
+ priv->offline_handler = NULL;
priv->crash_type_names = NULL;
+ priv->is_offline = FALSE;
shell->priv = priv;
}
@@ -1257,4 +1271,95 @@ e_shell_component_maybe_crashed (EShell *shell,
}
+/**
+ * e_shell_is_offline:
+ * @shell: A pointer to an EShell object.
+ *
+ * Return whether @shell is working in off-line mode.
+ *
+ * Return value: %TRUE if the @shell is working in off-line mode, %FALSE
+ * otherwise.
+ **/
+gboolean
+e_shell_is_offline (EShell *shell)
+{
+ g_return_val_if_fail (shell != NULL, FALSE);
+ g_return_val_if_fail (E_IS_SHELL (shell), FALSE);
+
+ return shell->priv->is_offline;
+}
+
+/**
+ * e_shell_go_offline:
+ * @shell:
+ * @action_view:
+ *
+ * Make the shell go into off-line mode.
+ **/
+void
+e_shell_go_offline (EShell *shell,
+ EShellView *action_view)
+{
+ EShellPrivate *priv;
+
+ g_return_if_fail (shell != NULL);
+ g_return_if_fail (E_IS_SHELL (shell));
+ g_return_if_fail (action_view != NULL);
+ g_return_if_fail (action_view == NULL || E_IS_SHELL_VIEW (action_view));
+
+ priv = shell->priv;
+}
+
+/**
+ * e_shell_go_online:
+ * @shell:
+ * @action_view:
+ *
+ * Make the shell go into on-line mode.
+ **/
+void
+e_shell_go_online (EShell *shell,
+ EShellView *action_view)
+{
+ EShellPrivate *priv;
+ GList *component_ids;
+ GList *p;
+
+ g_return_if_fail (shell != NULL);
+ g_return_if_fail (E_IS_SHELL (shell));
+ g_return_if_fail (action_view == NULL || E_IS_SHELL_VIEW (action_view));
+
+ priv = shell->priv;
+
+ component_ids = e_component_registry_get_id_list (priv->component_registry);
+
+ for (p = component_ids; p != NULL; p = p->next) {
+ CORBA_Environment ev;
+ EvolutionShellComponentClient *client;
+ GNOME_Evolution_Offline offline_interface;
+ const char *id;
+
+ id = (const char *) p->data;
+ client = e_component_registry_get_component_by_id (priv->component_registry, id);
+
+ CORBA_exception_init (&ev);
+
+ offline_interface = evolution_shell_component_client_get_offline_interface (client);
+
+ if (CORBA_Object_is_nil (offline_interface, &ev) || ev._major != CORBA_NO_EXCEPTION) {
+ CORBA_exception_free (&ev);
+ continue;
+ }
+
+ GNOME_Evolution_Offline_goOnline (offline_interface, &ev);
+ if (ev._major != CORBA_NO_EXCEPTION)
+ g_warning ("Error putting component `%s' online.", id);
+
+ CORBA_exception_free (&ev);
+ }
+
+ e_free_string_list (component_ids);
+}
+
+
E_MAKE_TYPE (e_shell, "EShell", EShell, class_init, init, PARENT_TYPE)
2016-07-04 lang/intel2gas: Broken for more than 6 months 2016-07-04 lang/stalin: Broken for more than 6 months 2016-07-04 french/eric4: Depends on expiring devel/eric4 2016-07-04 textproc/exslt: Broken for more than 6 months 2016-07-04 textproc/xt: Broken for more than 6 months 2016-07-04 textproc/ssddiff: Broken for more than 6 months 2016-07-04 textproc/xslint: Broken for more than 6 months 2016-07-04 textproc/cbedic: Broken for more than 6 months 2016-07-04 textproc/tralics: Broken for more than 6 months 2016-07-04 textproc/docbookide.el: Broken for more than 6 months 2016-07-04 textproc/glpi-plugins-AdditionalReports: Broken for more than 6 months 2016-07-04 textproc/tdhkit: Broken for more than 6 months 2016-07-04 textproc/p5-Groonga-API: Broken for more than 6 months 2016-07-04 textproc/glpi-plugins-DataInjection: Broken for more than 6 months 2016-07-04 dns/ldnsm: Broken for more than 6 months 2016-07-04 japanese/guesswork-classic: Broken for more than 6 months 2016-07-04 japanese/texinfo: Broken for more than 6 months 2016-07-04 japanese/jyuroku: Broken for more than 6 months 2016-07-04 japanese/mtools: Broken for more than 6 months 2016-07-04 palm/pdbar: Broken for more than 6 months 2016-07-04 graphics/gplot: Broken for more than 6 months 2016-07-04 graphics/white_dune: Broken for more than 6 months 2016-07-04 graphics/whirlgif: Broken for more than 6 months 2016-07-04 graphics/libaux: Broken for more than 6 months 2016-07-04 graphics/import-pictures: Broken for more than 6 months 2016-07-04 math/xgobi: Broken for more than 6 months 2016-07-04 math/fricas: Broken for more than 6 months 2016-07-04 math/dcdflib: Broken for more than 6 months 2016-07-04 math/libneural: Broken for more than 6 months 2016-07-04 math/open-axiom: Broken for more than 6 months 2016-07-04 irc/nefarious: Broken for more than 6 months 2016-07-04 irc/slirc: Broken for more than 6 months 2016-07-04 irc/ratbox-respond: Broken for more than 6 months 2016-07-04 irc/qwebirc: Broken for more than 6 months 2016-07-04 biology/platon: Broken for more than 6 months 2016-07-04 news/slnr: Broken for more than 6 months 2016-07-04 science/jmol: Broken for more than 6 months 2016-07-04 net/nstxd: Broken for more than 6 months 2016-07-04 net/sprinkle: Broken for more than 6 months 2016-07-04 editors/ssam: Broken for more than 6 months 2016-07-04 editors/fb: Broken for more than 6 months 2016-07-04 misc/quotes: Broken for more than 6 months 2016-07-04 misc/boxquote.el: Broken for more than 6 months 2016-07-04 misc/pypanda: Broken for more than 6 months 2016-07-04 misc/cuecat: Broken for more than 6 months 2016-07-04 deskutils/displaycalibrator: Broken for more than 6 months 2016-07-04 german/eric4: Depends on expiring devel/eric4 2016-07-04 multimedia/vic: Depends on expiring devel/uclmmbase 2016-07-04 multimedia/ggrab: Broken for more than 6 months 2016-07-04 emulators/dynamips: Broken for more than 6 months 2016-07-04 emulators/dynamips-devel: Broken for more than 6 months 2016-07-04 emulators/sim6811: Broken for more than 6 months 2016-07-04 emulators/minivmac: Broken for more than 6 months 2016-07-04 cad/qcad-partslib: Broken for more than 6 months 2016-07-04 comms/dump1090_mr: Broken for more than 6 months 2016-07-04 x11-fm/asfiles: Depends on expiring x11/libdnd 2016-07-04 x11-fonts/fonts-te: Broken for more than 6 months 2016-07-04 sysutils/rsyncmanager: Broken for more than 6 months 2016-07-04 sysutils/jfbterm: Broken for more than 6 months 2016-07-04 sysutils/daedalus: Broken for more than 6 months 2016-07-04 sysutils/pcfclock: Broken for more than 6 months 2016-07-04 sysutils/vlogger: Broken for more than 6 months 2016-07-04 sysutils/bontmia: Broken for more than 6 months 2016-07-04 mail/pop3gwd: Broken for more than 6 months 2016-07-04 mail/mailtray: Broken for more than 6 months 2016-07-04 mail/pflogstats: Broken for more than 6 months 2016-07-04 mail/exact: Broken for more than 6 months 2016-07-04 mail/wmpop3: Broken for more than 6 months 2016-07-04 mail/qmail-conf: Broken for more than 6 months 2016-07-04 mail/gld: Broken for more than 6 months 2016-07-04 mail/dsbl-testers: Broken for more than 6 months 2016-07-04 mail/vqregister: Broken for more than 6 months 2016-07-04 mail/atmail: Broken for more than 6 months 2016-07-04 mail/ml: Broken for more than 6 months 2016-07-04 net-im/icb: Broken for more than 6 months 2016-07-04 net-im/cicquin: Broken for more than 6 months 2016-07-04 net-im/pidgin-manualsize: Broken for more than 6 months 2016-07-04 net-im/pidgin-rhythmbox: Broken for more than 6 months 2016-07-04 russian/eric4: Depends on expiring devel/eric4 2016-07-04 russian/fortune-bashorgru: Broken for more than 6 months 2016-07-04 www/xpi-clearfields: Broken for more than 6 months 2016-07-04 www/pecl-varnish: Broken for more than 6 months 2016-07-04 www/py-requests-oauth-hook: Broken for more than 6 months 2016-07-04 www/hudson: Broken for more than 6 months 2016-07-04 www/xpi-mldonkey: Broken for more than 6 months 2016-07-04 www/xpi-cookiesafe: Broken for more than 6 months 2016-07-04 www/trac-mastertickets: Broken for more than 6 months 2016-07-04 www/dotclear: Broken for more than 6 months 2016-07-04 www/ruby-wgettsv: Broken for more than 6 months 2016-07-04 www/wwwstat: Broken for more than 6 months 2016-07-04 www/xpi-prism: Broken for more than 6 months 2016-07-04 www/xpi-fasterfox: Broken for more than 6 months 2016-07-04 www/siteframe: Broken for more than 6 months 2016-07-04 www/py-urljr: Broken for more than 6 months 2016-07-04 www/reviewboard: Broken for more than 6 months 2016-07-04 www/xpi-tabletools: Broken for more than 6 months 2016-07-04 www/wikindx: Broken for more than 6 months 2016-07-04 www/typolight: Broken for more than 6 months 2016-07-04 www/varnish-libvmod-header: Broken for more than 6 months 2016-07-04 www/xpi-gbrain: Broken for more than 6 months 2016-07-04 www/trac-robotstxt: Broken for more than 6 months 2016-07-04 www/simplog: Broken for more than 6 months 2016-07-04 www/chtml: Broken for more than 6 months 2016-07-04 databases/postgresql_autodoc: Broken for more than 6 months 2016-07-04 databases/oracle_odbc_driver: Broken for more than 6 months 2016-07-04 databases/mysql-xql: Broken for more than 6 months 2016-07-04 databases/mysql-udf-sys: Broken for more than 6 months 2016-07-04 games/lucidlife: Broken for more than 6 months 2016-07-04 games/gma: Broken for more than 6 months 2016-07-04 games/smiley: Broken for more than 6 months 2016-07-04 games/noegnud-littlehack: Broken for more than 6 months 2016-07-04 games/sdlquake2: Broken for more than 6 months 2016-07-04 games/daimonin: Depends on expiring games/daimonin-music 2016-07-04 games/noegnud-nethack: Broken for more than 6 months 2016-07-04 games/xbomber: Broken for more than 6 months 2016-07-04 games/xwelltris: Broken for more than 6 months 2016-07-04 games/ftjava: Broken for more than 6 months 2016-07-04 games/daimonin-music: Broken for more than 6 months 2016-07-04 games/gno3dtet: Broken for more than 6 months 2016-07-04 games/qtv: Broken for more than 6 months 2016-07-04 games/xwordpy: Broken for more than 6 months 2016-07-04 games/netris: Broken for more than 6 months 2016-07-04 games/rt2-demo: Broken for more than 6 months 2016-07-04 games/noegnud-addons: Broken for more than 6 months 2016-07-04 games/noegnud-nethack-deet: Broken for more than 6 months 2016-07-04 games/live-f1: Broken for more than 6 months 2016-07-04 games/xonix: Broken for more than 6 months 2016-07-04 games/fgkicker: Broken for more than 6 months 2016-07-04 games/tank: Depends on expiring graphics/libaux 2016-07-04 games/linux-nwserver: Broken for more than 6 months 2016-07-04 games/quake2-zaero: Broken for more than 6 months 2016-07-04 games/pyching: Broken for more than 6 months 2016-07-04 games/thevalley: Broken for more than 6 months 2016-07-04 games/xroads: Broken for more than 6 months 2016-07-04 games/fxsudoku: Broken for more than 6 months 2016-07-04 games/sudoku: Broken for more than 6 months 2016-07-04 games/kmancala: Broken for more than 6 months 2016-07-04 games/plonx: Broken for more than 6 months 2016-07-04 games/wmminichess: Broken for more than 6 months 2016-07-04 games/noegnud-slashem: Broken for more than 6 months 2016-07-04 games/latrine: Broken for more than 6 months 2016-07-04 games/pysycache-themes: Broken for more than 6 months 2016-07-04 games/nibbles: Broken for more than 6 months 2016-07-04 games/hlstatsx: Broken for more than 6 months 2016-07-04 audio/streamtuner: Broken for more than 6 months 2016-07-04 audio/mangler: Broken for more than 6 months 2016-07-04 audio/hawkvoice: Broken for more than 6 months 2016-07-04 audio/alac: Broken for more than 6 months 2016-07-04 x11-wm/e-module-mpdule: Broken for more than 6 months 2016-07-04 x11-wm/e-module-tclock: Broken for more than 6 months 2016-07-04 x11-wm/musca: Broken for more than 6 months 2016-07-04 x11-wm/e-module-places: Broken for more than 6 months 2016-07-04 x11-wm/e-module-forecasts: Broken for more than 6 months 2016-07-04 x11-wm/e-module-net: Broken for more than 6 months 2016-07-04 x11-wm/e-module-penguins: Broken for more than 6 months 2016-07-04 ftp/fget: Broken for more than 6 months 2016-07-04 net-mgmt/netmond: Broken for more than 6 months 2016-07-04 net-mgmt/ipfm: Broken for more than 6 months