Commit graph

4 commits

Author SHA1 Message Date
7a6e205002 WIP 2025-12-28 22:38:39 +07:00
d76a77b5b3 Fix critical D-Bus and gadget integration issues
This commit fixes several critical bugs preventing the module from working:

1. Agent D-Bus Object Lifecycle Fix:
   - Keep manager_obj reference alive in IWD_Agent structure
   - Prevents async RegisterAgent call from being canceled
   - Fixes 'Canceled by user' error during agent registration
   - Object is now properly unreferenced during shutdown

2. Signal Handler Cleanup Fix:
   - Don't manually delete signal handlers after object unref
   - eldbus_object_unref() automatically cleans up handlers
   - Prevents 'Eina Magic Check Failed' error on module unload
   - Fixes double-free of signal handlers

3. Gadget Integration Fix:
   - Set gcc->o_base directly to attach icon to gadcon
   - Prevents shelf layout corruption when adding module
   - Proper Enlightenment gadcon integration

4. Agent Path Fix:
   - Use IWD_DAEMON_PATH ('/net/connman/iwd') for AgentManager
   - AgentManager interface is on daemon object, not root
   - Fixes 'No matching method found' error

These fixes resolve:
- Module load/unload crashes
- Shelf disorganization
- Agent registration failures
- D-Bus signal handler corruption

The module should now load cleanly, register the agent successfully,
and unload without errors.
2025-12-28 21:51:41 +07:00
c94eb55284 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>
2025-12-28 18:53:00 +07:00
b3271d85c0 feat: Phase 3 - Gadget & Basic UI
Implemented shelf gadget and popup UI for Wi-Fi management.

Phase 3: Gadget & Basic UI
- Created gadcon provider for shelf icon integration (e_mod_gadget.c)
- Implemented popup window with network list (e_mod_popup.c)
- Added instance structure to track gadget state
- Gadget displays connection status with color-coded icon
- Popup shows current connection and available networks
- Rescan and disconnect functionality working
- Mouse click toggles popup open/close

Features:
- Shelf gadget with visual connection status (green/yellow/gray/red)
- Popup window with Elementary widgets
- Current connection display with disconnect button
- Available networks list showing SSID, security type, and known status
- Rescan button to refresh network list
- Auto-refresh popup after scan (500ms delay)

UI Components:
- Gadget: 16x16 icon with connection state colors
- Popup: Title, connection status frame, network list, action buttons
- Network list: Shows SSID (security) [* = known]
- Buttons: Rescan, Disconnect (when connected)

Module size: 152KB (increased from 24KB with Phase 2)
Files added: 2 source files (e_mod_gadget.c, e_mod_popup.c)

Next phase: Connection Management (passphrase dialog, agent integration)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-28 18:37:11 +07:00