summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRazvan Chitu <razvan.ch95@gmail.com>2015-12-22 14:58:43 +0200
committerCarlos Soriano <csoriano@gnome.org>2015-12-22 15:40:09 +0100
commit2dec1b3f2d9003b05eb1656967e50b0337cf6808 (patch)
tree6fc7ba239d63295990fd7d046d33a2872d71d636
parent0eef08686f520caf3700bff4f9b371fa780dba88 (diff)
downloadnautilus-2dec1b3f2d9003b05eb1656967e50b0337cf6808.tar.gz
preferences: add preference for create a link in context menu
Following the "Delete Permanently" option, add a preference to show the context menu item for creating links. https://bugzilla.gnome.org/show_bug.cgi?id=745575
-rw-r--r--libnautilus-private/nautilus-global-preferences.h1
-rw-r--r--src/nautilus-preferences-dialog.c5
-rw-r--r--src/resources/ui/nautilus-preferences-dialog.ui16
3 files changed, 22 insertions, 0 deletions
diff --git a/libnautilus-private/nautilus-global-preferences.h b/libnautilus-private/nautilus-global-preferences.h
index af59b3f9f..15bf679f3 100644
--- a/libnautilus-private/nautilus-global-preferences.h
+++ b/libnautilus-private/nautilus-global-preferences.h
@@ -164,6 +164,7 @@ typedef enum
/* Context menu options */
#define NAUTILUS_PREFERENCES_SHOW_DELETE_PERMANENTLY "show-delete-permanently"
+#define NAUTILUS_PREFERENCES_SHOW_CREATE_LINK "show-create-link"
void nautilus_global_preferences_init (void);
char *nautilus_global_preferences_get_default_folder_viewer_preference_as_iid (void);
diff --git a/src/nautilus-preferences-dialog.c b/src/nautilus-preferences-dialog.c
index 8b10e7c8b..5c7a95a6b 100644
--- a/src/nautilus-preferences-dialog.c
+++ b/src/nautilus-preferences-dialog.c
@@ -53,6 +53,8 @@
"sort_folders_first_checkbutton"
#define NAUTILUS_PREFERENCES_DIALOG_DELETE_PERMANENTLY_WIDGET \
"show_delete_permanently_checkbutton"
+#define NAUTILUS_PREFERENCES_DIALOG_CREATE_LINK_WIDGET \
+ "show_create_link_checkbutton"
#define NAUTILUS_PREFERENCES_DIALOG_LIST_VIEW_USE_TREE_WIDGET \
"use_tree_view_checkbutton"
#define NAUTILUS_PREFERENCES_DIALOG_TRASH_CONFIRM_WIDGET \
@@ -486,6 +488,9 @@ static void nautilus_preferences_dialog_setup(GtkBuilder *builder,
NAUTILUS_PREFERENCES_DIALOG_LIST_VIEW_USE_TREE_WIDGET,
NAUTILUS_PREFERENCES_LIST_VIEW_USE_TREE);
bind_builder_bool(builder, nautilus_preferences,
+ NAUTILUS_PREFERENCES_DIALOG_CREATE_LINK_WIDGET,
+ NAUTILUS_PREFERENCES_SHOW_CREATE_LINK);
+ bind_builder_bool(builder, nautilus_preferences,
NAUTILUS_PREFERENCES_DIALOG_DELETE_PERMANENTLY_WIDGET,
NAUTILUS_PREFERENCES_SHOW_DELETE_PERMANENTLY);
diff --git a/src/resources/ui/nautilus-preferences-dialog.ui b/src/resources/ui/nautilus-preferences-dialog.ui
index 27ed13637..3ca0748fa 100644
--- a/src/resources/ui/nautilus-preferences-dialog.ui
+++ b/src/resources/ui/nautilus-preferences-dialog.ui
@@ -151,6 +151,22 @@
<property name="position">2</property>
</packing>
</child>
+ <child>
+ <object class="GtkCheckButton" id="show_create_link_checkbutton">
+ <property name="label" translatable="yes">Show context menu item to create links from copied files</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
</object>
</child>
</object>