diff --git a/src/flmsg_dialog.cxx b/src/flmsg_dialog.cxx index a706d4e..2dac98a 100644 --- a/src/flmsg_dialog.cxx +++ b/src/flmsg_dialog.cxx @@ -634,7 +634,7 @@ Fl_Menu_Item menu_[] = { {0,0,0,0,0,0,0,0,0}, {_("MARS"), 0, 0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0}, {_("Daily"), 0, (Fl_Callback*)cb_mnuFormSelect, &mMARSDAILY, 0, FL_NORMAL_LABEL, 0, 14, 0}, - {_("IN/EET"), 0, (Fl_Callback*)cb_mnuFormSelect, &mMARSINEEI, 0, FL_NORMAL_LABEL, 0, 14, 0}, + {_("IN/EEI"), 0, (Fl_Callback*)cb_mnuFormSelect, &mMARSINEEI, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("Net"), 0, (Fl_Callback*)cb_mnuFormSelect, &mMARSNET, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("Army"), 0, (Fl_Callback*)cb_mnuFormSelect, &mMARSARMY, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("Navy"), 0, (Fl_Callback*)cb_mnuFormSelect, &mMARSNAVY, 0, FL_NORMAL_LABEL, 0, 14, 0}, diff --git a/src/mars/mars_ineei.cxx b/src/mars/mars_ineei.cxx index 6a73191..a47360a 100644 --- a/src/mars/mars_ineei.cxx +++ b/src/mars/mars_ineei.cxx @@ -885,64 +885,72 @@ string formated_output( string target ) replacestr(formnet, mars_ineei_DTG, s_mars_ineei_DTG); field_str.clear(); - if (!s_mars_ineei_FMNAME.empty()) field_str.append(s_mars_ineei_FMNAME).append(" "); - if (!s_mars_ineei_FMCALL.empty()) field_str.append(s_mars_ineei_FMCALL).append(" "); + if (!s_mars_ineei_FMNAME.empty()) field_str.append(s_mars_ineei_FMNAME).append(" / "); + if (!s_mars_ineei_FMCALL.empty()) field_str.append(s_mars_ineei_FMCALL).append(" / "); if (!s_mars_ineei_FMSTATE.empty()) field_str.append(s_mars_ineei_FMSTATE); replacestr(formnet, fm_str, field_str); field_str.clear(); - if (!s_mars_ineei_TOPOS.empty()) field_str.append(s_mars_ineei_TOPOS).append(" "); - if (!s_mars_ineei_TOCALL.empty()) field_str.append(s_mars_ineei_TOCALL).append(" "); + if (!s_mars_ineei_TOPOS.empty()) field_str.append(s_mars_ineei_TOPOS).append(" / "); + if (!s_mars_ineei_TOCALL.empty()) field_str.append(s_mars_ineei_TOCALL).append(" / "); if (!s_mars_ineei_TOSTATE.empty()) field_str.append(s_mars_ineei_TOSTATE); replacestr(formnet, to_str, field_str); field_str.clear(); if (!s_mars_ineei_INFO1CALL.empty() || !s_mars_ineei_INFO1POS.empty()) { field_str.append("\nINFO: "); - if (!s_mars_ineei_INFO1POS.empty()) field_str.append(s_mars_ineei_INFO1POS).append("/"); - field_str.append(s_mars_ineei_INFO1CALL).append(" ").append(s_mars_ineei_INFO1STATE); + if (!s_mars_ineei_INFO1POS.empty()) field_str.append(s_mars_ineei_INFO1POS).append(" / "); + field_str.append(s_mars_ineei_INFO1CALL); + if (!s_mars_ineei_INFO1STATE.empty()) field_str.append(" / ").append(s_mars_ineei_INFO1STATE); } if (!s_mars_ineei_INFO2CALL.empty() || !s_mars_ineei_INFO2POS.empty()) { if (field_str.empty()) field_str.append("\nINFO: "); else field_str.append("\n "); - if (!s_mars_ineei_INFO2POS.empty()) field_str.append(s_mars_ineei_INFO2POS).append("/"); - field_str.append(s_mars_ineei_INFO2CALL).append(" ").append(s_mars_ineei_INFO2STATE); + if (!s_mars_ineei_INFO2POS.empty()) field_str.append(s_mars_ineei_INFO2POS).append(" / "); + field_str.append(s_mars_ineei_INFO2CALL); + if (!s_mars_ineei_INFO2STATE.empty()) field_str.append(" / ").append(s_mars_ineei_INFO2STATE); } if (!s_mars_ineei_INFO3CALL.empty() || !s_mars_ineei_INFO3POS.empty()) { if (field_str.empty()) field_str.append("\nINFO: "); else field_str.append("\n "); - if (!s_mars_ineei_INFO3POS.empty()) field_str.append(s_mars_ineei_INFO3POS).append("/"); - field_str.append(s_mars_ineei_INFO3CALL).append(" ").append(s_mars_ineei_INFO3STATE); + if (!s_mars_ineei_INFO3POS.empty()) field_str.append(s_mars_ineei_INFO3POS).append(" / "); + field_str.append(s_mars_ineei_INFO3CALL); + if (!s_mars_ineei_INFO3STATE.empty()) field_str.append(" / ").append(s_mars_ineei_INFO3STATE); } if (!s_mars_ineei_INFO4CALL.empty() || !s_mars_ineei_INFO4POS.empty()) { if (field_str.empty()) field_str.append("\nINFO: "); else field_str.append("\n "); - if (!s_mars_ineei_INFO4POS.empty()) field_str.append(s_mars_ineei_INFO4POS).append("/"); - field_str.append(s_mars_ineei_INFO4CALL).append(" ").append(s_mars_ineei_INFO4STATE); + if (!s_mars_ineei_INFO4POS.empty()) field_str.append(s_mars_ineei_INFO4POS).append(" / "); + field_str.append(s_mars_ineei_INFO4CALL); + if (!s_mars_ineei_INFO4STATE.empty()) field_str.append(" / ").append(s_mars_ineei_INFO4STATE); } if (!s_mars_ineei_INFO5CALL.empty() || !s_mars_ineei_INFO5POS.empty()) { if (field_str.empty()) field_str.append("\nINFO: "); else field_str.append("\n "); - if (!s_mars_ineei_INFO5POS.empty()) field_str.append(s_mars_ineei_INFO5POS).append("/"); - field_str.append(s_mars_ineei_INFO5CALL).append(" ").append(s_mars_ineei_INFO5STATE); + if (!s_mars_ineei_INFO5POS.empty()) field_str.append(s_mars_ineei_INFO5POS).append(" / "); + field_str.append(s_mars_ineei_INFO5CALL); + if (!s_mars_ineei_INFO5STATE.empty()) field_str.append(" / ").append(s_mars_ineei_INFO5STATE); } if (!s_mars_ineei_INFO6CALL.empty() || !s_mars_ineei_INFO6POS.empty()) { if (field_str.empty()) field_str.append("\nINFO: "); else field_str.append("\n "); if (!s_mars_ineei_INFO6POS.empty()) field_str.append(s_mars_ineei_INFO6POS).append("/"); - field_str.append(s_mars_ineei_INFO6CALL).append(" ").append(s_mars_ineei_INFO6STATE); + field_str.append(s_mars_ineei_INFO6CALL); + if (!s_mars_ineei_INFO6STATE.empty()) field_str.append(" / ").append(s_mars_ineei_INFO6STATE); } if (!s_mars_ineei_INFO7CALL.empty() || !s_mars_ineei_INFO7POS.empty()) { if (field_str.empty()) field_str.append("\nINFO: "); else field_str.append("\n "); if (!s_mars_ineei_INFO7POS.empty()) field_str.append(s_mars_ineei_INFO7POS).append("/"); - field_str.append(s_mars_ineei_INFO7CALL).append(" ").append(s_mars_ineei_INFO7STATE); + field_str.append(s_mars_ineei_INFO7CALL); + if (!s_mars_ineei_INFO7STATE.empty()) field_str.append(" / ").append(s_mars_ineei_INFO7STATE); } if (!s_mars_ineei_INFO8CALL.empty() || !s_mars_ineei_INFO8POS.empty()) { if (field_str.empty()) field_str.append("\nINFO: "); else field_str.append("\n "); if (!s_mars_ineei_INFO8POS.empty()) field_str.append(s_mars_ineei_INFO8POS).append("/"); - field_str.append(s_mars_ineei_INFO8CALL).append(" ").append(s_mars_ineei_INFO8STATE); + field_str.append(s_mars_ineei_INFO8CALL); + if (!s_mars_ineei_INFO8STATE.empty()) field_str.append(" / ").append(s_mars_ineei_INFO8STATE); } replacestr(formnet, info_str, field_str); diff --git a/src/mars/mars_ineei_tab.cxx b/src/mars/mars_ineei_tab.cxx index ba34da6..16caa75 100644 --- a/src/mars/mars_ineei_tab.cxx +++ b/src/mars/mars_ineei_tab.cxx @@ -106,7 +106,10 @@ void cb_btn_mars_ineei_pick_fm(Fl_Widget *w, void *d) void cb_btn_mars_ineei_pick_to(Fl_Widget *w, void *d) { if (!get_mars_list_text()) return; - txt_mars_ineei_TOCALL->value(mars_list_bcall.c_str()); + if (!mars_list_bcall.empty()) + txt_mars_ineei_TOCALL->value(mars_list_bcall.c_str()); + else + txt_mars_ineei_TOCALL->value(mars_list_call.c_str()); txt_mars_ineei_TOPOS->value(mars_list_position.c_str()); txt_mars_ineei_TOSTATE->value(mars_list_state.c_str()); } @@ -114,7 +117,10 @@ void cb_btn_mars_ineei_pick_to(Fl_Widget *w, void *d) void cb_btn_mars_ineei_pick_INFO1(Fl_Widget *w, void *d) { if (!get_mars_list_text()) return; - txt_mars_ineei_INFO1CALL->value(mars_list_bcall.c_str()); + if (!mars_list_bcall.empty()) + txt_mars_ineei_INFO1CALL->value(mars_list_bcall.c_str()); + else + txt_mars_ineei_INFO1CALL->value(mars_list_call.c_str()); txt_mars_ineei_INFO1POS->value(mars_list_position.c_str()); txt_mars_ineei_INFO1STATE->value(mars_list_state.c_str()); } @@ -122,7 +128,10 @@ void cb_btn_mars_ineei_pick_INFO1(Fl_Widget *w, void *d) void cb_btn_mars_ineei_pick_INFO2(Fl_Widget *w, void *d) { if (!get_mars_list_text()) return; - txt_mars_ineei_INFO2CALL->value(mars_list_bcall.c_str()); + if (!mars_list_bcall.empty()) + txt_mars_ineei_INFO2CALL->value(mars_list_bcall.c_str()); + else + txt_mars_ineei_INFO2CALL->value(mars_list_call.c_str()); txt_mars_ineei_INFO2POS->value(mars_list_position.c_str()); txt_mars_ineei_INFO2STATE->value(mars_list_state.c_str()); } @@ -130,7 +139,10 @@ void cb_btn_mars_ineei_pick_INFO2(Fl_Widget *w, void *d) void cb_btn_mars_ineei_pick_INFO3(Fl_Widget *w, void *d) { if (!get_mars_list_text()) return; - txt_mars_ineei_INFO3CALL->value(mars_list_bcall.c_str()); + if (!mars_list_bcall.empty()) + txt_mars_ineei_INFO3CALL->value(mars_list_bcall.c_str()); + else + txt_mars_ineei_INFO3CALL->value(mars_list_call.c_str()); txt_mars_ineei_INFO3POS->value(mars_list_position.c_str()); txt_mars_ineei_INFO3STATE->value(mars_list_state.c_str()); } @@ -138,7 +150,10 @@ void cb_btn_mars_ineei_pick_INFO3(Fl_Widget *w, void *d) void cb_btn_mars_ineei_pick_INFO4(Fl_Widget *w, void *d) { if (!get_mars_list_text()) return; - txt_mars_ineei_INFO4CALL->value(mars_list_bcall.c_str()); + if (!mars_list_bcall.empty()) + txt_mars_ineei_INFO4CALL->value(mars_list_bcall.c_str()); + else + txt_mars_ineei_INFO4CALL->value(mars_list_call.c_str()); txt_mars_ineei_INFO4POS->value(mars_list_position.c_str()); txt_mars_ineei_INFO4STATE->value(mars_list_state.c_str()); } @@ -146,7 +161,10 @@ void cb_btn_mars_ineei_pick_INFO4(Fl_Widget *w, void *d) void cb_btn_mars_ineei_pick_INFO5(Fl_Widget *w, void *d) { if (!get_mars_list_text()) return; - txt_mars_ineei_INFO5CALL->value(mars_list_bcall.c_str()); + if (!mars_list_bcall.empty()) + txt_mars_ineei_INFO5CALL->value(mars_list_bcall.c_str()); + else + txt_mars_ineei_INFO5CALL->value(mars_list_call.c_str()); txt_mars_ineei_INFO5POS->value(mars_list_position.c_str()); txt_mars_ineei_INFO5STATE->value(mars_list_state.c_str()); } @@ -154,7 +172,10 @@ void cb_btn_mars_ineei_pick_INFO5(Fl_Widget *w, void *d) void cb_btn_mars_ineei_pick_INFO6(Fl_Widget *w, void *d) { if (!get_mars_list_text()) return; - txt_mars_ineei_INFO6CALL->value(mars_list_bcall.c_str()); + if (!mars_list_bcall.empty()) + txt_mars_ineei_INFO6CALL->value(mars_list_bcall.c_str()); + else + txt_mars_ineei_INFO6CALL->value(mars_list_call.c_str()); txt_mars_ineei_INFO6POS->value(mars_list_position.c_str()); txt_mars_ineei_INFO6STATE->value(mars_list_state.c_str()); } @@ -162,7 +183,10 @@ void cb_btn_mars_ineei_pick_INFO6(Fl_Widget *w, void *d) void cb_btn_mars_ineei_pick_INFO7(Fl_Widget *w, void *d) { if (!get_mars_list_text()) return; - txt_mars_ineei_INFO7CALL->value(mars_list_bcall.c_str()); + if (!mars_list_bcall.empty()) + txt_mars_ineei_INFO7CALL->value(mars_list_bcall.c_str()); + else + txt_mars_ineei_INFO7CALL->value(mars_list_call.c_str()); txt_mars_ineei_INFO7POS->value(mars_list_position.c_str()); txt_mars_ineei_INFO7STATE->value(mars_list_state.c_str()); } @@ -170,7 +194,10 @@ void cb_btn_mars_ineei_pick_INFO7(Fl_Widget *w, void *d) void cb_btn_mars_ineei_pick_INFO8(Fl_Widget *w, void *d) { if (!get_mars_list_text()) return; - txt_mars_ineei_INFO8CALL->value(mars_list_bcall.c_str()); + if (!mars_list_bcall.empty()) + txt_mars_ineei_INFO8CALL->value(mars_list_bcall.c_str()); + else + txt_mars_ineei_INFO8CALL->value(mars_list_call.c_str()); txt_mars_ineei_INFO8POS->value(mars_list_position.c_str()); txt_mars_ineei_INFO8STATE->value(mars_list_state.c_str()); } diff --git a/src/mars/mars_tab.cxx b/src/mars/mars_tab.cxx index 2f956f5..a3e38d8 100644 --- a/src/mars/mars_tab.cxx +++ b/src/mars/mars_tab.cxx @@ -46,6 +46,13 @@ void cb_list_ok(Fl_Widget *w, void *d) { string retstr = brws_mars_list->text(brws_mars_list->value()); mars_list_window->hide(); + + mars_list_call.clear(); + mars_list_lname.clear(); + mars_list_state.clear(); + mars_list_bcall.clear(); + mars_list_position.clear(); + size_t p = retstr.find('\t'); if (p != string::npos) { mars_list_call = retstr.substr(0, p);