From 61066010dcf502a4e3879b8539b92dde34bb27ff Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Thu, 8 Mar 2001 21:20:05 +0000 Subject: Make sure we have something selected first ;-) 2001-03-08 Jeffrey Stedfast * vfolder-editor.c (double_click): Make sure we have something selected first ;-) * filter-editor.c (double_click): And here too. svn path=/trunk/; revision=8599 --- filter/ChangeLog | 7 +++++++ filter/filter-editor.c | 6 +++--- filter/vfolder-editor.c | 6 +++--- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/filter/ChangeLog b/filter/ChangeLog index 3cecbeb156..768891ac77 100644 --- a/filter/ChangeLog +++ b/filter/ChangeLog @@ -1,3 +1,10 @@ +2001-03-08 Jeffrey Stedfast + + * vfolder-editor.c (double_click): Make sure we have something + selected first ;-) + + * filter-editor.c (double_click): And here too. + 2001-03-03 Not Zed * filter.glade: Added option menu to vfolder editor. diff --git a/filter/filter-editor.c b/filter/filter-editor.c index 5fa1796e3f..1c6c46291b 100644 --- a/filter/filter-editor.c +++ b/filter/filter-editor.c @@ -388,10 +388,10 @@ select_rule (GtkWidget *w, GtkWidget *child, struct _editor_data *data) } static void -double_click (GtkWidget *widget, GdkEventButton *event, gpointer user_data) +double_click (GtkWidget *widget, GdkEventButton *event, struct _editor_data *data) { - if (event->type == GDK_2BUTTON_PRESS) - rule_edit (widget, user_data); + if (data->current && event->type == GDK_2BUTTON_PRESS) + rule_edit (widget, data); } /* FIXME: we need a way to change a rule from one source type diff --git a/filter/vfolder-editor.c b/filter/vfolder-editor.c index 1b2022fecb..caa9069ac5 100644 --- a/filter/vfolder-editor.c +++ b/filter/vfolder-editor.c @@ -338,10 +338,10 @@ select_rule (GtkWidget *w, GtkWidget *child, struct _editor_data *data) } static void -double_click (GtkWidget *widget, GdkEventButton *event, gpointer user_data) +double_click (GtkWidget *widget, GdkEventButton *event, struct _editor_data *data) { - if (event->type == GDK_2BUTTON_PRESS) - rule_edit (widget, user_data); + if (data->current && event->type == GDK_2BUTTON_PRESS) + rule_edit (widget, data); } GtkWidget * -- cgit v1.2.3