forked from enlightenment/edi
scm: Fix refreshing of panels on stash
refresh_all now remembers the right panel
This commit is contained in:
parent
1bf88c4730
commit
d4d37a82ea
|
@ -710,30 +710,37 @@ edi_mainview_panel_close_all(Edi_Mainview_Panel *panel)
|
||||||
Edi_Mainview_Item *it;
|
Edi_Mainview_Item *it;
|
||||||
|
|
||||||
EINA_LIST_FOREACH(panel->items, item, it)
|
EINA_LIST_FOREACH(panel->items, item, it)
|
||||||
{
|
edi_mainview_panel_item_close(panel, it);
|
||||||
if (it)
|
|
||||||
edi_mainview_panel_item_close(panel, it);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
edi_mainview_panel_refresh_all(Edi_Mainview_Panel *panel)
|
edi_mainview_panel_refresh_all(Edi_Mainview_Panel *panel)
|
||||||
{
|
{
|
||||||
Eina_List *item;
|
Eina_List *item, *tabs = NULL;
|
||||||
Edi_Mainview_Item *it;
|
Edi_Mainview_Item *it;
|
||||||
char *path;
|
Edi_Path_Options *options;
|
||||||
|
|
||||||
EINA_LIST_FOREACH(panel->items, item, it)
|
EINA_LIST_FOREACH(panel->items, item, it)
|
||||||
{
|
{
|
||||||
if (it)
|
options = edi_path_options_create(it->path);
|
||||||
{
|
options->type = eina_stringshare_add(it->mimetype);
|
||||||
path = strdup(it->path);
|
options->background = it != panel->current;
|
||||||
edi_mainview_panel_item_close(panel, it);
|
|
||||||
if (ecore_file_exists(path))
|
tabs = eina_list_append(tabs, options);
|
||||||
edi_mainview_panel_open_path(panel, path);
|
|
||||||
free(path);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
edi_mainview_panel_close_all(panel);
|
||||||
|
|
||||||
|
EINA_LIST_FOREACH(tabs, item, options)
|
||||||
|
{
|
||||||
|
if (!ecore_file_exists(options->path))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
edi_mainview_panel_open(panel, options);
|
||||||
|
}
|
||||||
|
|
||||||
|
EINA_LIST_FREE(tabs, options)
|
||||||
|
free(options);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in New Issue