mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 12:28:22 +01:00
fixed crash bug on startup
added paste-launch on dock
This commit is contained in:
@@ -5,11 +5,17 @@ Changes since version 0.65.1:
|
|||||||
- Fixed some more bash specific constructs in wsetfont.
|
- Fixed some more bash specific constructs in wsetfont.
|
||||||
(Marcelo E. Magallon <marcelo.magallon@bigfoot.com>)
|
(Marcelo E. Magallon <marcelo.magallon@bigfoot.com>)
|
||||||
- fixed crash with broken apps that set null WM_CLASS
|
- fixed crash with broken apps that set null WM_CLASS
|
||||||
|
- fixed crash when with gnome panel and multi-screens, some menu
|
||||||
|
updates and applied various other patches from
|
||||||
|
(Crutcher Dunnavant <crutcher@redhat.com>)
|
||||||
|
- po file fixes (Crutcher Dunnavant <crutcher@redhat.com>)
|
||||||
- replaced I18N_MB with I18N in one place in src/wconfig.h.in
|
- replaced I18N_MB with I18N in one place in src/wconfig.h.in
|
||||||
- fixed default clip title font in WindowMaker.in
|
- fixed default clip title font in WindowMaker.in
|
||||||
- fixed some locale related problems (Yukihiro Nakai <ynakai@redhat.com>)
|
- fixed some locale related problems (Yukihiro Nakai <ynakai@redhat.com>)
|
||||||
- fixed a bug in RCombineAreaWithOpaqueness() (Brad <lists@anomie.yi.org>)
|
- fixed a bug in RCombineAreaWithOpaqueness() (Brad <lists@anomie.yi.org>)
|
||||||
- added spanish INSTALL file (Efrain Maximiliano Palermo <max_drake2001@yahoo.com.ar>)
|
- added spanish INSTALL file (Efrain Maximiliano Palermo <max_drake2001@yahoo.com.ar>)
|
||||||
|
- updated Finnish pots (Tomi Kajala <tomi@iki.fi>)
|
||||||
|
- copy/paste launching in Dock
|
||||||
|
|
||||||
Changes since version 0.65.0:
|
Changes since version 0.65.0:
|
||||||
.............................
|
.............................
|
||||||
|
|||||||
11
NEWS
11
NEWS
@@ -2,11 +2,22 @@
|
|||||||
NEWS for veteran Window Maker users
|
NEWS for veteran Window Maker users
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
|
|
||||||
|
--- 0.66.0
|
||||||
|
|
||||||
|
Copy/paste launch in dock. For example, put
|
||||||
|
netscape %s in the Docked icon for Netscape,
|
||||||
|
select an url somewhere and then middle-click the icon.
|
||||||
|
The command will be launched with the "pasted" string.
|
||||||
|
|
||||||
|
|
||||||
|
--- 0.65.1
|
||||||
|
|
||||||
Removed FocusFollowMouse option, only SloppyFocus present now.
|
Removed FocusFollowMouse option, only SloppyFocus present now.
|
||||||
|
|
||||||
Added None option to MoveDisplay and ResizeDisplay
|
Added None option to MoveDisplay and ResizeDisplay
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--- 0.65.0
|
--- 0.65.0
|
||||||
|
|
||||||
Single AppIcon
|
Single AppIcon
|
||||||
|
|||||||
22
README
22
README
@@ -376,25 +376,3 @@ can be found in po/README and Window Maker/README
|
|||||||
If you have any comments, fixes and bug reports (filled BUGFORMs) send them
|
If you have any comments, fixes and bug reports (filled BUGFORMs) send them
|
||||||
to developers@windowmaker.org
|
to developers@windowmaker.org
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Musicware
|
|
||||||
=========
|
|
||||||
|
|
||||||
If you use Window Maker and *really* like it, please consider making my day
|
|
||||||
by sending me a music CD (or a MiniDisc or even a MP3 CDR) of your favorite
|
|
||||||
band, singer, instrumentist, composer or whatever :^). I like listening to
|
|
||||||
music and would love to get new CDs, especially from other parts of the
|
|
||||||
world. I like almost any kind of music, from Ozzy Osbourne to Bach (mas não
|
|
||||||
pagode e sertanejo pelamordideus :), so I will be happy to receive just about
|
|
||||||
anything.
|
|
||||||
|
|
||||||
Snail mail address:
|
|
||||||
|
|
||||||
Alfredo Kengi Kojima
|
|
||||||
Rua Firmino O. Bimbi, 255/25B
|
|
||||||
Porto Alegre - RS
|
|
||||||
CEP 91751-330
|
|
||||||
Brazil
|
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,9 @@ LDADD= libWINGs.a $(top_builddir)/wrlib/libwraster.la @LIBPL@ @INTLIBS@
|
|||||||
|
|
||||||
EXTRA_DIST = BUGS
|
EXTRA_DIST = BUGS
|
||||||
|
|
||||||
|
wingsincludedir = $(includedir)/WINGs
|
||||||
|
wingsinclude_HEADERS = WINGs.h WUtil.h WINGsP.h
|
||||||
|
|
||||||
# wbutton.c
|
# wbutton.c
|
||||||
libWINGs_a_SOURCES = \
|
libWINGs_a_SOURCES = \
|
||||||
array.c \
|
array.c \
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
SystemFont = "-*-helvetica-medium-r-normal-*-%d-*-*-*-*-*-*-*";
|
SystemFont = "-*-helvetica-medium-r-normal-*-%d-*-*-*-*-*-*-*,-*-*-medium-r-normal-*-%d-*,-*-*-medium-r-normal-*-*-*";
|
||||||
BoldSystemFont = "-*-helvetica-bold-r-normal-*-%d-*-*-*-*-*-*-*";
|
BoldSystemFont = "-*-helvetica-bold-r-normal-*-%d-*-*-*-*-*-*-*,-*-*-bold-r-normal-*-%d-*,-*-*-medium-r-normal-*-*-*";
|
||||||
FloppyPath = "/floppy";
|
FloppyPath = "/floppy";
|
||||||
MultiByteText = AUTO;
|
MultiByteText = AUTO;
|
||||||
DoubleClickTime = 250;
|
DoubleClickTime = 250;
|
||||||
|
|||||||
@@ -104,12 +104,13 @@
|
|||||||
ConstrainWindowSize = NO;
|
ConstrainWindowSize = NO;
|
||||||
ClipRaiseLowerKey = None;
|
ClipRaiseLowerKey = None;
|
||||||
TitleJustify = center;
|
TitleJustify = center;
|
||||||
WindowTitleFont = "-*-helvetica-bold-r-normal-*-12-*-*-*-*-*-*-*";
|
WindowTitleFont = "-*-helvetica-bold-r-normal-*-12-*-*-*-*-*-*-*,-*-*-medium-r-normal-*-14-*,-*-*-medium-r-normal-*-*-*";
|
||||||
MenuTitleFont = "-*-helvetica-bold-r-normal-*-12-*-*-*-*-*-*-*";
|
MenuTitleFont = "-*-helvetica-bold-r-normal-*-12-*-*-*-*-*-*-*,-*-*-medium-r-normal-*-14-*,-*-*-medium-r-normal-*-*-*";
|
||||||
MenuTextFont = "-*-helvetica-medium-r-normal-*-12-*-*-*-*-*-*-*";
|
MenuTextFont = "-*-helvetica-medium-r-normal-*-12-*-*-*-*-*-*-*,-*-*-medium-r-normal-*-14-*,-*-*-medium-r-normal-*-*-*";
|
||||||
IconTitleFont = "-*-helvetica-medium-r-normal-*-8-*-*-*-*-*-*-*";
|
IconTitleFont = "-*-helvetica-medium-r-normal-*-8-*-*-*-*-*-*-*,-*-*-medium-r-normal-*-12-*,-*-*-medium-r-normal-*-*-*";
|
||||||
ClipTitleFont = "-*-helvetica-bold-r-normal-*-10-*-*-*-*-*-*-*";
|
ClipTitleFont = "-*-helvetica-bold-r-normal-*-10-*-*-*-*-*-*-*,-*-*-medium-r-normal-*-12-*,-*-*-medium-r-normal-*-*-*";
|
||||||
DisplayFont = "-*-helvetica-medium-r-normal-*-12-*-*-*-*-*-*-*";
|
DisplayFont = "-*-helvetica-medium-r-normal-*-12-*-*-*-*-*-*-*,-*-*-medium-r-normal-*-14-*,-*-*-medium-r-normal-*-*-*";
|
||||||
|
LargeDisplayFont = "-*-helvetica-medium-r-*-*-24-*-*-*-*-*-*-*,-*-*-medium-r-*--24-*-*-*-*-*-*-*,-*-*-medium-r-normal-*-*-*";
|
||||||
HighlightColor = white;
|
HighlightColor = white;
|
||||||
HighlightTextColor = black;
|
HighlightTextColor = black;
|
||||||
ClipTitleColor = black;
|
ClipTitleColor = black;
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ prefsdata_DATA =\
|
|||||||
plmenu.ro\
|
plmenu.ro\
|
||||||
plmenu.sk\
|
plmenu.sk\
|
||||||
plmenu.zh_CN\
|
plmenu.zh_CN\
|
||||||
|
plmenu.zh_TW.Big5\
|
||||||
wmmacros\
|
wmmacros\
|
||||||
xtree.dat
|
xtree.dat
|
||||||
|
|
||||||
|
|||||||
@@ -50,6 +50,8 @@ typedef struct WAppIcon {
|
|||||||
/* dropped on us */
|
/* dropped on us */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
char *paste_command; /* command to run when something is pasted */
|
||||||
|
|
||||||
char *wm_class;
|
char *wm_class;
|
||||||
char *wm_instance;
|
char *wm_instance;
|
||||||
pid_t pid; /* for apps launched from the dock */
|
pid_t pid; /* for apps launched from the dock */
|
||||||
@@ -73,6 +75,7 @@ typedef struct WAppIcon {
|
|||||||
unsigned int updated:1;
|
unsigned int updated:1;
|
||||||
unsigned int editing:1; /* editing docked icon */
|
unsigned int editing:1; /* editing docked icon */
|
||||||
unsigned int drop_launch:1; /* launching from drop action */
|
unsigned int drop_launch:1; /* launching from drop action */
|
||||||
|
unsigned int paste_launch:1; /* launching from paste action */
|
||||||
unsigned int destroyed:1; /* appicon was destroyed */
|
unsigned int destroyed:1; /* appicon was destroyed */
|
||||||
unsigned int buggy_app:1; /* do not make dock rely on hints
|
unsigned int buggy_app:1; /* do not make dock rely on hints
|
||||||
* set by app */
|
* set by app */
|
||||||
|
|||||||
78
src/dock.c
78
src/dock.c
@@ -98,6 +98,7 @@ extern void appIconMouseDown(WObjDescriptor *desc, XEvent *event);
|
|||||||
/***** Local variables ****/
|
/***** Local variables ****/
|
||||||
|
|
||||||
static proplist_t dCommand=NULL;
|
static proplist_t dCommand=NULL;
|
||||||
|
static proplist_t dPasteCommand=NULL;
|
||||||
#ifdef OFFIX_DND
|
#ifdef OFFIX_DND
|
||||||
static proplist_t dDropCommand=NULL;
|
static proplist_t dDropCommand=NULL;
|
||||||
#endif
|
#endif
|
||||||
@@ -136,7 +137,7 @@ static void clipEnterNotify(WObjDescriptor *desc, XEvent *event);
|
|||||||
static void clipLeaveNotify(WObjDescriptor *desc, XEvent *event);
|
static void clipLeaveNotify(WObjDescriptor *desc, XEvent *event);
|
||||||
static void clipAutoCollapse(void *cdata);
|
static void clipAutoCollapse(void *cdata);
|
||||||
static void clipAutoExpand(void *cdata);
|
static void clipAutoExpand(void *cdata);
|
||||||
static void launchDockedApplication(WAppIcon *btn);
|
static void launchDockedApplication(WAppIcon *btn, Bool withSelection);
|
||||||
|
|
||||||
static void clipAutoLower(void *cdata);
|
static void clipAutoLower(void *cdata);
|
||||||
static void clipAutoRaise(void *cdata);
|
static void clipAutoRaise(void *cdata);
|
||||||
@@ -168,9 +169,8 @@ make_keys()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
dCommand = PLRetain(PLMakeString("Command"));
|
dCommand = PLRetain(PLMakeString("Command"));
|
||||||
#ifdef OFFIX_DND
|
dPasteCommand = PLRetain(PLMakeString("PasteCommand"));
|
||||||
dDropCommand = PLRetain(PLMakeString("DropCommand"));
|
dDropCommand = PLRetain(PLMakeString("DropCommand"));
|
||||||
#endif
|
|
||||||
dLock = PLRetain(PLMakeString("Lock"));
|
dLock = PLRetain(PLMakeString("Lock"));
|
||||||
dAutoLaunch = PLRetain(PLMakeString("AutoLaunch"));
|
dAutoLaunch = PLRetain(PLMakeString("AutoLaunch"));
|
||||||
dName = PLRetain(PLMakeString("Name"));
|
dName = PLRetain(PLMakeString("Name"));
|
||||||
@@ -771,7 +771,7 @@ launchCallback(WMenu *menu, WMenuEntry *entry)
|
|||||||
{
|
{
|
||||||
WAppIcon *btn = (WAppIcon*)entry->clientdata;
|
WAppIcon *btn = (WAppIcon*)entry->clientdata;
|
||||||
|
|
||||||
launchDockedApplication(btn);
|
launchDockedApplication(btn, False);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -890,11 +890,13 @@ switchWSCommand(WMenu *menu, WMenuEntry *entry)
|
|||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
launchDockedApplication(WAppIcon *btn)
|
launchDockedApplication(WAppIcon *btn, Bool withSelection)
|
||||||
{
|
{
|
||||||
WScreen *scr = btn->icon->core->screen_ptr;
|
WScreen *scr = btn->icon->core->screen_ptr;
|
||||||
|
|
||||||
if (!btn->launching && btn->command!=NULL) {
|
if (!btn->launching &&
|
||||||
|
((!withSelection && btn->command!=NULL) ||
|
||||||
|
(withSelection && btn->paste_command!=NULL))) {
|
||||||
if (!btn->forced_dock) {
|
if (!btn->forced_dock) {
|
||||||
btn->relaunching = btn->running;
|
btn->relaunching = btn->running;
|
||||||
btn->running = 1;
|
btn->running = 1;
|
||||||
@@ -911,8 +913,11 @@ launchDockedApplication(WAppIcon *btn)
|
|||||||
btn->running = 0;
|
btn->running = 0;
|
||||||
}
|
}
|
||||||
btn->drop_launch = 0;
|
btn->drop_launch = 0;
|
||||||
|
btn->paste_launch = withSelection;
|
||||||
scr->last_dock = btn->dock;
|
scr->last_dock = btn->dock;
|
||||||
btn->pid = execCommand(btn, btn->command, NULL);
|
btn->pid = execCommand(btn,
|
||||||
|
withSelection ? btn->paste_command : btn->command,
|
||||||
|
NULL);
|
||||||
if (btn->pid>0) {
|
if (btn->pid>0) {
|
||||||
if (btn->buggy_app) {
|
if (btn->buggy_app) {
|
||||||
/* give feedback that the app was launched */
|
/* give feedback that the app was launched */
|
||||||
@@ -1361,6 +1366,12 @@ make_icon_state(WAppIcon *btn)
|
|||||||
PLRelease(command);
|
PLRelease(command);
|
||||||
}
|
}
|
||||||
#endif /* OFFIX_DND */
|
#endif /* OFFIX_DND */
|
||||||
|
|
||||||
|
if (btn->paste_command) {
|
||||||
|
command = PLMakeString(btn->paste_command);
|
||||||
|
PLInsertDictionaryEntry(node, dPasteCommand, command);
|
||||||
|
PLRelease(command);
|
||||||
|
}
|
||||||
|
|
||||||
if (btn->client_machine && btn->remote_start) {
|
if (btn->client_machine && btn->remote_start) {
|
||||||
host = PLMakeString(btn->client_machine);
|
host = PLMakeString(btn->client_machine);
|
||||||
@@ -1578,6 +1589,10 @@ restore_icon_state(WScreen *scr, proplist_t info, int type, int index)
|
|||||||
if (cmd)
|
if (cmd)
|
||||||
aicon->dnd_command = wstrdup(PLGetString(cmd));
|
aicon->dnd_command = wstrdup(PLGetString(cmd));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
cmd = PLGetDictionaryEntry(info, dPasteCommand);
|
||||||
|
if (cmd)
|
||||||
|
aicon->paste_command = wstrdup(PLGetString(cmd));
|
||||||
|
|
||||||
/* check auto launch */
|
/* check auto launch */
|
||||||
value = PLGetDictionaryEntry(info, dAutoLaunch);
|
value = PLGetDictionaryEntry(info, dAutoLaunch);
|
||||||
@@ -1679,6 +1694,10 @@ wClipRestoreState(WScreen *scr, proplist_t clip_state)
|
|||||||
if (value && PLIsString(value))
|
if (value && PLIsString(value))
|
||||||
icon->dnd_command = wstrdup(PLGetString(value));
|
icon->dnd_command = wstrdup(PLGetString(value));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
value = PLGetDictionaryEntry(clip_state, dPasteCommand);
|
||||||
|
if (value && PLIsString(value))
|
||||||
|
icon->paste_command = wstrdup(PLGetString(value));
|
||||||
|
|
||||||
PLRelease(clip_state);
|
PLRelease(clip_state);
|
||||||
|
|
||||||
@@ -1930,6 +1949,7 @@ wDockLaunchWithState(WDock *dock, WAppIcon *btn, WSavedState *state)
|
|||||||
if (btn && btn->command && !btn->running && !btn->launching) {
|
if (btn && btn->command && !btn->running && !btn->launching) {
|
||||||
|
|
||||||
btn->drop_launch = 0;
|
btn->drop_launch = 0;
|
||||||
|
btn->paste_launch = 0;
|
||||||
|
|
||||||
btn->pid = execCommand(btn, btn->command, state);
|
btn->pid = execCommand(btn, btn->command, state);
|
||||||
|
|
||||||
@@ -2040,6 +2060,7 @@ wDockReceiveDNDDrop(WScreen *scr, XEvent *event)
|
|||||||
btn->running = 0;
|
btn->running = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
btn->paste_launch = 0;
|
||||||
btn->drop_launch = 1;
|
btn->drop_launch = 1;
|
||||||
scr->last_dock = dock;
|
scr->last_dock = dock;
|
||||||
btn->pid = execCommand(btn, btn->dnd_command, NULL);
|
btn->pid = execCommand(btn, btn->dnd_command, NULL);
|
||||||
@@ -2159,6 +2180,12 @@ wDockAttachIcon(WDock *dock, WAppIcon *icon, int x, int y)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (icon->command && !icon->paste_command) {
|
||||||
|
int len = strlen(icon->command)+8;
|
||||||
|
icon->paste_command = wmalloc(len);
|
||||||
|
snprintf(icon->paste_command, len, "%s %%s", icon->command);
|
||||||
|
}
|
||||||
|
|
||||||
return True;
|
return True;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2337,6 +2364,10 @@ wDockDetach(WDock *dock, WAppIcon *icon)
|
|||||||
icon->dnd_command = NULL;
|
icon->dnd_command = NULL;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
if (icon->paste_command) {
|
||||||
|
wfree(icon->paste_command);
|
||||||
|
icon->paste_command = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
for (index=1; index<dock->max_icons; index++)
|
for (index=1; index<dock->max_icons; index++)
|
||||||
if (dock->icon_array[index] == icon)
|
if (dock->icon_array[index] == icon)
|
||||||
@@ -2936,9 +2967,7 @@ execCommand(WAppIcon *btn, char *command, WSavedState *state)
|
|||||||
execvp(argv[0], args);
|
execvp(argv[0], args);
|
||||||
exit(111);
|
exit(111);
|
||||||
}
|
}
|
||||||
while (argc > 0)
|
wtokenfree(argv, argc);
|
||||||
wfree(argv[--argc]);
|
|
||||||
wfree(argv);
|
|
||||||
|
|
||||||
if (pid > 0) {
|
if (pid > 0) {
|
||||||
if (!state) {
|
if (!state) {
|
||||||
@@ -3233,14 +3262,17 @@ trackDeadProcess(pid_t pid, unsigned char status, WDock *dock)
|
|||||||
icon->pid = 0;
|
icon->pid = 0;
|
||||||
if (status==111) {
|
if (status==111) {
|
||||||
char msg[PATH_MAX];
|
char msg[PATH_MAX];
|
||||||
#ifdef OFFIX_DND
|
|
||||||
snprintf(msg, sizeof(msg), _("Could not execute command \"%s\""),
|
if (icon->drop_launch)
|
||||||
icon->drop_launch && icon->dnd_command
|
snprintf(msg, sizeof(msg), _("Could not execute command \"%s\""),
|
||||||
? icon->dnd_command : icon->command);
|
icon->dnd_command);
|
||||||
#else
|
else if (icon->paste_launch)
|
||||||
snprintf(msg, sizeof(msg), _("Could not execute command \"%s\""),
|
snprintf(msg, sizeof(msg), _("Could not execute command \"%s\""),
|
||||||
icon->command);
|
icon->paste_command);
|
||||||
#endif
|
else
|
||||||
|
snprintf(msg, sizeof(msg), _("Could not execute command \"%s\""),
|
||||||
|
icon->command);
|
||||||
|
|
||||||
wMessageDialog(dock->screen_ptr, _("Error"), msg,
|
wMessageDialog(dock->screen_ptr, _("Error"), msg,
|
||||||
_("OK"), NULL, NULL);
|
_("OK"), NULL, NULL);
|
||||||
}
|
}
|
||||||
@@ -3506,7 +3538,7 @@ iconDblClick(WObjDescriptor *desc, XEvent *event)
|
|||||||
} else if (btn->command) {
|
} else if (btn->command) {
|
||||||
if (!btn->launching &&
|
if (!btn->launching &&
|
||||||
(!btn->running || (event->xbutton.state & ControlMask))) {
|
(!btn->running || (event->xbutton.state & ControlMask))) {
|
||||||
launchDockedApplication(btn);
|
launchDockedApplication(btn, False);
|
||||||
}
|
}
|
||||||
} else if (btn->xindex == 0 && btn->yindex == 0
|
} else if (btn->xindex == 0 && btn->yindex == 0
|
||||||
&& btn->dock->type == WM_DOCK) {
|
&& btn->dock->type == WM_DOCK) {
|
||||||
@@ -3518,6 +3550,7 @@ iconDblClick(WObjDescriptor *desc, XEvent *event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
handleDockMove(WDock *dock, WAppIcon *aicon, XEvent *event)
|
handleDockMove(WDock *dock, WAppIcon *aicon, XEvent *event)
|
||||||
{
|
{
|
||||||
@@ -4076,6 +4109,13 @@ iconMouseDown(WObjDescriptor *desc, XEvent *event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
openDockMenu(dock, aicon, event);
|
openDockMenu(dock, aicon, event);
|
||||||
|
} else if (event->xbutton.button == Button2) {
|
||||||
|
WAppIcon *btn = desc->parent;
|
||||||
|
|
||||||
|
if (!btn->launching &&
|
||||||
|
(!btn->running || (event->xbutton.state & ControlMask))) {
|
||||||
|
launchDockedApplication(btn, True);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
119
src/dockedapp.c
119
src/dockedapp.c
@@ -61,6 +61,10 @@ typedef struct _AppSettingsPanel {
|
|||||||
WMTextField *dndCommandField;
|
WMTextField *dndCommandField;
|
||||||
WMLabel *dndCommandLabel;
|
WMLabel *dndCommandLabel;
|
||||||
|
|
||||||
|
WMFrame *pasteCommandFrame;
|
||||||
|
WMTextField *pasteCommandField;
|
||||||
|
WMLabel *pasteCommandLabel;
|
||||||
|
|
||||||
WMFrame *iconFrame;
|
WMFrame *iconFrame;
|
||||||
WMTextField *iconField;
|
WMTextField *iconField;
|
||||||
WMButton *browseBtn;
|
WMButton *browseBtn;
|
||||||
@@ -100,6 +104,20 @@ updateCommand(WAppIcon *icon, char *command)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
updatePasteCommand(WAppIcon *icon, char *command)
|
||||||
|
{
|
||||||
|
if (icon->paste_command)
|
||||||
|
wfree(icon->paste_command);
|
||||||
|
if (command && (command[0]==0 || (command[0]=='-' && command[1]==0))) {
|
||||||
|
wfree(command);
|
||||||
|
command = NULL;
|
||||||
|
}
|
||||||
|
icon->paste_command = command;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef OFFIX_DND
|
#ifdef OFFIX_DND
|
||||||
static void
|
static void
|
||||||
updateDNDCommand(WAppIcon *icon, char *command)
|
updateDNDCommand(WAppIcon *icon, char *command)
|
||||||
@@ -245,6 +263,9 @@ panelBtnCallback(WMWidget *self, void *data)
|
|||||||
text = WMGetTextFieldText(panel->dndCommandField);
|
text = WMGetTextFieldText(panel->dndCommandField);
|
||||||
updateDNDCommand(panel->editedIcon, text);
|
updateDNDCommand(panel->editedIcon, text);
|
||||||
#endif
|
#endif
|
||||||
|
text = WMGetTextFieldText(panel->pasteCommandField);
|
||||||
|
updatePasteCommand(panel->editedIcon, text);
|
||||||
|
|
||||||
|
|
||||||
panel->editedIcon->auto_launch =
|
panel->editedIcon->auto_launch =
|
||||||
WMGetButtonSelected(panel->autoLaunchBtn);
|
WMGetButtonSelected(panel->autoLaunchBtn);
|
||||||
@@ -259,7 +280,7 @@ panelBtnCallback(WMWidget *self, void *data)
|
|||||||
|
|
||||||
|
|
||||||
#define PWIDTH 295
|
#define PWIDTH 295
|
||||||
#define PHEIGHT 365
|
#define PHEIGHT 430
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -270,6 +291,7 @@ ShowDockAppSettingsPanel(WAppIcon *aicon)
|
|||||||
Window parent;
|
Window parent;
|
||||||
WMFont *font;
|
WMFont *font;
|
||||||
int x, y;
|
int x, y;
|
||||||
|
WMBox *vbox;
|
||||||
|
|
||||||
panel = wmalloc(sizeof(AppSettingsPanel));
|
panel = wmalloc(sizeof(AppSettingsPanel));
|
||||||
memset(panel, 0, sizeof(AppSettingsPanel));
|
memset(panel, 0, sizeof(AppSettingsPanel));
|
||||||
@@ -281,7 +303,7 @@ ShowDockAppSettingsPanel(WAppIcon *aicon)
|
|||||||
|
|
||||||
panel->win = WMCreateWindow(scr->wmscreen, "applicationSettings");
|
panel->win = WMCreateWindow(scr->wmscreen, "applicationSettings");
|
||||||
WMResizeWidget(panel->win, PWIDTH, PHEIGHT);
|
WMResizeWidget(panel->win, PWIDTH, PHEIGHT);
|
||||||
|
|
||||||
panel->iconLabel = WMCreateLabel(panel->win);
|
panel->iconLabel = WMCreateLabel(panel->win);
|
||||||
WMResizeWidget(panel->iconLabel, 64, 64);
|
WMResizeWidget(panel->iconLabel, 64, 64);
|
||||||
WMMoveWidget(panel->iconLabel, 10, 10);
|
WMMoveWidget(panel->iconLabel, 10, 10);
|
||||||
@@ -299,35 +321,61 @@ ShowDockAppSettingsPanel(WAppIcon *aicon)
|
|||||||
else
|
else
|
||||||
WMSetLabelText(panel->nameLabel, aicon->wm_class);
|
WMSetLabelText(panel->nameLabel, aicon->wm_class);
|
||||||
|
|
||||||
panel->autoLaunchBtn = WMCreateSwitchButton(panel->win);
|
|
||||||
WMResizeWidget(panel->autoLaunchBtn, PWIDTH-30, 20);
|
vbox = WMCreateBox(panel->win);
|
||||||
WMMoveWidget(panel->autoLaunchBtn, 15, 80);
|
WMResizeWidget(vbox, PWIDTH-20, PHEIGHT-84-10);
|
||||||
|
WMMoveWidget(vbox, 10, 84);
|
||||||
|
|
||||||
|
panel->autoLaunchBtn = WMCreateSwitchButton(vbox);
|
||||||
|
WMAddBoxSubview(vbox, WMWidgetView(panel->autoLaunchBtn), False, True,
|
||||||
|
20, 20, 2);
|
||||||
WMSetButtonText(panel->autoLaunchBtn,
|
WMSetButtonText(panel->autoLaunchBtn,
|
||||||
_("Start when Window Maker is started"));
|
_("Start when Window Maker is started"));
|
||||||
WMSetButtonSelected(panel->autoLaunchBtn, aicon->auto_launch);
|
WMSetButtonSelected(panel->autoLaunchBtn, aicon->auto_launch);
|
||||||
|
|
||||||
panel->lockBtn = WMCreateSwitchButton(panel->win);
|
panel->lockBtn = WMCreateSwitchButton(vbox);
|
||||||
WMResizeWidget(panel->lockBtn, PWIDTH-30, 20);
|
WMAddBoxSubview(vbox, WMWidgetView(panel->lockBtn), False, True,
|
||||||
WMMoveWidget(panel->lockBtn, 15, 100);
|
20, 20, 5);
|
||||||
WMSetButtonText(panel->lockBtn,
|
WMSetButtonText(panel->lockBtn,
|
||||||
_("Lock (prevent accidental removal)"));
|
_("Lock (prevent accidental removal)"));
|
||||||
WMSetButtonSelected(panel->lockBtn, aicon->lock);
|
WMSetButtonSelected(panel->lockBtn, aicon->lock);
|
||||||
|
|
||||||
panel->commandFrame = WMCreateFrame(panel->win);
|
panel->commandFrame = WMCreateFrame(vbox);
|
||||||
WMResizeWidget(panel->commandFrame, 275, 50);
|
|
||||||
WMMoveWidget(panel->commandFrame, 10, 125);
|
|
||||||
WMSetFrameTitle(panel->commandFrame, _("Application path and arguments"));
|
WMSetFrameTitle(panel->commandFrame, _("Application path and arguments"));
|
||||||
|
WMAddBoxSubview(vbox, WMWidgetView(panel->commandFrame), False, True,
|
||||||
|
50, 50, 5);
|
||||||
|
|
||||||
panel->commandField = WMCreateTextField(panel->commandFrame);
|
panel->commandField = WMCreateTextField(panel->commandFrame);
|
||||||
WMResizeWidget(panel->commandField, 256, 20);
|
WMResizeWidget(panel->commandField, 256, 20);
|
||||||
WMMoveWidget(panel->commandField, 10, 20);
|
WMMoveWidget(panel->commandField, 10, 20);
|
||||||
WMSetTextFieldText(panel->commandField, aicon->command);
|
WMSetTextFieldText(panel->commandField, aicon->command);
|
||||||
|
|
||||||
panel->dndCommandFrame = WMCreateFrame(panel->win);
|
WMMapSubwidgets(panel->commandFrame);
|
||||||
WMResizeWidget(panel->dndCommandFrame, 275, 70);
|
|
||||||
WMMoveWidget(panel->dndCommandFrame, 10, 185);
|
panel->pasteCommandFrame = WMCreateFrame(vbox);
|
||||||
|
WMSetFrameTitle(panel->pasteCommandFrame,
|
||||||
|
_("Command for middle-click launch"));
|
||||||
|
WMAddBoxSubview(vbox, WMWidgetView(panel->pasteCommandFrame), False, True,
|
||||||
|
70, 70, 5);
|
||||||
|
|
||||||
|
panel->pasteCommandField = WMCreateTextField(panel->pasteCommandFrame);
|
||||||
|
WMResizeWidget(panel->pasteCommandField, 256, 20);
|
||||||
|
WMMoveWidget(panel->pasteCommandField, 10, 20);
|
||||||
|
|
||||||
|
panel->pasteCommandLabel = WMCreateLabel(panel->pasteCommandFrame);
|
||||||
|
WMResizeWidget(panel->pasteCommandLabel, 256, 18);
|
||||||
|
WMMoveWidget(panel->pasteCommandLabel, 10, 45);
|
||||||
|
|
||||||
|
WMSetTextFieldText(panel->pasteCommandField, aicon->paste_command);
|
||||||
|
WMSetLabelText(panel->pasteCommandLabel,
|
||||||
|
_("%s will be replaced with current selection"));
|
||||||
|
WMMapSubwidgets(panel->pasteCommandFrame);
|
||||||
|
|
||||||
|
panel->dndCommandFrame = WMCreateFrame(vbox);
|
||||||
WMSetFrameTitle(panel->dndCommandFrame,
|
WMSetFrameTitle(panel->dndCommandFrame,
|
||||||
_("Command for files dropped with DND"));
|
_("Command for files dropped with DND"));
|
||||||
|
WMAddBoxSubview(vbox, WMWidgetView(panel->dndCommandFrame), False, True,
|
||||||
|
70, 70, 5);
|
||||||
|
|
||||||
panel->dndCommandField = WMCreateTextField(panel->dndCommandFrame);
|
panel->dndCommandField = WMCreateTextField(panel->dndCommandFrame);
|
||||||
WMResizeWidget(panel->dndCommandField, 256, 20);
|
WMResizeWidget(panel->dndCommandField, 256, 20);
|
||||||
@@ -345,11 +393,12 @@ ShowDockAppSettingsPanel(WAppIcon *aicon)
|
|||||||
WMSetLabelText(panel->dndCommandLabel,
|
WMSetLabelText(panel->dndCommandLabel,
|
||||||
_("DND support was not compiled in"));
|
_("DND support was not compiled in"));
|
||||||
#endif
|
#endif
|
||||||
|
WMMapSubwidgets(panel->dndCommandFrame);
|
||||||
|
|
||||||
panel->iconFrame = WMCreateFrame(panel->win);
|
panel->iconFrame = WMCreateFrame(vbox);
|
||||||
WMResizeWidget(panel->iconFrame, 275, 50);
|
|
||||||
WMMoveWidget(panel->iconFrame, 10, 265);
|
|
||||||
WMSetFrameTitle(panel->iconFrame, _("Icon Image"));
|
WMSetFrameTitle(panel->iconFrame, _("Icon Image"));
|
||||||
|
WMAddBoxSubview(vbox, WMWidgetView(panel->iconFrame), False, True,
|
||||||
|
50, 50, 10);
|
||||||
|
|
||||||
panel->iconField = WMCreateTextField(panel->iconFrame);
|
panel->iconField = WMCreateTextField(panel->iconFrame);
|
||||||
WMResizeWidget(panel->iconField, 176, 20);
|
WMResizeWidget(panel->iconField, 176, 20);
|
||||||
@@ -365,22 +414,30 @@ ShowDockAppSettingsPanel(WAppIcon *aicon)
|
|||||||
WMSetButtonAction(panel->browseBtn, chooseIconCallback, panel);
|
WMSetButtonAction(panel->browseBtn, chooseIconCallback, panel);
|
||||||
|
|
||||||
|
|
||||||
panel->okBtn = WMCreateCommandButton(panel->win);
|
{
|
||||||
WMResizeWidget(panel->okBtn, 80, 26);
|
WMBox *hbox;
|
||||||
WMMoveWidget(panel->okBtn, 200, 328);
|
|
||||||
WMSetButtonText(panel->okBtn, _("OK"));
|
hbox = WMCreateBox(vbox);
|
||||||
WMSetButtonAction(panel->okBtn, panelBtnCallback, panel);
|
WMSetBoxHorizontal(hbox, True);
|
||||||
|
WMAddBoxSubview(vbox, WMWidgetView(hbox), False, True, 24, 24, 0);
|
||||||
panel->cancelBtn = WMCreateCommandButton(panel->win);
|
|
||||||
WMResizeWidget(panel->cancelBtn, 80, 26);
|
|
||||||
WMMoveWidget(panel->cancelBtn, 110, 328);
|
panel->okBtn = WMCreateCommandButton(hbox);
|
||||||
WMSetButtonText(panel->cancelBtn, _("Cancel"));
|
WMSetButtonText(panel->okBtn, _("OK"));
|
||||||
WMSetButtonAction(panel->cancelBtn, panelBtnCallback, panel);
|
WMSetButtonAction(panel->okBtn, panelBtnCallback, panel);
|
||||||
|
WMAddBoxSubviewAtEnd(hbox, WMWidgetView(panel->okBtn), False, True, 80, 80, 0);
|
||||||
|
|
||||||
|
panel->cancelBtn = WMCreateCommandButton(hbox);
|
||||||
|
WMSetButtonText(panel->cancelBtn, _("Cancel"));
|
||||||
|
WMSetButtonAction(panel->cancelBtn, panelBtnCallback, panel);
|
||||||
|
WMAddBoxSubviewAtEnd(hbox, WMWidgetView(panel->cancelBtn), False, True, 80, 80, 5);
|
||||||
|
|
||||||
|
WMMapSubwidgets(hbox);
|
||||||
|
}
|
||||||
|
|
||||||
WMRealizeWidget(panel->win);
|
WMRealizeWidget(panel->win);
|
||||||
WMMapSubwidgets(panel->win);
|
WMMapSubwidgets(panel->win);
|
||||||
WMMapSubwidgets(panel->commandFrame);
|
WMMapSubwidgets(vbox);
|
||||||
WMMapSubwidgets(panel->dndCommandFrame);
|
|
||||||
WMMapSubwidgets(panel->iconFrame);
|
WMMapSubwidgets(panel->iconFrame);
|
||||||
|
|
||||||
updateSettingsPanelIcon(panel);
|
updateSettingsPanelIcon(panel);
|
||||||
|
|||||||
13
src/main.c
13
src/main.c
@@ -453,10 +453,21 @@ check_defaults()
|
|||||||
|
|
||||||
path = wdefaultspathfordomain("");
|
path = wdefaultspathfordomain("");
|
||||||
if (access(path, R_OK)!=0) {
|
if (access(path, R_OK)!=0) {
|
||||||
|
#if 0
|
||||||
wfatal(_("could not find user GNUstep directory (%s).\n"
|
wfatal(_("could not find user GNUstep directory (%s).\n"
|
||||||
"Make sure you have installed Window Maker correctly and run wmaker.inst"),
|
"Make sure you have installed Window Maker correctly and run wmaker.inst"),
|
||||||
path);
|
path);
|
||||||
exit(1);
|
exit(1);
|
||||||
|
#else
|
||||||
|
wwarning(_("could not find user GNUstep directory (%s)."), path);
|
||||||
|
|
||||||
|
if (system("wmaker.inst --batch") != 0) {
|
||||||
|
wwarning(_("There was an error while creating GNUstep directory, please "
|
||||||
|
"make sure you have installed Window Maker correctly and run wmaker.inst"));
|
||||||
|
} else {
|
||||||
|
wwarning(_("%s directory created with default configuration."), path);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
wfree(path);
|
wfree(path);
|
||||||
|
|||||||
16
src/misc.c
16
src/misc.c
@@ -621,8 +621,10 @@ getuserinput(WScreen *scr, char *line, int *ptr)
|
|||||||
char *prompt;
|
char *prompt;
|
||||||
int j, state;
|
int j, state;
|
||||||
int begin = 0;
|
int begin = 0;
|
||||||
char tbuffer[256], pbuffer[256];
|
#define BUFSIZE 512
|
||||||
|
char tbuffer[BUFSIZE], pbuffer[BUFSIZE];
|
||||||
|
|
||||||
|
|
||||||
title = _("Program Arguments");
|
title = _("Program Arguments");
|
||||||
prompt = _("Enter command arguments:");
|
prompt = _("Enter command arguments:");
|
||||||
ret = NULL;
|
ret = NULL;
|
||||||
@@ -650,8 +652,8 @@ getuserinput(WScreen *scr, char *line, int *ptr)
|
|||||||
|
|
||||||
j = 0;
|
j = 0;
|
||||||
if (*ptr > begin) {
|
if (*ptr > begin) {
|
||||||
strncpy(tbuffer, &line[begin], WMIN(*ptr-begin, 255));
|
strncpy(tbuffer, &line[begin], WMIN(*ptr-begin, BUFSIZE));
|
||||||
tbuffer[WMIN(*ptr-begin, 255)] = 0;
|
tbuffer[WMIN(*ptr-begin, BUFSIZE)] = 0;
|
||||||
title = (char*)tbuffer;
|
title = (char*)tbuffer;
|
||||||
}
|
}
|
||||||
begin = *ptr+1;
|
begin = *ptr+1;
|
||||||
@@ -660,8 +662,8 @@ getuserinput(WScreen *scr, char *line, int *ptr)
|
|||||||
} else if (j <= 0 && line[*ptr]==')') {
|
} else if (j <= 0 && line[*ptr]==')') {
|
||||||
|
|
||||||
if (*ptr > begin) {
|
if (*ptr > begin) {
|
||||||
strncpy(tbuffer, &line[begin], WMIN(*ptr-begin, 255));
|
strncpy(tbuffer, &line[begin], WMIN(*ptr-begin, BUFSIZE));
|
||||||
tbuffer[WMIN(*ptr-begin, 255)] = 0;
|
tbuffer[WMIN(*ptr-begin, BUFSIZE)] = 0;
|
||||||
title = (char*)tbuffer;
|
title = (char*)tbuffer;
|
||||||
}
|
}
|
||||||
state = _DONE;
|
state = _DONE;
|
||||||
@@ -678,8 +680,8 @@ getuserinput(WScreen *scr, char *line, int *ptr)
|
|||||||
if (line[*ptr]==')' && j==0) {
|
if (line[*ptr]==')' && j==0) {
|
||||||
|
|
||||||
if (*ptr-begin > 1) {
|
if (*ptr-begin > 1) {
|
||||||
strncpy(pbuffer, &line[begin], WMIN(*ptr-begin, 255));
|
strncpy(pbuffer, &line[begin], WMIN(*ptr-begin, BUFSIZE));
|
||||||
pbuffer[WMIN(*ptr-begin, 255)] = 0;
|
pbuffer[WMIN(*ptr-begin, BUFSIZE)] = 0;
|
||||||
prompt = (char*)pbuffer;
|
prompt = (char*)pbuffer;
|
||||||
}
|
}
|
||||||
state = _DONE;
|
state = _DONE;
|
||||||
|
|||||||
@@ -653,9 +653,7 @@ wScreenForRootWindow(Window window)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
assert("bad_root_window" && 0);
|
return wScreenForWindow(window);
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -678,7 +676,7 @@ wScreenSearchForRootWindow(Window window)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return wScreenForWindow(window);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1125,7 +1123,8 @@ manageAllWindows(WScreen *scr, int crashRecovery)
|
|||||||
|
|
||||||
wWindowMove(wwin, wwin->frame_x - border,
|
wWindowMove(wwin, wwin->frame_x - border,
|
||||||
wwin->frame_y - border -
|
wwin->frame_y - border -
|
||||||
wwin->frame->titlebar->height);
|
(wwin->frame->titlebar ?
|
||||||
|
wwin->frame->titlebar->height : 0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,8 +72,14 @@ copy() {
|
|||||||
source=$GLOBALDIR/plmenu.${LOCALE%.*}
|
source=$GLOBALDIR/plmenu.${LOCALE%.*}
|
||||||
elif [ -f $GLOBALDIR/plmenu.${LOCALE%_*} ]; then
|
elif [ -f $GLOBALDIR/plmenu.${LOCALE%_*} ]; then
|
||||||
source=$GLOBALDIR/plmenu.${LOCALE%_*}
|
source=$GLOBALDIR/plmenu.${LOCALE%_*}
|
||||||
|
if [ -f $GLOBALDIR/plmenu.${LOCALE%_*.*} ]; then
|
||||||
|
source=$GLOBALDIR/plmenu.${LOCALE%_*.*}
|
||||||
|
elif [ -f $GLOBALDIR/menu.${LOCALE} ]; then
|
||||||
|
source=$GLOBALDIR/menu.${LOCALE}
|
||||||
elif [ -f $GLOBALDIR/menu.${LOCALE%_*} ]; then
|
elif [ -f $GLOBALDIR/menu.${LOCALE%_*} ]; then
|
||||||
source=$GLOBALDIR/menu.${LOCALE%_*}
|
source=$GLOBALDIR/menu.${LOCALE%_*}
|
||||||
|
elif [ -f $GLOBALDIR/menu.${LOCALE%_*.*} ]; then
|
||||||
|
source=$GLOBALDIR/menu.${LOCALE%_*.*}
|
||||||
else
|
else
|
||||||
source=$GLOBALDIR/plmenu
|
source=$GLOBALDIR/plmenu
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user