[network-manager-applet/bg/mm-device-race-bgo776384: 1/3] device-broadband: use define for devinfo tag
- From: Beniamino Galvani <bgalvani src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet/bg/mm-device-race-bgo776384: 1/3] device-broadband: use define for devinfo tag
- Date: Fri, 30 Dec 2016 09:50:37 +0000 (UTC)
commit 163e6e842267a6e7e6e72f486160179312c44ca9
Author: Beniamino Galvani <bgalvani redhat com>
Date: Fri Dec 30 10:19:24 2016 +0100
device-broadband: use define for devinfo tag
src/applet-device-broadband.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/applet-device-broadband.c b/src/applet-device-broadband.c
index 6e7952c..59dd462 100644
--- a/src/applet-device-broadband.c
+++ b/src/applet-device-broadband.c
@@ -30,6 +30,8 @@
#include "mobile-helpers.h"
#include "mb-menu-item.h"
+#define BROADBAND_INFO_TAG "devinfo"
+
typedef struct {
NMApplet *applet;
NMDevice *device;
@@ -470,7 +472,7 @@ get_secrets (SecretsRequest *req,
error))
return FALSE;
- devinfo = g_object_get_data (G_OBJECT (device), "devinfo");
+ devinfo = g_object_get_data (G_OBJECT (device), BROADBAND_INFO_TAG);
if (!devinfo) {
g_set_error (error,
NM_SECRET_AGENT_ERROR,
@@ -637,7 +639,7 @@ get_icon (NMDevice *device,
return;
}
- info = g_object_get_data (G_OBJECT (device), "devinfo");
+ info = g_object_get_data (G_OBJECT (device), BROADBAND_INFO_TAG);
if (!info) {
g_warning ("ModemManager is not available for modem at %s",
nm_device_get_udi (device));
@@ -720,7 +722,7 @@ add_menu_item (NMDevice *device,
GtkWidget *item;
int i;
- info = g_object_get_data (G_OBJECT (device), "devinfo");
+ info = g_object_get_data (G_OBJECT (device), BROADBAND_INFO_TAG);
if (!info) {
g_warning ("ModemManager is not available for modem at %s",
nm_device_get_udi (device));
@@ -1057,7 +1059,7 @@ device_added (NMDevice *device,
/* Store device info */
g_object_set_data_full (G_OBJECT (modem),
- "devinfo",
+ BROADBAND_INFO_TAG,
info,
(GDestroyNotify)broadband_device_info_free);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]