[network-manager-applet] applet: small fixups for "return icon name from get_icon() whenever possible" (bgo #740574)



commit b44565f57f88da777e21e7a10ac3d87d8c61d488
Author: Thomas Haller <thaller redhat com>
Date:   Wed Dec 17 11:30:43 2014 +0100

    applet: small fixups for "return icon name from get_icon() whenever possible" (bgo #740574)
    
    https://bugzilla.gnome.org/show_bug.cgi?id=740574

 src/applet-device-broadband.c |   22 +++++++++++-----------
 src/applet.c                  |    8 ++++----
 2 files changed, 15 insertions(+), 15 deletions(-)
---
diff --git a/src/applet-device-broadband.c b/src/applet-device-broadband.c
index 01d4c52..26d7707 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 9b7eb5e..c69232f 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)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]