diff options
author | Matthew Barnes <mbarnes@src.gnome.org> | 2008-10-25 07:52:05 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@src.gnome.org> | 2008-10-25 07:52:05 +0800 |
commit | 85b2913a380c69f14ae0254ad23b10fabfb33667 (patch) | |
tree | c1cf143e37294dd9dd3667ebbe0a1d0c00b04b56 /filter | |
parent | e7a31c5035a0afeed6c1675e30487c1e2bdc139f (diff) | |
download | gsoc2013-evolution-85b2913a380c69f14ae0254ad23b10fabfb33667.tar.gz gsoc2013-evolution-85b2913a380c69f14ae0254ad23b10fabfb33667.tar.zst gsoc2013-evolution-85b2913a380c69f14ae0254ad23b10fabfb33667.zip |
Merge revisions 36534:36684 from trunk.
svn path=/branches/kill-bonobo/; revision=36685
Diffstat (limited to 'filter')
-rw-r--r-- | filter/ChangeLog | 16 | ||||
-rw-r--r-- | filter/filter-rule.c | 6 | ||||
-rw-r--r-- | filter/rule-editor.c | 26 |
3 files changed, 43 insertions, 5 deletions
diff --git a/filter/ChangeLog b/filter/ChangeLog index 12ee719755..3534320543 100644 --- a/filter/ChangeLog +++ b/filter/ChangeLog @@ -1,3 +1,19 @@ +2008-10-17 Matthew Barnes <mbarnes@redhat.com> + + ** Fix for bug #503898 + + * filter-rule.c: (get_widget): s/criteria/condition/ + +2008-10-06 Lucian Langa <lucilanga@gnome.org> + + ** Fix for bug #554566 + + * rule-editor.c: (rule_editor_class_init), (rule_edit), + (rule_top), (rule_up), (rule_down), (rule_bottom), + (cursor_changed) + (update_selected_rule): new function to update + current selected rule + 2008-10-01 Sankar P <psankar@novell.com> License Changes diff --git a/filter/filter-rule.c b/filter/filter-rule.c index 6b80bf5a3a..9febe8d0ee 100644 --- a/filter/filter-rule.c +++ b/filter/filter-rule.c @@ -877,7 +877,7 @@ get_widget (FilterRule *fr, struct _RuleContext *f) gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); gtk_widget_show (hbox); - text = g_strdup_printf("<b>%s</b>", _("Find items that meet the following criteria")); + text = g_strdup_printf("<b>%s</b>", _("Find items that meet the following conditions")); label = gtk_label_new (text); gtk_label_set_use_markup (GTK_LABEL (label), TRUE); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); @@ -911,13 +911,13 @@ get_widget (FilterRule *fr, struct _RuleContext *f) hbox = gtk_hbox_new (FALSE, 3); - add = gtk_button_new_with_mnemonic (_("A_dd Filter Criteria")); + add = gtk_button_new_with_mnemonic (_("A_dd Condition")); gtk_button_set_image (GTK_BUTTON (add), gtk_image_new_from_stock (GTK_STOCK_ADD, GTK_ICON_SIZE_BUTTON)); g_signal_connect (add, "clicked", G_CALLBACK (more_parts), data); gtk_box_pack_start (GTK_BOX (hbox), add, FALSE, FALSE, 0); if (f->flags & RULE_CONTEXT_GROUPING) { - const char *thread_types[] = { N_("If all criteria are met"), N_("If any criteria are met") }; + const char *thread_types[] = { N_("If all conditions are met"), N_("If any conditions are met") }; label = gtk_label_new_with_mnemonic (_("_Find items:")); menu = gtk_menu_new (); diff --git a/filter/rule-editor.c b/filter/rule-editor.c index 53c576540c..16e79f0ee3 100644 --- a/filter/rule-editor.c +++ b/filter/rule-editor.c @@ -43,6 +43,7 @@ static void set_source (RuleEditor *re, const char *source); static void set_sensitive (RuleEditor *re); static FilterRule *create_rule (RuleEditor *re); +static gboolean update_selected_rule (RuleEditor *re); static void cursor_changed (GtkTreeView *treeview, RuleEditor *re); static void rule_editor_class_init (RuleEditorClass *klass); @@ -442,6 +443,8 @@ rule_edit (GtkWidget *widget, RuleEditor *re) { GtkWidget *rules; + update_selected_rule(re); + if (re->current == NULL || re->edit != NULL) return; @@ -483,6 +486,8 @@ rule_delete (GtkWidget *widget, RuleEditor *re) GtkTreeIter iter; int pos, len; + update_selected_rule(re); + d(printf ("delete rule\n")); pos = rule_context_get_rank_rule (re->context, re->current, re->source); if (pos != -1) { @@ -576,6 +581,8 @@ rule_top (GtkWidget *widget, RuleEditor *re) { int pos; + update_selected_rule(re); + d(printf ("top rule\n")); pos = rule_context_get_rank_rule (re->context, re->current, re->source); if (pos > 0) @@ -587,6 +594,8 @@ rule_up (GtkWidget *widget, RuleEditor *re) { int pos; + update_selected_rule(re); + d(printf ("up rule\n")); pos = rule_context_get_rank_rule (re->context, re->current, re->source); if (pos > 0) @@ -598,6 +607,8 @@ rule_down (GtkWidget *widget, RuleEditor *re) { int pos; + update_selected_rule(re); + d(printf ("down rule\n")); pos = rule_context_get_rank_rule (re->context, re->current, re->source); if (pos >= 0) @@ -611,6 +622,8 @@ rule_bottom (GtkWidget *widget, RuleEditor *re) int index = -1, count = 0; FilterRule *rule = NULL; + update_selected_rule(re); + d(printf ("bottom rule\n")); pos = rule_context_get_rank_rule (re->context, re->current, re->source); /* There's probably a better/faster way to get the count of the list here */ @@ -669,8 +682,8 @@ dialog_rule_changed (FilterRule *fr, GtkWidget *dialog) gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog), GTK_RESPONSE_OK, fr && fr->parts); } -static void -cursor_changed (GtkTreeView *treeview, RuleEditor *re) +static gboolean +update_selected_rule (RuleEditor *re) { GtkTreeSelection *selection; GtkTreeModel *model; @@ -679,7 +692,16 @@ cursor_changed (GtkTreeView *treeview, RuleEditor *re) selection = gtk_tree_view_get_selection (re->list); if (gtk_tree_selection_get_selected (selection, &model, &iter)) { gtk_tree_model_get (GTK_TREE_MODEL (re->model), &iter, 1, &re->current, -1); + return TRUE; + } + + return FALSE; +} +static void +cursor_changed (GtkTreeView *treeview, RuleEditor *re) +{ + if (update_selected_rule(re)) { g_return_if_fail (re->current); rule_editor_set_sensitive (re); |