[nautilus/wip/gbsneto/files-view: 4/4] connect-server: remove legacy code
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/gbsneto/files-view: 4/4] connect-server: remove legacy code
- Date: Wed, 19 Aug 2015 18:43:42 +0000 (UTC)
commit e2c867eaab2ff409178878f5ca94d0b02901619a
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Tue Aug 18 17:44:37 2015 -0300
connect-server: remove legacy code
nautilus-connect-server is a legacy application from
GNOME 2 era, where we had no consistent way to manage
servers.
With the introduction of NautilusPlacesView, this code
becomes obsolete, as the network management logic is
moved to the places view.
Remove the legacy code.
https://bugzilla.gnome.org/show_bug.cgi?id=753778
src/Makefile.am | 9 -
src/nautilus-app-menu.ui | 4 -
src/nautilus-application-actions.c | 12 -
src/nautilus-application.c | 68 ----
src/nautilus-connect-server-dialog.c | 729 ----------------------------------
src/nautilus-connect-server-dialog.h | 64 ---
src/nautilus-connect-server.c | 182 ---------
src/nautilus-window.c | 15 -
8 files changed, 0 insertions(+), 1083 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 5697224..e15295e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -3,7 +3,6 @@ include $(top_srcdir)/Makefile.shared
bin_PROGRAMS= \
nautilus \
nautilus-autorun-software \
- nautilus-connect-server \
$(NULL)
libexec_PROGRAMS= \
@@ -155,8 +154,6 @@ nautilus_SOURCES = \
nautilus-canvas-view.h \
nautilus-canvas-view-container.c \
nautilus-canvas-view-container.h \
- nautilus-connect-server-dialog.c \
- nautilus-connect-server-dialog.h \
nautilus-dbus-manager.c \
nautilus-dbus-manager.h \
nautilus-desktop-canvas-view.c \
@@ -243,12 +240,6 @@ nautilus_autorun_software_SOURCES= \
nautilus-autorun-software.c \
$(NULL)
-nautilus_connect_server_SOURCES= \
- nautilus-connect-server-dialog.c \
- nautilus-connect-server-dialog.h \
- nautilus-connect-server.c \
- $(NULL)
-
nautilus_convert_metadata_SOURCES= \
nautilus-convert-metadata.c \
$(NULL)
diff --git a/src/nautilus-app-menu.ui b/src/nautilus-app-menu.ui
index 514dc5d..ced0d77 100644
--- a/src/nautilus-app-menu.ui
+++ b/src/nautilus-app-menu.ui
@@ -14,10 +14,6 @@
</item>
</section>
<section>
- <item>
- <attribute name="action">app.connect-to-server</attribute>
- <attribute name="label" translatable="yes">Connect to _Server…</attribute>
- </item>
</section>
<section>
<item>
diff --git a/src/nautilus-application-actions.c b/src/nautilus-application-actions.c
index 17c4b68..1fc8ee2 100644
--- a/src/nautilus-application-actions.c
+++ b/src/nautilus-application-actions.c
@@ -50,17 +50,6 @@ action_new_window (GSimpleAction *action,
}
static void
-action_connect_to_server (GSimpleAction *action,
- GVariant *parameter,
- gpointer user_data)
-{
- GtkApplication *application = user_data;
-
- nautilus_application_connect_server (NAUTILUS_APPLICATION (application),
- NAUTILUS_WINDOW (gtk_application_get_active_window
(application)));
-}
-
-static void
action_bookmarks (GSimpleAction *action,
GVariant *parameter,
gpointer user_data)
@@ -238,7 +227,6 @@ action_show_hide_sidebar (GSimpleAction *action,
static GActionEntry app_entries[] = {
{ "new-window", action_new_window, NULL, NULL, NULL },
- { "connect-to-server", action_connect_to_server, NULL, NULL, NULL },
{ "bookmarks", action_bookmarks, NULL, NULL, NULL },
{ "preferences", action_preferences, NULL, NULL, NULL },
{ "show-hide-sidebar", NULL, NULL, "true", action_show_hide_sidebar },
diff --git a/src/nautilus-application.c b/src/nautilus-application.c
index a4bb9fc..b1785b1 100644
--- a/src/nautilus-application.c
+++ b/src/nautilus-application.c
@@ -31,7 +31,6 @@
#include "nautilus-application-actions.h"
#include "nautilus-bookmarks-window.h"
-#include "nautilus-connect-server-dialog.h"
#include "nautilus-dbus-manager.h"
#include "nautilus-desktop-window.h"
#include "nautilus-freedesktop-dbus.h"
@@ -79,8 +78,6 @@ struct _NautilusApplicationPriv {
NautilusBookmarkList *bookmark_list;
- GtkWidget *connect_server_window;
-
NautilusShellSearchProvider *search_provider;
GList *windows;
@@ -516,71 +513,6 @@ nautilus_application_open (GApplication *app,
}
}
-static gboolean
-go_to_server_cb (NautilusWindow *window,
- GFile *location,
- GError *error,
- gpointer user_data)
-{
- gboolean retval;
- NautilusFile *file;
-
- if (error == NULL) {
- file = nautilus_file_get_existing (location);
- nautilus_connect_server_dialog_add_server (file);
- nautilus_file_unref (file);
-
- retval = TRUE;
- } else {
- retval = FALSE;
- }
-
- return retval;
-}
-
-static void
-on_connect_server_response (GtkDialog *dialog,
- int response,
- GtkApplication *application)
-{
- if (response == GTK_RESPONSE_OK) {
- GFile *location;
- NautilusWindow *window = NAUTILUS_WINDOW (gtk_application_get_active_window (application));
-
- location = nautilus_connect_server_dialog_get_location (NAUTILUS_CONNECT_SERVER_DIALOG
(dialog));
- if (location != NULL) {
- nautilus_window_slot_open_location_full (nautilus_window_get_active_slot (window),
- location,
-
NAUTILUS_WINDOW_OPEN_FLAG_USE_DEFAULT_LOCATION,
- NULL, go_to_server_cb, application);
- }
- }
-
- gtk_widget_destroy (GTK_WIDGET (dialog));
-}
-
-GtkWidget *
-nautilus_application_connect_server (NautilusApplication *application,
- NautilusWindow *window)
-{
- GtkWidget *dialog;
-
- dialog = application->priv->connect_server_window;
-
- if (dialog == NULL) {
- dialog = nautilus_connect_server_dialog_new (window);
- g_signal_connect (dialog, "response", G_CALLBACK (on_connect_server_response), application);
- application->priv->connect_server_window = dialog;
-
- g_object_add_weak_pointer (G_OBJECT (dialog),
- (gpointer *) &application->priv->connect_server_window);
- }
-
- gtk_window_present (GTK_WINDOW (dialog));
-
- return dialog;
-}
-
static void
nautilus_application_finalize (GObject *object)
{
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index 0432d57..90fa67a 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -973,19 +973,6 @@ places_sidebar_show_error_message_cb (GtkPlacesSidebar *sidebar,
eel_show_error_dialog (primary, secondary, GTK_WINDOW (window));
}
-/* Callback used when the places sidebar needs us to present the Connect to Server dialog */
-static void
-places_sidebar_show_connect_to_server_cb (GtkPlacesSidebar *sidebar,
- gpointer user_data)
-{
- NautilusWindow *window = NAUTILUS_WINDOW (user_data);
- NautilusApplication *application = NAUTILUS_APPLICATION (g_application_get_default ());
- GtkWidget *dialog;
-
- dialog = nautilus_application_connect_server (application, window);
- gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
-}
-
static void
places_sidebar_show_other_locations (NautilusWindow *window)
{
@@ -1288,8 +1275,6 @@ nautilus_window_set_up_sidebar (NautilusWindow *window)
G_CALLBACK (open_location_cb), window);
g_signal_connect (window->priv->places_sidebar, "show-error-message",
G_CALLBACK (places_sidebar_show_error_message_cb), window);
- g_signal_connect (window->priv->places_sidebar, "show-connect-to-server",
- G_CALLBACK (places_sidebar_show_connect_to_server_cb), window);
g_signal_connect (window->priv->places_sidebar, "drag-action-requested",
G_CALLBACK (places_sidebar_drag_action_requested_cb), window);
g_signal_connect (window->priv->places_sidebar, "drag-action-ask",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]