kopia lustrzana https://github.com/jamescoxon/dl-fldigi
Autostart programs
* Add the ability to autostart various programs when fldigi is first started.pull/1/head
rodzic
7515787f23
commit
1afceb0eaf
|
@ -4815,6 +4815,215 @@ static void cb_btn_send_datetime_off(Fl_Check_Button* o, void*) {
|
|||
progdefaults.changed = true;
|
||||
}
|
||||
|
||||
Fl_Group *tabAutoStart=(Fl_Group *)0;
|
||||
|
||||
static void cb_tabAutoStart(Fl_Group*, void*) {
|
||||
progdefaults.changed = true;
|
||||
}
|
||||
|
||||
Fl_Input2 *txt_auto_flrig_pathname=(Fl_Input2 *)0;
|
||||
|
||||
static void cb_txt_auto_flrig_pathname(Fl_Input2* o, void*) {
|
||||
progdefaults.auto_flrig_pathname = o->value();
|
||||
progdefaults.changed = true;
|
||||
}
|
||||
|
||||
Fl_Button *btn_select_flrig=(Fl_Button *)0;
|
||||
|
||||
static void cb_btn_select_flrig(Fl_Button*, void*) {
|
||||
std::string str = select_binary_pathname(progdefaults.auto_flrig_pathname);
|
||||
txt_auto_flrig_pathname->value(str.c_str());
|
||||
progdefaults.auto_flrig_pathname = str;
|
||||
progdefaults.changed = true;
|
||||
}
|
||||
|
||||
Fl_Input2 *txt_auto_flamp_pathname=(Fl_Input2 *)0;
|
||||
|
||||
static void cb_txt_auto_flamp_pathname(Fl_Input2* o, void*) {
|
||||
progdefaults.auto_flamp_pathname = o->value();
|
||||
progdefaults.changed = true;
|
||||
}
|
||||
|
||||
Fl_Button *btn_select_auto_flamp=(Fl_Button *)0;
|
||||
|
||||
static void cb_btn_select_auto_flamp(Fl_Button*, void*) {
|
||||
std::string str = select_binary_pathname(progdefaults.auto_flamp_pathname);
|
||||
txt_auto_flamp_pathname->value(str.c_str());
|
||||
progdefaults.auto_flamp_pathname = str;
|
||||
progdefaults.changed = true;
|
||||
}
|
||||
|
||||
Fl_Input2 *txt_auto_flnet_pathname=(Fl_Input2 *)0;
|
||||
|
||||
static void cb_txt_auto_flnet_pathname(Fl_Input2* o, void*) {
|
||||
progdefaults.flmsg_pathname = o->value();
|
||||
progdefaults.changed = true;
|
||||
}
|
||||
|
||||
Fl_Button *btn_select_auto_flnet=(Fl_Button *)0;
|
||||
|
||||
static void cb_btn_select_auto_flnet(Fl_Button*, void*) {
|
||||
std::string str = select_binary_pathname(progdefaults.auto_flnet_pathname);
|
||||
txt_auto_flnet_pathname->value(str.c_str());
|
||||
progdefaults.auto_flnet_pathname = str;
|
||||
progdefaults.changed = true;
|
||||
}
|
||||
|
||||
Fl_Input2 *txt_auto_fllog_pathname=(Fl_Input2 *)0;
|
||||
|
||||
static void cb_txt_auto_fllog_pathname(Fl_Input2* o, void*) {
|
||||
progdefaults.auto_fllog_pathname = o->value();
|
||||
progdefaults.changed = true;
|
||||
}
|
||||
|
||||
Fl_Button *btn_select_fllog=(Fl_Button *)0;
|
||||
|
||||
static void cb_btn_select_fllog(Fl_Button*, void*) {
|
||||
std::string str = select_binary_pathname(progdefaults.auto_fllog_pathname);
|
||||
txt_auto_fllog_pathname->value(str.c_str());
|
||||
progdefaults.auto_fllog_pathname = str;
|
||||
progdefaults.changed = true;
|
||||
}
|
||||
|
||||
Fl_Input2 *txt_auto_prog1_pathname=(Fl_Input2 *)0;
|
||||
|
||||
static void cb_txt_auto_prog1_pathname(Fl_Input2* o, void*) {
|
||||
progdefaults.auto_prog1_pathname = o->value();
|
||||
progdefaults.changed = true;
|
||||
}
|
||||
|
||||
Fl_Button *btn_select_prog1=(Fl_Button *)0;
|
||||
|
||||
static void cb_btn_select_prog1(Fl_Button*, void*) {
|
||||
std::string str = select_binary_pathname(progdefaults.auto_prog1_pathname);
|
||||
txt_auto_prog1_pathname->value(str.c_str());
|
||||
progdefaults.auto_prog1_pathname = str;
|
||||
progdefaults.changed = true;
|
||||
}
|
||||
|
||||
Fl_Input2 *txt_auto_prog2_pathname=(Fl_Input2 *)0;
|
||||
|
||||
static void cb_txt_auto_prog2_pathname(Fl_Input2* o, void*) {
|
||||
progdefaults.auto_prog2_pathname = o->value();
|
||||
progdefaults.changed = true;
|
||||
}
|
||||
|
||||
Fl_Button *btn_select_prog2=(Fl_Button *)0;
|
||||
|
||||
static void cb_btn_select_prog2(Fl_Button*, void*) {
|
||||
std::string str = select_binary_pathname(progdefaults.auto_prog2_pathname);
|
||||
txt_auto_prog2_pathname->value(str.c_str());
|
||||
progdefaults.auto_prog2_pathname = str;
|
||||
progdefaults.changed = true;
|
||||
}
|
||||
|
||||
Fl_Input2 *txt_auto_prog3_pathname=(Fl_Input2 *)0;
|
||||
|
||||
static void cb_txt_auto_prog3_pathname(Fl_Input2* o, void*) {
|
||||
progdefaults.auto_prog3_pathname = o->value();
|
||||
progdefaults.changed = true;
|
||||
}
|
||||
|
||||
Fl_Button *btn_select_prog3=(Fl_Button *)0;
|
||||
|
||||
static void cb_btn_select_prog3(Fl_Button*, void*) {
|
||||
std::string str = select_binary_pathname(progdefaults.auto_prog3_pathname);
|
||||
txt_auto_prog3_pathname->value(str.c_str());
|
||||
progdefaults.auto_prog3_pathname = str;
|
||||
progdefaults.changed = true;
|
||||
}
|
||||
|
||||
Fl_Check_Button *btn_flrig_auto_enable=(Fl_Check_Button *)0;
|
||||
|
||||
static void cb_btn_flrig_auto_enable(Fl_Check_Button* o, void*) {
|
||||
progdefaults.flrig_auto_enable = o->value();
|
||||
progdefaults.changed = true;
|
||||
}
|
||||
|
||||
Fl_Check_Button *btn_flamp_auto_enable=(Fl_Check_Button *)0;
|
||||
|
||||
static void cb_btn_flamp_auto_enable(Fl_Check_Button* o, void*) {
|
||||
progdefaults.flamp_auto_enable = o->value();
|
||||
progdefaults.changed = true;
|
||||
}
|
||||
|
||||
Fl_Check_Button *btn_flnet_auto_enable=(Fl_Check_Button *)0;
|
||||
|
||||
static void cb_btn_flnet_auto_enable(Fl_Check_Button* o, void*) {
|
||||
progdefaults.flnet_auto_enable = o->value();
|
||||
progdefaults.changed = true;
|
||||
}
|
||||
|
||||
Fl_Check_Button *btn_fllog_auto_enable=(Fl_Check_Button *)0;
|
||||
|
||||
static void cb_btn_fllog_auto_enable(Fl_Check_Button* o, void*) {
|
||||
progdefaults.fllog_auto_enable = o->value();
|
||||
progdefaults.changed = true;
|
||||
}
|
||||
|
||||
Fl_Check_Button *btn_prog1_auto_enable=(Fl_Check_Button *)0;
|
||||
|
||||
static void cb_btn_prog1_auto_enable(Fl_Check_Button* o, void*) {
|
||||
progdefaults.prog1_auto_enable = o->value();
|
||||
progdefaults.changed = true;
|
||||
}
|
||||
|
||||
Fl_Check_Button *btn_prog2_auto_enable=(Fl_Check_Button *)0;
|
||||
|
||||
static void cb_btn_prog2_auto_enable(Fl_Check_Button* o, void*) {
|
||||
progdefaults.prog2_auto_enable = o->value();
|
||||
progdefaults.changed = true;
|
||||
}
|
||||
|
||||
Fl_Check_Button *btn_prog3_auto_enable=(Fl_Check_Button *)0;
|
||||
|
||||
static void cb_btn_prog3_auto_enable(Fl_Check_Button* o, void*) {
|
||||
progdefaults.prog3_auto_enable = o->value();
|
||||
progdefaults.changed = true;
|
||||
}
|
||||
|
||||
Fl_Button *btn_test_flrig=(Fl_Button *)0;
|
||||
|
||||
static void cb_btn_test_flrig(Fl_Button*, void*) {
|
||||
start_process(progdefaults.auto_flrig_pathname);
|
||||
}
|
||||
|
||||
Fl_Button *btn_test_flamp=(Fl_Button *)0;
|
||||
|
||||
static void cb_btn_test_flamp(Fl_Button*, void*) {
|
||||
start_process(progdefaults.auto_flamp_pathname);
|
||||
}
|
||||
|
||||
Fl_Button *btn_test_flnet=(Fl_Button *)0;
|
||||
|
||||
static void cb_btn_test_flnet(Fl_Button*, void*) {
|
||||
start_process(progdefaults.auto_flnet_pathname);
|
||||
}
|
||||
|
||||
Fl_Button *btn_test_fllog=(Fl_Button *)0;
|
||||
|
||||
static void cb_btn_test_fllog(Fl_Button*, void*) {
|
||||
start_process(progdefaults.auto_fllog_pathname);
|
||||
}
|
||||
|
||||
Fl_Button *btn_test_prog1=(Fl_Button *)0;
|
||||
|
||||
static void cb_btn_test_prog1(Fl_Button*, void*) {
|
||||
start_process(progdefaults.auto_prog1_pathname);
|
||||
}
|
||||
|
||||
Fl_Button *btn_test_prog2=(Fl_Button *)0;
|
||||
|
||||
static void cb_btn_test_prog2(Fl_Button*, void*) {
|
||||
start_process(progdefaults.auto_prog2_pathname);
|
||||
}
|
||||
|
||||
Fl_Button *btn_test_prog3=(Fl_Button *)0;
|
||||
|
||||
static void cb_btn_test_prog3(Fl_Button*, void*) {
|
||||
start_process(progdefaults.auto_prog3_pathname);
|
||||
}
|
||||
|
||||
Fl_Button *btnSaveConfig=(Fl_Button *)0;
|
||||
|
||||
static void cb_btnSaveConfig(Fl_Button*, void*) {
|
||||
|
@ -6360,6 +6569,7 @@ an merging"));
|
|||
tabsModems->selection_color(FL_LIGHT1);
|
||||
tabsModems->align(Fl_Align(FL_ALIGN_TOP_RIGHT));
|
||||
{ tabCW = new Fl_Group(0, 50, 540, 320, _("CW"));
|
||||
tabCW->hide();
|
||||
{ tabsCW = new Fl_Tabs(0, 50, 540, 320);
|
||||
tabsCW->selection_color(FL_LIGHT1);
|
||||
{ Fl_Group* o = new Fl_Group(0, 75, 540, 295, _("General"));
|
||||
|
@ -7346,7 +7556,6 @@ an merging"));
|
|||
tabPacket->end();
|
||||
} // Fl_Group* tabPacket
|
||||
{ tabPSK = new Fl_Group(0, 50, 540, 322, _("PSK"));
|
||||
tabPSK->hide();
|
||||
{ tabsPSK = new Fl_Tabs(0, 50, 540, 322);
|
||||
tabsPSK->selection_color(FL_LIGHT1);
|
||||
{ Fl_Group* o = new Fl_Group(0, 75, 540, 295, _("General"));
|
||||
|
@ -8920,6 +9129,7 @@ igured on the\n\"Notifications\" configure dialog."));
|
|||
{ tabsMisc = new Fl_Tabs(0, 25, 540, 345);
|
||||
tabsMisc->selection_color(FL_LIGHT1);
|
||||
{ tabCPUspeed = new Fl_Group(0, 50, 540, 320, _("CPU"));
|
||||
tabCPUspeed->hide();
|
||||
{ Fl_Group* o = new Fl_Group(25, 75, 490, 51);
|
||||
o->box(FL_ENGRAVED_FRAME);
|
||||
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
|
||||
|
@ -8934,7 +9144,6 @@ igured on the\n\"Notifications\" configure dialog."));
|
|||
tabCPUspeed->end();
|
||||
} // Fl_Group* tabCPUspeed
|
||||
{ tabNBEMS = new Fl_Group(0, 50, 540, 320, _("NBEMS"));
|
||||
tabNBEMS->hide();
|
||||
{ Fl_Group* o = new Fl_Group(20, 65, 500, 75, _("NBEMS data file interface"));
|
||||
o->box(FL_ENGRAVED_FRAME);
|
||||
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
|
||||
|
@ -9719,6 +9928,208 @@ and restarted if needed."));
|
|||
} // Fl_Tabs* tabsQRZ
|
||||
tabQRZ->end();
|
||||
} // Fl_Group* tabQRZ
|
||||
{ tabAutoStart = new Fl_Group(0, 25, 540, 345, _("Autostart"));
|
||||
tabAutoStart->tooltip(_("Operator information"));
|
||||
tabAutoStart->callback((Fl_Callback*)cb_tabAutoStart);
|
||||
tabAutoStart->when(FL_WHEN_CHANGED);
|
||||
tabAutoStart->hide();
|
||||
{ Fl_Group* o = new Fl_Group(2, 32, 536, 336, _("Auto start programs with fldigi"));
|
||||
o->box(FL_ENGRAVED_BOX);
|
||||
o->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
|
||||
{ Fl_Input2* o = txt_auto_flrig_pathname = new Fl_Input2(63, 71, 310, 24, _("flrig:"));
|
||||
txt_auto_flrig_pathname->tooltip(_("Enter full path-filename for flrig"));
|
||||
txt_auto_flrig_pathname->box(FL_DOWN_BOX);
|
||||
txt_auto_flrig_pathname->color(FL_BACKGROUND2_COLOR);
|
||||
txt_auto_flrig_pathname->selection_color(FL_SELECTION_COLOR);
|
||||
txt_auto_flrig_pathname->labeltype(FL_NORMAL_LABEL);
|
||||
txt_auto_flrig_pathname->labelfont(0);
|
||||
txt_auto_flrig_pathname->labelsize(14);
|
||||
txt_auto_flrig_pathname->labelcolor(FL_FOREGROUND_COLOR);
|
||||
txt_auto_flrig_pathname->callback((Fl_Callback*)cb_txt_auto_flrig_pathname);
|
||||
txt_auto_flrig_pathname->align(Fl_Align(FL_ALIGN_LEFT));
|
||||
txt_auto_flrig_pathname->when(FL_WHEN_CHANGED);
|
||||
o->value(progdefaults.auto_flrig_pathname.c_str());
|
||||
} // Fl_Input2* txt_auto_flrig_pathname
|
||||
{ btn_select_flrig = new Fl_Button(380, 71, 70, 24, _("Locate"));
|
||||
btn_select_flrig->tooltip(_("Locate flrig executable"));
|
||||
btn_select_flrig->callback((Fl_Callback*)cb_btn_select_flrig);
|
||||
} // Fl_Button* btn_select_flrig
|
||||
{ Fl_Input2* o = txt_auto_flamp_pathname = new Fl_Input2(63, 109, 310, 24, _("flamp:"));
|
||||
txt_auto_flamp_pathname->tooltip(_("Enter full path-filename for flamp"));
|
||||
txt_auto_flamp_pathname->box(FL_DOWN_BOX);
|
||||
txt_auto_flamp_pathname->color(FL_BACKGROUND2_COLOR);
|
||||
txt_auto_flamp_pathname->selection_color(FL_SELECTION_COLOR);
|
||||
txt_auto_flamp_pathname->labeltype(FL_NORMAL_LABEL);
|
||||
txt_auto_flamp_pathname->labelfont(0);
|
||||
txt_auto_flamp_pathname->labelsize(14);
|
||||
txt_auto_flamp_pathname->labelcolor(FL_FOREGROUND_COLOR);
|
||||
txt_auto_flamp_pathname->callback((Fl_Callback*)cb_txt_auto_flamp_pathname);
|
||||
txt_auto_flamp_pathname->align(Fl_Align(FL_ALIGN_LEFT));
|
||||
txt_auto_flamp_pathname->when(FL_WHEN_CHANGED);
|
||||
o->value(progdefaults.auto_flamp_pathname.c_str());
|
||||
} // Fl_Input2* txt_auto_flamp_pathname
|
||||
{ btn_select_auto_flamp = new Fl_Button(380, 109, 70, 24, _("Locate"));
|
||||
btn_select_auto_flamp->tooltip(_("Locate flamp executable"));
|
||||
btn_select_auto_flamp->callback((Fl_Callback*)cb_btn_select_auto_flamp);
|
||||
} // Fl_Button* btn_select_auto_flamp
|
||||
{ Fl_Input2* o = txt_auto_flnet_pathname = new Fl_Input2(63, 147, 310, 24, _("flnet:"));
|
||||
txt_auto_flnet_pathname->tooltip(_("Enter full path-filename for flnet"));
|
||||
txt_auto_flnet_pathname->box(FL_DOWN_BOX);
|
||||
txt_auto_flnet_pathname->color(FL_BACKGROUND2_COLOR);
|
||||
txt_auto_flnet_pathname->selection_color(FL_SELECTION_COLOR);
|
||||
txt_auto_flnet_pathname->labeltype(FL_NORMAL_LABEL);
|
||||
txt_auto_flnet_pathname->labelfont(0);
|
||||
txt_auto_flnet_pathname->labelsize(14);
|
||||
txt_auto_flnet_pathname->labelcolor(FL_FOREGROUND_COLOR);
|
||||
txt_auto_flnet_pathname->callback((Fl_Callback*)cb_txt_auto_flnet_pathname);
|
||||
txt_auto_flnet_pathname->align(Fl_Align(FL_ALIGN_LEFT));
|
||||
txt_auto_flnet_pathname->when(FL_WHEN_CHANGED);
|
||||
o->value(progdefaults.auto_flnet_pathname.c_str());
|
||||
} // Fl_Input2* txt_auto_flnet_pathname
|
||||
{ btn_select_auto_flnet = new Fl_Button(380, 147, 70, 24, _("Locate"));
|
||||
btn_select_auto_flnet->tooltip(_("Locate flnet executable"));
|
||||
btn_select_auto_flnet->callback((Fl_Callback*)cb_btn_select_auto_flnet);
|
||||
} // Fl_Button* btn_select_auto_flnet
|
||||
{ Fl_Input2* o = txt_auto_fllog_pathname = new Fl_Input2(63, 186, 310, 24, _("fllog:"));
|
||||
txt_auto_fllog_pathname->tooltip(_("Enter full path-filename for fllog"));
|
||||
txt_auto_fllog_pathname->box(FL_DOWN_BOX);
|
||||
txt_auto_fllog_pathname->color(FL_BACKGROUND2_COLOR);
|
||||
txt_auto_fllog_pathname->selection_color(FL_SELECTION_COLOR);
|
||||
txt_auto_fllog_pathname->labeltype(FL_NORMAL_LABEL);
|
||||
txt_auto_fllog_pathname->labelfont(0);
|
||||
txt_auto_fllog_pathname->labelsize(14);
|
||||
txt_auto_fllog_pathname->labelcolor(FL_FOREGROUND_COLOR);
|
||||
txt_auto_fllog_pathname->callback((Fl_Callback*)cb_txt_auto_fllog_pathname);
|
||||
txt_auto_fllog_pathname->align(Fl_Align(FL_ALIGN_LEFT));
|
||||
txt_auto_fllog_pathname->when(FL_WHEN_CHANGED);
|
||||
o->value(progdefaults.auto_fllog_pathname.c_str());
|
||||
} // Fl_Input2* txt_auto_fllog_pathname
|
||||
{ btn_select_fllog = new Fl_Button(380, 186, 70, 24, _("Locate"));
|
||||
btn_select_fllog->tooltip(_("Locate flmsg executable"));
|
||||
btn_select_fllog->callback((Fl_Callback*)cb_btn_select_fllog);
|
||||
} // Fl_Button* btn_select_fllog
|
||||
{ Fl_Input2* o = txt_auto_prog1_pathname = new Fl_Input2(63, 224, 310, 24, _("Prog 1:"));
|
||||
txt_auto_prog1_pathname->tooltip(_("Enter full path-filename for external program"));
|
||||
txt_auto_prog1_pathname->box(FL_DOWN_BOX);
|
||||
txt_auto_prog1_pathname->color(FL_BACKGROUND2_COLOR);
|
||||
txt_auto_prog1_pathname->selection_color(FL_SELECTION_COLOR);
|
||||
txt_auto_prog1_pathname->labeltype(FL_NORMAL_LABEL);
|
||||
txt_auto_prog1_pathname->labelfont(0);
|
||||
txt_auto_prog1_pathname->labelsize(14);
|
||||
txt_auto_prog1_pathname->labelcolor(FL_FOREGROUND_COLOR);
|
||||
txt_auto_prog1_pathname->callback((Fl_Callback*)cb_txt_auto_prog1_pathname);
|
||||
txt_auto_prog1_pathname->align(Fl_Align(FL_ALIGN_LEFT));
|
||||
txt_auto_prog1_pathname->when(FL_WHEN_CHANGED);
|
||||
o->value(progdefaults.auto_prog1_pathname.c_str());
|
||||
} // Fl_Input2* txt_auto_prog1_pathname
|
||||
{ btn_select_prog1 = new Fl_Button(380, 224, 70, 24, _("Locate"));
|
||||
btn_select_prog1->tooltip(_("Locate flmsg executable"));
|
||||
btn_select_prog1->callback((Fl_Callback*)cb_btn_select_prog1);
|
||||
} // Fl_Button* btn_select_prog1
|
||||
{ Fl_Input2* o = txt_auto_prog2_pathname = new Fl_Input2(63, 262, 310, 24, _("Prog 2:"));
|
||||
txt_auto_prog2_pathname->tooltip(_("Enter full path-filename for external program"));
|
||||
txt_auto_prog2_pathname->box(FL_DOWN_BOX);
|
||||
txt_auto_prog2_pathname->color(FL_BACKGROUND2_COLOR);
|
||||
txt_auto_prog2_pathname->selection_color(FL_SELECTION_COLOR);
|
||||
txt_auto_prog2_pathname->labeltype(FL_NORMAL_LABEL);
|
||||
txt_auto_prog2_pathname->labelfont(0);
|
||||
txt_auto_prog2_pathname->labelsize(14);
|
||||
txt_auto_prog2_pathname->labelcolor(FL_FOREGROUND_COLOR);
|
||||
txt_auto_prog2_pathname->callback((Fl_Callback*)cb_txt_auto_prog2_pathname);
|
||||
txt_auto_prog2_pathname->align(Fl_Align(FL_ALIGN_LEFT));
|
||||
txt_auto_prog2_pathname->when(FL_WHEN_CHANGED);
|
||||
o->value(progdefaults.auto_prog2_pathname.c_str());
|
||||
} // Fl_Input2* txt_auto_prog2_pathname
|
||||
{ btn_select_prog2 = new Fl_Button(380, 262, 70, 24, _("Locate"));
|
||||
btn_select_prog2->tooltip(_("Locate flmsg executable"));
|
||||
btn_select_prog2->callback((Fl_Callback*)cb_btn_select_prog2);
|
||||
} // Fl_Button* btn_select_prog2
|
||||
{ Fl_Input2* o = txt_auto_prog3_pathname = new Fl_Input2(63, 301, 310, 24, _("Prog 3:"));
|
||||
txt_auto_prog3_pathname->tooltip(_("Enter full path-filename for external program"));
|
||||
txt_auto_prog3_pathname->box(FL_DOWN_BOX);
|
||||
txt_auto_prog3_pathname->color(FL_BACKGROUND2_COLOR);
|
||||
txt_auto_prog3_pathname->selection_color(FL_SELECTION_COLOR);
|
||||
txt_auto_prog3_pathname->labeltype(FL_NORMAL_LABEL);
|
||||
txt_auto_prog3_pathname->labelfont(0);
|
||||
txt_auto_prog3_pathname->labelsize(14);
|
||||
txt_auto_prog3_pathname->labelcolor(FL_FOREGROUND_COLOR);
|
||||
txt_auto_prog3_pathname->callback((Fl_Callback*)cb_txt_auto_prog3_pathname);
|
||||
txt_auto_prog3_pathname->align(Fl_Align(FL_ALIGN_LEFT));
|
||||
txt_auto_prog3_pathname->when(FL_WHEN_CHANGED);
|
||||
o->value(progdefaults.auto_prog3_pathname.c_str());
|
||||
} // Fl_Input2* txt_auto_prog3_pathname
|
||||
{ btn_select_prog3 = new Fl_Button(380, 301, 70, 24, _("Locate"));
|
||||
btn_select_prog3->tooltip(_("Locate flmsg executable"));
|
||||
btn_select_prog3->callback((Fl_Callback*)cb_btn_select_prog3);
|
||||
} // Fl_Button* btn_select_prog3
|
||||
{ Fl_Check_Button* o = btn_flrig_auto_enable = new Fl_Check_Button(455, 75, 19, 15, _("Enable\n-"));
|
||||
btn_flrig_auto_enable->down_box(FL_DOWN_BOX);
|
||||
btn_flrig_auto_enable->callback((Fl_Callback*)cb_btn_flrig_auto_enable);
|
||||
btn_flrig_auto_enable->align(Fl_Align(FL_ALIGN_TOP));
|
||||
o->value(progdefaults.flrig_auto_enable);
|
||||
} // Fl_Check_Button* btn_flrig_auto_enable
|
||||
{ Fl_Check_Button* o = btn_flamp_auto_enable = new Fl_Check_Button(455, 113, 23, 15);
|
||||
btn_flamp_auto_enable->down_box(FL_DOWN_BOX);
|
||||
btn_flamp_auto_enable->callback((Fl_Callback*)cb_btn_flamp_auto_enable);
|
||||
o->value(progdefaults.flamp_auto_enable);
|
||||
} // Fl_Check_Button* btn_flamp_auto_enable
|
||||
{ Fl_Check_Button* o = btn_flnet_auto_enable = new Fl_Check_Button(455, 151, 23, 15);
|
||||
btn_flnet_auto_enable->down_box(FL_DOWN_BOX);
|
||||
btn_flnet_auto_enable->callback((Fl_Callback*)cb_btn_flnet_auto_enable);
|
||||
o->value(progdefaults.flnet_auto_enable);
|
||||
} // Fl_Check_Button* btn_flnet_auto_enable
|
||||
{ Fl_Check_Button* o = btn_fllog_auto_enable = new Fl_Check_Button(455, 190, 23, 15);
|
||||
btn_fllog_auto_enable->down_box(FL_DOWN_BOX);
|
||||
btn_fllog_auto_enable->callback((Fl_Callback*)cb_btn_fllog_auto_enable);
|
||||
o->value(progdefaults.fllog_auto_enable);
|
||||
} // Fl_Check_Button* btn_fllog_auto_enable
|
||||
{ Fl_Check_Button* o = btn_prog1_auto_enable = new Fl_Check_Button(455, 228, 23, 15);
|
||||
btn_prog1_auto_enable->down_box(FL_DOWN_BOX);
|
||||
btn_prog1_auto_enable->callback((Fl_Callback*)cb_btn_prog1_auto_enable);
|
||||
o->value(progdefaults.prog1_auto_enable);
|
||||
} // Fl_Check_Button* btn_prog1_auto_enable
|
||||
{ Fl_Check_Button* o = btn_prog2_auto_enable = new Fl_Check_Button(455, 266, 23, 15);
|
||||
btn_prog2_auto_enable->down_box(FL_DOWN_BOX);
|
||||
btn_prog2_auto_enable->callback((Fl_Callback*)cb_btn_prog2_auto_enable);
|
||||
o->value(progdefaults.prog2_auto_enable);
|
||||
} // Fl_Check_Button* btn_prog2_auto_enable
|
||||
{ Fl_Check_Button* o = btn_prog3_auto_enable = new Fl_Check_Button(455, 305, 23, 15);
|
||||
btn_prog3_auto_enable->down_box(FL_DOWN_BOX);
|
||||
btn_prog3_auto_enable->callback((Fl_Callback*)cb_btn_prog3_auto_enable);
|
||||
o->value(progdefaults.prog3_auto_enable);
|
||||
} // Fl_Check_Button* btn_prog3_auto_enable
|
||||
{ btn_test_flrig = new Fl_Button(479, 71, 50, 24, _("Test"));
|
||||
btn_test_flrig->tooltip(_("Start flrig"));
|
||||
btn_test_flrig->callback((Fl_Callback*)cb_btn_test_flrig);
|
||||
} // Fl_Button* btn_test_flrig
|
||||
{ btn_test_flamp = new Fl_Button(479, 109, 50, 24, _("Test"));
|
||||
btn_test_flamp->tooltip(_("Start flamp"));
|
||||
btn_test_flamp->callback((Fl_Callback*)cb_btn_test_flamp);
|
||||
} // Fl_Button* btn_test_flamp
|
||||
{ btn_test_flnet = new Fl_Button(479, 147, 50, 24, _("Test"));
|
||||
btn_test_flnet->tooltip(_("Start flnet"));
|
||||
btn_test_flnet->callback((Fl_Callback*)cb_btn_test_flnet);
|
||||
} // Fl_Button* btn_test_flnet
|
||||
{ btn_test_fllog = new Fl_Button(479, 186, 50, 24, _("Test"));
|
||||
btn_test_fllog->tooltip(_("Start fllog"));
|
||||
btn_test_fllog->callback((Fl_Callback*)cb_btn_test_fllog);
|
||||
} // Fl_Button* btn_test_fllog
|
||||
{ btn_test_prog1 = new Fl_Button(479, 224, 50, 24, _("Test"));
|
||||
btn_test_prog1->tooltip(_("Start prog1"));
|
||||
btn_test_prog1->callback((Fl_Callback*)cb_btn_test_prog1);
|
||||
} // Fl_Button* btn_test_prog1
|
||||
{ btn_test_prog2 = new Fl_Button(479, 262, 50, 24, _("Test"));
|
||||
btn_test_prog2->tooltip(_("Start prog2"));
|
||||
btn_test_prog2->callback((Fl_Callback*)cb_btn_test_prog2);
|
||||
} // Fl_Button* btn_test_prog2
|
||||
{ btn_test_prog3 = new Fl_Button(479, 301, 50, 24, _("Test"));
|
||||
btn_test_prog3->tooltip(_("Start prog3"));
|
||||
btn_test_prog3->callback((Fl_Callback*)cb_btn_test_prog3);
|
||||
} // Fl_Button* btn_test_prog3
|
||||
o->end();
|
||||
} // Fl_Group* o
|
||||
tabAutoStart->end();
|
||||
} // Fl_Group* tabAutoStart
|
||||
tabsConfigure->end();
|
||||
} // Fl_Tabs* tabsConfigure
|
||||
{ btnSaveConfig = new Fl_Button(251, 375, 130, 22, _("Save"));
|
||||
|
|
|
@ -2525,7 +2525,7 @@ behaves inside the waterfall} xywh {34 207 150 22} down_box BORDER_BOX align 8
|
|||
} {
|
||||
Fl_Group tabCW {
|
||||
label CW
|
||||
xywh {0 50 540 320}
|
||||
xywh {0 50 540 320} hide
|
||||
} {
|
||||
Fl_Tabs tabsCW {open
|
||||
xywh {0 50 540 320} selection_color 50
|
||||
|
@ -3405,8 +3405,8 @@ progdefaults.changed = true;}
|
|||
}
|
||||
}
|
||||
Fl_Group tabPSK {
|
||||
label PSK open
|
||||
xywh {0 50 540 322} hide
|
||||
label PSK
|
||||
xywh {0 50 540 322}
|
||||
} {
|
||||
Fl_Tabs tabsPSK {open
|
||||
xywh {0 50 540 322} selection_color 50
|
||||
|
@ -5194,7 +5194,7 @@ progdefaults.changed = true;}
|
|||
} {
|
||||
Fl_Group tabCPUspeed {
|
||||
label CPU open
|
||||
xywh {0 50 540 320}
|
||||
xywh {0 50 540 320} hide
|
||||
} {
|
||||
Fl_Group {} {open
|
||||
xywh {25 75 490 51} box ENGRAVED_FRAME align 21
|
||||
|
@ -5209,8 +5209,8 @@ progdefaults.changed = true;}
|
|||
}
|
||||
}
|
||||
Fl_Group tabNBEMS {
|
||||
label NBEMS
|
||||
xywh {0 50 540 320} hide
|
||||
label NBEMS open
|
||||
xywh {0 50 540 320}
|
||||
} {
|
||||
Fl_Group {} {
|
||||
label {NBEMS data file interface} open
|
||||
|
@ -5957,6 +5957,208 @@ progdefaults.changed = true;}
|
|||
}
|
||||
}
|
||||
}
|
||||
Fl_Group tabAutoStart {
|
||||
label Autostart
|
||||
callback {progdefaults.changed = true;} open
|
||||
tooltip {Operator information} xywh {0 25 540 345} when 1 hide
|
||||
} {
|
||||
Fl_Group {} {
|
||||
label {Auto start programs with fldigi} open
|
||||
xywh {2 32 536 336} box ENGRAVED_BOX align 17
|
||||
} {
|
||||
Fl_Input txt_auto_flrig_pathname {
|
||||
label {flrig:}
|
||||
callback {progdefaults.auto_flrig_pathname = o->value();
|
||||
progdefaults.changed = true;}
|
||||
tooltip {Enter full path-filename for flrig} xywh {63 71 310 24} when 1
|
||||
code0 {o->value(progdefaults.auto_flrig_pathname.c_str());}
|
||||
class Fl_Input2
|
||||
}
|
||||
Fl_Button btn_select_flrig {
|
||||
label Locate
|
||||
callback {std::string str = select_binary_pathname(progdefaults.auto_flrig_pathname);
|
||||
txt_auto_flrig_pathname->value(str.c_str());
|
||||
progdefaults.auto_flrig_pathname = str;
|
||||
progdefaults.changed = true;}
|
||||
tooltip {Locate flrig executable} xywh {380 71 70 24}
|
||||
}
|
||||
Fl_Input txt_auto_flamp_pathname {
|
||||
label {flamp:}
|
||||
callback {progdefaults.auto_flamp_pathname = o->value();
|
||||
progdefaults.changed = true;}
|
||||
tooltip {Enter full path-filename for flamp} xywh {63 109 310 24} when 1
|
||||
code0 {o->value(progdefaults.auto_flamp_pathname.c_str());}
|
||||
class Fl_Input2
|
||||
}
|
||||
Fl_Button btn_select_auto_flamp {
|
||||
label Locate
|
||||
callback {std::string str = select_binary_pathname(progdefaults.auto_flamp_pathname);
|
||||
txt_auto_flamp_pathname->value(str.c_str());
|
||||
progdefaults.auto_flamp_pathname = str;
|
||||
progdefaults.changed = true;}
|
||||
tooltip {Locate flamp executable} xywh {380 109 70 24}
|
||||
}
|
||||
Fl_Input txt_auto_flnet_pathname {
|
||||
label {flnet:}
|
||||
callback {progdefaults.flmsg_pathname = o->value();
|
||||
progdefaults.changed = true;}
|
||||
tooltip {Enter full path-filename for flnet} xywh {63 147 310 24} when 1
|
||||
code0 {o->value(progdefaults.auto_flnet_pathname.c_str());}
|
||||
class Fl_Input2
|
||||
}
|
||||
Fl_Button btn_select_auto_flnet {
|
||||
label Locate
|
||||
callback {std::string str = select_binary_pathname(progdefaults.auto_flnet_pathname);
|
||||
txt_auto_flnet_pathname->value(str.c_str());
|
||||
progdefaults.auto_flnet_pathname = str;
|
||||
progdefaults.changed = true;}
|
||||
tooltip {Locate flnet executable} xywh {380 147 70 24}
|
||||
}
|
||||
Fl_Input txt_auto_fllog_pathname {
|
||||
label {fllog:}
|
||||
callback {progdefaults.auto_fllog_pathname = o->value();
|
||||
progdefaults.changed = true;}
|
||||
tooltip {Enter full path-filename for fllog} xywh {63 186 310 24} when 1
|
||||
code0 {o->value(progdefaults.auto_fllog_pathname.c_str());}
|
||||
class Fl_Input2
|
||||
}
|
||||
Fl_Button btn_select_fllog {
|
||||
label Locate
|
||||
callback {std::string str = select_binary_pathname(progdefaults.auto_fllog_pathname);
|
||||
txt_auto_fllog_pathname->value(str.c_str());
|
||||
progdefaults.auto_fllog_pathname = str;
|
||||
progdefaults.changed = true;}
|
||||
tooltip {Locate flmsg executable} xywh {380 186 70 24}
|
||||
}
|
||||
Fl_Input txt_auto_prog1_pathname {
|
||||
label {Prog 1:}
|
||||
callback {progdefaults.auto_prog1_pathname = o->value();
|
||||
progdefaults.changed = true;}
|
||||
tooltip {Enter full path-filename for external program} xywh {63 224 310 24} when 1
|
||||
code0 {o->value(progdefaults.auto_prog1_pathname.c_str());}
|
||||
class Fl_Input2
|
||||
}
|
||||
Fl_Button btn_select_prog1 {
|
||||
label Locate
|
||||
callback {std::string str = select_binary_pathname(progdefaults.auto_prog1_pathname);
|
||||
txt_auto_prog1_pathname->value(str.c_str());
|
||||
progdefaults.auto_prog1_pathname = str;
|
||||
progdefaults.changed = true;}
|
||||
tooltip {Locate flmsg executable} xywh {380 224 70 24}
|
||||
}
|
||||
Fl_Input txt_auto_prog2_pathname {
|
||||
label {Prog 2:}
|
||||
callback {progdefaults.auto_prog2_pathname = o->value();
|
||||
progdefaults.changed = true;}
|
||||
tooltip {Enter full path-filename for external program} xywh {63 262 310 24} when 1
|
||||
code0 {o->value(progdefaults.auto_prog2_pathname.c_str());}
|
||||
class Fl_Input2
|
||||
}
|
||||
Fl_Button btn_select_prog2 {
|
||||
label Locate
|
||||
callback {std::string str = select_binary_pathname(progdefaults.auto_prog2_pathname);
|
||||
txt_auto_prog2_pathname->value(str.c_str());
|
||||
progdefaults.auto_prog2_pathname = str;
|
||||
progdefaults.changed = true;}
|
||||
tooltip {Locate flmsg executable} xywh {380 262 70 24}
|
||||
}
|
||||
Fl_Input txt_auto_prog3_pathname {
|
||||
label {Prog 3:}
|
||||
callback {progdefaults.auto_prog3_pathname = o->value();
|
||||
progdefaults.changed = true;}
|
||||
tooltip {Enter full path-filename for external program} xywh {63 301 310 24} when 1
|
||||
code0 {o->value(progdefaults.auto_prog3_pathname.c_str());}
|
||||
class Fl_Input2
|
||||
}
|
||||
Fl_Button btn_select_prog3 {
|
||||
label Locate
|
||||
callback {std::string str = select_binary_pathname(progdefaults.auto_prog3_pathname);
|
||||
txt_auto_prog3_pathname->value(str.c_str());
|
||||
progdefaults.auto_prog3_pathname = str;
|
||||
progdefaults.changed = true;}
|
||||
tooltip {Locate flmsg executable} xywh {380 301 70 24}
|
||||
}
|
||||
Fl_Check_Button btn_flrig_auto_enable {
|
||||
label {Enable
|
||||
-}
|
||||
callback {progdefaults.flrig_auto_enable = o->value();
|
||||
progdefaults.changed = true;}
|
||||
xywh {455 75 19 15} down_box DOWN_BOX align 1
|
||||
code0 {o->value(progdefaults.flrig_auto_enable);}
|
||||
}
|
||||
Fl_Check_Button btn_flamp_auto_enable {
|
||||
callback {progdefaults.flamp_auto_enable = o->value();
|
||||
progdefaults.changed = true;}
|
||||
xywh {455 113 23 15} down_box DOWN_BOX
|
||||
code0 {o->value(progdefaults.flamp_auto_enable);}
|
||||
}
|
||||
Fl_Check_Button btn_flnet_auto_enable {
|
||||
callback {progdefaults.flnet_auto_enable = o->value();
|
||||
progdefaults.changed = true;}
|
||||
xywh {455 151 23 15} down_box DOWN_BOX
|
||||
code0 {o->value(progdefaults.flnet_auto_enable);}
|
||||
}
|
||||
Fl_Check_Button btn_fllog_auto_enable {
|
||||
callback {progdefaults.fllog_auto_enable = o->value();
|
||||
progdefaults.changed = true;}
|
||||
xywh {455 190 23 15} down_box DOWN_BOX
|
||||
code0 {o->value(progdefaults.fllog_auto_enable);}
|
||||
}
|
||||
Fl_Check_Button btn_prog1_auto_enable {
|
||||
callback {progdefaults.prog1_auto_enable = o->value();
|
||||
progdefaults.changed = true;}
|
||||
xywh {455 228 23 15} down_box DOWN_BOX
|
||||
code0 {o->value(progdefaults.prog1_auto_enable);}
|
||||
}
|
||||
Fl_Check_Button btn_prog2_auto_enable {
|
||||
callback {progdefaults.prog2_auto_enable = o->value();
|
||||
progdefaults.changed = true;}
|
||||
xywh {455 266 23 15} down_box DOWN_BOX
|
||||
code0 {o->value(progdefaults.prog2_auto_enable);}
|
||||
}
|
||||
Fl_Check_Button btn_prog3_auto_enable {
|
||||
callback {progdefaults.prog3_auto_enable = o->value();
|
||||
progdefaults.changed = true;}
|
||||
xywh {455 305 23 15} down_box DOWN_BOX
|
||||
code0 {o->value(progdefaults.prog3_auto_enable);}
|
||||
}
|
||||
Fl_Button btn_test_flrig {
|
||||
label Test
|
||||
callback {start_process(progdefaults.auto_flrig_pathname);}
|
||||
tooltip {Start flrig} xywh {479 71 50 24}
|
||||
}
|
||||
Fl_Button btn_test_flamp {
|
||||
label Test
|
||||
callback {start_process(progdefaults.auto_flamp_pathname);}
|
||||
tooltip {Start flamp} xywh {479 109 50 24}
|
||||
}
|
||||
Fl_Button btn_test_flnet {
|
||||
label Test
|
||||
callback {start_process(progdefaults.auto_flnet_pathname);}
|
||||
tooltip {Start flnet} xywh {479 147 50 24}
|
||||
}
|
||||
Fl_Button btn_test_fllog {
|
||||
label Test
|
||||
callback {start_process(progdefaults.auto_fllog_pathname);}
|
||||
tooltip {Start fllog} xywh {479 186 50 24}
|
||||
}
|
||||
Fl_Button btn_test_prog1 {
|
||||
label Test
|
||||
callback {start_process(progdefaults.auto_prog1_pathname);}
|
||||
tooltip {Start prog1} xywh {479 224 50 24}
|
||||
}
|
||||
Fl_Button btn_test_prog2 {
|
||||
label Test
|
||||
callback {start_process(progdefaults.auto_prog2_pathname);}
|
||||
tooltip {Start prog2} xywh {479 262 50 24}
|
||||
}
|
||||
Fl_Button btn_test_prog3 {
|
||||
label Test
|
||||
callback {start_process(progdefaults.auto_prog3_pathname);}
|
||||
tooltip {Start prog3} xywh {479 301 50 24}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Fl_Button btnSaveConfig {
|
||||
label Save
|
||||
|
|
|
@ -607,6 +607,35 @@ extern Fl_Box *eqsl_txt1;
|
|||
extern Fl_Box *eqsl_txt2;
|
||||
extern Fl_Box *eqsl_txt3;
|
||||
extern Fl_Check_Button *btn_send_datetime_off;
|
||||
extern Fl_Group *tabAutoStart;
|
||||
extern Fl_Input2 *txt_auto_flrig_pathname;
|
||||
extern Fl_Button *btn_select_flrig;
|
||||
extern Fl_Input2 *txt_auto_flamp_pathname;
|
||||
extern Fl_Button *btn_select_auto_flamp;
|
||||
extern Fl_Input2 *txt_auto_flnet_pathname;
|
||||
extern Fl_Button *btn_select_auto_flnet;
|
||||
extern Fl_Input2 *txt_auto_fllog_pathname;
|
||||
extern Fl_Button *btn_select_fllog;
|
||||
extern Fl_Input2 *txt_auto_prog1_pathname;
|
||||
extern Fl_Button *btn_select_prog1;
|
||||
extern Fl_Input2 *txt_auto_prog2_pathname;
|
||||
extern Fl_Button *btn_select_prog2;
|
||||
extern Fl_Input2 *txt_auto_prog3_pathname;
|
||||
extern Fl_Button *btn_select_prog3;
|
||||
extern Fl_Check_Button *btn_flrig_auto_enable;
|
||||
extern Fl_Check_Button *btn_flamp_auto_enable;
|
||||
extern Fl_Check_Button *btn_flnet_auto_enable;
|
||||
extern Fl_Check_Button *btn_fllog_auto_enable;
|
||||
extern Fl_Check_Button *btn_prog1_auto_enable;
|
||||
extern Fl_Check_Button *btn_prog2_auto_enable;
|
||||
extern Fl_Check_Button *btn_prog3_auto_enable;
|
||||
extern Fl_Button *btn_test_flrig;
|
||||
extern Fl_Button *btn_test_flamp;
|
||||
extern Fl_Button *btn_test_flnet;
|
||||
extern Fl_Button *btn_test_fllog;
|
||||
extern Fl_Button *btn_test_prog1;
|
||||
extern Fl_Button *btn_test_prog2;
|
||||
extern Fl_Button *btn_test_prog3;
|
||||
extern Fl_Button *btnSaveConfig;
|
||||
#include <FL/Fl_Return_Button.H>
|
||||
extern Fl_Return_Button *btnCloseConfig;
|
||||
|
|
|
@ -1579,6 +1579,48 @@
|
|||
ELEM_(int, kml_balloon_style, "KML_BALLOON_STYLE", \
|
||||
"KML balloons data displayed as text, HTML tables, HTML single matrix", \
|
||||
2) \
|
||||
ELEM_(std::string, auto_flrig_pathname, "AUTO_FLRIG_PATHNAME", \
|
||||
"Full pathname to the flrig executable", \
|
||||
"") \
|
||||
ELEM_(std::string, auto_flamp_pathname, "AUTO_FLAMP_PATHNAME", \
|
||||
"Full pathname to the flamp executable", \
|
||||
"") \
|
||||
ELEM_(std::string, auto_flnet_pathname, "AUTO_FLNET_PATHNAME", \
|
||||
"Full pathname to the flnet executable", \
|
||||
"") \
|
||||
ELEM_(std::string, auto_fllog_pathname, "AUTO_FLLOG_PATHNAME", \
|
||||
"Full pathname to the fllog executable", \
|
||||
"") \
|
||||
ELEM_(std::string, auto_prog1_pathname, "AUTO_PROG1_PATHNAME", \
|
||||
"Full pathname to the prog1 executable", \
|
||||
"") \
|
||||
ELEM_(std::string, auto_prog2_pathname, "AUTO_PROG2_PATHNAME", \
|
||||
"Full pathname to the prog2 executable", \
|
||||
"") \
|
||||
ELEM_(std::string, auto_prog3_pathname, "AUTO_PROG3_PATHNAME", \
|
||||
"Full pathname to the prog3 executable", \
|
||||
"") \
|
||||
ELEM_(bool, flrig_auto_enable, "FLRIG_AUTO_ENABLE", \
|
||||
"Enable on program start", \
|
||||
false) \
|
||||
ELEM_(bool, flnet_auto_enable, "FLNET_AUTO_ENABLE", \
|
||||
"Enable on program start", \
|
||||
false) \
|
||||
ELEM_(bool, fllog_auto_enable, "FLLOG_AUTO_ENABLE", \
|
||||
"Enable on program start", \
|
||||
false) \
|
||||
ELEM_(bool, flamp_auto_enable, "FLAMP_AUTO_ENABLE", \
|
||||
"Enable on program start", \
|
||||
false) \
|
||||
ELEM_(bool, prog1_auto_enable, "PROG1_AUTO_ENABLE", \
|
||||
"Enable on program start", \
|
||||
false) \
|
||||
ELEM_(bool, prog2_auto_enable, "PROG2_AUTO_ENABLE", \
|
||||
"Enable on program start", \
|
||||
false) \
|
||||
ELEM_(bool, prog3_auto_enable, "PROG3_AUTO_ENABLE", \
|
||||
"Enable on program start", \
|
||||
false) \
|
||||
|
||||
|
||||
// declare the struct
|
||||
|
|
|
@ -92,4 +92,7 @@ extern void exit_process();
|
|||
|
||||
int directory_is_created( const char * strdir );
|
||||
|
||||
// autostart an external program
|
||||
extern void start_process(std::string executable);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -22,9 +22,12 @@
|
|||
#ifndef _RX_EXTRACT_H
|
||||
#define _RX_EXTRACT_H
|
||||
|
||||
#include <string>
|
||||
|
||||
extern const char *txtWrapInfo;
|
||||
extern void rx_extract_add(int c);
|
||||
extern void select_flmsg_pathname();
|
||||
extern std::string select_binary_pathname(std::string deffilename);
|
||||
|
||||
extern bool extract_wrap;
|
||||
extern bool extract_flamp;
|
||||
|
|
|
@ -346,3 +346,24 @@ void select_flmsg_pathname()
|
|||
#endif
|
||||
}
|
||||
|
||||
string select_binary_pathname(string deffilename)
|
||||
{
|
||||
#ifdef __APPLE__
|
||||
open_recv_folder("/Applications/");
|
||||
return "";
|
||||
#else
|
||||
# ifdef __MINGW32__
|
||||
deffilename = "C:\\Program Files\\";
|
||||
const char *p = FSEL::select(_("Locate executable"), _("*.exe"), deffilename.c_str());
|
||||
# else
|
||||
deffilename = "/usr/local/bin/";
|
||||
const char *p = FSEL::select(_("Locate binary"), _("*"), deffilename.c_str());
|
||||
# endif
|
||||
string executable = "";
|
||||
if (p) executable = p;
|
||||
// do not allow recursion !!
|
||||
if (executable.find("fldigi") != string::npos) return "";
|
||||
return executable;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
67
src/main.cxx
67
src/main.cxx
|
@ -204,6 +204,70 @@ static void fatal_error(string);
|
|||
# define SHOW_WIZARD_BEFORE_MAIN_WINDOW 0
|
||||
#endif
|
||||
|
||||
void start_process(string executable)
|
||||
{
|
||||
if (!executable.empty()) {
|
||||
#ifndef __MINGW32__
|
||||
switch (fork()) {
|
||||
case -1:
|
||||
LOG_PERROR("fork");
|
||||
// fall through
|
||||
default:
|
||||
break;
|
||||
case 0:
|
||||
#endif
|
||||
#ifdef __MINGW32__
|
||||
char* cmd = strdup(executable.c_str());
|
||||
STARTUPINFO si;
|
||||
PROCESS_INFORMATION pi;
|
||||
memset(&si, 0, sizeof(si));
|
||||
si.cb = sizeof(si);
|
||||
memset(&pi, 0, sizeof(pi));
|
||||
if (!CreateProcess(NULL, cmd, NULL, NULL, FALSE, CREATE_NO_WINDOW, NULL, NULL, &si, &pi))
|
||||
LOG_ERROR("CreateProcess failed with error code %ld", GetLastError());
|
||||
CloseHandle(pi.hProcess);
|
||||
CloseHandle(pi.hThread);
|
||||
free(cmd);
|
||||
#else
|
||||
execl("/bin/sh", "sh", "-c", executable.c_str(), (char *)NULL);
|
||||
perror("execl");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
static void auto_start()
|
||||
{
|
||||
if (!progdefaults.auto_flrig_pathname.empty() &&
|
||||
progdefaults.flrig_auto_enable)
|
||||
start_process(progdefaults.auto_flrig_pathname);
|
||||
|
||||
if (!progdefaults.auto_flamp_pathname.empty() &&
|
||||
progdefaults.flamp_auto_enable)
|
||||
start_process(progdefaults.auto_flamp_pathname);
|
||||
|
||||
if (!progdefaults.auto_fllog_pathname.empty() &&
|
||||
progdefaults.fllog_auto_enable)
|
||||
start_process(progdefaults.auto_fllog_pathname);
|
||||
|
||||
if (!progdefaults.auto_flnet_pathname.empty() &&
|
||||
progdefaults.flnet_auto_enable)
|
||||
start_process(progdefaults.auto_flnet_pathname);
|
||||
|
||||
if (!progdefaults.auto_prog1_pathname.empty() &&
|
||||
progdefaults.prog1_auto_enable)
|
||||
start_process(progdefaults.auto_prog1_pathname);
|
||||
|
||||
if (!progdefaults.auto_prog2_pathname.empty() &&
|
||||
progdefaults.prog2_auto_enable)
|
||||
start_process(progdefaults.auto_prog2_pathname);
|
||||
|
||||
if (!progdefaults.auto_prog3_pathname.empty() &&
|
||||
progdefaults.prog3_auto_enable)
|
||||
start_process(progdefaults.auto_prog3_pathname);
|
||||
}
|
||||
|
||||
// these functions are all started after Fl::run() is executing
|
||||
void delayed_startup(void *)
|
||||
{
|
||||
|
@ -226,8 +290,11 @@ void delayed_startup(void *)
|
|||
if (!pskrep_start())
|
||||
LOG_ERROR("Could not start PSK reporter: %s", pskrep_error());
|
||||
|
||||
auto_start();
|
||||
|
||||
if (progdefaults.check_for_updates)
|
||||
cb_mnuCheckUpdate((Fl_Widget *)0, NULL);
|
||||
|
||||
}
|
||||
|
||||
int main(int argc, char ** argv)
|
||||
|
|
Ładowanie…
Reference in New Issue