[gtk+/places-sidebar] Disallow drops on the recent:/// item



commit a7213e3ccfc921fe24b1fd6ad4e1b06950035504
Author: Federico Mena Quintero <federico gnome org>
Date:   Wed Feb 27 14:04:33 2013 -0600

    Disallow drops on the recent:/// item
    
    Signed-off-by: Federico Mena Quintero <federico gnome org>

 gtk/gtkplacessidebar.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkplacessidebar.c b/gtk/gtkplacessidebar.c
index 7be5e70..0318136 100644
--- a/gtk/gtkplacessidebar.c
+++ b/gtk/gtkplacessidebar.c
@@ -1328,6 +1328,20 @@ compute_drop_position (GtkTreeView             *tree_view,
                }
        }
 
+       /* Disallow drops on recent:/// */
+       if (place_type == PLACES_BUILT_IN) {
+               char *uri;
+
+               gtk_tree_model_get (model, &iter,
+                                   PLACES_SIDEBAR_COLUMN_URI, &uri,
+                                   -1);
+
+               if (strcmp (uri, "recent:///") == 0)
+                       drop_possible = FALSE;
+
+               g_free (uri);
+       }
+
        if (!drop_possible) {
                gtk_tree_path_free (*path);
                *path = NULL;


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