Add config option and implement "switch to desktop of new window (optional
too)" TODO item. SVN revision: 27856
This commit is contained in:
parent
f5c7e3809c
commit
bd59455ec0
|
@ -5332,8 +5332,12 @@ _e_border_eval(E_Border *bd)
|
|||
E_Desk *desk;
|
||||
|
||||
desk = e_desk_at_xy_get(bd->zone, rem->prop.desk_x, rem->prop.desk_y);
|
||||
if (desk)
|
||||
e_border_desk_set(bd, desk);
|
||||
if (desk)
|
||||
{
|
||||
e_border_desk_set(bd, desk);
|
||||
if (e_config->desk_auto_switch)
|
||||
e_desk_show(desk);
|
||||
}
|
||||
}
|
||||
if (rem->apply & E_REMEMBER_APPLY_SIZE)
|
||||
{
|
||||
|
|
|
@ -509,6 +509,8 @@ e_config_init(void)
|
|||
E_CONFIG_VAL(D, T, theme_default_border_style, STR);
|
||||
|
||||
E_CONFIG_LIST(D, T, mime_icons, _e_config_mime_icon_edd); /**/
|
||||
|
||||
E_CONFIG_VAL(D, T, desk_auto_switch, INT);
|
||||
|
||||
e_config = e_config_domain_load("e", _e_config_edd);
|
||||
if (e_config)
|
||||
|
@ -1221,7 +1223,6 @@ e_config_init(void)
|
|||
IFCFG(0x00105);
|
||||
e_config->remember_internal_windows = 1;
|
||||
IFCFGEND;
|
||||
|
||||
|
||||
IFCFG(0x00106);
|
||||
e_config->desklock_use_custom_screensaver = 0;
|
||||
|
@ -1293,6 +1294,10 @@ e_config_init(void)
|
|||
}
|
||||
IFCFGEND;
|
||||
|
||||
IFCFG(0x0108);
|
||||
e_config->desk_auto_switch = 0;
|
||||
IFCFGEND;
|
||||
|
||||
e_config->config_version = E_CONFIG_FILE_VERSION;
|
||||
|
||||
#if 0 /* example of new config */
|
||||
|
@ -1391,6 +1396,7 @@ e_config_init(void)
|
|||
E_CONFIG_LIMIT(e_config->border_raise_on_focus, 0, 1);
|
||||
E_CONFIG_LIMIT(e_config->desk_flip_wrap, 0, 1);
|
||||
E_CONFIG_LIMIT(e_config->remember_internal_windows, 0, 1);
|
||||
E_CONFIG_LIMIT(e_config->desk_auto_switch, 0, 1);
|
||||
|
||||
/* FIXME: disabled auto apply because it causes problems */
|
||||
e_config->cfgdlg_auto_apply = 0;
|
||||
|
@ -1401,7 +1407,6 @@ e_config_init(void)
|
|||
e_config->desklock_personal_passwd = NULL;
|
||||
|
||||
e_config_save_queue();
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -1530,8 +1535,7 @@ e_config_profile_add(char *prof)
|
|||
const char *homedir;
|
||||
|
||||
homedir = e_user_homedir_get();
|
||||
snprintf(buf, sizeof(buf), "%s/.e/e/config/%s",
|
||||
homedir, prof);
|
||||
snprintf(buf, sizeof(buf), "%s/.e/e/config/%s", homedir, prof);
|
||||
ecore_file_mkdir(buf);
|
||||
}
|
||||
|
||||
|
@ -1625,8 +1629,7 @@ e_config_profile_save(void)
|
|||
|
||||
/* FIXME: check for other sessions fo E running */
|
||||
homedir = e_user_homedir_get();
|
||||
snprintf(buf, sizeof(buf), "%s/.e/e/config/profile.cfg",
|
||||
homedir);
|
||||
snprintf(buf, sizeof(buf), "%s/.e/e/config/profile.cfg", homedir);
|
||||
snprintf(buf2, sizeof(buf2), "%s.tmp", buf);
|
||||
|
||||
ef = eet_open(buf2, EET_FILE_MODE_WRITE);
|
||||
|
@ -1988,8 +1991,7 @@ _e_config_free(void)
|
|||
static int
|
||||
_e_config_cb_timer(void *data)
|
||||
{
|
||||
e_util_dialog_show(_("Configuration Upgraded"),
|
||||
data);
|
||||
e_util_dialog_show(_("Configuration Upgraded"), data);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ typedef Eet_Data_Descriptor E_Config_DD;
|
|||
/* 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 0x0107
|
||||
#define E_CONFIG_FILE_GENERATION 0x0108
|
||||
#define E_CONFIG_FILE_VERSION ((E_CONFIG_FILE_EPOCH << 16) | E_CONFIG_FILE_GENERATION)
|
||||
|
||||
#define E_EVAS_ENGINE_DEFAULT 0
|
||||
|
@ -262,6 +262,7 @@ struct _E_Config
|
|||
const char *theme_default_border_style; // GUI
|
||||
|
||||
Evas_List *mime_icons; // GUI
|
||||
int desk_auto_switch; // GUI;
|
||||
};
|
||||
|
||||
struct _E_Config_Module
|
||||
|
|
|
@ -18,7 +18,8 @@ struct _E_Config_Dialog_Data
|
|||
int move_resize_info;
|
||||
int animate_shading;
|
||||
int window_placement_policy;
|
||||
|
||||
int desk_auto_switch;
|
||||
|
||||
/*- ADVANCED -*/
|
||||
int move_info_visible;
|
||||
int move_info_follows;
|
||||
|
@ -73,6 +74,7 @@ _fill_data(E_Config_Dialog_Data *cfdata)
|
|||
if (cfdata->border_shade_animate) cfdata->animate_shading = 1;
|
||||
cfdata->use_app_icon = e_config->use_app_icon;
|
||||
cfdata->remember_internal_windows = e_config->remember_internal_windows;
|
||||
cfdata->desk_auto_switch = e_config->desk_auto_switch;
|
||||
}
|
||||
|
||||
static void *
|
||||
|
@ -117,6 +119,7 @@ _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
|||
}
|
||||
e_config->window_placement_policy = cfdata->window_placement_policy;
|
||||
e_config->border_shade_animate = cfdata->animate_shading;
|
||||
e_config->desk_auto_switch = cfdata->desk_auto_switch;
|
||||
e_config_save_queue();
|
||||
return 1; /* Apply was OK */
|
||||
}
|
||||
|
@ -135,6 +138,7 @@ _advanced_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
|||
e_config->border_shade_speed = cfdata->border_shade_speed;
|
||||
e_config->use_app_icon = cfdata->use_app_icon;
|
||||
e_config->remember_internal_windows = cfdata->remember_internal_windows;
|
||||
e_config->desk_auto_switch = cfdata->desk_auto_switch;
|
||||
e_config_save_queue();
|
||||
return 1; /* Apply was OK */
|
||||
}
|
||||
|
@ -166,6 +170,8 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
|
|||
e_widget_framelist_object_append(of, ob);
|
||||
ob = e_widget_radio_add(evas, _("Place manually with the mouse"), E_WINDOW_PLACEMENT_MANUAL, rg);
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
ob = e_widget_check_add(evas, _("Automatically switch to desktop of new window"), &(cfdata->desk_auto_switch));
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
e_widget_list_object_append(o, of, 1, 1, 0.5);
|
||||
|
||||
return o;
|
||||
|
@ -236,6 +242,8 @@ _advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data
|
|||
e_widget_framelist_object_append(of, ob);
|
||||
ob = e_widget_radio_add(evas, _("Place manually with the mouse"), E_WINDOW_PLACEMENT_MANUAL, rg);
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
ob = e_widget_check_add(evas, _("Automatically switch to desktop of new window"), &(cfdata->desk_auto_switch));
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
e_widget_table_object_append(ot, of, 0, 1, 1, 1, 1, 1, 1, 1);
|
||||
|
||||
of = e_widget_framelist_add(evas, _("Window Frame"), 0);
|
||||
|
|
Loading…
Reference in New Issue