aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/component/e-book-shell-module.c
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook/gui/component/e-book-shell-module.c')
-rw-r--r--addressbook/gui/component/e-book-shell-module.c44
1 files changed, 23 insertions, 21 deletions
diff --git a/addressbook/gui/component/e-book-shell-module.c b/addressbook/gui/component/e-book-shell-module.c
index b538c59559..139f55ffd4 100644
--- a/addressbook/gui/component/e-book-shell-module.c
+++ b/addressbook/gui/component/e-book-shell-module.c
@@ -63,7 +63,7 @@
void e_shell_module_init (GTypeModule *type_module);
static void
-book_shell_module_ensure_sources (EShellModule *shell_module)
+book_module_ensure_sources (EShellModule *shell_module)
{
/* XXX This is basically the same algorithm across all modules.
* Maybe we could somehow integrate this into EShellModule? */
@@ -193,7 +193,7 @@ book_shell_module_ensure_sources (EShellModule *shell_module)
}
static void
-book_shell_module_init_importers (void)
+book_module_init_importers (void)
{
EImportClass *import_class;
EImportImporter *importer;
@@ -217,9 +217,9 @@ book_shell_module_init_importers (void)
}
static void
-book_shell_module_book_loaded_cb (EBook *book,
- EBookStatus status,
- gpointer user_data)
+book_module_book_loaded_cb (EBook *book,
+ EBookStatus status,
+ gpointer user_data)
{
EContact *contact;
GtkAction *action;
@@ -280,8 +280,7 @@ action_contact_new_cb (GtkAction *action,
if (book == NULL)
book = e_book_new_default_addressbook (NULL);
- e_book_async_open (
- book, FALSE, book_shell_module_book_loaded_cb, action);
+ e_book_async_open (book, FALSE, book_module_book_loaded_cb, action);
}
static void
@@ -319,21 +318,21 @@ static GtkActionEntry source_entries[] = {
};
static gboolean
-book_shell_module_is_busy (EShellModule *shell_module)
+book_module_is_busy (EShellModule *shell_module)
{
return !eab_editor_request_close_all ();
}
static gboolean
-book_shell_module_shutdown (EShellModule *shell_module)
+book_module_shutdown (EShellModule *shell_module)
{
/* FIXME */
return TRUE;
}
static gboolean
-book_shell_module_handle_uri (EShellModule *shell_module,
- const gchar *uri)
+book_module_handle_uri_cb (EShellModule *shell_module,
+ const gchar *uri)
{
EUri *euri;
const gchar *cp;
@@ -398,19 +397,22 @@ book_shell_module_handle_uri (EShellModule *shell_module,
}
static void
-book_shell_module_window_created (EShellModule *shell_module,
- EShellWindow *shell_window)
+book_module_window_created_cb (EShellModule *shell_module,
+ GtkWindow *window)
{
const gchar *module_name;
+ if (!E_IS_SHELL_WINDOW (window))
+ return;
+
module_name = G_TYPE_MODULE (shell_module)->name;
e_shell_window_register_new_item_actions (
- shell_window, module_name,
+ E_SHELL_WINDOW (window), module_name,
item_entries, G_N_ELEMENTS (item_entries));
e_shell_window_register_new_source_actions (
- shell_window, module_name,
+ E_SHELL_WINDOW (window), module_name,
source_entries, G_N_ELEMENTS (source_entries));
}
@@ -422,8 +424,8 @@ static EShellModuleInfo module_info = {
MODULE_SORT_ORDER,
/* Methods */
- book_shell_module_is_busy,
- book_shell_module_shutdown,
+ book_module_is_busy,
+ book_module_shutdown,
e_book_shell_module_migrate
};
@@ -447,18 +449,18 @@ e_shell_module_init (GTypeModule *type_module)
certificate_manager_config_init ();
#endif
- book_shell_module_init_importers ();
- book_shell_module_ensure_sources (shell_module);
+ book_module_init_importers ();
+ book_module_ensure_sources (shell_module);
e_plugin_hook_register_type (eab_config_get_type ());
g_signal_connect_swapped (
shell, "handle-uri",
- G_CALLBACK (book_shell_module_handle_uri), shell_module);
+ G_CALLBACK (book_module_handle_uri_cb), shell_module);
g_signal_connect_swapped (
shell, "window-created",
- G_CALLBACK (book_shell_module_window_created), shell_module);
+ G_CALLBACK (book_module_window_created_cb), shell_module);
autocompletion_config_init ();
}