aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2009-02-19 20:31:06 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2009-02-19 20:31:06 +0800
commit1b782407524f2ca4a2dc4849098a21f9d1bdff09 (patch)
tree95a676e1deb4cec0c1e2930636e6953c87cb8022
parent1a40acf554290883d6cf2a491dc36685842fd26b (diff)
downloadgsoc2013-evolution-1b782407524f2ca4a2dc4849098a21f9d1bdff09.tar.gz
gsoc2013-evolution-1b782407524f2ca4a2dc4849098a21f9d1bdff09.tar.zst
gsoc2013-evolution-1b782407524f2ca4a2dc4849098a21f9d1bdff09.zip
Fix crash on startup.
svn path=/branches/kill-bonobo/; revision=37295
-rw-r--r--addressbook/gui/component/autocompletion-config.c9
-rw-r--r--addressbook/gui/component/autocompletion-config.h3
-rw-r--r--addressbook/gui/component/e-book-shell-module.c4
-rw-r--r--calendar/modules/e-cal-shell-module.c6
-rw-r--r--smime/gui/certificate-manager.c6
-rw-r--r--smime/gui/certificate-manager.h3
6 files changed, 15 insertions, 16 deletions
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 <e-shell.h>
-#include <libedataserverui/e-name-selector-entry.h>
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include <libedataserver/e-source-list.h>
#include <libedataserverui/e-source-selector.h>
+#include <libedataserverui/e-name-selector-entry.h>
#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 <glib.h>
+#include <shell/e-shell.h>
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);
}
diff --git a/calendar/modules/e-cal-shell-module.c b/calendar/modules/e-cal-shell-module.c
index 740f755e85..a312173cdb 100644
--- a/calendar/modules/e-cal-shell-module.c
+++ b/calendar/modules/e-cal-shell-module.c
@@ -428,12 +428,10 @@ static GtkActionEntry source_entries[] = {
};
static void
-cal_module_init_preferences (void)
+cal_module_init_preferences (EShell *shell)
{
GtkWidget *preferences_window;
- EShell *shell;
- shell = e_shell_get_default ();
preferences_window = e_shell_get_preferences_window (shell);
e_preferences_window_add_page (
@@ -508,5 +506,5 @@ e_shell_module_init (GTypeModule *type_module)
shell, "window-created",
G_CALLBACK (cal_module_window_created_cb), shell_module);
- cal_module_init_preferences ();
+ cal_module_init_preferences (shell);
}
diff --git a/smime/gui/certificate-manager.c b/smime/gui/certificate-manager.c
index c8c45b7070..1f1bbb9f13 100644
--- a/smime/gui/certificate-manager.c
+++ b/smime/gui/certificate-manager.c
@@ -977,14 +977,15 @@ populate_ui (CertificateManagerData *cfm)
}
void
-certificate_manager_config_init (void)
+certificate_manager_config_init (EShell *shell)
{
CertificateManagerData *cfm_data;
GtkWidget *preferences_window;
GtkWidget *widget;
- EShell *shell;
char *gladefile;
+ g_return_if_fail (E_IS_SHELL (shell));
+
/* We need to peek the db here to make sure it (and NSS) are fully initialized. */
e_cert_db_peek ();
@@ -1031,7 +1032,6 @@ certificate_manager_config_init (void)
gtk_widget_set_sensitive(cfm_data->backup_your_button, FALSE);
gtk_widget_set_sensitive(cfm_data->backup_all_your_button, FALSE);
- shell = e_shell_get_default ();
preferences_window = e_shell_get_preferences_window (shell);
e_preferences_window_add_page (
E_PREFERENCES_WINDOW (preferences_window),
diff --git a/smime/gui/certificate-manager.h b/smime/gui/certificate-manager.h
index 27813fab26..326b363fd4 100644
--- a/smime/gui/certificate-manager.h
+++ b/smime/gui/certificate-manager.h
@@ -24,10 +24,11 @@
#define _CERTIFICATE_MANAGER_H
#include <glib.h>
+#include <shell/e-shell.h>
G_BEGIN_DECLS
-void certificate_manager_config_init (void);
+void certificate_manager_config_init (EShell *shell);
G_END_DECLS