diff options
Diffstat (limited to 'mail/mail-vfolder.c')
-rw-r--r-- | mail/mail-vfolder.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/mail/mail-vfolder.c b/mail/mail-vfolder.c index 8642993ae2..39753a5cf1 100644 --- a/mail/mail-vfolder.c +++ b/mail/mail-vfolder.c @@ -349,6 +349,14 @@ vfolder_uri_to_folder(const char *uri, CamelException *ex) return folder; } +static GtkWidget *vfolder_editor = NULL; + +static void +vfolder_editor_destroy (GtkWidget *widget, gpointer user_data) +{ + vfolder_editor = NULL; +} + static void vfolder_editor_clicked(GtkWidget *w, int button, void *data) { @@ -366,13 +374,17 @@ vfolder_editor_clicked(GtkWidget *w, int button, void *data) } void -vfolder_edit(void) +vfolder_edit (void) { - GtkWidget *w; - - w = GTK_WIDGET (vfolder_editor_new (context)); - gtk_signal_connect (GTK_OBJECT (w), "clicked", vfolder_editor_clicked, NULL); - gtk_widget_show (w); + if (vfolder_editor) { + /* FIXME: raise the vfolder editor window? */ + return; + } + + vfolder_editor = GTK_WIDGET (vfolder_editor_new (context)); + gtk_signal_connect (GTK_OBJECT (vfolder_editor), "clicked", vfolder_editor_clicked, NULL); + gtk_signal_connect (GTK_OBJECT (vfolder_editor), "destroy", vfolder_editor_destroy, NULL); + gtk_widget_show (vfolder_editor); } static void |