struct connman_service_move_data *d = data;
if (error && dbus_error_is_set(error))
{
- ERR("%s method failed with message \'%s\'", error->name, error->message);
- dbus_error_free(error);
+ ERR("%s method failed with message \'%s\'",
+ error->name, error->message);
+ dbus_error_free(error);
}
else
DBG("Changed service order");
d->service_path = eina_stringshare_ref(service->path);
d->ctxt = service->ctxt;
- DBG("Try to move %s %s %s\n", d->service_path, direction==SERVICE_MOVE_UP?"before":"after", d->service_ref_path);
+ DBG("Try to move %s %s %s\n", d->service_path,
+ (direction == SERVICE_MOVE_UP) ? "before" : "after",
+ d->service_ref_path);
+
if (direction == SERVICE_MOVE_UP)
- ret = e_connman_service_move_before(service->element, d->service_ref_path, _connman_service_move_cb, d);
+ ret = e_connman_service_move_before
+ (service->element, d->service_ref_path, _connman_service_move_cb, d);
else
- ret = e_connman_service_move_after(service->element, d->service_ref_path, _connman_service_move_cb, d);
+ ret = e_connman_service_move_after
+ (service->element, d->service_ref_path, _connman_service_move_cb, d);
if (!ret)
- {
- eina_stringshare_del(d->service_ref_path);
- eina_stringshare_del(d->service_path);
- E_FREE(d);
- _connman_operation_error_show(_("Re-order preferred services"));
- }
+ {
+ eina_stringshare_del(d->service_ref_path);
+ eina_stringshare_del(d->service_path);
+ E_FREE(d);
+ _connman_operation_error_show(_("Re-order preferred services"));
+ }
}
struct _connman_technology_onoff_data
struct _connman_technology_onoff_data *d = data;
if (error && dbus_error_is_set(error))
{
- ERR("%s method failed with message \'%s\'.", error->name, error->message);
- dbus_error_free(error);
+ ERR("%s method failed with message \'%s\'.",
+ error->name, error->message);
+ dbus_error_free(error);
}
else
- DBG("Technology %s has been %s.", d->type, d->on?"enabled":"disabled");
+ DBG("Technology %s has been %s.", d->type, d->on ? "enabled" : "disabled");
eina_stringshare_del(d->type);
E_FREE(d);
d = E_NEW(struct _connman_technology_onoff_data, 1);
if (!d)
{
- _connman_operation_error_show("No memory available");
- return;
+ _connman_operation_error_show("No memory available");
+ return;
}
d->type = eina_stringshare_add(type);
d->on = on;
if(on)
- ret = e_connman_manager_technology_enable(type, _connman_technology_onoff_cb, d);
+ ret = e_connman_manager_technology_enable
+ (type, _connman_technology_onoff_cb, d);
else
- ret = e_connman_manager_technology_disable(type, _connman_technology_onoff_cb, d);
+ ret = e_connman_manager_technology_disable
+ (type, _connman_technology_onoff_cb, d);
if(!ret)
{
- eina_stringshare_del(type);
- E_FREE(d);
+ eina_stringshare_del(type);
+ E_FREE(d);
}
return;
view = E_NEW(E_Config_Dialog_View, 1);
if (!view)
- return NULL;
+ return NULL;
view->create_cfdata = _create_data;
view->free_cfdata = _free_data;
view->basic.create_widgets = _basic_create;
view->basic.apply_cfdata = _basic_apply;
- dialog = e_config_dialog_new(con, _("Connection Manager"),
- _e_connman_Name, "e_connman_config_dialog_new",
- e_connman_theme_path(), 0, view, ctxt);
+ dialog = e_config_dialog_new
+ (con, _("Connection Manager"),
+ _e_connman_Name, "e_connman_config_dialog_new",
+ e_connman_theme_path(), 0, view, ctxt);
e_dialog_resizable_set(dialog->dia, 1);
return dialog;
cfdata = E_NEW(E_Config_Dialog_Data, 1);
if (!cfdata)
- return NULL;
+ return NULL;
_fill_data(cfdata, dialog->data);
return cfdata;
}
while(ui->technologies)
{
- struct connman_config_technologies *t = (struct connman_config_technologies *) ui->technologies;
- ui->technologies = eina_inlist_remove(ui->technologies, EINA_INLIST_GET(t));
- E_FREE(t);
+ struct connman_config_technologies *t;
+
+ t = (struct connman_config_technologies *) ui->technologies;
+ ui->technologies = eina_inlist_remove
+ (ui->technologies, EINA_INLIST_GET(t));
+ E_FREE(t);
}
ctxt->conf_dialog = NULL;
ui = &cfdata->networks.settings_otb;
ui->list_general = e_widget_list_add(evas, 0, 0);
-#define _APPEND_ITEM(item, label) \
- do \
- { \
- ui->lb_##item = e_widget_label_add(evas, _(label)); \
- ui->lb_##item ## _val = e_widget_entry_add \
- (evas, NULL, NULL, NULL, NULL); \
- e_widget_entry_readonly_set(ui->lb_##item ## _val, 1); \
- e_widget_list_object_append \
- (ui->list_general, ui->lb_##item, 1, 0, 0.0); \
- e_widget_list_object_append \
- (ui->list_general, ui->lb_##item ## _val, 1, 0, 0.0); \
-} while(0)
+#define _APPEND_ITEM(item, label) \
+ do \
+ { \
+ ui->lb_##item = e_widget_label_add(evas, _(label)); \
+ ui->lb_##item ## _val = e_widget_entry_add \
+ (evas, NULL, NULL, NULL, NULL); \
+ e_widget_entry_readonly_set(ui->lb_##item ## _val, 1); \
+ e_widget_list_object_append \
+ (ui->list_general, ui->lb_##item, 1, 0, 0.0); \
+ e_widget_list_object_append \
+ (ui->list_general, ui->lb_##item ## _val, 1, 0, 0.0); \
+ } while(0)
_APPEND_ITEM(autoconn, _("Auto-connect:"));
_APPEND_ITEM(favorite, _("Favorite:"));
ui->settings_otb.settings_otb = e_widget_toolbook_add(evas, 24 * e_scale, 24 * e_scale);
_network_settings_general_page_create(evas, cfdata);
- e_widget_toolbook_page_append(ui->settings_otb.settings_otb, NULL, _("General"),
- ui->settings_otb.scr_general, 1, 1, 1, 1, 0.5, 0.0);
+ e_widget_toolbook_page_append
+ (ui->settings_otb.settings_otb, NULL, _("General"),
+ ui->settings_otb.scr_general, 1, 1, 1, 1, 0.5, 0.0);
_network_settings_proxy_page_create(evas, cfdata);
- e_widget_toolbook_page_append(ui->settings_otb.settings_otb, NULL, _("Proxy"),
- ui->settings_otb.list_proxy, 1, 0, 1, 0, 0.5, 0.0);
+ e_widget_toolbook_page_append
+ (ui->settings_otb.settings_otb, NULL, _("Proxy"),
+ ui->settings_otb.list_proxy, 1, 0, 1, 0, 0.5, 0.0);
e_widget_size_min_set(ui->settings_otb.settings_otb, 100, 100);
e_widget_toolbook_page_show(ui->settings_otb.settings_otb, 0);
E_Connman_Module_Context *ctxt = cfdata->ctxt;
struct connman_config_network_settings_ui *ui = &cfdata->networks.settings_otb;
- service = _connman_ctxt_find_service_stringshare(ctxt, cfdata->selected_network);
+ service = _connman_ctxt_find_service_stringshare
+ (ctxt, cfdata->selected_network);
if (!service)
{
- ERR("service not found: %s.", cfdata->selected_network);
- return;
+ ERR("service not found: %s.", cfdata->selected_network);
+ return;
}
e_widget_entry_text_set(ui->lb_autoconn_val,
- service->auto_connect ? _("True"): _("False"));
+ service->auto_connect ? _("True"): _("False"));
e_widget_entry_text_set(ui->lb_favorite_val,
- service->favorite ? _("True") : _("False"));
+ service->favorite ? _("True") : _("False"));
e_widget_entry_text_set(ui->lb_type_val, service->type);
e_widget_entry_text_set(ui->lb_ipv4_method_val, service->ipv4_method);
e_widget_entry_text_set(ui->lb_ipv4_address_val, service->ipv4_address);
if (sel >= 0)
{
- int index = e_widget_ilist_selected_get(list);
- int count = e_widget_ilist_count(list);
- e_widget_disabled_set(o_up, !index);
+ int index = e_widget_ilist_selected_get(list);
+ int count = e_widget_ilist_count(list);
+ e_widget_disabled_set(o_up, !index);
- e_widget_disabled_set(o_down, (count > index + 1)?0:1);
+ e_widget_disabled_set(o_down, (count > index + 1)?0:1);
}
else
{
- e_widget_disabled_set(o_up, 1);
- e_widget_disabled_set(o_down, 1);
+ e_widget_disabled_set(o_up, 1);
+ e_widget_disabled_set(o_down, 1);
}
}
{
E_Config_Dialog_Data *cfdata = data;
Evas_Object *list = cfdata->networks.netlist;
- int sel;
-
- sel = e_widget_ilist_selected_get(list);
+ int sel = e_widget_ilist_selected_get(list);
_networks_disable_buttons(cfdata, list, sel);
_networks_fill_details(cfdata, list, sel);
}
EINA_INLIST_FOREACH(ctxt->services, service)
{
- Evas_Object *icon;
- icon = _connman_service_new_list_item(evas, service);
+ Evas_Object *icon = _connman_service_new_list_item(evas, service);
- e_widget_ilist_append
- (list, icon, service->name, _cb_service_selected,
- cfdata, service->path);
+ e_widget_ilist_append
+ (list, icon, service->name, _cb_service_selected,
+ cfdata, service->path);
}
return eina_inlist_count(ctxt->services);
if (sel <= 0)
return;
- service = _connman_ctxt_find_service_stringshare(ctxt, cfdata->selected_network);
+ service = _connman_ctxt_find_service_stringshare
+ (ctxt, cfdata->selected_network);
e_widget_ilist_selected_set(netlist, sel-1);
- service_ref = _connman_ctxt_find_service_stringshare(ctxt, cfdata->selected_network);
+ service_ref = _connman_ctxt_find_service_stringshare
+ (ctxt, cfdata->selected_network);
e_widget_ilist_selected_set(netlist, sel);
if (sel < 0 || (count == sel+1))
return;
- service = _connman_ctxt_find_service_stringshare(ctxt, cfdata->selected_network);
+ service = _connman_ctxt_find_service_stringshare
+ (ctxt, cfdata->selected_network);
e_widget_ilist_selected_set(netlist, sel+1);
- service_ref = _connman_ctxt_find_service_stringshare(ctxt, cfdata->selected_network);
+ service_ref = _connman_ctxt_find_service_stringshare
+ (ctxt, cfdata->selected_network);
e_widget_ilist_selected_set(netlist, sel);
_connman_service_move(service, service_ref, SERVICE_MOVE_DOWN);
/* Buttons */
ot = e_widget_table_add(evas, 0);
- ui->o_up = e_widget_button_add(evas, _("Up"), "go-up", _networks_button_up_cb, cfdata, NULL);
+ ui->o_up = e_widget_button_add
+ (evas, _("Up"), "go-up", _networks_button_up_cb, cfdata, NULL);
e_widget_disabled_set(ui->o_up, 1);
e_widget_table_object_append(ot, ui->o_up, 0, 0, 1, 1, 1, 0, 1, 0);
- ui->o_down = e_widget_button_add(evas, _("Down"), "go-down", _networks_button_down_cb, cfdata, NULL);
+ ui->o_down = e_widget_button_add
+ (evas, _("Down"), "go-down", _networks_button_down_cb, cfdata, NULL);
e_widget_disabled_set(ui->o_down, 1);
e_widget_table_object_append(ot, ui->o_down, 1, 0, 1, 1, 1, 0, 1, 0);
- ui->o_add = e_widget_button_add(evas, _("Add"), "list-add", NULL, cfdata, NULL);
+ ui->o_add = e_widget_button_add
+ (evas, _("Add"), "list-add", NULL, cfdata, NULL);
e_widget_disabled_set(ui->o_add, 1);
e_widget_table_object_append(ot, ui->o_add, 0, 1, 2, 1, 1, 0, 1, 0);
e_widget_size_min_get(ot, &mw, &mh);
e_widget_framelist_object_append_full(ui->netframe, ot,
- 1, 1, /* fill */
- 1, 0, /* expand */
- 0.5, 0.5, /* align */
- mw, mh, /* min */
- 99999, 99999 /* max */
- );
+ 1, 1, /* fill */
+ 1, 0, /* expand */
+ 0.5, 0.5, /* align */
+ mw, mh, /* min */
+ 99999, 99999 /* max */
+ );
}
static void
struct E_Connman_Technology *t;
EINA_INLIST_FOREACH(ctxt->technologies, t)
{
- struct connman_config_technologies *t_list = E_NEW(struct connman_config_technologies, 1);
- t_list->technology = t;
- t_list->enabled = ((t->state == e_str_enabled) || (t->state == e_str_connected));
- t_list->obj = e_widget_check_add(evas, _(t->name), &t_list->enabled);
+ struct connman_config_technologies *t_list;
+
+ t_list = E_NEW(struct connman_config_technologies, 1);
+ t_list->technology = t;
+ t_list->enabled = ((t->state == e_str_enabled) ||
+ (t->state == e_str_connected));
+ t_list->obj = e_widget_check_add(evas, _(t->name), &t_list->enabled);
- ui->technologies = eina_inlist_append(ui->technologies, EINA_INLIST_GET(t_list));
- e_widget_framelist_object_append(ui->type_frame, t_list->obj);
+ ui->technologies = eina_inlist_append
+ (ui->technologies, EINA_INLIST_GET(t_list));
+ e_widget_framelist_object_append(ui->type_frame, t_list->obj);
}
}
otb = e_widget_toolbook_add(evas, 48 * e_scale, 48 * e_scale);
_networks_page_create(evas, cfdata);
- e_widget_toolbook_page_append(otb, NULL, _("Networks Settings"),
- cfdata->networks.hlayout, 1, 1, 1, 1, 0.5, 0.0);
+ e_widget_toolbook_page_append
+ (otb, NULL, _("Networks Settings"),
+ cfdata->networks.hlayout, 1, 1, 1, 1, 0.5, 0.0);
_switches_page_create(evas, cfdata);
- e_widget_toolbook_page_append(otb, NULL, _("Network Switches"),
- cfdata->switches.vlayout, 1, 1, 0, 0, 0.5, 0.5);
+ e_widget_toolbook_page_append
+ (otb, NULL, _("Network Switches"),
+ cfdata->switches.vlayout, 1, 1, 0, 0, 0.5, 0.5);
_networks_list_fill(evas, cfdata);
e_widget_toolbook_page_show(otb, 0);
EINA_INLIST_FOREACH(sw->technologies, t)
{
- int was_enabled = ((t->technology->state == e_str_enabled) || (t->technology->state == e_str_connected));
- if (t->enabled != was_enabled)
- _connman_technology_onoff(ctxt, t->technology->type, t->enabled);
+ int was_enabled = ((t->technology->state == e_str_enabled) ||
+ (t->technology->state == e_str_connected));
+ if (t->enabled != was_enabled)
+ _connman_technology_onoff(ctxt, t->technology->type, t->enabled);
}
if (ctxt->offline_mode != sw->offline_mode)
_connman_toggle_offline_mode(ctxt);
dirlen = strlen(connman_mod->dir);
if (dirlen >= sizeof(tmpbuf) - sizeof(TF))
- return NULL;
+ return NULL;
memcpy(tmpbuf, connman_mod->dir, dirlen);
memcpy(tmpbuf + dirlen, TF, sizeof(TF));
if ((!error) || (!dbus_error_is_set(error)))
{
- ctxt->offline_mode_pending = EINA_FALSE;
- return;
+ ctxt->offline_mode_pending = EINA_FALSE;
+ return;
}
_connman_dbus_error_show(_("Cannot toggle system's offline mode."), error);
if ((!ctxt) || (!ctxt->has_manager))
{
- _connman_operation_error_show(_("ConnMan Daemon is not running."));
- return;
+ _connman_operation_error_show(_("ConnMan Daemon is not running."));
+ return;
}
if (!e_connman_manager_offline_mode_get(&offline))
{
- _connman_operation_error_show
- (_("Query system's offline mode."));
- return;
+ _connman_operation_error_show
+ (_("Query system's offline mode."));
+ return;
}
offline = !offline;
if (!e_connman_manager_offline_mode_set
(offline, _connman_toggle_offline_mode_cb, ctxt))
{
- _connman_operation_error_show
- (_("Cannot toggle system's offline mode."));
- return;
+ _connman_operation_error_show
+ (_("Cannot toggle system's offline mode."));
+ return;
}
}
E_Connman_Module_Context *ctxt;
if (!connman_mod)
- return;
+ return;
ctxt = connman_mod->data;
_connman_toggle_offline_mode(ctxt);
int cleartext;
};
+#if 0 // NOT WORKING, e_widget_entry_password_set() changes stops editing!!!
static void
_connman_passphrase_ask_cleartext_changed(void *data, Evas_Object *obj, void *event __UNUSED__)
{
e_widget_entry_readonly_set(d->entry, 0);
e_widget_focus_set(d->entry, 1);
}
+#endif
static void
_connman_passphrase_ask_ok(void *data, E_Dialog *dia)
if (d->canceled)
{
- free(d->passphrase);
- d->passphrase = NULL;
+ free(d->passphrase);
+ d->passphrase = NULL;
}
d->cb(d->data, d->passphrase, d->service_path);
return;
if (!service)
{
- cb((void *)data, NULL, NULL);
- return;
+ cb((void *)data, NULL, NULL);
+ return;
}
d = E_NEW(struct connman_passphrase_data, 1);
if (!d)
{
- cb((void *)data, NULL, NULL);
- return;
+ cb((void *)data, NULL, NULL);
+ return;
}
d->cb = cb;
d->data = (void *)data;
o = edje_object_add(evas);
e_theme_edje_object_set(o, "base/theme/dialog",
- "e/widgets/dialog/text");
+ "e/widgets/dialog/text");
snprintf(buf, sizeof(buf),
- _("Connection Manager needs your passphrase for <br>"
- "the service <hilight>%s</hilight>"),
- service->name);
+ _("Connection Manager needs your passphrase for <br>"
+ "the service <hilight>%s</hilight>"),
+ service->name);
edje_object_part_text_set(o, "e.textblock.message", buf);
edje_object_size_min_calc(o, &mw, &mh);
evas_object_size_hint_min_set(o, mw, mh);
#if 0 // NOT WORKING, e_widget_entry_password_set() changes stops editing!!!
d->cleartext = 1;
o = e_widget_check_add(evas, _("Show passphrase as clear text"),
- &d->cleartext);
+ &d->cleartext);
evas_object_smart_callback_add
(o, "changed", _connman_passphrase_ask_cleartext_changed, d);
evas_object_show(o);
e_dialog_button_focus_num(d->dia, 0);
e_widget_focus_set(d->entry, 1);
- e_dialog_resizable_set(d->dia, 1);
e_win_centered_set(d->dia->win, 1);
e_dialog_show(d->dia);
}
unsigned char u8;
bool b;
-#define GSTR(name_, getter) \
- str = NULL; \
- if (!getter(element, &str)) \
- str = NULL; \
+#define GSTR(name_, getter) \
+ str = NULL; \
+ if (!getter(element, &str)) \
+ str = NULL; \
eina_stringshare_replace(&service->name_, str)
GSTR(name, e_connman_service_name_get);
u8 = 0;
service->strength = u8;
-#define GBOOL(name_, getter) \
- b = EINA_FALSE; \
- if (!getter(element, &b)) \
- b = EINA_FALSE; \
+#define GBOOL(name_, getter) \
+ b = EINA_FALSE; \
+ if (!getter(element, &b)) \
+ b = EINA_FALSE; \
service->name_ = b
GBOOL(favorite, e_connman_service_favorite_get);
if (ctxt->default_service == service)
{
- ctxt->default_service = NULL;
- _connman_default_service_changed_delayed(ctxt);
+ ctxt->default_service = NULL;
+ _connman_default_service_changed_delayed(ctxt);
}
}
u8 = 0;
service->strength = u8;
-#define GBOOL(name_, getter) \
- b = EINA_FALSE; \
- if (!getter(element, &b)) \
- b = EINA_FALSE; \
+#define GBOOL(name_, getter) \
+ b = EINA_FALSE; \
+ if (!getter(element, &b)) \
+ b = EINA_FALSE; \
service->name_ = b
GBOOL(favorite, e_connman_service_favorite_get);
#define GSTR(name_, getter) \
- str = NULL; \
- if (!getter(element, &str)) \
- str = NULL; \
- eina_stringshare_replace(&t->name_, str)
+ str = NULL; \
+ if (!getter(element, &str)) \
+ str = NULL; \
+ eina_stringshare_replace(&t->name_, str)
static void
_connman_technology_free(E_Connman_Technology *t)
if (error && dbus_error_is_set(error))
{
- if (strcmp(error->name,
- "org.moblin.connman.Error.NotConnected") != 0)
- _connman_dbus_error_show(_("Disconnect from network service."),
- error);
- dbus_error_free(error);
+ if (strcmp(error->name,
+ "org.moblin.connman.Error.NotConnected") != 0)
+ _connman_dbus_error_show(_("Disconnect from network service."),
+ error);
+ dbus_error_free(error);
}
_connman_default_service_changed_delayed(ctxt);
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,
- "org.moblin.connman.Error.Failed") == 0))
- {
- E_Connman_Service *service;
-
- service = _connman_ctxt_find_service_stringshare
- (d->ctxt, d->service_path);
- if (!service)
- _connman_operation_error_show
- (_("Service does not exist anymore"));
- 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)
- _connman_dbus_error_show(_("Connect to network service."), error);
-
- dbus_error_free(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,
+ "org.moblin.connman.Error.Failed") == 0))
+ {
+ E_Connman_Service *service;
+
+ service = _connman_ctxt_find_service_stringshare
+ (d->ctxt, d->service_path);
+ if (!service)
+ _connman_operation_error_show
+ (_("Service does not exist anymore"));
+ 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)
+ _connman_dbus_error_show(_("Connect to network service."), error);
+
+ dbus_error_free(error);
}
_connman_default_service_changed_delayed(d->ctxt);
if (!e_connman_service_connect
(service->element, _connman_service_connect_cb, d))
{
- eina_stringshare_del(d->service_path);
- E_FREE(d);
- _connman_operation_error_show(_("Connect to network service."));
+ eina_stringshare_del(d->service_path);
+ E_FREE(d);
+ _connman_operation_error_show(_("Connect to network service."));
}
}
service = _connman_ctxt_find_service_stringshare(d->ctxt, d->service_path);
if (!service)
{
- _connman_operation_error_show(_("Service does not exist anymore"));
- goto end;
+ _connman_operation_error_show(_("Service does not exist anymore"));
+ goto end;
}
if ((!error) || (!dbus_error_is_set(error)))
service = _connman_ctxt_find_service_stringshare(ctxt, service_path);
if (!service)
{
- _connman_operation_error_show(_("Service does not exist anymore"));
- return;
+ _connman_operation_error_show(_("Service does not exist anymore"));
+ return;
}
if (!passphrase)
{
- _connman_service_disconnect(service);
- return;
+ _connman_service_disconnect(service);
+ return;
}
d = E_NEW(struct connman_service_ask_pass_data, 1);
if (!e_connman_service_passphrase_set
(service->element, passphrase,
- _connman_service_ask_pass_and_connect__set_cb, d))
+ _connman_service_ask_pass_and_connect__set_cb, d))
{
- eina_stringshare_del(d->service_path);
- E_FREE(d);
- _connman_operation_error_show(_("Could not set service's passphrase"));
- return;
+ eina_stringshare_del(d->service_path);
+ E_FREE(d);
+ _connman_operation_error_show(_("Could not set service's passphrase"));
+ return;
}
}
{
while (ctxt->services)
{
- E_Connman_Service *service = (E_Connman_Service *)ctxt->services;
- 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);
+ E_Connman_Service *service = (E_Connman_Service *)ctxt->services;
+ 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);
}
}
EINA_INLIST_FOREACH(ctxt->technologies, t)
{
- if (t->path == element->path)
- return EINA_TRUE;
+ if (t->path == element->path)
+ return EINA_TRUE;
}
return EINA_FALSE;
{
if (error && dbus_error_is_set(error))
{
- ERR("%s method failed with message \'%s\'", error->name, error->message);
- dbus_error_free(error);
+ ERR("%s method failed with message \'%s\'", error->name, error->message);
+ dbus_error_free(error);
}
return;
DBG("Technologies = %d.", count);
for (i = 0; i < count; i++)
{
- E_Connman_Element *e = elements[i];
- E_Connman_Technology *t;
+ E_Connman_Element *e = elements[i];
+ E_Connman_Technology *t;
- if ((!e) || _connman_technologies_element_exists(ctxt, e))
- continue;
+ if ((!e) || _connman_technologies_element_exists(ctxt, e))
+ continue;
- t = _connman_technology_new(ctxt, e);
- if (!t)
- continue;
+ t = _connman_technology_new(ctxt, e);
+ if (!t)
+ continue;
- DBG("Added technology: %s.", t->name);
- ctxt->technologies = eina_inlist_append
- (ctxt->technologies, EINA_INLIST_GET(t));
+ DBG("Added technology: %s.", t->name);
+ ctxt->technologies = eina_inlist_append
+ (ctxt->technologies, EINA_INLIST_GET(t));
}
if (!e_connman_manager_request_scan("", _connman_request_scan_cb, NULL))
for (i = 0; i < count; i++)
{
- E_Connman_Element *e = elements[i];
- E_Connman_Service *service;
+ E_Connman_Element *e = elements[i];
+ E_Connman_Service *service;
- if ((!e) || (_connman_services_element_exists(ctxt, e)))
- continue;
+ if ((!e) || (_connman_services_element_exists(ctxt, e)))
+ continue;
- service = _connman_service_new(ctxt, e);
- if (!service)
- continue;
+ service = _connman_service_new(ctxt, e);
+ if (!service)
+ continue;
- DBG("Added service: %s\n", service->name);
- ctxt->services = eina_inlist_append
- (ctxt->services, EINA_INLIST_GET(service));
+ DBG("Added service: %s\n", service->name);
+ ctxt->services = eina_inlist_append
+ (ctxt->services, EINA_INLIST_GET(service));
}
/* no need to remove elements, as they remove themselves */
EINA_INLIST_FOREACH(ctxt->services, itr)
{
- if ((itr->state == e_str_ready) ||
- (itr->state == e_str_login) ||
- (itr->state == e_str_online))
- {
- def = itr;
- break;
- }
- else if ((itr->state == e_str_association) &&
- ((!def) || (def && def->state != e_str_configuration)))
- def = itr;
- else if (itr->state == e_str_configuration)
- def = itr;
+ if ((itr->state == e_str_ready) ||
+ (itr->state == e_str_login) ||
+ (itr->state == e_str_online))
+ {
+ def = itr;
+ break;
+ }
+ else if ((itr->state == e_str_association) &&
+ ((!def) || (def && def->state != e_str_configuration)))
+ def = itr;
+ else if (itr->state == e_str_configuration)
+ def = itr;
}
DBG("Default service changed to %p (%s)", def, def ? def->name : "");
if ((e_config->mode.offline != ctxt->offline_mode) &&
(!ctxt->offline_mode_pending))
{
- e_config->mode.offline = ctxt->offline_mode;
- e_config_mode_changed();
- e_config_save_queue();
+ e_config->mode.offline = ctxt->offline_mode;
+ e_config_mode_changed();
+ e_config_save_queue();
}
ctxt->default_service = def;
E_Connman_Instance *inst = data;
if (ev->window != inst->ui.input.win)
- return 1;
+ return 1;
_connman_popup_del(inst);
const char *keysym;
if (ev->window != inst->ui.input.win)
- return 1;
+ return 1;
keysym = ev->key;
if (strcmp(keysym, "Escape") == 0)
- _connman_popup_del(inst);
+ _connman_popup_del(inst);
return 1;
}
w = ecore_x_window_input_new(man->root, 0, 0, man->w, man->h);
mask = (ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE |
- ECORE_X_WINDOW_CONFIGURE_MASK_SIBLING);
+ ECORE_X_WINDOW_CONFIGURE_MASK_SIBLING);
popup_w = inst->popup->win->evas_win;
ecore_x_window_configure(w, mask, 0, 0, 0, 0, 0, popup_w,
- ECORE_X_WINDOW_STACK_BELOW);
+ ECORE_X_WINDOW_STACK_BELOW);
ecore_x_window_show(w);
inst->ui.input.mouse_up =
- ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_UP,
- _connman_popup_input_window_mouse_up_cb, inst);
+ ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_UP,
+ _connman_popup_input_window_mouse_up_cb, inst);
inst->ui.input.key_down =
- ecore_event_handler_add(ECORE_EVENT_KEY_DOWN,
- _connman_popup_input_window_key_down_cb, inst);
+ ecore_event_handler_add(ECORE_EVENT_KEY_DOWN,
+ _connman_popup_input_window_key_down_cb, inst);
inst->ui.input.win = w;
}
static void
-_connman_popup_cb_offline_mode_changed(void *data, Evas_Object *obj, void *event __UNUSED__)
+_connman_popup_cb_offline_mode_changed(void *data, Evas_Object *obj)
{
E_Connman_Instance *inst = data;
E_Connman_Module_Context *ctxt = inst->ctxt;
if ((!ctxt) || (!ctxt->has_manager))
{
- _connman_operation_error_show(_("ConnMan Daemon is not running."));
- return;
+ _connman_operation_error_show(_("ConnMan Daemon is not running."));
+ return;
}
if (!e_connman_manager_offline_mode_set
(offline, _connman_toggle_offline_mode_cb, ctxt))
{
- _connman_operation_error_show
- (_("Cannot toggle system's offline mode."));
- return;
+ _connman_operation_error_show
+ (_("Cannot toggle system's offline mode."));
+ return;
}
ctxt->offline_mode_pending = EINA_TRUE;
}
E_Connman_Instance *inst = data;
if (!inst)
- return;
+ return;
if (inst->popup)
- _connman_popup_del(inst);
+ _connman_popup_del(inst);
if (inst->ctxt->conf_dialog)
return;
if (inst->first_selection)
{
- inst->first_selection = EINA_FALSE;
- return;
+ inst->first_selection = EINA_FALSE;
+ return;
}
if (!inst->service_path)
if (service->mode)
{
- snprintf(buf, sizeof(buf), "e,mode,%s", service->mode);
- edje_object_signal_emit(icon, buf, "e");
+ snprintf(buf, sizeof(buf), "e,mode,%s", service->mode);
+ edje_object_signal_emit(icon, buf, "e");
}
if (service->security)
{
- snprintf(buf, sizeof(buf), "e,security,%s", service->security);
- edje_object_signal_emit(icon, buf, "e");
+ snprintf(buf, sizeof(buf), "e,security,%s", service->security);
+ edje_object_signal_emit(icon, buf, "e");
}
if (service->favorite)
- edje_object_signal_emit(icon, "e,favorite,yes", "e");
+ edje_object_signal_emit(icon, "e,favorite,yes", "e");
else
- edje_object_signal_emit(icon, "e,favorite,no", "e");
+ edje_object_signal_emit(icon, "e,favorite,no", "e");
if (service->auto_connect)
- edje_object_signal_emit(icon, "e,auto_connect,yes", "e");
+ edje_object_signal_emit(icon, "e,auto_connect,yes", "e");
else
- edje_object_signal_emit(icon, "e,auto_connect,no", "e");
+ edje_object_signal_emit(icon, "e,auto_connect,no", "e");
if (service->pass_required)
- edje_object_signal_emit(icon, "e,pass_required,yes", "e");
+ edje_object_signal_emit(icon, "e,pass_required,yes", "e");
else
- edje_object_signal_emit(icon, "e,pass_required,no", "e");
+ edje_object_signal_emit(icon, "e,pass_required,no", "e");
msg.val = service->strength;
edje_object_message_send(icon, EDJE_MESSAGE_INT, 1, &msg);
selected = -1;
EINA_INLIST_FOREACH(inst->ctxt->services, service)
{
- Evas_Object *icon;
+ Evas_Object *icon;
- if (service->path == default_path)
- selected = i;
- i++;
+ if (service->path == default_path)
+ selected = i;
+ i++;
- icon = _connman_service_new_list_item(evas, service);
+ icon = _connman_service_new_list_item(evas, service);
- e_widget_ilist_append
- (list, icon, service->name, _connman_popup_service_selected,
- inst, service->path);
+ e_widget_ilist_append
+ (list, icon, service->name, _connman_popup_service_selected,
+ inst, service->path);
}
if (selected >= 0)
{
- inst->first_selection = EINA_TRUE;
- e_widget_ilist_selected_set(list, selected);
+ inst->first_selection = EINA_TRUE;
+ e_widget_ilist_selected_set(list, selected);
}
else
inst->first_selection = EINA_FALSE;
if (inst->popup)
{
- e_gadcon_popup_show(inst->popup);
- return;
+ e_gadcon_popup_show(inst->popup);
+ return;
}
inst->popup = e_gadcon_popup_new(inst->gcc);
inst->ui.list = e_widget_ilist_add(evas, 32, 32, &inst->service_path);
e_widget_size_min_set(inst->ui.list, 180, 100);
e_widget_table_object_append(inst->ui.table, inst->ui.list,
- 0, 0, 1, 5, 1, 1, 1, 1);
+ 0, 0, 1, 5, 1, 1, 1, 1);
inst->offline_mode = ctxt->offline_mode;
inst->ui.offline_mode = e_widget_check_add
evas_object_show(inst->ui.offline_mode);
e_widget_table_object_append(inst->ui.table, inst->ui.offline_mode,
- 0, 5, 1, 1, 1, 1, 1, 0);
- evas_object_smart_callback_add
- (inst->ui.offline_mode, "changed",
- _connman_popup_cb_offline_mode_changed, inst);
+ 0, 5, 1, 1, 1, 1, 1, 0);
+ e_widget_on_change_hook_set
+ (inst->ui.offline_mode, _connman_popup_cb_offline_mode_changed, inst);
inst->ui.button = e_widget_button_add
(evas, _("Controls"), NULL,
_connman_popup_cb_controls, inst, NULL);
e_widget_table_object_append(inst->ui.table, inst->ui.button,
- 0, 6, 1, 1, 1, 1, 1, 0);
+ 0, 6, 1, 1, 1, 1, 1, 0);
_connman_popup_update(inst);
e_widget_size_min_get(inst->ui.table, &mw, &mh);
- if (mh < 208) mh = 208;
+ if (mh < 200) mh = 200;
if (mw < 200) mw = 200;
e_widget_size_min_set(inst->ui.table, mw, mh);
{
E_Connman_Instance *inst = data;
if ((!inst) || (!inst->menu))
- return;
+ return;
if (inst->menu)
- {
- e_object_del(E_OBJECT(inst->menu));
- inst->menu = NULL;
- }
+ {
+ e_object_del(E_OBJECT(inst->menu));
+ inst->menu = NULL;
+ }
}
static void
E_Connman_Instance *inst = data;
if (!inst)
- return;
+ return;
if (inst->popup)
- _connman_popup_del(inst);
+ _connman_popup_del(inst);
+ if (inst->ctxt->conf_dialog)
+ return;
- e_util_dialog_show("TODO", "TODO!");
+ inst->ctxt->conf_dialog = e_connman_config_dialog_new(NULL, inst->ctxt);
}
static void
e_gadcon_client_util_menu_items_append(inst->gcc, mn, 0);
e_gadcon_canvas_zone_geometry_get(inst->gcc->gadcon, &x, &y, NULL, NULL);
e_menu_activate_mouse(mn, zone, x + ev->output.x, y + ev->output.y,
- 1, 1, E_MENU_POP_DIRECTION_AUTO, ev->timestamp);
+ 1, 1, E_MENU_POP_DIRECTION_AUTO, ev->timestamp);
evas_event_feed_mouse_up(inst->gcc->gadcon->evas, ev->button,
- EVAS_BUTTON_NONE, ev->timestamp, NULL);
+ EVAS_BUTTON_NONE, ev->timestamp, NULL);
}
static void
inst->o_tip = edje_object_add(e);
e_theme_edje_object_set(inst->o_tip, "base/theme/modules/connman/tip",
- "e/modules/connman/tip");
+ "e/modules/connman/tip");
_connman_tip_update(inst);
inst = data;
if (!inst)
- return;
+ return;
ev = event;
if (ev->button == 1)
- {
- if (!inst->popup)
- _connman_popup_new(inst);
- else
- _connman_popup_del(inst);
- }
+ {
+ if (!inst->popup)
+ _connman_popup_new(inst);
+ else
+ _connman_popup_del(inst);
+ }
else if (ev->button == 2)
- _connman_toggle_offline_mode(inst->ctxt);
+ _connman_toggle_offline_mode(inst->ctxt);
else if ((ev->button == 3) && (!inst->menu))
- _connman_menu_new(inst, ev);
+ _connman_menu_new(inst, ev);
}
static void
if (!ctxt->has_manager)
{
- edje_object_signal_emit(o, "e,unavailable", "e");
- edje_object_part_text_set(o, "e.text.name", _("No ConnMan"));
- edje_object_part_text_set(o, "e.text.error",
- _("No ConnMan server found."));
- edje_object_signal_emit(o, "e,changed,connected,no", "e");
- edje_object_part_text_set(o, "e.text.offline_mode", "");
- edje_object_signal_emit(o, "e,changed,offline_mode,no", "e");
- return;
+ edje_object_signal_emit(o, "e,unavailable", "e");
+ edje_object_part_text_set(o, "e.text.name", _("No ConnMan"));
+ edje_object_part_text_set(o, "e.text.error",
+ _("No ConnMan server found."));
+ edje_object_signal_emit(o, "e,changed,connected,no", "e");
+ edje_object_part_text_set(o, "e.text.offline_mode", "");
+ edje_object_signal_emit(o, "e,changed,offline_mode,no", "e");
+ return;
}
edje_object_signal_emit(o, "e,available", "e");
if (ctxt->offline_mode)
{
- edje_object_signal_emit(o, "e,changed,offline_mode,yes", "e");
- edje_object_part_text_set(o, "e.text.offline_mode",
- _("Offline mode: all radios are turned off"));
+ edje_object_signal_emit(o, "e,changed,offline_mode,yes", "e");
+ edje_object_part_text_set(o, "e.text.offline_mode",
+ _("Offline mode: all radios are turned off"));
}
else
{
- edje_object_signal_emit(o, "e,changed,offline_mode,no", "e");
- edje_object_part_text_set(o, "e.text.offline_mode", "");
+ edje_object_signal_emit(o, "e,changed,offline_mode,no", "e");
+ edje_object_part_text_set(o, "e.text.offline_mode", "");
}
if (ctxt->technology && ctxt->technology[0])
{
- edje_object_part_text_set(o, "e.text.technology",
- ctxt->technology);
- snprintf(buf, sizeof(buf), "e,changed,technology,%s",
- ctxt->technology);
- edje_object_signal_emit(o, buf, "e");
+ edje_object_part_text_set(o, "e.text.technology",
+ ctxt->technology);
+ snprintf(buf, sizeof(buf), "e,changed,technology,%s",
+ ctxt->technology);
+ edje_object_signal_emit(o, buf, "e");
}
else if (!ctxt->default_service)
{
- edje_object_part_text_set(o, "e.text.technology", "");
- edje_object_signal_emit(o, "e,changed,technology,none", "e");
+ edje_object_part_text_set(o, "e.text.technology", "");
+ edje_object_signal_emit(o, "e,changed,technology,none", "e");
}
service = ctxt->default_service;
if (!service)
{
- edje_object_part_text_set(o, "e.text.name", _("No Connection"));
- edje_object_signal_emit(o, "e,changed,service,none", "e");
- edje_object_signal_emit(o, "e,changed,connected,no", "e");
+ edje_object_part_text_set(o, "e.text.name", _("No Connection"));
+ edje_object_signal_emit(o, "e,changed,service,none", "e");
+ edje_object_signal_emit(o, "e,changed,connected,no", "e");
- edje_object_part_text_set(o, "e.text.error", _("Not connected"));
- edje_object_signal_emit(o, "e,changed,error,no", "e");
+ edje_object_part_text_set(o, "e.text.error", _("Not connected"));
+ 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_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");
+ edje_object_signal_emit(o, "e,changed,mode,no", "e");
- edje_object_signal_emit(o, "e,changed,mode,none", "e");
- edje_object_signal_emit(o, "e,changed,security,none", "e");
+ edje_object_signal_emit(o, "e,changed,mode,none", "e");
+ edje_object_signal_emit(o, "e,changed,security,none", "e");
- edje_object_part_text_set(o, "e.text.ipv4_address", "");
- edje_object_signal_emit(o, "e,changed,ipv4_address,no", "e");
+ edje_object_part_text_set(o, "e.text.ipv4_address", "");
+ edje_object_signal_emit(o, "e,changed,ipv4_address,no", "e");
- edje_object_signal_emit(o, "e,changed,favorite,no", "e");
- edje_object_signal_emit(o, "e,changed,auto_connect,no", "e");
- edje_object_signal_emit(o, "e,changed,pass_required,no", "e");
+ edje_object_signal_emit(o, "e,changed,favorite,no", "e");
+ edje_object_signal_emit(o, "e,changed,auto_connect,no", "e");
+ edje_object_signal_emit(o, "e,changed,pass_required,no", "e");
- return;
+ return;
}
edje_object_signal_emit(o, "e,changed,connected,yes", "e");
if (service->error)
{
- edje_object_part_text_set(o, "e.text.error", service->error);
- edje_object_signal_emit(o, "e,changed,error,yes", "e");
+ edje_object_part_text_set(o, "e.text.error", service->error);
+ edje_object_signal_emit(o, "e,changed,error,yes", "e");
}
else
{
- edje_object_part_text_set(o, "e.text.error", _("No error"));
- edje_object_signal_emit(o, "e,changed,error,no", "e");
+ edje_object_part_text_set(o, "e.text.error", _("No error"));
+ edje_object_signal_emit(o, "e,changed,error,no", "e");
}
snprintf(buf, sizeof(buf), "e,changed,service,%s", service->type);
if (!ctxt->technology)
{
- edje_object_part_text_set(o, "e.text.technology", service->type);
- snprintf(buf, sizeof(buf), "e,changed,technology,%s", service->type);
- edje_object_signal_emit(o, buf, "e");
+ edje_object_part_text_set(o, "e.text.technology", service->type);
+ snprintf(buf, sizeof(buf), "e,changed,technology,%s", service->type);
+ edje_object_signal_emit(o, buf, "e");
}
snprintf(buf, sizeof(buf), "e,changed,state,%s", service->state);
if (service->mode)
{
- snprintf(buf, sizeof(buf), "e,changed,mode,%s", service->mode);
- edje_object_signal_emit(o, buf, "e");
+ snprintf(buf, sizeof(buf), "e,changed,mode,%s", service->mode);
+ edje_object_signal_emit(o, buf, "e");
}
else
edje_object_signal_emit(o, "e,changed,mode,none", "e");
if (service->security)
{
- snprintf(buf, sizeof(buf), "e,changed,security,%s", service->security);
- edje_object_signal_emit(o, buf, "e");
+ snprintf(buf, sizeof(buf), "e,changed,security,%s", service->security);
+ edje_object_signal_emit(o, buf, "e");
}
else
edje_object_signal_emit(o, "e,changed,security,none", "e");
if (service->ipv4_address)
{
- edje_object_part_text_set(o, "e.text.ipv4_address", service->ipv4_address);
- edje_object_signal_emit(o, "e,changed,ipv4_address,yes", "e");
+ edje_object_part_text_set(o, "e.text.ipv4_address", service->ipv4_address);
+ edje_object_signal_emit(o, "e,changed,ipv4_address,yes", "e");
}
else
{
- edje_object_part_text_set(o, "e.text.ipv4_address", "");
- edje_object_signal_emit(o, "e,changed,ipv4_address,no", "e");
+ edje_object_part_text_set(o, "e.text.ipv4_address", "");
+ edje_object_signal_emit(o, "e,changed,ipv4_address,no", "e");
}
if (service->favorite)
E_Connman_Module_Context *ctxt;
if (!connman_mod)
- return NULL;
+ return NULL;
ctxt = connman_mod->data;
inst->ctxt = ctxt;
inst->ui.gadget = edje_object_add(gc->evas);
e_theme_edje_object_set(inst->ui.gadget, "base/theme/modules/connman",
- "e/modules/connman/main");
+ "e/modules/connman/main");
inst->gcc = e_gadcon_client_new(gc, name, id, style, inst->ui.gadget);
inst->gcc->data = inst;
E_Connman_Instance *inst;
if (!connman_mod)
- return;
+ return;
ctxt = connman_mod->data;
if (!ctxt)
- return;
+ return;
inst = gcc->data;
if (!inst)
- return;
+ return;
if (inst->menu)
{
- e_menu_post_deactivate_callback_set(inst->menu, NULL, NULL);
- e_object_del(E_OBJECT(inst->menu));
+ e_menu_post_deactivate_callback_set(inst->menu, NULL, NULL);
+ e_object_del(E_OBJECT(inst->menu));
}
evas_object_del(inst->ui.gadget);
Eina_List *instances;
if (!connman_mod)
- return NULL;
+ return NULL;
ctxt = connman_mod->data;
if (!ctxt)
- return NULL;
+ return NULL;
instances = ctxt->instances;
snprintf(tmpbuf, sizeof(tmpbuf), "connman.%d", eina_list_count(instances));
}
static const E_Gadcon_Client_Class _gc_class =
-{
- GADCON_CLIENT_CLASS_VERSION, _e_connman_name,
- {
- _gc_init, _gc_shutdown, _gc_orient, _gc_label, _gc_icon, _gc_id_new, NULL,
- e_gadcon_site_is_not_toolbar
- },
- E_GADCON_CLIENT_STYLE_PLAIN
-};
+ {
+ GADCON_CLIENT_CLASS_VERSION, _e_connman_name,
+ {
+ _gc_init, _gc_shutdown, _gc_orient, _gc_label, _gc_icon, _gc_id_new, NULL,
+ e_gadcon_site_is_not_toolbar
+ },
+ E_GADCON_CLIENT_STYLE_PLAIN
+ };
{
ctxt->actions.toggle_offline_mode = e_action_add(_act_toggle_offline_mode);
if (ctxt->actions.toggle_offline_mode)
- {
- ctxt->actions.toggle_offline_mode->func.go =
- _connman_cb_toggle_offline_mode;
- e_action_predef_name_set
- (_(_e_connman_Name), _(_lbl_toggle_offline_mode), _act_toggle_offline_mode,
- NULL, NULL, 0);
- }
+ {
+ ctxt->actions.toggle_offline_mode->func.go =
+ _connman_cb_toggle_offline_mode;
+ e_action_predef_name_set
+ (_(_e_connman_Name), _(_lbl_toggle_offline_mode), _act_toggle_offline_mode,
+ NULL, NULL, 0);
+ }
}
static void
_connman_actions_unregister(E_Connman_Module_Context *ctxt)
{
if (ctxt->actions.toggle_offline_mode)
- {
- e_action_predef_name_del(_(_e_connman_Name), _(_lbl_toggle_offline_mode));
- e_action_del(_act_toggle_offline_mode);
- }
+ {
+ e_action_predef_name_del(_(_e_connman_Name), _(_lbl_toggle_offline_mode));
+ e_action_del(_act_toggle_offline_mode);
+ }
}
static int
return 1;
if (!ctxt->offline_mode_pending)
{
- if (!e_connman_manager_offline_mode_set(e_config->mode.offline,
- _connman_toggle_offline_mode_cb, ctxt))
- _connman_operation_error_show(_("Cannot toggle system's offline mode."));
+ if (!e_connman_manager_offline_mode_set(e_config->mode.offline,
+ _connman_toggle_offline_mode_cb, ctxt))
+ _connman_operation_error_show(_("Cannot toggle system's offline mode."));
}
else
ctxt->offline_mode_pending = EINA_FALSE;
E_Connman_Module_Context *ctxt;
if (!connman_mod)
- return NULL;
+ return NULL;
ctxt = connman_mod->data;
if (!ctxt)
- return NULL;
+ return NULL;
if (!ctxt->conf_dialog)
- ctxt->conf_dialog = e_connman_config_dialog_new(con, ctxt);
+ ctxt->conf_dialog = e_connman_config_dialog_new(con, ctxt);
return ctxt->conf_dialog;
}
-static const char _reg_cat[] = "advanced";
-static const char _reg_item[] = "advanced/connman";
+static const char _reg_cat[] = "extensions";
+static const char _reg_item[] = "extensions/connman";
static void
_connman_configure_registry_register(void)
{
- e_configure_registry_category_add(_reg_cat, 80, _("Advanced"), NULL,
- "preferences-advanced");
+ e_configure_registry_category_add(_reg_cat, 90, _("Extensions"), NULL,
+ "preferences-extensions");
e_configure_registry_item_add(_reg_item, 110, _(_e_connman_Name), NULL,
- e_connman_theme_path(),
- _connman_config);
+ e_connman_theme_path(),
+ _connman_config);
}
static void
if (_e_connman_log_dom < 0)
{
- _e_connman_log_dom = eina_log_domain_register("econnman", EINA_COLOR_ORANGE);
- if (_e_connman_log_dom < 0)
- {
- EINA_LOG_CRIT("could not register logging domain econnman");
- goto error_log_domain;
- }
+ _e_connman_log_dom = eina_log_domain_register("econnman", EINA_COLOR_ORANGE);
+ if (_e_connman_log_dom < 0)
+ {
+ EINA_LOG_CRIT("could not register logging domain econnman");
+ goto error_log_domain;
+ }
}
_connman_configure_registry_register();
return ctxt;
-error_log_domain:
+ error_log_domain:
_e_connman_log_dom = -1;
connman_mod = NULL;
E_FREE(ctxt);
-error_connman_context:
+ error_connman_context:
e_connman_system_shutdown();
-error_connman_system_init:
-error_dbus_bus_get:
+ error_connman_system_init:
+ error_dbus_bus_get:
_connman_status_stringshare_del();
return NULL;
}
{
while (ctxt->instances)
{
- E_Connman_Instance *inst;
+ E_Connman_Instance *inst;
- inst = ctxt->instances->data;
+ inst = ctxt->instances->data;
- if (inst->popup)
- _connman_popup_del(inst);
- if (inst->tip)
- _connman_tip_del(inst);
+ if (inst->popup)
+ _connman_popup_del(inst);
+ if (inst->tip)
+ _connman_tip_del(inst);
- e_object_del(E_OBJECT(inst->gcc));
+ e_object_del(E_OBJECT(inst->gcc));
}
}
_connman_instances_free(ctxt);
_connman_services_free(ctxt);
+ _connman_configure_registry_unregister();
_connman_actions_unregister(ctxt);
e_gadcon_provider_unregister(&_gc_class);