summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2014-12-17 11:30:43 +0100
committerDan Williams <dcbw@redhat.com>2014-12-17 09:42:02 -0600
commitb44565f57f88da777e21e7a10ac3d87d8c61d488 (patch)
tree10db045013bfee21df77593cb658ec549a87a484
parent411415fe7aa6bc03e5326b606086dbe7e3f8d840 (diff)
downloadnetwork-manager-applet-b44565f57f88da777e21e7a10ac3d87d8c61d488.tar.gz
applet: small fixups for "return icon name from get_icon() whenever possible" (bgo #740574)
https://bugzilla.gnome.org/show_bug.cgi?id=740574
-rw-r--r--src/applet-device-broadband.c22
-rw-r--r--src/applet.c8
2 files changed, 15 insertions, 15 deletions
diff --git a/src/applet-device-broadband.c b/src/applet-device-broadband.c
index 01d4c52c..26d77073 100644
--- a/src/applet-device-broadband.c
+++ b/src/applet-device-broadband.c
@@ -635,17 +635,17 @@ get_icon (NMDevice *device,
info = g_object_get_data (G_OBJECT (device), "devinfo");
g_assert (info);
- return mobile_helper_get_icon (device,
- state,
- connection,
- out_pixbuf,
- out_icon_name,
- tip,
- applet,
- broadband_state_to_mb_state (info),
- broadband_act_to_mb_act (info),
- mm_modem_get_signal_quality (info->mm_modem, NULL),
- (mm_modem_get_state (info->mm_modem) >= MM_MODEM_STATE_ENABLED));
+ mobile_helper_get_icon (device,
+ state,
+ connection,
+ out_pixbuf,
+ out_icon_name,
+ tip,
+ applet,
+ broadband_state_to_mb_state (info),
+ broadband_act_to_mb_act (info),
+ mm_modem_get_signal_quality (info->mm_modem, NULL),
+ (mm_modem_get_state (info->mm_modem) >= MM_MODEM_STATE_ENABLED));
}
/********************************************************************/
diff --git a/src/applet.c b/src/applet.c
index 9b7eb5e0..c69232ff 100644
--- a/src/applet.c
+++ b/src/applet.c
@@ -2741,9 +2741,9 @@ mm1_client_setup (NMApplet *applet)
static void
applet_common_get_device_icon (NMDeviceState state,
- GdkPixbuf **out_pixbuf,
- char **out_icon_name,
- NMApplet *applet)
+ GdkPixbuf **out_pixbuf,
+ char **out_icon_name,
+ NMApplet *applet)
{
int stage = -1;
@@ -2854,7 +2854,7 @@ applet_get_device_icon_for_state (NMApplet *applet,
if (!*out_pixbuf && icon_name)
*out_pixbuf = g_object_ref (nma_icon_check_and_load (icon_name, applet));
- *out_icon_name = icon_name ? g_strdup (icon_name) : NULL;
+ *out_icon_name = g_strdup (icon_name);
if (!*out_tip)
*out_tip = get_tip_for_device_state (device, state, connection);
if (icon_name || *out_pixbuf)