openbsd-ports/x11/windowmaker/patches/patch-WPrefs_app_Menu_c
mglocker 97574ea6df Fixes WPrefs crash when choosing WPrefs Menu Definition. Patch from
Pedro Martelletto:

Revision 1.4 of x11/windowmaker/patches/patch-WINGs_string_c uncovered
a bug in WPrefs, WindowMaker's configuration tool. The bug can be easily
triggered by choosing the 'Applications Menu Definition' dialogue.

The problem is that WPrefs code relied on the fact that the first token
in the array would not be free'd by wtokenfree(), a misbehaviour which
was correctly addressed in the aforementioned change.

Tested by some, and OK jasper@ before ports tree lock.
2007-08-25 09:27:12 +00:00

30 lines
1.5 KiB
Plaintext

$OpenBSD: patch-WPrefs_app_Menu_c,v 1.4 2007/08/25 09:27:12 mglocker Exp $
--- WPrefs.app/Menu.c.orig Tue Oct 26 04:23:39 2004
+++ WPrefs.app/Menu.c Fri Aug 17 20:58:09 2007
@@ -577,7 +577,7 @@ createPanel(_Panel *p)
data->param.exec.command = "xv";
data = putNewItem(panel, pad, ExecInfo, _("Acrobat Reader"));
- data->param.exec.command = "acroread || /usr/local/Acrobat4/bin/acroread";
+ data->param.exec.command = "acroread";
data = putNewItem(panel, pad, ExecInfo, _("ghostview"));
data->param.exec.command = "gv";
@@ -616,7 +616,7 @@ createPanel(_Panel *p)
data = putNewItem(panel, pad, DirectoryInfo, _("Themes"));
data->param.directory.command = "setstyle";
- data->param.directory.directory = "/usr/share/WindowMaker/Themes /usr/local/share/WindowMaker/Themes $HOME/GNUstep/Library/WindowMaker/Themes";
+ data->param.directory.directory = "/usr/share/WindowMaker/Themes %%PREFIX%%/share/WindowMaker/Themes $HOME/GNUstep/Library/WindowMaker/Themes";
data->param.directory.stripExt = 1;
data = putNewItem(panel, pad, DirectoryInfo, _("Bg Images (scale)"));
@@ -1068,7 +1068,6 @@ parseCommand(WMPropList *item)
for (i = 0, j = 0; i < tokn; i++) {
if (strcmp(tokens[i], "-noext") == 0) {
- wfree(tokens[i]);
data->param.directory.stripExt = 1;
} else {
ctokens[j++] = tokens[i];