aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-10-25 12:46:18 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-10-25 12:46:18 +0800
commit0ea79651b85c4acdb49ddd6b5c9bc0c021e977e3 (patch)
tree30a5b6551fd0ad8b732bd1b266bda20bc26ad408 /shell/e-shell.c
parent47f9f8c3e78916409320a7fcdd0fe05ab83bd352 (diff)
downloadgsoc2013-evolution-0ea79651b85c4acdb49ddd6b5c9bc0c021e977e3.tar
gsoc2013-evolution-0ea79651b85c4acdb49ddd6b5c9bc0c021e977e3.tar.gz
gsoc2013-evolution-0ea79651b85c4acdb49ddd6b5c9bc0c021e977e3.tar.bz2
gsoc2013-evolution-0ea79651b85c4acdb49ddd6b5c9bc0c021e977e3.tar.lz
gsoc2013-evolution-0ea79651b85c4acdb49ddd6b5c9bc0c021e977e3.tar.xz
gsoc2013-evolution-0ea79651b85c4acdb49ddd6b5c9bc0c021e977e3.tar.zst
gsoc2013-evolution-0ea79651b85c4acdb49ddd6b5c9bc0c021e977e3.zip
register event hook.
2004-10-25 Not Zed <NotZed@Ximian.com> * main.c (main): register event hook. * e-shell.c (offline_procedure_finished_cb, e_shell_go_online): emit new state changed event. * main.c (main): register the menu hook. (): only define DEVELOPMENT if not already. * e-shell-window.c (init): setup menu manager. (e_shell_window_new): activate menu manager. (update_offline_toggle_status): update the menu manager when the offline state changes (currently only state which requires it) * es-menu.[ch]: Shell plugin menu manager. svn path=/trunk/; revision=27712
Diffstat (limited to 'shell/e-shell.c')
-rw-r--r--shell/e-shell.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/shell/e-shell.c b/shell/e-shell.c
index 07c7dd9df5..5664f669c3 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -41,6 +41,7 @@
#include "e-shell-startup-wizard.h"
#include "e-shell-marshal.h"
+#include "es-event.h"
#include "evolution-shell-component-utils.h"
@@ -1057,6 +1058,7 @@ offline_procedure_finished_cb (EShellOfflineHandler *offline_handler,
{
EShell *shell;
EShellPrivate *priv;
+ ESEvent *ese;
shell = E_SHELL (data);
priv = shell->priv;
@@ -1071,6 +1073,17 @@ offline_procedure_finished_cb (EShellOfflineHandler *offline_handler,
priv->offline_handler = NULL;
g_signal_emit (shell, signals[LINE_STATUS_CHANGED], 0, priv->line_status);
+
+ /** @Event: Shell online state changed
+ * @Id: state.changed
+ * @Target: ESMenuTargetState
+ *
+ * This event is emitted whenever the shell online state changes.
+ *
+ * Only the online and offline states are emitted.
+ */
+ ese = es_event_peek();
+ e_event_emit((EEvent *)ese, "state.changed", (EEventTarget *)es_event_target_new_state(ese, TRUE));
}
/**
@@ -1120,7 +1133,8 @@ e_shell_go_online (EShell *shell,
EShellPrivate *priv;
GSList *component_infos;
GSList *p;
-
+ ESEvent *ese;
+
g_return_if_fail (shell != NULL);
g_return_if_fail (E_IS_SHELL (shell));
g_return_if_fail (action_window == NULL || E_IS_SHELL_WINDOW (action_window));
@@ -1153,6 +1167,9 @@ e_shell_go_online (EShell *shell,
priv->line_status = E_SHELL_LINE_STATUS_ONLINE;
e_passwords_set_online (TRUE);
g_signal_emit (shell, signals[LINE_STATUS_CHANGED], 0, priv->line_status);
+
+ ese = es_event_peek();
+ e_event_emit((EEvent *)ese, "state.changed", (EEventTarget *)es_event_target_new_state(ese, TRUE));
}