This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch feature/nm-vpn-support
in repository enlightenment.
View the commit online.
commit 482c4b5982b381cbb0e4a8f4c091b2b98f966a73
Author: [email protected] <[email protected]>
AuthorDate: Fri May 22 14:54:44 2026 -0600
refactor(networkmanager): reuse elementary's stock shield icons
Drop the custom vpn-shield-active/inactive SVGs and the
e/modules/networkmanager/vpn_row_icon edje group from the module's
theme. Use elementary's existing icon set instead:
security-high → shield-gold (active VPN row, toolbar badge)
security-low → shield-empty (inactive VPN row)
VPN row icon is now a plain elm_icon with elm_icon_standard_set; the
gadget toolbar badge is a SWALLOW that the C side populates with
security-high. Visibility of the toolbar badge is still toggled by
the e,vpn,active / e,vpn,inactive signals against the slot.
---
.../networkmanager/e-module-networkmanager.edc | 46 ----------------------
src/modules/networkmanager/e_mod_main.c | 45 ++++++++++-----------
src/modules/networkmanager/vpn-shield-active.svg | 8 ----
src/modules/networkmanager/vpn-shield-inactive.svg | 8 ----
4 files changed, 20 insertions(+), 87 deletions(-)
diff --git a/src/modules/networkmanager/e-module-networkmanager.edc b/src/modules/networkmanager/e-module-networkmanager.edc
index 62c64b32c..625962a23 100644
--- a/src/modules/networkmanager/e-module-networkmanager.edc
+++ b/src/modules/networkmanager/e-module-networkmanager.edc
@@ -1,7 +1,5 @@
images {
image: "module_icon.png" COMP;
- vector: "vpn-shield-active.svg";
- vector: "vpn-shield-inactive.svg";
}
color_classes {
@@ -34,50 +32,6 @@ collections {
}
}
- /* VPN row icon for the popup genlist — two stacked SVG VECTOR parts,
- * one for inactive (grey) and one for active (green), toggled by
- * e,vpn,active / e,vpn,inactive signals emitted by the module. */
- group { name: "e/modules/networkmanager/vpn_row_icon";
- parts {
- part { name: "inactive_icon"; mouse_events: 0;
- type: VECTOR;
- description { state: "default" 0.0;
- image.normal: "vpn-shield-inactive.svg";
- visible: 1;
- }
- description { state: "active" 0.0;
- inherit: "default" 0.0;
- visible: 0;
- }
- }
- part { name: "active_icon"; mouse_events: 0;
- type: VECTOR;
- description { state: "default" 0.0;
- image.normal: "vpn-shield-active.svg";
- visible: 0;
- }
- description { state: "active" 0.0;
- inherit: "default" 0.0;
- visible: 1;
- }
- }
- }
- programs {
- program { signal: "e,vpn,active"; source: "e";
- action: STATE_SET "active" 0.0;
- target: "inactive_icon";
- target: "active_icon";
- transition: ACCELERATE 0.15;
- }
- program { signal: "e,vpn,inactive"; source: "e";
- action: STATE_SET "default" 0.0;
- target: "inactive_icon";
- target: "active_icon";
- transition: DECELERATE 0.15;
- }
- }
- }
-
/* Custom genlist item style that renders elm.text.sub in wifi-band blue
* (RGB 51 153 255) instead of the default disabled/muted colour.
* Used for AP, ethernet, and VPN rows so the IP sub-text stands out.
diff --git a/src/modules/networkmanager/e_mod_main.c b/src/modules/networkmanager/e_mod_main.c
index 97517e2ae..79454c11d 100644
--- a/src/modules/networkmanager/e_mod_main.c
+++ b/src/modules/networkmanager/e_mod_main.c
@@ -494,29 +494,14 @@ _enm_itc_vpn_content_get(void *data, Evas_Object *obj, const char *part)
if (!strcmp(part, "elm.swallow.icon"))
{
- /* Shield icon drawn by our edje theme — gray-when-inactive +
- * green-when-active stacked SVG vector parts, toggled with a
- * signal so the color comes from the theme, not from C.
- * Wrap in elm_layout so elementary's widget tree is happy
- * (a raw edje_object as genlist content crashes on teardown
- * because elementary tries to walk elm_widget_* APIs on it). */
- Evas_Object *ic = elm_layout_add(obj);
- if (!ic || !elm_layout_file_set(ic, e_nm_theme_path(),
- "e/modules/networkmanager/vpn_row_icon"))
- {
- if (ic) evas_object_del(ic);
- return NULL;
- }
- evas_object_size_hint_min_set(ic, ELM_SCALE_SIZE(24), ELM_SCALE_SIZE(24));
- elm_layout_signal_emit(ic,
+ /* Reuse elementary's stock shield icons: security-high (gold)
+ * for active VPN, security-low (gray) for inactive. */
+ Evas_Object *ic = elm_icon_add(obj);
+ if (!ic) return NULL;
+ elm_icon_standard_set(ic,
vc->vpn_state == NM_VPN_STATE_ACTIVATED
- ? "e,vpn,active" : "e,vpn,inactive",
- "e");
- /* Do NOT set pass_events on the icon: pass_events routes clicks to
- * lower Evas layers rather than propagating up to the genlist item
- * view, which prevents the "selected" smart callback from firing.
- * Normal propagate_events (default EINA_TRUE) correctly bubbles the
- * click up through the widget tree to the item's MOUSE_DOWN handler. */
+ ? "security-high" : "security-low");
+ evas_object_size_hint_min_set(ic, ELM_SCALE_SIZE(24), ELM_SCALE_SIZE(24));
return ic;
}
if (!strcmp(part, "elm.swallow.end"))
@@ -2475,9 +2460,19 @@ _gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style)
_enm_gadget_setup(inst);
- /* The VPN badge is now an IMAGE part baked into the connman/main edje
- * group (efl theme), toggled by e,vpn,active / e,vpn,inactive signals.
- * No swallow needed here. */
+ /* The VPN badge slot in the connman/main edje group is a SWALLOW that
+ * the theme toggles visible on e,vpn,active / e,vpn,inactive. Swallow
+ * elementary's stock security-high (shield-gold) icon into it. */
+ {
+ Evas_Object *badge = elm_icon_add(inst->ui.gadget);
+ if (badge)
+ {
+ elm_icon_standard_set(badge, "security-high");
+ if (!edje_object_part_swallow(inst->ui.gadget,
+ "vpn_badge", badge))
+ evas_object_del(badge);
+ }
+ }
/* Append the instance BEFORE the initial shield emit so the loop in
* _enm_vpn_emit_shield includes this new gadget. */
diff --git a/src/modules/networkmanager/vpn-shield-active.svg b/src/modules/networkmanager/vpn-shield-active.svg
deleted file mode 100644
index b79d1a3ed..000000000
--- a/src/modules/networkmanager/vpn-shield-active.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<svg width="64" height="64" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg">
- <path d="M32 3 L56 11 L56 30 C56 44 47 55 32 61 C17 55 8 44 8 30 L8 11 Z"
- fill="#4caf50" stroke="#1b5e20" stroke-width="3" stroke-linejoin="round"/>
- <path d="M20 32 L28 40 L44 22"
- stroke="#ffffff" stroke-width="5" fill="none"
- stroke-linecap="round" stroke-linejoin="round"/>
-</svg>
diff --git a/src/modules/networkmanager/vpn-shield-inactive.svg b/src/modules/networkmanager/vpn-shield-inactive.svg
deleted file mode 100644
index 38ff75849..000000000
--- a/src/modules/networkmanager/vpn-shield-inactive.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<svg width="64" height="64" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg">
- <path d="M32 3 L56 11 L56 30 C56 44 47 55 32 61 C17 55 8 44 8 30 L8 11 Z"
- fill="#9e9e9e" stroke="#424242" stroke-width="3" stroke-linejoin="round"/>
- <path d="M20 32 L28 40 L44 22"
- stroke="#eeeeee" stroke-width="5" fill="none"
- stroke-linecap="round" stroke-linejoin="round"/>
-</svg>
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.