Rename a few configuration items.

SVN revision: 25079
This commit is contained in:
Kim Woelders 2006-08-23 21:04:53 +00:00
parent a70c359080
commit fb8bd3e398
9 changed files with 48 additions and 43 deletions

25
src/E.h
View File

@ -250,6 +250,10 @@ typedef struct
int timeout;
} backgrounds;
struct
{
int move_resistance;
} buttons;
struct
{
unsigned int num;
int dragdir;
@ -262,6 +266,7 @@ typedef struct
int areas_nx;
int areas_ny;
char areas_wraparound;
int edge_flip_resistance;
} desks;
struct
{
@ -329,6 +334,9 @@ typedef struct
int slidespeedcleanup;
char ignore_struts;
char raise_fullscreen;
#ifdef HAS_XINERAMA
char extra_head; /* Not used */
#endif
} place;
struct
{
@ -340,6 +348,11 @@ typedef struct
char *cmd_halt;
} session;
struct
{
char animate;
int speed;
} shading;
struct
{
char enable;
int edge_snap_dist;
@ -383,6 +396,7 @@ typedef struct
char warp_on_select;
int icon_mode;
} warplist;
struct
{
char argb_internal_objects;
@ -391,19 +405,10 @@ typedef struct
char argb_clients_inherit_attr;
char use_sync;
} testing;
int deskmode;
char animate_shading;
int shadespeed;
int button_move_resistance;
char autosave;
char memory_paranoia;
char save_under;
int edge_flip_resistance;
/* Not used */
#ifdef HAS_XINERAMA
char extra_head; /* Not used */
#endif
}
EConf;

View File

@ -584,8 +584,8 @@ ButtonEventMotion(Button * b, XEvent * ev __UNUSED__)
x = -x;
if (y < 0)
y = -y;
if ((x > Conf.button_move_resistance) ||
(y > Conf.button_move_resistance))
if ((x > Conf.buttons.move_resistance) ||
(y > Conf.buttons.move_resistance))
Mode_buttons.move_pending = 0;
Mode_buttons.action_inhibit = 1;
}

View File

@ -2492,10 +2492,10 @@ CB_ConfigureAreas(Dialog * d __UNUSED__, int val, void *data __UNUSED__)
{
if (tmp_edge_resist < 1)
tmp_edge_resist = 1;
Conf.edge_flip_resistance = tmp_edge_resist;
Conf.desks.edge_flip_resistance = tmp_edge_resist;
}
else
Conf.edge_flip_resistance = 0;
Conf.desks.edge_flip_resistance = 0;
EdgeWindowsShow();
}
autosave();
@ -2573,7 +2573,7 @@ _DlgFillAreas(Dialog * d __UNUSED__, DItem * table, void *data __UNUSED__)
char s[64];
tmp_area_wraparound = Conf.desks.areas_wraparound;
tmp_edge_resist = Conf.edge_flip_resistance;
tmp_edge_resist = Conf.desks.edge_flip_resistance;
if (tmp_edge_resist == 0)
tmp_edge_flip = 0;
else
@ -2927,6 +2927,7 @@ static const CfgItem DesksCfgItems[] = {
CFG_FUNC_INT(Conf.desks, areas_nx, 2, AreasCfgFuncSizeX),
CFG_FUNC_INT(Conf.desks, areas_ny, 1, AreasCfgFuncSizeY),
CFG_ITEM_BOOL(Conf.desks, areas_wraparound, 0),
CFG_ITEM_INT(Conf.desks, edge_flip_resistance, 25),
};
#define N_CFG_ITEMS (sizeof(DesksCfgItems)/sizeof(CfgItem))

View File

@ -41,7 +41,7 @@ EdgeTimeout(int val, void *data __UNUSED__)
if (MenusActive())
return;
if (!Conf.edge_flip_resistance)
if (!Conf.desks.edge_flip_resistance)
return;
/* Quit if pointer has left screen */
@ -110,14 +110,14 @@ EdgeEvent(int dir)
#if 0
Eprintf("EdgeEvent %d -> %d\n", lastdir, dir);
#endif
if (lastdir == dir || !Conf.edge_flip_resistance)
if (lastdir == dir || !Conf.desks.edge_flip_resistance)
return;
RemoveTimerEvent("EDGE_TIMEOUT");
if (dir >= 0)
{
DoIn("EDGE_TIMEOUT",
((double)Conf.edge_flip_resistance) / 100.0, EdgeTimeout,
((double)Conf.desks.edge_flip_resistance) / 100.0, EdgeTimeout,
dir, NULL);
}
lastdir = dir;
@ -181,7 +181,7 @@ EdgeWindowsShow(void)
{
int ax, ay, cx, cy;
if (Conf.edge_flip_resistance <= 0)
if (Conf.desks.edge_flip_resistance <= 0)
{
EdgeWindowsHide();
return;

View File

@ -963,7 +963,7 @@ EwinShade(EWin * ewin)
if ((ewin->border) && (!strcmp(ewin->border->name, "BORDERLESS")))
return;
speed = Conf.shadespeed;
speed = Conf.shading.speed;
x = EoGetX(ewin);
y = EoGetY(ewin);
@ -983,7 +983,7 @@ EwinShade(EWin * ewin)
EChangeWindowAttributes(EwinGetClientWin(ewin), CWWinGravity, &att);
EwinBorderMinShadeSize(ewin, &b, &c);
a = w;
if ((Conf.animate_shading) || (ewin->type == EWIN_TYPE_MENU))
if ((Conf.shading.animate) || (ewin->type == EWIN_TYPE_MENU))
{
ETimedLoopInit(0, 1024, speed);
for (k = 0; k < 1024;)
@ -1015,7 +1015,7 @@ EwinShade(EWin * ewin)
EwinBorderMinShadeSize(ewin, &b, &c);
a = w;
c = x + w;
if ((Conf.animate_shading) || (ewin->type == EWIN_TYPE_MENU))
if ((Conf.shading.animate) || (ewin->type == EWIN_TYPE_MENU))
{
ETimedLoopInit(0, 1024, speed);
for (k = 0; k < 1024;)
@ -1047,7 +1047,7 @@ EwinShade(EWin * ewin)
EChangeWindowAttributes(EwinGetClientWin(ewin), CWWinGravity, &att);
EwinBorderMinShadeSize(ewin, &c, &b);
a = h;
if ((Conf.animate_shading) || (ewin->type == EWIN_TYPE_MENU))
if ((Conf.shading.animate) || (ewin->type == EWIN_TYPE_MENU))
{
ETimedLoopInit(0, 1024, speed);
for (k = 0; k < 1024;)
@ -1079,7 +1079,7 @@ EwinShade(EWin * ewin)
EwinBorderMinShadeSize(ewin, &c, &b);
a = h;
c = y + h;
if ((Conf.animate_shading) || (ewin->type == EWIN_TYPE_MENU))
if ((Conf.shading.animate) || (ewin->type == EWIN_TYPE_MENU))
{
ETimedLoopInit(0, 1024, speed);
for (k = 0; k < 1024;)
@ -1137,7 +1137,7 @@ EwinUnShade(EWin * ewin)
if (!ewin->state.shaded || ewin->state.iconified)
return;
speed = Conf.shadespeed;
speed = Conf.shading.speed;
x = EoGetX(ewin);
y = EoGetY(ewin);
@ -1166,7 +1166,7 @@ EwinUnShade(EWin * ewin)
ewin->client.w, ewin->client.h);
EMapWindow(EwinGetClientWin(ewin));
EMapWindow(ewin->win_container);
if ((Conf.animate_shading) || (ewin->type == EWIN_TYPE_MENU))
if ((Conf.shading.animate) || (ewin->type == EWIN_TYPE_MENU))
{
ETimedLoopInit(0, 1024, speed);
for (k = 0; k < 1024;)
@ -1204,7 +1204,7 @@ EwinUnShade(EWin * ewin)
ewin->client.h);
EMapWindow(EwinGetClientWin(ewin));
EMapWindow(ewin->win_container);
if ((Conf.animate_shading) || (ewin->type == EWIN_TYPE_MENU))
if ((Conf.shading.animate) || (ewin->type == EWIN_TYPE_MENU))
{
ETimedLoopInit(0, 1024, speed);
for (k = 0; k < 1024;)
@ -1242,7 +1242,7 @@ EwinUnShade(EWin * ewin)
ewin->client.w, ewin->client.h);
EMapWindow(EwinGetClientWin(ewin));
EMapWindow(ewin->win_container);
if ((Conf.animate_shading) || (ewin->type == EWIN_TYPE_MENU))
if ((Conf.shading.animate) || (ewin->type == EWIN_TYPE_MENU))
{
ETimedLoopInit(0, 1024, speed);
for (k = 0; k < 1024;)
@ -1280,7 +1280,7 @@ EwinUnShade(EWin * ewin)
ewin->client.w, ewin->client.h);
EMapWindow(EwinGetClientWin(ewin));
EMapWindow(ewin->win_container);
if ((Conf.animate_shading) || (ewin->type == EWIN_TYPE_MENU))
if ((Conf.shading.animate) || (ewin->type == EWIN_TYPE_MENU))
{
ETimedLoopInit(0, 1024, speed);
for (k = 0; k < 1024;)

View File

@ -1555,7 +1555,7 @@ SubmenuShowTimeout(int val __UNUSED__, void *dat)
/* Disable menu item events while sliding */
MenusSetEvents(0);
SlideEwinsTo(menus, fx, fy, tx, ty, i, Conf.shadespeed);
SlideEwinsTo(menus, fx, fy, tx, ty, i, Conf.shading.speed);
MenusSetEvents(1);
if (Conf.menus.warp)

View File

@ -108,6 +108,8 @@ MiscSighan(int sig, void *prm __UNUSED__)
static const CfgItem MiscCfgItems[] = {
CFG_ITEM_INT(Conf, buttons.move_resistance, 10),
CFG_ITEM_BOOL(Conf, dialogs.headers, 0),
CFG_ITEM_BOOL(Conf, dialogs.button_image, 0),
@ -145,6 +147,9 @@ static const CfgItem MiscCfgItems[] = {
CFG_ITEM_STR(Conf, session.cmd_reboot),
CFG_ITEM_STR(Conf, session.cmd_halt),
CFG_ITEM_BOOL(Conf, shading.animate, 1),
CFG_ITEM_INT(Conf, shading.speed, 8000),
CFG_ITEM_BOOL(Conf, snap.enable, 1),
CFG_ITEM_INT(Conf, snap.edge_snap_dist, 8),
CFG_ITEM_INT(Conf, snap.screen_snap_dist, 32),
@ -158,14 +163,9 @@ static const CfgItem MiscCfgItems[] = {
CFG_ITEM_BOOL(Conf, testing.argb_clients_inherit_attr, 0),
CFG_ITEM_BOOL(Conf, testing.use_sync, 1),
CFG_ITEM_INT(Conf, deskmode, MODE_NONE),
CFG_ITEM_BOOL(Conf, animate_shading, 1),
CFG_ITEM_INT(Conf, shadespeed, 8000),
CFG_ITEM_INT(Conf, button_move_resistance, 5),
CFG_ITEM_BOOL(Conf, autosave, 1),
CFG_ITEM_BOOL(Conf, memory_paranoia, 1),
CFG_ITEM_BOOL(Conf, save_under, 0),
CFG_ITEM_INT(Conf, edge_flip_resistance, 25),
};
#define N_CFG_ITEMS ((int)(sizeof(MiscCfgItems)/sizeof(CfgItem)))

View File

@ -69,7 +69,6 @@ ScreenInit(void)
return;
Mode.display.xinerama_active = XineramaIsActive(disp);
Conf.extra_head = 0;
if (Mode.display.xinerama_active)
screens = XineramaQueryScreens(disp, &num_screens);

View File

@ -207,14 +207,14 @@ CB_ConfigurePlacement(Dialog * d __UNUSED__, int val, void *data __UNUSED__)
Conf.place.slidespeedmap = tmp_map_slide_speed;
Conf.place.slidespeedcleanup = tmp_cleanup_slide_speed;
Conf.animate_shading = tmp_animate_shading;
Conf.shadespeed = tmp_shade_speed;
Conf.shading.animate = tmp_animate_shading;
Conf.shading.speed = tmp_shade_speed;
Conf.place.ignore_struts = tmp_place_ignore_struts;
Conf.place.raise_fullscreen = tmp_raise_fullscreen;
#ifdef HAS_XINERAMA
if (Mode.display.xinerama_active)
Conf.extra_head = tmp_extra_head;
Conf.place.extra_head = tmp_extra_head;
#endif
}
autosave();
@ -237,14 +237,14 @@ _DlgFillPlacement(Dialog * d __UNUSED__, DItem * table, void *data __UNUSED__)
tmp_map_slide_speed = Conf.place.slidespeedmap;
tmp_cleanup_slide_speed = Conf.place.slidespeedcleanup;
tmp_animate_shading = Conf.animate_shading;
tmp_shade_speed = Conf.shadespeed;
tmp_animate_shading = Conf.shading.animate;
tmp_shade_speed = Conf.shading.speed;
tmp_place_ignore_struts = Conf.place.ignore_struts;
tmp_raise_fullscreen = Conf.place.raise_fullscreen;
#ifdef HAS_XINERAMA
tmp_extra_head = Conf.extra_head;
tmp_extra_head = Conf.place.extra_head;
#endif
DialogItemTableSetOptions(table, 2, 0, 1, 0);
@ -368,7 +368,7 @@ _DlgFillPlacement(Dialog * d __UNUSED__, DItem * table, void *data __UNUSED__)
DialogItemSetText(di, _("Raise fullscreen windows"));
DialogItemCheckButtonSetPtr(di, &tmp_raise_fullscreen);
#ifdef HAS_XINERAMA
#ifdef HAS_XINERAMA_no /* Not implemented */
if (Mode.display.xinerama_active)
{
di = DialogAddItem(table, DITEM_CHECKBUTTON);