From fd6cd9e3a6dc06f9b8e44ec13ac881ebd6793e6e Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 23 Aug 2008 15:36:32 +0000 Subject: Progress update: - Discard libnm-glib method of monitoring network connectivity. - Decided to make EShell a singleton GObject after all. Makes the design cleaner, despite having to pass a singleton instance around. - Make the switcher button style persistent. svn path=/branches/kill-bonobo/; revision=36043 --- shell/test/e-test-shell-module.c | 40 +++++++++++++++++++++++++++++++++------- 1 file changed, 33 insertions(+), 7 deletions(-) (limited to 'shell/test/e-test-shell-module.c') diff --git a/shell/test/e-test-shell-module.c b/shell/test/e-test-shell-module.c index de6210f654..65c483bad0 100644 --- a/shell/test/e-test-shell-module.c +++ b/shell/test/e-test-shell-module.c @@ -18,7 +18,9 @@ * Boston, MA 02110-1301, USA. */ +#include #include +#include #include "e-test-shell-view.h" @@ -52,13 +54,14 @@ test_module_handle_uri (EShellModule *shell_module, { g_debug ("%s (uri=%s)", G_STRFUNC, uri); - return TRUE; + return FALSE; } static void -test_module_send_and_receive (EShellModule *shell_module) +test_module_send_receive (EShellModule *shell_module, + GtkWindow *parent_window) { - g_debug ("%s", G_STRFUNC); + g_debug ("%s (window=%p)", G_STRFUNC, parent_window); } static void @@ -68,6 +71,13 @@ test_module_window_created (EShellModule *shell_module, g_debug ("%s (window=%p)", G_STRFUNC, shell_window); } +static void +test_module_window_destroyed (EShellModule *shell_module, + gboolean last_window) +{ + g_debug ("%s (last=%d)", G_STRFUNC, last_window); +} + static EShellModuleInfo module_info = { MODULE_NAME, @@ -77,15 +87,31 @@ static EShellModuleInfo module_info = { /* Methods */ test_module_is_busy, - test_module_shutdown, - test_module_handle_uri, - test_module_send_and_receive, - test_module_window_created + test_module_shutdown }; void e_shell_module_init (GTypeModule *module) { + EShell *shell; + e_test_shell_view_get_type (module); + shell = e_shell_module_get_shell (E_SHELL_MODULE (module)); e_shell_module_set_info (E_SHELL_MODULE (module), &module_info); + + g_signal_connect_swapped ( + shell, "handle-uri", + G_CALLBACK (test_module_handle_uri), module); + + g_signal_connect_swapped ( + shell, "send-receive", + G_CALLBACK (test_module_send_receive), module); + + g_signal_connect_swapped ( + shell, "window-created", + G_CALLBACK (test_module_window_created), module); + + g_signal_connect_swapped ( + shell, "window-destroyed", + G_CALLBACK (test_module_window_destroyed), module); } -- cgit v1.2.3