diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2002-12-13 10:14:17 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2002-12-13 10:14:17 +0800 |
commit | f6232508a1c654fa25326a1ae92325e37742f7e1 (patch) | |
tree | a3d8afafc1632512157528b173664ad9aae1b92d | |
parent | 64e851be7357d92fa986e89ca48ffcb94adbe2d2 (diff) | |
download | gsoc2013-evolution-f6232508a1c654fa25326a1ae92325e37742f7e1.tar.gz gsoc2013-evolution-f6232508a1c654fa25326a1ae92325e37742f7e1.tar.zst gsoc2013-evolution-f6232508a1c654fa25326a1ae92325e37742f7e1.zip |
Use an easier method for getting the iter.
2002-12-12 Jeffrey Stedfast <fejj@ximian.com>
* rule-editor.c (cursor_changed): Use an easier method for getting
the iter.
svn path=/trunk/; revision=19108
-rw-r--r-- | filter/ChangeLog | 5 | ||||
-rw-r--r-- | filter/rule-editor.c | 21 |
2 files changed, 15 insertions, 11 deletions
diff --git a/filter/ChangeLog b/filter/ChangeLog index 0b3d43930e..1ecb51b9f4 100644 --- a/filter/ChangeLog +++ b/filter/ChangeLog @@ -1,5 +1,10 @@ 2002-12-12 Jeffrey Stedfast <fejj@ximian.com> + * rule-editor.c (cursor_changed): Use an easier method for getting + the iter. + +2002-12-12 Jeffrey Stedfast <fejj@ximian.com> + * vfolder-rule.c (vfolder_editor_sourcelist_new): New custom function for creating the source_list widget. (get_widget): Removed the source_list creation code. diff --git a/filter/rule-editor.c b/filter/rule-editor.c index 3ea15d9d8b..13b77b72ec 100644 --- a/filter/rule-editor.c +++ b/filter/rule-editor.c @@ -506,19 +506,18 @@ set_sensitive (RuleEditor *re) static void cursor_changed (GtkTreeView *treeview, RuleEditor *re) { - GtkTreeViewColumn *column; - GtkTreePath *path; + GtkTreeSelection *selection; + GtkTreeModel *model; GtkTreeIter iter; - gtk_tree_view_get_cursor (re->list, &path, &column); - gtk_tree_model_get_iter (GTK_TREE_MODEL (re->model), &iter, path); - gtk_tree_path_free (path); - - gtk_tree_model_get (GTK_TREE_MODEL (re->model), &iter, 1, &re->current, -1); - - g_assert (re->current); - - rule_editor_set_sensitive (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); + + g_assert (re->current); + + rule_editor_set_sensitive (re); + } } static void |