[baobab] Remove "Scan remote folder" action



commit 496911b67c530948bcc108533f7c197116b9a6a3
Author: Stefano Facchini <stefano facchini gmail com>
Date:   Tue Sep 29 13:46:59 2015 +0200

    Remove "Scan remote folder" action
    
    Since the helper application "nautilus-connect-server" was removed from
    nautilus, the corresponding menu item did nothing but spit a warning.
    
    The functionality is now included in the new GTK+ File Chooser dialog.
    
    Notice that no new string is introduced here.

 src/Makefile.am                |    1 -
 src/baobab-connect-server.vala |   87 ----------------------------------------
 src/baobab-main-window.ui      |    4 --
 src/baobab-window.vala         |   17 +-------
 4 files changed, 1 insertions(+), 108 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index db0fcbb..d0da00a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -23,7 +23,6 @@ VALA_SOURCES = \
        baobab-chart.vala               \
        baobab-treemap.vala             \
        baobab-ringschart.vala          \
-       baobab-connect-server.vala      \
        baobab-location.vala            \
        baobab-location-list.vala       \
        baobab-scanner.vala             \
diff --git a/src/baobab-main-window.ui b/src/baobab-main-window.ui
index 8fecee1..1e0cecd 100644
--- a/src/baobab-main-window.ui
+++ b/src/baobab-main-window.ui
@@ -7,10 +7,6 @@
         <attribute name="label" translatable="yes">Scan Folder…</attribute>
         <attribute name="action">win.scan-folder</attribute>
       </item>
-      <item>
-        <attribute name="label" translatable="yes">Scan Remote Folder…</attribute>
-        <attribute name="action">win.scan-remote</attribute>
-      </item>
     </section>
   </menu>
   <object class="GtkMenu" id="treeview_popup_menu">
diff --git a/src/baobab-window.vala b/src/baobab-window.vala
index 1092041..ea90cad 100644
--- a/src/baobab-window.vala
+++ b/src/baobab-window.vala
@@ -86,7 +86,6 @@ namespace Baobab {
             { "gear-menu", on_show_gear_menu_activate , null, "false", null},
             { "show-home-page", on_show_home_page_activate },
             { "scan-folder", on_scan_folder_activate },
-            { "scan-remote", on_scan_remote_activate },
             { "reload", on_reload_activate },
             { "show-allocated", on_show_allocated },
             { "expand-all", on_expand_all },
@@ -102,7 +101,6 @@ namespace Baobab {
 
         private const ActionState[] actions_while_scanning = {
             { "scan-folder", false },
-            { "scan-remote", false },
             { "show-allocated", false },
             { "expand-all", false },
             { "collapse-all", false }
@@ -133,8 +131,6 @@ namespace Baobab {
             location_list.set_action (on_scan_location_activate);
             location_list.update ();
 
-            (lookup_action ("scan-remote") as SimpleAction).set_enabled (ConnectServer.available ());
-
             setup_treeview ();
 
             infobar_close_button.clicked.connect (() => { clear_message (); });
@@ -199,6 +195,7 @@ namespace Baobab {
                                                           _("_Cancel"), Gtk.ResponseType.CANCEL,
                                                           _("_Open"), Gtk.ResponseType.ACCEPT);
 
+            file_chooser.local_only = false;
             file_chooser.create_folders = false;
             file_chooser.modal = true;
 
@@ -216,18 +213,6 @@ namespace Baobab {
             file_chooser.show ();
         }
 
-        void on_scan_remote_activate () {
-            var connect_server = new ConnectServer ();
-
-            connect_server.selected.connect ((uri) => {
-                if (uri != null) {
-                    scan_directory (File.new_for_uri (uri));
-                }
-            });
-
-            connect_server.show ();
-        }
-
         void set_active_location (Location location) {
             if (scan_completed_handler > 0) {
                 active_location.scanner.disconnect (scan_completed_handler);


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