aboutsummaryrefslogtreecommitdiffstats
path: root/shell/test
diff options
context:
space:
mode:
Diffstat (limited to 'shell/test')
-rw-r--r--shell/test/e-test-shell-module.c26
-rw-r--r--shell/test/e-test-shell-view.c10
2 files changed, 20 insertions, 16 deletions
diff --git a/shell/test/e-test-shell-module.c b/shell/test/e-test-shell-module.c
index 16515c1e30..de6210f654 100644
--- a/shell/test/e-test-shell-module.c
+++ b/shell/test/e-test-shell-module.c
@@ -22,15 +22,16 @@
#include "e-test-shell-view.h"
-#define MODULE_SORT_ORDER 100
-#define MODULE_ALIASES "test"
+#define MODULE_NAME "test"
+#define MODULE_ALIASES "monkey"
#define MODULE_SCHEMES ""
+#define MODULE_SORT_ORDER 100
/* Module Entry Point */
void e_shell_module_init (GTypeModule *module);
static gboolean
-test_module_is_busy (void)
+test_module_is_busy (EShellModule *shell_module)
{
g_debug ("%s", G_STRFUNC);
@@ -38,7 +39,7 @@ test_module_is_busy (void)
}
static gboolean
-test_module_shutdown (void)
+test_module_shutdown (EShellModule *shell_module)
{
g_debug ("%s", G_STRFUNC);
@@ -46,7 +47,8 @@ test_module_shutdown (void)
}
static gboolean
-test_module_handle_uri (const gchar *uri)
+test_module_handle_uri (EShellModule *shell_module,
+ const gchar *uri)
{
g_debug ("%s (uri=%s)", G_STRFUNC, uri);
@@ -54,23 +56,24 @@ test_module_handle_uri (const gchar *uri)
}
static void
-test_module_send_and_receive (void)
+test_module_send_and_receive (EShellModule *shell_module)
{
g_debug ("%s", G_STRFUNC);
}
static void
-test_module_window_created (EShellWindow *window)
+test_module_window_created (EShellModule *shell_module,
+ EShellWindow *shell_window)
{
- g_debug ("%s (window=%p)", G_STRFUNC, window);
+ g_debug ("%s (window=%p)", G_STRFUNC, shell_window);
}
static EShellModuleInfo module_info = {
- MODULE_SORT_ORDER,
+ MODULE_NAME,
MODULE_ALIASES,
MODULE_SCHEMES,
- G_TYPE_INVALID,
+ MODULE_SORT_ORDER,
/* Methods */
test_module_is_busy,
@@ -83,7 +86,6 @@ static EShellModuleInfo module_info = {
void
e_shell_module_init (GTypeModule *module)
{
- g_type_module_set_name (module, "name");
- module_info.shell_view_type = e_test_shell_view_get_type (module);
+ e_test_shell_view_get_type (module);
e_shell_module_set_info (E_SHELL_MODULE (module), &module_info);
}
diff --git a/shell/test/e-test-shell-view.c b/shell/test/e-test-shell-view.c
index 7b2ff9a251..c76d459160 100644
--- a/shell/test/e-test-shell-view.c
+++ b/shell/test/e-test-shell-view.c
@@ -34,7 +34,8 @@ GType e_test_shell_view_type = 0;
static gpointer parent_class;
static void
-test_shell_view_class_init (ETestShellViewClass *class)
+test_shell_view_class_init (ETestShellViewClass *class,
+ GTypeModule *module)
{
EShellViewClass *shell_view_class;
@@ -44,6 +45,7 @@ test_shell_view_class_init (ETestShellViewClass *class)
shell_view_class = E_SHELL_VIEW_CLASS (class);
shell_view_class->label = N_("Test");
shell_view_class->icon_name = "face-monkey";
+ shell_view_class->module = module;
}
static void
@@ -62,11 +64,11 @@ e_test_shell_view_get_type (GTypeModule *module)
(GBaseFinalizeFunc) NULL,
(GClassInitFunc) test_shell_view_class_init,
(GClassFinalizeFunc) NULL,
- NULL, /* class_data */
+ module, /* class_data */
sizeof (ETestShellView),
- 0, /* n_preallocs */
+ 0, /* n_preallocs */
(GInstanceInitFunc) test_shell_view_init,
- NULL /* value_table */
+ NULL /* value_table */
};
e_test_shell_view_type =