[nautilus/wip/csoriano/flow: 536/537] f



commit 21ff6bc5d777983f0587d37d168596e98a0dc8e3
Author: Carlos Soriano <csoriano gnome org>
Date:   Fri Nov 25 16:52:11 2016 +0100

    f

 src/nautilus-files-view.c |   14 +++++++-------
 src/nautilus-icon-view.c  |   20 +++++++++++++++++---
 2 files changed, 24 insertions(+), 10 deletions(-)
---
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index f95b7c1..bcf64d2 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -3899,8 +3899,7 @@ process_old_files (NautilusFilesView *view)
         for (node = files_added; node != NULL; node = node->next)
         {
             pending = node->data;
-            g_signal_emit (view,
-                           signals[ADD_FILE], 0, pending->file, pending->directory);
+            pending_additions = g_list_prepend (pending_additions, pending->file);
             /* Acknowledge the files that were pending to be revealed */
             if (g_hash_table_contains (view->details->pending_reveal, pending->file))
             {
@@ -3909,11 +3908,12 @@ process_old_files (NautilusFilesView *view)
                                      GUINT_TO_POINTER (TRUE));
             }
 
-            if (files_added != NULL)
-            {
-                g_signal_emit (view,
-                               signals[ADD_FILES], 0, pending_additions, pending->directory);
-            }
+        }
+
+        if (files_added != NULL)
+        {
+            g_signal_emit (view,
+                           signals[ADD_FILES], 0, pending_additions, pending->directory);
         }
 
         for (node = files_changed; node != NULL; node = node->next)
diff --git a/src/nautilus-icon-view.c b/src/nautilus-icon-view.c
index 3a201df..264bc47 100644
--- a/src/nautilus-icon-view.c
+++ b/src/nautilus-icon-view.c
@@ -107,9 +107,9 @@ real_remove_file (NautilusFilesView *self,
   NautilusFile *current_file;
   guint i = 0;
 
-
   priv = nautilus_icon_view_get_instance_private (self);
 
+    g_print ("remove file %s\n", nautilus_file_get_uri (file));
   while (current_file = g_list_model_get_item (priv->model, i))
     {
       if (current_file == file)
@@ -169,6 +169,20 @@ real_restore_standard_zoom_level (NautilusFilesView *self)
 {
 }
 
+static gfloat
+real_get_zoom_level_percentage (NautilusFilesView *files_view)
+{
+    guint icon_size;
+    NautilusIconView *self;
+    NautilusCanvasZoomLevel zoom_level;
+    NautilusIconViewPrivate *priv;
+
+    self = NAUTILUS_ICON_VIEW (files_view);
+    priv = nautilus_icon_view_get_instance_private (self);
+
+    return (gfloat) priv->icon_size / NAUTILUS_CANVAS_ICON_SIZE_LARGE;
+}
+
 static gboolean
 real_can_zoom_in (NautilusFilesView *self)
 {
@@ -264,7 +278,7 @@ real_add_files (NautilusFilesView *self,
 
   clock_t start = clock() ;
 
-  g_print ("add file %d\n", g_list_length (files));
+  g_print ("add files %d\n", g_list_length (files));
   array = convert_glist_to_array (files);
   g_list_store_splice (G_LIST_STORE (priv->model),
                        g_list_model_get_n_items (priv->model),
@@ -376,7 +390,6 @@ action_zoom_to_level (GSimpleAction *action,
   g_simple_action_set_state (G_SIMPLE_ACTION (action), state);
 }
 
-
 static GtkWidget*
 create_widget_func (gpointer item,
                     gpointer user_data)
@@ -488,6 +501,7 @@ nautilus_icon_view_class_init (NautilusIconViewClass *klass)
   files_view_class->get_icon = real_get_icon;
   files_view_class->select_first = real_select_first;
   files_view_class->restore_standard_zoom_level = real_restore_standard_zoom_level;
+  files_view_class->get_zoom_level_percentage = real_get_zoom_level_percentage;
 }
 
 static void


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