mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-18 20:10:29 +01:00
Fixed some problems in 0.60.0
This commit is contained in:
@@ -53,7 +53,7 @@ wmquery_SOURCES = wmquery.c
|
|||||||
wmquery_LDADD = libWINGs.a $(LIBLIST)
|
wmquery_LDADD = libWINGs.a $(LIBLIST)
|
||||||
|
|
||||||
|
|
||||||
EXTRA_DIST = logo.xpm
|
EXTRA_DIST = logo.xpm BUGS
|
||||||
|
|
||||||
# wbutton.c
|
# wbutton.c
|
||||||
libWINGs_a_SOURCES = \
|
libWINGs_a_SOURCES = \
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ wmquery_SOURCES = wmquery.c
|
|||||||
|
|
||||||
wmquery_LDADD = libWINGs.a $(LIBLIST)
|
wmquery_LDADD = libWINGs.a $(LIBLIST)
|
||||||
|
|
||||||
EXTRA_DIST = logo.xpm
|
EXTRA_DIST = logo.xpm BUGS
|
||||||
|
|
||||||
# wbutton.c
|
# wbutton.c
|
||||||
libWINGs_a_SOURCES = WINGs.h WINGsP.h configuration.c llist.h llist.c international.c notification.c selection.c userdefaults.c wapplication.c wballoon.c wbrowser.c wbutton.c wcolor.c wcolorpanel.c wcolorwell.c wevent.c wfilepanel.c wframe.c wfont.c wfontpanel.c widgets.c wlabel.c wlist.c wmisc.c wpanel.c wpixmap.c wpopupbutton.c wscroller.c wscrollview.c wslider.c wsplitview.c wtabview.c wtextfield.c wwindow.c wview.c error.c findfile.c hashtable.c memory.c usleep.c
|
libWINGs_a_SOURCES = WINGs.h WINGsP.h configuration.c llist.h llist.c international.c notification.c selection.c userdefaults.c wapplication.c wballoon.c wbrowser.c wbutton.c wcolor.c wcolorpanel.c wcolorwell.c wevent.c wfilepanel.c wframe.c wfont.c wfontpanel.c widgets.c wlabel.c wlist.c wmisc.c wpanel.c wpixmap.c wpopupbutton.c wscroller.c wscrollview.c wslider.c wsplitview.c wtabview.c wtextfield.c wwindow.c wview.c error.c findfile.c hashtable.c memory.c usleep.c
|
||||||
|
|||||||
@@ -543,6 +543,14 @@ WMHandlerID WMAddInputHandler(int fd, int condition, WMInputProc *proc,
|
|||||||
|
|
||||||
void WMDeleteInputHandler(WMHandlerID handlerID);
|
void WMDeleteInputHandler(WMHandlerID handlerID);
|
||||||
|
|
||||||
|
Bool WMCreateSelectionHandler(WMWidget *w, Atom selection, Time timestamp,
|
||||||
|
WMConvertSelectionProc *convProc,
|
||||||
|
WMLoseSelectionProc *loseProc,
|
||||||
|
WMSelectionDoneProc *doneProc);
|
||||||
|
|
||||||
|
void WMDeleteSelectionHandler(WMWidget *widget, Atom selection);
|
||||||
|
|
||||||
|
|
||||||
/* ....................................................................... */
|
/* ....................................................................... */
|
||||||
/*
|
/*
|
||||||
void WMDragImageFromView(WMView *view, WMPixmap *image, WMPoint atLocation,
|
void WMDragImageFromView(WMView *view, WMPixmap *image, WMPoint atLocation,
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ observer2(void *data, WMNotification *notification)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|||||||
@@ -594,56 +594,65 @@ browserClick(WMBrowser *bPtr, WMFilePanel *panel)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#define ERROR_PANEL(s) err_str = wmalloc(strlen(file)+strlen(s)); \
|
|
||||||
sprintf(err_str, s, file); \
|
static void
|
||||||
WMRunAlertPanel(WMWidgetScreen(panel->win), panel->win, \
|
showError(WMScreen *scr, WMWindow *owner, char *s, char *file)
|
||||||
"Error", err_str, "OK", NULL, NULL);
|
{
|
||||||
|
char *errStr;
|
||||||
|
|
||||||
|
if (file) {
|
||||||
|
errStr = wmalloc(strlen(file)+strlen(s));
|
||||||
|
sprintf(errStr, s, file);
|
||||||
|
} else {
|
||||||
|
errStr = wstrdup(s);
|
||||||
|
}
|
||||||
|
WMRunAlertPanel(scr, owner, "Error", errStr, "OK", NULL, NULL);
|
||||||
|
free(errStr);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
deleteFile(WMButton *bPre, WMFilePanel *panel)
|
deleteFile(WMButton *bPre, WMFilePanel *panel)
|
||||||
{
|
{
|
||||||
|
WMScreen *scr = WMWidgetScreen(panel->win);
|
||||||
char *file;
|
char *file;
|
||||||
char *buffer;
|
char *buffer;
|
||||||
char *err_str;
|
|
||||||
|
|
||||||
WMFilePanel *deletePanel;
|
|
||||||
|
|
||||||
file = getCurrentFileName(panel);
|
file = getCurrentFileName(panel);
|
||||||
if (file[strlen(file)-1] == '/') {
|
if (file[strlen(file)-1] == '/') {
|
||||||
ERROR_PANEL("%s is a directory.");
|
showError(scr, panel->win, "%s is a directory.", file);
|
||||||
free(err_str);
|
|
||||||
free(file);
|
free(file);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
buffer = wmalloc(strlen(file)+15);
|
buffer = wmalloc(strlen(file)+16);
|
||||||
sprintf(buffer,"Delete file %s ?\x0",file);
|
sprintf(buffer,"Delete file %s ?",file);
|
||||||
if (!WMRunAlertPanel(WMWidgetScreen(panel->win), panel->win,
|
if (!WMRunAlertPanel(WMWidgetScreen(panel->win), panel->win,
|
||||||
"Warning", buffer, "OK", "Cancel", NULL)) {
|
"Warning", buffer, "OK", "Cancel", NULL)) {
|
||||||
int rem_stat;
|
if (remove(file) != 0) {
|
||||||
if (rem_stat = remove(file)) {
|
|
||||||
switch (errno) {
|
switch (errno) {
|
||||||
case EISDIR:
|
case EISDIR:
|
||||||
ERROR_PANEL("%s is a directory.");
|
showError(scr, panel->win, "'%s' is a directory.", file);
|
||||||
break;
|
break;
|
||||||
case ENOENT:
|
case ENOENT:
|
||||||
ERROR_PANEL("%s does not exist.");
|
showError(scr, panel->win, "'%s' does not exist.", file);
|
||||||
break;
|
break;
|
||||||
case EACCES:
|
case EACCES:
|
||||||
ERROR_PANEL("Permission denied.");
|
showError(scr, panel->win, "Permission denied.", NULL);
|
||||||
break;
|
break;
|
||||||
case ENOMEM:
|
case ENOMEM:
|
||||||
ERROR_PANEL("Insufficient kernel memory was available.");
|
showError(scr, panel->win,
|
||||||
|
"Insufficient memory available.", NULL);
|
||||||
break;
|
break;
|
||||||
case EROFS:
|
case EROFS:
|
||||||
ERROR_PANEL("%s refers to a file on a read-only filesystem.");
|
showError(scr, panel->win,
|
||||||
|
"'%s' is on a read-only filesystem.", file);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ERROR_PANEL("Can not delete %s.");
|
showError(scr, panel->win, "Can not delete '%s'.", file);
|
||||||
}
|
}
|
||||||
free(err_str);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
char *s = strrchr(file,'/');
|
char *s = strrchr(file, '/');
|
||||||
if (s) s[1] = 0;
|
if (s) s[1] = 0;
|
||||||
WMSetFilePanelDirectory(panel, file);
|
WMSetFilePanelDirectory(panel, file);
|
||||||
}
|
}
|
||||||
@@ -652,20 +661,18 @@ deleteFile(WMButton *bPre, WMFilePanel *panel)
|
|||||||
free(file);
|
free(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
goFloppy(WMButton *bPtr, WMFilePanel *panel)
|
goFloppy(WMButton *bPtr, WMFilePanel *panel)
|
||||||
{
|
{
|
||||||
char *file, *err_str;
|
WMScreen *scr = WMWidgetScreen(panel->win);
|
||||||
struct stat filestat;
|
struct stat filestat;
|
||||||
|
|
||||||
/* home is statically allocated. Don't free it! */
|
if (stat("/floppy", &filestat)) {
|
||||||
if (stat("/floppy",&filestat)) {
|
showError(scr, panel->win, "An error occured browsing /floppy.", NULL);
|
||||||
ERROR_PANEL("An error occured browsing /floppy.");
|
|
||||||
free(err_str);
|
|
||||||
return;
|
return;
|
||||||
} else if (!S_ISDIR(filestat.st_mode)) {
|
} else if (!S_ISDIR(filestat.st_mode)) {
|
||||||
ERROR_PANEL("/floppy is not a directory.");
|
showError(scr, panel->win, "/floppy is not a directory.", NULL);
|
||||||
free(err_str);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -182,7 +182,7 @@ requestHandler(WMWidget *w, Atom selection, Atom target, Atom *type,
|
|||||||
void **value, unsigned *length, int *format)
|
void **value, unsigned *length, int *format)
|
||||||
{
|
{
|
||||||
TextField *tPtr = w;
|
TextField *tPtr = w;
|
||||||
int count,count2;
|
int count;
|
||||||
Display *dpy = tPtr->view->screen->display;
|
Display *dpy = tPtr->view->screen->display;
|
||||||
Atom _TARGETS;
|
Atom _TARGETS;
|
||||||
char *text;
|
char *text;
|
||||||
@@ -952,7 +952,9 @@ handleTextFieldKeyPress(TextField *tPtr, XEvent *event)
|
|||||||
*/
|
*/
|
||||||
switch (ksym) {
|
switch (ksym) {
|
||||||
case XK_Tab:
|
case XK_Tab:
|
||||||
|
#ifdef XK_ISO_Left_Tab
|
||||||
case XK_ISO_Left_Tab:
|
case XK_ISO_Left_Tab:
|
||||||
|
#endif
|
||||||
if (event->xkey.state & ShiftMask) {
|
if (event->xkey.state & ShiftMask) {
|
||||||
if (tPtr->view->prevFocusChain) {
|
if (tPtr->view->prevFocusChain) {
|
||||||
W_SetFocusOfTopLevel(W_TopLevelOfView(tPtr->view),
|
W_SetFocusOfTopLevel(W_TopLevelOfView(tPtr->view),
|
||||||
|
|||||||
@@ -161,7 +161,6 @@ static void
|
|||||||
createPanel(Panel *p)
|
createPanel(Panel *p)
|
||||||
{
|
{
|
||||||
_Panel *panel = (_Panel*)p;
|
_Panel *panel = (_Panel*)p;
|
||||||
WMScreen *scr = WMWidgetScreen(panel->win);
|
|
||||||
|
|
||||||
panel->frame = WMCreateFrame(panel->win);
|
panel->frame = WMCreateFrame(panel->win);
|
||||||
WMResizeWidget(panel->frame, FRAME_WIDTH, FRAME_HEIGHT);
|
WMResizeWidget(panel->frame, FRAME_WIDTH, FRAME_HEIGHT);
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ bin_PROGRAMS = wmaker
|
|||||||
|
|
||||||
EXTRA_DIST = wmnotify.c wmnotdef.h wmnotify.h
|
EXTRA_DIST = wmnotify.c wmnotdef.h wmnotify.h
|
||||||
|
|
||||||
wmaker_SOURCES = GNUstep.h WindowMaker.h actions.c actions.h appicon.c appicon.h application.c application.h appmenu.c appmenu.h balloon.c balloon.h client.c client.h colormap.c def_pixmaps.h defaults.c defaults.h dialog.c dialog.h dock.c dockedapp.c dock.h event.c framewin.c framewin.h gnome.c gnome.h funcs.h icon.c icon.h keybind.h kwm.h kwm.c list.c list.h main.c menu.c menu.h misc.c motif.c motif.h moveres.c openlook.c openlook.h pixmap.c pixmap.h placement.c properties.c properties.h proplist.c resources.c resources.h rootmenu.c screen.c screen.h session.h session.c shutdown.c stacking.c stacking.h startup.c superfluous.c superfluous.h switchmenu.c texture.c texture.h usermenu.c usermenu.h xdnd.h xdnd.c xmodifier.h xmodifier.c xutil.c xutil.h wconfig.h wcore.c wcore.h wdefaults.c wdefaults.h window.c window.h winmenu.c winspector.h winspector.c workspace.c workspace.h wmsound.c wmsound.h text.c text.h
|
wmaker_SOURCES = GNUstep.h WindowMaker.h actions.c actions.h appicon.c appicon.h application.c application.h appmenu.c appmenu.h balloon.c balloon.h client.c client.h colormap.c def_pixmaps.h defaults.c defaults.h dialog.c dialog.h dock.c dockedapp.c dock.h event.c extend_pixmaps.h framewin.c framewin.h gnome.c gnome.h funcs.h icon.c icon.h keybind.h kwm.h kwm.c list.c list.h main.c menu.c menu.h misc.c motif.c motif.h moveres.c openlook.c openlook.h pixmap.c pixmap.h placement.c properties.c properties.h proplist.c resources.c resources.h rootmenu.c screen.c screen.h session.h session.c shutdown.c stacking.c stacking.h startup.c superfluous.c superfluous.h switchmenu.c texture.c texture.h usermenu.c usermenu.h xdnd.h xdnd.c xmodifier.h xmodifier.c xutil.c xutil.h wconfig.h wcore.c wcore.h wdefaults.c wdefaults.h window.c window.h winmenu.c winspector.h winspector.c workspace.c workspace.h wmsound.c wmsound.h text.c text.h
|
||||||
|
|
||||||
|
|
||||||
CPPFLAGS = @CPPFLAGS@ @DFLAGS@ -DLOCALEDIR=\"$(NLSDIR)\"
|
CPPFLAGS = @CPPFLAGS@ @DFLAGS@ -DLOCALEDIR=\"$(NLSDIR)\"
|
||||||
|
|||||||
@@ -505,7 +505,7 @@ omnipresentCallback(WMenu *menu, WMenuEntry *entry)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (failed > 1) {
|
if (failed > 1) {
|
||||||
wMessageDialog(aicon->icon->core->screen_ptr, _("Warning"),
|
wMessageDialog(dock->screen_ptr, _("Warning"),
|
||||||
_("Some icons cannot be made omnipresent. "
|
_("Some icons cannot be made omnipresent. "
|
||||||
"Please make sure that no other icon is "
|
"Please make sure that no other icon is "
|
||||||
"docked in the same positions on the other "
|
"docked in the same positions on the other "
|
||||||
@@ -513,7 +513,7 @@ omnipresentCallback(WMenu *menu, WMenuEntry *entry)
|
|||||||
"some workspace."),
|
"some workspace."),
|
||||||
_("OK"), NULL, NULL);
|
_("OK"), NULL, NULL);
|
||||||
} else if (failed == 1) {
|
} else if (failed == 1) {
|
||||||
wMessageDialog(aicon->icon->core->screen_ptr, _("Warning"),
|
wMessageDialog(dock->screen_ptr, _("Warning"),
|
||||||
_("Icon cannot be made omnipresent. "
|
_("Icon cannot be made omnipresent. "
|
||||||
"Please make sure that no other icon is "
|
"Please make sure that no other icon is "
|
||||||
"docked in the same position on the other "
|
"docked in the same position on the other "
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ bin_SCRIPTS = wmaker.inst wm-oldmenu2new wsetfont wkdemenu.pl
|
|||||||
EXTRA_DIST = wmaker.inst.in bughint wm-oldmenu2new wsetfont directjpeg.c \
|
EXTRA_DIST = wmaker.inst.in bughint wm-oldmenu2new wsetfont directjpeg.c \
|
||||||
wkdemenu.pl
|
wkdemenu.pl
|
||||||
|
|
||||||
INCLUDES = @DFLAGS@ -I$(top_srcdir)/wrlib @HEADER_SEARCH_PATH@
|
INCLUDES = @DFLAGS@ -I$(top_srcdir)/WINGs -I$(top_srcdir)/wrlib @HEADER_SEARCH_PATH@
|
||||||
|
|
||||||
# X_EXTRA_LIBS is for libproplist in systems that need -lsocket
|
# X_EXTRA_LIBS is for libproplist in systems that need -lsocket
|
||||||
liblist= @LIBRARY_SEARCH_PATH@ @LIBPL@ @X_EXTRA_LIBS@
|
liblist= @LIBRARY_SEARCH_PATH@ @LIBPL@ @X_EXTRA_LIBS@
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ bin_SCRIPTS = wmaker.inst wm-oldmenu2new wsetfont wkdemenu.pl
|
|||||||
EXTRA_DIST = wmaker.inst.in bughint wm-oldmenu2new wsetfont directjpeg.c wkdemenu.pl
|
EXTRA_DIST = wmaker.inst.in bughint wm-oldmenu2new wsetfont directjpeg.c wkdemenu.pl
|
||||||
|
|
||||||
|
|
||||||
INCLUDES = @DFLAGS@ -I$(top_srcdir)/wrlib @HEADER_SEARCH_PATH@
|
INCLUDES = @DFLAGS@ -I$(top_srcdir)/WINGs -I$(top_srcdir)/wrlib @HEADER_SEARCH_PATH@
|
||||||
|
|
||||||
# X_EXTRA_LIBS is for libproplist in systems that need -lsocket
|
# X_EXTRA_LIBS is for libproplist in systems that need -lsocket
|
||||||
liblist = @LIBRARY_SEARCH_PATH@ @LIBPL@ @X_EXTRA_LIBS@
|
liblist = @LIBRARY_SEARCH_PATH@ @LIBPL@ @X_EXTRA_LIBS@
|
||||||
|
|||||||
@@ -374,7 +374,6 @@ main(int argc, char **argv)
|
|||||||
int i;
|
int i;
|
||||||
int ignoreCount = 0;
|
int ignoreCount = 0;
|
||||||
char *ignoreList[MAX_OPTIONS];
|
char *ignoreList[MAX_OPTIONS];
|
||||||
int format = 0;
|
|
||||||
|
|
||||||
dpy = XOpenDisplay("");
|
dpy = XOpenDisplay("");
|
||||||
|
|
||||||
|
|||||||
@@ -46,9 +46,8 @@
|
|||||||
|
|
||||||
#include "../src/wconfig.h"
|
#include "../src/wconfig.h"
|
||||||
|
|
||||||
#include "../WINGs/WINGs.h"
|
#include <WINGs.h>
|
||||||
#include "../WINGs/WUtil.h"
|
#include <wraster.h>
|
||||||
#include "../wrlib/wraster.h"
|
|
||||||
|
|
||||||
#include <proplist.h>
|
#include <proplist.h>
|
||||||
|
|
||||||
@@ -529,7 +528,6 @@ parseTexture(RContext *rc, char *text)
|
|||||||
|
|
||||||
image = loadImage(rc, file);
|
image = loadImage(rc, file);
|
||||||
if (!image) {
|
if (!image) {
|
||||||
RDestroyImage(gradient);
|
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -557,7 +555,8 @@ parseTexture(RContext *rc, char *text)
|
|||||||
if (!gradient) {
|
if (!gradient) {
|
||||||
wwarning("could not render texture:%s",
|
wwarning("could not render texture:%s",
|
||||||
RMessageForError(RErrorCode));
|
RMessageForError(RErrorCode));
|
||||||
RDestroyImage(gradient);
|
RDestroyImage(gradient);
|
||||||
|
RDestroyImage(image);
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -577,7 +576,7 @@ parseTexture(RContext *rc, char *text)
|
|||||||
if (!RConvertImage(rc, tiled, &pixmap)) {
|
if (!RConvertImage(rc, tiled, &pixmap)) {
|
||||||
wwarning("could not convert texture:%s",
|
wwarning("could not convert texture:%s",
|
||||||
RMessageForError(RErrorCode));
|
RMessageForError(RErrorCode));
|
||||||
RDestroyImage(image);
|
RDestroyImage(tiled);
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
texture->width = tiled->width;
|
texture->width = tiled->width;
|
||||||
|
|||||||
Reference in New Issue
Block a user