network-manager-applet r932 - in trunk: . src
- From: dcbw svn gnome org
- To: svn-commits-list gnome org
- Subject: network-manager-applet r932 - in trunk: . src
- Date: Tue, 7 Oct 2008 00:05:55 +0000 (UTC)
Author: dcbw
Date: Tue Oct 7 00:05:55 2008
New Revision: 932
URL: http://svn.gnome.org/viewvc/network-manager-applet?rev=932&view=rev
Log:
2008-10-06 Dan Williams <dcbw redhat com>
* src/applet-device-cdma.c
src/applet-device-gsm.c
src/applet-device-wifi.c
src/applet-device-wired.c
- (*_get_icon): use the active connection for more information in the
tooltip
* src/applet.c
src/applet.h
- (applet_get_device_icon_for_state): pass active connection through
to the get_icon device class handler
Modified:
trunk/ChangeLog
trunk/src/applet-device-cdma.c
trunk/src/applet-device-gsm.c
trunk/src/applet-device-wifi.c
trunk/src/applet-device-wired.c
trunk/src/applet.c
trunk/src/applet.h
Modified: trunk/src/applet-device-cdma.c
==============================================================================
--- trunk/src/applet-device-cdma.c (original)
+++ trunk/src/applet-device-cdma.c Tue Oct 7 00:05:55 2008
@@ -299,13 +299,17 @@
static GdkPixbuf *
cdma_get_icon (NMDevice *device,
NMDeviceState state,
+ NMConnection *connection,
char **tip,
NMApplet *applet)
{
GdkPixbuf *pixbuf = NULL;
const char *iface;
+ NMSettingConnection *s_con = NULL;
iface = nm_device_get_iface (NM_DEVICE (device));
+ if (connection)
+ s_con = (NMSettingConnection *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION);
switch (state) {
case NM_DEVICE_STATE_PREPARE:
@@ -318,7 +322,10 @@
*tip = g_strdup_printf (_("Waiting for user authentication on device '%s'..."), iface);
break;
case NM_DEVICE_STATE_ACTIVATED:
- *tip = g_strdup (_("CDMA connection"));
+ if (s_con && s_con->id)
+ *tip = g_strdup_printf (_("Mobile broadband connection '%s'"), s_con->id);
+ else
+ *tip = g_strdup (_("Mobile broadband connection"));
pixbuf = applet->wwan_icon;
break;
default:
Modified: trunk/src/applet-device-gsm.c
==============================================================================
--- trunk/src/applet-device-gsm.c (original)
+++ trunk/src/applet-device-gsm.c Tue Oct 7 00:05:55 2008
@@ -300,13 +300,17 @@
static GdkPixbuf *
gsm_get_icon (NMDevice *device,
NMDeviceState state,
+ NMConnection *connection,
char **tip,
NMApplet *applet)
{
GdkPixbuf *pixbuf = NULL;
const char *iface;
+ NMSettingConnection *s_con = NULL;
iface = nm_device_get_iface (NM_DEVICE (device));
+ if (connection)
+ s_con = (NMSettingConnection *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION);
switch (state) {
case NM_DEVICE_STATE_PREPARE:
@@ -319,7 +323,10 @@
*tip = g_strdup_printf (_("Waiting for user authentication on device '%s'..."), iface);
break;
case NM_DEVICE_STATE_ACTIVATED:
- *tip = g_strdup (_("GSM connection"));
+ if (s_con && s_con->id)
+ *tip = g_strdup_printf (_("Mobile broadband connection '%s'"), s_con->id);
+ else
+ *tip = g_strdup (_("Mobile broadband connection"));
pixbuf = applet->wwan_icon;
break;
default:
Modified: trunk/src/applet-device-wifi.c
==============================================================================
--- trunk/src/applet-device-wifi.c (original)
+++ trunk/src/applet-device-wifi.c Tue Oct 7 00:05:55 2008
@@ -1198,6 +1198,7 @@
static GdkPixbuf *
wireless_get_icon (NMDevice *device,
NMDeviceState state,
+ NMConnection *connection,
char **tip,
NMApplet *applet)
{
Modified: trunk/src/applet-device-wired.c
==============================================================================
--- trunk/src/applet-device-wired.c (original)
+++ trunk/src/applet-device-wired.c Tue Oct 7 00:05:55 2008
@@ -267,6 +267,7 @@
static GdkPixbuf *
wired_get_icon (NMDevice *device,
NMDeviceState state,
+ NMConnection *connection,
char **tip,
NMApplet *applet)
{
Modified: trunk/src/applet.c
==============================================================================
--- trunk/src/applet.c (original)
+++ trunk/src/applet.c Tue Oct 7 00:05:55 2008
@@ -1687,8 +1687,12 @@
state = nm_device_get_state (device);
dclass = get_device_class (device, applet);
- if (dclass)
- pixbuf = dclass->get_icon (device, state, tip, applet);
+ if (dclass) {
+ NMConnection *connection;
+
+ connection = applet_find_active_connection_for_device (device, applet, NULL);
+ pixbuf = dclass->get_icon (device, state, connection, tip, applet);
+ }
out:
if (!pixbuf)
Modified: trunk/src/applet.h
==============================================================================
--- trunk/src/applet.h (original)
+++ trunk/src/applet.h Tue Oct 7 00:05:55 2008
@@ -164,6 +164,7 @@
GdkPixbuf * (*get_icon) (NMDevice *device,
NMDeviceState state,
+ NMConnection *connection,
char **tip,
NMApplet *applet);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]