From 1b782407524f2ca4a2dc4849098a21f9d1bdff09 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 19 Feb 2009 12:31:06 +0000 Subject: Fix crash on startup. svn path=/branches/kill-bonobo/; revision=37295 --- addressbook/gui/component/autocompletion-config.c | 9 ++++----- addressbook/gui/component/autocompletion-config.h | 3 ++- addressbook/gui/component/e-book-shell-module.c | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'addressbook/gui/component') diff --git a/addressbook/gui/component/autocompletion-config.c b/addressbook/gui/component/autocompletion-config.c index a58e1f3195..3341f26147 100644 --- a/addressbook/gui/component/autocompletion-config.c +++ b/addressbook/gui/component/autocompletion-config.c @@ -24,12 +24,11 @@ #include "autocompletion-config.h" -#include -#include #include #include #include #include +#include #include "widgets/misc/e-preferences-window.h" @@ -93,13 +92,14 @@ initialize_selection (ESourceSelector *source_selector) } void -autocompletion_config_init (void) +autocompletion_config_init (EShell *shell) { ESourceList *source_list; GtkWidget *scrolled_window; GtkWidget *source_selector; GtkWidget *preferences_window; - EShell *shell; + + g_return_if_fail (E_IS_SHELL (shell)); source_list = e_source_list_new_for_gconf_default ( "/apps/evolution/addressbook/sources"); @@ -125,7 +125,6 @@ autocompletion_config_init (void) initialize_selection (E_SOURCE_SELECTOR (source_selector)); - shell = e_shell_get_default (); preferences_window = e_shell_get_preferences_window (shell); e_preferences_window_add_page ( diff --git a/addressbook/gui/component/autocompletion-config.h b/addressbook/gui/component/autocompletion-config.h index c2cf6b55d0..f546a9d497 100644 --- a/addressbook/gui/component/autocompletion-config.h +++ b/addressbook/gui/component/autocompletion-config.h @@ -26,10 +26,11 @@ #define _AUTOCOMPLETION_CONFIG_H #include +#include G_BEGIN_DECLS -void autocompletion_config_init (void); +void autocompletion_config_init (EShell *shell); G_END_DECLS diff --git a/addressbook/gui/component/e-book-shell-module.c b/addressbook/gui/component/e-book-shell-module.c index 0197661326..e4648e138d 100644 --- a/addressbook/gui/component/e-book-shell-module.c +++ b/addressbook/gui/component/e-book-shell-module.c @@ -458,7 +458,7 @@ e_shell_module_init (GTypeModule *type_module) * things that use S/MIME. Maybe put it in EShell? */ #ifdef ENABLE_SMIME smime_component_init (); - certificate_manager_config_init (); + certificate_manager_config_init (shell); #endif book_module_init_importers (); @@ -474,5 +474,5 @@ e_shell_module_init (GTypeModule *type_module) shell, "window-created", G_CALLBACK (book_module_window_created_cb), shell_module); - autocompletion_config_init (); + autocompletion_config_init (shell); } -- cgit v1.2.3