[network-manager-netbook] Fix tooltips and notifications for wired connections
- From: Tambet Ingo <tambeti src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [network-manager-netbook] Fix tooltips and notifications for wired connections
- Date: Thu, 21 Jan 2010 14:39:01 +0000 (UTC)
commit 64e95923828a0b9b249b1187ac055c807eaa219b
Author: Tambet Ingo <tambet gmail com>
Date: Thu Jan 21 10:38:08 2010 -0400
Fix tooltips and notifications for wired connections
Don't say "Connected to Wired, a wired network", same for the tooltips.
src/nmn-panel-client.c | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/src/nmn-panel-client.c b/src/nmn-panel-client.c
index 48e124a..bdfdae5 100644
--- a/src/nmn-panel-client.c
+++ b/src/nmn-panel-client.c
@@ -28,6 +28,7 @@
#include <nm-gsm-device.h>
#include <nm-cdma-device.h>
#include <nm-utils.h>
+#include <nm-ethernet-item.h>
#include "nmn-panel-client.h"
@@ -169,7 +170,13 @@ update_notification (NmnPanelClient *self)
if (priv->item) {
status = nm_list_item_get_status (priv->item);
connection_type = nm_list_item_get_type_name (priv->item);
- connection_name = nm_list_item_get_name (priv->item);
+
+ /* Don't say "Connected to Wired, a wired network */
+ if (!NM_IS_ETHERNET_ITEM (priv->item))
+ connection_name = nm_list_item_get_name (priv->item);
+ else
+ connection_name = NULL;
+
icon = nm_list_item_get_icon (priv->item);
} else {
status = NM_LIST_ITEM_STATUS_DISCONNECTED;
@@ -241,7 +248,12 @@ update_tooltip (NmnPanelClient *self)
break;
case NM_LIST_ITEM_STATUS_CONNECTED:
connection_type = nm_list_item_get_type_name (priv->item);
- connection_name = nm_list_item_get_name (priv->item);
+
+ /* Don't produce "networks - Wired - wired" */
+ if (!NM_IS_ETHERNET_ITEM (priv->item))
+ connection_name = nm_list_item_get_name (priv->item);
+ else
+ connection_name = NULL;
if (connection_type) {
if (connection_name)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]