ANTENNA macro tag

* Added <ANTENNA> macro tag.
    - substitues value entered in Antenna field on operator
      configuration panel.
pull/2/head
David Freese 2012-06-16 05:14:02 -05:00
rodzic a3f236a742
commit 817f299396
2 zmienionych plików z 11 dodań i 4 usunięć

Wyświetl plik

@ -75,6 +75,7 @@ void loadBrowser(Fl_Widget *widget) {
w->add(_("<MYNAME>\tmy name"));
w->add(_("<MYQTH>\tmy QTH"));
w->add(_("<MYRST>\tmy RST"));
w->add(_("<ANTENNA>\tmy antenna"));
w->add(_("<VER>\tFldigi version"));
w->add(LINE_SEP);

Wyświetl plik

@ -561,22 +561,22 @@ static void pRST(std::string &s, size_t &i, size_t endbracket)
static void pMYCALL(std::string &s, size_t &i, size_t endbracket)
{
s.replace( i, 8, inpMyCallsign->value() );
s.replace( i, 8, progdefaults.myCall.c_str() );
}
static void pMYLOC(std::string &s, size_t &i, size_t endbracket)
{
s.replace( i, 7, inpMyLocator->value() );
s.replace( i, 7, progdefaults.myLocator.c_str() );
}
static void pMYNAME(std::string &s, size_t &i, size_t endbracket)
{
s.replace( i, 8, inpMyName->value() );
s.replace( i, 8, progdefaults.myName.c_str() );
}
static void pMYQTH(std::string &s, size_t &i, size_t endbracket)
{
s.replace( i, 7, inpMyQth->value() );
s.replace( i, 7, progdefaults.myQth.c_str() );
}
static void pMYRST(std::string &s, size_t &i, size_t endbracket)
@ -584,6 +584,11 @@ static void pMYRST(std::string &s, size_t &i, size_t endbracket)
s.replace( i, 7, inpRstIn->value() );
}
static void pANTENNA(std::string &s, size_t &i, size_t endbracket)
{
s.replace( i, 9, progdefaults.myAntenna.c_str() );
}
static void pLDT(std::string &s, size_t &i, size_t endbracket)
{
char szDt[80];
@ -1913,6 +1918,7 @@ static const MTAGS mtags[] = {
{"<MYNAME>", pMYNAME},
{"<MYQTH>", pMYQTH},
{"<MYRST>", pMYRST},
{"<ANTENNA>", pANTENNA},
{"<QSOTIME>", pQSOTIME},
{"<INFO1>", pINFO1},
{"<INFO2>", pINFO2},