diff options
author | Matthew Barnes <mbarnes@src.gnome.org> | 2008-08-19 10:55:45 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@src.gnome.org> | 2008-08-19 10:55:45 +0800 |
commit | 035744f29bdea64cfb38f2e507020d5914cd666e (patch) | |
tree | 98f062db0de5a09700524fe219d0a377f30a706a /shell/test | |
parent | 4187293731274274e4283d9039f6e30c95578118 (diff) | |
download | gsoc2013-evolution-035744f29bdea64cfb38f2e507020d5914cd666e.tar.gz gsoc2013-evolution-035744f29bdea64cfb38f2e507020d5914cd666e.tar.zst gsoc2013-evolution-035744f29bdea64cfb38f2e507020d5914cd666e.zip |
Committing the day's progress.
Realized the "New" menu construction algorithm needs to live independently of
shell view instances since we lazy load the shell views but have to display
all possible "New" items immediately.
Prototype the mechanisms for managing the various shell views and keeping
track of which one is current.
Various other tightening up and rethinking of APIs.
svn path=/branches/kill-bonobo/; revision=36022
Diffstat (limited to 'shell/test')
-rw-r--r-- | shell/test/e-test-shell-module.c | 26 | ||||
-rw-r--r-- | shell/test/e-test-shell-view.c | 10 |
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 = |