[evolution] Fix filter breakage after deprecated Gtk+ symbols removal



commit c868ace2e93942aef027085353bff2bd736584b3
Author: Milan Crha <mcrha redhat com>
Date:   Tue Apr 28 16:31:45 2009 +0200

    Fix filter breakage after deprecated Gtk+ symbols removal
    
    	** Fix for bug #572348
    
    	* filter/filter-option.c: (combobox_changed), (get_widget):
    	* mail/em-filter-rule.c: (part_combobox_changed):
    	* mail/em-filter-source-element.c: (source_changed):
    	Fix breakage of filter options.
---
 filter/ChangeLog                |    7 +++++++
 filter/filter-option.c          |    5 ++++-
 mail/ChangeLog                  |    8 ++++++++
 mail/em-filter-rule.c           |    2 +-
 mail/em-filter-source-element.c |    2 +-
 5 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/filter/ChangeLog b/filter/ChangeLog
index 656210d..daf8946 100644
--- a/filter/ChangeLog
+++ b/filter/ChangeLog
@@ -1,3 +1,10 @@
+2009-04-28  Milan Crha  <mcrha redhat com>
+
+	** Fix for bug #572348
+
+	* filter-option.c: (combobox_changed), (get_widget):
+	Fix breakage of filter options.
+
 2009-04-24  Milan Crha  <mcrha redhat com>
 
 	** Fix for bug #572348
diff --git a/filter/filter-option.c b/filter/filter-option.c
index 3b93084..7c5bbe9 100644
--- a/filter/filter-option.c
+++ b/filter/filter-option.c
@@ -346,7 +346,7 @@ combobox_changed (GtkWidget *widget, FilterElement *fe)
 {
 	FilterOption *fo = (FilterOption *)fe;
 
-	fo->current = (struct _filter_option *) g_list_nth (fo->options, gtk_combo_box_get_active (GTK_COMBO_BOX (widget)));
+	fo->current = (struct _filter_option *) g_list_nth_data (fo->options, gtk_combo_box_get_active (GTK_COMBO_BOX (widget)));
 }
 
 static GSList *
@@ -439,6 +439,9 @@ get_widget (FilterElement *fe)
 		op = l->data;
 		gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _(op->title));
 
+		if (op == fo->current)
+			current = index;
+
 		l = g_list_next (l);
 		index++;
 	}
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 97599a4..359083a 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,13 @@
 2009-04-28  Milan Crha  <mcrha redhat com>
 
+	** Fix for bug #572348
+
+	* em-filter-rule.c: (part_combobox_changed):
+	* em-filter-source-element.c: (source_changed):
+	Fix breakage of filter options.
+
+2009-04-28  Milan Crha  <mcrha redhat com>
+
 	** Fix for bug #579550
 
 	* mail-session.c: (main_get_filter_driver):
diff --git a/mail/em-filter-rule.c b/mail/em-filter-rule.c
index 10f06e3..45dd78c 100644
--- a/mail/em-filter-rule.c
+++ b/mail/em-filter-rule.c
@@ -331,7 +331,7 @@ part_combobox_changed (GtkComboBox *combobox, struct _part_data *data)
 	int index, i;
 
 	index = gtk_combo_box_get_active (combobox);
-	for (i = 0, part = rule_context_next_part (RULE_CONTEXT (data->f), part); part && i < index; i++, part = rule_context_next_part (RULE_CONTEXT (data->f), part)) {
+	for (i = 0, part = em_filter_context_next_action (data->f, part); part && i < index; i++, part = em_filter_context_next_action (data->f, part)) {
 		/* traverse until reached index */
 	}
 
diff --git a/mail/em-filter-source-element.c b/mail/em-filter-source-element.c
index 096f91b..e358716 100644
--- a/mail/em-filter-source-element.c
+++ b/mail/em-filter-source-element.c
@@ -240,7 +240,7 @@ source_changed(GtkComboBox *combobox, EMFilterSourceElement *fs)
 	idx = gtk_combo_box_get_active (combobox);
 	g_return_if_fail (idx >= 0 && idx < g_list_length (fs->priv->sources));
 
-	info = (SourceInfo *) g_list_nth (fs->priv->sources, idx);
+	info = (SourceInfo *) g_list_nth_data (fs->priv->sources, idx);
 	g_return_if_fail (info != NULL);
 
 	g_free (fs->priv->current_url);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]