raster pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=43ed98beffe7e91ca067dc5d16189e2ec2e85ea2
commit 43ed98beffe7e91ca067dc5d16189e2ec2e85ea2 Author: Simon Tischer <[email protected]> Date: Sun Mar 29 11:11:40 2020 +0100 Wallpaper/Theme Selector - add button for online themes/wallpapers using extra (extra.e.org) Reviewers: devilhorns, raster Reviewed By: raster Subscribers: ProhtMeyhet, raster, cedric, zmike Tags: #enlightenment-git Differential Revision: https://phab.enlightenment.org/D11561 --- src/modules/conf_theme/e_int_config_theme.c | 32 +++++++++++++++++++++++++ src/modules/conf_theme/e_int_config_wallpaper.c | 31 ++++++++++++++++++++++++ 2 files changed, 63 insertions(+) diff --git a/src/modules/conf_theme/e_int_config_theme.c b/src/modules/conf_theme/e_int_config_theme.c index d69abaab3..57e7e9370 100644 --- a/src/modules/conf_theme/e_int_config_theme.c +++ b/src/modules/conf_theme/e_int_config_theme.c @@ -515,6 +515,30 @@ _cb_files_files_deleted(void *data, Evas_Object *obj EINA_UNUSED, void *event_in evas_object_smart_callback_call(cfdata->o_fm, "selection_change", cfdata); } +static void +_cb_import_online(void *data1 EINA_UNUSED, void *data2 EINA_UNUSED) +{ + Efreet_Desktop *desktop; + E_Zone *zone; + + desktop = efreet_util_desktop_file_id_find("extra.desktop"); + if (!desktop) + { + e_util_dialog_internal + (_("Missing Application"), + _("This module wants to execute an external application<ps/> " + "that does not exist.<ps/>" + "Please install <b>extra</b> application.<ps/>" + "https://git.enlightenment.org/apps/extra.git/")); + return; + } + + zone = e_zone_current_get(); + + e_exec(zone, desktop, NULL, NULL, "extra/app"); + efreet_desktop_free(desktop); +} + static void _cb_import(void *data1, void *data2 EINA_UNUSED) { @@ -742,6 +766,14 @@ _basic_create_widgets(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dia o = e_widget_button_add(evas, _(" Import..."), "preferences-desktop-theme", _cb_import, cfdata, NULL); e_widget_list_object_append(il, o, 1, 0, 0.5); + + if (efreet_util_desktop_file_id_find("extra.desktop")) + { + o = e_widget_button_add(evas, _(" Import Online..."), "preferences-desktop-theme", + _cb_import_online, NULL, NULL); + e_widget_list_object_append(il, o, 1, 0, 0.5); + } + o = e_widget_check_add(evas, _("Show startup splash"), &cfdata->show_splash); e_widget_list_object_append(il, o, 1, 0, 0.5); e_widget_list_object_append(of, il, 1, 0, 0.0); diff --git a/src/modules/conf_theme/e_int_config_wallpaper.c b/src/modules/conf_theme/e_int_config_wallpaper.c index 462e64fb3..288a7cfd6 100644 --- a/src/modules/conf_theme/e_int_config_wallpaper.c +++ b/src/modules/conf_theme/e_int_config_wallpaper.c @@ -305,6 +305,30 @@ _cb_import_del(void *data) cfdata->win_import = NULL; } +static void +_cb_import_online(void *data1 EINA_UNUSED, void *data2 EINA_UNUSED) +{ + Efreet_Desktop *desktop; + E_Zone *zone; + + desktop = efreet_util_desktop_file_id_find("extra.desktop"); + if (!desktop) + { + e_util_dialog_internal + (_("Missing Application"), + _("This module wants to execute an external application<ps/> " + "that does not exist.<ps/>" + "Please install <b>extra</b> application.<ps/>" + "https://git.enlightenment.org/apps/extra.git/")); + return; + } + + zone = e_zone_current_get(); + + e_exec(zone, desktop, NULL, NULL, "extra/app"); + efreet_desktop_free(desktop); +} + static void _cb_import(void *data1, void *data2 EINA_UNUSED) { @@ -468,6 +492,13 @@ _basic_create(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dialog_Data _cb_import, cfdata, NULL); e_widget_table_object_append(ot, ow, 0, 1, 1, 1, 1, 0, 0, 0); + if (efreet_util_desktop_file_id_find("extra.desktop")) + { + ow = e_widget_button_add(evas, _("Import Online..."), "preferences-desktop-theme", + _cb_import_online, NULL, NULL); + e_widget_table_object_append(ot, ow, 1, 1, 1, 1, 1, 0, 0, 0); + } + mw = 320; mh = (320 * zone->h) / zone->w; oa = e_widget_aspect_add(evas, mw, mh); --
