mirror of
https://github.com/gryf/wmaker.git
synced 2026-06-14 14:25:21 +02:00
Initial revision
This commit is contained in:
@@ -0,0 +1,458 @@
|
||||
/* Configurations.c- misc. configurations
|
||||
*
|
||||
* WPrefs - WindowMaker 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"
|
||||
|
||||
typedef struct _Panel {
|
||||
WMFrame *frame;
|
||||
char *sectionName;
|
||||
|
||||
CallbackRec callbacks;
|
||||
|
||||
WMWindow *win;
|
||||
|
||||
WMFrame *icoF;
|
||||
WMButton *icoB[5];
|
||||
|
||||
WMFrame *shaF;
|
||||
WMButton *shaB[5];
|
||||
|
||||
WMFrame *titlF;
|
||||
WMButton *oldsB;
|
||||
WMButton *newsB;
|
||||
|
||||
WMFrame *animF;
|
||||
WMButton *animB;
|
||||
WMButton *supB;
|
||||
WMButton *sfxB;
|
||||
WMLabel *noteL;
|
||||
|
||||
WMFrame *dithF;
|
||||
WMButton *dithB;
|
||||
WMSlider *dithS;
|
||||
WMLabel *dithL;
|
||||
WMLabel *dith1L;
|
||||
WMLabel *dith2L;
|
||||
|
||||
int cmapSize;
|
||||
} _Panel;
|
||||
|
||||
|
||||
|
||||
#define ICON_FILE "configs"
|
||||
|
||||
#define OLDS_IMAGE "oldstyle"
|
||||
#define NEWS_IMAGE "newstyle"
|
||||
|
||||
#define ANIM_IMAGE "animations"
|
||||
#define SUPERF_IMAGE "moreanim"
|
||||
#define SOUND_IMAGE "sound"
|
||||
|
||||
#define SPEED_IMAGE "speed%i"
|
||||
#define SPEED_IMAGE_S "speed%is"
|
||||
|
||||
#define ARQUIVO_XIS "xis"
|
||||
|
||||
|
||||
static void updateLabel(WMWidget *self, void *data);
|
||||
|
||||
|
||||
static void
|
||||
showData(_Panel *panel)
|
||||
{
|
||||
WMPerformButtonClick(panel->icoB[GetSpeedForKey("IconSlideSpeed")]);
|
||||
|
||||
WMPerformButtonClick(panel->shaB[GetSpeedForKey("ShadeSpeed")]);
|
||||
|
||||
if (GetBoolForKey("NewStyle")) {
|
||||
WMPerformButtonClick(panel->newsB);
|
||||
} else {
|
||||
WMPerformButtonClick(panel->oldsB);
|
||||
}
|
||||
|
||||
WMSetButtonSelected(panel->animB, !GetBoolForKey("DisableAnimations"));
|
||||
|
||||
WMSetButtonSelected(panel->supB, GetBoolForKey("Superfluous"));
|
||||
|
||||
WMSetButtonSelected(panel->sfxB, !GetBoolForKey("DisableSound"));
|
||||
|
||||
WMSetButtonSelected(panel->dithB, GetBoolForKey("DisableDithering"));
|
||||
|
||||
WMSetSliderValue(panel->dithS, GetIntegerForKey("ColormapSize"));
|
||||
|
||||
updateLabel(panel->dithS, panel);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
updateLabel(WMWidget *self, void *data)
|
||||
{
|
||||
WMSlider *sPtr = (WMSlider*)self;
|
||||
_Panel *panel = (_Panel*)data;
|
||||
char buffer[64];
|
||||
float fl;
|
||||
|
||||
fl = WMGetSliderValue(sPtr);
|
||||
|
||||
panel->cmapSize = (int)fl;
|
||||
|
||||
sprintf(buffer, "%i", panel->cmapSize*panel->cmapSize*panel->cmapSize);
|
||||
WMSetLabelText(panel->dithL, buffer);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
createImages(WMScreen *scr, RContext *rc, RImage *xis, char *file,
|
||||
WMPixmap **icon1, WMPixmap **icon2)
|
||||
{
|
||||
RImage *icon;
|
||||
char *path;
|
||||
|
||||
*icon1 = NULL;
|
||||
*icon2 = NULL;
|
||||
|
||||
path = LocateImage(file);
|
||||
if (!path) {
|
||||
return;
|
||||
}
|
||||
|
||||
*icon1 = WMCreatePixmapFromFile(scr, path);
|
||||
if (!*icon1) {
|
||||
wwarning(_("could not load icon %s"), path);
|
||||
free(path);
|
||||
return;
|
||||
}
|
||||
icon = RLoadImage(rc, path, 0);
|
||||
if (!icon) {
|
||||
wwarning(_("could not load icon %s"), path);
|
||||
free(path);
|
||||
return;
|
||||
}
|
||||
if (xis) {
|
||||
RCombineImages(icon, xis);
|
||||
if (!(*icon2 = WMCreatePixmapFromRImage(scr, icon, 127)))
|
||||
wwarning(_("could not process icon %s:"), file, RErrorString);
|
||||
}
|
||||
RDestroyImage(icon);
|
||||
free(path);
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void
|
||||
createPanel(Panel *p)
|
||||
{
|
||||
_Panel *panel = (_Panel*)p;
|
||||
WMScreen *scr = WMWidgetScreen(panel->win);
|
||||
char *buf1, *buf2;
|
||||
WMPixmap *icon, *altIcon;
|
||||
RImage *xis = NULL;
|
||||
int i;
|
||||
RContext *rc = WMScreenRContext(scr);
|
||||
WMFont *font = WMSystemFontOfSize(scr, 10);
|
||||
char *path;
|
||||
|
||||
path = LocateImage(ARQUIVO_XIS);
|
||||
if (path) {
|
||||
xis = RLoadImage(rc, path, 0);
|
||||
if (!xis) {
|
||||
wwarning(_("could not load image file %s"), path);
|
||||
}
|
||||
free(path);
|
||||
}
|
||||
|
||||
panel->frame = WMCreateFrame(panel->win);
|
||||
WMResizeWidget(panel->frame, FRAME_WIDTH, FRAME_HEIGHT);
|
||||
WMMoveWidget(panel->frame, FRAME_LEFT, FRAME_TOP);
|
||||
|
||||
/*********** Icon Slide Speed **********/
|
||||
|
||||
panel->icoF = WMCreateFrame(panel->frame);
|
||||
WMResizeWidget(panel->icoF, 230, 55);
|
||||
WMMoveWidget(panel->icoF, 15, 10);
|
||||
WMSetFrameTitle(panel->icoF, _("Icon Slide Speed"));
|
||||
|
||||
/*********** Shade Animation Speed **********/
|
||||
panel->shaF = WMCreateFrame(panel->frame);
|
||||
WMResizeWidget(panel->shaF, 230, 55);
|
||||
WMMoveWidget(panel->shaF, 15, 70);
|
||||
WMSetFrameTitle(panel->shaF, _("Shade Animation Speed"));
|
||||
|
||||
|
||||
buf1 = wmalloc(strlen(SPEED_IMAGE)+1);
|
||||
buf2 = wmalloc(strlen(SPEED_IMAGE_S)+1);
|
||||
|
||||
for (i = 0; i < 5; i++) {
|
||||
panel->icoB[i] = WMCreateCustomButton(panel->icoF, WBBStateChangeMask);
|
||||
panel->shaB[i] = WMCreateCustomButton(panel->shaF, WBBStateChangeMask);
|
||||
WMResizeWidget(panel->icoB[i], 40, 35);
|
||||
WMMoveWidget(panel->icoB[i], 10+(40*i), 15);
|
||||
WMResizeWidget(panel->shaB[i], 40, 35);
|
||||
WMMoveWidget(panel->shaB[i], 10+(40*i), 15);
|
||||
WMSetButtonBordered(panel->icoB[i], False);
|
||||
WMSetButtonImagePosition(panel->icoB[i], WIPImageOnly);
|
||||
if (i > 0) {
|
||||
WMGroupButtons(panel->icoB[0], panel->icoB[i]);
|
||||
}
|
||||
WMSetButtonBordered(panel->shaB[i], False);
|
||||
WMSetButtonImagePosition(panel->shaB[i], WIPImageOnly);
|
||||
if (i > 0) {
|
||||
WMGroupButtons(panel->shaB[0], panel->shaB[i]);
|
||||
}
|
||||
sprintf(buf1, SPEED_IMAGE, i);
|
||||
sprintf(buf2, SPEED_IMAGE_S, i);
|
||||
path = LocateImage(buf1);
|
||||
if (path) {
|
||||
icon = WMCreatePixmapFromFile(scr, path);
|
||||
if (icon) {
|
||||
WMSetButtonImage(panel->icoB[i], icon);
|
||||
WMSetButtonImage(panel->shaB[i], icon);
|
||||
WMReleasePixmap(icon);
|
||||
} else {
|
||||
wwarning(_("could not load icon file %s"), path);
|
||||
}
|
||||
free(path);
|
||||
}
|
||||
path = LocateImage(buf2);
|
||||
if (path) {
|
||||
icon = WMCreatePixmapFromFile(scr, path);
|
||||
if (icon) {
|
||||
WMSetButtonAltImage(panel->icoB[i], icon);
|
||||
WMSetButtonAltImage(panel->shaB[i], icon);
|
||||
WMReleasePixmap(icon);
|
||||
} else {
|
||||
wwarning(_("could not load icon file %s"), path);
|
||||
}
|
||||
free(path);
|
||||
}
|
||||
}
|
||||
free(buf1);
|
||||
free(buf2);
|
||||
|
||||
|
||||
WMMapSubwidgets(panel->icoF);
|
||||
WMMapSubwidgets(panel->shaF);
|
||||
|
||||
/***************** Titlebar Style Size ****************/
|
||||
panel->titlF = WMCreateFrame(panel->frame);
|
||||
WMResizeWidget(panel->titlF, 230, 95);
|
||||
WMMoveWidget(panel->titlF, 15, 130);
|
||||
WMSetFrameTitle(panel->titlF, _("Titlebar Style"));
|
||||
|
||||
panel->newsB = WMCreateButton(panel->titlF, WBTOnOff);
|
||||
WMResizeWidget(panel->newsB, 90, 60);
|
||||
WMMoveWidget(panel->newsB, 25, 20);
|
||||
WMSetButtonImagePosition(panel->newsB, WIPImageOnly);
|
||||
path = LocateImage(NEWS_IMAGE);
|
||||
if (path) {
|
||||
icon = WMCreatePixmapFromFile(scr, path);
|
||||
if (icon) {
|
||||
WMSetButtonImage(panel->newsB, icon);
|
||||
WMReleasePixmap(icon);
|
||||
}
|
||||
}
|
||||
|
||||
panel->oldsB = WMCreateButton(panel->titlF, WBTOnOff);
|
||||
WMResizeWidget(panel->oldsB, 90, 60);
|
||||
WMMoveWidget(panel->oldsB, 115, 20);
|
||||
WMSetButtonImagePosition(panel->oldsB, WIPImageOnly);
|
||||
path = LocateImage(OLDS_IMAGE);
|
||||
if (path) {
|
||||
icon = WMCreatePixmapFromFile(scr, path);
|
||||
if (icon) {
|
||||
WMSetButtonImage(panel->oldsB, icon);
|
||||
WMReleasePixmap(icon);
|
||||
}
|
||||
}
|
||||
|
||||
WMGroupButtons(panel->newsB, panel->oldsB);
|
||||
|
||||
WMMapSubwidgets(panel->titlF);
|
||||
|
||||
/**************** Features ******************/
|
||||
|
||||
panel->animF = WMCreateFrame(panel->frame);
|
||||
WMResizeWidget(panel->animF, 255, 115);
|
||||
WMMoveWidget(panel->animF, 255, 10);
|
||||
WMSetFrameTitle(panel->animF, _("Animations and Sound"));
|
||||
|
||||
panel->animB = WMCreateButton(panel->animF, WBTToggle);
|
||||
WMResizeWidget(panel->animB, 64, 64);
|
||||
WMMoveWidget(panel->animB, 15, 20);
|
||||
WMSetButtonFont(panel->animB, font);
|
||||
WMSetButtonText(panel->animB, _("Animations"));
|
||||
WMSetButtonImagePosition(panel->animB, WIPAbove);
|
||||
createImages(scr, rc, xis, ANIM_IMAGE, &altIcon, &icon);
|
||||
if (icon) {
|
||||
WMSetButtonImage(panel->animB, icon);
|
||||
WMReleasePixmap(icon);
|
||||
}
|
||||
if (altIcon) {
|
||||
WMSetButtonAltImage(panel->animB, altIcon);
|
||||
WMReleasePixmap(altIcon);
|
||||
}
|
||||
|
||||
panel->supB = WMCreateButton(panel->animF, WBTToggle);
|
||||
WMResizeWidget(panel->supB, 64, 64);
|
||||
WMMoveWidget(panel->supB, 95, 20);
|
||||
WMSetButtonFont(panel->supB, font);
|
||||
WMSetButtonText(panel->supB, _("Superfluous"));
|
||||
WMSetButtonImagePosition(panel->supB, WIPAbove);
|
||||
createImages(scr, rc, xis, SUPERF_IMAGE, &altIcon, &icon);
|
||||
if (icon) {
|
||||
WMSetButtonImage(panel->supB, icon);
|
||||
WMReleasePixmap(icon);
|
||||
}
|
||||
if (altIcon) {
|
||||
WMSetButtonAltImage(panel->supB, altIcon);
|
||||
WMReleasePixmap(altIcon);
|
||||
}
|
||||
|
||||
panel->sfxB = WMCreateButton(panel->animF, WBTToggle);
|
||||
WMResizeWidget(panel->sfxB, 64, 64);
|
||||
WMMoveWidget(panel->sfxB, 175, 20);
|
||||
WMSetButtonFont(panel->sfxB, font);
|
||||
WMSetButtonText(panel->sfxB, _("Sounds"));
|
||||
WMSetButtonImagePosition(panel->sfxB, WIPAbove);
|
||||
createImages(scr, rc, xis, SOUND_IMAGE, &altIcon, &icon);
|
||||
if (icon) {
|
||||
WMSetButtonImage(panel->sfxB, icon);
|
||||
WMReleasePixmap(icon);
|
||||
}
|
||||
if (altIcon) {
|
||||
WMSetButtonAltImage(panel->sfxB, altIcon);
|
||||
WMReleasePixmap(altIcon);
|
||||
}
|
||||
|
||||
|
||||
panel->noteL = WMCreateLabel(panel->animF);
|
||||
WMResizeWidget(panel->noteL, 235, 28);
|
||||
WMMoveWidget(panel->noteL, 10, 85);
|
||||
WMSetLabelFont(panel->noteL, font);
|
||||
WMSetLabelText(panel->noteL, _("Note: sound requires a module distributed separately"));
|
||||
|
||||
WMMapSubwidgets(panel->animF);
|
||||
|
||||
/*********** Dithering **********/
|
||||
panel->cmapSize = 4;
|
||||
|
||||
panel->dithF = WMCreateFrame(panel->frame);
|
||||
WMResizeWidget(panel->dithF, 255, 95);
|
||||
WMMoveWidget(panel->dithF, 255, 130);
|
||||
WMSetFrameTitle(panel->dithF, _("Dithering colormap for 8bpp"));
|
||||
|
||||
panel->dithB = WMCreateSwitchButton(panel->dithF);
|
||||
WMResizeWidget(panel->dithB, 235, 32);
|
||||
WMMoveWidget(panel->dithB, 15, 15);
|
||||
WMSetButtonText(panel->dithB, _("Disable dithering in any visual/depth"));
|
||||
|
||||
panel->dithL = WMCreateLabel(panel->dithF);
|
||||
WMResizeWidget(panel->dithL, 75, 16);
|
||||
WMMoveWidget(panel->dithL, 90, 50);
|
||||
WMSetLabelTextAlignment(panel->dithL, WACenter);
|
||||
WMSetLabelText(panel->dithL, "64");
|
||||
|
||||
panel->dithS = WMCreateSlider(panel->dithF);
|
||||
WMResizeWidget(panel->dithS, 95, 16);
|
||||
WMMoveWidget(panel->dithS, 80, 65);
|
||||
WMSetSliderMinValue(panel->dithS, 2);
|
||||
WMSetSliderMaxValue(panel->dithS, 6);
|
||||
WMSetSliderContinuous(panel->dithS, True);
|
||||
WMSetSliderAction(panel->dithS, updateLabel, panel);
|
||||
|
||||
panel->dith1L = WMCreateLabel(panel->dithF);
|
||||
WMResizeWidget(panel->dith1L, 70, 35);
|
||||
WMMoveWidget(panel->dith1L, 5, 50);
|
||||
WMSetLabelTextAlignment(panel->dith1L, WACenter);
|
||||
WMSetLabelFont(panel->dith1L, font);
|
||||
WMSetLabelText(panel->dith1L, _("More colors for applications"));
|
||||
|
||||
panel->dith2L = WMCreateLabel(panel->dithF);
|
||||
WMResizeWidget(panel->dith2L, 70, 35);
|
||||
WMMoveWidget(panel->dith2L, 180, 50);
|
||||
WMSetLabelTextAlignment(panel->dith2L, WACenter);
|
||||
WMSetLabelFont(panel->dith2L, font);
|
||||
WMSetLabelText(panel->dith2L, _("More colors for WindowMaker"));
|
||||
|
||||
WMMapSubwidgets(panel->dithF);
|
||||
|
||||
WMRealizeWidget(panel->frame);
|
||||
WMMapSubwidgets(panel->frame);
|
||||
|
||||
if (xis)
|
||||
RDestroyImage(xis);
|
||||
WMReleaseFont(font);
|
||||
|
||||
showData(panel);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
storeData(_Panel *panel)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i=0; i<5; i++) {
|
||||
if (WMGetButtonSelected(panel->icoB[i]))
|
||||
break;
|
||||
}
|
||||
SetSpeedForKey(i, "IconSlideSpeed");
|
||||
|
||||
|
||||
for (i=0; i<5; i++) {
|
||||
if (WMGetButtonSelected(panel->shaB[i]))
|
||||
break;
|
||||
}
|
||||
SetSpeedForKey(i, "ShadeSpeed");
|
||||
|
||||
SetBoolForKey(WMGetButtonSelected(panel->newsB), "NewStyle");
|
||||
|
||||
SetBoolForKey(!WMGetButtonSelected(panel->animB), "DisableAnimations");
|
||||
SetBoolForKey(WMGetButtonSelected(panel->supB), "Superfluous");
|
||||
SetBoolForKey(!WMGetButtonSelected(panel->sfxB), "DisableSound");
|
||||
|
||||
SetBoolForKey(WMGetButtonSelected(panel->dithB), "DisableDithering");
|
||||
SetIntegerForKey(WMGetSliderValue(panel->dithS), "ColormapSize");
|
||||
}
|
||||
|
||||
|
||||
|
||||
Panel*
|
||||
InitConfigurations(WMScreen *scr, WMWindow *win)
|
||||
{
|
||||
_Panel *panel;
|
||||
|
||||
panel = wmalloc(sizeof(_Panel));
|
||||
memset(panel, 0, sizeof(_Panel));
|
||||
|
||||
panel->sectionName = _("Other Configurations");
|
||||
|
||||
panel->win = win;
|
||||
|
||||
panel->callbacks.createWidgets = createPanel;
|
||||
panel->callbacks.updateDomain = storeData;
|
||||
|
||||
AddSection(panel, ICON_FILE);
|
||||
|
||||
return panel;
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
/* Expert.c- expert user options
|
||||
*
|
||||
* WPrefs - WindowMaker 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"
|
||||
|
||||
typedef struct _Panel {
|
||||
WMFrame *frame;
|
||||
char *sectionName;
|
||||
|
||||
CallbackRec callbacks;
|
||||
|
||||
WMWindow *win;
|
||||
|
||||
WMButton *swi[4];
|
||||
|
||||
} _Panel;
|
||||
|
||||
|
||||
|
||||
#define ICON_FILE "expert"
|
||||
|
||||
|
||||
static void
|
||||
showData(_Panel *panel)
|
||||
{
|
||||
WMUserDefaults *udb = WMGetStandardUserDefaults();
|
||||
|
||||
WMSetButtonSelected(panel->swi[0], WMGetUDBoolForKey(udb, "NoXSetStuff"));
|
||||
WMSetButtonSelected(panel->swi[1], GetBoolForKey("SaveSessionOnExit"));
|
||||
WMSetButtonSelected(panel->swi[2], GetBoolForKey("UseSaveUnders"));
|
||||
WMSetButtonSelected(panel->swi[3], GetBoolForKey("DisableBlinking"));
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
createPanel(Panel *p)
|
||||
{
|
||||
_Panel *panel = (_Panel*)p;
|
||||
int i;
|
||||
|
||||
panel->frame = WMCreateFrame(panel->win);
|
||||
WMResizeWidget(panel->frame, FRAME_WIDTH, FRAME_HEIGHT);
|
||||
WMMoveWidget(panel->frame, FRAME_LEFT, FRAME_TOP);
|
||||
|
||||
for (i=0; i<4; i++) {
|
||||
panel->swi[i] = WMCreateSwitchButton(panel->frame);
|
||||
WMResizeWidget(panel->swi[i], FRAME_WIDTH-40, 25);
|
||||
WMMoveWidget(panel->swi[i], 20, 20+i*25);
|
||||
}
|
||||
WMSetButtonText(panel->swi[0], _("Do not set non-WindowMaker specific parameters (do not use xset)"));
|
||||
WMSetButtonText(panel->swi[1], _("Automatically save session when exiting WindowMaker"));
|
||||
WMSetButtonText(panel->swi[2], _("Use SaveUnder in window frames, icons, menus and other objects"));
|
||||
WMSetButtonText(panel->swi[3], _("Disable cycling color highlighting of icons."));
|
||||
|
||||
WMRealizeWidget(panel->frame);
|
||||
WMMapSubwidgets(panel->frame);
|
||||
|
||||
showData(panel);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
storeDefaults(_Panel *panel)
|
||||
{
|
||||
WMUserDefaults *udb = WMGetStandardUserDefaults();
|
||||
|
||||
WMSetUDBoolForKey(udb, WMGetButtonSelected(panel->swi[0]), "NoXSetStuff");
|
||||
|
||||
SetBoolForKey(WMGetButtonSelected(panel->swi[1]), "SaveSessionOnExit");
|
||||
SetBoolForKey(WMGetButtonSelected(panel->swi[2]), "UseSaveUnders");
|
||||
SetBoolForKey(WMGetButtonSelected(panel->swi[3]), "DisableBlinking");
|
||||
}
|
||||
|
||||
|
||||
Panel*
|
||||
InitExpert(WMScreen *scr, WMWindow *win)
|
||||
{
|
||||
_Panel *panel;
|
||||
|
||||
panel = wmalloc(sizeof(_Panel));
|
||||
memset(panel, 0, sizeof(_Panel));
|
||||
|
||||
panel->sectionName = _("Expert User Preferences");
|
||||
|
||||
panel->win = win;
|
||||
|
||||
panel->callbacks.createWidgets = createPanel;
|
||||
panel->callbacks.updateDomain = storeDefaults;
|
||||
|
||||
AddSection(panel, ICON_FILE);
|
||||
|
||||
return panel;
|
||||
}
|
||||
@@ -0,0 +1,395 @@
|
||||
/* Focus.c- input and colormap focus stuff
|
||||
*
|
||||
* WPrefs - WindowMaker 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"
|
||||
|
||||
typedef struct _Panel {
|
||||
WMFrame *frame;
|
||||
|
||||
char *sectionName;
|
||||
|
||||
CallbackRec callbacks;
|
||||
|
||||
WMWindow *win;
|
||||
|
||||
WMFrame *kfocF;
|
||||
WMPopUpButton *kfocP;
|
||||
WMLabel *kfocL;
|
||||
|
||||
WMFrame *cfocF;
|
||||
WMButton *autB;
|
||||
WMButton *manB;
|
||||
|
||||
WMFrame *raisF;
|
||||
WMButton *raisB[5];
|
||||
WMTextField *raisT;
|
||||
WMLabel *raisL;
|
||||
|
||||
WMFrame *optF;
|
||||
WMButton *ignB;
|
||||
WMButton *newB;
|
||||
|
||||
char raiseDelaySelected;
|
||||
} _Panel;
|
||||
|
||||
|
||||
|
||||
#define ICON_FILE "windowfocus"
|
||||
|
||||
#define DELAY_ICON "timer%i"
|
||||
#define DELAY_ICON_S "timer%is"
|
||||
|
||||
static void changeFocusMode(WMWidget *w, void *data);
|
||||
|
||||
static void
|
||||
showData(_Panel *panel)
|
||||
{
|
||||
char *str;
|
||||
int i;
|
||||
char buffer[32];
|
||||
|
||||
str = GetStringForKey("FocusMode");
|
||||
if (strcasecmp(str, "manual")==0 || strcasecmp(str, "clicktofocus")==0)
|
||||
WMSetPopUpButtonSelectedItem(panel->kfocP, 0);
|
||||
else if (strcasecmp(str, "auto")==0 || strcasecmp(str, "focusfollowsmouse")==0)
|
||||
WMSetPopUpButtonSelectedItem(panel->kfocP, 1);
|
||||
else if (strcasecmp(str, "semiauto")==0 || strcasecmp(str, "sloppy")==0)
|
||||
WMSetPopUpButtonSelectedItem(panel->kfocP, 2);
|
||||
else {
|
||||
wwarning(_("bad option value %s for option FocusMode. Using default Manual"),
|
||||
str);
|
||||
WMSetPopUpButtonSelectedItem(panel->kfocP, 0);
|
||||
}
|
||||
changeFocusMode(panel->kfocP, panel);
|
||||
|
||||
/**/
|
||||
str = GetStringForKey("ColormapMode");
|
||||
if (strcasecmp(str, "manual")==0 || strcasecmp(str, "clicktofocus")==0) {
|
||||
WMPerformButtonClick(panel->manB);
|
||||
} else if (strcasecmp(str, "auto")==0 || strcasecmp(str, "focusfollowsmouse")==0) {
|
||||
WMPerformButtonClick(panel->autB);
|
||||
} else {
|
||||
wwarning(_("bad option value %s for option ColormapMode. Using default Manual"),
|
||||
str);
|
||||
WMPerformButtonClick(panel->manB);
|
||||
}
|
||||
|
||||
/**/
|
||||
i = GetIntegerForKey("RaiseDelay");
|
||||
sprintf(buffer, "%i", i);
|
||||
WMSetTextFieldText(panel->raisT, buffer);
|
||||
|
||||
switch (i) {
|
||||
case 0:
|
||||
WMPerformButtonClick(panel->raisB[0]);
|
||||
break;
|
||||
case 10:
|
||||
WMPerformButtonClick(panel->raisB[1]);
|
||||
break;
|
||||
case 100:
|
||||
WMPerformButtonClick(panel->raisB[2]);
|
||||
break;
|
||||
case 350:
|
||||
WMPerformButtonClick(panel->raisB[3]);
|
||||
break;
|
||||
case 800:
|
||||
WMPerformButtonClick(panel->raisB[4]);
|
||||
break;
|
||||
}
|
||||
|
||||
/**/
|
||||
WMSetButtonSelected(panel->ignB, GetBoolForKey("IgnoreFocusClick"));
|
||||
|
||||
WMSetButtonSelected(panel->newB, GetBoolForKey("AutoFocus"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void
|
||||
storeData(_Panel *panel)
|
||||
{
|
||||
char *str;
|
||||
int i;
|
||||
|
||||
switch (WMGetPopUpButtonSelectedItem(panel->kfocP)) {
|
||||
case 1:
|
||||
str = "auto";
|
||||
break;
|
||||
case 2:
|
||||
str = "sloppy";
|
||||
break;
|
||||
default:
|
||||
str = "manual";
|
||||
break;
|
||||
}
|
||||
SetStringForKey(str, "FocusMode");
|
||||
|
||||
if (WMGetButtonSelected(panel->manB)) {
|
||||
SetStringForKey("manual", "ColormapMode");
|
||||
} else {
|
||||
SetStringForKey("auto", "ColormapMode");
|
||||
}
|
||||
|
||||
str = WMGetTextFieldText(panel->raisT);
|
||||
if (sscanf(str, "%i", &i)!=1)
|
||||
i = 0;
|
||||
SetIntegerForKey(i, "RaiseDelay");
|
||||
|
||||
SetBoolForKey(WMGetButtonSelected(panel->ignB), "IgnoreFocusClick");
|
||||
SetBoolForKey(WMGetButtonSelected(panel->newB), "AutoFocus");
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
pushDelayButton(WMWidget *w, void *data)
|
||||
{
|
||||
_Panel *panel = (_Panel*)data;
|
||||
|
||||
panel->raiseDelaySelected = 1;
|
||||
if (w == panel->raisB[0]) {
|
||||
WMSetTextFieldText(panel->raisT, "OFF");
|
||||
} else if (w == panel->raisB[1]) {
|
||||
WMSetTextFieldText(panel->raisT, "10");
|
||||
} else if (w == panel->raisB[2]) {
|
||||
WMSetTextFieldText(panel->raisT, "100");
|
||||
} else if (w == panel->raisB[3]) {
|
||||
WMSetTextFieldText(panel->raisT, "350");
|
||||
} else if (w == panel->raisB[4]) {
|
||||
WMSetTextFieldText(panel->raisT, "800");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
changeFocusMode(WMWidget *w, void *data)
|
||||
{
|
||||
_Panel *panel = (_Panel*)data;
|
||||
|
||||
switch (WMGetPopUpButtonSelectedItem(w)) {
|
||||
case 0:
|
||||
WMSetLabelText(panel->kfocL, _("Click on the window to set\n"\
|
||||
"keyboard input focus."));
|
||||
break;
|
||||
case 1:
|
||||
WMSetLabelText(panel->kfocL, _("Set keyboard input focus to\n"\
|
||||
"the window under the mouse pointer,\n"\
|
||||
"including the root window."));
|
||||
break;
|
||||
case 2:
|
||||
WMSetLabelText(panel->kfocL, _("Set keyboard input focus to\n"\
|
||||
"the window under the mouse pointer,\n"\
|
||||
"except the root window."));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
raiseTextChanged(void *observerData, WMNotification *notification)
|
||||
{
|
||||
_Panel *panel = (_Panel*)observerData;
|
||||
int i;
|
||||
|
||||
if (panel->raiseDelaySelected) {
|
||||
for (i=0; i<5; i++) {
|
||||
WMSetButtonSelected(panel->raisB[i], False);
|
||||
}
|
||||
panel->raiseDelaySelected = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
static void
|
||||
createPanel(Panel *p)
|
||||
{
|
||||
_Panel *panel = (_Panel*)p;
|
||||
WMScreen *scr = WMWidgetScreen(panel->win);
|
||||
int i;
|
||||
char *buf1, *buf2;
|
||||
WMPixmap *icon;
|
||||
WMColor *color;
|
||||
WMFont *font;
|
||||
|
||||
panel->frame = WMCreateFrame(panel->win);
|
||||
WMResizeWidget(panel->frame, FRAME_WIDTH, FRAME_HEIGHT);
|
||||
WMMoveWidget(panel->frame, FRAME_LEFT, FRAME_TOP);
|
||||
|
||||
/***************** Input Focus Mode *****************/
|
||||
panel->kfocF = WMCreateFrame(panel->frame);
|
||||
WMResizeWidget(panel->kfocF, 240, 130);
|
||||
WMMoveWidget(panel->kfocF, 15, 15);
|
||||
WMSetFrameTitle(panel->kfocF, _("Input Focus Mode"));
|
||||
|
||||
panel->kfocP = WMCreatePopUpButton(panel->kfocF);
|
||||
WMResizeWidget(panel->kfocP, 210, 20);
|
||||
WMMoveWidget(panel->kfocP, 15, 30);
|
||||
WMAddPopUpButtonItem(panel->kfocP, _("Click window to focus"));
|
||||
WMAddPopUpButtonItem(panel->kfocP, _("Focus follows mouse"));
|
||||
WMAddPopUpButtonItem(panel->kfocP, _("\"Sloppy\" focus"));
|
||||
WMSetPopUpButtonAction(panel->kfocP, changeFocusMode, panel);
|
||||
|
||||
panel->kfocL = WMCreateLabel(panel->kfocF);
|
||||
WMResizeWidget(panel->kfocL, 211, 68);
|
||||
WMMoveWidget(panel->kfocL, 15, 55);
|
||||
WMSetLabelTextAlignment(panel->kfocL, WACenter);
|
||||
|
||||
WMMapSubwidgets(panel->kfocF);
|
||||
|
||||
/***************** Colormap Installation Mode ****************/
|
||||
|
||||
panel->cfocF = WMCreateFrame(panel->frame);
|
||||
WMResizeWidget(panel->cfocF, 240, 70);
|
||||
WMMoveWidget(panel->cfocF, 15, 150);
|
||||
WMSetFrameTitle(panel->cfocF, _("Install colormap in the window..."));
|
||||
|
||||
panel->manB = WMCreateRadioButton(panel->cfocF);
|
||||
WMResizeWidget(panel->manB, 220, 20);
|
||||
WMMoveWidget(panel->manB, 15, 18);
|
||||
WMSetButtonText(panel->manB, _("...that has the input focus."));
|
||||
|
||||
panel->autB = WMCreateRadioButton(panel->cfocF);
|
||||
WMResizeWidget(panel->autB, 220, 20);
|
||||
WMMoveWidget(panel->autB, 15, 40);
|
||||
WMSetButtonText(panel->autB, _("...that is under the mouse pointer."));
|
||||
WMGroupButtons(panel->manB, panel->autB);
|
||||
|
||||
WMMapSubwidgets(panel->cfocF);
|
||||
|
||||
/***************** Automatic window raise delay *****************/
|
||||
panel->raisF = WMCreateFrame(panel->frame);
|
||||
WMResizeWidget(panel->raisF, 245, 70);
|
||||
WMMoveWidget(panel->raisF, 265, 15);
|
||||
WMSetFrameTitle(panel->raisF, _("Automatic Window Raise Delay"));
|
||||
|
||||
buf1 = wmalloc(strlen(DELAY_ICON)+1);
|
||||
buf2 = wmalloc(strlen(DELAY_ICON_S)+1);
|
||||
|
||||
for (i = 0; i < 5; i++) {
|
||||
char *path;
|
||||
|
||||
panel->raisB[i] = WMCreateCustomButton(panel->raisF,
|
||||
WBBStateChangeMask);
|
||||
WMResizeWidget(panel->raisB[i], 25, 25);
|
||||
WMMoveWidget(panel->raisB[i], 10+(30*i), 25);
|
||||
WMSetButtonBordered(panel->raisB[i], False);
|
||||
WMSetButtonImagePosition(panel->raisB[i], WIPImageOnly);
|
||||
WMSetButtonAction(panel->raisB[i], pushDelayButton, panel);
|
||||
if (i>0)
|
||||
WMGroupButtons(panel->raisB[0], panel->raisB[i]);
|
||||
sprintf(buf1, DELAY_ICON, i);
|
||||
sprintf(buf2, DELAY_ICON_S, i);
|
||||
path = LocateImage(buf1);
|
||||
if (path) {
|
||||
icon = WMCreatePixmapFromFile(scr, path);
|
||||
if (icon) {
|
||||
WMSetButtonImage(panel->raisB[i], icon);
|
||||
WMReleasePixmap(icon);
|
||||
} else {
|
||||
wwarning(_("could not load icon file %s"), path);
|
||||
}
|
||||
free(path);
|
||||
}
|
||||
path = LocateImage(buf2);
|
||||
if (path) {
|
||||
icon = WMCreatePixmapFromFile(scr, path);
|
||||
if (icon) {
|
||||
WMSetButtonAltImage(panel->raisB[i], icon);
|
||||
WMReleasePixmap(icon);
|
||||
} else {
|
||||
wwarning(_("could not load icon file %s"), path);
|
||||
}
|
||||
free(path);
|
||||
}
|
||||
}
|
||||
free(buf1);
|
||||
free(buf2);
|
||||
|
||||
panel->raisT = WMCreateTextField(panel->raisF);
|
||||
WMResizeWidget(panel->raisT, 36, 20);
|
||||
WMMoveWidget(panel->raisT, 165, 30);
|
||||
WMAddNotificationObserver(raiseTextChanged, panel,
|
||||
WMTextDidChangeNotification, panel->raisT);
|
||||
|
||||
color = WMDarkGrayColor(scr);
|
||||
font = WMSystemFontOfSize(scr, 10);
|
||||
|
||||
panel->raisL = WMCreateLabel(panel->raisF);
|
||||
WMResizeWidget(panel->raisL, 36, 16);
|
||||
WMMoveWidget(panel->raisL, 205, 35);
|
||||
WMSetLabelText(panel->raisL, _("msec"));
|
||||
WMSetLabelTextColor(panel->raisL, color);
|
||||
WMSetLabelFont(panel->raisL, font);
|
||||
|
||||
WMReleaseColor(color);
|
||||
WMReleaseFont(font);
|
||||
|
||||
WMMapSubwidgets(panel->raisF);
|
||||
|
||||
/***************** Options ****************/
|
||||
panel->optF = WMCreateFrame(panel->frame);
|
||||
WMResizeWidget(panel->optF, 245, 125);
|
||||
WMMoveWidget(panel->optF, 265, 95);
|
||||
|
||||
panel->ignB = WMCreateSwitchButton(panel->optF);
|
||||
WMResizeWidget(panel->ignB, 210, 50);
|
||||
WMMoveWidget(panel->ignB, 15, 10);
|
||||
WMSetButtonText(panel->ignB, _("Do not let aplications receive the "\
|
||||
"click used to focus windows."));
|
||||
|
||||
panel->newB = WMCreateSwitchButton(panel->optF);
|
||||
WMResizeWidget(panel->newB, 210, 35);
|
||||
WMMoveWidget(panel->newB, 15, 70);
|
||||
WMSetButtonText(panel->newB, _("Automatically focus new windows."));
|
||||
|
||||
WMMapSubwidgets(panel->optF);
|
||||
|
||||
|
||||
WMRealizeWidget(panel->frame);
|
||||
WMMapSubwidgets(panel->frame);
|
||||
|
||||
showData(panel);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Panel*
|
||||
InitFocus(WMScreen *scr, WMWindow *win)
|
||||
{
|
||||
_Panel *panel;
|
||||
|
||||
panel = wmalloc(sizeof(_Panel));
|
||||
memset(panel, 0, sizeof(_Panel));
|
||||
|
||||
panel->sectionName = _("Window Focus Preferences");
|
||||
|
||||
panel->win = win;
|
||||
|
||||
panel->callbacks.createWidgets = createPanel;
|
||||
panel->callbacks.updateDomain = storeData;
|
||||
|
||||
AddSection(panel, ICON_FILE);
|
||||
|
||||
return panel;
|
||||
}
|
||||
@@ -0,0 +1,318 @@
|
||||
/* Icons.c- icon preferences
|
||||
*
|
||||
* WPrefs - WindowMaker 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"
|
||||
|
||||
|
||||
typedef struct _Panel {
|
||||
WMFrame *frame;
|
||||
|
||||
char *sectionName;
|
||||
|
||||
CallbackRec callbacks;
|
||||
|
||||
WMWindow *win;
|
||||
|
||||
WMFrame *posF;
|
||||
WMFrame *posVF;
|
||||
WMFrame *posV;
|
||||
|
||||
WMButton *nwB;
|
||||
WMButton *neB;
|
||||
WMButton *swB;
|
||||
WMButton *seB;
|
||||
WMButton *verB;
|
||||
WMButton *horB;
|
||||
|
||||
WMFrame *optF;
|
||||
WMButton *arrB;
|
||||
WMButton *omnB;
|
||||
|
||||
WMFrame *sizeF;
|
||||
WMPopUpButton *sizeP;
|
||||
|
||||
} _Panel;
|
||||
|
||||
|
||||
|
||||
#define ICON_FILE "iconprefs"
|
||||
|
||||
|
||||
static void
|
||||
showIconLayout(WMWidget *widget, void *data)
|
||||
{
|
||||
_Panel *panel = (_Panel*)data;
|
||||
int w, h;
|
||||
|
||||
if (WMGetButtonSelected(panel->horB)) {
|
||||
w = 32;
|
||||
h = 8;
|
||||
} else {
|
||||
w = 8;
|
||||
h = 32;
|
||||
}
|
||||
WMResizeWidget(panel->posV, w, h);
|
||||
|
||||
if (WMGetButtonSelected(panel->nwB)) {
|
||||
WMMoveWidget(panel->posV, 2, 2);
|
||||
} else if (WMGetButtonSelected(panel->neB)) {
|
||||
WMMoveWidget(panel->posV, 95-2-w, 2);
|
||||
} else if (WMGetButtonSelected(panel->swB)) {
|
||||
WMMoveWidget(panel->posV, 2, 70-2-h);
|
||||
} else {
|
||||
WMMoveWidget(panel->posV, 95-2-w, 70-2-h);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#define MIN(a,b) ((a) < (b) ? (a) : (b))
|
||||
|
||||
static void
|
||||
showData(_Panel *panel)
|
||||
{
|
||||
int i;
|
||||
char *str;
|
||||
char *def = "blh";
|
||||
|
||||
WMSetButtonSelected(panel->arrB, GetBoolForKey("AutoArrangeIcons"));
|
||||
|
||||
WMSetButtonSelected(panel->omnB, GetBoolForKey("StickyIcons"));
|
||||
|
||||
str = GetStringForKey("IconPosition");
|
||||
if (!str)
|
||||
str = def;
|
||||
if (strlen(str)!=3) {
|
||||
wwarning("bad value %s for option IconPosition. Using default blh",
|
||||
str);
|
||||
str = def;
|
||||
}
|
||||
|
||||
if (str[0]=='t' || str[0]=='T') {
|
||||
if (str[1]=='r' || str[1]=='R') {
|
||||
WMPerformButtonClick(panel->neB);
|
||||
} else {
|
||||
WMPerformButtonClick(panel->nwB);
|
||||
}
|
||||
} else {
|
||||
if (str[1]=='r' || str[1]=='R') {
|
||||
WMPerformButtonClick(panel->seB);
|
||||
} else {
|
||||
WMPerformButtonClick(panel->swB);
|
||||
}
|
||||
}
|
||||
if (str[2]=='v' || str[2]=='V') {
|
||||
WMPerformButtonClick(panel->verB);
|
||||
} else {
|
||||
WMPerformButtonClick(panel->horB);
|
||||
}
|
||||
|
||||
i = GetIntegerForKey("IconSize");
|
||||
i = (i-24)/8;
|
||||
|
||||
if (i<0)
|
||||
i = 0;
|
||||
else if (i>9)
|
||||
i = 9;
|
||||
WMSetPopUpButtonSelectedItem(panel->sizeP, i);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
static void
|
||||
createPanel(Panel *p)
|
||||
{
|
||||
_Panel *panel = (_Panel*)p;
|
||||
WMColor *color;
|
||||
int i;
|
||||
char buf[16];
|
||||
|
||||
panel->frame = WMCreateFrame(panel->win);
|
||||
WMResizeWidget(panel->frame, FRAME_WIDTH, FRAME_HEIGHT);
|
||||
WMMoveWidget(panel->frame, FRAME_LEFT, FRAME_TOP);
|
||||
|
||||
/***************** Positioning of Icons *****************/
|
||||
panel->posF = WMCreateFrame(panel->frame);
|
||||
WMResizeWidget(panel->posF, 475, 135);
|
||||
WMMoveWidget(panel->posF, 25, 10);
|
||||
WMSetFrameTitle(panel->posF, _("Icon Positioning"));
|
||||
|
||||
panel->nwB = WMCreateRadioButton(panel->posF);
|
||||
WMResizeWidget(panel->nwB, 110, 20);
|
||||
WMMoveWidget(panel->nwB, 15, 25);
|
||||
WMSetButtonImagePosition(panel->nwB, WIPRight);
|
||||
WMSetButtonTextAlignment(panel->nwB, WARight);
|
||||
WMSetButtonText(panel->nwB, "Top left");
|
||||
WMSetButtonAction(panel->nwB, showIconLayout, panel);
|
||||
|
||||
panel->neB = WMCreateRadioButton(panel->posF);
|
||||
WMResizeWidget(panel->neB, 110, 20);
|
||||
WMMoveWidget(panel->neB, 230, 25);
|
||||
WMSetButtonImagePosition(panel->neB, WIPLeft);
|
||||
WMSetButtonTextAlignment(panel->neB, WALeft);
|
||||
WMSetButtonText(panel->neB, "Top right");
|
||||
WMSetButtonAction(panel->neB, showIconLayout, panel);
|
||||
|
||||
panel->swB = WMCreateRadioButton(panel->posF);
|
||||
WMResizeWidget(panel->swB, 110, 20);
|
||||
WMMoveWidget(panel->swB, 15, 95);
|
||||
WMSetButtonText(panel->swB, "Bottom left");
|
||||
WMSetButtonTextAlignment(panel->swB, WARight);
|
||||
WMSetButtonImagePosition(panel->swB, WIPRight);
|
||||
WMSetButtonAction(panel->swB, showIconLayout, panel);
|
||||
|
||||
panel->seB = WMCreateRadioButton(panel->posF);
|
||||
WMResizeWidget(panel->seB, 110, 20);
|
||||
WMMoveWidget(panel->seB, 230, 95);
|
||||
WMSetButtonText(panel->seB, "Bottom right");
|
||||
WMSetButtonAction(panel->seB, showIconLayout, panel);
|
||||
|
||||
WMGroupButtons(panel->nwB, panel->neB);
|
||||
WMGroupButtons(panel->nwB, panel->seB);
|
||||
WMGroupButtons(panel->nwB, panel->swB);
|
||||
|
||||
color = WMCreateRGBColor(WMWidgetScreen(panel->win), 0x5100, 0x5100,
|
||||
0x7100, True);
|
||||
panel->posVF = WMCreateFrame(panel->posF);
|
||||
WMResizeWidget(panel->posVF, 95, 70);
|
||||
WMMoveWidget(panel->posVF, 130, 35);
|
||||
WMSetFrameRelief(panel->posVF, WRSunken);
|
||||
WMSetWidgetBackgroundColor(panel->posVF, color);
|
||||
WMReleaseColor(color);
|
||||
|
||||
panel->posV = WMCreateFrame(panel->posVF);
|
||||
WMSetFrameRelief(panel->posV, WRSimple);
|
||||
|
||||
panel->verB = WMCreateRadioButton(panel->posF);
|
||||
WMResizeWidget(panel->verB, 120, 20);
|
||||
WMMoveWidget(panel->verB, 345, 45);
|
||||
WMSetButtonText(panel->verB, "Vertical");
|
||||
WMSetButtonAction(panel->verB, showIconLayout, panel);
|
||||
|
||||
panel->horB = WMCreateRadioButton(panel->posF);
|
||||
WMResizeWidget(panel->horB, 120, 20);
|
||||
WMMoveWidget(panel->horB, 345, 80);
|
||||
WMSetButtonText(panel->horB, "Horizontal");
|
||||
WMSetButtonAction(panel->horB, showIconLayout, panel);
|
||||
|
||||
|
||||
WMGroupButtons(panel->horB, panel->verB);
|
||||
|
||||
WMMapSubwidgets(panel->posF);
|
||||
|
||||
/***************** Options ****************/
|
||||
panel->optF = WMCreateFrame(panel->frame);
|
||||
WMResizeWidget(panel->optF, 260, 65);
|
||||
WMMoveWidget(panel->optF, 25, 155);
|
||||
|
||||
panel->arrB = WMCreateSwitchButton(panel->optF);
|
||||
WMResizeWidget(panel->arrB, 235, 20);
|
||||
WMMoveWidget(panel->arrB, 15, 10);
|
||||
WMSetButtonText(panel->arrB, _("Auto-arrange icons"));
|
||||
|
||||
panel->omnB = WMCreateSwitchButton(panel->optF);
|
||||
WMResizeWidget(panel->omnB, 235, 20);
|
||||
WMMoveWidget(panel->omnB, 15, 35);
|
||||
WMSetButtonText(panel->omnB, _("Omnipresent miniwindows"));
|
||||
|
||||
WMMapSubwidgets(panel->optF);
|
||||
|
||||
/***************** Icon Size ****************/
|
||||
panel->sizeF = WMCreateFrame(panel->frame);
|
||||
WMResizeWidget(panel->sizeF, 205, 70);
|
||||
WMMoveWidget(panel->sizeF, 295, 150);
|
||||
WMSetFrameTitle(panel->sizeF, _("Icon Size"));
|
||||
|
||||
|
||||
panel->sizeP = WMCreatePopUpButton(panel->sizeF);
|
||||
WMResizeWidget(panel->sizeP, 156, 20);
|
||||
WMMoveWidget(panel->sizeP, 25, 30);
|
||||
for (i=24; i<=96; i+=8) {
|
||||
sprintf(buf, "%ix%i", i, i);
|
||||
WMAddPopUpButtonItem(panel->sizeP, buf);
|
||||
}
|
||||
|
||||
WMMapSubwidgets(panel->sizeF);
|
||||
|
||||
WMRealizeWidget(panel->frame);
|
||||
WMMapSubwidgets(panel->frame);
|
||||
|
||||
showData(panel);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
storeData(_Panel *panel)
|
||||
{
|
||||
char buf[8];
|
||||
|
||||
SetBoolForKey(WMGetButtonSelected(panel->arrB), "AutoArrangeIcons");
|
||||
SetBoolForKey(WMGetButtonSelected(panel->omnB), "StickyIcons");
|
||||
|
||||
SetIntegerForKey(WMGetPopUpButtonSelectedItem(panel->sizeP)*8+24,
|
||||
"IconSize");
|
||||
|
||||
buf[3] = 0;
|
||||
if (WMGetButtonSelected(panel->nwB)) {
|
||||
buf[0] = 't';
|
||||
buf[1] = 'l';
|
||||
} else if (WMGetButtonSelected(panel->neB)) {
|
||||
buf[0] = 't';
|
||||
buf[1] = 'r';
|
||||
} else if (WMGetButtonSelected(panel->swB)) {
|
||||
buf[0] = 'b';
|
||||
buf[1] = 'l';
|
||||
} else {
|
||||
buf[0] = 'b';
|
||||
buf[1] = 'r';
|
||||
}
|
||||
|
||||
if (WMGetButtonSelected(panel->horB)) {
|
||||
buf[2] = 'h';
|
||||
} else {
|
||||
buf[2] = 'v';
|
||||
}
|
||||
SetStringForKey(buf, "IconPosition");
|
||||
}
|
||||
|
||||
|
||||
|
||||
Panel*
|
||||
InitIcons(WMScreen *scr, WMWindow *win)
|
||||
{
|
||||
_Panel *panel;
|
||||
|
||||
panel = wmalloc(sizeof(_Panel));
|
||||
memset(panel, 0, sizeof(_Panel));
|
||||
|
||||
panel->sectionName = _("Icon Preferences");
|
||||
|
||||
panel->win = win;
|
||||
|
||||
panel->callbacks.createWidgets = createPanel;
|
||||
panel->callbacks.updateDomain = storeData;
|
||||
|
||||
AddSection(panel, ICON_FILE);
|
||||
|
||||
return panel;
|
||||
}
|
||||
@@ -0,0 +1,181 @@
|
||||
/* KeyboardSettings.c- keyboard options (equivalent to xset)
|
||||
*
|
||||
* WPrefs - WindowMaker 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"
|
||||
|
||||
typedef struct _Panel {
|
||||
WMFrame *frame;
|
||||
|
||||
char *sectionName;
|
||||
|
||||
CallbackRec callbacks;
|
||||
|
||||
WMWindow *win;
|
||||
|
||||
WMFrame *delaF;
|
||||
WMButton *delaB[4];
|
||||
WMLabel *dmsL;
|
||||
WMTextField *dmsT;
|
||||
|
||||
WMFrame *rateF;
|
||||
WMButton *rateB[4];
|
||||
WMLabel *rmsL;
|
||||
WMTextField *rmsT;
|
||||
|
||||
WMTextField *testT;
|
||||
} _Panel;
|
||||
|
||||
|
||||
#define ICON_FILE "keyboard"
|
||||
|
||||
|
||||
static void
|
||||
createPanel(Panel *p)
|
||||
{
|
||||
_Panel *panel = (_Panel*)p;
|
||||
WMScreen *scr = WMWidgetScreen(panel->win);
|
||||
int i;
|
||||
WMColor *color;
|
||||
WMFont *font;
|
||||
|
||||
color = WMDarkGrayColor(scr);
|
||||
font = WMSystemFontOfSize(scr, 10);
|
||||
|
||||
panel->frame = WMCreateFrame(panel->win);
|
||||
WMResizeWidget(panel->frame, FRAME_WIDTH, FRAME_HEIGHT);
|
||||
WMMoveWidget(panel->frame, FRAME_LEFT, FRAME_TOP);
|
||||
|
||||
/**************** Initial Key Repeat ***************/
|
||||
panel->delaF = WMCreateFrame(panel->frame);
|
||||
WMResizeWidget(panel->delaF, 495, 60);
|
||||
WMMoveWidget(panel->delaF, 15, 10);
|
||||
WMSetFrameTitle(panel->delaF, _("Initial Key Repeat"));
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
panel->delaB[i] = WMCreateButton(panel->delaF, WBTOnOff);
|
||||
WMResizeWidget(panel->delaB[i], 60, 20);
|
||||
WMMoveWidget(panel->delaB[i], 70+i*60, 25);
|
||||
if (i>0)
|
||||
WMGroupButtons(panel->delaB[0], panel->delaB[i]);
|
||||
switch (i) {
|
||||
case 0:
|
||||
WMSetButtonText(panel->delaB[i], "....a");
|
||||
break;
|
||||
case 1:
|
||||
WMSetButtonText(panel->delaB[i], "...a");
|
||||
break;
|
||||
case 2:
|
||||
WMSetButtonText(panel->delaB[i], "..a");
|
||||
break;
|
||||
case 3:
|
||||
WMSetButtonText(panel->delaB[i], ".a");
|
||||
break;
|
||||
}
|
||||
}
|
||||
panel->dmsT = WMCreateTextField(panel->delaF);
|
||||
WMResizeWidget(panel->dmsT, 50, 20);
|
||||
WMMoveWidget(panel->dmsT, 345, 25);
|
||||
/* WMSetTextFieldAlignment(panel->dmsT, WARight);*/
|
||||
|
||||
panel->dmsL = WMCreateLabel(panel->delaF);
|
||||
WMResizeWidget(panel->dmsL, 30, 16);
|
||||
WMMoveWidget(panel->dmsL, 400, 30);
|
||||
WMSetLabelTextColor(panel->dmsL, color);
|
||||
WMSetLabelFont(panel->dmsL, font);
|
||||
WMSetLabelText(panel->dmsL, "msec");
|
||||
|
||||
WMMapSubwidgets(panel->delaF);
|
||||
|
||||
/**************** Key Repeat Rate ***************/
|
||||
panel->rateF = WMCreateFrame(panel->frame);
|
||||
WMResizeWidget(panel->rateF, 495, 60);
|
||||
WMMoveWidget(panel->rateF, 15, 95);
|
||||
WMSetFrameTitle(panel->rateF, _("Key Repeat Rate"));
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
panel->rateB[i] = WMCreateButton(panel->rateF, WBTOnOff);
|
||||
WMResizeWidget(panel->rateB[i], 60, 20);
|
||||
WMMoveWidget(panel->rateB[i], 70+i*60, 25);
|
||||
if (i>0)
|
||||
WMGroupButtons(panel->rateB[0], panel->rateB[i]);
|
||||
switch (i) {
|
||||
case 0:
|
||||
WMSetButtonText(panel->rateB[i], "a....a");
|
||||
break;
|
||||
case 1:
|
||||
WMSetButtonText(panel->rateB[i], "a...a");
|
||||
break;
|
||||
case 2:
|
||||
WMSetButtonText(panel->rateB[i], "a..a");
|
||||
break;
|
||||
case 3:
|
||||
WMSetButtonText(panel->rateB[i], "a.a");
|
||||
break;
|
||||
}
|
||||
}
|
||||
panel->rmsT = WMCreateTextField(panel->rateF);
|
||||
WMResizeWidget(panel->rmsT, 50, 20);
|
||||
WMMoveWidget(panel->rmsT, 345, 25);
|
||||
/* WMSetTextFieldAlignment(panel->rmsT, WARight);*/
|
||||
|
||||
panel->rmsL = WMCreateLabel(panel->rateF);
|
||||
WMResizeWidget(panel->rmsL, 30, 16);
|
||||
WMMoveWidget(panel->rmsL, 400, 30);
|
||||
WMSetLabelTextColor(panel->rmsL, color);
|
||||
WMSetLabelFont(panel->rmsL, font);
|
||||
WMSetLabelText(panel->rmsL, "msec");
|
||||
|
||||
WMMapSubwidgets(panel->rateF);
|
||||
|
||||
panel->testT = WMCreateTextField(panel->frame);
|
||||
WMResizeWidget(panel->testT, 480, 20);
|
||||
WMMoveWidget(panel->testT, 20, 180);
|
||||
WMSetTextFieldText(panel->testT, _("Type here to test"));
|
||||
|
||||
WMReleaseColor(color);
|
||||
WMReleaseFont(font);
|
||||
|
||||
WMRealizeWidget(panel->frame);
|
||||
WMMapSubwidgets(panel->frame);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Panel*
|
||||
InitKeyboardSettings(WMScreen *scr, WMWindow *win)
|
||||
{
|
||||
_Panel *panel;
|
||||
|
||||
panel = wmalloc(sizeof(_Panel));
|
||||
memset(panel, 0, sizeof(_Panel));
|
||||
|
||||
panel->sectionName = _("Keyboard Preferences");
|
||||
|
||||
panel->win = win;
|
||||
|
||||
panel->callbacks.createWidgets = createPanel;
|
||||
|
||||
AddSection(panel, ICON_FILE);
|
||||
|
||||
return panel;
|
||||
}
|
||||
@@ -0,0 +1,439 @@
|
||||
/* KeyboardShortcuts.c- keyboard shortcut bindings
|
||||
*
|
||||
* WPrefs - WindowMaker 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 <ctype.h>
|
||||
|
||||
#include <X11/keysym.h>
|
||||
|
||||
|
||||
typedef struct _Panel {
|
||||
WMFrame *frame;
|
||||
|
||||
char *sectionName;
|
||||
|
||||
CallbackRec callbacks;
|
||||
|
||||
WMWindow *win;
|
||||
|
||||
WMLabel *actL;
|
||||
WMList *actLs;
|
||||
|
||||
WMFrame *shoF;
|
||||
WMTextField *shoT;
|
||||
WMButton *cleB;
|
||||
WMButton *defB;
|
||||
|
||||
WMLabel *instructionsL;
|
||||
|
||||
/**/
|
||||
char capturing;
|
||||
char **shortcuts;
|
||||
int actionCount;
|
||||
} _Panel;
|
||||
|
||||
|
||||
|
||||
#define ICON_FILE "keyshortcuts"
|
||||
|
||||
|
||||
/* must be in the same order as the corresponding items in actions list */
|
||||
static char *keyOptions[] = {
|
||||
"RootMenuKey",
|
||||
"WindowListKey",
|
||||
"WindowMenuKey",
|
||||
"HideKey",
|
||||
"MiniaturizeKey",
|
||||
"CloseKey",
|
||||
"MaximizeKey",
|
||||
"VMaximizeKey",
|
||||
"RaiseKey",
|
||||
"LowerKey",
|
||||
"RaiseLowerKey",
|
||||
"ShadeKey",
|
||||
"SelectKey",
|
||||
"FocusNextKey",
|
||||
"FocusPrevKey",
|
||||
"NextWorkspaceKey",
|
||||
"PrevWorkspaceKey",
|
||||
"NextWorkspaceLayerKey",
|
||||
"PrevWorkspaceLayerKey",
|
||||
"Workspace1Key",
|
||||
"Workspace2Key",
|
||||
"Workspace3Key",
|
||||
"Workspace4Key",
|
||||
"Workspace5Key",
|
||||
"Workspace6Key",
|
||||
"Workspace7Key",
|
||||
"Workspace8Key",
|
||||
"Workspace9Key",
|
||||
"Workspace10Key",
|
||||
"ClipRaiseKey",
|
||||
"ClipLowerKey",
|
||||
"ClipRaiseLowerKey"
|
||||
};
|
||||
|
||||
|
||||
|
||||
static char*
|
||||
captureShortcut(Display *dpy, _Panel *panel)
|
||||
{
|
||||
XEvent ev;
|
||||
KeySym ksym;
|
||||
char buffer[64];
|
||||
char *key = NULL;
|
||||
|
||||
while (panel->capturing) {
|
||||
XAllowEvents(dpy, AsyncKeyboard, CurrentTime);
|
||||
WMNextEvent(dpy, &ev);
|
||||
if (ev.type==KeyPress && ev.xkey.keycode!=0) {
|
||||
ksym = XKeycodeToKeysym(dpy, ev.xkey.keycode, 0);
|
||||
if (!IsModifierKey(ksym)) {
|
||||
key=XKeysymToString(ksym);
|
||||
panel->capturing = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
WMHandleEvent(&ev);
|
||||
}
|
||||
|
||||
if (!key)
|
||||
return NULL;
|
||||
|
||||
buffer[0] = 0;
|
||||
|
||||
if (ev.xkey.state & ControlMask) {
|
||||
strcat(buffer, "Control+");
|
||||
}
|
||||
if (ev.xkey.state & ShiftMask) {
|
||||
strcat(buffer, "Shift+");
|
||||
}
|
||||
if (ev.xkey.state & Mod1Mask) {
|
||||
strcat(buffer, "Mod1+");
|
||||
}
|
||||
if (ev.xkey.state & Mod2Mask) {
|
||||
strcat(buffer, "Mod2+");
|
||||
}
|
||||
if (ev.xkey.state & Mod3Mask) {
|
||||
strcat(buffer, "Mod3+");
|
||||
}
|
||||
if (ev.xkey.state & Mod4Mask) {
|
||||
strcat(buffer, "Mod4+");
|
||||
}
|
||||
if (ev.xkey.state & Mod5Mask) {
|
||||
strcat(buffer, "Mod5+");
|
||||
}
|
||||
strcat(buffer, key);
|
||||
|
||||
return wstrdup(buffer);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
captureClick(WMWidget *w, void *data)
|
||||
{
|
||||
_Panel *panel = (_Panel*)data;
|
||||
Display *dpy = WMScreenDisplay(WMWidgetScreen(panel->win));
|
||||
char *shortcut;
|
||||
|
||||
if (!panel->capturing) {
|
||||
panel->capturing = 1;
|
||||
WMSetButtonText(w, _("Cancel"));
|
||||
WMSetLabelText(panel->instructionsL, _("Press the desired shortcut key(s) or click Cancel to stop capturing."));
|
||||
XGrabKeyboard(dpy, WMWidgetXID(panel->win), True, GrabModeAsync,
|
||||
GrabModeAsync, CurrentTime);
|
||||
shortcut = captureShortcut(dpy, panel);
|
||||
if (shortcut) {
|
||||
int row = WMGetListSelectedItemRow(panel->actLs);
|
||||
|
||||
WMSetTextFieldText(panel->shoT, shortcut);
|
||||
if (row>=0) {
|
||||
if (panel->shortcuts[row])
|
||||
free(panel->shortcuts[row]);
|
||||
panel->shortcuts[row] = shortcut;
|
||||
} else {
|
||||
free(shortcut);
|
||||
}
|
||||
}
|
||||
}
|
||||
panel->capturing = 0;
|
||||
WMSetButtonText(w, _("Capture"));
|
||||
WMSetLabelText(panel->instructionsL, _("Click Capture to interactively define the shortcut key."));
|
||||
XUngrabKeyboard(dpy, CurrentTime);
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void
|
||||
clearShortcut(WMWidget *w, void *data)
|
||||
{
|
||||
_Panel *panel = (_Panel*)data;
|
||||
int row = WMGetListSelectedItemRow(panel->actLs);
|
||||
|
||||
WMSetTextFieldText(panel->shoT, NULL);
|
||||
|
||||
if (row>=0) {
|
||||
if (panel->shortcuts[row])
|
||||
free(panel->shortcuts[row]);
|
||||
panel->shortcuts[row]=NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void
|
||||
typedKeys(void *observerData, WMNotification *notification)
|
||||
{
|
||||
_Panel *panel = (_Panel*)observerData;
|
||||
int row = WMGetListSelectedItemRow(panel->actLs);
|
||||
|
||||
if (row<0)
|
||||
return;
|
||||
|
||||
if (panel->shortcuts[row])
|
||||
free(panel->shortcuts[row]);
|
||||
panel->shortcuts[row] = WMGetTextFieldText(panel->shoT);
|
||||
if (strlen(panel->shortcuts[row])==0) {
|
||||
free(panel->shortcuts[row]);
|
||||
panel->shortcuts[row] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void
|
||||
listClick(WMWidget *w, void *data)
|
||||
{
|
||||
_Panel *panel = (_Panel*)data;
|
||||
int row = WMGetListSelectedItemRow(w);
|
||||
|
||||
WMSetTextFieldText(panel->shoT, panel->shortcuts[row]);
|
||||
}
|
||||
|
||||
|
||||
static char*
|
||||
trimstr(char *str)
|
||||
{
|
||||
char *p = str;
|
||||
int i;
|
||||
|
||||
while (isspace(*p)) p++;
|
||||
p = wstrdup(p);
|
||||
i = strlen(p);
|
||||
while (isspace(p[i]) && i>0) {
|
||||
p[i]=0;
|
||||
i--;
|
||||
}
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
showData(_Panel *panel)
|
||||
{
|
||||
char *str;
|
||||
int i;
|
||||
|
||||
for (i=0; i<panel->actionCount; i++) {
|
||||
|
||||
str = GetStringForKey(keyOptions[i]);
|
||||
if (panel->shortcuts[i])
|
||||
free(panel->shortcuts[i]);
|
||||
if (str)
|
||||
panel->shortcuts[i] = trimstr(str);
|
||||
else
|
||||
panel->shortcuts[i] = NULL;
|
||||
|
||||
if (panel->shortcuts[i] &&
|
||||
(strcasecmp(panel->shortcuts[i], "none")==0
|
||||
|| strlen(panel->shortcuts[i])==0)) {
|
||||
free(panel->shortcuts[i]);
|
||||
panel->shortcuts[i] = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
createPanel(Panel *p)
|
||||
{
|
||||
_Panel *panel = (_Panel*)p;
|
||||
WMScreen *scr = WMWidgetScreen(panel->win);
|
||||
WMColor *color;
|
||||
WMFont *boldFont;
|
||||
|
||||
panel->capturing = 0;
|
||||
|
||||
panel->frame = WMCreateFrame(panel->win);
|
||||
WMResizeWidget(panel->frame, FRAME_WIDTH, FRAME_HEIGHT);
|
||||
WMMoveWidget(panel->frame, FRAME_LEFT, FRAME_TOP);
|
||||
|
||||
boldFont = WMBoldSystemFontOfSize(scr, 12);
|
||||
|
||||
/* **************** Actions **************** */
|
||||
panel->actL = WMCreateLabel(panel->frame);
|
||||
WMResizeWidget(panel->actL, 280, 20);
|
||||
WMMoveWidget(panel->actL, 20, 10);
|
||||
WMSetLabelFont(panel->actL, boldFont);
|
||||
WMSetLabelText(panel->actL, _("Actions"));
|
||||
WMSetLabelRelief(panel->actL, WRSunken);
|
||||
WMSetLabelTextAlignment(panel->actL, WACenter);
|
||||
color = WMDarkGrayColor(scr);
|
||||
WMSetWidgetBackgroundColor(panel->actL, color);
|
||||
WMReleaseColor(color);
|
||||
color = WMWhiteColor(scr);
|
||||
WMSetLabelTextColor(panel->actL, color);
|
||||
WMReleaseColor(color);
|
||||
|
||||
panel->actLs = WMCreateList(panel->frame);
|
||||
WMResizeWidget(panel->actLs, 280, 190);
|
||||
WMMoveWidget(panel->actLs, 20, 32);
|
||||
|
||||
WMAddListItem(panel->actLs, _("Open applications menu"));
|
||||
WMAddListItem(panel->actLs, _("Open window list menu"));
|
||||
WMAddListItem(panel->actLs, _("Open window commands menu"));
|
||||
WMAddListItem(panel->actLs, _("Hide active application"));
|
||||
WMAddListItem(panel->actLs, _("Miniaturize active window"));
|
||||
WMAddListItem(panel->actLs, _("Close active window"));
|
||||
WMAddListItem(panel->actLs, _("Maximize active window"));
|
||||
WMAddListItem(panel->actLs, _("Maximize active window vertically"));
|
||||
WMAddListItem(panel->actLs, _("Raise active window"));
|
||||
WMAddListItem(panel->actLs, _("Lower active window"));
|
||||
WMAddListItem(panel->actLs, _("Raise/Lower window under mouse pointer"));
|
||||
WMAddListItem(panel->actLs, _("Shade active window"));
|
||||
WMAddListItem(panel->actLs, _("Select active window"));
|
||||
WMAddListItem(panel->actLs, _("Focus next window"));
|
||||
WMAddListItem(panel->actLs, _("Focus previous window"));
|
||||
WMAddListItem(panel->actLs, _("Switch to next workspace"));
|
||||
WMAddListItem(panel->actLs, _("Switch to previous workspace"));
|
||||
WMAddListItem(panel->actLs, _("Switch to next ten workspaces"));
|
||||
WMAddListItem(panel->actLs, _("Switch to previous ten workspaces"));
|
||||
WMAddListItem(panel->actLs, _("Switch to workspace 1"));
|
||||
WMAddListItem(panel->actLs, _("Switch to workspace 2"));
|
||||
WMAddListItem(panel->actLs, _("Switch to workspace 3"));
|
||||
WMAddListItem(panel->actLs, _("Switch to workspace 4"));
|
||||
WMAddListItem(panel->actLs, _("Switch to workspace 5"));
|
||||
WMAddListItem(panel->actLs, _("Switch to workspace 6"));
|
||||
WMAddListItem(panel->actLs, _("Switch to workspace 7"));
|
||||
WMAddListItem(panel->actLs, _("Switch to workspace 8"));
|
||||
WMAddListItem(panel->actLs, _("Switch to workspace 9"));
|
||||
WMAddListItem(panel->actLs, _("Switch to workspace 10"));
|
||||
WMAddListItem(panel->actLs, _("Raise Clip"));
|
||||
WMAddListItem(panel->actLs, _("Lower Clip"));
|
||||
WMAddListItem(panel->actLs, _("Raise/Lower Clip"));
|
||||
|
||||
WMSetListAction(panel->actLs, listClick, panel);
|
||||
|
||||
panel->actionCount = WMGetListNumberOfRows(panel->actLs);
|
||||
panel->shortcuts = wmalloc(sizeof(char*)*panel->actionCount);
|
||||
memset(panel->shortcuts, 0, sizeof(char*)*panel->actionCount);
|
||||
|
||||
/***************** Shortcut ****************/
|
||||
|
||||
panel->shoF = WMCreateFrame(panel->frame);
|
||||
WMResizeWidget(panel->shoF, 190, 210);
|
||||
WMMoveWidget(panel->shoF, 315, 10);
|
||||
WMSetFrameTitle(panel->shoF, _("Shortcut"));
|
||||
|
||||
panel->shoT = WMCreateTextField(panel->shoF);
|
||||
WMResizeWidget(panel->shoT, 160, 20);
|
||||
WMMoveWidget(panel->shoT, 15, 65);
|
||||
WMAddNotificationObserver(typedKeys, panel,
|
||||
WMTextDidChangeNotification, panel->shoT);
|
||||
|
||||
panel->cleB = WMCreateCommandButton(panel->shoF);
|
||||
WMResizeWidget(panel->cleB, 75, 24);
|
||||
WMMoveWidget(panel->cleB, 15, 95);
|
||||
WMSetButtonText(panel->cleB, _("Clear"));
|
||||
WMSetButtonAction(panel->cleB, clearShortcut, panel);
|
||||
|
||||
panel->defB = WMCreateCommandButton(panel->shoF);
|
||||
WMResizeWidget(panel->defB, 75, 24);
|
||||
WMMoveWidget(panel->defB, 100, 95);
|
||||
WMSetButtonText(panel->defB, _("Capture"));
|
||||
WMSetButtonAction(panel->defB, captureClick, panel);
|
||||
|
||||
panel->instructionsL = WMCreateLabel(panel->shoF);
|
||||
WMResizeWidget(panel->instructionsL, 160, 55);
|
||||
WMMoveWidget(panel->instructionsL, 15, 140);
|
||||
WMSetLabelTextAlignment(panel->instructionsL, WACenter);
|
||||
WMSetLabelText(panel->instructionsL, _("Click Capture to interactively define the shortcut key."));
|
||||
|
||||
WMMapSubwidgets(panel->shoF);
|
||||
|
||||
WMReleaseFont(boldFont);
|
||||
|
||||
WMRealizeWidget(panel->frame);
|
||||
WMMapSubwidgets(panel->frame);
|
||||
|
||||
|
||||
showData(panel);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
storeData(_Panel *panel)
|
||||
{
|
||||
int i;
|
||||
char *str;
|
||||
|
||||
for (i=0; i<panel->actionCount; i++) {
|
||||
str = NULL;
|
||||
if (panel->shortcuts[i]) {
|
||||
str = trimstr(panel->shortcuts[i]);
|
||||
if (strlen(str)==0) {
|
||||
free(str);
|
||||
str = NULL;
|
||||
}
|
||||
}
|
||||
if (str) {
|
||||
SetStringForKey(str, keyOptions[i]);
|
||||
free(str);
|
||||
} else {
|
||||
SetStringForKey("None", keyOptions[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Panel*
|
||||
InitKeyboardShortcuts(WMScreen *scr, WMWindow *win)
|
||||
{
|
||||
_Panel *panel;
|
||||
|
||||
panel = wmalloc(sizeof(_Panel));
|
||||
memset(panel, 0, sizeof(_Panel));
|
||||
|
||||
panel->sectionName = _("Keyboard Shortcut Preferences");
|
||||
|
||||
panel->win = win;
|
||||
|
||||
panel->callbacks.createWidgets = createPanel;
|
||||
panel->callbacks.updateDomain = storeData;
|
||||
|
||||
AddSection(panel, ICON_FILE);
|
||||
|
||||
return panel;
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
SUBDIRS = xpm tiff po
|
||||
|
||||
nlsdir = @NLSDIR@
|
||||
|
||||
AUTOMAKE_OPTIONS = no-dependencies
|
||||
|
||||
wpexecbindir = @wprefsdir@
|
||||
|
||||
wpexecbin_PROGRAMS = WPrefs
|
||||
|
||||
wpdatadir = @wprefsdir@
|
||||
|
||||
wpdata_DATA = WPrefs.tiff WPrefs.xpm
|
||||
|
||||
EXTRA_DIST = $(wpdata_DATA)
|
||||
|
||||
WPrefs_SOURCES = \
|
||||
main.c \
|
||||
WPrefs.c \
|
||||
WPrefs.h \
|
||||
Configurations.c \
|
||||
Expert.c \
|
||||
Focus.c \
|
||||
Icons.c \
|
||||
KeyboardSettings.c \
|
||||
KeyboardShortcuts.c \
|
||||
Menu.c \
|
||||
MenuPreferences.c \
|
||||
MouseSettings.c \
|
||||
Paths.c \
|
||||
Preferences.c \
|
||||
Text.c \
|
||||
TextureAndColor.c \
|
||||
WindowHandling.c \
|
||||
Workspace.c \
|
||||
double.c \
|
||||
double.h \
|
||||
MenuGuru.c \
|
||||
xmodifier.c
|
||||
|
||||
CPPFLAGS = \
|
||||
@CPPFLAGS@ \
|
||||
@SHAPE@ @I18N@ @X_LOCALE@ \
|
||||
-DNLSDIR="\"$(nlsdir)\""
|
||||
|
||||
|
||||
INCLUDES = \
|
||||
-I$(top_srcdir)/wrlib \
|
||||
-I$(top_srcdir)/WINGs \
|
||||
@XCFLAGS@ \
|
||||
@LIBPL_INC_PATH@
|
||||
|
||||
WPrefs_DEPENDENCIES = $(top_builddir)/WINGs/libWINGs.a
|
||||
|
||||
WPrefs_LDADD = \
|
||||
-L$(top_builddir)/WINGs -lWINGs\
|
||||
-L$(top_builddir)/wrlib -lwraster \
|
||||
@LIBPL_LIBS@ \
|
||||
@XLFLAGS@ \
|
||||
@GFXLIBS@ \
|
||||
@XLIBS@ \
|
||||
@X_EXTRA_LIBS@ \
|
||||
@INTLIBS@ \
|
||||
-lm
|
||||
@@ -0,0 +1,439 @@
|
||||
# Makefile.in generated automatically by automake 1.3 from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
SHELL = /bin/sh
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DISTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
top_builddir = ..
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
transform = @program_transform_name@
|
||||
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
CC = @CC@
|
||||
CPP_PATH = @CPP_PATH@
|
||||
DFLAGS = @DFLAGS@
|
||||
GFXFLAGS = @GFXFLAGS@
|
||||
GFXLIBS = @GFXLIBS@
|
||||
I18N = @I18N@
|
||||
I18N_MB = @I18N_MB@
|
||||
ICONEXT = @ICONEXT@
|
||||
INTLIBS = @INTLIBS@
|
||||
LIBPL_INC_PATH = @LIBPL_INC_PATH@
|
||||
LIBPL_LIBS = @LIBPL_LIBS@
|
||||
LN_S = @LN_S@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MOFILES = @MOFILES@
|
||||
NLSDIR = @NLSDIR@
|
||||
PACKAGE = @PACKAGE@
|
||||
RANLIB = @RANLIB@
|
||||
REDUCE_APPICONS = @REDUCE_APPICONS@
|
||||
SHAPE = @SHAPE@
|
||||
SOUND = @SOUND@
|
||||
VERSION = @VERSION@
|
||||
WPMOFILES = @WPMOFILES@
|
||||
XCFLAGS = @XCFLAGS@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
XLFLAGS = @XLFLAGS@
|
||||
XLIBS = @XLIBS@
|
||||
XSHM = @XSHM@
|
||||
X_EXTRA_LIBS = @X_EXTRA_LIBS@
|
||||
X_LOCALE = @X_LOCALE@
|
||||
pixmapdir = @pixmapdir@
|
||||
wprefsdir = @wprefsdir@
|
||||
|
||||
SUBDIRS = xpm tiff po
|
||||
|
||||
nlsdir = @NLSDIR@
|
||||
|
||||
AUTOMAKE_OPTIONS = no-dependencies
|
||||
|
||||
wpexecbindir = @wprefsdir@
|
||||
|
||||
wpexecbin_PROGRAMS = WPrefs
|
||||
|
||||
wpdatadir = @wprefsdir@
|
||||
|
||||
wpdata_DATA = WPrefs.tiff WPrefs.xpm
|
||||
|
||||
EXTRA_DIST = $(wpdata_DATA)
|
||||
|
||||
WPrefs_SOURCES = \
|
||||
main.c \
|
||||
WPrefs.c \
|
||||
WPrefs.h \
|
||||
Configurations.c \
|
||||
Expert.c \
|
||||
Focus.c \
|
||||
Icons.c \
|
||||
KeyboardSettings.c \
|
||||
KeyboardShortcuts.c \
|
||||
Menu.c \
|
||||
MenuPreferences.c \
|
||||
MouseSettings.c \
|
||||
Paths.c \
|
||||
Preferences.c \
|
||||
Text.c \
|
||||
TextureAndColor.c \
|
||||
WindowHandling.c \
|
||||
Workspace.c \
|
||||
double.c \
|
||||
double.h \
|
||||
MenuGuru.c \
|
||||
xmodifier.c
|
||||
|
||||
CPPFLAGS = \
|
||||
@CPPFLAGS@ \
|
||||
@SHAPE@ @I18N@ @X_LOCALE@ \
|
||||
-DNLSDIR="\"$(nlsdir)\""
|
||||
|
||||
INCLUDES = \
|
||||
-I$(top_srcdir)/wrlib \
|
||||
-I$(top_srcdir)/WINGs \
|
||||
@XCFLAGS@ \
|
||||
@LIBPL_INC_PATH@
|
||||
|
||||
WPrefs_DEPENDENCIES = $(top_builddir)/WINGs/libWINGs.a
|
||||
|
||||
WPrefs_LDADD = \
|
||||
-L$(top_builddir)/WINGs -lWINGs\
|
||||
-L$(top_builddir)/wrlib -lwraster \
|
||||
@LIBPL_LIBS@ \
|
||||
@XLFLAGS@ \
|
||||
@GFXLIBS@ \
|
||||
@XLIBS@ \
|
||||
@X_EXTRA_LIBS@ \
|
||||
@INTLIBS@ \
|
||||
-lm
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../src/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
PROGRAMS = $(wpexecbin_PROGRAMS)
|
||||
|
||||
|
||||
DEFS = @DEFS@ -I. -I$(srcdir) -I../src
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
X_CFLAGS = @X_CFLAGS@
|
||||
X_LIBS = @X_LIBS@
|
||||
X_PRE_LIBS = @X_PRE_LIBS@
|
||||
WPrefs_OBJECTS = main.o WPrefs.o Configurations.o Expert.o Focus.o \
|
||||
Icons.o KeyboardSettings.o KeyboardShortcuts.o Menu.o MenuPreferences.o \
|
||||
MouseSettings.o Paths.o Preferences.o Text.o TextureAndColor.o \
|
||||
WindowHandling.o Workspace.o double.o MenuGuru.o xmodifier.o
|
||||
WPrefs_LDFLAGS =
|
||||
CFLAGS = @CFLAGS@
|
||||
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
|
||||
LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
DATA = $(wpdata_DATA)
|
||||
|
||||
DIST_COMMON = README Makefile.am Makefile.in
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
GZIP = --best
|
||||
SOURCES = $(WPrefs_SOURCES)
|
||||
OBJECTS = $(WPrefs_OBJECTS)
|
||||
|
||||
all: all-recursive all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .o .s
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu WPrefs.app/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
|
||||
mostlyclean-wpexecbinPROGRAMS:
|
||||
|
||||
clean-wpexecbinPROGRAMS:
|
||||
-test -z "$(wpexecbin_PROGRAMS)" || rm -f $(wpexecbin_PROGRAMS)
|
||||
|
||||
distclean-wpexecbinPROGRAMS:
|
||||
|
||||
maintainer-clean-wpexecbinPROGRAMS:
|
||||
|
||||
install-wpexecbinPROGRAMS: $(wpexecbin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(wpexecbindir)
|
||||
@list='$(wpexecbin_PROGRAMS)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(wpexecbindir)/`echo $$p|sed '$(transform)'`"; \
|
||||
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(wpexecbindir)/`echo $$p|sed '$(transform)'`; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-wpexecbinPROGRAMS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
list='$(wpexecbin_PROGRAMS)'; for p in $$list; do \
|
||||
rm -f $(DESTDIR)$(wpexecbindir)/`echo $$p|sed '$(transform)'`; \
|
||||
done
|
||||
|
||||
.c.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.s.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.S.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.o core *.core
|
||||
|
||||
clean-compile:
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
maintainer-clean-compile:
|
||||
|
||||
WPrefs: $(WPrefs_OBJECTS) $(WPrefs_DEPENDENCIES)
|
||||
@rm -f WPrefs
|
||||
$(LINK) $(WPrefs_LDFLAGS) $(WPrefs_OBJECTS) $(WPrefs_LDADD) $(LIBS)
|
||||
|
||||
install-wpdataDATA: $(wpdata_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(wpdatadir)
|
||||
@list='$(wpdata_DATA)'; for p in $$list; do \
|
||||
if test -f $(srcdir)/$$p; then \
|
||||
echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(wpdatadir)/$$p"; \
|
||||
$(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(wpdatadir)/$$p; \
|
||||
else if test -f $$p; then \
|
||||
echo " $(INSTALL_DATA) $$p $(DESTDIR)$(wpdatadir)/$$p"; \
|
||||
$(INSTALL_DATA) $$p $(DESTDIR)$(wpdatadir)/$$p; \
|
||||
fi; fi; \
|
||||
done
|
||||
|
||||
uninstall-wpdataDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
list='$(wpdata_DATA)'; for p in $$list; do \
|
||||
rm -f $(DESTDIR)$(wpdatadir)/$$p; \
|
||||
done
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
all-recursive install-data-recursive install-exec-recursive \
|
||||
installdirs-recursive install-recursive uninstall-recursive \
|
||||
check-recursive installcheck-recursive info-recursive dvi-recursive:
|
||||
@set fnord $(MAKEFLAGS); amf=$$2; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
(cd $$subdir && $(MAKE) $$target) \
|
||||
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||||
done && test -z "$$fail"
|
||||
|
||||
mostlyclean-recursive clean-recursive distclean-recursive \
|
||||
maintainer-clean-recursive:
|
||||
@set fnord $(MAKEFLAGS); amf=$$2; \
|
||||
rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
rev="$$subdir $$rev"; \
|
||||
done; \
|
||||
for subdir in $$rev; do \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
(cd $$subdir && $(MAKE) $$target) \
|
||||
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
(cd $$subdir && $(MAKE) tags); \
|
||||
done
|
||||
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP)
|
||||
here=`pwd` && cd $(srcdir) \
|
||||
&& mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|
||||
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
|
||||
|
||||
mostlyclean-tags:
|
||||
|
||||
clean-tags:
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID
|
||||
|
||||
maintainer-clean-tags:
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
subdir = WPrefs.app
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file; \
|
||||
done
|
||||
for subdir in $(SUBDIRS); do \
|
||||
test -d $(distdir)/$$subdir \
|
||||
|| mkdir $(distdir)/$$subdir \
|
||||
|| exit 1; \
|
||||
chmod 777 $(distdir)/$$subdir; \
|
||||
(cd $$subdir && $(MAKE) top_distdir=../$(top_distdir) distdir=../$(distdir)/$$subdir distdir) \
|
||||
|| exit 1; \
|
||||
done
|
||||
info: info-recursive
|
||||
dvi: dvi-recursive
|
||||
check: all-am
|
||||
$(MAKE) check-recursive
|
||||
installcheck: installcheck-recursive
|
||||
all-am: Makefile $(PROGRAMS) $(DATA)
|
||||
|
||||
install-exec-am: install-wpexecbinPROGRAMS
|
||||
|
||||
install-data-am: install-wpdataDATA
|
||||
|
||||
uninstall-am: uninstall-wpexecbinPROGRAMS uninstall-wpdataDATA
|
||||
|
||||
install-exec: install-exec-recursive install-exec-am
|
||||
@$(NORMAL_INSTALL)
|
||||
|
||||
install-data: install-data-recursive install-data-am
|
||||
@$(NORMAL_INSTALL)
|
||||
|
||||
install: install-recursive install-exec-am install-data-am
|
||||
@:
|
||||
|
||||
uninstall: uninstall-recursive uninstall-am
|
||||
|
||||
install-strip:
|
||||
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
installdirs: installdirs-recursive
|
||||
$(mkinstalldirs) $(DATADIR)$(wpexecbindir) $(DATADIR)$(wpdatadir)
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(DISTCLEANFILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
||||
mostlyclean-am: mostlyclean-wpexecbinPROGRAMS mostlyclean-compile \
|
||||
mostlyclean-tags mostlyclean-generic
|
||||
|
||||
clean-am: clean-wpexecbinPROGRAMS clean-compile clean-tags \
|
||||
clean-generic mostlyclean-am
|
||||
|
||||
distclean-am: distclean-wpexecbinPROGRAMS distclean-compile \
|
||||
distclean-tags distclean-generic clean-am
|
||||
|
||||
maintainer-clean-am: maintainer-clean-wpexecbinPROGRAMS \
|
||||
maintainer-clean-compile maintainer-clean-tags \
|
||||
maintainer-clean-generic distclean-am
|
||||
|
||||
mostlyclean: mostlyclean-recursive mostlyclean-am
|
||||
|
||||
clean: clean-recursive clean-am
|
||||
|
||||
distclean: distclean-recursive distclean-am
|
||||
-rm -f config.status
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive maintainer-clean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
.PHONY: mostlyclean-wpexecbinPROGRAMS distclean-wpexecbinPROGRAMS \
|
||||
clean-wpexecbinPROGRAMS maintainer-clean-wpexecbinPROGRAMS \
|
||||
uninstall-wpexecbinPROGRAMS install-wpexecbinPROGRAMS \
|
||||
mostlyclean-compile distclean-compile clean-compile \
|
||||
maintainer-clean-compile uninstall-wpdataDATA install-wpdataDATA \
|
||||
install-data-recursive uninstall-data-recursive install-exec-recursive \
|
||||
uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
|
||||
all-recursive check-recursive installcheck-recursive info-recursive \
|
||||
dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
|
||||
maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
|
||||
distclean-tags clean-tags maintainer-clean-tags distdir info dvi \
|
||||
installcheck all-am install-exec-am install-data-am uninstall-am \
|
||||
install-exec install-data install uninstall all installdirs \
|
||||
mostlyclean-generic distclean-generic clean-generic \
|
||||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
+1366
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,502 @@
|
||||
/* MenuGuru.c- OPEN_MENU definition "guru" assistant
|
||||
*
|
||||
* WPrefs - WindowMaker 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 <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
|
||||
typedef struct _MenuGuru {
|
||||
WMWindow *win;
|
||||
|
||||
WMButton *nextB;
|
||||
WMButton *backB;
|
||||
WMButton *cancelB;
|
||||
|
||||
WMLabel *typetopL;
|
||||
WMButton *typefB;
|
||||
WMButton *typepB;
|
||||
WMButton *typedB;
|
||||
|
||||
WMLabel *pathtopL;
|
||||
WMTextField *pathT;
|
||||
WMButton *pathB;
|
||||
WMLabel *pathbotL;
|
||||
|
||||
WMLabel *pipetopL;
|
||||
WMTextField *pipeT;
|
||||
WMLabel *pipebotL;
|
||||
|
||||
WMLabel *dirtopL;
|
||||
WMTextField *dirT;
|
||||
WMLabel *dirbotL;
|
||||
|
||||
WMLabel *progtopL;
|
||||
WMTextField *progT;
|
||||
WMLabel *progbotL;
|
||||
|
||||
|
||||
char ok;
|
||||
char end;
|
||||
int section;
|
||||
} MenuGuru;
|
||||
|
||||
|
||||
enum {
|
||||
GSelectType,
|
||||
GSelectFile,
|
||||
GSelectPaths,
|
||||
GSelectPipe,
|
||||
GSelectProgram,
|
||||
GDone
|
||||
};
|
||||
|
||||
|
||||
|
||||
static char*
|
||||
trimstr(char *str)
|
||||
{
|
||||
char *p = str;
|
||||
int i;
|
||||
|
||||
while (isspace(*p)) p++;
|
||||
p = wstrdup(p);
|
||||
i = strlen(p);
|
||||
while (isspace(p[i]) && i>0) {
|
||||
p[i] = 0;
|
||||
i--;
|
||||
}
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
showPart(MenuGuru *panel, int part)
|
||||
{
|
||||
WMUnmapSubwidgets(panel->win);
|
||||
WMMapWidget(panel->nextB);
|
||||
WMMapWidget(panel->backB);
|
||||
WMMapWidget(panel->cancelB);
|
||||
|
||||
WMSetButtonEnabled(panel->backB, part!=GSelectType);
|
||||
|
||||
switch (part) {
|
||||
case GSelectType:
|
||||
WMSetWindowTitle(panel->win, _("Menu Guru - Select Type"));
|
||||
WMMapWidget(panel->typetopL);
|
||||
WMMapWidget(panel->typedB);
|
||||
WMMapWidget(panel->typepB);
|
||||
WMMapWidget(panel->typefB);
|
||||
WMSetButtonText(panel->nextB, _("Next"));
|
||||
break;
|
||||
case GSelectFile:
|
||||
WMSetWindowTitle(panel->win, _("Menu Guru - Select Menu File"));
|
||||
WMMapWidget(panel->pathtopL);
|
||||
WMMapWidget(panel->pathT);
|
||||
/* WMMapWidget(panel->pathB);*/
|
||||
WMMapWidget(panel->pathbotL);
|
||||
WMSetButtonText(panel->nextB, _("OK"));
|
||||
break;
|
||||
case GSelectPipe:
|
||||
WMSetWindowTitle(panel->win, _("Menu Guru - Select Pipe Command"));
|
||||
WMMapWidget(panel->pipetopL);
|
||||
WMMapWidget(panel->pipeT);
|
||||
WMMapWidget(panel->pipebotL);
|
||||
WMSetButtonText(panel->nextB, _("OK"));
|
||||
break;
|
||||
case GSelectPaths:
|
||||
WMSetWindowTitle(panel->win, _("Menu Guru - Select Directories"));
|
||||
WMMapWidget(panel->dirtopL);
|
||||
WMMapWidget(panel->dirT);
|
||||
WMMapWidget(panel->dirbotL);
|
||||
WMSetButtonText(panel->nextB, _("Next"));
|
||||
break;
|
||||
case GSelectProgram:
|
||||
WMSetWindowTitle(panel->win, _("Menu Guru - Select Command"));
|
||||
WMMapWidget(panel->progtopL);
|
||||
WMMapWidget(panel->progT);
|
||||
WMMapWidget(panel->progbotL);
|
||||
WMSetButtonText(panel->nextB, _("OK"));
|
||||
break;
|
||||
}
|
||||
panel->section = part;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
clickNext(WMWidget *w, void *data)
|
||||
{
|
||||
MenuGuru *panel = (MenuGuru*)data;
|
||||
char *tmp, *p;
|
||||
|
||||
switch (panel->section) {
|
||||
case GSelectType:
|
||||
if (WMGetButtonSelected(panel->typefB)) {
|
||||
showPart(panel, GSelectFile);
|
||||
} else if (WMGetButtonSelected(panel->typepB)) {
|
||||
showPart(panel, GSelectPipe);
|
||||
} else {
|
||||
showPart(panel, GSelectPaths);
|
||||
}
|
||||
break;
|
||||
case GSelectFile:
|
||||
tmp = WMGetTextFieldText(panel->pathT);
|
||||
p = trimstr(tmp); free(tmp);
|
||||
if (strlen(p)==0) {
|
||||
free(p);
|
||||
return;
|
||||
}
|
||||
free(p);
|
||||
panel->ok = 1;
|
||||
panel->end = 1;
|
||||
break;
|
||||
case GSelectPaths:
|
||||
tmp = WMGetTextFieldText(panel->dirT);
|
||||
p = trimstr(tmp); free(tmp);
|
||||
if (strlen(p)==0) {
|
||||
free(p);
|
||||
return;
|
||||
}
|
||||
free(p);
|
||||
showPart(panel, GSelectProgram);
|
||||
break;
|
||||
case GSelectPipe:
|
||||
tmp = WMGetTextFieldText(panel->pipeT);
|
||||
p = trimstr(tmp); free(tmp);
|
||||
if (strlen(p)==0) {
|
||||
free(p);
|
||||
return;
|
||||
}
|
||||
free(p);
|
||||
panel->ok = 1;
|
||||
panel->end = 1;
|
||||
break;
|
||||
case GSelectProgram:
|
||||
panel->ok = 1;
|
||||
panel->end = 1;
|
||||
break;
|
||||
default:
|
||||
panel->end = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void
|
||||
clickBack(WMWidget *w, void *data)
|
||||
{
|
||||
MenuGuru *panel = (MenuGuru*)data;
|
||||
int newSection;
|
||||
|
||||
switch (panel->section) {
|
||||
case GSelectFile:
|
||||
newSection = GSelectType;
|
||||
break;
|
||||
case GSelectPipe:
|
||||
newSection = GSelectType;
|
||||
break;
|
||||
case GSelectPaths:
|
||||
newSection = GSelectType;
|
||||
break;
|
||||
case GSelectProgram:
|
||||
newSection = GSelectPaths;
|
||||
break;
|
||||
default:
|
||||
newSection = panel->section;
|
||||
}
|
||||
showPart(panel, newSection);
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void
|
||||
closeWindow(WMWidget *w, void *data)
|
||||
{
|
||||
MenuGuru *panel = (MenuGuru*)data;
|
||||
|
||||
panel->end = 1;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
createPanel(WMWindow *mainWindow, MenuGuru *panel)
|
||||
{
|
||||
panel->win = WMCreatePanelForWindow(mainWindow, "menuGuru");
|
||||
WMResizeWidget(panel->win, 370, 220);
|
||||
|
||||
panel->nextB = WMCreateCommandButton(panel->win);
|
||||
WMResizeWidget(panel->nextB, 80, 24);
|
||||
WMMoveWidget(panel->nextB, 280, 185);
|
||||
WMSetButtonText(panel->nextB, _("Next"));
|
||||
WMSetButtonAction(panel->nextB, clickNext, panel);
|
||||
|
||||
panel->backB = WMCreateCommandButton(panel->win);
|
||||
WMResizeWidget(panel->backB, 80, 24);
|
||||
WMMoveWidget(panel->backB, 195, 185);
|
||||
WMSetButtonText(panel->backB, _("Back"));
|
||||
WMSetButtonAction(panel->backB, clickBack, panel);
|
||||
|
||||
panel->cancelB = WMCreateCommandButton(panel->win);
|
||||
WMResizeWidget(panel->cancelB, 80, 24);
|
||||
WMMoveWidget(panel->cancelB, 110, 185);
|
||||
WMSetButtonText(panel->cancelB, _("Cancel"));
|
||||
WMSetButtonAction(panel->cancelB, closeWindow, panel);
|
||||
|
||||
/**/
|
||||
|
||||
panel->typetopL = WMCreateLabel(panel->win);
|
||||
WMResizeWidget(panel->typetopL, 350, 45);
|
||||
WMMoveWidget(panel->typetopL, 10, 10);
|
||||
WMSetLabelText(panel->typetopL, _("This process will help you create a "
|
||||
"submenu which definition is located in another file "
|
||||
"or is created dynamically.\nWhat do you want to use as the "
|
||||
"contents of the submenu?"));
|
||||
|
||||
panel->typefB = WMCreateRadioButton(panel->win);
|
||||
WMResizeWidget(panel->typefB, 330, 35);
|
||||
WMMoveWidget(panel->typefB, 20, 65);
|
||||
WMSetButtonText(panel->typefB, _("A file containing the menu definition "
|
||||
"in the plain text (non-property list) menu format."));
|
||||
|
||||
panel->typepB = WMCreateRadioButton(panel->win);
|
||||
WMResizeWidget(panel->typepB, 330, 35);
|
||||
WMMoveWidget(panel->typepB, 20, 105);
|
||||
WMSetButtonText(panel->typepB, _("The menu definition generated by a "
|
||||
"script/program read through a pipe."));
|
||||
|
||||
panel->typedB = WMCreateRadioButton(panel->win);
|
||||
WMResizeWidget(panel->typedB, 330, 35);
|
||||
WMMoveWidget(panel->typedB, 20, 140);
|
||||
WMSetButtonText(panel->typedB, _("The files in one or more directories."));
|
||||
|
||||
WMGroupButtons(panel->typefB, panel->typepB);
|
||||
WMGroupButtons(panel->typefB, panel->typedB);
|
||||
|
||||
WMPerformButtonClick(panel->typefB);
|
||||
|
||||
/**/
|
||||
|
||||
panel->pathtopL = WMCreateLabel(panel->win);
|
||||
WMResizeWidget(panel->pathtopL, 330, 20);
|
||||
WMMoveWidget(panel->pathtopL, 20, 25);
|
||||
WMSetLabelText(panel->pathtopL, _("Type the path for the menu file:"));
|
||||
|
||||
panel->pathT = WMCreateTextField(panel->win);
|
||||
WMResizeWidget(panel->pathT, 330, 20);
|
||||
WMMoveWidget(panel->pathT, 20, 50);
|
||||
/*
|
||||
panel->pathB = WMCreateCommandButton(panel->win);
|
||||
WMResizeWidget(panel->pathB, 70, 24);
|
||||
WMMoveWidget(panel->pathB, 275, 75);
|
||||
WMSetButtonText(panel->pathB, _("Browse"));
|
||||
*/
|
||||
|
||||
panel->pathbotL = WMCreateLabel(panel->win);
|
||||
WMResizeWidget(panel->pathbotL, 330, 80);
|
||||
WMMoveWidget(panel->pathbotL, 20, 100);
|
||||
WMSetLabelText(panel->pathbotL, _("The menu file must contain a menu "
|
||||
"in the plain text menu file format. This format is "
|
||||
"described in the menu files included with WindowMaker, "
|
||||
"probably at ~/GNUstep/Library/WindowMaker/menu"));
|
||||
|
||||
/**/
|
||||
|
||||
panel->pipetopL = WMCreateLabel(panel->win);
|
||||
WMResizeWidget(panel->pipetopL, 330, 32);
|
||||
WMMoveWidget(panel->pipetopL, 20, 20);
|
||||
WMSetLabelText(panel->pipetopL, _("Type the command that will generate "
|
||||
"the menu definition:"));
|
||||
|
||||
panel->pipeT = WMCreateTextField(panel->win);
|
||||
WMResizeWidget(panel->pipeT, 330, 20);
|
||||
WMMoveWidget(panel->pipeT, 20, 55);
|
||||
|
||||
panel->pipebotL = WMCreateLabel(panel->win);
|
||||
WMResizeWidget(panel->pipebotL, 330, 80);
|
||||
WMMoveWidget(panel->pipebotL, 20, 85);
|
||||
WMSetLabelText(panel->pipebotL, _("The command supplied must generate and "
|
||||
"output a valid menu definition to stdout. This definition "
|
||||
"should be in the plain text menu file format, described "
|
||||
"in the menu files included with WindowMaker, usually "
|
||||
"at ~/GNUstep/Library/WindowMaker/menu"));
|
||||
|
||||
|
||||
/**/
|
||||
|
||||
panel->dirtopL = WMCreateLabel(panel->win);
|
||||
WMResizeWidget(panel->dirtopL, 330, 32);
|
||||
WMMoveWidget(panel->dirtopL, 20, 20);
|
||||
WMSetLabelText(panel->dirtopL, _("Type the path for the directory. You "
|
||||
"can type more than one path by separating them with "
|
||||
"spaces."));
|
||||
|
||||
panel->dirT = WMCreateTextField(panel->win);
|
||||
WMResizeWidget(panel->dirT, 330, 20);
|
||||
WMMoveWidget(panel->dirT, 20, 55);
|
||||
|
||||
panel->dirbotL = WMCreateLabel(panel->win);
|
||||
WMResizeWidget(panel->dirbotL, 330, 80);
|
||||
WMMoveWidget(panel->dirbotL, 20, 85);
|
||||
WMSetLabelText(panel->dirbotL, _("The menu generated will have an item "
|
||||
"for each file in the directory. The directories can "
|
||||
"contain program executables or data files (such as "
|
||||
"jpeg images)."));
|
||||
|
||||
|
||||
/**/
|
||||
|
||||
panel->dirtopL = WMCreateLabel(panel->win);
|
||||
WMResizeWidget(panel->dirtopL, 330, 32);
|
||||
WMMoveWidget(panel->dirtopL, 20, 20);
|
||||
WMSetLabelText(panel->dirtopL, _("Type the path for the directory. You "
|
||||
"can type more than one path by separating them with "
|
||||
"spaces."));
|
||||
|
||||
panel->dirT = WMCreateTextField(panel->win);
|
||||
WMResizeWidget(panel->dirT, 330, 20);
|
||||
WMMoveWidget(panel->dirT, 20, 55);
|
||||
|
||||
panel->dirbotL = WMCreateLabel(panel->win);
|
||||
WMResizeWidget(panel->dirbotL, 330, 80);
|
||||
WMMoveWidget(panel->dirbotL, 20, 85);
|
||||
WMSetLabelText(panel->dirbotL, _("The menu generated will have an item "
|
||||
"for each file in the directory. The directories can "
|
||||
"contain program executables or data files (such as "
|
||||
"jpeg images)."));
|
||||
|
||||
|
||||
/**/
|
||||
|
||||
panel->dirtopL = WMCreateLabel(panel->win);
|
||||
WMResizeWidget(panel->dirtopL, 330, 32);
|
||||
WMMoveWidget(panel->dirtopL, 20, 20);
|
||||
WMSetLabelText(panel->dirtopL, _("Type the path for the directory. You "
|
||||
"can type more than one path by separating them with "
|
||||
"spaces."));
|
||||
|
||||
panel->dirT = WMCreateTextField(panel->win);
|
||||
WMResizeWidget(panel->dirT, 330, 20);
|
||||
WMMoveWidget(panel->dirT, 20, 60);
|
||||
|
||||
panel->dirbotL = WMCreateLabel(panel->win);
|
||||
WMResizeWidget(panel->dirbotL, 330, 80);
|
||||
WMMoveWidget(panel->dirbotL, 20, 85);
|
||||
WMSetLabelText(panel->dirbotL, _("The menu generated will have an item "
|
||||
"for each file in the directory. The directories can "
|
||||
"contain program executables or data files (such as "
|
||||
"jpeg images)."));
|
||||
|
||||
/**/
|
||||
|
||||
panel->progtopL = WMCreateLabel(panel->win);
|
||||
WMResizeWidget(panel->progtopL, 330, 48);
|
||||
WMMoveWidget(panel->progtopL, 20, 10);
|
||||
WMSetLabelText(panel->progtopL, _("If the directory contain data files, "
|
||||
"type the command used to open these files. Otherwise, "
|
||||
"leave it in blank."));
|
||||
|
||||
panel->progT = WMCreateTextField(panel->win);
|
||||
WMResizeWidget(panel->progT, 330, 20);
|
||||
WMMoveWidget(panel->progT, 20, 60);
|
||||
|
||||
panel->progbotL = WMCreateLabel(panel->win);
|
||||
WMResizeWidget(panel->progbotL, 330, 72);
|
||||
WMMoveWidget(panel->progbotL, 20, 90);
|
||||
WMSetLabelText(panel->progbotL, _("Each file in the directory will have "
|
||||
"an item and they will be opened with the supplied command."
|
||||
"For example, if the directory contains image files and "
|
||||
"the command is \"xv -root\", each file in the directory "
|
||||
"will have a menu item like \"xv -root imagefile\"."));
|
||||
|
||||
WMRealizeWidget(panel->win);
|
||||
}
|
||||
|
||||
|
||||
|
||||
char*
|
||||
OpenMenuGuru(WMWindow *mainWindow)
|
||||
{
|
||||
WMScreen *scr = WMWidgetScreen(mainWindow);
|
||||
MenuGuru panel;
|
||||
char *text, *p, *dirs;
|
||||
|
||||
createPanel(mainWindow, &panel);
|
||||
WMSetWindowCloseAction(panel.win, closeWindow, &panel);
|
||||
|
||||
showPart(&panel, GSelectType);
|
||||
|
||||
WMMapWidget(panel.win);
|
||||
|
||||
panel.ok = 0;
|
||||
panel.end = 0;
|
||||
while (!panel.end) {
|
||||
XEvent ev;
|
||||
WMNextEvent(WMScreenDisplay(scr), &ev);
|
||||
WMHandleEvent(&ev);
|
||||
}
|
||||
|
||||
text = NULL;
|
||||
if (panel.ok) {
|
||||
switch (panel.section) {
|
||||
case GSelectFile:
|
||||
text = WMGetTextFieldText(panel.pathT);
|
||||
break;
|
||||
case GSelectPipe:
|
||||
text = WMGetTextFieldText(panel.pipeT);
|
||||
p = trimstr(text); free(text);
|
||||
if (p[0]!='|') {
|
||||
text = wmalloc(strlen(p)+4);
|
||||
strcpy(text, "| ");
|
||||
strcat(text, p);
|
||||
free(p);
|
||||
} else {
|
||||
text = p;
|
||||
}
|
||||
break;
|
||||
case GSelectProgram:
|
||||
dirs = WMGetTextFieldText(panel.dirT);
|
||||
text = WMGetTextFieldText(panel.progT);
|
||||
p = trimstr(text); free(text);
|
||||
if (strlen(p)==0) {
|
||||
free(p);
|
||||
text = dirs;
|
||||
} else {
|
||||
text = wmalloc(strlen(dirs)+16+strlen(p));
|
||||
sprintf(text, "%s WITH %s", dirs, p);
|
||||
free(dirs);
|
||||
free(p);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
WMDestroyWidget(panel.win);
|
||||
|
||||
return text;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,239 @@
|
||||
/* MenuPreferences.c- menu related preferences
|
||||
*
|
||||
* WPrefs - WindowMaker 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"
|
||||
|
||||
typedef struct _Panel {
|
||||
WMFrame *frame;
|
||||
|
||||
char *sectionName;
|
||||
|
||||
CallbackRec callbacks;
|
||||
|
||||
WMWindow *win;
|
||||
|
||||
WMFrame *scrF;
|
||||
WMButton *scrB[5];
|
||||
|
||||
WMFrame *aliF;
|
||||
WMButton *aliyB;
|
||||
WMButton *alinB;
|
||||
|
||||
WMFrame *optF;
|
||||
WMButton *autoB;
|
||||
WMButton *wrapB;
|
||||
|
||||
} _Panel;
|
||||
|
||||
|
||||
|
||||
#define ICON_FILE "menuprefs"
|
||||
#define SPEED_IMAGE "speed%i"
|
||||
#define SPEED_IMAGE_S "speed%is"
|
||||
|
||||
#define MENU_ALIGN1 "menualign1"
|
||||
#define MENU_ALIGN2 "menualign2"
|
||||
|
||||
|
||||
static void
|
||||
showData(_Panel *panel)
|
||||
{
|
||||
WMPerformButtonClick(panel->scrB[GetSpeedForKey("MenuScrollSpeed")]);
|
||||
|
||||
if (GetBoolForKey("AlignSubmenus"))
|
||||
WMPerformButtonClick(panel->aliyB);
|
||||
else
|
||||
WMPerformButtonClick(panel->alinB);
|
||||
|
||||
WMSetButtonSelected(panel->wrapB, GetBoolForKey("WrapMenus"));
|
||||
|
||||
WMSetButtonSelected(panel->autoB, GetBoolForKey("ScrollableMenus"));
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
storeData(_Panel *panel)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i=0; i<5; i++) {
|
||||
if (WMGetButtonSelected(panel->scrB[i]))
|
||||
break;
|
||||
}
|
||||
SetSpeedForKey(i, "MenuScrollSpeed");
|
||||
|
||||
SetBoolForKey(WMGetButtonSelected(panel->aliyB), "AlignSubmenus");
|
||||
|
||||
SetBoolForKey(WMGetButtonSelected(panel->wrapB), "WrapMenus");
|
||||
SetBoolForKey(WMGetButtonSelected(panel->autoB), "ScrollableMenus");
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
createPanel(Panel *p)
|
||||
{
|
||||
_Panel *panel = (_Panel*)p;
|
||||
WMScreen *scr = WMWidgetScreen(panel->win);
|
||||
|
||||
WMPixmap *icon;
|
||||
int i;
|
||||
char *buf1, *buf2;
|
||||
char *path;
|
||||
|
||||
panel->frame = WMCreateFrame(panel->win);
|
||||
WMResizeWidget(panel->frame, FRAME_WIDTH, FRAME_HEIGHT);
|
||||
WMMoveWidget(panel->frame, FRAME_LEFT, FRAME_TOP);
|
||||
|
||||
|
||||
/***************** Menu Scroll Speed ****************/
|
||||
panel->scrF = WMCreateFrame(panel->frame);
|
||||
WMResizeWidget(panel->scrF, 235, 90);
|
||||
WMMoveWidget(panel->scrF, 25, 20);
|
||||
WMSetFrameTitle(panel->scrF, _("Menu Scrolling Speed"));
|
||||
|
||||
|
||||
buf1 = wmalloc(strlen(SPEED_IMAGE)+1);
|
||||
buf2 = wmalloc(strlen(SPEED_IMAGE_S)+1);
|
||||
for (i = 0; i < 5; i++) {
|
||||
panel->scrB[i] = WMCreateCustomButton(panel->scrF, WBBStateChangeMask);
|
||||
WMResizeWidget(panel->scrB[i], 40, 40);
|
||||
WMMoveWidget(panel->scrB[i], 15+(40*i), 30);
|
||||
WMSetButtonBordered(panel->scrB[i], False);
|
||||
WMSetButtonImagePosition(panel->scrB[i], WIPImageOnly);
|
||||
if (i > 0) {
|
||||
WMGroupButtons(panel->scrB[0], panel->scrB[i]);
|
||||
}
|
||||
sprintf(buf1, SPEED_IMAGE, i);
|
||||
sprintf(buf2, SPEED_IMAGE_S, i);
|
||||
path = LocateImage(buf1);
|
||||
if (path) {
|
||||
icon = WMCreatePixmapFromFile(scr, path);
|
||||
if (icon) {
|
||||
WMSetButtonImage(panel->scrB[i], icon);
|
||||
WMReleasePixmap(icon);
|
||||
} else {
|
||||
wwarning(_("could not load icon file %s"), path);
|
||||
}
|
||||
free(path);
|
||||
}
|
||||
path = LocateImage(buf2);
|
||||
if (path) {
|
||||
icon = WMCreatePixmapFromFile(scr, path);
|
||||
if (icon) {
|
||||
WMSetButtonAltImage(panel->scrB[i], icon);
|
||||
WMReleasePixmap(icon);
|
||||
} else {
|
||||
wwarning(_("could not load icon file %s"), path);
|
||||
}
|
||||
free(path);
|
||||
}
|
||||
}
|
||||
free(buf1);
|
||||
free(buf2);
|
||||
|
||||
WMMapSubwidgets(panel->scrF);
|
||||
|
||||
/***************** Submenu Alignment ****************/
|
||||
|
||||
panel->aliF = WMCreateFrame(panel->frame);
|
||||
WMResizeWidget(panel->aliF, 220, 90);
|
||||
WMMoveWidget(panel->aliF, 280, 20);
|
||||
WMSetFrameTitle(panel->aliF, _("Submenu Alignment"));
|
||||
|
||||
panel->alinB = WMCreateButton(panel->aliF, WBTOnOff);
|
||||
WMResizeWidget(panel->alinB, 48, 48);
|
||||
WMMoveWidget(panel->alinB, 56, 25);
|
||||
WMSetButtonImagePosition(panel->alinB, WIPImageOnly);
|
||||
path = LocateImage(MENU_ALIGN1);
|
||||
if (path) {
|
||||
icon = WMCreatePixmapFromFile(scr, path);
|
||||
if (icon) {
|
||||
WMSetButtonImage(panel->alinB, icon);
|
||||
WMReleasePixmap(icon);
|
||||
} else {
|
||||
wwarning(_("could not load icon file %s"), path);
|
||||
}
|
||||
free(path);
|
||||
}
|
||||
panel->aliyB = WMCreateButton(panel->aliF, WBTOnOff);
|
||||
WMResizeWidget(panel->aliyB, 48, 48);
|
||||
WMMoveWidget(panel->aliyB, 120, 25);
|
||||
WMSetButtonImagePosition(panel->aliyB, WIPImageOnly);
|
||||
path = LocateImage(MENU_ALIGN2);
|
||||
if (path) {
|
||||
icon = WMCreatePixmapFromFile(scr, path);
|
||||
if (icon) {
|
||||
WMSetButtonImage(panel->aliyB, icon);
|
||||
WMReleasePixmap(icon);
|
||||
} else {
|
||||
wwarning(_("could not load icon file %s"), path);
|
||||
}
|
||||
}
|
||||
WMGroupButtons(panel->alinB, panel->aliyB);
|
||||
|
||||
WMMapSubwidgets(panel->aliF);
|
||||
|
||||
/***************** Options ****************/
|
||||
panel->optF = WMCreateFrame(panel->frame);
|
||||
WMResizeWidget(panel->optF, 475, 80);
|
||||
WMMoveWidget(panel->optF, 25, 130);
|
||||
|
||||
panel->wrapB = WMCreateSwitchButton(panel->optF);
|
||||
WMResizeWidget(panel->wrapB, 440, 32);
|
||||
WMMoveWidget(panel->wrapB, 25, 8);
|
||||
WMSetButtonText(panel->wrapB, _("Always open submenus inside the screen, instead of scrolling.\nNote: this can be an annoyance at some circumstances."));
|
||||
|
||||
panel->autoB = WMCreateSwitchButton(panel->optF);
|
||||
WMResizeWidget(panel->autoB, 440, 20);
|
||||
WMMoveWidget(panel->autoB, 25, 45);
|
||||
WMSetButtonText(panel->autoB, _("Scroll off-screen menus when pointer is moved over them."));
|
||||
|
||||
WMMapSubwidgets(panel->optF);
|
||||
|
||||
WMRealizeWidget(panel->frame);
|
||||
WMMapSubwidgets(panel->frame);
|
||||
|
||||
showData(panel);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Panel*
|
||||
InitMenuPreferences(WMScreen *scr, WMWindow *win)
|
||||
{
|
||||
_Panel *panel;
|
||||
|
||||
panel = wmalloc(sizeof(_Panel));
|
||||
memset(panel, 0, sizeof(_Panel));
|
||||
|
||||
panel->sectionName = _("Menu Preferences");
|
||||
|
||||
panel->win = win;
|
||||
|
||||
panel->callbacks.createWidgets = createPanel;
|
||||
panel->callbacks.updateDomain = storeData;
|
||||
|
||||
AddSection(panel, ICON_FILE);
|
||||
|
||||
return panel;
|
||||
}
|
||||
@@ -0,0 +1,906 @@
|
||||
/* MouseSettings.c- mouse options (some are equivalent to xset)
|
||||
*
|
||||
* WPrefs - WindowMaker 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 <X11/Xutil.h>
|
||||
|
||||
#include <math.h>
|
||||
|
||||
/* double-click tester */
|
||||
#include "double.h"
|
||||
|
||||
|
||||
|
||||
#define XSET "xset"
|
||||
|
||||
|
||||
|
||||
typedef struct _Panel {
|
||||
WMFrame *frame;
|
||||
|
||||
char *sectionName;
|
||||
|
||||
CallbackRec callbacks;
|
||||
|
||||
WMWindow *win;
|
||||
|
||||
WMFrame *speedF;
|
||||
WMLabel *speedL;
|
||||
WMButton *speedB[5];
|
||||
WMLabel *acceL;
|
||||
WMLabel *threL;
|
||||
WMTextField *threT;
|
||||
|
||||
WMFrame *ddelaF;
|
||||
WMButton *ddelaB[5];
|
||||
DoubleTest *tester;
|
||||
|
||||
WMFrame *menuF;
|
||||
WMLabel *listL;
|
||||
WMLabel *appL;
|
||||
WMLabel *selL;
|
||||
WMLabel *mblL;
|
||||
WMLabel *mbmL;
|
||||
WMLabel *mbrL;
|
||||
WMButton *lmb[3];
|
||||
WMButton *amb[3];
|
||||
WMButton *smb[3];
|
||||
|
||||
|
||||
WMButton *disaB;
|
||||
|
||||
WMFrame *grabF;
|
||||
WMPopUpButton *grabP;
|
||||
|
||||
/**/
|
||||
WMButton *lastClickedSpeed;
|
||||
int maxThreshold;
|
||||
float acceleration;
|
||||
} _Panel;
|
||||
|
||||
|
||||
#define ICON_FILE "mousesettings"
|
||||
|
||||
#define SPEED_ICON_FILE "mousespeed"
|
||||
#define SPEED_IMAGE "speed%i"
|
||||
#define SPEED_IMAGE_S "speed%is"
|
||||
|
||||
#define DELAY_ICON "timer%i"
|
||||
#define DELAY_ICON_S "timer%is"
|
||||
|
||||
#define MOUSEB_L "minimouseleft"
|
||||
#define MOUSEB_M "minimousemiddle"
|
||||
#define MOUSEB_R "minimouseright"
|
||||
|
||||
/* need access to the double click variables */
|
||||
#include "WINGsP.h"
|
||||
|
||||
|
||||
|
||||
static char *modifierNames[] = {
|
||||
"Shift",
|
||||
"Lock",
|
||||
"Control",
|
||||
"Mod1",
|
||||
"Mod2",
|
||||
"Mod3",
|
||||
"Mod4",
|
||||
"Mod5"
|
||||
};
|
||||
|
||||
|
||||
#define DELAY(i) ((i)*75+170)
|
||||
|
||||
|
||||
int ModifierFromKey(Display *dpy, char *key);
|
||||
|
||||
|
||||
static void
|
||||
setMouseAccel(WMScreen *scr, float accel, int threshold)
|
||||
{
|
||||
int n, d;
|
||||
|
||||
d = 10;
|
||||
n = accel*d;
|
||||
|
||||
XChangePointerControl(WMScreenDisplay(scr), True, True, n, d, threshold);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
speedClick(WMWidget *w, void *data)
|
||||
{
|
||||
_Panel *panel = (_Panel*)data;
|
||||
int i;
|
||||
char buffer[64];
|
||||
int threshold;
|
||||
char *tmp;
|
||||
|
||||
for (i=0; i<5; i++) {
|
||||
if (panel->speedB[i]==w)
|
||||
break;
|
||||
}
|
||||
|
||||
panel->lastClickedSpeed = panel->speedB[i];
|
||||
panel->acceleration = 0.5+(i*0.5);
|
||||
|
||||
sprintf(buffer, "Accel.: %.2f", 0.5+(i*0.5));
|
||||
WMSetLabelText(panel->acceL, buffer);
|
||||
|
||||
tmp = WMGetTextFieldText(panel->threT);
|
||||
if (sscanf(tmp, "%i", &threshold)!=1 || threshold < 0
|
||||
|| threshold > panel->maxThreshold) {
|
||||
WMRunAlertPanel(WMWidgetScreen(w), GetWindow(panel), _("Error"),
|
||||
_("Invalid mouse acceleration threshold value. Must be the number of pixels to travel before accelerating."),
|
||||
_("OK"), NULL, NULL);
|
||||
} else {
|
||||
setMouseAccel(WMWidgetScreen(w), 0.5+(i*0.5), threshold);
|
||||
}
|
||||
free(tmp);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
returnPressed(void *observerData, WMNotification *notification)
|
||||
{
|
||||
_Panel *panel = (_Panel*)observerData;
|
||||
|
||||
speedClick(panel->lastClickedSpeed, panel);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
doubleClick(WMWidget *w, void *data)
|
||||
{
|
||||
_Panel *panel = (_Panel*)data;
|
||||
int i;
|
||||
extern _WINGsConfiguration WINGsConfiguration;
|
||||
|
||||
for (i=0; i<5; i++) {
|
||||
if (panel->ddelaB[i]==w)
|
||||
break;
|
||||
}
|
||||
WINGsConfiguration.doubleClickDelay = DELAY(i);
|
||||
}
|
||||
|
||||
|
||||
|
||||
int
|
||||
getbutton(char *str)
|
||||
{
|
||||
if (!str)
|
||||
return -2;
|
||||
|
||||
if (strcasecmp(str, "left")==0)
|
||||
return 0;
|
||||
else if (strcasecmp(str, "middle")==0)
|
||||
return 1;
|
||||
else if (strcasecmp(str, "right")==0)
|
||||
return 2;
|
||||
else if (strcasecmp(str, "button1")==0)
|
||||
return 0;
|
||||
else if (strcasecmp(str, "button2")==0)
|
||||
return 1;
|
||||
else if (strcasecmp(str, "button3")==0)
|
||||
return 2;
|
||||
else if (strcasecmp(str, "button4")==0
|
||||
|| strcasecmp(str, "button5")==0) {
|
||||
wwarning(_("mouse button %s not supported by WPrefs."), str);
|
||||
return -2;
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
getMouseParameters(Display *dpy, float *accel, int *thre)
|
||||
{
|
||||
int n, d;
|
||||
|
||||
XGetPointerControl(dpy, &n, &d, thre);
|
||||
|
||||
*accel = (float)n/(float)d;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void
|
||||
showData(_Panel *panel)
|
||||
{
|
||||
char *str;
|
||||
int i;
|
||||
int a=-1, b=-1, c=-1;
|
||||
float accel;
|
||||
char buffer[32];
|
||||
Display *dpy = WMScreenDisplay(WMWidgetScreen(panel->win));
|
||||
|
||||
str = GetStringForKey("SelectWindowsMouseButton");
|
||||
i = getbutton(str);
|
||||
if (i==-1) {
|
||||
a = 0;
|
||||
wwarning(_("bad value %s for option %s"),str, "SelectWindowsMouseButton");
|
||||
WMPerformButtonClick(panel->smb[0]);
|
||||
} else if (i>=0) {
|
||||
a = i;
|
||||
WMPerformButtonClick(panel->smb[i]);
|
||||
}
|
||||
|
||||
str = GetStringForKey("WindowListMouseButton");
|
||||
i = getbutton(str);
|
||||
if (i==-1) {
|
||||
b = 0;
|
||||
wwarning(_("bad value %s for option %s"), str, "WindowListMouseButton");
|
||||
WMPerformButtonClick(panel->lmb[1]);
|
||||
} else if (i>=0) {
|
||||
b = i;
|
||||
WMPerformButtonClick(panel->lmb[i]);
|
||||
}
|
||||
|
||||
str = GetStringForKey("ApplicationMenuMouseButton");
|
||||
i = getbutton(str);
|
||||
if (i==-1) {
|
||||
c = 0;
|
||||
wwarning(_("bad value %s for option %s"), str, "ApplicationMenuMouseButton");
|
||||
WMPerformButtonClick(panel->amb[2]);
|
||||
} else if (i>=0) {
|
||||
c = i;
|
||||
WMPerformButtonClick(panel->amb[i]);
|
||||
}
|
||||
|
||||
|
||||
WMSetButtonSelected(panel->disaB, GetBoolForKey("DisableWSMouseActions"));
|
||||
|
||||
/**/
|
||||
getMouseParameters(dpy, &accel, &a);
|
||||
panel->maxThreshold = WidthOfScreen(DefaultScreenOfDisplay(dpy));
|
||||
if (a > panel->maxThreshold) {
|
||||
panel->maxThreshold = a;
|
||||
}
|
||||
sprintf(buffer, "%i", a);
|
||||
WMSetTextFieldText(panel->threT, buffer);
|
||||
/* find best match */
|
||||
a = 0;
|
||||
for (i=0; i<5; i++) {
|
||||
if (fabs((0.5+((float)i*0.5))-accel) < fabs((0.5+((float)a*0.5))-accel))
|
||||
a = i;
|
||||
}
|
||||
WMPerformButtonClick(panel->speedB[a]);
|
||||
panel->lastClickedSpeed = panel->speedB[a];
|
||||
panel->acceleration = accel;
|
||||
|
||||
speedClick(panel->lastClickedSpeed, panel);
|
||||
/**/
|
||||
b = GetIntegerForKey("DoubleClickTime");
|
||||
/* find best match */
|
||||
a = 0;
|
||||
for (i=0; i<5; i++) {
|
||||
if (abs(b - DELAY(i)) < abs(b - DELAY(a)))
|
||||
a = i;
|
||||
}
|
||||
WMPerformButtonClick(panel->ddelaB[a]);
|
||||
|
||||
/**/
|
||||
str = GetStringForKey("ModifierKey");
|
||||
|
||||
a = ModifierFromKey(dpy, str);
|
||||
|
||||
if (a != -1) {
|
||||
str = modifierNames[a];
|
||||
|
||||
a = 0;
|
||||
for (i=0; i<WMGetPopUpButtonNumberOfItems(panel->grabP); i++) {
|
||||
if (strstr(WMGetPopUpButtonItem(panel->grabP, i), str)) {
|
||||
WMSetPopUpButtonSelectedItem(panel->grabP, i);
|
||||
a = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (a < 1) {
|
||||
sscanf(WMGetPopUpButtonItem(panel->grabP, 0), "%s", buffer);
|
||||
WMSetPopUpButtonSelectedItem(panel->grabP, 0);
|
||||
wwarning(_("modifier key %s for option ModifierKey was not recognized. Using %s as default"),
|
||||
str, buffer);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void
|
||||
fillModifierPopUp(WMPopUpButton *pop)
|
||||
{
|
||||
XModifierKeymap *mapping;
|
||||
Display *dpy = WMScreenDisplay(WMWidgetScreen(pop));
|
||||
int i, j;
|
||||
char *str;
|
||||
char buffer[64];
|
||||
|
||||
|
||||
mapping = XGetModifierMapping(dpy);
|
||||
|
||||
if (!mapping || mapping->max_keypermod==0) {
|
||||
WMAddPopUpButtonItem(pop, "Mod1");
|
||||
WMAddPopUpButtonItem(pop, "Mod2");
|
||||
WMAddPopUpButtonItem(pop, "Mod3");
|
||||
WMAddPopUpButtonItem(pop, "Mod4");
|
||||
WMAddPopUpButtonItem(pop, "Mod5");
|
||||
wwarning(_("could not retrieve keyboard modifier mapping"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
for (j=0; j<8; j++) {
|
||||
int idx;
|
||||
char *array[8];
|
||||
int a;
|
||||
KeySym ksym;
|
||||
int k;
|
||||
char *ptr;
|
||||
char *tmp;
|
||||
|
||||
a = 0;
|
||||
memset(array, 0, sizeof(char*)*8);
|
||||
for (i=0; i < mapping->max_keypermod; i++) {
|
||||
idx = i+j*mapping->max_keypermod;
|
||||
if (mapping->modifiermap[idx]!=0) {
|
||||
int l;
|
||||
for (l=0; l<4; l++) {
|
||||
ksym = XKeycodeToKeysym(dpy, mapping->modifiermap[idx], l);
|
||||
if (ksym!=NoSymbol)
|
||||
break;
|
||||
}
|
||||
if (ksym!=NoSymbol)
|
||||
str = XKeysymToString(ksym);
|
||||
else
|
||||
str = NULL;
|
||||
if (str && !strstr(str, "_Lock") && !strstr(str, "Shift")
|
||||
&& !strstr(str, "Control")) {
|
||||
array[a++] = wstrdup(str);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (k=0; k<a; k++) {
|
||||
if (array[k]==NULL)
|
||||
continue;
|
||||
tmp = wstrdup(array[k]);
|
||||
ptr = strstr(tmp, "_L");
|
||||
if (ptr)
|
||||
*ptr = 0;
|
||||
ptr = strstr(tmp, "_R");
|
||||
if (ptr)
|
||||
*ptr = 0;
|
||||
sprintf(buffer, "%s (%s)", modifierNames[j], tmp);
|
||||
WMAddPopUpButtonItem(pop, buffer);
|
||||
for (i=k+1; i<a; i++) {
|
||||
if (strstr(array[i], tmp)) {
|
||||
free(array[i]);
|
||||
array[i]=NULL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
free(tmp);
|
||||
}
|
||||
|
||||
while (--a>0) {
|
||||
if (array[a])
|
||||
free(array[a]);
|
||||
}
|
||||
}
|
||||
|
||||
if (mapping)
|
||||
XFreeModifiermap(mapping);
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void
|
||||
mouseButtonClickA(WMWidget *w, void *data)
|
||||
{
|
||||
_Panel *panel = (_Panel*)data;
|
||||
int i;
|
||||
|
||||
for (i=0; i<3; i++) {
|
||||
if (panel->amb[i]==w)
|
||||
break;
|
||||
}
|
||||
if (i==3)
|
||||
return;
|
||||
if (WMGetButtonSelected(panel->lmb[i]))
|
||||
WMSetButtonSelected(panel->lmb[i], False);
|
||||
if (WMGetButtonSelected(panel->smb[i]))
|
||||
WMSetButtonSelected(panel->smb[i], False);
|
||||
}
|
||||
|
||||
static void
|
||||
mouseButtonClickL(WMWidget *w, void *data)
|
||||
{
|
||||
_Panel *panel = (_Panel*)data;
|
||||
int i;
|
||||
|
||||
for (i=0; i<3; i++) {
|
||||
if (panel->lmb[i]==w)
|
||||
break;
|
||||
}
|
||||
if (i==3)
|
||||
return;
|
||||
if (WMGetButtonSelected(panel->smb[i]))
|
||||
WMSetButtonSelected(panel->smb[i], False);
|
||||
if (WMGetButtonSelected(panel->amb[i]))
|
||||
WMSetButtonSelected(panel->amb[i], False);
|
||||
}
|
||||
|
||||
static void
|
||||
mouseButtonClickS(WMWidget *w, void *data)
|
||||
{
|
||||
_Panel *panel = (_Panel*)data;
|
||||
int i;
|
||||
|
||||
for (i=0; i<3; i++) {
|
||||
if (panel->smb[i]==w)
|
||||
break;
|
||||
}
|
||||
if (i==3)
|
||||
return;
|
||||
if (WMGetButtonSelected(panel->lmb[i]))
|
||||
WMSetButtonSelected(panel->lmb[i], False);
|
||||
if (WMGetButtonSelected(panel->amb[i]))
|
||||
WMSetButtonSelected(panel->amb[i], False);
|
||||
}
|
||||
|
||||
static void
|
||||
createPanel(Panel *p)
|
||||
{
|
||||
_Panel *panel = (_Panel*)p;
|
||||
WMScreen *scr = WMWidgetScreen(panel->win);
|
||||
WMPixmap *icon;
|
||||
char *buf1, *buf2;
|
||||
int i;
|
||||
RColor color;
|
||||
char *path;
|
||||
|
||||
color.red = 0xaa;
|
||||
color.green = 0xae;
|
||||
color.blue = 0xaa;
|
||||
|
||||
panel->frame = WMCreateFrame(panel->win);
|
||||
WMResizeWidget(panel->frame, FRAME_WIDTH, FRAME_HEIGHT);
|
||||
WMMoveWidget(panel->frame, FRAME_LEFT, FRAME_TOP);
|
||||
|
||||
/**************** Mouse Speed ****************/
|
||||
panel->speedF = WMCreateFrame(panel->frame);
|
||||
WMResizeWidget(panel->speedF, 245, 100);
|
||||
WMMoveWidget(panel->speedF, 15, 15);
|
||||
WMSetFrameTitle(panel->speedF, _("Mouse Speed"));
|
||||
|
||||
panel->speedL = WMCreateLabel(panel->speedF);
|
||||
WMResizeWidget(panel->speedL, 40, 46);
|
||||
WMMoveWidget(panel->speedL, 15, 14);
|
||||
WMSetLabelImagePosition(panel->speedL, WIPImageOnly);
|
||||
path = LocateImage(SPEED_ICON_FILE);
|
||||
if (path) {
|
||||
icon = WMCreateBlendedPixmapFromFile(scr, path, &color);
|
||||
if (icon) {
|
||||
WMSetLabelImage(panel->speedL, icon);
|
||||
WMReleasePixmap(icon);
|
||||
} else {
|
||||
wwarning(_("could not load icon %s"), path);
|
||||
}
|
||||
free(path);
|
||||
}
|
||||
|
||||
buf1 = wmalloc(strlen(SPEED_IMAGE)+1);
|
||||
buf2 = wmalloc(strlen(SPEED_IMAGE_S)+1);
|
||||
|
||||
for (i = 0; i < 5; i++) {
|
||||
panel->speedB[i] = WMCreateCustomButton(panel->speedF,
|
||||
WBBStateChangeMask);
|
||||
WMResizeWidget(panel->speedB[i], 26, 26);
|
||||
WMMoveWidget(panel->speedB[i], 60+(35*i), 25);
|
||||
WMSetButtonBordered(panel->speedB[i], False);
|
||||
WMSetButtonImagePosition(panel->speedB[i], WIPImageOnly);
|
||||
WMSetButtonAction(panel->speedB[i], speedClick, panel);
|
||||
if (i > 0) {
|
||||
WMGroupButtons(panel->speedB[0], panel->speedB[i]);
|
||||
}
|
||||
sprintf(buf1, SPEED_IMAGE, i);
|
||||
sprintf(buf2, SPEED_IMAGE_S, i);
|
||||
path = LocateImage(buf1);
|
||||
if (path) {
|
||||
icon = WMCreatePixmapFromFile(scr, path);
|
||||
if (icon) {
|
||||
WMSetButtonImage(panel->speedB[i], icon);
|
||||
WMReleasePixmap(icon);
|
||||
} else {
|
||||
wwarning(_("could not load icon file %s"), path);
|
||||
}
|
||||
free(path);
|
||||
}
|
||||
path = LocateImage(buf2);
|
||||
if (path) {
|
||||
icon = WMCreatePixmapFromFile(scr, path);
|
||||
if (icon) {
|
||||
WMSetButtonAltImage(panel->speedB[i], icon);
|
||||
WMReleasePixmap(icon);
|
||||
} else {
|
||||
wwarning(_("could not load icon file %s"), path);
|
||||
}
|
||||
}
|
||||
}
|
||||
free(buf1);
|
||||
free(buf2);
|
||||
|
||||
panel->acceL = WMCreateLabel(panel->speedF);
|
||||
WMResizeWidget(panel->acceL, 100, 16);
|
||||
WMMoveWidget(panel->acceL, 10, 67);
|
||||
|
||||
|
||||
panel->threL = WMCreateLabel(panel->speedF);
|
||||
WMResizeWidget(panel->threL, 80, 16);
|
||||
WMMoveWidget(panel->threL, 120, 67);
|
||||
WMSetLabelText(panel->threL, _("Threshold:"));
|
||||
|
||||
panel->threT = WMCreateTextField(panel->speedF);
|
||||
WMResizeWidget(panel->threT, 40, 20);
|
||||
WMMoveWidget(panel->threT, 190, 65);
|
||||
WMAddNotificationObserver(returnPressed, panel,
|
||||
WMTextDidEndEditingNotification, panel->threT);
|
||||
|
||||
WMMapSubwidgets(panel->speedF);
|
||||
|
||||
/***************** Doubleclick Delay ****************/
|
||||
|
||||
panel->ddelaF = WMCreateFrame(panel->frame);
|
||||
WMResizeWidget(panel->ddelaF, 245, 95);
|
||||
WMMoveWidget(panel->ddelaF, 15, 125);
|
||||
WMSetFrameTitle(panel->ddelaF, _("Double-Click Delay"));
|
||||
|
||||
buf1 = wmalloc(strlen(DELAY_ICON)+1);
|
||||
buf2 = wmalloc(strlen(DELAY_ICON_S)+1);
|
||||
|
||||
for (i = 0; i < 5; i++) {
|
||||
panel->ddelaB[i] = WMCreateCustomButton(panel->ddelaF,
|
||||
WBBStateChangeMask);
|
||||
WMResizeWidget(panel->ddelaB[i], 25, 25);
|
||||
WMMoveWidget(panel->ddelaB[i], 30+(40*i), 20);
|
||||
WMSetButtonBordered(panel->ddelaB[i], False);
|
||||
WMSetButtonImagePosition(panel->ddelaB[i], WIPImageOnly);
|
||||
WMSetButtonAction(panel->ddelaB[i], doubleClick, panel);
|
||||
if (i>0) {
|
||||
WMGroupButtons(panel->ddelaB[0], panel->ddelaB[i]);
|
||||
}
|
||||
sprintf(buf1, DELAY_ICON, i+1);
|
||||
sprintf(buf2, DELAY_ICON_S, i+1);
|
||||
path = LocateImage(buf1);
|
||||
if (path) {
|
||||
icon = WMCreatePixmapFromFile(scr, path);
|
||||
if (icon) {
|
||||
WMSetButtonImage(panel->ddelaB[i], icon);
|
||||
WMReleasePixmap(icon);
|
||||
} else {
|
||||
wwarning(_("could not load icon file %s"), path);
|
||||
}
|
||||
free(path);
|
||||
}
|
||||
path = LocateImage(buf2);
|
||||
if (path) {
|
||||
icon = WMCreatePixmapFromFile(scr, path);
|
||||
if (icon) {
|
||||
WMSetButtonAltImage(panel->ddelaB[i], icon);
|
||||
WMReleasePixmap(icon);
|
||||
} else {
|
||||
wwarning(_("could not load icon file %s"), path);
|
||||
}
|
||||
free(path);
|
||||
}
|
||||
}
|
||||
free(buf1);
|
||||
free(buf2);
|
||||
|
||||
panel->tester = CreateDoubleTest(panel->ddelaF, _("Test"));
|
||||
WMResizeWidget(panel->tester, 84, 29);
|
||||
WMMoveWidget(panel->tester, 85, 55);
|
||||
|
||||
WMMapSubwidgets(panel->ddelaF);
|
||||
|
||||
/* ************** Workspace Action Buttons **************** */
|
||||
panel->menuF = WMCreateFrame(panel->frame);
|
||||
WMResizeWidget(panel->menuF, 240, 145);
|
||||
WMMoveWidget(panel->menuF, 270, 15);
|
||||
WMSetFrameTitle(panel->menuF, _("Workspace Mouse Actions"));
|
||||
|
||||
panel->disaB = WMCreateSwitchButton(panel->menuF);
|
||||
WMResizeWidget(panel->disaB, 185, 19);
|
||||
WMMoveWidget(panel->disaB, 20, 20);
|
||||
WMSetButtonText(panel->disaB, _("Disable mouse actions"));
|
||||
|
||||
panel->mblL = WMCreateLabel(panel->menuF);
|
||||
WMResizeWidget(panel->mblL, 16, 22);
|
||||
WMMoveWidget(panel->mblL, 135, 40);
|
||||
WMSetLabelImagePosition(panel->mblL, WIPImageOnly);
|
||||
path = LocateImage(MOUSEB_L);
|
||||
if (path) {
|
||||
icon = WMCreatePixmapFromFile(scr, path);
|
||||
if (icon) {
|
||||
WMSetLabelImage(panel->mblL, icon);
|
||||
WMReleasePixmap(icon);
|
||||
} else {
|
||||
wwarning(_("could not load icon file %s"), path);
|
||||
}
|
||||
free(path);
|
||||
}
|
||||
panel->mbmL = WMCreateLabel(panel->menuF);
|
||||
WMResizeWidget(panel->mbmL, 16, 22);
|
||||
WMMoveWidget(panel->mbmL, 170, 40);
|
||||
WMSetLabelImagePosition(panel->mbmL, WIPImageOnly);
|
||||
path = LocateImage(MOUSEB_M);
|
||||
if (path) {
|
||||
icon = WMCreatePixmapFromFile(scr, path);
|
||||
if (icon) {
|
||||
WMSetLabelImage(panel->mbmL, icon);
|
||||
WMReleasePixmap(icon);
|
||||
} else {
|
||||
wwarning(_("could not load icon file %s"), path);
|
||||
}
|
||||
free(path);
|
||||
}
|
||||
|
||||
panel->mbrL = WMCreateLabel(panel->menuF);
|
||||
WMResizeWidget(panel->mbrL, 16, 22);
|
||||
WMMoveWidget(panel->mbrL, 205, 40);
|
||||
WMSetLabelImagePosition(panel->mbrL, WIPImageOnly);
|
||||
path = LocateImage(MOUSEB_R);
|
||||
if (path) {
|
||||
icon = WMCreatePixmapFromFile(scr, path);
|
||||
if (icon) {
|
||||
WMSetLabelImage(panel->mbrL, icon);
|
||||
WMReleasePixmap(icon);
|
||||
} else {
|
||||
wwarning(_("could not load icon file %s"), path);
|
||||
}
|
||||
free(path);
|
||||
}
|
||||
|
||||
panel->appL = WMCreateLabel(panel->menuF);
|
||||
WMResizeWidget(panel->appL, 125, 16);
|
||||
WMMoveWidget(panel->appL, 5, 65);
|
||||
WMSetLabelTextAlignment(panel->appL, WARight);
|
||||
WMSetLabelText(panel->appL, _("Applications menu"));
|
||||
|
||||
panel->listL = WMCreateLabel(panel->menuF);
|
||||
WMResizeWidget(panel->listL, 125, 16);
|
||||
WMMoveWidget(panel->listL, 5, 90);
|
||||
WMSetLabelTextAlignment(panel->listL, WARight);
|
||||
WMSetLabelText(panel->listL, _("Window list menu"));
|
||||
|
||||
panel->selL = WMCreateLabel(panel->menuF);
|
||||
WMResizeWidget(panel->selL, 125, 16);
|
||||
WMMoveWidget(panel->selL, 5, 115);
|
||||
WMSetLabelTextAlignment(panel->selL, WARight);
|
||||
WMSetLabelText(panel->selL, _("Select windows"));
|
||||
|
||||
|
||||
for (i=0; i<3; i++) {
|
||||
panel->amb[i] = WMCreateRadioButton(panel->menuF);
|
||||
WMResizeWidget(panel->amb[i], 24, 24);
|
||||
WMMoveWidget(panel->amb[i], 135+35*i, 65);
|
||||
WMSetButtonText(panel->amb[i], NULL);
|
||||
WMSetButtonAction(panel->amb[i], mouseButtonClickA, panel);
|
||||
|
||||
panel->lmb[i] = WMCreateRadioButton(panel->menuF);
|
||||
WMResizeWidget(panel->lmb[i], 24, 24);
|
||||
WMMoveWidget(panel->lmb[i], 135+35*i, 90);
|
||||
WMSetButtonText(panel->lmb[i], NULL);
|
||||
WMSetButtonAction(panel->lmb[i], mouseButtonClickL, panel);
|
||||
|
||||
panel->smb[i] = WMCreateRadioButton(panel->menuF);
|
||||
WMResizeWidget(panel->smb[i], 24, 24);
|
||||
WMMoveWidget(panel->smb[i], 135+35*i, 115);
|
||||
WMSetButtonText(panel->smb[i], NULL);
|
||||
WMSetButtonAction(panel->smb[i], mouseButtonClickS, panel);
|
||||
|
||||
if (i>0) {
|
||||
WMGroupButtons(panel->lmb[0], panel->lmb[i]);
|
||||
WMGroupButtons(panel->amb[0], panel->amb[i]);
|
||||
WMGroupButtons(panel->smb[0], panel->smb[i]);
|
||||
}
|
||||
}
|
||||
|
||||
WMMapSubwidgets(panel->menuF);
|
||||
|
||||
/* ************** Grab Modifier **************** */
|
||||
panel->grabF = WMCreateFrame(panel->frame);
|
||||
WMResizeWidget(panel->grabF, 240, 55);
|
||||
WMMoveWidget(panel->grabF, 270, 165);
|
||||
WMSetFrameTitle(panel->grabF, _("Mouse Grab Modifier"));
|
||||
|
||||
panel->grabP = WMCreatePopUpButton(panel->grabF);
|
||||
WMResizeWidget(panel->grabP, 120, 20);
|
||||
WMMoveWidget(panel->grabP, 60, 25);
|
||||
|
||||
fillModifierPopUp(panel->grabP);
|
||||
|
||||
WMMapSubwidgets(panel->grabF);
|
||||
|
||||
WMRealizeWidget(panel->frame);
|
||||
WMMapSubwidgets(panel->frame);
|
||||
|
||||
|
||||
showData(panel);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
storeCommandInScript(char *cmd, char *line)
|
||||
{
|
||||
char *path;
|
||||
char *p;
|
||||
FILE *f;
|
||||
char buffer[128];
|
||||
|
||||
p = wusergnusteppath();
|
||||
path = wmalloc(strlen(p)+64);
|
||||
sprintf(path, "%s/Library/WindowMaker/autostart", p);
|
||||
|
||||
f = fopen(path, "r");
|
||||
if (!f) {
|
||||
f = fopen(path, "w");
|
||||
if (!f) {
|
||||
wsyserror(_("could not create %s"), path);
|
||||
goto end;
|
||||
}
|
||||
fprintf(f, "#!/bin/sh\n");
|
||||
fputs(line, f);
|
||||
fputs("\n", f);
|
||||
} else {
|
||||
int len = strlen(cmd);
|
||||
int ok = 0;
|
||||
char *tmppath;
|
||||
FILE *fo;
|
||||
|
||||
tmppath = wmalloc(strlen(p)+64);
|
||||
sprintf(tmppath, "%s/Library/WindowMaker/autostart.tmp", p);
|
||||
fo = fopen(tmppath, "w");
|
||||
if (!fo) {
|
||||
wsyserror(_("could not create temporary file %s"), tmppath);
|
||||
goto end;
|
||||
}
|
||||
|
||||
while (!feof(f)) {
|
||||
if (!fgets(buffer, 127, f)) {
|
||||
break;
|
||||
}
|
||||
if (strncmp(buffer, cmd, len)==0) {
|
||||
if (!ok) {
|
||||
fputs(line, fo);
|
||||
fputs("\n", fo);
|
||||
ok = 1;
|
||||
}
|
||||
} else {
|
||||
fputs(buffer, fo);
|
||||
}
|
||||
}
|
||||
if (!ok) {
|
||||
fputs(line, fo);
|
||||
fputs("\n", fo);
|
||||
}
|
||||
fclose(fo);
|
||||
|
||||
if (rename(tmppath, path)!=0) {
|
||||
wsyserror(_("could not rename file %s to %s\n"), tmppath, path);
|
||||
}
|
||||
free(tmppath);
|
||||
}
|
||||
sprintf(buffer, "chmod u+x %s", path);
|
||||
system(buffer);
|
||||
|
||||
end:
|
||||
free(p);
|
||||
free(path);
|
||||
if (f)
|
||||
fclose(f);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
storeData(_Panel *panel)
|
||||
{
|
||||
char buffer[64];
|
||||
int i;
|
||||
char *tmp, *p;
|
||||
static char *button[3] = {"left", "middle", "right"};
|
||||
|
||||
tmp = WMGetTextFieldText(panel->threT);
|
||||
if (strlen(tmp)==0) {
|
||||
free(tmp);
|
||||
tmp = wstrdup("0");
|
||||
}
|
||||
|
||||
sprintf(buffer, XSET" m %i/%i %s\n", (int)(panel->acceleration*10),10, tmp);
|
||||
storeCommandInScript(XSET" m", buffer);
|
||||
|
||||
free(tmp);
|
||||
|
||||
for (i=0; i<5; i++) {
|
||||
if (WMGetButtonSelected(panel->ddelaB[i]))
|
||||
break;
|
||||
}
|
||||
SetIntegerForKey(DELAY(i), "DoubleClickTime");
|
||||
|
||||
SetBoolForKey(WMGetButtonSelected(panel->disaB), "DisableWSMouseActions");
|
||||
|
||||
for (i=0; i<3; i++) {
|
||||
if (WMGetButtonSelected(panel->amb[i]))
|
||||
break;
|
||||
}
|
||||
if (i<3)
|
||||
SetStringForKey(button[i], "ApplicationMenuMouseButton");
|
||||
|
||||
for (i=0; i<3; i++) {
|
||||
if (WMGetButtonSelected(panel->lmb[i]))
|
||||
break;
|
||||
}
|
||||
if (i<3)
|
||||
SetStringForKey(button[i], "WindowListMouseButton");
|
||||
|
||||
for (i=0; i<3; i++) {
|
||||
if (WMGetButtonSelected(panel->smb[i]))
|
||||
break;
|
||||
}
|
||||
if (i<3)
|
||||
SetStringForKey(button[i], "SelectWindowsMouseButton");
|
||||
|
||||
tmp = WMGetPopUpButtonItem(panel->grabP,
|
||||
WMGetPopUpButtonSelectedItem(panel->grabP));
|
||||
tmp = wstrdup(tmp);
|
||||
p = strchr(tmp, ' ');
|
||||
*p = 0;
|
||||
|
||||
SetStringForKey(tmp, "ModifierKey");
|
||||
|
||||
free(tmp);
|
||||
}
|
||||
|
||||
|
||||
Panel*
|
||||
InitMouseSettings(WMScreen *scr, WMWindow *win)
|
||||
{
|
||||
_Panel *panel;
|
||||
|
||||
panel = wmalloc(sizeof(_Panel));
|
||||
memset(panel, 0, sizeof(_Panel));
|
||||
|
||||
panel->sectionName = _("Mouse Preferences");
|
||||
|
||||
panel->win = win;
|
||||
|
||||
panel->callbacks.createWidgets = createPanel;
|
||||
panel->callbacks.updateDomain = storeData;
|
||||
|
||||
AddSection(panel, ICON_FILE);
|
||||
|
||||
return panel;
|
||||
}
|
||||
@@ -0,0 +1,395 @@
|
||||
/* Paths.c- pixmap/icon paths
|
||||
*
|
||||
* WPrefs - WindowMaker 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 <unistd.h>
|
||||
|
||||
typedef struct _Panel {
|
||||
WMFrame *frame;
|
||||
char *sectionName;
|
||||
|
||||
CallbackRec callbacks;
|
||||
|
||||
WMWindow *win;
|
||||
|
||||
WMFrame *pixF;
|
||||
WMList *pixL;
|
||||
WMButton *pixaB;
|
||||
WMButton *pixrB;
|
||||
WMTextField *pixT;
|
||||
|
||||
WMFrame *icoF;
|
||||
WMList *icoL;
|
||||
WMButton *icoaB;
|
||||
WMButton *icorB;
|
||||
WMTextField *icoT;
|
||||
|
||||
WMColor *red;
|
||||
WMColor *black;
|
||||
WMColor *white;
|
||||
WMFont *font;
|
||||
} _Panel;
|
||||
|
||||
|
||||
|
||||
#define ICON_FILE "paths"
|
||||
|
||||
|
||||
static void
|
||||
addPathToList(WMList *list, int index, char *path)
|
||||
{
|
||||
char *fpath = wexpandpath(path);
|
||||
WMListItem *item;
|
||||
|
||||
item = WMInsertListItem(list, index, path);
|
||||
|
||||
if (access(fpath, X_OK)!=0) {
|
||||
item->uflags = 1;
|
||||
}
|
||||
free(fpath);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
showData(_Panel *panel)
|
||||
{
|
||||
proplist_t array, val;
|
||||
int i;
|
||||
|
||||
array = GetObjectForKey("IconPath");
|
||||
if (!array || !PLIsArray(array)) {
|
||||
if (array)
|
||||
wwarning(_("bad value in option IconPath. Using default path list"));
|
||||
addPathToList(panel->icoL, -1, "~/pixmaps");
|
||||
addPathToList(panel->icoL, -1, "~/GNUstep/Library/Icons");
|
||||
addPathToList(panel->icoL, -1, "/usr/include/X11/pixmaps");
|
||||
addPathToList(panel->icoL, -1, "/usr/local/share/WindowMaker/Icons");
|
||||
addPathToList(panel->icoL, -1, "/usr/local/share/WindowMaker/Pixmaps");
|
||||
addPathToList(panel->icoL, -1, "/usr/share/WindowMaker/Icons");
|
||||
} else {
|
||||
for (i=0; i<PLGetNumberOfElements(array); i++) {
|
||||
val = PLGetArrayElement(array, i);
|
||||
addPathToList(panel->icoL, -1, PLGetString(val));
|
||||
}
|
||||
}
|
||||
|
||||
array = GetObjectForKey("PixmapPath");
|
||||
if (!array || !PLIsArray(array)) {
|
||||
if (array)
|
||||
wwarning(_("bad value in option PixmapPath. Using default path list"));
|
||||
addPathToList(panel->pixL, -1, "~/pixmaps");
|
||||
addPathToList(panel->pixL, -1, "~/GNUstep/Library/WindowMaker/Pixmaps");
|
||||
addPathToList(panel->pixL, -1, "/usr/local/share/WindowMaker/Pixmaps");
|
||||
} else {
|
||||
for (i=0; i<PLGetNumberOfElements(array); i++) {
|
||||
val = PLGetArrayElement(array, i);
|
||||
addPathToList(panel->pixL, -1, PLGetString(val));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
pushButton(WMWidget *w, void *data)
|
||||
{
|
||||
_Panel *panel = (_Panel*)data;
|
||||
int i;
|
||||
|
||||
/* icon paths */
|
||||
if (w == panel->icoaB) {
|
||||
char *text = WMGetTextFieldText(panel->icoT);
|
||||
|
||||
if (text && strlen(text) > 0) {
|
||||
i = WMGetListSelectedItemRow(panel->icoL);
|
||||
if (i >= 0) i++;
|
||||
addPathToList(panel->icoL, i, text);
|
||||
WMSetListBottomPosition(panel->icoL,
|
||||
WMGetListNumberOfRows(panel->icoL));
|
||||
}
|
||||
if (text)
|
||||
free(text);
|
||||
|
||||
WMSetTextFieldText(panel->icoT, NULL);
|
||||
} else if (w == panel->icorB) {
|
||||
i = WMGetListSelectedItemRow(panel->icoL);
|
||||
|
||||
if (i>=0)
|
||||
WMRemoveListItem(panel->icoL, i);
|
||||
}
|
||||
|
||||
/* pixmap paths */
|
||||
if (w == panel->pixaB) {
|
||||
char *text = WMGetTextFieldText(panel->pixT);
|
||||
|
||||
if (text && strlen(text) > 0) {
|
||||
i = WMGetListSelectedItemRow(panel->pixL);
|
||||
if (i >= 0) i++;
|
||||
addPathToList(panel->pixL, i, text);
|
||||
WMSetListBottomPosition(panel->pixL,
|
||||
WMGetListNumberOfRows(panel->pixL));
|
||||
}
|
||||
if (text)
|
||||
free(text);
|
||||
WMSetTextFieldText(panel->pixT, NULL);
|
||||
} else if (w == panel->pixrB) {
|
||||
i = WMGetListSelectedItemRow(panel->pixL);
|
||||
|
||||
if (i>=0)
|
||||
WMRemoveListItem(panel->pixL, i);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
textEditedObserver(void *observerData, WMNotification *notification)
|
||||
{
|
||||
_Panel *panel = (_Panel*)observerData;
|
||||
|
||||
switch ((int)WMGetNotificationClientData(notification)) {
|
||||
case WMReturnTextMovement:
|
||||
if (WMGetNotificationObject(notification) == panel->icoT)
|
||||
WMPerformButtonClick(panel->icoaB);
|
||||
else
|
||||
WMPerformButtonClick(panel->pixaB);
|
||||
break;
|
||||
|
||||
case WMIllegalTextMovement:
|
||||
if (WMGetNotificationObject(notification) == panel->icoT) {
|
||||
WMSetButtonImage(panel->icoaB, NULL);
|
||||
WMSetButtonImage(panel->icoaB, NULL);
|
||||
} else {
|
||||
WMSetButtonImage(panel->pixaB, NULL);
|
||||
WMSetButtonImage(panel->pixaB, NULL);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
textBeginObserver(void *observerData, WMNotification *notification)
|
||||
{
|
||||
_Panel *panel = (_Panel*)observerData;
|
||||
WMScreen *scr = WMWidgetScreen(panel->win);
|
||||
WMPixmap *arrow1 = WMGetSystemPixmap(scr, WSIReturnArrow);
|
||||
WMPixmap *arrow2 = WMGetSystemPixmap(scr, WSIHighlightedReturnArrow);
|
||||
|
||||
if (WMGetNotificationObject(notification)==panel->icoT) {
|
||||
WMSetButtonImage(panel->icoaB, arrow1);
|
||||
WMSetButtonAltImage(panel->icoaB, arrow2);
|
||||
} else {
|
||||
WMSetButtonImage(panel->pixaB, arrow1);
|
||||
WMSetButtonAltImage(panel->pixaB, arrow2);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void
|
||||
listClick(WMWidget *w, void *data)
|
||||
{
|
||||
_Panel *panel = (_Panel*)data;
|
||||
char *t;
|
||||
|
||||
if (w == panel->icoL) {
|
||||
t = WMGetListSelectedItem(panel->icoL)->text;
|
||||
WMSetTextFieldText(panel->icoT, t);
|
||||
} else {
|
||||
t = WMGetListSelectedItem(panel->pixL)->text;
|
||||
WMSetTextFieldText(panel->pixT, t);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void
|
||||
paintItem(WMList *lPtr, Drawable d, char *text, int state, WMRect *rect)
|
||||
{
|
||||
int width, height, x, y;
|
||||
_Panel *panel = (_Panel*)WMGetHangedData(lPtr);
|
||||
WMScreen *scr = WMWidgetScreen(lPtr);
|
||||
Display *dpy = WMScreenDisplay(scr);
|
||||
|
||||
width = rect->size.width;
|
||||
height = rect->size.height;
|
||||
x = rect->pos.x;
|
||||
y = rect->pos.y;
|
||||
|
||||
if (state & WLDSSelected)
|
||||
XFillRectangle(dpy, d, WMColorGC(panel->white), x, y, width,
|
||||
height);
|
||||
else
|
||||
XClearArea(dpy, d, x, y, width, height, False);
|
||||
|
||||
if (state & 1) {
|
||||
WMDrawString(scr, d, WMColorGC(panel->red), panel->font, x+4, y,
|
||||
text, strlen(text));
|
||||
} else {
|
||||
WMDrawString(scr, d, WMColorGC(panel->black), panel->font, x+4, y,
|
||||
text, strlen(text));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void
|
||||
storeData(_Panel *panel)
|
||||
{
|
||||
proplist_t list;
|
||||
proplist_t tmp;
|
||||
int i;
|
||||
char *p;
|
||||
|
||||
list = PLMakeArrayFromElements(NULL, NULL);
|
||||
for (i=0; i<WMGetListNumberOfRows(panel->icoL); i++) {
|
||||
p = WMGetListItem(panel->icoL, i)->text;
|
||||
tmp = PLMakeString(p);
|
||||
PLAppendArrayElement(list, tmp);
|
||||
}
|
||||
SetObjectForKey(list, "IconPath");
|
||||
|
||||
list = PLMakeArrayFromElements(NULL, NULL);
|
||||
for (i=0; i<WMGetListNumberOfRows(panel->pixL); i++) {
|
||||
p = WMGetListItem(panel->pixL, i)->text;
|
||||
tmp = PLMakeString(p);
|
||||
PLAppendArrayElement(list, tmp);
|
||||
}
|
||||
SetObjectForKey(list, "PixmapPath");
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void
|
||||
createPanel(Panel *p)
|
||||
{
|
||||
_Panel *panel = (_Panel*)p;
|
||||
WMScreen *scr = WMWidgetScreen(panel->win);
|
||||
|
||||
panel->white = WMWhiteColor(scr);
|
||||
panel->black = WMBlackColor(scr);
|
||||
panel->red = WMCreateRGBColor(scr, 0xffff, 0, 0, True);
|
||||
panel->font = WMSystemFontOfSize(scr, 12);
|
||||
|
||||
panel->frame = WMCreateFrame(panel->win);
|
||||
WMResizeWidget(panel->frame, FRAME_WIDTH, FRAME_HEIGHT);
|
||||
WMMoveWidget(panel->frame, FRAME_LEFT, FRAME_TOP);
|
||||
|
||||
/* icon path */
|
||||
panel->icoF = WMCreateFrame(panel->frame);
|
||||
WMResizeWidget(panel->icoF, 230, 210);
|
||||
WMMoveWidget(panel->icoF, 25, 10);
|
||||
WMSetFrameTitle(panel->icoF, _("Icon Search Paths"));
|
||||
|
||||
panel->icoL = WMCreateList(panel->icoF);
|
||||
WMResizeWidget(panel->icoL, 200, 120);
|
||||
WMMoveWidget(panel->icoL, 15, 20);
|
||||
WMSetListAction(panel->icoL, listClick, panel);
|
||||
WMSetListUserDrawProc(panel->icoL, paintItem);
|
||||
WMHangData(panel->icoL, panel);
|
||||
|
||||
panel->icoaB = WMCreateCommandButton(panel->icoF);
|
||||
WMResizeWidget(panel->icoaB, 90, 24);
|
||||
WMMoveWidget(panel->icoaB, 125, 145);
|
||||
WMSetButtonText(panel->icoaB, _("Add"));
|
||||
WMSetButtonAction(panel->icoaB, pushButton, panel);
|
||||
WMSetButtonImagePosition(panel->icoaB, WIPRight);
|
||||
|
||||
panel->icorB = WMCreateCommandButton(panel->icoF);
|
||||
WMResizeWidget(panel->icorB, 90, 24);
|
||||
WMMoveWidget(panel->icorB, 15, 145);
|
||||
WMSetButtonText(panel->icorB, _("Remove"));
|
||||
WMSetButtonAction(panel->icorB, pushButton, panel);
|
||||
|
||||
panel->icoT = WMCreateTextField(panel->icoF);
|
||||
WMResizeWidget(panel->icoT, 200, 20);
|
||||
WMMoveWidget(panel->icoT, 15, 175);
|
||||
WMAddNotificationObserver(textEditedObserver, panel,
|
||||
WMTextDidEndEditingNotification, panel->icoT);
|
||||
WMAddNotificationObserver(textBeginObserver, panel,
|
||||
WMTextDidBeginEditingNotification, panel->icoT);
|
||||
|
||||
WMMapSubwidgets(panel->icoF);
|
||||
|
||||
/* pixmap path */
|
||||
panel->pixF = WMCreateFrame(panel->frame);
|
||||
WMResizeWidget(panel->pixF, 230, 210);
|
||||
WMMoveWidget(panel->pixF, 270, 10);
|
||||
WMSetFrameTitle(panel->pixF, _("Pixmap Search Paths"));
|
||||
|
||||
panel->pixL = WMCreateList(panel->pixF);
|
||||
WMResizeWidget(panel->pixL, 200, 120);
|
||||
WMMoveWidget(panel->pixL, 15, 20);
|
||||
WMSetListAction(panel->pixL, listClick, panel);
|
||||
WMSetListUserDrawProc(panel->pixL, paintItem);
|
||||
WMHangData(panel->pixL, panel);
|
||||
|
||||
panel->pixaB = WMCreateCommandButton(panel->pixF);
|
||||
WMResizeWidget(panel->pixaB, 90, 24);
|
||||
WMMoveWidget(panel->pixaB, 125, 145);
|
||||
WMSetButtonText(panel->pixaB, _("Add"));
|
||||
WMSetButtonAction(panel->pixaB, pushButton, panel);
|
||||
WMSetButtonImagePosition(panel->pixaB, WIPRight);
|
||||
|
||||
panel->pixrB = WMCreateCommandButton(panel->pixF);
|
||||
WMResizeWidget(panel->pixrB, 90, 24);
|
||||
WMMoveWidget(panel->pixrB, 15, 145);
|
||||
WMSetButtonText(panel->pixrB, _("Remove"));
|
||||
WMSetButtonAction(panel->pixrB, pushButton, panel);
|
||||
|
||||
panel->pixT= WMCreateTextField(panel->pixF);
|
||||
WMResizeWidget(panel->pixT, 200, 20);
|
||||
WMMoveWidget(panel->pixT, 15, 175);
|
||||
WMAddNotificationObserver(textEditedObserver, panel,
|
||||
WMTextDidEndEditingNotification, panel->pixT);
|
||||
WMAddNotificationObserver(textBeginObserver, panel,
|
||||
WMTextDidBeginEditingNotification, panel->pixT);
|
||||
|
||||
WMMapSubwidgets(panel->pixF);
|
||||
|
||||
WMRealizeWidget(panel->frame);
|
||||
WMMapSubwidgets(panel->frame);
|
||||
|
||||
showData(panel);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Panel*
|
||||
InitPaths(WMScreen *scr, WMWindow *win)
|
||||
{
|
||||
_Panel *panel;
|
||||
|
||||
panel = wmalloc(sizeof(_Panel));
|
||||
memset(panel, 0, sizeof(_Panel));
|
||||
|
||||
panel->sectionName = _("Search Path Configuration");
|
||||
|
||||
panel->win = win;
|
||||
|
||||
panel->callbacks.createWidgets = createPanel;
|
||||
panel->callbacks.updateDomain = storeData;
|
||||
|
||||
AddSection(panel, ICON_FILE);
|
||||
|
||||
return panel;
|
||||
}
|
||||
@@ -0,0 +1,225 @@
|
||||
/* Preferences.c- misc personal preferences
|
||||
*
|
||||
* WPrefs - WindowMaker 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"
|
||||
|
||||
typedef struct _Panel {
|
||||
WMFrame *frame;
|
||||
|
||||
char *sectionName;
|
||||
|
||||
CallbackRec callbacks;
|
||||
|
||||
WMWindow *win;
|
||||
|
||||
WMFrame *sizeF;
|
||||
WMPopUpButton *sizeP;
|
||||
|
||||
WMFrame *posiF;
|
||||
WMPopUpButton *posiP;
|
||||
|
||||
WMFrame *ballF;
|
||||
WMButton *ballB[4];
|
||||
|
||||
WMFrame *optF;
|
||||
WMButton *raisB;
|
||||
|
||||
} _Panel;
|
||||
|
||||
|
||||
|
||||
#define ICON_FILE "ergonomic"
|
||||
|
||||
|
||||
static void
|
||||
showData(_Panel *panel)
|
||||
{
|
||||
char *str;
|
||||
|
||||
str = GetStringForKey("ResizeDisplay");
|
||||
if (strcasecmp(str, "corner")==0)
|
||||
WMSetPopUpButtonSelectedItem(panel->sizeP, 0);
|
||||
else if (strcasecmp(str, "center")==0)
|
||||
WMSetPopUpButtonSelectedItem(panel->sizeP, 1);
|
||||
else if (strcasecmp(str, "floating")==0)
|
||||
WMSetPopUpButtonSelectedItem(panel->sizeP, 2);
|
||||
else if (strcasecmp(str, "line")==0)
|
||||
WMSetPopUpButtonSelectedItem(panel->sizeP, 3);
|
||||
|
||||
str = GetStringForKey("MoveDisplay");
|
||||
if (strcasecmp(str, "corner")==0)
|
||||
WMSetPopUpButtonSelectedItem(panel->posiP, 0);
|
||||
else if (strcasecmp(str, "center")==0)
|
||||
WMSetPopUpButtonSelectedItem(panel->posiP, 1);
|
||||
else if (strcasecmp(str, "floating")==0)
|
||||
WMSetPopUpButtonSelectedItem(panel->posiP, 2);
|
||||
|
||||
|
||||
WMSetButtonSelected(panel->raisB, GetBoolForKey("CirculateRaise"));
|
||||
|
||||
WMSetButtonSelected(panel->ballB[0], GetBoolForKey("WindowTitleBalloons"));
|
||||
WMSetButtonSelected(panel->ballB[1], GetBoolForKey("MiniwindowTitleBalloons"));
|
||||
WMSetButtonSelected(panel->ballB[2], GetBoolForKey("AppIconBalloons"));
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
storeData(_Panel *panel)
|
||||
{
|
||||
char *str;
|
||||
|
||||
switch (WMGetPopUpButtonSelectedItem(panel->sizeP)) {
|
||||
case 0:
|
||||
str = "corner";
|
||||
break;
|
||||
case 1:
|
||||
str = "center";
|
||||
break;
|
||||
case 2:
|
||||
str = "floating";
|
||||
break;
|
||||
default:
|
||||
str = "line";
|
||||
break;
|
||||
}
|
||||
SetStringForKey(str, "ResizeDisplay");
|
||||
|
||||
switch (WMGetPopUpButtonSelectedItem(panel->posiP)) {
|
||||
case 0:
|
||||
str = "corner";
|
||||
break;
|
||||
case 1:
|
||||
str = "center";
|
||||
break;
|
||||
default:
|
||||
str = "floating";
|
||||
break;
|
||||
}
|
||||
SetStringForKey(str, "MoveDisplay");
|
||||
|
||||
SetBoolForKey(WMGetButtonSelected(panel->raisB), "CirculateRaise");
|
||||
SetBoolForKey(WMGetButtonSelected(panel->ballB[0]), "WindowTitleBalloons");
|
||||
SetBoolForKey(WMGetButtonSelected(panel->ballB[1]), "MiniwindowTitleBalloons");
|
||||
SetBoolForKey(WMGetButtonSelected(panel->ballB[2]), "AppIconBalloons");
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
createPanel(Panel *p)
|
||||
{
|
||||
_Panel *panel = (_Panel*)p;
|
||||
int i;
|
||||
|
||||
panel->frame = WMCreateFrame(panel->win);
|
||||
WMResizeWidget(panel->frame, FRAME_WIDTH, FRAME_HEIGHT);
|
||||
WMMoveWidget(panel->frame, FRAME_LEFT, FRAME_TOP);
|
||||
|
||||
|
||||
/***************** Size Display ****************/
|
||||
panel->sizeF = WMCreateFrame(panel->frame);
|
||||
WMResizeWidget(panel->sizeF, 240, 60);
|
||||
WMMoveWidget(panel->sizeF, 20, 10);
|
||||
WMSetFrameTitle(panel->sizeF, _("Size Display"));
|
||||
|
||||
panel->sizeP = WMCreatePopUpButton(panel->sizeF);
|
||||
WMResizeWidget(panel->sizeP, 180, 20);
|
||||
WMMoveWidget(panel->sizeP, 32, 24);
|
||||
WMAddPopUpButtonItem(panel->sizeP, _("Corner of screen"));
|
||||
WMAddPopUpButtonItem(panel->sizeP, _("Center of screen"));
|
||||
WMAddPopUpButtonItem(panel->sizeP, _("Center of resized window"));
|
||||
WMAddPopUpButtonItem(panel->sizeP, _("Technical drawing-like"));
|
||||
|
||||
WMMapSubwidgets(panel->sizeF);
|
||||
|
||||
/***************** Position Display ****************/
|
||||
panel->posiF = WMCreateFrame(panel->frame);
|
||||
WMResizeWidget(panel->posiF, 240, 60);
|
||||
WMMoveWidget(panel->posiF, 20, 75);
|
||||
WMSetFrameTitle(panel->posiF, _("Position Display"));
|
||||
|
||||
panel->posiP = WMCreatePopUpButton(panel->posiF);
|
||||
WMResizeWidget(panel->posiP, 180, 20);
|
||||
WMMoveWidget(panel->posiP, 32, 24);
|
||||
WMAddPopUpButtonItem(panel->posiP, _("Corner of screen"));
|
||||
WMAddPopUpButtonItem(panel->posiP, _("Center of screen"));
|
||||
WMAddPopUpButtonItem(panel->posiP, _("Center of resized window"));
|
||||
|
||||
WMMapSubwidgets(panel->posiF);
|
||||
|
||||
/***************** Balloon Text ****************/
|
||||
panel->ballF = WMCreateFrame(panel->frame);
|
||||
WMResizeWidget(panel->ballF, 235, 125);
|
||||
WMMoveWidget(panel->ballF, 270, 10);
|
||||
WMSetFrameTitle(panel->ballF, _("Show balloon text for..."));
|
||||
|
||||
for (i=0; i<3; i++) {
|
||||
panel->ballB[i] = WMCreateSwitchButton(panel->ballF);
|
||||
WMResizeWidget(panel->ballB[i], 205, 20);
|
||||
WMMoveWidget(panel->ballB[i], 15, 25+i*30);
|
||||
}
|
||||
WMSetButtonText(panel->ballB[0], _("incomplete window titles"));
|
||||
WMSetButtonText(panel->ballB[1], _("miniwindow titles"));
|
||||
WMSetButtonText(panel->ballB[2], _("application/dock icons"));
|
||||
/* WMSetButtonText(panel->ballB[3], "help");*/
|
||||
|
||||
WMMapSubwidgets(panel->ballF);
|
||||
|
||||
/***************** Options ****************/
|
||||
panel->optF = WMCreateFrame(panel->frame);
|
||||
WMResizeWidget(panel->optF, 485, 75);
|
||||
WMMoveWidget(panel->optF, 20, 145);
|
||||
|
||||
panel->raisB = WMCreateSwitchButton(panel->optF);
|
||||
WMResizeWidget(panel->raisB, 440, 20);
|
||||
WMMoveWidget(panel->raisB, 20, 25);
|
||||
WMSetButtonText(panel->raisB, _("Raise window when switching focus with keyboard."));
|
||||
|
||||
WMMapSubwidgets(panel->optF);
|
||||
|
||||
WMRealizeWidget(panel->frame);
|
||||
WMMapSubwidgets(panel->frame);
|
||||
|
||||
showData(panel);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Panel*
|
||||
InitPreferences(WMScreen *scr, WMWindow *win)
|
||||
{
|
||||
_Panel *panel;
|
||||
|
||||
panel = wmalloc(sizeof(_Panel));
|
||||
memset(panel, 0, sizeof(_Panel));
|
||||
|
||||
panel->sectionName = _("Miscellaneous Ergonomic Preferences");
|
||||
|
||||
panel->win = win;
|
||||
|
||||
panel->callbacks.createWidgets = createPanel;
|
||||
panel->callbacks.updateDomain = storeData;
|
||||
|
||||
AddSection(panel, ICON_FILE);
|
||||
|
||||
return panel;
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
|
||||
WPrefs.app
|
||||
==========
|
||||
|
||||
The WindowMaker Prerefences Application
|
||||
|
||||
|
||||
WPrefs.app is the preferences "editor" for the WindowMaker window
|
||||
manager. It can be used to set most of the preference options of WindowMaker
|
||||
and define it's applications menu. It also can change some settings
|
||||
that do not belong to WindowMaker.
|
||||
|
||||
Although WPrefs.app is designed to be easy to use, you should read the
|
||||
user guide to be fully aware of all available options and other features
|
||||
of WindowMaker that are not related to configuration.
|
||||
|
||||
To run WPrefs, do not put it in your search path. Instead, run it
|
||||
with the full path, like /usr/local/GNUstep/Apps/WPrefs.app/WPrefs
|
||||
Then, dock it's application icon. The dock will automatically detect it's
|
||||
icon and use it.
|
||||
|
||||
If you change configuration often, you might want to leave WPrefs
|
||||
always running, leaving it hidden while not in use. You can also make it
|
||||
be automatically started with WindowMaker and toggle the Start Hidden
|
||||
option in the attributes panel for the WPrefs window. Of course, it will
|
||||
use some memory, but by leaving it hidden it'll probably be swapped out and
|
||||
stay there until you unhide it.
|
||||
|
||||
WPrefs is still under development. Some of the configuration options are
|
||||
not yet configurable from WPrefs, notably the appearance related options.
|
||||
It might contain bugs that can corrupt your configuration files, so backup
|
||||
the contents of the ~/GNUstep/Defaults directory before using it.
|
||||
|
||||
|
||||
|
||||
|
||||
Notes
|
||||
-----
|
||||
|
||||
The mouse speed configuration is saved as a call for xset in
|
||||
~/G/D/L/W/autostart. WindowMaker calls this file when it is started.
|
||||
|
||||
If you don't want or can't use the menu definition section, do not
|
||||
open it's section (or if you do open it, do not Save), or WPrefs will
|
||||
overwrite your ~/G/D/WMRootMenu file.
|
||||
|
||||
Only options that have different values than what is found in the
|
||||
system-wide configuration file is saved.
|
||||
|
||||
WPrefs only supports property list menus. If you have a plain text file
|
||||
menu, it will not be read by WPrefs. You can either recreate the menu from
|
||||
scratch or not use WPrefs for menu definition. The old menu will not be
|
||||
overwritten if you recreate it.
|
||||
|
||||
|
||||
Build
|
||||
-----
|
||||
|
||||
WPrefs will be built automatically and installed with the rest of WindowMaker.
|
||||
|
||||
|
||||
|
||||
Customized Installation
|
||||
-----------------------
|
||||
|
||||
By default, WPrefs.app will be installed in the GNUstep applications
|
||||
directory, which is /usr/local/GNUstep/Apps. If you want to install it
|
||||
somewhere else, like in /some_weird_path/Apps, set the GNUSTEP_LOCAL_ROOT
|
||||
environment variable to some_weird_path before running configure for
|
||||
WindowMaker. Leave this variable always set (make it be set from your
|
||||
.profile or .tcshrc or whatever), or WPrefs.app will not find it's resource
|
||||
files (like icons).
|
||||
If you change your mind after installing, you can move the .app directory
|
||||
to one of the following GNUstep/Apps directories:
|
||||
|
||||
/usr/GNUstep/Apps
|
||||
|
||||
OR
|
||||
|
||||
/usr/local/GNUstep/Apps
|
||||
|
||||
OR
|
||||
|
||||
~/GNUstep/Apps
|
||||
|
||||
|
||||
|
||||
Credits
|
||||
-------
|
||||
|
||||
User interface design, programming and a few icons:
|
||||
Alfredo K. Kojima <kojima@windowmaker.org>
|
||||
|
||||
Icon and image artwork:
|
||||
Marco van Hylckama Vlieg <fatal@global.uibk.ac.at>
|
||||
|
||||
|
||||
WindowMaker
|
||||
-----------
|
||||
|
||||
If for some weird reason you end up with this preferences program and
|
||||
don't have WindowMaker yet, you can get more information about it at
|
||||
http://windowmaker.org and download it at ftp://ftp.windowmaker.org
|
||||
|
||||
|
||||
Contact
|
||||
-------
|
||||
|
||||
Send comments and bug reports to kojima@windowmaker.org
|
||||
Use the WindowMaker BUGFORM to report bugs.
|
||||
|
||||
@@ -0,0 +1,335 @@
|
||||
/* Text.c- text/font settings
|
||||
*
|
||||
* WPrefs - WindowMaker 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"
|
||||
|
||||
typedef struct _Panel {
|
||||
WMFrame *frame;
|
||||
char *sectionName;
|
||||
|
||||
CallbackRec callbacks;
|
||||
|
||||
WMWindow *win;
|
||||
|
||||
WMPopUpButton *secP;
|
||||
WMButton *setB;
|
||||
|
||||
WMTextField *nameT;
|
||||
|
||||
WMLabel *sampleL;
|
||||
|
||||
WMFrame *alignF;
|
||||
WMButton *leftB;
|
||||
WMButton *centerB;
|
||||
WMButton *rightB;
|
||||
|
||||
|
||||
/**/
|
||||
WMFont *windowF;
|
||||
char *windowFont;
|
||||
WMFont *menuF;
|
||||
char *menuFont;
|
||||
WMFont *itemF;
|
||||
char *itemFont;
|
||||
WMFont *clipF;
|
||||
char *clipFont;
|
||||
WMFont *iconF;
|
||||
char *iconFont;
|
||||
WMFont *geoF;
|
||||
char *geoFont;
|
||||
} _Panel;
|
||||
|
||||
|
||||
|
||||
#define ICON_FILE "fonts"
|
||||
|
||||
|
||||
|
||||
|
||||
static void
|
||||
changePage(WMWidget *w, void *data)
|
||||
{
|
||||
_Panel *panel = (_Panel*)data;
|
||||
int sect;
|
||||
|
||||
sect = WMGetPopUpButtonSelectedItem(w);
|
||||
|
||||
if (sect == 0) {
|
||||
WMMapWidget(panel->alignF);
|
||||
} else {
|
||||
WMUnmapWidget(panel->alignF);
|
||||
}
|
||||
|
||||
switch (sect) {
|
||||
case 0:
|
||||
WMSetTextFieldText(panel->nameT, panel->windowFont);
|
||||
WMSetLabelFont(panel->sampleL, panel->windowF);
|
||||
break;
|
||||
case 1:
|
||||
WMSetTextFieldText(panel->nameT, panel->menuFont);
|
||||
WMSetLabelFont(panel->sampleL, panel->menuF);
|
||||
break;
|
||||
case 2:
|
||||
WMSetTextFieldText(panel->nameT, panel->itemFont);
|
||||
WMSetLabelFont(panel->sampleL, panel->itemF);
|
||||
break;
|
||||
case 3:
|
||||
WMSetTextFieldText(panel->nameT, panel->iconFont);
|
||||
WMSetLabelFont(panel->sampleL, panel->iconF);
|
||||
break;
|
||||
case 4:
|
||||
WMSetTextFieldText(panel->nameT, panel->clipFont);
|
||||
WMSetLabelFont(panel->sampleL, panel->clipF);
|
||||
break;
|
||||
case 5:
|
||||
WMSetTextFieldText(panel->nameT, panel->geoFont);
|
||||
WMSetLabelFont(panel->sampleL, panel->geoF);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
showData(_Panel *panel)
|
||||
{
|
||||
WMScreen *scr = WMWidgetScreen(panel->win);
|
||||
char *str;
|
||||
|
||||
str = GetStringForKey("WindowTitleFont");
|
||||
if (!str)
|
||||
str = "-*-helvetica-bold-r-normal-*-12-*";
|
||||
panel->windowF = WMCreateFont(scr, str);
|
||||
panel->windowFont = wstrdup(str);
|
||||
|
||||
str = GetStringForKey("MenuTitleFont");
|
||||
if (!str)
|
||||
str = "-*-helvetica-bold-r-normal-*-12-*";
|
||||
panel->menuF = WMCreateFont(scr, str);
|
||||
panel->menuFont = wstrdup(str);
|
||||
|
||||
str = GetStringForKey("MenuTextFont");
|
||||
if (!str)
|
||||
str = "-*-helvetica-medium-r-normal-*-12-*";
|
||||
panel->itemF = WMCreateFont(scr, str);
|
||||
panel->itemFont = wstrdup(str);
|
||||
|
||||
str = GetStringForKey("IconTitleFont");
|
||||
if (!str)
|
||||
str = "-*-helvetica-medium-r-normal-*-8-*";
|
||||
panel->iconF = WMCreateFont(scr, str);
|
||||
panel->iconFont = wstrdup(str);
|
||||
|
||||
str = GetStringForKey("ClipTitleFont");
|
||||
if (!str)
|
||||
str = "-*-helvetica-medium-r-normal-*-10-*";
|
||||
panel->clipF = WMCreateFont(scr, str);
|
||||
panel->clipFont = wstrdup(str);
|
||||
|
||||
str = GetStringForKey("DisplayFont");
|
||||
if (!str)
|
||||
str = "-*-helvetica-medium-r-normal-*-12-*";
|
||||
panel->geoF = WMCreateFont(scr, str);
|
||||
panel->geoFont = wstrdup(str);
|
||||
|
||||
str = GetStringForKey("TitleJustify");
|
||||
if (strcasecmp(str,"left")==0)
|
||||
WMPerformButtonClick(panel->leftB);
|
||||
else if (strcasecmp(str,"center")==0)
|
||||
WMPerformButtonClick(panel->centerB);
|
||||
else if (strcasecmp(str,"right")==0)
|
||||
WMPerformButtonClick(panel->rightB);
|
||||
|
||||
changePage(panel->secP, panel);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
editedName(void *data, WMNotification *notification)
|
||||
{
|
||||
_Panel *panel = (_Panel*)data;
|
||||
|
||||
if ((int)WMGetNotificationClientData(notification)==WMReturnTextMovement) {
|
||||
char *name;
|
||||
WMFont *font;
|
||||
char buffer[256];
|
||||
|
||||
name = WMGetTextFieldText(panel->nameT);
|
||||
font = WMCreateFont(WMWidgetScreen(panel->win), name);
|
||||
if (!font) {
|
||||
sprintf(buffer, _("Invalid font %s."), name);
|
||||
WMRunAlertPanel(WMWidgetScreen(panel->win), panel->win,
|
||||
_("Error"), buffer, _("OK"), NULL, NULL);
|
||||
free(name);
|
||||
} else {
|
||||
int sect;
|
||||
|
||||
sect = WMGetPopUpButtonSelectedItem(panel->secP);
|
||||
|
||||
switch (sect) {
|
||||
case 0:
|
||||
if (panel->windowFont)
|
||||
free(panel->windowFont);
|
||||
panel->windowFont = name;
|
||||
if (panel->windowF)
|
||||
WMReleaseFont(panel->windowF);
|
||||
panel->windowF = font;
|
||||
break;
|
||||
case 1:
|
||||
if (panel->menuFont)
|
||||
free(panel->menuFont);
|
||||
panel->menuFont = name;
|
||||
if (panel->menuF)
|
||||
WMReleaseFont(panel->menuF);
|
||||
panel->menuF = font;
|
||||
break;
|
||||
case 2:
|
||||
if (panel->itemFont)
|
||||
free(panel->itemFont);
|
||||
panel->itemFont = name;
|
||||
if (panel->itemF)
|
||||
WMReleaseFont(panel->itemF);
|
||||
panel->itemF = font;
|
||||
break;
|
||||
case 3:
|
||||
if (panel->iconFont)
|
||||
free(panel->iconFont);
|
||||
panel->iconFont = name;
|
||||
if (panel->iconF)
|
||||
WMReleaseFont(panel->iconF);
|
||||
panel->iconF = font;
|
||||
break;
|
||||
case 4:
|
||||
if (panel->clipFont)
|
||||
free(panel->clipFont);
|
||||
panel->clipFont = name;
|
||||
if (panel->clipF)
|
||||
WMReleaseFont(panel->clipF);
|
||||
panel->clipF = font;
|
||||
break;
|
||||
case 5:
|
||||
if (panel->geoFont)
|
||||
free(panel->geoFont);
|
||||
panel->geoFont = name;
|
||||
if (panel->geoF)
|
||||
WMReleaseFont(panel->geoF);
|
||||
panel->geoF = font;
|
||||
break;
|
||||
}
|
||||
changePage(panel->secP, panel);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
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->setB = WMCreateCommandButton(panel->frame);
|
||||
WMResizeWidget(panel->setB, 145, 20);
|
||||
WMMoveWidget(panel->setB, 50, 25);
|
||||
WMSetButtonText(panel->setB, _("Set Font..."));
|
||||
|
||||
panel->secP = WMCreatePopUpButton(panel->frame);
|
||||
WMResizeWidget(panel->secP, 260, 20);
|
||||
WMMoveWidget(panel->secP, 205, 25);
|
||||
WMSetPopUpButtonAction(panel->secP, changePage, panel);
|
||||
WMAddPopUpButtonItem(panel->secP, _("Window Title Font"));
|
||||
WMAddPopUpButtonItem(panel->secP, _("Menu Title Font"));
|
||||
WMAddPopUpButtonItem(panel->secP, _("Menu Item Font"));
|
||||
WMAddPopUpButtonItem(panel->secP, _("Icon Title Font"));
|
||||
WMAddPopUpButtonItem(panel->secP, _("Clip Title Font"));
|
||||
WMAddPopUpButtonItem(panel->secP, _("Geometry Display Font"));
|
||||
WMSetPopUpButtonSelectedItem(panel->secP, 0);
|
||||
|
||||
panel->nameT = WMCreateTextField(panel->frame);
|
||||
WMResizeWidget(panel->nameT, 285, 24);
|
||||
WMMoveWidget(panel->nameT, 50, 80);
|
||||
WMAddNotificationObserver(editedName, panel,
|
||||
WMTextDidEndEditingNotification, panel->nameT);
|
||||
|
||||
panel->sampleL = WMCreateLabel(panel->frame);
|
||||
WMResizeWidget(panel->sampleL, 285, 85);
|
||||
WMMoveWidget(panel->sampleL, 50, 135);
|
||||
WMSetLabelRelief(panel->sampleL, WRSunken);
|
||||
WMSetLabelText(panel->sampleL, _("Sample Text\nabcdefghijklmnopqrstuvxywz\nABCDEFGHIJKLMNOPQRSTUVXYWZ\n0123456789"));
|
||||
|
||||
panel->alignF = WMCreateFrame(panel->frame);
|
||||
WMResizeWidget(panel->alignF, 120, 160);
|
||||
WMMoveWidget(panel->alignF, 345, 60);
|
||||
WMSetFrameTitle(panel->alignF, _("Alignment"));
|
||||
|
||||
panel->leftB = WMCreateButton(panel->alignF, WBTOnOff);
|
||||
WMResizeWidget(panel->leftB, 100, 24);
|
||||
WMMoveWidget(panel->leftB, 10, 25);
|
||||
WMSetButtonText(panel->leftB, _("Left"));
|
||||
WMSetButtonTextAlignment(panel->leftB, WALeft);
|
||||
|
||||
panel->centerB = WMCreateButton(panel->alignF, WBTOnOff);
|
||||
WMResizeWidget(panel->centerB, 100, 24);
|
||||
WMMoveWidget(panel->centerB, 10, 70);
|
||||
WMSetButtonText(panel->centerB, _("Center"));
|
||||
WMSetButtonTextAlignment(panel->centerB, WACenter);
|
||||
WMGroupButtons(panel->leftB, panel->centerB);
|
||||
|
||||
panel->rightB = WMCreateButton(panel->alignF, WBTOnOff);
|
||||
WMResizeWidget(panel->rightB, 100, 24);
|
||||
WMMoveWidget(panel->rightB, 10, 115);
|
||||
WMSetButtonText(panel->rightB, _("Right"));
|
||||
WMSetButtonTextAlignment(panel->rightB, WARight);
|
||||
WMGroupButtons(panel->leftB, panel->rightB);
|
||||
|
||||
WMMapSubwidgets(panel->alignF);
|
||||
|
||||
WMRealizeWidget(panel->frame);
|
||||
WMMapSubwidgets(panel->frame);
|
||||
|
||||
showData(panel);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Panel*
|
||||
InitText(WMScreen *scr, WMWindow *win)
|
||||
{
|
||||
_Panel *panel;
|
||||
|
||||
panel = wmalloc(sizeof(_Panel));
|
||||
memset(panel, 0, sizeof(_Panel));
|
||||
|
||||
panel->sectionName = _("Text Preferences");
|
||||
|
||||
panel->win = win;
|
||||
|
||||
panel->callbacks.createWidgets = createPanel;
|
||||
|
||||
AddSection(panel, ICON_FILE);
|
||||
|
||||
return panel;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,641 @@
|
||||
/* TextureAndColor.c- color/texture for titlebar etc.
|
||||
*
|
||||
* WPrefs - WindowMaker 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"
|
||||
|
||||
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 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 void
|
||||
updatePreviewBox(_Panel *panel, int elements)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
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;
|
||||
}
|
||||
@@ -0,0 +1,855 @@
|
||||
/* WPrefs.c- main window and other basic stuff
|
||||
*
|
||||
* WPrefs - WindowMaker 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 <assert.h>
|
||||
|
||||
|
||||
extern Panel *InitWindowHandling(WMScreen *scr, WMWindow *win);
|
||||
|
||||
extern Panel *InitKeyboardSettings(WMScreen *scr, WMWindow *win);
|
||||
|
||||
extern Panel *InitMouseSettings(WMScreen *scr, WMWindow *win);
|
||||
|
||||
extern Panel *InitKeyboardShortcuts(WMScreen *scr, WMWindow *win);
|
||||
|
||||
extern Panel *InitWorkspace(WMScreen *scr, WMWindow *win);
|
||||
|
||||
extern Panel *InitFocus(WMScreen *scr, WMWindow *win);
|
||||
|
||||
extern Panel *InitPreferences(WMScreen *scr, WMWindow *win);
|
||||
|
||||
extern Panel *InitTextureAndColor(WMScreen *scr, WMWindow *win);
|
||||
|
||||
extern Panel *InitText(WMScreen *scr, WMWindow *win);
|
||||
|
||||
extern Panel *InitConfigurations(WMScreen *scr, WMWindow *win);
|
||||
|
||||
extern Panel *InitPaths(WMScreen *scr, WMWindow *win);
|
||||
|
||||
extern Panel *InitMenu(WMScreen *scr, WMWindow *win);
|
||||
|
||||
extern Panel *InitExpert(WMScreen *scr, WMWindow *win);
|
||||
|
||||
extern Panel *InitMenuPreferences(WMScreen *scr, WMWindow *win);
|
||||
|
||||
extern Panel *InitIcons(WMScreen *scr, WMWindow *win);
|
||||
|
||||
|
||||
#define MAX_SECTIONS 16
|
||||
|
||||
|
||||
typedef struct _WPrefs {
|
||||
WMWindow *win;
|
||||
|
||||
WMScrollView *scrollV;
|
||||
WMFrame *buttonF;
|
||||
WMButton *sectionB[MAX_SECTIONS];
|
||||
|
||||
int sectionCount;
|
||||
|
||||
WMButton *saveBtn;
|
||||
WMButton *closeBtn;
|
||||
WMButton *undoBtn;
|
||||
WMButton *undosBtn;
|
||||
|
||||
WMFrame *banner;
|
||||
WMLabel *nameL;
|
||||
WMLabel *versionL;
|
||||
WMLabel *creditsL;
|
||||
WMLabel *statusL;
|
||||
|
||||
Panel *currentPanel;
|
||||
} _WPrefs;
|
||||
|
||||
|
||||
static _WPrefs WPrefs;
|
||||
|
||||
/* system wide defaults dictionary. Read-only */
|
||||
static proplist_t GlobalDB = NULL;
|
||||
/* user defaults dictionary */
|
||||
static proplist_t WindowMakerDB = NULL;
|
||||
|
||||
|
||||
static Bool TIFFOK = False;
|
||||
|
||||
|
||||
#define INITIALIZED_PANEL (1<<0)
|
||||
|
||||
|
||||
|
||||
|
||||
static void loadConfigurations(WMScreen *scr, WMWindow *mainw);
|
||||
|
||||
static void savePanelData(Panel *panel);
|
||||
|
||||
|
||||
void
|
||||
quit(WMWidget *w, void *data)
|
||||
{
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
save(WMWidget *w, void *data)
|
||||
{
|
||||
int i;
|
||||
proplist_t p1, p2;
|
||||
proplist_t keyList;
|
||||
proplist_t key;
|
||||
|
||||
|
||||
/* puts("gathering data");*/
|
||||
for (i=0; i<WPrefs.sectionCount; i++) {
|
||||
PanelRec *rec = WMGetHangedData(WPrefs.sectionB[i]);
|
||||
if ((rec->callbacks.flags & INITIALIZED_PANEL))
|
||||
savePanelData((Panel*)rec);
|
||||
}
|
||||
/* puts("compressing data");*/
|
||||
/* compare the user dictionary with the global and remove redundant data */
|
||||
keyList = PLGetAllDictionaryKeys(GlobalDB);
|
||||
/* puts(PLGetDescription(WindowMakerDB));*/
|
||||
for (i=0; i<PLGetNumberOfElements(keyList); i++) {
|
||||
key = PLGetArrayElement(keyList, i);
|
||||
|
||||
/* We don't have this value anyway, so no problem.
|
||||
* Probably a new option */
|
||||
p1 = PLGetDictionaryEntry(WindowMakerDB, key);
|
||||
if (!p1)
|
||||
continue;
|
||||
/* The global doesn't have it, so no problem either. */
|
||||
p2 = PLGetDictionaryEntry(GlobalDB, key);
|
||||
if (!p2)
|
||||
continue;
|
||||
/* If both values are the same, don't save. */
|
||||
if (PLIsEqual(p1, p2))
|
||||
PLRemoveDictionaryEntry(WindowMakerDB, key);
|
||||
}
|
||||
/* puts(PLGetDescription(WindowMakerDB));*/
|
||||
PLRelease(keyList);
|
||||
/* puts("storing data");*/
|
||||
|
||||
PLSave(WindowMakerDB, YES);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
undo(WMWidget *w, void *data)
|
||||
{
|
||||
PanelRec *rec = (PanelRec*)WPrefs.currentPanel;
|
||||
|
||||
if (!rec)
|
||||
return;
|
||||
|
||||
if (rec->callbacks.undoChanges
|
||||
&& (rec->callbacks.flags & INITIALIZED_PANEL)) {
|
||||
(*rec->callbacks.undoChanges)(WPrefs.currentPanel);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
undoAll(WMWidget *w, void *data)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i=0; i<WPrefs.sectionCount; i++) {
|
||||
PanelRec *rec = WMGetHangedData(WPrefs.sectionB[i]);
|
||||
|
||||
if (rec->callbacks.undoChanges
|
||||
&& (rec->callbacks.flags & INITIALIZED_PANEL))
|
||||
(*rec->callbacks.undoChanges)((Panel*)rec);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
createMainWindow(WMScreen *scr)
|
||||
{
|
||||
WMScroller *scroller;
|
||||
WMFont *font;
|
||||
char buffer[128];
|
||||
|
||||
WPrefs.win = WMCreateWindow(scr, "wprefs");
|
||||
WMResizeWidget(WPrefs.win, 520, 390);
|
||||
WMSetWindowTitle(WPrefs.win, _("WindowMaker Preferences"));
|
||||
WMSetWindowCloseAction(WPrefs.win, quit, NULL);
|
||||
WMSetWindowMaxSize(WPrefs.win, 520, 390);
|
||||
WMSetWindowMinSize(WPrefs.win, 520, 390);
|
||||
WMSetWindowMiniwindowTitle(WPrefs.win, "Preferences");
|
||||
WMSetWindowMiniwindowImage(WPrefs.win, WMGetApplicationIconImage(scr));
|
||||
|
||||
WPrefs.scrollV = WMCreateScrollView(WPrefs.win);
|
||||
WMResizeWidget(WPrefs.scrollV, 500, 87);
|
||||
WMMoveWidget(WPrefs.scrollV, 10, 10);
|
||||
WMSetScrollViewRelief(WPrefs.scrollV, WRSunken);
|
||||
WMSetScrollViewHasHorizontalScroller(WPrefs.scrollV, True);
|
||||
WMSetScrollViewHasVerticalScroller(WPrefs.scrollV, False);
|
||||
scroller = WMGetScrollViewHorizontalScroller(WPrefs.scrollV);
|
||||
WMSetScrollerArrowsPosition(scroller, WSANone);
|
||||
|
||||
WPrefs.buttonF = WMCreateFrame(WPrefs.win);
|
||||
WMSetFrameRelief(WPrefs.buttonF, WRFlat);
|
||||
|
||||
WMSetScrollViewContentView(WPrefs.scrollV, WMWidgetView(WPrefs.buttonF));
|
||||
|
||||
WPrefs.undosBtn = WMCreateCommandButton(WPrefs.win);
|
||||
WMResizeWidget(WPrefs.undosBtn, 90, 28);
|
||||
WMMoveWidget(WPrefs.undosBtn, 135, 350);
|
||||
WMSetButtonText(WPrefs.undosBtn, _("Revert Page"));
|
||||
WMSetButtonAction(WPrefs.undosBtn, undo, NULL);
|
||||
|
||||
WPrefs.undoBtn = WMCreateCommandButton(WPrefs.win);
|
||||
WMResizeWidget(WPrefs.undoBtn, 90, 28);
|
||||
WMMoveWidget(WPrefs.undoBtn, 235, 350);
|
||||
WMSetButtonText(WPrefs.undoBtn, _("Revert All"));
|
||||
WMSetButtonAction(WPrefs.undoBtn, undoAll, NULL);
|
||||
|
||||
WPrefs.saveBtn = WMCreateCommandButton(WPrefs.win);
|
||||
WMResizeWidget(WPrefs.saveBtn, 80, 28);
|
||||
WMMoveWidget(WPrefs.saveBtn, 335, 350);
|
||||
WMSetButtonText(WPrefs.saveBtn, _("Save"));
|
||||
WMSetButtonAction(WPrefs.saveBtn, save, NULL);
|
||||
|
||||
WPrefs.closeBtn = WMCreateCommandButton(WPrefs.win);
|
||||
WMResizeWidget(WPrefs.closeBtn, 80, 28);
|
||||
WMMoveWidget(WPrefs.closeBtn, 425, 350);
|
||||
WMSetButtonText(WPrefs.closeBtn, _("Close"));
|
||||
WMSetButtonAction(WPrefs.closeBtn, quit, NULL);
|
||||
|
||||
/* banner */
|
||||
WPrefs.banner = WMCreateFrame(WPrefs.win);
|
||||
WMResizeWidget(WPrefs.banner, FRAME_WIDTH, FRAME_HEIGHT);
|
||||
WMMoveWidget(WPrefs.banner, FRAME_LEFT, FRAME_TOP);
|
||||
WMSetFrameRelief(WPrefs.banner, WRFlat);
|
||||
|
||||
font = WMCreateFont(scr, "-*-times-bold-r-*-*-24-*-*-*-*-*-*-*");
|
||||
if (!font)
|
||||
font = WMBoldSystemFontOfSize(scr, 24);
|
||||
WPrefs.nameL = WMCreateLabel(WPrefs.banner);
|
||||
WMSetLabelTextAlignment(WPrefs.nameL, WACenter);
|
||||
WMResizeWidget(WPrefs.nameL, FRAME_WIDTH-20, 30);
|
||||
WMMoveWidget(WPrefs.nameL, 10, 25);
|
||||
WMSetLabelFont(WPrefs.nameL, font);
|
||||
WMSetLabelText(WPrefs.nameL, "WindowMaker Preferences Utility");
|
||||
WMReleaseFont(font);
|
||||
|
||||
WPrefs.versionL = WMCreateLabel(WPrefs.banner);
|
||||
WMResizeWidget(WPrefs.versionL, FRAME_WIDTH-20, 20);
|
||||
WMMoveWidget(WPrefs.versionL, 10, 65);
|
||||
WMSetLabelTextAlignment(WPrefs.versionL, WACenter);
|
||||
sprintf(buffer, _("Version %s for WindowMaker %s"), WVERSION, WMVERSION);
|
||||
WMSetLabelText(WPrefs.versionL, buffer);
|
||||
|
||||
WPrefs.statusL = WMCreateLabel(WPrefs.banner);
|
||||
WMResizeWidget(WPrefs.statusL, FRAME_WIDTH-20, 60);
|
||||
WMMoveWidget(WPrefs.statusL, 10, 100);
|
||||
WMSetLabelTextAlignment(WPrefs.statusL, WACenter);
|
||||
WMSetLabelText(WPrefs.statusL, _("Starting..."));
|
||||
|
||||
WPrefs.creditsL = WMCreateLabel(WPrefs.banner);
|
||||
WMResizeWidget(WPrefs.creditsL, FRAME_WIDTH-20, 40);
|
||||
WMMoveWidget(WPrefs.creditsL, 10, FRAME_HEIGHT-40);
|
||||
WMSetLabelTextAlignment(WPrefs.creditsL, WACenter);
|
||||
WMSetLabelText(WPrefs.creditsL, _("Programming/Design: Alfredo K. Kojima\n"
|
||||
"Artwork: Marco van Hylckama Vlieg"));
|
||||
|
||||
|
||||
WMMapSubwidgets(WPrefs.win);
|
||||
|
||||
WMUnmapWidget(WPrefs.undosBtn);
|
||||
WMUnmapWidget(WPrefs.undoBtn);
|
||||
WMUnmapWidget(WPrefs.saveBtn);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
showPanel(Panel *panel)
|
||||
{
|
||||
PanelRec *rec = (PanelRec*)panel;
|
||||
|
||||
if (!(rec->callbacks.flags & INITIALIZED_PANEL)) {
|
||||
(*rec->callbacks.createWidgets)(panel);
|
||||
rec->callbacks.flags |= INITIALIZED_PANEL;
|
||||
}
|
||||
|
||||
WMSetWindowTitle(WPrefs.win, rec->sectionName);
|
||||
|
||||
WMMapWidget(rec->frame);
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void
|
||||
hidePanel(Panel *panel)
|
||||
{
|
||||
PanelRec *rec = (PanelRec*)panel;
|
||||
|
||||
WMUnmapWidget(rec->frame);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
savePanelData(Panel *panel)
|
||||
{
|
||||
PanelRec *rec = (PanelRec*)panel;
|
||||
|
||||
if (rec->callbacks.updateDomain) {
|
||||
(*rec->callbacks.updateDomain)(panel);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
changeSection(WMWidget *self, void *data)
|
||||
{
|
||||
if (WPrefs.banner) {
|
||||
WMDestroyWidget(WPrefs.banner);
|
||||
WPrefs.banner = NULL;
|
||||
/* WMMapWidget(WPrefs.undosBtn);
|
||||
WMMapWidget(WPrefs.undoBtn);
|
||||
*/
|
||||
WMMapWidget(WPrefs.saveBtn);
|
||||
}
|
||||
|
||||
showPanel(data);
|
||||
|
||||
if (WPrefs.currentPanel)
|
||||
hidePanel(WPrefs.currentPanel);
|
||||
WPrefs.currentPanel = data;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
char*
|
||||
LocateImage(char *name)
|
||||
{
|
||||
char *path;
|
||||
char *tmp = wmalloc(strlen(name)+8);
|
||||
|
||||
if (TIFFOK) {
|
||||
sprintf(tmp, "%s.tiff", name);
|
||||
path = WMPathForResourceOfType(tmp, "tiff");
|
||||
} else {
|
||||
sprintf(tmp, "%s.xpm", name);
|
||||
path = WMPathForResourceOfType(tmp, "xpm");
|
||||
}
|
||||
free(tmp);
|
||||
if (!path) {
|
||||
wwarning(_("could not locate image file %s\n"), name);
|
||||
}
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
AddSection(Panel *panel, char *iconFile)
|
||||
{
|
||||
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);
|
||||
|
||||
color.red = 0xae;
|
||||
color.green = 0xaa;
|
||||
color.blue = 0xae;
|
||||
color.alpha = 0;
|
||||
if (iconPath) {
|
||||
icon = WMCreateBlendedPixmapFromFile(WMWidgetScreen(WPrefs.win),
|
||||
iconPath, &color);
|
||||
if (!icon)
|
||||
wwarning(_("could not load icon file %s"), iconPath);
|
||||
} else {
|
||||
icon = NULL;
|
||||
}
|
||||
|
||||
WMSetButtonImage(bPtr, icon);
|
||||
|
||||
if (icon)
|
||||
WMReleasePixmap(icon);
|
||||
|
||||
color.red = 0xff;
|
||||
color.green = 0xff;
|
||||
color.blue = 0xff;
|
||||
color.alpha = 0;
|
||||
if (iconPath) {
|
||||
icon = WMCreateBlendedPixmapFromFile(WMWidgetScreen(WPrefs.win),
|
||||
iconPath, &color);
|
||||
if (!icon)
|
||||
wwarning(_("could not load icon file %s"), iconPath);
|
||||
} else {
|
||||
icon = NULL;
|
||||
}
|
||||
|
||||
WMSetButtonAltImage(bPtr, icon);
|
||||
|
||||
if (icon)
|
||||
WMReleasePixmap(icon);
|
||||
|
||||
WMMapWidget(bPtr);
|
||||
|
||||
WPrefs.sectionB[WPrefs.sectionCount] = bPtr;
|
||||
|
||||
if (WPrefs.sectionCount > 0) {
|
||||
WMGroupButtons(WPrefs.sectionB[0], bPtr);
|
||||
}
|
||||
|
||||
WPrefs.sectionCount++;
|
||||
|
||||
WMResizeWidget(WPrefs.buttonF, WPrefs.sectionCount*64, 64);
|
||||
|
||||
free(iconPath);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Initialize(WMScreen *scr)
|
||||
{
|
||||
char **list;
|
||||
int i;
|
||||
char *path;
|
||||
WMPixmap *icon;
|
||||
|
||||
|
||||
list = RSupportedFileFormats();
|
||||
for (i=0; list[i]!=NULL; i++) {
|
||||
if (strcmp(list[i], "TIFF")==0) {
|
||||
TIFFOK = True;
|
||||
break;
|
||||
}
|
||||
}
|
||||
RFreeStringList(list);
|
||||
|
||||
if (TIFFOK)
|
||||
path = WMPathForResourceOfType("WPrefs.tiff", NULL);
|
||||
else
|
||||
path = WMPathForResourceOfType("WPrefs.xpm", NULL);
|
||||
if (path) {
|
||||
RImage *tmp;
|
||||
|
||||
tmp = RLoadImage(WMScreenRContext(scr), path, 0);
|
||||
if (!tmp) {
|
||||
wwarning("could not load image file %s:%s", path, RErrorString);
|
||||
} else {
|
||||
icon = WMCreatePixmapFromRImage(scr, tmp, 0);
|
||||
RDestroyImage(tmp);
|
||||
if (icon) {
|
||||
WMSetApplicationIconImage(scr, icon);
|
||||
WMReleasePixmap(icon);
|
||||
}
|
||||
}
|
||||
free(path);
|
||||
}
|
||||
|
||||
memset(&WPrefs, 0, sizeof(_WPrefs));
|
||||
createMainWindow(scr);
|
||||
|
||||
WMRealizeWidget(WPrefs.win);
|
||||
WMMapWidget(WPrefs.win);
|
||||
XFlush(WMScreenDisplay(scr));
|
||||
WMSetLabelText(WPrefs.statusL, _("Loading WindowMaker configuration files..."));
|
||||
XFlush(WMScreenDisplay(scr));
|
||||
loadConfigurations(scr, WPrefs.win);
|
||||
|
||||
WMSetLabelText(WPrefs.statusL, _("Initializing configuration panels..."));
|
||||
|
||||
InitWindowHandling(scr, WPrefs.win);
|
||||
InitFocus(scr, WPrefs.win);
|
||||
InitMenuPreferences(scr, WPrefs.win);
|
||||
InitIcons(scr, WPrefs.win);
|
||||
InitPreferences(scr, WPrefs.win);
|
||||
|
||||
InitPaths(scr, WPrefs.win);
|
||||
InitWorkspace(scr, WPrefs.win);
|
||||
InitConfigurations(scr, WPrefs.win);
|
||||
InitMenu(scr, WPrefs.win);
|
||||
#ifdef not_yet_fully_implemented
|
||||
InitKeyboardSettings(scr, WPrefs.win);
|
||||
#endif
|
||||
InitKeyboardShortcuts(scr, WPrefs.win);
|
||||
InitMouseSettings(scr, WPrefs.win);
|
||||
#ifdef not_yet_fully_implemented
|
||||
InitTextureAndColor(scr, WPrefs.win);
|
||||
InitText(scr, WPrefs.win);
|
||||
#endif
|
||||
InitExpert(scr, WPrefs.win);
|
||||
|
||||
WMRealizeWidget(WPrefs.scrollV);
|
||||
|
||||
WMSetLabelText(WPrefs.statusL, "This program is still under development. Backup your ~/GNUstep/Defaults directory, before using it.");
|
||||
}
|
||||
|
||||
|
||||
WMWindow*
|
||||
GetWindow(Panel *panel)
|
||||
{
|
||||
return WPrefs.win;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
loadConfigurations(WMScreen *scr, WMWindow *mainw)
|
||||
{
|
||||
proplist_t db, gdb;
|
||||
char *path;
|
||||
FILE *file;
|
||||
char buffer[1024];
|
||||
char mbuf[1024];
|
||||
int v1, v2, v3;
|
||||
|
||||
path = wdefaultspathfordomain("WindowMaker");
|
||||
|
||||
db = PLGetProplistWithPath(path);
|
||||
if (db) {
|
||||
if (!PLIsDictionary(db)) {
|
||||
PLRelease(db);
|
||||
db = NULL;
|
||||
sprintf(mbuf, _("WindowMaker domain (%s) is corrupted!"), path);
|
||||
WMRunAlertPanel(scr, mainw, _("Error"), mbuf, _("OK"), NULL, NULL);
|
||||
}
|
||||
} else {
|
||||
sprintf(mbuf, _("Could not load WindowMaker domain (%s) from defaults database."),
|
||||
path);
|
||||
WMRunAlertPanel(scr, mainw, _("Error"), mbuf, _("OK"), NULL, NULL);
|
||||
}
|
||||
free(path);
|
||||
|
||||
file = popen("wmaker -version", "r");
|
||||
if (!file || !fgets(buffer, 1023, file)) {
|
||||
wsyserror(_("could not extract version information from WindowMaker"));
|
||||
wfatal(_("Make sure WindowMaker is in your search path."));
|
||||
|
||||
WMRunAlertPanel(scr, mainw, _("Error"),
|
||||
_("Could not extract version from WindowMaker. Make sure it is correctly installed."),
|
||||
_("OK"), NULL, NULL);
|
||||
exit(1);
|
||||
}
|
||||
if (file)
|
||||
pclose(file);
|
||||
|
||||
if (sscanf(buffer, "WindowMaker %i.%i.%i",&v1,&v2,&v3)!=3) {
|
||||
WMRunAlertPanel(scr, mainw, _("Error"),
|
||||
_("Could not extract version from WindowMaker. Make sure it is correctly installed."),
|
||||
_("OK"), NULL, NULL);
|
||||
exit(1);
|
||||
}
|
||||
if (v1 == 0 && (v2 < 18 || v3 < 0)) {
|
||||
sprintf(mbuf, _("WPrefs only supports WindowMaker 0.18.0 or newer.\n"
|
||||
"The version installed is %i.%i.%i\n"), v1, v2, v3);
|
||||
WMRunAlertPanel(scr, mainw, _("Error"), mbuf, _("OK"), NULL, NULL);
|
||||
exit(1);
|
||||
|
||||
}
|
||||
if (v1 > 1 || (v1 == 1 && (v2 > 0))) {
|
||||
sprintf(mbuf, _("WindowMaker %i.%i.%i, which is installed in your system, is not fully supported by this version of WPrefs."),
|
||||
v1, v2, v3);
|
||||
WMRunAlertPanel(scr, mainw, _("Warning"), mbuf, _("OK"), NULL, NULL);
|
||||
}
|
||||
|
||||
file = popen("wmaker -global_defaults_path", "r");
|
||||
if (!file || !fgets(buffer, 1023, file)) {
|
||||
wsyserror(_("could not run \"wmaker -global_defaults_path\"."));
|
||||
exit(1);
|
||||
}
|
||||
if (file)
|
||||
pclose(file);
|
||||
|
||||
gdb = PLGetProplistWithPath(buffer);
|
||||
if (gdb) {
|
||||
if (!PLIsDictionary(gdb)) {
|
||||
PLRelease(gdb);
|
||||
gdb = NULL;
|
||||
sprintf(mbuf, _("WindowMaker domain (%s) is corrupted!"), buffer);
|
||||
WMRunAlertPanel(scr, mainw, _("Error"), mbuf, _("OK"), NULL, NULL);
|
||||
}
|
||||
} else {
|
||||
sprintf(mbuf, _("Could not load global WindowMaker domain (%s)."),
|
||||
buffer);
|
||||
WMRunAlertPanel(scr, mainw, _("Error"), mbuf, _("OK"), NULL, NULL);
|
||||
}
|
||||
|
||||
if (!db) {
|
||||
db = PLMakeDictionaryFromEntries(NULL, NULL, NULL);
|
||||
}
|
||||
if (!gdb) {
|
||||
gdb = PLMakeDictionaryFromEntries(NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
GlobalDB = gdb;
|
||||
|
||||
WindowMakerDB = db;
|
||||
}
|
||||
|
||||
|
||||
proplist_t
|
||||
GetObjectForKey(char *defaultName)
|
||||
{
|
||||
proplist_t object = NULL;
|
||||
proplist_t key = PLMakeString(defaultName);
|
||||
|
||||
object = PLGetDictionaryEntry(WindowMakerDB, key);
|
||||
if (!object)
|
||||
object = PLGetDictionaryEntry(GlobalDB, key);
|
||||
|
||||
PLRelease(key);
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
SetObjectForKey(proplist_t object, char *defaultName)
|
||||
{
|
||||
proplist_t key = PLMakeString(defaultName);
|
||||
|
||||
PLInsertDictionaryEntry(WindowMakerDB, key, object);
|
||||
PLRelease(key);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
RemoveObjectForKey(char *defaultName)
|
||||
{
|
||||
proplist_t key = PLMakeString(defaultName);
|
||||
|
||||
PLRemoveDictionaryEntry(WindowMakerDB, key);
|
||||
|
||||
PLRelease(key);
|
||||
}
|
||||
|
||||
|
||||
char*
|
||||
GetStringForKey(char *defaultName)
|
||||
{
|
||||
proplist_t val;
|
||||
|
||||
val = GetObjectForKey(defaultName);
|
||||
|
||||
if (!val)
|
||||
return NULL;
|
||||
|
||||
if (!PLIsString(val))
|
||||
return NULL;
|
||||
|
||||
return PLGetString(val);
|
||||
}
|
||||
|
||||
|
||||
|
||||
proplist_t
|
||||
GetArrayForKey(char *defaultName)
|
||||
{
|
||||
proplist_t val;
|
||||
|
||||
val = GetObjectForKey(defaultName);
|
||||
|
||||
if (!val)
|
||||
return NULL;
|
||||
|
||||
if (!PLIsArray(val))
|
||||
return NULL;
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
|
||||
proplist_t
|
||||
GetDictionaryForKey(char *defaultName)
|
||||
{
|
||||
proplist_t val;
|
||||
|
||||
val = GetObjectForKey(defaultName);
|
||||
|
||||
if (!val)
|
||||
return NULL;
|
||||
|
||||
if (!PLIsDictionary(val))
|
||||
return NULL;
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
GetIntegerForKey(char *defaultName)
|
||||
{
|
||||
proplist_t val;
|
||||
char *str;
|
||||
int value;
|
||||
|
||||
val = GetObjectForKey(defaultName);
|
||||
|
||||
if (!val)
|
||||
return 0;
|
||||
|
||||
if (!PLIsString(val))
|
||||
return 0;
|
||||
|
||||
str = PLGetString(val);
|
||||
if (!str)
|
||||
return 0;
|
||||
|
||||
if (sscanf(str, "%i", &value)!=1)
|
||||
return 0;
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
Bool
|
||||
GetBoolForKey(char *defaultName)
|
||||
{
|
||||
int value;
|
||||
char *str;
|
||||
|
||||
str = GetStringForKey(defaultName);
|
||||
|
||||
if (!str)
|
||||
return False;
|
||||
|
||||
if (sscanf(str, "%i", &value)==1 && value!=0)
|
||||
return True;
|
||||
|
||||
if (strcasecmp(str, "YES")==0)
|
||||
return True;
|
||||
|
||||
if (strcasecmp(str, "Y")==0)
|
||||
return True;
|
||||
|
||||
return False;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
SetIntegerForKey(int value, char *defaultName)
|
||||
{
|
||||
proplist_t object;
|
||||
char buffer[128];
|
||||
|
||||
sprintf(buffer, "%i", value);
|
||||
object = PLMakeString(buffer);
|
||||
|
||||
SetObjectForKey(object, defaultName);
|
||||
PLRelease(object);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
SetStringForKey(char *value, char *defaultName)
|
||||
{
|
||||
proplist_t object;
|
||||
|
||||
object = PLMakeString(value);
|
||||
|
||||
SetObjectForKey(object, defaultName);
|
||||
PLRelease(object);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
SetBoolForKey(Bool value, char *defaultName)
|
||||
{
|
||||
static proplist_t yes = NULL, no = NULL;
|
||||
|
||||
if (!yes) {
|
||||
yes = PLMakeString("YES");
|
||||
no = PLMakeString("NO");
|
||||
}
|
||||
|
||||
SetObjectForKey(value ? yes : no, defaultName);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
SetSpeedForKey(int speed, char *defaultName)
|
||||
{
|
||||
char *str;
|
||||
|
||||
switch (speed) {
|
||||
case 0:
|
||||
str = "ultraslow";
|
||||
break;
|
||||
case 1:
|
||||
str = "slow";
|
||||
break;
|
||||
case 2:
|
||||
str = "medium";
|
||||
break;
|
||||
case 3:
|
||||
str = "fast";
|
||||
break;
|
||||
case 4:
|
||||
str = "ultrafast";
|
||||
break;
|
||||
default:
|
||||
str = NULL;
|
||||
}
|
||||
|
||||
if (str)
|
||||
SetStringForKey(str, defaultName);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
GetSpeedForKey(char *defaultName)
|
||||
{
|
||||
char *str;
|
||||
int i;
|
||||
|
||||
str = GetStringForKey(defaultName);
|
||||
if (strcasecmp(str, "ultraslow")==0)
|
||||
i = 0;
|
||||
else if (strcasecmp(str, "slow")==0)
|
||||
i = 1;
|
||||
else if (strcasecmp(str, "medium")==0)
|
||||
i = 2;
|
||||
else if (strcasecmp(str, "fast")==0)
|
||||
i = 3;
|
||||
else if (strcasecmp(str, "ultrafast")==0)
|
||||
i = 4;
|
||||
else {
|
||||
wwarning(_("bad speed value for option %s\n. Using default Medium"),
|
||||
defaultName);
|
||||
i = 2;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
/* WPrefs.h- general definitions
|
||||
*
|
||||
* WPrefs - WindowMaker 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.
|
||||
*/
|
||||
|
||||
#ifndef WPREFS_H_
|
||||
#define WPREFS_H_
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
#include <proplist.h>
|
||||
|
||||
#include <wraster.h>
|
||||
|
||||
#include <WINGs.h>
|
||||
#include <WUtil.h>
|
||||
|
||||
|
||||
#define WVERSION "0.6"
|
||||
#define WMVERSION "0.20.x"
|
||||
|
||||
|
||||
typedef struct _Panel Panel;
|
||||
|
||||
typedef struct {
|
||||
unsigned flags; /* reserved for WPrefs.c Don't access it */
|
||||
|
||||
void (*createWidgets)(Panel*); /* called when showing for first time */
|
||||
void (*updateDomain)(Panel*); /* save the changes to the dictionary */
|
||||
Bool (*requiresRestart)(Panel*); /* return True if some static option was changed */
|
||||
void (*undoChanges)(Panel*); /* reset values to those in the dictionary */
|
||||
} CallbackRec;
|
||||
|
||||
|
||||
/* all Panels must start with the following layout */
|
||||
typedef struct PanelRec {
|
||||
WMFrame *frame;
|
||||
|
||||
char *sectionName; /* section name to display in titlebar */
|
||||
|
||||
CallbackRec callbacks;
|
||||
} PanelRec;
|
||||
|
||||
|
||||
void AddSection(Panel *panel, char *iconFile);
|
||||
|
||||
char *LocateImage(char *name);
|
||||
|
||||
WMWindow *GetWindow(Panel *panel);
|
||||
|
||||
/* manipulate the dictionary for the WindowMaker domain */
|
||||
|
||||
proplist_t GetObjectForKey(char *defaultName);
|
||||
|
||||
void SetObjectForKey(proplist_t object, char *defaultName);
|
||||
|
||||
void RemoveObjectForKey(char *defaultName);
|
||||
|
||||
char *GetStringForKey(char *defaultName);
|
||||
|
||||
int GetIntegerForKey(char *defaultName);
|
||||
|
||||
Bool GetBoolForKey(char *defaultName);
|
||||
|
||||
int GetSpeedForKey(char *defaultName);
|
||||
|
||||
void SetIntegerForKey(int value, char *defaultName);
|
||||
|
||||
void SetStringForKey(char *value, char *defaultName);
|
||||
|
||||
void SetBoolForKey(Bool value, char *defaultName);
|
||||
|
||||
void SetSpeedForKey(int speed, char *defaultName);
|
||||
|
||||
#define FRAME_TOP 105
|
||||
#define FRAME_LEFT -2
|
||||
#define FRAME_WIDTH 524
|
||||
#define FRAME_HEIGHT 235
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Needed for HAVE_LIBINTL_H
|
||||
*/
|
||||
#include "../src/config.h"
|
||||
|
||||
#if HAVE_LIBINTL_H && I18N
|
||||
# include <libintl.h>
|
||||
# define _(text) gettext(text)
|
||||
#else
|
||||
# define _(text) (text)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,237 @@
|
||||
/* XPM */
|
||||
static char * image_name[] = {
|
||||
"45 45 189 2",
|
||||
" c None",
|
||||
". c #186175D60000",
|
||||
"X c #000000000000",
|
||||
"o c #082004100820",
|
||||
"O c #082008200820",
|
||||
"+ c #4924A28930C2",
|
||||
"@ c #514451445144",
|
||||
"# c #492449244924",
|
||||
"$ c #49244D344924",
|
||||
"% c #208179E70820",
|
||||
"& c #104010401040",
|
||||
"* c #28A22CB228A2",
|
||||
"= c #38E338E338E3",
|
||||
"- c #28A228A228A2",
|
||||
"; c #30C22CB230C2",
|
||||
": c #186114511861",
|
||||
"> c #514455555965",
|
||||
", c #10400C301040",
|
||||
"< c #186118611861",
|
||||
"1 c #208120812081",
|
||||
"2 c #2081249228A2",
|
||||
"3 c #186171C60000",
|
||||
"4 c #28A282071040",
|
||||
"5 c #28A27DF70820",
|
||||
"6 c #28A2249228A2",
|
||||
"7 c #30C230C230C2",
|
||||
"8 c #410341034103",
|
||||
"9 c #30C292482081",
|
||||
"0 c #30C234D338E3",
|
||||
"q c #79E77DF78617",
|
||||
"w c #C71BC71BC71B",
|
||||
"e c #71C675D671C6",
|
||||
"r c #965892489658",
|
||||
"t c #FFFFFFFFFFFF",
|
||||
"y c #EFBEEFBEEFBE",
|
||||
"u c #5144AAAA38E3",
|
||||
"i c #A699FFFF8E38",
|
||||
"p c #596559656185",
|
||||
"a c #AEBA10401040",
|
||||
"s c #E79D14511861",
|
||||
"d c #208104100000",
|
||||
"f c #FFFF61856185",
|
||||
"g c #F7DE2CB22081",
|
||||
"h c #C71BAAAAA699",
|
||||
"j c #DF7D14511861",
|
||||
"k c #71C608200820",
|
||||
"l c #FFFF30C230C2",
|
||||
"z c #E79D20811861",
|
||||
"x c #79E714511861",
|
||||
"c c #28A204100000",
|
||||
"v c #EFBE18611861",
|
||||
"b c #79E70C300820",
|
||||
"n c #FFFFE38DE79D",
|
||||
"m c #FFFF28A228A2",
|
||||
"M c #E79D18611861",
|
||||
"N c #8E381C711861",
|
||||
"B c #596559655965",
|
||||
"V c #861749240820",
|
||||
"C c #D75C24921040",
|
||||
"Z c #B6DA10401040",
|
||||
"A c #B6DA14511040",
|
||||
"S c #10403CF30000",
|
||||
"D c #69A6C30B5144",
|
||||
"F c #CF3C96585144",
|
||||
"G c #EFBE38E328A2",
|
||||
"H c #BEFB18611861",
|
||||
"J c #410375D638E3",
|
||||
"K c #30C28E381861",
|
||||
"L c #38E33CF34103",
|
||||
"P c #A69910401040",
|
||||
"I c #8E380C300820",
|
||||
"U c #CF3C14511040",
|
||||
"Y c #FFFF59655965",
|
||||
"T c #D75C41034103",
|
||||
"R c #965820811861",
|
||||
"E c #DF7D20812081",
|
||||
"W c #596508200820",
|
||||
"Q c #38E304100820",
|
||||
"! c #FFFF34D338E3",
|
||||
"~ c #8E3838E338E3",
|
||||
"^ c #6185492428A2",
|
||||
"/ c #F7DE20812081",
|
||||
"( c #8E388A288E38",
|
||||
") c #30C204100000",
|
||||
"_ c #104000000000",
|
||||
"` c #FFFFD34CD75C",
|
||||
"' c #FFFF20812081",
|
||||
"] c #28A220812081",
|
||||
"[ c #69A6A2895965",
|
||||
"{ c #F7DE24922081",
|
||||
"} c #492414511040",
|
||||
"| c #AEBAAEBAAEBA",
|
||||
" . c #86170C300820",
|
||||
".. c #69A608200820",
|
||||
"X. c #104059650000",
|
||||
"o. c #FFFF8A288E38",
|
||||
"O. c #F7DE38E338E3",
|
||||
"+. c #9E79EFBE8617",
|
||||
"@. c #71C614511040",
|
||||
"#. c #861786178617",
|
||||
"$. c #965810401040",
|
||||
"%. c #208151441040",
|
||||
"&. c #FFFF45144103",
|
||||
"*. c #D75C34D338E3",
|
||||
"=. c #FFFF49244924",
|
||||
"-. c #9E791C712081",
|
||||
";. c #618565956185",
|
||||
":. c #492404100820",
|
||||
">. c #38E35D7528A2",
|
||||
",. c #C71BC30BC71B",
|
||||
"<. c #8617E38D69A6",
|
||||
"1. c #FFFF249228A2",
|
||||
"2. c #69A628A228A2",
|
||||
"3. c #FFFF65956185",
|
||||
"4. c #C71B20812081",
|
||||
"5. c #28A26DB60000",
|
||||
"6. c #FFFF18611861",
|
||||
"7. c #E79D1C711861",
|
||||
"8. c #30C2492428A2",
|
||||
"9. c #FFFFF3CEEFBE",
|
||||
"0. c #B6DAB6DAB6DA",
|
||||
"q. c #FFFFA2899E79",
|
||||
"w. c #E79D20812081",
|
||||
"e. c #51445D750820",
|
||||
"r. c #F7DE1C711861",
|
||||
"t. c #618549240820",
|
||||
"y. c #18616DB60000",
|
||||
"u. c #9E7941031040",
|
||||
"i. c #A69934D31040",
|
||||
"p. c #186120811040",
|
||||
"a. c #BEFBC71B69A6",
|
||||
"s. c #AEBA92485144",
|
||||
"d. c #D75C7DF74924",
|
||||
"f. c #CF3C618538E3",
|
||||
"g. c #AEBAF3CE8617",
|
||||
"h. c #104018610820",
|
||||
"j. c #F7DE1C712081",
|
||||
"k. c #18610C300820",
|
||||
"l. c #AEBAA289A699",
|
||||
"z. c #BEFB45144103",
|
||||
"x. c #618561856185",
|
||||
"c. c #104004100820",
|
||||
"v. c #EFBE28A228A2",
|
||||
"b. c #69A610401040",
|
||||
"n. c #79E718611861",
|
||||
"m. c #51442CB228A2",
|
||||
"M. c #79E779E779E7",
|
||||
"N. c #F7DE30C230C2",
|
||||
"B. c #F7DE18611861",
|
||||
"V. c #410304100820",
|
||||
"C. c #E79D34D330C2",
|
||||
"Z. c #C71B18611861",
|
||||
"A. c #F7DE28A22081",
|
||||
"S. c #DF7DA289A699",
|
||||
"D. c #F7DE28A228A2",
|
||||
"F. c #E79D30C230C2",
|
||||
"G. c #D75CD34CD75C",
|
||||
"H. c #EFBE41034103",
|
||||
"J. c #C71B14511040",
|
||||
"K. c #000014510000",
|
||||
"L. c #514408200820",
|
||||
"P. c #C71B59655965",
|
||||
"I. c #B6DA249228A2",
|
||||
"U. c #492410401040",
|
||||
"Y. c #208110401040",
|
||||
"T. c #082010400820",
|
||||
"R. c #FFFF7DF779E7",
|
||||
"E. c #618514511040",
|
||||
"W. c #AEBA45144103",
|
||||
"Q. c #000008200000",
|
||||
"!. c #DF7D2CB22081",
|
||||
"~. c #59655D755965",
|
||||
"^. c #71C671C671C6",
|
||||
"/. c #AEBAAAAAAEBA",
|
||||
"(. c #69A66DB671C6",
|
||||
"). c #28A282070820",
|
||||
"_. c #71C6CB2B5965",
|
||||
"`. c #A699FBEE8E38",
|
||||
"'. c #69A6C71B5144",
|
||||
"]. c #E79DE79DE79D",
|
||||
"[. c #FFFFFBEEFFFF",
|
||||
"{. c #BEFBBEFBBEFB",
|
||||
"}. c #8E388E389658",
|
||||
"|. c #A699A699A699",
|
||||
" X c #9E79A2899E79",
|
||||
".X c #DF7DDF7DDF7D",
|
||||
"XX c #F7DEF7DEF7DE",
|
||||
"oX c #861782078617",
|
||||
"OX c #71C6D34C5965",
|
||||
". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
|
||||
". . . . . . ",
|
||||
". . . . . . ",
|
||||
". . . . . . ",
|
||||
". . X o X O + @ # # # # # # $ % X X . . ",
|
||||
". . & * $ = - . X X X X X X X X . ; ; o . . ",
|
||||
". . : > - , X X . X X X X X X X X . X o O , X . . ",
|
||||
". . < 1 , X X X X . X X X X X X X X . X X X o X 2 . . ",
|
||||
". . . . . . . . 3 % 4 . . . . . . . . . . . . . . . . . . . . . % 5 . . . . . . . . . . . ",
|
||||
". % 2 X X X X X X X . X X X X X X X X . X 6 7 ; 7 ; = 8 9 0 0 0 0 . ",
|
||||
". < % X X X X X X X X . X X X X X X X X . X q w w w w w e % X X X X . ",
|
||||
". < 6 . X X X X X X X X . X X X X X X X X . X r t t t t t y u X X X X . ",
|
||||
". X o X . X X X X X X X X . X X X X X X X X . X r t t t t t t i p X X X . ",
|
||||
". O : X . X X X X a s d X . X X X X X X X X . X r t t t t t f g h : X X . ",
|
||||
". X < X X . X X X X s j k X . X X X X X X X X . X r t t t t t l z x > X X . ",
|
||||
". X O X X . X X X c v j b X . X X X X X X X X . X r t t t t n m M N B & X . ",
|
||||
". . . . . . . . . . . . V C Z A S . . . . . . . . . . . D i i i i F G A H J K . . . . . . ",
|
||||
". L X X X . X X X Z P I U X . X X X X X X X X . X r t t t t Y T R E 8 @ X . ",
|
||||
". : X X X . X X X j W Q v X . X X X X X X X X . X r t t t t ! ~ ^ / ; ( , . ",
|
||||
". X X X X . X X ) v _ X v Q . X X X X X X X X . X r t t t ` ' ] [ { } | : . ",
|
||||
". X X X X . X X .U X X j ..X.X X X X X X X X . X r t t t o.O., +.! @.#.: . ",
|
||||
". X X X X . X X U Z X X U $.%.; * ; * * ; ; - K ; | t t t &.*.; i =.-.;.< . ",
|
||||
". X X X X . X X v :.X X a H >.w ,.w w w w w w <.w y t t t 1.2.$ i 3.4.# : . ",
|
||||
". X X X ) 5.X ) 6.X X X ..7.8.t t t t t t t t i t ` 9.t ` 6., 0.i q.w.7 : . ",
|
||||
". . . . % . e.r.t.y.u.i.X . . 5.r.p.i i i i i i i i i a.{ s.+.d.f.X i i g.r.h.5 . . . . . ",
|
||||
". = X v v s _ U .X X X X j.k.t t t t t t t t i m ' s l.&.z.x.t i t ' c.X . ",
|
||||
". 6 W 6.Q 6...s c X X X X v.b.y t t t t t t t i 6.} 6.n.m m.M.t i t N...X . ",
|
||||
"r.B.6.6.6.6.V.X 7.v U X X X X X C.Z.6.1.m m m ' { { A.S.X D.v F.: G.t i t H.J.6.v v v v . ",
|
||||
"K.X X X X X X X u.v L.X X X X X P.v I.L.U.} } Y., & T.: ,.R.v E.7 t t i y W.v P L.Q Q Q Q.",
|
||||
". & , X . X X X X X X X r !., ~.t t t t t t i t t t ^.& /.t t i ,.: U X X X X X X.",
|
||||
". o < X . X X X X X X X r i 7 t t t t t t t i t t t t t t t t i (.X X X . ",
|
||||
". X X . X X X X X X X r i t t t t t t t t i t t t t t t t t D , X X X . ",
|
||||
". . . . 3 3 3 . . % ).).).).).)._.i i i i i i i i i i i i i i i i `.'.% . . . . . . . . . ",
|
||||
". X X X X . - r | | | | | ].i t t t t t t t t i t t t t t [.{.7 . X X X X . ",
|
||||
". X X X X . , $ w t t t t t i t t t t t t t t i t t t t t }.7 X . X X X X . ",
|
||||
". X X X X . X X 1 |.t t t t i t t t t t t t t i t t t ].}., X X . X X X X . ",
|
||||
". X X X X . X X X X 6 X.XXXi t t t t t t t t i XX.X X6 X X X X . X X X X . ",
|
||||
". X X X X . X X X X X X = oXOXw w t t t t w w OXoX= X X X X X X . X X X X . ",
|
||||
". X X X X . X X X X X X X X % 7 ; ;.;.;.;.; ; % X X X X X X X X . X X X X . ",
|
||||
". X X X X 3 X X X X X X X X . X X X X X X X X . X X X X X X X X . X X X X . ",
|
||||
". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
|
||||
". . . . . . ",
|
||||
". . . . . . ",
|
||||
". . . . . . ",
|
||||
". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "};
|
||||
@@ -0,0 +1,357 @@
|
||||
/* WindowHandling.c- options for handling windows
|
||||
*
|
||||
* WPrefs - WindowMaker 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"
|
||||
|
||||
typedef struct _Panel {
|
||||
WMFrame *frame;
|
||||
|
||||
char *sectionName;
|
||||
|
||||
CallbackRec callbacks;
|
||||
|
||||
WMWindow *win;
|
||||
|
||||
WMFrame *placF;
|
||||
WMPopUpButton *placP;
|
||||
WMLabel *porigL;
|
||||
WMLabel *porigvL;
|
||||
WMFrame *porigF;
|
||||
WMLabel *porigW;
|
||||
|
||||
WMSlider *vsli;
|
||||
WMSlider *hsli;
|
||||
|
||||
WMFrame *maxiF;
|
||||
WMButton *miconB;
|
||||
WMButton *mdockB;
|
||||
|
||||
WMFrame *opaqF;
|
||||
WMButton *opaqB;
|
||||
|
||||
WMFrame *tranF;
|
||||
WMButton *tranB;
|
||||
} _Panel;
|
||||
|
||||
|
||||
#define ICON_FILE "whandling"
|
||||
|
||||
#define OPAQUE_MOVE_PIXMAP "opaque"
|
||||
|
||||
#define NON_OPAQUE_MOVE_PIXMAP "nonopaque"
|
||||
|
||||
|
||||
#define THUMB_SIZE 16
|
||||
|
||||
|
||||
static char *placements[] = {
|
||||
"auto",
|
||||
"random",
|
||||
"manual",
|
||||
"cascade"
|
||||
};
|
||||
|
||||
|
||||
static void
|
||||
sliderCallback(WMWidget *w, void *data)
|
||||
{
|
||||
_Panel *panel = (_Panel*)data;
|
||||
int x, y, rx, ry;
|
||||
char buffer[64];
|
||||
int swidth = WMGetSliderMaxValue(panel->hsli);
|
||||
int sheight = WMGetSliderMaxValue(panel->vsli);
|
||||
|
||||
x = WMGetSliderValue(panel->hsli);
|
||||
y = WMGetSliderValue(panel->vsli);
|
||||
|
||||
rx = x*(WMWidgetWidth(panel->porigF)-3)/swidth+2;
|
||||
ry = y*(WMWidgetHeight(panel->porigF)-3)/sheight+2;
|
||||
WMMoveWidget(panel->porigW, rx, ry);
|
||||
|
||||
sprintf(buffer, "(%i,%i)", x, y);
|
||||
WMSetLabelText(panel->porigvL, buffer);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
getPlacement(char *str)
|
||||
{
|
||||
if (strcasecmp(str, "auto")==0 || strcasecmp(str, "smart")==0)
|
||||
return 0;
|
||||
else if (strcasecmp(str, "random")==0)
|
||||
return 3;
|
||||
else if (strcasecmp(str, "manual")==0)
|
||||
return 2;
|
||||
else if (strcasecmp(str, "cascade")==0)
|
||||
return 1;
|
||||
else
|
||||
wwarning(_("bad option value %s in WindowPlacement. Using default value"),
|
||||
str);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
showData(_Panel *panel)
|
||||
{
|
||||
char *str;
|
||||
proplist_t arr;
|
||||
int x, y;
|
||||
|
||||
str = GetStringForKey("WindowPlacement");
|
||||
|
||||
WMSetPopUpButtonSelectedItem(panel->placP, getPlacement(str));
|
||||
|
||||
arr = GetObjectForKey("WindowPlaceOrigin");
|
||||
|
||||
x = 0;
|
||||
y = 0;
|
||||
if (arr && (!PLIsArray(arr) || PLGetNumberOfElements(arr)!=2)) {
|
||||
wwarning(_("invalid data in option WindowPlaceOrigin. Using default (0,0)"));
|
||||
} else {
|
||||
if (arr) {
|
||||
x = atoi(PLGetString(PLGetArrayElement(arr, 0)));
|
||||
y = atoi(PLGetString(PLGetArrayElement(arr, 1)));
|
||||
}
|
||||
}
|
||||
|
||||
WMSetSliderValue(panel->hsli, x);
|
||||
WMSetSliderValue(panel->vsli, y);
|
||||
|
||||
sliderCallback(NULL, panel);
|
||||
|
||||
WMSetButtonSelected(panel->tranB, GetBoolForKey("OnTopTransients"));
|
||||
|
||||
WMSetButtonSelected(panel->opaqB, GetBoolForKey("OpaqueMove"));
|
||||
|
||||
WMSetButtonSelected(panel->miconB, GetBoolForKey("NoWindowOverIcons"));
|
||||
|
||||
WMSetButtonSelected(panel->mdockB, GetBoolForKey("NoWindowUnderDock"));
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
storeData(_Panel *panel)
|
||||
{
|
||||
proplist_t arr;
|
||||
char x[16], y[16];
|
||||
|
||||
SetBoolForKey(WMGetButtonSelected(panel->miconB), "NoWindowOverIcons");
|
||||
SetBoolForKey(WMGetButtonSelected(panel->mdockB), "NoWindowUnderDock");
|
||||
SetBoolForKey(WMGetButtonSelected(panel->opaqB), "OpaqueMove");
|
||||
SetBoolForKey(WMGetButtonSelected(panel->tranB), "OnTopTransients");
|
||||
SetStringForKey(placements[WMGetPopUpButtonSelectedItem(panel->placP)],
|
||||
"WindowPlacement");
|
||||
sprintf(x, "%i", WMGetSliderValue(panel->hsli));
|
||||
sprintf(y, "%i", WMGetSliderValue(panel->vsli));
|
||||
arr = PLMakeArrayFromElements(PLMakeString(x), PLMakeString(y), NULL);
|
||||
SetObjectForKey(arr, "WindowPlaceOrigin");
|
||||
PLRelease(arr);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
createPanel(Panel *p)
|
||||
{
|
||||
_Panel *panel = (Panel*)p;
|
||||
WMScreen *scr = WMWidgetScreen(panel->win);
|
||||
WMColor *color;
|
||||
WMPixmap *pixmap;
|
||||
int width, height;
|
||||
int swidth, sheight;
|
||||
char *path;
|
||||
|
||||
panel->frame = WMCreateFrame(panel->win);
|
||||
WMResizeWidget(panel->frame, FRAME_WIDTH, FRAME_HEIGHT);
|
||||
WMMoveWidget(panel->frame, FRAME_LEFT, FRAME_TOP);
|
||||
|
||||
/************** Window Placement ***************/
|
||||
panel->placF = WMCreateFrame(panel->frame);
|
||||
WMResizeWidget(panel->placF, 270, 150);
|
||||
WMMoveWidget(panel->placF, 20, 15);
|
||||
WMSetFrameTitle(panel->placF, _("Window Placement"));
|
||||
|
||||
panel->placP = WMCreatePopUpButton(panel->placF);
|
||||
WMResizeWidget(panel->placP, 195, 20);
|
||||
WMMoveWidget(panel->placP, 35, 20);
|
||||
WMAddPopUpButtonItem(panel->placP, _("Automatic"));
|
||||
WMAddPopUpButtonItem(panel->placP, _("Random"));
|
||||
WMAddPopUpButtonItem(panel->placP, _("Manual"));
|
||||
WMAddPopUpButtonItem(panel->placP, _("Cascade"));
|
||||
|
||||
panel->porigL = WMCreateLabel(panel->placF);
|
||||
WMResizeWidget(panel->porigL, 118, 32);
|
||||
WMMoveWidget(panel->porigL, 5, 60);
|
||||
WMSetLabelTextAlignment(panel->porigL, WACenter);
|
||||
WMSetLabelText(panel->porigL, _("Placement Origin"));
|
||||
|
||||
panel->porigvL = WMCreateLabel(panel->placF);
|
||||
WMResizeWidget(panel->porigvL, 70, 20);
|
||||
WMMoveWidget(panel->porigvL, 25, 95);
|
||||
WMSetLabelTextAlignment(panel->porigvL, WACenter);
|
||||
|
||||
color = WMCreateRGBColor(scr, 0x5100, 0x5100, 0x7100, True);
|
||||
panel->porigF = WMCreateFrame(panel->placF);
|
||||
WMSetWidgetBackgroundColor(panel->porigF, color);
|
||||
WMReleaseColor(color);
|
||||
WMSetFrameRelief(panel->porigF, WRSunken);
|
||||
|
||||
swidth = WidthOfScreen(DefaultScreenOfDisplay(WMScreenDisplay(scr)));
|
||||
sheight = HeightOfScreen(DefaultScreenOfDisplay(WMScreenDisplay(scr)));
|
||||
|
||||
if (120*sheight/swidth < 80*swidth/sheight) {
|
||||
width = 80*swidth/sheight;
|
||||
height = 80;
|
||||
} else {
|
||||
height = 120*sheight/swidth;
|
||||
width = 120;
|
||||
}
|
||||
WMResizeWidget(panel->porigF, width, height);
|
||||
WMMoveWidget(panel->porigF, 125+(120-width)/2, 45+(80-height)/2);
|
||||
|
||||
panel->porigW = WMCreateLabel(panel->porigF);
|
||||
WMResizeWidget(panel->porigW, THUMB_SIZE, THUMB_SIZE);
|
||||
WMMoveWidget(panel->porigW, 2, 2);
|
||||
WMSetLabelRelief(panel->porigW, WRRaised);
|
||||
|
||||
|
||||
panel->hsli = WMCreateSlider(panel->placF);
|
||||
WMResizeWidget(panel->hsli, width, 12);
|
||||
WMMoveWidget(panel->hsli, 125+(120-width)/2, 45+(80-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, 125+(120-width)/2+width+2, 45+(80-height)/2);
|
||||
WMSetSliderAction(panel->vsli, sliderCallback, panel);
|
||||
WMSetSliderMinValue(panel->vsli, 0);
|
||||
WMSetSliderMaxValue(panel->vsli, sheight);
|
||||
|
||||
WMMapSubwidgets(panel->porigF);
|
||||
|
||||
WMMapSubwidgets(panel->placF);
|
||||
|
||||
/************** Opaque Move ***************/
|
||||
panel->opaqF = WMCreateFrame(panel->frame);
|
||||
WMMoveWidget(panel->opaqF, 300, 15);
|
||||
WMResizeWidget(panel->opaqF, 205, 125);
|
||||
WMSetFrameTitle(panel->opaqF, _("Opaque Move"));
|
||||
|
||||
panel->opaqB = WMCreateButton(panel->opaqF, WBTToggle);
|
||||
WMResizeWidget(panel->opaqB, 64, 64);
|
||||
WMMoveWidget(panel->opaqB, 70, 35);
|
||||
WMSetButtonImagePosition(panel->opaqB, WIPImageOnly);
|
||||
|
||||
path = LocateImage(NON_OPAQUE_MOVE_PIXMAP);
|
||||
if (path) {
|
||||
pixmap = WMCreatePixmapFromFile(scr, path);
|
||||
if (pixmap) {
|
||||
WMSetButtonImage(panel->opaqB, pixmap);
|
||||
WMReleasePixmap(pixmap);
|
||||
} else {
|
||||
wwarning(_("could not load icon %s"), path);
|
||||
}
|
||||
free(path);
|
||||
}
|
||||
|
||||
path = LocateImage(OPAQUE_MOVE_PIXMAP);
|
||||
if (path) {
|
||||
pixmap = WMCreatePixmapFromFile(scr, path);
|
||||
if (pixmap) {
|
||||
WMSetButtonAltImage(panel->opaqB, pixmap);
|
||||
WMReleasePixmap(pixmap);
|
||||
} else {
|
||||
wwarning(_("could not load icon %s"), path);
|
||||
}
|
||||
free(path);
|
||||
}
|
||||
WMMapSubwidgets(panel->opaqF);
|
||||
|
||||
/**************** Account for Icon/Dock ***************/
|
||||
panel->maxiF = WMCreateFrame(panel->frame);
|
||||
WMResizeWidget(panel->maxiF, 205, 70);
|
||||
WMMoveWidget(panel->maxiF, 300, 145);
|
||||
WMSetFrameTitle(panel->maxiF, _("When maximizing..."));
|
||||
|
||||
panel->miconB = WMCreateSwitchButton(panel->maxiF);
|
||||
WMResizeWidget(panel->miconB, 185, 20);
|
||||
WMMoveWidget(panel->miconB, 10, 20);
|
||||
WMSetButtonText(panel->miconB, _("...do not resize over icons"));
|
||||
|
||||
panel->mdockB = WMCreateSwitchButton(panel->maxiF);
|
||||
WMResizeWidget(panel->mdockB, 185, 20);
|
||||
WMMoveWidget(panel->mdockB, 10, 40);
|
||||
WMSetButtonText(panel->mdockB, _("...do not resize over dock"));
|
||||
|
||||
WMMapSubwidgets(panel->maxiF);
|
||||
|
||||
/**************** Transients On Top ****************/
|
||||
|
||||
panel->tranF = WMCreateFrame(panel->frame);
|
||||
WMResizeWidget(panel->tranF, 270, 40);
|
||||
WMMoveWidget(panel->tranF, 20, 175);
|
||||
|
||||
panel->tranB = WMCreateSwitchButton(panel->tranF);
|
||||
WMMoveWidget(panel->tranB, 10, 10);
|
||||
WMResizeWidget(panel->tranB, 235, 20);
|
||||
WMSetButtonText(panel->tranB, _("Keep transients above their owners"));
|
||||
|
||||
WMMapSubwidgets(panel->tranF);
|
||||
|
||||
WMRealizeWidget(panel->frame);
|
||||
WMMapSubwidgets(panel->frame);
|
||||
|
||||
/* show the config data */
|
||||
showData(panel);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
undo(_Panel *panel)
|
||||
{
|
||||
showData(panel);
|
||||
}
|
||||
|
||||
|
||||
Panel*
|
||||
InitWindowHandling(WMScreen *scr, WMWindow *win)
|
||||
{
|
||||
_Panel *panel;
|
||||
|
||||
panel = wmalloc(sizeof(_Panel));
|
||||
memset(panel, 0, sizeof(_Panel));
|
||||
|
||||
panel->sectionName = _("Window Handling Preferences");
|
||||
|
||||
panel->win = win;
|
||||
|
||||
panel->callbacks.createWidgets = createPanel;
|
||||
panel->callbacks.updateDomain = storeData;
|
||||
panel->callbacks.undoChanges = undo;
|
||||
|
||||
AddSection(panel, ICON_FILE);
|
||||
|
||||
return panel;
|
||||
}
|
||||
@@ -0,0 +1,295 @@
|
||||
/* Workspace.c- workspace options
|
||||
*
|
||||
* WPrefs - WindowMaker 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"
|
||||
|
||||
|
||||
typedef struct _Panel {
|
||||
WMFrame *frame;
|
||||
|
||||
char *sectionName;
|
||||
|
||||
CallbackRec callbacks;
|
||||
|
||||
WMWindow *win;
|
||||
|
||||
WMFrame *navF;
|
||||
WMButton *linkB;
|
||||
WMButton *cyclB;
|
||||
WMButton *newB;
|
||||
WMLabel *linkL;
|
||||
WMLabel *cyclL;
|
||||
WMLabel *newL;
|
||||
|
||||
WMFrame *dockF;
|
||||
WMButton *dockB;
|
||||
WMButton *clipB;
|
||||
} _Panel;
|
||||
|
||||
|
||||
|
||||
#define ICON_FILE "workspace"
|
||||
|
||||
#define ARQUIVO_XIS "xis"
|
||||
#define DONT_LINK_FILE "dontlinkworkspaces"
|
||||
#define CYCLE_FILE "cycleworkspaces"
|
||||
#define ADVANCE_FILE "advancetonewworkspace"
|
||||
#define DOCK_FILE "dock"
|
||||
#define CLIP_FILE "clip"
|
||||
|
||||
|
||||
|
||||
static void
|
||||
createImages(WMScreen *scr, RContext *rc, RImage *xis, char *file,
|
||||
WMPixmap **icon1, WMPixmap **icon2)
|
||||
{
|
||||
RImage *icon;
|
||||
|
||||
*icon1 = WMCreatePixmapFromFile(scr, file);
|
||||
if (!*icon1) {
|
||||
wwarning(_("could not load icon %s"), file);
|
||||
*icon2 = NULL;
|
||||
return;
|
||||
}
|
||||
icon = RLoadImage(rc, file, 0);
|
||||
if (!icon) {
|
||||
wwarning(_("could not load icon %s"), file);
|
||||
*icon2 = NULL;
|
||||
return;
|
||||
}
|
||||
if (xis) {
|
||||
RCombineImages(icon, xis);
|
||||
if (!(*icon2 = WMCreatePixmapFromRImage(scr, icon, 127))) {
|
||||
wwarning(_("could not process icon %s:"), file, RErrorString);
|
||||
*icon2 = NULL;
|
||||
}
|
||||
}
|
||||
RDestroyImage(icon);
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void
|
||||
showData(_Panel *panel)
|
||||
{
|
||||
WMSetButtonSelected(panel->linkB, !GetBoolForKey("DontLinkWorkspaces"));
|
||||
|
||||
WMSetButtonSelected(panel->cyclB, GetBoolForKey("CycleWorkspaces"));
|
||||
|
||||
WMSetButtonSelected(panel->newB, GetBoolForKey("AdvanceToNewWorkspace"));
|
||||
|
||||
WMSetButtonSelected(panel->dockB, !GetBoolForKey("DisableDock"));
|
||||
|
||||
WMSetButtonSelected(panel->clipB, !GetBoolForKey("DisableClip"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void
|
||||
createPanel(Panel *p)
|
||||
{
|
||||
_Panel *panel = (_Panel*)p;
|
||||
WMScreen *scr = WMWidgetScreen(panel->win);
|
||||
WMPixmap *icon1, *icon2;
|
||||
RImage *xis = NULL;
|
||||
RContext *rc = WMScreenRContext(scr);
|
||||
char *path;
|
||||
|
||||
path = LocateImage(ARQUIVO_XIS);
|
||||
if (path) {
|
||||
xis = RLoadImage(rc, path, 0);
|
||||
if (!xis) {
|
||||
wwarning(_("could not load image file %s"), path);
|
||||
}
|
||||
free(path);
|
||||
}
|
||||
|
||||
panel->frame = WMCreateFrame(panel->win);
|
||||
WMResizeWidget(panel->frame, FRAME_WIDTH, FRAME_HEIGHT);
|
||||
WMMoveWidget(panel->frame, FRAME_LEFT, FRAME_TOP);
|
||||
|
||||
/***************** Workspace Navigation *****************/
|
||||
panel->navF = WMCreateFrame(panel->frame);
|
||||
WMResizeWidget(panel->navF, 365, 200);
|
||||
WMMoveWidget(panel->navF, 20, 15);
|
||||
WMSetFrameTitle(panel->navF, _("Workspace Navigation"));
|
||||
|
||||
panel->linkB = WMCreateButton(panel->navF, WBTToggle);
|
||||
WMResizeWidget(panel->linkB, 60, 60);
|
||||
WMMoveWidget(panel->linkB, 20, 25);
|
||||
WMSetButtonImagePosition(panel->linkB, WIPImageOnly);
|
||||
path = LocateImage(DONT_LINK_FILE);
|
||||
if (path) {
|
||||
createImages(scr, rc, xis, path, &icon1, &icon2);
|
||||
if (icon2) {
|
||||
WMSetButtonImage(panel->linkB, icon2);
|
||||
WMReleasePixmap(icon2);
|
||||
}
|
||||
if (icon1) {
|
||||
WMSetButtonAltImage(panel->linkB, icon1);
|
||||
WMReleasePixmap(icon1);
|
||||
}
|
||||
free(path);
|
||||
}
|
||||
panel->linkL = WMCreateLabel(panel->navF);
|
||||
WMResizeWidget(panel->linkL, 260, 38);
|
||||
WMMoveWidget(panel->linkL, 85, 25);
|
||||
WMSetLabelTextAlignment(panel->linkL, WALeft);
|
||||
WMSetLabelText(panel->linkL,
|
||||
_("drag windows between workspaces."));
|
||||
|
||||
|
||||
panel->cyclB = WMCreateButton(panel->navF, WBTToggle);
|
||||
WMResizeWidget(panel->cyclB, 60, 60);
|
||||
WMMoveWidget(panel->cyclB, 285, 75);
|
||||
WMSetButtonImagePosition(panel->cyclB, WIPImageOnly);
|
||||
path = LocateImage(CYCLE_FILE);
|
||||
if (path) {
|
||||
createImages(scr, rc, xis, path, &icon1, &icon2);
|
||||
if (icon2) {
|
||||
WMSetButtonImage(panel->cyclB, icon2);
|
||||
WMReleasePixmap(icon2);
|
||||
}
|
||||
if (icon1) {
|
||||
WMSetButtonAltImage(panel->cyclB, icon1);
|
||||
WMReleasePixmap(icon1);
|
||||
}
|
||||
free(path);
|
||||
}
|
||||
panel->cyclL = WMCreateLabel(panel->navF);
|
||||
WMResizeWidget(panel->cyclL, 260, 38);
|
||||
WMMoveWidget(panel->cyclL, 20, 85);
|
||||
WMSetLabelTextAlignment(panel->cyclL, WARight);
|
||||
WMSetLabelText(panel->cyclL,
|
||||
_("switch to first workspace when switching past the last workspace and vice-versa"));
|
||||
|
||||
panel->newB = WMCreateButton(panel->navF, WBTToggle);
|
||||
WMResizeWidget(panel->newB, 60, 60);
|
||||
WMMoveWidget(panel->newB, 20, 125);
|
||||
WMSetButtonImagePosition(panel->newB, WIPImageOnly);
|
||||
path = LocateImage(ADVANCE_FILE);
|
||||
if (path) {
|
||||
createImages(scr, rc, xis, path, &icon1, &icon2);
|
||||
if (icon2) {
|
||||
WMSetButtonImage(panel->newB, icon2);
|
||||
WMReleasePixmap(icon2);
|
||||
}
|
||||
if (icon1) {
|
||||
WMSetButtonAltImage(panel->newB, icon1);
|
||||
WMReleasePixmap(icon1);
|
||||
}
|
||||
free(path);
|
||||
}
|
||||
panel->newL = WMCreateLabel(panel->navF);
|
||||
WMResizeWidget(panel->newL, 260, 38);
|
||||
WMMoveWidget(panel->newL, 85, 140);
|
||||
WMSetLabelTextAlignment(panel->newL, WALeft);
|
||||
WMSetLabelText(panel->newL,
|
||||
_("create a new workspace when switching past the last workspace."));
|
||||
|
||||
WMMapSubwidgets(panel->navF);
|
||||
|
||||
/***************** Dock/Clip *****************/
|
||||
panel->dockF = WMCreateFrame(panel->frame);
|
||||
WMResizeWidget(panel->dockF, 105, 200);
|
||||
WMMoveWidget(panel->dockF, 400, 15);
|
||||
WMSetFrameTitle(panel->dockF, _("Dock/Clip"));
|
||||
|
||||
panel->dockB = WMCreateButton(panel->dockF, WBTToggle);
|
||||
WMResizeWidget(panel->dockB, 64, 64);
|
||||
WMMoveWidget(panel->dockB, 20, 30);
|
||||
WMSetButtonImagePosition(panel->dockB, WIPImageOnly);
|
||||
path = LocateImage(DOCK_FILE);
|
||||
if (path) {
|
||||
createImages(scr, rc, xis, path, &icon1, &icon2);
|
||||
if (icon2) {
|
||||
WMSetButtonImage(panel->dockB, icon2);
|
||||
WMReleasePixmap(icon2);
|
||||
}
|
||||
if (icon1) {
|
||||
WMSetButtonAltImage(panel->dockB, icon1);
|
||||
WMReleasePixmap(icon1);
|
||||
}
|
||||
free(path);
|
||||
}
|
||||
|
||||
panel->clipB = WMCreateButton(panel->dockF, WBTToggle);
|
||||
WMResizeWidget(panel->clipB, 64, 64);
|
||||
WMMoveWidget(panel->clipB, 20, 110);
|
||||
WMSetButtonImagePosition(panel->clipB, WIPImageOnly);
|
||||
path = LocateImage(CLIP_FILE);
|
||||
if (path) {
|
||||
createImages(scr, rc, xis, path, &icon1, &icon2);
|
||||
if (icon2) {
|
||||
WMSetButtonImage(panel->clipB, icon2);
|
||||
WMReleasePixmap(icon2);
|
||||
}
|
||||
if (icon1) {
|
||||
WMSetButtonAltImage(panel->clipB, icon1);
|
||||
WMReleasePixmap(icon1);
|
||||
}
|
||||
}
|
||||
WMMapSubwidgets(panel->dockF);
|
||||
|
||||
if (xis)
|
||||
RDestroyImage(xis);
|
||||
|
||||
WMRealizeWidget(panel->frame);
|
||||
WMMapSubwidgets(panel->frame);
|
||||
|
||||
showData(panel);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
storeData(_Panel *panel)
|
||||
{
|
||||
SetBoolForKey(!WMGetButtonSelected(panel->linkB), "DontLinkWorkspaces");
|
||||
SetBoolForKey(WMGetButtonSelected(panel->cyclB), "CycleWorkspaces");
|
||||
SetBoolForKey(WMGetButtonSelected(panel->newB), "AdvanceToNewWorkspace");
|
||||
|
||||
SetBoolForKey(!WMGetButtonSelected(panel->dockB), "DisableDock");
|
||||
SetBoolForKey(!WMGetButtonSelected(panel->clipB), "DisableClip");
|
||||
}
|
||||
|
||||
|
||||
|
||||
Panel*
|
||||
InitWorkspace(WMScreen *scr, WMWindow *win)
|
||||
{
|
||||
_Panel *panel;
|
||||
|
||||
panel = wmalloc(sizeof(_Panel));
|
||||
memset(panel, 0, sizeof(_Panel));
|
||||
|
||||
panel->sectionName = _("Workspace Preferences");
|
||||
|
||||
panel->win = win;
|
||||
|
||||
panel->callbacks.createWidgets = createPanel;
|
||||
panel->callbacks.updateDomain = storeData;
|
||||
|
||||
AddSection(panel, ICON_FILE);
|
||||
|
||||
return panel;
|
||||
}
|
||||
@@ -0,0 +1,200 @@
|
||||
|
||||
/*
|
||||
* Widget for testing double-clicks
|
||||
*
|
||||
*/
|
||||
|
||||
#include "WINGsP.h"
|
||||
|
||||
#include "double.h"
|
||||
|
||||
|
||||
typedef struct W_DoubleTest {
|
||||
W_Class widgetClass;
|
||||
WMView *view;
|
||||
|
||||
WMHandlerID timer;
|
||||
char on;
|
||||
char active;
|
||||
char *text;
|
||||
} _DoubleTest;
|
||||
|
||||
|
||||
|
||||
|
||||
/* some forward declarations */
|
||||
|
||||
static void destroyDoubleTest(_DoubleTest *dPtr);
|
||||
static void paintDoubleTest(_DoubleTest *dPtr);
|
||||
|
||||
|
||||
static void handleEvents(XEvent *event, void *data);
|
||||
static void handleActionEvents(XEvent *event, void *data);
|
||||
|
||||
|
||||
static W_ViewProcedureTable _DoubleTestViewProcedures = {
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
|
||||
/* our widget class ID */
|
||||
static W_Class DoubleTestClass = 0;
|
||||
|
||||
|
||||
/*
|
||||
* Initializer for our widget. Must be called before creating any
|
||||
* instances of the widget.
|
||||
*/
|
||||
W_Class
|
||||
InitDoubleTest(WMScreen *scr)
|
||||
{
|
||||
/* register our widget with WINGs and get our widget class ID */
|
||||
if (!DoubleTestClass) {
|
||||
DoubleTestClass = W_RegisterUserWidget(&_DoubleTestViewProcedures);
|
||||
}
|
||||
|
||||
return DoubleTestClass;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Our widget fabrication plant.
|
||||
*/
|
||||
DoubleTest*
|
||||
CreateDoubleTest(WMWidget *parent, char *text)
|
||||
{
|
||||
DoubleTest *dPtr;
|
||||
|
||||
if (!DoubleTestClass)
|
||||
InitDoubleTest(WMWidgetScreen(parent));
|
||||
|
||||
/* allocate some storage for our new widget instance */
|
||||
dPtr = wmalloc(sizeof(DoubleTest));
|
||||
/* initialize it */
|
||||
memset(dPtr, 0, sizeof(DoubleTest));
|
||||
|
||||
/* set the class ID */
|
||||
dPtr->widgetClass = DoubleTestClass;
|
||||
|
||||
dPtr->view = W_CreateView(W_VIEW(parent));
|
||||
if (!dPtr->view) {
|
||||
free(dPtr);
|
||||
return NULL;
|
||||
}
|
||||
/* always do this */
|
||||
dPtr->view->self = dPtr;
|
||||
|
||||
dPtr->text = wstrdup(text);
|
||||
|
||||
WMCreateEventHandler(dPtr->view, ExposureMask /* this allows us to know when we should paint */
|
||||
|StructureNotifyMask, /* this allows us to know things like when we are destroyed */
|
||||
handleEvents, dPtr);
|
||||
|
||||
WMCreateEventHandler(dPtr->view, ButtonPressMask,handleActionEvents, dPtr);
|
||||
|
||||
return dPtr;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void
|
||||
paintDoubleTest(_DoubleTest *dPtr)
|
||||
{
|
||||
W_Screen *scr = dPtr->view->screen;
|
||||
|
||||
if (dPtr->active) {
|
||||
XFillRectangle(scr->display, dPtr->view->window, W_GC(scr->white),
|
||||
0, 0, dPtr->view->size.width, dPtr->view->size.height);
|
||||
} else {
|
||||
XClearWindow(scr->display, dPtr->view->window);
|
||||
}
|
||||
|
||||
W_DrawRelief(scr, dPtr->view->window, 0, 0, dPtr->view->size.width,
|
||||
dPtr->view->size.height, dPtr->on ? WRSunken : WRRaised);
|
||||
|
||||
if (dPtr->text) {
|
||||
int y;
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void
|
||||
handleEvents(XEvent *event, void *data)
|
||||
{
|
||||
_DoubleTest *dPtr = (_DoubleTest*)data;
|
||||
|
||||
|
||||
switch (event->type) {
|
||||
case Expose:
|
||||
if (event->xexpose.count!=0)
|
||||
break;
|
||||
paintDoubleTest(dPtr);
|
||||
break;
|
||||
|
||||
case DestroyNotify:
|
||||
destroyDoubleTest(dPtr);
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
deactivate(void *data)
|
||||
{
|
||||
_DoubleTest *dPtr = (_DoubleTest*)data;
|
||||
|
||||
if (dPtr->active)
|
||||
dPtr->active = 0;
|
||||
paintDoubleTest(dPtr);
|
||||
|
||||
dPtr->timer = NULL;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
handleActionEvents(XEvent *event, void *data)
|
||||
{
|
||||
_DoubleTest *dPtr = (_DoubleTest*)data;
|
||||
extern _WINGsConfiguration WINGsConfiguration;
|
||||
|
||||
switch (event->type) {
|
||||
case ButtonPress:
|
||||
if (WMIsDoubleClick(event)) {
|
||||
if (dPtr->timer)
|
||||
WMDeleteTimerHandler(dPtr->timer);
|
||||
dPtr->timer = NULL;
|
||||
dPtr->on = !dPtr->on;
|
||||
dPtr->active = 0;
|
||||
paintDoubleTest(dPtr);
|
||||
} else {
|
||||
dPtr->timer=WMAddTimerHandler(WINGsConfiguration.doubleClickDelay,
|
||||
deactivate, dPtr);
|
||||
dPtr->active = 1;
|
||||
paintDoubleTest(dPtr);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void
|
||||
destroyDoubleTest(_DoubleTest *dPtr)
|
||||
{
|
||||
if (dPtr->timer)
|
||||
WMDeleteTimerHandler(dPtr->timer);
|
||||
if (dPtr->text)
|
||||
free(dPtr->text);
|
||||
|
||||
free(dPtr);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
|
||||
typedef struct W_DoubleTest DoubleTest;
|
||||
|
||||
|
||||
DoubleTest *CreateDoubleTest(WMWidget *parent, char *text);
|
||||
@@ -0,0 +1,135 @@
|
||||
/*
|
||||
* WPrefs - WindowMaker 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 <X11/Xlocale.h>
|
||||
|
||||
|
||||
extern void Initialize(WMScreen *scr);
|
||||
|
||||
|
||||
|
||||
void
|
||||
wAbort(Bool foo)
|
||||
{
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
static BOOL
|
||||
stringCompareHook(proplist_t pl1, proplist_t pl2)
|
||||
{
|
||||
char *str1, *str2;
|
||||
|
||||
str1 = PLGetString(pl1);
|
||||
str2 = PLGetString(pl2);
|
||||
|
||||
if (strcasecmp(str1, str2)==0)
|
||||
return YES;
|
||||
else
|
||||
return NO;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
print_help(char *progname)
|
||||
{
|
||||
printf(_("usage: %s [options]\n"), progname);
|
||||
puts(_("options:"));
|
||||
puts(_(" -display <display> display to be used"));
|
||||
puts(_(" -version print version number and exit"));
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
Display *dpy;
|
||||
WMScreen *scr;
|
||||
char *locale;
|
||||
int i;
|
||||
char *display_name="";
|
||||
|
||||
WMInitializeApplication("WPrefs", &argc, argv);
|
||||
|
||||
if (argc>1) {
|
||||
for (i=1; i<argc; i++) {
|
||||
if (strcmp(argv[i], "-version")==0) {
|
||||
printf("WPrefs %s\n", WVERSION);
|
||||
exit(0);
|
||||
} else if (strcmp(argv[i], "-display")==0) {
|
||||
i++;
|
||||
if (i>=argc) {
|
||||
wwarning(_("too few arguments for %s"), argv[i-1]);
|
||||
exit(0);
|
||||
}
|
||||
display_name = argv[i];
|
||||
} else {
|
||||
print_help(argv[0]);
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
locale = getenv("LANG");
|
||||
setlocale(LC_ALL, "");
|
||||
|
||||
#ifdef I18N
|
||||
if (getenv("NLSPATH"))
|
||||
bindtextdomain("WPrefs", getenv("NLSPATH"));
|
||||
else
|
||||
bindtextdomain("WPrefs", NLSDIR);
|
||||
textdomain("WPrefs");
|
||||
|
||||
if (!XSupportsLocale()) {
|
||||
wwarning(_("X server does not support locale"));
|
||||
}
|
||||
if (XSetLocaleModifiers("") == NULL) {
|
||||
wwarning(_("cannot set locale modifiers"));
|
||||
}
|
||||
#endif
|
||||
|
||||
dpy = XOpenDisplay(display_name);
|
||||
if (!dpy) {
|
||||
wfatal(_("could not open display %s"), XDisplayName(display_name));
|
||||
exit(0);
|
||||
}
|
||||
#if 0
|
||||
XSynchronize(dpy, 1);
|
||||
#endif
|
||||
scr = WMCreateScreen(dpy, DefaultScreen(dpy));
|
||||
if (!scr) {
|
||||
wfatal(_("could not initialize application"));
|
||||
exit(0);
|
||||
}
|
||||
|
||||
PLSetStringCmpHook(stringCompareHook);
|
||||
|
||||
Initialize(scr);
|
||||
|
||||
while (1) {
|
||||
XEvent event;
|
||||
|
||||
WMNextEvent(dpy, &event);
|
||||
WMHandleEvent(&event);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
nlsdir = @NLSDIR@
|
||||
|
||||
CATALOGS = @WPMOFILES@
|
||||
|
||||
CLEANFILES = $(CATALOGS)
|
||||
|
||||
EXTRA_DIST = pt.po hr.po fr.po ko.po cs.po
|
||||
|
||||
POTFILES = \
|
||||
$(top_builddir)/WPrefs/Configurations.c \
|
||||
$(top_builddir)/WPrefs/Expert.c \
|
||||
$(top_builddir)/WPrefs/Focus.c \
|
||||
$(top_builddir)/WPrefs/KeyboardSettings.c \
|
||||
$(top_builddir)/WPrefs/KeyboardShortcuts.c \
|
||||
$(top_builddir)/WPrefs/Menu.c \
|
||||
$(top_builddir)/WPrefs/MenuGuru.c \
|
||||
$(top_builddir)/WPrefs/MenuPreferences.c \
|
||||
$(top_builddir)/WPrefs/MouseSettings.c \
|
||||
$(top_builddir)/WPrefs/Paths.c \
|
||||
$(top_builddir)/WPrefs/Preferences.c \
|
||||
$(top_builddir)/WPrefs/Text.c \
|
||||
$(top_builddir)/WPrefs/TextureAndColor.c \
|
||||
$(top_builddir)/WPrefs/WPrefs.c \
|
||||
$(top_builddir)/WPrefs/WindowHandling.c \
|
||||
$(top_builddir)/WPrefs/Workspace.c \
|
||||
$(top_builddir)/WPrefs/main.c \
|
||||
$(top_builddir)/WPrefs/xmodifier.c
|
||||
|
||||
SUFFIXES = .po .mo
|
||||
|
||||
.po.mo:
|
||||
msgfmt -o $@ $<
|
||||
|
||||
|
||||
WPrefs.pot: $(POTFILES)
|
||||
xgettext --default-domain=WPrefs \
|
||||
--add-comments --keyword=_ $(POTFILES)
|
||||
if cmp -s WPrefs.po WPrefs.pot; then \
|
||||
rm -f WPrefs.po; \
|
||||
else \
|
||||
mv -f WPrefs.po WPrefs.pot; \
|
||||
fi
|
||||
|
||||
install-data-local: $(CATALOGS)
|
||||
$(mkinstalldirs) $(nlsdir)
|
||||
chmod 755 $(nlsdir)
|
||||
for n in $(CATALOGS) __DuMmY ; do \
|
||||
if test "$$n" -a "$$n" != "__DuMmY" ; then \
|
||||
l=`basename $$n .mo`; \
|
||||
$(mkinstalldirs) $(nlsdir)/$$l/LC_MESSAGES; \
|
||||
chmod 755 $(nlsdir)/$$l; \
|
||||
chmod 755 $(nlsdir)/$$l/LC_MESSAGES; \
|
||||
$(INSTALL) -m 644 $$n $(nlsdir)/$$l/LC_MESSAGES/WPrefs.mo; \
|
||||
fi; \
|
||||
done
|
||||
@@ -0,0 +1,238 @@
|
||||
# Makefile.in generated automatically by automake 1.3 from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
SHELL = /bin/sh
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DISTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
top_builddir = ../..
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
transform = @program_transform_name@
|
||||
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
CC = @CC@
|
||||
CPP_PATH = @CPP_PATH@
|
||||
DFLAGS = @DFLAGS@
|
||||
GFXFLAGS = @GFXFLAGS@
|
||||
GFXLIBS = @GFXLIBS@
|
||||
I18N = @I18N@
|
||||
I18N_MB = @I18N_MB@
|
||||
ICONEXT = @ICONEXT@
|
||||
INTLIBS = @INTLIBS@
|
||||
LIBPL_INC_PATH = @LIBPL_INC_PATH@
|
||||
LIBPL_LIBS = @LIBPL_LIBS@
|
||||
LN_S = @LN_S@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MOFILES = @MOFILES@
|
||||
NLSDIR = @NLSDIR@
|
||||
PACKAGE = @PACKAGE@
|
||||
RANLIB = @RANLIB@
|
||||
REDUCE_APPICONS = @REDUCE_APPICONS@
|
||||
SHAPE = @SHAPE@
|
||||
SOUND = @SOUND@
|
||||
VERSION = @VERSION@
|
||||
WPMOFILES = @WPMOFILES@
|
||||
XCFLAGS = @XCFLAGS@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
XLFLAGS = @XLFLAGS@
|
||||
XLIBS = @XLIBS@
|
||||
XSHM = @XSHM@
|
||||
X_EXTRA_LIBS = @X_EXTRA_LIBS@
|
||||
X_LOCALE = @X_LOCALE@
|
||||
pixmapdir = @pixmapdir@
|
||||
wprefsdir = @wprefsdir@
|
||||
|
||||
nlsdir = @NLSDIR@
|
||||
|
||||
CATALOGS = @WPMOFILES@
|
||||
|
||||
CLEANFILES = $(CATALOGS)
|
||||
|
||||
EXTRA_DIST = pt.po hr.po fr.po ko.po cs.po
|
||||
|
||||
POTFILES = \
|
||||
$(top_builddir)/WPrefs/Configurations.c \
|
||||
$(top_builddir)/WPrefs/Expert.c \
|
||||
$(top_builddir)/WPrefs/Focus.c \
|
||||
$(top_builddir)/WPrefs/KeyboardSettings.c \
|
||||
$(top_builddir)/WPrefs/KeyboardShortcuts.c \
|
||||
$(top_builddir)/WPrefs/Menu.c \
|
||||
$(top_builddir)/WPrefs/MenuGuru.c \
|
||||
$(top_builddir)/WPrefs/MenuPreferences.c \
|
||||
$(top_builddir)/WPrefs/MouseSettings.c \
|
||||
$(top_builddir)/WPrefs/Paths.c \
|
||||
$(top_builddir)/WPrefs/Preferences.c \
|
||||
$(top_builddir)/WPrefs/Text.c \
|
||||
$(top_builddir)/WPrefs/TextureAndColor.c \
|
||||
$(top_builddir)/WPrefs/WPrefs.c \
|
||||
$(top_builddir)/WPrefs/WindowHandling.c \
|
||||
$(top_builddir)/WPrefs/Workspace.c \
|
||||
$(top_builddir)/WPrefs/main.c \
|
||||
$(top_builddir)/WPrefs/xmodifier.c
|
||||
|
||||
SUFFIXES = .po .mo
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../../src/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
DIST_COMMON = README Makefile.am Makefile.in
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
GZIP = --best
|
||||
all: Makefile
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .mo .po
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps WPrefs.app/po/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
subdir = WPrefs.app/po
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file; \
|
||||
done
|
||||
info:
|
||||
dvi:
|
||||
check: all
|
||||
$(MAKE)
|
||||
installcheck:
|
||||
install-exec:
|
||||
@$(NORMAL_INSTALL)
|
||||
|
||||
install-data: install-data-local
|
||||
@$(NORMAL_INSTALL)
|
||||
|
||||
install: install-exec install-data all
|
||||
@:
|
||||
|
||||
uninstall:
|
||||
|
||||
install-strip:
|
||||
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
installdirs:
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(DISTCLEANFILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
||||
mostlyclean: mostlyclean-generic
|
||||
|
||||
clean: clean-generic mostlyclean
|
||||
|
||||
distclean: distclean-generic clean
|
||||
-rm -f config.status
|
||||
|
||||
maintainer-clean: maintainer-clean-generic distclean
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
.PHONY: tags distdir info dvi installcheck install-exec install-data \
|
||||
install uninstall all installdirs mostlyclean-generic distclean-generic \
|
||||
clean-generic maintainer-clean-generic clean mostlyclean distclean \
|
||||
maintainer-clean
|
||||
|
||||
|
||||
.po.mo:
|
||||
msgfmt -o $@ $<
|
||||
|
||||
WPrefs.pot: $(POTFILES)
|
||||
xgettext --default-domain=WPrefs \
|
||||
--add-comments --keyword=_ $(POTFILES)
|
||||
if cmp -s WPrefs.po WPrefs.pot; then \
|
||||
rm -f WPrefs.po; \
|
||||
else \
|
||||
mv -f WPrefs.po WPrefs.pot; \
|
||||
fi
|
||||
|
||||
install-data-local: $(CATALOGS)
|
||||
$(mkinstalldirs) $(nlsdir)
|
||||
chmod 755 $(nlsdir)
|
||||
for n in $(CATALOGS) __DuMmY ; do \
|
||||
if test "$$n" -a "$$n" != "__DuMmY" ; then \
|
||||
l=`basename $$n .mo`; \
|
||||
$(mkinstalldirs) $(nlsdir)/$$l/LC_MESSAGES; \
|
||||
chmod 755 $(nlsdir)/$$l; \
|
||||
chmod 755 $(nlsdir)/$$l/LC_MESSAGES; \
|
||||
$(INSTALL) -m 644 $$n $(nlsdir)/$$l/LC_MESSAGES/WPrefs.mo; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
Instructions for translating po files can be found in the po/README directory
|
||||
in the top of the WindowMaker source tree.
|
||||
|
||||
File Language Current Maintainer
|
||||
------------------------------------------------------------------------------
|
||||
pt.po Portuguese Alfredo K. Kojima <kojima@inf.ufrgs.br>
|
||||
hr.po Croatian Toni Biliæ <tbilic@oliver.efos.hr>
|
||||
fr.po French Bastien NOCERA <hadess@writeme.com>
|
||||
ko.po Korean Byeong-Chan, Kim <redhands@linux.sarang.net>
|
||||
cs.po Czech 3 David ©auer <xsauer@hwlab.felk.cvut.cz>
|
||||
+1251
File diff suppressed because it is too large
Load Diff
+1144
File diff suppressed because it is too large
Load Diff
+1184
File diff suppressed because it is too large
Load Diff
+1149
File diff suppressed because it is too large
Load Diff
+1150
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,62 @@
|
||||
tiffdatadir = $(wprefsdir)/tiff
|
||||
|
||||
tiffdata_DATA = \
|
||||
advancetonewworkspace.tiff \
|
||||
animations.tiff \
|
||||
appearance.tiff \
|
||||
clip.tiff \
|
||||
configs.tiff \
|
||||
cycleworkspaces.tiff \
|
||||
dock.tiff \
|
||||
dontlinkworkspaces.tiff \
|
||||
ergonomic.tiff \
|
||||
expert.tiff \
|
||||
fonts.tiff \
|
||||
iconprefs.tiff \
|
||||
keyboard.tiff \
|
||||
keyboardprefs.tiff \
|
||||
keyshortcuts.tiff \
|
||||
menualign1.tiff \
|
||||
menualign2.tiff \
|
||||
menuprefs.tiff \
|
||||
menus.tiff \
|
||||
minimouseleft.tiff \
|
||||
minimousemiddle.tiff \
|
||||
minimouseright.tiff \
|
||||
moreanim.tiff \
|
||||
mousesettings.tiff \
|
||||
mousespeed.tiff \
|
||||
newstyle.tiff \
|
||||
nonopaque.tiff \
|
||||
oldstyle.tiff \
|
||||
opaque.tiff \
|
||||
paths.tiff \
|
||||
sound.tiff \
|
||||
speed0.tiff \
|
||||
speed0s.tiff \
|
||||
speed1.tiff \
|
||||
speed1s.tiff \
|
||||
speed2.tiff \
|
||||
speed2s.tiff \
|
||||
speed3.tiff \
|
||||
speed3s.tiff \
|
||||
speed4.tiff \
|
||||
speed4s.tiff \
|
||||
timer0.tiff \
|
||||
timer0s.tiff \
|
||||
timer1.tiff \
|
||||
timer1s.tiff \
|
||||
timer2.tiff \
|
||||
timer2s.tiff \
|
||||
timer3.tiff \
|
||||
timer3s.tiff \
|
||||
timer4.tiff \
|
||||
timer4s.tiff \
|
||||
timer5.tiff \
|
||||
timer5s.tiff \
|
||||
whandling.tiff \
|
||||
windowfocus.tiff \
|
||||
workspace.tiff \
|
||||
xis.tiff
|
||||
|
||||
EXTRA_DIST = $(tiffdata_DATA)
|
||||
@@ -0,0 +1,267 @@
|
||||
# Makefile.in generated automatically by automake 1.3 from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
SHELL = /bin/sh
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DISTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
top_builddir = ../..
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
transform = @program_transform_name@
|
||||
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
CC = @CC@
|
||||
CPP_PATH = @CPP_PATH@
|
||||
DFLAGS = @DFLAGS@
|
||||
GFXFLAGS = @GFXFLAGS@
|
||||
GFXLIBS = @GFXLIBS@
|
||||
I18N = @I18N@
|
||||
I18N_MB = @I18N_MB@
|
||||
ICONEXT = @ICONEXT@
|
||||
INTLIBS = @INTLIBS@
|
||||
LIBPL_INC_PATH = @LIBPL_INC_PATH@
|
||||
LIBPL_LIBS = @LIBPL_LIBS@
|
||||
LN_S = @LN_S@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MOFILES = @MOFILES@
|
||||
NLSDIR = @NLSDIR@
|
||||
PACKAGE = @PACKAGE@
|
||||
RANLIB = @RANLIB@
|
||||
REDUCE_APPICONS = @REDUCE_APPICONS@
|
||||
SHAPE = @SHAPE@
|
||||
SOUND = @SOUND@
|
||||
VERSION = @VERSION@
|
||||
WPMOFILES = @WPMOFILES@
|
||||
XCFLAGS = @XCFLAGS@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
XLFLAGS = @XLFLAGS@
|
||||
XLIBS = @XLIBS@
|
||||
XSHM = @XSHM@
|
||||
X_EXTRA_LIBS = @X_EXTRA_LIBS@
|
||||
X_LOCALE = @X_LOCALE@
|
||||
pixmapdir = @pixmapdir@
|
||||
wprefsdir = @wprefsdir@
|
||||
|
||||
tiffdatadir = $(wprefsdir)/tiff
|
||||
|
||||
tiffdata_DATA = \
|
||||
advancetonewworkspace.tiff \
|
||||
animations.tiff \
|
||||
appearance.tiff \
|
||||
clip.tiff \
|
||||
configs.tiff \
|
||||
cycleworkspaces.tiff \
|
||||
dock.tiff \
|
||||
dontlinkworkspaces.tiff \
|
||||
ergonomic.tiff \
|
||||
expert.tiff \
|
||||
fonts.tiff \
|
||||
iconprefs.tiff \
|
||||
keyboard.tiff \
|
||||
keyboardprefs.tiff \
|
||||
keyshortcuts.tiff \
|
||||
menualign1.tiff \
|
||||
menualign2.tiff \
|
||||
menuprefs.tiff \
|
||||
menus.tiff \
|
||||
minimouseleft.tiff \
|
||||
minimousemiddle.tiff \
|
||||
minimouseright.tiff \
|
||||
moreanim.tiff \
|
||||
mousesettings.tiff \
|
||||
mousespeed.tiff \
|
||||
newstyle.tiff \
|
||||
nonopaque.tiff \
|
||||
oldstyle.tiff \
|
||||
opaque.tiff \
|
||||
paths.tiff \
|
||||
sound.tiff \
|
||||
speed0.tiff \
|
||||
speed0s.tiff \
|
||||
speed1.tiff \
|
||||
speed1s.tiff \
|
||||
speed2.tiff \
|
||||
speed2s.tiff \
|
||||
speed3.tiff \
|
||||
speed3s.tiff \
|
||||
speed4.tiff \
|
||||
speed4s.tiff \
|
||||
timer0.tiff \
|
||||
timer0s.tiff \
|
||||
timer1.tiff \
|
||||
timer1s.tiff \
|
||||
timer2.tiff \
|
||||
timer2s.tiff \
|
||||
timer3.tiff \
|
||||
timer3s.tiff \
|
||||
timer4.tiff \
|
||||
timer4s.tiff \
|
||||
timer5.tiff \
|
||||
timer5s.tiff \
|
||||
whandling.tiff \
|
||||
windowfocus.tiff \
|
||||
workspace.tiff \
|
||||
xis.tiff
|
||||
|
||||
EXTRA_DIST = $(tiffdata_DATA)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../../src/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
DATA = $(tiffdata_DATA)
|
||||
|
||||
DIST_COMMON = Makefile.am Makefile.in
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
GZIP = --best
|
||||
all: Makefile $(DATA)
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps WPrefs.app/tiff/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
|
||||
install-tiffdataDATA: $(tiffdata_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(tiffdatadir)
|
||||
@list='$(tiffdata_DATA)'; for p in $$list; do \
|
||||
if test -f $(srcdir)/$$p; then \
|
||||
echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(tiffdatadir)/$$p"; \
|
||||
$(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(tiffdatadir)/$$p; \
|
||||
else if test -f $$p; then \
|
||||
echo " $(INSTALL_DATA) $$p $(DESTDIR)$(tiffdatadir)/$$p"; \
|
||||
$(INSTALL_DATA) $$p $(DESTDIR)$(tiffdatadir)/$$p; \
|
||||
fi; fi; \
|
||||
done
|
||||
|
||||
uninstall-tiffdataDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
list='$(tiffdata_DATA)'; for p in $$list; do \
|
||||
rm -f $(DESTDIR)$(tiffdatadir)/$$p; \
|
||||
done
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
subdir = WPrefs.app/tiff
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file; \
|
||||
done
|
||||
info:
|
||||
dvi:
|
||||
check: all
|
||||
$(MAKE)
|
||||
installcheck:
|
||||
install-exec:
|
||||
@$(NORMAL_INSTALL)
|
||||
|
||||
install-data: install-tiffdataDATA
|
||||
@$(NORMAL_INSTALL)
|
||||
|
||||
install: install-exec install-data all
|
||||
@:
|
||||
|
||||
uninstall: uninstall-tiffdataDATA
|
||||
|
||||
install-strip:
|
||||
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DATADIR)$(tiffdatadir)
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(DISTCLEANFILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
||||
mostlyclean: mostlyclean-generic
|
||||
|
||||
clean: clean-generic mostlyclean
|
||||
|
||||
distclean: distclean-generic clean
|
||||
-rm -f config.status
|
||||
|
||||
maintainer-clean: maintainer-clean-generic distclean
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
.PHONY: uninstall-tiffdataDATA install-tiffdataDATA tags distdir info \
|
||||
dvi installcheck install-exec install-data install uninstall all \
|
||||
installdirs mostlyclean-generic distclean-generic clean-generic \
|
||||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,267 @@
|
||||
/* Grok X modifier mappings for shortcuts.
|
||||
|
||||
Most of this code was taken from src/event-Xt.c in XEmacs 20.3-b17.
|
||||
The copyright(s) from the original XEmacs code are included below.
|
||||
|
||||
Perpetrator: Sudish Joseph <sj@eng.mindspring.net>, Sept. 1997. */
|
||||
|
||||
/*
|
||||
* More changes for WPrefs by Alfredo Kojima, Aug 1998
|
||||
*/
|
||||
|
||||
/* The event_stream interface for X11 with Xt, and/or tty frames.
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995 Sun Microsystems, Inc.
|
||||
Copyright (C) 1996 Ben Wing.
|
||||
|
||||
This file is part of XEmacs.
|
||||
|
||||
XEmacs 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, or (at your option) any
|
||||
later version.
|
||||
|
||||
XEmacs 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 XEmacs; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <string.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/keysym.h>
|
||||
|
||||
#include "WUtil.h"
|
||||
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* keymap handling */
|
||||
/************************************************************************/
|
||||
|
||||
/* X bogusly doesn't define the interpretations of any bits besides
|
||||
ModControl, ModShift, and ModLock; so the Interclient Communication
|
||||
Conventions Manual says that we have to bend over backwards to figure
|
||||
out what the other modifier bits mean. According to ICCCM:
|
||||
|
||||
- Any keycode which is assigned ModControl is a "control" key.
|
||||
|
||||
- Any modifier bit which is assigned to a keycode which generates Meta_L
|
||||
or Meta_R is the modifier bit meaning "meta". Likewise for Super, Hyper,
|
||||
etc.
|
||||
|
||||
- Any keypress event which contains ModControl in its state should be
|
||||
interpreted as a "control" character.
|
||||
|
||||
- Any keypress event which contains a modifier bit in its state which is
|
||||
generated by a keycode whose corresponding keysym is Meta_L or Meta_R
|
||||
should be interpreted as a "meta" character. Likewise for Super, Hyper,
|
||||
etc.
|
||||
|
||||
- It is illegal for a keysym to be associated with more than one modifier
|
||||
bit.
|
||||
|
||||
This means that the only thing that emacs can reasonably interpret as a
|
||||
"meta" key is a key whose keysym is Meta_L or Meta_R, and which generates
|
||||
one of the modifier bits Mod1-Mod5.
|
||||
|
||||
Unfortunately, many keyboards don't have Meta keys in their default
|
||||
configuration. So, if there are no Meta keys, but there are "Alt" keys,
|
||||
emacs will interpret Alt as Meta. If there are both Meta and Alt keys,
|
||||
then the Meta keys mean "Meta", and the Alt keys mean "Alt" (it used to
|
||||
mean "Symbol," but that just confused the hell out of way too many people).
|
||||
|
||||
This works with the default configurations of the 19 keyboard-types I've
|
||||
checked.
|
||||
|
||||
Emacs detects keyboard configurations which violate the above rules, and
|
||||
prints an error message on the standard-error-output. (Perhaps it should
|
||||
use a pop-up-window instead.)
|
||||
*/
|
||||
|
||||
static int MetaIndex, HyperIndex, SuperIndex, AltIndex, ModeIndex;
|
||||
|
||||
static const char *
|
||||
index_to_name (int indice)
|
||||
{
|
||||
switch (indice)
|
||||
{
|
||||
case ShiftMapIndex: return "ModShift";
|
||||
case LockMapIndex: return "ModLock";
|
||||
case ControlMapIndex: return "ModControl";
|
||||
case Mod1MapIndex: return "Mod1";
|
||||
case Mod2MapIndex: return "Mod2";
|
||||
case Mod3MapIndex: return "Mod3";
|
||||
case Mod4MapIndex: return "Mod4";
|
||||
case Mod5MapIndex: return "Mod5";
|
||||
default: return "???";
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
x_reset_modifier_mapping (Display *display)
|
||||
{
|
||||
int modifier_index, modifier_key, column, mkpm;
|
||||
int warned_about_overlapping_modifiers = 0;
|
||||
int warned_about_predefined_modifiers = 0;
|
||||
int warned_about_duplicate_modifiers = 0;
|
||||
int meta_bit = 0;
|
||||
int hyper_bit = 0;
|
||||
int super_bit = 0;
|
||||
int alt_bit = 0;
|
||||
int mode_bit = 0;
|
||||
XModifierKeymap *x_modifier_keymap = XGetModifierMapping (display);
|
||||
|
||||
#define modwarn(name,old,other) \
|
||||
wwarning ("%s (0x%x) generates %s, which is generated by %s.\n\n", \
|
||||
name, code, index_to_name (old), other), \
|
||||
warned_about_overlapping_modifiers = 1
|
||||
|
||||
#define modbarf(name,other) \
|
||||
wwarning ("%s (0x%x) generates %s, which is nonsensical.\n\n", \
|
||||
name, code, other), \
|
||||
warned_about_predefined_modifiers = 1
|
||||
|
||||
#define check_modifier(name,mask) \
|
||||
if ((1<<modifier_index) != mask) \
|
||||
wwarning ("%s (0x%x) generates %s, which is nonsensical.\n\n", \
|
||||
name, code, index_to_name (modifier_index)), \
|
||||
warned_about_predefined_modifiers = 1
|
||||
|
||||
#define store_modifier(name,old) \
|
||||
if (old && old != modifier_index) \
|
||||
wwarning ("%s (0x%x) generates both %s and %s, which is nonsensical.\n\n",\
|
||||
name, code, index_to_name (old), \
|
||||
index_to_name (modifier_index)), \
|
||||
warned_about_duplicate_modifiers = 1; \
|
||||
if (modifier_index == ShiftMapIndex) modbarf (name,"ModShift"); \
|
||||
else if (modifier_index == LockMapIndex) modbarf (name,"ModLock"); \
|
||||
else if (modifier_index == ControlMapIndex) modbarf (name,"ModControl"); \
|
||||
else if (sym == XK_Mode_switch) \
|
||||
mode_bit = modifier_index; /* Mode_switch is special, see below... */ \
|
||||
else if (modifier_index == meta_bit && old != meta_bit) \
|
||||
modwarn (name, meta_bit, "Meta"); \
|
||||
else if (modifier_index == super_bit && old != super_bit) \
|
||||
modwarn (name, super_bit, "Super"); \
|
||||
else if (modifier_index == hyper_bit && old != hyper_bit) \
|
||||
modwarn (name, hyper_bit, "Hyper"); \
|
||||
else if (modifier_index == alt_bit && old != alt_bit) \
|
||||
modwarn (name, alt_bit, "Alt"); \
|
||||
else \
|
||||
old = modifier_index;
|
||||
|
||||
mkpm = x_modifier_keymap->max_keypermod;
|
||||
for (modifier_index = 0; modifier_index < 8; modifier_index++)
|
||||
for (modifier_key = 0; modifier_key < mkpm; modifier_key++) {
|
||||
KeySym last_sym = 0;
|
||||
for (column = 0; column < 4; column += 2) {
|
||||
KeyCode code = x_modifier_keymap->modifiermap[modifier_index * mkpm
|
||||
+ modifier_key];
|
||||
KeySym sym = (code ? XKeycodeToKeysym (display, code, column) : 0);
|
||||
if (sym == last_sym) continue;
|
||||
last_sym = sym;
|
||||
switch (sym) {
|
||||
case XK_Mode_switch:store_modifier ("Mode_switch", mode_bit); break;
|
||||
case XK_Meta_L: store_modifier ("Meta_L", meta_bit); break;
|
||||
case XK_Meta_R: store_modifier ("Meta_R", meta_bit); break;
|
||||
case XK_Super_L: store_modifier ("Super_L", super_bit); break;
|
||||
case XK_Super_R: store_modifier ("Super_R", super_bit); break;
|
||||
case XK_Hyper_L: store_modifier ("Hyper_L", hyper_bit); break;
|
||||
case XK_Hyper_R: store_modifier ("Hyper_R", hyper_bit); break;
|
||||
case XK_Alt_L: store_modifier ("Alt_L", alt_bit); break;
|
||||
case XK_Alt_R: store_modifier ("Alt_R", alt_bit); break;
|
||||
case XK_Control_L: check_modifier ("Control_L", ControlMask); break;
|
||||
case XK_Control_R: check_modifier ("Control_R", ControlMask); break;
|
||||
case XK_Shift_L: check_modifier ("Shift_L", ShiftMask); break;
|
||||
case XK_Shift_R: check_modifier ("Shift_R", ShiftMask); break;
|
||||
case XK_Shift_Lock: check_modifier ("Shift_Lock", LockMask); break;
|
||||
case XK_Caps_Lock: check_modifier ("Caps_Lock", LockMask); break;
|
||||
|
||||
/* It probably doesn't make any sense for a modifier bit to be
|
||||
assigned to a key that is not one of the above, but OpenWindows
|
||||
assigns modifier bits to a couple of random function keys for
|
||||
no reason that I can discern, so printing a warning here would
|
||||
be annoying. */
|
||||
}
|
||||
}
|
||||
}
|
||||
#undef store_modifier
|
||||
#undef check_modifier
|
||||
#undef modwarn
|
||||
#undef modbarf
|
||||
|
||||
/* If there was no Meta key, then try using the Alt key instead.
|
||||
If there is both a Meta key and an Alt key, then the Alt key
|
||||
is not disturbed and remains an Alt key. */
|
||||
if (! meta_bit && alt_bit)
|
||||
meta_bit = alt_bit, alt_bit = 0;
|
||||
|
||||
/* mode_bit overrides everything, since it's processed down inside of
|
||||
XLookupString() instead of by us. If Meta and Mode_switch both
|
||||
generate the same modifier bit (which is an error), then we don't
|
||||
interpret that bit as Meta, because we can't make XLookupString()
|
||||
not interpret it as Mode_switch; and interpreting it as both would
|
||||
be totally wrong. */
|
||||
if (mode_bit)
|
||||
{
|
||||
const char *warn = 0;
|
||||
if (mode_bit == meta_bit) warn = "Meta", meta_bit = 0;
|
||||
else if (mode_bit == hyper_bit) warn = "Hyper", hyper_bit = 0;
|
||||
else if (mode_bit == super_bit) warn = "Super", super_bit = 0;
|
||||
else if (mode_bit == alt_bit) warn = "Alt", alt_bit = 0;
|
||||
if (warn)
|
||||
{
|
||||
wwarning
|
||||
("%s is being used for both Mode_switch and %s.\n\n",
|
||||
index_to_name (mode_bit), warn),
|
||||
warned_about_overlapping_modifiers = 1;
|
||||
}
|
||||
}
|
||||
|
||||
MetaIndex = meta_bit;
|
||||
HyperIndex = hyper_bit;
|
||||
SuperIndex = super_bit;
|
||||
AltIndex = alt_bit;
|
||||
ModeIndex = mode_bit;
|
||||
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
ModifierFromKey(Display *dpy, char *key)
|
||||
{
|
||||
static int eqw = 0;
|
||||
|
||||
if (!eqw)
|
||||
x_reset_modifier_mapping(dpy);
|
||||
eqw = 1;
|
||||
|
||||
if (strcasecmp(key, "SHIFT")==0)
|
||||
return ShiftMapIndex;
|
||||
else if (strcasecmp(key, "CONTROL")==0)
|
||||
return ControlMapIndex;
|
||||
else if (strcasecmp(key, "ALT")==0)
|
||||
return AltIndex;
|
||||
else if (strcasecmp(key, "META")==0)
|
||||
return MetaIndex;
|
||||
else if (strcasecmp(key, "SUPER")==0)
|
||||
return SuperIndex;
|
||||
else if (strcasecmp(key, "HYPER")==0)
|
||||
return HyperIndex;
|
||||
else if (strcasecmp(key, "MOD1")==0)
|
||||
return Mod1MapIndex;
|
||||
else if (strcasecmp(key, "MOD2")==0)
|
||||
return Mod2MapIndex;
|
||||
else if (strcasecmp(key, "MOD3")==0)
|
||||
return Mod3MapIndex;
|
||||
else if (strcasecmp(key, "MOD4")==0)
|
||||
return Mod4MapIndex;
|
||||
else if (strcasecmp(key, "MOD5")==0)
|
||||
return Mod5MapIndex;
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
xpmdatadir = $(wprefsdir)/xpm
|
||||
|
||||
xpmdata_DATA = \
|
||||
advancetonewworkspace.xpm \
|
||||
animations.xpm \
|
||||
appearance.xpm \
|
||||
clip.xpm \
|
||||
configs.xpm \
|
||||
cycleworkspaces.xpm \
|
||||
dock.xpm \
|
||||
dontlinkworkspaces.xpm \
|
||||
ergonomic.xpm \
|
||||
expert.xpm \
|
||||
fonts.xpm \
|
||||
iconprefs.xpm \
|
||||
keyboard.xpm \
|
||||
keyboardprefs.xpm \
|
||||
keyshortcuts.xpm \
|
||||
menualign1.xpm \
|
||||
menualign2.xpm \
|
||||
menuprefs.xpm \
|
||||
menus.xpm \
|
||||
minimouseleft.xpm \
|
||||
minimousemiddle.xpm \
|
||||
minimouseright.xpm \
|
||||
moreanim.xpm \
|
||||
mousesettings.xpm \
|
||||
mousespeed.xpm \
|
||||
newstyle.xpm \
|
||||
nonopaque.xpm \
|
||||
oldstyle.xpm \
|
||||
opaque.xpm \
|
||||
paths.xpm \
|
||||
sound.xpm \
|
||||
speed0.xpm \
|
||||
speed0s.xpm \
|
||||
speed1.xpm \
|
||||
speed1s.xpm \
|
||||
speed2.xpm \
|
||||
speed2s.xpm \
|
||||
speed3.xpm \
|
||||
speed3s.xpm \
|
||||
speed4.xpm \
|
||||
speed4s.xpm \
|
||||
timer0.xpm \
|
||||
timer0s.xpm \
|
||||
timer1.xpm \
|
||||
timer1s.xpm \
|
||||
timer2.xpm \
|
||||
timer2s.xpm \
|
||||
timer3.xpm \
|
||||
timer3s.xpm \
|
||||
timer4.xpm \
|
||||
timer4s.xpm \
|
||||
timer5.xpm \
|
||||
timer5s.xpm \
|
||||
whandling.xpm \
|
||||
windowfocus.xpm \
|
||||
workspace.xpm \
|
||||
xis.xpm
|
||||
|
||||
EXTRA_DIST = $(xpmdata_DATA)
|
||||
@@ -0,0 +1,267 @@
|
||||
# Makefile.in generated automatically by automake 1.3 from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
SHELL = /bin/sh
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DISTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
top_builddir = ../..
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
transform = @program_transform_name@
|
||||
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
CC = @CC@
|
||||
CPP_PATH = @CPP_PATH@
|
||||
DFLAGS = @DFLAGS@
|
||||
GFXFLAGS = @GFXFLAGS@
|
||||
GFXLIBS = @GFXLIBS@
|
||||
I18N = @I18N@
|
||||
I18N_MB = @I18N_MB@
|
||||
ICONEXT = @ICONEXT@
|
||||
INTLIBS = @INTLIBS@
|
||||
LIBPL_INC_PATH = @LIBPL_INC_PATH@
|
||||
LIBPL_LIBS = @LIBPL_LIBS@
|
||||
LN_S = @LN_S@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MOFILES = @MOFILES@
|
||||
NLSDIR = @NLSDIR@
|
||||
PACKAGE = @PACKAGE@
|
||||
RANLIB = @RANLIB@
|
||||
REDUCE_APPICONS = @REDUCE_APPICONS@
|
||||
SHAPE = @SHAPE@
|
||||
SOUND = @SOUND@
|
||||
VERSION = @VERSION@
|
||||
WPMOFILES = @WPMOFILES@
|
||||
XCFLAGS = @XCFLAGS@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
XLFLAGS = @XLFLAGS@
|
||||
XLIBS = @XLIBS@
|
||||
XSHM = @XSHM@
|
||||
X_EXTRA_LIBS = @X_EXTRA_LIBS@
|
||||
X_LOCALE = @X_LOCALE@
|
||||
pixmapdir = @pixmapdir@
|
||||
wprefsdir = @wprefsdir@
|
||||
|
||||
xpmdatadir = $(wprefsdir)/xpm
|
||||
|
||||
xpmdata_DATA = \
|
||||
advancetonewworkspace.xpm \
|
||||
animations.xpm \
|
||||
appearance.xpm \
|
||||
clip.xpm \
|
||||
configs.xpm \
|
||||
cycleworkspaces.xpm \
|
||||
dock.xpm \
|
||||
dontlinkworkspaces.xpm \
|
||||
ergonomic.xpm \
|
||||
expert.xpm \
|
||||
fonts.xpm \
|
||||
iconprefs.xpm \
|
||||
keyboard.xpm \
|
||||
keyboardprefs.xpm \
|
||||
keyshortcuts.xpm \
|
||||
menualign1.xpm \
|
||||
menualign2.xpm \
|
||||
menuprefs.xpm \
|
||||
menus.xpm \
|
||||
minimouseleft.xpm \
|
||||
minimousemiddle.xpm \
|
||||
minimouseright.xpm \
|
||||
moreanim.xpm \
|
||||
mousesettings.xpm \
|
||||
mousespeed.xpm \
|
||||
newstyle.xpm \
|
||||
nonopaque.xpm \
|
||||
oldstyle.xpm \
|
||||
opaque.xpm \
|
||||
paths.xpm \
|
||||
sound.xpm \
|
||||
speed0.xpm \
|
||||
speed0s.xpm \
|
||||
speed1.xpm \
|
||||
speed1s.xpm \
|
||||
speed2.xpm \
|
||||
speed2s.xpm \
|
||||
speed3.xpm \
|
||||
speed3s.xpm \
|
||||
speed4.xpm \
|
||||
speed4s.xpm \
|
||||
timer0.xpm \
|
||||
timer0s.xpm \
|
||||
timer1.xpm \
|
||||
timer1s.xpm \
|
||||
timer2.xpm \
|
||||
timer2s.xpm \
|
||||
timer3.xpm \
|
||||
timer3s.xpm \
|
||||
timer4.xpm \
|
||||
timer4s.xpm \
|
||||
timer5.xpm \
|
||||
timer5s.xpm \
|
||||
whandling.xpm \
|
||||
windowfocus.xpm \
|
||||
workspace.xpm \
|
||||
xis.xpm
|
||||
|
||||
EXTRA_DIST = $(xpmdata_DATA)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../../src/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
DATA = $(xpmdata_DATA)
|
||||
|
||||
DIST_COMMON = Makefile.am Makefile.in
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
GZIP = --best
|
||||
all: Makefile $(DATA)
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps WPrefs.app/xpm/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
|
||||
install-xpmdataDATA: $(xpmdata_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(xpmdatadir)
|
||||
@list='$(xpmdata_DATA)'; for p in $$list; do \
|
||||
if test -f $(srcdir)/$$p; then \
|
||||
echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(xpmdatadir)/$$p"; \
|
||||
$(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(xpmdatadir)/$$p; \
|
||||
else if test -f $$p; then \
|
||||
echo " $(INSTALL_DATA) $$p $(DESTDIR)$(xpmdatadir)/$$p"; \
|
||||
$(INSTALL_DATA) $$p $(DESTDIR)$(xpmdatadir)/$$p; \
|
||||
fi; fi; \
|
||||
done
|
||||
|
||||
uninstall-xpmdataDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
list='$(xpmdata_DATA)'; for p in $$list; do \
|
||||
rm -f $(DESTDIR)$(xpmdatadir)/$$p; \
|
||||
done
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
subdir = WPrefs.app/xpm
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file; \
|
||||
done
|
||||
info:
|
||||
dvi:
|
||||
check: all
|
||||
$(MAKE)
|
||||
installcheck:
|
||||
install-exec:
|
||||
@$(NORMAL_INSTALL)
|
||||
|
||||
install-data: install-xpmdataDATA
|
||||
@$(NORMAL_INSTALL)
|
||||
|
||||
install: install-exec install-data all
|
||||
@:
|
||||
|
||||
uninstall: uninstall-xpmdataDATA
|
||||
|
||||
install-strip:
|
||||
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DATADIR)$(xpmdatadir)
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(DISTCLEANFILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
||||
mostlyclean: mostlyclean-generic
|
||||
|
||||
clean: clean-generic mostlyclean
|
||||
|
||||
distclean: distclean-generic clean
|
||||
-rm -f config.status
|
||||
|
||||
maintainer-clean: maintainer-clean-generic distclean
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
.PHONY: uninstall-xpmdataDATA install-xpmdataDATA tags distdir info dvi \
|
||||
installcheck install-exec install-data install uninstall all \
|
||||
installdirs mostlyclean-generic distclean-generic clean-generic \
|
||||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
@@ -0,0 +1,98 @@
|
||||
/* XPM */
|
||||
static char * image_name[] = {
|
||||
"48 48 47 1",
|
||||
" c None",
|
||||
". c #000000000000",
|
||||
"X c #082082079658",
|
||||
"o c #10407DF7AEBA",
|
||||
"O c #00007DF79E79",
|
||||
"+ c #186179E7A699",
|
||||
"@ c #08207DF7A699",
|
||||
"# c #10408207AEBA",
|
||||
"$ c #10408207A699",
|
||||
"% c #10407DF79E79",
|
||||
"& c #18618617A699",
|
||||
"* c #104079E79E79",
|
||||
"= c #B6DAB6DAB6DA",
|
||||
"- c #71C671C671C6",
|
||||
"; c #38E338E338E3",
|
||||
": c #082000009E79",
|
||||
"> c #082082079E79",
|
||||
", c #08208207A699",
|
||||
"< c #08208207AEBA",
|
||||
"1 c #08208617A699",
|
||||
"2 c #104079E7AEBA",
|
||||
"3 c #FFFFFFFFFFFF",
|
||||
"4 c #104075D6A699",
|
||||
"5 c #00008207A699",
|
||||
"6 c #A699A699A699",
|
||||
"7 c #79E77DF779E7",
|
||||
"8 c #10408617A699",
|
||||
"9 c #186175D6A699",
|
||||
"0 c #18618A289658",
|
||||
"q c #082079E7AEBA",
|
||||
"w c #186179E79E79",
|
||||
"e c #30C230C230C2",
|
||||
"r c #18618A289E79",
|
||||
"t c #18617DF79E79",
|
||||
"y c #08207DF7AEBA",
|
||||
"u c #10407DF79658",
|
||||
"i c #08208617AEBA",
|
||||
"p c #104079E79658",
|
||||
"a c #082079E7A699",
|
||||
"s c #082079E79E79",
|
||||
"d c #10408A28A699",
|
||||
"f c #104079E7A699",
|
||||
"g c #00007DF7A699",
|
||||
"h c #08207DF79E79",
|
||||
"j c #000086179E79",
|
||||
"k c #10407DF7A699",
|
||||
"l c #104082079E79",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ............... ............... ",
|
||||
" .XoO+o@#$%&*=-.; ",
|
||||
" .$:::::>,<1%=-.; . .$:::::>,<1%=-.; ",
|
||||
" .233333145%,67.; .. ",
|
||||
" .833333@#90&67.; . . ..... .833333@#90&67.; ",
|
||||
" .q333:::::,@=-.; . . ...... ",
|
||||
" .weee33333%1=-.; . . ....... .weee33333%1=-.; ",
|
||||
" .1%,r33333t267.; . . ...... ",
|
||||
" .*yu@33333ip67.; . . ..... .*yu@33333ip67.; ",
|
||||
" .$a*ueeeeeas=-.; .. ",
|
||||
" .=-df$4ug,*q=-.; . .=-df$4ug,*q=-.; ",
|
||||
" .eehja*fjg<kl4.; ",
|
||||
" ...............; ...............; ",
|
||||
" ;;;;;;;;;;;;;;; ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" "};
|
||||
@@ -0,0 +1,118 @@
|
||||
/* XPM */
|
||||
static char * image_name[] = {
|
||||
"48 48 67 1",
|
||||
" c None",
|
||||
". c #FFFFEFBE69A6",
|
||||
"X c #FFFFFBEEB6DA",
|
||||
"o c #082004100820",
|
||||
"O c #082008200820",
|
||||
"+ c #410345144103",
|
||||
"@ c #410345144924",
|
||||
"# c #38E33CF34103",
|
||||
"$ c #410341034103",
|
||||
"% c #000000000000",
|
||||
"& c #28A228A228A2",
|
||||
"* c #49244D345144",
|
||||
"= c #208120812081",
|
||||
"- c #8E38861738E3",
|
||||
"; c #FFFFF7DEA699",
|
||||
": c #FFFFFFFFFFFF",
|
||||
"> c #20811C712081",
|
||||
", c #30C230C230C2",
|
||||
"< c #000004100000",
|
||||
"1 c #30C22CB21040",
|
||||
"2 c #4924492430C2",
|
||||
"3 c #9E7996584924",
|
||||
"4 c #186118611861",
|
||||
"5 c #30C22CB230C2",
|
||||
"6 c #38E334D338E3",
|
||||
"7 c #79E775D630C2",
|
||||
"8 c #208124922081",
|
||||
"9 c #A699A289A699",
|
||||
"0 c #BEFBC30BBEFB",
|
||||
"q c #BEFBBEFBBEFB",
|
||||
"w c #492449244924",
|
||||
"e c #CF3CCF3CCF3C",
|
||||
"r c #DF7DDF7DDF7D",
|
||||
"t c #D75CD75CD75C",
|
||||
"y c #10400C301040",
|
||||
"u c #FFFFFBEEFFFF",
|
||||
"i c #79E779E779E7",
|
||||
"p c #104010401040",
|
||||
"a c #F7DEF3CEF7DE",
|
||||
"s c #38E338E338E3",
|
||||
"d c #79E77DF779E7",
|
||||
"f c #B6DAB6DAB6DA",
|
||||
"g c #186114511861",
|
||||
"h c #CF3CCB2BCF3C",
|
||||
"j c #A69996584924",
|
||||
"k c #9E799E799E79",
|
||||
"l c #9E799A699E79",
|
||||
"z c #EFBEF3CEEFBE",
|
||||
"x c #49244D344924",
|
||||
"c c #514451445144",
|
||||
"v c #69A669A669A6",
|
||||
"b c #30C234D330C2",
|
||||
"n c #514455555144",
|
||||
"m c #965892489658",
|
||||
"M c #EFBEEFBEEFBE",
|
||||
"N c #E79DEBADE79D",
|
||||
"B c #861786178617",
|
||||
"V c #861782078617",
|
||||
"C c #71C671C671C6",
|
||||
"Z c #AEBAAEBAAEBA",
|
||||
"A c #41033CF34103",
|
||||
"S c #B6DAB2CAB6DA",
|
||||
"D c #618565956185",
|
||||
"F c #A6999E795144",
|
||||
"G c #71C675D671C6",
|
||||
"H c #8E3882074103",
|
||||
"J c #9E7992484924",
|
||||
" ",
|
||||
" ",
|
||||
" . ",
|
||||
" X ",
|
||||
" oOO+@#####$OO% ",
|
||||
" %&*==%-;%:%X.%=>% ",
|
||||
" %,&<%%%12%%%%%%%%OO% ",
|
||||
" . %&O%%%%%%%%X%%%%%%%%=o ",
|
||||
" X%&<%%%%%%%%%3%%%%o4444566666 ",
|
||||
" %&%%%%%%%%%%%7%%%%8900qqw%%%% ",
|
||||
" -;%:oX.%%%%%%%%%%%%%%&e::::r$<%% ",
|
||||
" 128%%%%%%%%%%%%%%%%%%8e:::::t8%% ",
|
||||
" %8yX%%%%%%%%%%%%%%%%%&e:::::ui%% ",
|
||||
" . %,Op3%%%%%%%%%%%%%%%%%8e::::::rp% ",
|
||||
" X %><%%7%%%%%%%%%%%%%%%%%&e::::::as% ",
|
||||
" %>O%6%%%%%%%%%%%%%%%%%%%8e::::::ud% ",
|
||||
" -; :8X.%O%%%%%%%%%%%%%%%%%%%&e:::::::f4 ",
|
||||
" 12%gO%%%%%%%%%%%%%%%%%%%%%%%8e:::::::h8 ",
|
||||
" %gX%&%%%%%%%%%%%%%%%%%%%%%%&e:::::::h8 ",
|
||||
" %4oj%O%%%%%%%%%%%%$kkllkl9l9fz:::::::h8 ",
|
||||
" %O%%7%%%%%%%%%%%%%%xu:::::::::::::::::h8 ",
|
||||
" %oo%=%%%%%O%%%%%%%%%xu:::::::::::::::::04 ",
|
||||
" O%O%o%%%%%6%%%%%%%%%xu:::::::::::::::::k% ",
|
||||
" %%%%%%%%%%.%%%%%%%%%%xu::::::::::::::::ax% ",
|
||||
" %%%g%%%%%O%X<p%%%%%%%%xu::::::::::::::::r4% ",
|
||||
" %o%o%%%%%&%%%O%%%%%%%%cu::::::::::::::::v%% ",
|
||||
" %%%%%%%%-;%:%X.%%%%%%%xu:::::::::::::::e8%% ",
|
||||
" O%%%%%o%12y%%%%%%%%%%%x:::::::::::::::r$o%% ",
|
||||
" %%%%%%=%%%OX%%%%Obbbbbd::::::::::::::an%%%% ",
|
||||
" %%%%%%%%%%o3%%%%pmtrrrM:::::::::::::NiO%%%% ",
|
||||
" %%%o%%%y%%%7%%%%%%vr::::::::::::::ues%%%%%% ",
|
||||
" %%%g%%%o%%%o%%%%%%%,Ba:::::::::::aV&%%%%%%%. ",
|
||||
" %%%%%%%o%%%%%%%%%%%%%4CZet:::teZC4%%%%%%%%%X ",
|
||||
" %%%%O%%%%%%%%%%%%%%%%%%O8,ccc,8O%%%%%%%%%%% ",
|
||||
" y%%%<%%%%%%OOOpp#mMzaaaaaaaaazNB&%%%%%%%-; : X.",
|
||||
" %%%%<%%.%%%p4=88&8AVSetaaateSVby%%%%%%%%12 ",
|
||||
" %<%%%%%X%%%%y>&&&&&&,+xvvvx+5>O%.%%%%%%% X ",
|
||||
" %%%%%%%%OOyggsBhheeeeeeeeehhi8%%X%%%% 3 ",
|
||||
" %%%-;%:gX.5,,b+ikSfeeefSkiAg%%%%%%%% 7 ",
|
||||
" %%12%%%p8bbbbbbswcDDDcws&y%-;%:%X.% ",
|
||||
" %%%%%ooXoo=nVVBBBBBBBBBVVc4%%12%%% ",
|
||||
" %%%%%p4F44>>&xDCGBBBGCDx8y%%%%%%X% ",
|
||||
" %%%%%%yH>>>>>>=5,A2#,5=4o%%%%%%%J% ",
|
||||
" %%%%%%%O>,bbbbbbb66bb,4O%%%%%%% 7 ",
|
||||
" %%%%%%%%%og8&5bbb5&8go%%%%%%%%% ",
|
||||
" %%%%%%%%%%%%oOpppOO%%%%%%%%%%%% ",
|
||||
" ",
|
||||
" "};
|
||||
@@ -0,0 +1,282 @@
|
||||
/* XPM */
|
||||
static char * image_name[] = {
|
||||
"48 48 231 2",
|
||||
" c None",
|
||||
". c #59655D759E79",
|
||||
"X c #082004106185",
|
||||
"o c #000000000000",
|
||||
"O c #49245144CF3C",
|
||||
"+ c #41034D34C71B",
|
||||
"@ c #41034924C71B",
|
||||
"# c #41034514C71B",
|
||||
"$ c #38E34103C71B",
|
||||
"% c #38E33CF3BEFB",
|
||||
"& c #30C238E3BEFB",
|
||||
"* c #30C234D3BEFB",
|
||||
"= c #28A230C2B6DA",
|
||||
"- c #28A22CB2B6DA",
|
||||
"; c #28A228A2B6DA",
|
||||
": c #20812492B6DA",
|
||||
"> c #20812081AEBA",
|
||||
", c #18612081AEBA",
|
||||
"< c #18611C71AEBA",
|
||||
"1 c #18611861AEBA",
|
||||
"2 c #10401451A699",
|
||||
"3 c #10401040A699",
|
||||
"4 c #08200C30A699",
|
||||
"5 c #08200820A699",
|
||||
"6 c #082004109E79",
|
||||
"7 c #000004109E79",
|
||||
"8 c #000000009E79",
|
||||
"9 c #10400C301040",
|
||||
"0 c #000004100000",
|
||||
"q c #28A2249228A2",
|
||||
"w c #10401451AEBA",
|
||||
"e c #BEFBBEFBE79D",
|
||||
"r c #96589248D75C",
|
||||
"t c #30C22CB2AEBA",
|
||||
"y c #30C234D330C2",
|
||||
"u c #104014511040",
|
||||
"i c #28A228A2AEBA",
|
||||
"p c #9E799E79D75C",
|
||||
"a c #B6DAB6DADF7D",
|
||||
"s c #59655965BEFB",
|
||||
"d c #38E338E338E3",
|
||||
"f c #492449244924",
|
||||
"g c #492445144924",
|
||||
"h c #FFFFFFFFFFFF",
|
||||
"j c #8617F3CE9658",
|
||||
"k c #8E38F3CE9658",
|
||||
"l c #9658F3CE9658",
|
||||
"z c #A699F3CE9E79",
|
||||
"x c #AEBAF3CE9E79",
|
||||
"c c #B6DAF3CE9E79",
|
||||
"v c #C71BF3CE9E79",
|
||||
"b c #CF3CF3CEA699",
|
||||
"n c #D75CF3CEA699",
|
||||
"m c #D75CF3CE9E79",
|
||||
"M c #DF7DF3CE9E79",
|
||||
"N c #EFBEF3CE9658",
|
||||
"B c #EFBEEBAD9658",
|
||||
"V c #F7DEDB6C9E79",
|
||||
"C c #F7DED75C8617",
|
||||
"Z c #8E38F3CE9E79",
|
||||
"A c #9E79F3CE9658",
|
||||
"S c #AEBAF3CEA699",
|
||||
"D c #BEFBF3CEAEBA",
|
||||
"F c #DF7DF3CEA699",
|
||||
"G c #E79DEFBE9E79",
|
||||
"H c #F7DED75C9658",
|
||||
"J c #F7DEDB6C8E38",
|
||||
"K c #8E38F3CEB6DA",
|
||||
"L c #9658F3CEB6DA",
|
||||
"P c #9E79F3CEAEBA",
|
||||
"I c #A699F3CEAEBA",
|
||||
"U c #D75CF3CEAEBA",
|
||||
"Y c #CF3CF3CEB6DA",
|
||||
"T c #D75CF3CEB6DA",
|
||||
"R c #E79DF3CEB6DA",
|
||||
"E c #E79DF3CEAEBA",
|
||||
"W c #E79DEBADAEBA",
|
||||
"Q c #F7DEDB6CAEBA",
|
||||
"! c #9658F3CEBEFB",
|
||||
"~ c #9658F3CEC71B",
|
||||
"^ c #A699F3CEC71B",
|
||||
"/ c #AEBAF3CEBEFB",
|
||||
"( c #C71BF3CEB6DA",
|
||||
") c #D75CF3CEC71B",
|
||||
"_ c #E79DF3CEBEFB",
|
||||
"` c #EFBEF3CEB6DA",
|
||||
"' c #EFBEDF7DB6DA",
|
||||
"] c #9E79F3CED75C",
|
||||
"[ c #C71BF3CEC71B",
|
||||
"{ c #CF3CF3CECF3C",
|
||||
"} c #D75CF3CECF3C",
|
||||
"| c #EFBEF3CEC71B",
|
||||
" . c #EFBEE79DC71B",
|
||||
".. c #F7DED34CBEFB",
|
||||
"X. c #F7DED75CA699",
|
||||
"o. c #F7DECB2B9E79",
|
||||
"O. c #9E799E799E79",
|
||||
"+. c #9E799A699E79",
|
||||
"@. c #965896589658",
|
||||
"#. c #965892489658",
|
||||
"$. c #8E388E388E38",
|
||||
"%. c #8E388A288E38",
|
||||
"&. c #861786178617",
|
||||
"*. c #861782078617",
|
||||
"=. c #79E77DF779E7",
|
||||
"-. c #9E79F3CECF3C",
|
||||
";. c #A699F3CECF3C",
|
||||
":. c #AEBAF3CECF3C",
|
||||
">. c #BEFBF3CED75C",
|
||||
",. c #D75CF3CED75C",
|
||||
"<. c #E79DF3CECF3C",
|
||||
"1. c #EFBEF3CECF3C",
|
||||
"2. c #F7DEEBADCF3C",
|
||||
"3. c #F7DEE38DCF3C",
|
||||
"4. c #F7DEC30BAEBA",
|
||||
"5. c #79E779E779E7",
|
||||
"6. c #AEBAF3CEDF7D",
|
||||
"7. c #B6DAF3CEDF7D",
|
||||
"8. c #CF3CF3CED75C",
|
||||
"9. c #DF7DF3CED75C",
|
||||
"0. c #EFBEF3CEDF7D",
|
||||
"q. c #F7DECF3CBEFB",
|
||||
"w. c #F7DED34CB6DA",
|
||||
"e. c #F7DEBAEAA699",
|
||||
"r. c #71C675D671C6",
|
||||
"t. c #9E79EFBEE79D",
|
||||
"y. c #AEBAF3CEE79D",
|
||||
"u. c #C71BF3CEDF7D",
|
||||
"i. c #DF7DF3CEDF7D",
|
||||
"p. c #EFBEEBADE79D",
|
||||
"a. c #F7DEEBADD75C",
|
||||
"s. c #F7DEDB6CCF3C",
|
||||
"d. c #F7DEC71BBEFB",
|
||||
"f. c #F7DEBAEAB6DA",
|
||||
"g. c #F7DEB6DAA699",
|
||||
"h. c #71C671C671C6",
|
||||
"j. c #9E79EFBEEFBE",
|
||||
"k. c #AEBAEFBEEFBE",
|
||||
"l. c #C71BF3CEEFBE",
|
||||
"z. c #DF7DEFBEEFBE",
|
||||
"x. c #E79DEFBEEFBE",
|
||||
"c. c #F7DEE38DDF7D",
|
||||
"v. c #F7DED34CCF3C",
|
||||
"b. c #69A66DB669A6",
|
||||
"n. c #A699E79DEFBE",
|
||||
"m. c #AEBAE79DEFBE",
|
||||
"M. c #BEFBE79DF7DE",
|
||||
"N. c #CF3CEBADF7DE",
|
||||
"B. c #D75CEBADF7DE",
|
||||
"V. c #E79DEBADF7DE",
|
||||
"C. c #F7DEDF7DE79D",
|
||||
"Z. c #F7DED75CDF7D",
|
||||
"A. c #F7DEC71BD75C",
|
||||
"S. c #F7DECF3CC71B",
|
||||
"D. c #F7DEB2CAAEBA",
|
||||
"F. c #F7DEAAAAAEBA",
|
||||
"G. c #A699E38DEFBE",
|
||||
"H. c #BEFBDB6CF7DE",
|
||||
"J. c #D75CE79DF7DE",
|
||||
"K. c #F7DED75CE79D",
|
||||
"L. c #F7DEB2CAB6DA",
|
||||
"P. c #69A669A669A6",
|
||||
"I. c #618565956185",
|
||||
"U. c #AEBADB6CF7DE",
|
||||
"Y. c #B6DAD75CF7DE",
|
||||
"T. c #D75CDB6CF7DE",
|
||||
"R. c #F7DEC71BE79D",
|
||||
"E. c #F7DEAEBABEFB",
|
||||
"W. c #F7DEAAAACF3C",
|
||||
"Q. c #9658D75CF7DE",
|
||||
"!. c #C71BD34CF7DE",
|
||||
"~. c #DF7DD75CF7DE",
|
||||
"^. c #EFBECF3CF7DE",
|
||||
"/. c #F7DEBAEAE79D",
|
||||
"(. c #F7DEAEBAD75C",
|
||||
"). c #F7DE9E79C71B",
|
||||
"_. c #618561856185",
|
||||
"`. c #9658CB2BF7DE",
|
||||
"'. c #A699D75CF7DE",
|
||||
"]. c #B6DAD34CF7DE",
|
||||
"[. c #CF3CC30BF7DE",
|
||||
"{. c #E79DCF3CF7DE",
|
||||
"}. c #F7DEBEFBF7DE",
|
||||
"|. c #F7DEBAEAEFBE",
|
||||
" X c #F7DE9658CF3C",
|
||||
".X c #59655D755965",
|
||||
"XX c #8E38BAEAF7DE",
|
||||
"oX c #9658B6DAF7DE",
|
||||
"OX c #A699B6DAF7DE",
|
||||
"+X c #AEBAB2CAF7DE",
|
||||
"@X c #B6DAB6DAF7DE",
|
||||
"#X c #BEFBBAEAF7DE",
|
||||
"$X c #C71BCB2BF7DE",
|
||||
"%X c #D75CCB2BF7DE",
|
||||
"&X c #F7DEBAEAF7DE",
|
||||
"*X c #F7DEB2CAE79D",
|
||||
"=X c #F7DEA699DF7D",
|
||||
"-X c #F7DEA289D75C",
|
||||
";X c #F7DE9A69D75C",
|
||||
":X c #596559655965",
|
||||
">X c #E79DBAEAF7DE",
|
||||
",X c #DF7DBAEAF7DE",
|
||||
"<X c #F7DEAEBAE79D",
|
||||
"1X c #8617AEBAF7DE",
|
||||
"2X c #9658AEBAF7DE",
|
||||
"3X c #9E79AAAAF7DE",
|
||||
"4X c #A699A699F7DE",
|
||||
"5X c #AEBAA289F7DE",
|
||||
"6X c #C71BB2CAF7DE",
|
||||
"7X c #DF7DB2CAF7DE",
|
||||
"8X c #E79DAAAAF7DE",
|
||||
"9X c #EFBEA289F7DE",
|
||||
"0X c #EFBEA289EFBE",
|
||||
"qX c #F7DE9E79E79D",
|
||||
"wX c #F7DE9658D75C",
|
||||
"eX c #514455555144",
|
||||
"rX c #79E7A289F7DE",
|
||||
"tX c #8617A289F7DE",
|
||||
"yX c #8E38A289F7DE",
|
||||
"uX c #9E799A69F7DE",
|
||||
"iX c #AEBA9658F7DE",
|
||||
"pX c #B6DA9E79F7DE",
|
||||
"aX c #E79DA699F7DE",
|
||||
"sX c #EFBE9E79EFBE",
|
||||
"dX c #EFBE9A69EFBE",
|
||||
"fX c #EFBE8E38E79D",
|
||||
"gX c #514451445144",
|
||||
"hX c #38E334D338E3",
|
||||
"jX c #49244D344924",
|
||||
"kX c #38E33CF338E3",
|
||||
"lX c #410341034103",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
". . . . . . . . . . . . . . . . . . . . . . . . X . . . . . . . . . . . o o ",
|
||||
"O + @ # $ % & & * = - ; : > , < 1 2 3 4 5 6 7 8 X . 8 8 8 8 8 8 8 8 8 X 9 0 o ",
|
||||
"O + @ # $ % & & * = - ; : : , < 1 2 3 4 5 5 7 8 X . 8 8 8 8 8 8 8 8 8 X q 9 o ",
|
||||
"O + @ # $ % & & & = - ; : > > < 1 w 3 4 5 6 7 8 X . 8 8 e r t r e 8 8 X y u o ",
|
||||
"O + @ # $ % & & = = = ; : > , < 1 2 3 3 5 5 7 8 X . 8 8 i p a p i 8 8 X y u o ",
|
||||
"O + @ # $ % & & & = - ; : > > < 1 2 3 4 5 6 7 8 X . 8 8 6 s e s 6 8 8 X d u o ",
|
||||
"+ + @ # $ % & & = = - ; : > , < 1 2 3 4 5 6 7 8 X . 8 8 i p a p i 8 8 X y u o ",
|
||||
"O + @ # $ % & & & = - ; : : < < 1 2 3 4 5 5 7 8 X . 8 8 e r t r e 8 7 X d u o ",
|
||||
"+ + @ # $ % & & = = - ; : > < < 1 2 3 4 5 6 7 8 X . 8 8 8 8 8 8 8 8 8 X d u o ",
|
||||
"O + @ # $ % & & & = - ; : > > < w 2 3 4 5 6 7 8 X . 8 8 8 8 8 8 8 8 7 X d u o ",
|
||||
"X X X X X X X X X X X X X X X X X X X X X X X X X . X X X X X X X X X X y u 0 ",
|
||||
" f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f g y u o ",
|
||||
" y d y y d y y d y y d y y d y d y d y y d y y d y y d y y d y y d y y q u o ",
|
||||
" u u u u u u u u u u u u u u u u u u u u u u u u u h h h h h h h h h h h h h h h h h h h h o o ",
|
||||
" o 0 o 0 o o 0 o o 0 o o 0 o o o o 0 o 0 o o 0 o o h j j j k l z x c v b n m M M N B V C y 9 0 ",
|
||||
" o h Z Z A z z S S D b b b F F F G B H J d q 9 ",
|
||||
" o h K L P L I I D n U Y T R E W W Q V J d y u ",
|
||||
" o h ! ! ! ~ ^ / ( U T ) _ ` ` W ' Q V H d y u ",
|
||||
" h h h h h h h h h h h h h h h h h ! ~ ] ^ / ( [ [ { } | | | ...Q X.o.d y u ",
|
||||
" o h O.O.O.+.+.@.#.#.$.%.&.&.*.=.=.h -.;.:.:.>.[ ) } ,.<.<.1.2.3...Q X.4.d y u ",
|
||||
" o h O.O.+.+.@.#.#.$.%.&.&.*.=.5.5.h ] 6.7.7.>.8.8.9.9.9.0.1.2.3.q.w.4.e.d y u ",
|
||||
" o h O.+.@.@.#.$.$.%.&.*.*.=.5.5.r.h t.y.7.7.u.u.i.i.i.0.p.a.s.s...d.f.g.d y u ",
|
||||
" o h +.@.@.#.$.$.%.&.*.*.=.5.5.r.h.h j.k.7.l.l.l.z.x.o x.p.c.s.v.q.d.f.g.d d u ",
|
||||
" o h @.@.#.$.%.%.&.*.*.=.5.r.r.h.b.h n.m.M.N.N.B.B.V.o 0 p.C.Z.A.S.d.D.F.d y u ",
|
||||
" o h #.#.$.$.%.&.*.*.=.5.5.r.h.b.b.h n.G.H.M.N.N.J.J.o o o C.K.A.S.d.L.F.d y u ",
|
||||
" o h #.$.%.%.&.*.=.=.5.r.r.h.b.P.I.h U.U.Y.Y.M.N.T.J.o o o o K.R.A.E.W.L.d y u ",
|
||||
" o h $.%.&.&.*.=.=.5.r.r.h.b.P.P.I.h Q.Q.U.U.Y.H.!.~.o o o ^.R./.A.(.W.).d d u ",
|
||||
" o h %.&.&.*.=.5.5.r.h.h.b.P.I.I._.h `.`.'.U.].Y.!.[.{.{.o }.|././.(.W. Xd y u ",
|
||||
" o h &.*.*.=.5.5.r.h.h.b.P.I.I._..Xh XXoXOX+X@X#X#X$X[.%X0 o &X|.*X=X-X;Xd y u ",
|
||||
" o h *.*.=.5.5.r.h.b.b.P.I.I._..X:Xh XXoXoXOX+X+X+X$X[.>X,X>X&X&X<X=X-X;Xd y u ",
|
||||
" o h *.=.5.5.r.h.h.b.P.I._._..X.X:Xh 1X1X2X3X4X5X5X@X6X7X7X8X8X9X0XqXwXwXd y u ",
|
||||
" o h =.5.r.r.h.b.P.P.I._._..X:XeXeXh rXtXtXyXuXiXpXpXpX7XaX9X9X9XsXdXfXwXd y u ",
|
||||
" o h 5.r.r.h.b.P.P.I._._..X:X:XeXgXh d y d d d d d d y d hXy d d d d d hXd y u ",
|
||||
" o h r.r.h.b.P.P.I._..X.X:XeXeXgXjXjXf o f f f g g g f g f f f g g g g g g hXu ",
|
||||
" o h h.h.b.P.I.I._._..X:XeXgXgXjXf f g o g kXy d y d y y y d y d y y d y y q 9 ",
|
||||
" o h h.b.P.I.I._..X.X:XeXgXgXjXf f g lXo d q u u u u u u u u u u u u u u u 9 0 ",
|
||||
" o h o o o o o o o o o o o o o o o o o o d u 0 o o o o o o o o o o o o o o o o ",
|
||||
" o u y g g f f f f f f f f f f f f f f g y u o ",
|
||||
" 0 9 q y y y d y y d y y d y d y d y d y q u o ",
|
||||
" o 0 9 u u u u u u u u u u u u u u u u u 9 0 o ",
|
||||
" o o o o o o 0 o 0 o 0 o o o o o o o o o o ",
|
||||
" ",
|
||||
" ",
|
||||
" "};
|
||||
@@ -0,0 +1,275 @@
|
||||
/* XPM */
|
||||
static char * image_name[] = {
|
||||
"48 48 224 2",
|
||||
" c None",
|
||||
". c #E79DE79DE79D",
|
||||
"X c #DF7DE38DDF7D",
|
||||
"o c #DF7DDF7DDF7D",
|
||||
"O c #D75CDF7DDF7D",
|
||||
"+ c #D75CD75CD75C",
|
||||
"@ c #D75CD34CD75C",
|
||||
"# c #CF3CCF3CCF3C",
|
||||
"$ c #CF3CCB2BCF3C",
|
||||
"% c #C71BC71BC71B",
|
||||
"& c #C71BC30BC71B",
|
||||
"* c #BEFBBEFBBEFB",
|
||||
"= c #BEFBBAEABEFB",
|
||||
"- c #B6DAB6DAB6DA",
|
||||
"; c #000000000000",
|
||||
": c #D75CDB6CD75C",
|
||||
"> c #B6DAB2CAB6DA",
|
||||
", c #EFBEF3CEF7DE",
|
||||
"< c #EFBEF3CEEFBE",
|
||||
"1 c #E79DEFBEEFBE",
|
||||
"2 c #CF3C9E79A699",
|
||||
"3 c #61853CF338E3",
|
||||
"4 c #86177DF78E38",
|
||||
"5 c #A699AAAAAEBA",
|
||||
"6 c #86178A288E38",
|
||||
"7 c #861786178E38",
|
||||
"8 c #8E388A289658",
|
||||
"9 c #D75CA699AEBA",
|
||||
"0 c #79E714512081",
|
||||
"q c #61855D755965",
|
||||
"w c #69A669A671C6",
|
||||
"e c #AEBAAEBAAEBA",
|
||||
"r c #861786178617",
|
||||
"t c #79E775D68617",
|
||||
"y c #8E3882079658",
|
||||
"u c #96588E38A699",
|
||||
"i c #96589248A699",
|
||||
"p c #8E3886179E79",
|
||||
"a c #861782079658",
|
||||
"s c #B6DAA289AEBA",
|
||||
"d c #9E792CB238E3",
|
||||
"f c #38E3249230C2",
|
||||
"g c #9E799E79A699",
|
||||
"h c #71C675D679E7",
|
||||
"j c #AEBAAAAAAEBA",
|
||||
"k c #9E799A69AEBA",
|
||||
"l c #C71BBEFBC71B",
|
||||
"z c #A6999A69AEBA",
|
||||
"x c #A699A699AEBA",
|
||||
"c c #BEFB659569A6",
|
||||
"v c #41031C712081",
|
||||
"b c #514455555965",
|
||||
"n c #69A669A679E7",
|
||||
"m c #A699A699A699",
|
||||
"M c #8E388A28A699",
|
||||
"N c #B6DAAAAABEFB",
|
||||
"B c #C71B5D756185",
|
||||
"V c #618514512081",
|
||||
"C c #492449245144",
|
||||
"Z c #AEBAAEBAB6DA",
|
||||
"A c #69A6659571C6",
|
||||
"S c #8E38AAAAB6DA",
|
||||
"D c #B6DA208130C2",
|
||||
"F c #9E7975D679E7",
|
||||
"G c #9E7934D338E3",
|
||||
"H c #410330C230C2",
|
||||
"J c #71C66DB679E7",
|
||||
"K c #6185618569A6",
|
||||
"L c #A699A289A699",
|
||||
"P c #BEFB34D338E3",
|
||||
"I c #492418612081",
|
||||
"U c #596555556185",
|
||||
"Y c #59655D7569A6",
|
||||
"T c #9E799E799E79",
|
||||
"R c #861782078617",
|
||||
"E c #79E771C68617",
|
||||
"W c #A69959656185",
|
||||
"Q c #410338E34103",
|
||||
"! c #596559656185",
|
||||
"~ c #9E799A699E79",
|
||||
"^ c #79E775D679E7",
|
||||
"/ c #CF3CD75CD75C",
|
||||
"( c #CF3CD34CD75C",
|
||||
") c #C71BCB2BCF3C",
|
||||
"_ c #BEFBC30BBEFB",
|
||||
"` c #B6DABAEABEFB",
|
||||
"' c #96589A699E79",
|
||||
"] c #8E389A699658",
|
||||
"[ c #965896589658",
|
||||
"{ c #71C675D671C6",
|
||||
"} c #618561856185",
|
||||
"| c #514451445965",
|
||||
" . c #38E33CF34103",
|
||||
".. c #30C234D34103",
|
||||
"X. c #492445144924",
|
||||
"o. c #965892489658",
|
||||
"O. c #8E3892489E79",
|
||||
"+. c #96588E389658",
|
||||
"@. c #71C682079E79",
|
||||
"#. c #8E388E388E38",
|
||||
"$. c #965882076185",
|
||||
"%. c #861775D669A6",
|
||||
"&. c #9E79A699A699",
|
||||
"*. c #8E388A288E38",
|
||||
"=. c #596559655965",
|
||||
"-. c #8E3892489658",
|
||||
";. c #861775D69658",
|
||||
":. c #A6998207A699",
|
||||
">. c #69A6618569A6",
|
||||
",. c #00000C301040",
|
||||
"<. c #000010401040",
|
||||
"1. c #000010401861",
|
||||
"2. c #8E389A69A699",
|
||||
"3. c #79E786179E79",
|
||||
"4. c #86178E389E79",
|
||||
"5. c #8E388E389658",
|
||||
"6. c #965882079E79",
|
||||
"7. c #79E779E779E7",
|
||||
"8. c #596551445144",
|
||||
"9. c #000018611861",
|
||||
"0. c #00001C712081",
|
||||
"q. c #79E78A28A699",
|
||||
"w. c #71C67DF79658",
|
||||
"e. c #69A67DF79658",
|
||||
"r. c #69A675D68E38",
|
||||
"t. c #5965659579E7",
|
||||
"y. c #38E33CF34924",
|
||||
"u. c #28A228A228A2",
|
||||
"i. c #69A665958617",
|
||||
"p. c #A6998207B6DA",
|
||||
"a. c #0000249228A2",
|
||||
"s. c #38E355555965",
|
||||
"d. c #000028A230C2",
|
||||
"f. c #00002CB230C2",
|
||||
"g. c #104030C238E3",
|
||||
"h. c #69A686178E38",
|
||||
"j. c #30C238E34103",
|
||||
"k. c #5144596569A6",
|
||||
"l. c #28A22CB238E3",
|
||||
"z. c #51444D344103",
|
||||
"x. c #8E3875D66185",
|
||||
"c. c #96587DF79658",
|
||||
"v. c #9E797DF7A699",
|
||||
"b. c #00002CB238E3",
|
||||
"n. c #28A255555965",
|
||||
"m. c #000030C238E3",
|
||||
"M. c #000034D34103",
|
||||
"N. c #10403CF34103",
|
||||
"B. c #596586178E38",
|
||||
"V. c #38E338E34924",
|
||||
"C. c #18611C712081",
|
||||
"Z. c #618555554103",
|
||||
"A. c #79E76DB65144",
|
||||
"S. c #79E775D669A6",
|
||||
"D. c #2081208128A2",
|
||||
"F. c #410341034103",
|
||||
"G. c #00003CF34103",
|
||||
"H. c #492471C679E7",
|
||||
"J. c #492475D679E7",
|
||||
"K. c #CF3CDB6CDF7D",
|
||||
"L. c #104045144924",
|
||||
"P. c #38E33CF35144",
|
||||
"I. c #410349245965",
|
||||
"U. c #28A230C24103",
|
||||
"Y. c #618559655144",
|
||||
"T. c #BEFBAEBAC71B",
|
||||
"R. c #492441035144",
|
||||
"E. c #000041034924",
|
||||
"W. c #492479E78617",
|
||||
"Q. c #000049245144",
|
||||
"!. c #596586179658",
|
||||
"~. c #186159656185",
|
||||
"^. c #104051445965",
|
||||
"/. c #492449245965",
|
||||
"(. c #49244D346185",
|
||||
"). c #61855D7569A6",
|
||||
"_. c #596559655144",
|
||||
"`. c #2081249230C2",
|
||||
"'. c #CF3CC30BD75C",
|
||||
"]. c #79E769A679E7",
|
||||
"[. c #00004D345965",
|
||||
"{. c #000051445965",
|
||||
"}. c #492486178E38",
|
||||
"|. c #000055556185",
|
||||
" X c #69A69E79A699",
|
||||
".X c #C71BD34CD75C",
|
||||
"XX c #208169A671C6",
|
||||
"oX c #618596589E79",
|
||||
"OX c #492455556185",
|
||||
"+X c #4924555569A6",
|
||||
"@X c #20811C7128A2",
|
||||
"#X c #30C234D34924",
|
||||
"$X c #C71BBAEAC71B",
|
||||
"%X c #0000596569A6",
|
||||
"&X c #00005D7569A6",
|
||||
"*X c #514492489E79",
|
||||
"=X c #1040618569A6",
|
||||
"-X c #B6DACF3CCF3C",
|
||||
";X c #61859E79A699",
|
||||
":X c #51445D7571C6",
|
||||
">X c #5965618571C6",
|
||||
",X c #186118612081",
|
||||
"<X c #410345145144",
|
||||
"1X c #FFFFFFFFFFFF",
|
||||
"2X c #8617FFFF4924",
|
||||
"3X c #104034D338E3",
|
||||
"4X c #186130C230C2",
|
||||
"5X c #28A230C230C2",
|
||||
"6X c #000004100820",
|
||||
"7X c #104014511861",
|
||||
"8X c #186128A228A2",
|
||||
"9X c #104038E34103",
|
||||
"0X c #59656DB68617",
|
||||
"qX c #2081249228A2",
|
||||
"wX c #AEBA96589E79",
|
||||
"eX c #A6998E38AEBA",
|
||||
"rX c #8E3871C68E38",
|
||||
"tX c #30C230C230C2",
|
||||
"yX c #28A228A230C2",
|
||||
"uX c #69A66DB669A6",
|
||||
"iX c #596561855965",
|
||||
"pX c #BEFBFFFF9658",
|
||||
"aX c #410341034924",
|
||||
"sX c #492449244924",
|
||||
" ",
|
||||
" . . . . . . . . . . . . . . . . . . . ",
|
||||
" . . . X o O O + @ # $ $ % & * * = - ; ",
|
||||
" . . X o o : + @ # $ $ % & * * = - > ; ",
|
||||
" . X o O , < < , , , < 1 1 2 3 4 > > ; ",
|
||||
" . o o < 5 6 7 8 8 8 6 6 9 0 q w > e ; ",
|
||||
" . o O , r t y u i p a s d f g h e j ; ",
|
||||
" . O + , 7 p k l z k x c v b - n j m ; ",
|
||||
" . + @ , 7 M N B d u 2 V C w Z A j m ; ",
|
||||
" . @ @ < 7 p S D D F G H A J Z K m L ; ",
|
||||
" . @ # < r t p Z P P I U J J j Y L T ; ",
|
||||
" . # $ < R J t E W 0 Q A J J x ! T ~ ; ",
|
||||
" . $ % 1 R t ^ t h b A ^ ^ ^ x b T ~ ; ",
|
||||
" . % % . / : ( ) % _ ` - Z ' ] C ~ [ ; ",
|
||||
" . % & { } } b | K C ... .X.C .[ o.; ",
|
||||
" . & * = Z e ~ O.+.@.E 7 T w o.[ o.#.; ",
|
||||
" . * = = o.r r r r $.@.$.@.%.w o.+.#.; ",
|
||||
" . = = - > e e j x &.L g ~ ' o.o.#.*.; ",
|
||||
" . = - > e e j m m L ~ ~ ~ [ +.#.*.r ; ",
|
||||
" . ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ",
|
||||
". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
|
||||
"O O + @ # $ $ % & * * = - ; . . . X o o O + @ # $ $ % & * * = - =.. . . X o O O + @ # $ $ % & * ",
|
||||
"O + @ # # $ % & * * = - > ; . . ; ; O ; ; @ # # $ % & * * = - > ; . . X o o : + @ # # $ % & * * ",
|
||||
"# L i &.-.j & * * = - > > ; . X ; o ; + ; ; # $ - w ;.:.>.^ > > ; . X o ,.<.<.1.1.1.1.1.1.1.<.<.",
|
||||
"g 2.3.3.@.4.5.[ = - > > e ; . o o O + @ # # $ & n 6.7.- > 8.> e ; . o o 9.0.0.0.0.0.0.0.0.0.0.0.",
|
||||
"q.3.w.e.r.t.y.u.- > > e j ; . o O + @ # # $ * i.p.E >.q j } e j ; . o O 0.a.s._ s.d.f.g.h.2.g.a.",
|
||||
"j.k.r.k.l.l.z.x.%.r ^ j j ; . O + @ # # $ - c.v.{ = > R [ *.j j ; . O + f.f.b.h.( n.m.M.N.B.f.f.",
|
||||
"j.V...C.Z.x.A.S.^ U D.m m ; . + @ @ # $ - c.v.o.= - > =.F.T m m ; . + @ M.M.G.H.J.K.n.G.L.B.G.M.",
|
||||
"P.I.U.u.z.A.{ .D.Y.u.m L ; . @ @ # $ > T.c.~ = - - ^ R.=.L m L ; . @ @ G.E.E.W.Q.!.K.~.^.!.E.E.",
|
||||
"/.(...u.F.)...l._.y.`.L T ; . @ # $ ~ '.].T = - e K E } m m L T ; . @ # [.[.{.}.|.|. X.XXXoX{.[.",
|
||||
"OX+XV.@X@X| y.l.#XP.l.T T ; . # $ +.$X>.> = - e ).v.).j m L T T ; . # $ %X&X&X*X=X%X%XS -X;X&X&X",
|
||||
":X>XI.OX,XC <XU.U.C R ~ ~ ; . $ % . 8.- 1X- j E :.t j m L 2X~ ~ ; . $ % ^.3X4X&.5X6X; 6XC.7X8X9X",
|
||||
"t.0XOX+XU./.j.qX*.T ~ ~ [ ; . % % ).wX= 1X1XeXrXR j m L T 2X2X[ ; . % % ; ; C.tXtX6X; ; ; ; ; ; ",
|
||||
"0Xr.k.k.#XP.V.yXuXT ~ [ o.; . % & ~ uX- 1X; 1X[ j m L T T ~ [ o.; . % & ; ; ; ; ; ; ; ; ; ; ; ; ",
|
||||
"! 0X:X:X#Xl. .iX^ ~ [ o.#.; . & 9 _ uX} 1X; ; 1Xm L g ~ T pXpX#.; . & * ; ; ; ; ; ; ; ; ; ; ; ; ",
|
||||
"> r aXy.sX} 7.T ~ [ o.#.#.; . _ 6X- > wX1X; ; ; 1XT wX~ [ o.#.#.; . * = ; ; ; ; ; ; ; ; ; ; ; ; ",
|
||||
"Z e j m L L ~ ~ [ [ o.#.*.; . ` ; - > e 1X; ; ; ; 1X' [ [ 2X2X*.; . = = - > > e j m L L T ~ [ o.",
|
||||
"e j m L L T ~ [ o.+.#.*.r ; . = - > e e 1X; ; ; ; ; 1Xo.o.#.2Xr ; . = - > e e j m L L T ~ [ o.o.",
|
||||
"=.; ; ; ; ; ; ; ; ; ; ; ; =.. ; ; ; ; ; 1X; ; ; ; ; ; 1X; ; ; ; ; . ; ; ; ; ; ; ; ; ; ; ; ; ; ; ",
|
||||
" 1X; ; ; ; ; ; ; 1X ",
|
||||
" 1X; ; ; ; 1X1X1X1X1X ",
|
||||
" 1X; ; 1X; 1X ",
|
||||
" 1X; 1X1X; ; 1X ",
|
||||
" 1X1X 1X; 1X ",
|
||||
" 1X 1X; ; 1X ",
|
||||
" 1X; 1X ",
|
||||
" 1X; 1X ",
|
||||
" 1X1X "};
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user