mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-12-01 01:53:20 -08:00
display project names in recent project list; fix 0s for address-disabled string viz
This commit is contained in:
1 parent
fbe7b20aee
commit
d207398934
7 files changed
+42
-13
No files matched your search
@@ -227,6 +227,14 @@ rd_location_from_cfg(CFG_Node *cfg)
|
||||
return dst_loc;
|
||||
}
|
||||
|
||||
internal String8
|
||||
rd_name_from_cfg(CFG_Node *cfg)
|
||||
{
|
||||
CFG_Node *name_root = cfg_node_child_from_string(cfg, str8_lit("name"));
|
||||
String8 result = name_root->first->string;
|
||||
return result;
|
||||
}
|
||||
|
||||
internal String8
|
||||
rd_label_from_cfg(CFG_Node *cfg)
|
||||
{
|
||||
@@ -12688,6 +12696,16 @@ rd_frame(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//- rjf: if just opened project -> set new current path
|
||||
if(kind == RD_CmdKind_OpenProject)
|
||||
{
|
||||
String8 new_current_dir = str8_chop_last_slash(rd_regs()->file_path);
|
||||
if(new_current_dir.size != 0)
|
||||
{
|
||||
rd_cmd(RD_CmdKind_SetCurrentPath, .file_path = new_current_dir);
|
||||
}
|
||||
}
|
||||
}break;
|
||||
case RD_CmdKind_NewUser:
|
||||
{
|
||||
@@ -12755,6 +12773,13 @@ rd_frame(void)
|
||||
CFG_Node *path_root = cfg_node_new(rd_state->cfg, recent_project, str8_lit("path"));
|
||||
cfg_node_new(rd_state->cfg, path_root, file_path);
|
||||
}
|
||||
{
|
||||
CFG_Node *root = cfg_node_root();
|
||||
CFG_Node *project = cfg_node_child_from_string(root, s("project"));
|
||||
CFG_Node *name = cfg_node_child_from_string(project, s("name"));
|
||||
CFG_Node *recent_project_name_root = cfg_node_child_from_string_or_alloc(rd_state->cfg, recent_project, s("name"));
|
||||
cfg_node_new_replace(rd_state->cfg, recent_project_name_root, name->first->string);
|
||||
}
|
||||
cfg_node_unhook(rd_state->cfg, user, recent_project);
|
||||
cfg_node_insert_child(rd_state->cfg, user, &cfg_nil_node, recent_project);
|
||||
recent_projects = cfg_node_child_list_from_string(scratch.arena, user, str8_lit("recent_project"));
|
||||
|
||||
Reference in new issue
Block a user