[network-manager-applet] core: clearer failure message when an applet is already running
- From: Dan Williams <dcbw src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [network-manager-applet] core: clearer failure message when an applet is already running
- Date: Thu, 21 Jan 2010 02:01:45 +0000 (UTC)
commit d56d3b39a910d32e32ab551650d5b64233c334c4
Author: Dan Williams <dcbw redhat com>
Date: Wed Jan 20 18:01:33 2010 -0800
core: clearer failure message when an applet is already running
src/applet-dbus-manager.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/src/applet-dbus-manager.c b/src/applet-dbus-manager.c
index b2a62dc..11e19a7 100644
--- a/src/applet-dbus-manager.c
+++ b/src/applet-dbus-manager.c
@@ -25,6 +25,9 @@
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-lowlevel.h>
#include <string.h>
+
+#include <glib/gi18n.h>
+
#include "nm-utils.h"
#include "applet.h"
#include "nma-marshal.h"
@@ -158,9 +161,13 @@ request_name (DBusGProxy *proxy, int flags, const char *detail)
}
if (request_name_result != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) {
- nm_warning ("Could not acquire the %s service as it is already "
- "taken. Return: %d",
- detail, request_name_result);
+ if (request_name_result == DBUS_REQUEST_NAME_REPLY_EXISTS)
+ fprintf (stdout, _("An instance of nm-applet is already running.\n"));
+ else {
+ fprintf (stdout, _("Could not acquire the %s service. (%d)\n"),
+ detail,
+ request_name_result);
+ }
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]