aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-07-08 08:37:43 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-07-08 08:37:43 +0800
commit5c866713c795795ef46cc90ed95ed7de98152971 (patch)
treee2572bde0adb2e23d35c6ad3390eb7f9e4ce8965
parent6c808496279d6c0e0f8d96fc7491b655f4a679cf (diff)
downloadgsoc2013-evolution-5c866713c795795ef46cc90ed95ed7de98152971.tar.gz
gsoc2013-evolution-5c866713c795795ef46cc90ed95ed7de98152971.tar.zst
gsoc2013-evolution-5c866713c795795ef46cc90ed95ed7de98152971.zip
Remove ESEvent.
Nudging EPlugin closer to full removal. Nothing in Evolution uses this anymore and 3rd-party plugins should be using EShell's "event::ready-to-start" signal or else GApplication's "startup" signal.
-rw-r--r--doc/reference/evolution-shell/Makefile.am1
-rw-r--r--plugins/publish-calendar/publish-calendar.c1
-rw-r--r--shell/Makefile.am4
-rw-r--r--shell/e-shell-migrate.c15
-rw-r--r--shell/es-event.c125
-rw-r--r--shell/es-event.h87
-rw-r--r--shell/main.c3
7 files changed, 2 insertions, 234 deletions
diff --git a/doc/reference/evolution-shell/Makefile.am b/doc/reference/evolution-shell/Makefile.am
index 5ff5a0af32..7afbc72919 100644
--- a/doc/reference/evolution-shell/Makefile.am
+++ b/doc/reference/evolution-shell/Makefile.am
@@ -15,7 +15,6 @@ CFILE_GLOB=$(top_srcdir)/shell/*.c
IGNORE_HFILES= \
evo-version.h \
e-shell-window-private.h \
- es-event.h \
$(NULL)
GTKDOC_CFLAGS= \
diff --git a/plugins/publish-calendar/publish-calendar.c b/plugins/publish-calendar/publish-calendar.c
index 51ea980eb6..2f1480187e 100644
--- a/plugins/publish-calendar/publish-calendar.c
+++ b/plugins/publish-calendar/publish-calendar.c
@@ -30,7 +30,6 @@
#include <gio/gio.h>
#include <calendar/gui/e-cal-config.h>
-#include <shell/es-event.h>
#include <shell/e-shell.h>
#include <shell/e-shell-view.h>
diff --git a/shell/Makefile.am b/shell/Makefile.am
index a39558b153..7d42a68112 100644
--- a/shell/Makefile.am
+++ b/shell/Makefile.am
@@ -35,7 +35,7 @@ evolution_shell_include_HEADERS = \
e-shell-view.h \
e-shell-window.h \
e-shell-window-actions.h \
- es-event.h
+ $(NULL)
libevolution_shell_la_CPPFLAGS = \
$(AM_CPPFLAGS) \
@@ -83,7 +83,7 @@ libevolution_shell_la_SOURCES = \
e-shell-migrate.h \
e-shell-window-actions.c \
evo-version.h \
- es-event.c
+ $(NULL)
libevolution_shell_la_LDFLAGS = -avoid-version $(NO_UNDEFINED)
diff --git a/shell/e-shell-migrate.c b/shell/e-shell-migrate.c
index 9d74d156e4..20e96960e4 100644
--- a/shell/e-shell-migrate.c
+++ b/shell/e-shell-migrate.c
@@ -25,7 +25,6 @@
#include <glib/gstdio.h>
#include <libedataserver/libedataserver.h>
-#include "es-event.h"
#include "evo-version.h"
static gboolean
@@ -216,7 +215,6 @@ shell_migrate_ready_to_start_event_cb (EShell *shell)
gboolean
e_shell_migrate_attempt (EShell *shell)
{
- ESEvent *ese;
gint major, minor, micro;
g_return_val_if_fail (E_IS_SHELL (shell), FALSE);
@@ -241,19 +239,6 @@ e_shell_migrate_attempt (EShell *shell)
shell, "event::ready-to-start",
G_CALLBACK (shell_migrate_ready_to_start_event_cb), NULL);
- /* @Event: Shell attempted upgrade
- * @Id: upgrade.done
- * @Target: ESMenuTargetState
- *
- * This event is emitted whenever the shell successfully attempts
- * an upgrade.
- */
- ese = es_event_peek ();
- e_event_emit (
- (EEvent *) ese, "upgrade.done",
- (EEventTarget *) es_event_target_new_upgrade (
- ese, EVO_MAJOR_VERSION, EVO_MINOR_VERSION, EVO_MICRO_VERSION));
-
return TRUE;
}
diff --git a/shell/es-event.c b/shell/es-event.c
deleted file mode 100644
index 2fdf432ba0..0000000000
--- a/shell/es-event.c
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) version 3.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with the program; if not, see <http://www.gnu.org/licenses/>
- *
- *
- * Authors:
- * Michael Zucchi <notzed@ximian.com>
- *
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <string.h>
-#include <stdlib.h>
-
-#include "es-event.h"
-#include "e-shell.h"
-
-static ESEvent *es_event;
-
-G_DEFINE_TYPE (ESEvent, es_event, E_TYPE_EVENT)
-
-static void
-es_event_class_init (ESEventClass *class)
-{
-}
-
-static void
-es_event_init (ESEvent *event)
-{
-}
-
-/**
- * es_event_peek:
- *
- * Get the singular instance of the shell event handler.
- *
- * Return: the shell event handler
- **/
-ESEvent *
-es_event_peek (void)
-{
- if (es_event == NULL) {
- es_event = g_object_new (es_event_get_type (), NULL);
- /* @HookPoint: Shell Events Hookpoint
- * Id: org.gnome.evolution.shell.events
- *
- * This is the hook point which emits shell events.
- */
- e_event_construct (&es_event->event, "org.gnome.evolution.shell.events");
- }
-
- return es_event;
-}
-
-ESEventTargetUpgrade *
-es_event_target_new_upgrade (ESEvent *eme,
- gint major,
- gint minor,
- gint revision)
-{
- ESEventTargetUpgrade *t;
-
- t = e_event_target_new (
- &eme->event, ES_EVENT_TARGET_UPGRADE, sizeof (*t));
- t->major = major;
- t->minor = minor;
- t->revision = revision;
-
- return t;
-}
-
-/* ********************************************************************** */
-
-G_DEFINE_TYPE (ESEventHook, es_event_hook, E_TYPE_EVENT_HOOK)
-
-static const EEventHookTargetMap emeh_targets[] = {
- { "upgrade", ES_EVENT_TARGET_UPGRADE, NULL },
- { NULL }
-};
-
-static void
-es_event_hook_class_init (ESEventHookClass *class)
-{
- EPluginHookClass *plugin_hook_class;
- EEventHookClass *event_hook_class;
- gint i;
-
- /* @HookClass: Shell Main Menu
- * @Id: org.gnome.evolution.shell.events:1.0
- * @Target: ESEventTargetState
- *
- * A hook for events coming from the shell.
- */
-
- plugin_hook_class = E_PLUGIN_HOOK_CLASS (class);
- plugin_hook_class->id = "org.gnome.evolution.shell.events:1.0";
-
- for (i = 0; emeh_targets[i].type; i++)
- e_event_hook_class_add_target_map (
- (EEventHookClass *) class, &emeh_targets[i]);
-
- event_hook_class = E_EVENT_HOOK_CLASS (class);
- event_hook_class->event = (EEvent *) es_event_peek ();
-}
-
-static void
-es_event_hook_init (ESEventHook *hook)
-{
-}
-
diff --git a/shell/es-event.h b/shell/es-event.h
deleted file mode 100644
index 67ff1b4b87..0000000000
--- a/shell/es-event.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) version 3.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with the program; if not, see <http://www.gnu.org/licenses/>
- *
- *
- * Authors:
- * Michel Zucchi <notzed@ximian.com>
- *
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
- */
-
-#ifndef __ES_EVENT_H__
-#define __ES_EVENT_H__
-
-#include <e-util/e-util.h>
-
-G_BEGIN_DECLS
-
-typedef struct _ESEvent ESEvent;
-typedef struct _ESEventClass ESEventClass;
-
-/* Current target description */
-enum _es_event_target_t {
- ES_EVENT_TARGET_UPGRADE
-};
-
-typedef struct _ESEventTargetUpgrade ESEventTargetUpgrade;
-
-struct _ESEventTargetUpgrade {
- EEventTarget target;
-
- gint major;
- gint minor;
- gint revision;
-};
-
-typedef struct _EEventItem ESEventItem;
-
-/* The object */
-struct _ESEvent {
- EEvent event;
-
- struct _ESEventPrivate *priv;
-};
-
-struct _ESEventClass {
- EEventClass event_class;
-};
-
-GType es_event_get_type (void);
-ESEvent * es_event_peek (void);
-ESEventTargetUpgrade *
- es_event_target_new_upgrade (ESEvent *event,
- gint major,
- gint minor,
- gint revision);
-
-/* ********************************************************************** */
-
-typedef struct _ESEventHook ESEventHook;
-typedef struct _ESEventHookClass ESEventHookClass;
-
-struct _ESEventHook {
- EEventHook hook;
-};
-
-struct _ESEventHookClass {
- EEventHookClass hook_class;
-};
-
-GType es_event_hook_get_type (void);
-
-G_END_DECLS
-
-#endif /* __ES_EVENT_H__ */
diff --git a/shell/main.c b/shell/main.c
index b070c03b15..7d73235dce 100644
--- a/shell/main.c
+++ b/shell/main.c
@@ -59,7 +59,6 @@
#include "e-shell.h"
#include "e-shell-migrate.h"
-#include "es-event.h"
#ifdef G_OS_WIN32
#include "e-util/e-win32-defaults.h"
@@ -665,7 +664,6 @@ main (gint argc,
if (!disable_eplugin) {
/* Register built-in plugin hook types. */
- es_event_hook_get_type ();
g_type_ensure (E_TYPE_IMPORT_HOOK);
g_type_ensure (E_TYPE_PLUGIN_UI_HOOK);
@@ -678,7 +676,6 @@ main (gint argc,
* as both shell backends and certain plugins hook into this. */
e_shell_migrate_attempt (shell);
- /* This is an alternative to the "upgrade.done" EEvent. */
e_shell_event (shell, "ready-to-start", NULL);
g_idle_add ((GSourceFunc) idle_cb, remaining_args);