kopia lustrzana https://github.com/jamescoxon/dl-fldigi
Merge with upstream
commit
91cf6d14c6
34
ChangeLog
34
ChangeLog
|
|
@ -64,6 +64,40 @@ Change Log:
|
|||
These and the docked digiscope configuration option require a program
|
||||
restart to take effect.
|
||||
24) Added rig control widgets to the main dialog qso panel.
|
||||
25) Added icons for many of the menu items. The menus now have both an
|
||||
icon and a text where appropriate.
|
||||
26) Added a check box for "Nag me about log entries".
|
||||
27) Added a double click on waterfall functionality. This will write a
|
||||
special string to the Rx text window such as:
|
||||
|
||||
<<2008-10-30T23:25Z BPSK-31 @ 3580000+1474>>
|
||||
|
||||
This record is then accessible using the mouse in the Rx text window.
|
||||
You can then left click on the string and fldigi will change mode,
|
||||
rf frequency (if CAT), and audio frequency to the saved record.
|
||||
|
||||
The text field associated with "Insert on left click" (W-fall/Mouse
|
||||
tab) allows you to modify this behavior. You enter the following for
|
||||
the left click insertion text: <FREQ> and the double click changes
|
||||
to a single left click.
|
||||
28) Added QSO data mouse binding. Binds Rx text mouse-2 (right mouse
|
||||
button) to a handler that enters QSO data into the log fields. A
|
||||
limited amount of pattern matching is done to recognize RST reports
|
||||
and IARU locator strings. The text is meant to be middle-clicked
|
||||
roughly in the order in which it tends to appear in QSOs:
|
||||
callsign RST name QTH locator. The other shortcuts (menu items and
|
||||
Shift-click work as before).
|
||||
29) Fixed IZDT time format. The timezone only makes sense in ILDT. With
|
||||
IZDT, it is always +0000, so we should be using "Z". This applies to
|
||||
macros which use the <ZDT> and <IZDT> tags.
|
||||
30) Added double click in the Rx text window. Program parses the word to
|
||||
target CALL, NAME, LOC and RSTin.
|
||||
31) Added addition macro tag to insert the text in the two status fields
|
||||
such as PSK s/n and PSK imd readings.
|
||||
32) Menu icons can be toggled on/off via configuration check box.
|
||||
33) Improved hamlib support code.
|
||||
34) Color changes for Frequency Control now applied to both docked and
|
||||
floating rig control.
|
||||
|
||||
3.03
|
||||
1) Changes to socket server to correct shutdown process
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ dnl major and minor must be integers; patch may
|
|||
dnl contain other characters or be empty
|
||||
m4_define(FLDIGI_MAJOR, [3])
|
||||
m4_define(FLDIGI_MINOR, [0])
|
||||
m4_define(FLDIGI_PATCH, [4AX])
|
||||
m4_define(FLDIGI_PATCH, [4BC])
|
||||
|
||||
AC_INIT([fldigi], FLDIGI_MAJOR.FLDIGI_MINOR[FLDIGI_PATCH], [w1hkj AT w1hkj DOT com])
|
||||
|
||||
|
|
|
|||
|
|
@ -50,8 +50,6 @@ int re_eflags = REG_NOTBOL | REG_NOTEOL;
|
|||
|
||||
//unsigned int nchars = 80;
|
||||
|
||||
extern viewpsk *pskviewer;
|
||||
|
||||
string freqformat(int i)
|
||||
{
|
||||
static char szLine[80];
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
// generated by Fast Light User Interface Designer (fluid) version 1.0109
|
||||
// generated by Fast Light User Interface Designer (fluid) version 1.0108
|
||||
|
||||
#include "colorsfonts.h"
|
||||
#include <config.h>
|
||||
#include "fl_digi.h"
|
||||
#include "configuration.h"
|
||||
#include "rigdialog.h"
|
||||
|
||||
void selectColorsFonts() {
|
||||
if (!dlgColorFont)
|
||||
|
|
@ -110,14 +111,26 @@ static void cb_btnBackgroundColor(Fl_Button*, void*) {
|
|||
FDdisplay->color(fl_rgb_color(r,g,b));
|
||||
FDdisplay->redraw();
|
||||
|
||||
qsoFreqDisp->SetONOFFCOLOR(
|
||||
if (FreqDisp) {
|
||||
FreqDisp->SetONOFFCOLOR(
|
||||
fl_rgb_color( progdefaults.FDforeground.R,
|
||||
progdefaults.FDforeground.G,
|
||||
progdefaults.FDforeground.B),
|
||||
fl_rgb_color( progdefaults.FDbackground.R,
|
||||
progdefaults.FDbackground.G,
|
||||
progdefaults.FDbackground.B));
|
||||
qsoFreqDisp->redraw();
|
||||
FreqDisp->redraw();
|
||||
}
|
||||
if (qsoFreqDisp) {
|
||||
qsoFreqDisp->SetONOFFCOLOR(
|
||||
fl_rgb_color( progdefaults.FDforeground.R,
|
||||
progdefaults.FDforeground.G,
|
||||
progdefaults.FDforeground.B),
|
||||
fl_rgb_color( progdefaults.FDbackground.R,
|
||||
progdefaults.FDbackground.G,
|
||||
progdefaults.FDbackground.B));
|
||||
qsoFreqDisp->redraw();
|
||||
}
|
||||
|
||||
progdefaults.changed = true;
|
||||
}
|
||||
|
|
@ -140,14 +153,26 @@ static void cb_btnForegroundColor(Fl_Button*, void*) {
|
|||
FDdisplay->labelcolor(fl_rgb_color(r,g,b));
|
||||
FDdisplay->redraw();
|
||||
|
||||
qsoFreqDisp->SetONOFFCOLOR(
|
||||
if (FreqDisp) {
|
||||
FreqDisp->SetONOFFCOLOR(
|
||||
fl_rgb_color( progdefaults.FDforeground.R,
|
||||
progdefaults.FDforeground.G,
|
||||
progdefaults.FDforeground.B),
|
||||
fl_rgb_color( progdefaults.FDbackground.R,
|
||||
progdefaults.FDbackground.G,
|
||||
progdefaults.FDbackground.B));
|
||||
qsoFreqDisp->redraw();
|
||||
FreqDisp->redraw();
|
||||
}
|
||||
if (qsoFreqDisp) {
|
||||
qsoFreqDisp->SetONOFFCOLOR(
|
||||
fl_rgb_color( progdefaults.FDforeground.R,
|
||||
progdefaults.FDforeground.G,
|
||||
progdefaults.FDforeground.B),
|
||||
fl_rgb_color( progdefaults.FDbackground.R,
|
||||
progdefaults.FDbackground.G,
|
||||
progdefaults.FDbackground.B));
|
||||
qsoFreqDisp->redraw();
|
||||
}
|
||||
|
||||
progdefaults.changed = true;
|
||||
}
|
||||
|
|
@ -176,14 +201,26 @@ static void cb_btnFD_SystemColor(Fl_Button*, void*) {
|
|||
progdefaults.FDforeground.G = g;
|
||||
progdefaults.FDforeground.B = b;
|
||||
|
||||
qsoFreqDisp->SetONOFFCOLOR(
|
||||
if (FreqDisp) {
|
||||
FreqDisp->SetONOFFCOLOR(
|
||||
fl_rgb_color( progdefaults.FDforeground.R,
|
||||
progdefaults.FDforeground.G,
|
||||
progdefaults.FDforeground.B),
|
||||
fl_rgb_color( progdefaults.FDbackground.R,
|
||||
progdefaults.FDbackground.G,
|
||||
progdefaults.FDbackground.B));
|
||||
qsoFreqDisp->redraw();
|
||||
FreqDisp->redraw();
|
||||
}
|
||||
if (qsoFreqDisp) {
|
||||
qsoFreqDisp->SetONOFFCOLOR(
|
||||
fl_rgb_color( progdefaults.FDforeground.R,
|
||||
progdefaults.FDforeground.G,
|
||||
progdefaults.FDforeground.B),
|
||||
fl_rgb_color( progdefaults.FDbackground.R,
|
||||
progdefaults.FDbackground.G,
|
||||
progdefaults.FDbackground.B));
|
||||
qsoFreqDisp->redraw();
|
||||
}
|
||||
|
||||
progdefaults.changed = true;
|
||||
}
|
||||
|
|
@ -567,30 +604,13 @@ static void cb_btnTextDefaults(Fl_Button*, void*) {
|
|||
progdefaults.changed = true;
|
||||
}
|
||||
|
||||
Fl_Choice *mnuScheme=(Fl_Choice *)0;
|
||||
|
||||
static void cb_mnuScheme(Fl_Choice* o, void*) {
|
||||
progdefaults.ui_scheme = o->text();
|
||||
Fl::scheme(progdefaults.ui_scheme.c_str());
|
||||
|
||||
progdefaults.changed = true;
|
||||
}
|
||||
|
||||
Fl_Check_Button *btnMenuIcons=(Fl_Check_Button *)0;
|
||||
|
||||
static void cb_btnMenuIcons(Fl_Check_Button* o, void*) {
|
||||
progdefaults.menu_icons = o->value();
|
||||
progdefaults.changed = true;
|
||||
}
|
||||
|
||||
Fl_Double_Window* make_colorsfonts() {
|
||||
{ dlgColorFont = new Fl_Double_Window(374, 220, "Colors and Fonts");
|
||||
{ dlgColorFont = new Fl_Double_Window(375, 220, "Colors and Fonts");
|
||||
{ btnClrFntClose = new Fl_Button(296, 190, 75, 25, "Close");
|
||||
btnClrFntClose->callback((Fl_Callback*)cb_btnClrFntClose);
|
||||
} // Fl_Button* btnClrFntClose
|
||||
{ Fl_Tabs* o = new Fl_Tabs(0, 5, 375, 179);
|
||||
{ Fl_Group* o = new Fl_Group(5, 30, 365, 150, "Freq Display");
|
||||
o->hide();
|
||||
{ Fl_Box* o = FDdisplay = new Fl_Box(100, 45, 45, 67, "8");
|
||||
FDdisplay->box(FL_DOWN_BOX);
|
||||
FDdisplay->color((Fl_Color)55);
|
||||
|
|
@ -703,24 +723,6 @@ Fl_Double_Window* make_colorsfonts() {
|
|||
} // Fl_Button* btnTextDefaults
|
||||
o->end();
|
||||
} // Fl_Group* o
|
||||
{ Fl_Group* o = new Fl_Group(5, 30, 365, 150, "User Interface");
|
||||
{ mnuScheme = new Fl_Choice(120, 50, 80, 25, "UI scheme");
|
||||
mnuScheme->down_box(FL_BORDER_BOX);
|
||||
mnuScheme->callback((Fl_Callback*)cb_mnuScheme);
|
||||
mnuScheme->align(FL_ALIGN_RIGHT);
|
||||
mnuScheme->add("base");
|
||||
mnuScheme->add("gtk+");
|
||||
mnuScheme->add("plastic");
|
||||
mnuScheme->value(mnuScheme->find_item(progdefaults.ui_scheme.c_str()));
|
||||
} // Fl_Choice* mnuScheme
|
||||
{ btnMenuIcons = new Fl_Check_Button(120, 95, 144, 25, "Show menu icons");
|
||||
btnMenuIcons->tooltip("This option takes effect at the next program start-up");
|
||||
btnMenuIcons->down_box(FL_DOWN_BOX);
|
||||
btnMenuIcons->callback((Fl_Callback*)cb_btnMenuIcons);
|
||||
btnMenuIcons->value(progdefaults.menu_icons);
|
||||
} // Fl_Check_Button* btnMenuIcons
|
||||
o->end();
|
||||
} // Fl_Group* o
|
||||
o->end();
|
||||
} // Fl_Tabs* o
|
||||
dlgColorFont->xclass(PACKAGE_TARNAME);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# data file for the Fltk User Interface Designer (fluid)
|
||||
version 1.0109
|
||||
version 1.0108
|
||||
header_name {}
|
||||
code_name {.cxx}
|
||||
decl {\#include <config.h>} {global
|
||||
|
|
@ -14,6 +14,9 @@ decl {\#include "configuration.h"} {global
|
|||
decl {\#include "font_browser.h"} {public global
|
||||
}
|
||||
|
||||
decl {\#include "rigdialog.h"} {selected
|
||||
}
|
||||
|
||||
Function {selectColorsFonts()} {open return_type void
|
||||
} {
|
||||
code {if (!dlgColorFont)
|
||||
|
|
@ -101,7 +104,7 @@ Function {make_colorsfonts()} {open
|
|||
} {
|
||||
Fl_Window dlgColorFont {
|
||||
label {Colors and Fonts} open
|
||||
xywh {559 794 374 220} type Double
|
||||
xywh {26 742 375 220} type Double
|
||||
code0 {dlgColorFont->xclass(PACKAGE_TARNAME);} visible
|
||||
} {
|
||||
Fl_Button btnClrFntClose {
|
||||
|
|
@ -114,7 +117,7 @@ Function {make_colorsfonts()} {open
|
|||
} {
|
||||
Fl_Group {} {
|
||||
label {Freq Display} open
|
||||
xywh {5 30 365 150} hide
|
||||
xywh {5 30 365 150}
|
||||
} {
|
||||
Fl_Box FDdisplay {
|
||||
label 8
|
||||
|
|
@ -139,14 +142,26 @@ Function {make_colorsfonts()} {open
|
|||
FDdisplay->color(fl_rgb_color(r,g,b));
|
||||
FDdisplay->redraw();
|
||||
|
||||
qsoFreqDisp->SetONOFFCOLOR(
|
||||
if (FreqDisp) {
|
||||
FreqDisp->SetONOFFCOLOR(
|
||||
fl_rgb_color( progdefaults.FDforeground.R,
|
||||
progdefaults.FDforeground.G,
|
||||
progdefaults.FDforeground.B),
|
||||
fl_rgb_color( progdefaults.FDbackground.R,
|
||||
progdefaults.FDbackground.G,
|
||||
progdefaults.FDbackground.B));
|
||||
qsoFreqDisp->redraw();
|
||||
FreqDisp->redraw();
|
||||
}
|
||||
if (qsoFreqDisp) {
|
||||
qsoFreqDisp->SetONOFFCOLOR(
|
||||
fl_rgb_color( progdefaults.FDforeground.R,
|
||||
progdefaults.FDforeground.G,
|
||||
progdefaults.FDforeground.B),
|
||||
fl_rgb_color( progdefaults.FDbackground.R,
|
||||
progdefaults.FDbackground.G,
|
||||
progdefaults.FDbackground.B));
|
||||
qsoFreqDisp->redraw();
|
||||
}
|
||||
|
||||
progdefaults.changed = true;}
|
||||
xywh {165 45 100 30}
|
||||
|
|
@ -168,14 +183,26 @@ Function {make_colorsfonts()} {open
|
|||
FDdisplay->labelcolor(fl_rgb_color(r,g,b));
|
||||
FDdisplay->redraw();
|
||||
|
||||
qsoFreqDisp->SetONOFFCOLOR(
|
||||
if (FreqDisp) {
|
||||
FreqDisp->SetONOFFCOLOR(
|
||||
fl_rgb_color( progdefaults.FDforeground.R,
|
||||
progdefaults.FDforeground.G,
|
||||
progdefaults.FDforeground.B),
|
||||
fl_rgb_color( progdefaults.FDbackground.R,
|
||||
progdefaults.FDbackground.G,
|
||||
progdefaults.FDbackground.B));
|
||||
qsoFreqDisp->redraw();
|
||||
FreqDisp->redraw();
|
||||
}
|
||||
if (qsoFreqDisp) {
|
||||
qsoFreqDisp->SetONOFFCOLOR(
|
||||
fl_rgb_color( progdefaults.FDforeground.R,
|
||||
progdefaults.FDforeground.G,
|
||||
progdefaults.FDforeground.B),
|
||||
fl_rgb_color( progdefaults.FDbackground.R,
|
||||
progdefaults.FDbackground.G,
|
||||
progdefaults.FDbackground.B));
|
||||
qsoFreqDisp->redraw();
|
||||
}
|
||||
|
||||
progdefaults.changed = true;}
|
||||
xywh {165 85 100 30}
|
||||
|
|
@ -203,14 +230,26 @@ Function {make_colorsfonts()} {open
|
|||
progdefaults.FDforeground.G = g;
|
||||
progdefaults.FDforeground.B = b;
|
||||
|
||||
qsoFreqDisp->SetONOFFCOLOR(
|
||||
if (FreqDisp) {
|
||||
FreqDisp->SetONOFFCOLOR(
|
||||
fl_rgb_color( progdefaults.FDforeground.R,
|
||||
progdefaults.FDforeground.G,
|
||||
progdefaults.FDforeground.B),
|
||||
fl_rgb_color( progdefaults.FDbackground.R,
|
||||
progdefaults.FDbackground.G,
|
||||
progdefaults.FDbackground.B));
|
||||
qsoFreqDisp->redraw();
|
||||
FreqDisp->redraw();
|
||||
}
|
||||
if (qsoFreqDisp) {
|
||||
qsoFreqDisp->SetONOFFCOLOR(
|
||||
fl_rgb_color( progdefaults.FDforeground.R,
|
||||
progdefaults.FDforeground.G,
|
||||
progdefaults.FDforeground.B),
|
||||
fl_rgb_color( progdefaults.FDbackground.R,
|
||||
progdefaults.FDbackground.G,
|
||||
progdefaults.FDbackground.B));
|
||||
qsoFreqDisp->redraw();
|
||||
}
|
||||
|
||||
progdefaults.changed = true;}
|
||||
xywh {165 125 100 30}
|
||||
|
|
@ -613,30 +652,6 @@ b->show();}
|
|||
xywh {296 130 70 20}
|
||||
}
|
||||
}
|
||||
Fl_Group {} {
|
||||
label {User Interface} open
|
||||
xywh {5 30 365 150}
|
||||
} {
|
||||
Fl_Choice mnuScheme {
|
||||
label {UI scheme}
|
||||
callback {progdefaults.ui_scheme = o->text();
|
||||
Fl::scheme(progdefaults.ui_scheme.c_str());
|
||||
|
||||
progdefaults.changed = true;} open
|
||||
xywh {120 50 80 25} down_box BORDER_BOX align 8
|
||||
code0 {mnuScheme->add("base");}
|
||||
code1 {mnuScheme->add("gtk+");}
|
||||
code2 {mnuScheme->add("plastic");}
|
||||
code3 {mnuScheme->value(mnuScheme->find_item(progdefaults.ui_scheme.c_str()));}
|
||||
} {}
|
||||
Fl_Check_Button btnMenuIcons {
|
||||
label {Show menu icons}
|
||||
callback {progdefaults.menu_icons = o->value();
|
||||
progdefaults.changed = true;} selected
|
||||
tooltip {This option takes effect at the next program start-up} xywh {120 95 144 25} down_box DOWN_BOX
|
||||
code0 {btnMenuIcons->value(progdefaults.menu_icons);}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Plik diff jest za duży
Load Diff
Plik diff jest za duży
Load Diff
|
|
@ -169,7 +169,6 @@ Fl_Button *qso_btnAddFreq = (Fl_Button *)0;
|
|||
Fl_Button *qso_btnSelFreq = (Fl_Button *)0;
|
||||
Fl_Button *qso_btnDelFreq = (Fl_Button *)0;
|
||||
Fl_Button *qso_btnClearList = (Fl_Button *)0;
|
||||
Fl_Button *qso_btnCloseView = (Fl_Button *)0;
|
||||
|
||||
Fl_Button *btnMacroTimer;
|
||||
Fl_Button *btnMacroDummy;
|
||||
|
|
@ -192,6 +191,8 @@ Fl_Slider *sldrSquelch = (Fl_Slider *)0;
|
|||
Progress *pgrsSquelch = (Progress *)0;
|
||||
|
||||
Fl_RGB_Image *feld_image = 0;
|
||||
Fl_Pixmap *addrbookpixmap = 0;
|
||||
Fl_Pixmap *closepixmap = 0;
|
||||
|
||||
#if !defined(__APPLE__) && !defined(__CYGWIN__)
|
||||
Pixmap fldigi_icon_pixmap;
|
||||
|
|
@ -596,12 +597,12 @@ void init_modem(trx_mode mode)
|
|||
|
||||
clear_StatusMessages();
|
||||
progStatus.lastmode = mode;
|
||||
|
||||
|
||||
if (wf->xmtlock->value() == 1 && !mailserver) {
|
||||
wf->xmtlock->value(0);
|
||||
wf->xmtlock->damage();
|
||||
active_modem->set_freqlock(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void init_modem_sync(trx_mode m)
|
||||
|
|
@ -715,9 +716,9 @@ void cb_mnuConfigWaterfall(Fl_Menu_*, void*) {
|
|||
dlgConfig->show();
|
||||
}
|
||||
|
||||
void cb_mnuConfigVideo(Fl_Menu_*, void*) {
|
||||
void cb_mnuConfigID(Fl_Menu_*, void*) {
|
||||
progdefaults.loadDefaults();
|
||||
tabsConfigure->value(tabVideo);
|
||||
tabsConfigure->value(tabID);
|
||||
dlgConfig->show();
|
||||
}
|
||||
|
||||
|
|
@ -733,6 +734,12 @@ void cb_mnuConfigMisc(Fl_Menu_*, void*) {
|
|||
dlgConfig->show();
|
||||
}
|
||||
|
||||
void cb_mnuUI(Fl_Menu_*, void *) {
|
||||
progdefaults.loadDefaults();
|
||||
tabsConfigure->value(tabUI);
|
||||
dlgConfig->show();
|
||||
}
|
||||
|
||||
void cb_mnuConfigRigCtrl(Fl_Menu_*, void*) {
|
||||
progdefaults.loadDefaults();
|
||||
tabsConfigure->value(tabRig);
|
||||
|
|
@ -1170,6 +1177,8 @@ void qsoClear_cb(Fl_Widget *b, void *)
|
|||
void qsoSave_cb(Fl_Widget *b, void *)
|
||||
{
|
||||
submit_log();
|
||||
if (progdefaults.ClearOnSave)
|
||||
clearQSO();
|
||||
oktoclear = true;
|
||||
restoreFocus();
|
||||
}
|
||||
|
|
@ -1353,8 +1362,7 @@ bool clean_exit(void) {
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Fl_Menu_Item menu_[] = {
|
||||
{"&Files", 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL, 0, 14, 0},
|
||||
{ make_icon_label("Open macros...", file_open_icon), 0, (Fl_Callback*)cb_mnuOpenMacro, 0, 0, _FL_MULTI_LABEL, 0, 14, 0},
|
||||
|
|
@ -1364,9 +1372,9 @@ Fl_Menu_Item menu_[] = {
|
|||
{"Log File", 0, 0, 0, FL_MENU_DIVIDER | FL_MENU_TOGGLE, FL_NORMAL_LABEL, 0, 14, 0},
|
||||
#if USE_SNDFILE
|
||||
{ make_icon_label("Audio"), 0, 0, 0, FL_MENU_DIVIDER | FL_SUBMENU, _FL_MULTI_LABEL, 0, 14, 0},
|
||||
{"Rx capture", 0, (Fl_Callback*)cb_mnuCapture, 0, FL_MENU_TOGGLE, FL_NORMAL_LABEL, 0, 14, 0},//70
|
||||
{"Tx generate", 0, (Fl_Callback*)cb_mnuGenerate, 0, FL_MENU_TOGGLE, FL_NORMAL_LABEL, 0, 14, 0},//71
|
||||
{"Playback", 0, (Fl_Callback*)cb_mnuPlayback, 0, FL_MENU_TOGGLE, FL_NORMAL_LABEL, 0, 14, 0},//72
|
||||
{"Rx capture", 0, (Fl_Callback*)cb_mnuCapture, 0, FL_MENU_TOGGLE, FL_NORMAL_LABEL, 0, 14, 0},
|
||||
{"Tx generate", 0, (Fl_Callback*)cb_mnuGenerate, 0, FL_MENU_TOGGLE, FL_NORMAL_LABEL, 0, 14, 0},
|
||||
{"Playback", 0, (Fl_Callback*)cb_mnuPlayback, 0, FL_MENU_TOGGLE, FL_NORMAL_LABEL, 0, 14, 0},
|
||||
{0,0,0,0,0,0,0,0,0},
|
||||
#endif
|
||||
{ make_icon_label("E&xit", log_out_icon), 0, (Fl_Callback*)cb_E, 0, 0, _FL_MULTI_LABEL, 0, 14, 0},
|
||||
|
|
@ -1469,17 +1477,16 @@ Fl_Menu_Item menu_[] = {
|
|||
{0,0,0,0,0,0,0,0,0},
|
||||
|
||||
{"Configure", 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL, 0, 14, 0},
|
||||
{ make_icon_label("Defaults", preferences_system_icon), 0, 0, 0, FL_SUBMENU, _FL_MULTI_LABEL, 0, 14, 0},
|
||||
{ make_icon_label("Colors && Fonts", preferences_desktop_font_icon), 0, (Fl_Callback*)cb_mnuConfigFonts, 0, 0, _FL_MULTI_LABEL, 0, 14, 0},
|
||||
{ make_icon_label("Operator", system_users_icon), 0, (Fl_Callback*)cb_mnuConfigOperator, 0, 0, _FL_MULTI_LABEL, 0, 14, 0},
|
||||
{ make_icon_label("Waterfall", waterfall_icon), 0, (Fl_Callback*)cb_mnuConfigWaterfall, 0, 0, _FL_MULTI_LABEL, 0, 14, 0},
|
||||
{ make_icon_label("Video"), 0, (Fl_Callback*)cb_mnuConfigVideo, 0, 0, _FL_MULTI_LABEL, 0, 14, 0},
|
||||
{ make_icon_label("Rig Control", multimedia_player_icon), 0, (Fl_Callback*)cb_mnuConfigRigCtrl, 0, 0, _FL_MULTI_LABEL, 0, 14, 0},
|
||||
{ make_icon_label("QRZ", net_icon), 0, (Fl_Callback*)cb_mnuConfigQRZ, 0, 0, _FL_MULTI_LABEL, 0, 14, 0},
|
||||
{ make_icon_label("Sound Card", audio_card_icon), 0, (Fl_Callback*)cb_mnuConfigSoundCard, 0, 0, _FL_MULTI_LABEL, 0, 14, 0},
|
||||
{ make_icon_label("Misc"), 0, (Fl_Callback*)cb_mnuConfigMisc, 0, 0, _FL_MULTI_LABEL, 0, 14, 0},
|
||||
{0,0,0,0,0,0,0,0,0},
|
||||
{ make_icon_label("Colors && Fonts", preferences_desktop_font_icon), 0, (Fl_Callback*)cb_mnuConfigFonts, 0, 0, _FL_MULTI_LABEL, 0, 14, 0},
|
||||
{ make_icon_label("User Interface"), 0, (Fl_Callback*)cb_mnuUI, 0, 0, _FL_MULTI_LABEL, 0, 14, 0},
|
||||
{ make_icon_label("Waterfall", waterfall_icon), 0, (Fl_Callback*)cb_mnuConfigWaterfall, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL, 0, 14, 0},
|
||||
{ make_icon_label("Modems", emblems_system_icon), 0, (Fl_Callback*)cb_mnuConfigModems, 0, 0, _FL_MULTI_LABEL, 0, 14, 0},
|
||||
{ make_icon_label("Rig Control", multimedia_player_icon), 0, (Fl_Callback*)cb_mnuConfigRigCtrl, 0, 0, _FL_MULTI_LABEL, 0, 14, 0},
|
||||
{ make_icon_label("Sound Card", audio_card_icon), 0, (Fl_Callback*)cb_mnuConfigSoundCard, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL, 0, 14, 0},
|
||||
{ make_icon_label("IDs"), 0, (Fl_Callback*)cb_mnuConfigID, 0, 0, _FL_MULTI_LABEL, 0, 14, 0},
|
||||
{ make_icon_label("Misc"), 0, (Fl_Callback*)cb_mnuConfigMisc, 0, 0, _FL_MULTI_LABEL, 0, 14, 0},
|
||||
{ make_icon_label("QRZ", net_icon), 0, (Fl_Callback*)cb_mnuConfigQRZ, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL, 0, 14, 0},
|
||||
{ make_icon_label("Save Config", save_icon), 0, (Fl_Callback*)cb_mnuSaveConfig, 0, 0, _FL_MULTI_LABEL, 0, 14, 0},
|
||||
{0,0,0,0,0,0,0,0,0},
|
||||
|
||||
|
|
@ -1511,6 +1518,7 @@ Fl_Menu_Item menu_[] = {
|
|||
{0,0,0,0,0,0,0,0,0},
|
||||
};
|
||||
|
||||
|
||||
Fl_Menu_Bar *mnu;
|
||||
|
||||
Fl_Menu_Item *getMenuItem(const char *caption, Fl_Menu_Item* submenu)
|
||||
|
|
@ -1542,11 +1550,9 @@ void activate_rig_menu_item(bool b)
|
|||
if (b) {
|
||||
bSaveFreqList = true;
|
||||
rig->show();
|
||||
// rig->activate();
|
||||
|
||||
} else {
|
||||
rig->hide();
|
||||
// rig->deactivate();
|
||||
if (rigcontrol)
|
||||
rigcontrol->hide();
|
||||
}
|
||||
|
|
@ -1662,6 +1668,9 @@ void showOpBrowserView(Fl_Widget *, void *)
|
|||
QsoInfoFrame2->hide();
|
||||
QsoButtonFrame->hide();
|
||||
RigViewerFrame->show();
|
||||
qso_opPICK->image(closepixmap);
|
||||
qso_opPICK->redraw_label();
|
||||
qso_opPICK->tooltip("Close List");
|
||||
}
|
||||
|
||||
void CloseQsoView()
|
||||
|
|
@ -1670,11 +1679,9 @@ void CloseQsoView()
|
|||
QsoInfoFrame1->show();
|
||||
QsoInfoFrame2->show();
|
||||
QsoButtonFrame->show();
|
||||
}
|
||||
|
||||
void cb_qso_btnCloseView(Fl_Widget *, void *)
|
||||
{
|
||||
CloseQsoView();
|
||||
qso_opPICK->image(addrbookpixmap);
|
||||
qso_opPICK->redraw_label();
|
||||
qso_opPICK->tooltip("Open List");
|
||||
}
|
||||
|
||||
void cb_qso_btnSelFreq(Fl_Widget *, void *)
|
||||
|
|
@ -1766,8 +1773,9 @@ void create_fl_digi_main() {
|
|||
// do some more work on the menu
|
||||
for (size_t i = 0; i < sizeof(menu_)/sizeof(menu_[0]); i++) {
|
||||
// FL_NORMAL_SIZE may have changed; update the menu items
|
||||
if (menu_[i].text)
|
||||
if (menu_[i].text) {
|
||||
menu_[i].labelsize_ = FL_NORMAL_SIZE;
|
||||
}
|
||||
// set the icon label for items with the multi label type
|
||||
if (menu_[i].labeltype() == _FL_MULTI_LABEL)
|
||||
set_icon_label(&menu_[i]);
|
||||
|
|
@ -1780,6 +1788,7 @@ void create_fl_digi_main() {
|
|||
// reset the tooltip font
|
||||
Fl_Tooltip::font(FL_HELVETICA);
|
||||
Fl_Tooltip::size(FL_NORMAL_SIZE);
|
||||
Fl_Tooltip::enable(progdefaults.tooltips);
|
||||
|
||||
btnRSID = new Fl_Light_Button(WNOM - 150 - pad, 0, 50, Hmenu, "RSID");
|
||||
btnRSID->selection_color(FL_GREEN);
|
||||
|
|
@ -1871,10 +1880,11 @@ void create_fl_digi_main() {
|
|||
|
||||
qso_opPICK = new Fl_Button(rightof(qso_opBW), Hmenu + Hqsoframe + 1,
|
||||
w_mng, Hnotes - 2);
|
||||
qso_opPICK->image(new Fl_Pixmap(address_book_icon));
|
||||
addrbookpixmap = new Fl_Pixmap(address_book_icon);
|
||||
closepixmap = new Fl_Pixmap(close_icon);
|
||||
qso_opPICK->image(addrbookpixmap);
|
||||
qso_opPICK->callback(showOpBrowserView, 0);
|
||||
qso_opPICK->tooltip("List");
|
||||
|
||||
qso_opPICK->tooltip("Open List");
|
||||
RigControlFrame->resizable(NULL);
|
||||
|
||||
RigControlFrame->end();
|
||||
|
|
@ -1913,14 +1923,7 @@ void create_fl_digi_main() {
|
|||
qso_btnDelFreq->tooltip("Delete from list");
|
||||
qso_btnDelFreq->callback((Fl_Callback*)cb_qso_btnDelFreq);
|
||||
|
||||
qso_btnCloseView = new Fl_Button(
|
||||
rightof(RigControlFrame), Hmenu + Hqsoframe + 1,
|
||||
40 + pad, Hnotes - 2);
|
||||
qso_btnCloseView->image(new Fl_Pixmap(close_icon));
|
||||
qso_btnCloseView->callback((Fl_Callback*)cb_qso_btnCloseView);
|
||||
qso_btnCloseView->tooltip("Dismiss");
|
||||
|
||||
qso_opBrowser = new Fl_Browser(rightof(qso_btnCloseView) + pad, Hmenu + 1, opB_w, BV_h - 1 );
|
||||
qso_opBrowser = new Fl_Browser(rightof(qso_btnDelFreq) + pad, Hmenu + 1, opB_w, BV_h - 1 );
|
||||
qso_opBrowser->tooltip("Select operating parameters");
|
||||
qso_opBrowser->callback((Fl_Callback*)cb_qso_opBrowser);
|
||||
qso_opBrowser->type(2);
|
||||
|
|
@ -1928,7 +1931,6 @@ void create_fl_digi_main() {
|
|||
qso_opBrowser->labelfont(4);
|
||||
qso_opBrowser->labelsize(12);
|
||||
qso_opBrowser->textfont(4);
|
||||
|
||||
RigViewerFrame->resizable(NULL);
|
||||
|
||||
RigViewerFrame->end();
|
||||
|
|
@ -2051,7 +2053,8 @@ void create_fl_digi_main() {
|
|||
|
||||
Y = Hmenu + Hqsoframe + Hnotes + pad;
|
||||
|
||||
Fl_Widget* logfields[] = { inpFreq, inpTime, inpCall, inpName, inpRstIn,
|
||||
// Fl_Widget* logfields[] = { inpFreq, inpTime, inpCall, inpName, inpRstIn,
|
||||
Fl_Widget* logfields[] = { inpCall, inpName, inpRstIn,
|
||||
inpRstOut, inpQth, inpAZ, inpLoc, inpNotes };
|
||||
for (size_t i = 0; i < sizeof(logfields)/sizeof(*logfields); i++)
|
||||
logfields[i]->callback(cb_log);
|
||||
|
|
@ -2331,7 +2334,7 @@ void create_fl_digi_main() {
|
|||
if (progdefaults.docked_rig_control)
|
||||
activate_rig_menu_item(false);
|
||||
|
||||
if (!progdefaults.menu_icons)
|
||||
if (!progdefaults.menuicons)
|
||||
toggle_icon_labels();
|
||||
}
|
||||
|
||||
|
|
@ -2531,6 +2534,8 @@ void put_Status2(const char *msg, double timeout, status_timeout action)
|
|||
strncpy(m, msg, sizeof(m));
|
||||
m[sizeof(m) - 1] = '\0';
|
||||
|
||||
info2msg = msg;
|
||||
|
||||
REQ(put_status_msg, Status2, m, timeout, action);
|
||||
}
|
||||
|
||||
|
|
@ -2540,6 +2545,8 @@ void put_Status1(const char *msg, double timeout, status_timeout action)
|
|||
strncpy(m, msg, sizeof(m));
|
||||
m[sizeof(m) - 1] = '\0';
|
||||
|
||||
info1msg = msg;
|
||||
|
||||
REQ(put_status_msg, Status1, m, timeout, action);
|
||||
}
|
||||
|
||||
|
|
@ -2569,11 +2576,15 @@ void set_CWwpm()
|
|||
|
||||
void clear_StatusMessages()
|
||||
{
|
||||
FL_LOCK_E();
|
||||
StatusBar->label("");
|
||||
Status1->label("");
|
||||
Status2->label("");
|
||||
FL_UNLOCK_E();
|
||||
FL_AWAKE_E();
|
||||
}
|
||||
|
||||
|
||||
void put_MODEstatus(trx_mode mode)
|
||||
{
|
||||
FL_LOCK_D();
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@ protected:
|
|||
int set = SET_FONT | SET_SIZE | SET_COLOR);
|
||||
int readFile(const char* fn = 0);
|
||||
void saveFile(void);
|
||||
char *get_bound_text(int x, int y);
|
||||
char *get_word(int x, int y);
|
||||
void show_context_menu(void);
|
||||
virtual void menu_cb(int val) { }
|
||||
|
|
@ -125,6 +126,7 @@ protected:
|
|||
void handle_clickable(int x, int y);
|
||||
void handle_qsy(int start, int end);
|
||||
void handle_qso_data(int start, int end);
|
||||
bool handle_doubleclick(int start, int end);
|
||||
virtual void menu_cb(int val);
|
||||
static void changed_cb(int pos, int nins, int ndel, int nsty,
|
||||
const char *dtext, void *arg);
|
||||
|
|
@ -136,6 +138,7 @@ private:
|
|||
|
||||
protected:
|
||||
static Fl_Menu_Item view_menu[];
|
||||
static Fl_Menu_Item view_menu_noicons[];
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -181,6 +184,7 @@ private:
|
|||
|
||||
protected:
|
||||
static Fl_Menu_Item edit_menu[];
|
||||
static Fl_Menu_Item edit_menu_noicons[];
|
||||
bool PauseBreak;
|
||||
int txpos;
|
||||
static int *ptxpos;
|
||||
|
|
@ -210,6 +214,7 @@ private:
|
|||
|
||||
protected:
|
||||
static Fl_Menu_Item log_menu[];
|
||||
static Fl_Menu_Item log_menu_noicons[];
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// generated by Fast Light User Interface Designer (fluid) version 1.0109
|
||||
// generated by Fast Light User Interface Designer (fluid) version 1.0108
|
||||
|
||||
#ifndef colorsfonts_h
|
||||
#define colorsfonts_h
|
||||
|
|
@ -37,8 +37,5 @@ extern Fl_Button *btnSKIP;
|
|||
extern Fl_Button *btnALTR;
|
||||
extern Fl_Button *btnNoTextColor;
|
||||
extern Fl_Button *btnTextDefaults;
|
||||
#include <FL/Fl_Choice.H>
|
||||
extern Fl_Choice *mnuScheme;
|
||||
extern Fl_Check_Button *btnMenuIcons;
|
||||
Fl_Double_Window* make_colorsfonts();
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// generated by Fast Light User Interface Designer (fluid) version 1.0109
|
||||
// generated by Fast Light User Interface Designer (fluid) version 1.0108
|
||||
|
||||
#ifndef confdialog_h
|
||||
#define confdialog_h
|
||||
|
|
@ -12,60 +12,136 @@ void set_qrz_buttons(Fl_Button* b);
|
|||
#include <FL/Fl_Tabs.H>
|
||||
extern Fl_Tabs *tabsConfigure;
|
||||
#include <FL/Fl_Group.H>
|
||||
extern Fl_Group *tabOperator;
|
||||
#include <FL/Fl_Input.H>
|
||||
extern Fl_Input *inpMyCallsign;
|
||||
extern Fl_Input *inpMyName;
|
||||
extern Fl_Input *inpMyQth;
|
||||
extern Fl_Input *inpMyLocator;
|
||||
extern Fl_Group *tabID;
|
||||
#include <FL/Fl_Check_Button.H>
|
||||
extern Fl_Check_Button *btnUseLeadingZeros;
|
||||
#include <FL/Fl_Value_Input.H>
|
||||
extern Fl_Value_Input *nbrContestStart;
|
||||
extern Fl_Value_Input *nbrContestDigits;
|
||||
extern Fl_Group *tabWaterfall;
|
||||
#include "colorbox.h"
|
||||
extern colorbox *WF_Palette;
|
||||
#include <FL/Fl_Button.H>
|
||||
extern Fl_Button *btnColor[9];
|
||||
extern Fl_Button *btnLoadPalette;
|
||||
extern Fl_Button *btnSavePalette;
|
||||
#include <FL/Fl_Counter.H>
|
||||
extern Fl_Counter *cntLowFreqCutoff;
|
||||
extern Fl_Check_Button *btnWFaveraging;
|
||||
extern Fl_Button *btnWaterfallFont;
|
||||
extern Fl_Check_Button *btnBlackman;
|
||||
extern Fl_Check_Button *btnHamming;
|
||||
extern Fl_Check_Button *btnHanning;
|
||||
extern Fl_Check_Button *btnTriangular;
|
||||
extern Fl_Counter *valLatency;
|
||||
extern Fl_Check_Button *btnUseCursorLines;
|
||||
extern Fl_Check_Button *btnUseBWTracks;
|
||||
extern Fl_Check_Button *btnUseCursorCenterLine;
|
||||
#include <FL/Fl_Color_Chooser.H>
|
||||
extern Fl_Button *btnCursorBWcolor;
|
||||
extern Fl_Button *btnCursorCenterLineColor;
|
||||
extern Fl_Button *btnBwTracksColor;
|
||||
extern Fl_Check_Button *chkShowAudioScale;
|
||||
extern Fl_Check_Button *btnWaterfallHistoryDefault;
|
||||
extern Fl_Check_Button *btnWaterfallQSY;
|
||||
extern Fl_Input *inpWaterfallClickText;
|
||||
extern Fl_Check_Button *btnWaterfallClickInsert;
|
||||
#include <FL/Fl_Choice.H>
|
||||
extern Fl_Choice *mnuWaterfallWheelAction;
|
||||
extern Fl_Group *tabVideo;
|
||||
extern Fl_Check_Button *btnsendid;
|
||||
extern Fl_Check_Button *btnsendvideotext;
|
||||
#include <FL/Fl_Input.H>
|
||||
extern Fl_Input *valVideotext;
|
||||
#include <FL/Fl_Value_Slider.H>
|
||||
extern Fl_Value_Slider *sldrVideowidth;
|
||||
extern Fl_Check_Button *chkID_SMALL;
|
||||
extern Fl_Check_Button *btnViewXmtSignal;
|
||||
extern Fl_Group *sld;
|
||||
extern Fl_Check_Button *btnCWID;
|
||||
extern Fl_Value_Slider *sldrCWIDwpm;
|
||||
extern Fl_Group *tabRig;
|
||||
extern Fl_Check_Button *chkTransmitRSid;
|
||||
extern Fl_Check_Button *chkRSidWideSearch;
|
||||
extern Fl_Group *tabMisc;
|
||||
extern Fl_Tabs *tabsMisc;
|
||||
extern Fl_Group *tabCPUspeed;
|
||||
extern Fl_Check_Button *chkSlowCpu;
|
||||
extern Fl_Group *tabMacros;
|
||||
extern Fl_Check_Button *btnUseLastMacro;
|
||||
extern Fl_Check_Button *btnDisplayMacroFilename;
|
||||
extern Fl_Group *tabSweetSpot;
|
||||
#include <FL/Fl_Value_Input.H>
|
||||
extern Fl_Value_Input *valCWsweetspot;
|
||||
extern Fl_Value_Input *valRTTYsweetspot;
|
||||
extern Fl_Value_Input *valPSKsweetspot;
|
||||
extern Fl_Check_Button *btnStartAtSweetSpot;
|
||||
extern Fl_Group *tabModems;
|
||||
extern Fl_Tabs *tabsModems;
|
||||
extern Fl_Group *tabCW;
|
||||
extern Fl_Value_Slider *sldrCWbandwidth;
|
||||
#include <FL/Fl_Counter.H>
|
||||
extern Fl_Counter *cntCWrange;
|
||||
extern Fl_Check_Button *btnCWrcvTrack;
|
||||
#include <FL/Fl_Value_Output.H>
|
||||
extern Fl_Value_Output *valCWrcvWPM;
|
||||
#include <FL/Fl_Progress.H>
|
||||
extern Fl_Progress *prgsCWrcvWPM;
|
||||
extern Fl_Value_Slider *sldrCWxmtWPM;
|
||||
extern Fl_Counter *cntCWlowerlimit;
|
||||
extern Fl_Counter *cntCWupperlimit;
|
||||
extern Fl_Counter *cntCWdefWPM;
|
||||
extern Fl_Counter *cntCWweight;
|
||||
extern Fl_Counter *cntCWdash2dot;
|
||||
extern Fl_Counter *cntCWrisetime;
|
||||
extern Fl_Check_Button *btnQSK;
|
||||
extern Fl_Counter *cntPreTiming;
|
||||
extern Fl_Counter *cntPostTiming;
|
||||
extern Fl_Group *tabDomEX;
|
||||
extern Fl_Input *txtSecondary;
|
||||
extern Fl_Counter *valDominoEX_BW;
|
||||
extern Fl_Check_Button *valDominoEX_FILTER;
|
||||
extern Fl_Check_Button *chkDominoEX_FEC;
|
||||
extern Fl_Counter *valDominoEX_PATHS;
|
||||
extern Fl_Value_Slider *valDomCWI;
|
||||
extern Fl_Group *tabFeld;
|
||||
#include <FL/Fl_Choice.H>
|
||||
#include "fontdef.h"
|
||||
extern Fl_Choice *selHellFont;
|
||||
extern Fl_Value_Slider *sldrHellBW;
|
||||
extern Fl_Check_Button *btnHellXmtWidth;
|
||||
extern Fl_Check_Button *btnHellRcvWidth;
|
||||
extern Fl_Check_Button *btnBlackboard;
|
||||
extern Fl_Check_Button *btnHellFastAttack;
|
||||
extern Fl_Check_Button *btnHellSlowAttack;
|
||||
extern Fl_Check_Button *btnFeldHellIdle;
|
||||
#include <FL/Fl_Spinner.H>
|
||||
extern Fl_Spinner *valHellXmtWidth;
|
||||
extern Fl_Group *tabMT63;
|
||||
extern Fl_Check_Button *btnMT63_8bit;
|
||||
extern Fl_Check_Button *btnmt63_interleave;
|
||||
extern Fl_Group *tabOlivia;
|
||||
extern Fl_Choice *mnuOlivia_Tones;
|
||||
extern Fl_Choice *mnuOlivia_Bandwidth;
|
||||
extern Fl_Counter *cntOlivia_smargin;
|
||||
extern Fl_Counter *cntOlivia_sinteg;
|
||||
extern Fl_Check_Button *btnOlivia_8bit;
|
||||
extern Fl_Group *tabPSK;
|
||||
extern Fl_Counter *cntSearchRange;
|
||||
extern Fl_Counter *cntACQsn;
|
||||
extern Fl_Check_Button *btnPSKmailSweetSpot;
|
||||
extern Fl_Counter *cntServerOffset;
|
||||
extern Fl_Check_Button *btnMarquee;
|
||||
extern Fl_Check_Button *btnShowFrequencies;
|
||||
extern Fl_Spinner *cntChannels;
|
||||
extern Fl_Spinner *cntStartFrequency;
|
||||
extern Fl_Spinner *cntTimeout;
|
||||
extern Fl_Group *tabRTTY;
|
||||
extern Fl_Choice *selShift;
|
||||
extern Fl_Choice *selBaud;
|
||||
extern Fl_Choice *selBits;
|
||||
extern Fl_Choice *selParity;
|
||||
extern Fl_Choice *selStopBits;
|
||||
extern Fl_Check_Button *chkPseudoFSK;
|
||||
extern Fl_Check_Button *btnCRCRLF;
|
||||
extern Fl_Check_Button *btnAUTOCRLF;
|
||||
extern Fl_Counter *cntrAUTOCRLF;
|
||||
#include <FL/Fl_Round_Button.H>
|
||||
extern Fl_Round_Button *btnRTTYafc[3];
|
||||
extern Fl_Check_Button *btnPreferXhairScope;
|
||||
extern Fl_Check_Button *chkXagc;
|
||||
extern Fl_Check_Button *chkUOSrx;
|
||||
extern Fl_Check_Button *chkUOStx;
|
||||
extern Fl_Group *tabTHOR;
|
||||
extern Fl_Input *txtTHORSecondary;
|
||||
extern Fl_Counter *valTHOR_BW;
|
||||
extern Fl_Check_Button *valTHOR_FILTER;
|
||||
extern Fl_Counter *valTHOR_PATHS;
|
||||
extern Fl_Check_Button *valTHOR_SOFT;
|
||||
extern Fl_Value_Slider *valThorCWI;
|
||||
extern Fl_Group *tabOperator;
|
||||
extern Fl_Input *inpMyCallsign;
|
||||
extern Fl_Input *inpMyName;
|
||||
extern Fl_Input *inpMyQth;
|
||||
extern Fl_Input *inpMyLocator;
|
||||
extern Fl_Check_Button *btnUseLeadingZeros;
|
||||
extern Fl_Value_Input *nbrContestStart;
|
||||
extern Fl_Value_Input *nbrContestDigits;
|
||||
extern Fl_Group *tabQRZ;
|
||||
extern Fl_Round_Button *btnQRZnotavailable;
|
||||
extern Fl_Round_Button *btnQRZcdrom;
|
||||
extern Fl_Round_Button *btnQRZonline;
|
||||
extern Fl_Input *txtQRZpathname;
|
||||
extern Fl_Input *inpQRZusername;
|
||||
extern Fl_Input *inpQRZuserpassword;
|
||||
extern Fl_Round_Button *btnQRZsub;
|
||||
extern Fl_Round_Button *btnHamcall;
|
||||
#include <FL/Fl_Button.H>
|
||||
extern Fl_Button *btnQRZpasswordShow;
|
||||
extern Fl_Group *tabRig;
|
||||
extern Fl_Round_Button *btnPTT[5];
|
||||
extern Fl_Round_Button *btnRTSptt;
|
||||
extern Fl_Round_Button *btnDTRptt;
|
||||
|
|
@ -106,15 +182,6 @@ extern Fl_Check_Button *chkUSEMEMMAP;
|
|||
extern Fl_Button *btnInitMEMMAP;
|
||||
extern Fl_Check_Button *chkUSEXMLRPC;
|
||||
extern Fl_Button *btnInitXMLRPC;
|
||||
extern Fl_Group *tabQRZ;
|
||||
extern Fl_Round_Button *btnQRZnotavailable;
|
||||
extern Fl_Round_Button *btnQRZcdrom;
|
||||
extern Fl_Input *txtQRZpathname;
|
||||
extern Fl_Round_Button *btnQRZsub;
|
||||
extern Fl_Round_Button *btnHamcall;
|
||||
extern Fl_Input *inpQRZusername;
|
||||
extern Fl_Input *inpQRZuserpassword;
|
||||
extern Fl_Round_Button *btnQRZonline;
|
||||
extern Fl_Group *tabSoundCard;
|
||||
extern Fl_Tabs *tabsSoundCard;
|
||||
extern Fl_Group *tabAudio;
|
||||
|
|
@ -128,7 +195,6 @@ extern Fl_Input *inpPulseServer;
|
|||
extern Fl_Group *AudioNull;
|
||||
extern Fl_Round_Button *btnAudioIO[4];
|
||||
extern Fl_Group *tabAudioOpt;
|
||||
#include <FL/Fl_Spinner.H>
|
||||
extern Fl_Spinner *cntRxRateCorr;
|
||||
extern Fl_Spinner *cntTxRateCorr;
|
||||
extern Fl_Spinner *cntTxOffset;
|
||||
|
|
@ -146,109 +212,48 @@ extern Fl_Value_Slider *valPCMvolume;
|
|||
extern Fl_Input_Choice *menuMix;
|
||||
extern void resetMixerControls();
|
||||
extern Fl_Check_Button *btnMixer;
|
||||
extern Fl_Group *tabMisc;
|
||||
extern Fl_Tabs *tabsMisc;
|
||||
extern Fl_Group *tabCPUspeed;
|
||||
extern Fl_Check_Button *chkSlowCpu;
|
||||
extern Fl_Group *tabMacros;
|
||||
extern Fl_Check_Button *btnUseLastMacro;
|
||||
extern Fl_Check_Button *btnDisplayMacroFilename;
|
||||
extern Fl_Group *tabMainWindow;
|
||||
extern Fl_Group *tabUI;
|
||||
extern Fl_Group *tabUserInterface;
|
||||
extern Fl_Check_Button *btnShowTooltips;
|
||||
extern Fl_Check_Button *chkMenuIcons;
|
||||
extern Fl_Choice *mnuScheme;
|
||||
extern Fl_Check_Button *btnNagMe;
|
||||
extern Fl_Check_Button *btnClearOnSave;
|
||||
extern Fl_Group *tabWfallRestart;
|
||||
extern Fl_Counter *cntrWfwidth;
|
||||
extern Fl_Counter *cntrWfheight;
|
||||
extern Fl_Check_Button *btnDockedScope;
|
||||
extern Fl_Check_Button *btnDockedRigControl;
|
||||
extern Fl_Check_Button *btnCheckButtons;
|
||||
extern Fl_Check_Button *btnShowTooltips;
|
||||
extern Fl_Check_Button *btnNagMe;
|
||||
extern Fl_Group *tabRSid;
|
||||
extern Fl_Check_Button *chkTransmitRSid;
|
||||
extern Fl_Check_Button *chkRSidWideSearch;
|
||||
extern Fl_Group *tabSweetSpot;
|
||||
extern Fl_Value_Input *valCWsweetspot;
|
||||
extern Fl_Value_Input *valRTTYsweetspot;
|
||||
extern Fl_Value_Input *valPSKsweetspot;
|
||||
extern Fl_Check_Button *btnStartAtSweetSpot;
|
||||
extern Fl_Group *tabModems;
|
||||
extern Fl_Tabs *tabsModems;
|
||||
extern Fl_Group *tabCW;
|
||||
extern Fl_Value_Slider *sldrCWbandwidth;
|
||||
extern Fl_Counter *cntCWrange;
|
||||
extern Fl_Check_Button *btnCWrcvTrack;
|
||||
#include <FL/Fl_Value_Output.H>
|
||||
extern Fl_Value_Output *valCWrcvWPM;
|
||||
#include <FL/Fl_Progress.H>
|
||||
extern Fl_Progress *prgsCWrcvWPM;
|
||||
extern Fl_Value_Slider *sldrCWxmtWPM;
|
||||
extern Fl_Counter *cntCWlowerlimit;
|
||||
extern Fl_Counter *cntCWupperlimit;
|
||||
extern Fl_Counter *cntCWweight;
|
||||
extern Fl_Counter *cntCWdash2dot;
|
||||
extern Fl_Counter *cntCWrisetime;
|
||||
extern Fl_Counter *cntCWdefWPM;
|
||||
extern Fl_Group *tabCWQSK;
|
||||
extern Fl_Check_Button *btnQSK;
|
||||
extern Fl_Counter *cntPreTiming;
|
||||
extern Fl_Counter *cntPostTiming;
|
||||
extern Fl_Group *tabTHOR;
|
||||
extern Fl_Input *txtTHORSecondary;
|
||||
extern Fl_Counter *valTHOR_BW;
|
||||
extern Fl_Check_Button *valTHOR_FILTER;
|
||||
extern Fl_Counter *valTHOR_PATHS;
|
||||
extern Fl_Check_Button *valTHOR_SOFT;
|
||||
extern Fl_Value_Slider *valThorCWI;
|
||||
extern Fl_Group *tabDomEX;
|
||||
extern Fl_Input *txtSecondary;
|
||||
extern Fl_Counter *valDominoEX_BW;
|
||||
extern Fl_Check_Button *valDominoEX_FILTER;
|
||||
extern Fl_Check_Button *chkDominoEX_FEC;
|
||||
extern Fl_Counter *valDominoEX_PATHS;
|
||||
extern Fl_Value_Slider *valDomCWI;
|
||||
extern Fl_Group *tabFeld;
|
||||
#include "fontdef.h"
|
||||
extern Fl_Choice *selHellFont;
|
||||
extern Fl_Value_Slider *sldrHellBW;
|
||||
extern Fl_Check_Button *btnHellXmtWidth;
|
||||
extern Fl_Check_Button *btnHellRcvWidth;
|
||||
extern Fl_Check_Button *btnBlackboard;
|
||||
extern Fl_Check_Button *btnHellFastAttack;
|
||||
extern Fl_Check_Button *btnHellSlowAttack;
|
||||
extern Fl_Check_Button *btnFeldHellIdle;
|
||||
extern Fl_Spinner *valHellXmtWidth;
|
||||
extern Fl_Group *tabOlivia;
|
||||
extern Fl_Choice *mnuOlivia_Tones;
|
||||
extern Fl_Choice *mnuOlivia_Bandwidth;
|
||||
extern Fl_Counter *cntOlivia_smargin;
|
||||
extern Fl_Counter *cntOlivia_sinteg;
|
||||
extern Fl_Check_Button *btnOlivia_8bit;
|
||||
extern Fl_Group *tabPSK;
|
||||
extern Fl_Counter *cntSearchRange;
|
||||
extern Fl_Check_Button *btnPSKmailSweetSpot;
|
||||
extern Fl_Counter *cntServerOffset;
|
||||
extern Fl_Check_Button *btnMarquee;
|
||||
extern Fl_Check_Button *btnShowFrequencies;
|
||||
extern Fl_Spinner *cntChannels;
|
||||
extern Fl_Spinner *cntStartFrequency;
|
||||
extern Fl_Spinner *cntTimeout;
|
||||
extern Fl_Counter *cntACQsn;
|
||||
extern Fl_Group *tabMT63;
|
||||
extern Fl_Check_Button *btnMT63_8bit;
|
||||
extern Fl_Check_Button *btnmt63_interleave;
|
||||
extern Fl_Group *tabRTTY;
|
||||
extern Fl_Choice *selShift;
|
||||
extern Fl_Choice *selBaud;
|
||||
extern Fl_Choice *selBits;
|
||||
extern Fl_Choice *selParity;
|
||||
extern Fl_Choice *selStopBits;
|
||||
extern Fl_Check_Button *chkPseudoFSK;
|
||||
extern Fl_Check_Button *btnCRCRLF;
|
||||
extern Fl_Check_Button *btnAUTOCRLF;
|
||||
extern Fl_Counter *cntrAUTOCRLF;
|
||||
extern Fl_Round_Button *btnRTTYafc[3];
|
||||
extern Fl_Check_Button *btnPreferXhairScope;
|
||||
extern Fl_Check_Button *chkXagc;
|
||||
extern Fl_Check_Button *chkUOSrx;
|
||||
extern Fl_Check_Button *chkUOStx;
|
||||
extern Fl_Group *tabWaterfall;
|
||||
#include "colorbox.h"
|
||||
extern colorbox *WF_Palette;
|
||||
extern Fl_Button *btnColor[9];
|
||||
extern Fl_Button *btnLoadPalette;
|
||||
extern Fl_Button *btnSavePalette;
|
||||
extern Fl_Counter *cntLowFreqCutoff;
|
||||
extern Fl_Check_Button *btnWFaveraging;
|
||||
extern Fl_Button *btnWaterfallFont;
|
||||
extern Fl_Check_Button *btnBlackman;
|
||||
extern Fl_Check_Button *btnHamming;
|
||||
extern Fl_Check_Button *btnHanning;
|
||||
extern Fl_Check_Button *btnTriangular;
|
||||
extern Fl_Counter *valLatency;
|
||||
extern Fl_Check_Button *btnUseCursorLines;
|
||||
extern Fl_Check_Button *btnUseBWTracks;
|
||||
extern Fl_Check_Button *btnUseCursorCenterLine;
|
||||
#include <FL/Fl_Color_Chooser.H>
|
||||
extern Fl_Button *btnCursorBWcolor;
|
||||
extern Fl_Button *btnCursorCenterLineColor;
|
||||
extern Fl_Button *btnBwTracksColor;
|
||||
extern Fl_Check_Button *chkShowAudioScale;
|
||||
extern Fl_Check_Button *btnViewXmtSignal;
|
||||
extern Fl_Value_Slider *valTxMonitorLevel;
|
||||
extern Fl_Check_Button *btnWaterfallHistoryDefault;
|
||||
extern Fl_Check_Button *btnWaterfallQSY;
|
||||
extern Fl_Input *inpWaterfallClickText;
|
||||
extern Fl_Check_Button *btnWaterfallClickInsert;
|
||||
extern Fl_Choice *mnuWaterfallWheelAction;
|
||||
extern Fl_Button *btnSaveConfig;
|
||||
#include <FL/Fl_Return_Button.H>
|
||||
extern Fl_Return_Button *btnCloseConfig;
|
||||
|
|
|
|||
|
|
@ -51,11 +51,13 @@
|
|||
ELEM_(bool, WaterfallClickInsert, "WATERFALLCLICKINSERT", false) \
|
||||
ELEM_(std::string, WaterfallClickText, "WATERFALLCLICKTEXT", "\n<FREQ>\n") \
|
||||
ELEM_(int, WaterfallWheelAction, "WATERFALLWHEELACTION", waterfall::WF_CARRIER) \
|
||||
/* PSK mail interface */ \
|
||||
ELEM_(bool, PSKmailSweetSpot, "PSKMAILSWEETSPOT", false) \
|
||||
/* PSK / PSKmail interface */ \
|
||||
ELEM_(int, SearchRange, "PSKSEARCHRANGE", 200) \
|
||||
ELEM_(int, ServerOffset, "PSKSERVEROFFSET", 40) \
|
||||
ELEM_(double, ACQsn, "ACQSN", 6.0) \
|
||||
ELEM_(bool, StatusDim, "STATUSDIM", true) \
|
||||
ELEM_(double, StatusTimeout, "STATUSTIMEOUT", 15.0) \
|
||||
ELEM_(bool, PSKmailSweetSpot, "PSKMAILSWEETSPOT", false) \
|
||||
ELEM_(int, ServerOffset, "PSKSERVEROFFSET", 40) \
|
||||
/* RTTY */ \
|
||||
ELEM_(int, rtty_shift, "RTTYSHIFT", 3) /* 170 */ \
|
||||
ELEM_(int, rtty_baud, "RTTYBAUD", 0) /* 45 */ \
|
||||
|
|
@ -153,14 +155,16 @@
|
|||
ELEM_(int, wfwidth, "WFWIDTH", 3000) \
|
||||
ELEM_(int, wfheight, "WFHEIGHT", 125) \
|
||||
ELEM_(bool, tooltips, "TOOLTIPS", true) \
|
||||
ELEM_(bool, useCheckButtons, "USECHECKBUTTONS", false) \
|
||||
ELEM_(bool, useCheckButtons, "USECHECKBUTTONS", false) \
|
||||
ELEM_(bool, NagMe, "NAGME", false) \
|
||||
ELEM_(bool, menu_icons, "MENUICONS", true) \
|
||||
ELEM_(bool, ClearOnSave, "CLEARONSAVE", false) \
|
||||
ELEM_(bool, menuicons, "MENUICONS", true) \
|
||||
/* QRZ */ \
|
||||
ELEM_(int, QRZ, "QRZTYPE", QRZ_NONE) \
|
||||
ELEM_(int, QRZ, "QRZTYPE", 0) /* Not available */ \
|
||||
ELEM_(std::string, QRZpathname, "QRZPATHNAME", "") \
|
||||
ELEM_(std::string, QRZusername, "QRZUSER", "") \
|
||||
ELEM_(std::string, QRZuserpassword, "QRZPASSWORD", "") \
|
||||
ELEM_(int, SHOWPASSWORD, "QRZshowpassword", FL_NORMAL_INPUT & FL_SECRET_INPUT) \
|
||||
ELEM_(bool, QRZchanged, "", false) \
|
||||
/* Rig control */ \
|
||||
ELEM_(bool, btnusb, "BTNUSB", true) \
|
||||
|
|
@ -239,9 +243,11 @@
|
|||
ELEM_(bool, MicIn, "MICIN", false) \
|
||||
ELEM_(bool, LineIn, "LINEIN", true) \
|
||||
ELEM_(bool, EnableMixer, "ENABLEMIXER", false) \
|
||||
ELEM_(double, PCMvolume, "PCMVOLUME", 80.0) \
|
||||
ELEM_(double, PCMvolume, "PCMVOLUME", 0.8) \
|
||||
ELEM_(bool, MuteInput, "MUTEINPUT", true) \
|
||||
ELEM_(double, TxMonitorLevel, "TXMONITORLEVEL", 0.5) \
|
||||
/* Waterfall palette */ \
|
||||
ELEM_(std::string, PaletteName, "PALETTENAME", "") \
|
||||
ELEM_(RGB, cfgpal0, "PALETTE0", { 0, 0, 0 }) \
|
||||
ELEM_(RGB, cfgpal1, "PALETTE1", { 0, 0, 62 }) \
|
||||
ELEM_(RGB, cfgpal2, "PALETTE2", { 0, 0, 126 }) \
|
||||
|
|
@ -284,6 +290,8 @@
|
|||
ELEM_(int, VIEWERchannels, "VIEWERCHANNELS", 20) \
|
||||
ELEM_(double, VIEWERsquelch, "VIEWERSQUELCH", 10.0) \
|
||||
ELEM_(int, VIEWERtimeout, "VIEWERTIMEOUT", 15) \
|
||||
ELEM_(Fl_Font, ViewerFontnbr, "VIEWERFONTNBR", FL_COURIER) \
|
||||
ELEM_(int, ViewerFontsize, "VIEWERFONTSIZE", FL_NORMAL_SIZE) \
|
||||
/* XML-RPC/ARQ servers */ \
|
||||
ELEM_(std::string, xmlrpc_address, "", "127.0.0.1") \
|
||||
ELEM_(std::string, xmlrpc_port, "", "7362") \
|
||||
|
|
@ -303,12 +311,15 @@ struct configuration
|
|||
CONFIG_LIST
|
||||
|
||||
void writeDefaultsXML();
|
||||
void storeDefaults();
|
||||
bool readDefaultsXML();
|
||||
void loadDefaults();
|
||||
void saveDefaults();
|
||||
int setDefaults();
|
||||
|
||||
void initOperator();
|
||||
void initInterface();
|
||||
void initMixerDevices();
|
||||
void testCommPorts();
|
||||
const char* strBaudRate();
|
||||
int BaudRate(size_t);
|
||||
|
|
|
|||
|
|
@ -113,6 +113,7 @@ extern Digiscope *digiscope;
|
|||
|
||||
extern void toggleRSID();
|
||||
|
||||
extern void set_menus();
|
||||
extern void create_fl_digi_main();
|
||||
extern void update_main_title();
|
||||
extern Fl_Menu_Item menu_[];
|
||||
|
|
@ -151,8 +152,8 @@ extern void put_Status2(const char *msg, double timeout = 0.0, status_timeout ac
|
|||
extern void set_AFCind( double val );
|
||||
extern void set_AFCrange(double val);
|
||||
|
||||
extern void show_frequency(long long freq);
|
||||
extern void show_mode(const string& sMode);
|
||||
extern void show_frequency(long long);
|
||||
extern void show_mode(const string& mode);
|
||||
extern void show_bw(const string& sWidth);
|
||||
|
||||
extern void put_WARNstatus(double);
|
||||
|
|
|
|||
|
|
@ -46,9 +46,9 @@ struct MACROTEXT {
|
|||
string expandMacro(int n);
|
||||
void execute(int n);
|
||||
MACROTEXT() {
|
||||
changed = false;
|
||||
changed = false;
|
||||
char szname[5];
|
||||
for (int i = 0; i < MAXMACROS; i++) {
|
||||
for (int i = 0; i < MAXMACROS; i++) {
|
||||
snprintf(szname, sizeof(szname), "F-%d", i+1);
|
||||
name[i] = szname;//"";
|
||||
text[i] = "";
|
||||
|
|
@ -61,4 +61,7 @@ private:
|
|||
extern MACROTEXT macros;
|
||||
extern CONTESTCNTR contest_count;
|
||||
|
||||
extern string info1msg;
|
||||
extern string info2msg;
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -52,5 +52,6 @@ extern const char *rx_icon[];
|
|||
extern const char *tx_icon[];
|
||||
extern const char *fldigi_icon[];
|
||||
extern const char *waterfall_icon[];
|
||||
extern const char *dice_icon[];
|
||||
|
||||
#endif // PIXMAPS_H_
|
||||
|
|
|
|||
|
|
@ -95,4 +95,6 @@ public:
|
|||
void set_freq(int n, double f) { frequency[n] = f; nomfreq[n] = (int)f; }
|
||||
};
|
||||
|
||||
extern viewpsk *pskviewer;
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ int main(int argc, char ** argv)
|
|||
PskMailDir = szPskMailDir;
|
||||
checkTLF();
|
||||
|
||||
Fl::lock(); // start the gui thread!!
|
||||
FL_LOCK_E(); // start the gui thread!!
|
||||
Fl::visual(FL_RGB); // insure 24 bit color operation
|
||||
|
||||
fl_register_images();
|
||||
|
|
@ -382,7 +382,7 @@ void generate_option_help(void) {
|
|||
<< " -g GEOMETRY, -geometry GEOMETRY\n"
|
||||
<< " Set the initial window size and position\n"
|
||||
<< " GEOMETRY format is ``WxH+X+Y''\n"
|
||||
<< " ** " << PACKAGE_NAME << " may override this settting **\n\n"
|
||||
<< " ** " << PACKAGE_NAME << " may override this setting **\n\n"
|
||||
|
||||
<< " -i, -iconic\n"
|
||||
<< " Start " << PACKAGE_NAME << " in iconified state\n\n"
|
||||
|
|
@ -394,10 +394,7 @@ void generate_option_help(void) {
|
|||
<< " Set the window class to CLASSNAME\n\n"
|
||||
|
||||
<< " -ti WINDOWTITLE, -title WINDOWTITLE\n"
|
||||
<< " Set the window title\n\n"
|
||||
|
||||
<< " -to, -tooltips or -not, -notooltips\n"
|
||||
<< " Enable or disable tooltips\n\n";
|
||||
<< " Set the window title\n\n";
|
||||
|
||||
help << "Additional UI options:\n\n"
|
||||
|
||||
|
|
|
|||
|
|
@ -476,8 +476,8 @@ int configuration::setDefaults()
|
|||
chkTransmitRSid->value(TransmitRSid);
|
||||
chkRSidWideSearch->value(rsidWideSearch);
|
||||
chkSlowCpu->value(slowcpu);
|
||||
|
||||
Fl_Button* qrzb;
|
||||
|
||||
Fl_Button* qrzb = btnQRZnotavailable;
|
||||
switch (QRZ) {
|
||||
case QRZ_NONE:
|
||||
qrzb = btnQRZnotavailable;
|
||||
|
|
@ -494,16 +494,15 @@ int configuration::setDefaults()
|
|||
case QRZ_HAMCALL:
|
||||
qrzb = btnHamcall;
|
||||
break;
|
||||
default :
|
||||
break;
|
||||
}
|
||||
set_qrz_buttons(qrzb);
|
||||
txtQRZpathname->value(QRZpathname.c_str());
|
||||
|
||||
// btnRTTY_USB->value(RTTY_USB);
|
||||
btnsendid->value(sendid);
|
||||
btnsendvideotext->value(sendtextid);
|
||||
chkID_SMALL->value(ID_SMALL);
|
||||
|
||||
FL_UNLOCK();
|
||||
|
||||
wf->setPrefilter(wfPreFilter);
|
||||
valLatency->value(latency);
|
||||
|
|
@ -541,7 +540,6 @@ void configuration::initInterface()
|
|||
rigCAT_close();
|
||||
// MilliSleep(100);
|
||||
|
||||
|
||||
btnPTTis = (btnPTT[0]->value() ? 0 :
|
||||
btnPTT[1]->value() ? 1 :
|
||||
btnPTT[2]->value() ? 2 :
|
||||
|
|
|
|||
|
|
@ -45,6 +45,8 @@ void loadBrowser(Fl_Widget *widget) {
|
|||
w->add("<NAME>\tremote name");
|
||||
w->add("<QTH>\tother qth");
|
||||
w->add("<RST>\tother RST");
|
||||
w->add("<INFO1>\ts/n etc.");
|
||||
w->add("<INFO2>\timd etc.");
|
||||
|
||||
w->add(LINE_SEP);
|
||||
w->add("<GET>\ttext to NAME/QTH");
|
||||
|
|
|
|||
|
|
@ -63,6 +63,8 @@ void pEXEC(string &, size_t &);
|
|||
void pSTOP(string &, size_t &);
|
||||
void pCONT(string &, size_t &);
|
||||
void pGET(string &, size_t &);
|
||||
void pINFO1(string &, size_t &);
|
||||
void pINFO2(string &, size_t &);
|
||||
|
||||
MTAGS mtags[] = {
|
||||
{"<CALL>", pCALL},
|
||||
|
|
@ -77,6 +79,8 @@ MTAGS mtags[] = {
|
|||
{"<MYNAME>", pMYNAME},
|
||||
{"<MYQTH>", pMYQTH},
|
||||
{"<MYRST>", pMYRST},
|
||||
{"<INFO1>", pINFO1},
|
||||
{"<INFO2>", pINFO2},
|
||||
{"<LDT>", pLDT},
|
||||
{"<ILDT>", pILDT},
|
||||
{"<ZDT>", pZDT},
|
||||
|
|
@ -97,17 +101,29 @@ MTAGS mtags[] = {
|
|||
{"<EXEC>", pEXEC},
|
||||
{"<STOP>", pSTOP},
|
||||
{"<CONT>", pCONT},
|
||||
{"<GET>", pGET},
|
||||
{"<GET>", pGET},
|
||||
{0, 0}
|
||||
};
|
||||
|
||||
static bool expand;
|
||||
static bool GET = false;
|
||||
|
||||
string info1msg = "";
|
||||
string info2msg = "";
|
||||
|
||||
size_t mystrftime( char *s, size_t max, const char *fmt, const struct tm *tm) {
|
||||
return strftime(s, max, fmt, tm);
|
||||
}
|
||||
|
||||
void pINFO1(string &s, size_t &i)
|
||||
{
|
||||
s.replace( i, 7, info1msg );
|
||||
}
|
||||
|
||||
void pINFO2(string &s, size_t &i)
|
||||
{
|
||||
s.replace( i, 7, info2msg );
|
||||
}
|
||||
|
||||
void pCALL(string &s, size_t &i)
|
||||
{
|
||||
|
|
@ -291,7 +307,8 @@ void pLOG(string &s, size_t &i)
|
|||
{
|
||||
submit_log();
|
||||
s.replace(i, 5, "");
|
||||
clearQSO();
|
||||
if (progdefaults.ClearOnSave)
|
||||
clearQSO();
|
||||
}
|
||||
|
||||
void pTIMER(string &s, size_t &i)
|
||||
|
|
|
|||
|
|
@ -3225,31 +3225,56 @@ const char *folder_open_icon[] = {
|
|||
/* XPM */
|
||||
const char *waterfall_icon[] = {
|
||||
/* columns rows colors chars-per-pixel */
|
||||
"16 16 7 1",
|
||||
"16 16 5 1",
|
||||
" c None",
|
||||
". c #1867DE",
|
||||
"+ c #3B5A72",
|
||||
"@ c #204A87",
|
||||
"# c #ABCBE2",
|
||||
"$ c #FFFFFF",
|
||||
"% c #2E3436",
|
||||
". c #124188",
|
||||
"+ c #788D9B",
|
||||
"@ c #ABCBE2",
|
||||
"# c #204A87",
|
||||
" ",
|
||||
" ",
|
||||
" ....++++++ ",
|
||||
" ++++.....@@ ",
|
||||
" +....@##@#@. ",
|
||||
" ....@#@@.#@. ",
|
||||
" ..@@@.##.#@. ",
|
||||
" @.@#@.@#.#@.. ",
|
||||
" @.@#@.@@.@$.. ",
|
||||
" @#@#@%@$$@$@$ ",
|
||||
" @@@@@$$$%%@@ ",
|
||||
" @@@$%$%%%%$%$ ",
|
||||
" @%$$%%$%%%%%.$ ",
|
||||
" @%%%%$%%...... ",
|
||||
" .......... ",
|
||||
" ..+..@@@@..+.. ",
|
||||
" ..+..@@@@..+.. ",
|
||||
" ..+..@@@@..+.. ",
|
||||
" ..+..@##@..+.. ",
|
||||
" ..+..@@@@..+.. ",
|
||||
" ..+..@@@@..+.. ",
|
||||
" ..+..@@@@..+.. ",
|
||||
" ..+..@@@@..+.. ",
|
||||
" ..+..@##@..+.. ",
|
||||
" ..+..@@@@..+.. ",
|
||||
" ..+..@@@@..+.. ",
|
||||
" ..+..@##@..+.. ",
|
||||
" ..+..@@@@..+.. ",
|
||||
" ..+..@##@..+.. ",
|
||||
" "};
|
||||
|
||||
/* XPM */
|
||||
const char *dice_icon[] = {
|
||||
/* columns rows colors chars-per-pixel */
|
||||
"16 16 5 1",
|
||||
" c None",
|
||||
". c #888A85",
|
||||
"+ c #FDF2D2",
|
||||
"@ c #740404",
|
||||
"# c #A50101",
|
||||
"................",
|
||||
".++++++++++++++.",
|
||||
".++@@#++++@@#++.",
|
||||
".++@##++++@##++.",
|
||||
".++###++++###++.",
|
||||
".++++++++++++++.",
|
||||
".++@@#++++@@#++.",
|
||||
".++@##++++@##++.",
|
||||
".++###++++###++.",
|
||||
".++++++++++++++.",
|
||||
".++@@#++++@@#++.",
|
||||
".++@##++++@##++.",
|
||||
".++###++++###++.",
|
||||
".++++++++++++++.",
|
||||
"................",
|
||||
" "}
|
||||
;
|
||||
|
||||
|
||||
/* XPM */
|
||||
const char *preferences_system_icon[] = {
|
||||
|
|
@ -3735,26 +3760,28 @@ const char *system_users_icon[] = {
|
|||
/* XPM */
|
||||
const char *utilities_system_monitor_icon[] = {
|
||||
/* columns rows colors chars-per-pixel */
|
||||
"16 16 3 1",
|
||||
"16 16 4 1",
|
||||
" c None",
|
||||
". c #204A87",
|
||||
"+ c #FFFFFF",
|
||||
"................",
|
||||
".+....++++....+.",
|
||||
"..+.++....++.+..",
|
||||
"...+........+...",
|
||||
"..+.+......+.+..",
|
||||
"..+..+....+..+..",
|
||||
".+....+..+....+.",
|
||||
".+.....++.....+.",
|
||||
".+.....++.....+.",
|
||||
".+....+..+....+.",
|
||||
"..+..+....+..+..",
|
||||
"..+.+......+.+..",
|
||||
"...+........+...",
|
||||
"..+.++....++.+..",
|
||||
".+....++++....+.",
|
||||
"................"};
|
||||
"+ c #E0E0E0",
|
||||
"@ c #ABCBE2",
|
||||
" ",
|
||||
".....+++++..... ",
|
||||
"...++..@..++... ",
|
||||
"..+....@....+.. ",
|
||||
".+.....@.....+. ",
|
||||
".+.....@.....+. ",
|
||||
"+......@......+ ",
|
||||
"+......@......+ ",
|
||||
"+@@@@@@@@@@@@@+ ",
|
||||
"+......@......+ ",
|
||||
"+......@......+ ",
|
||||
".+.....@.....+. ",
|
||||
".+.....@.....+. ",
|
||||
"..+....@....+.. ",
|
||||
"...++..@..++... ",
|
||||
".....+++++..... "}
|
||||
;
|
||||
|
||||
/* XPM */
|
||||
const char *multimedia_player_icon[] = {
|
||||
|
|
@ -4310,6 +4337,54 @@ const char *close_icon[] = {
|
|||
"TTTTTTTTTTTTTTTT"
|
||||
};
|
||||
|
||||
#ifdef __CYGWIN__
|
||||
/* XPM */
|
||||
const char *enter_key_icon[] = {
|
||||
/* columns rows colors chars-per-pixel */
|
||||
"16 16 26 1",
|
||||
" c None",
|
||||
". c #BABAB9",
|
||||
"+ c #888A85",
|
||||
"@ c #FFFFFF",
|
||||
"# c #FCFCFC",
|
||||
"$ c #F7F7F7",
|
||||
"% c #F3F3F3",
|
||||
"& c #F9F9F9",
|
||||
"* c #F8F8F8",
|
||||
"= c #000000",
|
||||
"- c #F5F5F5",
|
||||
"; c #F0F0F0",
|
||||
"> c #E3E3E3",
|
||||
", c #ECECEC",
|
||||
"' c #DFDFDF",
|
||||
") c #E8E8E8",
|
||||
"! c #DCDCDC",
|
||||
"~ c #DDDDDD",
|
||||
"{ c #DEDEDE",
|
||||
"] c #D8D8D8",
|
||||
"^ c #D9D9D9",
|
||||
"/ c #BBBBBB",
|
||||
"( c #D5D5D5",
|
||||
"_ c #D4D4D4",
|
||||
": c #D3D3D3",
|
||||
"< c #D0D0D0",
|
||||
" ",
|
||||
" ........+ ",
|
||||
" .@#####@+ ",
|
||||
" .@$%&*@@+ ",
|
||||
" .@%%=*@@+ ",
|
||||
" .@%%=&@@+ ",
|
||||
" .@%%=*@@+ ",
|
||||
" .@%%=-@@+ ",
|
||||
" ......%%%=;>@+ ",
|
||||
" .%%%%=%%%=,'@+ ",
|
||||
" .%%%==%%%=)!~+ ",
|
||||
" .%%======={]]+ ",
|
||||
" .%%^==///((_(+ ",
|
||||
" .%%%:=/(((<<<+ ",
|
||||
" ++++++++++++++ ",
|
||||
" "};
|
||||
#else
|
||||
// enter key icon from KDE's crystal theme
|
||||
|
||||
/* XPM */
|
||||
|
|
@ -4425,6 +4500,7 @@ const char *enter_key_icon[] = {
|
|||
"}u5>,,,,,,,,,:-}",
|
||||
"}}}}}}}}}}}}}}}}"
|
||||
};
|
||||
#endif
|
||||
|
||||
/* XPM */
|
||||
const char *clear_sq_icon[] = {
|
||||
|
|
|
|||
|
|
@ -265,7 +265,7 @@ void status::initLastState()
|
|||
TiledGroup->position( X, Y + H, X, Y + RxTextHeight);
|
||||
}
|
||||
|
||||
if (rigShown == true) {
|
||||
if (!progdefaults.docked_rig_control && rigShown == true) {
|
||||
if (!rigcontrol)
|
||||
createRigDialog();
|
||||
rigcontrol->resize(rigX, rigY, rigW, rigH);
|
||||
|
|
|
|||
|
|
@ -480,8 +480,8 @@ void psk::update_syncscope()
|
|||
snprintf(msg2, sizeof(msg2), "imd %3d dB", (int)(floor(imd)));
|
||||
|
||||
if (imdValid) {
|
||||
put_Status1(msg1, 5.0, STATUS_DIM);
|
||||
put_Status2(msg2, 5.0, STATUS_DIM);
|
||||
put_Status1(msg1, progdefaults.StatusTimeout, progdefaults.StatusDim ? STATUS_DIM : STATUS_CLEAR);
|
||||
put_Status2(msg2, progdefaults.StatusTimeout, progdefaults.StatusDim ? STATUS_DIM : STATUS_CLEAR);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ bool hamlib_init(bool bPtt)
|
|||
hamlib_closed = true;
|
||||
|
||||
#ifdef __CYGWIN__
|
||||
string port = progdefaults.HamRigDevice;
|
||||
adjust_port(port);
|
||||
#endif
|
||||
|
||||
|
|
@ -89,8 +90,11 @@ bool hamlib_init(bool bPtt)
|
|||
|
||||
xcvr->init(progdefaults.HamRigModel);
|
||||
|
||||
#ifdef __CYGWIN__
|
||||
xcvr->setConf("rig_pathname", port.c_str());
|
||||
#else
|
||||
xcvr->setConf("rig_pathname", progdefaults.HamRigDevice.c_str());
|
||||
|
||||
#endif
|
||||
snprintf(szParam, sizeof(szParam), "%d", progdefaults.HamlibWait);
|
||||
xcvr->setConf("post_write_delay", szParam);
|
||||
|
||||
|
|
@ -423,8 +427,12 @@ static int add_to_list(const struct rig_caps* rc, void*)
|
|||
return 1;
|
||||
}
|
||||
|
||||
static bool rig_cmp(const struct rig_caps* rig1, const struct rig_caps* rig2)
|
||||
//static bool rig_cmp(const struct rig_caps* rig1, const struct rig_caps* rig2)
|
||||
//{
|
||||
bool rig_cmp(const void *a, const void *b)
|
||||
{
|
||||
const struct rig_caps *rig1 = (const struct rig_caps *)a;
|
||||
const struct rig_caps *rig2 = (const struct rig_caps *)b;
|
||||
int ret;
|
||||
|
||||
ret = strcasecmp(rig1->mfg_name, rig2->mfg_name);
|
||||
|
|
@ -438,19 +446,18 @@ static bool rig_cmp(const struct rig_caps* rig1, const struct rig_caps* rig2)
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
void hamlib_get_rigs(void)
|
||||
{
|
||||
if (!hamlib_rigs.empty())
|
||||
return;
|
||||
|
||||
#ifndef NDEBUG
|
||||
// if (!hamlib_rigs.empty())
|
||||
// return;
|
||||
hamlib_rigs.clear();
|
||||
#ifdef NDEBUG
|
||||
rig_set_debug(RIG_DEBUG_NONE);
|
||||
#endif
|
||||
rig_load_all_backends();
|
||||
rig_list_foreach(add_to_list, 0);
|
||||
sort(hamlib_rigs.begin(), hamlib_rigs.end(), rig_cmp);
|
||||
// riglist.sort(rig_cmp);
|
||||
// hamlib_rigs.sort(rig_cmp);
|
||||
}
|
||||
|
||||
rig_model_t hamlib_get_rig_model_compat(const char* name)
|
||||
|
|
|
|||
|
|
@ -441,7 +441,7 @@ void rigCAT_setfreq(long long f)
|
|||
list<XMLIOS>::iterator itrCmd;
|
||||
string strCmd;
|
||||
|
||||
if (noXMLfile) {
|
||||
if (noXMLfile || nonCATrig) {
|
||||
noCATfreq = f;
|
||||
return;
|
||||
}
|
||||
|
|
@ -1006,9 +1006,10 @@ flowcontrol: %c",
|
|||
LOG_ERROR("Xcvr Freq request not answered");
|
||||
rigio.ClosePort();
|
||||
return false;
|
||||
} else {
|
||||
rigCAT_sendINIT();
|
||||
init_Xml_RigDialog();
|
||||
}
|
||||
rigCAT_sendINIT();
|
||||
init_Xml_RigDialog();
|
||||
}
|
||||
} else {
|
||||
sRigMode = "";
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ struct rmode_name_t {
|
|||
, // C99 trailing commas in enumerations not yet in the C++ standard
|
||||
{ RIG_MODE_SAM, "SAM" },
|
||||
{ RIG_MODE_SAL, "SAL" },
|
||||
{ RIG_MODE_SAH, "SAH" },
|
||||
{ RIG_MODE_SAH, "SAH" }
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
@ -214,8 +214,15 @@ size_t addtoList(long val)
|
|||
qrg_mode_t m;
|
||||
|
||||
m.rfcarrier = val;
|
||||
|
||||
if (progdefaults.docked_rig_control) {
|
||||
if (strlen(qso_opMODE->value()))
|
||||
m.rmode = qso_opMODE->value();
|
||||
} else {
|
||||
if (strlen(opMODE->value()))
|
||||
m.rmode = opMODE->value();
|
||||
}
|
||||
|
||||
if (active_modem) {
|
||||
m.carrier = active_modem->get_freq();
|
||||
m.mode = active_modem->get_mode();
|
||||
|
|
@ -319,11 +326,14 @@ void setMode()
|
|||
#if USE_HAMLIB
|
||||
if (progdefaults.chkUSEHAMLIBis)
|
||||
hamlib_setmode(mode_nums[opMODE->value()]);
|
||||
else
|
||||
#endif
|
||||
if (progdefaults.chkUSERIGCATis)
|
||||
rigCAT_setmode(opMODE->value());
|
||||
if (progdefaults.chkUSEMEMMAPis)
|
||||
else if (progdefaults.chkUSEMEMMAPis)
|
||||
rigMEM_setmode(opMODE->value());
|
||||
else
|
||||
rigCAT_setmode(opMODE->value());
|
||||
}
|
||||
|
||||
int cb_qso_opMODE()
|
||||
|
|
@ -333,11 +343,14 @@ int cb_qso_opMODE()
|
|||
#if USE_HAMLIB
|
||||
if (progdefaults.chkUSEHAMLIBis)
|
||||
hamlib_setmode(mode_nums[qso_opMODE->value()]);
|
||||
else
|
||||
#endif
|
||||
if (progdefaults.chkUSERIGCATis)
|
||||
rigCAT_setmode(qso_opMODE->value());
|
||||
if (progdefaults.chkUSEMEMMAPis)
|
||||
else if (progdefaults.chkUSEMEMMAPis)
|
||||
rigMEM_setmode(qso_opMODE->value());
|
||||
else
|
||||
rigCAT_setmode(qso_opMODE->value());
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -456,6 +469,8 @@ void delFreq()
|
|||
if (v >= 0) {
|
||||
freqlist.erase(freqlist.begin() + v);
|
||||
FreqSelect->remove(v + 1);
|
||||
if (qso_opBrowser)
|
||||
qso_opBrowser->remove(v + 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -478,7 +493,8 @@ void addFreq()
|
|||
if (freq) {
|
||||
size_t pos = addtoList(freq);
|
||||
FreqSelect->insert(pos+1, freqlist[pos].str().c_str());
|
||||
qso_opBrowser->insert(pos+1, freqlist[pos].str().c_str());
|
||||
if (qso_opBrowser)
|
||||
qso_opBrowser->insert(pos+1, freqlist[pos].str().c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -529,25 +545,36 @@ LOG_DEBUG("xml rig");
|
|||
bool init_NoRig_RigDialog()
|
||||
{
|
||||
LOG_DEBUG("no rig");
|
||||
clearList();
|
||||
buildlist();
|
||||
|
||||
opBW->deactivate();
|
||||
opMODE->clear();
|
||||
opMODE->add("LSB");
|
||||
opMODE->add("USB");
|
||||
opMODE->index(0);
|
||||
opMODE->activate();
|
||||
|
||||
if (progdefaults.docked_rig_control) {
|
||||
qso_opBW->deactivate();
|
||||
qso_opMODE->clear();
|
||||
qso_opMODE->add("LSB");
|
||||
qso_opMODE->add("USB");
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < sizeof(modes)/sizeof(modes[0]); i++) {
|
||||
opMODE->add(modes[i].name);
|
||||
if (progdefaults.docked_rig_control)
|
||||
qso_opMODE->add(modes[i].name);
|
||||
}
|
||||
LSBmodes.clear();
|
||||
LSBmodes.push_back("LSB");
|
||||
LSBmodes.push_back("CWR");
|
||||
LSBmodes.push_back("RTTY");
|
||||
LSBmodes.push_back("PKTLSB");
|
||||
|
||||
opMODE->index(0);
|
||||
opMODE->activate();
|
||||
|
||||
if (progdefaults.docked_rig_control) {
|
||||
qso_opMODE->index(0);
|
||||
qso_opMODE->activate();
|
||||
}
|
||||
|
||||
clearList();
|
||||
buildlist();
|
||||
|
||||
windowTitle = "Rig Not Specified";
|
||||
setTitle();
|
||||
|
||||
|
|
@ -557,11 +584,14 @@ LOG_DEBUG("no rig");
|
|||
bool init_rigMEM_RigDialog()
|
||||
{
|
||||
LOG_DEBUG("Mem Mapped rig");
|
||||
clearList();
|
||||
buildlist();
|
||||
|
||||
opBW->deactivate();
|
||||
opMODE->clear();
|
||||
|
||||
if (progdefaults.docked_rig_control) {
|
||||
qso_opBW->deactivate();
|
||||
qso_opMODE->clear();
|
||||
}
|
||||
|
||||
opMODE->add("LSB");
|
||||
opMODE->add("USB");
|
||||
opMODE->index(0);
|
||||
|
|
@ -576,6 +606,9 @@ LOG_DEBUG("Mem Mapped rig");
|
|||
qso_opMODE->activate();
|
||||
}
|
||||
|
||||
clearList();
|
||||
buildlist();
|
||||
|
||||
windowTitle = "Memory Mapped Rig";
|
||||
setTitle();
|
||||
|
||||
|
|
@ -588,11 +621,18 @@ bool init_Hamlib_RigDialog()
|
|||
LOG_DEBUG("hamlib");
|
||||
opBW->deactivate();
|
||||
opMODE->clear();
|
||||
|
||||
if (progdefaults.docked_rig_control) {
|
||||
qso_opBW->deactivate();
|
||||
qso_opMODE->clear();
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < sizeof(modes)/sizeof(modes[0]); i++) {
|
||||
mode_nums[modes[i].name] = modes[i].mode;
|
||||
mode_names[modes[i].mode] = modes[i].name;
|
||||
opMODE->add(modes[i].name);
|
||||
qso_opMODE->add(modes[i].name);
|
||||
if (progdefaults.docked_rig_control)
|
||||
qso_opMODE->add(modes[i].name);
|
||||
}
|
||||
clearList();
|
||||
buildlist();
|
||||
|
|
@ -610,6 +650,14 @@ Fl_Double_Window *createRigDialog()
|
|||
{
|
||||
Fl_Double_Window *w;
|
||||
w = rig_dialog();
|
||||
if (!w) return NULL;
|
||||
FreqDisp->SetONOFFCOLOR(
|
||||
fl_rgb_color( progdefaults.FDforeground.R,
|
||||
progdefaults.FDforeground.G,
|
||||
progdefaults.FDforeground.B),
|
||||
fl_rgb_color( progdefaults.FDbackground.R,
|
||||
progdefaults.FDbackground.G,
|
||||
progdefaults.FDbackground.B));
|
||||
w->xclass(PACKAGE_NAME);
|
||||
return w;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -248,7 +248,7 @@ void modem::ModulateXmtr(double *buffer, int len)
|
|||
if (!progdefaults.viewXmtSignal)
|
||||
return;
|
||||
for (int i = 0; i < len; i++) {
|
||||
_mdm_scdbl[scptr] = buffer[i] * 0.1;
|
||||
_mdm_scdbl[scptr] = buffer[i] * progdefaults.TxMonitorLevel;
|
||||
scptr++;
|
||||
if (scptr == 512) {
|
||||
REQ(&waterfall::sig_data, wf, _mdm_scdbl.c_array(), 512, samplerate );
|
||||
|
|
@ -274,7 +274,7 @@ void modem::ModulateStereo(double *left, double *right, int len)
|
|||
if (!progdefaults.viewXmtSignal)
|
||||
return;
|
||||
for (int i = 0; i < len; i++) {
|
||||
_mdm_scdbl[scptr] = left[i] * 0.1;
|
||||
_mdm_scdbl[scptr] = left[i] * progdefaults.TxMonitorLevel;
|
||||
scptr++;
|
||||
if (scptr == 512) {
|
||||
REQ(&waterfall::sig_data, wf, _mdm_scdbl.c_array(), 512, samplerate);
|
||||
|
|
|
|||
|
|
@ -85,6 +85,7 @@ void loadPalette()
|
|||
palLabelStr = "Palette: " + palLabelStr;
|
||||
WF_Palette->label(palLabelStr.c_str());
|
||||
WF_Palette->redraw();
|
||||
progdefaults.PaletteName = palLabelStr;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -108,5 +109,7 @@ void savePalette()
|
|||
if (pos != string::npos) palLabelStr.erase(0, pos+1);
|
||||
palLabelStr = "Palette: " + palLabelStr;
|
||||
WF_Palette->label(palLabelStr.c_str());
|
||||
WF_Palette->redraw();
|
||||
progdefaults.PaletteName = palLabelStr;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1739,6 +1739,8 @@ void waterfall::handle_mouse_wheel(int what, int d)
|
|||
val = sldrHellBW;
|
||||
else if (m == MODE_CW)
|
||||
val = sldrCWbandwidth;
|
||||
else
|
||||
return;
|
||||
msg_fmt = "%s = %2.0f Hz";
|
||||
msg_label = val->label();
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -6,6 +6,14 @@
|
|||
//
|
||||
// This file is part of fldigi.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// FTextView.cxx
|
||||
//
|
||||
// Copyright (C) 2007
|
||||
// Stelios Bounanos, M0GLD
|
||||
//
|
||||
// This file is part of fldigi.
|
||||
//
|
||||
// fldigi is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 3 of the License, or
|
||||
|
|
@ -46,6 +54,8 @@
|
|||
#include "globals.h"
|
||||
#include "re.h"
|
||||
|
||||
#include "debug.h"
|
||||
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
|
@ -291,22 +301,55 @@ void FTextBase::saveFile(void)
|
|||
///
|
||||
/// @return The selection, or the word text at (x,y). <b>Must be freed by the caller</b>.
|
||||
///
|
||||
char *FTextBase::get_bound_text(int x, int y)
|
||||
{
|
||||
int p = xy_to_position(x + this->x(), y + this->y(),
|
||||
Fl_Text_Display_mod::CURSOR_POS);
|
||||
char* s = 0;
|
||||
if (!tbuf->selected())
|
||||
s = tbuf->text_range(word_start(p), word_end(p));
|
||||
else
|
||||
s = tbuf->selection_text();
|
||||
tbuf->unselect();
|
||||
return s;
|
||||
}
|
||||
|
||||
/// Returns a character string containing the selected word, if any,
|
||||
/// or the word at (\a x, \a y) relative to the widget's \c x() and \c y().
|
||||
///
|
||||
/// @param x
|
||||
/// @param y
|
||||
///
|
||||
/// @return The selection, or the word text at (x,y). <b>Must be freed by the caller</b>.
|
||||
///
|
||||
char *FTextBase::get_word(int x, int y)
|
||||
{
|
||||
int p = xy_to_position(x + this->x(), y + this->y(),
|
||||
Fl_Text_Display_mod::CURSOR_POS);
|
||||
|
||||
char* s;
|
||||
if (!tbuf->selected())
|
||||
s = tbuf->text_range(word_start(p), word_end(p));
|
||||
else {
|
||||
s = tbuf->selection_text();
|
||||
tbuf->unselect();
|
||||
char* s = 0;
|
||||
int ws = word_start(p);
|
||||
int we = word_end(p);
|
||||
if (we == ws || we < ws) return s;
|
||||
|
||||
ws = 0, we = 0;
|
||||
if (tbuf->findchars_backward(p," \n", &ws) == 0) {
|
||||
ws = word_start(p);
|
||||
}
|
||||
|
||||
else
|
||||
ws++;
|
||||
if (tbuf->findchars_forward(p, " \t\n", &we) == 1) {
|
||||
s = tbuf->text_range(ws, we);
|
||||
} else if (tbuf->length() - ws < 12) {
|
||||
s = tbuf->text_range(ws, tbuf->length());
|
||||
} else {
|
||||
tbuf->select(ws, word_end(p));
|
||||
s = tbuf->selection_text();
|
||||
}
|
||||
tbuf->unselect();
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
/// Displays the menu pointed to by \c context_menu and calls the menu function;
|
||||
/// @see call_cb.
|
||||
///
|
||||
|
|
@ -442,11 +485,8 @@ int FTextView::handle(int event)
|
|||
break;
|
||||
switch (Fl::event_button()) {
|
||||
case FL_LEFT_MOUSE:
|
||||
if (Fl::event_shift()) { // TODO: can we get rid of this binding?
|
||||
char* s = get_word(Fl::event_x() - x(), Fl::event_y() - y());
|
||||
inpCall->value(s);
|
||||
free(s);
|
||||
stopMacroTimer();
|
||||
if (Fl::event_shift()) {
|
||||
handle_doubleclick(Fl::event_x() - x(), Fl::event_y() - y());
|
||||
return 1;
|
||||
}
|
||||
goto out;
|
||||
|
|
@ -478,12 +518,21 @@ int FTextView::handle(int event)
|
|||
return 1;
|
||||
break;
|
||||
case FL_RELEASE:
|
||||
if (cursor == FL_CURSOR_HAND && Fl::event_button() == FL_LEFT_MOUSE &&
|
||||
Fl::event_is_click() && !Fl::event_clicks()) {
|
||||
handle_clickable(Fl::event_x() - x(), Fl::event_y() - y());
|
||||
return 1;
|
||||
{ int eb = Fl::event_button();
|
||||
if (cursor == FL_CURSOR_HAND && eb == FL_LEFT_MOUSE &&
|
||||
Fl::event_is_click() && !Fl::event_clicks()) {
|
||||
handle_clickable(Fl::event_x() - x(), Fl::event_y() - y());
|
||||
return 1;
|
||||
}
|
||||
if (eb == FL_LEFT_MOUSE) {
|
||||
if (Fl::event_clicks() == 1)
|
||||
if (handle_doubleclick(Fl::event_x() - x(), Fl::event_y() - y()))
|
||||
return 1;
|
||||
else
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case FL_MOVE: {
|
||||
int p = xy_to_position(Fl::event_x(), Fl::event_y(), Fl_Text_Display_mod::CURSOR_POS);
|
||||
if (sbuf->character(p) >= CLICK_START + FTEXT_DEF) {
|
||||
|
|
@ -615,12 +664,13 @@ void FTextView::handle_qsy(int start, int end)
|
|||
free(text);
|
||||
}
|
||||
|
||||
static re_t rst("^[0-9]{3}$", REG_EXTENDED | REG_NOSUB);
|
||||
static re_t loc("^[A-R,a-r]{2}[0-9]{2}([A-X,a-x]{2})+$", REG_EXTENDED | REG_ICASE | REG_NOSUB);
|
||||
|
||||
void FTextView::handle_qso_data(int start, int end)
|
||||
{
|
||||
static re_t rst("^[0-9]{3}$", REG_EXTENDED | REG_NOSUB);
|
||||
static re_t loc("^[A-R]{2}[0-9]{2}([A-X]{2})+$", REG_EXTENDED | REG_ICASE | REG_NOSUB);
|
||||
|
||||
char* s = get_word(start, end);
|
||||
if (!s) return;
|
||||
if (rst.match(s))
|
||||
inpRstIn->value(s);
|
||||
else {
|
||||
|
|
@ -641,6 +691,47 @@ void FTextView::handle_qso_data(int start, int end)
|
|||
free(s);
|
||||
}
|
||||
|
||||
bool FTextView::handle_doubleclick(int start, int end)
|
||||
{
|
||||
bool ret = false;
|
||||
char *s = get_word(start, end);
|
||||
if (!s) return s;
|
||||
if (rst.match(s)) {
|
||||
inpRstIn->value(s);
|
||||
inpRstIn->do_callback();
|
||||
ret = true;
|
||||
} else if (loc.match(s)) {
|
||||
inpLoc->value(s);
|
||||
inpLoc->do_callback();
|
||||
ret = true;
|
||||
} else {
|
||||
int digits = 0;
|
||||
int chars = 0;
|
||||
for (size_t i = 0; i < strlen(s); i++) {
|
||||
if (isdigit(s[i])) digits++;
|
||||
if (isalpha(s[i])) chars++;
|
||||
}
|
||||
// remove leading and trailing non alphas
|
||||
while (s[0] && !isalnum(s[0])) memcpy(s, s+1, strlen(s));
|
||||
size_t i = strlen(s) - 1;
|
||||
while (i && !isalnum(s[i])) s[i--] = 0;
|
||||
if (digits > 0 && digits < 4 && chars > 0) {
|
||||
for (size_t i = 0; i < strlen(s); i++)
|
||||
if (islower(s[i])) s[i] += 'A' - 'a';
|
||||
inpCall->value(s);
|
||||
inpCall->do_callback();
|
||||
stopMacroTimer();
|
||||
ret = true;
|
||||
} else if (chars > 0 && digits == 0) {
|
||||
inpName->value(s);
|
||||
inpName->do_callback();
|
||||
ret = true;
|
||||
}
|
||||
}
|
||||
free(s);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/// The context menu handler
|
||||
///
|
||||
|
|
@ -709,10 +800,15 @@ void FTextView::menu_cb(int val)
|
|||
}
|
||||
|
||||
if (input) {
|
||||
char* s = get_word(popx, popy);
|
||||
input->value(s);
|
||||
input->do_callback();
|
||||
free(s);
|
||||
char* s = get_bound_text(popx, popy);
|
||||
if (s) {
|
||||
if (input == inpCall)
|
||||
for (size_t i = 0; i < strlen(s); i++)
|
||||
if (islower(s[i])) s[i] += 'A' - 'a';
|
||||
input->value(s);
|
||||
input->do_callback();
|
||||
free(s);
|
||||
}
|
||||
if (input == inpCall)
|
||||
stopMacroTimer();
|
||||
}
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue