aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@src.gnome.org>2007-07-03 12:45:33 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2007-07-03 12:45:33 +0800
commit25597a3be248ce035c6efaedfa02fc911e9962b6 (patch)
treeb403b30c9ac17d8eb0d888f361a8bf69888a4135 /shell
parentfd4ae8279b8efacc3ad9d92ad556e57e5d56c5d5 (diff)
downloadgsoc2013-evolution-25597a3be248ce035c6efaedfa02fc911e9962b6.tar
gsoc2013-evolution-25597a3be248ce035c6efaedfa02fc911e9962b6.tar.gz
gsoc2013-evolution-25597a3be248ce035c6efaedfa02fc911e9962b6.tar.bz2
gsoc2013-evolution-25597a3be248ce035c6efaedfa02fc911e9962b6.tar.lz
gsoc2013-evolution-25597a3be248ce035c6efaedfa02fc911e9962b6.tar.xz
gsoc2013-evolution-25597a3be248ce035c6efaedfa02fc911e9962b6.tar.zst
gsoc2013-evolution-25597a3be248ce035c6efaedfa02fc911e9962b6.zip
** Added a hook event after the shell is started.
svn path=/trunk/; revision=33742
Diffstat (limited to 'shell')
-rw-r--r--shell/ChangeLog8
-rw-r--r--shell/e-shell.c8
-rw-r--r--shell/es-event.c11
-rw-r--r--shell/es-event.h11
4 files changed, 37 insertions, 1 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index d39e8241df..63356b1497 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,3 +1,11 @@
+2007-07-03 Srinivasa Ragavan <sragavan@novell.com>
+
+ ** Added a hook event after the shell is started.
+
+ * e-shell.c: (e_shell_create_window):
+ * es-event.c: (es_event_target_new_shell):
+ * es-event.h:
+
2007-06-18 Srinivasa Ragavan <sragavan@novell.com>
** Fix for bug #448201 from Gabor Kelemen
diff --git a/shell/e-shell.c b/shell/e-shell.c
index c6b380a1ec..915e40d491 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -76,6 +76,7 @@ static void set_line_status_complete(EvolutionListener *el, void *data);
#define PARENT_TYPE bonobo_object_get_type ()
static BonoboObjectClass *parent_class = NULL;
+static gboolean session_started = FALSE;
struct _EShellPrivate {
/* IID for registering the object on OAF. */
@@ -946,6 +947,13 @@ e_shell_create_window (EShell *shell,
set_interactive (shell, TRUE);
+ if (!session_started) {
+ ESEvent *ese;
+
+ session_started = TRUE;
+ ese = es_event_peek();
+ e_event_emit((EEvent *)ese, "started.done", (EEventTarget *)es_event_target_new_shell(ese, shell));
+ }
return window;
}
diff --git a/shell/es-event.c b/shell/es-event.c
index 72a05931bd..f48e0c6270 100644
--- a/shell/es-event.c
+++ b/shell/es-event.c
@@ -129,6 +129,16 @@ es_event_target_new_state(ESEvent *eme, int state)
return t;
}
+ESEventTargetShell *
+es_event_target_new_shell(ESEvent *eme, EShell *shell)
+{
+ ESEventTargetShell *t = e_event_target_new(&eme->event, ES_EVENT_TARGET_SHELL, sizeof(*t));
+
+ t->shell = shell;
+
+ return t;
+}
+
ESEventTargetUpgrade *
es_event_target_new_upgrade(ESEvent *eme, int major, int minor, int revision)
{
@@ -155,6 +165,7 @@ static const EEventHookTargetMask emeh_state_masks[] = {
static const EEventHookTargetMap emeh_targets[] = {
{ "state", ES_EVENT_TARGET_STATE, emeh_state_masks },
{ "upgrade", ES_EVENT_TARGET_UPGRADE, NULL },
+ { "shell", ES_EVENT_TARGET_SHELL, NULL },
{ 0 }
};
diff --git a/shell/es-event.h b/shell/es-event.h
index e857b97c1a..ef3cb2c618 100644
--- a/shell/es-event.h
+++ b/shell/es-event.h
@@ -26,6 +26,7 @@
#include <glib-object.h>
#include "e-util/e-event.h"
+#include "e-shell.h"
#ifdef __cplusplus
extern "C" {
@@ -38,7 +39,8 @@ typedef struct _ESEventClass ESEventClass;
/* Current target description */
enum _es_event_target_t {
ES_EVENT_TARGET_STATE,
- ES_EVENT_TARGET_UPGRADE
+ ES_EVENT_TARGET_UPGRADE,
+ ES_EVENT_TARGET_SHELL
};
/* Flags that qualify TARGET_STATE */
@@ -49,6 +51,13 @@ enum {
typedef struct _ESEventTargetState ESEventTargetState;
typedef struct _ESEventTargetUpgrade ESEventTargetUpgrade;
+typedef struct _ESEventTargetShell ESEventTargetShell;
+
+struct _ESEventTargetShell {
+ EEventTarget target;
+
+ EShell *shell;
+};
struct _ESEventTargetState {
EEventTarget target;