Fix title to not be redundant since entry already shows path. Change Elm_Gengrid_Item to Elm_Object_Item

This commit is contained in:
Stephen Houston 2014-11-19 10:50:35 -06:00
parent b0ef804dd4
commit 74471f29b3
2 changed files with 10 additions and 5 deletions

View File

@ -28,7 +28,7 @@ _ephoto_thumb_browser_show(Ephoto *ephoto, Ephoto_Entry *entry)
ephoto_slideshow_entry_set(ephoto->slideshow, NULL); ephoto_slideshow_entry_set(ephoto->slideshow, NULL);
elm_naviframe_item_simple_promote(ephoto->pager, ephoto->thumb_browser); elm_naviframe_item_simple_promote(ephoto->pager, ephoto->thumb_browser);
_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, NULL);
if ((entry) && (entry->item)) if ((entry) && (entry->item))
elm_gengrid_item_bring_in(entry->item, ELM_GENGRID_ITEM_SCROLLTO_IN); elm_gengrid_item_bring_in(entry->item, ELM_GENGRID_ITEM_SCROLLTO_IN);
@ -271,8 +271,13 @@ ephoto_title_set(Ephoto *ephoto, const char *title)
{ {
char buf[1024] = "Ephoto"; char buf[1024] = "Ephoto";
if (title) snprintf(buf, sizeof(buf), "Ephoto - %s", title); if (title)
elm_win_title_set(ephoto->win, buf); {
snprintf(buf, sizeof(buf), "Ephoto - %s", title);
elm_win_title_set(ephoto->win, buf);
}
else
elm_win_title_set(ephoto->win, "Ephoto");
} }
int int
@ -373,7 +378,7 @@ ephoto_directory_set(Ephoto *ephoto, const char *path)
{ {
EINA_SAFETY_ON_NULL_RETURN(ephoto); EINA_SAFETY_ON_NULL_RETURN(ephoto);
ephoto_title_set(ephoto, path); ephoto_title_set(ephoto, NULL);
eina_stringshare_replace(&ephoto->config->directory, path); eina_stringshare_replace(&ephoto->config->directory, path);
if (ephoto->job.change_dir) ecore_job_del(ephoto->job.change_dir); if (ephoto->job.change_dir) ecore_job_del(ephoto->job.change_dir);
ephoto->job.change_dir = ecore_job_add(_ephoto_change_dir, ephoto); ephoto->job.change_dir = ecore_job_add(_ephoto_change_dir, ephoto);

View File

@ -79,7 +79,7 @@ static Elm_Gengrid_Item_Class _ephoto_thumb_file_class;
static int static int
_entry_cmp(const void *pa, const void *pb) _entry_cmp(const void *pa, const void *pb)
{ {
const Elm_Gengrid_Item *ia = pa; const Elm_Object_Item *ia = pa;
const Ephoto_Entry *a, *b = pb; const Ephoto_Entry *a, *b = pb;
a = elm_object_item_data_get(ia); a = elm_object_item_data_get(ia);