[network-manager-applet/pavlix/appindicator-bgo740574: 5/7] fixup! indicator: add support for --enable-indicator
- From: Thomas Haller <thaller src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet/pavlix/appindicator-bgo740574: 5/7] fixup! indicator: add support for --enable-indicator
- Date: Wed, 17 Dec 2014 12:42:01 +0000 (UTC)
commit 09c7775b6a23dadd4931e6d012fda316451135ee
Author: Thomas Haller <thaller redhat com>
Date: Wed Dec 17 11:32:54 2014 +0100
fixup! indicator: add support for --enable-indicator
src/applet.c | 25 ++++---------------------
src/mobile-helpers.c | 2 +-
2 files changed, 5 insertions(+), 22 deletions(-)
---
diff --git a/src/applet.c b/src/applet.c
index da1272d..ff3c033 100644
--- a/src/applet.c
+++ b/src/applet.c
@@ -2632,9 +2632,7 @@ foo_device_state_changed_cb (NMDevice *device,
}
applet_schedule_update_icon (applet);
-#ifdef ENABLE_INDICATOR
applet_schedule_update_menu (applet);
-#endif
}
static void
@@ -2678,9 +2676,7 @@ foo_client_state_changed_cb (NMClient *client, GParamSpec *pspec, gpointer user_
}
applet_schedule_update_icon (applet);
-#ifdef ENABLE_INDICATOR
applet_schedule_update_menu (applet);
-#endif
}
#ifdef ENABLE_INDICATOR
@@ -2690,9 +2686,7 @@ foo_device_removed_cb (NMClient *client, NMDevice *device, gpointer user_data)
NMApplet *applet = NM_APPLET (user_data);
applet_schedule_update_icon (applet);
-#ifdef ENABLE_INDICATOR
applet_schedule_update_menu (applet);
-#endif
}
#endif
@@ -2711,9 +2705,7 @@ foo_manager_running_cb (NMClient *client,
}
applet_schedule_update_icon (applet);
-#ifdef ENABLE_INDICATOR
applet_schedule_update_menu (applet);
-#endif
}
#define VPN_STATE_ID_TAG "vpn-state-id"
@@ -2743,9 +2735,7 @@ foo_active_connections_changed_cb (NMClient *client,
}
applet_schedule_update_icon (applet);
-#ifdef ENABLE_INDICATOR
applet_schedule_update_menu (applet);
-#endif
}
static void
@@ -3701,30 +3691,23 @@ setup_statusicon_menu (NMApplet *applet)
applet->context_menu = nma_context_menu_create (applet);
- return TRUE;
+ return TRUE;
}
static gboolean
setup_widgets (NMApplet *applet)
{
- gboolean success = FALSE;
-#ifdef ENABLE_INDICATOR
- gboolean indicator_success = FALSE;
-#endif
+ gboolean success;
g_return_val_if_fail (NM_IS_APPLET (applet), FALSE);
success = setup_statusicon_menu (applet);
#ifdef ENABLE_INDICATOR
- indicator_success = setup_indicator_menu (applet);
+ if (setup_indicator_menu (applet))
+ return TRUE;
#endif
-#ifndef ENABLE_INDICATOR
- return success;
-#else
- return success || indicator_success;
-#endif
return success;
}
diff --git a/src/mobile-helpers.c b/src/mobile-helpers.c
index 78f382a..d3a0fd0 100644
--- a/src/mobile-helpers.c
+++ b/src/mobile-helpers.c
@@ -165,7 +165,7 @@ mobile_helper_get_connection_label (const char *connection_name,
if (connection_name) {
if (provider && tech_name)
desc_string = g_strdup_printf ("%s (%s %s)", connection_name, provider,
tech_name);
- else if (provider || tech_name)
+ else if (provider || tech_name)
desc_string = g_strdup_printf ("%s (%s)", connection_name, provider ?
provider : tech_name);
else
desc_string = g_strdup_printf ("%s", connection_name);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]