Enlightenment CVS committal Author : devilhorns Project : e17 Module : apps/e
Dir : e17/apps/e/src/bin Modified Files: e_border.c e_config.c e_config.h e_int_config_window_display.c Log Message: Add config option and implement "switch to desktop of new window (optional too)" TODO item. =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_border.c,v retrieving revision 1.565 retrieving revision 1.566 diff -u -3 -r1.565 -r1.566 --- e_border.c 3 Jan 2007 06:14:02 -0000 1.565 +++ e_border.c 7 Jan 2007 23:45:35 -0000 1.566 @@ -5332,8 +5332,12 @@ 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) { =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_config.c,v retrieving revision 1.224 retrieving revision 1.225 diff -u -3 -r1.224 -r1.225 --- e_config.c 31 Dec 2006 13:01:34 -0000 1.224 +++ e_config.c 7 Jan 2007 23:45:35 -0000 1.225 @@ -509,6 +509,8 @@ 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 @@ IFCFG(0x00105); e_config->remember_internal_windows = 1; IFCFGEND; - IFCFG(0x00106); e_config->desklock_use_custom_screensaver = 0; @@ -1293,6 +1294,10 @@ } 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_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->desklock_personal_passwd = NULL; e_config_save_queue(); - return 1; } @@ -1530,8 +1535,7 @@ 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 @@ /* 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 @@ static int _e_config_cb_timer(void *data) { - e_util_dialog_show(_("Configuration Upgraded"), - data); + e_util_dialog_show(_("Configuration Upgraded"), data); return 0; } =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_config.h,v retrieving revision 1.139 retrieving revision 1.140 diff -u -3 -r1.139 -r1.140 --- e_config.h 7 Jan 2007 23:18:37 -0000 1.139 +++ e_config.h 7 Jan 2007 23:45:35 -0000 1.140 @@ -52,7 +52,7 @@ /* 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 @@ const char *theme_default_border_style; // GUI Evas_List *mime_icons; // GUI + int desk_auto_switch; // GUI; }; struct _E_Config_Module =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_int_config_window_display.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -3 -r1.19 -r1.20 --- e_int_config_window_display.c 17 Dec 2006 02:10:24 -0000 1.19 +++ e_int_config_window_display.c 7 Jan 2007 23:45:35 -0000 1.20 @@ -18,7 +18,8 @@ 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 @@ 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 @@ } 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 @@ 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 @@ 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; @@ -235,6 +241,8 @@ ob = e_widget_radio_add(evas, _("Place at mouse pointer"), E_WINDOW_PLACEMENT_CURSOR, rg); 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); ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs