kopia lustrzana https://github.com/jamescoxon/dl-fldigi
Remember whether testing flights are shown
rodzic
5f0e7be4d0
commit
e82aa00332
|
@ -3546,7 +3546,7 @@ static void cb_flight_docs_refresh(Fl_Button*, void*) {
|
|||
}
|
||||
|
||||
static void cb_Show(Fl_Check_Button* o, void*) {
|
||||
dl_fldigi::flights::show_testing = o->value();
|
||||
progdefaults.show_testing_flights = o->value();
|
||||
dl_fldigi::flights::populate_flights();
|
||||
}
|
||||
|
||||
|
@ -7649,7 +7649,7 @@ d frequency"));
|
|||
{ Fl_Group* o = new Fl_Group(5, 60, 490, 300, _("Listener Location"));
|
||||
o->box(FL_ENGRAVED_FRAME);
|
||||
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
|
||||
{ Fl_Value_Input2* o = new Fl_Value_Input2(100, 225, 150, 25, _("Baud"));
|
||||
{ Fl_Value_Input* o = new Fl_Value_Input(100, 225, 150, 25, _("Baud"));
|
||||
o->type(2);
|
||||
o->box(FL_DOWN_BOX);
|
||||
o->color(FL_BACKGROUND2_COLOR);
|
||||
|
@ -7753,6 +7753,7 @@ d frequency"));
|
|||
{ Fl_Check_Button* o = new Fl_Check_Button(265, 300, 130, 25, _("Show test docs"));
|
||||
o->down_box(FL_DOWN_BOX);
|
||||
o->callback((Fl_Callback*)cb_Show);
|
||||
o->value(progdefaults.show_testing_flights);
|
||||
} // Fl_Check_Button* o
|
||||
{ flight_search_text = new Fl_Input(75, 300, 120, 25, _("Jump to:"));
|
||||
flight_search_text->callback((Fl_Callback*)cb_flight_search_text);
|
||||
|
|
|
@ -4389,7 +4389,6 @@ dl_fldigi::changed(dl_fldigi::CH_GPS_SETTINGS);
|
|||
btnApplyConfig->activate();}
|
||||
xywh {100 225 150 25} type Int
|
||||
code0 {o->value(progdefaults.gps_speed);}
|
||||
class Fl_Value_Input2
|
||||
}
|
||||
Fl_Button {} {
|
||||
label {Refresh Device List}
|
||||
|
@ -4538,9 +4537,10 @@ if (Fl::event_clicks() > 0 && payload_autoconfigure->active())
|
|||
}
|
||||
Fl_Check_Button {} {
|
||||
label {Show test docs}
|
||||
callback {dl_fldigi::flights::show_testing = o->value();
|
||||
callback {progdefaults.show_testing_flights = o->value();
|
||||
dl_fldigi::flights::populate_flights();}
|
||||
xywh {265 300 130 25} down_box DOWN_BOX
|
||||
code0 {o->value(progdefaults.show_testing_flights);}
|
||||
}
|
||||
Fl_Input flight_search_text {
|
||||
label {Jump to:}
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include "main.h"
|
||||
#include "debug.h"
|
||||
#include "fl_digi.h"
|
||||
#include "configuration.h"
|
||||
#include "confdialog.h"
|
||||
|
||||
#include "dl_fldigi/dl_fldigi.h"
|
||||
|
@ -28,7 +29,7 @@ using namespace std;
|
|||
namespace dl_fldigi {
|
||||
namespace flights {
|
||||
|
||||
bool show_testing, downloaded_once;
|
||||
bool downloaded_once;
|
||||
|
||||
static string cache_file;
|
||||
static vector<Json::Value> flight_docs;
|
||||
|
@ -304,7 +305,7 @@ void populate_flights()
|
|||
continue;
|
||||
}
|
||||
|
||||
if (is_testing_flight(root) && !show_testing)
|
||||
if (is_testing_flight(root) && !progdefaults.show_testing_flights)
|
||||
continue;
|
||||
|
||||
if (hab_ui_exists)
|
||||
|
|
|
@ -1287,6 +1287,8 @@
|
|||
ELEM_(std::string, myAlt, "MYALT", "Stationary listener altitude", "0") \
|
||||
\
|
||||
/* habitat Flight selection stuff */ \
|
||||
ELEM_(bool, show_testing_flights, "FLIGHT_SHOW_TESTING", \
|
||||
"Show testing flight documents?", false) \
|
||||
ELEM_(std::string, tracking_flight, "FLIGHT_DOCID", "The selected flight", "") \
|
||||
ELEM_(std::string, tracking_payload, "FLIGHT_PAYLOAD", \
|
||||
"The payload selected in the current flight", "") \
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
namespace dl_fldigi {
|
||||
namespace flights {
|
||||
|
||||
extern bool show_testing, downloaded_once;
|
||||
extern bool downloaded_once;
|
||||
|
||||
void init();
|
||||
void cleanup();
|
||||
|
|
Ładowanie…
Reference in New Issue