summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWilliam Jon McCann <jmccann@redhat.com>2012-08-27 16:50:59 -0400
committerCosimo Cecchi <cosimoc@gnome.org>2012-09-02 19:34:25 -0400
commit9cecb29d60afb3627946f109bf25641cbf99bdc0 (patch)
treec03af59046fb87cca84605287684621a2e21d45a /src
parentcbca1bfa97264b1bcaf0fab3bd51dd3fe1bc2e51 (diff)
downloadnautilus-9cecb29d60afb3627946f109bf25641cbf99bdc0.tar.gz
Don't show the browse button for the connect to server standalone
https://bugzilla.gnome.org/show_bug.cgi?id=682637
Diffstat (limited to 'src')
-rw-r--r--src/nautilus-connect-server-dialog.c9
-rw-r--r--src/nautilus-connect-server-dialog.h6
-rw-r--r--src/nautilus-connect-server.c2
3 files changed, 15 insertions, 2 deletions
diff --git a/src/nautilus-connect-server-dialog.c b/src/nautilus-connect-server-dialog.c
index b5c7b4a71..21a88b1aa 100644
--- a/src/nautilus-connect-server-dialog.c
+++ b/src/nautilus-connect-server-dialog.c
@@ -45,6 +45,7 @@ struct _NautilusConnectServerDialogDetails {
GtkWidget *menu;
GtkWidget *remove_menu_item;
GtkWidget *clear_menu_item;
+ GtkWidget *browse_button;
char **supported;
};
@@ -59,6 +60,13 @@ enum {
G_DEFINE_TYPE (NautilusConnectServerDialog, nautilus_connect_server_dialog,
GTK_TYPE_DIALOG)
+void
+nautilus_connect_server_dialog_set_show_browse (NautilusConnectServerDialog *dialog,
+ gboolean show)
+{
+ gtk_widget_set_visible (dialog->details->browse_button, show);
+}
+
GFile *
nautilus_connect_server_dialog_get_location (NautilusConnectServerDialog *dialog)
{
@@ -684,6 +692,7 @@ nautilus_connect_server_dialog_init (NautilusConnectServerDialog *dialog)
GTK_RESPONSE_ACCEPT);
gtk_button_box_set_child_secondary (GTK_BUTTON_BOX (gtk_dialog_get_action_area (GTK_DIALOG (dialog))),
button, TRUE);
+ dialog->details->browse_button = button;
gtk_dialog_add_button (GTK_DIALOG (dialog),
GTK_STOCK_CANCEL,
diff --git a/src/nautilus-connect-server-dialog.h b/src/nautilus-connect-server-dialog.h
index e42c4b858..9f8cbd298 100644
--- a/src/nautilus-connect-server-dialog.h
+++ b/src/nautilus-connect-server-dialog.h
@@ -56,7 +56,9 @@ struct _NautilusConnectServerDialogClass {
GType nautilus_connect_server_dialog_get_type (void);
-GtkWidget * nautilus_connect_server_dialog_new (NautilusWindow *window);
-GFile * nautilus_connect_server_dialog_get_location (NautilusConnectServerDialog *dialog);
+GtkWidget * nautilus_connect_server_dialog_new (NautilusWindow *window);
+GFile * nautilus_connect_server_dialog_get_location (NautilusConnectServerDialog *dialog);
+void nautilus_connect_server_dialog_set_show_browse (NautilusConnectServerDialog *dialog,
+ gboolean show);
#endif /* NAUTILUS_CONNECT_SERVER_DIALOG_H */
diff --git a/src/nautilus-connect-server.c b/src/nautilus-connect-server.c
index 5bfc76916..acdda73b6 100644
--- a/src/nautilus-connect-server.c
+++ b/src/nautilus-connect-server.c
@@ -165,6 +165,8 @@ main (int argc, char *argv[])
g_option_context_free (context);
dialog = nautilus_connect_server_dialog_new (NULL);
+ nautilus_connect_server_dialog_set_show_browse (NAUTILUS_CONNECT_SERVER_DIALOG (dialog), FALSE);
+
gtk_window_set_default_icon_name ("folder-remote-symbolic");
g_signal_connect (dialog, "response",