Ticket #1490: fix of mult-screen engine.
Multi-screen engine doesn't handle correctly some cases. Example: 1. Run mc. 2. Open some file in internal editor. 3. Switch back to the file panels. 4. Open another file in internal editor. As a result, two editors are opened. 5. Close current editor. Now you are in file panels. 6. Run screen list dialog (Meta-`). 6a. The 1st editor is highlighted as current screen. This is wrong. Current screen is file panels. 6b. Cannot switch to the opened editor in this dialog. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Этот коммит содержится в:
родитель
7a53028565
Коммит
6cfefe7cb7
@ -119,14 +119,13 @@ dialog_switch_remove (Dlg_head *h)
|
||||
else
|
||||
this = g_list_find (mc_dialogs, h);
|
||||
|
||||
if (this != NULL)
|
||||
{
|
||||
GList *next;
|
||||
mc_dialogs = g_list_delete_link (mc_dialogs, this);
|
||||
|
||||
next = g_list_next (this);
|
||||
mc_dialogs = g_list_delete_link (mc_dialogs, this);
|
||||
mc_current = next == NULL ? mc_dialogs : next;
|
||||
}
|
||||
/* adjust current dialog */
|
||||
if (top_dlg != NULL)
|
||||
mc_current = g_list_find (mc_dialogs, (Dlg_head *) top_dlg->data);
|
||||
else
|
||||
mc_current = mc_dialogs;
|
||||
}
|
||||
|
||||
size_t
|
||||
|
@ -1059,6 +1059,8 @@ frontend_run_dlg (Dlg_head * h)
|
||||
void
|
||||
dlg_run_done (Dlg_head * h)
|
||||
{
|
||||
top_dlg = g_list_remove (top_dlg, h);
|
||||
|
||||
if (h->state == DLG_CLOSED)
|
||||
{
|
||||
h->callback (h, (Widget *) h->current->data, DLG_END, 0, NULL);
|
||||
@ -1066,7 +1068,6 @@ dlg_run_done (Dlg_head * h)
|
||||
dialog_switch_remove (h);
|
||||
}
|
||||
|
||||
top_dlg = g_list_remove (top_dlg, h);
|
||||
}
|
||||
|
||||
/* Standard run dialog routine
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user