[EGIT] [apps/empc] master 08/10: ensure that clipboard pastes are handled asynchronously
discomfitor pushed a commit to branch master. http://git.enlightenment.org/apps/empc.git/commit/?id=8db5763d087b1fb05ccaf8fe62eb0f91b7f04039 commit 8db5763d087b1fb05ccaf8fe62eb0f91b7f04039 Author: Mike BlumenkrantzDate: Mon Feb 8 11:52:46 2016 -0500 ensure that clipboard pastes are handled asynchronously if more status calls occur before the queue updates, the clipboard data would be erroneously consumed here, preventing the operation from succeeding (and ruining the queue) --- src/bin/empc.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/bin/empc.c b/src/bin/empc.c index b03e180..3d08551 100644 --- a/src/bin/empc.c +++ b/src/bin/empc.c @@ -2094,11 +2094,13 @@ empc_status(void *d EINA_UNUSED, int t EINA_UNUSED, Empd_Empdd_Status_Data *ev) { long num = ev->queue_length - clipboard_paste_length; -empd_empdd_move_list_call(empd_proxy, clipboard_paste_length, num, clipboard_paste_id); -/* handle paste insertions */ -clipboard_paste_length = 0; -clipboard_paste_id = -1; -empd_empdd_status_call(empd_proxy); +if (num) + { + empd_empdd_move_list_call(empd_proxy, clipboard_paste_length, num, clipboard_paste_id); + /* handle paste insertions */ + clipboard_paste_length = 0; + clipboard_paste_id = -1; + } } /* this should only run on startup...other updates are automatic */ --
[EGIT] [apps/empc] master 03/10: add item_compress* list theme group aliases
discomfitor pushed a commit to branch master. http://git.enlightenment.org/apps/empc.git/commit/?id=fae6e09644a9ac4305009618f3d68d60c4e11abf commit fae6e09644a9ac4305009618f3d68d60c4e11abf Author: Mike BlumenkrantzDate: Mon Feb 8 11:52:46 2016 -0500 add item_compress* list theme group aliases ref T3148 --- data/themes/elm.edc | 4 1 file changed, 4 insertions(+) diff --git a/data/themes/elm.edc b/data/themes/elm.edc index a582296..a13748e 100644 --- a/data/themes/elm.edc +++ b/data/themes/elm.edc @@ -1332,9 +1332,13 @@ group { "elm/list/base/queue_list"; } group { name: "elm/list/item/queue_list"; + alias: "elm/list/item_compress/queue_list"; alias: "elm/list/item/filesystem"; + alias: "elm/list/item_compress/filesystem"; alias: "elm/list/item_odd/queue_list"; + alias: "elm/list/item_compress_odd/queue_list"; alias: "elm/list/item_odd/filesystem"; + alias: "elm/list/item_compress_odd/filesystem"; data.item: "selectraise" "on"; data.item: "focusraise" "on"; nomouse; --
[EGIT] [apps/empc] master 06/10: add signal/handling for managing queue list changes using incremental updates
discomfitor pushed a commit to branch master. http://git.enlightenment.org/apps/empc.git/commit/?id=ba50156ec42fb3ed2ebab97f1812b7f1b2890bd9 commit ba50156ec42fb3ed2ebab97f1812b7f1b2890bd9 Author: Mike BlumenkrantzDate: Mon Feb 8 11:52:46 2016 -0500 add signal/handling for managing queue list changes using incremental updates this is a significantly more lightweight method of updating the current queue after any changes have been made, allowing clients to perform updates on only part of the current queue instead of receiving the entire thing in a giant chunk any time a change occurs --- src/bin/empdd.c | 87 --- src/bin/empdd.xml | 3 ++ 2 files changed, 66 insertions(+), 24 deletions(-) diff --git a/src/bin/empdd.c b/src/bin/empdd.c index 9aebb70..6d4d5ef 100644 --- a/src/bin/empdd.c +++ b/src/bin/empdd.c @@ -77,6 +77,7 @@ typedef enum EMPD_COMMAND_UPDATE, EMPD_COMMAND_FIND, EMPD_COMMAND_IDLE, + EMPD_COMMAND_QUEUE_CHANGES_META, } EMPD_Command; static const char *cmd_txt[] = @@ -113,6 +114,7 @@ static const char *cmd_txt[] = CMD_TXT(EMPD_COMMAND_UPDATE) CMD_TXT(EMPD_COMMAND_FIND) CMD_TXT(EMPD_COMMAND_IDLE) + CMD_TXT(EMPD_COMMAND_QUEUE_CHANGES_META) }; typedef enum @@ -124,6 +126,7 @@ typedef enum EMPD_SIGNAL_STATUS, EMPD_SIGNAL_CURRENT_SONG, EMPD_SIGNAL_QUEUE_LIST, + EMPD_SIGNAL_QUEUE_CHANGES_META, EMPD_SIGNAL_DATABASE_UPDATE_BEGIN, EMPD_SIGNAL_DATABASE_UPDATE_END, } EMPD_Signals; @@ -144,6 +147,7 @@ static const Eldbus_Signal empd_signals[] = {"s", "artist"}, {"s", "composer"}, {"s", "title"}, {"s", "album"}, {"i", "track"}, {"s", "name"}, {"s", "date"}, {"s", "disc"}, {"s", "genre"}, {"i", "song_pos"}, {"i", "songid"}), 0}, [EMPD_SIGNAL_QUEUE_LIST] = {"QueueList", ELDBUS_ARGS({"a(stusssisssii)", "array_of_songs"}), 0}, + [EMPD_SIGNAL_QUEUE_CHANGES_META] = {"QueueChangesMeta", ELDBUS_ARGS({"a(stusssisssii)", "array_of_songs"}), 0}, [EMPD_SIGNAL_DATABASE_UPDATE_BEGIN] = {"DatabaseUpdateBegin", NULL, 0}, [EMPD_SIGNAL_DATABASE_UPDATE_END] = {"DatabaseUpdateEnd", NULL, 0}, {NULL, NULL, 0} @@ -160,6 +164,7 @@ static Eldbus_Service_Interface *empd_iface = NULL; static Eina_Bool fetching_queue = EINA_FALSE; static unsigned int empd_queue_version = 0; +static unsigned int empd_queue_length = 0; static int empd_songid = -1; static int empd_dbupdate = 0; @@ -341,16 +346,13 @@ pinger_cb(void *d EINA_UNUSED) } static void -queue_list_send(Eldbus_Message *msg, unsigned int start, long num) +queue_list_info_send(Eldbus_Message *msg, Eina_List *queue_list, unsigned int start, long num, Eina_Bool sig) { Eldbus_Message_Iter *iter, *array, *struc; Eina_List *l; struct mpd_song *so; unsigned int cur = 0; - Eina_Bool sig = !msg; - if (!msg) - msg = eldbus_service_signal_new(empd_iface, EMPD_SIGNAL_QUEUE_LIST); iter = eldbus_message_iter_get(msg); array = eldbus_message_iter_container_new(iter, 'a', "(stusssisssii)"); EINA_LIST_FOREACH(queue_list, l, so) @@ -374,18 +376,14 @@ queue_list_send(Eldbus_Message *msg, unsigned int start, long num) eldbus_service_signal_send(empd_iface, msg); } -static Eina_Bool -queue_item_each_free(const void *container EINA_UNUSED, void *data, void *fdata EINA_UNUSED) +static void +queue_list_send(Eldbus_Message *msg, unsigned int start, long num) { - mpd_song_free(data); - return EINA_TRUE; -} + Eina_Bool sig = !msg; -static Eina_Bool -lsinfo_item_each_free(const void *container EINA_UNUSED, void *data, void *fdata EINA_UNUSED) -{ - mpd_entity_free(data); - return EINA_TRUE; + if (!msg) + msg = eldbus_service_signal_new(empd_iface, EMPD_SIGNAL_QUEUE_LIST); + queue_list_info_send(msg, empd->current_queue, start, num, sig); } static Eina_Bool @@ -488,7 +486,6 @@ fdh_func(void *d EINA_UNUSED, Ecore_Fd_Handler *fdh EINA_UNUSED) case MPD_IDLE_QUEUE: if (!empd->pinger) pinger_cb(NULL); - queue_fetch(); break; case MPD_IDLE_UPDATE: if (!empd_dbupdate) @@ -551,18 +548,30 @@ fdh_func(void *d EINA_UNUSED, Ecore_Fd_Handler *fdh EINA_UNUSED) mpd_status_get_total_time(st), mpd_status_get_elapsed_time(st), mpd_status_get_kbit_rate(st), af ? af->sample_rate : 0, af ? af->bits : 0, af ? af->channels : 0, mpd_status_get_next_song_pos(st), mpd_status_get_next_song_id(st), empd_dbupdate); - if (((!empd->current_queue) && (!mpd_status_get_queue_length(st))) || - ((!empd_queue_version) && empd->current_queue && - (eina_list_count(empd->current_queue) == mpd_status_get_queue_length(st +
[EGIT] [apps/empc] master 02/10: when running apm update adds, loop infinitely until all adds are processed
discomfitor pushed a commit to branch master. http://git.enlightenment.org/apps/empc.git/commit/?id=f8db8f14b52c14f27f3c294cd05f81367b7742df commit f8db8f14b52c14f27f3c294cd05f81367b7742df Author: Mike BlumenkrantzDate: Mon Feb 8 11:52:46 2016 -0500 when running apm update adds, loop infinitely until all adds are processed previously this would stop processing after appending a single album, likely not what is desired --- src/modules/auto_playlist_manager.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/modules/auto_playlist_manager.c b/src/modules/auto_playlist_manager.c index 65732a8..4c10587 100644 --- a/src/modules/auto_playlist_manager.c +++ b/src/modules/auto_playlist_manager.c @@ -202,10 +202,10 @@ static void run_adds(void) { char *file; - Eina_List *l, *ll; + Eina_List *l; last_queue_length = empd_queue_length; - EINA_LIST_FOREACH_SAFE(adds, l, ll, file) + while (adds) { const char *a, *b = NULL; Eina_Iterator *it; @@ -213,6 +213,8 @@ run_adds(void) Elm_Object_Item *item; Eina_Bool done = EINA_FALSE; +l = eina_list_data_get(adds); +file = eina_list_data_get(l); a = strrchr(file, '/'); if (a) b = strchr(file, '/'); @@ -283,6 +285,7 @@ run_adds(void) { char *f2; + /* sequentially append all songs from matching directory structure */ empd_empdd_add_list_call(empd_proxy, file); post_add(0, file); while (eina_list_next(l)) @@ -297,7 +300,6 @@ run_adds(void) } adds = eina_list_remove_list(adds, l); free(file); -break; } } --
[EGIT] [apps/empc] master 04/10: convert array usage in empdd to lists
discomfitor pushed a commit to branch master. http://git.enlightenment.org/apps/empc.git/commit/?id=f501bb454200beecafcf88e71c235aa5b1aa422a commit f501bb454200beecafcf88e71c235aa5b1aa422a Author: Mike BlumenkrantzDate: Mon Feb 8 11:52:46 2016 -0500 convert array usage in empdd to lists --- src/bin/empdd.c | 47 +++ 1 file changed, 15 insertions(+), 32 deletions(-) diff --git a/src/bin/empdd.c b/src/bin/empdd.c index bdc3ada..94dafea 100644 --- a/src/bin/empdd.c +++ b/src/bin/empdd.c @@ -35,8 +35,8 @@ typedef struct EMPD struct mpd_parser *parser; - Eina_Array *pending; - Eina_Array *current_queue; + Eina_List *pending; + Eina_List *current_queue; void *cur; E_Slist *cmds, *last; @@ -344,7 +344,7 @@ static void queue_list_send(Eldbus_Message *msg, unsigned int start, long num) { Eldbus_Message_Iter *iter, *array, *struc; - Eina_Iterator *it; + Eina_List *l; struct mpd_song *so; unsigned int cur = 0; Eina_Bool sig = !msg; @@ -353,8 +353,7 @@ queue_list_send(Eldbus_Message *msg, unsigned int start, long num) msg = eldbus_service_signal_new(empd_iface, EMPD_SIGNAL_QUEUE_LIST); iter = eldbus_message_iter_get(msg); array = eldbus_message_iter_container_new(iter, 'a', "(stusssisssii)"); - it = eina_array_iterator_new(empd->current_queue); - EINA_ITERATOR_FOREACH(it, so) + EINA_LIST_FOREACH(queue_list, l, so) { /* holy shit. */ const char *track = mpd_song_get_tag(so, MPD_TAG_TRACK, 0); @@ -370,7 +369,6 @@ queue_list_send(Eldbus_Message *msg, unsigned int start, long num) eldbus_message_iter_container_close(array, struc); if (mpd_song_get_pos(so) == num) break; } - eina_iterator_free(it); eldbus_message_iter_container_close(iter, array); if (sig) eldbus_service_signal_send(empd_iface, msg); @@ -555,12 +553,12 @@ fdh_func(void *d EINA_UNUSED, Ecore_Fd_Handler *fdh EINA_UNUSED) mpd_status_get_next_song_pos(st), mpd_status_get_next_song_id(st), empd_dbupdate); if (((!empd->current_queue) && (!mpd_status_get_queue_length(st))) || ((!empd_queue_version) && empd->current_queue && - (eina_array_count(empd->current_queue) == mpd_status_get_queue_length(st + (eina_list_count(empd->current_queue) == mpd_status_get_queue_length(st empd_queue_version = mpd_status_get_queue_version(st); if ((empd_queue_version && (empd_queue_version != mpd_status_get_queue_version(st))) || ((!empd->current_queue) && (mpd_status_get_queue_length(st))) || (empd->current_queue && mpd_status_get_queue_length(st) && -(eina_array_count(empd->current_queue) != mpd_status_get_queue_length(st +(eina_list_count(empd->current_queue) != mpd_status_get_queue_length(st { if (queue_fetch()) empd_queue_version = mpd_status_get_queue_version(st); @@ -622,12 +620,10 @@ fdh_func(void *d EINA_UNUSED, Ecore_Fd_Handler *fdh EINA_UNUSED) { if (!strcmp(name, "Id")) { - /* at end of current song, push to array + /* at end of current song, push to list * for sending all at once later */ - if (!empd->pending) - empd->pending = eina_array_new(10); - eina_array_push(empd->pending, so); + empd->pending = eina_list_append(empd->pending, so); empd->cur = NULL; } } @@ -654,11 +650,7 @@ fdh_func(void *d EINA_UNUSED, Ecore_Fd_Handler *fdh EINA_UNUSED) { if (res != MPD_PARSER_SUCCESS) break; - if (empd->current_queue) - { -eina_array_foreach(empd->current_queue, queue_item_each_free, NULL); -eina_array_free(empd->current_queue); - } + E_FREE_LIST(empd->current_queue, mpd_song_free); empd->current_queue = empd->pending; empd->pending = NULL; if (empd->current_queue) @@ -673,13 +665,11 @@ fdh_func(void *d EINA_UNUSED, Ecore_Fd_Handler *fdh EINA_UNUSED) if (res == MPD_PARSER_PAIR) { - if (!empd->pending) - empd->pending = eina_array_new(10); //fprintf(stderr, "[%s]|FEED\n", cmd_txt[cmd_get()]); if
[EGIT] [apps/empc] master 05/10: trigger empdd status pings immediately in more method calls
discomfitor pushed a commit to branch master. http://git.enlightenment.org/apps/empc.git/commit/?id=4db0a19dd39cf09c1b0d3e0fea7a47a2e86dfcc8 commit 4db0a19dd39cf09c1b0d3e0fea7a47a2e86dfcc8 Author: Mike BlumenkrantzDate: Mon Feb 8 11:52:46 2016 -0500 trigger empdd status pings immediately in more method calls this greatly improves ui responsiveness --- src/bin/empdd.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/bin/empdd.c b/src/bin/empdd.c index 94dafea..9aebb70 100644 --- a/src/bin/empdd.c +++ b/src/bin/empdd.c @@ -959,7 +959,7 @@ _dbus_seek_cb(const Eldbus_Service_Interface *iface EINA_UNUSED, const Eldbus_Me snprintf(pos, sizeof(pos), "%u", seconds); cmd_append(EMPD_COMMAND_SEEK); mpd_async_send_command(empd->async, "seekid", id, pos, NULL); -fdh_update(); +pinger_cb(NULL); } return eldbus_message_method_return_new(msg); } @@ -978,7 +978,7 @@ _dbus_playid_cb(const Eldbus_Service_Interface *iface EINA_UNUSED, const Eldbus_ snprintf(id, sizeof(id), "%u", songid); cmd_append(EMPD_COMMAND_PLAY_ID); mpd_async_send_command(empd->async, "playid", id, NULL); -fdh_update(); +pinger_cb(NULL); } return eldbus_message_method_return_new(msg); } @@ -1002,14 +1002,14 @@ _dbus_play_cb(const Eldbus_Service_Interface *iface EINA_UNUSED, const Eldbus_Me snprintf(pos, sizeof(pos), "%u", songpos); cmd_append(EMPD_COMMAND_PLAY); mpd_async_send_command(empd->async, "play", pos, NULL); - fdh_update(); + pinger_cb(NULL); } } else { cmd_append(EMPD_COMMAND_PLAY); mpd_async_send_command(empd->async, "play", NULL, NULL); -fdh_update(); +pinger_cb(NULL); } return eldbus_message_method_return_new(msg); } @@ -1090,7 +1090,7 @@ _dbus_delete_list_cb(const Eldbus_Service_Interface *iface EINA_UNUSED, const El snprintf(s, sizeof(s), "%d:%d", start, start + num); cmd_append(EMPD_COMMAND_DELETE_LIST); mpd_async_send_command(empd->async, "delete", s, NULL); -fdh_update(); +pinger_cb(NULL); } return eldbus_message_method_return_new(msg); @@ -1107,7 +1107,7 @@ _dbus_add_list_cb(const Eldbus_Service_Interface *iface EINA_UNUSED, const Eldbu { cmd_append(EMPD_COMMAND_ADD_LIST); mpd_async_send_command(empd->async, "add", uri, NULL); -fdh_update(); +pinger_cb(NULL); } return eldbus_message_method_return_new(msg); @@ -1128,7 +1128,7 @@ _dbus_addid_list_cb(const Eldbus_Service_Interface *iface EINA_UNUSED, const Eld cmd_append(EMPD_COMMAND_ADDID_LIST); snprintf(buf, sizeof(buf), "%u", pos); mpd_async_send_command(empd->async, "addid", uri, buf, NULL); -fdh_update(); +pinger_cb(NULL); } return eldbus_message_method_return_new(msg); @@ -1155,7 +1155,7 @@ _dbus_move_list_cb(const Eldbus_Service_Interface *iface EINA_UNUSED, const Eldb snprintf(s2, sizeof(s2), "%u", target); cmd_append(EMPD_COMMAND_MOVE_LIST); mpd_async_send_command(empd->async, "move", s, s2, NULL); -fdh_update(); +pinger_cb(NULL); } return eldbus_message_method_return_new(msg); @@ -1206,7 +1206,7 @@ _dbus_load_playlist_cb(const Eldbus_Service_Interface *iface EINA_UNUSED, const { cmd_append(EMPD_COMMAND_LOAD_PLAYLIST); mpd_async_send_command(empd->async, "load", uri, NULL); -fdh_update(); +pinger_cb(NULL); } return eldbus_message_method_return_new(msg); --
[EGIT] [apps/empc] master 01/10: improve apm directory matching algorithm with nested album directories
discomfitor pushed a commit to branch master. http://git.enlightenment.org/apps/empc.git/commit/?id=2b2e3baf0d7831dc0fb0f851dd13c71d5b163f40 commit 2b2e3baf0d7831dc0fb0f851dd13c71d5b163f40 Author: Mike BlumenkrantzDate: Mon Feb 8 11:52:46 2016 -0500 improve apm directory matching algorithm with nested album directories should work better for cases involving albums with songs split across many subdirectories --- src/modules/auto_playlist_manager.c | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/modules/auto_playlist_manager.c b/src/modules/auto_playlist_manager.c index 5be64e3..65732a8 100644 --- a/src/modules/auto_playlist_manager.c +++ b/src/modules/auto_playlist_manager.c @@ -80,6 +80,7 @@ sort_cb(const char *a, const char *b) static inline Eina_Bool is_same_path(const char *a, const char *ae, const char *b, const char *be) { + const char *suba = NULL, *subb = NULL; if (!ae) { ae = strrchr(a, '/'); @@ -90,8 +91,23 @@ is_same_path(const char *a, const char *ae, const char *b, const char *be) be = strrchr(b, '/'); if (be) be++; } - if (ae - a != be - b) return EINA_FALSE; - return !memcmp(a, b, ae - a); + /* if full match on all directories, match */ + if ((ae - a == be - b) && (!memcmp(a, b, ae - a))) return EINA_TRUE; + if (ae) + suba = memrchr(a, '/', ae - a - 1); + if (be) + subb = memrchr(b, '/', be - b - 1); + /* try to match subsections of directories: +* Artist/Album/CD 1/song +* Artist/Album/CD 2/song2 +* this is valid +*/ + if (suba && subb) + { +if (suba - a != subb - b) return EINA_FALSE; +return !memcmp(a, b, suba - a); + } + return EINA_FALSE; } static void --
[EGIT] [apps/empc] master 07/10: don't show total track count in tooltip if track number is larger than total
discomfitor pushed a commit to branch master. http://git.enlightenment.org/apps/empc.git/commit/?id=1daabc4f2b963d3d87198249bfa0d827486cb704 commit 1daabc4f2b963d3d87198249bfa0d827486cb704 Author: Mike BlumenkrantzDate: Mon Feb 8 11:52:46 2016 -0500 don't show total track count in tooltip if track number is larger than total this isn't a totally accurate method of showing the track count, so at least be less obvious about it in cases where it's flagrantly wrong --- src/bin/empc.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bin/empc.c b/src/bin/empc.c index a9df3b8..b03e180 100644 --- a/src/bin/empc.c +++ b/src/bin/empc.c @@ -587,7 +587,10 @@ tooltip_create(Evas_Object *tooltip, Elm_Object_Item *item) else { elm_object_text_set(name, _("Track:")); - snprintf(buf, sizeof(buf), "%d/%u", so->track, elm_genlist_item_subitems_count(it)); + if (so->track > (int)elm_genlist_item_subitems_count(it)) + snprintf(buf, sizeof(buf), "%d", so->track); + else + snprintf(buf, sizeof(buf), "%d/%u", so->track, elm_genlist_item_subitems_count(it)); } elm_object_text_set(value, buf); } --
[EGIT] [apps/empc] master 10/10: handle incremental queue version updating in the ui
discomfitor pushed a commit to branch master. http://git.enlightenment.org/apps/empc.git/commit/?id=39bc858b20ca0a0ba2c1427ce64d57163b819dd2 commit 39bc858b20ca0a0ba2c1427ce64d57163b819dd2 Author: Mike BlumenkrantzDate: Mon Feb 8 11:52:46 2016 -0500 handle incremental queue version updating in the ui this removes a number of workarounds related to deleting items from the queue and significantly improves ui responsiveness when editing the queue ref T3147 --- src/bin/empc.c | 203 + 1 file changed, 119 insertions(+), 84 deletions(-) diff --git a/src/bin/empc.c b/src/bin/empc.c index 8a7ffeb..dc8585c 100644 --- a/src/bin/empc.c +++ b/src/bin/empc.c @@ -32,7 +32,6 @@ static unsigned int empd_port; static Eldbus_Pending *config_call; static int empd_state = 0; -static int noclear = 0; static Evas_Object *win = NULL; static Evas_Object *bg[2] = {NULL}; @@ -113,7 +112,7 @@ static size_t empc_module_size[EMPC_MODULE_TYPE_LAST] = static void queue_list_header_image(void *data, Empc_Fetch_Request *req, Evas_Object *obj); static void filesystem_base(Eldbus_Proxy *proxy, void *data, Eldbus_Pending *pending, Eldbus_Error_Info *error, Eina_Value *args); static void filesystem_item_image(void *data, Empc_Fetch_Request *req, Evas_Object *obj); -static void queue_list_handler(Eina_Value *value, Eina_Bool cached); +static void queue_list_handler(Eina_Value *value, Eina_Bool update); static void filesystem_next(void *data, Evas_Object *obj, void *event_info); static void filesystem_prev(void); static Evas_Object *filesystem_new(const char *uri); @@ -1864,7 +1863,7 @@ static void queue_list_cached(Eldbus_Proxy *proxy EINA_UNUSED, void *data, Eldbus_Pending *pending EINA_UNUSED, Eldbus_Error_Info *error EINA_UNUSED, Eina_Value *value) { if (value) - queue_list_handler(value, EINA_TRUE); + queue_list_handler(value, EINA_FALSE); if ((empd_songid == -1) && ((long)data == -1)) empd_empdd_status_call(empd_proxy); } @@ -2170,23 +2169,16 @@ queue_list_item_realize(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, vo static void queue_list_delete_list(const Eina_List *items) { - Eina_List *l, *headers = NULL; + Eina_List *l; int start = -1, num = 0, total = 0; - Elm_Object_Item *it, *next, *hdr = NULL; + Elm_Object_Item *it, *next; Eina_Bool del_playing = EINA_FALSE; Empd_Empdd_Song *so; - unsigned int sub = 0; if (!items) return; l = eina_list_sort(eina_list_clone(items), 0, (Eina_Compare_Cb)queue_list_sort); EINA_LIST_FREE(l, it) { -if (hdr != elm_genlist_item_parent_get(it)) - { - hdr = elm_genlist_item_parent_get(it); - headers = eina_list_append(headers, hdr); - sub = elm_genlist_item_subitems_count(hdr); - } /* check for contiguous selection */ so = elm_object_item_data_get(it); if (start == -1) @@ -2205,18 +2197,10 @@ queue_list_delete_list(const Eina_List *items) start = -1, num = 0; if (!del_playing) total += num; - if (!sub) - headers = eina_list_remove(headers, hdr); } else - num++, sub--; -elm_object_item_del(it); + num++; } - noclear++; - if (!sub) - headers = eina_list_remove(headers, hdr); - EINA_LIST_FREE(headers, hdr) - elm_genlist_item_fields_update(hdr, EMPC_TEXT_TIME, ELM_GENLIST_ITEM_FIELD_TEXT); if (!num) return; empd_empdd_delete_list_range_call(empd_proxy, start, num - 1); if ((!del_playing) || (empd_state != MPD_STATE_PLAY)) return; @@ -2236,7 +2220,7 @@ static void queue_list_delete_inverted(void) { const Eina_List *items; - Eina_List *l, *headers = NULL; + Eina_List *l; int start = -1; Elm_Object_Item *it, *prev, *next, *hdr = NULL; int del_playing = -1; @@ -2265,10 +2249,7 @@ queue_list_delete_inverted(void) EINA_LIST_FREE(l, it) { if (hdr != elm_genlist_item_parent_get(it)) - { - hdr = elm_genlist_item_parent_get(it); - headers = eina_list_append(headers, hdr); - } + hdr = elm_genlist_item_parent_get(it); next = elm_genlist_item_next_get(it); prev = elm_genlist_item_prev_get(it); so = elm_object_item_data_get(next); @@ -2299,8 +2280,6 @@ queue_list_delete_inverted(void) start = -1; } } - EINA_LIST_FREE(headers, hdr) - elm_genlist_item_fields_update(hdr, EMPC_TEXT_TIME, ELM_GENLIST_ITEM_FIELD_TEXT); if (start == -1) return; empd_empdd_delete_list_range_call(empd_proxy, start, -1); if ((!del_playing) || (empd_state != MPD_STATE_PLAY)) return; @@ -2692,25 +2671,24 @@ queue_list_find_insert_point(Empd_Empdd_Song *so) Elm_Object_Item *it, *itp; Empd_Empdd_Song *soi; + if
[EGIT] [apps/empc] master 09/10: automatically update queue list headers when an item is removed
discomfitor pushed a commit to branch master. http://git.enlightenment.org/apps/empc.git/commit/?id=86f5a0324e3f25522eb0fa435a5011f03db1592b commit 86f5a0324e3f25522eb0fa435a5011f03db1592b Author: Mike BlumenkrantzDate: Mon Feb 8 11:52:46 2016 -0500 automatically update queue list headers when an item is removed this is done manually in a few places but it's much more convenient to enforce policy in the delete callback --- src/bin/empc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/bin/empc.c b/src/bin/empc.c index 3d08551..8a7ffeb 100644 --- a/src/bin/empc.c +++ b/src/bin/empc.c @@ -2635,6 +2635,7 @@ queue_list_item_del(Empd_Empdd_Song *so, Evas_Object *obj EINA_UNUSED) { Empd_Empdd_Song_free(sog); elm_object_item_data_set(itg, Empd_Empdd_Song_copy(elm_object_item_data_get(it))); + elm_genlist_item_fields_update(itg, EMPC_TEXT_TIME, ELM_GENLIST_ITEM_FIELD_TEXT); } else if (!elm_genlist_item_subitems_count(itg)) { @@ -2647,6 +2648,8 @@ queue_list_item_del(Empd_Empdd_Song *so, Evas_Object *obj EINA_UNUSED) queue_list_scroll_item = NULL; elm_object_item_del(itg); } +else + elm_genlist_item_fields_update(itg, EMPC_TEXT_TIME, ELM_GENLIST_ITEM_FIELD_TEXT); } Empd_Empdd_Song_free(so); } --
[EGIT] [tools/enventor] master 01/01: ui: improve editor ctxpopup function.
hermet pushed a commit to branch master. http://git.enlightenment.org/tools/enventor.git/commit/?id=c5c352c91731ae2375a13888af966a9cf577c497 commit c5c352c91731ae2375a13888af966a9cf577c497 Author: Hermet ParkDate: Tue Feb 9 15:41:30 2016 +0900 ui: improve editor ctxpopup function. allow +/- buttons' autorepeat functions. --- src/lib/ctxpopup.c | 8 1 file changed, 8 insertions(+) diff --git a/src/lib/ctxpopup.c b/src/lib/ctxpopup.c index 93e5774..3791c58 100644 --- a/src/lib/ctxpopup.c +++ b/src/lib/ctxpopup.c @@ -298,8 +298,12 @@ slider_layout_create(Evas_Object *parent, ctxpopup_data *ctxdata, //Down Button btn = elm_button_add(layout); + elm_button_autorepeat_set(btn, EINA_TRUE); + elm_button_autorepeat_initial_timeout_set(btn, 0.5); + elm_button_autorepeat_gap_timeout_set(btn, 0.1); evas_object_data_set(btn, "layout", layout); evas_object_smart_callback_add(btn, "clicked", btn_down_cb, ctxdata); + evas_object_smart_callback_add(btn, "repeated", btn_down_cb, ctxdata); elm_object_part_content_set(layout, "elm.swallow.down", btn); //Down Image @@ -309,8 +313,12 @@ slider_layout_create(Evas_Object *parent, ctxpopup_data *ctxdata, //Up Button btn = elm_button_add(layout); + elm_button_autorepeat_set(btn, EINA_TRUE); + elm_button_autorepeat_initial_timeout_set(btn, 0.5); + elm_button_autorepeat_gap_timeout_set(btn, 0.1); evas_object_data_set(btn, "layout", layout); evas_object_smart_callback_add(btn, "clicked", btn_up_cb, ctxdata); + evas_object_smart_callback_add(btn, "repeated", btn_up_cb, ctxdata); elm_object_part_content_set(layout, "elm.swallow.up", btn); //Up Image --
[EGIT] [tools/enventor] master 01/01: ui: improve editor ctxpopup.
hermet pushed a commit to branch master. http://git.enlightenment.org/tools/enventor.git/commit/?id=ab8dc5f3eda2b1bfa07c04d7f0ff0c2807da0c01 commit ab8dc5f3eda2b1bfa07c04d7f0ff0c2807da0c01 Author: Hermet ParkDate: Tue Feb 9 15:32:42 2016 +0900 ui: improve editor ctxpopup. remove a entry in the editor ctxpopup. we don't need to display entry anymore since the changes is simulteniously applied into the editor text. --- data/themes/default/layout_common.edc | 19 ++--- src/lib/ctxpopup.c| 78 +++ 2 files changed, 10 insertions(+), 87 deletions(-) diff --git a/data/themes/default/layout_common.edc b/data/themes/default/layout_common.edc index 2355fc7..9b0bec7 100644 --- a/data/themes/default/layout_common.edc +++ b/data/themes/default/layout_common.edc @@ -1595,7 +1595,7 @@ group { name: "slider_layout"; type: RECT; scale: 1; description { state: "default" 0.0; -min: 240 1; +min: 215 1; color: 56 56 56 255; } description { state: "odd" 0.0; @@ -1709,26 +1709,15 @@ group { name: "slider_layout"; rel1.relative: 1.0 0.0; rel2.relative: 1.0 1.0; align: 0.0 0.5; -min: 5 0; +min: 0 0; fixed: 1 0; } } - part { name: "elm.swallow.entry"; - type: SWALLOW; - scale: 1; - description { state: "default" 0.0; -rel1.to_x: "padding2"; -rel2.to_x: "elm.swallow.down"; -rel2.relative: 0 1; -align: 1 0.5; -max: 30 99; - } - } part { name: "elm.swallow.down"; type: SWALLOW; scale: 1; description { state: "default" 0.0; -min: 10 20; +min: 20 20; fixed: 1 1; align: 1.0 0.5; rel1.to: "elm.swallow.up"; @@ -1741,7 +1730,7 @@ group { name: "slider_layout"; type: SWALLOW; scale: 1; description { state: "default" 0.0; -min: 10 20; +min: 20 20; fixed: 1 1; align: 1.0 0.5; rel1.relative: 1.0 0.5; diff --git a/src/lib/ctxpopup.c b/src/lib/ctxpopup.c index cbb27ef..93e5774 100644 --- a/src/lib/ctxpopup.c +++ b/src/lib/ctxpopup.c @@ -63,12 +63,8 @@ static void slider_changed_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED) { ctxpopup_data *ctxdata = data; - Evas_Object *entry = evas_object_data_get(obj, "entry"); double val = elm_slider_value_get(obj); char buf[128]; - if (ctxdata->integer) snprintf(buf, sizeof(buf), "%1.0f", val); - else snprintf(buf, sizeof(buf), "%1.2f", val); - elm_object_text_set(entry, buf); Evas_Object *box = elm_object_content_get(ctxdata->ctxpopup); Eina_List *box_children = elm_box_children_get(box); @@ -108,15 +104,6 @@ slider_changed_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED) ctxdata->animator = ecore_animator_add(changed_animator_cb, ctxdata); } -static Eina_Bool -slider_changed_animator_cb(void *data) -{ - ctxpopup_data *ctxdata = data; - ctxdata->animator = NULL; - slider_changed_cb(data, ctxdata->slider, NULL); - return ECORE_CALLBACK_CANCEL; -} - static void btn_up_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED) { @@ -124,20 +111,12 @@ btn_up_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED) Evas_Object *layout = (Evas_Object *)evas_object_data_get(obj, "layout"); Evas_Object *slider = elm_object_part_content_get(layout, "elm.swallow.slider"); - Evas_Object *entry = elm_object_part_content_get(layout, -"elm.swallow.entry"); double value = elm_slider_value_get(slider); - char buf[128]; if (ctxdata->attr->type & ATTR_VALUE_INTEGER) value += 1; else value += 0.01; - - if (ctxdata->integer) snprintf(buf, sizeof(buf), "%1.0f", value); - else snprintf(buf, sizeof(buf), "%1.2f", value); - elm_object_text_set(entry, buf); - - ctxdata->slider = slider; - ctxdata->animator = ecore_animator_add(slider_changed_animator_cb, ctxdata); + elm_slider_value_set(slider, value); + slider_changed_cb(ctxdata, ctxdata->slider, NULL); } static void @@ -147,24 +126,14 @@ btn_down_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED) Evas_Object *layout = (Evas_Object *)evas_object_data_get(obj, "layout"); Evas_Object *slider = elm_object_part_content_get(layout, "elm.swallow.slider"); - Evas_Object *entry = elm_object_part_content_get(layout, -"elm.swallow.entry"); double value = elm_slider_value_get(slider); - char buf[128]; if (ctxdata->attr->type &
[EGIT] [tools/enventor] master 01/02: improve ux: change editor ctxpopup direction order.
hermet pushed a commit to branch master. http://git.enlightenment.org/tools/enventor.git/commit/?id=9fda7d34073368590ce0676ddb542db92fdef498 commit 9fda7d34073368590ce0676ddb542db92fdef498 Author: Hermet ParkDate: Tue Feb 9 02:07:44 2016 +0900 improve ux: change editor ctxpopup direction order. Come to think of it, up/down direction of ctxpopup is more comfortable to watch the values updation while modifying the values in ctxpopup. --- src/lib/ctxpopup.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/lib/ctxpopup.c b/src/lib/ctxpopup.c index 7a86065..cbb27ef 100644 --- a/src/lib/ctxpopup.c +++ b/src/lib/ctxpopup.c @@ -604,10 +604,10 @@ ctxpopup_img_preview_create(edit_data *ed, elm_config_focus_autoscroll_mode_set(ELM_FOCUS_AUTOSCROLL_MODE_NONE); elm_object_style_set(ctxpopup, "enventor"); - elm_ctxpopup_direction_priority_set(ctxpopup, ELM_CTXPOPUP_DIRECTION_LEFT, - ELM_CTXPOPUP_DIRECTION_UP, + elm_ctxpopup_direction_priority_set(ctxpopup, ELM_CTXPOPUP_DIRECTION_UP, ELM_CTXPOPUP_DIRECTION_DOWN, - ELM_CTXPOPUP_DIRECTION_RIGHT); + ELM_CTXPOPUP_DIRECTION_RIGHT, + ELM_CTXPOPUP_DIRECTION_LEFT); //ctxpopup data ctxpopup_data *ctxdata = calloc(1, sizeof(ctxpopup_data)); if (!ctxdata) @@ -658,10 +658,10 @@ ctxpopup_candidate_list_create(edit_data *ed, attr_value *attr, elm_config_focus_autoscroll_mode_set(ELM_FOCUS_AUTOSCROLL_MODE_NONE); elm_object_style_set(ctxpopup, "enventor"); - elm_ctxpopup_direction_priority_set(ctxpopup, ELM_CTXPOPUP_DIRECTION_RIGHT, - ELM_CTXPOPUP_DIRECTION_LEFT, - ELM_CTXPOPUP_DIRECTION_UP, - ELM_CTXPOPUP_DIRECTION_DOWN); + elm_ctxpopup_direction_priority_set(ctxpopup, ELM_CTXPOPUP_DIRECTION_UP, + ELM_CTXPOPUP_DIRECTION_DOWN, + ELM_CTXPOPUP_DIRECTION_RIGHT, + ELM_CTXPOPUP_DIRECTION_LEFT); //ctxpopup data ctxpopup_data *ctxdata = calloc(1, sizeof(ctxpopup_data)); if (!ctxdata) --
[EGIT] [tools/enventor] master 02/02: ui: adjust the preview image size.
hermet pushed a commit to branch master. http://git.enlightenment.org/tools/enventor.git/commit/?id=61bc3c1cbcdc1b883dd844f7eed75c2f2a0a0c59 commit 61bc3c1cbcdc1b883dd844f7eed75c2f2a0a0c59 Author: Hermet ParkDate: Tue Feb 9 02:13:54 2016 +0900 ui: adjust the preview image size. --- data/themes/default/layout_common.edc | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/data/themes/default/layout_common.edc b/data/themes/default/layout_common.edc index 2908782..2355fc7 100644 --- a/data/themes/default/layout_common.edc +++ b/data/themes/default/layout_common.edc @@ -1486,20 +1486,17 @@ group { name: "viewer_layout"; } } -group { name: "preview_layout"; +group { "preview_layout"; parts { - part { name: "bg"; - type: RECT; - description { state: "default" 0.0; -min: 100 100; -color: 225 225 225 255; + rect { "bg"; + desc { +min: 120 120; rel1.offset: 2 2; rel2.offset: -3 -3; } } - part { name: "elm.swallow.img"; - type: SWALLOW; - description { state: "default" 0.0; + swallow { "elm.swallow.img"; + desc { rel1.to: "bg"; rel2.to: "bg"; } --
[EGIT] [tools/eflete] master 04/14: project_navigator: use alias link insted file for mark the alias
rimmed pushed a commit to branch master. http://git.enlightenment.org/tools/eflete.git/commit/?id=395bd7d0374bf61ec2e09cd767c6c5408aea2fce commit 395bd7d0374bf61ec2e09cd767c6c5408aea2fce Author: Vyacheslav ReutskiyDate: Mon Feb 8 10:55:34 2016 +0200 project_navigator: use alias link insted file for mark the alias Thsi may more useful, because the user can immediately see what the item he select in the tree. Change-Id: I348b5b2af975c855670c9369738cb34d033d20b6 --- src/bin/ui/project_navigator.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/bin/ui/project_navigator.c b/src/bin/ui/project_navigator.c index 8f51004..0bb962e 100644 --- a/src/bin/ui/project_navigator.c +++ b/src/bin/ui/project_navigator.c @@ -104,11 +104,14 @@ _group_item_icon_get(void *data, if (!strcmp(part, "elm.swallow.icon")) { -ICON_STANDARD_ADD(obj, icon, true, "file"); - } - if ((group->main_group != NULL) && (!strcmp(part, "elm.swallow.end"))) - { -IMAGE_ADD_NEW(obj, icon, "icon", "alias_link"); +if (group->main_group == NULL) + { + ICON_STANDARD_ADD(obj, icon, true, "file") + } +else + { + IMAGE_ADD_NEW(obj, icon, "icon", "alias_link"); + } } return icon; } --
[EGIT] [tools/eflete] master 08/14: gengrid.edc: update the group_index style, make it more light
rimmed pushed a commit to branch master. http://git.enlightenment.org/tools/eflete.git/commit/?id=291c4e070bc40e04f9460fa875861c8f09da71e9 commit 291c4e070bc40e04f9460fa875861c8f09da71e9 Author: Vyacheslav ReutskiyDate: Mon Feb 8 15:57:16 2016 +0200 gengrid.edc: update the group_index style, make it more light Change-Id: I9d2c035a00e3b1a885b001a3ba6cfce22d526dda --- .../default/images/group_index_decoration.png | Bin 132 -> 0 bytes data/themes/default/widgets/gengrid.edc| 110 ++--- src/bin/ui/sound_manager.c | 6 +- 3 files changed, 31 insertions(+), 85 deletions(-) diff --git a/data/themes/default/images/group_index_decoration.png b/data/themes/default/images/group_index_decoration.png deleted file mode 100644 index 9e80b6f..000 Binary files a/data/themes/default/images/group_index_decoration.png and /dev/null differ diff --git a/data/themes/default/widgets/gengrid.edc b/data/themes/default/widgets/gengrid.edc index 1090f85..7ab93b4 100644 --- a/data/themes/default/widgets/gengrid.edc +++ b/data/themes/default/widgets/gengrid.edc @@ -388,115 +388,61 @@ group { name: "elm/gengrid/item/sound_editor/default"; #undef SOUND_EDITOR_HIGHLIGHT_COLOR #undef BORDER_PADDING -#define GROUP_INDEX_H 25 -#define GROUP_INDEX_COLOR 9 130 194 255 -#define GROUP_INDEX_BG_COLOR 48 48 48 180 - -group { "elm/gengrid/item/group_index/default"; - images.image: "group_index_decoration.png" COMP; - data.item: "texts" "elm.text"; +group { name: "elm/gengrid/item/group_index/default"; + data { + item: "texts" "elm.text"; + } parts { - part { name: "left_spacer"; - type: SPACER; - description { state: "default" 0.0; -SET_SIZE(4, GROUP_INDEX_H); -align: 0.0 0.0; - } - } - part { name: "right_spacer"; - type: SPACER; - description { state: "default" 0.0; -SET_SIZE(4, GROUP_INDEX_H); -align: 1.0 1.0; - } - } - part { name: "base_bar"; + part { name: "line_left"; type: RECT; description { state: "default" 0.0; -color: GROUP_INDEX_BG_COLOR; -min: 5 GROUP_INDEX_H; -rel1 { - relative: 1.0 0.0; - to: "left_spacer"; -} -rel2 { - relative: 0.0 1.0; - to: "right_spacer"; -} - } - } - part { name: "left_deco"; - description { state: "default" 0.0; -color: GROUP_INDEX_COLOR; -image.normal: "group_index_decoration.png"; align: 0.0 0.5; -SET_SIZE(GROUP_INDEX_H, 2); -rel1.to: "base_bar"; -rel2.to: "base_bar"; - } - } - part { name: "left_text_spacer"; - type: SPACER; - description { state: "default" 0.0; -align: 0.0 0.0; -SET_SIZE(5, 2); +min: 25 2; +max: 25 2; +color_class: "select"; rel1 { - relative: 1.0 0.0; - to: "left_deco"; + offset: 3 0; } } } part { name: "elm.text"; - type: TEXTBLOCK; - scale: 1; + type: TEXT; description { state: "default" 0.0; -color: GROUP_INDEX_COLOR; align: 0.0 0.5; -max: 70 20; -text { - align: 0.0 0.5; - style: "eflete_header_textblock_style"; - max: 1 1; -} +color_class: "select"; rel1 { - to_x: "left_text_spacer"; relative: 1.0 0.0; + offset: 3 0; + to_x: "line_left"; } - } - } - part { name: "right_text_spacer"; - type: SPACER; - description { state: "default" 0.0; -align: 0.0 0.0; -SET_SIZE(5, 2); -rel1 { - relative: 1.0 0.0; - to: "elm.text"; +text { + font: "PT:style=bold"; + size: 16; + min: 1 1; + max: 1 1; + elipsis: -1; } } } - - part { name: "right_deco"; + part { name: "line_right"; + type: RECT; description { state: "default" 0.0; -color: GROUP_INDEX_COLOR; -image.normal: "group_index_decoration.png"; -align: 1.0 0.5; -min: GROUP_INDEX_H 2; +min: 0 2; max: -1 2; +color_class: "select"; rel1 { - to_x: "right_text_spacer"; relative: 1.0 0.0; + offset: 3 0; + to_x: "elm.text"; +} +rel2 { + offset: -4 -1; } -rel2.to: "base_bar"; } }
[EGIT] [tools/eflete] master 05/14: image.edc: update 'attention' image
rimmed pushed a commit to branch master. http://git.enlightenment.org/tools/eflete.git/commit/?id=1b6ed31daa2fb33778e93f7b9b15b36431733875 commit 1b6ed31daa2fb33778e93f7b9b15b36431733875 Author: Vyacheslav ReutskiyDate: Mon Feb 8 14:49:47 2016 +0200 image.edc: update 'attention' image Change-Id: Ic214f9c40a87741660f31ee1be1926ecae9aa490 --- data/themes/default/images/attention.png | Bin 3670 -> 3360 bytes data/themes/default/widgets/image.edc| 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/data/themes/default/images/attention.png b/data/themes/default/images/attention.png index 2ab17bc..485fea3 100644 Binary files a/data/themes/default/images/attention.png and b/data/themes/default/images/attention.png differ diff --git a/data/themes/default/widgets/image.edc b/data/themes/default/widgets/image.edc index 6de5c78..b6d8bce 100644 --- a/data/themes/default/widgets/image.edc +++ b/data/themes/default/widgets/image.edc @@ -29,7 +29,7 @@ IM("icon", "proxy", "icon-proxy.png", 12 11, 0 0 0 0,SC IM("icon", "table", "icon-table.png", 12 11, 0 0 0 0, SCALE, SOLID) IM("icon", "box", "icon-box.png",12 11, 0 0 0 0, SCALE, SOLID) IM("icon", "external","icon-external.png", 12 11, 0 0 0 0, SCALE, SOLID) -IM("icon", "attention", "attention.png", 24 24, 0 0 0 0, SCALE, SOLID) +IM("icon", "attention", "attention.png", 16 16, 0 0 0 0, SCALE, SOLID) IM("icon", "alias_link", "icon-alias_link.png", 16 16, 0 0 0 0, SCALE, SOLID) IM("icon", "separate","icon-separate.png", 16 16, 0 0 0 0, SCALE, SOLID) --
[EGIT] [tools/eflete] master 12/14: history_ui: fix wrong item states when change is made while history is open
rimmed pushed a commit to branch master. http://git.enlightenment.org/tools/eflete.git/commit/?id=96558f63e4d149aeb6f8a370598fca09d512a62a commit 96558f63e4d149aeb6f8a370598fca09d512a62a Author: Andrii KroitorDate: Mon Feb 8 14:43:09 2016 +0200 history_ui: fix wrong item states when change is made while history is open --- src/bin/ui/history_ui.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bin/ui/history_ui.c b/src/bin/ui/history_ui.c index ff04b81..b0f8509 100644 --- a/src/bin/ui/history_ui.c +++ b/src/bin/ui/history_ui.c @@ -139,6 +139,8 @@ _on_change_added(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *ei) _item_selected, NULL); + /* unselect active item */ + elm_genlist_item_fields_update(hd.active_item, "unselected", ELM_GENLIST_ITEM_FIELD_STATE); /* making item active before selection allows to skip callback */ hd.active_item = glit; elm_genlist_item_selected_set(glit, true); --
[EGIT] [tools/eflete] master 13/14: history_ui: optimize genlist callbacks
rimmed pushed a commit to branch master. http://git.enlightenment.org/tools/eflete.git/commit/?id=e9e52c4b769ca97b6d0952e4242a127907b38905 commit e9e52c4b769ca97b6d0952e4242a127907b38905 Author: Andrii KroitorDate: Mon Feb 8 15:34:10 2016 +0200 history_ui: optimize genlist callbacks --- src/bin/ui/history_ui.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bin/ui/history_ui.c b/src/bin/ui/history_ui.c index b0f8509..61aa58b 100644 --- a/src/bin/ui/history_ui.c +++ b/src/bin/ui/history_ui.c @@ -91,6 +91,7 @@ _item_selected(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *ei) TODO("Add error handling here"); abort(); } + elm_genlist_item_fields_update(hd.active_item, "reverted", ELM_GENLIST_ITEM_FIELD_STATE); hd.active_item = elm_genlist_item_prev_get(hd.active_item); } } @@ -105,12 +106,13 @@ _item_selected(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *ei) TODO("Add error handling here"); abort(); } + elm_genlist_item_fields_update(hd.active_item, "unselected", ELM_GENLIST_ITEM_FIELD_STATE); hd.active_item = (hd.active_item != NULL)? elm_genlist_item_next_get(hd.active_item): elm_genlist_first_item_get(hd.genlist); } } - elm_genlist_realized_items_update(hd.genlist); + elm_genlist_item_fields_update(hd.active_item, "selected", ELM_GENLIST_ITEM_FIELD_STATE); TODO("Add update workspace callback here"); evas_object_smart_callback_call(ap.win, SIGNAL_PROPERTY_ATTRIBUTE_CHANGED, NULL); @@ -235,6 +237,7 @@ history_ui_add(void) hd.genlist = elm_genlist_add(hd.layout); elm_genlist_mode_set(hd.genlist, ELM_LIST_COMPRESS); + elm_genlist_homogeneous_set(hd.genlist, true); hd.btn_clean = elm_button_add(hd.layout); ICON_STANDARD_ADD(hd.btn_clean, ic, true, "delete"); --
[EGIT] [tools/eflete] master 02/14: icon.edc: add icons 'text_style' and 'text_style_tag'
rimmed pushed a commit to branch master. http://git.enlightenment.org/tools/eflete.git/commit/?id=c38d1ad4dc30bc4c6547d0e3dd93015c8b5e4494 commit c38d1ad4dc30bc4c6547d0e3dd93015c8b5e4494 Author: Vyacheslav ReutskiyDate: Mon Feb 8 10:52:50 2016 +0200 icon.edc: add icons 'text_style' and 'text_style_tag' Change-Id: I342aa893b513a5ec4e7c30cc0a862f70575af4fa --- data/themes/default/images/icon_text_style.png | Bin 0 -> 4371 bytes data/themes/default/images/icon_text_style_tag.png | Bin 0 -> 4738 bytes data/themes/default/widgets/icon.edc | 81 +++-- 3 files changed, 42 insertions(+), 39 deletions(-) diff --git a/data/themes/default/images/icon_text_style.png b/data/themes/default/images/icon_text_style.png new file mode 100644 index 000..8195488 Binary files /dev/null and b/data/themes/default/images/icon_text_style.png differ diff --git a/data/themes/default/images/icon_text_style_tag.png b/data/themes/default/images/icon_text_style_tag.png new file mode 100644 index 000..0823bda Binary files /dev/null and b/data/themes/default/images/icon_text_style_tag.png differ diff --git a/data/themes/default/widgets/icon.edc b/data/themes/default/widgets/icon.edc index 8171cac..df11f3a 100644 --- a/data/themes/default/widgets/icon.edc +++ b/data/themes/default/widgets/icon.edc @@ -4,47 +4,50 @@ images.image: File COMP; parts { part { name: "base"; \ description { aspect: 1.0 1.0; aspect_preference: BOTH; \ image.normal: File; } } } } -IC("arrow_up","toolbar/arrow_up","menu/arrow_up", "icon_arrow_up.png",14, 0); -IC("arrow_down", "toolbar/arrow_down", "menu/arrow_down", "icon_arrow_down.png", 14, 0); -IC("arrow_left", "toolbar/arrow_left", "menu/arrow_left", "icon_arrow_left.png", 14, 0); -IC("arrow_right", "toolbar/arrow_right", "menu/arrow_right", "icon_arrow_right.png", 14, 0); -IC("home","toolbar/home","menu/home","icon_home.png", 14, 0); -IC("image2", "toolbar/image2", "menu/image2", "icon_image2.png", 14, 0); -IC("sound2", "toolbar/sound2", "menu/sound2", "icon_sound2.png", 14, 0); -IC("text2", "toolbar/text2", "menu/text2", "icon_text2.png", 14, 0); -IC("close", "toolbar/close", "menu/close", "icon_close.png", 14, 0); -IC("apps","toolbar/apps","menu/apps","icon_apps.png", 14, 0); -IC("chat","toolbar/chat","menu/chat","icon_chat.png", 14, 0); -IC("clock", "toolbar/clock", "menu/clock", "icon_clock.png", 14, 0); -IC("delete", "toolbar/delete", "menu/delete", "icon_delete.png", 14, 0); -IC("edit","toolbar/edit","menu/edit","icon_edit.png", 14, 0); -IC("refresh", "toolbar/refresh", "menu/refresh", "icon_refresh.png", 14, 0); -IC("folder", "toolbar/folder", "menu/folder", "icon_folder.png", 14, 0); -IC("file","toolbar/file","menu/file","icon_file.png", 14, 0); -IC("save","toolbar/save","menu/save","icon_save.png", 14, 0); -IC("search", "toolbar/search", "menu/search", "icon_search.png", 14, 0); -IC("plus","toolbar/plus","menu/plus","icon_plus.png", 14, 0); -IC("minus", "toolbar/minus", "menu/minus", "icon_minus.png", 14, 0); -IC("animator","toolbar/animator","menu/animator", "icon_animator.png",14, 0); -IC("image", "toolbar/image", "menu/image", "icon_image.png", 14, 0); -IC("sound", "toolbar/sound", "menu/sound", "icon_sound.png", 14, 0); -IC("color", "toolbar/color", "menu/color", "icon_color.png", 14, 0); -IC("text","toolbar/text","menu/text","icon_text.png", 14, 0); -IC("info","toolbar/info","menu/info","icon_info.png", 14, 0); -IC("eye", "toolbar/eye", "menu/eye", "icon_eye.png", 14, 0); +IC("arrow_up", "toolbar/arrow_up", "menu/arrow_up", "icon_arrow_up.png", 14, 0); +IC("arrow_down","toolbar/arrow_down", "menu/arrow_down", "icon_arrow_down.png", 14, 0); +IC("arrow_left","toolbar/arrow_left", "menu/arrow_left", "icon_arrow_left.png", 14, 0); +IC("arrow_right", "toolbar/arrow_right", "menu/arrow_right", "icon_arrow_right.png",14, 0); +IC("home", "toolbar/home", "menu/home", "icon_home.png", 14, 0); +IC("image2","toolbar/image2", "menu/image2", "icon_image2.png", 14, 0); +IC("sound2","toolbar/sound2", "menu/sound2",
[EGIT] [tools/eflete] master 07/14: genlist.edc: delete elm.swallow.penult swallow as unused
rimmed pushed a commit to branch master. http://git.enlightenment.org/tools/eflete.git/commit/?id=902648a3430c1fcb1c9360223c83df50d5149630 commit 902648a3430c1fcb1c9360223c83df50d5149630 Author: Vyacheslav ReutskiyDate: Mon Feb 8 15:09:31 2016 +0200 genlist.edc: delete elm.swallow.penult swallow as unused Change-Id: Ib340f5d1168dba352810370f6fcd96d853d7b2e1 --- data/themes/default/widgets/genlist.edc | 130 ++-- 1 file changed, 72 insertions(+), 58 deletions(-) diff --git a/data/themes/default/widgets/genlist.edc b/data/themes/default/widgets/genlist.edc index a7a9536..bf68040 100644 --- a/data/themes/default/widgets/genlist.edc +++ b/data/themes/default/widgets/genlist.edc @@ -11,7 +11,7 @@ group { name: "elm/genlist/item/default/default"; data { item: "texts" "elm.text"; item: "treesize" "20"; - item: "contents" "elm.swallow.icon elm.swallow.end elm.swallow.penult"; + item: "contents" "elm.swallow.icon elm.swallow.end"; item: "stacking" "above"; item: "selectraise" "on"; } @@ -101,7 +101,7 @@ group { name: "elm/genlist/item/default/default"; rel2 { relative: 0.0 1.0; offset: -7 -1; - to_x: "elm.swallow.penult"; + to_x: "elm.swallow.end"; } text { font: "PT"; @@ -114,26 +114,6 @@ group { name: "elm/genlist/item/default/default"; visible: 0; } } - part { name: "elm.swallow.penult"; - type: SWALLOW; - description { state: "default" 0.0; -align: 1.0 0.5; -aspect: 1.0 1.0; -aspect_preference: VERTICAL; -rel1 { - offset: 0 3; -} -rel2 { - relative: 0.0 1.0; - offset: -7 -4; - to_x: "elm.swallow.end"; -} - } - description { state: "hide" 0.0; -inherit: "default"; -visible: 0; - } - } part { name: "elm.swallow.end"; type: SWALLOW; repeat_events: 1; @@ -196,7 +176,6 @@ group { name: "elm/genlist/item/default/default"; target: "elm.swallow.icon"; target: "elm.swallow.pad"; target: "elm.text"; - target: "elm.swallow.penult"; target: "elm.swallow.end"; target: "disclip"; } @@ -361,7 +340,7 @@ group { name: "elm/genlist/tree/default/default"; data { item: "texts" "elm.text"; item: "treesize" "20"; - item: "contents" "elm.swallow.icon elm.swallow.end elm.swallow.penult"; + item: "contents" "elm.swallow.icon elm.swallow.end"; item: "stacking" "above"; item: "selectraise" "on"; } @@ -396,8 +375,11 @@ group { name: "elm/genlist/tree/default/default"; color: 68 68 68 255; } description { state: "hide" 0.0; -inherit: "default"; visible: 0; +align: 0.5 1.0; +min: 0 1; +max: -1 1; +color: 68 68 68 255; } } part { name: "elm.swallow.icon"; @@ -414,14 +396,27 @@ group { name: "elm/genlist/tree/default/default"; to_x: "arrow"; } rel2 { - to_x: "arrow"; relative: 0.0 1.0; offset: -1 -4; + to_x: "arrow"; } } description { state: "hide" 0.0; -inherit: "default"; visible: 0; +align: 0.0 0.5; +min: 14 14; +aspect: 1.0 1.0; +aspect_preference: VERTICAL; +rel1 { + relative: 1.0 0.0; + offset: 6 3; + to_x: "arrow"; +} +rel2 { + relative: 0.0 1.0; + offset: -1 -4; + to_x: "arrow"; +} } } part { name: "elm.swallow.pad"; @@ -433,8 +428,11 @@ group { name: "elm/genlist/tree/default/default"; } } description { state: "hide" 0.0; -inherit: "default"; visible: 0; +align: 0.0 0.5; +rel2 { + relative: 0.0 1.0; +} } } part { name: "elm.text"; @@ -451,7 +449,7 @@ group { name: "elm/genlist/tree/default/default"; rel2 { relative: 0.0 1.0; offset: -7 -1; - to_x: "elm.swallow.penult"; + to_x: "elm.swallow.end"; } text { font: "PT"; @@ -460,31 +458,41 @@ group { name: "elm/genlist/tree/default/default"; } } description { state: "hide" 0.0; -inherit: "default"; visible: 0; +min: 0 26; +color_class: "main"; +rel1 { +
[EGIT] [tools/eflete] master 09/14: gengrid.edc: update the sound_editor/default item accordigly to guideline
rimmed pushed a commit to branch master. http://git.enlightenment.org/tools/eflete.git/commit/?id=05fee4d6c57295e6e4cdd61c1b52b0aa007ffc43 commit 05fee4d6c57295e6e4cdd61c1b52b0aa007ffc43 Author: Vyacheslav ReutskiyDate: Mon Feb 8 16:28:31 2016 +0200 gengrid.edc: update the sound_editor/default item accordigly to guideline Change-Id: Iff13600fe03713a5c77bdc2963e3da605aac60c8 --- data/themes/default/widgets/gengrid.edc | 214 ++-- 1 file changed, 90 insertions(+), 124 deletions(-) diff --git a/data/themes/default/widgets/gengrid.edc b/data/themes/default/widgets/gengrid.edc index 7ab93b4..26a43b3 100644 --- a/data/themes/default/widgets/gengrid.edc +++ b/data/themes/default/widgets/gengrid.edc @@ -209,72 +209,68 @@ } } -#define SOUND_EDITOR_BG_COLOR 17 70 98 255 -#define SOUND_EDITOR_HIGHLIGHT_COLOR 6 130 134 255 group { name: "elm/gengrid/item/sound_editor/default"; - data.item: "contents" "elm.swallow.icon"; - data.item: "texts" "elm.text elm.text.type"; - images { - image: "border_1.png" COMP; + data { + item: "texts" "elm.text elm.text.type"; + item: "contents" "elm.swallow.icon"; } parts { - part { name: "padding.up"; - type: SPACER; - description { state: "default" 0.0; -align: 0.0 0.0; -min: 2 2; -max: 2 2; - } - } - part { name: "padding.bottom"; - type: SPACER; - description { state: "default" 0.0; -align: 1.0 1.0; -min: 2 2; -max: 2 2; - } - } part { name: "bg"; - clip_to: "clipper"; type: RECT; description { state: "default" 0.0; -color: SOUND_EDITOR_BG_COLOR; +color_class: "select_dark"; rel1 { - relative: 1.0 1.0; - to: "padding.up"; + offset: 3 3; } rel2 { - relative: 0.0 0.0; - to_x: "padding.bottom"; + relative: 1.0 0.0; + offset: -4 -4; to_y: "elm.text"; } } } - part { name: "elm.text.type"; - clip_to: "clipper"; - type: TEXT; - mouse_events: 0; - scale: 1; + part { name: "highlight_content"; + type: RECT; description { state: "default" 0.0; -color: FN_COL_LIGHT_GREY; -rel1.to: "bg"; -rel2.to: "bg"; -text { - font: FN; - elipsis: -1; - size: 25; - min: 1 1; +visible: 0; +color_class: "select"; +rel1 { + to: "bg"; +} +rel2 { + to: "bg"; +} + } + description { state: "selected" 0.0; +color_class: "select"; +rel1 { + to: "bg"; +} +rel2 { + to: "bg"; } } } - part { name: "elm.swallow.icon"; - clip_to: "clipper"; - repeat_events: 1; - type: SWALLOW; + part { name: "highlight_text"; + type: RECT; description { state: "default" 0.0; -fixed: 1 0; -rel1.to: "bg"; -rel2.to: "bg"; +visible: 0; +color_class: "select"; +rel1 { + to: "elm.text"; +} +rel2 { + to: "elm.text"; +} + } + description { state: "selected" 0.0; +color_class: "select"; +rel1 { + to: "elm.text"; +} +rel2 { + to: "elm.text"; +} } } part { name: "elm.text"; @@ -283,111 +279,81 @@ group { name: "elm/gengrid/item/sound_editor/default"; scale: 1; description { state: "default" 0.0; align: 1.0 1.0; -color: FN_COL_LIGHT_GREY; +color_class: "main"; +color3: 255 255 255 25; rel1 { - relative: 1.0 0.0; - to_x: "padding.up"; + offset: 3 0; } rel2 { - relative: 0.0 1.0; - to_x: "padding.bottom"; + offset: -4 -4; } text { - font: FN; + text: ""; + font: "PT"; size: 11; min: 0 1; max: 0 1; align: 0.5 1.0; } } - description { state: "selected" 0.0; -inherit: "default" 0.0; -color: FN_COL_DEFAULT; - } } - part { name: "border"; - type:IMAGE; + part { name: "elm.swallow.icon"; + type: SWALLOW; + repeat_events: 1; description { state:
[EGIT] [tools/eflete] master 11/14: shortcuts: implement hisoty undo/redo
rimmed pushed a commit to branch master. http://git.enlightenment.org/tools/eflete.git/commit/?id=1bfdec3f65add84f445dfcd8fff7cd62c68426fe commit 1bfdec3f65add84f445dfcd8fff7cd62c68426fe Author: Andrii KroitorDate: Mon Feb 8 14:36:03 2016 +0200 shortcuts: implement hisoty undo/redo Add undo and redo to Ctrl+x and Ctrl+y keys binding. --- src/bin/common/signals.h | 15 +++ src/bin/ui/history_ui.c | 36 src/bin/ui/shortcuts/shortcuts.c | 16 ++-- 3 files changed, 57 insertions(+), 10 deletions(-) diff --git a/src/bin/common/signals.h b/src/bin/common/signals.h index 85aa3ee..b0db11e 100644 --- a/src/bin/common/signals.h +++ b/src/bin/common/signals.h @@ -441,4 +441,19 @@ typedef struct { */ #define SIGNAL_DEMO_SIGNAL_SEND "SIGNAL_DEMO_SIGNAL_SEND" +/** + * emited when undo shortcut is pressed. + * eventinfo - NULL. + * + * @ingroup Window + */ +#define SIGNAL_SHORTCUT_UNDO "SIGNAL_SHORTCUT_UNDO" +/** + * emited redo shortcut is pressed. + * eventinfo - NULL. + * + * @ingroup Window + */ +#define SIGNAL_SHORTCUT_REDO "SIGNAL_SHORTCUT_REDO" + #endif /* SIGNALS_H*/ diff --git a/src/bin/ui/history_ui.c b/src/bin/ui/history_ui.c index 44611e7..ff04b81 100644 --- a/src/bin/ui/history_ui.c +++ b/src/bin/ui/history_ui.c @@ -180,6 +180,40 @@ _history_set(void *data __UNUSED__, } } +static void +_undo_shortcut(void *data __UNUSED__, + Evas_Object *obj __UNUSED__, + void * ei __UNUSED__) +{ + Elm_Genlist_Item *glit; + + if (!hd.history) + return; + + assert(hd.active_item != NULL); + + glit = elm_genlist_item_prev_get(hd.active_item); + if (glit) + elm_genlist_item_selected_set(glit, true); +} + +static void +_redo_shortcut(void *data __UNUSED__, + Evas_Object *obj __UNUSED__, + void * ei __UNUSED__) +{ + Elm_Genlist_Item *glit; + + if (!hd.history) + return; + + assert(hd.active_item != NULL); + + glit = elm_genlist_item_next_get(hd.active_item); + if (glit) + elm_genlist_item_selected_set(glit, true); +} + Evas_Object * history_ui_add(void) { @@ -212,6 +246,8 @@ history_ui_add(void) evas_object_smart_callback_add(ap.win, SIGNAL_HISTORY_CHANGE_ADDED, _on_change_added, NULL); evas_object_smart_callback_add(ap.win, SIGNAL_TAB_CHANGED, _history_set, NULL); + evas_object_smart_callback_add(ap.win, SIGNAL_SHORTCUT_UNDO, _undo_shortcut, NULL); + evas_object_smart_callback_add(ap.win, SIGNAL_SHORTCUT_REDO, _redo_shortcut, NULL); TODO("Add clean-up callbacks here") return hd.layout; diff --git a/src/bin/ui/shortcuts/shortcuts.c b/src/bin/ui/shortcuts/shortcuts.c index 4d05400..b338a04 100644 --- a/src/bin/ui/shortcuts/shortcuts.c +++ b/src/bin/ui/shortcuts/shortcuts.c @@ -559,22 +559,18 @@ static Eina_Bool _undo_cb(void) { SKIP_IN_ENVENTOR_MODE -/* if ((ap.project) && (ap.project->current_style)) - history_undo(ap.project->current_style->obj, 1); - return true;*/ - return false; - TODO("Implement undo shortcut"); + + evas_object_smart_callback_call(ap.win, SIGNAL_SHORTCUT_UNDO, NULL); + return true; } static Eina_Bool _redo_cb(void) { SKIP_IN_ENVENTOR_MODE -/* if ((ap.project) && (ap.project->current_style)) - history_redo(ap.project->current_style->obj, 1); - return true;*/ - return false; - TODO("Implement redo shortcut"); + + evas_object_smart_callback_call(ap.win, SIGNAL_SHORTCUT_REDO, NULL); + return true; } /**/ --
[EGIT] [bindings/python/python-efl] master 01/01: Fix 2 examples to work with py2
davemds pushed a commit to branch master. http://git.enlightenment.org/bindings/python/python-efl.git/commit/?id=fea03a787c706f5d179910e0b06b4c95ed84ff67 commit fea03a787c706f5d179910e0b06b4c95ed84ff67 Author: Dave AndreoliDate: Mon Feb 8 19:42:22 2016 +0100 Fix 2 examples to work with py2 --- examples/elementary/test_combobox.py | 15 ++- examples/elementary/test_genlist_filter.py | 4 +++- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/examples/elementary/test_combobox.py b/examples/elementary/test_combobox.py index 632e92e..97b5d53 100644 --- a/examples/elementary/test_combobox.py +++ b/examples/elementary/test_combobox.py @@ -40,6 +40,11 @@ def combobox_item_pressed_cb(cbox, item): def combobox_changed_cb(cbox): cbox.filter = cbox.text +def generic_obj_cb(cbox, event_name): +print("EV", event_name, cbox) + +def generic_item_cb(cbox, item, event_name): +print("EV", event_name, item) def combobox_clicked(obj): win = StandardWindow("combobox", "Combobox", autodel=True, size=(320, 500)) @@ -57,10 +62,10 @@ def combobox_clicked(obj): size_hint_fill=FILL_HORIZ) cbox1.part_text_set("guide", "A short list (with callbacks attached)") cbox1.callback_item_pressed_add(combobox_item_pressed_cb) -cbox1.callback_dismissed_add(lambda cbox: print("DISMISSED", cbox)) -cbox1.callback_expanded_add(lambda cbox: print("EXPANDED", cbox)) -cbox1.callback_clicked_add(lambda cbox: print("CLICKED", cbox)) -cbox1.callback_item_selected_add(lambda cbox, item: print("ITEM,SELECTED", item)) +cbox1.callback_dismissed_add(generic_obj_cb, "DISMISSED") +cbox1.callback_expanded_add(generic_obj_cb, "EXPANDED") +cbox1.callback_clicked_add(generic_obj_cb, "CLICKED") +cbox1.callback_item_selected_add(generic_item_cb, "ITEM,SELECTED") for i in range(1, 7): cbox1.item_append(itc, "Item # %d" % i) @@ -73,7 +78,7 @@ def combobox_clicked(obj): cbox2.part_text_set("guide", "A long list (with item filtering)") cbox2.callback_item_pressed_add(combobox_item_pressed_cb) cbox2.callback_changed_add(combobox_changed_cb) -cbox2.callback_filter_done_add(lambda cbox: print("FILTER,DONE", cbox)) +cbox2.callback_filter_done_add(generic_obj_cb, "FILTER,DONE") for i in range(1, 1001): cbox2.item_append(itc, "Item # %d" % i) diff --git a/examples/elementary/test_genlist_filter.py b/examples/elementary/test_genlist_filter.py index 7b35491..ff69149 100644 --- a/examples/elementary/test_genlist_filter.py +++ b/examples/elementary/test_genlist_filter.py @@ -37,6 +37,8 @@ def gl_filter_get(obj, key, item_data): def entry_changed_cb(en, gl): gl.filter = en.text or None +def filter_done_cb(gl): +print("filter,done") def test_genlist_filter(parent): win = StandardWindow("genlist-filter", "Genlist Filter", autodel=True, @@ -52,7 +54,7 @@ def test_genlist_filter(parent): gl = Genlist(win, mode=elm.ELM_LIST_COMPRESS, homogeneous=True, select_mode=elm.ELM_OBJECT_SELECT_MODE_ALWAYS, size_hint_expand=EXPAND_BOTH, size_hint_fill=FILL_BOTH) -gl.callback_filter_done_add(lambda g: print("filter,done")) +gl.callback_filter_done_add(filter_done_cb) gl.show() box.pack_end(gl) --
[EGIT] [core/enlightenment] master 03/03: add flag for zone obstacles to indicate verticality
discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=e8b8fe83105beba45a92659f766d159df0acc579 commit e8b8fe83105beba45a92659f766d159df0acc579 Author: Mike BlumenkrantzDate: Mon Feb 8 14:05:35 2016 -0500 add flag for zone obstacles to indicate verticality I added a lower quality and less precise workaround for this before since I didn't have enough test cases to think of something which would be suffiently good to handle all cases. as a result, initial calculations for obstacles would incorrectly detect horizontally-oriented obstacles as being vertical, causing inconsistencies in window placement. this would become even more severe if the obstacle never resized itself, erroneously modifying window placement to position around obstacles which did not exist having a hint on the obstacle to indicate a direction is sufficient for most cases, specifically zone useful geometry calcs, where obstacles are expanded to cover the entire screen on which they reside and must expand accurately based on the orientation of the obstacle ref 10c43efc831edf771e198604ed5fffbe25c2fb5c --- src/bin/e_shelf.c | 41 ++--- src/bin/e_zone.c | 18 ++ src/bin/e_zone.h | 5 +++-- 3 files changed, 51 insertions(+), 13 deletions(-) diff --git a/src/bin/e_shelf.c b/src/bin/e_shelf.c index 41a021f..90bc0f4 100644 --- a/src/bin/e_shelf.c +++ b/src/bin/e_shelf.c @@ -84,6 +84,39 @@ E_API int E_EVENT_SHELF_ADD = -1; E_API int E_EVENT_SHELF_DEL = -1; static Eina_List *handlers; +static inline Eina_Bool +_e_shelf_is_horizontal(const E_Shelf *es) +{ + Eina_Bool horiz = EINA_FALSE; + switch (es->gadcon->orient) + { + case E_GADCON_ORIENT_FLOAT: + case E_GADCON_ORIENT_HORIZ: + case E_GADCON_ORIENT_TOP: + case E_GADCON_ORIENT_BOTTOM: + case E_GADCON_ORIENT_CORNER_TL: + case E_GADCON_ORIENT_CORNER_TR: + case E_GADCON_ORIENT_CORNER_BL: + case E_GADCON_ORIENT_CORNER_BR: +horiz = 1; +break; + + case E_GADCON_ORIENT_VERT: + case E_GADCON_ORIENT_LEFT: + case E_GADCON_ORIENT_RIGHT: + case E_GADCON_ORIENT_CORNER_LT: + case E_GADCON_ORIENT_CORNER_RT: + case E_GADCON_ORIENT_CORNER_LB: + case E_GADCON_ORIENT_CORNER_RB: +horiz = 0; +break; + + default: +break; + } + return horiz; +} + static void _e_shelf_remaximize(E_Shelf *es) { @@ -109,7 +142,7 @@ _e_shelf_obstacles_update(E_Shelf *es) E_Zone_Obstacle *obs; EINA_LIST_FOREACH(es->zone_obstacles, l, obs) - e_zone_obstacle_modify(obs, &(Eina_Rectangle){es->x, es->y, es->w, es->h}); + e_zone_obstacle_modify(obs, &(Eina_Rectangle){es->x, es->y, es->w, es->h}, !_e_shelf_is_horizontal(es)); } static Eina_Bool @@ -996,12 +1029,14 @@ e_shelf_obstacles_update(E_Shelf *es) desk = e_desk_at_xy_get(es->zone, sd->x, sd->y); if (!desk) continue; es->zone_obstacles = eina_list_append(es->zone_obstacles, - e_zone_obstacle_add(es->zone, desk, &(Eina_Rectangle){es->x, es->y, es->w, es->h})); + e_zone_obstacle_add(es->zone, desk, &(Eina_Rectangle){es->x, es->y, es->w, es->h}, + !_e_shelf_is_horizontal(es))); } } else es->zone_obstacles = eina_list_append(es->zone_obstacles, - e_zone_obstacle_add(es->zone, NULL, &(Eina_Rectangle){es->x, es->y, es->w, es->h})); + e_zone_obstacle_add(es->zone, NULL, &(Eina_Rectangle){es->x, es->y, es->w, es->h}, + !_e_shelf_is_horizontal(es))); } E_API E_Shelf * diff --git a/src/bin/e_zone.c b/src/bin/e_zone.c index 6c46822..ad16140 100644 --- a/src/bin/e_zone.c +++ b/src/bin/e_zone.c @@ -1239,10 +1239,10 @@ _e_zone_useful_geometry_calc(const E_Zone *zone, int dx, int dy, int *x, int *y, EINA_INLIST_FOREACH(zone->obstacles, obs) { if (!E_INTERSECTS(obs->x, obs->y, obs->w, obs->h, zx, zy, zw, zh)) continue; -if (obs->w >= obs->h) - eina_tiler_rect_del(tiler, &(Eina_Rectangle){0, obs->y - zy, zw, obs->h}); -else +if (obs->vertical) eina_tiler_rect_del(tiler, &(Eina_Rectangle){obs->x - zx, 0, obs->w, zh}); +else + eina_tiler_rect_del(tiler, &(Eina_Rectangle){0, obs->y - zy, zw, obs->h}); } desk = e_desk_at_xy_get(zone, dx, dy); if (desk) @@ -1250,10 +1250,10 @@ _e_zone_useful_geometry_calc(const E_Zone *zone, int dx, int dy, int *x, int *y, EINA_INLIST_FOREACH(desk->obstacles, obs) { if (!E_INTERSECTS(obs->x, obs->y, obs->w, obs->h, zx, zy, zw, zh)) continue; - if (obs->w >= obs->h) - eina_tiler_rect_del(tiler, &(Eina_Rectangle){0, obs->y - zy, zw, obs->h}); - else + if (obs->vertical)
[EGIT] [core/enlightenment] master 01/03: Revert "e - restart window positioning - fix it"
discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=493f6f595b525747852fcec36abf0aa613963683 commit 493f6f595b525747852fcec36abf0aa613963683 Author: Mike BlumenkrantzDate: Mon Feb 8 13:38:19 2016 -0500 Revert "e - restart window positioning - fix it" This reverts commit d0229b3652872b0324ec4671e7469d9a9904186b. see following patches --- src/bin/e.h | 1 - src/bin/e_client.c | 15 --- src/bin/e_comp_object.c | 11 ++- src/bin/e_main.c| 2 -- 4 files changed, 6 insertions(+), 23 deletions(-) diff --git a/src/bin/e.h b/src/bin/e.h index f181b07..6b7ea51 100644 --- a/src/bin/e.h +++ b/src/bin/e.h @@ -313,7 +313,6 @@ extern E_API Eina_Bool starting; extern E_API Eina_Bool stopping; extern E_API Eina_Bool restart; extern E_API Eina_Bool e_nopause; -extern E_API double e_main_loop_started; extern E_API Eina_Bool e_precache_end; extern E_API Eina_Bool x_fatal; diff --git a/src/bin/e_client.c b/src/bin/e_client.c index 3807910..c0678b9 100644 --- a/src/bin/e_client.c +++ b/src/bin/e_client.c @@ -1876,17 +1876,10 @@ _e_client_eval(E_Client *ec) } else if (!E_INSIDE(ec->x, ec->y, zx, zy, zw, zh)) { -// FIXME: this causes initial positioning of windows to be broken on restart - if (!((ecore_time_get() - e_main_loop_started) < 5.0)) - // if during the startup phase and inital event burst - // big nasty hack - assume 5 seconds ... then DONT do this - // because otherwise windows just shuffle into the center - { - /* If an ec is placed out of bound, fix it! */ - ec->x = zx + ((zw - ec->w) / 2); - ec->y = zy + ((zh - ec->h) / 2); - ec->changes.pos = 1; - } + /* If an ec is placed out of bound, fix it! */ + ec->x = zx + ((zw - ec->w) / 2); + ec->y = zy + ((zh - ec->h) / 2); + ec->changes.pos = 1; } /* Recreate state */ diff --git a/src/bin/e_comp_object.c b/src/bin/e_comp_object.c index fb3197c..06b6943 100644 --- a/src/bin/e_comp_object.c +++ b/src/bin/e_comp_object.c @@ -3286,15 +3286,8 @@ reshadow: _e_comp_smart_cb_frame_recalc(cw, cw->smart_obj, NULL); if ((cw->x == -1) && (cw->y == -1) && cw->ec->new_client && (!cw->ec->placed)) { -// FIXME: this causes windows to move up by a titlebar height each restart - if (!((ecore_time_get() - e_main_loop_started) < 5.0)) - // if during the startup phase and inital event burst - // big nasty hack - assume 5 seconds ... then DONT do this - // because every restart otherwise windows just shift up and up - { - cw->ec->x = MAX(cw->ec->zone->x, cw->ec->client.x - cw->client_inset.l); - cw->ec->y = MAX(cw->ec->zone->y, cw->ec->client.y - cw->client_inset.t); - } + cw->ec->x = MAX(cw->ec->zone->x, cw->ec->client.x - cw->client_inset.l); + cw->ec->y = MAX(cw->ec->zone->y, cw->ec->client.y - cw->client_inset.t); } /* this guarantees that we won't get blocked by the NOP check in the interceptor */ cw->y = cw->x = -9; diff --git a/src/bin/e_main.c b/src/bin/e_main.c index e1a80c8..772e119 100644 --- a/src/bin/e_main.c +++ b/src/bin/e_main.c @@ -111,7 +111,6 @@ E_API Eina_Bool starting = EINA_TRUE; E_API Eina_Bool stopping = EINA_FALSE; E_API Eina_Bool restart = EINA_FALSE; E_API Eina_Bool e_nopause = EINA_FALSE; -E_API double e_main_loop_started = 0.0; EINTERN const char *e_first_frame = NULL; EINTERN double e_first_frame_start_time = -1; @@ -1059,7 +1058,6 @@ main(int argc, char **argv) e_util_env_set("E_RESTART", "1"); TS("MAIN LOOP AT LAST"); - e_main_loop_started = ecore_time_get(); if (!setjmp(x_fatal_buff)) ecore_main_loop_begin(); else --
[EGIT] [core/enlightenment] master 02/03: do not perform special case position adjustment for re_manage clients
discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=7d3319e6ee8197eb0a7b4cfb18ba5b12d4f3c3ce commit 7d3319e6ee8197eb0a7b4cfb18ba5b12d4f3c3ce Author: Mike BlumenkrantzDate: Mon Feb 8 14:03:31 2016 -0500 do not perform special case position adjustment for re_manage clients this case is solely for handling clients which are created with nonzero position, eg. an x11 window trying to display itself centered upon initial creation. re_manage indicates a window which is re-managed after a restart of enlightenment, so these windows clearly do not fall into that case fixes an issue where windows would move up+left by the size of their frame during restart ref 95e133282ef0ae8942ae513449b31d9f7149c519 --- src/bin/e_comp_object.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bin/e_comp_object.c b/src/bin/e_comp_object.c index 06b6943..561ecbe 100644 --- a/src/bin/e_comp_object.c +++ b/src/bin/e_comp_object.c @@ -3284,7 +3284,8 @@ reshadow: do { _e_comp_smart_cb_frame_recalc(cw, cw->smart_obj, NULL); -if ((cw->x == -1) && (cw->y == -1) && cw->ec->new_client && (!cw->ec->placed)) +if ((cw->x == -1) && (cw->y == -1) && cw->ec->new_client && +(!cw->ec->placed) && (!cw->ec->re_manage)) { cw->ec->x = MAX(cw->ec->zone->x, cw->ec->client.x - cw->client_inset.l); cw->ec->y = MAX(cw->ec->zone->y, cw->ec->client.y - cw->client_inset.t); --
[EGIT] [bindings/python/python-efl] python-efl-1.17 01/01: Fix 2 examples to work with py2
davemds pushed a commit to branch python-efl-1.17. http://git.enlightenment.org/bindings/python/python-efl.git/commit/?id=d119b938638541db08c2cc7a84fbc53286b0a128 commit d119b938638541db08c2cc7a84fbc53286b0a128 Author: Dave AndreoliDate: Mon Feb 8 20:12:49 2016 +0100 Fix 2 examples to work with py2 (cherry picked from commit fea03a787c706f5d179910e0b06b4c95ed84ff67) --- examples/elementary/test_combobox.py | 15 ++- examples/elementary/test_genlist_filter.py | 4 +++- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/examples/elementary/test_combobox.py b/examples/elementary/test_combobox.py index 632e92e..97b5d53 100644 --- a/examples/elementary/test_combobox.py +++ b/examples/elementary/test_combobox.py @@ -40,6 +40,11 @@ def combobox_item_pressed_cb(cbox, item): def combobox_changed_cb(cbox): cbox.filter = cbox.text +def generic_obj_cb(cbox, event_name): +print("EV", event_name, cbox) + +def generic_item_cb(cbox, item, event_name): +print("EV", event_name, item) def combobox_clicked(obj): win = StandardWindow("combobox", "Combobox", autodel=True, size=(320, 500)) @@ -57,10 +62,10 @@ def combobox_clicked(obj): size_hint_fill=FILL_HORIZ) cbox1.part_text_set("guide", "A short list (with callbacks attached)") cbox1.callback_item_pressed_add(combobox_item_pressed_cb) -cbox1.callback_dismissed_add(lambda cbox: print("DISMISSED", cbox)) -cbox1.callback_expanded_add(lambda cbox: print("EXPANDED", cbox)) -cbox1.callback_clicked_add(lambda cbox: print("CLICKED", cbox)) -cbox1.callback_item_selected_add(lambda cbox, item: print("ITEM,SELECTED", item)) +cbox1.callback_dismissed_add(generic_obj_cb, "DISMISSED") +cbox1.callback_expanded_add(generic_obj_cb, "EXPANDED") +cbox1.callback_clicked_add(generic_obj_cb, "CLICKED") +cbox1.callback_item_selected_add(generic_item_cb, "ITEM,SELECTED") for i in range(1, 7): cbox1.item_append(itc, "Item # %d" % i) @@ -73,7 +78,7 @@ def combobox_clicked(obj): cbox2.part_text_set("guide", "A long list (with item filtering)") cbox2.callback_item_pressed_add(combobox_item_pressed_cb) cbox2.callback_changed_add(combobox_changed_cb) -cbox2.callback_filter_done_add(lambda cbox: print("FILTER,DONE", cbox)) +cbox2.callback_filter_done_add(generic_obj_cb, "FILTER,DONE") for i in range(1, 1001): cbox2.item_append(itc, "Item # %d" % i) diff --git a/examples/elementary/test_genlist_filter.py b/examples/elementary/test_genlist_filter.py index 7b35491..ff69149 100644 --- a/examples/elementary/test_genlist_filter.py +++ b/examples/elementary/test_genlist_filter.py @@ -37,6 +37,8 @@ def gl_filter_get(obj, key, item_data): def entry_changed_cb(en, gl): gl.filter = en.text or None +def filter_done_cb(gl): +print("filter,done") def test_genlist_filter(parent): win = StandardWindow("genlist-filter", "Genlist Filter", autodel=True, @@ -52,7 +54,7 @@ def test_genlist_filter(parent): gl = Genlist(win, mode=elm.ELM_LIST_COMPRESS, homogeneous=True, select_mode=elm.ELM_OBJECT_SELECT_MODE_ALWAYS, size_hint_expand=EXPAND_BOTH, size_hint_fill=FILL_BOTH) -gl.callback_filter_done_add(lambda g: print("filter,done")) +gl.callback_filter_done_add(filter_done_cb) gl.show() box.pack_end(gl) --
[EGIT] [tools/edi] master 02/02: Fix clang detection on Fedora.
ajwillia-ms pushed a commit to branch master. http://git.enlightenment.org/tools/edi.git/commit/?id=5a3769b082403d5935eb26dcf08b36d73b39223d commit 5a3769b082403d5935eb26dcf08b36d73b39223d Author: Andy WilliamsDate: Mon Feb 8 22:44:28 2016 + Fix clang detection on Fedora. Thanks zmike for the patch. --- configure.ac | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configure.ac b/configure.ac index d67f521..07a0680 100644 --- a/configure.ac +++ b/configure.ac @@ -122,6 +122,8 @@ EFL_TESTS([${build_tests}]) # Checks for library functions. if test "${have_clang}" = "yes"; then + ldflags="$LDFLAGS" + LDFLAGS+=" -L${libdir}/llvm" AC_CHECK_LIB([clang], [clang_Cursor_getArgument], [ AC_DEFINE([HAVE_LIBCLANG], [1], [Set to 1 if clang is found]) --
[EGIT] [tools/edi] master 01/02: Important bug fixes out in 1.17.0, let's require it across the board
ajwillia-ms pushed a commit to branch master. http://git.enlightenment.org/tools/edi.git/commit/?id=cc6121d2a8bfe6c009a20987dc3b418c9b8be987 commit cc6121d2a8bfe6c009a20987dc3b418c9b8be987 Author: Andy WilliamsDate: Fri Feb 5 17:31:54 2016 + Important bug fixes out in 1.17.0, let's require it across the board --- configure.ac | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index 54413b5..d67f521 100644 --- a/configure.ac +++ b/configure.ac @@ -60,13 +60,13 @@ EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"]) PKG_CHECK_MODULES([EFL], [ - eina >= 1.15.0 - evas >= 1.8.0 - ecore >= 1.8.0 - edje >= 1.8.0 - eo >= 1.16.0 - elementary >= 1.8.0 - eio >= 1.8.0 + eina >= 1.17.0 + evas >= 1.17.0 + ecore >= 1.17.0 + edje >= 1.17.0 + eo >= 1.17.0 + elementary >= 1.17.0 + eio >= 1.17.0 ]) # Check edje_cc --
[EGIT] [tools/edi] master 02/02: Update NEWS file for changes since 0.2
ajwillia-ms pushed a commit to branch master. http://git.enlightenment.org/tools/edi.git/commit/?id=a739951084dcb280f7bb656f95dd49c7889eff0f commit a739951084dcb280f7bb656f95dd49c7889eff0f Author: Andy WilliamsDate: Tue Feb 9 00:33:17 2016 + Update NEWS file for changes since 0.2 --- NEWS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/NEWS b/NEWS index aa7d723..e6c975d 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,12 @@ Edi 0.3 Features: * Option to inserts spaces instead of tabs + * Update to EFFL 1.17 release for better toolbar handling + +Bug fixes: + + * Focus input popups when they appear + * Support fish and other non-bash shells for build & test === --