[baobab] Cleanup



commit 1c98180e4a2e993682b917adf3617fedea2c1dbe
Author: Paolo Borelli <pborelli gnome org>
Date:   Wed Jan 4 13:50:09 2012 +0100

    Cleanup

 src/baobab.c |   49 +++++++++++++++++++++++--------------------------
 1 files changed, 23 insertions(+), 26 deletions(-)
---
diff --git a/src/baobab.c b/src/baobab.c
index 788b8a6..ec9423c 100644
--- a/src/baobab.c
+++ b/src/baobab.c
@@ -40,9 +40,6 @@
 
 #define BAOBAB_UI_FILE PKGDATADIR "/baobab-main-window.ui"
 
-static void push_iter_in_stack (GtkTreeIter *);
-static GtkTreeIter pop_iter_from_stack (void);
-
 static gint currentdepth = 0;
 static GtkTreeIter currentiter;
 static GtkTreeIter firstiter;
@@ -331,6 +328,28 @@ baobab_stop_scan (void)
 	gtk_tree_view_columns_autosize (GTK_TREE_VIEW (baobab.tree_view));
 }
 
+static void
+push_iter_on_stack (GtkTreeIter *iter)
+{
+	g_queue_push_head (iterstack, iter->user_data3);
+	g_queue_push_head (iterstack, iter->user_data2);
+	g_queue_push_head (iterstack, iter->user_data);
+	g_queue_push_head (iterstack, GINT_TO_POINTER (iter->stamp));
+}
+
+static GtkTreeIter
+pop_iter_from_stack (void)
+{
+	GtkTreeIter iter;
+
+	iter.stamp = GPOINTER_TO_INT (g_queue_pop_head (iterstack));
+	iter.user_data = g_queue_pop_head (iterstack);
+	iter.user_data2 = g_queue_pop_head (iterstack);
+	iter.user_data3 = g_queue_pop_head (iterstack);
+
+	return iter;
+}
+
 /*
  * pre-fills model during scanning
  */
@@ -377,7 +396,7 @@ prefill_model (struct chan_data *data)
 	}
 
 	currentdepth = data->depth;
-	push_iter_in_stack (&iter);
+	push_iter_on_stack (&iter);
 	currentiter = iter;
 
 	/* in case filenames contains gmarkup */
@@ -518,28 +537,6 @@ baobab_fill_model (struct chan_data *data)
 	g_free (alloc_size);
 }
 
-void
-push_iter_in_stack (GtkTreeIter *iter)
-{
-	g_queue_push_head (iterstack, iter->user_data3);
-	g_queue_push_head (iterstack, iter->user_data2);
-	g_queue_push_head (iterstack, iter->user_data);
-	g_queue_push_head (iterstack, GINT_TO_POINTER (iter->stamp));
-}
-
-GtkTreeIter
-pop_iter_from_stack (void)
-{
-	GtkTreeIter iter;
-
-	iter.stamp = GPOINTER_TO_INT (g_queue_pop_head (iterstack));
-	iter.user_data = g_queue_pop_head (iterstack);
-	iter.user_data2 = g_queue_pop_head (iterstack);
-	iter.user_data3 = g_queue_pop_head (iterstack);
-
-	return iter;
-}
-
 gboolean
 baobab_is_excluded_location (GFile *file)
 {



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