Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion source/Modules/configopus/config_environment_palette.c
Original file line number Diff line number Diff line change
Expand Up @@ -374,13 +374,24 @@ void _config_env_grabwb(config_env_data *data)
req = WINREQUESTER(data->window);

// Show requester
char path3[256];
BPTR lock3 = Lock("sys:prefs/presets", ACCESS_READ);
if (lock3)
{
NameFromLock(lock3, path3, sizeof(path3));
UnLock(lock3);
}
else
{
path3[0] = 0;
}
if (AslRequestTags(req,
ASLFR_Window,
data->window,
ASLFR_TitleText,
GetString(locale, MSG_ENVIRONMENT_SELECT_PALETTE),
ASLFR_InitialDrawer,
"sys:prefs/presets",
path3,
TAG_END))
{
// Get path
Expand Down
6 changes: 4 additions & 2 deletions source/Modules/configopus/fileclass_editor.c
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ void _fileclassed_end_edit(fileclass_ed_data *data, short disable)
void fileclassed_view_file(fileclass_ed_data *data)
{
struct FileRequester *filereq;
struct TagItem tags[4];
struct TagItem tags[5];

// Get requester pointer
if (!(filereq = WINREQUESTER(data->window)))
Expand All @@ -715,7 +715,9 @@ void fileclassed_view_file(fileclass_ed_data *data)
tags[1].ti_Data = (IPTR)GetString(data->new_win.locale, MSG_CLASSED_SELECT_VIEW_FILE);
tags[2].ti_Tag = ASLFR_Flags1;
tags[2].ti_Data = FRF_PRIVATEIDCMP;
tags[3].ti_Tag = TAG_DONE;
tags[3].ti_Tag = ASLFR_InitialDrawer;
tags[3].ti_Data = (IPTR)"DOpus5:";
tags[4].ti_Tag = TAG_DONE;

// Put window to sleep
SetWindowBusy(data->window);
Expand Down
13 changes: 12 additions & 1 deletion source/Modules/configopus/filetype_editor.c
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,18 @@ BOOL filetypeed_pick_icon(filetype_ed_data *data)
}

if (!path[0])
strcpy(path, "DOpus5:");
{
BPTR lock = Lock("ENVARC:Sys", ACCESS_READ);
if (lock)
{
NameFromLock(lock, path, sizeof(path));
UnLock(lock);
}
else
{
path[0] = 0;
}
}

// Build pattern. ParsePatternNoCase's buffer arg is STRPTR (char*)
// on AOS3/AOS4 but UBYTE* on MorphOS, so use the matching cast on
Expand Down
36 changes: 34 additions & 2 deletions source/Modules/configopus/function_editor.c
Original file line number Diff line number Diff line change
Expand Up @@ -567,8 +567,19 @@ void FunctionEditor(void)
tags[2].ti_Data = FRF_DOSAVEMODE | FRF_PRIVATEIDCMP;
tags[3].ti_Tag = ASLFR_Flags2;
tags[3].ti_Data = FRF_REJECTICONS;
char path1[256];
BPTR lock1 = Lock("DOpus5:Commands", ACCESS_READ);
if (lock1)
{
NameFromLock(lock1, path1, sizeof(path1));
Comment thread
midwan marked this conversation as resolved.
UnLock(lock1);
}
else
{
path1[0] = 0;
}
tags[4].ti_Tag = (gadgetid == MENU_FUNCED_EXPORT_CMD) ? ASLFR_InitialDrawer : TAG_DONE;
tags[4].ti_Data = (IPTR) "DOpus5:Commands";
tags[4].ti_Data = (IPTR)path1;
tags[5].ti_Tag = TAG_DONE;

// Show filerequester
Expand Down Expand Up @@ -1624,8 +1635,29 @@ BOOL funced_command_req(FuncEdData *data, char *buffer, short type)
tags[1].ti_Data = (IPTR)GetString(data->locale, MSG_SELECT_FILE);
tags[2].ti_Tag = ASLFR_InitialFile;
tags[2].ti_Data = (IPTR) "";
char path2[256];
BPTR lock2;
path2[0] = 0;
if (type == INST_SCRIPT)
{
lock2 = Lock("s:", ACCESS_READ);
if (lock2)
{
NameFromLock(lock2, path2, sizeof(path2));
UnLock(lock2);
}
}
else if (type == INST_AREXX)
{
lock2 = Lock("DOpus5:ARexx/", ACCESS_READ);
if (lock2)
{
NameFromLock(lock2, path2, sizeof(path2));
UnLock(lock2);
}
}
tags[3].ti_Tag = (data->last_type != type) ? ASLFR_InitialDrawer : TAG_IGNORE;
tags[3].ti_Data = (IPTR)((type == INST_SCRIPT) ? "s:" : ((type == INST_AREXX) ? "DOpus5:ARexx/" : ""));
tags[3].ti_Data = (IPTR)path2;
tags[4].ti_Tag = ASLFR_Flags1;
tags[4].ti_Data = FRF_PRIVATEIDCMP;
tags[5].ti_Tag = TAG_END;
Expand Down