aboutsummaryrefslogtreecommitdiffstats
path: root/smime/gui
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@novell.com>2010-08-11 04:17:40 +0800
committerMichael Meeks <michael.meeks@novell.com>2010-08-11 04:17:40 +0800
commit18813ccd8f4367ac98348f08e183d858cfe963f5 (patch)
tree370b866001d65bd5d1c343331bd01d8d4df3f975 /smime/gui
parentabd3e2a257586a96cac80f9ac860bba3c3d65d30 (diff)
downloadgsoc2013-evolution-18813ccd8f4367ac98348f08e183d858cfe963f5.tar.gz
gsoc2013-evolution-18813ccd8f4367ac98348f08e183d858cfe963f5.tar.zst
gsoc2013-evolution-18813ccd8f4367ac98348f08e183d858cfe963f5.zip
Defer the load / creation of configuration UI with changes to
e_preferences_window to take factory callbacks and store a reference to the shell. - This makes start-up substantially faster, particularly on Atom (eg.). Remove a number of idle handlers used to create these UIs in the first instance, cleaning the code.
Diffstat (limited to 'smime/gui')
-rw-r--r--smime/gui/certificate-manager.c21
-rw-r--r--smime/gui/certificate-manager.h5
2 files changed, 12 insertions, 14 deletions
diff --git a/smime/gui/certificate-manager.c b/smime/gui/certificate-manager.c
index e35bb1d5fd..35dd650f63 100644
--- a/smime/gui/certificate-manager.c
+++ b/smime/gui/certificate-manager.c
@@ -1090,15 +1090,18 @@ populate_ui (CertificateManagerData *cfm)
return FALSE;
}
-void
-certificate_manager_config_init (EShell *shell)
+
+GtkWidget *
+certificate_manager_config_new (EPreferencesWindow *window)
{
- CertificateManagerData *cfm_data;
- GtkWidget *preferences_window;
+ EShell *shell;
GtkWidget *parent;
GtkWidget *widget;
+ CertificateManagerData *cfm_data;
+
+ shell = e_preferences_window_get_shell (window);
- g_return_if_fail (E_IS_SHELL (shell));
+ g_return_val_if_fail (E_IS_SHELL (shell), NULL);
/* We need to peek the db here to make sure it (and NSS) are fully initialized. */
e_cert_db_peek ();
@@ -1148,11 +1151,5 @@ certificate_manager_config_init (EShell *shell)
gtk_widget_set_sensitive(cfm_data->backup_your_button, FALSE);
gtk_widget_set_sensitive(cfm_data->backup_all_your_button, FALSE);
- preferences_window = e_shell_get_preferences_window (shell);
- e_preferences_window_add_page (
- E_PREFERENCES_WINDOW (preferences_window),
- "certificates",
- "preferences-certificates",
- _("Certificates"),
- widget, 700);
+ return widget;
}
diff --git a/smime/gui/certificate-manager.h b/smime/gui/certificate-manager.h
index 9107e203de..ebe7111f55 100644
--- a/smime/gui/certificate-manager.h
+++ b/smime/gui/certificate-manager.h
@@ -23,12 +23,13 @@
#ifndef _CERTIFICATE_MANAGER_H_
#define _CERTIFICATE_MANAGER_H
-#include <glib.h>
+#include <gtk/gtk.h>
#include <shell/e-shell.h>
+#include <widgets/misc/e-preferences-window.h>
G_BEGIN_DECLS
-void certificate_manager_config_init (EShell *shell);
+GtkWidget *certificate_manager_config_new (EPreferencesWindow *window);
G_END_DECLS