forked from enlightenment/enlightenment
add new flag for preventing a window from being opened on restart by its remember, apply this to both the desktop editor and shelf config dialogs
SVN revision: 77407
This commit is contained in:
parent
282ac0777e
commit
bdd879e7fc
|
@ -533,6 +533,7 @@ struct _E_Border
|
|||
|
||||
unsigned int internal : 1;
|
||||
unsigned int internal_no_remember : 1;
|
||||
unsigned int internal_no_reopen : 1;
|
||||
unsigned int stolen : 1;
|
||||
|
||||
Ecore_Evas *internal_ecore_evas;
|
||||
|
|
|
@ -403,6 +403,7 @@ e_config_init(void)
|
|||
#define T E_Remember
|
||||
#define D _e_config_remember_edd
|
||||
E_CONFIG_VAL(D, T, match, INT);
|
||||
E_CONFIG_VAL(D, T, no_reopen, INT);
|
||||
E_CONFIG_VAL(D, T, apply_first_only, UCHAR);
|
||||
E_CONFIG_VAL(D, T, keep_settings, UCHAR);
|
||||
E_CONFIG_VAL(D, T, name, STR);
|
||||
|
|
|
@ -37,7 +37,7 @@ typedef struct _E_Event_Config_Icon_Theme E_Event_Config_Icon_Theme;
|
|||
/* increment this whenever a new set of config values are added but the users
|
||||
* config doesn't need to be wiped - simply new values need to be put in
|
||||
*/
|
||||
#define E_CONFIG_FILE_GENERATION 0x0157
|
||||
#define E_CONFIG_FILE_GENERATION 0x0158
|
||||
#define E_CONFIG_FILE_VERSION ((E_CONFIG_FILE_EPOCH << 16) | E_CONFIG_FILE_GENERATION)
|
||||
|
||||
struct _E_Config
|
||||
|
|
|
@ -268,6 +268,7 @@ _e_desktop_edit_create_data(E_Config_Dialog *cfd)
|
|||
|
||||
cfdata = E_NEW(E_Config_Dialog_Data, 1);
|
||||
if (!cfdata) return NULL;
|
||||
cfd->dia->win->state.no_reopen = EINA_TRUE;
|
||||
cfdata->editor = cfd->data;
|
||||
|
||||
/*
|
||||
|
|
|
@ -139,6 +139,7 @@ _e_remember_restore_cb(void *data __UNUSED__, int type __UNUSED__, void *event _
|
|||
EINA_LIST_FOREACH(remembers->list, l, rem)
|
||||
{
|
||||
if (!rem->class) continue;
|
||||
if (rem->no_reopen) continue;
|
||||
|
||||
if (!strncmp(rem->class, "e_fwin::", 8))
|
||||
{
|
||||
|
@ -157,9 +158,6 @@ _e_remember_restore_cb(void *data __UNUSED__, int type __UNUSED__, void *event _
|
|||
const char *p;
|
||||
|
||||
p = rem->class + 9;
|
||||
/* if shelf config dialog is opened from a remember, it will break the world */
|
||||
if (!strncmp(p, "extensions/shelves", sizeof("extensions/shelves") - 1))
|
||||
continue;
|
||||
if ((param = strstr(p, "::")))
|
||||
{
|
||||
snprintf(path, (param - p) + sizeof(char), "%s", p);
|
||||
|
@ -444,6 +442,7 @@ _e_remember_update(E_Border *bd, E_Remember *rem)
|
|||
rem->prop.fullscreen = bd->fullscreen;
|
||||
if (rem->apply & E_REMEMBER_APPLY_OFFER_RESISTANCE)
|
||||
rem->prop.offer_resistance = bd->offer_resistance;
|
||||
rem->no_reopen = bd->internal_no_reopen;
|
||||
{
|
||||
E_Event_Remember_Update *ev;
|
||||
|
||||
|
@ -883,6 +882,7 @@ _e_remember_init_edd(void)
|
|||
#define T E_Remember
|
||||
#define D e_remember_edd
|
||||
E_CONFIG_VAL(D, T, match, INT);
|
||||
E_CONFIG_VAL(D, T, no_reopen, INT);
|
||||
E_CONFIG_VAL(D, T, apply_first_only, UCHAR);
|
||||
E_CONFIG_VAL(D, T, keep_settings, UCHAR);
|
||||
E_CONFIG_VAL(D, T, name, STR);
|
||||
|
|
|
@ -43,6 +43,7 @@ typedef struct _E_Remember E_Remember;
|
|||
struct _E_Remember
|
||||
{
|
||||
int match;
|
||||
int no_reopen;
|
||||
unsigned char apply_first_only;
|
||||
unsigned char keep_settings;
|
||||
int used_count;
|
||||
|
|
|
@ -268,6 +268,7 @@ e_win_show(E_Win *win)
|
|||
win->border->internal = 1;
|
||||
win->border->internal_ecore_evas = win->ecore_evas;
|
||||
if (win->state.no_remember) win->border->internal_no_remember = 1;
|
||||
win->border->internal_no_reopen = win->state.no_reopen;
|
||||
}
|
||||
_e_win_prop_update(win);
|
||||
e_border_show(win->border);
|
||||
|
|
|
@ -38,6 +38,7 @@ struct _E_Win
|
|||
unsigned char centered : 1;
|
||||
unsigned char dialog : 1;
|
||||
unsigned char no_remember : 1;
|
||||
unsigned char no_reopen : 1;
|
||||
} state;
|
||||
|
||||
E_Pointer *pointer;
|
||||
|
|
|
@ -77,6 +77,7 @@ _create_data(E_Config_Dialog *cfd)
|
|||
cfdata = E_NEW(E_Config_Dialog_Data, 1);
|
||||
cfdata->shelf_handler = ecore_event_handler_add(E_EVENT_SHELF_ADD, (Ecore_Event_Handler_Cb)_shelf_handler_cb, cfdata);
|
||||
cfdata->cfd = cfd;
|
||||
cfd->dia->win->state.no_reopen = EINA_TRUE;
|
||||
_cfdata = cfdata;
|
||||
return cfdata;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue