fix indentation

parent 2af765c4
...@@ -131,9 +131,9 @@ do_import (const char *path, GError **error) ...@@ -131,9 +131,9 @@ do_import (const char *path, GError **error)
keyfile = g_key_file_new (); keyfile = g_key_file_new ();
if (!g_key_file_load_from_file (keyfile, path, 0, error)) { if (!g_key_file_load_from_file (keyfile, path, 0, error)) {
g_set_error (error, g_set_error (error,
L2TP_PLUGIN_UI_ERROR, L2TP_PLUGIN_UI_ERROR,
L2TP_PLUGIN_UI_ERROR_FILE_NOT_L2TP, 2TP_PLUGIN_UI_ERROR_FILE_NOT_L2TP,
_("does not look like a L2TP VPN connection (parse failed)")); _("does not look like a L2TP VPN connection (parse failed)"));
return NULL; return NULL;
} }
...@@ -161,10 +161,10 @@ do_import (const char *path, GError **error) ...@@ -161,10 +161,10 @@ do_import (const char *path, GError **error)
continue; continue;
g_set_error (error, g_set_error (error,
L2TP_PLUGIN_UI_ERROR, L2TP_PLUGIN_UI_ERROR,
L2TP_PLUGIN_UI_ERROR_MISSING_PROPERTY, L2TP_PLUGIN_UI_ERROR_MISSING_PROPERTY,
_("Required property %s missing"), _("Required property %s missing"),
prop.name); prop.name);
g_key_file_free (keyfile); g_key_file_free (keyfile);
g_object_unref (connection); g_object_unref (connection);
return NULL; return NULL;
...@@ -178,10 +178,10 @@ do_import (const char *path, GError **error) ...@@ -178,10 +178,10 @@ do_import (const char *path, GError **error)
int_val = g_key_file_get_integer(keyfile, VPN_SECTION, prop.name, error); int_val = g_key_file_get_integer(keyfile, VPN_SECTION, prop.name, error);
if (int_val == 0 && *error){ if (int_val == 0 && *error){
g_set_error (error, g_set_error (error,
L2TP_PLUGIN_UI_ERROR, L2TP_PLUGIN_UI_ERROR,
L2TP_PLUGIN_UI_ERROR_INVALID_PROPERTY, L2TP_PLUGIN_UI_ERROR_INVALID_PROPERTY,
_("Property %s can't be parsed as integer."), _("Property %s can't be parsed as integer."),
prop.name); prop.name);
g_key_file_free (keyfile); g_key_file_free (keyfile);
g_object_unref (connection); g_object_unref (connection);
return NULL; return NULL;
...@@ -194,10 +194,10 @@ do_import (const char *path, GError **error) ...@@ -194,10 +194,10 @@ do_import (const char *path, GError **error)
continue; continue;
if (!bool_val) { if (!bool_val) {
g_set_error (error, g_set_error (error,
L2TP_PLUGIN_UI_ERROR, L2TP_PLUGIN_UI_ERROR,
L2TP_PLUGIN_UI_ERROR_INVALID_PROPERTY, L2TP_PLUGIN_UI_ERROR_INVALID_PROPERTY,
_("Property %s can't be parsed as boolean. Only 'true' and 'false' allowed."), _("Property %s can't be parsed as boolean. Only 'true' and 'false' allowed."),
prop.name); prop.name);
g_key_file_free (keyfile); g_key_file_free (keyfile);
g_object_unref (connection); g_object_unref (connection);
return NULL; return NULL;
...@@ -255,10 +255,10 @@ do_export (const char *path, NMConnection *connection, GError **error) ...@@ -255,10 +255,10 @@ do_export (const char *path, NMConnection *connection, GError **error)
if (!value && prop.required){ if (!value && prop.required){
g_key_file_free(export_file); g_key_file_free(export_file);
g_set_error(error, g_set_error(error,
L2TP_PLUGIN_UI_ERROR, L2TP_PLUGIN_UI_ERROR,
L2TP_PLUGIN_UI_ERROR_MISSING_PROPERTY, L2TP_PLUGIN_UI_ERROR_MISSING_PROPERTY,
_("Missing required property '%s'"), _("Missing required property '%s'"),
prop.name); prop.name);
return FALSE; return FALSE;
} }
if (!value) if (!value)
...@@ -273,9 +273,9 @@ do_export (const char *path, NMConnection *connection, GError **error) ...@@ -273,9 +273,9 @@ do_export (const char *path, NMConnection *connection, GError **error)
case G_TYPE_BOOLEAN: case G_TYPE_BOOLEAN:
if (!strcmp(value, "yes")) if (!strcmp(value, "yes"))
g_key_file_set_boolean(export_file, g_key_file_set_boolean(export_file,
VPN_SECTION, VPN_SECTION,
prop.name, prop.name,
TRUE); TRUE);
/* if key not set - assume as "no" */ /* if key not set - assume as "no" */
break; break;
} }
...@@ -283,9 +283,9 @@ do_export (const char *path, NMConnection *connection, GError **error) ...@@ -283,9 +283,9 @@ do_export (const char *path, NMConnection *connection, GError **error)
if (!(file = fopen (path, "w"))) { if (!(file = fopen (path, "w"))) {
g_set_error(error, g_set_error(error,
L2TP_PLUGIN_UI_ERROR, L2TP_PLUGIN_UI_ERROR,
L2TP_PLUGIN_UI_ERROR_FILE_NOT_READABLE, L2TP_PLUGIN_UI_ERROR_FILE_NOT_READABLE,
_("Couldn't open file for writing.")); _("Couldn't open file for writing."));
g_key_file_free (export_file); g_key_file_free (export_file);
return FALSE; return FALSE;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment