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)
|
||||
|
||||
|
||||
EXTRA_DIST = logo.xpm
|
||||
EXTRA_DIST = logo.xpm BUGS
|
||||
|
||||
# wbutton.c
|
||||
libWINGs_a_SOURCES = \
|
||||
|
||||
@@ -140,7 +140,7 @@ wmquery_SOURCES = wmquery.c
|
||||
|
||||
wmquery_LDADD = libWINGs.a $(LIBLIST)
|
||||
|
||||
EXTRA_DIST = logo.xpm
|
||||
EXTRA_DIST = logo.xpm BUGS
|
||||
|
||||
# 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
|
||||
|
||||
@@ -543,6 +543,14 @@ WMHandlerID WMAddInputHandler(int fd, int condition, WMInputProc *proc,
|
||||
|
||||
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,
|
||||
|
||||
@@ -44,7 +44,7 @@ observer2(void *data, WMNotification *notification)
|
||||
|
||||
|
||||
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
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); \
|
||||
WMRunAlertPanel(WMWidgetScreen(panel->win), panel->win, \
|
||||
"Error", err_str, "OK", NULL, NULL);
|
||||
|
||||
static void
|
||||
showError(WMScreen *scr, WMWindow *owner, char *s, char *file)
|
||||
{
|
||||
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
|
||||
deleteFile(WMButton *bPre, WMFilePanel *panel)
|
||||
{
|
||||
WMScreen *scr = WMWidgetScreen(panel->win);
|
||||
char *file;
|
||||
char *buffer;
|
||||
char *err_str;
|
||||
|
||||
WMFilePanel *deletePanel;
|
||||
|
||||
file = getCurrentFileName(panel);
|
||||
if (file[strlen(file)-1] == '/') {
|
||||
ERROR_PANEL("%s is a directory.");
|
||||
free(err_str);
|
||||
showError(scr, panel->win, "%s is a directory.", file);
|
||||
free(file);
|
||||
return;
|
||||
}
|
||||
buffer = wmalloc(strlen(file)+15);
|
||||
sprintf(buffer,"Delete file %s ?\x0",file);
|
||||
buffer = wmalloc(strlen(file)+16);
|
||||
sprintf(buffer,"Delete file %s ?",file);
|
||||
if (!WMRunAlertPanel(WMWidgetScreen(panel->win), panel->win,
|
||||
"Warning", buffer, "OK", "Cancel", NULL)) {
|
||||
int rem_stat;
|
||||
if (rem_stat = remove(file)) {
|
||||
if (remove(file) != 0) {
|
||||
switch (errno) {
|
||||
case EISDIR:
|
||||
ERROR_PANEL("%s is a directory.");
|
||||
showError(scr, panel->win, "'%s' is a directory.", file);
|
||||
break;
|
||||
case ENOENT:
|
||||
ERROR_PANEL("%s does not exist.");
|
||||
showError(scr, panel->win, "'%s' does not exist.", file);
|
||||
break;
|
||||
case EACCES:
|
||||
ERROR_PANEL("Permission denied.");
|
||||
showError(scr, panel->win, "Permission denied.", NULL);
|
||||
break;
|
||||
case ENOMEM:
|
||||
ERROR_PANEL("Insufficient kernel memory was available.");
|
||||
showError(scr, panel->win,
|
||||
"Insufficient memory available.", NULL);
|
||||
break;
|
||||
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;
|
||||
default:
|
||||
ERROR_PANEL("Can not delete %s.");
|
||||
showError(scr, panel->win, "Can not delete '%s'.", file);
|
||||
}
|
||||
free(err_str);
|
||||
}
|
||||
else {
|
||||
char *s = strrchr(file,'/');
|
||||
char *s = strrchr(file, '/');
|
||||
if (s) s[1] = 0;
|
||||
WMSetFilePanelDirectory(panel, file);
|
||||
}
|
||||
@@ -652,20 +661,18 @@ deleteFile(WMButton *bPre, WMFilePanel *panel)
|
||||
free(file);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
goFloppy(WMButton *bPtr, WMFilePanel *panel)
|
||||
{
|
||||
char *file, *err_str;
|
||||
WMScreen *scr = WMWidgetScreen(panel->win);
|
||||
struct stat filestat;
|
||||
|
||||
/* home is statically allocated. Don't free it! */
|
||||
if (stat("/floppy",&filestat)) {
|
||||
ERROR_PANEL("An error occured browsing /floppy.");
|
||||
free(err_str);
|
||||
if (stat("/floppy", &filestat)) {
|
||||
showError(scr, panel->win, "An error occured browsing /floppy.", NULL);
|
||||
return;
|
||||
} else if (!S_ISDIR(filestat.st_mode)) {
|
||||
ERROR_PANEL("/floppy is not a directory.");
|
||||
free(err_str);
|
||||
showError(scr, panel->win, "/floppy is not a directory.", NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -182,7 +182,7 @@ requestHandler(WMWidget *w, Atom selection, Atom target, Atom *type,
|
||||
void **value, unsigned *length, int *format)
|
||||
{
|
||||
TextField *tPtr = w;
|
||||
int count,count2;
|
||||
int count;
|
||||
Display *dpy = tPtr->view->screen->display;
|
||||
Atom _TARGETS;
|
||||
char *text;
|
||||
@@ -952,7 +952,9 @@ handleTextFieldKeyPress(TextField *tPtr, XEvent *event)
|
||||
*/
|
||||
switch (ksym) {
|
||||
case XK_Tab:
|
||||
#ifdef XK_ISO_Left_Tab
|
||||
case XK_ISO_Left_Tab:
|
||||
#endif
|
||||
if (event->xkey.state & ShiftMask) {
|
||||
if (tPtr->view->prevFocusChain) {
|
||||
W_SetFocusOfTopLevel(W_TopLevelOfView(tPtr->view),
|
||||
|
||||
@@ -161,7 +161,6 @@ static void
|
||||
createPanel(Panel *p)
|
||||
{
|
||||
_Panel *panel = (_Panel*)p;
|
||||
WMScreen *scr = WMWidgetScreen(panel->win);
|
||||
|
||||
panel->frame = WMCreateFrame(panel->win);
|
||||
WMResizeWidget(panel->frame, FRAME_WIDTH, FRAME_HEIGHT);
|
||||
|
||||
@@ -100,7 +100,7 @@ bin_PROGRAMS = wmaker
|
||||
|
||||
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)\"
|
||||
|
||||
@@ -505,7 +505,7 @@ omnipresentCallback(WMenu *menu, WMenuEntry *entry)
|
||||
}
|
||||
|
||||
if (failed > 1) {
|
||||
wMessageDialog(aicon->icon->core->screen_ptr, _("Warning"),
|
||||
wMessageDialog(dock->screen_ptr, _("Warning"),
|
||||
_("Some icons cannot be made omnipresent. "
|
||||
"Please make sure that no other icon is "
|
||||
"docked in the same positions on the other "
|
||||
@@ -513,7 +513,7 @@ omnipresentCallback(WMenu *menu, WMenuEntry *entry)
|
||||
"some workspace."),
|
||||
_("OK"), NULL, NULL);
|
||||
} else if (failed == 1) {
|
||||
wMessageDialog(aicon->icon->core->screen_ptr, _("Warning"),
|
||||
wMessageDialog(dock->screen_ptr, _("Warning"),
|
||||
_("Icon cannot be made omnipresent. "
|
||||
"Please make sure that no other icon is "
|
||||
"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 \
|
||||
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
|
||||
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
|
||||
|
||||
|
||||
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
|
||||
liblist = @LIBRARY_SEARCH_PATH@ @LIBPL@ @X_EXTRA_LIBS@
|
||||
|
||||
@@ -374,7 +374,6 @@ main(int argc, char **argv)
|
||||
int i;
|
||||
int ignoreCount = 0;
|
||||
char *ignoreList[MAX_OPTIONS];
|
||||
int format = 0;
|
||||
|
||||
dpy = XOpenDisplay("");
|
||||
|
||||
|
||||
@@ -46,9 +46,8 @@
|
||||
|
||||
#include "../src/wconfig.h"
|
||||
|
||||
#include "../WINGs/WINGs.h"
|
||||
#include "../WINGs/WUtil.h"
|
||||
#include "../wrlib/wraster.h"
|
||||
#include <WINGs.h>
|
||||
#include <wraster.h>
|
||||
|
||||
#include <proplist.h>
|
||||
|
||||
@@ -529,7 +528,6 @@ parseTexture(RContext *rc, char *text)
|
||||
|
||||
image = loadImage(rc, file);
|
||||
if (!image) {
|
||||
RDestroyImage(gradient);
|
||||
goto error;
|
||||
}
|
||||
|
||||
@@ -557,7 +555,8 @@ parseTexture(RContext *rc, char *text)
|
||||
if (!gradient) {
|
||||
wwarning("could not render texture:%s",
|
||||
RMessageForError(RErrorCode));
|
||||
RDestroyImage(gradient);
|
||||
RDestroyImage(gradient);
|
||||
RDestroyImage(image);
|
||||
goto error;
|
||||
}
|
||||
|
||||
@@ -577,7 +576,7 @@ parseTexture(RContext *rc, char *text)
|
||||
if (!RConvertImage(rc, tiled, &pixmap)) {
|
||||
wwarning("could not convert texture:%s",
|
||||
RMessageForError(RErrorCode));
|
||||
RDestroyImage(image);
|
||||
RDestroyImage(tiled);
|
||||
goto error;
|
||||
}
|
||||
texture->width = tiled->width;
|
||||
|
||||
Reference in New Issue
Block a user