[gtksourceview/wip/completion-model: 11/17] Completion: simplify check_first_selected()



commit c48602342fb68f271ee1286c1e8e0d1e787f5f81
Author: SÃbastien Wilmet <swilmet gnome org>
Date:   Tue Jan 22 12:59:50 2013 +0100

    Completion: simplify check_first_selected()
    
    No need to reset 'piter' to the first iter, since we already have the
    'first' iter.
    
    And priv->select_first is already TRUE, else we wouldn't have selected
    the first selectable iter.

 gtksourceview/gtksourcecompletion.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
---
diff --git a/gtksourceview/gtksourcecompletion.c b/gtksourceview/gtksourcecompletion.c
index 5f7b23a..6b07266 100644
--- a/gtksourceview/gtksourcecompletion.c
+++ b/gtksourceview/gtksourcecompletion.c
@@ -2126,11 +2126,7 @@ check_first_selected (GtkSourceCompletion *completion)
 	}
 
 	gtk_tree_selection_select_iter (selection, &piter);
-
-	gtk_tree_model_get_iter_first (model, &piter);
 	scroll_to_iter (completion, &first);
-
-	completion->priv->select_first = TRUE;
 }
 
 static void



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