mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-08 14:58:08 +00:00
adjust project/user saving/loading rules to be less idiosyncratic with other applications. user settings persist, to keep the user from needing to specify things like windows/colors/bindings every time, but projects must always be manually specified, e.g. like usual files in other programs. you can do this either via the ui, or via command line still. also, new user/project no longer require a path - they just clear the existing path, then to set the path you just explicitly save. this makes things much more natural & familiar.
This commit is contained in:
+1
-1
@@ -49,7 +49,7 @@ commands =
|
||||
// .f1 = { .win = "raddbg_stable --ipc kill_all && build raddbg", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||
// .f1 = { .win = "raddbg_stable --ipc kill_all && build raddbg debug telemetry", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||
// .f1 = { .win = "raddbg_stable --ipc kill_all && build radbin", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||
.f1 = { .win = "build raddbg asan", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||
.f1 = { .win = "raddbg_stable --ipc kill_all && build raddbg", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||
|
||||
//- rjf: [raddbg wsl]
|
||||
// .f1 = { .win = "wsl ./build.sh raddbg", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||
|
||||
@@ -678,8 +678,8 @@ RD_CmdKindInfo rd_cmd_kind_info_table[249] =
|
||||
{ str8_lit_comp("go_to_disassembly"), str8_lit_comp("Goes to the disassembly, if any, for a given source code line."), str8_lit_comp("code,source,disassembly,disasm"), str8_lit_comp("$text_pt,"), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*1)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), D_EntityKind_Null}},
|
||||
{ str8_lit_comp("go_to_source"), str8_lit_comp("Goes to the source code, if any, for a given disassembly line."), str8_lit_comp("code,source,disassembly,disasm"), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), D_EntityKind_Null}},
|
||||
{ str8_lit_comp("set_file_replacement_path"), str8_lit_comp("Sets the path which should be used as the replacement for the passed file."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), D_EntityKind_Null}},
|
||||
{ str8_lit_comp("new_user"), str8_lit_comp("Creates a new user file, and sets the current user path as that file's path."), str8_lit_comp("new,user,project,layout"), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*1)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_FilePath, str8_lit_comp("folder:\"$input\""), str8_lit_comp(""), D_EntityKind_Null}},
|
||||
{ str8_lit_comp("new_project"), str8_lit_comp("Creates a new project file, and sets the current project path as that file's path."), str8_lit_comp("new,user,project,layout"), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*1)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_FilePath, str8_lit_comp("folder:\"$input\""), str8_lit_comp(""), D_EntityKind_Null}},
|
||||
{ str8_lit_comp("new_user"), str8_lit_comp("Creates a new user file, and sets the current user path as that file's path."), str8_lit_comp("new,user,project,layout"), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*1)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), D_EntityKind_Null}},
|
||||
{ str8_lit_comp("new_project"), str8_lit_comp("Creates a new project file, and sets the current project path as that file's path."), str8_lit_comp("new,user,project,layout"), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*1)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), D_EntityKind_Null}},
|
||||
{ str8_lit_comp("open_user"), str8_lit_comp("Opens a user file path, immediately loading it, and begins autosaving to it."), str8_lit_comp("load,user,project,layout"), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*1)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_FilePath, str8_lit_comp("folder:\"$input\""), str8_lit_comp(""), D_EntityKind_Null}},
|
||||
{ str8_lit_comp("open_project"), str8_lit_comp("Opens a project file path, immediately loading it, and begins autosaving to it."), str8_lit_comp("project,project,session"), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*1)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_FilePath, str8_lit_comp("folder:\"$input\""), str8_lit_comp(""), D_EntityKind_Null}},
|
||||
{ str8_lit_comp("open_recent_project"), str8_lit_comp("Opens a recently used project file."), str8_lit_comp("project,project,session"), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_Cfg, str8_lit_comp("query:recent_projects"), str8_lit_comp(""), D_EntityKind_Null}},
|
||||
@@ -829,7 +829,7 @@ RD_CmdKindInfo rd_cmd_kind_info_table[249] =
|
||||
{ str8_lit_comp("geo3d"), str8_lit_comp("Opens a Geometry (3D) tab."), {0}, {0}, RD_CmdKindFlag_ListInUI|RD_CmdKindFlag_ListInIPCDocs|RD_CmdKindFlag_ListInTab},
|
||||
};
|
||||
|
||||
struct {String8 string; CFG_Binding binding;} rd_default_binding_table[118] =
|
||||
struct {String8 string; CFG_Binding binding;} rd_default_binding_table[114] =
|
||||
{
|
||||
{str8_lit_comp("kill_all"), {WM_Key_F5, 0 |WM_Modifier_Shift }},
|
||||
{str8_lit_comp("step_into_inst"), {WM_Key_F11, 0 |WM_Modifier_Alt}},
|
||||
@@ -845,7 +845,6 @@ struct {String8 string; CFG_Binding binding;} rd_default_binding_table[118] =
|
||||
{str8_lit_comp("set_next_statement"), {WM_Key_F10, 0 |WM_Modifier_Ctrl |WM_Modifier_Shift }},
|
||||
{str8_lit_comp("inc_window_font_size"), {WM_Key_Equal, 0 |WM_Modifier_Alt}},
|
||||
{str8_lit_comp("dec_window_font_size"), {WM_Key_Minus, 0 |WM_Modifier_Alt}},
|
||||
{str8_lit_comp("window"), {WM_Key_N, 0 |WM_Modifier_Ctrl |WM_Modifier_Shift }},
|
||||
{str8_lit_comp("toggle_fullscreen"), {WM_Key_Return, 0 |WM_Modifier_Ctrl }},
|
||||
{str8_lit_comp("new_panel_right"), {WM_Key_P, 0 |WM_Modifier_Ctrl }},
|
||||
{str8_lit_comp("new_panel_down"), {WM_Key_Minus, 0 |WM_Modifier_Ctrl }},
|
||||
@@ -875,11 +874,8 @@ struct {String8 string; CFG_Binding binding;} rd_default_binding_table[118] =
|
||||
{str8_lit_comp("open"), {WM_Key_O, 0 |WM_Modifier_Ctrl }},
|
||||
{str8_lit_comp("switch"), {WM_Key_I, 0 |WM_Modifier_Ctrl }},
|
||||
{str8_lit_comp("switch_to_partner_file"), {WM_Key_O, 0 |WM_Modifier_Alt}},
|
||||
{str8_lit_comp("open_user"), {WM_Key_N, 0 |WM_Modifier_Ctrl |WM_Modifier_Shift |WM_Modifier_Alt}},
|
||||
{str8_lit_comp("open_project"), {WM_Key_N, 0 |WM_Modifier_Ctrl |WM_Modifier_Alt}},
|
||||
{str8_lit_comp("open_user"), {WM_Key_O, 0 |WM_Modifier_Ctrl |WM_Modifier_Shift |WM_Modifier_Alt}},
|
||||
{str8_lit_comp("open_project"), {WM_Key_O, 0 |WM_Modifier_Ctrl |WM_Modifier_Alt}},
|
||||
{str8_lit_comp("save_user"), {WM_Key_S, 0 |WM_Modifier_Ctrl |WM_Modifier_Shift |WM_Modifier_Alt}},
|
||||
{str8_lit_comp("new_project"), {WM_Key_N, 0 |WM_Modifier_Ctrl |WM_Modifier_Shift }},
|
||||
{str8_lit_comp("open_project"), {WM_Key_O, 0 |WM_Modifier_Ctrl |WM_Modifier_Shift }},
|
||||
{str8_lit_comp("save_project"), {WM_Key_S, 0 |WM_Modifier_Ctrl |WM_Modifier_Shift }},
|
||||
{str8_lit_comp("edit"), {WM_Key_F2, 0 }},
|
||||
{str8_lit_comp("accept"), {WM_Key_Return, 0 }},
|
||||
|
||||
@@ -1040,8 +1040,8 @@ RD_CmdTable: // | | | |
|
||||
{SetFileReplacementPath 0 0 0 0 "" Null null Nil Null 0 0 0 0 0 0 0 Null "set_file_replacement_path" "Set File Replacement Path" "Sets the path which should be used as the replacement for the passed file." "" "" }
|
||||
|
||||
//- rjf: setting config paths
|
||||
{NewUser 1 1 0 0 `folder:\\"$input\\"` FilePath null Nil Null 1 0 0 0 0 1 1 Add "new_user" "New User" "Creates a new user file, and sets the current user path as that file's path." "new,user,project,layout" "" }
|
||||
{NewProject 1 1 0 0 `folder:\\"$input\\"` FilePath null Nil Null 1 0 0 0 0 1 1 Add "new_project" "New Project" "Creates a new project file, and sets the current project path as that file's path." "new,user,project,layout" "" }
|
||||
{NewUser 1 1 0 0 "" Null null Nil Null 1 0 0 0 0 1 0 Add "new_user" "New User" "Creates a new user file, and sets the current user path as that file's path." "new,user,project,layout" "" }
|
||||
{NewProject 1 1 0 0 "" Null null Nil Null 1 0 0 0 0 1 0 Add "new_project" "New Project" "Creates a new project file, and sets the current project path as that file's path." "new,user,project,layout" "" }
|
||||
{OpenUser 1 1 0 0 `folder:\\"$input\\"` FilePath null Nil Null 1 0 0 0 0 1 1 Person "open_user" "Open User" "Opens a user file path, immediately loading it, and begins autosaving to it." "load,user,project,layout" "" }
|
||||
{OpenProject 1 1 0 0 `folder:\\"$input\\"` FilePath null Nil Null 1 0 0 0 0 1 1 Briefcase "open_project" "Open Project" "Opens a project file path, immediately loading it, and begins autosaving to it." "project,project,session" "" }
|
||||
{OpenRecentProject 1 1 0 0 "query:recent_projects" Cfg null RecentProject Null 0 0 0 0 0 1 1 Briefcase "open_recent_project" "Open Recent Project" "Opens a recently used project file." "project,project,session" "" }
|
||||
@@ -1289,7 +1289,6 @@ RD_DefaultBindingTable:
|
||||
{ "dec_window_font_size" Minus 0 0 alt }
|
||||
|
||||
//- rjf: windows
|
||||
{ "window" N ctrl shift 0 }
|
||||
{ "toggle_fullscreen" Return ctrl 0 0 }
|
||||
|
||||
//- rjf: panel splitting
|
||||
@@ -1337,11 +1336,8 @@ RD_DefaultBindingTable:
|
||||
{ "switch_to_partner_file" O 0 0 alt }
|
||||
|
||||
//- rjf: setting config paths
|
||||
{ "open_user" N ctrl shift alt }
|
||||
{ "open_project" N ctrl 0 alt }
|
||||
{ "open_user" O ctrl shift alt }
|
||||
{ "open_project" O ctrl 0 alt }
|
||||
{ "save_user" S ctrl shift alt }
|
||||
{ "new_project" N ctrl shift 0 }
|
||||
{ "open_project" O ctrl shift 0 }
|
||||
{ "save_project" S ctrl shift 0 }
|
||||
|
||||
//- rjf: meta controls
|
||||
|
||||
+23
-60
@@ -1633,9 +1633,10 @@ rd_view_ui(Rng2F32 rect)
|
||||
{
|
||||
if(cmd_name.size != 0)
|
||||
{
|
||||
ui_spacer(ui_em(0.5f, 1.f));
|
||||
UI_TextAlignment(UI_TextAlign_Center)
|
||||
UI_Transparency(1-search_row_open_t)
|
||||
UI_PrefWidth(ui_em(2.5f, 1.f))
|
||||
UI_PrefWidth(ui_em(3.f, 1.f))
|
||||
UI_TagF("weak")
|
||||
RD_Font(RD_FontSlot_Icons)
|
||||
ui_label(rd_icon_kind_text_table[icon == RD_IconKind_Null ? RD_IconKind_Find : icon]);
|
||||
@@ -6692,17 +6693,17 @@ rd_window_frame(void)
|
||||
rd_cmd_kind_info_table[RD_CmdKind_Open].string,
|
||||
rd_cmd_kind_info_table[RD_CmdKind_Switch].string,
|
||||
{0},//-
|
||||
rd_cmd_kind_info_table[RD_CmdKind_NewUser].string,
|
||||
rd_cmd_kind_info_table[RD_CmdKind_OpenUser].string,
|
||||
rd_cmd_kind_info_table[RD_CmdKind_SaveUser].string,
|
||||
rd_cmd_kind_info_table[RD_CmdKind_UserSettings].string,
|
||||
{0},//-
|
||||
rd_cmd_kind_info_table[RD_CmdKind_NewProject].string,
|
||||
rd_cmd_kind_info_table[RD_CmdKind_OpenProject].string,
|
||||
rd_cmd_kind_info_table[RD_CmdKind_OpenRecentProject].string,
|
||||
rd_cmd_kind_info_table[RD_CmdKind_SaveProject].string,
|
||||
rd_cmd_kind_info_table[RD_CmdKind_ProjectSettings].string,
|
||||
{0},//-
|
||||
rd_cmd_kind_info_table[RD_CmdKind_NewUser].string,
|
||||
rd_cmd_kind_info_table[RD_CmdKind_OpenUser].string,
|
||||
rd_cmd_kind_info_table[RD_CmdKind_SaveUser].string,
|
||||
rd_cmd_kind_info_table[RD_CmdKind_UserSettings].string,
|
||||
{0},//-
|
||||
rd_cmd_kind_info_table[RD_CmdKind_Exit].string,
|
||||
};
|
||||
U32 codepoints[] =
|
||||
@@ -6710,17 +6711,17 @@ rd_window_frame(void)
|
||||
'o',
|
||||
'i',
|
||||
0,//-
|
||||
'w',
|
||||
'u',
|
||||
's',
|
||||
'e',
|
||||
0,//-
|
||||
'j',
|
||||
'p',
|
||||
'r',
|
||||
'a',
|
||||
't',
|
||||
0,//-
|
||||
'w',
|
||||
'u',
|
||||
's',
|
||||
'e',
|
||||
0,//-
|
||||
'x',
|
||||
};
|
||||
Assert(ArrayCount(codepoints) == ArrayCount(cmds));
|
||||
@@ -7166,6 +7167,10 @@ rd_window_frame(void)
|
||||
prof_path = str8_chop_last_dot(prof_path);
|
||||
project_name = str8_skip_last_slash(prof_path);
|
||||
}
|
||||
if(project_name.size == 0)
|
||||
{
|
||||
project_name = str8_lit("Untitled Project");
|
||||
}
|
||||
RD_Font(RD_FontSlot_Icons)
|
||||
ui_label(rd_icon_kind_text_table[RD_IconKind_Briefcase]);
|
||||
ui_label(project_name);
|
||||
@@ -12563,12 +12568,12 @@ rd_frame(void)
|
||||
case RD_CmdKind_OpenUser:
|
||||
{
|
||||
arena_clear(rd_state->user_path_arena);
|
||||
rd_state->user_path = push_str8_copy(rd_state->user_path_arena, file_path);
|
||||
rd_state->user_path = str8_copy(rd_state->user_path_arena, file_path);
|
||||
}break;
|
||||
case RD_CmdKind_OpenProject:
|
||||
{
|
||||
arena_clear(rd_state->project_path_arena);
|
||||
rd_state->project_path = push_str8_copy(rd_state->project_path_arena, file_path);
|
||||
rd_state->project_path = str8_copy(rd_state->project_path_arena, file_path);
|
||||
}break;
|
||||
}
|
||||
}
|
||||
@@ -12660,57 +12665,14 @@ rd_frame(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//- rjf: if we've just loaded the user, and we do not have a project path,
|
||||
// then we should try to look at the user's data for recent projects and
|
||||
// load one of those, *or* just the default.
|
||||
if(file_is_okay && kind == RD_CmdKind_OpenUser && rd_state->project_path.size == 0)
|
||||
{
|
||||
CFG_Node *user = cfg_node_child_from_string(cfg_node_root(), str8_lit("user"));
|
||||
CFG_Node *recent_project = cfg_node_child_from_string(user, str8_lit("recent_project"));
|
||||
String8 project_path = rd_path_from_cfg(recent_project);
|
||||
if(project_path.size == 0)
|
||||
{
|
||||
String8 user_program_data_path = get_process_info()->user_program_data_path;
|
||||
String8 user_data_folder = push_str8f(scratch.arena, "%S/%S", user_program_data_path, str8_lit("raddbg"));
|
||||
make_directory(user_data_folder);
|
||||
project_path = push_str8f(scratch.arena, "%S/default.raddbg_project", user_data_folder);
|
||||
}
|
||||
rd_cmd(RD_CmdKind_OpenProject, .file_path = project_path);
|
||||
}
|
||||
}break;
|
||||
case RD_CmdKind_NewUser:
|
||||
{
|
||||
rd_cmd(RD_CmdKind_OpenUser, .file_path = str8_zero());
|
||||
}break;
|
||||
case RD_CmdKind_NewProject:
|
||||
{
|
||||
String8 new_path = rd_regs()->file_path;
|
||||
B32 file_will_be_overwritten = (properties_from_file_path(new_path).created != 0);
|
||||
UI_Key key = ui_key_from_string(ui_key_zero(), str8_lit("new_config_overwrite_confirm"));
|
||||
if(file_will_be_overwritten && !rd_regs()->force_confirm && !ui_key_match(rd_state->popup_key, key))
|
||||
{
|
||||
rd_state->popup_key = key;
|
||||
rd_state->popup_active = 1;
|
||||
arena_clear(rd_state->popup_arena);
|
||||
MemoryZeroStruct(&rd_state->popup_cmds);
|
||||
rd_state->popup_title = push_str8f(rd_state->popup_arena, "Are you sure you want to save to this path?");
|
||||
rd_state->popup_desc = push_str8f(rd_state->popup_arena, "The existing file at '%S' will be overwritten.", new_path);
|
||||
RD_Regs *regs = rd_regs_copy(rd_frame_arena(), rd_regs());
|
||||
regs->force_confirm = 1;
|
||||
rd_cmd_list_push_new(rd_state->popup_arena, &rd_state->popup_cmds, rd_cmd_kind_info_table[kind].string, regs);
|
||||
}
|
||||
else switch(kind)
|
||||
{
|
||||
default:{}break;
|
||||
case RD_CmdKind_NewUser:
|
||||
{
|
||||
delete_file_at_path(new_path);
|
||||
rd_cmd(RD_CmdKind_OpenUser, .file_path = new_path);
|
||||
}break;
|
||||
case RD_CmdKind_NewProject:
|
||||
{
|
||||
delete_file_at_path(new_path);
|
||||
rd_cmd(RD_CmdKind_OpenProject, .file_path = new_path);
|
||||
}break;
|
||||
}
|
||||
rd_cmd(RD_CmdKind_OpenProject, .file_path = str8_zero());
|
||||
}break;
|
||||
case RD_CmdKind_SaveUser:
|
||||
case RD_CmdKind_SaveProject:
|
||||
@@ -12788,6 +12750,7 @@ rd_frame(void)
|
||||
case RD_CmdKind_WriteUserData: dst_path = rd_state->user_path; bucket_name = str8_lit("user"); goto write;
|
||||
case RD_CmdKind_WriteProjectData: dst_path = rd_state->project_path; bucket_name = str8_lit("project"); goto write;
|
||||
write:;
|
||||
if(dst_path.size != 0)
|
||||
{
|
||||
B32 dst_exists = (properties_from_file_path(dst_path).created != 0);
|
||||
String8 temp_path = push_str8f(scratch.arena, "%S.temp", dst_path);
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
// [ ] value coloring view in watch window, so you can quickly scroll & see values outside of a threshold
|
||||
// [x] step out of scopes / loops
|
||||
//
|
||||
// [ ] asan pass
|
||||
// [ ] external window focusing bugs
|
||||
// [x] asan pass
|
||||
// [x] codebase-internal barrier impl (win7/linux support)
|
||||
// [x] policy for closing debug info which is no longer relevant?
|
||||
// [x] killing/restarting thread performance (#780)
|
||||
|
||||
Reference in New Issue
Block a user