mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-14 17:28:07 +00:00
setting for auto-loading of recent projects
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -312,6 +312,10 @@ RD_VocabTable:
|
|||||||
//- rjf: transient tabs
|
//- rjf: transient tabs
|
||||||
@default(1) @display_name('Transient Tabs') @description("When snapping to source code locations, opens new files in a 'transient' tab if they are not already open. Transient tabs are replaced on subsequent snaps automatically.")
|
@default(1) @display_name('Transient Tabs') @description("When snapping to source code locations, opens new files in a 'transient' tab if they are not already open. Transient tabs are replaced on subsequent snaps automatically.")
|
||||||
'transient_tabs': bool,
|
'transient_tabs': bool,
|
||||||
|
|
||||||
|
//- rjf: auto-load last project
|
||||||
|
@default(0) @display_name('Auto Load Last Project') @description("Enables loading the most recently opened project when a user file is loaded (and thus when the debugger starts).")
|
||||||
|
'auto_load_last_project': bool,
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13128,6 +13128,18 @@ rd_frame(void)
|
|||||||
rd_cmd(RD_CmdKind_SetCurrentPath, .file_path = new_current_dir);
|
rd_cmd(RD_CmdKind_SetCurrentPath, .file_path = new_current_dir);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//- rjf: if just opened user -> load last project, if enabled
|
||||||
|
if(kind == RD_CmdKind_OpenUser && rd_setting_b32_from_name(s("auto_load_last_project")))
|
||||||
|
{
|
||||||
|
CFG_Node *user = cfg_node_child_from_string(cfg_node_root(), s("user"));
|
||||||
|
CFG_NodePtrList recent_projects = cfg_node_child_list_from_string(scratch.arena, user, s("recent_project"));
|
||||||
|
CFG_Node *recent_project = cfg_node_ptr_list_first(&recent_projects);
|
||||||
|
if(recent_project != &cfg_nil_node)
|
||||||
|
{
|
||||||
|
rd_cmd(RD_CmdKind_OpenRecentProject, .cfg = recent_project->id);
|
||||||
|
}
|
||||||
|
}
|
||||||
}break;
|
}break;
|
||||||
case RD_CmdKind_NewUser:
|
case RD_CmdKind_NewUser:
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user