1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-02-06 08:15:56 +01:00

Update for 0.51.2-pre2

This commit is contained in:
dan
1999-03-09 14:58:01 +00:00
parent 60980735fe
commit 088c0ac230
108 changed files with 2998 additions and 2770 deletions

View File

@@ -1,4 +1,4 @@
/* TextureAndColor.c- color/texture for titlebar etc.
/* Apperance.c- color/texture for titlebar etc.
*
* WPrefs - Window Maker Preferences Program
*
@@ -33,7 +33,7 @@ typedef struct _Panel {
WMWindow *win;
WMLabel *prevL;
WMButton *prevB;
WMPopUpButton *secP;
@@ -41,10 +41,30 @@ typedef struct _Panel {
WMLabel *texL;
WMList *texLs;
WMPopUpButton *cmdP;
WMTextField *texT;
WMButton *newB;
WMButton *editB;
WMButton *ripB;
WMButton *delB;
proplist_t ftitleTex;
proplist_t utitleTex;
proplist_t ptitleTex;
proplist_t iconTex;
proplist_t menuTex;
proplist_t mtitleTex;
proplist_t backTex;
int ftitleIndex;
int utitleIndex;
int ptitleIndex;
int iconIndex;
int menuIndex;
int mtitleIndex;
int backIndex;
WMFont *normalFont;
WMFont *selectedFont;
/* for preview shit */
Pixmap preview;
@@ -59,9 +79,13 @@ typedef struct _Panel {
#define ICON_FILE "appearance"
#define TNEW_FILE "tnew"
#define TDEL_FILE "tdel"
#define TEDIT_FILE "tedit"
#define TEXTR_FILE "textr"
#define FTITLE (1<<0)
#define UTITLE (1<<1)
@@ -136,12 +160,62 @@ getStrArrayForKey(char *key)
}
#endif
static void
newTexture(WMButton *bPtr, void *data)
{
_Panel *panel = (_Panel*)data;
}
static void
changePage(WMWidget *w, void *data)
{
_Panel *panel = (_Panel*)data;
int section;
section = WMGetPopUpButtonSelectedItem(panel->secP);
WMSelectListItem(panel->texLs, section);
}
static void
selectTexture(WMWidget *w, void *data)
{
_Panel *panel = (_Panel*)data;
int section;
section = WMGetListSelectedItemRow(panel->secP);
}
static void
fillTextureList(WMList *lPtr)
{
proplist_t textures;
WMUserDefaults *udb = WMGetStandardUserDefaults();
textures = WMGetUDObjectForKey(udb, "Textures");
if (!textures)
return;
}
static void
createPanel(Panel *p)
{
_Panel *panel = (_Panel*)p;
WMColor *color;
WMFont *boldFont;
WMFont *font;
WMScreen *scr = WMWidgetScreen(panel->win);
panel->frame = WMCreateFrame(panel->win);
@@ -149,25 +223,31 @@ createPanel(Panel *p)
WMMoveWidget(panel->frame, FRAME_LEFT, FRAME_TOP);
/* preview box */
panel->prevL = WMCreateLabel(panel->frame);
WMResizeWidget(panel->prevL, 260, 190);
WMMoveWidget(panel->prevL, 10, 10);
WMSetLabelRelief(panel->prevL, WRSunken);
panel->prevB = WMCreateCommandButton(panel->frame);
WMResizeWidget(panel->prevB, 260, 165);
WMMoveWidget(panel->prevB, 15, 10);
WMSetButtonImagePosition(panel->prevB, WIPImageOnly);
panel->secP = WMCreatePopUpButton(panel->frame);
WMResizeWidget(panel->secP, 242, 20);
WMMoveWidget(panel->secP, 10, 207);
/* WMSetPopUpButtonAction(panel->secP, changePage, panel);
*/
WMResizeWidget(panel->secP, 260, 20);
WMMoveWidget(panel->secP, 15, 180);
WMSetPopUpButtonSelectedItem(panel->secP, 0);
WMAddPopUpButtonItem(panel->secP, _("Titlebar of Focused Window"));
WMAddPopUpButtonItem(panel->secP, _("Titlebar of Unfocused Windows"));
WMAddPopUpButtonItem(panel->secP, _("Titlebar of Focused Window's Owner"));
WMAddPopUpButtonItem(panel->secP, _("Titlebar of Menus"));
WMAddPopUpButtonItem(panel->secP, _("Menu Items"));
WMAddPopUpButtonItem(panel->secP, _("Icon Background"));
WMAddPopUpButtonItem(panel->secP, _("Workspace Backgrounds"));
WMSetPopUpButtonAction(panel->secP, changePage, panel);
/* texture list */
boldFont = WMBoldSystemFontOfSize(scr, 12);
font = WMBoldSystemFontOfSize(scr, 12);
panel->texL = WMCreateLabel(panel->frame);
WMResizeWidget(panel->texL, 225, 18);
WMMoveWidget(panel->texL, 285, 10);
WMSetLabelFont(panel->texL, boldFont);
WMSetLabelFont(panel->texL, font);
WMSetLabelText(panel->texL, _("Textures"));
WMSetLabelRelief(panel->texL, WRSunken);
WMSetLabelTextAlignment(panel->texL, WACenter);
@@ -178,31 +258,52 @@ createPanel(Panel *p)
WMSetLabelTextColor(panel->texL, color);
WMReleaseColor(color);
WMReleaseFont(boldFont);
WMReleaseFont(font);
panel->texLs = WMCreateList(panel->frame);
WMResizeWidget(panel->texLs, 225, 144);
WMMoveWidget(panel->texLs, 285, 30);
/* command buttons */
panel->cmdP = WMCreatePopUpButton(panel->frame);
WMResizeWidget(panel->cmdP, 225, 20);
WMMoveWidget(panel->cmdP, 285, 180);
WMSetPopUpButtonPullsDown(panel->cmdP, True);
WMSetPopUpButtonText(panel->cmdP, _("Texture Commands"));
WMAddPopUpButtonItem(panel->cmdP, _("Create New"));
WMAddPopUpButtonItem(panel->cmdP, _("Add From Text Field"));
WMAddPopUpButtonItem(panel->cmdP, _("Remove Selected"));
WMAddPopUpButtonItem(panel->cmdP, _("Extract From File"));
font = WMSystemFontOfSize(scr, 10);
panel->newB = WMCreateCommandButton(panel->frame);
WMResizeWidget(panel->newB, 56, 48);
WMMoveWidget(panel->newB, 285, 180);
WMSetButtonFont(panel->newB, font);
WMSetButtonImagePosition(panel->newB, WIPAbove);
WMSetButtonText(panel->newB, _("New"));
SetButtonAlphaImage(scr, panel->newB, TNEW_FILE);
panel->ripB = WMCreateCommandButton(panel->frame);
WMResizeWidget(panel->ripB, 56, 48);
WMMoveWidget(panel->ripB, 341, 180);
WMSetButtonFont(panel->ripB, font);
WMSetButtonImagePosition(panel->ripB, WIPAbove);
WMSetButtonText(panel->ripB, _("Extract..."));
SetButtonAlphaImage(scr, panel->ripB, TEXTR_FILE);
panel->editB = WMCreateCommandButton(panel->frame);
WMResizeWidget(panel->editB, 64, 20);
WMMoveWidget(panel->editB, 260, 207);
WMSetButtonText(panel->editB, _("Browse..."));
WMResizeWidget(panel->editB, 56, 48);
WMMoveWidget(panel->editB, 397, 180);
WMSetButtonFont(panel->editB, font);
WMSetButtonImagePosition(panel->editB, WIPAbove);
WMSetButtonText(panel->editB, _("Edit"));
SetButtonAlphaImage(scr, panel->editB, TEDIT_FILE);
WMSetButtonEnabled(panel->editB, False);
panel->texT = WMCreateTextField(panel->frame);
WMResizeWidget(panel->texT, 176, 20);
WMMoveWidget(panel->texT, 330, 207);
panel->delB = WMCreateCommandButton(panel->frame);
WMResizeWidget(panel->delB, 56, 48);
WMMoveWidget(panel->delB, 453, 180);
WMSetButtonFont(panel->delB, font);
WMSetButtonImagePosition(panel->delB, WIPAbove);
WMSetButtonText(panel->delB, _("Delete"));
SetButtonAlphaImage(scr, panel->delB, TDEL_FILE);
WMSetButtonEnabled(panel->delB, False);
WMReleaseFont(font);
/**/
@@ -211,8 +312,65 @@ createPanel(Panel *p)
WMSetPopUpButtonSelectedItem(panel->secP, 0);
showData(panel);
fillTextureList(panel->texLs);
}
static proplist_t
setupTextureFor(WMList *list, char *key, char *defValue, char *title)
{
WMListItem *item;
char *tex, *str;
proplist_t prop;
prop = GetObjectForKey(key);
if (!prop) {
prop = PLMakeString(defValue);
}
tex = PLGetDescription(prop);
str = wstrappend(title, tex);
free(tex);
item = WMAddListItem(list, str);
free(str);
item->clientData = prop;
return prop;
}
static void
showData(_Panel *panel)
{
panel->ftitleTex = setupTextureFor(panel->texLs, "FTitleBack",
"(solid, black)", "[Focused]:");
panel->ftitleIndex = 0;
panel->utitleTex = setupTextureFor(panel->texLs, "UTitleBack",
"(solid, gray)", "[Unfocused]:");
panel->utitleIndex = 1;
panel->ptitleTex = setupTextureFor(panel->texLs, "PTitleBack",
"(solid, \"#616161\")",
"[Owner of Focused]:");
panel->ptitleIndex = 2;
panel->mtitleTex = setupTextureFor(panel->texLs, "MenuTitleBack",
"(solid, black)", "[Menu Title]:");
panel->mtitleIndex = 3;
panel->menuTex = setupTextureFor(panel->texLs, "MenuTextBack",
"(solid, gray)", "[Menu Item]:");
panel->menuIndex = 4;
panel->iconTex = setupTextureFor(panel->texLs, "IconBack",
"(solid, gray)", "[Icon]:");
panel->iconIndex = 5;
panel->backTex = setupTextureFor(panel->texLs, "WorkspaceBack",
"(solid, black)", "[Workspace]:");
panel->backIndex = 6;
}

View File

@@ -30,7 +30,6 @@ WPrefs_SOURCES = \
Paths.c \
Preferences.c \
Text.c \
TextureAndColor.c \
TexturePanel.c \
TexturePanel.h \
Themes.c \

View File

@@ -101,7 +101,7 @@ wpdata_DATA = WPrefs.tiff WPrefs.xpm
EXTRA_DIST = $(wpdata_DATA) TexturePanel.icons
WPrefs_SOURCES = main.c WPrefs.c WPrefs.h Appearance.c Configurations.c Expert.c Focus.c Icons.c KeyboardSettings.c KeyboardShortcuts.c Menu.c MenuPreferences.c MouseSettings.c NoMenuAlert.c Paths.c Preferences.c Text.c TextureAndColor.c TexturePanel.c TexturePanel.h Themes.c WindowHandling.c Workspace.c double.c double.h editmenu.c editmenu.h MenuGuru.c xmodifier.c
WPrefs_SOURCES = main.c WPrefs.c WPrefs.h Appearance.c Configurations.c Expert.c Focus.c Icons.c KeyboardSettings.c KeyboardShortcuts.c Menu.c MenuPreferences.c MouseSettings.c NoMenuAlert.c Paths.c Preferences.c Text.c TexturePanel.c TexturePanel.h Themes.c WindowHandling.c Workspace.c double.c double.h editmenu.c editmenu.h MenuGuru.c xmodifier.c
CPPFLAGS = @CPPFLAGS@ -DLOCALEDIR=\"$(NLSDIR)\"
@@ -128,8 +128,8 @@ X_PRE_LIBS = @X_PRE_LIBS@
WPrefs_OBJECTS = main.o WPrefs.o Appearance.o Configurations.o Expert.o \
Focus.o Icons.o KeyboardSettings.o KeyboardShortcuts.o Menu.o \
MenuPreferences.o MouseSettings.o NoMenuAlert.o Paths.o Preferences.o \
Text.o TextureAndColor.o TexturePanel.o Themes.o WindowHandling.o \
Workspace.o double.o editmenu.o MenuGuru.o xmodifier.o
Text.o TexturePanel.o Themes.o WindowHandling.o Workspace.o double.o \
editmenu.o MenuGuru.o xmodifier.o
WPrefs_LDFLAGS =
CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)

View File

@@ -1347,6 +1347,7 @@ showData(_Panel *panel)
if (!menu || !PLIsArray(menu)) {
if (AskMenuCopy(panel->win)) {
panel->dontSave = 0;
panel->unsaved = 1;
pmenu = getDefaultMenu(panel, &hasWSMenu);
} else {

View File

@@ -55,6 +55,8 @@ typedef struct _Panel {
WMFrame *ddelaF;
WMButton *ddelaB[5];
WMTextField *ddelaT;
WMLabel *ddelaL;
DoubleTest *tester;
WMFrame *menuF;
@@ -143,7 +145,8 @@ speedClick(WMWidget *w, void *data)
tmp = WMGetTextFieldText(panel->acceT);
if (sscanf(tmp, "%f", &accel)!=1 || accel < 0) {
WMRunAlertPanel(WMWidgetScreen(w), GetWindow(panel), _("Error"),
WMRunAlertPanel(WMWidgetScreen(panel->acceT), GetWindow(panel),
_("Error"),
_("Invalid mouse acceleration value. Must be a positive real value."),
_("OK"), NULL, NULL);
free(tmp);
@@ -192,12 +195,16 @@ doubleClick(WMWidget *w, void *data)
_Panel *panel = (_Panel*)data;
int i;
extern _WINGsConfiguration WINGsConfiguration;
char buffer[32];
for (i=0; i<5; i++) {
if (panel->ddelaB[i]==w)
break;
}
WINGsConfiguration.doubleClickDelay = DELAY(i);
sprintf(buffer, "%i", DELAY(i));
WMSetTextFieldText(panel->ddelaT, buffer);
}
@@ -302,26 +309,33 @@ showData(_Panel *panel)
}
sprintf(buffer, "%i", a);
WMSetTextFieldText(panel->threT, buffer);
/* find best match */
a = 0;
a = -1;
for (i=0; i<5; i++) {
if (fabs((0.5+((float)i*0.5))-accel) < fabs((0.5+((float)a*0.5))-accel))
if (0.5+(float)i*0.5 == accel)
a = i;
}
WMPerformButtonClick(panel->speedB[a]);
panel->lastClickedSpeed = panel->speedB[a];
if (a >= 0) {
WMPerformButtonClick(panel->speedB[a]);
panel->lastClickedSpeed = panel->speedB[a];
}
panel->acceleration = accel;
sprintf(buffer, "%.2f", accel);
WMSetTextFieldText(panel->acceT, buffer);
speedClick(panel->lastClickedSpeed, panel);
/**/
b = GetIntegerForKey("DoubleClickTime");
/* find best match */
a = 0;
a = -1;
for (i=0; i<5; i++) {
if (abs(b - DELAY(i)) < abs(b - DELAY(a)))
if (DELAY(i) == b)
a = i;
}
WMPerformButtonClick(panel->ddelaB[a]);
if (a >= 0)
WMPerformButtonClick(panel->ddelaB[a]);
sprintf(buffer, "%i", b);
WMSetTextFieldText(panel->ddelaT, buffer);
/**/
str = GetStringForKey("ModifierKey");
@@ -577,13 +591,14 @@ createPanel(Panel *p)
free(buf2);
panel->acceL = WMCreateLabel(panel->speedF);
WMResizeWidget(panel->acceL, 80, 16);
WMResizeWidget(panel->acceL, 70, 16);
WMMoveWidget(panel->acceL, 10, 67);
WMSetLabelTextAlignment(panel->acceL, WARight);
WMSetLabelText(panel->acceL, _("Acceler.:"));
panel->acceT = WMCreateTextField(panel->speedF);
WMResizeWidget(panel->acceT, 35, 20);
WMMoveWidget(panel->acceT, 85, 65);
WMResizeWidget(panel->acceT, 40, 20);
WMMoveWidget(panel->acceT, 80, 65);
WMAddNotificationObserver(returnPressed, panel,
WMTextDidEndEditingNotification, panel->acceT);
@@ -591,6 +606,7 @@ createPanel(Panel *p)
panel->threL = WMCreateLabel(panel->speedF);
WMResizeWidget(panel->threL, 80, 16);
WMMoveWidget(panel->threL, 120, 67);
WMSetLabelTextAlignment(panel->threL, WARight);
WMSetLabelText(panel->threL, _("Threshold:"));
panel->threT = WMCreateTextField(panel->speedF);
@@ -652,7 +668,27 @@ createPanel(Panel *p)
panel->tester = CreateDoubleTest(panel->ddelaF, _("Test"));
WMResizeWidget(panel->tester, 84, 29);
WMMoveWidget(panel->tester, 85, 55);
WMMoveWidget(panel->tester, 35, 55);
panel->ddelaT = WMCreateTextField(panel->ddelaF);
WMResizeWidget(panel->ddelaT, 40, 20);
WMMoveWidget(panel->ddelaT, 140, 60);
panel->ddelaL = WMCreateLabel(panel->ddelaF);
WMResizeWidget(panel->ddelaL, 40, 16);
WMMoveWidget(panel->ddelaL, 185, 65);
{
WMFont *font;
WMColor *color;
font = WMSystemFontOfSize(scr, 10);
color = WMDarkGrayColor(scr);
WMSetLabelTextColor(panel->ddelaL, color);
WMSetLabelFont(panel->ddelaL, font);
WMReleaseFont(font);
WMReleaseColor(color);
}
WMSetLabelText(panel->ddelaL, "msec");
WMMapSubwidgets(panel->ddelaF);
@@ -878,11 +914,9 @@ storeData(_Panel *panel)
free(tmp);
}
for (i=0; i<5; i++) {
if (WMGetButtonSelected(panel->ddelaB[i]))
break;
}
SetIntegerForKey(DELAY(i), "DoubleClickTime");
tmp = WMGetTextFieldText(panel->ddelaT);
if (sscanf(tmp, "%i", &i) == 1 && i > 0)
SetIntegerForKey(i, "DoubleClickTime");
SetBoolForKey(WMGetButtonSelected(panel->disaB), "DisableWSMouseActions");

View File

@@ -42,15 +42,15 @@ typedef struct NoMenuPanel {
"This either means that there is a syntax error in it or that "\
"the menu is in a format not supported by WPrefs (WPrefs only "\
"supports property list menus).\n"\
" If you want to change the current menu, please read "\
"the '%s' file, press 'Keep Current Menu' and edit it with a "\
" If you want to keep using the current menu, please read "\
"the '%s/%s' file, press 'Keep Current Menu' and edit it with a "\
"text editor.\n"\
" If you want to use this editor, press 'Copy Default Menu'. "\
"It will copy the default menu and will instruct Window Maker "\
"to use it instead of the current one.\n"\
" If you want more flexibility, keep using the current one "\
"as it allows you to use C preprocessor (cpp) macros, while being "\
"easy to edit."
"easy to edit. Window Maker supports both formats."
static void
@@ -79,7 +79,7 @@ Bool
AskMenuCopy(WMWindow *wwin)
{
NoMenuPanel panel;
char buffer[1024];
char buffer[2048];
panel.wwin = WMCreatePanelForWindow(wwin, "noMenuAlert");
WMResizeWidget(panel.wwin, 430, 260);
@@ -90,7 +90,8 @@ AskMenuCopy(WMWindow *wwin)
WMResizeWidget(panel.text, 370, 200);
WMMoveWidget(panel.text, 30, 20);
sprintf(buffer, _(MESSAGE_TEXT), "shit/ewq/ewq/rweq");
sprintf(buffer, _(MESSAGE_TEXT), wusergnusteppath(),
"Library/WindowMaker/README");
WMSetLabelText(panel.text, buffer);
panel.copyBtn = WMCreateCommandButton(panel.wwin);

View File

@@ -1,686 +0,0 @@
/* TextureAndColor.c- color/texture for titlebar etc.
*
* WPrefs - Window Maker Preferences Program
*
* Copyright (c) 1998 Alfredo K. Kojima
*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#include "WPrefs.h"
#include "TexturePanel.h"
typedef struct _Panel {
WMFrame *frame;
char *sectionName;
CallbackRec callbacks;
WMWindow *win;
WMPopUpButton *secP;
WMLabel *prevL;
/* window titlebar */
WMFrame *focF;
WMColorWell *focC;
WMLabel *focL;
WMTextField *focT;
WMLabel *foc2L;
WMButton *focB;
WMFrame *unfF;
WMColorWell *unfC;
WMLabel *unfL;
WMTextField *unfT;
WMLabel *unf2L;
WMButton *unfB;
WMFrame *ownF;
WMColorWell *ownC;
WMLabel *ownL;
WMTextField *ownT;
WMLabel *own2L;
WMButton *ownB;
/* menu title */
WMFrame *backF;
WMTextField *backT;
WMButton *backB;
WMFrame *textF;
WMColorWell *textC;
/* menu items */
WMFrame *unsF;
WMTextField *unsT;
WMButton *unsB;
WMLabel *unsL;
WMColorWell *unsnC;
WMLabel *unsnL;
WMColorWell *unsdC;
WMLabel *unsdL;
WMFrame *selF;
WMColorWell *seltC;
WMLabel *seltL;
WMColorWell *selbC;
WMLabel *selbL;
/* workspace/clip */
WMFrame *workF;
WMTextField *workT;
WMButton *workB;
WMFrame *clipF;
WMColorWell *clipnC;
WMColorWell *clipcC;
WMLabel *clipnL;
WMLabel *clipcL;
/* icon */
WMFrame *iconF;
WMTextField *iconT;
WMButton *iconB;
Pixmap preview;
Pixmap ftitle;
Pixmap utitle;
Pixmap otitle;
Pixmap icon;
Pixmap back;
Pixmap mtitle;
Pixmap mitem;
} _Panel;
#define ICON_FILE "appearance"
#define FTITLE (1<<0)
#define UTITLE (1<<1)
#define OTITLE (1<<2)
#define ICON (1<<3)
#define BACK (1<<4)
#define MTITLE (1<<5)
#define MITEM (1<<6)
#define EVERYTHING 0xff
static Pixmap
renderTexture(_Panel *panel, char *texture, int width, int height,
Bool bordered)
{
return None;
}
static void
updatePreviewBox(_Panel *panel, int elements)
{
WMScreen *scr = WMWidgetScreen(panel->win);
Display *dpy = WMScreenDisplay(scr);
/* RContext *rc = WMScreenRContext(scr);*/
int refresh = 0;
char *tmp;
if (!panel->preview) {
panel->preview = XCreatePixmap(dpy, WMWidgetXID(panel->win),
220-4, 185-4, WMScreenDepth(scr));
refresh = -1;
}
if (elements & FTITLE) {
if (panel->ftitle)
XFreePixmap(dpy, panel->ftitle);
tmp = WMGetTextFieldText(panel->focT);
panel->ftitle = renderTexture(panel, tmp, 180, 20, True);
free(tmp);
}
/* have to repaint everything to make things simple, eliminating
* clipping stuff */
if (refresh) {
}
if (refresh<0) {
WMPixmap *pix;
pix = WMCreatePixmapFromXPixmaps(scr, panel->preview, None,
220-4, 185-4, WMScreenDepth(scr));
WMSetLabelImage(panel->prevL, pix);
WMReleasePixmap(pix);
}
}
static void
changePage(WMWidget *self, void *data)
{
int i;
_Panel *panel = (_Panel*)data;
i = WMGetPopUpButtonSelectedItem(self);
if (i==0) {
WMMapWidget(panel->focF);
WMMapWidget(panel->unfF);
WMMapWidget(panel->ownF);
} else if (i==1) {
WMMapWidget(panel->backF);
WMMapWidget(panel->textF);
} else if (i==2) {
WMMapWidget(panel->unsF);
WMMapWidget(panel->selF);
} else if (i==3) {
WMMapWidget(panel->workF);
WMMapWidget(panel->clipF);
} else if (i==4) {
WMMapWidget(panel->iconF);
}
if (i!=0) {
WMUnmapWidget(panel->focF);
WMUnmapWidget(panel->unfF);
WMUnmapWidget(panel->ownF);
}
if (i!=1) {
WMUnmapWidget(panel->backF);
WMUnmapWidget(panel->textF);
}
if (i!=2) {
WMUnmapWidget(panel->unsF);
WMUnmapWidget(panel->selF);
}
if (i!=3) {
WMUnmapWidget(panel->workF);
WMUnmapWidget(panel->clipF);
}
if (i!=4) {
WMUnmapWidget(panel->iconF);
}
}
static char*
getStrArrayForKey(char *key)
{
proplist_t v;
v = GetObjectForKey(key);
if (!v)
return NULL;
return PLGetDescription(v);
}
static void
showData(_Panel *panel)
{
char *str;
WMScreen *scr = WMWidgetScreen(panel->win);
WMColor *color;
str = GetStringForKey("FTitleColor");
if (!str)
str = "white";
color = WMCreateNamedColor(scr, str, True);
WMSetColorWellColor(panel->focC, color);
WMReleaseColor(color);
str = GetStringForKey("PTitleColor");
if (!str)
str = "white";
color = WMCreateNamedColor(scr, str, True);
WMSetColorWellColor(panel->ownC, color);
WMReleaseColor(color);
str = GetStringForKey("UTitleColor");
if (!str)
str = "black";
color = WMCreateNamedColor(scr, str, True);
WMSetColorWellColor(panel->unfC, color);
WMReleaseColor(color);
str = getStrArrayForKey("FTitleBack");
if (!str)
str = wstrdup("(solid, black)");
WMSetTextFieldText(panel->focT, str);
free(str);
str = getStrArrayForKey("PTitleBack");
if (!str)
str = wstrdup("(solid, gray40)");
WMSetTextFieldText(panel->ownT, str);
free(str);
str = getStrArrayForKey("UTitleBack");
if (!str)
str = wstrdup("(solid, grey66)");
WMSetTextFieldText(panel->unfT, str);
free(str);
/**/
str = GetStringForKey("MenuTitleColor");
if (!str)
str = "white";
color = WMCreateNamedColor(scr, str, True);
WMSetColorWellColor(panel->textC, color);
WMReleaseColor(color);
str = getStrArrayForKey("MenuTitleBack");
if (!str)
str = wstrdup("(solid, black)");
WMSetTextFieldText(panel->backT, str);
free(str);
/**/
str = getStrArrayForKey("MenuTextBack");
if (!str)
str = wstrdup("gray66");
WMSetTextFieldText(panel->unsT, str);
free(str);
str = GetStringForKey("MenuTextColor");
if (!str)
str = "black";
color = WMCreateNamedColor(scr, str, True);
WMSetColorWellColor(panel->unsnC, color);
WMReleaseColor(color);
str = GetStringForKey("MenuDisabledColor");
if (!str)
str = "gray40";
color = WMCreateNamedColor(scr, str, True);
WMSetColorWellColor(panel->unsdC, color);
WMReleaseColor(color);
str = GetStringForKey("HighlightTextColor");
if (!str)
str = "white";
color = WMCreateNamedColor(scr, str, True);
WMSetColorWellColor(panel->seltC, color);
WMReleaseColor(color);
str = GetStringForKey("HighlightColor");
if (!str)
str = "black";
color = WMCreateNamedColor(scr, str, True);
WMSetColorWellColor(panel->selbC, color);
WMReleaseColor(color);
/**/
str = getStrArrayForKey("WorkspaceBack");
WMSetTextFieldText(panel->workT, str);
if (str)
free(str);
str = GetStringForKey("ClipTitleColor");
if (!str)
str = "black";
color = WMCreateNamedColor(scr, str, True);
WMSetColorWellColor(panel->clipnC, color);
WMReleaseColor(color);
str = GetStringForKey("CClipTitleColor");
if (!str)
str = "grey40";
color = WMCreateNamedColor(scr, str, True);
WMSetColorWellColor(panel->clipcC, color);
WMReleaseColor(color);
/**/
str = getStrArrayForKey("IconBack");
if (!str)
str = wstrdup("(solid, gray66)");
WMSetTextFieldText(panel->iconT, str);
free(str);
}
static void
createPanel(Panel *p)
{
_Panel *panel = (_Panel*)p;
panel->frame = WMCreateFrame(panel->win);
WMResizeWidget(panel->frame, FRAME_WIDTH, FRAME_HEIGHT);
WMMoveWidget(panel->frame, FRAME_LEFT, FRAME_TOP);
panel->secP = WMCreatePopUpButton(panel->frame);
WMResizeWidget(panel->secP, 220, 20);
WMMoveWidget(panel->secP, 15, 10);
WMSetPopUpButtonAction(panel->secP, changePage, panel);
WMAddPopUpButtonItem(panel->secP, _("Window Title Bar"));
WMAddPopUpButtonItem(panel->secP, _("Menu Title Bar"));
WMAddPopUpButtonItem(panel->secP, _("Menu Items"));
WMAddPopUpButtonItem(panel->secP, _("Workspace/Clip"));
WMAddPopUpButtonItem(panel->secP, _("Icons"));
panel->prevL = WMCreateLabel(panel->frame);
WMResizeWidget(panel->prevL, 220, 185);
WMMoveWidget(panel->prevL, 15, 40);
WMSetLabelRelief(panel->prevL, WRSunken);
/* window titlebar */
panel->focF = WMCreateFrame(panel->frame);
WMResizeWidget(panel->focF, 265, 70);
WMMoveWidget(panel->focF, 245, 5);
WMSetFrameTitle(panel->focF, _("Focused Window"));
panel->focC = WMCreateColorWell(panel->focF);
WMResizeWidget(panel->focC, 60, 35);
WMMoveWidget(panel->focC, 15, 15);
panel->focT = WMCreateTextField(panel->focF);
WMResizeWidget(panel->focT, 116, 20);
WMMoveWidget(panel->focT, 85, 25);
panel->foc2L = WMCreateLabel(panel->focF);
WMResizeWidget(panel->foc2L, 165, 16);
WMMoveWidget(panel->foc2L, 90, 50);
WMSetLabelText(panel->foc2L, _("Texture"));
WMSetLabelTextAlignment(panel->foc2L, WACenter);
panel->focL = WMCreateLabel(panel->focF);
WMResizeWidget(panel->focL, 100, 16);
WMMoveWidget(panel->focL, 15, 50);
WMSetLabelText(panel->focL, _("Text Color"));
panel->focB = WMCreateCommandButton(panel->focF);
WMResizeWidget(panel->focB, 48, 22);
WMMoveWidget(panel->focB, 205, 24);
WMSetButtonText(panel->focB, _("Set..."));
WMMapSubwidgets(panel->focF);
/**/
panel->unfF = WMCreateFrame(panel->frame);
WMResizeWidget(panel->unfF, 265, 70);
WMMoveWidget(panel->unfF, 245, 80);
WMSetFrameTitle(panel->unfF, _("Unfocused Window"));
panel->unfC = WMCreateColorWell(panel->unfF);
WMResizeWidget(panel->unfC, 60, 35);
WMMoveWidget(panel->unfC, 15, 15);
panel->unfT = WMCreateTextField(panel->unfF);
WMResizeWidget(panel->unfT, 116, 20);
WMMoveWidget(panel->unfT, 85, 25);
panel->unf2L = WMCreateLabel(panel->unfF);
WMResizeWidget(panel->unf2L, 165, 16);
WMMoveWidget(panel->unf2L, 90, 50);
WMSetLabelText(panel->unf2L, _("Texture"));
WMSetLabelTextAlignment(panel->unf2L, WACenter);
panel->unfL = WMCreateLabel(panel->unfF);
WMResizeWidget(panel->unfL, 100, 16);
WMMoveWidget(panel->unfL, 15, 50);
WMSetLabelText(panel->unfL, _("Text Color"));
panel->unfB = WMCreateCommandButton(panel->unfF);
WMResizeWidget(panel->unfB, 48, 22);
WMMoveWidget(panel->unfB, 205, 24);
WMSetButtonText(panel->unfB, _("Set..."));
WMMapSubwidgets(panel->unfF);
/**/
panel->ownF = WMCreateFrame(panel->frame);
WMResizeWidget(panel->ownF, 265, 70);
WMMoveWidget(panel->ownF, 245, 155);
WMSetFrameTitle(panel->ownF, _("Owner of Focused Window"));
panel->ownC = WMCreateColorWell(panel->ownF);
WMResizeWidget(panel->ownC, 60, 35);
WMMoveWidget(panel->ownC, 15, 15);
panel->ownT = WMCreateTextField(panel->ownF);
WMResizeWidget(panel->ownT, 116, 20);
WMMoveWidget(panel->ownT, 85, 25);
panel->own2L = WMCreateLabel(panel->ownF);
WMResizeWidget(panel->own2L, 165, 16);
WMMoveWidget(panel->own2L, 90, 50);
WMSetLabelText(panel->own2L, _("Texture"));
WMSetLabelTextAlignment(panel->own2L, WACenter);
panel->ownL = WMCreateLabel(panel->ownF);
WMResizeWidget(panel->ownL, 100, 16);
WMMoveWidget(panel->ownL, 15, 50);
WMSetLabelText(panel->ownL, _("Text Color"));
panel->ownB = WMCreateCommandButton(panel->ownF);
WMResizeWidget(panel->ownB, 48, 22);
WMMoveWidget(panel->ownB, 205, 24);
WMSetButtonText(panel->ownB, _("Set..."));
WMMapSubwidgets(panel->ownF);
/***************** Menu Item *****************/
panel->unsF = WMCreateFrame(panel->frame);
WMResizeWidget(panel->unsF, 260, 140);
WMMoveWidget(panel->unsF, 250, 5);
WMSetFrameTitle(panel->unsF, _("Unselected Items"));
panel->unsT = WMCreateTextField(panel->unsF);
WMResizeWidget(panel->unsT, 175, 20);
WMMoveWidget(panel->unsT, 15, 25);
panel->unsL = WMCreateLabel(panel->unsF);
WMResizeWidget(panel->unsL, 175, 16);
WMMoveWidget(panel->unsL, 15, 50);
WMSetLabelTextAlignment(panel->unsL, WACenter);
WMSetLabelText(panel->unsL, _("Background"));
panel->unsB = WMCreateCommandButton(panel->unsF);
WMResizeWidget(panel->unsB, 48, 22);
WMMoveWidget(panel->unsB, 200, 24);
WMSetButtonText(panel->unsB, _("Set..."));
panel->unsnC = WMCreateColorWell(panel->unsF);
WMResizeWidget(panel->unsnC, 60, 40);
WMMoveWidget(panel->unsnC, 40, 75);
panel->unsnL = WMCreateLabel(panel->unsF);
WMResizeWidget(panel->unsnL, 120, 16);
WMMoveWidget(panel->unsnL, 10, 117);
WMSetLabelTextAlignment(panel->unsnL, WACenter);
WMSetLabelText(panel->unsnL, _("Normal Text"));
panel->unsdC = WMCreateColorWell(panel->unsF);
WMResizeWidget(panel->unsdC, 60, 40);
WMMoveWidget(panel->unsdC, 160, 75);
panel->unsdL = WMCreateLabel(panel->unsF);
WMResizeWidget(panel->unsdL, 120, 16);
WMMoveWidget(panel->unsdL, 130, 117);
WMSetLabelTextAlignment(panel->unsdL, WACenter);
WMSetLabelText(panel->unsdL, _("Disabled Text"));
WMMapSubwidgets(panel->unsF);
/**/
panel->selF = WMCreateFrame(panel->frame);
WMResizeWidget(panel->selF, 260, 75);
WMMoveWidget(panel->selF, 250, 150);
WMSetFrameTitle(panel->selF, _("Selected Items"));
panel->seltC = WMCreateColorWell(panel->selF);
WMResizeWidget(panel->seltC, 60, 36);
WMMoveWidget(panel->seltC, 40, 20);
panel->seltL = WMCreateLabel(panel->selF);
WMResizeWidget(panel->seltL, 120, 16);
WMMoveWidget(panel->seltL, 10, 56);
WMSetLabelTextAlignment(panel->seltL, WACenter);
WMSetLabelText(panel->seltL, _("Text"));
panel->selbC = WMCreateColorWell(panel->selF);
WMResizeWidget(panel->selbC, 60, 36);
WMMoveWidget(panel->selbC, 160, 20);
panel->selbL = WMCreateLabel(panel->selF);
WMResizeWidget(panel->selbL, 120, 16);
WMMoveWidget(panel->selbL, 130, 56);
WMSetLabelTextAlignment(panel->selbL, WACenter);
WMSetLabelText(panel->selbL, _("Background"));
WMMapSubwidgets(panel->selF);
/***************** Menu Title *****************/
panel->backF = WMCreateFrame(panel->frame);
WMResizeWidget(panel->backF, 260, 110);
WMMoveWidget(panel->backF, 250, 35);
WMSetFrameTitle(panel->backF, _("Menu Title Background"));
panel->backT = WMCreateTextField(panel->backF);
WMResizeWidget(panel->backT, 210, 20);
WMMoveWidget(panel->backT, 25, 35);
panel->backB = WMCreateCommandButton(panel->backF);
WMResizeWidget(panel->backB, 50, 24);
WMMoveWidget(panel->backB, 185, 60);
WMSetButtonText(panel->backB, _("Set..."));
WMMapSubwidgets(panel->backF);
/**/
panel->textF = WMCreateFrame(panel->frame);
WMResizeWidget(panel->textF, 260, 75);
WMMoveWidget(panel->textF, 250, 150);
WMSetFrameTitle(panel->textF, _("Menu Title Text"));
panel->textC = WMCreateColorWell(panel->textF);
WMResizeWidget(panel->textC, 60, 40);
WMMoveWidget(panel->textC, 100, 20);
WMMapSubwidgets(panel->textF);
/***************** Workspace ****************/
panel->workF = WMCreateFrame(panel->frame);
WMResizeWidget(panel->workF, 260, 90);
WMMoveWidget(panel->workF, 250, 35);
WMSetFrameTitle(panel->workF, _("Workspace Background"));
panel->workT = WMCreateTextField(panel->workF);
WMResizeWidget(panel->workT, 220, 20);
WMMoveWidget(panel->workT, 20, 25);
panel->workB = WMCreateCommandButton(panel->workF);
WMResizeWidget(panel->workB, 70, 24);
WMMoveWidget(panel->workB, 170, 55);
WMSetButtonText(panel->workB, _("Change"));
/**/
panel->clipF = WMCreateFrame(panel->frame);
WMResizeWidget(panel->clipF, 260, 90);
WMMoveWidget(panel->clipF, 250, 135);
WMSetFrameTitle(panel->clipF, _("Clip Title Text"));
panel->clipnC = WMCreateColorWell(panel->clipF);
WMResizeWidget(panel->clipnC, 60, 40);
WMMoveWidget(panel->clipnC, 40, 25);
panel->clipnL = WMCreateLabel(panel->clipF);
WMResizeWidget(panel->clipnL, 120, 16);
WMMoveWidget(panel->clipnL, 10, 70);
WMSetLabelTextAlignment(panel->clipnL, WACenter);
WMSetLabelText(panel->clipnL, _("Normal"));
panel->clipcC = WMCreateColorWell(panel->clipF);
WMResizeWidget(panel->clipcC, 60, 40);
WMMoveWidget(panel->clipcC, 160, 25);
panel->clipcL = WMCreateLabel(panel->clipF);
WMResizeWidget(panel->clipcL, 120, 16);
WMMoveWidget(panel->clipcL, 130, 70);
WMSetLabelTextAlignment(panel->clipcL, WACenter);
WMSetLabelText(panel->clipcL, _("Collapsed"));
WMMapSubwidgets(panel->clipF);
WMMapSubwidgets(panel->workF);
/***************** Icon *****************/
panel->iconF = WMCreateFrame(panel->frame);
WMResizeWidget(panel->iconF, 260, 190);
WMMoveWidget(panel->iconF, 250, 35);
WMSetFrameTitle(panel->iconF, _("Icon Background"));
panel->iconT = WMCreateTextField(panel->iconF);
WMResizeWidget(panel->iconT, 220, 20);
WMMoveWidget(panel->iconT, 20, 80);
panel->iconB = WMCreateCommandButton(panel->iconF);
WMResizeWidget(panel->iconB, 50, 24);
WMMoveWidget(panel->iconB, 190, 105);
WMSetButtonText(panel->iconB, _("Set..."));
WMMapSubwidgets(panel->iconF);
/**/
WMRealizeWidget(panel->frame);
WMMapSubwidgets(panel->frame);
WMSetPopUpButtonSelectedItem(panel->secP, 0);
changePage(panel->secP, panel);
showData(panel);
}
Panel*
InitTextureAndColor(WMScreen *scr, WMWindow *win)
{
_Panel *panel;
panel = wmalloc(sizeof(_Panel));
memset(panel, 0, sizeof(_Panel));
panel->sectionName = _("Texture and Color Preferences");
panel->win = win;
panel->callbacks.createWidgets = createPanel;
AddSection(panel, ICON_FILE);
return panel;
}

File diff suppressed because it is too large Load Diff

View File

@@ -55,8 +55,6 @@ extern Panel *InitIcons(WMScreen *scr, WMWindow *win);
extern Panel *InitThemes(WMScreen *scr, WMWindow *win);
extern Panel *InitTextureAndColor(WMScreen *scr, WMWindow *win);
extern Panel *InitAppearance(WMScreen *scr, WMWindow *win);
@@ -373,32 +371,20 @@ LocateImage(char *name)
void
AddSection(Panel *panel, char *iconFile)
SetButtonAlphaImage(WMScreen *scr, WMButton *bPtr, char *file)
{
WMButton *bPtr;
WMPixmap *icon;
RColor color;
char *iconPath;
assert(WPrefs.sectionCount < MAX_SECTIONS);
iconPath = LocateImage(iconFile);
bPtr = WMCreateCustomButton(WPrefs.buttonF, WBBStateLightMask
|WBBStateChangeMask);
WMResizeWidget(bPtr, 64, 64);
WMMoveWidget(bPtr, WPrefs.sectionCount*64, 0);
WMSetButtonImagePosition(bPtr, WIPImageOnly);
WMSetButtonAction(bPtr, changeSection, panel);
WMHangData(bPtr, panel);
iconPath = LocateImage(file);
color.red = 0xae;
color.green = 0xaa;
color.blue = 0xae;
color.alpha = 0;
if (iconPath) {
icon = WMCreateBlendedPixmapFromFile(WMWidgetScreen(WPrefs.win),
iconPath, &color);
icon = WMCreateBlendedPixmapFromFile(scr, iconPath, &color);
if (!icon)
wwarning(_("could not load icon file %s"), iconPath);
} else {
@@ -415,8 +401,7 @@ AddSection(Panel *panel, char *iconFile)
color.blue = 0xff;
color.alpha = 0;
if (iconPath) {
icon = WMCreateBlendedPixmapFromFile(WMWidgetScreen(WPrefs.win),
iconPath, &color);
icon = WMCreateBlendedPixmapFromFile(scr, iconPath, &color);
if (!icon)
wwarning(_("could not load icon file %s"), iconPath);
} else {
@@ -428,6 +413,29 @@ AddSection(Panel *panel, char *iconFile)
if (icon)
WMReleasePixmap(icon);
if (iconPath)
free(iconPath);
}
void
AddSection(Panel *panel, char *iconFile)
{
WMButton *bPtr;
assert(WPrefs.sectionCount < MAX_SECTIONS);
bPtr = WMCreateCustomButton(WPrefs.buttonF, WBBStateLightMask
|WBBStateChangeMask);
WMResizeWidget(bPtr, 64, 64);
WMMoveWidget(bPtr, WPrefs.sectionCount*64, 0);
WMSetButtonImagePosition(bPtr, WIPImageOnly);
WMSetButtonAction(bPtr, changeSection, panel);
WMHangData(bPtr, panel);
SetButtonAlphaImage(WMWidgetScreen(bPtr), bPtr, iconFile);
WMMapWidget(bPtr);
WPrefs.sectionB[WPrefs.sectionCount] = bPtr;
@@ -439,8 +447,6 @@ AddSection(Panel *panel, char *iconFile)
WPrefs.sectionCount++;
WMResizeWidget(WPrefs.buttonF, WPrefs.sectionCount*64, 64);
free(iconPath);
}
@@ -494,7 +500,7 @@ Initialize(WMScreen *scr)
loadConfigurations(scr, WPrefs.win);
WMSetLabelText(WPrefs.statusL, _("Initializing configuration panels..."));
#if 1
InitWindowHandling(scr, WPrefs.win);
InitFocus(scr, WPrefs.win);
InitMenuPreferences(scr, WPrefs.win);
@@ -504,22 +510,22 @@ Initialize(WMScreen *scr)
InitPaths(scr, WPrefs.win);
InitWorkspace(scr, WPrefs.win);
InitConfigurations(scr, WPrefs.win);
#endif
InitMenu(scr, WPrefs.win);
#if 1
#ifdef not_yet_fully_implemented
InitKeyboardSettings(scr, WPrefs.win);
#endif
InitKeyboardShortcuts(scr, WPrefs.win);
InitMouseSettings(scr, WPrefs.win);
#ifdef not_yet_fully_implemented
InitAppearance(scr, WPrefs.win);
InitText(scr, WPrefs.win);
InitThemes(scr, WPrefs.win);
#endif
InitExpert(scr, WPrefs.win);
#endif
WMRealizeWidget(WPrefs.scrollV);
WMSetLabelText(WPrefs.statusL,

View File

@@ -42,7 +42,7 @@
/****/
#define WVERSION "0.11"
#define WVERSION "0.20"
#define WMVERSION "0.51.x"
@@ -73,6 +73,8 @@ void AddSection(Panel *panel, char *iconFile);
char *LocateImage(char *name);
void SetButtonAlphaImage(WMScreen *scr, WMButton *bPtr, char *file);
WMWindow *GetWindow(Panel *panel);
/* manipulate the dictionary for the WindowMaker domain */

View File

@@ -223,7 +223,7 @@ createPanel(Panel *p)
WMSetFrameTitle(panel->placF, _("Window Placement"));
panel->placP = WMCreatePopUpButton(panel->placF);
WMResizeWidget(panel->placP, 120, 20);
WMResizeWidget(panel->placP, 105, 20);
WMMoveWidget(panel->placP, 15, 20);
WMAddPopUpButtonItem(panel->placP, _("Automatic"));
WMAddPopUpButtonItem(panel->placP, _("Random"));
@@ -231,7 +231,7 @@ createPanel(Panel *p)
WMAddPopUpButtonItem(panel->placP, _("Cascade"));
panel->porigL = WMCreateLabel(panel->placF);
WMResizeWidget(panel->porigL, 138, 32);
WMResizeWidget(panel->porigL, 120, 32);
WMMoveWidget(panel->porigL, 5, 45);
WMSetLabelTextAlignment(panel->porigL, WACenter);
WMSetLabelText(panel->porigL, _("Placement Origin"));
@@ -250,15 +250,21 @@ createPanel(Panel *p)
swidth = WidthOfScreen(DefaultScreenOfDisplay(WMScreenDisplay(scr)));
sheight = HeightOfScreen(DefaultScreenOfDisplay(WMScreenDisplay(scr)));
if (120*sheight/swidth < 70*swidth/sheight) {
width = 70*swidth/sheight;
if (sheight > swidth) {
height = 70;
width = 70*swidth/sheight;
if (width > 115)
width = 115;
height = 115*sheight/swidth;
} else {
height = 120*sheight/swidth;
width = 120;
width = 115;
height = 115*sheight/swidth;
if (height > 70)
height = 70;
width = 70*swidth/sheight;
}
WMResizeWidget(panel->porigF, width, height);
WMMoveWidget(panel->porigF, 135+(120-width)/2, 20+(70-height)/2);
WMMoveWidget(panel->porigF, 130+(115-width)/2, 20+(70-height)/2);
panel->porigW = WMCreateLabel(panel->porigF);
WMResizeWidget(panel->porigW, THUMB_SIZE, THUMB_SIZE);
@@ -268,14 +274,14 @@ createPanel(Panel *p)
panel->hsli = WMCreateSlider(panel->placF);
WMResizeWidget(panel->hsli, width, 12);
WMMoveWidget(panel->hsli, 135+(120-width)/2, 20+(70-height)/2+height+2);
WMMoveWidget(panel->hsli, 130+(115-width)/2, 20+(70-height)/2+height+2);
WMSetSliderAction(panel->hsli, sliderCallback, panel);
WMSetSliderMinValue(panel->hsli, 0);
WMSetSliderMaxValue(panel->hsli, swidth);
panel->vsli = WMCreateSlider(panel->placF);
WMResizeWidget(panel->vsli, 12, height);
WMMoveWidget(panel->vsli, 135+(120-width)/2+width+2, 20+(70-height)/2);
WMMoveWidget(panel->vsli, 130+(115-width)/2+width+2, 20+(70-height)/2);
WMSetSliderAction(panel->vsli, sliderCallback, panel);
WMSetSliderMinValue(panel->vsli, 0);
WMSetSliderMaxValue(panel->vsli, sheight);

View File

@@ -105,7 +105,7 @@ paintDoubleTest(_DoubleTest *dPtr)
W_Screen *scr = dPtr->view->screen;
if (dPtr->active) {
XFillRectangle(scr->display, dPtr->view->window, W_GC(scr->white),
XFillRectangle(scr->display, dPtr->view->window, WMColorGC(scr->white),
0, 0, dPtr->view->size.width, dPtr->view->size.height);
} else {
XClearWindow(scr->display, dPtr->view->window);
@@ -119,7 +119,7 @@ paintDoubleTest(_DoubleTest *dPtr)
y = (dPtr->view->size.height-scr->normalFont->height)/2;
W_PaintText(dPtr->view, dPtr->view->window, scr->normalFont,
dPtr->on, dPtr->on+y, dPtr->view->size.width, WACenter,
W_GC(scr->black), False, dPtr->text, strlen(dPtr->text));
WMColorGC(scr->black), False, dPtr->text, strlen(dPtr->text));
}
}

View File

@@ -150,7 +150,7 @@ paintEditMenuItem(WEditMenuItem *iPtr)
W_DrawRelief(scr, win, 0, 0, w+1, h, WRRaised);
WMDrawString(scr, win, W_GC(black), scr->normalFont, 5, 3, iPtr->label,
WMDrawString(scr, win, WMColorGC(black), scr->normalFont, 5, 3, iPtr->label,
strlen(iPtr->label));
}
@@ -366,7 +366,7 @@ WInsertMenuItemWithTitle(WEditMenu *mPtr, char *title, int index)
index = mPtr->itemCount;
if (mPtr->itemCount == mPtr->itemsAlloced) {
WEditMenuItem **newList;
WEditMenuItem *newList;
newList = wmalloc(sizeof(WEditMenuItem*)*(mPtr->itemsAlloced+10));
memset(newList, 0, sizeof(WEditMenuItem*)*(mPtr->itemsAlloced+10));
@@ -458,11 +458,11 @@ paintMenuTitle(WEditMenu *mPtr)
int w = W_VIEW(mPtr)->size.width;
int h = mPtr->titleHeight;
XFillRectangle(scr->display, win, W_GC(black), 0, 0, w, h);
XFillRectangle(scr->display, win, WMColorGC(black), 0, 0, w, h);
W_DrawRelief(scr, win, 0, 0, w+1, h, WRRaised);
WMDrawString(scr, win, W_GC(white), scr->boldFont, 5, 4, mPtr->label,
WMDrawString(scr, win, WMColorGC(white), scr->boldFont, 5, 4, mPtr->label,
strlen(mPtr->label));
}

View File

@@ -165,7 +165,7 @@ main(int argc, char **argv)
wfatal(_("could not open display %s"), XDisplayName(display_name));
exit(0);
}
#if 1
#if 0
XSynchronize(dpy, 1);
#endif
scr = WMCreateScreen(dpy, DefaultScreen(dpy));

View File

@@ -1,6 +1,6 @@
CATALOGS = @WPMOFILES@
nlsdir = $(DESTDIR)$(NLSDIR)
nlsdir = $(NLSDIR)
CLEANFILES = $(CATALOGS)

View File

@@ -89,7 +89,7 @@ wprefsdir = @wprefsdir@
CATALOGS = @WPMOFILES@
nlsdir = $(DESTDIR)$(NLSDIR)
nlsdir = $(NLSDIR)
CLEANFILES = $(CATALOGS)