formatting and minor improvements.
authorGustavo Sverzut Barbieri <barbieri@gmail.com>
Fri, 12 Mar 2010 00:16:21 +0000 (00:16 +0000)
committerGustavo Sverzut Barbieri <barbieri@gmail.com>
Fri, 12 Mar 2010 00:16:21 +0000 (00:16 +0000)
 - popup menu/settings now brings "controls" dialog

 - -Wextra cleanups

 - formatting... bad Lucas ;-)

SVN revision: 47148

src/modules/connman/e_mod_config.c
src/modules/connman/e_mod_main.c

index 1db00ed20d02e7e143ed844094b15692c081c3ea..124c50257ee6639af010e0f04e69c40ad2ab8549 100644 (file)
@@ -88,8 +88,9 @@ _connman_service_move_cb(void *data, DBusMessage *msg __UNUSED__, DBusError *err
    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");
@@ -113,19 +114,24 @@ _connman_service_move(E_Connman_Service *service, const E_Connman_Service *servi
    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
@@ -141,11 +147,12 @@ _connman_technology_onoff_cb(void *data, DBusMessage *msg __UNUSED__, DBusError
    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);
@@ -160,8 +167,8 @@ _connman_technology_onoff(E_Connman_Module_Context *ctxt, const char *type, bool
    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);
@@ -169,14 +176,16 @@ _connman_technology_onoff(E_Connman_Module_Context *ctxt, const char *type, bool
    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;
@@ -192,16 +201,17 @@ e_connman_config_dialog_new(E_Container *con, E_Connman_Module_Context *ctxt)
 
    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;
@@ -214,7 +224,7 @@ _create_data(E_Config_Dialog *dialog)
 
    cfdata = E_NEW(E_Config_Dialog_Data, 1);
    if (!cfdata)
-      return NULL;
+     return NULL;
    _fill_data(cfdata, dialog->data);
    return cfdata;
 }
@@ -227,9 +237,12 @@ _free_data(E_Config_Dialog *dialog, E_Config_Dialog_Data *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;
@@ -261,18 +274,18 @@ static void _network_settings_general_page_create(Evas *evas, E_Config_Dialog_Da
    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:"));
@@ -322,12 +335,14 @@ _network_settings_create(Evas *evas, E_Config_Dialog_Data *cfdata)
    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);
@@ -345,16 +360,17 @@ _networks_fill_details(E_Config_Dialog_Data *cfdata, Evas_Object *list __UNUSED_
    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);
@@ -372,16 +388,16 @@ _networks_disable_buttons(E_Config_Dialog_Data *cfdata, Evas_Object *list, int s
 
    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);
      }
 }
 
@@ -390,9 +406,7 @@ _cb_service_selected(void *data)
 {
    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);
 }
@@ -406,12 +420,11 @@ _networks_list_fill(Evas *evas, E_Config_Dialog_Data *cfdata)
 
    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);
@@ -430,10 +443,12 @@ _networks_button_up_cb(void *data, void *data2 __UNUSED__)
    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);
 
@@ -455,9 +470,11 @@ _networks_button_down_cb(void *data, void *data2 __UNUSED__)
    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);
@@ -482,24 +499,27 @@ _networks_list_create(Evas *evas, E_Config_Dialog_Data *cfdata)
 
    /* 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
@@ -534,13 +554,17 @@ _switches_page_create_technologies(Evas *evas, E_Connman_Module_Context *ctxt, s
    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);
      }
 }
 
@@ -571,11 +595,13 @@ _basic_create(E_Config_Dialog *dialog __UNUSED__, Evas *evas, E_Config_Dialog_Da
    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);
@@ -593,9 +619,10 @@ _basic_apply(E_Config_Dialog *dialog __UNUSED__, E_Config_Dialog_Data *cfdata)
 
    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);
index cb9ded36905890c14233d8bc0c3a11db6dd88f4a..683353cf67bea3246ffeebdf56340447a4e9aa36 100644 (file)
@@ -63,7 +63,7 @@ e_connman_theme_path(void)
 
    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));
@@ -79,8 +79,8 @@ _connman_toggle_offline_mode_cb(void *data, DBusMessage *msg __UNUSED__, DBusErr
 
    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);
@@ -94,24 +94,24 @@ _connman_toggle_offline_mode(E_Connman_Module_Context *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_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;
      }
 }
 
@@ -121,7 +121,7 @@ _connman_cb_toggle_offline_mode(E_Object *obj __UNUSED__, const char *params __U
    E_Connman_Module_Context *ctxt;
 
    if (!connman_mod)
-      return;
+     return;
 
    ctxt = connman_mod->data;
    _connman_toggle_offline_mode(ctxt);
@@ -140,6 +140,7 @@ struct connman_passphrase_data
    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__)
 {
@@ -148,6 +149,7 @@ _connman_passphrase_ask_cleartext_changed(void *data, Evas_Object *obj, void *ev
    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)
@@ -173,8 +175,8 @@ _connman_passphrase_ask_del(void *data)
 
    if (d->canceled)
      {
-       free(d->passphrase);
-       d->passphrase = NULL;
+       free(d->passphrase);
+       d->passphrase = NULL;
      }
 
    d->cb(d->data, d->passphrase, d->service_path);
@@ -210,15 +212,15 @@ _connman_passphrase_ask(E_Connman_Service *service, void (*cb)(void *data, const
      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;
@@ -237,11 +239,11 @@ _connman_passphrase_ask(E_Connman_Service *service, void (*cb)(void *data, const
 
    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);
@@ -264,7 +266,7 @@ _connman_passphrase_ask(E_Connman_Service *service, void (*cb)(void *data, const
 #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);
@@ -294,7 +296,6 @@ _connman_passphrase_ask(E_Connman_Service *service, void (*cb)(void *data, const
    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);
 }
@@ -324,10 +325,10 @@ _connman_service_changed(void *data, const E_Connman_Element *element)
    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);
@@ -348,10 +349,10 @@ _connman_service_changed(void *data, const E_Connman_Element *element)
      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);
@@ -379,8 +380,8 @@ _connman_service_freed(void *data)
 
    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);
      }
 }
 
@@ -427,10 +428,10 @@ _connman_service_new(E_Connman_Module_Context *ctxt, E_Connman_Element *element)
      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);
@@ -447,10 +448,10 @@ _connman_service_new(E_Connman_Module_Context *ctxt, E_Connman_Element *element)
 
 
 #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)
@@ -522,11 +523,11 @@ _connman_service_disconnect_cb(void *data, DBusMessage *msg __UNUSED__, DBusErro
 
    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);
@@ -553,36 +554,36 @@ _connman_service_connect_cb(void *data, DBusMessage *msg __UNUSED__, DBusError *
 
    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);
@@ -605,9 +606,9 @@ _connman_service_connect(E_Connman_Service *service)
    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."));
      }
 }
 
@@ -626,8 +627,8 @@ _connman_service_ask_pass_and_connect__set_cb(void *data, DBusMessage *msg __UNU
    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)))
@@ -650,14 +651,14 @@ _connman_service_ask_pass_and_connect__ask_cb(void *data, const char *passphrase
    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);
@@ -668,12 +669,12 @@ _connman_service_ask_pass_and_connect__ask_cb(void *data, const char *passphrase
 
    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;
      }
 }
 
@@ -689,14 +690,14 @@ _connman_services_free(E_Connman_Module_Context *ctxt)
 {
    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);
      }
 }
 
@@ -719,8 +720,8 @@ _connman_technologies_element_exists(const E_Connman_Module_Context *ctxt, const
 
    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;
@@ -731,8 +732,8 @@ _connman_request_scan_cb(void *data __UNUSED__, DBusMessage *msg __UNUSED__, DBu
 {
    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;
@@ -750,19 +751,19 @@ _connman_technologies_load(E_Connman_Module_Context *ctxt)
    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))
@@ -782,19 +783,19 @@ _connman_services_load(E_Connman_Module_Context *ctxt)
 
    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 */
@@ -811,18 +812,18 @@ _connman_default_service_changed(E_Connman_Module_Context *ctxt)
 
    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 : "");
@@ -838,9 +839,9 @@ _connman_default_service_changed(E_Connman_Module_Context *ctxt)
    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;
@@ -887,7 +888,7 @@ _connman_popup_input_window_mouse_up_cb(void *data, int type __UNUSED__, void *e
    E_Connman_Instance *inst = data;
 
    if (ev->window != inst->ui.input.win)
-      return 1;
+     return 1;
 
    _connman_popup_del(inst);
 
@@ -902,11 +903,11 @@ _connman_popup_input_window_key_down_cb(void *data, int type __UNUSED__, void *e
    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;
 }
@@ -935,25 +936,25 @@ _connman_popup_input_window_create(E_Connman_Instance *inst)
 
    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;
@@ -961,16 +962,16 @@ _connman_popup_cb_offline_mode_changed(void *data, Evas_Object *obj, void *event
 
    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;
 }
@@ -981,9 +982,9 @@ _connman_popup_cb_controls(void *data, void *data2 __UNUSED__)
    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;
 
@@ -999,8 +1000,8 @@ _connman_popup_service_selected(void *data)
 
    if (inst->first_selection)
      {
-       inst->first_selection = EINA_FALSE;
-       return;
+       inst->first_selection = EINA_FALSE;
+       return;
      }
 
    if (!inst->service_path)
@@ -1038,30 +1039,30 @@ _connman_service_new_list_item(Evas *evas, E_Connman_Service *service)
 
    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);
@@ -1090,23 +1091,23 @@ _connman_popup_update(E_Connman_Instance *inst)
    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;
@@ -1135,8 +1136,8 @@ _connman_popup_new(E_Connman_Instance *inst)
 
    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);
@@ -1151,7 +1152,7 @@ _connman_popup_new(E_Connman_Instance *inst)
    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
@@ -1159,21 +1160,20 @@ _connman_popup_new(E_Connman_Instance *inst)
 
    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);
 
@@ -1187,12 +1187,12 @@ _connman_menu_cb_post(void *data, E_Menu *menu __UNUSED__)
 {
    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
@@ -1201,11 +1201,13 @@ _connman_menu_cb_cfg(void *data, E_Menu *menu __UNUSED__, E_Menu_Item *mi __UNUS
    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
@@ -1230,9 +1232,9 @@ _connman_menu_new(E_Connman_Instance *inst, Evas_Event_Mouse_Down *ev)
    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
@@ -1247,7 +1249,7 @@ _connman_tip_new(E_Connman_Instance *inst)
 
    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);
 
@@ -1272,20 +1274,20 @@ _connman_cb_mouse_down(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNU
 
    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
@@ -1320,70 +1322,70 @@ _connman_edje_view_update(E_Connman_Instance *inst, Evas_Object *o)
 
    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");
@@ -1395,13 +1397,13 @@ _connman_edje_view_update(E_Connman_Instance *inst, Evas_Object *o)
 
    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);
@@ -1409,9 +1411,9 @@ _connman_edje_view_update(E_Connman_Instance *inst, Evas_Object *o)
 
    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);
@@ -1420,29 +1422,29 @@ _connman_edje_view_update(E_Connman_Instance *inst, Evas_Object *o)
 
    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)
@@ -1495,7 +1497,7 @@ _gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style)
    E_Connman_Module_Context *ctxt;
 
    if (!connman_mod)
-      return NULL;
+     return NULL;
 
    ctxt = connman_mod->data;
 
@@ -1503,7 +1505,7 @@ _gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style)
    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;
@@ -1529,20 +1531,20 @@ _gc_shutdown(E_Gadcon_Client *gcc)
    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);
 
@@ -1581,11 +1583,11 @@ _gc_id_new(E_Gadcon_Client_Class *client_class __UNUSED__)
    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));
@@ -1593,14 +1595,14 @@ _gc_id_new(E_Gadcon_Client_Class *client_class __UNUSED__)
 }
 
 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
+  };
 
 
 
@@ -1614,23 +1616,23 @@ _connman_actions_register(E_Connman_Module_Context *ctxt)
 {
    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
@@ -1695,9 +1697,9 @@ _connman_event_mode_changed(void *data, int type __UNUSED__, void *event __UNUSE
      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;
@@ -1711,29 +1713,29 @@ _connman_config(E_Container *con, const char *params __UNUSED__)
    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
@@ -1824,12 +1826,12 @@ e_modapi_init(E_Module *m)
 
    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();
@@ -1840,14 +1842,14 @@ e_modapi_init(E_Module *m)
 
    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;
 }
@@ -1857,16 +1859,16 @@ _connman_instances_free(E_Connman_Module_Context *ctxt)
 {
    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));
      }
 }
 
@@ -1889,6 +1891,7 @@ e_modapi_shutdown(E_Module *m)
    _connman_instances_free(ctxt);
    _connman_services_free(ctxt);
 
+   _connman_configure_registry_unregister();
    _connman_actions_unregister(ctxt);
    e_gadcon_provider_unregister(&_gc_class);