summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2012-12-25 13:38:59 +0100
committerGuido Günther <agx@sigxcpu.org>2012-12-25 13:38:59 +0100
commitf66c37222dd703dee05bae6561de9deafe97c4f2 (patch)
treebba36bd31a04e38f42f6f3fcd3f864394bf5dc18
parent1a8b12f75f3c7cd0edda5f194ee347c5818c9ece (diff)
parentaac19056f41da7c642bb0326711c297feae5e643 (diff)
Merge tag 'v0.0.4' into debian/sid
v0.0.4
-rw-r--r--auth-dialog/main.c104
-rw-r--r--configure.ac2
-rw-r--r--nm-iodine-service.name.in1
-rw-r--r--po/LINGUAS3
-rw-r--r--po/es.po114
-rw-r--r--po/it.po112
-rw-r--r--po/pl.po66
-rw-r--r--po/sl.po116
-rw-r--r--properties/nm-iodine-dialog.ui14
-rw-r--r--src/nm-iodine-service.c29
10 files changed, 487 insertions, 74 deletions
diff --git a/auth-dialog/main.c b/auth-dialog/main.c
index fe6f8ae..03586e4 100644
--- a/auth-dialog/main.c
+++ b/auth-dialog/main.c
@@ -45,6 +45,36 @@
#define KEYRING_SN_TAG "setting-name"
#define KEYRING_SK_TAG "setting-key"
+#define UI_KEYFILE_GROUP "VPN Plugin UI"
+
+static void
+keyfile_add_entry_info (GKeyFile *keyfile,
+ const gchar *key,
+ const gchar *value,
+ const gchar *label,
+ gboolean is_secret,
+ gboolean should_ask)
+{
+ g_key_file_set_string (keyfile, key, "Value", value);
+ g_key_file_set_string (keyfile, key, "Label", label);
+ g_key_file_set_boolean (keyfile, key, "IsSecret", is_secret);
+ g_key_file_set_boolean (keyfile, key, "ShouldAsk", should_ask);
+}
+
+
+static void
+keyfile_print_stdout (GKeyFile *keyfile)
+{
+ gchar *data;
+ gsize length;
+
+ data = g_key_file_to_data (keyfile, &length, NULL);
+ fputs (data, stdout);
+ fflush (stdout);
+ g_free (data);
+}
+
+
static char *
keyring_lookup_secret (const char *uuid, const char *secret_name)
{
@@ -79,6 +109,7 @@ get_secrets (const char *vpn_uuid,
const char *vpn_name,
gboolean retry,
gboolean allow_interaction,
+ gboolean external_ui_mode,
const char *in_pw,
char **out_pw,
NMSettingSecretFlags pw_flags)
@@ -86,6 +117,7 @@ get_secrets (const char *vpn_uuid,
VpnPasswordDialog *dialog;
char *prompt, *pw = NULL;
const char *new_password = NULL;
+ gboolean success = FALSE;
g_return_val_if_fail (vpn_uuid != NULL, FALSE);
g_return_val_if_fail (vpn_name != NULL, FALSE);
@@ -93,7 +125,7 @@ get_secrets (const char *vpn_uuid,
g_return_val_if_fail (*out_pw == NULL, FALSE);
/* Get the existing secret, if any */
- if ( !(pw_flags & NM_SETTING_SECRET_FLAG_NOT_SAVED)
+ if (!(pw_flags & NM_SETTING_SECRET_FLAG_NOT_SAVED)
&& !(pw_flags & NM_SETTING_SECRET_FLAG_NOT_REQUIRED)) {
if (in_pw)
pw = gnome_keyring_memory_strdup (in_pw);
@@ -117,20 +149,43 @@ get_secrets (const char *vpn_uuid,
}
}
- /* If interaction isn't allowed, just return existing secrets */
- if (allow_interaction == FALSE) {
+ prompt = g_strdup_printf (_("You need to authenticate to access the "
+ "Virtual Private Network '%s'."), vpn_name);
+
+ /* In external_ui mode, we don't actually show the dialog.
+ *Instead we pass back everything that is needed to build it */
+ if (external_ui_mode) {
+ GKeyFile *keyfile = g_key_file_new ();
+
+ g_key_file_set_integer (keyfile, UI_KEYFILE_GROUP,
+ "Version", 2);
+ g_key_file_set_string (keyfile, UI_KEYFILE_GROUP,
+ "Description", prompt);
+ g_key_file_set_string (keyfile, UI_KEYFILE_GROUP,
+ "Title", _("Authenticate VPN"));
+
+ keyfile_add_entry_info (keyfile, NM_IODINE_KEY_PASSWORD,
+ pw ? pw : "", _("Password:"),
+ TRUE,
+ allow_interaction);
+ keyfile_print_stdout (keyfile);
+ g_key_file_unref (keyfile);
+
+ success = TRUE;
+ goto out;
+ } else if (allow_interaction == FALSE) {
+ /* If interaction isn't allowed, just return existing secrets */
*out_pw = pw;
- return TRUE;
+
+ success = TRUE;
+ goto out;
}
/* Otherwise, we have no saved password, or the password flags indicated
* that the password should never be saved.
*/
- prompt = g_strdup_printf (_("You need to authenticate to access the "
- "Virtual Private Network '%s'."), vpn_name);
dialog = (VpnPasswordDialog *) \
vpn_password_dialog_new (_("Authenticate VPN"), prompt, NULL);
- g_free (prompt);
/* pre-fill dialog with the password */
if (pw && !(pw_flags & NM_SETTING_SECRET_FLAG_NOT_SAVED))
@@ -141,14 +196,18 @@ get_secrets (const char *vpn_uuid,
if (vpn_password_dialog_run_and_block (dialog)) {
new_password = vpn_password_dialog_get_password (dialog);
- if (new_password)
+ if (new_password) {
*out_pw = gnome_keyring_memory_strdup (new_password);
+ success = TRUE;
+ }
}
gtk_widget_hide (GTK_WIDGET (dialog));
gtk_widget_destroy (GTK_WIDGET (dialog));
- return TRUE;
+ out:
+ g_free (prompt);
+ return success;
}
@@ -177,10 +236,13 @@ wait_for_quit (void)
g_string_free (str, TRUE);
}
+
int
main (int argc, char *argv[])
{
- gboolean retry = FALSE, allow_interaction = FALSE;
+ gboolean retry = FALSE;
+ gboolean allow_interaction = FALSE;
+ gboolean external_ui_mode = FALSE;
char *vpn_name = NULL, *vpn_uuid = NULL, *vpn_service = NULL;
char *password = NULL;
GHashTable *data = NULL, *secrets = NULL;
@@ -197,6 +259,8 @@ main (int argc, char *argv[])
"VPN service type", NULL},
{ "allow-interaction", 'i', 0, G_OPTION_ARG_NONE,
&allow_interaction, "Allow user interaction", NULL},
+ { "external-ui-mode", 0, 0, G_OPTION_ARG_NONE,
+ &external_ui_mode, "External UI mode", NULL},
{ NULL }
};
@@ -219,22 +283,24 @@ main (int argc, char *argv[])
nm_vpn_plugin_utils_get_secret_flags (secrets, NM_IODINE_KEY_PASSWORD, &pw_flags);
- if (!get_secrets (vpn_uuid, vpn_name, retry, allow_interaction,
+ if (!get_secrets (vpn_uuid, vpn_name, retry, allow_interaction, external_ui_mode,
g_hash_table_lookup (secrets, NM_IODINE_KEY_PASSWORD),
&password,
pw_flags))
return 1;
- /* dump the passwords to stdout */
- if (password)
- printf ("%s\n%s\n", NM_IODINE_KEY_PASSWORD, password);
- printf ("\n\n");
+ if (!external_ui_mode) {
+ /* dump the passwords to stdout */
+ if (password)
+ printf ("%s\n%s\n", NM_IODINE_KEY_PASSWORD, password);
+ printf ("\n\n");
- /* for good measure, flush stdout since Kansas is going Bye-Bye */
- fflush (stdout);
+ /* for good measure, flush stdout since Kansas is going Bye-Bye */
+ fflush (stdout);
- /* Wait for quit signal */
- wait_for_quit ();
+ /* Wait for quit signal */
+ wait_for_quit ();
+ }
if (data)
g_hash_table_unref (data);
diff --git a/configure.ac b/configure.ac
index be7ea64..3937d49 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
AC_PREREQ(2.52)
-AC_INIT(NetworkManager-iodine, 0.0.3, agx@sigxcpu.org, NetworkManager-iodine)
+AC_INIT(NetworkManager-iodine, 0.0.4, agx@sigxcpu.org, NetworkManager-iodine)
AM_INIT_AUTOMAKE([subdir-objects no-dist-gzip dist-xz])
AM_MAINTAINER_MODE
diff --git a/nm-iodine-service.name.in b/nm-iodine-service.name.in
index 4a3d471..e17f938 100644
--- a/nm-iodine-service.name.in
+++ b/nm-iodine-service.name.in
@@ -6,3 +6,4 @@ program=@LIBEXECDIR@/nm-iodine-service
[GNOME]
auth-dialog=nm-iodine-auth-dialog
properties=libnm-iodine-properties
+supports-external-ui-mode=true
diff --git a/po/LINGUAS b/po/LINGUAS
index 932f713..3557b69 100644
--- a/po/LINGUAS
+++ b/po/LINGUAS
@@ -1,2 +1,5 @@
# please keep this list sorted alphabetically
+es
+it
pl
+sl
diff --git a/po/es.po b/po/es.po
new file mode 100644
index 0000000..516b07e
--- /dev/null
+++ b/po/es.po
@@ -0,0 +1,114 @@
+# Spanish translation for network-manager-iodine.
+# Copyright (C) 2012 network-manager-iodine's COPYRIGHT HOLDER
+# This file is distributed under the same license as the network-manager-iodine package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+# Daniel Mustieles <daniel.mustieles@gmail.com>, 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: network-manager-iodine master\n"
+"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
+"product=network-manager-iodine&keywords=I18N+L10N&component=general\n"
+"POT-Creation-Date: 2012-12-04 11:52+0000\n"
+"PO-Revision-Date: 2012-12-04 13:04+0100\n"
+"Last-Translator: Daniel Mustieles <daniel.mustieles@gmail.com>\n"
+"Language-Team: Español; Castellano <gnome-es-list@gnome.org>\n"
+"Language: es\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: Gtranslator 2.91.5\n"
+
+#. Otherwise, we have no saved password, or the password flags indicated
+#. * that the password should never be saved.
+#.
+#: ../auth-dialog/main.c:129
+#, c-format
+msgid "You need to authenticate to access the Virtual Private Network '%s'."
+msgstr "Debe autenticarse para acceder a la red privada virtual «%s»."
+
+#: ../auth-dialog/main.c:132
+msgid "Authenticate VPN"
+msgstr "Autenticar VPN"
+
+#: ../auth-dialog/vpn-password-dialog.c:90
+#: ../properties/nm-iodine-dialog.ui.h:7
+msgid "_Password:"
+msgstr "C_ontraseña:"
+
+#: ../auth-dialog/vpn-password-dialog.c:223
+msgid "Sh_ow passwords"
+msgstr "M_ostrar contraseñas"
+
+#: ../properties/nm-iodine.c:46
+msgid "Iodine DNS Tunnel"
+msgstr "Túnel DNS iodine"
+
+#: ../properties/nm-iodine.c:47
+msgid "Tunnel connections via DNS."
+msgstr "Conexiones de túnel mediante DNS."
+
+#: ../properties/nm-iodine-dialog.ui.h:1
+msgid "Saved"
+msgstr "Guardado"
+
+#: ../properties/nm-iodine-dialog.ui.h:2
+msgid "Always ask"
+msgstr "Preguntar siempre"
+
+#: ../properties/nm-iodine-dialog.ui.h:3
+msgid "General"
+msgstr "General"
+
+#: ../properties/nm-iodine-dialog.ui.h:4
+msgid "_Toplevel Domain:"
+msgstr "_Reino de nivel superior:"
+
+#: ../properties/nm-iodine-dialog.ui.h:5
+msgid "Optional"
+msgstr "Opcional"
+
+#: ../properties/nm-iodine-dialog.ui.h:6
+msgid "_Nameserver:"
+msgstr "_Servidor de nombres:"
+
+#: ../properties/nm-iodine-dialog.ui.h:8
+msgid "_Fragment Size:"
+msgstr "Tamaño del _fragmento:"
+
+#: ../properties/nm-iodine-dialog.ui.h:9
+msgid "Show password"
+msgstr "Mostrar contraseña"
+
+#: ../src/nm-iodine-service.c:131
+#, c-format
+msgid "invalid integer property '%s' or out of range [%d -> %d]"
+msgstr "propiedad «%s» entera no válida o fuera de rango [%d -> %d]"
+
+#: ../src/nm-iodine-service.c:142
+#, c-format
+msgid "invalid boolean property '%s' (not yes or no)"
+msgstr "propiedad «%s» booleana no válida (no es «sí» o «no»)"
+
+#: ../src/nm-iodine-service.c:149
+#, c-format
+msgid "unhandled property '%s' type %s"
+msgstr "propiedad «%s» de tipo %s sin manejar"
+
+#: ../src/nm-iodine-service.c:163
+#, c-format
+msgid "property '%s' invalid or not supported"
+msgstr "propiedad «%s» no válida o no soportada"
+
+#: ../src/nm-iodine-service.c:179
+msgid "No VPN configuration options."
+msgstr "No hay opciones de configuración de VPN."
+
+#: ../src/nm-iodine-service.c:198
+msgid "No VPN secrets!"
+msgstr "No hay secretos VPN."
+
+#: ../src/nm-iodine-service.c:483
+msgid "Could not find iodine binary."
+msgstr "No se pudo encontrar el binario de iodine."
diff --git a/po/it.po b/po/it.po
new file mode 100644
index 0000000..ebe50f4
--- /dev/null
+++ b/po/it.po
@@ -0,0 +1,112 @@
+# Italian translations for network-manager-iodine package
+# Copyright (C) 2012 the network-manager-iodine copyright holder
+# This file is distributed under the same license as the network-manager-iodine package.
+# Milo Casagrande <milo@ubuntu.com>, 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: network-manager-iodine\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2012-08-22 13:21+0200\n"
+"PO-Revision-Date: 2012-08-22 13:26+0200\n"
+"Last-Translator: Milo Casagrande <milo@ubuntu.com>\n"
+"Language-Team: Italian <tp@lists.linux.it>\n"
+"Language: it\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8-bit\n"
+"Plural-Forms: nplurals=2; plural=(n!=1);\n"
+
+#. Otherwise, we have no saved password, or the password flags indicated
+#. * that the password should never be saved.
+#.
+#: ../auth-dialog/main.c:129
+#, c-format
+msgid "You need to authenticate to access the Virtual Private Network '%s'."
+msgstr ""
+"È necessario autenticarsi per accedere alla Rete Privata Virtuale (VPN) «%s»."
+
+#: ../auth-dialog/main.c:132
+msgid "Authenticate VPN"
+msgstr "Autenticazione VPN"
+
+#: ../auth-dialog/vpn-password-dialog.c:90
+#: ../properties/nm-iodine-dialog.ui.h:7
+msgid "_Password:"
+msgstr "Pass_word:"
+
+#: ../auth-dialog/vpn-password-dialog.c:223
+msgid "Sh_ow passwords"
+msgstr "M_ostra le password"
+
+#: ../properties/nm-iodine.c:46
+msgid "Iodine DNS Tunnel"
+msgstr "Tunnel DNS iodine"
+
+#: ../properties/nm-iodine.c:47
+msgid "Tunnel connections via DNS."
+msgstr "Tunnel per connessioni via DNS."
+
+#: ../properties/nm-iodine-dialog.ui.h:1
+msgid "Saved"
+msgstr "Salvata"
+
+#: ../properties/nm-iodine-dialog.ui.h:2
+msgid "Always ask"
+msgstr "Chiedere ogni volta"
+
+#: ../properties/nm-iodine-dialog.ui.h:3
+msgid "<b>General</b>"
+msgstr "<b>Generale</b>"
+
+#: ../properties/nm-iodine-dialog.ui.h:4
+msgid "_Toplevel Domain:"
+msgstr "_Dominio principale:"
+
+#: ../properties/nm-iodine-dialog.ui.h:5
+msgid "<b>Optional</b>"
+msgstr "<b>Opzionale</b>"
+
+#: ../properties/nm-iodine-dialog.ui.h:6
+msgid "_Nameserver:"
+msgstr "_Nameserver:"
+
+#: ../properties/nm-iodine-dialog.ui.h:8
+msgid "_Fragment Size:"
+msgstr "Dimen_sione frammento:"
+
+#: ../properties/nm-iodine-dialog.ui.h:9
+msgid "Show password"
+msgstr "Mostra password"
+
+#: ../src/nm-iodine-service.c:131
+#, c-format
+msgid "invalid integer property '%s' or out of range [%d -> %d]"
+msgstr "Proprietà intera «%s» non valida o fuori intervallo [%d → %d]"
+
+#: ../src/nm-iodine-service.c:142
+#, c-format
+msgid "invalid boolean property '%s' (not yes or no)"
+msgstr "Proprietà booleana «%s» non valida (non yes o no)"
+
+#: ../src/nm-iodine-service.c:149
+#, c-format
+msgid "unhandled property '%s' type %s"
+msgstr "Proprietà «%s» di tipo %s non gestita"
+
+#: ../src/nm-iodine-service.c:163
+#, c-format
+msgid "property '%s' invalid or not supported"
+msgstr "Proprietà «%s» non valida o non supportata"
+
+#: ../src/nm-iodine-service.c:179
+msgid "No VPN configuration options."
+msgstr "Nessuna opzione di configurazione VPN."
+
+#: ../src/nm-iodine-service.c:198
+msgid "No VPN secrets!"
+msgstr "Nessun segreto VPN."
+
+#: ../src/nm-iodine-service.c:483
+msgid "Could not find iodine binary."
+msgstr "Impossibile trovare il file binario iodine."
diff --git a/po/pl.po b/po/pl.po
index 05c7ba4..3862b2e 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -4,12 +4,14 @@
# pomóc w jego rozwijaniu i pielęgnowaniu, napisz do nas:
# gnomepl@aviary.pl
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+# Piotr Drąg <piotrdrag@gmail.com>, 2012.
+# Aviary.pl <gnomepl@aviary.pl>, 2012.
msgid ""
msgstr ""
"Project-Id-Version: network-manager-iodine\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-02-18 17:28+0100\n"
-"PO-Revision-Date: 2012-02-18 17:30+0100\n"
+"POT-Creation-Date: 2012-12-04 14:59+0100\n"
+"PO-Revision-Date: 2012-12-04 15:00+0100\n"
"Last-Translator: Piotr Drąg <piotrdrag@gmail.com>\n"
"Language-Team: Polish <gnomepl@aviary.pl>\n"
"Language: pl\n"
@@ -35,16 +37,12 @@ msgstr ""
msgid "Authenticate VPN"
msgstr "Uwierzytelnianie VPN"
-#: ../auth-dialog/vpn-password-dialog.c:95
-#: ../properties/nm-iodine-dialog.ui.h:9
+#: ../auth-dialog/vpn-password-dialog.c:90
+#: ../properties/nm-iodine-dialog.ui.h:7
msgid "_Password:"
msgstr "_Hasło:"
-#: ../auth-dialog/vpn-password-dialog.c:97
-msgid "_Secondary Password:"
-msgstr "Hasło _dodatkowe:"
-
-#: ../auth-dialog/vpn-password-dialog.c:239
+#: ../auth-dialog/vpn-password-dialog.c:223
msgid "Sh_ow passwords"
msgstr "Wyświ_etlanie haseł"
@@ -57,73 +55,69 @@ msgid "Tunnel connections via DNS."
msgstr "Połączenia tunelowe przez DNS."
#: ../properties/nm-iodine-dialog.ui.h:1
-msgid "<b>General</b>"
-msgstr "<b>Ogólne</b>"
+msgid "Saved"
+msgstr "Zapisane"
#: ../properties/nm-iodine-dialog.ui.h:2
-msgid "<b>Optional</b>"
-msgstr "<b>Opcjonalne</b>"
-
-#: ../properties/nm-iodine-dialog.ui.h:3
msgid "Always ask"
msgstr "Pytanie za każdym razem"
+#: ../properties/nm-iodine-dialog.ui.h:3
+msgid "General"
+msgstr "Ogólne"
+
#: ../properties/nm-iodine-dialog.ui.h:4
-msgid "Not required"
-msgstr "Niewymagane"
+msgid "_Toplevel Domain:"
+msgstr "_Domena najwyższego poziomu:"
#: ../properties/nm-iodine-dialog.ui.h:5
-msgid "Saved"
-msgstr "Zapisane"
+msgid "Optional"
+msgstr "Opcjonalne"
#: ../properties/nm-iodine-dialog.ui.h:6
-msgid "Show password"
-msgstr "Wyświetlanie hasła"
+msgid "_Nameserver:"
+msgstr "Serwer _nazw:"
-#: ../properties/nm-iodine-dialog.ui.h:7
+#: ../properties/nm-iodine-dialog.ui.h:8
msgid "_Fragment Size:"
msgstr "_Rozmiar fragmentu:"
-#: ../properties/nm-iodine-dialog.ui.h:8
-msgid "_Nameserver:"
-msgstr "Serwer _nazw:"
-
-#: ../properties/nm-iodine-dialog.ui.h:10
-msgid "_Toplevel Domain:"
-msgstr "_Domena najwyższego poziomu:"
+#: ../properties/nm-iodine-dialog.ui.h:9
+msgid "Show password"
+msgstr "Wyświetlanie hasła"
-#: ../src/nm-iodine-service.c:132
+#: ../src/nm-iodine-service.c:131
#, c-format
msgid "invalid integer property '%s' or out of range [%d -> %d]"
msgstr ""
"nieprawidłowa własność liczby całkowitej \"%s\" lub jest poza zakresem [%d -"
"> %d]"
-#: ../src/nm-iodine-service.c:143
+#: ../src/nm-iodine-service.c:142
#, c-format
msgid "invalid boolean property '%s' (not yes or no)"
msgstr ""
"nieprawidłowa własność zmiennej logicznej \"%s\" (nie wynosi \"yes\" lub \"no"
"\")"
-#: ../src/nm-iodine-service.c:150
+#: ../src/nm-iodine-service.c:149
#, c-format
msgid "unhandled property '%s' type %s"
msgstr "nieobsługiwana własność \"%s\" typu \"%s\""
-#: ../src/nm-iodine-service.c:164
+#: ../src/nm-iodine-service.c:163
#, c-format
msgid "property '%s' invalid or not supported"
msgstr "własność \"%s\" jest nieprawidłowa lub nieobsługiwana"
-#: ../src/nm-iodine-service.c:180
+#: ../src/nm-iodine-service.c:179
msgid "No VPN configuration options."
msgstr "Brak opcji konfiguracji VPN."
-#: ../src/nm-iodine-service.c:199
+#: ../src/nm-iodine-service.c:198
msgid "No VPN secrets!"
msgstr "Brak haseł VPN."
-#: ../src/nm-iodine-service.c:451
+#: ../src/nm-iodine-service.c:483
msgid "Could not find iodine binary."
msgstr "Nie można odnaleźć pliku binarnego iodine."
diff --git a/po/sl.po b/po/sl.po
new file mode 100644
index 0000000..6abfb2c
--- /dev/null
+++ b/po/sl.po
@@ -0,0 +1,116 @@
+# Slovenian translation for network-manager-iodine.
+# Copyright (C) 2012 network-manager-iodine's COPYRIGHT HOLDER
+# This file is distributed under the same license as the network-manager-iodine package.
+#
+# Matej Urbančič <mateju@svn.gnome.org>, 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: network-manager-iodine master\n"
+"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
+"product=network-manager-iodine&keywords=I18N+L10N&component=general\n"
+"POT-Creation-Date: 2012-12-04 14:01+0000\n"
+"PO-Revision-Date: 2012-12-05 10:45+0100\n"
+"Last-Translator: Matej Urbančič <mateju@svn.gnome.org>\n"
+"Language-Team: Slovenian GNOME Translation Team <gnome-si@googlegroups.com>\n"
+"Language: sl_SI\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=4; plural=(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || n"
+"%100==4 ? 3 : 0);\n"
+"X-Poedit-SourceCharset: utf-8\n"
+"X-Generator: Poedit 1.5.4\n"
+
+#. Otherwise, we have no saved password, or the password flags indicated
+#. * that the password should never be saved.
+#.
+#: ../auth-dialog/main.c:129
+#, c-format
+msgid "You need to authenticate to access the Virtual Private Network '%s'."
+msgstr ""
+
+#: ../auth-dialog/main.c:132
+msgid "Authenticate VPN"
+msgstr ""
+
+#: ../auth-dialog/vpn-password-dialog.c:90
+#: ../properties/nm-iodine-dialog.ui.h:7
+msgid "_Password:"
+msgstr "_Geslo:"
+
+#: ../auth-dialog/vpn-password-dialog.c:223
+msgid "Sh_ow passwords"
+msgstr ""
+
+#: ../properties/nm-iodine.c:46
+msgid "Iodine DNS Tunnel"
+msgstr ""
+
+#: ../properties/nm-iodine.c:47
+msgid "Tunnel connections via DNS."
+msgstr ""
+
+#: ../properties/nm-iodine-dialog.ui.h:1
+msgid "Saved"
+msgstr "Shranjeno"
+
+#: ../properties/nm-iodine-dialog.ui.h:2
+msgid "Always ask"
+msgstr "Vedno vprašaj"
+
+#: ../properties/nm-iodine-dialog.ui.h:3
+msgid "General"
+msgstr "Splošno"
+
+#: ../properties/nm-iodine-dialog.ui.h:4
+msgid "_Toplevel Domain:"
+msgstr ""
+
+#: ../properties/nm-iodine-dialog.ui.h:5
+msgid "Optional"
+msgstr "Izbirno"
+
+#: ../properties/nm-iodine-dialog.ui.h:6
+msgid "_Nameserver:"
+msgstr "_Imenski strežnik:"
+
+#: ../properties/nm-iodine-dialog.ui.h:8
+msgid "_Fragment Size:"
+msgstr ""
+
+#: ../properties/nm-iodine-dialog.ui.h:9
+msgid "Show password"
+msgstr "Pokaži geslo"
+
+#: ../src/nm-iodine-service.c:131
+#, c-format
+msgid "invalid integer property '%s' or out of range [%d -> %d]"
+msgstr ""
+
+#: ../src/nm-iodine-service.c:142
+#, c-format
+msgid "invalid boolean property '%s' (not yes or no)"
+msgstr ""
+
+#: ../src/nm-iodine-service.c:149
+#, c-format
+msgid "unhandled property '%s' type %s"
+msgstr ""
+
+#: ../src/nm-iodine-service.c:163
+#, c-format
+msgid "property '%s' invalid or not supported"
+msgstr ""
+
+#: ../src/nm-iodine-service.c:179
+msgid "No VPN configuration options."
+msgstr ""
+
+#: ../src/nm-iodine-service.c:198
+msgid "No VPN secrets!"
+msgstr ""
+
+#: ../src/nm-iodine-service.c:483
+msgid "Could not find iodine binary."
+msgstr ""
diff --git a/properties/nm-iodine-dialog.ui b/properties/nm-iodine-dialog.ui
index b84af9b..1b7d772 100644
--- a/properties/nm-iodine-dialog.ui
+++ b/properties/nm-iodine-dialog.ui
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
- <!-- interface-requires gtk+ 2.6 -->
+ <!-- interface-requires gtk+ 3.0 -->
<object class="GtkListStore" id="pass_type_model">
<columns>
<!-- column-name gchararray -->
@@ -30,8 +30,10 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">&lt;b&gt;General&lt;/b&gt;</property>
- <property name="use_markup">True</property>
+ <property name="label" translatable="yes">General</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
</object>
<packing>
<property name="expand">False</property>
@@ -111,8 +113,10 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">&lt;b&gt;Optional&lt;/b&gt;</property>
- <property name="use_markup">True</property>
+ <property name="label" translatable="yes">Optional</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
</object>
<packing>
<property name="expand">False</property>
diff --git a/src/nm-iodine-service.c b/src/nm-iodine-service.c
index 03012f8..b55ca2d 100644
--- a/src/nm-iodine-service.c
+++ b/src/nm-iodine-service.c
@@ -69,8 +69,6 @@ static const char *iodine_binary_paths[] =
NULL
};
-#define NM_IODINE_HELPER_PATH LIBEXECDIR"/nm-iodine-service-iodine-helper"
-
typedef struct {
const char *name;
GType type;
@@ -284,7 +282,7 @@ iodine_parse_stderr_line (NMVPNPlugin *plugin,
gint ret = 1;
if (g_str_has_prefix(line, "Bad password")) {
- g_debug ("Login failure");
+ g_message ("Login failure");
priv->failure = NM_VPN_PLUGIN_FAILURE_LOGIN_FAILED;
ret = -1;
goto out;
@@ -296,7 +294,7 @@ iodine_parse_stderr_line (NMVPNPlugin *plugin,
goto out;
if (g_str_has_prefix(line, "Server tunnel IP is ")) {
- g_debug("PTP address: %s", split[len-1]);
+ g_message("PTP address: %s", split[len-1]);
val = addr_to_gvalue (split[len-1]);
if (val)
g_hash_table_insert (ip4config,
@@ -308,7 +306,7 @@ iodine_parse_stderr_line (NMVPNPlugin *plugin,
NM_VPN_PLUGIN_IP4_CONFIG_INT_GATEWAY,
val);
} else if (g_str_has_prefix(line, "Sending DNS queries for ")) {
- g_debug("External gw: %s", split[len-1]);
+ g_message("External gw: %s", split[len-1]);
val = addr_to_gvalue (split[len-1]);
if (val)
g_hash_table_insert (ip4config,
@@ -317,28 +315,28 @@ iodine_parse_stderr_line (NMVPNPlugin *plugin,
} else if (g_str_has_prefix(line, "Sending raw traffic directly to ")) {
/* If the DNS server is directly reachable we need to set it
as external gateway overwriting the above valus */
- g_debug("Overwrite ext. gw. address: %s", split[len-1]);
+ g_message("Overwrite ext. gw. address: %s", split[len-1]);
val = addr_to_gvalue (split[len-1]);
if (val)
g_hash_table_insert (ip4config,
NM_VPN_PLUGIN_IP4_CONFIG_EXT_GATEWAY,
val);
} else if (g_str_has_prefix(line, "Setting IP of dns")) {
- g_debug("Address: %s", split[len-1]);
+ g_message("Address: %s", split[len-1]);
val = addr_to_gvalue (split[len-1]);
if (val)
g_hash_table_insert (ip4config,
NM_VPN_PLUGIN_IP4_CONFIG_ADDRESS,
val);
} else if (g_str_has_prefix(line, "Setting MTU of ")) {
- g_debug("MTU: %s", split[len-1]);
+ g_message("MTU: %s", split[len-1]);
val = addr_to_gvalue (split[len-1]);
if (val)
g_hash_table_insert (ip4config,
NM_VPN_PLUGIN_IP4_CONFIG_MTU,
val);
} else if (g_str_has_prefix(line, "Opened dns")) {
- g_debug("Interface: %s", split[len-1]);
+ g_message("Interface: %s", split[len-1]);
val = str_to_gvalue (split[len-1], FALSE);
if (val)
g_hash_table_insert (ip4config,
@@ -353,7 +351,7 @@ iodine_parse_stderr_line (NMVPNPlugin *plugin,
val);
ret = 0; /* success */
} else
- g_debug("%s", line);
+ g_message("%s", line);
out:
g_strfreev(split);
@@ -382,7 +380,7 @@ iodine_stderr_cb (GIOChannel *source, GIOCondition condition, gpointer plugin)
ret = iodine_parse_stderr_line(plugin, line, priv->ip4config);
if (!ret) {
- g_debug("Parsing done, sending IP4 config");
+ g_message("Parsing done, sending IP4 config");
nm_vpn_plugin_set_ip4_config(plugin, priv->ip4config);
g_hash_table_destroy (priv->ip4config);
@@ -440,14 +438,19 @@ static void
send_password(gint fd, NMSettingVPN *s_vpn)
{
const char *passwd;
+ ssize_t ret;
passwd = nm_setting_vpn_get_secret (s_vpn, NM_IODINE_KEY_PASSWORD);
/* Don't send an empty password since this makes iodine block */
if (!passwd || !strlen(passwd))
passwd = "<none>";
- write (fd, passwd, strlen(passwd));
- write (fd, "\n", 1);
+ ret = write (fd, passwd, strlen(passwd));
+ if (ret < 0)
+ g_warning("Password write failed");
+ ret = write (fd, "\n", 1);
+ if (ret < 0)
+ g_warning("Password write failed");
}