summaryrefslogtreecommitdiff
path: root/baobab/src/baobab-remote-connect-dialog.c
diff options
context:
space:
mode:
Diffstat (limited to 'baobab/src/baobab-remote-connect-dialog.c')
-rw-r--r--baobab/src/baobab-remote-connect-dialog.c58
1 files changed, 23 insertions, 35 deletions
diff --git a/baobab/src/baobab-remote-connect-dialog.c b/baobab/src/baobab-remote-connect-dialog.c
index 9557fb2c..484ffbf5 100644
--- a/baobab/src/baobab-remote-connect-dialog.c
+++ b/baobab/src/baobab-remote-connect-dialog.c
@@ -1,32 +1,30 @@
-/* Baobab - (C) 2005 Fabio Marzocca
-
- baobab-remote-connect-dialog.c
-
- Modified module from caja-connect-server-dialog.c
- Released under same licence
- */
-/*
- * Caja
+/* Copyright (C) 2005 Fabio Marzocca
+ * Copyright (C) 2012-2021 MATE Developers
*
+ * Modified module from caja-connect-server-dialog.c.
+ * Released under same licence.
* Copyright (C) 2003 Red Hat, Inc.
*
- * Caja is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
+ * This file is part of MATE Utils.
+ *
+ * MATE Utils is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
*
- * Caja is distributed in the hope that it will be useful,
+ * MATE Utils is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public
- * License along with this program; see the file COPYING. If not,
- * write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License
+ * along with MATE Utils. If not, see <https://www.gnu.org/licenses/>.
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
+
#include "baobab-remote-connect-dialog.h"
#include <string.h>
@@ -36,7 +34,6 @@
#include "baobab.h"
-
/* Translators: all the strings in this file are meant to map the
similar strings inside caja-connect-server and should be
translated the same way
@@ -58,7 +55,6 @@ G_DEFINE_TYPE(BaobabRemoteConnectDialog, baobab_remote_connect_dialog, GTK_TYPE_
#define RESPONSE_CONNECT GTK_RESPONSE_OK
-
static void
display_error_dialog (GError *error,
GFile *location,
@@ -66,24 +62,18 @@ display_error_dialog (GError *error,
{
GtkWidget *dlg;
char *parse_name;
- char *error_message;
parse_name = g_file_get_parse_name (location);
- error_message = g_strdup_printf (_("Cannot scan location \"%s\""),
- parse_name);
- g_free (parse_name);
-
dlg = gtk_message_dialog_new (parent,
- GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_OK,
- error_message, NULL);
+ GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_ERROR,
+ GTK_BUTTONS_OK,
+ _("Cannot scan location \"%s\""), parse_name);
+ g_free (parse_name);
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dlg),
"%s", error->message);
- g_free (error_message);
-
gtk_dialog_run (GTK_DIALOG (dlg));
gtk_widget_destroy (dlg);
}
@@ -655,7 +645,6 @@ baobab_remote_connect_dialog_init (BaobabRemoteConnectDialog *dialog)
1, get_method_description (&(methods[i])),
-1);
-
if (methods[i].flags & DEFAULT_METHOD) {
gtk_combo_box_set_active_iter (GTK_COMBO_BOX (combo), &iter);
}
@@ -684,7 +673,6 @@ baobab_remote_connect_dialog_init (BaobabRemoteConnectDialog *dialog)
gtk_box_pack_start (GTK_BOX (hbox),
label, FALSE, FALSE, 0);
-
dialog->details->grid = grid = gtk_grid_new ();
gtk_grid_set_row_spacing (GTK_GRID (grid), 6);
gtk_grid_set_column_spacing (GTK_GRID (grid), 12);