summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Tischer <simon@t-tischer.de>2020-03-25 11:35:14 +0100
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2020-03-28 15:09:26 +0100
commit64b30b3a1fe785acb1da364d6a431fd1e12d5f87 (patch)
treeab20ebe1ae683277789b38bff039a10c643045b2
parent0932548653facc82a3d05463914f7414ebdd580b (diff)
background is now wallpaper
this is done in order to unify the terminology in e and extra.
-rw-r--r--po/POTFILES.in2
-rw-r--r--po/da.po16
-rw-r--r--po/de.po16
-rw-r--r--po/extra.pot16
-rw-r--r--po/it.po16
-rw-r--r--src/bin/extra_main.c10
-rw-r--r--src/bin/extra_private.h4
-rw-r--r--src/bin/extra_wallpaper_selector.c (renamed from src/bin/extra_background_selector.c)50
-rw-r--r--src/bin/meson.build2
-rw-r--r--src/lib/extra.c124
-rw-r--r--src/lib/extra.h18
11 files changed, 137 insertions, 137 deletions
diff --git a/po/POTFILES.in b/po/POTFILES.in
index fcaf4f0..48900ac 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,5 +1,5 @@
1src/bin/extra_main.c 1src/bin/extra_main.c
2src/bin/extra_private.h 2src/bin/extra_private.h
3src/bin/extra_background_selector.c 3src/bin/extra_wallpaper_selector.c
4src/bin/extra_theme_selector.c 4src/bin/extra_theme_selector.c
5src/bin/extra_util.c 5src/bin/extra_util.c
diff --git a/po/da.po b/po/da.po
index 71612f7..0b12f97 100644
--- a/po/da.po
+++ b/po/da.po
@@ -21,30 +21,30 @@ msgid "Themes"
21msgstr "Temaer" 21msgstr "Temaer"
22 22
23#: src/bin/extra_main.c:71 23#: src/bin/extra_main.c:71
24msgid "Backgrounds" 24msgid "Wallpapers"
25msgstr "Baggrunde" 25msgstr "Baggrunde"
26 26
27#: src/bin/extra_main.c:85 27#: src/bin/extra_main.c:85
28msgid "Updating themes and backgrounds" 28msgid "Updating themes and wallpapers"
29msgstr "Opdaterer temaer og baggrunde" 29msgstr "Opdaterer temaer og baggrunde"
30 30
31#: src/bin/extra_background_selector.c:25 31#: src/bin/extra_wallpaper_selector.c:25
32msgid "Installing background" 32msgid "Installing wallpaper"
33msgstr "Installerer baggrund" 33msgstr "Installerer baggrund"
34 34
35#: src/bin/extra_background_selector.c:73 35#: src/bin/extra_wallpaper_selector.c:73
36msgid "Uninstall" 36msgid "Uninstall"
37msgstr "Afinstaller" 37msgstr "Afinstaller"
38 38
39#: src/bin/extra_background_selector.c:79 src/bin/extra_theme_selector.c:83 39#: src/bin/extra_wallpaper_selector.c:79 src/bin/extra_theme_selector.c:83
40msgid "Install" 40msgid "Install"
41msgstr "Installer" 41msgstr "Installer"
42 42
43#: src/bin/extra_background_selector.c:89 src/bin/extra_theme_selector.c:173 43#: src/bin/extra_wallpaper_selector.c:89 src/bin/extra_theme_selector.c:173
44msgid "Show fullscreen" 44msgid "Show fullscreen"
45msgstr "Vis fuldskærm" 45msgstr "Vis fuldskærm"
46 46
47#: src/bin/extra_background_selector.c:100 src/bin/extra_theme_selector.c:182 47#: src/bin/extra_wallpaper_selector.c:100 src/bin/extra_theme_selector.c:182
48msgid "Show Details" 48msgid "Show Details"
49msgstr "Vis detaljer" 49msgstr "Vis detaljer"
50 50
diff --git a/po/de.po b/po/de.po
index a315403..a9603f4 100644
--- a/po/de.po
+++ b/po/de.po
@@ -23,30 +23,30 @@ msgid "Themes"
23msgstr "Themes" 23msgstr "Themes"
24 24
25#: src/bin/extra_main.c:71 25#: src/bin/extra_main.c:71
26msgid "Backgrounds" 26msgid "Wallpapers"
27msgstr "Hintergrund" 27msgstr "Hintergrund"
28 28
29#: src/bin/extra_main.c:85 29#: src/bin/extra_main.c:85
30msgid "Updating themes and backgrounds" 30msgid "Updating themes and wallpapers"
31msgstr "Aktualisiere Themes und Hintergründe" 31msgstr "Aktualisiere Themes und Hintergründe"
32 32
33#: src/bin/extra_background_selector.c:25 33#: src/bin/extra_wallpaper_selector.c:25
34msgid "Installing background" 34msgid "Installing wallpaper"
35msgstr "Installiere Hintergrund" 35msgstr "Installiere Hintergrund"
36 36
37#: src/bin/extra_background_selector.c:73 37#: src/bin/extra_wallpaper_selector.c:73
38msgid "Uninstall" 38msgid "Uninstall"
39msgstr "Deinstalliere" 39msgstr "Deinstalliere"
40 40
41#: src/bin/extra_background_selector.c:79 src/bin/extra_theme_selector.c:83 41#: src/bin/extra_wallpaper_selector.c:79 src/bin/extra_theme_selector.c:83
42msgid "Install" 42msgid "Install"
43msgstr "Installiere" 43msgstr "Installiere"
44 44
45#: src/bin/extra_background_selector.c:89 src/bin/extra_theme_selector.c:173 45#: src/bin/extra_wallpaper_selector.c:89 src/bin/extra_theme_selector.c:173
46msgid "Show fullscreen" 46msgid "Show fullscreen"
47msgstr "Vollbild" 47msgstr "Vollbild"
48 48
49#: src/bin/extra_background_selector.c:100 src/bin/extra_theme_selector.c:182 49#: src/bin/extra_wallpaper_selector.c:100 src/bin/extra_theme_selector.c:182
50msgid "Show Details" 50msgid "Show Details"
51msgstr "Details" 51msgstr "Details"
52 52
diff --git a/po/extra.pot b/po/extra.pot
index 4940235..8ee0f6e 100644
--- a/po/extra.pot
+++ b/po/extra.pot
@@ -22,30 +22,30 @@ msgid "Themes"
22msgstr "" 22msgstr ""
23 23
24#: src/bin/extra_main.c:71 24#: src/bin/extra_main.c:71
25msgid "Backgrounds" 25msgid "Wallpapers"
26msgstr "" 26msgstr ""
27 27
28#: src/bin/extra_main.c:85 28#: src/bin/extra_main.c:85
29msgid "Updating themes and backgrounds" 29msgid "Updating themes and wallpapers"
30msgstr "" 30msgstr ""
31 31
32#: src/bin/extra_background_selector.c:25 32#: src/bin/extra_wallpaper_selector.c:25
33msgid "Installing background" 33msgid "Installing wallpaper"
34msgstr "" 34msgstr ""
35 35
36#: src/bin/extra_background_selector.c:73 36#: src/bin/extra_wallpaper_selector.c:73
37msgid "Uninstall" 37msgid "Uninstall"
38msgstr "" 38msgstr ""
39 39
40#: src/bin/extra_background_selector.c:79 src/bin/extra_theme_selector.c:83 40#: src/bin/extra_wallpaper_selector.c:79 src/bin/extra_theme_selector.c:83
41msgid "Install" 41msgid "Install"
42msgstr "" 42msgstr ""
43 43
44#: src/bin/extra_background_selector.c:89 src/bin/extra_theme_selector.c:173 44#: src/bin/extra_wallpaper_selector.c:89 src/bin/extra_theme_selector.c:173
45msgid "Show fullscreen" 45msgid "Show fullscreen"
46msgstr "" 46msgstr ""
47 47
48#: src/bin/extra_background_selector.c:100 src/bin/extra_theme_selector.c:182 48#: src/bin/extra_wallpaper_selector.c:100 src/bin/extra_theme_selector.c:182
49msgid "Show Details" 49msgid "Show Details"
50msgstr "" 50msgstr ""
51 51
diff --git a/po/it.po b/po/it.po
index 0be6e3a..ef4bfad 100644
--- a/po/it.po
+++ b/po/it.po
@@ -20,30 +20,30 @@ msgid "Themes"
20msgstr "Temi" 20msgstr "Temi"
21 21
22#: src/bin/extra_main.c:71 22#: src/bin/extra_main.c:71
23msgid "Backgrounds" 23msgid "Wallpapers"
24msgstr "Sfondi" 24msgstr "Sfondi"
25 25
26#: src/bin/extra_main.c:85 26#: src/bin/extra_main.c:85
27msgid "Updating themes and backgrounds" 27msgid "Updating themes and wallpapers"
28msgstr "Aggiornamento temi e sfondi" 28msgstr "Aggiornamento temi e sfondi"
29 29
30#: src/bin/extra_background_selector.c:25 30#: src/bin/extra_wallpaper_selector.c:25
31msgid "Installing background" 31msgid "Installing wallpaper"
32msgstr "Installazione sfondi" 32msgstr "Installazione sfondi"
33 33
34#: src/bin/extra_background_selector.c:73 34#: src/bin/extra_wallpaper_selector.c:73
35msgid "Uninstall" 35msgid "Uninstall"
36msgstr "Disinstalla" 36msgstr "Disinstalla"
37 37
38#: src/bin/extra_background_selector.c:79 src/bin/extra_theme_selector.c:83 38#: src/bin/extra_wallpaper_selector.c:79 src/bin/extra_theme_selector.c:83
39msgid "Install" 39msgid "Install"
40msgstr "Installa" 40msgstr "Installa"
41 41
42#: src/bin/extra_background_selector.c:89 src/bin/extra_theme_selector.c:173 42#: src/bin/extra_wallpaper_selector.c:89 src/bin/extra_theme_selector.c:173
43msgid "Show fullscreen" 43msgid "Show fullscreen"
44msgstr "Mostra a tutto schermo" 44msgstr "Mostra a tutto schermo"
45 45
46#: src/bin/extra_background_selector.c:100 src/bin/extra_theme_selector.c:182 46#: src/bin/extra_wallpaper_selector.c:100 src/bin/extra_theme_selector.c:182
47msgid "Show Details" 47msgid "Show Details"
48msgstr "Mostra dettagli" 48msgstr "Mostra dettagli"
49 49
diff --git a/src/bin/extra_main.c b/src/bin/extra_main.c
index 5ccc1cc..612fa9f 100644
--- a/src/bin/extra_main.c
+++ b/src/bin/extra_main.c
@@ -31,7 +31,7 @@ _item_changed(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UN
31 elm_segment_control_item_selected_get(obj); 31 elm_segment_control_item_selected_get(obj);
32 Evas_Object *new = elm_object_item_data_get(it); 32 Evas_Object *new = elm_object_item_data_get(it);
33 33
34 evas_object_hide(_ui.background_selector); 34 evas_object_hide(_ui.wallpaper_selector);
35 evas_object_hide(_ui.theme_selector); 35 evas_object_hide(_ui.theme_selector);
36 36
37 evas_object_show(new); 37 evas_object_show(new);
@@ -48,8 +48,8 @@ _extra_win_sync_done_cb(void *data EINA_UNUSED)
48 evas_object_size_hint_align_set(table, EVAS_HINT_FILL, EVAS_HINT_FILL); 48 evas_object_size_hint_align_set(table, EVAS_HINT_FILL, EVAS_HINT_FILL);
49 evas_object_show(table); 49 evas_object_show(table);
50 50
51 _ui.background_selector = extra_ui_site_add(&background_site); 51 _ui.wallpaper_selector = extra_ui_site_add(&wallpaper_site);
52 elm_table_pack(table, _ui.background_selector, 0, 1, 1, 1); 52 elm_table_pack(table, _ui.wallpaper_selector, 0, 1, 1, 1);
53 53
54 _ui.theme_selector = extra_ui_site_add(&theme_site); 54 _ui.theme_selector = extra_ui_site_add(&theme_site);
55 elm_table_pack(table, _ui.theme_selector, 0, 1, 1, 1); 55 elm_table_pack(table, _ui.theme_selector, 0, 1, 1, 1);
@@ -68,7 +68,7 @@ _extra_win_sync_done_cb(void *data EINA_UNUSED)
68 elm_object_item_data_set(it, obj); \ 68 elm_object_item_data_set(it, obj); \
69 69
70 IC_ADD("preferences-desktop-theme", _("Themes"), _ui.theme_selector); 70 IC_ADD("preferences-desktop-theme", _("Themes"), _ui.theme_selector);
71 IC_ADD("preferences-desktop-wallpaper", _("Backgrounds"), _ui.background_selector); 71 IC_ADD("preferences-desktop-wallpaper", _("Wallpapers"), _ui.wallpaper_selector);
72 72
73#undef IC_ADD 73#undef IC_ADD
74 74
@@ -82,7 +82,7 @@ extra_win_sync(void)
82{ 82{
83 Extra_Progress *progress; 83 Extra_Progress *progress;
84 84
85 progress = extra_ui_progress_popup_show(_("Updating themes and backgrounds"), _extra_win_sync_done_cb, NULL); 85 progress = extra_ui_progress_popup_show(_("Updating themes and wallpapers"), _extra_win_sync_done_cb, NULL);
86 extra_sync(progress); 86 extra_sync(progress);
87} 87}
88 88
diff --git a/src/bin/extra_private.h b/src/bin/extra_private.h
index 5678693..3a50c94 100644
--- a/src/bin/extra_private.h
+++ b/src/bin/extra_private.h
@@ -11,13 +11,13 @@
11 11
12typedef struct { 12typedef struct {
13 Evas_Object *win; 13 Evas_Object *win;
14 Evas_Object *background_selector; 14 Evas_Object *wallpaper_selector;
15 Evas_Object *theme_selector; 15 Evas_Object *theme_selector;
16 Evas_Object *popup_toolbar; 16 Evas_Object *popup_toolbar;
17} Ui; 17} Ui;
18 18
19extern Ui _ui; 19extern Ui _ui;
20extern Extra_Ui_Site_Template theme_site; 20extern Extra_Ui_Site_Template theme_site;
21extern Extra_Ui_Site_Template background_site; 21extern Extra_Ui_Site_Template wallpaper_site;
22 22
23#endif 23#endif
diff --git a/src/bin/extra_background_selector.c b/src/bin/extra_wallpaper_selector.c
index e5bb1df..f65fd42 100644
--- a/src/bin/extra_background_selector.c
+++ b/src/bin/extra_wallpaper_selector.c
@@ -4,44 +4,44 @@
4#include "../lib/extra.h" 4#include "../lib/extra.h"
5 5
6static Extra_Ui_Small_Preview_Accessor acc = { 6static Extra_Ui_Small_Preview_Accessor acc = {
7 ((Extra_ui_preview_get*) extra_background_preview_get), 7 ((Extra_ui_preview_get*) extra_wallpaper_preview_get),
8 ((Extra_ui_preview_download*) extra_background_preview_download), 8 ((Extra_ui_preview_download*) extra_wallpaper_preview_download),
9}; 9};
10 10
11 11
12static void 12static void
13_background_installed(void *data EINA_UNUSED) 13_wallpaper_installed(void *data EINA_UNUSED)
14{ 14{
15 /*TODO FIND A WAY TO REMOTE OPEN ENLIGHTENMENT BACKGROUND SELECTOR*/ 15 /*TODO FIND A WAY TO REMOTE OPEN ENLIGHTENMENT BACKGROUND SELECTOR*/
16 gengrid_reapply_state(_ui.background_selector); 16 gengrid_reapply_state(_ui.wallpaper_selector);
17} 17}
18 18
19static void 19static void
20_install_background(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 20_install_wallpaper(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
21{ 21{
22 Extra_Background *b = data; 22 Extra_Wallpaper *b = data;
23 Extra_Progress *p; 23 Extra_Progress *p;
24 24
25 p = extra_ui_progress_popup_show(_("Installing background"), _background_installed, b); 25 p = extra_ui_progress_popup_show(_("Installing wallpaper"), _wallpaper_installed, b);
26 extra_background_download(p, b); 26 extra_wallpaper_download(p, b);
27} 27}
28 28
29static void 29static void
30_uninstall_background(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 30_uninstall_wallpaper(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
31{ 31{
32 Extra_Background *b = data; 32 Extra_Wallpaper *b = data;
33 33
34 extra_background_delete(b); 34 extra_wallpaper_delete(b);
35 gengrid_reapply_state(_ui.background_selector); 35 gengrid_reapply_state(_ui.wallpaper_selector);
36} 36}
37 37
38static void 38static void
39_fullscreen_background(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 39_fullscreen_wallpaper(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
40{ 40{
41 Extra_Background *b = data; 41 Extra_Wallpaper *b = data;
42 char *path; 42 char *path;
43 43
44 path = extra_background_preview_get(b); 44 path = extra_wallpaper_preview_get(b);
45 if (!path) return; 45 if (!path) return;
46 46
47 extra_ui_fullscreen_preview(path); 47 extra_ui_fullscreen_preview(path);
@@ -50,17 +50,17 @@ _fullscreen_background(void *data, Evas_Object *obj EINA_UNUSED, void *event_inf
50static void 50static void
51_show_details(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 51_show_details(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
52{ 52{
53 Extra_Background *background = data; 53 Extra_Wallpaper *wallpaper = data;
54 Evas_Object *o; 54 Evas_Object *o;
55 55
56 o = extra_ui_base_object_detail(background, &background->obj, acc, _ui.win); 56 o = extra_ui_base_object_detail(wallpaper, &wallpaper->obj, acc, _ui.win);
57 extra_ui_details_window_show(o); 57 extra_ui_details_window_show(o);
58 58
59 evas_object_del(_ui.popup_toolbar); 59 evas_object_del(_ui.popup_toolbar);
60} 60}
61 61
62static void 62static void
63_show_tooltip(Extra_Background *b) 63_show_tooltip(Extra_Wallpaper *b)
64{ 64{
65 Evas_Object *box, *o, *icon; 65 Evas_Object *box, *o, *icon;
66 66
@@ -70,17 +70,17 @@ _show_tooltip(Extra_Background *b)
70 o = elm_button_add(box); 70 o = elm_button_add(box);
71 icon = elm_icon_add(o); 71 icon = elm_icon_add(o);
72 72
73 if (extra_background_installed(b)) 73 if (extra_wallpaper_installed(b))
74 { 74 {
75 elm_object_text_set(o, _("Uninstall")); 75 elm_object_text_set(o, _("Uninstall"));
76 elm_icon_standard_set(icon, "edit-delete"); 76 elm_icon_standard_set(icon, "edit-delete");
77 evas_object_smart_callback_add(o, "clicked", _uninstall_background, b); 77 evas_object_smart_callback_add(o, "clicked", _uninstall_wallpaper, b);
78 } 78 }
79 else 79 else
80 { 80 {
81 elm_object_text_set(o, _("Install")); 81 elm_object_text_set(o, _("Install"));
82 elm_icon_standard_set(icon, "emblem-downloads"); 82 elm_icon_standard_set(icon, "emblem-downloads");
83 evas_object_smart_callback_add(o, "clicked", _install_background, b); 83 evas_object_smart_callback_add(o, "clicked", _install_wallpaper, b);
84 } 84 }
85 elm_object_part_content_set(o, "icon", icon); 85 elm_object_part_content_set(o, "icon", icon);
86 elm_box_pack_end(box, o); 86 elm_box_pack_end(box, o);
@@ -89,7 +89,7 @@ _show_tooltip(Extra_Background *b)
89 //view-fullscreen 89 //view-fullscreen
90 o = elm_button_add(box); 90 o = elm_button_add(box);
91 elm_object_text_set(o, _("Show fullscreen")); 91 elm_object_text_set(o, _("Show fullscreen"));
92 evas_object_smart_callback_add(o, "clicked", _fullscreen_background , b); 92 evas_object_smart_callback_add(o, "clicked", _fullscreen_wallpaper , b);
93 elm_box_pack_end(box, o); 93 elm_box_pack_end(box, o);
94 evas_object_show(o); 94 evas_object_show(o);
95 icon = elm_icon_add(o); 95 icon = elm_icon_add(o);
@@ -121,7 +121,7 @@ _content_basic_get(void *data, Evas_Object *obj, const char *source)
121static char* 121static char*
122_text_basic_get(void *data, Evas_Object *obj EINA_UNUSED, const char *source EINA_UNUSED) 122_text_basic_get(void *data, Evas_Object *obj EINA_UNUSED, const char *source EINA_UNUSED)
123{ 123{
124 Extra_Background *t = data; 124 Extra_Wallpaper *t = data;
125 125
126 return strdup(t->obj.name); 126 return strdup(t->obj.name);
127} 127}
@@ -134,8 +134,8 @@ _item_selected(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
134 _show_tooltip(elm_object_item_data_get(it)); 134 _show_tooltip(elm_object_item_data_get(it));
135} 135}
136 136
137Extra_Ui_Site_Template background_site = { 137Extra_Ui_Site_Template wallpaper_site = {
138 extra_backgrounds_list, 138 extra_wallpapers_list,
139 "thumb", 139 "thumb",
140 _content_basic_get, 140 _content_basic_get,
141 _text_basic_get, 141 _text_basic_get,
diff --git a/src/bin/meson.build b/src/bin/meson.build
index 973742e..ff48d16 100644
--- a/src/bin/meson.build
+++ b/src/bin/meson.build
@@ -2,7 +2,7 @@ files = [
2 'extra_main.c', 2 'extra_main.c',
3 'extra_util.c', 3 'extra_util.c',
4 'extra_util.h', 4 'extra_util.h',
5 'extra_background_selector.c', 5 'extra_wallpaper_selector.c',
6 'extra_theme_selector.c', 6 'extra_theme_selector.c',
7 'extra_private.h', 7 'extra_private.h',
8 'gettext.h' 8 'gettext.h'
diff --git a/src/lib/extra.c b/src/lib/extra.c
index 85ad0da..e324b21 100644
--- a/src/lib/extra.c
+++ b/src/lib/extra.c
@@ -14,7 +14,7 @@ static Ecore_Event_Handler *_complete;
14int _extra_lib_log_dom = -1; 14int _extra_lib_log_dom = -1;
15 15
16Eina_List *_theme_list = NULL; 16Eina_List *_theme_list = NULL;
17Eina_List *_background_list = NULL; 17Eina_List *_wallpaper_list = NULL;
18 18
19#define sec_strdup(v) v ? eina_strbuf_string_steal(v) : NULL 19#define sec_strdup(v) v ? eina_strbuf_string_steal(v) : NULL
20 20
@@ -85,14 +85,14 @@ _fill_themes(Eina_Strbuf *buf)
85 85
86 86
87//================ 87//================
88//background stuff 88//wallpaper stuff
89 89
90typedef struct { 90typedef struct {
91 Extra_Background background; 91 Extra_Wallpaper wallpaper;
92 Extra_Request *preview; 92 Extra_Request *preview;
93 Extra_Request *cache_preview; 93 Extra_Request *cache_preview;
94 Extra_Request *main; 94 Extra_Request *main;
95} Extra_Background_Private; 95} Extra_Wallpaper_Private;
96 96
97typedef struct { 97typedef struct {
98 Eina_Strbuf *author; 98 Eina_Strbuf *author;
@@ -100,40 +100,40 @@ typedef struct {
100 Eina_Strbuf *source; 100 Eina_Strbuf *source;
101 Eina_Strbuf *version; 101 Eina_Strbuf *version;
102 Eina_Strbuf *id; 102 Eina_Strbuf *id;
103} Background_Object; 103} Wallpaper_Object;
104 104
105static Eina_Bool 105static Eina_Bool
106_fill_backgrounds(Eina_Strbuf *buf) 106_fill_wallpapers(Eina_Strbuf *buf)
107{ 107{
108 Background_Object *obj; 108 Wallpaper_Object *obj;
109 109
110 eina_list_free(_background_list); 110 eina_list_free(_wallpaper_list);
111 _background_list = NULL; 111 _wallpaper_list = NULL;
112 112
113 EXTRA_JSON_TO_LIST_TEMPLATE_INIT(template, Background_Object, 113 EXTRA_JSON_TO_LIST_TEMPLATE_INIT(template, Wallpaper_Object,
114 EXTRA_JSON_STRUCT_FIELD("author", Background_Object, author, EINA_FALSE), 114 EXTRA_JSON_STRUCT_FIELD("author", Wallpaper_Object, author, EINA_FALSE),
115 EXTRA_JSON_STRUCT_FIELD("source", Background_Object, source, EINA_FALSE), 115 EXTRA_JSON_STRUCT_FIELD("source", Wallpaper_Object, source, EINA_FALSE),
116 EXTRA_JSON_STRUCT_FIELD("name", Background_Object, name, EINA_TRUE), 116 EXTRA_JSON_STRUCT_FIELD("name", Wallpaper_Object, name, EINA_TRUE),
117 EXTRA_JSON_STRUCT_FIELD("version", Background_Object, version, EINA_TRUE), 117 EXTRA_JSON_STRUCT_FIELD("version", Wallpaper_Object, version, EINA_TRUE),
118 EXTRA_JSON_STRUCT_FIELD("background-id", Background_Object, id, EINA_TRUE), 118 EXTRA_JSON_STRUCT_FIELD("background-id", Wallpaper_Object, id, EINA_TRUE),
119 ); 119 );
120 120
121 Eina_List *lst = extra_json_to_list(&template, buf); 121 Eina_List *lst = extra_json_to_list(&template, buf);
122 122
123 EINA_LIST_FREE(lst, obj) 123 EINA_LIST_FREE(lst, obj)
124 { 124 {
125 Extra_Background_Private *background = calloc(1, sizeof(Extra_Background_Private)); 125 Extra_Wallpaper_Private *wallpaper = calloc(1, sizeof(Extra_Wallpaper_Private));
126 int versionNumb; 126 int versionNumb;
127 127
128 versionNumb = atoi(eina_strbuf_string_get(obj->version)); 128 versionNumb = atoi(eina_strbuf_string_get(obj->version));
129 129
130 background->background.obj.author = sec_strdup(obj->author); 130 wallpaper->wallpaper.obj.author = sec_strdup(obj->author);
131 background->background.obj.id = sec_strdup(obj->id); 131 wallpaper->wallpaper.obj.id = sec_strdup(obj->id);
132 background->background.obj.name = sec_strdup(obj->name); 132 wallpaper->wallpaper.obj.name = sec_strdup(obj->name);
133 background->background.obj.source = sec_strdup(obj->source); 133 wallpaper->wallpaper.obj.source = sec_strdup(obj->source);
134 background->background.obj.version = versionNumb; 134 wallpaper->wallpaper.obj.version = versionNumb;
135 135
136 _background_list = eina_list_append(_background_list, background); 136 _wallpaper_list = eina_list_append(_wallpaper_list, wallpaper);
137 137
138 extra_json_list_part_free(&template, obj); 138 extra_json_list_part_free(&template, obj);
139 } 139 }
@@ -249,20 +249,20 @@ typedef struct {
249 Extra_Progress *progress; 249 Extra_Progress *progress;
250 Ecore_Con_Url *themes; 250 Ecore_Con_Url *themes;
251 Eina_Strbuf *themes_content; 251 Eina_Strbuf *themes_content;
252 Ecore_Con_Url *backgrounds; 252 Ecore_Con_Url *wallpapers;
253 Eina_Strbuf *background_content; 253 Eina_Strbuf *wallpaper_content;
254} Extra_Sync_Request; 254} Extra_Sync_Request;
255 255
256static void 256static void
257_extra_sync_request_end_eval(Extra_Sync_Request *req) 257_extra_sync_request_end_eval(Extra_Sync_Request *req)
258{ 258{
259 if (!req->themes_content || !req->background_content) return; 259 if (!req->themes_content || !req->wallpaper_content) return;
260 260
261 if (_fill_themes(req->themes_content)) 261 if (_fill_themes(req->themes_content))
262 _cache_content(req->themes_content, "themes"); 262 _cache_content(req->themes_content, "themes");
263 263
264 if (_fill_backgrounds(req->background_content)) 264 if (_fill_wallpapers(req->wallpaper_content))
265 _cache_content(req->background_content, "backgrounds"); 265 _cache_content(req->wallpaper_content, "wallpapers");
266 266
267 if (req->progress->done_cb) 267 if (req->progress->done_cb)
268 req->progress->done_cb(req->progress->data); 268 req->progress->done_cb(req->progress->data);
@@ -277,9 +277,9 @@ _url_complete_cb(void *data, int type EINA_UNUSED, void *event_info)
277 Ecore_Con_Event_Url_Complete *complete = event_info; 277 Ecore_Con_Event_Url_Complete *complete = event_info;
278 Extra_Sync_Request *request = data; 278 Extra_Sync_Request *request = data;
279 279
280 if (complete->url_con == request->backgrounds) 280 if (complete->url_con == request->wallpapers)
281 { 281 {
282 request->background_content = ecore_con_url_data_get(complete->url_con); 282 request->wallpaper_content = ecore_con_url_data_get(complete->url_con);
283 _extra_sync_request_end_eval(request); 283 _extra_sync_request_end_eval(request);
284 } 284 }
285 else if (complete->url_con == request->themes) 285 else if (complete->url_con == request->themes)
@@ -305,14 +305,14 @@ extra_sync(Extra_Progress *progress)
305 ecore_con_url_additional_header_add(req->themes, "Accept", "text/json"); 305 ecore_con_url_additional_header_add(req->themes, "Accept", "text/json");
306 ecore_con_url_data_set(req->themes, eina_strbuf_new()); 306 ecore_con_url_data_set(req->themes, eina_strbuf_new());
307 307
308 req->backgrounds = ecore_con_url_custom_new("https://" HOSTNAME "/v1/backgrounds/", "GET"); 308 req->wallpapers = ecore_con_url_custom_new("https://" HOSTNAME "/v1/backgrounds/", "GET");
309 ecore_con_url_additional_header_add(req->backgrounds, "Accept", "text/json"); 309 ecore_con_url_additional_header_add(req->wallpapers, "Accept", "text/json");
310 ecore_con_url_data_set(req->backgrounds, eina_strbuf_new()); 310 ecore_con_url_data_set(req->wallpapers, eina_strbuf_new());
311 311
312 _data = ecore_event_handler_add(ECORE_CON_EVENT_URL_DATA, _url_data_cb, req); 312 _data = ecore_event_handler_add(ECORE_CON_EVENT_URL_DATA, _url_data_cb, req);
313 _complete = ecore_event_handler_add(ECORE_CON_EVENT_URL_COMPLETE, _url_complete_cb, req); 313 _complete = ecore_event_handler_add(ECORE_CON_EVENT_URL_COMPLETE, _url_complete_cb, req);
314 314
315 ecore_con_url_get(req->backgrounds); 315 ecore_con_url_get(req->wallpapers);
316 ecore_con_url_get(req->themes); 316 ecore_con_url_get(req->themes);
317} 317}
318 318
@@ -632,21 +632,21 @@ extra_theme_installed_old(Extra_Theme *t)
632} 632}
633 633
634//============== 634//==============
635//background api 635//wallpaper api
636 636
637EAPI Eina_List* 637EAPI Eina_List*
638extra_backgrounds_list(void) 638extra_wallpapers_list(void)
639{ 639{
640 return _background_list; 640 return _wallpaper_list;
641} 641}
642 642
643EAPI Extra_Background* 643EAPI Extra_Wallpaper*
644extra_background_get(const char *id) 644extra_wallpaper_get(const char *id)
645{ 645{
646 Eina_List *n; 646 Eina_List *n;
647 Extra_Background *b; 647 Extra_Wallpaper *b;
648 648
649 EINA_LIST_FOREACH(_background_list, n, b) 649 EINA_LIST_FOREACH(_wallpaper_list, n, b)
650 { 650 {
651 if (!strcmp(id, b->obj.id)) 651 if (!strcmp(id, b->obj.id))
652 return b; 652 return b;
@@ -656,16 +656,16 @@ extra_background_get(const char *id)
656} 656}
657 657
658EAPI char * 658EAPI char *
659extra_background_download_url_get(Extra_Background *background) 659extra_wallpaper_download_url_get(Extra_Wallpaper *wallpaper)
660{ 660{
661 Eina_Strbuf *buf; 661 Eina_Strbuf *buf;
662 char *url; 662 char *url;
663 663
664 EINA_SAFETY_ON_NULL_RETURN_VAL(background, NULL); 664 EINA_SAFETY_ON_NULL_RETURN_VAL(wallpaper, NULL);
665 665
666 buf = eina_strbuf_new(); 666 buf = eina_strbuf_new();
667 eina_strbuf_append(buf, "https://" HOSTNAME "/backgrounds/"); 667 eina_strbuf_append(buf, "https://" HOSTNAME "/backgrounds/");
668 eina_strbuf_append_printf(buf, "%s-%d.edj", background->obj.id, background->obj.version); 668 eina_strbuf_append_printf(buf, "%s-%d.edj", wallpaper->obj.id, wallpaper->obj.version);
669 669
670 url = eina_strbuf_string_steal(buf); 670 url = eina_strbuf_string_steal(buf);
671 eina_strbuf_free(buf); 671 eina_strbuf_free(buf);
@@ -674,18 +674,18 @@ extra_background_download_url_get(Extra_Background *background)
674} 674}
675 675
676EAPI char * 676EAPI char *
677extra_background_install_path_get(Extra_Background *background) 677extra_wallpaper_install_path_get(Extra_Wallpaper *wallpaper)
678{ 678{
679 Eina_Strbuf *buf; 679 Eina_Strbuf *buf;
680 char *path; 680 char *path;
681 681
682 EINA_SAFETY_ON_NULL_RETURN_VAL(background, NULL); 682 EINA_SAFETY_ON_NULL_RETURN_VAL(wallpaper, NULL);
683 683
684 buf = eina_strbuf_new(); 684 buf = eina_strbuf_new();
685 685
686 eina_strbuf_append(buf, eina_environment_home_get()); 686 eina_strbuf_append(buf, eina_environment_home_get());
687 eina_strbuf_append(buf, "/.e/e/backgrounds/"); 687 eina_strbuf_append(buf, "/.e/e/backgrounds/");
688 eina_strbuf_append_printf(buf, "%s-%d.edj", background->obj.id, background->obj.version); 688 eina_strbuf_append_printf(buf, "%s-%d.edj", wallpaper->obj.id, wallpaper->obj.version);
689 689
690 path = eina_strbuf_string_steal(buf); 690 path = eina_strbuf_string_steal(buf);
691 eina_strbuf_free(buf); 691 eina_strbuf_free(buf);
@@ -693,14 +693,14 @@ extra_background_install_path_get(Extra_Background *background)
693} 693}
694 694
695EAPI Eina_Bool 695EAPI Eina_Bool
696extra_background_installed(Extra_Background *background) 696extra_wallpaper_installed(Extra_Wallpaper *wallpaper)
697{ 697{
698 char *path; 698 char *path;
699 Eina_Bool exists; 699 Eina_Bool exists;
700 700
701 EINA_SAFETY_ON_NULL_RETURN_VAL(background, EINA_FALSE); 701 EINA_SAFETY_ON_NULL_RETURN_VAL(wallpaper, EINA_FALSE);
702 702
703 path = extra_background_install_path_get(background); 703 path = extra_wallpaper_install_path_get(wallpaper);
704 exists = ecore_file_exists(path); 704 exists = ecore_file_exists(path);
705 free(path); 705 free(path);
706 706
@@ -708,13 +708,13 @@ extra_background_installed(Extra_Background *background)
708} 708}
709 709
710EAPI Extra_Request* 710EAPI Extra_Request*
711extra_background_download(Extra_Progress *progress, Extra_Background *background) 711extra_wallpaper_download(Extra_Progress *progress, Extra_Wallpaper *wallpaper)
712{ 712{
713 char *path, *urlstr = NULL; 713 char *path, *urlstr = NULL;
714 Extra_Background_Private *priv = ((Extra_Background_Private*) background); 714 Extra_Wallpaper_Private *priv = ((Extra_Wallpaper_Private*) wallpaper);
715 715
716 EINA_SAFETY_ON_NULL_RETURN_VAL(progress, NULL); 716 EINA_SAFETY_ON_NULL_RETURN_VAL(progress, NULL);
717 EINA_SAFETY_ON_NULL_RETURN_VAL(background, NULL); 717 EINA_SAFETY_ON_NULL_RETURN_VAL(wallpaper, NULL);
718 718
719 if (priv->preview) 719 if (priv->preview)
720 { 720 {
@@ -724,8 +724,8 @@ extra_background_download(Extra_Progress *progress, Extra_Background *background
724 return NULL; 724 return NULL;
725 } 725 }
726 726
727 urlstr = extra_background_download_url_get(background); 727 urlstr = extra_wallpaper_download_url_get(wallpaper);
728 path = extra_background_install_path_get(background); 728 path = extra_wallpaper_install_path_get(wallpaper);
729 729
730 extra_file_download(progress, urlstr, path, &priv->main); 730 extra_file_download(progress, urlstr, path, &priv->main);
731 731
@@ -737,15 +737,15 @@ extra_background_download(Extra_Progress *progress, Extra_Background *background
737 737
738 738
739EAPI char* 739EAPI char*
740extra_background_preview_get(Extra_Background *background) 740extra_wallpaper_preview_get(Extra_Wallpaper *wallpaper)
741{ 741{
742 Extra_Background_Private *priv = (Extra_Background_Private*) background; 742 Extra_Wallpaper_Private *priv = (Extra_Wallpaper_Private*) wallpaper;
743 Extra_Path_Pair *pair; 743 Extra_Path_Pair *pair;
744 char *local; 744 char *local;
745 745
746 if (priv->preview) return NULL; 746 if (priv->preview) return NULL;
747 747
748 pair = _extra_preview_path_pair_gen("backgrounds", &background->obj); 748 pair = _extra_preview_path_pair_gen("backgrounds", &wallpaper->obj);
749 local = pair->local; 749 local = pair->local;
750 750
751 if (!ecore_file_exists(local)) 751 if (!ecore_file_exists(local))
@@ -769,9 +769,9 @@ extra_background_preview_get(Extra_Background *background)
769} 769}
770 770
771EAPI Extra_Request* 771EAPI Extra_Request*
772extra_background_preview_download(Extra_Progress *progress, Extra_Background *background) 772extra_wallpaper_preview_download(Extra_Progress *progress, Extra_Wallpaper *wallpaper)
773{ 773{
774 Extra_Background_Private *priv = (Extra_Background_Private*) background; 774 Extra_Wallpaper_Private *priv = (Extra_Wallpaper_Private*) wallpaper;
775 Extra_Path_Pair *pair; 775 Extra_Path_Pair *pair;
776 776
777 if (priv->preview) 777 if (priv->preview)
@@ -782,7 +782,7 @@ extra_background_preview_download(Extra_Progress *progress, Extra_Background *ba
782 return NULL; 782 return NULL;
783 } 783 }
784 784
785 pair = _extra_preview_path_pair_gen("backgrounds", &background->obj); 785 pair = _extra_preview_path_pair_gen("backgrounds", &wallpaper->obj);
786 786
787 extra_file_download(progress, pair->remote, pair->local, &priv->preview); 787 extra_file_download(progress, pair->remote, pair->local, &priv->preview);
788 788
@@ -792,11 +792,11 @@ extra_background_preview_download(Extra_Progress *progress, Extra_Background *ba
792} 792}
793 793
794EAPI void 794EAPI void
795extra_background_delete(Extra_Background *b) 795extra_wallpaper_delete(Extra_Wallpaper *b)
796{ 796{
797 char *path; 797 char *path;
798 798
799 path = extra_background_install_path_get(b); 799 path = extra_wallpaper_install_path_get(b);
800 800
801 ecore_file_remove(path); 801 ecore_file_remove(path);
802 802
diff --git a/src/lib/extra.h b/src/lib/extra.h
index 1e76a89..e0b6947 100644
--- a/src/lib/extra.h
+++ b/src/lib/extra.h
@@ -57,10 +57,10 @@ typedef struct _Extra_Theme
57 const char *description; 57 const char *description;
58} Extra_Theme; 58} Extra_Theme;
59 59
60typedef struct _Extra_Background 60typedef struct _Extra_Wallpaper
61{ 61{
62 Extra_Base_Object obj; 62 Extra_Base_Object obj;
63} Extra_Background; 63} Extra_Wallpaper;
64 64
65typedef struct _Extra_Progress 65typedef struct _Extra_Progress
66{ 66{
@@ -182,15 +182,15 @@ EAPI void extra_theme_reset(void);
182 * @} 182 * @}
183 */ 183 */
184 184
185EAPI Eina_List* extra_backgrounds_list(void); 185EAPI Eina_List* extra_wallpapers_list(void);
186EAPI Extra_Background* extra_background_get(const char *id); 186EAPI Extra_Wallpaper* extra_wallpaper_get(const char *id);
187 187
188EAPI Eina_Bool extra_background_installed(Extra_Background *b); 188EAPI Eina_Bool extra_wallpaper_installed(Extra_Wallpaper *b);
189EAPI Extra_Request* extra_background_download(Extra_Progress *progress, Extra_Background *b); 189EAPI Extra_Request* extra_wallpaper_download(Extra_Progress *progress, Extra_Wallpaper *b);
190EAPI void extra_background_delete(Extra_Background *b); 190EAPI void extra_wallpaper_delete(Extra_Wallpaper *b);
191 191
192EAPI char* extra_background_preview_get(Extra_Background *background); 192EAPI char* extra_wallpaper_preview_get(Extra_Wallpaper *wallpaper);
193EAPI Extra_Request* extra_background_preview_download(Extra_Progress *progress, Extra_Background *background); 193EAPI Extra_Request* extra_wallpaper_preview_download(Extra_Progress *progress, Extra_Wallpaper *wallpaper);
194 194
195EAPI void extra_request_mute(Extra_Request *req); 195EAPI void extra_request_mute(Extra_Request *req);
196 196