From: Enlightenment S. <no-...@en...> - 2012-09-06 02:18:38
|
Log: econnman: call econnman (app) from the configure/settings. there is no need to configure it as it will use the EConnMan desktop file, whatever is available (user can create a new desktop with such Name= and it will work, this can be done by a gui in e17 itself). the module will warn people that do not have the application installed. Author: barbieri Date: 2012-09-05 19:18:32 -0700 (Wed, 05 Sep 2012) New Revision: 76212 Trac: http://trac.enlightenment.org/e/changeset/76212 Modified: trunk/e/src/modules/connman/TODO trunk/e/src/modules/connman/e_mod_main.c Modified: trunk/e/src/modules/connman/TODO =================================================================== --- trunk/e/src/modules/connman/TODO 2012-09-06 02:11:21 UTC (rev 76211) +++ trunk/e/src/modules/connman/TODO 2012-09-06 02:18:32 UTC (rev 76212) @@ -14,9 +14,3 @@ - Search for entries with the same type when we receive an 'Informational' field so we can use it in an useful manner - - - Add "config" button in popup that will call the external binary for - advanced configuration - - - Add configuration entry to set the external binary - econnman-bin is - the default Modified: trunk/e/src/modules/connman/e_mod_main.c =================================================================== --- trunk/e/src/modules/connman/e_mod_main.c 2012-09-06 02:11:21 UTC (rev 76211) +++ trunk/e/src/modules/connman/e_mod_main.c 2012-09-06 02:18:32 UTC (rev 76212) @@ -212,11 +212,36 @@ } static void -_econnman_configure_cb(void *data __UNUSED__, void *data2 __UNUSED__) +_econnman_app_launch(E_Connman_Instance *inst) { - /* FIXME call econnman-bin or other set on modules settings */ + Efreet_Desktop *desktop = efreet_util_desktop_name_find("EConnMan"); + E_Zone *zone; + + if (!desktop) + { + e_util_dialog_internal + (_("Missing Application"), + _("This module wants to execute an external application " + "EConnMan that does not exist.<br>" + "Please install <b>EConnMan</b> application.")); + return; + } + + zone = e_gadcon_client_zone_get(inst->gcc); + if (!zone) + zone = e_util_zone_current_get(e_manager_current_get()); + + e_exec(zone, desktop, NULL, NULL, "econnman/app"); + efreet_desktop_free(desktop); } +static void +_econnman_configure_cb(void *data, void *data2 __UNUSED__) +{ + E_Connman_Instance *inst = data; + _econnman_app_launch(inst); +} + static void _econnman_popup_new(E_Connman_Instance *inst) { E_Connman_Module_Context *ctxt = inst->ctxt; @@ -240,7 +265,7 @@ _econnman_popup_update(ctxt->cm, inst); bt = e_widget_button_add(evas, "Configure", NULL, - _econnman_configure_cb, NULL, NULL); + _econnman_configure_cb, inst, NULL); e_widget_list_object_append(list, bt, 1, 0, 0.5); e_widget_size_min_get(list, &mw, &mh); @@ -359,7 +384,8 @@ static void _econnman_menu_cb_configure(void *data, E_Menu *menu, E_Menu_Item *mi) { - /* TODO */ + E_Connman_Instance *inst = data; + _econnman_app_launch(inst); } static void _econnman_menu_new(E_Connman_Instance *inst, |