evolution r35983 - in branches/kill-bonobo: . shell shell/test
- From: mbarnes svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution r35983 - in branches/kill-bonobo: . shell shell/test
- Date: Wed, 13 Aug 2008 22:22:50 +0000 (UTC)
Author: mbarnes
Date: Wed Aug 13 22:22:49 2008
New Revision: 35983
URL: http://svn.gnome.org/viewvc/evolution?rev=35983&view=rev
Log:
Demonstrate loading the test module.
Added:
branches/kill-bonobo/shell/test/evolution-test-module.c
Removed:
branches/kill-bonobo/shell/test/GNOME_Evolution_Test.server.in.in
branches/kill-bonobo/shell/test/evolution-test-component.c
branches/kill-bonobo/shell/test/evolution-test-component.h
Modified:
branches/kill-bonobo/configure.in
branches/kill-bonobo/evolution-shell.pc.in
branches/kill-bonobo/shell/Makefile.am
branches/kill-bonobo/shell/e-shell-registry.c
branches/kill-bonobo/shell/e-shell.c
branches/kill-bonobo/shell/main.c
branches/kill-bonobo/shell/test/Makefile.am
Modified: branches/kill-bonobo/configure.in
==============================================================================
--- branches/kill-bonobo/configure.in (original)
+++ branches/kill-bonobo/configure.in Wed Aug 13 22:22:49 2008
@@ -1634,6 +1634,9 @@
componentdir="$privlibdir/components"
AC_SUBST(componentdir)
+moduledir="$privlibdir/modules"
+AC_SUBST(moduledir)
+
idldir='${datadir}'/idl/evolution-$BASE_VERSION
AC_SUBST(idldir)
Modified: branches/kill-bonobo/evolution-shell.pc.in
==============================================================================
--- branches/kill-bonobo/evolution-shell.pc.in (original)
+++ branches/kill-bonobo/evolution-shell.pc.in Wed Aug 13 22:22:49 2008
@@ -11,6 +11,7 @@
privincludedir= privincludedir@
idldir= idldir@
componentdir= componentdir@
+moduledir= moduledir@
evolutionuidir= evolutionuidir@
imagesdir= imagesdir@
Modified: branches/kill-bonobo/shell/Makefile.am
==============================================================================
--- branches/kill-bonobo/shell/Makefile.am (original)
+++ branches/kill-bonobo/shell/Makefile.am Wed Aug 13 22:22:49 2008
@@ -13,7 +13,7 @@
-DEVOLUTION_DATADIR=\""$(datadir)"\" \
-DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \
-DEVOLUTION_HELPDIR=\""$(evolutionhelpdir)"\" \
- -DEVOLUTION_MODULEDIR=\""$(evolutionmoduledir)"\" \
+ -DEVOLUTION_MODULEDIR=\""$(moduledir)"\" \
-DEVOLUTION_UIDIR=\""$(evolutionuidir)"\" \
-DEVOLUTION_TOOLSDIR=\""$(privlibexecdir)"\" \
-DPREFIX=\""$(prefix)"\" \
Modified: branches/kill-bonobo/shell/e-shell-registry.c
==============================================================================
--- branches/kill-bonobo/shell/e-shell-registry.c (original)
+++ branches/kill-bonobo/shell/e-shell-registry.c Wed Aug 13 22:22:49 2008
@@ -58,8 +58,6 @@
return;
}
- g_type_module_unuse (G_TYPE_MODULE (shell_module));
-
loaded_modules = g_list_insert_sorted (
loaded_modules, shell_module,
(GCompareFunc) e_shell_module_compare);
@@ -121,7 +119,7 @@
GList *
e_shell_registry_list_modules (void)
{
- return g_list_copy (loaded_modules);
+ return loaded_modules;
}
GType *
Modified: branches/kill-bonobo/shell/e-shell.c
==============================================================================
--- branches/kill-bonobo/shell/e-shell.c (original)
+++ branches/kill-bonobo/shell/e-shell.c Wed Aug 13 22:22:49 2008
@@ -60,6 +60,7 @@
static guint source_id = 0;
static guint message_timer = 1;
+ /* Module list is read-only; do not free. */
list = e_shell_registry_list_modules ();
/* Any module can defer shutdown if it's still busy. */
@@ -79,8 +80,6 @@
message_timer = (message_timer + 1) % 10;
- g_list_free (list);
-
/* If we're go for shutdown, destroy all shell windows. Note,
* we iterate over a /copy/ of the active windows list because
* the act of destroying a shell window will modify the active
@@ -118,6 +117,10 @@
G_OBJECT (shell_window), (GWeakNotify)
shell_window_weak_notify_cb, NULL);
+ g_list_foreach (
+ e_shell_registry_list_modules (),
+ (GFunc) e_shell_module_window_created, shell_window);
+
gtk_widget_show (shell_window);
return E_SHELL_WINDOW (shell_window);
@@ -162,7 +165,9 @@
void
e_shell_send_receive (GtkWindow *parent)
{
- /* FIXME */
+ g_list_foreach (
+ e_shell_registry_list_modules (),
+ (GFunc) e_shell_module_send_and_receive, NULL);
}
void
Modified: branches/kill-bonobo/shell/main.c
==============================================================================
--- branches/kill-bonobo/shell/main.c (original)
+++ branches/kill-bonobo/shell/main.c Wed Aug 13 22:22:49 2008
@@ -35,6 +35,7 @@
#include <e-util/e-icon-factory.h>
#include "e-shell-constants.h"
+#include "e-shell-registry.h"
#include "e-util/e-profile-event.h"
#include "e-util/e-util.h"
@@ -661,7 +662,8 @@
glade_init ();
e_cursors_init ();
e_icon_factory_init ();
- e_passwords_init();
+ e_passwords_init ();
+ e_shell_registry_init ();
gtk_window_set_default_icon_name ("evolution");
Modified: branches/kill-bonobo/shell/test/Makefile.am
==============================================================================
--- branches/kill-bonobo/shell/test/Makefile.am (original)
+++ branches/kill-bonobo/shell/test/Makefile.am Wed Aug 13 22:22:49 2008
@@ -1,4 +1,4 @@
-component_LTLIBRARIES = libevolution-test.la
+module_LTLIBRARIES = libevolution-test.la
INCLUDES = \
-I$(top_srcdir)/shell \
@@ -8,8 +8,7 @@
$(EVOLUTION_TEST_CFLAGS)
libevolution_test_la_SOURCES = \
- evolution-test-component.c \
- evolution-test-component.h
+ evolution-test-module.c
libevolution_test_la_LIBADD = \
$(top_builddir)/shell/libeshell.la \
@@ -17,19 +16,3 @@
libevolution_test_la_LDFLAGS = \
-avoid-version -module $(NO_UNDEFINED)
-
-testserver_in_files = GNOME_Evolution_Test.server.in.in
-testserver_DATA = $(testserver_in_files:.server.in.in=.server)
-testserverdir = $(serverdir)
- EVO_SERVER_RULE@
- INTLTOOL_SERVER_RULE@
-
-BUILT_SOURCES = $(testserver_DATA)
-CLEANFILES = $(BUILT_SOURCES)
-
-EXTRA_DIST = \
- $(testserver_in_files) \
- GNOME_Evolution_Test.server.in.in
-
-dist-hook:
- cd $(distdir); rm -f $(BUILD_SOURCES)
Added: branches/kill-bonobo/shell/test/evolution-test-module.c
==============================================================================
--- (empty file)
+++ branches/kill-bonobo/shell/test/evolution-test-module.c Wed Aug 13 22:22:49 2008
@@ -0,0 +1,86 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/* e-test-module.c
+ *
+ * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
+ * License as published by the Free Software Foundation.
+ *
+ * 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
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <e-shell-module.h>
+
+#define MODULE_SORT_ORDER 100
+#define MODULE_ALIASES "test"
+#define MODULE_SCHEMES ""
+
+/* Module Entry Point */
+void e_shell_module_init (GTypeModule *module);
+
+static gboolean
+test_module_is_busy (void)
+{
+ g_debug ("%s", G_STRFUNC);
+
+ return FALSE;
+}
+
+static gboolean
+test_module_shutdown (void)
+{
+ g_debug ("%s", G_STRFUNC);
+
+ return TRUE;
+}
+
+static gboolean
+test_module_handle_uri (const gchar *uri)
+{
+ g_debug ("%s (uri=%s)", G_STRFUNC, uri);
+
+ return TRUE;
+}
+
+static void
+test_module_send_and_receive (void)
+{
+ g_debug ("%s", G_STRFUNC);
+}
+
+static void
+test_module_window_created (EShellWindow *window)
+{
+ g_debug ("%s (window=%p)", G_STRFUNC, window);
+}
+
+static EShellModuleInfo module_info = {
+
+ MODULE_SORT_ORDER,
+ MODULE_ALIASES,
+ MODULE_SCHEMES,
+ G_TYPE_INVALID,
+
+ /* Methods */
+ test_module_is_busy,
+ test_module_shutdown,
+ test_module_handle_uri,
+ test_module_send_and_receive,
+ test_module_window_created
+};
+
+void
+e_shell_module_init (GTypeModule *module)
+{
+ g_type_module_set_name (module, "name");
+ e_shell_module_set_info (E_SHELL_MODULE (module), &module_info);
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]