aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-04-10 05:51:07 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-04-10 05:51:07 +0800
commit0ed26078077a17ad55406e9a2923a240d80681dd (patch)
treed8984a70a818eb00f4b3a8af4f044a2fb4c99ee0
parente5eb5e62f749d65f2316680f4cdcc5f3c8e082b0 (diff)
downloadgsoc2013-evolution-0ed26078077a17ad55406e9a2923a240d80681dd.tar
gsoc2013-evolution-0ed26078077a17ad55406e9a2923a240d80681dd.tar.gz
gsoc2013-evolution-0ed26078077a17ad55406e9a2923a240d80681dd.tar.bz2
gsoc2013-evolution-0ed26078077a17ad55406e9a2923a240d80681dd.tar.lz
gsoc2013-evolution-0ed26078077a17ad55406e9a2923a240d80681dd.tar.xz
gsoc2013-evolution-0ed26078077a17ad55406e9a2923a240d80681dd.tar.zst
gsoc2013-evolution-0ed26078077a17ad55406e9a2923a240d80681dd.zip
This needs to return a gboolean (TRUE). (rule_edit): Using
2002-04-09 Jeffrey Stedfast <fejj@ximian.com> * rule-editor.c (double_click): This needs to return a gboolean (TRUE). (rule_edit): Using gnome_dialog_set_parent instead of gtk_widget_set_parent_window seems to fix bug #23226. svn path=/trunk/; revision=16415
-rw-r--r--filter/ChangeLog7
-rw-r--r--filter/rule-editor.c13
2 files changed, 15 insertions, 5 deletions
diff --git a/filter/ChangeLog b/filter/ChangeLog
index eac1cdaaeb..fb65edaf8a 100644
--- a/filter/ChangeLog
+++ b/filter/ChangeLog
@@ -1,3 +1,10 @@
+2002-04-09 Jeffrey Stedfast <fejj@ximian.com>
+
+ * rule-editor.c (double_click): This needs to return a gboolean
+ (TRUE).
+ (rule_edit): Using gnome_dialog_set_parent instead of
+ gtk_widget_set_parent_window seems to fix bug #23226.
+
2002-04-10 Not Zed <NotZed@Ximian.com>
* filtertypes.xml: Added closing ) for "not starts with" subject
diff --git a/filter/rule-editor.c b/filter/rule-editor.c
index f01b93c380..f9350ea372 100644
--- a/filter/rule-editor.c
+++ b/filter/rule-editor.c
@@ -363,9 +363,9 @@ rule_edit (GtkWidget *widget, RuleEditor *re)
GNOME_STOCK_BUTTON_CANCEL,
NULL);
+ gnome_dialog_set_parent (GNOME_DIALOG (re->dialog), GTK_WINDOW (re));
gtk_window_set_default_size (GTK_WINDOW (re->dialog), 600, 400);
gtk_window_set_policy (GTK_WINDOW (re->dialog), FALSE, TRUE, FALSE);
- gtk_widget_set_parent_window (re->dialog, GTK_WIDGET (re)->window);
gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (re->dialog)->vbox), rules, TRUE, TRUE, 0);
gtk_signal_connect (GTK_OBJECT (re->dialog), "clicked", edit_editor_clicked, re);
gtk_signal_connect (GTK_OBJECT (re->dialog), "destroy", edit_editor_destroyed, re);
@@ -385,7 +385,7 @@ rule_delete (GtkWidget *widget, RuleEditor *re)
d(printf ("delete rule\n"));
pos = rule_context_get_rank_rule (re->context, re->current, re->source);
if (pos != -1) {
- gint len;
+ int len;
rule_context_remove_rule (re->context, re->current);
@@ -393,7 +393,7 @@ rule_delete (GtkWidget *widget, RuleEditor *re)
l = g_list_append (NULL, item);
gtk_list_remove_items (re->list, l);
g_list_free (l);
-
+
rule_editor_add_undo(re, RULE_EDITOR_LOG_REMOVE, re->current, rule_context_get_rank_rule(re->context, re->current, re->current->source), 0);
#if 0
gtk_object_unref (GTK_OBJECT (re->current));
@@ -496,11 +496,13 @@ select_rule (GtkWidget *w, GtkWidget *child, RuleEditor *re)
rule_editor_set_sensitive (re);
}
-static void
+static gboolean
double_click (GtkWidget *widget, GdkEventButton *event, RuleEditor *re)
{
if (re->current && event->type == GDK_2BUTTON_PRESS)
rule_edit (widget, re);
+
+ return TRUE;
}
static void
@@ -641,7 +643,8 @@ rule_editor_construct (RuleEditor *re, RuleContext *context, GladeXML *gui, cons
re->list = (GtkList *) w = glade_xml_get_widget(gui, "rule_list");
gtk_signal_connect (GTK_OBJECT (w), "select_child", select_rule, re);
- gtk_signal_connect (GTK_OBJECT (w), "button_press_event", double_click, re);
+ gtk_signal_connect (GTK_OBJECT (w), "button_press_event",
+ GTK_SIGNAL_FUNC (double_click), re);
gtk_signal_connect (GTK_OBJECT (re), "clicked", editor_clicked, re);
rule_editor_set_source (re, source);