settings: only allow one settings window instance.

Do a simple check for a window object. Did think about
adding it to the method but it seems to return an
Evas_Object *. Simpler just to check in edi_main.
This commit is contained in:
Alastair Poole 2018-08-21 19:03:37 +01:00
parent f7890e8dc8
commit 893f3eb477
1 changed files with 6 additions and 0 deletions

View File

@ -835,6 +835,9 @@ _tb_about_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_i
static void
_tb_settings_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
if (edi_settings_win_get())
return;
edi_settings_show(_edi_main_win);
}
@ -902,6 +905,9 @@ static void
_edi_menu_settings_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
void *event_info EINA_UNUSED)
{
if (edi_settings_win_get())
return;
edi_settings_show(_edi_main_win);
}