diff options
-rw-r--r-- | smime/ChangeLog | 9 | ||||
-rw-r--r-- | smime/gui/certificate-manager.c | 33 | ||||
-rw-r--r-- | smime/gui/smime-ui.glade | 6 |
3 files changed, 33 insertions, 15 deletions
diff --git a/smime/ChangeLog b/smime/ChangeLog index 249a44fb14..4b0a58a82c 100644 --- a/smime/ChangeLog +++ b/smime/ChangeLog @@ -1,3 +1,12 @@ +2009-02-25 Milan Crha <mcrha@redhat.com> + + ** Fix for bug #572975 + + * gui/smime-ui.glade: Center dialogs. + * gui/certificate-manager.c: (import_your), (import_contact), + (import_ca): Destroy file chooser dialog early enough to not have + hidden any other windows below it. + 2008-10-10 Sankar P <psankar@novell.com> License Changes diff --git a/smime/gui/certificate-manager.c b/smime/gui/certificate-manager.c index 546745199f..2bfeec3ed3 100644 --- a/smime/gui/certificate-manager.c +++ b/smime/gui/certificate-manager.c @@ -130,7 +130,6 @@ static void import_your (GtkWidget *widget, CertificateManagerData *cfm) { GtkWidget *filesel; - const char *filename; GtkFileFilter* filter; @@ -153,7 +152,10 @@ import_your (GtkWidget *widget, CertificateManagerData *cfm) gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filesel), filter); if (GTK_RESPONSE_OK == gtk_dialog_run (GTK_DIALOG (filesel))) { - filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (filesel)); + char *filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (filesel)); + + /* destroy dialog to get rid of it in the GUI */ + gtk_widget_destroy (filesel); if (e_cert_db_import_pkcs12_file (e_cert_db_peek (), filename, NULL /* XXX */)) { @@ -163,9 +165,10 @@ import_your (GtkWidget *widget, CertificateManagerData *cfm) load_certs (cfm, E_CERT_USER, add_user_cert); gtk_tree_view_expand_all (GTK_TREE_VIEW (cfm->yourcerts_treeview)); } - } - gtk_widget_destroy (filesel); + g_free (filename); + } else + gtk_widget_destroy (filesel); } static void @@ -373,7 +376,6 @@ static void import_contact (GtkWidget *widget, CertificateManagerData *cfm) { GtkWidget *filesel; - const char *filename; GtkFileFilter *filter; @@ -396,7 +398,10 @@ import_contact (GtkWidget *widget, CertificateManagerData *cfm) gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filesel), filter); if (GTK_RESPONSE_OK == gtk_dialog_run (GTK_DIALOG (filesel))) { - filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (filesel)); + char *filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (filesel)); + + /* destroy dialog to get rid of it in the GUI */ + gtk_widget_destroy (filesel); if (e_cert_db_import_certs_from_file (e_cert_db_peek (), filename, @@ -409,9 +414,10 @@ import_contact (GtkWidget *widget, CertificateManagerData *cfm) load_certs (cfm, E_CERT_CONTACT, add_contact_cert); gtk_tree_view_expand_all (GTK_TREE_VIEW (cfm->contactcerts_treeview)); } - } - gtk_widget_destroy (filesel); + g_free (filename); + } else + gtk_widget_destroy (filesel); } static void @@ -597,7 +603,6 @@ static void import_ca (GtkWidget *widget, CertificateManagerData *cfm) { GtkWidget *filesel; - const char *filename; GtkFileFilter *filter; @@ -620,7 +625,10 @@ import_ca (GtkWidget *widget, CertificateManagerData *cfm) gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filesel), filter); if (GTK_RESPONSE_OK == gtk_dialog_run (GTK_DIALOG (filesel))) { - filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (filesel)); + char *filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (filesel)); + + /* destroy dialog to get rid of it in the GUI */ + gtk_widget_destroy (filesel); if (e_cert_db_import_certs_from_file (e_cert_db_peek (), filename, @@ -632,9 +640,10 @@ import_ca (GtkWidget *widget, CertificateManagerData *cfm) unload_certs (cfm, E_CERT_CA); load_certs (cfm, E_CERT_CA, add_ca_cert); } - } - gtk_widget_destroy (filesel); + g_free (filename); + } else + gtk_widget_destroy (filesel); } static void diff --git a/smime/gui/smime-ui.glade b/smime/gui/smime-ui.glade index 2ea8fe3b8d..41d119f2ce 100644 --- a/smime/gui/smime-ui.glade +++ b/smime/gui/smime-ui.glade @@ -6,7 +6,7 @@ <widget class="GtkDialog" id="certificate-viewer-dialog"> <property name="title" translatable="no">dialog1</property> <property name="type">GTK_WINDOW_TOPLEVEL</property> - <property name="window_position">GTK_WIN_POS_NONE</property> + <property name="window_position">GTK_WIN_POS_CENTER</property> <property name="modal">False</property> <property name="resizable">True</property> <property name="destroy_with_parent">False</property> @@ -1850,7 +1850,7 @@ <widget class="GtkDialog" id="ca-trust-dialog"> <property name="title" translatable="yes">Certificate Authority Trust</property> <property name="type">GTK_WINDOW_TOPLEVEL</property> - <property name="window_position">GTK_WIN_POS_NONE</property> + <property name="window_position">GTK_WIN_POS_CENTER</property> <property name="modal">False</property> <property name="resizable">True</property> <property name="destroy_with_parent">False</property> @@ -2173,7 +2173,7 @@ <widget class="GtkDialog" id="cert-trust-dialog"> <property name="title" translatable="yes">Email Certificate Trust Settings</property> <property name="type">GTK_WINDOW_TOPLEVEL</property> - <property name="window_position">GTK_WIN_POS_NONE</property> + <property name="window_position">GTK_WIN_POS_CENTER</property> <property name="modal">False</property> <property name="resizable">True</property> <property name="destroy_with_parent">False</property> |