1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 12:28:22 +01:00

- made "Keep on Top" in the dock/clip menu a checked menu entry. It's _much_

easier to work with it this way.
- better naming of options in the clip options menu.
- better detection of whether to use EXEC or SHEXEC in WPrefs menu editor.
This commit is contained in:
dan
2001-04-10 22:00:41 +00:00
parent 9035122c5f
commit e0235bb61b
5 changed files with 30 additions and 25 deletions

View File

@@ -14,6 +14,8 @@ Changes since version 0.64.0:
- When Window Maker calls wmsetbg to set the background, it will consider the - When Window Maker calls wmsetbg to set the background, it will consider the
value of the DisableDithering option and pass the right switch to wmsetbg. value of the DisableDithering option and pass the right switch to wmsetbg.
- fixed a memleak in the dialog panels. - fixed a memleak in the dialog panels.
- made "Keep on Top" in the dock/clip menu a checked menu entry. It's _much_
easier to work with it this way.
Changes since version 0.63.1: Changes since version 0.63.1:

View File

@@ -1,7 +1,7 @@
/* /*
* WINGs WMHost function library * WINGs WMHost function library
* *
* Copyright (c) 1999-2000 Dan Pascu * Copyright (c) 1999-2001 Dan Pascu
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -248,11 +248,18 @@ WMFlushHostCache()
} }
static int
matchAddress(void *item, void *cdata)
{
return (strcmp((char*) item, (char*) cdata)==0);
}
Bool Bool
WMIsHostEqualToHost(WMHost* hPtr, WMHost* aPtr) WMIsHostEqualToHost(WMHost* hPtr, WMHost* aPtr)
{ {
int i, j; char *adr;
char *adr1, *adr2; int i;
wassertrv(hPtr!=NULL && aPtr!=NULL, False); wassertrv(hPtr!=NULL && aPtr!=NULL, False);
@@ -260,12 +267,9 @@ WMIsHostEqualToHost(WMHost* hPtr, WMHost* aPtr)
return True; return True;
for (i=0; i<WMGetArrayItemCount(aPtr->addresses); i++) { for (i=0; i<WMGetArrayItemCount(aPtr->addresses); i++) {
adr1 = WMGetFromArray(aPtr->addresses, i); adr = WMGetFromArray(aPtr->addresses, i);
// use WMFindInArray here --Dan if (WMFindInArray(hPtr->addresses, matchAddress, adr) != WANotFound) {
for (j=0; j<WMGetArrayItemCount(hPtr->addresses); j++) { return True;
adr2 = WMGetFromArray(hPtr->addresses, j);
if (strcmp(adr1, adr2)==0)
return True;
} }
} }

View File

@@ -1626,7 +1626,7 @@ processData(char *title, ItemData *data)
switch (data->type) { switch (data->type) {
case ExecInfo: case ExecInfo:
#if 1 #if 1
if (strpbrk(data->param.exec.command, "&$*|><?`=")) { if (strpbrk(data->param.exec.command, "&$*|><?`=;")) {
s1 = "SHEXEC"; s1 = "SHEXEC";
} else { } else {
s1 = "EXEC"; s1 = "EXEC";

View File

@@ -228,6 +228,8 @@ toggleLoweredCallback(WMenu *menu, WMenuEntry *entry)
toggleLowered(entry->clientdata); toggleLowered(entry->clientdata);
entry->flags.indicator_on = !(((WDock*)entry->clientdata)->lowered);
wMenuPaint(menu); wMenuPaint(menu);
} }
@@ -1001,11 +1003,7 @@ updateClipOptionsMenu(WMenu *menu, WDock *dock)
/* keep on top */ /* keep on top */
entry = menu->entries[index]; entry = menu->entries[index];
if (dock->lowered) { entry->flags.indicator_on = !dock->lowered;
entry->text = _("Keep on Top");
} else {
entry->text = _("Allow Lowering");
}
entry->clientdata = dock; entry->clientdata = dock;
/* collapsed */ /* collapsed */
@@ -1047,6 +1045,9 @@ makeClipOptionsMenu(WScreen *scr)
entry = wMenuAddCallback(menu, _("Keep on Top"), entry = wMenuAddCallback(menu, _("Keep on Top"),
toggleLoweredCallback, NULL); toggleLoweredCallback, NULL);
entry->flags.indicator = 1;
entry->flags.indicator_on = 1;
entry->flags.indicator_type = MI_CHECK;
entry = wMenuAddCallback(menu, _("Collapsed"), entry = wMenuAddCallback(menu, _("Collapsed"),
toggleCollapsedCallback, NULL); toggleCollapsedCallback, NULL);
@@ -1054,19 +1055,19 @@ makeClipOptionsMenu(WScreen *scr)
entry->flags.indicator_on = 1; entry->flags.indicator_on = 1;
entry->flags.indicator_type = MI_CHECK; entry->flags.indicator_type = MI_CHECK;
entry = wMenuAddCallback(menu, _("AutoCollapse"), entry = wMenuAddCallback(menu, _("Autocollapse"),
toggleAutoCollapseCallback, NULL); toggleAutoCollapseCallback, NULL);
entry->flags.indicator = 1; entry->flags.indicator = 1;
entry->flags.indicator_on = 1; entry->flags.indicator_on = 1;
entry->flags.indicator_type = MI_CHECK; entry->flags.indicator_type = MI_CHECK;
entry = wMenuAddCallback(menu, _("AutoRaiseLower"), entry = wMenuAddCallback(menu, _("Autoraise"),
toggleAutoRaiseLowerCallback, NULL); toggleAutoRaiseLowerCallback, NULL);
entry->flags.indicator = 1; entry->flags.indicator = 1;
entry->flags.indicator_on = 1; entry->flags.indicator_on = 1;
entry->flags.indicator_type = MI_CHECK; entry->flags.indicator_type = MI_CHECK;
entry = wMenuAddCallback(menu, _("AutoAttract Icons"), entry = wMenuAddCallback(menu, _("Autoattract Icons"),
toggleAutoAttractCallback, NULL); toggleAutoAttractCallback, NULL);
entry->flags.indicator = 1; entry->flags.indicator = 1;
entry->flags.indicator_on = 1; entry->flags.indicator_on = 1;
@@ -1092,6 +1093,9 @@ dockMenuCreate(WScreen *scr, int type)
if (type != WM_CLIP) { if (type != WM_CLIP) {
entry = wMenuAddCallback(menu, _("Keep on Top"), entry = wMenuAddCallback(menu, _("Keep on Top"),
toggleLoweredCallback, NULL); toggleLoweredCallback, NULL);
entry->flags.indicator = 1;
entry->flags.indicator_on = 1;
entry->flags.indicator_type = MI_CHECK;
} else { } else {
entry = wMenuAddCallback(menu, _("Clip Options"), NULL, NULL); entry = wMenuAddCallback(menu, _("Clip Options"), NULL, NULL);
scr->clip_options = makeClipOptionsMenu(scr); scr->clip_options = makeClipOptionsMenu(scr);
@@ -3308,14 +3312,8 @@ openDockMenu(WDock *dock, WAppIcon *aicon, XEvent *event)
if (dock->type == WM_DOCK) { if (dock->type == WM_DOCK) {
/* keep on top */ /* keep on top */
entry = dock->menu->entries[index]; entry = dock->menu->entries[index];
entry->flags.indicator_on = !dock->lowered;
if (dock->lowered) {
entry->text = _("Keep on Top");
} else {
entry->text = _("Allow Lowering");
}
entry->clientdata = dock; entry->clientdata = dock;
dock->menu->flags.realized = 0; dock->menu->flags.realized = 0;
} else { } else {
/* clip options */ /* clip options */

View File

@@ -2,3 +2,4 @@
supports PseudoColor and TrueColor in some depths) supports PseudoColor and TrueColor in some depths)
- Gimp's xcf format? - Gimp's xcf format?
- add clipping code to RCombineArea() - add clipping code to RCombineArea()
- figure out what is producing those speckles when dithering is used.