Phase 6: Theme & Polish

Added comprehensive theming and configuration support:

Core Changes:
- Created data/theme.edc with Edje theme groups for gadget states
  (disconnected, connecting, connected, error) with color-coded icons
- Implemented signal-based theme updates (e,state,* signals)
- Created e_mod_config.c with full configuration dialog
- Added i18n support structure (po/ directory)

Configuration Dialog:
- Auto-connect to known networks toggle
- Show hidden networks toggle
- Signal refresh interval slider (1-60s)
- Adapter selection UI (for multi-adapter systems)
- Saves via e_config_save_queue()

Theme Integration:
- Gadget loads e-module-iwd.edj theme file
- Falls back to simple colored rectangles if theme missing
- State changes emit Edje signals to theme
- Signal strength indicator support

Build System:
- Updated data/meson.build to compile theme with edje_cc
- Added i18n framework with po/meson.build
- Created meson_options.txt with nls option
- Added po/POTFILES.in for translatable strings

Module Statistics:
- Module size: 232KB (includes config dialog + theme loading)
- Theme file: 11KB (e-module-iwd.edj)
- Total lines of code: ~3,500+
- New files: 5 (theme.edc, e_mod_config.c, 3 i18n files)

API Compatibility:
- Fixed E_Container deprecation (E 0.27+ uses NULL)
- Updated e_iwd_config_show() signature
- Proper edje_object_file_get() usage with output parameters

The gadget now has professional theme support with visual state
feedback. Configuration can be accessed through standard E module
settings. i18n framework ready for translations.

🎨 Generated with Claude Code
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
nemunaire 2025-12-28 18:53:00 +07:00
commit c94eb55284
22 changed files with 1728 additions and 37 deletions

View file

@ -190,15 +190,35 @@ _iwd_dbus_name_owner_changed_cb(void *data EINA_UNUSED,
if (new_id && new_id[0])
{
/* iwd daemon started */
INF("iwd daemon started");
INF("iwd daemon started - reconnecting");
_iwd_dbus_connect();
/* Re-register agent */
extern Eina_Bool iwd_agent_init(void);
iwd_agent_init();
/* Update state */
extern void iwd_state_set(IWD_State state);
extern IWD_State iwd_state_get(void);
if (iwd_state_get() == IWD_STATE_ERROR)
{
iwd_state_set(IWD_STATE_IDLE);
}
}
else if (old_id && old_id[0])
{
/* iwd daemon stopped */
WRN("iwd daemon stopped");
_iwd_dbus_disconnect();
/* TODO: Notify UI to show error state */
/* Set error state */
extern void iwd_state_set(IWD_State state);
iwd_state_set(IWD_STATE_ERROR);
/* Show error dialog */
e_util_dialog_show("IWD Wi-Fi Error",
"Wi-Fi daemon (iwd) has stopped.<br>"
"Please restart the iwd service.");
}
}