aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-vfolder.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-05-12 02:46:10 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-05-12 02:46:10 +0800
commit2cdd37023cf53fa60302e7ffe26d912d891d62c4 (patch)
treec8302c026f16b5aeeaaed3fe5b5b15ded59846ff /mail/mail-vfolder.c
parentdaf971fbe586b9ed7cf9293172d8cd267648c766 (diff)
downloadgsoc2013-evolution-2cdd37023cf53fa60302e7ffe26d912d891d62c4.tar.gz
gsoc2013-evolution-2cdd37023cf53fa60302e7ffe26d912d891d62c4.tar.zst
gsoc2013-evolution-2cdd37023cf53fa60302e7ffe26d912d891d62c4.zip
Don't allow multiple copies of this to be run at a time.
2001-05-11 Jeffrey Stedfast <fejj@ximian.com> * mail-vfolder.c (vfolder_edit): Don't allow multiple copies of this to be run at a time. * mail-callbacks.c (providers_config): Don't allow multiple copies of this to be run at a time. (manage_subscriptions): Same, but this was a tad more kludgy since we don't gnome_dialog_run_and_close() this one. I had to make the widget a semi-global variable. yuck :\ (filter_edit): Same. svn path=/trunk/; revision=9762
Diffstat (limited to 'mail/mail-vfolder.c')
-rw-r--r--mail/mail-vfolder.c24
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