bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/apps/extra.git/commit/?id=3797ca2c958b951dd6e70123ccf503358d5f6843
commit 3797ca2c958b951dd6e70123ccf503358d5f6843 Author: Simon Tischer <si...@t-tischer.de> Date: Thu Apr 9 08:18:09 2020 +0200 add count of wallpapers/themes to buttons --- src/bin/extra_main.c | 11 +++++++++-- src/lib/extra_private.h | 3 +++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/bin/extra_main.c b/src/bin/extra_main.c index 612fa9f..4980047 100644 --- a/src/bin/extra_main.c +++ b/src/bin/extra_main.c @@ -16,6 +16,9 @@ #define COPYRIGHT "Copyright © 2016 Andy Williams <a...@andywilliams.me> and various contributors (see AUTHORS)." +Eina_List *_theme_list = NULL; +Eina_List *_wallpaper_list = NULL; + Ui _ui; static void @@ -42,6 +45,7 @@ _extra_win_sync_done_cb(void *data EINA_UNUSED) { Elm_Table *table, *segcontrol, *ic; Elm_Object_Item *it; + char buf[256], buf1[256]; table = elm_table_add(_ui.win); evas_object_size_hint_weight_set(table, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); @@ -61,14 +65,17 @@ _extra_win_sync_done_cb(void *data EINA_UNUSED) evas_object_smart_callback_add(segcontrol, "changed", _item_changed, NULL); evas_object_show(segcontrol); + snprintf(buf, sizeof(buf), "%s [%i]", _("Themes"), eina_list_count(_theme_list)); + snprintf(buf1, sizeof(buf1), "%s [%i]", _("wallpapers"), eina_list_count(_wallpaper_list)); + #define IC_ADD(ic_txt, txt, obj) \ ic = elm_icon_add(segcontrol); \ elm_icon_standard_set(ic, ic_txt); \ it = elm_segment_control_item_add(segcontrol, ic, txt); \ elm_object_item_data_set(it, obj); \ - IC_ADD("preferences-desktop-theme", _("Themes"), _ui.theme_selector); - IC_ADD("preferences-desktop-wallpaper", _("Wallpapers"), _ui.wallpaper_selector); + IC_ADD("preferences-desktop-theme", buf, _ui.theme_selector); + IC_ADD("preferences-desktop-wallpaper", buf1, _ui.wallpaper_selector); #undef IC_ADD diff --git a/src/lib/extra_private.h b/src/lib/extra_private.h index 57a09de..a39ef5c 100644 --- a/src/lib/extra_private.h +++ b/src/lib/extra_private.h @@ -44,6 +44,9 @@ struct _Extra_Request Extra_Progress progress; }; +extern Eina_List *_theme_list; +extern Eina_List *_wallpaper_list; + #define EXTRA_STATE_DOWNLOAD_IN_PROGRESS 2 --