evolution r35332 - trunk/shell
- From: mcrha svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution r35332 - trunk/shell
- Date: Mon, 7 Apr 2008 10:55:12 +0100 (BST)
Author: mcrha
Date: Mon Apr 7 10:55:11 2008
New Revision: 35332
URL: http://svn.gnome.org/viewvc/evolution?rev=35332&view=rev
Log:
2008-04-07 Ondrej Jirman <megous megous com>
** Fix for bug #525238
* e-shell-window.c: (switch_view):
* es-event.c:
* es-event.h:
Add new "component.activated" event. Event is emitted whenever
component is activated. ESEventTargetComponent contains an id
of the component being activated.
Modified:
trunk/shell/ChangeLog
trunk/shell/e-shell-window.c
trunk/shell/es-event.c
trunk/shell/es-event.h
Modified: trunk/shell/e-shell-window.c
==============================================================================
--- trunk/shell/e-shell-window.c (original)
+++ trunk/shell/e-shell-window.c Mon Apr 7 10:55:11 2008
@@ -36,6 +36,7 @@
#include "e-shell-marshal.h"
#include "e-sidebar.h"
#include "es-menu.h"
+#include "es-event.h"
#include <gtk/gtkbutton.h>
#include <gtk/gtkhbox.h>
@@ -356,6 +357,15 @@
g_object_unref (gconf_client);
+ /** @Event: Shell component activated or switched to.
+ * @Id: component.activated
+ * @Target: ESEventTargetComponent
+ *
+ * This event is emitted whenever the shell successfully activates component
+ * view.
+ */
+ e_event_emit ((EEvent *) es_event_peek (), "component.activated", (EEventTarget *) es_event_target_new_component (es_event_peek (), component_view->component_id));
+
g_signal_emit (window, signals[COMPONENT_CHANGED], 0);
}
Modified: trunk/shell/es-event.c
==============================================================================
--- trunk/shell/es-event.c (original)
+++ trunk/shell/es-event.c Mon Apr 7 10:55:11 2008
@@ -152,6 +152,16 @@
return t;
}
+ESEventTargetComponent *
+es_event_target_new_component (ESEvent *eme, const char *id)
+{
+ ESEventTargetComponent *t = e_event_target_new (&eme->event, ES_EVENT_TARGET_COMPONENT, sizeof (*t));
+
+ t->id = id;
+
+ return t;
+}
+
/* ********************************************************************** */
static void *emeh_parent_class;
@@ -167,6 +177,7 @@
{ "state", ES_EVENT_TARGET_STATE, emeh_state_masks },
{ "upgrade", ES_EVENT_TARGET_UPGRADE, NULL },
{ "shell", ES_EVENT_TARGET_SHELL, NULL },
+ { "component", ES_EVENT_TARGET_COMPONENT, NULL },
{ NULL }
};
Modified: trunk/shell/es-event.h
==============================================================================
--- trunk/shell/es-event.h (original)
+++ trunk/shell/es-event.h Mon Apr 7 10:55:11 2008
@@ -41,7 +41,8 @@
enum _es_event_target_t {
ES_EVENT_TARGET_STATE,
ES_EVENT_TARGET_UPGRADE,
- ES_EVENT_TARGET_SHELL
+ ES_EVENT_TARGET_SHELL,
+ ES_EVENT_TARGET_COMPONENT
};
/* Flags that qualify TARGET_STATE */
@@ -53,6 +54,7 @@
typedef struct _ESEventTargetState ESEventTargetState;
typedef struct _ESEventTargetUpgrade ESEventTargetUpgrade;
typedef struct _ESEventTargetShell ESEventTargetShell;
+typedef struct _ESEventTargetComponent ESEventTargetComponent;
struct _ESEventTargetShell {
EEventTarget target;
@@ -74,6 +76,12 @@
int revision;
};
+struct _ESEventTargetComponent {
+ EEventTarget target;
+
+ const char *id;
+};
+
typedef struct _EEventItem ESEventItem;
/* The object */
@@ -94,6 +102,7 @@
ESEventTargetState *es_event_target_new_state(ESEvent *emp, int state);
ESEventTargetShell *es_event_target_new_shell(ESEvent *eme, struct _EShell *shell);
ESEventTargetUpgrade *es_event_target_new_upgrade(ESEvent *emp, int major, int minor, int revision);
+ESEventTargetComponent *es_event_target_new_component(ESEvent *eme, const char *id);
/* ********************************************************************** */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]