mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 20:38:08 +01:00
Fixed some paths after the WINGs directory reorganization
This commit is contained in:
@@ -29,8 +29,10 @@ int windowCount = 0;
|
|||||||
void
|
void
|
||||||
closeAction(WMWidget *self, void *data)
|
closeAction(WMWidget *self, void *data)
|
||||||
{
|
{
|
||||||
|
WMUnmapWidget(self);
|
||||||
WMDestroyWidget(self);
|
WMDestroyWidget(self);
|
||||||
windowCount--;
|
windowCount--;
|
||||||
|
printf("window closed, window count = %d\n", windowCount);
|
||||||
if (windowCount < 1)
|
if (windowCount < 1)
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
@@ -41,7 +43,7 @@ testOpenFilePanel(WMScreen *scr)
|
|||||||
{
|
{
|
||||||
WMOpenPanel *panel;
|
WMOpenPanel *panel;
|
||||||
|
|
||||||
windowCount++;
|
/* windowCount++; */
|
||||||
|
|
||||||
/* get the shared Open File panel */
|
/* get the shared Open File panel */
|
||||||
panel = WMGetOpenPanel(scr);
|
panel = WMGetOpenPanel(scr);
|
||||||
@@ -58,7 +60,7 @@ testFontPanel(WMScreen *scr)
|
|||||||
{
|
{
|
||||||
WMFontPanel *panel;
|
WMFontPanel *panel;
|
||||||
|
|
||||||
windowCount++;
|
/*windowCount++;*/
|
||||||
|
|
||||||
panel = WMGetFontPanel(scr);
|
panel = WMGetFontPanel(scr);
|
||||||
|
|
||||||
@@ -340,7 +342,6 @@ testColorWell(WMScreen *scr)
|
|||||||
|
|
||||||
win = WMCreateWindow(scr, "testColor");
|
win = WMCreateWindow(scr, "testColor");
|
||||||
WMResizeWidget(win, 300, 300);
|
WMResizeWidget(win, 300, 300);
|
||||||
|
|
||||||
WMSetWindowCloseAction(win, closeAction, NULL);
|
WMSetWindowCloseAction(win, closeAction, NULL);
|
||||||
|
|
||||||
well1 = WMCreateColorWell(win);
|
well1 = WMCreateColorWell(win);
|
||||||
@@ -360,7 +361,7 @@ testColorWell(WMScreen *scr)
|
|||||||
void
|
void
|
||||||
sliderCallback(WMWidget *w, void *data)
|
sliderCallback(WMWidget *w, void *data)
|
||||||
{
|
{
|
||||||
printf("SLIEDER == %i\n", WMGetSliderValue(w));
|
printf("SLIDER == %i\n", WMGetSliderValue(w));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -808,7 +809,7 @@ getImage(WMScreen *scr, char *file)
|
|||||||
char buffer[1000];
|
char buffer[1000];
|
||||||
WMPixmap *pix;
|
WMPixmap *pix;
|
||||||
|
|
||||||
sprintf(buffer, "../WindowMaker/Icons/%s", file);
|
sprintf(buffer, "../../WindowMaker/Icons/%s", file);
|
||||||
pix = WMCreatePixmapFromFile(scr, buffer);
|
pix = WMCreatePixmapFromFile(scr, buffer);
|
||||||
|
|
||||||
return pix;
|
return pix;
|
||||||
@@ -817,7 +818,8 @@ getImage(WMScreen *scr, char *file)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void iconMouseStuff(XEvent *event, void *cdata)
|
static void
|
||||||
|
iconMouseStuff(XEvent *event, void *cdata)
|
||||||
{
|
{
|
||||||
WMLabel *label = (WMLabel*)cdata;
|
WMLabel *label = (WMLabel*)cdata;
|
||||||
DNDStuff *stuff = WMGetHangedData(label);
|
DNDStuff *stuff = WMGetHangedData(label);
|
||||||
@@ -853,8 +855,8 @@ static void iconMouseStuff(XEvent *event, void *cdata)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void endedDragImage(WMView *self, WMPixmap *image, WMPoint point,
|
static void
|
||||||
Bool deposited)
|
endedDragImage(WMView *self, WMPixmap *image, WMPoint point, Bool deposited)
|
||||||
{
|
{
|
||||||
DNDStuff *stuff = WMGetHangedData(WMWidgetOfView(self));
|
DNDStuff *stuff = WMGetHangedData(WMWidgetOfView(self));
|
||||||
|
|
||||||
@@ -866,7 +868,8 @@ static void endedDragImage(WMView *self, WMPixmap *image, WMPoint point,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static WMData* fetchDragData(WMView *self, char *type)
|
static WMData*
|
||||||
|
fetchDragData(WMView *self, char *type)
|
||||||
{
|
{
|
||||||
DNDStuff *stuff = WMGetHangedData(WMWidgetOfView(self));
|
DNDStuff *stuff = WMGetHangedData(WMWidgetOfView(self));
|
||||||
|
|
||||||
@@ -885,13 +888,15 @@ WMDragSourceProcs dragSourceProcs = {
|
|||||||
/************************/
|
/************************/
|
||||||
|
|
||||||
|
|
||||||
unsigned draggingEntered(WMView *self, WMDraggingInfo *info)
|
unsigned
|
||||||
|
draggingEntered(WMView *self, WMDraggingInfo *info)
|
||||||
{
|
{
|
||||||
return WDOperationCopy;
|
return WDOperationCopy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
unsigned draggingUpdated(WMView *self, WMDraggingInfo *info)
|
unsigned
|
||||||
|
draggingUpdated(WMView *self, WMDraggingInfo *info)
|
||||||
{
|
{
|
||||||
return WDOperationCopy;
|
return WDOperationCopy;
|
||||||
}
|
}
|
||||||
@@ -899,7 +904,8 @@ unsigned draggingUpdated(WMView *self, WMDraggingInfo *info)
|
|||||||
/*
|
/*
|
||||||
void (*draggingExited)(WMView *self, WMDraggingInfo *info);
|
void (*draggingExited)(WMView *self, WMDraggingInfo *info);
|
||||||
*/
|
*/
|
||||||
char *prepareForDragOperation(WMView *self, WMDraggingInfo *info)
|
char*
|
||||||
|
prepareForDragOperation(WMView *self, WMDraggingInfo *info)
|
||||||
{
|
{
|
||||||
return "application/X-WINGs-Bla";
|
return "application/X-WINGs-Bla";
|
||||||
}
|
}
|
||||||
@@ -907,8 +913,8 @@ char *prepareForDragOperation(WMView *self, WMDraggingInfo *info)
|
|||||||
|
|
||||||
WMLabel* makeDraggableLabel(WMWidget *w, char *file, int x, int y);
|
WMLabel* makeDraggableLabel(WMWidget *w, char *file, int x, int y);
|
||||||
|
|
||||||
Bool performDragOperation(WMView *self, WMDraggingInfo *info,
|
Bool
|
||||||
WMData *data)
|
performDragOperation(WMView *self, WMDraggingInfo *info, WMData *data)
|
||||||
{
|
{
|
||||||
char *file = (char*)WMDataBytes(data);
|
char *file = (char*)WMDataBytes(data);
|
||||||
WMPoint pos;
|
WMPoint pos;
|
||||||
@@ -931,7 +937,8 @@ Bool performDragOperation(WMView *self, WMDraggingInfo *info,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void concludeDragOperation(WMView *self, WMDraggingInfo *info)
|
void
|
||||||
|
concludeDragOperation(WMView *self, WMDraggingInfo *info)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -986,7 +993,8 @@ makeDraggableLabel(WMWidget *w, char *file, int x, int y)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void testDragAndDrop(WMScreen *scr)
|
void
|
||||||
|
testDragAndDrop(WMScreen *scr)
|
||||||
{
|
{
|
||||||
WMWindow *win;
|
WMWindow *win;
|
||||||
WMFrame *frame;
|
WMFrame *frame;
|
||||||
@@ -1015,9 +1023,9 @@ void testDragAndDrop(WMScreen *scr)
|
|||||||
WMRegisterViewForDraggedTypes(WMWidgetView(frame), types);
|
WMRegisterViewForDraggedTypes(WMWidgetView(frame), types);
|
||||||
WMSetViewDragDestinationProcs(WMWidgetView(frame), &dragDestProcs);
|
WMSetViewDragDestinationProcs(WMWidgetView(frame), &dragDestProcs);
|
||||||
|
|
||||||
dir = opendir("../WindowMaker/Icons");
|
dir = opendir("../../WindowMaker/Icons");
|
||||||
if (!dir) {
|
if (!dir) {
|
||||||
perror("../WindowMaker/Icons");
|
perror("../../WindowMaker/Icons");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1052,7 +1060,8 @@ void testDragAndDrop(WMScreen *scr)
|
|||||||
|
|
||||||
#include "WUtil.h"
|
#include "WUtil.h"
|
||||||
|
|
||||||
void testUD()
|
void
|
||||||
|
testUD()
|
||||||
{
|
{
|
||||||
WMUserDefaults *defs;
|
WMUserDefaults *defs;
|
||||||
char str[32];
|
char str[32];
|
||||||
@@ -1066,7 +1075,8 @@ void testUD()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int
|
||||||
|
main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
WMScreen *scr;
|
WMScreen *scr;
|
||||||
WMPixmap *pixmap;
|
WMPixmap *pixmap;
|
||||||
@@ -1115,6 +1125,7 @@ int main(int argc, char **argv)
|
|||||||
* Put the testSomething() function you want to test here.
|
* Put the testSomething() function you want to test here.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
testList(scr);
|
||||||
testColorWell(scr);
|
testColorWell(scr);
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
@@ -1143,8 +1154,6 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
|
|
||||||
testOpenFilePanel(scr);
|
testOpenFilePanel(scr);
|
||||||
testList(scr);
|
|
||||||
|
|
||||||
|
|
||||||
testSlider(scr);
|
testSlider(scr);
|
||||||
testPullDown(scr);
|
testPullDown(scr);
|
||||||
|
|||||||
Reference in New Issue
Block a user