removed switch from the dact system
This commit is contained in:
parent
cd6614b215
commit
5138d565d8
19
4ed.cpp
19
4ed.cpp
|
@ -4359,25 +4359,14 @@ App_Step_Sig(app_step){
|
|||
|
||||
}break;
|
||||
#endif
|
||||
|
||||
|
||||
#if 0
|
||||
case DACT_SWITCH:
|
||||
{
|
||||
if (!file && string.str){
|
||||
file = working_set_lookup_file(working_set, string);
|
||||
if (!file){
|
||||
file = working_set_contains(system, working_set, string);
|
||||
}
|
||||
}
|
||||
|
||||
if (file){
|
||||
View *view = panel->view;
|
||||
|
||||
view_set_file(view, file, models);
|
||||
view_show_file(view);
|
||||
view->map = get_map(models, file->settings.base_map_id);
|
||||
}
|
||||
}break;
|
||||
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
case DACT_KILL:
|
||||
{
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
enum Action_Type{
|
||||
DACT_SET_LINE,
|
||||
DACT_SWITCH,
|
||||
DACT_TRY_KILL,
|
||||
DACT_CLOSE,
|
||||
};
|
||||
|
@ -121,6 +120,5 @@ delayed_action_repush(Delay *delay, Delayed_Action *act){
|
|||
}
|
||||
|
||||
#define delayed_set_line(delay, ...) delayed_action_(delay, DACT_SET_LINE, ##__VA_ARGS__)
|
||||
#define delayed_switch(delay, ...) delayed_action_(delay, DACT_SWITCH, ##__VA_ARGS__)
|
||||
#define delayed_try_kill(delay, ...) delayed_action_(delay, DACT_TRY_KILL, ##__VA_ARGS__)
|
||||
#define delayed_close(delay, ...) delayed_action_(delay, DACT_CLOSE, ##__VA_ARGS__)
|
||||
|
|
|
@ -3172,7 +3172,6 @@ kill_file(System_Functions *system, Models *models,
|
|||
internal void
|
||||
interactive_view_complete(System_Functions *system, View *view, String dest, i32 user_action){
|
||||
Models *models = view->persistent.models;
|
||||
Panel *panel = view->panel;
|
||||
Editing_File *old_file = view->file_data.file;
|
||||
|
||||
switch (view->action){
|
||||
|
@ -3193,8 +3192,20 @@ interactive_view_complete(System_Functions *system, View *view, String dest, i32
|
|||
}break;
|
||||
|
||||
case IAct_Switch:
|
||||
delayed_switch(&models->delay1, dest, panel);
|
||||
touch_file(&models->working_set, old_file);
|
||||
{
|
||||
touch_file(&models->working_set, old_file);
|
||||
|
||||
Editing_File *file = 0;
|
||||
String string = dest;
|
||||
|
||||
file = working_set_lookup_file(&models->working_set, string);
|
||||
if (!file){
|
||||
file = working_set_contains(system, &models->working_set, string);
|
||||
}
|
||||
if (file){
|
||||
view_set_file(view, file, models);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case IAct_Kill:
|
||||
|
|
|
@ -155,8 +155,8 @@ char *daction_enum[] = {
|
|||
"SAVE_AS",
|
||||
"SAVE",
|
||||
"NEW",
|
||||
#endif
|
||||
"SWITCH",
|
||||
#endif
|
||||
"TRY_KILL",
|
||||
#if 0
|
||||
"KILL",
|
||||
|
|
Loading…
Reference in New Issue