1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-02-09 01:45:48 +01:00

Merge branch 'wmdrawer' into next

This commit is contained in:
Carlos R. Mafra
2013-04-12 02:14:41 +01:00
38 changed files with 3853 additions and 942 deletions

View File

@@ -111,43 +111,6 @@ static void updateLabel(WMWidget *self, void *data)
WMSetLabelText(panel->dithL, buffer);
}
static void
createImages(WMScreen *scr, RContext *rc, RImage *xis, char *file,
WMPixmap **icon1, WMPixmap **icon2)
{
RImage *icon;
char *path;
RColor gray = { 0xae, 0xaa, 0xae, 0 };
*icon1 = NULL;
*icon2 = NULL;
path = LocateImage(file);
if (!path)
return;
*icon1 = WMCreatePixmapFromFile(scr, path);
if (!*icon1) {
wwarning(_("could not load icon %s"), path);
wfree(path);
return;
}
icon = RLoadImage(rc, path, 0);
if (!icon) {
wwarning(_("could not load icon %s"), path);
wfree(path);
return;
}
RCombineImageWithColor(icon, &gray);
if (xis) {
RCombineImagesWithOpaqueness(icon, xis, 180);
if (!(*icon2 = WMCreatePixmapFromRImage(scr, icon, 127)))
wwarning(_("could not process icon %s: %s"), file, RMessageForError(RErrorCode));
}
RReleaseImage(icon);
wfree(path);
}
static void createPanel(Panel *p)
{
_Panel *panel = (_Panel *) p;
@@ -342,7 +305,7 @@ static void createPanel(Panel *p)
WMSetButtonFont(panel->animB, font);
WMSetButtonText(panel->animB, _("Animations"));
WMSetButtonImagePosition(panel->animB, WIPAbove);
createImages(scr, rc, xis, ANIM_IMAGE, &altIcon, &icon);
CreateImages(scr, rc, xis, ANIM_IMAGE, &altIcon, &icon);
if (icon) {
WMSetButtonImage(panel->animB, icon);
WMReleasePixmap(icon);
@@ -360,7 +323,7 @@ static void createPanel(Panel *p)
WMSetButtonFont(panel->supB, font);
WMSetButtonText(panel->supB, _("Superfluous"));
WMSetButtonImagePosition(panel->supB, WIPAbove);
createImages(scr, rc, xis, SUPERF_IMAGE, &altIcon, &icon);
CreateImages(scr, rc, xis, SUPERF_IMAGE, &altIcon, &icon);
if (icon) {
WMSetButtonImage(panel->supB, icon);
WMReleasePixmap(icon);

310
WPrefs.app/Docks.c Normal file
View File

@@ -0,0 +1,310 @@
/* Workspace.c- workspace options
*
* WPrefs - Window Maker Preferences Program
*
* Copyright (c) 2012 Daniel Déchelotte (heavily inspired from file (c) 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.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "WPrefs.h"
typedef struct _Panel {
WMBox *box;
char *sectionName;
char *description;
CallbackRec callbacks;
WMWidget *parent;
WMFrame *autoDelayF[2];
WMLabel *autoDelayL[4];
WMButton *autoDelayB[4][5];
WMTextField *autoDelayT[4];
WMFrame *dockF;
WMButton *docksB[3];
} _Panel;
#define ICON_FILE "dockclipdrawersection"
#define ARQUIVO_XIS "xis"
#define DELAY_ICON "timer%i"
#define DELAY_ICON_S "timer%is"
static char *autoDelayStrings[4];
static char *autoDelayKeys[4] = { "ClipAutoexpandDelay", "ClipAutocollapseDelay", "ClipAutoraiseDelay", "ClipAutolowerDelay" };
static char *autoDelayPresetValues[5] = { "0", "100", "250", "600", "1000" };
static char *dockDisablingKeys[3] = { "DisableDock", "DisableClip", "DisableDrawers" };
static char *dockFiles[3] = { "dock", "clip", "drawer" };
static void showData(_Panel *panel);
static void storeData(_Panel *panel);
static void pushAutoDelayButton(WMWidget *w, void *data)
{
_Panel *panel = (_Panel *) data;
int i, j;
for (i = 0; i < 4; i++)
{
for (j = 0; j < 5; j++)
{
if (w == panel->autoDelayB[i][j])
{
WMSetTextFieldText(panel->autoDelayT[i], autoDelayPresetValues[j]);
return;
}
}
}
}
static void adjustButtonSelectionBasedOnValue(_Panel *panel, int row, char *value)
{
int j;
for (j = 0; j < 5; j++)
{
int isThatOne = !strcmp(autoDelayPresetValues[j], value);
WMSetButtonSelected(panel->autoDelayB[row][j], isThatOne);
if (isThatOne)
return;
}
}
static void autoDelayChanged(void *observerData, WMNotification *notification)
{
_Panel *panel = (_Panel *) observerData;
int row;
WMTextField *anAutoDelayT = (WMTextField *) WMGetNotificationObject(notification);
for (row = 0; row < 4; row++)
{
if (anAutoDelayT != panel->autoDelayT[row])
{
continue;
}
char *value = WMGetTextFieldText(anAutoDelayT);
adjustButtonSelectionBasedOnValue(panel, row, value);
return;
}
}
static void pushDockButton(WMWidget *w, void *data)
{
_Panel *panel = (_Panel *) data;
WMButton *button = (WMButton *) w;
if (button == panel->docksB[0] &&
!WMGetButtonSelected(panel->docksB[0]))
{
WMSetButtonSelected(panel->docksB[2], False);
}
if (button == panel->docksB[2] &&
WMGetButtonSelected(panel->docksB[2]))
{
WMSetButtonSelected(panel->docksB[0], True);
}
}
static void createPanel(Panel *p)
{
_Panel *panel = (_Panel *) p;
WMScreen *scr = WMWidgetScreen(panel->parent);
WMPixmap *icon1, *icon2;
RImage *xis = NULL;
RContext *rc = WMScreenRContext(scr);
char *path;
int i, j, k;
char *buf1, *buf2;
path = LocateImage(ARQUIVO_XIS);
if (path) {
xis = RLoadImage(rc, path, 0);
if (!xis) {
wwarning(_("could not load image file %s"), path);
}
wfree(path);
}
panel->box = WMCreateBox(panel->parent);
WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 2, 2);
/***************** Auto-delays *****************/
buf1 = wmalloc(strlen(DELAY_ICON) + 1);
buf2 = wmalloc(strlen(DELAY_ICON_S) + 1);
for (k = 0; k < 2; k++)
{
panel->autoDelayF[k] = WMCreateFrame(panel->box);
WMResizeWidget(panel->autoDelayF[k], 365, 100);
WMMoveWidget(panel->autoDelayF[k], 15, 10 + k * 110);
if (k == 0)
WMSetFrameTitle(panel->autoDelayF[k], _("Delays in milliseconds for autocollapsing clips"));
else
WMSetFrameTitle(panel->autoDelayF[k], _("Delays in milliseconds for autoraising clips"));
for (i = 0; i < 2; i++)
{
panel->autoDelayL[i + k * 2] = WMCreateLabel(panel->autoDelayF[k]);
WMResizeWidget(panel->autoDelayL[i + k * 2], 165, 20);
WMMoveWidget(panel->autoDelayL[i + k * 2], 10, 27 + 40 * i);
WMSetLabelText(panel->autoDelayL[i + k * 2], autoDelayStrings[i + k * 2]);
WMSetLabelTextAlignment(panel->autoDelayL[i + k * 2], WARight);
for (j = 0; j < 5; j++)
{
panel->autoDelayB[i + k * 2][j] = WMCreateCustomButton(panel->autoDelayF[k], WBBStateChangeMask);
WMResizeWidget(panel->autoDelayB[i + k * 2][j], 25, 25);
WMMoveWidget(panel->autoDelayB[i + k * 2][j], 175 + (25 * j), 25 + 40 * i);
WMSetButtonBordered(panel->autoDelayB[i + k * 2][j], False);
WMSetButtonImagePosition(panel->autoDelayB[i + k * 2][j], WIPImageOnly);
WMSetButtonAction(panel->autoDelayB[i + k * 2][j], pushAutoDelayButton, panel);
if (j > 0)
WMGroupButtons(panel->autoDelayB[i + k * 2][0], panel->autoDelayB[i + k * 2][j]);
sprintf(buf1, DELAY_ICON, j);
CreateImages(scr, rc, NULL, buf1, &icon1, NULL);
if (icon1) {
WMSetButtonImage(panel->autoDelayB[i + k * 2][j], icon1);
WMReleasePixmap(icon1);
} else {
wwarning(_("could not load icon file %s"), buf1);
}
sprintf(buf2, DELAY_ICON_S, j);
CreateImages(scr, rc, NULL, buf2, &icon2, NULL);
if (icon2) {
WMSetButtonAltImage(panel->autoDelayB[i + k * 2][j], icon2);
WMReleasePixmap(icon2);
} else {
wwarning(_("could not load icon file %s"), buf2);
}
}
panel->autoDelayT[i + k * 2] = WMCreateTextField(panel->autoDelayF[k]);
WMResizeWidget(panel->autoDelayT[i + k * 2], 36, 20);
WMMoveWidget(panel->autoDelayT[i + k * 2], 310, 27 + 40 * i);
WMAddNotificationObserver(autoDelayChanged, panel, WMTextDidChangeNotification, panel->autoDelayT[i + k * 2]);
}
WMMapSubwidgets(panel->autoDelayF[k]);
}
wfree(buf1);
wfree(buf2);
/***************** Enable/disable clip/dock/drawers *****************/
panel->dockF = WMCreateFrame(panel->box);
WMResizeWidget(panel->dockF, 115, 210);
WMMoveWidget(panel->dockF, 390, 10);
WMSetFrameTitle(panel->dockF, _("Dock/Clip/Drawer"));
for (i = 0; i < 3; i++)
{
panel->docksB[i] = WMCreateButton(panel->dockF, WBTToggle);
WMResizeWidget(panel->docksB[i], 56, 56);
WMMoveWidget(panel->docksB[i], 30, 20 + 62 * i);
WMSetButtonImagePosition(panel->docksB[i], WIPImageOnly);
CreateImages(scr, rc, xis, dockFiles[i], &icon1, &icon2);
if (icon2) {
WMSetButtonImage(panel->docksB[i], icon2);
WMReleasePixmap(icon2);
}
if (icon1) {
WMSetButtonAltImage(panel->docksB[i], icon1);
WMReleasePixmap(icon1);
}
switch(i)
{
case 0:
WMSetBalloonTextForView(_("Disable/enable the application Dock (the\n"
"vertical icon bar in the side of the screen)."), WMWidgetView(panel->docksB[i]));
break;
case 1:
WMSetBalloonTextForView(_("Disable/enable the Clip (that thing with\n"
"a paper clip icon)."), WMWidgetView(panel->docksB[i]));
break;
case 2:
WMSetBalloonTextForView(_("Disable/enable Drawers (a dock that stores\n"
"application icons horizontally). The dock is required."), WMWidgetView(panel->docksB[i]));
break;
}
WMSetButtonAction(panel->docksB[i], pushDockButton, panel);
}
WMMapSubwidgets(panel->dockF);
if (xis)
RReleaseImage(xis);
WMRealizeWidget(panel->box);
WMMapSubwidgets(panel->box);
showData(panel);
}
static void storeData(_Panel *panel)
{
int i;
for (i = 0; i < 4; i++)
{
SetStringForKey(WMGetTextFieldText(panel->autoDelayT[i]), autoDelayKeys[i]);
}
for (i = 0; i < 3; i++)
{
SetBoolForKey(!WMGetButtonSelected(panel->docksB[i]), dockDisablingKeys[i]);
}
}
static void showData(_Panel *panel)
{
char *value;
int i;
for (i = 0; i < 4; i++)
{
value = GetStringForKey(autoDelayKeys[i]);
WMSetTextFieldText(panel->autoDelayT[i], value);
adjustButtonSelectionBasedOnValue(panel, i, value);
}
for (i = 0; i < 3; i++)
{
WMSetButtonSelected(panel->docksB[i], !GetBoolForKey(dockDisablingKeys[i]));
}
}
Panel *InitDocks(WMScreen *scr, WMWidget *parent)
{
_Panel *panel;
autoDelayStrings[0] = _("Delay before auto-expansion");
autoDelayStrings[1] = _("Delay before auto-collapsing");
autoDelayStrings[2] = _("Delay before auto-raise");
autoDelayStrings[3] = _("Delay before auto-lowering");
panel = wmalloc(sizeof(_Panel));
memset(panel, 0, sizeof(_Panel));
panel->sectionName = _("Dock Preferences");
panel->description = _("Dock and clip features.\n"
"Enable/disable the Dock and Clip, and tune some delays.");
panel->parent = parent;
panel->callbacks.createWidgets = createPanel;
panel->callbacks.updateDomain = storeData;
AddSection(panel, ICON_FILE);
return panel;
}

View File

@@ -18,6 +18,7 @@ WPrefs_SOURCES = \
WPrefs.h \
Appearance.c \
Configurations.c \
Docks.c \
Expert.c \
Focus.c \
FontSimple.c \

View File

@@ -32,6 +32,8 @@ extern Panel *InitKeyboardShortcuts(WMScreen * scr, WMWidget * parent);
extern Panel *InitWorkspace(WMScreen * scr, WMWidget * parent);
extern Panel *InitDocks(WMScreen *scr, WMWidget *parent);
extern Panel *InitFocus(WMScreen * scr, WMWidget * parent);
extern Panel *InitPreferences(WMScreen * scr, WMWidget * parent);
@@ -392,6 +394,61 @@ char *LocateImage(char *name)
return path;
}
void CreateImages(WMScreen *scr, RContext *rc, RImage *xis, char *file,
WMPixmap **icon_normal, WMPixmap **icon_greyed)
{
RImage *icon;
char *path;
RColor gray = { 0xae, 0xaa, 0xae, 0 };
path = LocateImage(file);
if (!path)
{
*icon_normal = NULL;
if (icon_greyed)
*icon_greyed = NULL;
return;
}
*icon_normal = WMCreatePixmapFromFile(scr, path);
if (!*icon_normal)
{
wwarning(_("could not load icon %s"), path);
if (icon_greyed)
*icon_greyed = NULL;
wfree(path);
return;
}
if (!icon_greyed) // Greyed-out version not requested, we are done
{
wfree(path);
return;
}
icon = RLoadImage(rc, path, 0);
if (!icon)
{
wwarning(_("could not load icon %s"), path);
*icon_greyed = NULL;
wfree(path);
return;
}
RCombineImageWithColor(icon, &gray);
if (xis)
{
RCombineImagesWithOpaqueness(icon, xis, 180);
}
*icon_greyed = WMCreatePixmapFromRImage(scr, icon, 127);
if (!*icon_greyed)
{
wwarning(_("could not process icon %s: %s"), path, RMessageForError(RErrorCode));
}
RReleaseImage(icon);
wfree(path);
}
static WMPixmap *makeTitledIcon(WMScreen * scr, WMPixmap * icon, char *title1, char *title2)
{
return WMRetainPixmap(icon);
@@ -608,6 +665,7 @@ void Initialize(WMScreen * scr)
InitPreferences(scr, WPrefs.banner);
InitPaths(scr, WPrefs.banner);
InitDocks(scr, WPrefs.banner);
InitWorkspace(scr, WPrefs.banner);
InitConfigurations(scr, WPrefs.banner);

View File

@@ -76,6 +76,13 @@ char *LocateImage(char *name);
void SetButtonAlphaImage(WMScreen *scr, WMButton *bPtr, char *file,
char *title1, char *title2);
/* Loads `file' into `icon_normal'. If `icon_greyed' is not NULL,
* combine `icon_normal' with some grey and then optionally with image
* `xis', and store it in `icon_greyed' (typically to produce a
* greyed-out, red-crossed version of `icon_normal') */
void CreateImages(WMScreen *scr, RContext *rc, RImage *xis, char *file,
WMPixmap **icon_normal, WMPixmap **icon_greyed);
WMWindow *GetWindow(Panel *panel);
/* manipulate the dictionary for the WindowMaker domain */

View File

@@ -44,10 +44,6 @@ typedef struct _Panel {
WMLabel *posiL;
WMLabel *posL;
WMPopUpButton *posP;
WMFrame *dockF;
WMButton *dockB;
WMButton *clipB;
} _Panel;
#define ICON_FILE "workspace"
@@ -57,8 +53,6 @@ typedef struct _Panel {
#define CYCLE_FILE "cycleworkspaces"
#define ADVANCE_FILE "advancetonewworkspace"
#define WSNAME_FILE "workspacename"
#define DOCK_FILE "dock"
#define CLIP_FILE "clip"
static char *WSNamePositions[] = {
"none",
@@ -71,40 +65,6 @@ static char *WSNamePositions[] = {
"bottomright"
};
static void
createImages(WMScreen * scr, RContext * rc, RImage * xis, char *file, WMPixmap ** icon1, WMPixmap ** icon2)
{
RImage *icon;
RColor gray = { 0xae, 0xaa, 0xae, 0 };
*icon1 = WMCreatePixmapFromFile(scr, file);
if (!*icon1) {
wwarning(_("could not load icon %s"), file);
if (icon2)
*icon2 = NULL;
return;
}
if (!icon2)
return;
icon = RLoadImage(rc, file, 0);
if (!icon) {
wwarning(_("could not load icon %s"), file);
*icon2 = NULL;
return;
}
RCombineImageWithColor(icon, &gray);
if (xis) {
RCombineImagesWithOpaqueness(icon, xis, 180);
if (!(*icon2 = WMCreatePixmapFromRImage(scr, icon, 127))) {
wwarning(_("could not process icon %s: %s"), file, RMessageForError(RErrorCode));
*icon2 = NULL;
}
}
RReleaseImage(icon);
}
static void showData(_Panel * panel)
{
int i, idx;
@@ -116,10 +76,6 @@ static void showData(_Panel * panel)
WMSetButtonSelected(panel->newB, GetBoolForKey("AdvanceToNewWorkspace"));
WMSetButtonSelected(panel->dockB, !GetBoolForKey("DisableDock"));
WMSetButtonSelected(panel->clipB, !GetBoolForKey("DisableClip"));
str = GetStringForKey("WorkspaceNameDisplayPosition");
if (!str)
str = "center";
@@ -157,12 +113,12 @@ static void createPanel(Panel * p)
/***************** Workspace Navigation *****************/
panel->navF = WMCreateFrame(panel->box);
WMResizeWidget(panel->navF, 365, 210);
WMResizeWidget(panel->navF, 490, 210);
WMMoveWidget(panel->navF, 15, 10);
WMSetFrameTitle(panel->navF, _("Workspace Navigation"));
panel->cyclB = WMCreateSwitchButton(panel->navF);
WMResizeWidget(panel->cyclB, 280, 34);
WMResizeWidget(panel->cyclB, 410, 34);
WMMoveWidget(panel->cyclB, 75, 30);
WMSetButtonText(panel->cyclB, _("Wrap to the first workspace from the last workspace."));
@@ -170,18 +126,15 @@ static void createPanel(Panel * p)
WMResizeWidget(panel->cyclL, 60, 60);
WMMoveWidget(panel->cyclL, 10, 15);
WMSetLabelImagePosition(panel->cyclL, WIPImageOnly);
path = LocateImage(CYCLE_FILE);
if (path) {
createImages(scr, rc, xis, path, &icon1, NULL);
if (icon1) {
WMSetLabelImage(panel->cyclL, icon1);
WMReleasePixmap(icon1);
}
wfree(path);
CreateImages(scr, rc, xis, CYCLE_FILE, &icon1, NULL);
if (icon1)
{
WMSetLabelImage(panel->cyclL, icon1);
WMReleasePixmap(icon1);
}
/**/ panel->linkB = WMCreateSwitchButton(panel->navF);
WMResizeWidget(panel->linkB, 280, 34);
WMResizeWidget(panel->linkB, 410, 34);
WMMoveWidget(panel->linkB, 75, 75);
WMSetButtonText(panel->linkB, _("Switch workspaces while dragging windows."));
@@ -189,18 +142,15 @@ static void createPanel(Panel * p)
WMResizeWidget(panel->linkL, 60, 40);
WMMoveWidget(panel->linkL, 10, 80);
WMSetLabelImagePosition(panel->linkL, WIPImageOnly);
path = LocateImage(DONT_LINK_FILE);
if (path) {
createImages(scr, rc, xis, path, &icon1, NULL);
if (icon1) {
WMSetLabelImage(panel->linkL, icon1);
WMReleasePixmap(icon1);
}
wfree(path);
CreateImages(scr, rc, xis, DONT_LINK_FILE, &icon1, NULL);
if (icon1)
{
WMSetLabelImage(panel->linkL, icon1);
WMReleasePixmap(icon1);
}
/**/ panel->newB = WMCreateSwitchButton(panel->navF);
WMResizeWidget(panel->newB, 280, 34);
WMResizeWidget(panel->newB, 410, 34);
WMMoveWidget(panel->newB, 75, 120);
WMSetButtonText(panel->newB, _("Automatically create new workspaces."));
@@ -208,39 +158,33 @@ static void createPanel(Panel * p)
WMResizeWidget(panel->newL, 60, 20);
WMMoveWidget(panel->newL, 10, 130);
WMSetLabelImagePosition(panel->newL, WIPImageOnly);
path = LocateImage(ADVANCE_FILE);
if (path) {
createImages(scr, rc, xis, path, &icon1, NULL);
if (icon1) {
WMSetLabelImage(panel->newL, icon1);
WMReleasePixmap(icon1);
}
wfree(path);
CreateImages(scr, rc, xis, ADVANCE_FILE, &icon1, NULL);
if (icon1)
{
WMSetLabelImage(panel->newL, icon1);
WMReleasePixmap(icon1);
}
/**/ panel->posL = WMCreateLabel(panel->navF);
WMResizeWidget(panel->posL, 140, 30);
WMResizeWidget(panel->posL, 200, 30);
WMMoveWidget(panel->posL, 75, 165);
WMSetLabelTextAlignment(panel->posL, WARight);
WMSetLabelText(panel->posL, _("Position of workspace\nname display"));
// WMSetLabelTextAlignment(panel->posL, WARight);
WMSetLabelText(panel->posL, _("Position of workspace name display"));
panel->posiL = WMCreateLabel(panel->navF);
WMResizeWidget(panel->posiL, 60, 40);
WMMoveWidget(panel->posiL, 10, 160);
WMSetLabelImagePosition(panel->posiL, WIPImageOnly);
path = LocateImage(WSNAME_FILE);
if (path) {
createImages(scr, rc, xis, path, &icon1, NULL);
if (icon1) {
WMSetLabelImage(panel->posiL, icon1);
WMReleasePixmap(icon1);
}
wfree(path);
CreateImages(scr, rc, xis, WSNAME_FILE, &icon1, NULL);
if (icon1)
{
WMSetLabelImage(panel->posiL, icon1);
WMReleasePixmap(icon1);
}
panel->posP = WMCreatePopUpButton(panel->navF);
WMResizeWidget(panel->posP, 125, 20);
WMMoveWidget(panel->posP, 225, 175);
WMMoveWidget(panel->posP, 290, 170);
WMAddPopUpButtonItem(panel->posP, _("Disable"));
WMAddPopUpButtonItem(panel->posP, _("Center"));
WMAddPopUpButtonItem(panel->posP, _("Top"));
@@ -252,54 +196,6 @@ static void createPanel(Panel * p)
WMMapSubwidgets(panel->navF);
/***************** Dock/Clip *****************/
panel->dockF = WMCreateFrame(panel->box);
WMResizeWidget(panel->dockF, 115, 210);
WMMoveWidget(panel->dockF, 390, 10);
WMSetFrameTitle(panel->dockF, _("Dock/Clip"));
panel->dockB = WMCreateButton(panel->dockF, WBTToggle);
WMResizeWidget(panel->dockB, 64, 64);
WMMoveWidget(panel->dockB, 25, 35);
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);
}
wfree(path);
}
WMSetBalloonTextForView(_("Disable/enable the application Dock (the\n"
"vertical icon bar in the side of the screen)."), WMWidgetView(panel->dockB));
panel->clipB = WMCreateButton(panel->dockF, WBTToggle);
WMResizeWidget(panel->clipB, 64, 64);
WMMoveWidget(panel->clipB, 25, 120);
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);
}
wfree(path);
}
WMSetBalloonTextForView(_("Disable/enable the Clip (that thing with\n"
"a paper clip icon)."), WMWidgetView(panel->clipB));
WMMapSubwidgets(panel->dockF);
if (xis)
RReleaseImage(xis);
@@ -315,9 +211,6 @@ static void storeData(_Panel * panel)
SetBoolForKey(WMGetButtonSelected(panel->cyclB), "CycleWorkspaces");
SetBoolForKey(WMGetButtonSelected(panel->newB), "AdvanceToNewWorkspace");
SetBoolForKey(!WMGetButtonSelected(panel->dockB), "DisableDock");
SetBoolForKey(!WMGetButtonSelected(panel->clipB), "DisableClip");
SetStringForKey(WSNamePositions[WMGetPopUpButtonSelectedItem(panel->posP)],
"WorkspaceNameDisplayPosition");
}

View File

@@ -8,6 +8,7 @@ EXTRA_DIST = \
configs.tiff \
cycleworkspaces.tiff \
dock.tiff \
dockclipdrawersection.tiff \
dontlinkworkspaces.tiff \
ergonomic.tiff \
expert.tiff \

Binary file not shown.

BIN
WPrefs.app/tiff/drawer.tiff Normal file

Binary file not shown.

View File

@@ -9,6 +9,7 @@ EXTRA_DIST = \
configs.xpm \
cycleworkspaces.xpm \
dock.xpm \
dockclipdrawersection.xpm \
dontlinkworkspaces.xpm \
ergonomic.xpm \
expert.xpm \

View File

@@ -0,0 +1,307 @@
/* XPM */
static char * dockclipdrawersection_xpm[] = {
"48 48 256 2",
" c #000100",
". c #000609",
"+ c #030601",
"@ c #0B080D",
"# c #070A06",
"$ c #080E10",
"% c #110E12",
"& c #131114",
"* c #0E1315",
"= c #121311",
"- c #161417",
"; c #18171A",
"> c #191A21",
", c #1C1A1D",
"' c #1C1C24",
") c #1E1F26",
"! c #232124",
"~ c #202426",
"{ c #222421",
"] c #22232B",
"^ c #252427",
"/ c #25252D",
"( c #27282F",
"_ c #29282B",
": c #2B2B33",
"< c #2B2D2A",
"[ c #2D2E36",
"} c #303038",
"| c #323034",
"1 c #2F3335",
"2 c #34353D",
"3 c #373538",
"4 c #383941",
"5 c #3C3A3D",
"6 c #393D4A",
"7 c #3D3E46",
"8 c #403E41",
"9 c #42424B",
"0 c #3F4350",
"a c #424441",
"b c #454346",
"c c #46464F",
"d c #464845",
"e c #4A484B",
"f c #434A51",
"g c #484951",
"h c #4D4B4F",
"i c #4D4D56",
"j c #4B4E5C",
"k c #505059",
"l c #515351",
"m c #53545D",
"n c #525563",
"o c #6C5612",
"p c #4F575E",
"q c #575760",
"r c #5A585C",
"s c #6F591D",
"t c #6C5B16",
"u c #5D5B59",
"v c #5B5B64",
"w c #585C6A",
"x c #725D20",
"y c #5F5D61",
"z c #5B5F6C",
"A c #72611F",
"B c #606069",
"C c #5D616F",
"D c #5E627B",
"E c #5F6371",
"F c #7A6327",
"G c #646563",
"H c #64646D",
"I c #5E666D",
"J c #5E6578",
"K c #616668",
"L c #616572",
"M c #7C6529",
"N c #676568",
"O c #6A646E",
"P c #636774",
"Q c #676770",
"R c #656876",
"S c #666983",
"T c #676B79",
"U c #816D19",
"V c #72696F",
"W c #726C57",
"X c #706A74",
"Y c #696D70",
"Z c #6B6C75",
"` c #6F6C70",
" . c #7D6E3B",
".. c #6A6E7C",
"+. c #837024",
"@. c #6B6F89",
"#. c #6D707F",
"$. c #70717A",
"%. c #887320",
"&. c #6E718C",
"*. c #797076",
"=. c #747276",
"-. c #927503",
";. c #8B7519",
">. c #87742F",
",. c #6F7381",
"'. c #7D7367",
"). c #767382",
"!. c #717583",
"~. c #6F768A",
"{. c #8D7825",
"]. c #78767A",
"^. c #737785",
"/. c #7A7772",
"(. c #8D792D",
"_. c #8C7933",
":. c #757988",
"<. c #7B797D",
"[. c #747B8F",
"}. c #7D798A",
"|. c #807984",
"1. c #7A7B84",
"2. c #787C8A",
"3. c #837A80",
"4. c #977C32",
"5. c #877986",
"6. c #917E3F",
"7. c #777E92",
"8. c #7A7E8C",
"9. c #807D8D",
"0. c #877D7A",
"a. c #7C808F",
"b. c #837F90",
"c. c #7B8296",
"d. c #7E8291",
"e. c #887F94",
"f. c #98843E",
"g. c #90826B",
"h. c #9E8339",
"i. c #828297",
"j. c #898471",
"k. c #9D862C",
"l. c #A38525",
"m. c #818593",
"n. c #A28534",
"o. c #8D8489",
"p. c #85868F",
"q. c #85859A",
"r. c #A5872F",
"s. c #8B8590",
"t. c #838796",
"u. c #918585",
"v. c #8D8875",
"w. c #8A8697",
"x. c #9D884E",
"y. c #868A99",
"z. c #8C8993",
"A. c #AD8932",
"B. c #8C8A8E",
"C. c #8A8A9F",
"D. c #A58D33",
"E. c #AB8C2C",
"F. c #928C79",
"G. c #858CA0",
"H. c #AA8C34",
"I. c #A58B4D",
"J. c #9089A1",
"K. c #A58E3B",
"L. c #898D9C",
"M. c #AC8E3D",
"N. c #A99036",
"O. c #938D98",
"P. c #8B8F9E",
"Q. c #9B8E7D",
"R. c #8E8EA4",
"S. c #AE9037",
"T. c #B09131",
"U. c #AB9145",
"V. c #8D91A0",
"W. c #AC9331",
"X. c #9390A0",
"Y. c #8F9396",
"Z. c #8F93A2",
"`. c #AE953B",
" + c #9592A3",
".+ c #B3943C",
"++ c #A19571",
"@+ c #9195A4",
"#+ c #A49194",
"$+ c #9B94A0",
"%+ c #9B93AB",
"&+ c #B1983E",
"*+ c #9497A6",
"=+ c #9996A6",
"-+ c #979996",
";+ c #9798A2",
">+ c #B5984D",
",+ c #B09A53",
"'+ c #9D99AA",
")+ c #979BAA",
"!+ c #A098B0",
"~+ c #BC9C43",
"{+ c #9A9FA1",
"]+ c #BBA03F",
"^+ c #C2A141",
"/+ c #9EA2B1",
"(+ c #AD9EB8",
"_+ c #ACA2A8",
":+ c #AFA1AF",
"<+ c #B9A66E",
"[+ c #A9A7AB",
"}+ c #A9ABA8",
"|+ c #B7A9B6",
"1+ c #B2ABB6",
"2+ c #AFACBD",
"3+ c #B0AEB2",
"4+ c #BCABB3",
"5+ c #C7B068",
"6+ c #BDAEC8",
"7+ c #CBB46B",
"8+ c #BBB1B8",
"9+ c #D3B56E",
"0+ c #D3B769",
"a+ c #CFB86F",
"b+ c #B5BABD",
"c+ c #B8BAB7",
"d+ c #BFBDC1",
"e+ c #BFBCCD",
"f+ c #BEC1BD",
"g+ c #C6C8C5",
"h+ c #C6CCCE",
"i+ c #E0CD7B",
"j+ c #D0CDD1",
"k+ c #D2D0D4",
"l+ c #D6D4D8",
"m+ c #D7D8E2",
"n+ c #DBD8DD",
"o+ c #DADCD9",
"p+ c #D8DDE0",
"q+ c #DCDDE7",
"r+ c #F4E08D",
"s+ c #E1E2EC",
"t+ c #E3E5E1",
"u+ c #E8E5EA",
"v+ c #E5E6F0",
"w+ c #ECE9EE",
"x+ c #E9EAF4",
"y+ c #EFEDF1",
"z+ c #EDEEF8",
"A+ c #F0F2EF",
"B+ c #F4F1F6",
"C+ c #F2F3FD",
"D+ c #F8F5FA",
"E+ c #FBF8FD",
"F+ c #FCFEFB",
"G+ c #FEFFFC",
"+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ",
"+ D D D D D D D D D D D D D D D D D D D D D D D E+B+B+B+y+y+z+y+y+y+x+x+x+w+w+u+u+u+s+s+s+s+[+G+",
"+ D D D D D D D D D D D D D D D D D D D D D D D B+=+=+*+*+ +V.P.L.L.y.y.t.m.m.d.a.8.2.:.:.^.} G+",
"+ D D D D D D D D D D D D D D D D D D D D D D D B+'+)+)+'+*+*+Z.V.P.L.L.y.y.t.m.m.d.a.8.2.2.2 G+",
"+ D D D D D D D D D D D D D D D D D D D D D D D z+*+)+*+*+*+Z.*+Z.1.Z Z Z $.y.m.d.a.8.2.2.2.2 G+",
"+ D D D D D D D D D D D D D D D D D D D D D D D z+=+*+*+*+Z.=+K @ # . . . + = ^.m.8.2.:.:.^.} G+",
"+ D D D D D D D D D D D D D D D D D D D D D D D y+*+*+*+V.P._ + + + + + + + + + 4 #.#.,.^.^.} G+",
"+ D D D D D D D D D D D D D D D D D D D D D D D y+ +*+Z./+, + + + + + + + + /.f+g+3 $ 2 !.!.} G+",
"+ D D D D D D D D D D D D D D D D D D D D D D D y+X.Z.*+; + + + + + + + + + -+G+G+G+% _ !.,.} G+",
"+ D D D D D D D D D D D D D D D D D D D D D D D y+P.V.2.@ + + + + + + + + + -+G+G+G+3+! ,.,.} G+",
"+ D D D D D D D D D D D D D D D D D D D D D D D y+L.P.B + + + + + + + + + + -+G+G+G+o+5 #.#.[ G+",
"+ D D D D D D D D D D D D D D D D D D D D D D D x+L.L.B + + + + + + + + + + -+G+G+G+A+y #...: G+",
"+ D D D D D D D D D D D D D D D D D D D D D D D x+L.L.B + + + + % b d a l d f+G+G+G+A+y ....: G+",
"+ D D D D D D D D D D D D D D D D D D D D D D D w+y.y.B + + + + = t+G+G+G+G+G+G+G+G+A+r ..T : G+",
"+ D D D D D D D D D D D D D D D D D D D D D D D w+t.y.v + + + + = o+G+G+G+G+G+G+G+G+o+3 R R : G+",
"+ D D D D D D D D D D D D D D D D D D D D D D D u+m.t.1.$ + + + = o+G+G+G+G+G+G+G+G+g+> R R ( G+",
"+ D D D D D D D D D D D D D D D D D D D D D D D u+m.m.y.c + + + = o+G+G+G+G+G+G+G+D+= ~ R L ( G+",
"+ D D D D D D D D D D D D D D D D D D D D D D D u+d.m.H ^ . l a l t+G+G+G+G+G+G+G+1 + ^ L E ( G+",
"+ D D D D D D D D D D D D D D D D D D D D D D D s+a.d.q + + G t+G+G+G+G+G+G+G+p+b + + ! E C / G+",
"+ D D D D D D D D D D D D D D D D D D D D D D D s+8.a.m + + + + u }+g+G+o+c+u # + + + ) z z / G+",
"+ D D D D D D D D D D D D D D D D D D D D D D D s+2.8.,.q q q m k g c 7 9 c g g g c c j z z / G+",
"+ D D D D D D D D D D D D D D D D D D D D D D D s+2.2.2.2.:.^.^.,.,.,.#.....R R P L E z z z ] G+",
"+ D D D D D D D D D D D D D D D D D D D D D D D s+:.2.:.:.!.!.,.#.#.....T R R L E C z z w w ] G+",
"+ &.&.&.&.&.&.&.&.&.&.&.&.&.@.@.&.@.@.@.@.@.@.S Y.} 2 } } } } } } } : : : : : ( ( ( ( / / ] ) G+",
"+ D+s+s+s+s+q+q+q+q+q+q+m+m+m+b+m+m+m+m+m+m+m+B.B+n+n+n+n+n+n+n+l+l+l+l+l+l+k+k+j+j+j+j+j+j+{+G+",
"+ B+=+)+'+*+Z.=+Z.V.P.L.L.y.t.V.h 2.a.E z z R ( D+'+'+)+'+*+=+Z.V.P.L.L.y.y.t.m.m.d.a.8.2.2.2 G+",
"+ B+=+'+'+,.@ H Z.V.P.L.L.y.y.t.y.q 2.z . + | ( C+)+'+)+*+*+=+Z.V.P.L.L.y.y.t.m.m.d.a.8.2.2.2 G+",
"+ B+=+)+=+y.t.i V.P.L.y.y.t.m.m.d.m.5 2.L + 3 / C+'+)+*+=+Z.Z.V.P.L.L.y.t.t.m.d.d.a.8.2.2.:.2 G+",
"+ B+Z.*+=+P.9 t.P.L.y.y.t.m.m.d.a.8.m.7 #.E 4 / C+*+*+=+Z.Z.R.P.Q.Q.F.v.v.v.v.j.j.j.j.1.:.:.} G+",
"+ y+X.*+Z.Z.Z.P.L.y.y.t.m.m.d.a.w.s.3.<.| ^.,.] C+=+*+Z.Z.R.++>+.+T.E.E.l.H.H.H.E.T.f.<.^.^.} G+",
"+ z+X.*+V.V.P.L.y.y.t.m.m.d.J.(+o.I v ].o.! ..] C+Z.*+Z.R.0+a+7+7+5+7+5+5+5+5+5+5+h.6.].!.!.} G+",
"+ z+P.Z.P.P.L.y.y.t.m.m.C.3.%+2+1+=.v B y ^.4 ' C+V.Z.V.R.a+^+^+^+^+^+]+]+]+^+~+A 4._.].,.,.} G+",
"+ z+L.V.P.L.y.y.t.m.m.9.e.6+f 8 c V B Z #.,.!.. C+P.V.P.G.a+~+~+~+~+~+&+&+&+`..+t (._.=.#.#.} G+",
"+ z+y.P.L.y.y.t.t.w.|.|+H b 8 k H O q $.v #.#.] z+L.P.a.q.a+~+~+`.r.H.N.E.,+`.`.t {._.=.#.#.[ G+",
"+ x+y.P.y.y.t.m.:.|+:+v 8 9 B #.$.}.q.p m ....) z+L.*+< [.a+~+~+&+H.i+r+N.>+`.H.t (.>.=.....: G+",
"+ x+t.L.y.t.d.=+_+|.h 8 i Q ,.2.Z 9.r i q ....) z+V.< < [.a+~+~+`.r.0+9++.,+N.H.t %.+.` ....: G+",
"+ w+t.y.t.b.8+O.|.8 b v ..,.}.e.*.q 8 k B T T ' z+L.$.{ [.a+~+&+.+U.>+6.x.<+E.D.t %.U Y R R : G+",
"+ u+m.t.;+u.1+k 8 h Q ,.,.!+5.).c 8 i B R R R ' z+t.y.Q ~.7+~+&+&+`.`.W.S.H.N.N.t U +.` R R : G+",
"+ d+,.m.4+O.c 9 q $...t.:+B X 7 9 q Q R R R R > x+t.t.m.c.7+M.K.K.D.k.k.n.k.k.k.t %.+.` R R ( G+",
"+ w+4 P.o.B b B ,.$.e+O s.g 8 i B R R R R P P > x+m.t.d.i.<+M F F F x s s s o o o %.+.N P L ( G+",
"+ u+)+: ).0.m Q P.$+s.H 8 9 q R R R R R L L L > x+d.m.d.7..+U.I.I.x.A.h.l._.6.(.-.;. .J L L ( G+",
"+ u+,.L.k $.#+_+X.].i 8 i B R R R R T L E E C > v+a.d.8.8.g.0.^.!.!./.=.'.....R W W J E C C / G+",
"+ v+6 L L./ |._+N 8 b q H ....R R R , R C z C > v+8.a.8.2.:.^.!.!.,.#.#.....R R R L E C z z / G+",
"+ s+0 + j L.g i i 5 4 + ^ B 2 k } _ . c 7 c c $ v+2.8.2.:.^.!.!.,.#.#.....R R R L E C z z z / G+",
"+ s+0 + + n :.7 :.,.* z , w - : + #.$ * z ] + % v+2.2.2.:.^.!.,.,.#.....T R R L L E z z w w ] G+",
"+ u+2.z.p.p.8.y.2 C B ,.R #.q R k R j E c c 9 @ x+8.a.8.2.:.:.^.!.,.#.#.....R R P L E z z z ] G+",
"+ f+; ; ; ; ; - , $ & - - - - & & & % % % % $ @ h+; , ; ; ; ; - - - - - - & & * & % % % % % . G+",
"+ G+G+G+G+G+G+G+G+G+G+G+G+G+G+G+G+G+G+G+G+G+G+G+G+G+G+G+G+G+G+G+G+G+G+G+G+G+G+G+G+G+G+G+G+G+G+G+"};

1149
WPrefs.app/xpm/drawer.xpm Normal file

File diff suppressed because it is too large Load Diff