summaryrefslogtreecommitdiff
path: root/src/applet.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/applet.c')
-rw-r--r--src/applet.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/applet.c b/src/applet.c
index bc7099f6..3b9c5a6e 100644
--- a/src/applet.c
+++ b/src/applet.c
@@ -410,12 +410,9 @@ add_and_activate_cb (GObject *client,
if (error) {
const char *text = _("Failed to add/activate connection");
- char *err_text = g_strdup_printf ("(%d) %s", error->code,
- error->message ? error->message : _("Unknown error"));
+ const char *err_text = error->message ? error->message : _("Unknown error");
- g_warning ("%s: %s", text, err_text);
utils_show_error_dialog (_("Connection failure"), text, err_text, FALSE, NULL);
- g_free (err_text);
g_error_free (error);
}
@@ -464,12 +461,9 @@ disconnect_cb (GObject *device,
nm_device_disconnect_finish (NM_DEVICE (device), result, &error);
if (error) {
const char *text = _("Device disconnect failed");
- char *err_text = g_strdup_printf ("(%d) %s", error->code,
- error->message ? error->message : _("Unknown error"));
+ const char *err_text = error->message ? error->message : _("Unknown error");
- g_warning ("%s: %s: %s", __func__, text, err_text);
utils_show_error_dialog (_("Disconnect failure"), text, err_text, FALSE, NULL);
- g_free (err_text);
g_error_free (error);
}
@@ -499,12 +493,9 @@ activate_connection_cb (GObject *client,
if (error) {
const char *text = _("Connection activation failed");
- char *err_text = g_strdup_printf ("(%d) %s", error->code,
- error->message ? error->message : _("Unknown error"));
+ const char *err_text = error->message ? error->message : _("Unknown error");
- g_warning ("%s: %s", text, err_text);
utils_show_error_dialog (_("Connection failure"), text, err_text, FALSE, NULL);
- g_free (err_text);
g_error_free (error);
}