mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 12:28:22 +01:00
changed top widget of panels from frame to box
This commit is contained in:
@@ -38,14 +38,14 @@
|
|||||||
#include "TexturePanel.h"
|
#include "TexturePanel.h"
|
||||||
|
|
||||||
typedef struct _Panel {
|
typedef struct _Panel {
|
||||||
WMFrame *frame;
|
WMBox *box;
|
||||||
char *sectionName;
|
char *sectionName;
|
||||||
|
|
||||||
char *description;
|
char *description;
|
||||||
|
|
||||||
CallbackRec callbacks;
|
CallbackRec callbacks;
|
||||||
|
|
||||||
WMWindow *win;
|
WMWidget *parent;
|
||||||
|
|
||||||
WMLabel *prevL;
|
WMLabel *prevL;
|
||||||
|
|
||||||
@@ -729,10 +729,10 @@ renderTexture(WMScreen *scr, proplist_t texture, int width, int height,
|
|||||||
static Pixmap
|
static Pixmap
|
||||||
renderMenu(_Panel *panel, proplist_t texture, int width, int iheight)
|
renderMenu(_Panel *panel, proplist_t texture, int width, int iheight)
|
||||||
{
|
{
|
||||||
WMScreen *scr = WMWidgetScreen(panel->win);
|
WMScreen *scr = WMWidgetScreen(panel->parent);
|
||||||
Display *dpy = WMScreenDisplay(scr);
|
Display *dpy = WMScreenDisplay(scr);
|
||||||
Pixmap pix, tmp;
|
Pixmap pix, tmp;
|
||||||
GC gc = XCreateGC(dpy, WMWidgetXID(panel->win), 0, NULL);
|
GC gc = XCreateGC(dpy, WMWidgetXID(panel->parent), 0, NULL);
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
switch (panel->menuStyle) {
|
switch (panel->menuStyle) {
|
||||||
@@ -764,7 +764,7 @@ renderPreview(_Panel *panel, GC gc, int part, int relief)
|
|||||||
WMListItem *item;
|
WMListItem *item;
|
||||||
TextureListItem *titem;
|
TextureListItem *titem;
|
||||||
Pixmap pix;
|
Pixmap pix;
|
||||||
WMScreen *scr = WMWidgetScreen(panel->frame);
|
WMScreen *scr = WMWidgetScreen(panel->box);
|
||||||
|
|
||||||
item = WMGetListItem(panel->texLs, panel->textureIndex[part]);
|
item = WMGetListItem(panel->texLs, panel->textureIndex[part]);
|
||||||
titem = (TextureListItem*)item->clientData;
|
titem = (TextureListItem*)item->clientData;
|
||||||
@@ -787,7 +787,7 @@ renderPreview(_Panel *panel, GC gc, int part, int relief)
|
|||||||
static void
|
static void
|
||||||
updatePreviewBox(_Panel *panel, int elements)
|
updatePreviewBox(_Panel *panel, int elements)
|
||||||
{
|
{
|
||||||
WMScreen *scr = WMWidgetScreen(panel->win);
|
WMScreen *scr = WMWidgetScreen(panel->parent);
|
||||||
Display *dpy = WMScreenDisplay(scr);
|
Display *dpy = WMScreenDisplay(scr);
|
||||||
/* RContext *rc = WMScreenRContext(scr);*/
|
/* RContext *rc = WMScreenRContext(scr);*/
|
||||||
int refresh = 0;
|
int refresh = 0;
|
||||||
@@ -796,13 +796,13 @@ updatePreviewBox(_Panel *panel, int elements)
|
|||||||
int colorUpdate = 0;
|
int colorUpdate = 0;
|
||||||
WMColor *black = WMBlackColor(scr);
|
WMColor *black = WMBlackColor(scr);
|
||||||
|
|
||||||
gc = XCreateGC(dpy, WMWidgetXID(panel->win), 0, NULL);
|
gc = XCreateGC(dpy, WMWidgetXID(panel->parent), 0, NULL);
|
||||||
|
|
||||||
|
|
||||||
if (panel->preview == None) {
|
if (panel->preview == None) {
|
||||||
WMColor *color;
|
WMColor *color;
|
||||||
|
|
||||||
panel->preview = XCreatePixmap(dpy, WMWidgetXID(panel->win),
|
panel->preview = XCreatePixmap(dpy, WMWidgetXID(panel->parent),
|
||||||
240-4, 215-4, WMScreenDepth(scr));
|
240-4, 215-4, WMScreenDepth(scr));
|
||||||
|
|
||||||
color = WMCreateRGBColor(scr, 0x5100, 0x5100, 0x7100, True);
|
color = WMCreateRGBColor(scr, 0x5100, 0x5100, 0x7100, True);
|
||||||
@@ -951,7 +951,7 @@ okNewTexture(void *data)
|
|||||||
char *str;
|
char *str;
|
||||||
proplist_t prop;
|
proplist_t prop;
|
||||||
TextureListItem *titem;
|
TextureListItem *titem;
|
||||||
WMScreen *scr = WMWidgetScreen(panel->win);
|
WMScreen *scr = WMWidgetScreen(panel->parent);
|
||||||
|
|
||||||
titem = wmalloc(sizeof(TextureListItem));
|
titem = wmalloc(sizeof(TextureListItem));
|
||||||
memset(titem, 0, sizeof(TextureListItem));
|
memset(titem, 0, sizeof(TextureListItem));
|
||||||
@@ -1127,7 +1127,7 @@ extractTexture(WMWidget *w, void *data)
|
|||||||
WMSetFilePanelCanChooseDirectories(opanel, False);
|
WMSetFilePanelCanChooseDirectories(opanel, False);
|
||||||
WMSetFilePanelCanChooseFiles(opanel, True);
|
WMSetFilePanelCanChooseFiles(opanel, True);
|
||||||
|
|
||||||
if (WMRunModalFilePanelForDirectory(opanel, panel->win, wgethomedir(),
|
if (WMRunModalFilePanelForDirectory(opanel, panel->parent, wgethomedir(),
|
||||||
_("Select File"), NULL)) {
|
_("Select File"), NULL)) {
|
||||||
path = WMGetFilePanelFileName(opanel);
|
path = WMGetFilePanelFileName(opanel);
|
||||||
|
|
||||||
@@ -1145,7 +1145,7 @@ changePage(WMWidget *w, void *data)
|
|||||||
int section;
|
int section;
|
||||||
WMListItem *item;
|
WMListItem *item;
|
||||||
TextureListItem *titem;
|
TextureListItem *titem;
|
||||||
WMScreen *scr = WMWidgetScreen(panel->frame);
|
WMScreen *scr = WMWidgetScreen(panel->box);
|
||||||
RContext *rc = WMScreenRContext(scr);
|
RContext *rc = WMScreenRContext(scr);
|
||||||
static WMPoint positions[] = {
|
static WMPoint positions[] = {
|
||||||
{5, 10},
|
{5, 10},
|
||||||
@@ -1415,7 +1415,7 @@ fillColorList(_Panel *panel)
|
|||||||
WMColor *color;
|
WMColor *color;
|
||||||
proplist_t list;
|
proplist_t list;
|
||||||
WMUserDefaults *udb = WMGetStandardUserDefaults();
|
WMUserDefaults *udb = WMGetStandardUserDefaults();
|
||||||
WMScreen *scr = WMWidgetScreen(panel->frame);
|
WMScreen *scr = WMWidgetScreen(panel->box);
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
list = WMGetUDObjectForKey(udb, "ColorList");
|
list = WMGetUDObjectForKey(udb, "ColorList");
|
||||||
@@ -1452,7 +1452,7 @@ changeColorPage(WMWidget *w, void *data)
|
|||||||
{
|
{
|
||||||
_Panel *panel = (_Panel*)data;
|
_Panel *panel = (_Panel*)data;
|
||||||
int section;
|
int section;
|
||||||
WMScreen *scr = WMWidgetScreen(panel->frame);
|
WMScreen *scr = WMWidgetScreen(panel->box);
|
||||||
RContext *rc = WMScreenRContext(scr);
|
RContext *rc = WMScreenRContext(scr);
|
||||||
static WMPoint positions[] = {
|
static WMPoint positions[] = {
|
||||||
{5, 10},
|
{5, 10},
|
||||||
@@ -1521,7 +1521,7 @@ paintText(WMScreen *scr, Drawable d, WMColor *color, WMFont *font,
|
|||||||
static void
|
static void
|
||||||
updateColorPreviewBox(_Panel *panel, int elements)
|
updateColorPreviewBox(_Panel *panel, int elements)
|
||||||
{
|
{
|
||||||
WMScreen *scr = WMWidgetScreen(panel->frame);
|
WMScreen *scr = WMWidgetScreen(panel->box);
|
||||||
WMPixmap *pixmap;
|
WMPixmap *pixmap;
|
||||||
Pixmap d;
|
Pixmap d;
|
||||||
|
|
||||||
@@ -1689,7 +1689,7 @@ createPanel(Panel *p)
|
|||||||
{
|
{
|
||||||
_Panel *panel = (_Panel*)p;
|
_Panel *panel = (_Panel*)p;
|
||||||
WMFont *font;
|
WMFont *font;
|
||||||
WMScreen *scr = WMWidgetScreen(panel->win);
|
WMScreen *scr = WMWidgetScreen(panel->parent);
|
||||||
WMTabViewItem *item;
|
WMTabViewItem *item;
|
||||||
int i;
|
int i;
|
||||||
char *tmp;
|
char *tmp;
|
||||||
@@ -1722,12 +1722,11 @@ createPanel(Panel *p)
|
|||||||
panel->offLed = WMCreatePixmapFromXPMData(scr, blueled2_xpm);
|
panel->offLed = WMCreatePixmapFromXPMData(scr, blueled2_xpm);
|
||||||
panel->hand = WMCreatePixmapFromXPMData(scr, hand_xpm);
|
panel->hand = WMCreatePixmapFromXPMData(scr, hand_xpm);
|
||||||
|
|
||||||
panel->frame = WMCreateFrame(panel->win);
|
panel->box = WMCreateBox(panel->parent);
|
||||||
WMResizeWidget(panel->frame, FRAME_WIDTH, FRAME_HEIGHT);
|
WMSetBoxExpandsToParent(panel->box, 2, 2, 0, 0);
|
||||||
WMMoveWidget(panel->frame, FRAME_LEFT, FRAME_TOP);
|
|
||||||
|
|
||||||
/* preview box */
|
/* preview box */
|
||||||
panel->prevL = WMCreateLabel(panel->frame);
|
panel->prevL = WMCreateLabel(panel->box);
|
||||||
WMResizeWidget(panel->prevL, 240, FRAME_HEIGHT - 20);
|
WMResizeWidget(panel->prevL, 240, FRAME_HEIGHT - 20);
|
||||||
WMMoveWidget(panel->prevL, 15, 10);
|
WMMoveWidget(panel->prevL, 15, 10);
|
||||||
WMSetLabelRelief(panel->prevL, WRSunken);
|
WMSetLabelRelief(panel->prevL, WRSunken);
|
||||||
@@ -1741,14 +1740,14 @@ createPanel(Panel *p)
|
|||||||
|
|
||||||
tabviewDelegate.data = panel;
|
tabviewDelegate.data = panel;
|
||||||
|
|
||||||
panel->tabv = WMCreateTabView(panel->frame);
|
panel->tabv = WMCreateTabView(panel->box);
|
||||||
WMResizeWidget(panel->tabv, 245, FRAME_HEIGHT - 20);
|
WMResizeWidget(panel->tabv, 245, FRAME_HEIGHT - 20);
|
||||||
WMMoveWidget(panel->tabv, 265, 10);
|
WMMoveWidget(panel->tabv, 265, 10);
|
||||||
WMSetTabViewDelegate(panel->tabv, &tabviewDelegate);
|
WMSetTabViewDelegate(panel->tabv, &tabviewDelegate);
|
||||||
|
|
||||||
/*** texture list ***/
|
/*** texture list ***/
|
||||||
|
|
||||||
panel->texF = WMCreateFrame(panel->frame);
|
panel->texF = WMCreateFrame(panel->box);
|
||||||
WMSetFrameRelief(panel->texF, WRFlat);
|
WMSetFrameRelief(panel->texF, WRFlat);
|
||||||
|
|
||||||
item = WMCreateTabViewItemWithIdentifier(0);
|
item = WMCreateTabViewItemWithIdentifier(0);
|
||||||
@@ -1845,7 +1844,7 @@ createPanel(Panel *p)
|
|||||||
WMMapSubwidgets(panel->texF);
|
WMMapSubwidgets(panel->texF);
|
||||||
|
|
||||||
/*** colors ***/
|
/*** colors ***/
|
||||||
panel->colF = WMCreateFrame(panel->frame);
|
panel->colF = WMCreateFrame(panel->box);
|
||||||
WMSetFrameRelief(panel->colF, WRFlat);
|
WMSetFrameRelief(panel->colF, WRFlat);
|
||||||
|
|
||||||
item = WMCreateTabViewItemWithIdentifier(1);
|
item = WMCreateTabViewItemWithIdentifier(1);
|
||||||
@@ -1898,7 +1897,7 @@ createPanel(Panel *p)
|
|||||||
#ifdef unfinished
|
#ifdef unfinished
|
||||||
/*** root bg ***/
|
/*** root bg ***/
|
||||||
|
|
||||||
panel->bgF = WMCreateFrame(panel->frame);
|
panel->bgF = WMCreateFrame(panel->box);
|
||||||
WMSetFrameRelief(panel->bgF, WRFlat);
|
WMSetFrameRelief(panel->bgF, WRFlat);
|
||||||
|
|
||||||
item = WMCreateTabViewItemWithIdentifier(2);
|
item = WMCreateTabViewItemWithIdentifier(2);
|
||||||
@@ -1923,7 +1922,7 @@ createPanel(Panel *p)
|
|||||||
WMMapSubwidgets(panel->bgF);
|
WMMapSubwidgets(panel->bgF);
|
||||||
#endif /* unfinished */
|
#endif /* unfinished */
|
||||||
/*** options ***/
|
/*** options ***/
|
||||||
panel->optF = WMCreateFrame(panel->frame);
|
panel->optF = WMCreateFrame(panel->box);
|
||||||
WMSetFrameRelief(panel->optF, WRFlat);
|
WMSetFrameRelief(panel->optF, WRFlat);
|
||||||
|
|
||||||
item = WMCreateTabViewItemWithIdentifier(3);
|
item = WMCreateTabViewItemWithIdentifier(3);
|
||||||
@@ -2005,8 +2004,8 @@ createPanel(Panel *p)
|
|||||||
|
|
||||||
/**/
|
/**/
|
||||||
|
|
||||||
WMRealizeWidget(panel->frame);
|
WMRealizeWidget(panel->box);
|
||||||
WMMapSubwidgets(panel->frame);
|
WMMapSubwidgets(panel->box);
|
||||||
|
|
||||||
WMSetPopUpButtonSelectedItem(panel->secP, 0);
|
WMSetPopUpButtonSelectedItem(panel->secP, 0);
|
||||||
|
|
||||||
@@ -2018,7 +2017,7 @@ createPanel(Panel *p)
|
|||||||
|
|
||||||
fillColorList(panel);
|
fillColorList(panel);
|
||||||
|
|
||||||
panel->texturePanel = CreateTexturePanel(panel->win);
|
panel->texturePanel = CreateTexturePanel(panel->parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -2087,8 +2086,8 @@ showData(_Panel *panel)
|
|||||||
if (!str)
|
if (!str)
|
||||||
str = colorOptions[i*2+1];
|
str = colorOptions[i*2+1];
|
||||||
|
|
||||||
if (!(color = WMCreateNamedColor(WMWidgetScreen(panel->frame), str, False))) {
|
if (!(color = WMCreateNamedColor(WMWidgetScreen(panel->box), str, False))) {
|
||||||
color = WMCreateNamedColor(WMWidgetScreen(panel->frame), "#000000", False);
|
color = WMCreateNamedColor(WMWidgetScreen(panel->box), "#000000", False);
|
||||||
}
|
}
|
||||||
|
|
||||||
panel->colors[i] = color;
|
panel->colors[i] = color;
|
||||||
@@ -2219,7 +2218,7 @@ InitAppearance(WMScreen *scr, WMWindow *win)
|
|||||||
panel->description = _("Background texture configuration for windows,\n"
|
panel->description = _("Background texture configuration for windows,\n"
|
||||||
"menus and icons.");
|
"menus and icons.");
|
||||||
|
|
||||||
panel->win = win;
|
panel->parent = win;
|
||||||
|
|
||||||
panel->callbacks.createWidgets = createPanel;
|
panel->callbacks.createWidgets = createPanel;
|
||||||
panel->callbacks.updateDomain = storeData;
|
panel->callbacks.updateDomain = storeData;
|
||||||
@@ -2254,10 +2253,10 @@ OpenExtractPanelFor(_Panel *panel, char *path)
|
|||||||
ExtractPanel *epanel;
|
ExtractPanel *epanel;
|
||||||
WMColor *color;
|
WMColor *color;
|
||||||
WMFont *font;
|
WMFont *font;
|
||||||
WMScreen *scr = WMWidgetScreen(panel->win);
|
WMScreen *scr = WMWidgetScreen(panel->parent);
|
||||||
|
|
||||||
epanel = wmalloc(sizeof(ExtractPanel));
|
epanel = wmalloc(sizeof(ExtractPanel));
|
||||||
epanel->win = WMCreatePanelWithStyleForWindow(panel->win, "extract",
|
epanel->win = WMCreatePanelWithStyleForWindow(panel->parent, "extract",
|
||||||
WMTitledWindowMask
|
WMTitledWindowMask
|
||||||
|WMClosableWindowMask);
|
|WMClosableWindowMask);
|
||||||
WMResizeWidget(epanel->win, 245, 250);
|
WMResizeWidget(epanel->win, 245, 250);
|
||||||
|
|||||||
@@ -24,14 +24,14 @@
|
|||||||
#include "WPrefs.h"
|
#include "WPrefs.h"
|
||||||
|
|
||||||
typedef struct _Panel {
|
typedef struct _Panel {
|
||||||
WMFrame *frame;
|
WMBox *box;
|
||||||
char *sectionName;
|
char *sectionName;
|
||||||
|
|
||||||
char *description;
|
char *description;
|
||||||
|
|
||||||
CallbackRec callbacks;
|
CallbackRec callbacks;
|
||||||
|
|
||||||
WMWindow *win;
|
WMWidget *parent;
|
||||||
|
|
||||||
WMFrame *icoF;
|
WMFrame *icoF;
|
||||||
WMButton *icoB[5];
|
WMButton *icoB[5];
|
||||||
@@ -173,7 +173,7 @@ static void
|
|||||||
createPanel(Panel *p)
|
createPanel(Panel *p)
|
||||||
{
|
{
|
||||||
_Panel *panel = (_Panel*)p;
|
_Panel *panel = (_Panel*)p;
|
||||||
WMScreen *scr = WMWidgetScreen(panel->win);
|
WMScreen *scr = WMWidgetScreen(panel->parent);
|
||||||
char *buf1, *buf2;
|
char *buf1, *buf2;
|
||||||
WMPixmap *icon, *altIcon;
|
WMPixmap *icon, *altIcon;
|
||||||
RImage *xis = NULL;
|
RImage *xis = NULL;
|
||||||
@@ -191,19 +191,19 @@ createPanel(Panel *p)
|
|||||||
wfree(path);
|
wfree(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
panel->frame = WMCreateFrame(panel->win);
|
|
||||||
WMResizeWidget(panel->frame, FRAME_WIDTH, FRAME_HEIGHT);
|
panel->box = WMCreateBox(panel->parent);
|
||||||
WMMoveWidget(panel->frame, FRAME_LEFT, FRAME_TOP);
|
WMSetBoxExpandsToParent(panel->box, 2, 2, 0, 0);
|
||||||
|
|
||||||
/*********** Icon Slide Speed **********/
|
/*********** Icon Slide Speed **********/
|
||||||
|
|
||||||
panel->icoF = WMCreateFrame(panel->frame);
|
panel->icoF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->icoF, 230, 45);
|
WMResizeWidget(panel->icoF, 230, 45);
|
||||||
WMMoveWidget(panel->icoF, 15, 10);
|
WMMoveWidget(panel->icoF, 15, 10);
|
||||||
WMSetFrameTitle(panel->icoF, _("Icon Slide Speed"));
|
WMSetFrameTitle(panel->icoF, _("Icon Slide Speed"));
|
||||||
|
|
||||||
/*********** Shade Animation Speed **********/
|
/*********** Shade Animation Speed **********/
|
||||||
panel->shaF = WMCreateFrame(panel->frame);
|
panel->shaF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->shaF, 230, 45);
|
WMResizeWidget(panel->shaF, 230, 45);
|
||||||
WMMoveWidget(panel->shaF, 15, 60);
|
WMMoveWidget(panel->shaF, 15, 60);
|
||||||
WMSetFrameTitle(panel->shaF, _("Shade Animation Speed"));
|
WMSetFrameTitle(panel->shaF, _("Shade Animation Speed"));
|
||||||
@@ -265,7 +265,7 @@ createPanel(Panel *p)
|
|||||||
|
|
||||||
|
|
||||||
/***************** Smoothed Scaling *****************/
|
/***************** Smoothed Scaling *****************/
|
||||||
panel->smoF = WMCreateFrame(panel->frame);
|
panel->smoF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->smoF, 115, 110);
|
WMResizeWidget(panel->smoF, 115, 110);
|
||||||
WMMoveWidget(panel->smoF, 18, 115);
|
WMMoveWidget(panel->smoF, 18, 115);
|
||||||
WMSetFrameTitle(panel->smoF, _("Smooth Scaling"));
|
WMSetFrameTitle(panel->smoF, _("Smooth Scaling"));
|
||||||
@@ -307,7 +307,7 @@ createPanel(Panel *p)
|
|||||||
WMMapSubwidgets(panel->smoF);
|
WMMapSubwidgets(panel->smoF);
|
||||||
|
|
||||||
/***************** Titlebar Style Size ****************/
|
/***************** Titlebar Style Size ****************/
|
||||||
panel->titlF = WMCreateFrame(panel->frame);
|
panel->titlF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->titlF, 105, 110);
|
WMResizeWidget(panel->titlF, 105, 110);
|
||||||
WMMoveWidget(panel->titlF, 140, 115);
|
WMMoveWidget(panel->titlF, 140, 115);
|
||||||
WMSetFrameTitle(panel->titlF, _("Titlebar Style"));
|
WMSetFrameTitle(panel->titlF, _("Titlebar Style"));
|
||||||
@@ -345,7 +345,7 @@ createPanel(Panel *p)
|
|||||||
|
|
||||||
/**************** Features ******************/
|
/**************** Features ******************/
|
||||||
|
|
||||||
panel->animF = WMCreateFrame(panel->frame);
|
panel->animF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->animF, 255, 115);
|
WMResizeWidget(panel->animF, 255, 115);
|
||||||
WMMoveWidget(panel->animF, 255, 10);
|
WMMoveWidget(panel->animF, 255, 10);
|
||||||
WMSetFrameTitle(panel->animF, _("Animations and Sound"));
|
WMSetFrameTitle(panel->animF, _("Animations and Sound"));
|
||||||
@@ -423,7 +423,7 @@ createPanel(Panel *p)
|
|||||||
/*********** Dithering **********/
|
/*********** Dithering **********/
|
||||||
panel->cmapSize = 4;
|
panel->cmapSize = 4;
|
||||||
|
|
||||||
panel->dithF = WMCreateFrame(panel->frame);
|
panel->dithF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->dithF, 255, 95);
|
WMResizeWidget(panel->dithF, 255, 95);
|
||||||
WMMoveWidget(panel->dithF, 255, 130);
|
WMMoveWidget(panel->dithF, 255, 130);
|
||||||
WMSetFrameTitle(panel->dithF, _("Dithering colormap for 8bpp"));
|
WMSetFrameTitle(panel->dithF, _("Dithering colormap for 8bpp"));
|
||||||
@@ -467,8 +467,8 @@ createPanel(Panel *p)
|
|||||||
|
|
||||||
WMMapSubwidgets(panel->dithF);
|
WMMapSubwidgets(panel->dithF);
|
||||||
|
|
||||||
WMRealizeWidget(panel->frame);
|
WMRealizeWidget(panel->box);
|
||||||
WMMapSubwidgets(panel->frame);
|
WMMapSubwidgets(panel->box);
|
||||||
|
|
||||||
if (xis)
|
if (xis)
|
||||||
RDestroyImage(xis);
|
RDestroyImage(xis);
|
||||||
@@ -511,7 +511,7 @@ storeData(_Panel *panel)
|
|||||||
|
|
||||||
|
|
||||||
Panel*
|
Panel*
|
||||||
InitConfigurations(WMScreen *scr, WMWindow *win)
|
InitConfigurations(WMScreen *scr, WMWidget *parent)
|
||||||
{
|
{
|
||||||
_Panel *panel;
|
_Panel *panel;
|
||||||
|
|
||||||
@@ -524,7 +524,7 @@ InitConfigurations(WMScreen *scr, WMWindow *win)
|
|||||||
"toggling and number of colors to reserve for\n"
|
"toggling and number of colors to reserve for\n"
|
||||||
"Window Maker on 8bit displays.");
|
"Window Maker on 8bit displays.");
|
||||||
|
|
||||||
panel->win = win;
|
panel->parent = parent;
|
||||||
|
|
||||||
panel->callbacks.createWidgets = createPanel;
|
panel->callbacks.createWidgets = createPanel;
|
||||||
panel->callbacks.updateDomain = storeData;
|
panel->callbacks.updateDomain = storeData;
|
||||||
|
|||||||
@@ -24,14 +24,14 @@
|
|||||||
#include "WPrefs.h"
|
#include "WPrefs.h"
|
||||||
|
|
||||||
typedef struct _Panel {
|
typedef struct _Panel {
|
||||||
WMFrame *frame;
|
WMBox *box;
|
||||||
char *sectionName;
|
char *sectionName;
|
||||||
|
|
||||||
char *description;
|
char *description;
|
||||||
|
|
||||||
CallbackRec callbacks;
|
CallbackRec callbacks;
|
||||||
|
|
||||||
WMWindow *win;
|
WMWidget *parent;
|
||||||
|
|
||||||
WMButton *swi[8];
|
WMButton *swi[8];
|
||||||
|
|
||||||
@@ -63,12 +63,11 @@ createPanel(Panel *p)
|
|||||||
_Panel *panel = (_Panel*)p;
|
_Panel *panel = (_Panel*)p;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
panel->frame = WMCreateFrame(panel->win);
|
panel->box = WMCreateBox(panel->parent);
|
||||||
WMResizeWidget(panel->frame, FRAME_WIDTH, FRAME_HEIGHT);
|
WMSetBoxExpandsToParent(panel->box, 2, 2, 0, 0);
|
||||||
WMMoveWidget(panel->frame, FRAME_LEFT, FRAME_TOP);
|
|
||||||
|
|
||||||
for (i=0; i<7; i++) {
|
for (i=0; i<7; i++) {
|
||||||
panel->swi[i] = WMCreateSwitchButton(panel->frame);
|
panel->swi[i] = WMCreateSwitchButton(panel->box);
|
||||||
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);
|
||||||
}
|
}
|
||||||
@@ -81,8 +80,8 @@ createPanel(Panel *p)
|
|||||||
WMSetButtonText(panel->swi[5], _("Disable confirmation panel for the Kill command"));
|
WMSetButtonText(panel->swi[5], _("Disable confirmation panel for the Kill command"));
|
||||||
WMSetButtonText(panel->swi[6], _("Disable cycling color highlighting of icons"));
|
WMSetButtonText(panel->swi[6], _("Disable cycling color highlighting of icons"));
|
||||||
|
|
||||||
WMRealizeWidget(panel->frame);
|
WMRealizeWidget(panel->box);
|
||||||
WMMapSubwidgets(panel->frame);
|
WMMapSubwidgets(panel->box);
|
||||||
|
|
||||||
showData(panel);
|
showData(panel);
|
||||||
}
|
}
|
||||||
@@ -106,7 +105,7 @@ storeDefaults(_Panel *panel)
|
|||||||
|
|
||||||
|
|
||||||
Panel*
|
Panel*
|
||||||
InitExpert(WMScreen *scr, WMWindow *win)
|
InitExpert(WMScreen *scr, WMWidget *parent)
|
||||||
{
|
{
|
||||||
_Panel *panel;
|
_Panel *panel;
|
||||||
|
|
||||||
@@ -118,7 +117,7 @@ InitExpert(WMScreen *scr, WMWindow *win)
|
|||||||
panel->description = _("Options for people who know what they're doing...\n"
|
panel->description = _("Options for people who know what they're doing...\n"
|
||||||
"Also have some other misc. options.");
|
"Also have some other misc. options.");
|
||||||
|
|
||||||
panel->win = win;
|
panel->parent = parent;
|
||||||
|
|
||||||
panel->callbacks.createWidgets = createPanel;
|
panel->callbacks.createWidgets = createPanel;
|
||||||
panel->callbacks.updateDomain = storeDefaults;
|
panel->callbacks.updateDomain = storeDefaults;
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
#include "WPrefs.h"
|
#include "WPrefs.h"
|
||||||
|
|
||||||
typedef struct _Panel {
|
typedef struct _Panel {
|
||||||
WMFrame *frame;
|
WMBox *box;
|
||||||
|
|
||||||
char *sectionName;
|
char *sectionName;
|
||||||
|
|
||||||
@@ -32,7 +32,7 @@ typedef struct _Panel {
|
|||||||
|
|
||||||
CallbackRec callbacks;
|
CallbackRec callbacks;
|
||||||
|
|
||||||
WMWindow *win;
|
WMWidget *parent;
|
||||||
|
|
||||||
WMFrame *kfocF;
|
WMFrame *kfocF;
|
||||||
WMPopUpButton *kfocP;
|
WMPopUpButton *kfocP;
|
||||||
@@ -231,19 +231,18 @@ static void
|
|||||||
createPanel(Panel *p)
|
createPanel(Panel *p)
|
||||||
{
|
{
|
||||||
_Panel *panel = (_Panel*)p;
|
_Panel *panel = (_Panel*)p;
|
||||||
WMScreen *scr = WMWidgetScreen(panel->win);
|
WMScreen *scr = WMWidgetScreen(panel->parent);
|
||||||
int i;
|
int i;
|
||||||
char *buf1, *buf2;
|
char *buf1, *buf2;
|
||||||
WMPixmap *icon;
|
WMPixmap *icon;
|
||||||
WMColor *color;
|
WMColor *color;
|
||||||
WMFont *font;
|
WMFont *font;
|
||||||
|
|
||||||
panel->frame = WMCreateFrame(panel->win);
|
panel->box = WMCreateBox(panel->parent);
|
||||||
WMResizeWidget(panel->frame, FRAME_WIDTH, FRAME_HEIGHT);
|
WMSetBoxExpandsToParent(panel->box, 2, 2, 0, 0);
|
||||||
WMMoveWidget(panel->frame, FRAME_LEFT, FRAME_TOP);
|
|
||||||
|
|
||||||
/***************** Input Focus Mode *****************/
|
/***************** Input Focus Mode *****************/
|
||||||
panel->kfocF = WMCreateFrame(panel->frame);
|
panel->kfocF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->kfocF, 240, 130);
|
WMResizeWidget(panel->kfocF, 240, 130);
|
||||||
WMMoveWidget(panel->kfocF, 15, 15);
|
WMMoveWidget(panel->kfocF, 15, 15);
|
||||||
WMSetFrameTitle(panel->kfocF, _("Input Focus Mode"));
|
WMSetFrameTitle(panel->kfocF, _("Input Focus Mode"));
|
||||||
@@ -265,7 +264,7 @@ createPanel(Panel *p)
|
|||||||
|
|
||||||
/***************** Colormap Installation Mode ****************/
|
/***************** Colormap Installation Mode ****************/
|
||||||
|
|
||||||
panel->cfocF = WMCreateFrame(panel->frame);
|
panel->cfocF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->cfocF, 240, 70);
|
WMResizeWidget(panel->cfocF, 240, 70);
|
||||||
WMMoveWidget(panel->cfocF, 15, 150);
|
WMMoveWidget(panel->cfocF, 15, 150);
|
||||||
WMSetFrameTitle(panel->cfocF, _("Install colormap in the window..."));
|
WMSetFrameTitle(panel->cfocF, _("Install colormap in the window..."));
|
||||||
@@ -284,7 +283,7 @@ createPanel(Panel *p)
|
|||||||
WMMapSubwidgets(panel->cfocF);
|
WMMapSubwidgets(panel->cfocF);
|
||||||
|
|
||||||
/***************** Automatic window raise delay *****************/
|
/***************** Automatic window raise delay *****************/
|
||||||
panel->raisF = WMCreateFrame(panel->frame);
|
panel->raisF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->raisF, 245, 70);
|
WMResizeWidget(panel->raisF, 245, 70);
|
||||||
WMMoveWidget(panel->raisF, 265, 15);
|
WMMoveWidget(panel->raisF, 265, 15);
|
||||||
WMSetFrameTitle(panel->raisF, _("Automatic Window Raise Delay"));
|
WMSetFrameTitle(panel->raisF, _("Automatic Window Raise Delay"));
|
||||||
@@ -354,7 +353,7 @@ createPanel(Panel *p)
|
|||||||
WMMapSubwidgets(panel->raisF);
|
WMMapSubwidgets(panel->raisF);
|
||||||
|
|
||||||
/***************** Options ****************/
|
/***************** Options ****************/
|
||||||
panel->optF = WMCreateFrame(panel->frame);
|
panel->optF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->optF, 245, 125);
|
WMResizeWidget(panel->optF, 245, 125);
|
||||||
WMMoveWidget(panel->optF, 265, 95);
|
WMMoveWidget(panel->optF, 265, 95);
|
||||||
|
|
||||||
@@ -372,8 +371,8 @@ createPanel(Panel *p)
|
|||||||
WMMapSubwidgets(panel->optF);
|
WMMapSubwidgets(panel->optF);
|
||||||
|
|
||||||
|
|
||||||
WMRealizeWidget(panel->frame);
|
WMRealizeWidget(panel->box);
|
||||||
WMMapSubwidgets(panel->frame);
|
WMMapSubwidgets(panel->box);
|
||||||
|
|
||||||
showData(panel);
|
showData(panel);
|
||||||
}
|
}
|
||||||
@@ -393,7 +392,7 @@ InitFocus(WMScreen *scr, WMWindow *win)
|
|||||||
panel->description = _("Keyboard focus switching policy, colormap switching\n"
|
panel->description = _("Keyboard focus switching policy, colormap switching\n"
|
||||||
"policy for 8bpp displays and other related options.");
|
"policy for 8bpp displays and other related options.");
|
||||||
|
|
||||||
panel->win = win;
|
panel->parent = win;
|
||||||
|
|
||||||
panel->callbacks.createWidgets = createPanel;
|
panel->callbacks.createWidgets = createPanel;
|
||||||
panel->callbacks.updateDomain = storeData;
|
panel->callbacks.updateDomain = storeData;
|
||||||
|
|||||||
@@ -26,14 +26,14 @@
|
|||||||
#include <proplist.h>
|
#include <proplist.h>
|
||||||
|
|
||||||
typedef struct _Panel {
|
typedef struct _Panel {
|
||||||
WMFrame *frame;
|
WMBox *box;
|
||||||
char *sectionName;
|
char *sectionName;
|
||||||
|
|
||||||
char *description;
|
char *description;
|
||||||
|
|
||||||
CallbackRec callbacks;
|
CallbackRec callbacks;
|
||||||
|
|
||||||
WMWindow *win;
|
WMWidget *parent;
|
||||||
|
|
||||||
|
|
||||||
WMLabel *prevL;
|
WMLabel *prevL;
|
||||||
@@ -113,7 +113,7 @@ drawMenuItem(WMScreen *scr, Display *dpy, Drawable d,
|
|||||||
static void
|
static void
|
||||||
paintPreviewBox(Panel *panel)
|
paintPreviewBox(Panel *panel)
|
||||||
{
|
{
|
||||||
WMScreen *scr = WMWidgetScreen(panel->win);
|
WMScreen *scr = WMWidgetScreen(panel->parent);
|
||||||
Display *dpy = WMScreenDisplay(scr);
|
Display *dpy = WMScreenDisplay(scr);
|
||||||
GC black = WMColorGC(panel->black);
|
GC black = WMColorGC(panel->black);
|
||||||
GC white = WMColorGC(panel->white);
|
GC white = WMColorGC(panel->white);
|
||||||
@@ -124,7 +124,7 @@ paintPreviewBox(Panel *panel)
|
|||||||
if (panel->preview == None) {
|
if (panel->preview == None) {
|
||||||
WMPixmap *pix;
|
WMPixmap *pix;
|
||||||
|
|
||||||
panel->preview = XCreatePixmap(dpy, WMWidgetXID(panel->win),
|
panel->preview = XCreatePixmap(dpy, WMWidgetXID(panel->parent),
|
||||||
240-4, 215-4, WMScreenDepth(scr));
|
240-4, 215-4, WMScreenDepth(scr));
|
||||||
|
|
||||||
pix = WMCreatePixmapFromXPixmaps(scr, panel->preview, None,
|
pix = WMCreatePixmapFromXPixmaps(scr, panel->preview, None,
|
||||||
@@ -212,7 +212,7 @@ paintPreviewBox(Panel *panel)
|
|||||||
static void
|
static void
|
||||||
showData(_Panel *panel)
|
showData(_Panel *panel)
|
||||||
{
|
{
|
||||||
WMScreen *scr = WMWidgetScreen(panel->win);
|
WMScreen *scr = WMWidgetScreen(panel->parent);
|
||||||
char *str;
|
char *str;
|
||||||
|
|
||||||
str = GetStringForKey("WindowTitleFont");
|
str = GetStringForKey("WindowTitleFont");
|
||||||
@@ -326,7 +326,7 @@ error:
|
|||||||
if (pl)
|
if (pl)
|
||||||
PLRelease(pl);
|
PLRelease(pl);
|
||||||
|
|
||||||
WMRunAlertPanel(WMWidgetScreen(panel->win), panel->win,
|
WMRunAlertPanel(WMWidgetScreen(panel->parent), panel->parent,
|
||||||
_("Error"), msg, _("OK"), NULL, NULL);
|
_("Error"), msg, _("OK"), NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -354,14 +354,14 @@ static void
|
|||||||
createPanel(Panel *p)
|
createPanel(Panel *p)
|
||||||
{
|
{
|
||||||
_Panel *panel = (_Panel*)p;
|
_Panel *panel = (_Panel*)p;
|
||||||
WMScreen *scr = WMWidgetScreen(panel->win);
|
WMScreen *scr = WMWidgetScreen(panel->parent);
|
||||||
|
|
||||||
panel->frame = WMCreateFrame(panel->win);
|
|
||||||
WMResizeWidget(panel->frame, FRAME_WIDTH, FRAME_HEIGHT);
|
|
||||||
WMMoveWidget(panel->frame, FRAME_LEFT, FRAME_TOP);
|
|
||||||
|
|
||||||
|
|
||||||
panel->prevL = WMCreateLabel(panel->frame);
|
panel->box = WMCreateBox(panel->parent);
|
||||||
|
WMSetBoxExpandsToParent(panel->box, 2, 2, 0, 0);
|
||||||
|
|
||||||
|
|
||||||
|
panel->prevL = WMCreateLabel(panel->box);
|
||||||
WMResizeWidget(panel->prevL, 240, FRAME_HEIGHT-20);
|
WMResizeWidget(panel->prevL, 240, FRAME_HEIGHT-20);
|
||||||
WMMoveWidget(panel->prevL, 15, 10);
|
WMMoveWidget(panel->prevL, 15, 10);
|
||||||
WMSetLabelRelief(panel->prevL, WRSunken);
|
WMSetLabelRelief(panel->prevL, WRSunken);
|
||||||
@@ -370,7 +370,7 @@ createPanel(Panel *p)
|
|||||||
|
|
||||||
/* language selection */
|
/* language selection */
|
||||||
|
|
||||||
panel->langF = WMCreateFrame(panel->frame);
|
panel->langF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->langF, 245, 50);
|
WMResizeWidget(panel->langF, 245, 50);
|
||||||
WMMoveWidget(panel->langF, 265, 10);
|
WMMoveWidget(panel->langF, 265, 10);
|
||||||
WMSetFrameTitle(panel->langF, _("Default Font Sets"));
|
WMSetFrameTitle(panel->langF, _("Default Font Sets"));
|
||||||
@@ -383,7 +383,7 @@ createPanel(Panel *p)
|
|||||||
|
|
||||||
|
|
||||||
/* multibyte */
|
/* multibyte */
|
||||||
panel->fsetL = WMCreateLabel(panel->frame);
|
panel->fsetL = WMCreateLabel(panel->box);
|
||||||
WMResizeWidget(panel->fsetL, 205, 20);
|
WMResizeWidget(panel->fsetL, 205, 20);
|
||||||
WMMoveWidget(panel->fsetL, 215, 127);
|
WMMoveWidget(panel->fsetL, 215, 127);
|
||||||
WMSetLabelText(panel->fsetL, _("Font Set"));
|
WMSetLabelText(panel->fsetL, _("Font Set"));
|
||||||
@@ -407,32 +407,32 @@ createPanel(Panel *p)
|
|||||||
WMReleaseColor(color);
|
WMReleaseColor(color);
|
||||||
}
|
}
|
||||||
|
|
||||||
panel->fsetLs = WMCreateList(panel->frame);
|
panel->fsetLs = WMCreateList(panel->box);
|
||||||
WMResizeWidget(panel->fsetLs, 205, 71);
|
WMResizeWidget(panel->fsetLs, 205, 71);
|
||||||
WMMoveWidget(panel->fsetLs, 215, 149);
|
WMMoveWidget(panel->fsetLs, 215, 149);
|
||||||
|
|
||||||
|
|
||||||
panel->addB = WMCreateCommandButton(panel->frame);
|
panel->addB = WMCreateCommandButton(panel->box);
|
||||||
WMResizeWidget(panel->addB, 80, 24);
|
WMResizeWidget(panel->addB, 80, 24);
|
||||||
WMMoveWidget(panel->addB, 430, 127);
|
WMMoveWidget(panel->addB, 430, 127);
|
||||||
WMSetButtonText(panel->addB, _("Add..."));
|
WMSetButtonText(panel->addB, _("Add..."));
|
||||||
|
|
||||||
panel->editB = WMCreateCommandButton(panel->frame);
|
panel->editB = WMCreateCommandButton(panel->box);
|
||||||
WMResizeWidget(panel->editB, 80, 24);
|
WMResizeWidget(panel->editB, 80, 24);
|
||||||
WMMoveWidget(panel->editB, 430, 161);
|
WMMoveWidget(panel->editB, 430, 161);
|
||||||
WMSetButtonText(panel->editB, _("Change..."));
|
WMSetButtonText(panel->editB, _("Change..."));
|
||||||
|
|
||||||
panel->remB = WMCreateCommandButton(panel->frame);
|
panel->remB = WMCreateCommandButton(panel->box);
|
||||||
WMResizeWidget(panel->remB, 80, 24);
|
WMResizeWidget(panel->remB, 80, 24);
|
||||||
WMMoveWidget(panel->remB, 430, 195);
|
WMMoveWidget(panel->remB, 430, 195);
|
||||||
WMSetButtonText(panel->remB, _("Remove"));
|
WMSetButtonText(panel->remB, _("Remove"));
|
||||||
|
|
||||||
/* single byte */
|
/* single byte */
|
||||||
panel->fontT = WMCreateTextField(panel->frame);
|
panel->fontT = WMCreateTextField(panel->box);
|
||||||
WMResizeWidget(panel->fontT, 240, 20);
|
WMResizeWidget(panel->fontT, 240, 20);
|
||||||
WMMoveWidget(panel->fontT, 265, 130);
|
WMMoveWidget(panel->fontT, 265, 130);
|
||||||
|
|
||||||
panel->changeB = WMCreateCommandButton(panel->frame);
|
panel->changeB = WMCreateCommandButton(panel->box);
|
||||||
WMResizeWidget(panel->changeB, 104, 24);
|
WMResizeWidget(panel->changeB, 104, 24);
|
||||||
WMMoveWidget(panel->changeB, 335, 160);
|
WMMoveWidget(panel->changeB, 335, 160);
|
||||||
WMSetButtonText(panel->changeB, _("Change..."));
|
WMSetButtonText(panel->changeB, _("Change..."));
|
||||||
@@ -453,8 +453,8 @@ createPanel(Panel *p)
|
|||||||
WMAddListItem(panel->settingLs, Options[i].description);
|
WMAddListItem(panel->settingLs, Options[i].description);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
WMRealizeWidget(panel->frame);
|
WMRealizeWidget(panel->box);
|
||||||
WMMapSubwidgets(panel->frame);
|
WMMapSubwidgets(panel->box);
|
||||||
|
|
||||||
setLanguageType(panel, False);
|
setLanguageType(panel, False);
|
||||||
|
|
||||||
@@ -467,7 +467,7 @@ createPanel(Panel *p)
|
|||||||
|
|
||||||
|
|
||||||
Panel*
|
Panel*
|
||||||
InitFont(WMScreen *scr, WMWindow *win)
|
InitFont(WMScreen *scr, WMWidget *parent)
|
||||||
{
|
{
|
||||||
_Panel *panel;
|
_Panel *panel;
|
||||||
|
|
||||||
@@ -477,7 +477,7 @@ InitFont(WMScreen *scr, WMWindow *win)
|
|||||||
panel->sectionName = _("Font Preferences");
|
panel->sectionName = _("Font Preferences");
|
||||||
panel->description = _("Font Configurations for Windows, Menus etc");
|
panel->description = _("Font Configurations for Windows, Menus etc");
|
||||||
|
|
||||||
panel->win = win;
|
panel->parent = parent;
|
||||||
|
|
||||||
panel->callbacks.createWidgets = createPanel;
|
panel->callbacks.createWidgets = createPanel;
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
|
|
||||||
typedef struct _Panel {
|
typedef struct _Panel {
|
||||||
WMFrame *frame;
|
WMBox *box;
|
||||||
|
|
||||||
char *sectionName;
|
char *sectionName;
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@ typedef struct _Panel {
|
|||||||
|
|
||||||
CallbackRec callbacks;
|
CallbackRec callbacks;
|
||||||
|
|
||||||
WMWindow *win;
|
WMWidget *parent;
|
||||||
|
|
||||||
WMFrame *posF;
|
WMFrame *posF;
|
||||||
WMFrame *posVF;
|
WMFrame *posVF;
|
||||||
@@ -171,12 +171,12 @@ createPanel(Panel *p)
|
|||||||
int i;
|
int i;
|
||||||
char buf[16];
|
char buf[16];
|
||||||
|
|
||||||
panel->frame = WMCreateFrame(panel->win);
|
|
||||||
WMResizeWidget(panel->frame, FRAME_WIDTH, FRAME_HEIGHT);
|
panel->box = WMCreateBox(panel->parent);
|
||||||
WMMoveWidget(panel->frame, FRAME_LEFT, FRAME_TOP);
|
WMSetBoxExpandsToParent(panel->box, 2, 2, 0, 0);
|
||||||
|
|
||||||
/***************** Positioning of Icons *****************/
|
/***************** Positioning of Icons *****************/
|
||||||
panel->posF = WMCreateFrame(panel->frame);
|
panel->posF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->posF, 260, 135);
|
WMResizeWidget(panel->posF, 260, 135);
|
||||||
WMMoveWidget(panel->posF, 25, 10);
|
WMMoveWidget(panel->posF, 25, 10);
|
||||||
WMSetFrameTitle(panel->posF, _("Icon Positioning"));
|
WMSetFrameTitle(panel->posF, _("Icon Positioning"));
|
||||||
@@ -208,7 +208,7 @@ createPanel(Panel *p)
|
|||||||
WMMoveWidget(panel->posB[6], 70+95, 38+35);
|
WMMoveWidget(panel->posB[6], 70+95, 38+35);
|
||||||
WMResizeWidget(panel->posB[6], 15, 35);
|
WMResizeWidget(panel->posB[6], 15, 35);
|
||||||
|
|
||||||
color = WMCreateRGBColor(WMWidgetScreen(panel->win), 0x5100, 0x5100,
|
color = WMCreateRGBColor(WMWidgetScreen(panel->parent), 0x5100, 0x5100,
|
||||||
0x7100, True);
|
0x7100, True);
|
||||||
panel->posVF = WMCreateFrame(panel->posF);
|
panel->posVF = WMCreateFrame(panel->posF);
|
||||||
WMResizeWidget(panel->posVF, 95, 70);
|
WMResizeWidget(panel->posVF, 95, 70);
|
||||||
@@ -223,7 +223,7 @@ createPanel(Panel *p)
|
|||||||
WMMapSubwidgets(panel->posF);
|
WMMapSubwidgets(panel->posF);
|
||||||
|
|
||||||
/***************** Animation ****************/
|
/***************** Animation ****************/
|
||||||
panel->animF = WMCreateFrame(panel->frame);
|
panel->animF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->animF, 205, 135);
|
WMResizeWidget(panel->animF, 205, 135);
|
||||||
WMMoveWidget(panel->animF, 295, 10);
|
WMMoveWidget(panel->animF, 295, 10);
|
||||||
WMSetFrameTitle(panel->animF, _("Iconification Animation"));
|
WMSetFrameTitle(panel->animF, _("Iconification Animation"));
|
||||||
@@ -245,7 +245,7 @@ createPanel(Panel *p)
|
|||||||
WMMapSubwidgets(panel->animF);
|
WMMapSubwidgets(panel->animF);
|
||||||
|
|
||||||
/***************** Options ****************/
|
/***************** Options ****************/
|
||||||
panel->optF = WMCreateFrame(panel->frame);
|
panel->optF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->optF, 260, 70);
|
WMResizeWidget(panel->optF, 260, 70);
|
||||||
WMMoveWidget(panel->optF, 25, 150);
|
WMMoveWidget(panel->optF, 25, 150);
|
||||||
/* WMSetFrameTitle(panel->optF, _("Icon Display"));*/
|
/* WMSetFrameTitle(panel->optF, _("Icon Display"));*/
|
||||||
@@ -269,7 +269,7 @@ createPanel(Panel *p)
|
|||||||
WMMapSubwidgets(panel->optF);
|
WMMapSubwidgets(panel->optF);
|
||||||
|
|
||||||
/***************** Icon Size ****************/
|
/***************** Icon Size ****************/
|
||||||
panel->sizeF = WMCreateFrame(panel->frame);
|
panel->sizeF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->sizeF, 205, 70);
|
WMResizeWidget(panel->sizeF, 205, 70);
|
||||||
WMMoveWidget(panel->sizeF, 295, 150);
|
WMMoveWidget(panel->sizeF, 295, 150);
|
||||||
WMSetFrameTitle(panel->sizeF, _("Icon Size"));
|
WMSetFrameTitle(panel->sizeF, _("Icon Size"));
|
||||||
@@ -287,8 +287,8 @@ createPanel(Panel *p)
|
|||||||
|
|
||||||
WMMapSubwidgets(panel->sizeF);
|
WMMapSubwidgets(panel->sizeF);
|
||||||
|
|
||||||
WMRealizeWidget(panel->frame);
|
WMRealizeWidget(panel->box);
|
||||||
WMMapSubwidgets(panel->frame);
|
WMMapSubwidgets(panel->box);
|
||||||
|
|
||||||
showData(panel);
|
showData(panel);
|
||||||
}
|
}
|
||||||
@@ -337,7 +337,7 @@ storeData(_Panel *panel)
|
|||||||
|
|
||||||
|
|
||||||
Panel*
|
Panel*
|
||||||
InitIcons(WMScreen *scr, WMWindow *win)
|
InitIcons(WMScreen *scr, WMWidget *parent)
|
||||||
{
|
{
|
||||||
_Panel *panel;
|
_Panel *panel;
|
||||||
|
|
||||||
@@ -349,7 +349,7 @@ InitIcons(WMScreen *scr, WMWindow *win)
|
|||||||
panel->description = _("Icon/Miniwindow handling options. Icon positioning\n"
|
panel->description = _("Icon/Miniwindow handling options. Icon positioning\n"
|
||||||
"area, sizes of icons, miniaturization animation style.");
|
"area, sizes of icons, miniaturization animation style.");
|
||||||
|
|
||||||
panel->win = win;
|
panel->parent = parent;
|
||||||
|
|
||||||
panel->callbacks.createWidgets = createPanel;
|
panel->callbacks.createWidgets = createPanel;
|
||||||
panel->callbacks.updateDomain = storeData;
|
panel->callbacks.updateDomain = storeData;
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
#include "WPrefs.h"
|
#include "WPrefs.h"
|
||||||
|
|
||||||
typedef struct _Panel {
|
typedef struct _Panel {
|
||||||
WMFrame *frame;
|
WMBox *box;
|
||||||
|
|
||||||
char *sectionName;
|
char *sectionName;
|
||||||
|
|
||||||
@@ -32,7 +32,7 @@ typedef struct _Panel {
|
|||||||
|
|
||||||
CallbackRec callbacks;
|
CallbackRec callbacks;
|
||||||
|
|
||||||
WMWindow *win;
|
WMWidget *parent;
|
||||||
|
|
||||||
WMFrame *delaF;
|
WMFrame *delaF;
|
||||||
WMButton *delaB[4];
|
WMButton *delaB[4];
|
||||||
@@ -55,7 +55,7 @@ static void
|
|||||||
createPanel(Panel *p)
|
createPanel(Panel *p)
|
||||||
{
|
{
|
||||||
_Panel *panel = (_Panel*)p;
|
_Panel *panel = (_Panel*)p;
|
||||||
WMScreen *scr = WMWidgetScreen(panel->win);
|
WMScreen *scr = WMWidgetScreen(panel->parent);
|
||||||
int i;
|
int i;
|
||||||
WMColor *color;
|
WMColor *color;
|
||||||
WMFont *font;
|
WMFont *font;
|
||||||
@@ -63,12 +63,11 @@ createPanel(Panel *p)
|
|||||||
color = WMDarkGrayColor(scr);
|
color = WMDarkGrayColor(scr);
|
||||||
font = WMSystemFontOfSize(scr, 10);
|
font = WMSystemFontOfSize(scr, 10);
|
||||||
|
|
||||||
panel->frame = WMCreateFrame(panel->win);
|
panel->box = WMCreateBox(panel->parent);
|
||||||
WMResizeWidget(panel->frame, FRAME_WIDTH, FRAME_HEIGHT);
|
WMSetBoxExpandsToParent(panel->box, 2, 2, 0, 0);
|
||||||
WMMoveWidget(panel->frame, FRAME_LEFT, FRAME_TOP);
|
|
||||||
|
|
||||||
/**************** Initial Key Repeat ***************/
|
/**************** Initial Key Repeat ***************/
|
||||||
panel->delaF = WMCreateFrame(panel->frame);
|
panel->delaF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->delaF, 495, 60);
|
WMResizeWidget(panel->delaF, 495, 60);
|
||||||
WMMoveWidget(panel->delaF, 15, 10);
|
WMMoveWidget(panel->delaF, 15, 10);
|
||||||
WMSetFrameTitle(panel->delaF, _("Initial Key Repeat"));
|
WMSetFrameTitle(panel->delaF, _("Initial Key Repeat"));
|
||||||
@@ -109,7 +108,7 @@ createPanel(Panel *p)
|
|||||||
WMMapSubwidgets(panel->delaF);
|
WMMapSubwidgets(panel->delaF);
|
||||||
|
|
||||||
/**************** Key Repeat Rate ***************/
|
/**************** Key Repeat Rate ***************/
|
||||||
panel->rateF = WMCreateFrame(panel->frame);
|
panel->rateF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->rateF, 495, 60);
|
WMResizeWidget(panel->rateF, 495, 60);
|
||||||
WMMoveWidget(panel->rateF, 15, 95);
|
WMMoveWidget(panel->rateF, 15, 95);
|
||||||
WMSetFrameTitle(panel->rateF, _("Key Repeat Rate"));
|
WMSetFrameTitle(panel->rateF, _("Key Repeat Rate"));
|
||||||
@@ -149,7 +148,7 @@ createPanel(Panel *p)
|
|||||||
|
|
||||||
WMMapSubwidgets(panel->rateF);
|
WMMapSubwidgets(panel->rateF);
|
||||||
|
|
||||||
panel->testT = WMCreateTextField(panel->frame);
|
panel->testT = WMCreateTextField(panel->box);
|
||||||
WMResizeWidget(panel->testT, 480, 20);
|
WMResizeWidget(panel->testT, 480, 20);
|
||||||
WMMoveWidget(panel->testT, 20, 180);
|
WMMoveWidget(panel->testT, 20, 180);
|
||||||
WMSetTextFieldText(panel->testT, _("Type here to test"));
|
WMSetTextFieldText(panel->testT, _("Type here to test"));
|
||||||
@@ -157,14 +156,14 @@ createPanel(Panel *p)
|
|||||||
WMReleaseColor(color);
|
WMReleaseColor(color);
|
||||||
WMReleaseFont(font);
|
WMReleaseFont(font);
|
||||||
|
|
||||||
WMRealizeWidget(panel->frame);
|
WMRealizeWidget(panel->box);
|
||||||
WMMapSubwidgets(panel->frame);
|
WMMapSubwidgets(panel->box);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Panel*
|
Panel*
|
||||||
InitKeyboardSettings(WMScreen *scr, WMWindow *win)
|
InitKeyboardSettings(WMScreen *scr, WMWidget *parent)
|
||||||
{
|
{
|
||||||
_Panel *panel;
|
_Panel *panel;
|
||||||
|
|
||||||
@@ -175,7 +174,7 @@ InitKeyboardSettings(WMScreen *scr, WMWindow *win)
|
|||||||
|
|
||||||
panel->description = _("Not done");
|
panel->description = _("Not done");
|
||||||
|
|
||||||
panel->win = win;
|
panel->parent = parent;
|
||||||
|
|
||||||
panel->callbacks.createWidgets = createPanel;
|
panel->callbacks.createWidgets = createPanel;
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
|
|
||||||
typedef struct _Panel {
|
typedef struct _Panel {
|
||||||
WMFrame *frame;
|
WMBox *box;
|
||||||
|
|
||||||
char *sectionName;
|
char *sectionName;
|
||||||
|
|
||||||
@@ -36,7 +36,7 @@ typedef struct _Panel {
|
|||||||
|
|
||||||
CallbackRec callbacks;
|
CallbackRec callbacks;
|
||||||
|
|
||||||
WMWindow *win;
|
WMWidget *parent;
|
||||||
|
|
||||||
WMLabel *actL;
|
WMLabel *actL;
|
||||||
WMList *actLs;
|
WMList *actLs;
|
||||||
@@ -177,14 +177,14 @@ static void
|
|||||||
captureClick(WMWidget *w, void *data)
|
captureClick(WMWidget *w, void *data)
|
||||||
{
|
{
|
||||||
_Panel *panel = (_Panel*)data;
|
_Panel *panel = (_Panel*)data;
|
||||||
Display *dpy = WMScreenDisplay(WMWidgetScreen(panel->win));
|
Display *dpy = WMScreenDisplay(WMWidgetScreen(panel->parent));
|
||||||
char *shortcut;
|
char *shortcut;
|
||||||
|
|
||||||
if (!panel->capturing) {
|
if (!panel->capturing) {
|
||||||
panel->capturing = 1;
|
panel->capturing = 1;
|
||||||
WMSetButtonText(w, _("Cancel"));
|
WMSetButtonText(w, _("Cancel"));
|
||||||
WMSetLabelText(panel->instructionsL, _("Press the desired shortcut key(s) or click Cancel to stop capturing."));
|
WMSetLabelText(panel->instructionsL, _("Press the desired shortcut key(s) or click Cancel to stop capturing."));
|
||||||
XGrabKeyboard(dpy, WMWidgetXID(panel->win), True, GrabModeAsync,
|
XGrabKeyboard(dpy, WMWidgetXID(panel->parent), True, GrabModeAsync,
|
||||||
GrabModeAsync, CurrentTime);
|
GrabModeAsync, CurrentTime);
|
||||||
shortcut = captureShortcut(dpy, panel);
|
shortcut = captureShortcut(dpy, panel);
|
||||||
if (shortcut) {
|
if (shortcut) {
|
||||||
@@ -341,20 +341,21 @@ static void
|
|||||||
createPanel(Panel *p)
|
createPanel(Panel *p)
|
||||||
{
|
{
|
||||||
_Panel *panel = (_Panel*)p;
|
_Panel *panel = (_Panel*)p;
|
||||||
WMScreen *scr = WMWidgetScreen(panel->win);
|
WMScreen *scr = WMWidgetScreen(panel->parent);
|
||||||
WMColor *color;
|
WMColor *color;
|
||||||
WMFont *boldFont;
|
WMFont *boldFont;
|
||||||
|
|
||||||
panel->capturing = 0;
|
panel->capturing = 0;
|
||||||
|
|
||||||
panel->frame = WMCreateFrame(panel->win);
|
|
||||||
WMResizeWidget(panel->frame, FRAME_WIDTH, FRAME_HEIGHT);
|
|
||||||
WMMoveWidget(panel->frame, FRAME_LEFT, FRAME_TOP);
|
panel->box = WMCreateBox(panel->parent);
|
||||||
|
WMSetBoxExpandsToParent(panel->box, 2, 2, 0, 0);
|
||||||
|
|
||||||
boldFont = WMBoldSystemFontOfSize(scr, 12);
|
boldFont = WMBoldSystemFontOfSize(scr, 12);
|
||||||
|
|
||||||
/* **************** Actions **************** */
|
/* **************** Actions **************** */
|
||||||
panel->actL = WMCreateLabel(panel->frame);
|
panel->actL = WMCreateLabel(panel->box);
|
||||||
WMResizeWidget(panel->actL, 280, 20);
|
WMResizeWidget(panel->actL, 280, 20);
|
||||||
WMMoveWidget(panel->actL, 20, 10);
|
WMMoveWidget(panel->actL, 20, 10);
|
||||||
WMSetLabelFont(panel->actL, boldFont);
|
WMSetLabelFont(panel->actL, boldFont);
|
||||||
@@ -368,7 +369,7 @@ createPanel(Panel *p)
|
|||||||
WMSetLabelTextColor(panel->actL, color);
|
WMSetLabelTextColor(panel->actL, color);
|
||||||
WMReleaseColor(color);
|
WMReleaseColor(color);
|
||||||
|
|
||||||
panel->actLs = WMCreateList(panel->frame);
|
panel->actLs = WMCreateList(panel->box);
|
||||||
WMResizeWidget(panel->actLs, 280, 190);
|
WMResizeWidget(panel->actLs, 280, 190);
|
||||||
WMMoveWidget(panel->actLs, 20, 32);
|
WMMoveWidget(panel->actLs, 20, 32);
|
||||||
WMSetListUserDrawProc(panel->actLs, paintItem);
|
WMSetListUserDrawProc(panel->actLs, paintItem);
|
||||||
@@ -430,7 +431,7 @@ createPanel(Panel *p)
|
|||||||
|
|
||||||
/***************** Shortcut ****************/
|
/***************** Shortcut ****************/
|
||||||
|
|
||||||
panel->shoF = WMCreateFrame(panel->frame);
|
panel->shoF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->shoF, 190, 210);
|
WMResizeWidget(panel->shoF, 190, 210);
|
||||||
WMMoveWidget(panel->shoF, 315, 10);
|
WMMoveWidget(panel->shoF, 315, 10);
|
||||||
WMSetFrameTitle(panel->shoF, _("Shortcut"));
|
WMSetFrameTitle(panel->shoF, _("Shortcut"));
|
||||||
@@ -464,8 +465,8 @@ createPanel(Panel *p)
|
|||||||
|
|
||||||
WMReleaseFont(boldFont);
|
WMReleaseFont(boldFont);
|
||||||
|
|
||||||
WMRealizeWidget(panel->frame);
|
WMRealizeWidget(panel->box);
|
||||||
WMMapSubwidgets(panel->frame);
|
WMMapSubwidgets(panel->box);
|
||||||
|
|
||||||
|
|
||||||
showData(panel);
|
showData(panel);
|
||||||
@@ -499,7 +500,7 @@ storeData(_Panel *panel)
|
|||||||
|
|
||||||
|
|
||||||
Panel*
|
Panel*
|
||||||
InitKeyboardShortcuts(WMScreen *scr, WMWindow *win)
|
InitKeyboardShortcuts(WMScreen *scr, WMWidget *parent)
|
||||||
{
|
{
|
||||||
_Panel *panel;
|
_Panel *panel;
|
||||||
|
|
||||||
@@ -511,7 +512,7 @@ InitKeyboardShortcuts(WMScreen *scr, WMWindow *win)
|
|||||||
panel->description = _("Change the keyboard shortcuts for actions such\n"
|
panel->description = _("Change the keyboard shortcuts for actions such\n"
|
||||||
"as changing workspaces and opening menus.");
|
"as changing workspaces and opening menus.");
|
||||||
|
|
||||||
panel->win = win;
|
panel->parent = parent;
|
||||||
|
|
||||||
panel->callbacks.createWidgets = createPanel;
|
panel->callbacks.createWidgets = createPanel;
|
||||||
panel->callbacks.updateDomain = storeData;
|
panel->callbacks.updateDomain = storeData;
|
||||||
|
|||||||
@@ -46,13 +46,13 @@ typedef enum {
|
|||||||
#define MAX_SECTION_SIZE 4
|
#define MAX_SECTION_SIZE 4
|
||||||
|
|
||||||
typedef struct _Panel {
|
typedef struct _Panel {
|
||||||
WMFrame *frame;
|
WMBox *box;
|
||||||
char *sectionName;
|
char *sectionName;
|
||||||
|
|
||||||
char *description;
|
char *description;
|
||||||
|
|
||||||
CallbackRec callbacks;
|
CallbackRec callbacks;
|
||||||
WMWindow *win;
|
WMWidget *parent;
|
||||||
|
|
||||||
|
|
||||||
WMFont *boldFont;
|
WMFont *boldFont;
|
||||||
@@ -311,7 +311,7 @@ static void
|
|||||||
sgrabClicked(WMWidget *w, void *data)
|
sgrabClicked(WMWidget *w, void *data)
|
||||||
{
|
{
|
||||||
_Panel *panel = (_Panel*)data;
|
_Panel *panel = (_Panel*)data;
|
||||||
Display *dpy = WMScreenDisplay(WMWidgetScreen(panel->win));
|
Display *dpy = WMScreenDisplay(WMWidgetScreen(panel->parent));
|
||||||
char *shortcut;
|
char *shortcut;
|
||||||
|
|
||||||
|
|
||||||
@@ -324,7 +324,7 @@ sgrabClicked(WMWidget *w, void *data)
|
|||||||
if (!panel->capturing) {
|
if (!panel->capturing) {
|
||||||
panel->capturing = 1;
|
panel->capturing = 1;
|
||||||
WMSetButtonText(w, _("Cancel"));
|
WMSetButtonText(w, _("Cancel"));
|
||||||
XGrabKeyboard(dpy, WMWidgetXID(panel->win), True, GrabModeAsync,
|
XGrabKeyboard(dpy, WMWidgetXID(panel->parent), True, GrabModeAsync,
|
||||||
GrabModeAsync, CurrentTime);
|
GrabModeAsync, CurrentTime);
|
||||||
shortcut = captureShortcut(dpy, panel);
|
shortcut = captureShortcut(dpy, panel);
|
||||||
if (shortcut) {
|
if (shortcut) {
|
||||||
@@ -408,7 +408,7 @@ static void
|
|||||||
createPanel(_Panel *p)
|
createPanel(_Panel *p)
|
||||||
{
|
{
|
||||||
_Panel *panel = (_Panel*)p;
|
_Panel *panel = (_Panel*)p;
|
||||||
WMScreen *scr = WMWidgetScreen(panel->win);
|
WMScreen *scr = WMWidgetScreen(panel->parent);
|
||||||
WMColor *black = WMBlackColor(scr);
|
WMColor *black = WMBlackColor(scr);
|
||||||
WMColor *white = WMWhiteColor(scr);
|
WMColor *white = WMWhiteColor(scr);
|
||||||
WMColor *gray = WMGrayColor(scr);
|
WMColor *gray = WMGrayColor(scr);
|
||||||
@@ -465,12 +465,10 @@ createPanel(_Panel *p)
|
|||||||
XFreeGC(dpy, gc);
|
XFreeGC(dpy, gc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
panel->box = WMCreateBox(panel->parent);
|
||||||
|
WMSetBoxExpandsToParent(panel->box, 2, 2, 0, 0);
|
||||||
|
|
||||||
panel->frame = WMCreateFrame(panel->win);
|
panel->typeP = WMCreatePopUpButton(panel->box);
|
||||||
WMResizeWidget(panel->frame, FRAME_WIDTH, FRAME_HEIGHT);
|
|
||||||
WMMoveWidget(panel->frame, FRAME_LEFT, FRAME_TOP);
|
|
||||||
|
|
||||||
panel->typeP = WMCreatePopUpButton(panel->frame);
|
|
||||||
WMResizeWidget(panel->typeP, 150, 20);
|
WMResizeWidget(panel->typeP, 150, 20);
|
||||||
WMMoveWidget(panel->typeP, 10, 10);
|
WMMoveWidget(panel->typeP, 10, 10);
|
||||||
|
|
||||||
@@ -487,16 +485,16 @@ createPanel(_Panel *p)
|
|||||||
WEditMenu *smenu;
|
WEditMenu *smenu;
|
||||||
ItemData *data;
|
ItemData *data;
|
||||||
|
|
||||||
pad = makeFactoryMenu(panel->frame, 150);
|
pad = makeFactoryMenu(panel->box, 150);
|
||||||
WMMoveWidget(pad, 10, 40);
|
WMMoveWidget(pad, 10, 40);
|
||||||
|
|
||||||
data = putNewItem(panel, pad, ExecInfo, "Run Program");
|
data = putNewItem(panel, pad, ExecInfo, _("Run Program"));
|
||||||
data = putNewItem(panel, pad, CommandInfo, "Internal Command");
|
data = putNewItem(panel, pad, CommandInfo, _("Internal Command"));
|
||||||
smenu = putNewSubmenu(pad, "Submenu");
|
smenu = putNewSubmenu(pad, _("Submenu"));
|
||||||
data = putNewItem(panel, pad, ExternalInfo, "External Submenu");
|
data = putNewItem(panel, pad, ExternalInfo, _("External Submenu"));
|
||||||
data = putNewItem(panel, pad, PipeInfo, "Generated Submenu");
|
data = putNewItem(panel, pad, PipeInfo, _("Generated Submenu"));
|
||||||
data = putNewItem(panel, pad, DirectoryInfo, "Directory Contents");
|
data = putNewItem(panel, pad, DirectoryInfo, _("Directory Contents"));
|
||||||
data = putNewItem(panel, pad, WSMenuInfo, "Workspace Menu");
|
data = putNewItem(panel, pad, WSMenuInfo, _("Workspace Menu"));
|
||||||
|
|
||||||
panel->itemPad[0] = pad;
|
panel->itemPad[0] = pad;
|
||||||
}
|
}
|
||||||
@@ -506,12 +504,12 @@ createPanel(_Panel *p)
|
|||||||
ItemData *data;
|
ItemData *data;
|
||||||
WMScrollView *sview;
|
WMScrollView *sview;
|
||||||
|
|
||||||
sview = WMCreateScrollView(panel->frame);
|
sview = WMCreateScrollView(panel->box);
|
||||||
WMResizeWidget(sview, 150, 180);
|
WMResizeWidget(sview, 150, 180);
|
||||||
WMMoveWidget(sview, 10, 40);
|
WMMoveWidget(sview, 10, 40);
|
||||||
WMSetScrollViewHasVerticalScroller(sview, True);
|
WMSetScrollViewHasVerticalScroller(sview, True);
|
||||||
|
|
||||||
pad = makeFactoryMenu(panel->frame, 130);
|
pad = makeFactoryMenu(panel->box, 130);
|
||||||
|
|
||||||
WMSetScrollViewContentView(sview, WMWidgetView(pad));
|
WMSetScrollViewContentView(sview, WMWidgetView(pad));
|
||||||
|
|
||||||
@@ -562,12 +560,12 @@ createPanel(_Panel *p)
|
|||||||
ItemData *data;
|
ItemData *data;
|
||||||
WMScrollView *sview;
|
WMScrollView *sview;
|
||||||
|
|
||||||
sview = WMCreateScrollView(panel->frame);
|
sview = WMCreateScrollView(panel->box);
|
||||||
WMResizeWidget(sview, 150, 180);
|
WMResizeWidget(sview, 150, 180);
|
||||||
WMMoveWidget(sview, 10, 40);
|
WMMoveWidget(sview, 10, 40);
|
||||||
WMSetScrollViewHasVerticalScroller(sview, True);
|
WMSetScrollViewHasVerticalScroller(sview, True);
|
||||||
|
|
||||||
pad = makeFactoryMenu(panel->frame, 130);
|
pad = makeFactoryMenu(panel->box, 130);
|
||||||
|
|
||||||
WMSetScrollViewContentView(sview, WMWidgetView(pad));
|
WMSetScrollViewContentView(sview, WMWidgetView(pad));
|
||||||
|
|
||||||
@@ -629,7 +627,7 @@ createPanel(_Panel *p)
|
|||||||
|
|
||||||
width = FRAME_WIDTH - 20 - 150 - 10;
|
width = FRAME_WIDTH - 20 - 150 - 10;
|
||||||
|
|
||||||
panel->optionsF = WMCreateFrame(panel->frame);
|
panel->optionsF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->optionsF, width, FRAME_HEIGHT - 15);
|
WMResizeWidget(panel->optionsF, width, FRAME_HEIGHT - 15);
|
||||||
WMMoveWidget(panel->optionsF, 10 + 150 + 10, 5);
|
WMMoveWidget(panel->optionsF, 10 + 150 + 10, 5);
|
||||||
|
|
||||||
@@ -855,9 +853,9 @@ createPanel(_Panel *p)
|
|||||||
" - click on a menu item to change related information"));
|
" - click on a menu item to change related information"));
|
||||||
WMMapWidget(label);
|
WMMapWidget(label);
|
||||||
|
|
||||||
WMRealizeWidget(panel->frame);
|
WMRealizeWidget(panel->box);
|
||||||
WMMapSubwidgets(panel->frame);
|
WMMapSubwidgets(panel->box);
|
||||||
WMMapWidget(panel->frame);
|
WMMapWidget(panel->box);
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -889,7 +887,7 @@ createPanel(_Panel *p)
|
|||||||
{
|
{
|
||||||
WMPoint pos;
|
WMPoint pos;
|
||||||
|
|
||||||
pos = WMGetViewScreenPosition(WMWidgetView(panel->frame));
|
pos = WMGetViewScreenPosition(WMWidgetView(panel->box));
|
||||||
|
|
||||||
if (pos.x < 200) {
|
if (pos.x < 200) {
|
||||||
pos.x += FRAME_WIDTH + 20;
|
pos.x += FRAME_WIDTH + 20;
|
||||||
@@ -1433,7 +1431,7 @@ menuItemSelected(WEditMenuDelegate *delegate, WEditMenu *menu,
|
|||||||
static WEditMenu*
|
static WEditMenu*
|
||||||
buildSubmenu(_Panel *panel, proplist_t pl)
|
buildSubmenu(_Panel *panel, proplist_t pl)
|
||||||
{
|
{
|
||||||
WMScreen *scr = WMWidgetScreen(panel->win);
|
WMScreen *scr = WMWidgetScreen(panel->parent);
|
||||||
WEditMenu *menu;
|
WEditMenu *menu;
|
||||||
WEditMenuItem *item;
|
WEditMenuItem *item;
|
||||||
char *title;
|
char *title;
|
||||||
@@ -1522,7 +1520,7 @@ getDefaultMenu(_Panel *panel)
|
|||||||
|
|
||||||
sprintf(buffer, _("Could not open default menu from '%s'"),
|
sprintf(buffer, _("Could not open default menu from '%s'"),
|
||||||
menuPath);
|
menuPath);
|
||||||
WMRunAlertPanel(WMWidgetScreen(panel->win), panel->win,
|
WMRunAlertPanel(WMWidgetScreen(panel->parent), panel->parent,
|
||||||
_("Error"), buffer, _("OK"), NULL, NULL);
|
_("Error"), buffer, _("OK"), NULL, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1557,7 +1555,7 @@ showData(_Panel *panel)
|
|||||||
if (!pmenu || !PLIsArray(pmenu)) {
|
if (!pmenu || !PLIsArray(pmenu)) {
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
res = WMRunAlertPanel(WMWidgetScreen(panel->win), panel->win,
|
res = WMRunAlertPanel(WMWidgetScreen(panel->parent), panel->parent,
|
||||||
_("Warning"),
|
_("Warning"),
|
||||||
_("The menu file format currently in use is not supported\n"
|
_("The menu file format currently in use is not supported\n"
|
||||||
"by this tool. Do you want to discard the current menu\n"
|
"by this tool. Do you want to discard the current menu\n"
|
||||||
@@ -1800,7 +1798,7 @@ hideMenus(_Panel *panel)
|
|||||||
|
|
||||||
|
|
||||||
Panel*
|
Panel*
|
||||||
InitMenu(WMScreen *scr, WMWindow *win)
|
InitMenu(WMScreen *scr, WMWidget *parent)
|
||||||
{
|
{
|
||||||
_Panel *panel;
|
_Panel *panel;
|
||||||
|
|
||||||
@@ -1811,7 +1809,7 @@ InitMenu(WMScreen *scr, WMWindow *win)
|
|||||||
|
|
||||||
panel->description = _("Edit the menu for launching applications.");
|
panel->description = _("Edit the menu for launching applications.");
|
||||||
|
|
||||||
panel->win = win;
|
panel->parent = parent;
|
||||||
|
|
||||||
panel->callbacks.createWidgets = createPanel;
|
panel->callbacks.createWidgets = createPanel;
|
||||||
panel->callbacks.updateDomain = storeData;
|
panel->callbacks.updateDomain = storeData;
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
#include "WPrefs.h"
|
#include "WPrefs.h"
|
||||||
|
|
||||||
typedef struct _Panel {
|
typedef struct _Panel {
|
||||||
WMFrame *frame;
|
WMBox *box;
|
||||||
|
|
||||||
char *sectionName;
|
char *sectionName;
|
||||||
|
|
||||||
@@ -32,7 +32,7 @@ typedef struct _Panel {
|
|||||||
|
|
||||||
CallbackRec callbacks;
|
CallbackRec callbacks;
|
||||||
|
|
||||||
WMWindow *win;
|
WMWidget *parent;
|
||||||
|
|
||||||
WMFrame *scrF;
|
WMFrame *scrF;
|
||||||
WMButton *scrB[5];
|
WMButton *scrB[5];
|
||||||
@@ -95,20 +95,18 @@ static void
|
|||||||
createPanel(Panel *p)
|
createPanel(Panel *p)
|
||||||
{
|
{
|
||||||
_Panel *panel = (_Panel*)p;
|
_Panel *panel = (_Panel*)p;
|
||||||
WMScreen *scr = WMWidgetScreen(panel->win);
|
WMScreen *scr = WMWidgetScreen(panel->parent);
|
||||||
|
WMBox *hbox, *vbox;
|
||||||
WMPixmap *icon;
|
WMPixmap *icon;
|
||||||
int i;
|
int i;
|
||||||
char *buf1, *buf2;
|
char *buf1, *buf2;
|
||||||
char *path;
|
char *path;
|
||||||
|
|
||||||
panel->frame = WMCreateFrame(panel->win);
|
panel->box = WMCreateBox(panel->parent);
|
||||||
WMResizeWidget(panel->frame, FRAME_WIDTH, FRAME_HEIGHT);
|
WMSetBoxExpandsToParent(panel->box, 2, 2, 0, 0);
|
||||||
WMMoveWidget(panel->frame, FRAME_LEFT, FRAME_TOP);
|
|
||||||
|
|
||||||
|
|
||||||
/***************** Menu Scroll Speed ****************/
|
/***************** Menu Scroll Speed ****************/
|
||||||
panel->scrF = WMCreateFrame(panel->frame);
|
panel->scrF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->scrF, 235, 90);
|
WMResizeWidget(panel->scrF, 235, 90);
|
||||||
WMMoveWidget(panel->scrF, 25, 20);
|
WMMoveWidget(panel->scrF, 25, 20);
|
||||||
WMSetFrameTitle(panel->scrF, _("Menu Scrolling Speed"));
|
WMSetFrameTitle(panel->scrF, _("Menu Scrolling Speed"));
|
||||||
@@ -157,7 +155,7 @@ createPanel(Panel *p)
|
|||||||
|
|
||||||
/***************** Submenu Alignment ****************/
|
/***************** Submenu Alignment ****************/
|
||||||
|
|
||||||
panel->aliF = WMCreateFrame(panel->frame);
|
panel->aliF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->aliF, 220, 90);
|
WMResizeWidget(panel->aliF, 220, 90);
|
||||||
WMMoveWidget(panel->aliF, 280, 20);
|
WMMoveWidget(panel->aliF, 280, 20);
|
||||||
WMSetFrameTitle(panel->aliF, _("Submenu Alignment"));
|
WMSetFrameTitle(panel->aliF, _("Submenu Alignment"));
|
||||||
@@ -197,7 +195,7 @@ createPanel(Panel *p)
|
|||||||
WMMapSubwidgets(panel->aliF);
|
WMMapSubwidgets(panel->aliF);
|
||||||
|
|
||||||
/***************** Options ****************/
|
/***************** Options ****************/
|
||||||
panel->optF = WMCreateFrame(panel->frame);
|
panel->optF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->optF, 475, 80);
|
WMResizeWidget(panel->optF, 475, 80);
|
||||||
WMMoveWidget(panel->optF, 25, 130);
|
WMMoveWidget(panel->optF, 25, 130);
|
||||||
|
|
||||||
@@ -213,8 +211,8 @@ createPanel(Panel *p)
|
|||||||
|
|
||||||
WMMapSubwidgets(panel->optF);
|
WMMapSubwidgets(panel->optF);
|
||||||
|
|
||||||
WMRealizeWidget(panel->frame);
|
WMRealizeWidget(panel->box);
|
||||||
WMMapSubwidgets(panel->frame);
|
WMMapSubwidgets(panel->box);
|
||||||
|
|
||||||
showData(panel);
|
showData(panel);
|
||||||
}
|
}
|
||||||
@@ -222,7 +220,7 @@ createPanel(Panel *p)
|
|||||||
|
|
||||||
|
|
||||||
Panel*
|
Panel*
|
||||||
InitMenuPreferences(WMScreen *scr, WMWindow *win)
|
InitMenuPreferences(WMScreen *scr, WMWidget *parent)
|
||||||
{
|
{
|
||||||
_Panel *panel;
|
_Panel *panel;
|
||||||
|
|
||||||
@@ -234,7 +232,7 @@ InitMenuPreferences(WMScreen *scr, WMWindow *win)
|
|||||||
panel->description = _("Menu usability related options. Scrolling speed,\n"
|
panel->description = _("Menu usability related options. Scrolling speed,\n"
|
||||||
"alignment of submenus etc.");
|
"alignment of submenus etc.");
|
||||||
|
|
||||||
panel->win = win;
|
panel->parent = parent;
|
||||||
|
|
||||||
panel->callbacks.createWidgets = createPanel;
|
panel->callbacks.createWidgets = createPanel;
|
||||||
panel->callbacks.updateDomain = storeData;
|
panel->callbacks.updateDomain = storeData;
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
|
|
||||||
typedef struct _Panel {
|
typedef struct _Panel {
|
||||||
WMFrame *frame;
|
WMBox *box;
|
||||||
|
|
||||||
char *sectionName;
|
char *sectionName;
|
||||||
|
|
||||||
@@ -46,7 +46,7 @@ typedef struct _Panel {
|
|||||||
|
|
||||||
CallbackRec callbacks;
|
CallbackRec callbacks;
|
||||||
|
|
||||||
WMWindow *win;
|
WMWidget *parent;
|
||||||
|
|
||||||
WMFrame *speedF;
|
WMFrame *speedF;
|
||||||
WMLabel *speedL;
|
WMLabel *speedL;
|
||||||
@@ -169,11 +169,11 @@ speedChange(WMWidget *w, void *data)
|
|||||||
tmp = WMGetTextFieldText(panel->threT);
|
tmp = WMGetTextFieldText(panel->threT);
|
||||||
if (sscanf(tmp, "%i", &threshold)!=1 || threshold < 0
|
if (sscanf(tmp, "%i", &threshold)!=1 || threshold < 0
|
||||||
|| threshold > panel->maxThreshold) {
|
|| threshold > panel->maxThreshold) {
|
||||||
WMRunAlertPanel(WMWidgetScreen(panel->win), GetWindow(panel), _("Error"),
|
WMRunAlertPanel(WMWidgetScreen(panel->parent), GetWindow(panel), _("Error"),
|
||||||
_("Invalid mouse acceleration threshold value. Must be the number of pixels to travel before accelerating."),
|
_("Invalid mouse acceleration threshold value. Must be the number of pixels to travel before accelerating."),
|
||||||
_("OK"), NULL, NULL);
|
_("OK"), NULL, NULL);
|
||||||
} else {
|
} else {
|
||||||
setMouseAccel(WMWidgetScreen(panel->win), panel->acceleration,
|
setMouseAccel(WMWidgetScreen(panel->parent), panel->acceleration,
|
||||||
threshold);
|
threshold);
|
||||||
}
|
}
|
||||||
wfree(tmp);
|
wfree(tmp);
|
||||||
@@ -259,7 +259,7 @@ showData(_Panel *panel)
|
|||||||
int a=-1, b=-1, c=-1;
|
int a=-1, b=-1, c=-1;
|
||||||
float accel;
|
float accel;
|
||||||
char buffer[32];
|
char buffer[32];
|
||||||
Display *dpy = WMScreenDisplay(WMWidgetScreen(panel->win));
|
Display *dpy = WMScreenDisplay(WMWidgetScreen(panel->parent));
|
||||||
|
|
||||||
str = GetStringForKey("SelectWindowsMouseButton");
|
str = GetStringForKey("SelectWindowsMouseButton");
|
||||||
if (str) {
|
if (str) {
|
||||||
@@ -457,7 +457,7 @@ static void
|
|||||||
createPanel(Panel *p)
|
createPanel(Panel *p)
|
||||||
{
|
{
|
||||||
_Panel *panel = (_Panel*)p;
|
_Panel *panel = (_Panel*)p;
|
||||||
WMScreen *scr = WMWidgetScreen(panel->win);
|
WMScreen *scr = WMWidgetScreen(panel->parent);
|
||||||
WMPixmap *icon;
|
WMPixmap *icon;
|
||||||
char *buf1, *buf2;
|
char *buf1, *buf2;
|
||||||
int i;
|
int i;
|
||||||
@@ -468,12 +468,11 @@ createPanel(Panel *p)
|
|||||||
color.green = 0xae;
|
color.green = 0xae;
|
||||||
color.blue = 0xaa;
|
color.blue = 0xaa;
|
||||||
|
|
||||||
panel->frame = WMCreateFrame(panel->win);
|
panel->box = WMCreateBox(panel->parent);
|
||||||
WMResizeWidget(panel->frame, FRAME_WIDTH, FRAME_HEIGHT);
|
WMSetBoxExpandsToParent(panel->box, 2, 2, 0, 0);
|
||||||
WMMoveWidget(panel->frame, FRAME_LEFT, FRAME_TOP);
|
|
||||||
|
|
||||||
/**************** Mouse Speed ****************/
|
/**************** Mouse Speed ****************/
|
||||||
panel->speedF = WMCreateFrame(panel->frame);
|
panel->speedF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->speedF, 245, 100);
|
WMResizeWidget(panel->speedF, 245, 100);
|
||||||
WMMoveWidget(panel->speedF, 15, 15);
|
WMMoveWidget(panel->speedF, 15, 15);
|
||||||
WMSetFrameTitle(panel->speedF, _("Mouse Speed"));
|
WMSetFrameTitle(panel->speedF, _("Mouse Speed"));
|
||||||
@@ -531,7 +530,7 @@ createPanel(Panel *p)
|
|||||||
|
|
||||||
/***************** Doubleclick Delay ****************/
|
/***************** Doubleclick Delay ****************/
|
||||||
|
|
||||||
panel->ddelaF = WMCreateFrame(panel->frame);
|
panel->ddelaF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->ddelaF, 245, 95);
|
WMResizeWidget(panel->ddelaF, 245, 95);
|
||||||
WMMoveWidget(panel->ddelaF, 15, 125);
|
WMMoveWidget(panel->ddelaF, 15, 125);
|
||||||
WMSetFrameTitle(panel->ddelaF, _("Double-Click Delay"));
|
WMSetFrameTitle(panel->ddelaF, _("Double-Click Delay"));
|
||||||
@@ -605,7 +604,7 @@ createPanel(Panel *p)
|
|||||||
WMMapSubwidgets(panel->ddelaF);
|
WMMapSubwidgets(panel->ddelaF);
|
||||||
|
|
||||||
/* ************** Workspace Action Buttons **************** */
|
/* ************** Workspace Action Buttons **************** */
|
||||||
panel->menuF = WMCreateFrame(panel->frame);
|
panel->menuF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->menuF, 240, 145);
|
WMResizeWidget(panel->menuF, 240, 145);
|
||||||
WMMoveWidget(panel->menuF, 270, 15);
|
WMMoveWidget(panel->menuF, 270, 15);
|
||||||
WMSetFrameTitle(panel->menuF, _("Workspace Mouse Actions"));
|
WMSetFrameTitle(panel->menuF, _("Workspace Mouse Actions"));
|
||||||
@@ -656,7 +655,7 @@ createPanel(Panel *p)
|
|||||||
WMMapSubwidgets(panel->menuF);
|
WMMapSubwidgets(panel->menuF);
|
||||||
|
|
||||||
/* ************** Grab Modifier **************** */
|
/* ************** Grab Modifier **************** */
|
||||||
panel->grabF = WMCreateFrame(panel->frame);
|
panel->grabF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->grabF, 240, 55);
|
WMResizeWidget(panel->grabF, 240, 55);
|
||||||
WMMoveWidget(panel->grabF, 270, 165);
|
WMMoveWidget(panel->grabF, 270, 165);
|
||||||
WMSetFrameTitle(panel->grabF, _("Mouse Grab Modifier"));
|
WMSetFrameTitle(panel->grabF, _("Mouse Grab Modifier"));
|
||||||
@@ -674,8 +673,8 @@ createPanel(Panel *p)
|
|||||||
|
|
||||||
WMMapSubwidgets(panel->grabF);
|
WMMapSubwidgets(panel->grabF);
|
||||||
|
|
||||||
WMRealizeWidget(panel->frame);
|
WMRealizeWidget(panel->box);
|
||||||
WMMapSubwidgets(panel->frame);
|
WMMapSubwidgets(panel->box);
|
||||||
|
|
||||||
|
|
||||||
showData(panel);
|
showData(panel);
|
||||||
@@ -808,7 +807,7 @@ storeData(_Panel *panel)
|
|||||||
|
|
||||||
|
|
||||||
Panel*
|
Panel*
|
||||||
InitMouseSettings(WMScreen *scr, WMWindow *win)
|
InitMouseSettings(WMScreen *scr, WMWidget *parent)
|
||||||
{
|
{
|
||||||
_Panel *panel;
|
_Panel *panel;
|
||||||
|
|
||||||
@@ -820,7 +819,7 @@ InitMouseSettings(WMScreen *scr, WMWindow *win)
|
|||||||
panel->description = _("Mouse speed/acceleration, double click delay,\n"
|
panel->description = _("Mouse speed/acceleration, double click delay,\n"
|
||||||
"mouse button bindings etc.");
|
"mouse button bindings etc.");
|
||||||
|
|
||||||
panel->win = win;
|
panel->parent = parent;
|
||||||
|
|
||||||
panel->callbacks.createWidgets = createPanel;
|
panel->callbacks.createWidgets = createPanel;
|
||||||
panel->callbacks.updateDomain = storeData;
|
panel->callbacks.updateDomain = storeData;
|
||||||
|
|||||||
@@ -25,14 +25,14 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
typedef struct _Panel {
|
typedef struct _Panel {
|
||||||
WMFrame *frame;
|
WMBox *box;
|
||||||
char *sectionName;
|
char *sectionName;
|
||||||
|
|
||||||
char *description;
|
char *description;
|
||||||
|
|
||||||
CallbackRec callbacks;
|
CallbackRec callbacks;
|
||||||
|
|
||||||
WMWindow *win;
|
WMWidget *parent;
|
||||||
|
|
||||||
WMTabView *tabv;
|
WMTabView *tabv;
|
||||||
|
|
||||||
@@ -145,7 +145,7 @@ browseForFile(WMWidget *w, void *data)
|
|||||||
|
|
||||||
WMSetFilePanelCanChooseFiles(filePanel, False);
|
WMSetFilePanelCanChooseFiles(filePanel, False);
|
||||||
|
|
||||||
if (WMRunModalFilePanelForDirectory(filePanel, panel->win, "/",
|
if (WMRunModalFilePanelForDirectory(filePanel, panel->parent, "/",
|
||||||
_("Select directory"), NULL) == True) {
|
_("Select directory"), NULL) == True) {
|
||||||
char *str = WMGetFilePanelFileName(filePanel);
|
char *str = WMGetFilePanelFileName(filePanel);
|
||||||
|
|
||||||
@@ -241,7 +241,7 @@ static void
|
|||||||
createPanel(Panel *p)
|
createPanel(Panel *p)
|
||||||
{
|
{
|
||||||
_Panel *panel = (_Panel*)p;
|
_Panel *panel = (_Panel*)p;
|
||||||
WMScreen *scr = WMWidgetScreen(panel->win);
|
WMScreen *scr = WMWidgetScreen(panel->parent);
|
||||||
WMTabViewItem *tab;
|
WMTabViewItem *tab;
|
||||||
|
|
||||||
panel->white = WMWhiteColor(scr);
|
panel->white = WMWhiteColor(scr);
|
||||||
@@ -249,18 +249,18 @@ createPanel(Panel *p)
|
|||||||
panel->red = WMCreateRGBColor(scr, 0xffff, 0, 0, True);
|
panel->red = WMCreateRGBColor(scr, 0xffff, 0, 0, True);
|
||||||
panel->font = WMSystemFontOfSize(scr, 12);
|
panel->font = WMSystemFontOfSize(scr, 12);
|
||||||
|
|
||||||
panel->frame = WMCreateFrame(panel->win);
|
panel->box = WMCreateBox(panel->parent);
|
||||||
WMResizeWidget(panel->frame, FRAME_WIDTH, FRAME_HEIGHT);
|
WMSetBoxExpandsToParent(panel->box, 2, 2, 0, 0);
|
||||||
WMMoveWidget(panel->frame, FRAME_LEFT, FRAME_TOP);
|
|
||||||
|
|
||||||
panel->tabv = WMCreateTabView(panel->frame);
|
|
||||||
|
panel->tabv = WMCreateTabView(panel->box);
|
||||||
WMMoveWidget(panel->tabv, 12, 10);
|
WMMoveWidget(panel->tabv, 12, 10);
|
||||||
WMResizeWidget(panel->tabv, 500, 215);
|
WMResizeWidget(panel->tabv, 500, 215);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* icon path */
|
/* icon path */
|
||||||
panel->icoF = WMCreateFrame(panel->frame);
|
panel->icoF = WMCreateFrame(panel->box);
|
||||||
WMSetFrameRelief(panel->icoF, WRFlat);
|
WMSetFrameRelief(panel->icoF, WRFlat);
|
||||||
WMResizeWidget(panel->icoF, 230, 210);
|
WMResizeWidget(panel->icoF, 230, 210);
|
||||||
|
|
||||||
@@ -291,7 +291,7 @@ createPanel(Panel *p)
|
|||||||
WMMapSubwidgets(panel->icoF);
|
WMMapSubwidgets(panel->icoF);
|
||||||
|
|
||||||
/* pixmap path */
|
/* pixmap path */
|
||||||
panel->pixF = WMCreateFrame(panel->frame);
|
panel->pixF = WMCreateFrame(panel->box);
|
||||||
WMSetFrameRelief(panel->pixF, WRFlat);
|
WMSetFrameRelief(panel->pixF, WRFlat);
|
||||||
WMResizeWidget(panel->pixF, 230, 210);
|
WMResizeWidget(panel->pixF, 230, 210);
|
||||||
|
|
||||||
@@ -322,8 +322,8 @@ createPanel(Panel *p)
|
|||||||
|
|
||||||
WMMapSubwidgets(panel->pixF);
|
WMMapSubwidgets(panel->pixF);
|
||||||
|
|
||||||
WMRealizeWidget(panel->frame);
|
WMRealizeWidget(panel->box);
|
||||||
WMMapSubwidgets(panel->frame);
|
WMMapSubwidgets(panel->box);
|
||||||
|
|
||||||
showData(panel);
|
showData(panel);
|
||||||
}
|
}
|
||||||
@@ -331,7 +331,7 @@ createPanel(Panel *p)
|
|||||||
|
|
||||||
|
|
||||||
Panel*
|
Panel*
|
||||||
InitPaths(WMScreen *scr, WMWindow *win)
|
InitPaths(WMScreen *scr, WMWidget *parent)
|
||||||
{
|
{
|
||||||
_Panel *panel;
|
_Panel *panel;
|
||||||
|
|
||||||
@@ -343,7 +343,7 @@ InitPaths(WMScreen *scr, WMWindow *win)
|
|||||||
panel->description = _("Search paths to use when looking for pixmaps\n"
|
panel->description = _("Search paths to use when looking for pixmaps\n"
|
||||||
"and icons.");
|
"and icons.");
|
||||||
|
|
||||||
panel->win = win;
|
panel->parent = parent;
|
||||||
|
|
||||||
panel->callbacks.createWidgets = createPanel;
|
panel->callbacks.createWidgets = createPanel;
|
||||||
panel->callbacks.updateDomain = storeData;
|
panel->callbacks.updateDomain = storeData;
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
#include "WPrefs.h"
|
#include "WPrefs.h"
|
||||||
|
|
||||||
typedef struct _Panel {
|
typedef struct _Panel {
|
||||||
WMFrame *frame;
|
WMBox *box;
|
||||||
|
|
||||||
char *sectionName;
|
char *sectionName;
|
||||||
|
|
||||||
@@ -32,7 +32,7 @@ typedef struct _Panel {
|
|||||||
|
|
||||||
CallbackRec callbacks;
|
CallbackRec callbacks;
|
||||||
|
|
||||||
WMWindow *win;
|
WMWidget *parent;
|
||||||
|
|
||||||
WMFrame *sizeF;
|
WMFrame *sizeF;
|
||||||
WMPopUpButton *sizeP;
|
WMPopUpButton *sizeP;
|
||||||
@@ -203,13 +203,12 @@ createPanel(Panel *p)
|
|||||||
_Panel *panel = (_Panel*)p;
|
_Panel *panel = (_Panel*)p;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
panel->frame = WMCreateFrame(panel->win);
|
panel->box = WMCreateBox(panel->parent);
|
||||||
WMResizeWidget(panel->frame, FRAME_WIDTH, FRAME_HEIGHT);
|
WMSetBoxExpandsToParent(panel->box, 2, 2, 0, 0);
|
||||||
WMMoveWidget(panel->frame, FRAME_LEFT, FRAME_TOP);
|
|
||||||
|
|
||||||
|
|
||||||
/***************** Size Display ****************/
|
/***************** Size Display ****************/
|
||||||
panel->sizeF = WMCreateFrame(panel->frame);
|
panel->sizeF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->sizeF, 240, 60);
|
WMResizeWidget(panel->sizeF, 240, 60);
|
||||||
WMMoveWidget(panel->sizeF, 20, 10);
|
WMMoveWidget(panel->sizeF, 20, 10);
|
||||||
WMSetFrameTitle(panel->sizeF, _("Size Display"));
|
WMSetFrameTitle(panel->sizeF, _("Size Display"));
|
||||||
@@ -229,7 +228,7 @@ createPanel(Panel *p)
|
|||||||
WMMapSubwidgets(panel->sizeF);
|
WMMapSubwidgets(panel->sizeF);
|
||||||
|
|
||||||
/***************** Position Display ****************/
|
/***************** Position Display ****************/
|
||||||
panel->posiF = WMCreateFrame(panel->frame);
|
panel->posiF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->posiF, 240, 60);
|
WMResizeWidget(panel->posiF, 240, 60);
|
||||||
WMMoveWidget(panel->posiF, 20, 75);
|
WMMoveWidget(panel->posiF, 20, 75);
|
||||||
WMSetFrameTitle(panel->posiF, _("Position Display"));
|
WMSetFrameTitle(panel->posiF, _("Position Display"));
|
||||||
@@ -248,7 +247,7 @@ createPanel(Panel *p)
|
|||||||
WMMapSubwidgets(panel->posiF);
|
WMMapSubwidgets(panel->posiF);
|
||||||
|
|
||||||
/***************** Balloon Text ****************/
|
/***************** Balloon Text ****************/
|
||||||
panel->ballF = WMCreateFrame(panel->frame);
|
panel->ballF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->ballF, 235, 125);
|
WMResizeWidget(panel->ballF, 235, 125);
|
||||||
WMMoveWidget(panel->ballF, 270, 10);
|
WMMoveWidget(panel->ballF, 270, 10);
|
||||||
WMSetFrameTitle(panel->ballF, _("Show balloon text for..."));
|
WMSetFrameTitle(panel->ballF, _("Show balloon text for..."));
|
||||||
@@ -266,7 +265,7 @@ createPanel(Panel *p)
|
|||||||
WMMapSubwidgets(panel->ballF);
|
WMMapSubwidgets(panel->ballF);
|
||||||
|
|
||||||
/***************** Options ****************/
|
/***************** Options ****************/
|
||||||
panel->optF = WMCreateFrame(panel->frame);
|
panel->optF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->optF, 235, 75);
|
WMResizeWidget(panel->optF, 235, 75);
|
||||||
WMMoveWidget(panel->optF, 270, 145);
|
WMMoveWidget(panel->optF, 270, 145);
|
||||||
|
|
||||||
@@ -285,7 +284,7 @@ createPanel(Panel *p)
|
|||||||
WMMapSubwidgets(panel->optF);
|
WMMapSubwidgets(panel->optF);
|
||||||
|
|
||||||
/***************** Workspace border ****************/
|
/***************** Workspace border ****************/
|
||||||
panel->borderF = WMCreateFrame(panel->frame);
|
panel->borderF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->borderF, 240, 75);
|
WMResizeWidget(panel->borderF, 240, 75);
|
||||||
WMMoveWidget(panel->borderF, 20, 145);
|
WMMoveWidget(panel->borderF, 20, 145);
|
||||||
WMSetFrameTitle(panel->borderF, _("Workspace border"));
|
WMSetFrameTitle(panel->borderF, _("Workspace border"));
|
||||||
@@ -314,8 +313,8 @@ createPanel(Panel *p)
|
|||||||
|
|
||||||
WMMapSubwidgets(panel->borderF);
|
WMMapSubwidgets(panel->borderF);
|
||||||
|
|
||||||
WMRealizeWidget(panel->frame);
|
WMRealizeWidget(panel->box);
|
||||||
WMMapSubwidgets(panel->frame);
|
WMMapSubwidgets(panel->box);
|
||||||
|
|
||||||
showData(panel);
|
showData(panel);
|
||||||
}
|
}
|
||||||
@@ -323,7 +322,7 @@ createPanel(Panel *p)
|
|||||||
|
|
||||||
|
|
||||||
Panel*
|
Panel*
|
||||||
InitPreferences(WMScreen *scr, WMWindow *win)
|
InitPreferences(WMScreen *scr, WMWidget *parent)
|
||||||
{
|
{
|
||||||
_Panel *panel;
|
_Panel *panel;
|
||||||
|
|
||||||
@@ -334,7 +333,7 @@ InitPreferences(WMScreen *scr, WMWindow *win)
|
|||||||
panel->description = _("Various settings like balloon text, geometry\n"
|
panel->description = _("Various settings like balloon text, geometry\n"
|
||||||
"displays etc.");
|
"displays etc.");
|
||||||
|
|
||||||
panel->win = win;
|
panel->parent = parent;
|
||||||
|
|
||||||
panel->callbacks.createWidgets = createPanel;
|
panel->callbacks.createWidgets = createPanel;
|
||||||
panel->callbacks.updateDomain = storeData;
|
panel->callbacks.updateDomain = storeData;
|
||||||
|
|||||||
@@ -26,13 +26,13 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
typedef struct _Panel {
|
typedef struct _Panel {
|
||||||
WMFrame *frame;
|
WMBox *box;
|
||||||
|
|
||||||
char *sectionName;
|
char *sectionName;
|
||||||
|
|
||||||
CallbackRec callbacks;
|
CallbackRec callbacks;
|
||||||
|
|
||||||
WMWindow *win;
|
WMWidget *parent;
|
||||||
|
|
||||||
WMButton *saveB;
|
WMButton *saveB;
|
||||||
WMList *list;
|
WMList *list;
|
||||||
@@ -93,7 +93,7 @@ downloadFile(WMScreen *scr, _Panel *panel, char *file)
|
|||||||
if (pid < 0) {
|
if (pid < 0) {
|
||||||
wsyserror("could not fork() process");
|
wsyserror("could not fork() process");
|
||||||
|
|
||||||
WMRunAlertPanel(scr, panel->win, _("Error"),
|
WMRunAlertPanel(scr, GetWindow(panel), _("Error"),
|
||||||
"Could not start download. fork() failed",
|
"Could not start download. fork() failed",
|
||||||
_("OK"), NULL, NULL);
|
_("OK"), NULL, NULL);
|
||||||
return -1;
|
return -1;
|
||||||
@@ -162,25 +162,24 @@ createPanel(Panel *p)
|
|||||||
{
|
{
|
||||||
_Panel *panel = (_Panel*)p;
|
_Panel *panel = (_Panel*)p;
|
||||||
|
|
||||||
panel->frame = WMCreateFrame(panel->win);
|
panel->box = WMCreateBox(panel->parent);
|
||||||
WMResizeWidget(panel->frame, FRAME_WIDTH, FRAME_HEIGHT);
|
WMSetBoxExpandsToParent(panel->box, 2, 2, 0, 0);
|
||||||
WMMoveWidget(panel->frame, FRAME_LEFT, FRAME_TOP);
|
|
||||||
|
|
||||||
panel->saveB = WMCreateCommandButton(panel->frame);
|
panel->saveB = WMCreateCommandButton(panel->box);
|
||||||
WMResizeWidget(panel->saveB, 154, 24);
|
WMResizeWidget(panel->saveB, 154, 24);
|
||||||
WMMoveWidget(panel->saveB, 15, 10);
|
WMMoveWidget(panel->saveB, 15, 10);
|
||||||
WMSetButtonText(panel->saveB, _("Save Current Theme"));
|
WMSetButtonText(panel->saveB, _("Save Current Theme"));
|
||||||
|
|
||||||
panel->list = WMCreateList(panel->frame);
|
panel->list = WMCreateList(panel->box);
|
||||||
WMResizeWidget(panel->list, 154, 150);
|
WMResizeWidget(panel->list, 154, 150);
|
||||||
WMMoveWidget(panel->list, 15, 40);
|
WMMoveWidget(panel->list, 15, 40);
|
||||||
|
|
||||||
panel->loadB = WMCreateCommandButton(panel->frame);
|
panel->loadB = WMCreateCommandButton(panel->box);
|
||||||
WMResizeWidget(panel->loadB, 74, 24);
|
WMResizeWidget(panel->loadB, 74, 24);
|
||||||
WMMoveWidget(panel->loadB, 15, 200);
|
WMMoveWidget(panel->loadB, 15, 200);
|
||||||
WMSetButtonText(panel->loadB, _("Load"));
|
WMSetButtonText(panel->loadB, _("Load"));
|
||||||
|
|
||||||
panel->instB = WMCreateCommandButton(panel->frame);
|
panel->instB = WMCreateCommandButton(panel->box);
|
||||||
WMResizeWidget(panel->instB, 74, 24);
|
WMResizeWidget(panel->instB, 74, 24);
|
||||||
WMMoveWidget(panel->instB, 95, 200);
|
WMMoveWidget(panel->instB, 95, 200);
|
||||||
WMSetButtonText(panel->instB, _("Install"));
|
WMSetButtonText(panel->instB, _("Install"));
|
||||||
@@ -188,7 +187,7 @@ createPanel(Panel *p)
|
|||||||
|
|
||||||
/**************** Tile of the day ****************/
|
/**************** Tile of the day ****************/
|
||||||
|
|
||||||
panel->totF = WMCreateFrame(panel->frame);
|
panel->totF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->totF, 210, 105);
|
WMResizeWidget(panel->totF, 210, 105);
|
||||||
WMMoveWidget(panel->totF, 240, 10);
|
WMMoveWidget(panel->totF, 240, 10);
|
||||||
WMSetFrameTitle(panel->totF, _("Tile of The Day"));
|
WMSetFrameTitle(panel->totF, _("Tile of The Day"));
|
||||||
@@ -208,7 +207,7 @@ createPanel(Panel *p)
|
|||||||
|
|
||||||
/**************** Bar of the day ****************/
|
/**************** Bar of the day ****************/
|
||||||
|
|
||||||
panel->botF = WMCreateFrame(panel->frame);
|
panel->botF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->botF, 315, 95);
|
WMResizeWidget(panel->botF, 315, 95);
|
||||||
WMMoveWidget(panel->botF, 190, 125);
|
WMMoveWidget(panel->botF, 190, 125);
|
||||||
WMSetFrameTitle(panel->botF, _("Bar of The Day"));
|
WMSetFrameTitle(panel->botF, _("Bar of The Day"));
|
||||||
@@ -226,8 +225,8 @@ createPanel(Panel *p)
|
|||||||
|
|
||||||
WMMapSubwidgets(panel->botF);
|
WMMapSubwidgets(panel->botF);
|
||||||
|
|
||||||
WMRealizeWidget(panel->frame);
|
WMRealizeWidget(panel->box);
|
||||||
WMMapSubwidgets(panel->frame);
|
WMMapSubwidgets(panel->box);
|
||||||
|
|
||||||
showData(panel);
|
showData(panel);
|
||||||
}
|
}
|
||||||
@@ -241,7 +240,7 @@ storeData(_Panel *panel)
|
|||||||
|
|
||||||
|
|
||||||
Panel*
|
Panel*
|
||||||
InitThemes(WMScreen *scr, WMWindow *win)
|
InitThemes(WMScreen *scr, WMWidget *parent)
|
||||||
{
|
{
|
||||||
_Panel *panel;
|
_Panel *panel;
|
||||||
|
|
||||||
@@ -250,7 +249,7 @@ InitThemes(WMScreen *scr, WMWindow *win)
|
|||||||
|
|
||||||
panel->sectionName = _("Themes");
|
panel->sectionName = _("Themes");
|
||||||
|
|
||||||
panel->win = win;
|
panel->parent = parent;
|
||||||
|
|
||||||
panel->callbacks.createWidgets = createPanel;
|
panel->callbacks.createWidgets = createPanel;
|
||||||
panel->callbacks.updateDomain = storeData;
|
panel->callbacks.updateDomain = storeData;
|
||||||
|
|||||||
@@ -25,37 +25,37 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
|
|
||||||
extern Panel *InitWindowHandling(WMScreen *scr, WMWindow *win);
|
extern Panel *InitWindowHandling(WMScreen *scr, WMWidget *parent);
|
||||||
|
|
||||||
extern Panel *InitKeyboardSettings(WMScreen *scr, WMWindow *win);
|
extern Panel *InitKeyboardSettings(WMScreen *scr, WMWidget *parent);
|
||||||
|
|
||||||
extern Panel *InitMouseSettings(WMScreen *scr, WMWindow *win);
|
extern Panel *InitMouseSettings(WMScreen *scr, WMWidget *parent);
|
||||||
|
|
||||||
extern Panel *InitKeyboardShortcuts(WMScreen *scr, WMWindow *win);
|
extern Panel *InitKeyboardShortcuts(WMScreen *scr, WMWidget *parent);
|
||||||
|
|
||||||
extern Panel *InitWorkspace(WMScreen *scr, WMWindow *win);
|
extern Panel *InitWorkspace(WMScreen *scr, WMWidget *parent);
|
||||||
|
|
||||||
extern Panel *InitFocus(WMScreen *scr, WMWindow *win);
|
extern Panel *InitFocus(WMScreen *scr, WMWidget *parent);
|
||||||
|
|
||||||
extern Panel *InitPreferences(WMScreen *scr, WMWindow *win);
|
extern Panel *InitPreferences(WMScreen *scr, WMWidget *parent);
|
||||||
|
|
||||||
extern Panel *InitFont(WMScreen *scr, WMWindow *win);
|
extern Panel *InitFont(WMScreen *scr, WMWidget *parent);
|
||||||
|
|
||||||
extern Panel *InitConfigurations(WMScreen *scr, WMWindow *win);
|
extern Panel *InitConfigurations(WMScreen *scr, WMWidget *parent);
|
||||||
|
|
||||||
extern Panel *InitPaths(WMScreen *scr, WMWindow *win);
|
extern Panel *InitPaths(WMScreen *scr, WMWidget *parent);
|
||||||
|
|
||||||
extern Panel *InitMenu(WMScreen *scr, WMWindow *win);
|
extern Panel *InitMenu(WMScreen *scr, WMWidget *parent);
|
||||||
|
|
||||||
extern Panel *InitExpert(WMScreen *scr, WMWindow *win);
|
extern Panel *InitExpert(WMScreen *scr, WMWidget *parent);
|
||||||
|
|
||||||
extern Panel *InitMenuPreferences(WMScreen *scr, WMWindow *win);
|
extern Panel *InitMenuPreferences(WMScreen *scr, WMWidget *parent);
|
||||||
|
|
||||||
extern Panel *InitIcons(WMScreen *scr, WMWindow *win);
|
extern Panel *InitIcons(WMScreen *scr, WMWidget *parent);
|
||||||
|
|
||||||
extern Panel *InitThemes(WMScreen *scr, WMWindow *win);
|
extern Panel *InitThemes(WMScreen *scr, WMWidget *parent);
|
||||||
|
|
||||||
extern Panel *InitAppearance(WMScreen *scr, WMWindow *win);
|
extern Panel *InitAppearance(WMScreen *scr, WMWidget *parent);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -379,7 +379,7 @@ showPanel(Panel *panel)
|
|||||||
if (rec->callbacks.showPanel)
|
if (rec->callbacks.showPanel)
|
||||||
(*rec->callbacks.showPanel)(panel);
|
(*rec->callbacks.showPanel)(panel);
|
||||||
|
|
||||||
WMMapWidget(rec->frame);
|
WMMapWidget(rec->box);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -389,7 +389,7 @@ hidePanel(Panel *panel)
|
|||||||
{
|
{
|
||||||
PanelRec *rec = (PanelRec*)panel;
|
PanelRec *rec = (PanelRec*)panel;
|
||||||
|
|
||||||
WMUnmapWidget(rec->frame);
|
WMUnmapWidget(rec->box);
|
||||||
|
|
||||||
if (rec->callbacks.hidePanel)
|
if (rec->callbacks.hidePanel)
|
||||||
(*rec->callbacks.hidePanel)(panel);
|
(*rec->callbacks.hidePanel)(panel);
|
||||||
@@ -413,9 +413,14 @@ changeSection(WMWidget *self, void *data)
|
|||||||
if (WPrefs.currentPanel == data)
|
if (WPrefs.currentPanel == data)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (WPrefs.banner) {
|
if (WPrefs.currentPanel == NULL) {
|
||||||
WMDestroyWidget(WPrefs.banner);
|
WMDestroyWidget(WPrefs.nameL);
|
||||||
WPrefs.banner = NULL;
|
WMDestroyWidget(WPrefs.creditsL);
|
||||||
|
WMDestroyWidget(WPrefs.versionL);
|
||||||
|
WMDestroyWidget(WPrefs.statusL);
|
||||||
|
|
||||||
|
WMSetFrameRelief(WPrefs.banner, WRGroove);
|
||||||
|
|
||||||
/* WMMapWidget(WPrefs.undosBtn);
|
/* WMMapWidget(WPrefs.undosBtn);
|
||||||
WMMapWidget(WPrefs.undoBtn);
|
WMMapWidget(WPrefs.undoBtn);
|
||||||
*/
|
*/
|
||||||
@@ -431,8 +436,6 @@ changeSection(WMWidget *self, void *data)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
char*
|
char*
|
||||||
LocateImage(char *name)
|
LocateImage(char *name)
|
||||||
{
|
{
|
||||||
@@ -688,33 +691,34 @@ Initialize(WMScreen *scr)
|
|||||||
|
|
||||||
WMSetLabelText(WPrefs.statusL, _("Initializing configuration panels..."));
|
WMSetLabelText(WPrefs.statusL, _("Initializing configuration panels..."));
|
||||||
|
|
||||||
InitWindowHandling(scr, WPrefs.win);
|
InitFocus(scr, WPrefs.banner);
|
||||||
InitFocus(scr, WPrefs.win);
|
InitWindowHandling(scr, WPrefs.banner);
|
||||||
InitMenuPreferences(scr, WPrefs.win);
|
|
||||||
InitIcons(scr, WPrefs.win);
|
|
||||||
InitPreferences(scr, WPrefs.win);
|
|
||||||
|
|
||||||
InitPaths(scr, WPrefs.win);
|
InitMenuPreferences(scr, WPrefs.banner);
|
||||||
InitWorkspace(scr, WPrefs.win);
|
InitIcons(scr, WPrefs.banner);
|
||||||
InitConfigurations(scr, WPrefs.win);
|
InitPreferences(scr, WPrefs.banner);
|
||||||
|
|
||||||
InitMenu(scr, WPrefs.win);
|
InitPaths(scr, WPrefs.banner);
|
||||||
|
InitWorkspace(scr, WPrefs.banner);
|
||||||
|
InitConfigurations(scr, WPrefs.banner);
|
||||||
|
|
||||||
|
InitMenu(scr, WPrefs.banner);
|
||||||
|
|
||||||
#ifdef not_yet_fully_implemented
|
#ifdef not_yet_fully_implemented
|
||||||
InitKeyboardSettings(scr, WPrefs.win);
|
InitKeyboardSettings(scr, WPrefs.banner);
|
||||||
#endif
|
#endif
|
||||||
InitKeyboardShortcuts(scr, WPrefs.win);
|
InitKeyboardShortcuts(scr, WPrefs.banner);
|
||||||
InitMouseSettings(scr, WPrefs.win);
|
InitMouseSettings(scr, WPrefs.banner);
|
||||||
|
|
||||||
InitAppearance(scr, WPrefs.win);
|
InitAppearance(scr, WPrefs.banner);
|
||||||
|
|
||||||
#ifdef akk
|
#ifdef akk
|
||||||
InitFont(scr, WPrefs.win);
|
InitFont(scr, WPrefs.banner);
|
||||||
#endif
|
#endif
|
||||||
#ifdef not_yet_fully_implemented
|
#ifdef not_yet_fully_implemented
|
||||||
InitThemes(scr, WPrefs.win);
|
InitThemes(scr, WPrefs.banner);
|
||||||
#endif
|
#endif
|
||||||
InitExpert(scr, WPrefs.win);
|
InitExpert(scr, WPrefs.banner);
|
||||||
|
|
||||||
WMRealizeWidget(WPrefs.scrollV);
|
WMRealizeWidget(WPrefs.scrollV);
|
||||||
|
|
||||||
|
|||||||
@@ -41,8 +41,8 @@
|
|||||||
|
|
||||||
/****/
|
/****/
|
||||||
|
|
||||||
#define WVERSION "0.43"
|
#define WVERSION "0.44"
|
||||||
#define WMVERSION "0.62.x"
|
#define WMVERSION "0.64.x"
|
||||||
|
|
||||||
extern char *NOptionValueChanged;
|
extern char *NOptionValueChanged;
|
||||||
|
|
||||||
@@ -63,7 +63,7 @@ typedef struct {
|
|||||||
|
|
||||||
/* all Panels must start with the following layout */
|
/* all Panels must start with the following layout */
|
||||||
typedef struct PanelRec {
|
typedef struct PanelRec {
|
||||||
WMFrame *frame;
|
WMBox *box;
|
||||||
|
|
||||||
char *sectionName; /* section name to display in titlebar */
|
char *sectionName; /* section name to display in titlebar */
|
||||||
|
|
||||||
@@ -113,8 +113,8 @@ void AddDeadChildHandler(pid_t pid, void (*handler)(void*), void *data);
|
|||||||
|
|
||||||
|
|
||||||
#define FRAME_TOP 105
|
#define FRAME_TOP 105
|
||||||
#define FRAME_LEFT -2
|
#define FRAME_LEFT -1
|
||||||
#define FRAME_WIDTH 524
|
#define FRAME_WIDTH 522
|
||||||
#define FRAME_HEIGHT 235
|
#define FRAME_HEIGHT 235
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
#include "WPrefs.h"
|
#include "WPrefs.h"
|
||||||
|
|
||||||
typedef struct _Panel {
|
typedef struct _Panel {
|
||||||
WMFrame *frame;
|
WMBox *box;
|
||||||
|
|
||||||
char *sectionName;
|
char *sectionName;
|
||||||
|
|
||||||
@@ -32,7 +32,7 @@ typedef struct _Panel {
|
|||||||
|
|
||||||
CallbackRec callbacks;
|
CallbackRec callbacks;
|
||||||
|
|
||||||
WMWindow *win;
|
WMWidget *parent;
|
||||||
|
|
||||||
WMFrame *placF;
|
WMFrame *placF;
|
||||||
WMPopUpButton *placP;
|
WMPopUpButton *placP;
|
||||||
@@ -218,21 +218,28 @@ static void
|
|||||||
createPanel(Panel *p)
|
createPanel(Panel *p)
|
||||||
{
|
{
|
||||||
_Panel *panel = (Panel*)p;
|
_Panel *panel = (Panel*)p;
|
||||||
WMScreen *scr = WMWidgetScreen(panel->win);
|
WMScreen *scr = WMWidgetScreen(panel->parent);
|
||||||
WMColor *color;
|
WMColor *color;
|
||||||
WMPixmap *pixmap;
|
WMPixmap *pixmap;
|
||||||
int width, height;
|
int width, height;
|
||||||
int swidth, sheight;
|
int swidth, sheight;
|
||||||
char *path;
|
char *path;
|
||||||
|
WMBox *hbox;
|
||||||
|
|
||||||
panel->frame = WMCreateFrame(panel->win);
|
panel->box = WMCreateBox(panel->parent);
|
||||||
WMResizeWidget(panel->frame, FRAME_WIDTH, FRAME_HEIGHT);
|
WMSetBoxExpandsToParent(panel->box, 2, 2, 2, 2);
|
||||||
WMMoveWidget(panel->frame, FRAME_LEFT, FRAME_TOP);
|
WMSetBoxHorizontal(panel->box, False);
|
||||||
|
WMSetBoxBorderWidth(panel->box, 8);
|
||||||
|
|
||||||
|
hbox = WMCreateBox(panel->box);
|
||||||
|
WMSetBoxHorizontal(hbox, True);
|
||||||
|
WMAddBoxSubview(panel->box, WMWidgetView(hbox), False, True, 110, 0, 10);
|
||||||
|
|
||||||
/************** Window Placement ***************/
|
/************** Window Placement ***************/
|
||||||
panel->placF = WMCreateFrame(panel->frame);
|
panel->placF = WMCreateFrame(hbox);
|
||||||
WMResizeWidget(panel->placF, 270, 110);
|
WMMapWidget(panel->placF);
|
||||||
WMMoveWidget(panel->placF, 20, 10);
|
WMAddBoxSubview(hbox, WMWidgetView(panel->placF), True, True, 100, 0, 10);
|
||||||
|
|
||||||
WMSetFrameTitle(panel->placF, _("Window Placement"));
|
WMSetFrameTitle(panel->placF, _("Window Placement"));
|
||||||
WMSetBalloonTextForView(_("How to place windows when they are first put\n"
|
WMSetBalloonTextForView(_("How to place windows when they are first put\n"
|
||||||
"on screen."), WMWidgetView(panel->placF));
|
"on screen."), WMWidgetView(panel->placF));
|
||||||
@@ -269,18 +276,18 @@ createPanel(Panel *p)
|
|||||||
if (sheight > swidth) {
|
if (sheight > swidth) {
|
||||||
height = 70;
|
height = 70;
|
||||||
width = 70*swidth/sheight;
|
width = 70*swidth/sheight;
|
||||||
if (width > 115)
|
if (width > 240)
|
||||||
width = 115;
|
width = 240;
|
||||||
height = 115*sheight/swidth;
|
height = 240*sheight/swidth;
|
||||||
} else {
|
} else {
|
||||||
width = 115;
|
width = 240;
|
||||||
height = 115*sheight/swidth;
|
height = 240*sheight/swidth;
|
||||||
if (height > 70)
|
if (height > 70)
|
||||||
height = 70;
|
height = 70;
|
||||||
width = 70*swidth/sheight;
|
width = 70*swidth/sheight;
|
||||||
}
|
}
|
||||||
WMResizeWidget(panel->porigF, width, height);
|
WMResizeWidget(panel->porigF, width, height);
|
||||||
WMMoveWidget(panel->porigF, 130+(115-width)/2, 20+(70-height)/2);
|
WMMoveWidget(panel->porigF, 130+(240-width)/2, 20+(70-height)/2);
|
||||||
|
|
||||||
panel->porigW = WMCreateLabel(panel->porigF);
|
panel->porigW = WMCreateLabel(panel->porigF);
|
||||||
WMResizeWidget(panel->porigW, THUMB_SIZE, THUMB_SIZE);
|
WMResizeWidget(panel->porigW, THUMB_SIZE, THUMB_SIZE);
|
||||||
@@ -290,14 +297,14 @@ createPanel(Panel *p)
|
|||||||
|
|
||||||
panel->hsli = WMCreateSlider(panel->placF);
|
panel->hsli = WMCreateSlider(panel->placF);
|
||||||
WMResizeWidget(panel->hsli, width, 12);
|
WMResizeWidget(panel->hsli, width, 12);
|
||||||
WMMoveWidget(panel->hsli, 130+(115-width)/2, 20+(70-height)/2+height+2);
|
WMMoveWidget(panel->hsli, 130+(240-width)/2, 20+(70-height)/2+height+2);
|
||||||
WMSetSliderAction(panel->hsli, sliderCallback, panel);
|
WMSetSliderAction(panel->hsli, sliderCallback, panel);
|
||||||
WMSetSliderMinValue(panel->hsli, 0);
|
WMSetSliderMinValue(panel->hsli, 0);
|
||||||
WMSetSliderMaxValue(panel->hsli, swidth);
|
WMSetSliderMaxValue(panel->hsli, swidth);
|
||||||
|
|
||||||
panel->vsli = WMCreateSlider(panel->placF);
|
panel->vsli = WMCreateSlider(panel->placF);
|
||||||
WMResizeWidget(panel->vsli, 12, height);
|
WMResizeWidget(panel->vsli, 12, height);
|
||||||
WMMoveWidget(panel->vsli, 130+(115-width)/2+width+2, 20+(70-height)/2);
|
WMMoveWidget(panel->vsli, 130+(240-width)/2+width+2, 20+(70-height)/2);
|
||||||
WMSetSliderAction(panel->vsli, sliderCallback, panel);
|
WMSetSliderAction(panel->vsli, sliderCallback, panel);
|
||||||
WMSetSliderMinValue(panel->vsli, 0);
|
WMSetSliderMinValue(panel->vsli, 0);
|
||||||
WMSetSliderMaxValue(panel->vsli, sheight);
|
WMSetSliderMaxValue(panel->vsli, sheight);
|
||||||
@@ -307,9 +314,10 @@ createPanel(Panel *p)
|
|||||||
WMMapSubwidgets(panel->placF);
|
WMMapSubwidgets(panel->placF);
|
||||||
|
|
||||||
/************** Opaque Move ***************/
|
/************** Opaque Move ***************/
|
||||||
panel->opaqF = WMCreateFrame(panel->frame);
|
panel->opaqF = WMCreateFrame(hbox);
|
||||||
WMResizeWidget(panel->opaqF, 205, 110);
|
WMMapWidget(panel->opaqF);
|
||||||
WMMoveWidget(panel->opaqF, 300, 10);
|
WMAddBoxSubview(hbox, WMWidgetView(panel->opaqF), False, True, 110, 0, 0);
|
||||||
|
|
||||||
WMSetFrameTitle(panel->opaqF, _("Opaque Move"));
|
WMSetFrameTitle(panel->opaqF, _("Opaque Move"));
|
||||||
WMSetBalloonTextForView(_("Whether the window contents should be moved\n"
|
WMSetBalloonTextForView(_("Whether the window contents should be moved\n"
|
||||||
"when dragging windows aroung or if only a\n"
|
"when dragging windows aroung or if only a\n"
|
||||||
@@ -318,7 +326,7 @@ createPanel(Panel *p)
|
|||||||
|
|
||||||
panel->opaqB = WMCreateButton(panel->opaqF, WBTToggle);
|
panel->opaqB = WMCreateButton(panel->opaqF, WBTToggle);
|
||||||
WMResizeWidget(panel->opaqB, 64, 64);
|
WMResizeWidget(panel->opaqB, 64, 64);
|
||||||
WMMoveWidget(panel->opaqB, 70, 25);
|
WMMoveWidget(panel->opaqB, 24, 25);
|
||||||
WMSetButtonImagePosition(panel->opaqB, WIPImageOnly);
|
WMSetButtonImagePosition(panel->opaqB, WIPImageOnly);
|
||||||
|
|
||||||
path = LocateImage(NON_OPAQUE_MOVE_PIXMAP);
|
path = LocateImage(NON_OPAQUE_MOVE_PIXMAP);
|
||||||
@@ -347,18 +355,18 @@ createPanel(Panel *p)
|
|||||||
WMMapSubwidgets(panel->opaqF);
|
WMMapSubwidgets(panel->opaqF);
|
||||||
|
|
||||||
/**************** Account for Icon/Dock ***************/
|
/**************** Account for Icon/Dock ***************/
|
||||||
panel->maxiF = WMCreateFrame(panel->frame);
|
panel->maxiF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->maxiF, 205, 95);
|
WMResizeWidget(panel->maxiF, 205, 95);
|
||||||
WMMoveWidget(panel->maxiF, 300, 125);
|
WMMoveWidget(panel->maxiF, 305, 125);
|
||||||
WMSetFrameTitle(panel->maxiF, _("When maximizing..."));
|
WMSetFrameTitle(panel->maxiF, _("When maximizing..."));
|
||||||
|
|
||||||
panel->miconB = WMCreateSwitchButton(panel->maxiF);
|
panel->miconB = WMCreateSwitchButton(panel->maxiF);
|
||||||
WMResizeWidget(panel->miconB, 185, 30);
|
WMResizeWidget(panel->miconB, 190, 30);
|
||||||
WMMoveWidget(panel->miconB, 10, 18);
|
WMMoveWidget(panel->miconB, 10, 18);
|
||||||
WMSetButtonText(panel->miconB, _("...do not cover icons"));
|
WMSetButtonText(panel->miconB, _("...do not cover icons"));
|
||||||
|
|
||||||
panel->mdockB = WMCreateSwitchButton(panel->maxiF);
|
panel->mdockB = WMCreateSwitchButton(panel->maxiF);
|
||||||
WMResizeWidget(panel->mdockB, 185, 30);
|
WMResizeWidget(panel->mdockB, 190, 30);
|
||||||
WMMoveWidget(panel->mdockB, 10, 53);
|
WMMoveWidget(panel->mdockB, 10, 53);
|
||||||
|
|
||||||
WMSetButtonText(panel->mdockB, _("...do not cover dock"));
|
WMSetButtonText(panel->mdockB, _("...do not cover dock"));
|
||||||
@@ -367,9 +375,9 @@ createPanel(Panel *p)
|
|||||||
|
|
||||||
/**************** Edge Resistance ****************/
|
/**************** Edge Resistance ****************/
|
||||||
|
|
||||||
panel->resF = WMCreateFrame(panel->frame);
|
panel->resF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->resF, 270, 45);
|
WMResizeWidget(panel->resF, 285, 45);
|
||||||
WMMoveWidget(panel->resF, 20, 125);
|
WMMoveWidget(panel->resF, 8, 125);
|
||||||
WMSetFrameTitle(panel->resF, _("Edge Resistance"));
|
WMSetFrameTitle(panel->resF, _("Edge Resistance"));
|
||||||
|
|
||||||
WMSetBalloonTextForView(_("Edge resistance will make windows `resist'\n"
|
WMSetBalloonTextForView(_("Edge resistance will make windows `resist'\n"
|
||||||
@@ -405,9 +413,9 @@ createPanel(Panel *p)
|
|||||||
|
|
||||||
/**************** Transients on Parent Workspace ****************/
|
/**************** Transients on Parent Workspace ****************/
|
||||||
|
|
||||||
panel->tranF = WMCreateFrame(panel->frame);
|
panel->tranF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->tranF, 270, 40);
|
WMResizeWidget(panel->tranF, 285, 40);
|
||||||
WMMoveWidget(panel->tranF, 20, 180);
|
WMMoveWidget(panel->tranF, 8, 180);
|
||||||
|
|
||||||
panel->tranB = WMCreateSwitchButton(panel->tranF);
|
panel->tranB = WMCreateSwitchButton(panel->tranF);
|
||||||
WMMoveWidget(panel->tranB, 10, 5);
|
WMMoveWidget(panel->tranB, 10, 5);
|
||||||
@@ -416,8 +424,8 @@ createPanel(Panel *p)
|
|||||||
|
|
||||||
WMMapSubwidgets(panel->tranF);
|
WMMapSubwidgets(panel->tranF);
|
||||||
|
|
||||||
WMRealizeWidget(panel->frame);
|
WMRealizeWidget(panel->box);
|
||||||
WMMapSubwidgets(panel->frame);
|
WMMapSubwidgets(panel->box);
|
||||||
|
|
||||||
/* show the config data */
|
/* show the config data */
|
||||||
showData(panel);
|
showData(panel);
|
||||||
@@ -432,7 +440,7 @@ undo(_Panel *panel)
|
|||||||
|
|
||||||
|
|
||||||
Panel*
|
Panel*
|
||||||
InitWindowHandling(WMScreen *scr, WMWindow *win)
|
InitWindowHandling(WMScreen *scr, WMWidget *parent)
|
||||||
{
|
{
|
||||||
_Panel *panel;
|
_Panel *panel;
|
||||||
|
|
||||||
@@ -444,7 +452,7 @@ InitWindowHandling(WMScreen *scr, WMWindow *win)
|
|||||||
panel->description = _("Window handling options. Initial placement style\n"
|
panel->description = _("Window handling options. Initial placement style\n"
|
||||||
"edge resistance, opaque move etc.");
|
"edge resistance, opaque move etc.");
|
||||||
|
|
||||||
panel->win = win;
|
panel->parent = parent;
|
||||||
|
|
||||||
panel->callbacks.createWidgets = createPanel;
|
panel->callbacks.createWidgets = createPanel;
|
||||||
panel->callbacks.updateDomain = storeData;
|
panel->callbacks.updateDomain = storeData;
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
|
|
||||||
typedef struct _Panel {
|
typedef struct _Panel {
|
||||||
WMFrame *frame;
|
WMBox *box;
|
||||||
|
|
||||||
char *sectionName;
|
char *sectionName;
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@ typedef struct _Panel {
|
|||||||
|
|
||||||
CallbackRec callbacks;
|
CallbackRec callbacks;
|
||||||
|
|
||||||
WMWindow *win;
|
WMWidget *parent;
|
||||||
|
|
||||||
WMFrame *navF;
|
WMFrame *navF;
|
||||||
|
|
||||||
@@ -151,7 +151,7 @@ static void
|
|||||||
createPanel(Panel *p)
|
createPanel(Panel *p)
|
||||||
{
|
{
|
||||||
_Panel *panel = (_Panel*)p;
|
_Panel *panel = (_Panel*)p;
|
||||||
WMScreen *scr = WMWidgetScreen(panel->win);
|
WMScreen *scr = WMWidgetScreen(panel->parent);
|
||||||
WMPixmap *icon1, *icon2;
|
WMPixmap *icon1, *icon2;
|
||||||
RImage *xis = NULL;
|
RImage *xis = NULL;
|
||||||
RContext *rc = WMScreenRContext(scr);
|
RContext *rc = WMScreenRContext(scr);
|
||||||
@@ -166,12 +166,11 @@ createPanel(Panel *p)
|
|||||||
wfree(path);
|
wfree(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
panel->frame = WMCreateFrame(panel->win);
|
panel->box = WMCreateBox(panel->parent);
|
||||||
WMResizeWidget(panel->frame, FRAME_WIDTH, FRAME_HEIGHT);
|
WMSetBoxExpandsToParent(panel->box, 2, 2, 0, 0);
|
||||||
WMMoveWidget(panel->frame, FRAME_LEFT, FRAME_TOP);
|
|
||||||
|
|
||||||
/***************** Workspace Navigation *****************/
|
/***************** Workspace Navigation *****************/
|
||||||
panel->navF = WMCreateFrame(panel->frame);
|
panel->navF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->navF, 365, 210);
|
WMResizeWidget(panel->navF, 365, 210);
|
||||||
WMMoveWidget(panel->navF, 15, 10);
|
WMMoveWidget(panel->navF, 15, 10);
|
||||||
WMSetFrameTitle(panel->navF, _("Workspace Navigation"));
|
WMSetFrameTitle(panel->navF, _("Workspace Navigation"));
|
||||||
@@ -279,7 +278,7 @@ createPanel(Panel *p)
|
|||||||
WMMapSubwidgets(panel->navF);
|
WMMapSubwidgets(panel->navF);
|
||||||
|
|
||||||
/***************** Dock/Clip *****************/
|
/***************** Dock/Clip *****************/
|
||||||
panel->dockF = WMCreateFrame(panel->frame);
|
panel->dockF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->dockF, 115, 210);
|
WMResizeWidget(panel->dockF, 115, 210);
|
||||||
WMMoveWidget(panel->dockF, 390, 10);
|
WMMoveWidget(panel->dockF, 390, 10);
|
||||||
WMSetFrameTitle(panel->dockF, _("Dock/Clip"));
|
WMSetFrameTitle(panel->dockF, _("Dock/Clip"));
|
||||||
@@ -331,8 +330,8 @@ createPanel(Panel *p)
|
|||||||
if (xis)
|
if (xis)
|
||||||
RDestroyImage(xis);
|
RDestroyImage(xis);
|
||||||
|
|
||||||
WMRealizeWidget(panel->frame);
|
WMRealizeWidget(panel->box);
|
||||||
WMMapSubwidgets(panel->frame);
|
WMMapSubwidgets(panel->box);
|
||||||
|
|
||||||
showData(panel);
|
showData(panel);
|
||||||
}
|
}
|
||||||
@@ -355,7 +354,7 @@ storeData(_Panel *panel)
|
|||||||
|
|
||||||
|
|
||||||
Panel*
|
Panel*
|
||||||
InitWorkspace(WMScreen *scr, WMWindow *win)
|
InitWorkspace(WMScreen *scr, WMWidget *parent)
|
||||||
{
|
{
|
||||||
_Panel *panel;
|
_Panel *panel;
|
||||||
|
|
||||||
@@ -367,7 +366,7 @@ InitWorkspace(WMScreen *scr, WMWindow *win)
|
|||||||
panel->description = _("Workspace navigation features.\n"
|
panel->description = _("Workspace navigation features.\n"
|
||||||
"You can also enable/disable the Dock and Clip here.");
|
"You can also enable/disable the Dock and Clip here.");
|
||||||
|
|
||||||
panel->win = win;
|
panel->parent = parent;
|
||||||
|
|
||||||
panel->callbacks.createWidgets = createPanel;
|
panel->callbacks.createWidgets = createPanel;
|
||||||
panel->callbacks.updateDomain = storeData;
|
panel->callbacks.updateDomain = storeData;
|
||||||
|
|||||||
Reference in New Issue
Block a user