kopia lustrzana https://github.com/jamescoxon/dl-fldigi
Fix font name/number compatibility code
This code must be called before creating the main windowpull/2/head
rodzic
eb1ec8ac81
commit
f6466f2ab8
|
@ -364,6 +364,7 @@ struct configuration
|
|||
void testCommPorts();
|
||||
const char* strBaudRate();
|
||||
int BaudRate(size_t);
|
||||
void initFonts(void);
|
||||
};
|
||||
|
||||
extern configuration progdefaults;
|
||||
|
|
|
@ -257,7 +257,7 @@ int main(int argc, char ** argv)
|
|||
progStatus.loadLastState();
|
||||
|
||||
Fl::scheme(progdefaults.ui_scheme.c_str());
|
||||
|
||||
progdefaults.initFonts();
|
||||
create_fl_digi_main();
|
||||
|
||||
#if BENCHMARK_MODE
|
||||
|
|
|
@ -531,15 +531,6 @@ int configuration::setDefaults()
|
|||
wf->setcolors();
|
||||
setColorButtons();
|
||||
|
||||
if (!RxFontName.empty())
|
||||
RxFontnbr = font_number(RxFontName.c_str());
|
||||
if (!TxFontName.empty())
|
||||
TxFontnbr = font_number(TxFontName.c_str());
|
||||
if (!WaterfallFontName.empty())
|
||||
WaterfallFontnbr = font_number(WaterfallFontName.c_str());
|
||||
if (!ViewerFontName.empty())
|
||||
ViewerFontnbr = font_number(ViewerFontName.c_str());
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -784,3 +775,16 @@ Fl_Font font_number(const char* name)
|
|||
}
|
||||
return FL_HELVETICA;
|
||||
}
|
||||
|
||||
void configuration::initFonts(void)
|
||||
{
|
||||
if (!RxFontName.empty())
|
||||
RxFontnbr = font_number(RxFontName.c_str());
|
||||
if (!TxFontName.empty())
|
||||
TxFontnbr = font_number(TxFontName.c_str());
|
||||
if (!WaterfallFontName.empty())
|
||||
WaterfallFontnbr = font_number(WaterfallFontName.c_str());
|
||||
if (!ViewerFontName.empty())
|
||||
ViewerFontnbr = font_number(ViewerFontName.c_str());
|
||||
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue