target: "state-inverted-clipper";
after: "state-connecting-stop";
}
+ program { name: "e,changed,state,idle";
+ signal: "e,changed,state,idle";
+ source: "e";
+ action: STATE_SET "default" 0.0;
+ target: "state-clipper";
+ target: "state-inverted-clipper";
+ after: "state-connecting-stop";
+ }
program { name: "e,changed,state,association";
signal: "e,changed,state,association";
programs {
program {
+ name: "resize";
+ signal: "resize";
+ script {
+ new x, y, w, h;
+ get_geometry(PART:"eventarea", x, y, w, h);
+ if (w <= 32)
+ set_state(PART:"e.text.name", "hidden", 0.0);
+ else
+ set_state(PART:"e.text.name", "default", 0.0);
+ }
+ }
+
+ program {
name: "e,changed,connected,no";
signal: "e,changed,connected,no";
source: "e";
target: "state-inverted-clipper";
after: "state-connecting-stop";
}
+ program { name: "e,changed,state,idle";
+ signal: "e,changed,state,idle";
+ source: "e";
+ action: STATE_SET "default" 0.0;
+ target: "state-clipper";
+ target: "state-inverted-clipper";
+ after: "state-connecting-stop";
+ }
program { name: "e,changed,state,association";
signal: "e,changed,state,association";
* STATUS:
*
* displays current status, allows connecting and
- * disconnecting. needs connman from git (will be 0.48, still
- * unreleased).
+ * disconnecting. needs connman 0.48 or even better from git.
*
* TODO:
*
* MUST:
- * 1. request for passphrase if pass_required is set or
- * connect error is org.moblin.connman.Error.PassphraseRequired
- * 2. improve gadget ui
- * 3. investigate stringshare mess when manager goes out
+ * 1. improve gadget ui
*
* GOOD:
* 1. imporve mouse over popup ui
*
* IDEAS:
* 1. create static connections
+ * 2. handle cellular: ask APN, Username and Password, use SetupRequired
+ * 3. handle vpn, bluetooth, wimax
*
*/
#endif
e_widget_size_min_get(list, &mw, &mh);
+ if (mw < 200)
+ mw = 200;
+ if (mh < 60)
+ mh = 60;
e_dialog_content_set(d->dia, list, mw, mh);
e_dialog_button_add
str = NULL; \
if (!getter(element, &str)) \
str = NULL; \
- if (service->name_ != str) \
- printf("changing "#name_": %s (%p) with %s (%p)\n", service->name_, service->name_, str, str); \
eina_stringshare_replace(&service->name_, str)
GSTR(name, e_connman_service_name_get);
GSTR(ipv4_netmask, e_connman_service_ipv4_netmask_get);
#undef GSTR
+ if ((service->state != e_str_failure) && (service->error))
+ eina_stringshare_replace(&service->error, NULL);
+
if (!e_connman_service_strength_get(element, &u8))
u8 = 0;
service->strength = u8;
GSTR(ipv4_netmask, e_connman_service_ipv4_netmask_get);
#undef GSTR
+ if ((service->state != e_str_failure) && (service->error))
+ eina_stringshare_replace(&service->error, NULL);
+
if (!e_connman_service_strength_get(element, &u8))
u8 = 0;
service->strength = u8;
if (error && dbus_error_is_set(error))
{
- if (strcmp(error->message,
+ if (strcmp(error->name,
"org.moblin.connman.Error.NotConnected") != 0)
- _connman_dbus_error_show(_("Disconnect to network service."), error);
+ _connman_dbus_error_show(_("Disconnect from network service."),
+ error);
dbus_error_free(error);
}
{
if (!e_connman_service_disconnect
(service->element, _connman_service_disconnect_cb, service->ctxt))
- _connman_operation_error_show(_("Disconnect to network service."));
+ _connman_operation_error_show(_("Disconnect from network service."));
}
struct connman_service_connect_data
if (error && dbus_error_is_set(error))
{
+ /* TODO: cellular might ask for SetupRequired to enter APN,
+ * username and password
+ */
if ((strcmp(error->name,
"org.moblin.connman.Error.PassphraseRequired") == 0) ||
(strcmp(error->name,
if (!service)
_connman_operation_error_show
(_("Service does not exist anymore"));
- else
+ else if (strcmp(service->type, "wifi") == 0)
{
_connman_service_disconnect(service);
_connman_service_ask_pass_and_connect(service);
}
+ else
+ /* TODO: cellular might ask for user and pass */
+ _connman_dbus_error_show(_("Connect to network service."),
+ error);
}
else if (strcmp(error->name,
"org.moblin.connman.Error.AlreadyConnected") != 0)
while (ctxt->services)
{
E_Connman_Service *service = (E_Connman_Service *)ctxt->services;
- ctxt->services = eina_inlist_remove(ctxt->services, ctxt->services);
- _connman_service_free(service);
+ e_connman_element_listener_del
+ (service->element, _connman_service_changed, service);
+ /* no need for free or unlink, since listener_del() calls
+ * _connman_service_freed()
+ */
+ //ctxt->services = eina_inlist_remove(ctxt->services, ctxt->services);
+ //_connman_service_free(service);
}
}
edje_object_signal_emit(o, "e,changed,error,no", "e");
edje_object_part_text_set(o, "e.text.state", _("disconnect"));
+ edje_object_signal_emit(o, "e,changed,state,disconnect", "e");
edje_object_signal_emit(o, "e,changed,mode,no", "e");