[nautilus] places-sidebar: don't activate 'Rename' shortcut for non-bookmarks
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] places-sidebar: don't activate 'Rename' shortcut for non-bookmarks
- Date: Fri, 25 Feb 2011 02:09:45 +0000 (UTC)
commit d0706a08eefb73aa515cb445e57c0360637cce12
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Thu Feb 24 16:14:25 2011 -0500
places-sidebar: don't activate 'Rename' shortcut for non-bookmarks
src/nautilus-places-sidebar.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/nautilus-places-sidebar.c b/src/nautilus-places-sidebar.c
index 0b7ed64..0a4f714 100644
--- a/src/nautilus-places-sidebar.c
+++ b/src/nautilus-places-sidebar.c
@@ -1927,8 +1927,17 @@ rename_selected_bookmark (NautilusPlacesSidebar *sidebar)
GtkTreeViewColumn *column;
GtkCellRenderer *cell;
GList *renderers;
+ PlaceType type;
if (get_selected_iter (sidebar, &iter)) {
+ gtk_tree_model_get (GTK_TREE_MODEL (sidebar->filter_model), &iter,
+ PLACES_SIDEBAR_COLUMN_ROW_TYPE, &type,
+ -1);
+
+ if (type != PLACES_BOOKMARK) {
+ return;
+ }
+
path = gtk_tree_model_get_path (GTK_TREE_MODEL (sidebar->filter_model), &iter);
column = gtk_tree_view_get_column (GTK_TREE_VIEW (sidebar->tree_view), 0);
renderers = gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (column));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]