mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 12:28:22 +01:00
Fix some bugs, DisableMiniwindows, _KWM_WIN_ICON_GEOMETRY..
This commit is contained in:
@@ -15,7 +15,9 @@ Changes since version 0.51.2:
|
|||||||
- show kbd mode for modelock (id@windowmaker.org)
|
- show kbd mode for modelock (id@windowmaker.org)
|
||||||
- enhanced positioning of transient windows
|
- enhanced positioning of transient windows
|
||||||
- added dynamically loadable texture renderer code (from ?)
|
- added dynamically loadable texture renderer code (from ?)
|
||||||
|
- added DisableMiniwindows option
|
||||||
|
- kde: miniaturize animation will match the taskbar icon (KWM_WIN_ICON_GEOMETRY)
|
||||||
|
- miniwindows show the title of the window if there is none set for it
|
||||||
|
|
||||||
Changes since version 0.51.1:
|
Changes since version 0.51.1:
|
||||||
.............................
|
.............................
|
||||||
|
|||||||
2
INSTALL
2
INSTALL
@@ -273,7 +273,7 @@ PLATFORM SPECIFIC NOTES:
|
|||||||
* make sure you have /lib/cpp pointing to the cpp program
|
* make sure you have /lib/cpp pointing to the cpp program
|
||||||
|
|
||||||
If you have any doubts in doing any of the stuff above, please
|
If you have any doubts in doing any of the stuff above, please
|
||||||
don't exitate to contact the RedHat user support. They will
|
don't hesitate to contact the RedHat user support. They will
|
||||||
kindly answer to all your questions regarding their system.
|
kindly answer to all your questions regarding their system.
|
||||||
They also know much more about their own system than us
|
They also know much more about their own system than us
|
||||||
(we don't use RedHat).
|
(we don't use RedHat).
|
||||||
|
|||||||
11
Makefile.in
11
Makefile.in
@@ -104,14 +104,14 @@ mkinstalldirs src/config.h.in src/stamp-h.in
|
|||||||
|
|
||||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
|
||||||
TAR = tar
|
TAR = gtar
|
||||||
GZIP_ENV = --best
|
GZIP_ENV = --best
|
||||||
all: all-redirect
|
all: all-redirect
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps Makefile
|
cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile
|
||||||
|
|
||||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||||
cd $(top_builddir) \
|
cd $(top_builddir) \
|
||||||
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||||
|
|
||||||
@@ -278,6 +278,11 @@ distdir: $(DISTFILES)
|
|||||||
-rm -rf $(distdir)
|
-rm -rf $(distdir)
|
||||||
mkdir $(distdir)
|
mkdir $(distdir)
|
||||||
-chmod 777 $(distdir)
|
-chmod 777 $(distdir)
|
||||||
|
here=`cd $(top_builddir) && pwd`; \
|
||||||
|
top_distdir=`cd $(distdir) && pwd`; \
|
||||||
|
distdir=`cd $(distdir) && pwd`; \
|
||||||
|
cd $(top_srcdir) \
|
||||||
|
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu Makefile
|
||||||
@for file in $(DISTFILES); do \
|
@for file in $(DISTFILES); do \
|
||||||
d=$(srcdir); \
|
d=$(srcdir); \
|
||||||
if test -d $$d/$$file; then \
|
if test -d $$d/$$file; then \
|
||||||
|
|||||||
26
NEWS
26
NEWS
@@ -4,6 +4,14 @@ NEWS for veteran Window Maker users
|
|||||||
|
|
||||||
--- 0.51.2
|
--- 0.51.2
|
||||||
|
|
||||||
|
|
||||||
|
Appearance Editing in WPrefs
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
Added Appearance/Texture editing capability in WPrefs. Workspace background
|
||||||
|
selection is not yet finished.
|
||||||
|
|
||||||
|
|
||||||
New Themes
|
New Themes
|
||||||
----------
|
----------
|
||||||
|
|
||||||
@@ -53,6 +61,24 @@ or $(sysconfdir)/WindowMaker
|
|||||||
|
|
||||||
Window Maker has become a GNU program (part of the GNU Project).
|
Window Maker has become a GNU program (part of the GNU Project).
|
||||||
|
|
||||||
|
Title text drop shadow
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
drop shadow option added for titlebar text. The is a compile time
|
||||||
|
option which needs to be defined in src/wconfig.h after you run
|
||||||
|
configure and before you run make.
|
||||||
|
|
||||||
|
New options and syntax for your WindowMaker domain file are:
|
||||||
|
|
||||||
|
Shadow = yes/no;
|
||||||
|
FShadowColor = <color>;
|
||||||
|
PShadowColor = <color>;
|
||||||
|
UShadowColor = <color>;
|
||||||
|
MShadowColor = <color>;
|
||||||
|
|
||||||
|
The shadow option is dynamic (no need for a restart).
|
||||||
|
MShadowColor is for the menu title text.
|
||||||
|
|
||||||
libPropList
|
libPropList
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
|
|||||||
@@ -251,6 +251,8 @@ void WMEnqueueCoalesceNotification(WMNotificationQueue *queue,
|
|||||||
|
|
||||||
WMUserDefaults *WMGetStandardUserDefaults(void);
|
WMUserDefaults *WMGetStandardUserDefaults(void);
|
||||||
|
|
||||||
|
void WMSynchronizeUserDefaults(WMUserDefaults *database);
|
||||||
|
|
||||||
proplist_t WMGetUDObjectForKey(WMUserDefaults *database, char *defaultName);
|
proplist_t WMGetUDObjectForKey(WMUserDefaults *database, char *defaultName);
|
||||||
|
|
||||||
void WMSetUDObjectForKey(WMUserDefaults *database, proplist_t object,
|
void WMSetUDObjectForKey(WMUserDefaults *database, proplist_t object,
|
||||||
|
|||||||
@@ -89,6 +89,15 @@ saveDefaultsChanges(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
WMSynchronizeUserDefaults(WMUserDefaults *database)
|
||||||
|
{
|
||||||
|
/* TODO: check what it should really do */
|
||||||
|
PLSave(database->appDomain, YES);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
WMUserDefaults*
|
WMUserDefaults*
|
||||||
WMGetStandardUserDefaults(void)
|
WMGetStandardUserDefaults(void)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -95,6 +95,9 @@ WMCreateAlertPanel(WMScreen *scrPtr, WMWindow *owner,
|
|||||||
panel->win = WMCreateWindowWithStyle(scrPtr, "alertPanel",
|
panel->win = WMCreateWindowWithStyle(scrPtr, "alertPanel",
|
||||||
WMTitledWindowMask);
|
WMTitledWindowMask);
|
||||||
|
|
||||||
|
WMSetWindowUPosition(panel->win,
|
||||||
|
(scrPtr->rootView->size.width - WMWidgetWidth(panel->win))/2,
|
||||||
|
(scrPtr->rootView->size.height - WMWidgetHeight(panel->win))/2);
|
||||||
WMSetWindowTitle(panel->win, "");
|
WMSetWindowTitle(panel->win, "");
|
||||||
|
|
||||||
if (scrPtr->applicationIcon) {
|
if (scrPtr->applicationIcon) {
|
||||||
|
|||||||
@@ -25,6 +25,13 @@
|
|||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
#include <time.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -79,6 +86,7 @@ typedef struct {
|
|||||||
|
|
||||||
char selectedFor;
|
char selectedFor;
|
||||||
unsigned current:1;
|
unsigned current:1;
|
||||||
|
unsigned ispixmap:1;
|
||||||
} TextureListItem;
|
} TextureListItem;
|
||||||
|
|
||||||
|
|
||||||
@@ -221,6 +229,22 @@ dumpRImage(char *path, RImage *image)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static int
|
||||||
|
isPixmap(proplist_t prop)
|
||||||
|
{
|
||||||
|
proplist_t p;
|
||||||
|
char *s;
|
||||||
|
|
||||||
|
p = PLGetArrayElement(prop, 0);
|
||||||
|
s = PLGetString(p);
|
||||||
|
if (strcasecmp(&s[1], "pixmap")==0)
|
||||||
|
return 1;
|
||||||
|
else
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static Pixmap
|
static Pixmap
|
||||||
renderTexture(WMScreen *scr, proplist_t texture, int width, int height,
|
renderTexture(WMScreen *scr, proplist_t texture, int width, int height,
|
||||||
char *path, int border)
|
char *path, int border)
|
||||||
@@ -255,6 +279,7 @@ renderTexture(WMScreen *scr, proplist_t texture, int width, int height,
|
|||||||
case 'H':
|
case 'H':
|
||||||
style = RHorizontalGradient;
|
style = RHorizontalGradient;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
case 'D':
|
case 'D':
|
||||||
style = RDiagonalGradient;
|
style = RDiagonalGradient;
|
||||||
break;
|
break;
|
||||||
@@ -266,7 +291,51 @@ renderTexture(WMScreen *scr, proplist_t texture, int width, int height,
|
|||||||
str2rcolor(rc, str, &rcolor2);
|
str2rcolor(rc, str, &rcolor2);
|
||||||
|
|
||||||
image = RRenderGradient(width, height, &rcolor, &rcolor2, style);
|
image = RRenderGradient(width, height, &rcolor, &rcolor2, style);
|
||||||
} else if (strcasecmp(&type[2], "gradient")==0) {
|
} else if (strcasecmp(&type[2], "gradient")==0 && toupper(type[0])=='T') {
|
||||||
|
int style;
|
||||||
|
RColor rcolor2;
|
||||||
|
int i;
|
||||||
|
RImage *grad, *timage;
|
||||||
|
char *path;
|
||||||
|
|
||||||
|
switch (toupper(type[1])) {
|
||||||
|
case 'V':
|
||||||
|
style = RVerticalGradient;
|
||||||
|
break;
|
||||||
|
case 'H':
|
||||||
|
style = RHorizontalGradient;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
case 'D':
|
||||||
|
style = RDiagonalGradient;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
str = PLGetString(PLGetArrayElement(texture, 3));
|
||||||
|
str2rcolor(rc, str, &rcolor);
|
||||||
|
str = PLGetString(PLGetArrayElement(texture, 4));
|
||||||
|
str2rcolor(rc, str, &rcolor2);
|
||||||
|
|
||||||
|
str = PLGetString(PLGetArrayElement(texture, 1));
|
||||||
|
|
||||||
|
path = wfindfileinarray(GetObjectForKey("PixmapPath"), str);
|
||||||
|
timage = RLoadImage(rc, path, 0);
|
||||||
|
|
||||||
|
if (!timage) {
|
||||||
|
wwarning("could not load file '%s': %s", path,
|
||||||
|
RMessageForError(RErrorCode));
|
||||||
|
} else {
|
||||||
|
grad = RRenderGradient(width, height, &rcolor, &rcolor2, style);
|
||||||
|
|
||||||
|
image = RMakeTiledImage(timage, width, height);
|
||||||
|
RDestroyImage(timage);
|
||||||
|
|
||||||
|
i = atoi(PLGetString(PLGetArrayElement(texture, 2)));
|
||||||
|
|
||||||
|
RCombineImagesWithOpaqueness(image, grad, i);
|
||||||
|
RDestroyImage(grad);
|
||||||
|
}
|
||||||
|
} else if (strcasecmp(&type[2], "gradient")==0 && toupper(type[0])=='M') {
|
||||||
int style;
|
int style;
|
||||||
RColor **colors;
|
RColor **colors;
|
||||||
int i, j;
|
int i, j;
|
||||||
@@ -278,6 +347,7 @@ renderTexture(WMScreen *scr, proplist_t texture, int width, int height,
|
|||||||
case 'H':
|
case 'H':
|
||||||
style = RHorizontalGradient;
|
style = RHorizontalGradient;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
case 'D':
|
case 'D':
|
||||||
style = RDiagonalGradient;
|
style = RDiagonalGradient;
|
||||||
break;
|
break;
|
||||||
@@ -302,40 +372,49 @@ renderTexture(WMScreen *scr, proplist_t texture, int width, int height,
|
|||||||
free(colors);
|
free(colors);
|
||||||
}
|
}
|
||||||
} else if (strcasecmp(&type[1], "pixmap")==0) {
|
} else if (strcasecmp(&type[1], "pixmap")==0) {
|
||||||
int style;
|
|
||||||
RImage *timage;
|
RImage *timage;
|
||||||
int w, h;
|
int w, h;
|
||||||
char *path;
|
char *path;
|
||||||
|
RColor color;
|
||||||
|
|
||||||
str = PLGetString(PLGetArrayElement(texture, 1));
|
str = PLGetString(PLGetArrayElement(texture, 1));
|
||||||
|
|
||||||
path = wfindfileinarray(GetObjectForKey("PixmapPath"), str);
|
path = wfindfileinarray(GetObjectForKey("PixmapPath"), str);
|
||||||
timage = RLoadImage(rc, path, 0);
|
timage = RLoadImage(rc, path, 0);
|
||||||
free(path);
|
|
||||||
|
|
||||||
if (toupper(type[0]) == 'T') {
|
if (!timage) {
|
||||||
if (timage->width < TEXPREV_WIDTH
|
wwarning("could not load file '%s': %s", path,
|
||||||
|| timage->height < TEXPREV_HEIGHT) {
|
RMessageForError(RErrorCode));
|
||||||
image = RMakeTiledImage(timage, TEXPREV_WIDTH, TEXPREV_HEIGHT);
|
} else {
|
||||||
|
str = PLGetString(PLGetArrayElement(texture, 2));
|
||||||
|
str2rcolor(rc, str, &color);
|
||||||
|
|
||||||
|
switch (toupper(type[0])) {
|
||||||
|
case 'T':
|
||||||
|
image = RMakeTiledImage(timage, width, height);
|
||||||
RDestroyImage(timage);
|
RDestroyImage(timage);
|
||||||
timage = image;
|
timage = image;
|
||||||
}
|
break;
|
||||||
} else if (timage) {
|
case 'C':
|
||||||
w = timage->width;
|
image = RMakeCenteredImage(timage, width, height, &color);
|
||||||
h = timage->height;
|
RDestroyImage(timage);
|
||||||
|
timage = image;
|
||||||
if (w - TEXPREV_WIDTH > h - TEXPREV_HEIGHT) {
|
break;
|
||||||
h = (w * TEXPREV_HEIGHT)/TEXPREV_WIDTH;
|
case 'S':
|
||||||
} else {
|
case 'M':
|
||||||
w = (h * TEXPREV_WIDTH)/TEXPREV_HEIGHT;
|
image = RScaleImage(timage, width, height);
|
||||||
|
RDestroyImage(timage);
|
||||||
|
timage = image;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
image = RScaleImage(timage, w, h);
|
|
||||||
RDestroyImage(timage);
|
|
||||||
timage = image;
|
|
||||||
}
|
}
|
||||||
|
free(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!image)
|
||||||
|
return None;
|
||||||
|
|
||||||
if (path) {
|
if (path) {
|
||||||
dumpRImage(path, image);
|
dumpRImage(path, image);
|
||||||
}
|
}
|
||||||
@@ -372,48 +451,48 @@ updatePreviewBox(_Panel *panel, int elements)
|
|||||||
WMColor *color;
|
WMColor *color;
|
||||||
|
|
||||||
panel->preview = XCreatePixmap(dpy, WMWidgetXID(panel->win),
|
panel->preview = XCreatePixmap(dpy, WMWidgetXID(panel->win),
|
||||||
220-4, 185-4, WMScreenDepth(scr));
|
260-4, 165-4, WMScreenDepth(scr));
|
||||||
|
|
||||||
color = WMGrayColor(scr);
|
color = WMGrayColor(scr);
|
||||||
XFillRectangle(dpy, panel->preview, WMColorGC(color),
|
XFillRectangle(dpy, panel->preview, WMColorGC(color),
|
||||||
0, 0, 220-4, 185-4);
|
0, 0, 260-4, 165-4);
|
||||||
WMReleaseColor(color);
|
WMReleaseColor(color);
|
||||||
|
|
||||||
refresh = -1;
|
refresh = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (elements & FTITLE) {
|
if (elements & FTITLE) {
|
||||||
item = WMGetListItem(panel->texLs, 0);
|
item = WMGetListItem(panel->texLs, panel->textureIndex[0]);
|
||||||
titem = (TextureListItem*)item->clientData;
|
titem = (TextureListItem*)item->clientData;
|
||||||
|
|
||||||
pix = renderTexture(scr, titem->prop, 180, 20, NULL, RBEV_RAISED2);
|
pix = renderTexture(scr, titem->prop, 220, 20, NULL, RBEV_RAISED2);
|
||||||
|
|
||||||
XCopyArea(dpy, pix, panel->preview, gc, 0, 0, 180, 20, 5, 10);
|
XCopyArea(dpy, pix, panel->preview, gc, 0, 0, 220, 20, 5, 10);
|
||||||
|
|
||||||
XFreePixmap(dpy, pix);
|
XFreePixmap(dpy, pix);
|
||||||
}
|
}
|
||||||
if (elements & UTITLE) {
|
if (elements & UTITLE) {
|
||||||
item = WMGetListItem(panel->texLs, 1);
|
item = WMGetListItem(panel->texLs, panel->textureIndex[1]);
|
||||||
titem = (TextureListItem*)item->clientData;
|
titem = (TextureListItem*)item->clientData;
|
||||||
|
|
||||||
pix = renderTexture(scr, titem->prop, 180, 20, NULL, RBEV_RAISED2);
|
pix = renderTexture(scr, titem->prop, 220, 20, NULL, RBEV_RAISED2);
|
||||||
|
|
||||||
XCopyArea(dpy, pix, panel->preview, gc, 0, 0, 180, 20, 10, 35);
|
XCopyArea(dpy, pix, panel->preview, gc, 0, 0, 220, 20, 15, 35);
|
||||||
|
|
||||||
XFreePixmap(dpy, pix);
|
XFreePixmap(dpy, pix);
|
||||||
}
|
}
|
||||||
if (elements & OTITLE) {
|
if (elements & OTITLE) {
|
||||||
item = WMGetListItem(panel->texLs, 2);
|
item = WMGetListItem(panel->texLs, panel->textureIndex[2]);
|
||||||
titem = (TextureListItem*)item->clientData;
|
titem = (TextureListItem*)item->clientData;
|
||||||
|
|
||||||
pix = renderTexture(scr, titem->prop, 180, 20, NULL, RBEV_RAISED2);
|
pix = renderTexture(scr, titem->prop, 220, 20, NULL, RBEV_RAISED2);
|
||||||
|
|
||||||
XCopyArea(dpy, pix, panel->preview, gc, 0, 0, 180, 20, 15, 60);
|
XCopyArea(dpy, pix, panel->preview, gc, 0, 0, 220, 20, 25, 60);
|
||||||
|
|
||||||
XFreePixmap(dpy, pix);
|
XFreePixmap(dpy, pix);
|
||||||
}
|
}
|
||||||
if (elements & MTITLE) {
|
if (elements & MTITLE) {
|
||||||
item = WMGetListItem(panel->texLs, 3);
|
item = WMGetListItem(panel->texLs, panel->textureIndex[3]);
|
||||||
titem = (TextureListItem*)item->clientData;
|
titem = (TextureListItem*)item->clientData;
|
||||||
|
|
||||||
pix = renderTexture(scr, titem->prop, 100, 20, NULL, RBEV_RAISED2);
|
pix = renderTexture(scr, titem->prop, 100, 20, NULL, RBEV_RAISED2);
|
||||||
@@ -423,24 +502,30 @@ updatePreviewBox(_Panel *panel, int elements)
|
|||||||
XFreePixmap(dpy, pix);
|
XFreePixmap(dpy, pix);
|
||||||
}
|
}
|
||||||
if (elements & MITEM) {
|
if (elements & MITEM) {
|
||||||
item = WMGetListItem(panel->texLs, 4);
|
item = WMGetListItem(panel->texLs, panel->textureIndex[4]);
|
||||||
titem = (TextureListItem*)item->clientData;
|
titem = (TextureListItem*)item->clientData;
|
||||||
|
|
||||||
pix = renderTexture(scr, titem->prop, 100, 18, NULL, RBEV_RAISED2);
|
pix = renderTexture(scr, titem->prop, 100, 18, NULL, RBEV_RAISED2);
|
||||||
|
|
||||||
XCopyArea(dpy, pix, panel->preview, gc, 0, 0, 100, 20, 20, 115);
|
XCopyArea(dpy, pix, panel->preview, gc, 0, 0, 100, 18, 20, 115);
|
||||||
XCopyArea(dpy, pix, panel->preview, gc, 0, 0, 100, 20, 20, 115+18);
|
XCopyArea(dpy, pix, panel->preview, gc, 0, 0, 100, 18, 20, 115 + 18);
|
||||||
XCopyArea(dpy, pix, panel->preview, gc, 0, 0, 100, 20, 20, 115+36);
|
XCopyArea(dpy, pix, panel->preview, gc, 0, 0, 100, 18, 20, 115 + 36);
|
||||||
|
|
||||||
XFreePixmap(dpy, pix);
|
XFreePixmap(dpy, pix);
|
||||||
}
|
}
|
||||||
|
if (elements & (MITEM|MTITLE)) {
|
||||||
|
XDrawLine(dpy, panel->preview, gc, 19, 95, 19, 115+36+20);
|
||||||
|
XDrawLine(dpy, panel->preview, gc, 19, 94, 119, 94);
|
||||||
|
}
|
||||||
|
|
||||||
if (elements & ICON) {
|
if (elements & ICON) {
|
||||||
item = WMGetListItem(panel->texLs, 5);
|
item = WMGetListItem(panel->texLs, panel->textureIndex[5]);
|
||||||
titem = (TextureListItem*)item->clientData;
|
titem = (TextureListItem*)item->clientData;
|
||||||
|
|
||||||
pix = renderTexture(scr, titem->prop, 64, 64, NULL, RBEV_RAISED3);
|
pix = renderTexture(scr, titem->prop, 64, 64, NULL,
|
||||||
|
titem->ispixmap ? 0 : RBEV_RAISED3);
|
||||||
|
|
||||||
XCopyArea(dpy, pix, panel->preview, gc, 0, 0, 64, 64, 130, 100);
|
XCopyArea(dpy, pix, panel->preview, gc, 0, 0, 64, 64, 150, 90);
|
||||||
|
|
||||||
XFreePixmap(dpy, pix);
|
XFreePixmap(dpy, pix);
|
||||||
}
|
}
|
||||||
@@ -449,7 +534,7 @@ updatePreviewBox(_Panel *panel, int elements)
|
|||||||
if (refresh < 0) {
|
if (refresh < 0) {
|
||||||
WMPixmap *p;
|
WMPixmap *p;
|
||||||
p = WMCreatePixmapFromXPixmaps(scr, panel->preview, None,
|
p = WMCreatePixmapFromXPixmaps(scr, panel->preview, None,
|
||||||
220-4, 185-4, WMScreenDepth(scr));
|
260-4, 165-4, WMScreenDepth(scr));
|
||||||
|
|
||||||
WMSetLabelImage(panel->prevL, p);
|
WMSetLabelImage(panel->prevL, p);
|
||||||
WMReleasePixmap(p);
|
WMReleasePixmap(p);
|
||||||
@@ -475,23 +560,19 @@ cancelNewTexture(void *data)
|
|||||||
|
|
||||||
|
|
||||||
static char*
|
static char*
|
||||||
makeFileName(char *prefix, char *name)
|
makeFileName(char *prefix)
|
||||||
{
|
{
|
||||||
char *fname, *str;
|
char *fname;
|
||||||
int i;
|
|
||||||
|
|
||||||
str = wstrappend(prefix, name);
|
fname = wstrdup(prefix);
|
||||||
fname = wstrdup(str);
|
|
||||||
|
|
||||||
i = 1;
|
|
||||||
while (access(fname, F_OK)==0) {
|
while (access(fname, F_OK)==0) {
|
||||||
char buf[16];
|
char buf[30];
|
||||||
|
|
||||||
free(fname);
|
free(fname);
|
||||||
sprintf(buf, "%i", i++);
|
sprintf(buf, "%08lx.cache", time(NULL));
|
||||||
fname = wstrappend(str, buf);
|
fname = wstrappend(prefix, buf);
|
||||||
}
|
}
|
||||||
free(str);
|
|
||||||
|
|
||||||
return fname;
|
return fname;
|
||||||
}
|
}
|
||||||
@@ -526,7 +607,9 @@ okNewTexture(void *data)
|
|||||||
titem->texture = str;
|
titem->texture = str;
|
||||||
titem->selectedFor = 0;
|
titem->selectedFor = 0;
|
||||||
|
|
||||||
titem->path = makeFileName(panel->fprefix, name);
|
titem->ispixmap = isPixmap(prop);
|
||||||
|
|
||||||
|
titem->path = makeFileName(panel->fprefix);
|
||||||
titem->preview = renderTexture(scr, prop, TEXPREV_WIDTH, TEXPREV_HEIGHT,
|
titem->preview = renderTexture(scr, prop, TEXPREV_WIDTH, TEXPREV_HEIGHT,
|
||||||
titem->path, 0);
|
titem->path, 0);
|
||||||
|
|
||||||
@@ -537,7 +620,6 @@ okNewTexture(void *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
okEditTexture(void *data)
|
okEditTexture(void *data)
|
||||||
{
|
{
|
||||||
@@ -567,6 +649,8 @@ okEditTexture(void *data)
|
|||||||
PLRelease(titem->prop);
|
PLRelease(titem->prop);
|
||||||
titem->prop = prop;
|
titem->prop = prop;
|
||||||
|
|
||||||
|
titem->ispixmap = isPixmap(prop);
|
||||||
|
|
||||||
free(titem->texture);
|
free(titem->texture);
|
||||||
titem->texture = str;
|
titem->texture = str;
|
||||||
|
|
||||||
@@ -593,13 +677,14 @@ editTexture(WMWidget *w, void *data)
|
|||||||
item = WMGetListItem(panel->texLs, WMGetListSelectedItemRow(panel->texLs));
|
item = WMGetListItem(panel->texLs, WMGetListSelectedItemRow(panel->texLs));
|
||||||
titem = (TextureListItem*)item->clientData;
|
titem = (TextureListItem*)item->clientData;
|
||||||
|
|
||||||
|
SetTexturePanelPixmapPath(panel->texturePanel,
|
||||||
|
GetObjectForKey("PixmapPath"));
|
||||||
|
|
||||||
SetTexturePanelTexture(panel->texturePanel, titem->title, titem->prop);
|
SetTexturePanelTexture(panel->texturePanel, titem->title, titem->prop);
|
||||||
|
|
||||||
SetTexturePanelCancelAction(panel->texturePanel, cancelNewTexture, panel);
|
SetTexturePanelCancelAction(panel->texturePanel, cancelNewTexture, panel);
|
||||||
SetTexturePanelOkAction(panel->texturePanel, okEditTexture, panel);
|
SetTexturePanelOkAction(panel->texturePanel, okEditTexture, panel);
|
||||||
|
|
||||||
SetTexturePanelPixmapPath(panel->texturePanel,
|
|
||||||
GetObjectForKey("PixmapPath"));
|
|
||||||
ShowTexturePanel(panel->texturePanel);
|
ShowTexturePanel(panel->texturePanel);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -610,14 +695,15 @@ newTexture(WMWidget *w, void *data)
|
|||||||
{
|
{
|
||||||
_Panel *panel = (_Panel*)data;
|
_Panel *panel = (_Panel*)data;
|
||||||
|
|
||||||
|
SetTexturePanelPixmapPath(panel->texturePanel,
|
||||||
|
GetObjectForKey("PixmapPath"));
|
||||||
|
|
||||||
SetTexturePanelTexture(panel->texturePanel, "New Texture", NULL);
|
SetTexturePanelTexture(panel->texturePanel, "New Texture", NULL);
|
||||||
|
|
||||||
SetTexturePanelCancelAction(panel->texturePanel, cancelNewTexture, panel);
|
SetTexturePanelCancelAction(panel->texturePanel, cancelNewTexture, panel);
|
||||||
|
|
||||||
SetTexturePanelOkAction(panel->texturePanel, okNewTexture, panel);
|
SetTexturePanelOkAction(panel->texturePanel, okNewTexture, panel);
|
||||||
|
|
||||||
SetTexturePanelPixmapPath(panel->texturePanel,
|
|
||||||
GetObjectForKey("PixmapPath"));
|
|
||||||
ShowTexturePanel(panel->texturePanel);
|
ShowTexturePanel(panel->texturePanel);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -681,7 +767,6 @@ extractTexture(WMWidget *w, void *data)
|
|||||||
_("Select File"), NULL)) {
|
_("Select File"), NULL)) {
|
||||||
path = WMGetFilePanelFileName(opanel);
|
path = WMGetFilePanelFileName(opanel);
|
||||||
|
|
||||||
puts(path);
|
|
||||||
OpenExtractPanelFor(panel, path);
|
OpenExtractPanelFor(panel, path);
|
||||||
|
|
||||||
free(path);
|
free(path);
|
||||||
@@ -775,6 +860,8 @@ textureDoubleClick(WMWidget *w, void *data)
|
|||||||
sprintf(str, "%s: %s", titem->title, titem->texture);
|
sprintf(str, "%s: %s", titem->title, titem->texture);
|
||||||
WMSetLabelText(panel->texsL, str);
|
WMSetLabelText(panel->texsL, str);
|
||||||
free(str);
|
free(str);
|
||||||
|
|
||||||
|
updatePreviewBox(panel, 1<<section);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -887,7 +974,6 @@ fillTextureList(WMList *lPtr)
|
|||||||
titem->selectedFor = 0;
|
titem->selectedFor = 0;
|
||||||
titem->path = wstrdup(PLGetString(PLGetArrayElement(texture, 2)));
|
titem->path = wstrdup(PLGetString(PLGetArrayElement(texture, 2)));
|
||||||
|
|
||||||
puts(titem->path);
|
|
||||||
titem->preview = loadRImage(scr, titem->path);
|
titem->preview = loadRImage(scr, titem->path);
|
||||||
if (!titem->preview) {
|
if (!titem->preview) {
|
||||||
titem->preview = renderTexture(scr, titem->prop, TEXPREV_WIDTH,
|
titem->preview = renderTexture(scr, titem->prop, TEXPREV_WIDTH,
|
||||||
@@ -944,6 +1030,7 @@ createPanel(Panel *p)
|
|||||||
panel->prevL = WMCreateLabel(panel->frame);
|
panel->prevL = WMCreateLabel(panel->frame);
|
||||||
WMResizeWidget(panel->prevL, 260, 165);
|
WMResizeWidget(panel->prevL, 260, 165);
|
||||||
WMMoveWidget(panel->prevL, 15, 10);
|
WMMoveWidget(panel->prevL, 15, 10);
|
||||||
|
WMSetLabelRelief(panel->prevL, WRSunken);
|
||||||
WMSetLabelImagePosition(panel->prevL, WIPImageOnly);
|
WMSetLabelImagePosition(panel->prevL, WIPImageOnly);
|
||||||
|
|
||||||
panel->secP = WMCreatePopUpButton(panel->frame);
|
panel->secP = WMCreatePopUpButton(panel->frame);
|
||||||
@@ -1079,6 +1166,8 @@ setupTextureFor(WMList *list, char *key, char *defValue, char *title,
|
|||||||
titem->current = 1;
|
titem->current = 1;
|
||||||
titem->selectedFor = 1<<index;
|
titem->selectedFor = 1<<index;
|
||||||
|
|
||||||
|
titem->ispixmap = isPixmap(titem->prop);
|
||||||
|
|
||||||
titem->preview = renderTexture(WMWidgetScreen(list), titem->prop,
|
titem->preview = renderTexture(WMWidgetScreen(list), titem->prop,
|
||||||
TEXPREV_WIDTH, TEXPREV_HEIGHT, NULL, 0);
|
TEXPREV_WIDTH, TEXPREV_HEIGHT, NULL, 0);
|
||||||
|
|
||||||
@@ -1128,6 +1217,38 @@ showData(_Panel *panel)
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
storeData(_Panel *panel)
|
storeData(_Panel *panel)
|
||||||
|
{
|
||||||
|
TextureListItem *titem;
|
||||||
|
WMListItem *item;
|
||||||
|
|
||||||
|
item = WMGetListItem(panel->texLs, panel->textureIndex[0]);
|
||||||
|
titem = (TextureListItem*)item->clientData;
|
||||||
|
SetObjectForKey(titem->prop, "FTitleBack");
|
||||||
|
|
||||||
|
item = WMGetListItem(panel->texLs, panel->textureIndex[1]);
|
||||||
|
titem = (TextureListItem*)item->clientData;
|
||||||
|
SetObjectForKey(titem->prop, "UTitleBack");
|
||||||
|
|
||||||
|
item = WMGetListItem(panel->texLs, panel->textureIndex[2]);
|
||||||
|
titem = (TextureListItem*)item->clientData;
|
||||||
|
SetObjectForKey(titem->prop, "PTitleBack");
|
||||||
|
|
||||||
|
item = WMGetListItem(panel->texLs, panel->textureIndex[3]);
|
||||||
|
titem = (TextureListItem*)item->clientData;
|
||||||
|
SetObjectForKey(titem->prop, "MenuTitleBack");
|
||||||
|
|
||||||
|
item = WMGetListItem(panel->texLs, panel->textureIndex[4]);
|
||||||
|
titem = (TextureListItem*)item->clientData;
|
||||||
|
SetObjectForKey(titem->prop, "MenuTextBack");
|
||||||
|
|
||||||
|
item = WMGetListItem(panel->texLs, panel->textureIndex[5]);
|
||||||
|
titem = (TextureListItem*)item->clientData;
|
||||||
|
SetObjectForKey(titem->prop, "IconBack");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
prepareForClose(_Panel *panel)
|
||||||
{
|
{
|
||||||
proplist_t textureList;
|
proplist_t textureList;
|
||||||
proplist_t texture;
|
proplist_t texture;
|
||||||
@@ -1154,30 +1275,7 @@ storeData(_Panel *panel)
|
|||||||
WMSetUDObjectForKey(udb, textureList, "TextureList");
|
WMSetUDObjectForKey(udb, textureList, "TextureList");
|
||||||
PLRelease(textureList);
|
PLRelease(textureList);
|
||||||
|
|
||||||
item = WMGetListItem(panel->texLs, panel->textureIndex[0]);
|
WMSynchronizeUserDefaults(udb);
|
||||||
titem = (TextureListItem*)item->clientData;
|
|
||||||
SetObjectForKey(titem->prop, "FTitleBack");
|
|
||||||
|
|
||||||
item = WMGetListItem(panel->texLs, panel->textureIndex[1]);
|
|
||||||
titem = (TextureListItem*)item->clientData;
|
|
||||||
SetObjectForKey(titem->prop, "UTitleBack");
|
|
||||||
|
|
||||||
item = WMGetListItem(panel->texLs, panel->textureIndex[2]);
|
|
||||||
titem = (TextureListItem*)item->clientData;
|
|
||||||
SetObjectForKey(titem->prop, "PTitleBack");
|
|
||||||
|
|
||||||
item = WMGetListItem(panel->texLs, panel->textureIndex[3]);
|
|
||||||
titem = (TextureListItem*)item->clientData;
|
|
||||||
SetObjectForKey(titem->prop, "MenuTitleBack");
|
|
||||||
|
|
||||||
item = WMGetListItem(panel->texLs, panel->textureIndex[4]);
|
|
||||||
titem = (TextureListItem*)item->clientData;
|
|
||||||
SetObjectForKey(titem->prop, "MenuTextBack");
|
|
||||||
|
|
||||||
item = WMGetListItem(panel->texLs, panel->textureIndex[5]);
|
|
||||||
titem = (TextureListItem*)item->clientData;
|
|
||||||
SetObjectForKey(titem->prop, "IconBack");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1196,6 +1294,7 @@ InitAppearance(WMScreen *scr, WMWindow *win)
|
|||||||
|
|
||||||
panel->callbacks.createWidgets = createPanel;
|
panel->callbacks.createWidgets = createPanel;
|
||||||
panel->callbacks.updateDomain = storeData;
|
panel->callbacks.updateDomain = storeData;
|
||||||
|
panel->callbacks.prepareForClose = prepareForClose;
|
||||||
|
|
||||||
AddSection(panel, ICON_FILE);
|
AddSection(panel, ICON_FILE);
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ typedef struct _Panel {
|
|||||||
|
|
||||||
WMWindow *win;
|
WMWindow *win;
|
||||||
|
|
||||||
WMButton *swi[4];
|
WMButton *swi[5];
|
||||||
|
|
||||||
} _Panel;
|
} _Panel;
|
||||||
|
|
||||||
@@ -45,10 +45,11 @@ showData(_Panel *panel)
|
|||||||
{
|
{
|
||||||
WMUserDefaults *udb = WMGetStandardUserDefaults();
|
WMUserDefaults *udb = WMGetStandardUserDefaults();
|
||||||
|
|
||||||
WMSetButtonSelected(panel->swi[0], WMGetUDBoolForKey(udb, "NoXSetStuff"));
|
WMSetButtonSelected(panel->swi[0], GetBoolForKey("DisableMiniwindows"));
|
||||||
WMSetButtonSelected(panel->swi[1], GetBoolForKey("SaveSessionOnExit"));
|
WMSetButtonSelected(panel->swi[1], WMGetUDBoolForKey(udb, "NoXSetStuff"));
|
||||||
WMSetButtonSelected(panel->swi[2], GetBoolForKey("UseSaveUnders"));
|
WMSetButtonSelected(panel->swi[2], GetBoolForKey("SaveSessionOnExit"));
|
||||||
WMSetButtonSelected(panel->swi[3], GetBoolForKey("DisableBlinking"));
|
WMSetButtonSelected(panel->swi[3], GetBoolForKey("UseSaveUnders"));
|
||||||
|
WMSetButtonSelected(panel->swi[4], GetBoolForKey("DisableBlinking"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -62,15 +63,17 @@ createPanel(Panel *p)
|
|||||||
WMResizeWidget(panel->frame, FRAME_WIDTH, FRAME_HEIGHT);
|
WMResizeWidget(panel->frame, FRAME_WIDTH, FRAME_HEIGHT);
|
||||||
WMMoveWidget(panel->frame, FRAME_LEFT, FRAME_TOP);
|
WMMoveWidget(panel->frame, FRAME_LEFT, FRAME_TOP);
|
||||||
|
|
||||||
for (i=0; i<4; i++) {
|
for (i=0; i<5; i++) {
|
||||||
panel->swi[i] = WMCreateSwitchButton(panel->frame);
|
panel->swi[i] = WMCreateSwitchButton(panel->frame);
|
||||||
WMResizeWidget(panel->swi[i], FRAME_WIDTH-40, 25);
|
WMResizeWidget(panel->swi[i], FRAME_WIDTH-40, 25);
|
||||||
WMMoveWidget(panel->swi[i], 20, 20+i*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[0], _("Disable miniwindows (icons for miniaturized windows). For use with KDE/GNOME."));
|
||||||
WMSetButtonText(panel->swi[2], _("Use SaveUnder in window frames, icons, menus and other objects"));
|
WMSetButtonText(panel->swi[1], _("Do not set non-WindowMaker specific parameters (do not use xset)"));
|
||||||
WMSetButtonText(panel->swi[3], _("Disable cycling color highlighting of icons."));
|
WMSetButtonText(panel->swi[2], _("Automatically save session when exiting WindowMaker"));
|
||||||
|
WMSetButtonText(panel->swi[3], _("Use SaveUnder in window frames, icons, menus and other objects"));
|
||||||
|
WMSetButtonText(panel->swi[4], _("Disable cycling color highlighting of icons."));
|
||||||
|
|
||||||
WMRealizeWidget(panel->frame);
|
WMRealizeWidget(panel->frame);
|
||||||
WMMapSubwidgets(panel->frame);
|
WMMapSubwidgets(panel->frame);
|
||||||
@@ -84,11 +87,13 @@ storeDefaults(_Panel *panel)
|
|||||||
{
|
{
|
||||||
WMUserDefaults *udb = WMGetStandardUserDefaults();
|
WMUserDefaults *udb = WMGetStandardUserDefaults();
|
||||||
|
|
||||||
WMSetUDBoolForKey(udb, WMGetButtonSelected(panel->swi[0]), "NoXSetStuff");
|
SetBoolForKey(WMGetButtonSelected(panel->swi[0]), "DisableMiniwindows");
|
||||||
|
|
||||||
SetBoolForKey(WMGetButtonSelected(panel->swi[1]), "SaveSessionOnExit");
|
WMSetUDBoolForKey(udb, WMGetButtonSelected(panel->swi[1]), "NoXSetStuff");
|
||||||
SetBoolForKey(WMGetButtonSelected(panel->swi[2]), "UseSaveUnders");
|
|
||||||
SetBoolForKey(WMGetButtonSelected(panel->swi[3]), "DisableBlinking");
|
SetBoolForKey(WMGetButtonSelected(panel->swi[2]), "SaveSessionOnExit");
|
||||||
|
SetBoolForKey(WMGetButtonSelected(panel->swi[3]), "UseSaveUnders");
|
||||||
|
SetBoolForKey(WMGetButtonSelected(panel->swi[4]), "DisableBlinking");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -208,6 +208,9 @@ updateTGradImage(TexturePanel *panel)
|
|||||||
RColor to;
|
RColor to;
|
||||||
WMColor *color;
|
WMColor *color;
|
||||||
|
|
||||||
|
if (!panel->image)
|
||||||
|
return;
|
||||||
|
|
||||||
color = WMGetColorWellColor(panel->tcol1W);
|
color = WMGetColorWellColor(panel->tcol1W);
|
||||||
from.red = WMRedComponentOfColor(color)>>8;
|
from.red = WMRedComponentOfColor(color)>>8;
|
||||||
from.green = WMGreenComponentOfColor(color)>>8;
|
from.green = WMGreenComponentOfColor(color)>>8;
|
||||||
@@ -218,13 +221,32 @@ updateTGradImage(TexturePanel *panel)
|
|||||||
to.green = WMGreenComponentOfColor(color)>>8;
|
to.green = WMGreenComponentOfColor(color)>>8;
|
||||||
to.blue = WMBlueComponentOfColor(color)>>8;
|
to.blue = WMBlueComponentOfColor(color)>>8;
|
||||||
|
|
||||||
if (WMGetButtonSelected(panel->dirhB)) {
|
if (panel->image->width < 141 || panel->image->height < 91) {
|
||||||
gradient = RRenderGradient(80, 30, &from, &to, RHorizontalGradient);
|
image = RMakeTiledImage(panel->image, 141, 91);
|
||||||
} else if (WMGetButtonSelected(panel->dirvB)) {
|
|
||||||
gradient = RRenderGradient(80, 30, &from, &to, RVerticalGradient);
|
|
||||||
} else {
|
} else {
|
||||||
gradient = RRenderGradient(80, 30, &from, &to, RDiagonalGradient);
|
image = RCloneImage(panel->image);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (WMGetButtonSelected(panel->dirhB)) {
|
||||||
|
gradient = RRenderGradient(image->width, image->height, &from, &to,
|
||||||
|
RHorizontalGradient);
|
||||||
|
} else if (WMGetButtonSelected(panel->dirvB)) {
|
||||||
|
gradient = RRenderGradient(image->width, image->height, &from, &to,
|
||||||
|
RVerticalGradient);
|
||||||
|
} else {
|
||||||
|
gradient = RRenderGradient(image->width, image->height, &from, &to,
|
||||||
|
RDiagonalGradient);
|
||||||
|
}
|
||||||
|
|
||||||
|
RCombineImagesWithOpaqueness(image, gradient,
|
||||||
|
WMGetSliderValue(panel->topaS));
|
||||||
|
RDestroyImage(gradient);
|
||||||
|
pixmap = WMCreatePixmapFromRImage(WMWidgetScreen(panel->win),
|
||||||
|
image, 128);
|
||||||
|
|
||||||
|
WMSetLabelImage(panel->imageL, pixmap);
|
||||||
|
WMResizeWidget(panel->imageL, image->width, image->height);
|
||||||
|
RDestroyImage(image);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -270,43 +292,6 @@ updateSGradButtons(TexturePanel *panel)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
changeTypeCallback(WMWidget *w, void *data)
|
|
||||||
{
|
|
||||||
TexturePanel *panel = (TexturePanel*)data;
|
|
||||||
int newType;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
newType = WMGetPopUpButtonSelectedItem(w);
|
|
||||||
if (newType == panel->currentType)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (panel->currentType >= 0) {
|
|
||||||
for (i = 0; i < MAX_SECTION_PARTS; i++) {
|
|
||||||
if (panel->sectionParts[panel->currentType][i] == NULL)
|
|
||||||
break;
|
|
||||||
WMUnmapWidget(panel->sectionParts[panel->currentType][i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0; i < MAX_SECTION_PARTS; i++) {
|
|
||||||
if (panel->sectionParts[newType][i] == NULL)
|
|
||||||
break;
|
|
||||||
WMMapWidget(panel->sectionParts[newType][i]);
|
|
||||||
}
|
|
||||||
panel->currentType = newType;
|
|
||||||
|
|
||||||
switch (newType) {
|
|
||||||
case TYPE_SGRADIENT:
|
|
||||||
updateSGradButtons(panel);
|
|
||||||
break;
|
|
||||||
case TYPE_GRADIENT:
|
|
||||||
updateGradButtons(panel);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*********** Gradient ************/
|
/*********** Gradient ************/
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -587,27 +572,88 @@ colorWellObserver(void *self, WMNotification *n)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
opaqChangeCallback(WMWidget *w, void *data)
|
||||||
|
{
|
||||||
|
TexturePanel *panel = (TexturePanel*)data;
|
||||||
|
|
||||||
|
updateTGradImage(panel);
|
||||||
|
}
|
||||||
|
|
||||||
/****************** Image ******************/
|
/****************** Image ******************/
|
||||||
|
|
||||||
|
static void
|
||||||
|
updateImage(TexturePanel *panel, char *path)
|
||||||
|
{
|
||||||
|
WMScreen *scr = WMWidgetScreen(panel->win);
|
||||||
|
RImage *image, *scaled;
|
||||||
|
WMPixmap *pixmap;
|
||||||
|
WMSize size;
|
||||||
|
|
||||||
|
if (path) {
|
||||||
|
image = RLoadImage(WMScreenRContext(scr), path, 0);
|
||||||
|
if (!image) {
|
||||||
|
char *message;
|
||||||
|
|
||||||
|
message = wstrappend(_("Could not load the selected file: "),
|
||||||
|
(char*)RMessageForError(RErrorCode));
|
||||||
|
|
||||||
|
WMRunAlertPanel(scr, panel->win, _("Error"), message,
|
||||||
|
_("OK"), NULL, NULL);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (panel->image)
|
||||||
|
RDestroyImage(panel->image);
|
||||||
|
panel->image = image;
|
||||||
|
} else {
|
||||||
|
image = panel->image;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (WMGetPopUpButtonSelectedItem(panel->typeP) == TYPE_PIXMAP) {
|
||||||
|
pixmap = WMCreatePixmapFromRImage(scr, image, 128);
|
||||||
|
|
||||||
|
size = WMGetPixmapSize(pixmap);
|
||||||
|
WMSetLabelImage(panel->imageL, pixmap);
|
||||||
|
WMResizeWidget(panel->imageL, size.width, size.height);
|
||||||
|
|
||||||
|
WMReleasePixmap(pixmap);
|
||||||
|
} else {
|
||||||
|
updateTGradImage(panel);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
browseImageCallback(WMWidget *w, void *data)
|
browseImageCallback(WMWidget *w, void *data)
|
||||||
{
|
{
|
||||||
TexturePanel *panel = (TexturePanel*)data;
|
TexturePanel *panel = (TexturePanel*)data;
|
||||||
WMOpenPanel *opanel;
|
WMOpenPanel *opanel;
|
||||||
WMScreen *scr = WMWidgetScreen(w);
|
WMScreen *scr = WMWidgetScreen(w);
|
||||||
|
static char *ipath = NULL;
|
||||||
|
|
||||||
opanel = WMGetOpenPanel(scr);
|
opanel = WMGetOpenPanel(scr);
|
||||||
WMSetFilePanelCanChooseDirectories(opanel, False);
|
WMSetFilePanelCanChooseDirectories(opanel, False);
|
||||||
WMSetFilePanelCanChooseFiles(opanel, True);
|
WMSetFilePanelCanChooseFiles(opanel, True);
|
||||||
|
|
||||||
if (WMRunModalFilePanelForDirectory(opanel, panel->win, wgethomedir(),
|
if (!ipath)
|
||||||
|
ipath = wstrdup(wgethomedir());
|
||||||
|
|
||||||
|
if (WMRunModalFilePanelForDirectory(opanel, panel->win, ipath,
|
||||||
"Open Image", NULL)) {
|
"Open Image", NULL)) {
|
||||||
char *path, *fullpath;
|
char *path, *fullpath;
|
||||||
char *tmp, *tmp2;
|
char *tmp, *tmp2;
|
||||||
|
|
||||||
fullpath = WMGetFilePanelFileName(opanel);
|
tmp = WMGetFilePanelFileName(opanel);
|
||||||
if (!fullpath)
|
if (!tmp)
|
||||||
return;
|
return;
|
||||||
|
fullpath = tmp;
|
||||||
|
|
||||||
|
free(ipath);
|
||||||
|
ipath = fullpath;
|
||||||
|
|
||||||
path = wstrdup(fullpath);
|
path = wstrdup(fullpath);
|
||||||
|
|
||||||
tmp2 = strrchr(fullpath, '/');
|
tmp2 = strrchr(fullpath, '/');
|
||||||
@@ -629,47 +675,12 @@ browseImageCallback(WMWidget *w, void *data)
|
|||||||
_("The selected file does not contain a supported image."),
|
_("The selected file does not contain a supported image."),
|
||||||
_("OK"), NULL, NULL);
|
_("OK"), NULL, NULL);
|
||||||
free(path);
|
free(path);
|
||||||
free(fullpath);
|
|
||||||
} else {
|
} else {
|
||||||
RImage *image, *scaled;
|
updateImage(panel, fullpath);
|
||||||
WMPixmap *pixmap;
|
free(panel->imageFile);
|
||||||
WMSize size;
|
|
||||||
|
|
||||||
image = RLoadImage(WMScreenRContext(scr), fullpath, 0);
|
|
||||||
if (!image) {
|
|
||||||
char *message;
|
|
||||||
|
|
||||||
message = wstrappend(_("Could not load the selected file: "),
|
|
||||||
(char*)RMessageForError(RErrorCode));
|
|
||||||
|
|
||||||
WMRunAlertPanel(scr, panel->win, _("Error"), message,
|
|
||||||
_("OK"), NULL, NULL);
|
|
||||||
free(message);
|
|
||||||
free(path);
|
|
||||||
free(fullpath);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (panel->image)
|
|
||||||
RDestroyImage(panel->image);
|
|
||||||
panel->image = image;
|
|
||||||
|
|
||||||
if (WMGetPopUpButtonSelectedItem(panel->typeP) == TYPE_PIXMAP) {
|
|
||||||
pixmap = WMCreatePixmapFromRImage(scr, image, 128);
|
|
||||||
|
|
||||||
size = WMGetPixmapSize(pixmap);
|
|
||||||
WMSetLabelImage(panel->imageL, pixmap);
|
|
||||||
WMResizeWidget(panel->imageL, size.width, size.height);
|
|
||||||
|
|
||||||
WMReleasePixmap(pixmap);
|
|
||||||
} else {
|
|
||||||
updateTGradImage(panel);
|
|
||||||
}
|
|
||||||
panel->imageFile = path;
|
panel->imageFile = path;
|
||||||
|
|
||||||
WMSetTextFieldText(panel->imageT, path);
|
WMSetTextFieldText(panel->imageT, path);
|
||||||
|
|
||||||
free(fullpath);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -689,6 +700,48 @@ buttonCallback(WMWidget *w, void *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
changeTypeCallback(WMWidget *w, void *data)
|
||||||
|
{
|
||||||
|
TexturePanel *panel = (TexturePanel*)data;
|
||||||
|
int newType;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
newType = WMGetPopUpButtonSelectedItem(w);
|
||||||
|
if (newType == panel->currentType)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (panel->currentType >= 0) {
|
||||||
|
for (i = 0; i < MAX_SECTION_PARTS; i++) {
|
||||||
|
if (panel->sectionParts[panel->currentType][i] == NULL)
|
||||||
|
break;
|
||||||
|
WMUnmapWidget(panel->sectionParts[panel->currentType][i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < MAX_SECTION_PARTS; i++) {
|
||||||
|
if (panel->sectionParts[newType][i] == NULL)
|
||||||
|
break;
|
||||||
|
WMMapWidget(panel->sectionParts[newType][i]);
|
||||||
|
}
|
||||||
|
panel->currentType = newType;
|
||||||
|
|
||||||
|
switch (newType) {
|
||||||
|
case TYPE_SGRADIENT:
|
||||||
|
updateSGradButtons(panel);
|
||||||
|
break;
|
||||||
|
case TYPE_GRADIENT:
|
||||||
|
updateGradButtons(panel);
|
||||||
|
break;
|
||||||
|
case TYPE_TGRADIENT:
|
||||||
|
case TYPE_PIXMAP:
|
||||||
|
updateImage(panel, NULL);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*--------------------------------------------------------------------------
|
*--------------------------------------------------------------------------
|
||||||
* Public functions
|
* Public functions
|
||||||
@@ -705,10 +758,11 @@ void
|
|||||||
ShowTexturePanel(TexturePanel *panel)
|
ShowTexturePanel(TexturePanel *panel)
|
||||||
{
|
{
|
||||||
Display *dpy = WMScreenDisplay(WMWidgetScreen(panel->win));
|
Display *dpy = WMScreenDisplay(WMWidgetScreen(panel->win));
|
||||||
|
Screen *scr = DefaultScreenOfDisplay(dpy);
|
||||||
|
|
||||||
WMSetWindowUPosition(panel->win,
|
WMSetWindowUPosition(panel->win,
|
||||||
WidthOfScreen(DefaultScreenOfDisplay(dpy))/2,
|
(WidthOfScreen(scr)-WMWidgetWidth(panel->win))/2,
|
||||||
HeightOfScreen(DefaultScreenOfDisplay(dpy))/2);
|
(HeightOfScreen(scr)-WMWidgetHeight(panel->win))/2);
|
||||||
WMMapWidget(panel->win);
|
WMMapWidget(panel->win);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -818,6 +872,10 @@ SetTexturePanelTexture(TexturePanel *panel, char *name, proplist_t texture)
|
|||||||
|
|
||||||
WMSetTextFieldText(panel->imageT,
|
WMSetTextFieldText(panel->imageT,
|
||||||
PLGetString(PLGetArrayElement(texture, 1)));
|
PLGetString(PLGetArrayElement(texture, 1)));
|
||||||
|
if (panel->imageFile)
|
||||||
|
free(panel->imageFile);
|
||||||
|
panel->imageFile = wstrdup(PLGetString(PLGetArrayElement(texture, 1)));
|
||||||
|
|
||||||
|
|
||||||
i = 180;
|
i = 180;
|
||||||
sscanf(PLGetString(PLGetArrayElement(texture, 2)), "%i", &i);
|
sscanf(PLGetString(PLGetArrayElement(texture, 2)), "%i", &i);
|
||||||
@@ -847,6 +905,19 @@ SetTexturePanelTexture(TexturePanel *panel, char *name, proplist_t texture)
|
|||||||
|
|
||||||
WMReleaseColor(color);
|
WMReleaseColor(color);
|
||||||
|
|
||||||
|
WMSetTextFieldText(panel->imageT,
|
||||||
|
PLGetString(PLGetArrayElement(texture, 1)));
|
||||||
|
|
||||||
|
if (panel->imageFile)
|
||||||
|
free(panel->imageFile);
|
||||||
|
panel->imageFile = wfindfileinarray(panel->pathList,
|
||||||
|
PLGetString(PLGetArrayElement(texture, 1)));
|
||||||
|
|
||||||
|
panel->image = RLoadImage(WMScreenRContext(scr), panel->imageFile, 0);
|
||||||
|
updateTGradImage(panel);
|
||||||
|
|
||||||
|
updateSGradButtons(panel);
|
||||||
|
|
||||||
/*...............................................*/
|
/*...............................................*/
|
||||||
} else if (strcasecmp(type, "mhgradient")==0
|
} else if (strcasecmp(type, "mhgradient")==0
|
||||||
|| strcasecmp(type, "mvgradient")==0
|
|| strcasecmp(type, "mvgradient")==0
|
||||||
@@ -926,6 +997,18 @@ SetTexturePanelTexture(TexturePanel *panel, char *name, proplist_t texture)
|
|||||||
|
|
||||||
WMSetTextFieldText(panel->imageT,
|
WMSetTextFieldText(panel->imageT,
|
||||||
PLGetString(PLGetArrayElement(texture, 1)));
|
PLGetString(PLGetArrayElement(texture, 1)));
|
||||||
|
|
||||||
|
if (panel->imageFile)
|
||||||
|
free(panel->imageFile);
|
||||||
|
panel->imageFile = wfindfileinarray(panel->pathList,
|
||||||
|
PLGetString(PLGetArrayElement(texture, 1)));
|
||||||
|
|
||||||
|
color = WMCreateNamedColor(scr,
|
||||||
|
PLGetString(PLGetArrayElement(texture, 2)), False);
|
||||||
|
WMSetColorWellColor(panel->defcW, color);
|
||||||
|
WMReleaseColor(color);
|
||||||
|
|
||||||
|
updateImage(panel, panel->imageFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
changeTypeCallback(panel->typeP, panel);
|
changeTypeCallback(panel->typeP, panel);
|
||||||
@@ -1017,6 +1100,39 @@ GetTexturePanelTexture(TexturePanel *panel)
|
|||||||
free(str);
|
free(str);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case TYPE_TGRADIENT:
|
||||||
|
color = WMGetColorWellColor(panel->tcol1W);
|
||||||
|
str = WMGetColorRGBDescription(color);
|
||||||
|
|
||||||
|
color = WMGetColorWellColor(panel->tcol2W);
|
||||||
|
str2 = WMGetColorRGBDescription(color);
|
||||||
|
|
||||||
|
sprintf(buff, "%i", WMGetSliderValue(panel->topaS));
|
||||||
|
|
||||||
|
if (WMGetButtonSelected(panel->dirdB)) {
|
||||||
|
prop = PLMakeArrayFromElements(PLMakeString("tdgradient"),
|
||||||
|
PLMakeString(panel->imageFile),
|
||||||
|
PLMakeString(buff),
|
||||||
|
PLMakeString(str),
|
||||||
|
PLMakeString(str2), NULL);
|
||||||
|
} else if (WMGetButtonSelected(panel->dirvB)) {
|
||||||
|
prop = PLMakeArrayFromElements(PLMakeString("tvgradient"),
|
||||||
|
PLMakeString(panel->imageFile),
|
||||||
|
PLMakeString(buff),
|
||||||
|
PLMakeString(str),
|
||||||
|
PLMakeString(str2), NULL);
|
||||||
|
} else {
|
||||||
|
prop = PLMakeArrayFromElements(PLMakeString("thgradient"),
|
||||||
|
PLMakeString(panel->imageFile),
|
||||||
|
PLMakeString(buff),
|
||||||
|
PLMakeString(str),
|
||||||
|
PLMakeString(str2), NULL);
|
||||||
|
}
|
||||||
|
free(str);
|
||||||
|
free(str2);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
case TYPE_SGRADIENT:
|
case TYPE_SGRADIENT:
|
||||||
color = WMGetColorWellColor(panel->tcol1W);
|
color = WMGetColorWellColor(panel->tcol1W);
|
||||||
str = WMGetColorRGBDescription(color);
|
str = WMGetColorRGBDescription(color);
|
||||||
@@ -1110,6 +1226,7 @@ CreateTexturePanel(WMWindow *keyWindow)
|
|||||||
|
|
||||||
WMResizeWidget(panel->win, 325, 423);
|
WMResizeWidget(panel->win, 325, 423);
|
||||||
WMSetWindowTitle(panel->win, _("Texture Panel"));
|
WMSetWindowTitle(panel->win, _("Texture Panel"));
|
||||||
|
WMSetWindowCloseAction(panel->win, buttonCallback, panel);
|
||||||
|
|
||||||
|
|
||||||
/* texture name */
|
/* texture name */
|
||||||
@@ -1301,6 +1418,9 @@ CreateTexturePanel(WMWindow *keyWindow)
|
|||||||
WMMoveWidget(panel->topaS, 15, 20);
|
WMMoveWidget(panel->topaS, 15, 20);
|
||||||
WMSetSliderMaxValue(panel->topaS, 255);
|
WMSetSliderMaxValue(panel->topaS, 255);
|
||||||
WMSetSliderValue(panel->topaS, 200);
|
WMSetSliderValue(panel->topaS, 200);
|
||||||
|
WMSetSliderContinuous(panel->topaS, False);
|
||||||
|
WMSetSliderAction(panel->topaS, opaqChangeCallback, panel);
|
||||||
|
|
||||||
WMMapSubwidgets(panel->topaF);
|
WMMapSubwidgets(panel->topaF);
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -1357,10 +1477,11 @@ CreateTexturePanel(WMWindow *keyWindow)
|
|||||||
WMSetButtonText(panel->browB, _("Browse..."));
|
WMSetButtonText(panel->browB, _("Browse..."));
|
||||||
WMSetButtonAction(panel->browB, browseImageCallback, panel);
|
WMSetButtonAction(panel->browB, browseImageCallback, panel);
|
||||||
|
|
||||||
panel->dispB = WMCreateCommandButton(panel->imageF);
|
/* panel->dispB = WMCreateCommandButton(panel->imageF);
|
||||||
WMResizeWidget(panel->dispB, 90, 24);
|
WMResizeWidget(panel->dispB, 90, 24);
|
||||||
WMMoveWidget(panel->dispB, 190, 80);
|
WMMoveWidget(panel->dispB, 190, 80);
|
||||||
WMSetButtonText(panel->dispB, _("Show"));
|
WMSetButtonText(panel->dispB, _("Show"));
|
||||||
|
*/
|
||||||
|
|
||||||
panel->arrP = WMCreatePopUpButton(panel->imageF);
|
panel->arrP = WMCreatePopUpButton(panel->imageF);
|
||||||
WMResizeWidget(panel->arrP, 90, 20);
|
WMResizeWidget(panel->arrP, 90, 20);
|
||||||
|
|||||||
@@ -106,10 +106,13 @@ static void loadConfigurations(WMScreen *scr, WMWindow *mainw);
|
|||||||
|
|
||||||
static void savePanelData(Panel *panel);
|
static void savePanelData(Panel *panel);
|
||||||
|
|
||||||
|
static void prepareForClose();
|
||||||
|
|
||||||
void
|
void
|
||||||
quit(WMWidget *w, void *data)
|
quit(WMWidget *w, void *data)
|
||||||
{
|
{
|
||||||
|
prepareForClose();
|
||||||
|
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -157,6 +160,7 @@ save(WMWidget *w, void *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
undo(WMWidget *w, void *data)
|
undo(WMWidget *w, void *data)
|
||||||
{
|
{
|
||||||
@@ -187,6 +191,23 @@ undoAll(WMWidget *w, void *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
prepareForClose()
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i=0; i<WPrefs.sectionCount; i++) {
|
||||||
|
PanelRec *rec = WMGetHangedData(WPrefs.sectionB[i]);
|
||||||
|
|
||||||
|
if (rec->callbacks.prepareForClose
|
||||||
|
&& (rec->callbacks.flags & INITIALIZED_PANEL))
|
||||||
|
(*rec->callbacks.prepareForClose)((Panel*)rec);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
createMainWindow(WMScreen *scr)
|
createMainWindow(WMScreen *scr)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ typedef struct {
|
|||||||
void (*updateDomain)(Panel*); /* save the changes to the dictionary */
|
void (*updateDomain)(Panel*); /* save the changes to the dictionary */
|
||||||
Bool (*requiresRestart)(Panel*); /* return True if some static option was changed */
|
Bool (*requiresRestart)(Panel*); /* return True if some static option was changed */
|
||||||
void (*undoChanges)(Panel*); /* reset values to those in the dictionary */
|
void (*undoChanges)(Panel*); /* reset values to those in the dictionary */
|
||||||
|
void (*prepareForClose)(Panel*); /* called when exiting WPrefs */
|
||||||
} CallbackRec;
|
} CallbackRec;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
Position = "0,1";
|
Position = "0,1";
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Command = "/usr/local/GNUstep/Apps/WPrefs.app/WPrefs";
|
Command = "/usr/local/GNUstep/Local/Apps/WPrefs.app/WPrefs";
|
||||||
Name = groupLeader.WPrefs;
|
Name = groupLeader.WPrefs;
|
||||||
AutoLaunch = No;
|
AutoLaunch = No;
|
||||||
Forced = No;
|
Forced = No;
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
DisableMiniwindows = NO;
|
||||||
OpenTransientOnOwnerWorkspace = NO;
|
OpenTransientOnOwnerWorkspace = NO;
|
||||||
EdgeResistance = 30;
|
EdgeResistance = 30;
|
||||||
IconificationStyle = Zoom;
|
IconificationStyle = Zoom;
|
||||||
@@ -54,9 +55,9 @@
|
|||||||
IconPosition = "blh";
|
IconPosition = "blh";
|
||||||
WrapMenus = NO;
|
WrapMenus = NO;
|
||||||
ScrollableMenus = YES;
|
ScrollableMenus = YES;
|
||||||
MenuScrollSpeed = medium;
|
MenuScrollSpeed = fast;
|
||||||
IconSlideSpeed = medium;
|
IconSlideSpeed = fast;
|
||||||
ShadeSpeed = medium;
|
ShadeSpeed = fast;
|
||||||
DoubleClickTime = 250;
|
DoubleClickTime = 250;
|
||||||
AlignSubmenus = NO;
|
AlignSubmenus = NO;
|
||||||
NoWindowOverIcons = NO;
|
NoWindowOverIcons = NO;
|
||||||
|
|||||||
@@ -12,11 +12,15 @@ Window Maker 0.20.4 or newer.
|
|||||||
How To Install a Theme Pack
|
How To Install a Theme Pack
|
||||||
===========================
|
===========================
|
||||||
|
|
||||||
To install a theme, unpack your theme into your theme directory,
|
To install a theme, unpack your theme into your WindowMaker directory
|
||||||
usually ~/GNUstep/Library/WindowMaker/Themes
|
(the same as old-style themes), usually ~/GNUstep/Library/WindowMaker
|
||||||
|
|
||||||
cd ~/GNUstep/Library/WindowMaker/Themes
|
cd ~/GNUstep/Library/WindowMaker
|
||||||
gunzip -c xyztheme.tar.gz | tar xf -
|
gzip -dc "xyztheme.tar.gz" | tar xvf -
|
||||||
|
|
||||||
|
You can also do this in your system-wide WindowMaker directory (usually
|
||||||
|
/usr/local/share/WindowMaker) to have the themes be available to all
|
||||||
|
your users. This will probably need to be done with root access.
|
||||||
|
|
||||||
|
|
||||||
How To Load a Theme
|
How To Load a Theme
|
||||||
@@ -37,19 +41,25 @@ How To Make a Theme Pack
|
|||||||
To create a theme pack from your current configuration, use the getstyle
|
To create a theme pack from your current configuration, use the getstyle
|
||||||
utility with the -p flag. Example:
|
utility with the -p flag. Example:
|
||||||
|
|
||||||
getstyle -p MyTheme
|
getstyle -p ~/GNUstep/Library/WindowMaker/Themes/MyTheme
|
||||||
|
|
||||||
This will create a theme pack named MyTheme.themed, containing everything
|
This will create a theme pack (a new directory in either the current
|
||||||
it requires, including all pixmap files.
|
directory or a directory you specify) named MyTheme.themed, containing
|
||||||
|
everything it requires, including all pixmap files. In this example,
|
||||||
|
the new theme pack would be made in your themes directory and be
|
||||||
|
immediately available in your Themes menu.
|
||||||
|
|
||||||
Additionally, you can put a text file named MyTheme.lsm in the MyTheme.themed
|
Additionally, you can put a text file named MyTheme.lsm in the MyTheme.themed
|
||||||
directory. This file can contain info like copyrights, credits or whatever.
|
directory. This file can contain info like copyrights, credits or whatever.
|
||||||
|
|
||||||
To distribute your theme, just make a .tar.gz of the .themed directory.
|
To distribute your theme, just make a .tar.gz of the .themed directory.
|
||||||
|
This is preferably done from the same directory that you unpack the themes
|
||||||
|
from to maintain consistancy with the old theme format.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
tar cf MyTheme.tar MyTheme.themed
|
cd ~/GNUstep/Library/WindowMaker
|
||||||
|
tar cvf MyTheme.tar Themes/MyTheme.themed
|
||||||
gzip MyTheme.tar
|
gzip MyTheme.tar
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
60
configure
vendored
60
configure
vendored
@@ -2358,13 +2358,15 @@ done
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
DLLIBS=""
|
||||||
|
|
||||||
echo $ac_n "checking for dlopen""... $ac_c" 1>&6
|
echo $ac_n "checking for dlopen""... $ac_c" 1>&6
|
||||||
echo "configure:2363: checking for dlopen" >&5
|
echo "configure:2365: checking for dlopen" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 2368 "configure"
|
#line 2370 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* System header to define __stub macros and hopefully few prototypes,
|
/* System header to define __stub macros and hopefully few prototypes,
|
||||||
which can conflict with char dlopen(); below. */
|
which can conflict with char dlopen(); below. */
|
||||||
@@ -2387,7 +2389,7 @@ dlopen();
|
|||||||
|
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:2391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
if { (eval echo configure:2393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_func_dlopen=yes"
|
eval "ac_cv_func_dlopen=yes"
|
||||||
else
|
else
|
||||||
@@ -2405,7 +2407,7 @@ if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
|
|||||||
else
|
else
|
||||||
echo "$ac_t""no" 1>&6
|
echo "$ac_t""no" 1>&6
|
||||||
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
|
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
|
||||||
echo "configure:2409: checking for dlopen in -ldl" >&5
|
echo "configure:2411: checking for dlopen in -ldl" >&5
|
||||||
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
|
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
|
||||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
@@ -2413,7 +2415,7 @@ else
|
|||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
LIBS="-ldl $LIBS"
|
LIBS="-ldl $LIBS"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 2417 "configure"
|
#line 2419 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* Override any gcc2 internal prototype to avoid an error. */
|
/* Override any gcc2 internal prototype to avoid an error. */
|
||||||
/* We use char because int might match the return type of a gcc2
|
/* We use char because int might match the return type of a gcc2
|
||||||
@@ -2424,7 +2426,7 @@ int main() {
|
|||||||
dlopen()
|
dlopen()
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:2428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
if { (eval echo configure:2430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||||
else
|
else
|
||||||
@@ -2453,17 +2455,17 @@ if test "x$HAVEDL" = xyes; then
|
|||||||
do
|
do
|
||||||
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
||||||
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
||||||
echo "configure:2457: checking for $ac_hdr" >&5
|
echo "configure:2459: checking for $ac_hdr" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 2462 "configure"
|
#line 2464 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <$ac_hdr>
|
#include <$ac_hdr>
|
||||||
EOF
|
EOF
|
||||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||||
{ (eval echo configure:2467: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
{ (eval echo configure:2469: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||||
if test -z "$ac_err"; then
|
if test -z "$ac_err"; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
@@ -2497,7 +2499,7 @@ if test "x$CPP_PATH" = x; then
|
|||||||
# Extract the first word of "cpp", so it can be a program name with args.
|
# Extract the first word of "cpp", so it can be a program name with args.
|
||||||
set dummy cpp; ac_word=$2
|
set dummy cpp; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:2501: checking for $ac_word" >&5
|
echo "configure:2503: checking for $ac_word" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_path_CPP_PATH'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_path_CPP_PATH'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@@ -2553,12 +2555,12 @@ EOF
|
|||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
|
echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
|
||||||
echo "configure:2557: checking for sys/wait.h that is POSIX.1 compatible" >&5
|
echo "configure:2559: checking for sys/wait.h that is POSIX.1 compatible" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 2562 "configure"
|
#line 2564 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
@@ -2574,7 +2576,7 @@ wait (&s);
|
|||||||
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
|
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:2578: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
if { (eval echo configure:2580: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
ac_cv_header_sys_wait_h=yes
|
ac_cv_header_sys_wait_h=yes
|
||||||
else
|
else
|
||||||
@@ -2595,12 +2597,12 @@ EOF
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
|
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
|
||||||
echo "configure:2599: checking whether time.h and sys/time.h may both be included" >&5
|
echo "configure:2601: checking whether time.h and sys/time.h may both be included" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 2604 "configure"
|
#line 2606 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
@@ -2609,7 +2611,7 @@ int main() {
|
|||||||
struct tm *tp;
|
struct tm *tp;
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:2613: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
if { (eval echo configure:2615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
ac_cv_header_time=yes
|
ac_cv_header_time=yes
|
||||||
else
|
else
|
||||||
@@ -2634,17 +2636,17 @@ for ac_hdr in fcntl.h limits.h sys/ioctl.h sys/time.h sys/types.h\
|
|||||||
do
|
do
|
||||||
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
||||||
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
||||||
echo "configure:2638: checking for $ac_hdr" >&5
|
echo "configure:2640: checking for $ac_hdr" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 2643 "configure"
|
#line 2645 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <$ac_hdr>
|
#include <$ac_hdr>
|
||||||
EOF
|
EOF
|
||||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||||
{ (eval echo configure:2648: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
{ (eval echo configure:2650: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||||
if test -z "$ac_err"; then
|
if test -z "$ac_err"; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
@@ -2674,12 +2676,12 @@ done
|
|||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
|
echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
|
||||||
echo "configure:2678: checking for sys_siglist declaration in signal.h or unistd.h" >&5
|
echo "configure:2680: checking for sys_siglist declaration in signal.h or unistd.h" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 2683 "configure"
|
#line 2685 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
@@ -2691,7 +2693,7 @@ int main() {
|
|||||||
char *msg = *(sys_siglist + 1);
|
char *msg = *(sys_siglist + 1);
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:2695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
if { (eval echo configure:2697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
ac_cv_decl_sys_siglist=yes
|
ac_cv_decl_sys_siglist=yes
|
||||||
else
|
else
|
||||||
@@ -2712,12 +2714,12 @@ EOF
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo $ac_n "checking for working const""... $ac_c" 1>&6
|
echo $ac_n "checking for working const""... $ac_c" 1>&6
|
||||||
echo "configure:2716: checking for working const" >&5
|
echo "configure:2718: checking for working const" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 2721 "configure"
|
#line 2723 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
@@ -2766,7 +2768,7 @@ ccp = (char const *const *) p;
|
|||||||
|
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:2770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
if { (eval echo configure:2772: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
ac_cv_c_const=yes
|
ac_cv_c_const=yes
|
||||||
else
|
else
|
||||||
@@ -2789,12 +2791,12 @@ fi
|
|||||||
#AC_TYPE_SIZE_T
|
#AC_TYPE_SIZE_T
|
||||||
#AC_TYPE_PID_T
|
#AC_TYPE_PID_T
|
||||||
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
|
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
|
||||||
echo "configure:2793: checking return type of signal handlers" >&5
|
echo "configure:2795: checking return type of signal handlers" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 2798 "configure"
|
#line 2800 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
@@ -2811,7 +2813,7 @@ int main() {
|
|||||||
int i;
|
int i;
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:2815: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
if { (eval echo configure:2817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
ac_cv_type_signal=void
|
ac_cv_type_signal=void
|
||||||
else
|
else
|
||||||
@@ -2837,8 +2839,6 @@ EOF
|
|||||||
|
|
||||||
|
|
||||||
INTLIBS=""
|
INTLIBS=""
|
||||||
DLLIBS=""
|
|
||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking for gettext""... $ac_c" 1>&6
|
echo $ac_n "checking for gettext""... $ac_c" 1>&6
|
||||||
echo "configure:2845: checking for gettext" >&5
|
echo "configure:2845: checking for gettext" >&5
|
||||||
|
|||||||
@@ -313,7 +313,9 @@ typedef struct WPreferences {
|
|||||||
|
|
||||||
char dont_confirm_kill; /* do not confirm Kill application */
|
char dont_confirm_kill; /* do not confirm Kill application */
|
||||||
|
|
||||||
char dont_blink;
|
char disable_miniwindows;
|
||||||
|
|
||||||
|
char dont_blink; /* do not blink icon selection */
|
||||||
|
|
||||||
/* Appearance options */
|
/* Appearance options */
|
||||||
char new_style; /* Use newstyle buttons */
|
char new_style; /* Use newstyle buttons */
|
||||||
|
|||||||
105
src/actions.c
105
src/actions.c
@@ -917,10 +917,12 @@ wIconifyWindow(WWindow *wwin)
|
|||||||
GrabModeAsync, None, None, CurrentTime);
|
GrabModeAsync, None, None, CurrentTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!wwin->flags.icon_moved) {
|
if (!wPreferences.disable_miniwindows) {
|
||||||
PlaceIcon(wwin->screen_ptr, &wwin->icon_x, &wwin->icon_y);
|
if (!wwin->flags.icon_moved) {
|
||||||
|
PlaceIcon(wwin->screen_ptr, &wwin->icon_x, &wwin->icon_y);
|
||||||
|
}
|
||||||
|
wwin->icon = wIconCreate(wwin);
|
||||||
}
|
}
|
||||||
wwin->icon = wIconCreate(wwin);
|
|
||||||
|
|
||||||
wwin->flags.miniaturized = 1;
|
wwin->flags.miniaturized = 1;
|
||||||
wwin->flags.mapped = 0;
|
wwin->flags.mapped = 0;
|
||||||
@@ -939,28 +941,58 @@ wIconifyWindow(WWindow *wwin)
|
|||||||
/* let all Expose events arrive so that we can repaint
|
/* let all Expose events arrive so that we can repaint
|
||||||
* something before the animation starts (and the server is grabbed) */
|
* something before the animation starts (and the server is grabbed) */
|
||||||
XSync(dpy, 0);
|
XSync(dpy, 0);
|
||||||
wClientSetState(wwin, IconicState, wwin->icon->icon_win);
|
|
||||||
|
if (wPreferences.disable_miniwindows)
|
||||||
|
wClientSetState(wwin, IconicState, None);
|
||||||
|
else
|
||||||
|
wClientSetState(wwin, IconicState, wwin->icon->icon_win);
|
||||||
|
|
||||||
flushExpose();
|
flushExpose();
|
||||||
#ifdef ANIMATIONS
|
#ifdef ANIMATIONS
|
||||||
if (!wwin->screen_ptr->flags.startup && !wwin->flags.skip_next_animation
|
if (!wwin->screen_ptr->flags.startup && !wwin->flags.skip_next_animation
|
||||||
&& !wPreferences.no_animations) {
|
&& !wPreferences.no_animations) {
|
||||||
|
int ix, iy, iw, ih;
|
||||||
|
|
||||||
|
if (!wPreferences.disable_miniwindows) {
|
||||||
|
ix = wwin->icon_x;
|
||||||
|
iy = wwin->icon_y;
|
||||||
|
iw = wwin->icon->core->width;
|
||||||
|
ih = wwin->icon->core->height;
|
||||||
|
} else {
|
||||||
|
WArea area;
|
||||||
|
|
||||||
|
if (wKWMGetIconGeometry(wwin, &area)) {
|
||||||
|
ix = area.x1;
|
||||||
|
iy = area.y1;
|
||||||
|
iw = area.x2 - ix;
|
||||||
|
ih = area.y2 - iy;
|
||||||
|
} else {
|
||||||
|
ix = 0;
|
||||||
|
iy = 0;
|
||||||
|
iw = wwin->screen_ptr->scr_width;
|
||||||
|
ih = wwin->screen_ptr->scr_height;
|
||||||
|
}
|
||||||
|
}
|
||||||
animateResize(wwin->screen_ptr, wwin->frame_x, wwin->frame_y,
|
animateResize(wwin->screen_ptr, wwin->frame_x, wwin->frame_y,
|
||||||
wwin->frame->core->width, wwin->frame->core->height,
|
wwin->frame->core->width, wwin->frame->core->height,
|
||||||
wwin->icon_x, wwin->icon_y,
|
ix, iy, iw, ih, False);
|
||||||
wwin->icon->core->width, wwin->icon->core->height,
|
|
||||||
False);
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
wwin->flags.skip_next_animation = 0;
|
wwin->flags.skip_next_animation = 0;
|
||||||
if (wwin->screen_ptr->current_workspace==wwin->frame->workspace ||
|
|
||||||
IS_OMNIPRESENT(wwin) || wPreferences.sticky_icons)
|
|
||||||
|
|
||||||
XMapWindow(dpy, wwin->icon->core->window);
|
if (!wPreferences.disable_miniwindows) {
|
||||||
AddToStackList(wwin->icon->core);
|
|
||||||
|
|
||||||
wLowerFrame(wwin->icon->core);
|
if (wwin->screen_ptr->current_workspace==wwin->frame->workspace ||
|
||||||
|
IS_OMNIPRESENT(wwin) || wPreferences.sticky_icons)
|
||||||
|
|
||||||
|
XMapWindow(dpy, wwin->icon->core->window);
|
||||||
|
|
||||||
|
AddToStackList(wwin->icon->core);
|
||||||
|
|
||||||
|
wLowerFrame(wwin->icon->core);
|
||||||
|
}
|
||||||
|
|
||||||
if (present) {
|
if (present) {
|
||||||
WWindow *owner = recursiveTransientFor(wwin->screen_ptr->focused_window);
|
WWindow *owner = recursiveTransientFor(wwin->screen_ptr->focused_window);
|
||||||
@@ -1002,7 +1034,7 @@ wIconifyWindow(WWindow *wwin)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (wwin->flags.selected)
|
if (wwin->flags.selected && !wPreferences.disable_miniwindows)
|
||||||
wIconSelect(wwin->icon);
|
wIconSelect(wwin->icon);
|
||||||
|
|
||||||
#ifdef GNOME_STUFF
|
#ifdef GNOME_STUFF
|
||||||
@@ -1014,10 +1046,11 @@ wIconifyWindow(WWindow *wwin)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
UpdateSwitchMenu(wwin->screen_ptr, wwin, ACTION_CHANGE_STATE);
|
UpdateSwitchMenu(wwin->screen_ptr, wwin, ACTION_CHANGE_STATE);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
wDeiconifyWindow(WWindow *wwin)
|
wDeiconifyWindow(WWindow *wwin)
|
||||||
{
|
{
|
||||||
@@ -1042,10 +1075,12 @@ wDeiconifyWindow(WWindow *wwin)
|
|||||||
if (!wwin->flags.shaded)
|
if (!wwin->flags.shaded)
|
||||||
wwin->flags.mapped = 1;
|
wwin->flags.mapped = 1;
|
||||||
|
|
||||||
if (wwin->icon->selected)
|
if (!wPreferences.disable_miniwindows) {
|
||||||
wIconSelect(wwin->icon);
|
if (wwin->icon->selected)
|
||||||
|
wIconSelect(wwin->icon);
|
||||||
|
|
||||||
XUnmapWindow(dpy, wwin->icon->core->window);
|
XUnmapWindow(dpy, wwin->icon->core->window);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef WMSOUND
|
#ifdef WMSOUND
|
||||||
wSoundPlay(WMSOUND_DEICONIFY);
|
wSoundPlay(WMSOUND_DEICONIFY);
|
||||||
@@ -1055,8 +1090,29 @@ wDeiconifyWindow(WWindow *wwin)
|
|||||||
#ifdef ANIMATIONS
|
#ifdef ANIMATIONS
|
||||||
if (!wwin->screen_ptr->flags.startup && !wPreferences.no_animations
|
if (!wwin->screen_ptr->flags.startup && !wPreferences.no_animations
|
||||||
&& !wwin->flags.skip_next_animation) {
|
&& !wwin->flags.skip_next_animation) {
|
||||||
animateResize(wwin->screen_ptr, wwin->icon_x, wwin->icon_y,
|
int ix, iy, iw, ih;
|
||||||
wwin->icon->core->width, wwin->icon->core->height,
|
|
||||||
|
if (!wPreferences.disable_miniwindows) {
|
||||||
|
ix = wwin->icon_x;
|
||||||
|
iy = wwin->icon_y;
|
||||||
|
iw = wwin->icon->core->width;
|
||||||
|
ih = wwin->icon->core->height;
|
||||||
|
} else {
|
||||||
|
WArea area;
|
||||||
|
|
||||||
|
if (wKWMGetIconGeometry(wwin, &area)) {
|
||||||
|
ix = area.x1;
|
||||||
|
iy = area.y1;
|
||||||
|
iw = area.x2 - ix;
|
||||||
|
ih = area.y2 - iy;
|
||||||
|
} else {
|
||||||
|
ix = 0;
|
||||||
|
iy = 0;
|
||||||
|
iw = wwin->screen_ptr->scr_width;
|
||||||
|
ih = wwin->screen_ptr->scr_height;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
animateResize(wwin->screen_ptr, ix, iy, iw, ih,
|
||||||
wwin->frame_x, wwin->frame_y,
|
wwin->frame_x, wwin->frame_y,
|
||||||
wwin->frame->core->width, wwin->frame->core->height,
|
wwin->frame->core->width, wwin->frame->core->height,
|
||||||
False);
|
False);
|
||||||
@@ -1073,11 +1129,13 @@ wDeiconifyWindow(WWindow *wwin)
|
|||||||
wClientSetState(wwin, NormalState, None);
|
wClientSetState(wwin, NormalState, None);
|
||||||
}
|
}
|
||||||
mapTransientsFor(wwin);
|
mapTransientsFor(wwin);
|
||||||
RemoveFromStackList(wwin->icon->core);
|
|
||||||
/* removeIconGrabs(wwin->icon);*/
|
|
||||||
wIconDestroy(wwin->icon);
|
|
||||||
wwin->icon = NULL;
|
|
||||||
|
|
||||||
|
if (!wPreferences.disable_miniwindows) {
|
||||||
|
RemoveFromStackList(wwin->icon->core);
|
||||||
|
/* removeIconGrabs(wwin->icon);*/
|
||||||
|
wIconDestroy(wwin->icon);
|
||||||
|
wwin->icon = NULL;
|
||||||
|
}
|
||||||
XUngrabServer(dpy);
|
XUngrabServer(dpy);
|
||||||
if (wPreferences.focus_mode==WKF_CLICK
|
if (wPreferences.focus_mode==WKF_CLICK
|
||||||
|| wPreferences.focus_mode==WKF_SLOPPY)
|
|| wPreferences.focus_mode==WKF_SLOPPY)
|
||||||
@@ -1116,7 +1174,6 @@ static void
|
|||||||
hideWindow(WIcon *icon, int icon_x, int icon_y, WWindow *wwin, int animate)
|
hideWindow(WIcon *icon, int icon_x, int icon_y, WWindow *wwin, int animate)
|
||||||
{
|
{
|
||||||
if (wwin->flags.miniaturized) {
|
if (wwin->flags.miniaturized) {
|
||||||
/* XXX wrong fix, can cause side effects, must remove 'if' */
|
|
||||||
if (wwin->icon) {
|
if (wwin->icon) {
|
||||||
XUnmapWindow(dpy, wwin->icon->core->window);
|
XUnmapWindow(dpy, wwin->icon->core->window);
|
||||||
wwin->icon->mapped = 0;
|
wwin->icon->mapped = 0;
|
||||||
|
|||||||
@@ -714,7 +714,7 @@ wClientGetNormalHints(WWindow *wwin, XWindowAttributes *wattribs, Bool geometry,
|
|||||||
wwin->normal_hints->min_width = wwin->normal_hints->max_width;
|
wwin->normal_hints->min_width = wwin->normal_hints->max_width;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (/*pre_icccm && */!wwin->screen_ptr->flags.startup && geometry) {
|
if (pre_icccm && !wwin->screen_ptr->flags.startup && geometry) {
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf("PRE ICCCM\n");
|
printf("PRE ICCCM\n");
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -268,32 +268,35 @@ static WOptionEnumeration seIconPositions[] = {
|
|||||||
WDefaultEntry staticOptionList[] = {
|
WDefaultEntry staticOptionList[] = {
|
||||||
|
|
||||||
{"DisableDithering", "NO", NULL,
|
{"DisableDithering", "NO", NULL,
|
||||||
&wPreferences.no_dithering, getBool, NULL
|
&wPreferences.no_dithering, getBool, NULL
|
||||||
},
|
},
|
||||||
{"ColormapSize", "4", NULL,
|
{"ColormapSize", "4", NULL,
|
||||||
&wPreferences.cmap_size, getInt, NULL
|
&wPreferences.cmap_size, getInt, NULL
|
||||||
},
|
},
|
||||||
/* static by laziness */
|
/* static by laziness */
|
||||||
{"IconSize", "64", NULL,
|
{"IconSize", "64", NULL,
|
||||||
&wPreferences.icon_size, getInt, NULL
|
&wPreferences.icon_size, getInt, NULL
|
||||||
},
|
},
|
||||||
{"ModifierKey", "Mod1", NULL,
|
{"ModifierKey", "Mod1", NULL,
|
||||||
&wPreferences.modifier_mask, getModMask, NULL
|
&wPreferences.modifier_mask, getModMask, NULL
|
||||||
},
|
},
|
||||||
{"DisableWSMouseActions", "NO", NULL,
|
{"DisableWSMouseActions", "NO", NULL,
|
||||||
&wPreferences.disable_root_mouse, getBool, NULL
|
&wPreferences.disable_root_mouse, getBool, NULL
|
||||||
},
|
},
|
||||||
{"FocusMode", "manual", seFocusModes,
|
{"FocusMode", "manual", seFocusModes,
|
||||||
&wPreferences.focus_mode, getEnum, NULL
|
&wPreferences.focus_mode, getEnum, NULL
|
||||||
}, /* have a problem when switching from manual to sloppy without restart */
|
}, /* have a problem when switching from manual to sloppy without restart */
|
||||||
{"NewStyle", "NO", NULL,
|
{"NewStyle", "NO", NULL,
|
||||||
&wPreferences.new_style, getBool, NULL
|
&wPreferences.new_style, getBool, NULL
|
||||||
},
|
},
|
||||||
{"DisableDock", "NO", (void*) WM_DOCK,
|
{"DisableDock", "NO", (void*) WM_DOCK,
|
||||||
NULL, getBool, setIfDockPresent
|
NULL, getBool, setIfDockPresent
|
||||||
},
|
},
|
||||||
{"DisableClip", "NO", (void*) WM_CLIP,
|
{"DisableClip", "NO", (void*) WM_CLIP,
|
||||||
NULL, getBool, setIfDockPresent
|
NULL, getBool, setIfDockPresent
|
||||||
|
},
|
||||||
|
{"DisableMiniwindows", "NO", NULL,
|
||||||
|
&wPreferences.disable_miniwindows, getBool, NULL
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
14
src/kwm.c
14
src/kwm.c
@@ -178,6 +178,8 @@ static Atom _XA_KWM_WIN_ICONIFIED = 0;
|
|||||||
static Atom _XA_KWM_WIN_MAXIMIZED = 0;
|
static Atom _XA_KWM_WIN_MAXIMIZED = 0;
|
||||||
static Atom _XA_KWM_WIN_STICKY = 0;
|
static Atom _XA_KWM_WIN_STICKY = 0;
|
||||||
|
|
||||||
|
static Atom _XA_KWM_WIN_ICON_GEOMETRY = 0;
|
||||||
|
|
||||||
static Atom _XA_KWM_CURRENT_DESKTOP = 0;
|
static Atom _XA_KWM_CURRENT_DESKTOP = 0;
|
||||||
static Atom _XA_KWM_NUMBER_OF_DESKTOPS = 0;
|
static Atom _XA_KWM_NUMBER_OF_DESKTOPS = 0;
|
||||||
static Atom _XA_KWM_DESKTOP_NAME_[MAX_WORKSPACES];
|
static Atom _XA_KWM_DESKTOP_NAME_[MAX_WORKSPACES];
|
||||||
@@ -558,6 +560,9 @@ wKWMInitStuff(WScreen *scr)
|
|||||||
|
|
||||||
_XA_KWM_WIN_MAXIMIZED = XInternAtom(dpy, "KWM_WIN_MAXIMIZED", False);
|
_XA_KWM_WIN_MAXIMIZED = XInternAtom(dpy, "KWM_WIN_MAXIMIZED", False);
|
||||||
|
|
||||||
|
_XA_KWM_WIN_ICON_GEOMETRY = XInternAtom(dpy, "KWM_WIN_ICON_GEOMETRY",
|
||||||
|
False);
|
||||||
|
|
||||||
_XA_KWM_COMMAND = XInternAtom(dpy, "KWM_COMMAND", False);
|
_XA_KWM_COMMAND = XInternAtom(dpy, "KWM_COMMAND", False);
|
||||||
|
|
||||||
_XA_KWM_ACTIVE_WINDOW = XInternAtom(dpy, "KWM_ACTIVE_WINDOW", False);
|
_XA_KWM_ACTIVE_WINDOW = XInternAtom(dpy, "KWM_ACTIVE_WINDOW", False);
|
||||||
@@ -1517,6 +1522,15 @@ wKWMGetUsableArea(WScreen *scr, WArea *area)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Bool
|
||||||
|
wKWMGetIconGeometry(WWindow *wwin, WArea *area)
|
||||||
|
{
|
||||||
|
return getAreaHint(wwin->client_win, _XA_KWM_WIN_ICON_GEOMETRY, area);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef not_used
|
#ifdef not_used
|
||||||
void
|
void
|
||||||
wKWMSetUsableAreaHint(WScreen *scr, int workspace)
|
wKWMSetUsableAreaHint(WScreen *scr, int workspace)
|
||||||
|
|||||||
@@ -93,5 +93,7 @@ void wKWMBroadcastStacking(WScreen *scr);
|
|||||||
|
|
||||||
char *wKWMGetWorkspaceName(WScreen *scr, int workspace);
|
char *wKWMGetWorkspaceName(WScreen *scr, int workspace);
|
||||||
|
|
||||||
|
Bool wKWMGetIconGeometry(WWindow *wwin, WArea *area);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -73,6 +73,7 @@ static char *options[] = {
|
|||||||
"FShadowColor",
|
"FShadowColor",
|
||||||
"PShadowColor",
|
"PShadowColor",
|
||||||
"UShadowColor",
|
"UShadowColor",
|
||||||
|
"MShadowColor",
|
||||||
#endif
|
#endif
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user