Ephoto: Fix some incorrect thumb selection issues.

This commit is contained in:
Stephen Houston 2016-01-25 19:53:44 -06:00
parent 6c38b82f95
commit bcfd488e0f
3 changed files with 6 additions and 4 deletions

View File

@ -191,6 +191,7 @@ struct _Ephoto
Ephoto_State state, prev_state; Ephoto_State state, prev_state;
Ephoto_Config *config; Ephoto_Config *config;
Ephoto_Entry *thumb_entry;
}; };
struct _Ephoto_Entry struct _Ephoto_Entry

View File

@ -38,11 +38,10 @@ _ephoto_thumb_browser_show(Ephoto *ephoto, Ephoto_Entry *entry)
_ephoto_state_set(ephoto, EPHOTO_STATE_THUMB); _ephoto_state_set(ephoto, EPHOTO_STATE_THUMB);
ephoto_title_set(ephoto, ephoto->config->directory); ephoto_title_set(ephoto, ephoto->config->directory);
if (ephoto->thumb_entry)
elm_gengrid_item_selected_set(ephoto->thumb_entry->item, EINA_TRUE);
if ((entry) && (entry->item)) if ((entry) && (entry->item))
{ elm_gengrid_item_bring_in(entry->item, ELM_GENGRID_ITEM_SCROLLTO_IN);
elm_gengrid_item_selected_set(entry->item, EINA_TRUE);
elm_gengrid_item_bring_in(entry->item, ELM_GENGRID_ITEM_SCROLLTO_IN);
}
} }
static void static void
@ -58,6 +57,7 @@ _ephoto_single_browser_show(Ephoto *ephoto, Ephoto_Entry *entry)
ephoto_single_browser_entries_set(ephoto->single_browser, ephoto_single_browser_entries_set(ephoto->single_browser,
ephoto->entries); ephoto->entries);
ephoto->thumb_entry = entry;
ephoto_single_browser_entry_set(ephoto->single_browser, entry); ephoto_single_browser_entry_set(ephoto->single_browser, entry);
elm_naviframe_item_simple_promote(ephoto->pager, ephoto->single_browser); elm_naviframe_item_simple_promote(ephoto->pager, ephoto->single_browser);
elm_object_focus_set(ephoto->single_browser, EINA_TRUE); elm_object_focus_set(ephoto->single_browser, EINA_TRUE);

View File

@ -1064,6 +1064,7 @@ _ephoto_thumb_activated(void *data, Evas_Object *obj EINA_UNUSED,
{ {
EINA_LIST_FOREACH(selected, s, item) EINA_LIST_FOREACH(selected, s, item)
{ {
elm_gengrid_item_selected_set(item, EINA_TRUE);
tb->ephoto->selentries = eina_list_append(tb->ephoto->selentries, tb->ephoto->selentries = eina_list_append(tb->ephoto->selentries,
elm_object_item_data_get(item)); elm_object_item_data_get(item));
} }