[nautilus] preferences: add preference for create a link in context menu



commit 2dec1b3f2d9003b05eb1656967e50b0337cf6808
Author: Razvan Chitu <razvan ch95 gmail com>
Date:   Tue Dec 22 14:58:43 2015 +0200

    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

 libnautilus-private/nautilus-global-preferences.h |    1 +
 src/nautilus-preferences-dialog.c                 |    5 +++++
 src/resources/ui/nautilus-preferences-dialog.ui   |   16 ++++++++++++++++
 3 files changed, 22 insertions(+), 0 deletions(-)
---
diff --git a/libnautilus-private/nautilus-global-preferences.h 
b/libnautilus-private/nautilus-global-preferences.h
index af59b3f..15bf679 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 8b10e7c..5c7a95a 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 27ed136..3ca0748 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>


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