1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-01-09 23:34:14 +01:00

various bug fixes

This commit is contained in:
kojima
1999-04-18 21:08:00 +00:00
parent 674eb20ec4
commit 2effbfafde
13 changed files with 108 additions and 59 deletions

View File

@@ -438,6 +438,7 @@ performCommand(WMWidget *w, void *data)
int row;
static int cmdIndex=0;
char *title = NULL;
Bool removed = False;
column = WMGetBrowserFirstVisibleColumn(panel->browser);
if (pop == panel->cmd2P) {
@@ -494,6 +495,10 @@ performCommand(WMWidget *w, void *data)
updateForItemType(panel, TNothing);
panel->editedItem = NULL;
panel->unsaved = 1;
if (pop == panel->cmd1P) {
WMSetTextFieldText(panel->tit2T, NULL);
}
removed = True;
return;
case CCut:
if (row < 0)
@@ -505,7 +510,6 @@ performCommand(WMWidget *w, void *data)
}
if (panel->itemClipboard)
PLRelease(panel->itemClipboard);
WMRemoveBrowserItem(panel->browser, column, row);
menuItem = PLGetArrayElement(menu, row+1);
PLRemoveArrayElement(menu, row+1);
@@ -516,6 +520,7 @@ performCommand(WMWidget *w, void *data)
WMSetPopUpButtonItemEnabled(panel->cmd1P, CPaste, True);
WMSetPopUpButtonItemEnabled(panel->cmd2P, CPaste, True);
panel->unsaved = 1;
removed = True;
return;
case CCopy:
if (row < 0)
@@ -553,6 +558,12 @@ performCommand(WMWidget *w, void *data)
PLInsertArrayElement(menu, menuItem, row+1);
free(title);
panel->unsaved = 1;
if (removed) {
if (pop == panel->cmd1P) {
WMSetTextFieldText(panel->tit2T, NULL);
}
}
}

View File

@@ -777,14 +777,11 @@ static void
storeCommandInScript(char *cmd, char *line)
{
char *path;
char *p;
FILE *f;
char buffer[128];
p = wusergnusteppath();
path = wmalloc(strlen(p)+64);
sprintf(path, "%s/Library/WindowMaker/autostart", p);
path = wstrappend(wusergnusteppath(), "/Library/WindowMaker/autostart");
f = fopen(path, "r");
if (!f) {
f = fopen(path, "w");
@@ -801,8 +798,8 @@ storeCommandInScript(char *cmd, char *line)
char *tmppath;
FILE *fo;
tmppath = wmalloc(strlen(p)+64);
sprintf(tmppath, "%s/Library/WindowMaker/autostart.tmp", p);
tmppath = wstrappend(wusergnusteppath(),
"/Library/WindowMaker/autostart.tmp");
fo = fopen(tmppath, "w");
if (!fo) {
wsyserror(_("could not create temporary file %s"), tmppath);