[gtksourceview/wip/completion-model: 13/19] Completion: simplify check_first_selected()



commit a668e9519c70ac6fff1b3e6e17710c3206877bd9
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]