diff --git a/src/dialogs/confdialog.cxx b/src/dialogs/confdialog.cxx index 07374b3a..7e156b10 100644 --- a/src/dialogs/confdialog.cxx +++ b/src/dialogs/confdialog.cxx @@ -1045,6 +1045,13 @@ progdefaults.SaveMacros = o->value(); progdefaults.changed = true; } +Fl_Check_Button *btn_dockable_macros=(Fl_Check_Button *)0; + +static void cb_btn_dockable_macros(Fl_Check_Button* o, void*) { + progdefaults.dockable_macros = !o->value(); +progdefaults.changed = true; +} + Fl_Group *tabWF_UI=(Fl_Group *)0; Fl_Check_Button *btnWF_UIrev=(Fl_Check_Button *)0; @@ -5948,7 +5955,7 @@ Fl_Double_Window* ConfigureDialog() { o->selection_color((Fl_Color)51); o->labelsize(18); o->align(Fl_Align(FL_ALIGN_CLIP|FL_ALIGN_INSIDE)); - { tabsConfigure = new Fl_Tabs(0, 0, 600, 385); + { tabsConfigure = new Fl_Tabs(0, 0, 600, 390); tabsConfigure->color(FL_LIGHT1); tabsConfigure->selection_color(FL_LIGHT1); { tabOperator = new Fl_Group(0, 25, 600, 360, _("Operator")); @@ -6089,14 +6096,13 @@ Fl_Double_Window* ConfigureDialog() { } // Fl_Group* grpNoise tabOperator->end(); } // Fl_Group* tabOperator - { tabUI = new Fl_Group(0, 25, 600, 360, _("UI")); + { tabUI = new Fl_Group(0, 25, 600, 365, _("UI")); tabUI->tooltip(_("User Interface")); tabUI->hide(); - { tabsUI = new Fl_Tabs(0, 25, 600, 360); + { tabsUI = new Fl_Tabs(0, 25, 600, 365); tabsUI->selection_color(FL_LIGHT1); { tabBrowser = new Fl_Group(0, 50, 600, 335, _("Browser")); tabBrowser->tooltip(_("User Interface - Browser")); - tabBrowser->hide(); { Fl_Group* o = new Fl_Group(30, 65, 540, 300); o->box(FL_ENGRAVED_FRAME); { Fl_Spinner2* o = cntChannels = new Fl_Spinner2(46, 75, 50, 24, _("Channels, first channel starts at waterfall lower limit")); @@ -6517,7 +6523,7 @@ Fl_Double_Window* ConfigureDialog() { } // Fl_Group* o tabUserInterface->end(); } // Fl_Group* tabUserInterface - { tabLogServer = new Fl_Group(0, 50, 600, 335, _("Log")); + { tabLogServer = new Fl_Group(0, 50, 600, 340, _("Log")); tabLogServer->tooltip(_("User Interface - Colors / Fonts")); tabLogServer->hide(); { tabsLog = new Fl_Tabs(0, 55, 600, 335); @@ -6720,9 +6726,9 @@ ab and newline are automatically included.")); { tabMBars = new Fl_Group(0, 50, 600, 335, _("Macros")); tabMBars->tooltip(_("User Interface - Macros")); tabMBars->hide(); - { Fl_Group* o = new Fl_Group(52, 263, 496, 35); + { Fl_Group* o = new Fl_Group(5, 240, 590, 35); o->box(FL_ENGRAVED_FRAME); - { Fl_Check_Button* o = btnMacroMouseWheel = new Fl_Check_Button(62, 271, 296, 20, _("Mouse wheel active on macro buttons")); + { Fl_Check_Button* o = btnMacroMouseWheel = new Fl_Check_Button(62, 248, 296, 20, _("Mouse wheel active on macro buttons")); btnMacroMouseWheel->tooltip(_("enable mouse wheel control of macro bar")); btnMacroMouseWheel->down_box(FL_DOWN_BOX); btnMacroMouseWheel->callback((Fl_Callback*)cb_btnMacroMouseWheel); @@ -6730,10 +6736,10 @@ ab and newline are automatically included.")); } // Fl_Check_Button* btnMacroMouseWheel o->end(); } // Fl_Group* o - { Fl_Group* o = new Fl_Group(52, 61, 496, 200, _("Number and position of macro bars")); + { Fl_Group* o = new Fl_Group(5, 60, 590, 180, _("Number and position of macro bars")); o->box(FL_ENGRAVED_FRAME); o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE)); - { Fl_Counter* o = cnt_macro_height = new Fl_Counter(215, 93, 89, 22, _("Button Height")); + { Fl_Counter* o = cnt_macro_height = new Fl_Counter(215, 85, 89, 22, _("Button Height")); cnt_macro_height->tooltip(_("Height of macro bar")); cnt_macro_height->type(1); cnt_macro_height->minimum(22); @@ -6744,89 +6750,89 @@ ab and newline are automatically included.")); cnt_macro_height->align(Fl_Align(FL_ALIGN_RIGHT)); o->value(progdefaults.macro_height); } // Fl_Counter* cnt_macro_height - { btn_scheme_0 = new Fl_Round_Button(61, 130, 144, 22, _("One above Rx/Tx")); + { btn_scheme_0 = new Fl_Round_Button(61, 113, 144, 22, _("One above Rx/Tx")); btn_scheme_0->tooltip(_("Single macro bar below logging panel\nvariable height")); btn_scheme_0->type(102); btn_scheme_0->down_box(FL_ROUND_DOWN_BOX); btn_scheme_0->callback((Fl_Callback*)cb_btn_scheme_0); } // Fl_Round_Button* btn_scheme_0 - { btn_scheme_1 = new Fl_Round_Button(61, 155, 144, 22, _("One above waterfall")); + { btn_scheme_1 = new Fl_Round_Button(61, 138, 144, 22, _("One above waterfall")); btn_scheme_1->type(102); btn_scheme_1->down_box(FL_ROUND_DOWN_BOX); btn_scheme_1->callback((Fl_Callback*)cb_btn_scheme_1); } // Fl_Round_Button* btn_scheme_1 - { btn_scheme_2 = new Fl_Round_Button(61, 180, 144, 22, _("One below waterfall")); + { btn_scheme_2 = new Fl_Round_Button(61, 163, 144, 22, _("One below waterfall")); btn_scheme_2->type(102); btn_scheme_2->down_box(FL_ROUND_DOWN_BOX); btn_scheme_2->callback((Fl_Callback*)cb_btn_scheme_2); } // Fl_Round_Button* btn_scheme_2 - { btn_scheme_3 = new Fl_Round_Button(228, 130, 144, 22, _("Two scheme 1")); + { btn_scheme_3 = new Fl_Round_Button(228, 113, 144, 22, _("Two scheme 1")); btn_scheme_3->type(102); btn_scheme_3->down_box(FL_ROUND_DOWN_BOX); btn_scheme_3->callback((Fl_Callback*)cb_btn_scheme_3); } // Fl_Round_Button* btn_scheme_3 - { btn_scheme_5 = new Fl_Round_Button(228, 155, 144, 22, _("Two scheme 3")); + { btn_scheme_5 = new Fl_Round_Button(228, 138, 144, 22, _("Two scheme 3")); btn_scheme_5->type(102); btn_scheme_5->down_box(FL_ROUND_DOWN_BOX); btn_scheme_5->callback((Fl_Callback*)cb_btn_scheme_5); } // Fl_Round_Button* btn_scheme_5 - { btn_scheme_7 = new Fl_Round_Button(228, 180, 144, 22, _("Two scheme 5")); + { btn_scheme_7 = new Fl_Round_Button(228, 163, 144, 22, _("Two scheme 5")); btn_scheme_7->type(102); btn_scheme_7->down_box(FL_ROUND_DOWN_BOX); btn_scheme_7->callback((Fl_Callback*)cb_btn_scheme_7); } // Fl_Round_Button* btn_scheme_7 - { btn_scheme_9 = new Fl_Round_Button(228, 205, 144, 22, _("Two scheme 7")); + { btn_scheme_9 = new Fl_Round_Button(228, 188, 144, 22, _("Two scheme 7")); btn_scheme_9->type(102); btn_scheme_9->down_box(FL_ROUND_DOWN_BOX); btn_scheme_9->callback((Fl_Callback*)cb_btn_scheme_9); } // Fl_Round_Button* btn_scheme_9 - { btn_scheme_11 = new Fl_Round_Button(228, 230, 144, 22, _("Two scheme 9")); + { btn_scheme_11 = new Fl_Round_Button(228, 213, 144, 22, _("Two scheme 9")); btn_scheme_11->type(102); btn_scheme_11->down_box(FL_ROUND_DOWN_BOX); btn_scheme_11->callback((Fl_Callback*)cb_btn_scheme_11); } // Fl_Round_Button* btn_scheme_11 - { btn_scheme_4 = new Fl_Round_Button(396, 130, 144, 22, _("Two scheme 2")); + { btn_scheme_4 = new Fl_Round_Button(396, 113, 144, 22, _("Two scheme 2")); btn_scheme_4->type(102); btn_scheme_4->down_box(FL_ROUND_DOWN_BOX); btn_scheme_4->callback((Fl_Callback*)cb_btn_scheme_4); } // Fl_Round_Button* btn_scheme_4 - { btn_scheme_6 = new Fl_Round_Button(396, 155, 144, 22, _("Two scheme 4")); + { btn_scheme_6 = new Fl_Round_Button(396, 138, 144, 22, _("Two scheme 4")); btn_scheme_6->type(102); btn_scheme_6->down_box(FL_ROUND_DOWN_BOX); btn_scheme_6->callback((Fl_Callback*)cb_btn_scheme_6); } // Fl_Round_Button* btn_scheme_6 - { btn_scheme_8 = new Fl_Round_Button(396, 180, 144, 22, _("Two scheme 6")); + { btn_scheme_8 = new Fl_Round_Button(396, 163, 144, 22, _("Two scheme 6")); btn_scheme_8->type(102); btn_scheme_8->down_box(FL_ROUND_DOWN_BOX); btn_scheme_8->callback((Fl_Callback*)cb_btn_scheme_8); } // Fl_Round_Button* btn_scheme_8 - { btn_scheme_10 = new Fl_Round_Button(396, 205, 144, 22, _("Two scheme 8")); + { btn_scheme_10 = new Fl_Round_Button(396, 188, 144, 22, _("Two scheme 8")); btn_scheme_10->type(102); btn_scheme_10->down_box(FL_ROUND_DOWN_BOX); btn_scheme_10->callback((Fl_Callback*)cb_btn_scheme_10); } // Fl_Round_Button* btn_scheme_10 - { btn_scheme_12 = new Fl_Round_Button(396, 230, 144, 22, _("Two scheme 10")); + { btn_scheme_12 = new Fl_Round_Button(396, 213, 144, 22, _("Two scheme 10")); btn_scheme_12->type(102); btn_scheme_12->down_box(FL_ROUND_DOWN_BOX); btn_scheme_12->callback((Fl_Callback*)cb_btn_scheme_12); } // Fl_Round_Button* btn_scheme_12 o->end(); } // Fl_Group* o - { Fl_Group* o = new Fl_Group(52, 299, 496, 76); + { Fl_Group* o = new Fl_Group(5, 275, 590, 55); o->box(FL_ENGRAVED_FRAME); - { Fl_Check_Button* o = btnUseLastMacro = new Fl_Check_Button(62, 305, 277, 20, _("Load last used macro file on startup")); + { Fl_Check_Button* o = btnUseLastMacro = new Fl_Check_Button(62, 280, 277, 20, _("Load last used macro file at start")); btnUseLastMacro->tooltip(_("ON - use last set of macros\nOFF - use default set")); btnUseLastMacro->down_box(FL_DOWN_BOX); btnUseLastMacro->callback((Fl_Callback*)cb_btnUseLastMacro); o->value(progdefaults.UseLastMacro); } // Fl_Check_Button* btnUseLastMacro - { Fl_Check_Button* o = btnDisplayMacroFilename = new Fl_Check_Button(62, 327, 277, 20, _("Display macro filename on startup")); + { Fl_Check_Button* o = btnDisplayMacroFilename = new Fl_Check_Button(62, 302, 277, 20, _("Display macro filename at start")); btnDisplayMacroFilename->tooltip(_("The filename is written to the RX text area")); btnDisplayMacroFilename->down_box(FL_DOWN_BOX); btnDisplayMacroFilename->callback((Fl_Callback*)cb_btnDisplayMacroFilename); o->value(progdefaults.DisplayMacroFilename); } // Fl_Check_Button* btnDisplayMacroFilename - { Fl_Check_Button* o = btn_save_macros_on_exit = new Fl_Check_Button(62, 349, 305, 20, _("Prompt to save macro file when closing")); + { Fl_Check_Button* o = btn_save_macros_on_exit = new Fl_Check_Button(345, 280, 216, 20, _("Prompt to save macro file")); btn_save_macros_on_exit->tooltip(_("Write current macro set on program exit")); btn_save_macros_on_exit->down_box(FL_DOWN_BOX); btn_save_macros_on_exit->callback((Fl_Callback*)cb_btn_save_macros_on_exit); @@ -6834,6 +6840,17 @@ ab and newline are automatically included.")); } // Fl_Check_Button* btn_save_macros_on_exit o->end(); } // Fl_Group* o + { Fl_Group* o = new Fl_Group(5, 330, 590, 55, _("Change takes effect after program restart")); + o->box(FL_ENGRAVED_FRAME); + o->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE)); + { Fl_Check_Button* o = btn_dockable_macros = new Fl_Check_Button(152, 353, 296, 20, _("Disable dockable macro bar")); + btn_dockable_macros->tooltip(_("Allow minimized main dialog height \n411 pixels with WF height = 100")); + btn_dockable_macros->down_box(FL_DOWN_BOX); + btn_dockable_macros->callback((Fl_Callback*)cb_btn_dockable_macros); + o->value(!progdefaults.dockable_macros); + } // Fl_Check_Button* btn_dockable_macros + o->end(); + } // Fl_Group* o tabMBars->end(); } // Fl_Group* tabMBars { tabWF_UI = new Fl_Group(0, 50, 600, 335, _("WF Ctrls")); @@ -6923,7 +6940,8 @@ ab and newline are automatically included.")); } // Fl_Group* tabWF_UI { tabColorsFonts = new Fl_Group(0, 50, 600, 335, _("Clrs/Fnts")); tabColorsFonts->tooltip(_("User Interface - Colors / Fonts")); - { tabsColors = new Fl_Tabs(0, 55, 600, 325); + tabColorsFonts->hide(); + { tabsColors = new Fl_Tabs(0, 55, 600, 330); { Fl_Group* o = new Fl_Group(0, 80, 600, 305, _("Rx/Tx")); o->hide(); { Fl_ListBox* o = listbox_charset_status = new Fl_ListBox(96, 90, 165, 24, _("Rx/Tx Character set")); @@ -7552,7 +7570,6 @@ i on a\ntouch screen device such as a tablet.")); o->end(); } // Fl_Group* o { Fl_Group* o = new Fl_Group(0, 50, 600, 335, _("FFT Processing")); - o->hide(); { Fl_Group* o = new Fl_Group(55, 71, 490, 135); o->box(FL_ENGRAVED_FRAME); { Fl_Counter2* o = cntLowFreqCutoff = new Fl_Counter2(100, 89, 70, 22, _("Lower limit")); @@ -7688,6 +7705,7 @@ i on a\ntouch screen device such as a tablet.")); o->end(); } // Fl_Group* o { Fl_Group* o = new Fl_Group(0, 50, 600, 335, _("Mouse")); + o->hide(); { Fl_Group* o = new Fl_Group(55, 73, 490, 170); o->box(FL_ENGRAVED_FRAME); { Fl_Check_Button* o = btnWaterfallHistoryDefault = new Fl_Check_Button(65, 87, 340, 20, _("Left or right click always replays audio history")); diff --git a/src/dialogs/confdialog.fl b/src/dialogs/confdialog.fl index c6b74dee..f6a77deb 100644 --- a/src/dialogs/confdialog.fl +++ b/src/dialogs/confdialog.fl @@ -362,7 +362,7 @@ static const char szProsigns[] = "~|%|&|+|=|{|}|<|>|[|]| ";} {} xywh {900 170 600 415} type Double color 45 selection_color 51 labelsize 18 align 80 non_modal visible } { Fl_Tabs tabsConfigure {open - xywh {0 0 600 385} color 50 selection_color 50 + xywh {0 0 600 390} color 50 selection_color 50 } { Fl_Group tabOperator { label Operator @@ -466,15 +466,15 @@ progdefaults.changed = true;} } } Fl_Group tabUI { - label UI - tooltip {User Interface} xywh {0 25 600 360} hide + label UI open + tooltip {User Interface} xywh {0 25 600 365} hide } { Fl_Tabs tabsUI {open - xywh {0 25 600 360} selection_color 50 + xywh {0 25 600 365} selection_color 50 } { Fl_Group tabBrowser { label Browser - tooltip {User Interface - Browser} xywh {0 50 600 335} hide + tooltip {User Interface - Browser} xywh {0 50 600 335} } { Fl_Group {} {open xywh {30 65 540 300} box ENGRAVED_FRAME @@ -936,7 +936,7 @@ progdefaults.changed = true;} } Fl_Group tabLogServer { label Log - tooltip {User Interface - Colors / Fonts} xywh {0 50 600 335} hide + tooltip {User Interface - Colors / Fonts} xywh {0 50 600 340} hide } { Fl_Tabs tabsLog {open xywh {0 55 600 335} @@ -1160,23 +1160,23 @@ progdefaults.changed = true;} } } Fl_Group tabMBars { - label Macros + label Macros open tooltip {User Interface - Macros} xywh {0 50 600 335} hide } { Fl_Group {} {open - xywh {52 263 496 35} box ENGRAVED_FRAME + xywh {5 240 590 35} box ENGRAVED_FRAME } { Fl_Check_Button btnMacroMouseWheel { label {Mouse wheel active on macro buttons} callback {progdefaults.macro_wheel = o->value(); progdefaults.changed = true;} - tooltip {enable mouse wheel control of macro bar} xywh {62 271 296 20} down_box DOWN_BOX + tooltip {enable mouse wheel control of macro bar} xywh {62 248 296 20} down_box DOWN_BOX code0 {o->value(progdefaults.macro_wheel);} } } Fl_Group {} { label {Number and position of macro bars} open - xywh {52 61 496 200} box ENGRAVED_FRAME align 21 + xywh {5 60 590 180} box ENGRAVED_FRAME align 21 } { Fl_Counter cnt_macro_height { label {Button Height} @@ -1184,7 +1184,7 @@ progdefaults.changed = true;} progdefaults.changed = true; set_macroLabels(); UI_select();} - tooltip {Height of macro bar} xywh {215 93 89 22} type Simple align 8 minimum 22 maximum 66 step 2 value 22 + tooltip {Height of macro bar} xywh {215 85 89 22} type Simple align 8 minimum 22 maximum 66 step 2 value 22 code0 {o->value(progdefaults.macro_height);} } Fl_Round_Button btn_scheme_0 { @@ -1194,7 +1194,7 @@ progdefaults.changed = true; set_macroLabels(); UI_select();} tooltip {Single macro bar below logging panel -variable height} xywh {61 130 144 22} type Radio down_box ROUND_DOWN_BOX +variable height} xywh {61 113 144 22} type Radio down_box ROUND_DOWN_BOX } Fl_Round_Button btn_scheme_1 { label {One above waterfall} @@ -1202,7 +1202,7 @@ variable height} xywh {61 130 144 22} type Radio down_box ROUND_DOWN_BOX progdefaults.changed = true; set_macroLabels(); UI_select();} - xywh {61 155 144 22} type Radio down_box ROUND_DOWN_BOX + xywh {61 138 144 22} type Radio down_box ROUND_DOWN_BOX } Fl_Round_Button btn_scheme_2 { label {One below waterfall} @@ -1210,7 +1210,7 @@ UI_select();} progdefaults.changed = true; set_macroLabels(); UI_select();} - xywh {61 180 144 22} type Radio down_box ROUND_DOWN_BOX + xywh {61 163 144 22} type Radio down_box ROUND_DOWN_BOX } Fl_Round_Button btn_scheme_3 { label {Two scheme 1} @@ -1218,7 +1218,7 @@ UI_select();} progdefaults.changed = true; set_macroLabels(); UI_select();} - xywh {228 130 144 22} type Radio down_box ROUND_DOWN_BOX + xywh {228 113 144 22} type Radio down_box ROUND_DOWN_BOX } Fl_Round_Button btn_scheme_5 { label {Two scheme 3} @@ -1226,7 +1226,7 @@ UI_select();} progdefaults.changed = true; set_macroLabels(); UI_select();} - xywh {228 155 144 22} type Radio down_box ROUND_DOWN_BOX + xywh {228 138 144 22} type Radio down_box ROUND_DOWN_BOX } Fl_Round_Button btn_scheme_7 { label {Two scheme 5} @@ -1234,7 +1234,7 @@ UI_select();} progdefaults.changed = true; set_macroLabels(); UI_select();} - xywh {228 180 144 22} type Radio down_box ROUND_DOWN_BOX + xywh {228 163 144 22} type Radio down_box ROUND_DOWN_BOX } Fl_Round_Button btn_scheme_9 { label {Two scheme 7} @@ -1242,7 +1242,7 @@ UI_select();} progdefaults.changed = true; set_macroLabels(); UI_select();} - xywh {228 205 144 22} type Radio down_box ROUND_DOWN_BOX + xywh {228 188 144 22} type Radio down_box ROUND_DOWN_BOX } Fl_Round_Button btn_scheme_11 { label {Two scheme 9} @@ -1250,7 +1250,7 @@ UI_select();} progdefaults.changed = true; set_macroLabels(); UI_select();} - xywh {228 230 144 22} type Radio down_box ROUND_DOWN_BOX + xywh {228 213 144 22} type Radio down_box ROUND_DOWN_BOX } Fl_Round_Button btn_scheme_4 { label {Two scheme 2} @@ -1258,7 +1258,7 @@ UI_select();} progdefaults.changed = true; set_macroLabels(); UI_select();} - xywh {396 130 144 22} type Radio down_box ROUND_DOWN_BOX + xywh {396 113 144 22} type Radio down_box ROUND_DOWN_BOX } Fl_Round_Button btn_scheme_6 { label {Two scheme 4} @@ -1266,7 +1266,7 @@ UI_select();} progdefaults.changed = true; set_macroLabels(); UI_select();} - xywh {396 155 144 22} type Radio down_box ROUND_DOWN_BOX + xywh {396 138 144 22} type Radio down_box ROUND_DOWN_BOX } Fl_Round_Button btn_scheme_8 { label {Two scheme 6} @@ -1274,7 +1274,7 @@ UI_select();} progdefaults.changed = true; set_macroLabels(); UI_select();} - xywh {396 180 144 22} type Radio down_box ROUND_DOWN_BOX + xywh {396 163 144 22} type Radio down_box ROUND_DOWN_BOX } Fl_Round_Button btn_scheme_10 { label {Two scheme 8} @@ -1282,7 +1282,7 @@ UI_select();} progdefaults.changed = true; set_macroLabels(); UI_select();} - xywh {396 205 144 22} type Radio down_box ROUND_DOWN_BOX + xywh {396 188 144 22} type Radio down_box ROUND_DOWN_BOX } Fl_Round_Button btn_scheme_12 { label {Two scheme 10} @@ -1290,37 +1290,50 @@ UI_select();} progdefaults.changed = true; set_macroLabels(); UI_select();} - xywh {396 230 144 22} type Radio down_box ROUND_DOWN_BOX + xywh {396 213 144 22} type Radio down_box ROUND_DOWN_BOX } } Fl_Group {} {open - xywh {52 299 496 76} box ENGRAVED_FRAME + xywh {5 275 590 55} box ENGRAVED_FRAME } { Fl_Check_Button btnUseLastMacro { - label {Load last used macro file on startup} + label {Load last used macro file at start} callback {progdefaults.UseLastMacro = o->value(); update_main_title(); progdefaults.changed = true;} tooltip {ON - use last set of macros -OFF - use default set} xywh {62 305 277 20} down_box DOWN_BOX +OFF - use default set} xywh {62 280 277 20} down_box DOWN_BOX code0 {o->value(progdefaults.UseLastMacro);} } Fl_Check_Button btnDisplayMacroFilename { - label {Display macro filename on startup} + label {Display macro filename at start} callback {progdefaults.DisplayMacroFilename = o->value(); progdefaults.changed = true;} - tooltip {The filename is written to the RX text area} xywh {62 327 277 20} down_box DOWN_BOX + tooltip {The filename is written to the RX text area} xywh {62 302 277 20} down_box DOWN_BOX code0 {o->value(progdefaults.DisplayMacroFilename);} } Fl_Check_Button btn_save_macros_on_exit { - label {Prompt to save macro file when closing} + label {Prompt to save macro file} callback {btn2_save_macros_on_exit->value(o->value()); progdefaults.SaveMacros = o->value(); progdefaults.changed = true;} - tooltip {Write current macro set on program exit} xywh {62 349 305 20} down_box DOWN_BOX + tooltip {Write current macro set on program exit} xywh {345 280 216 20} down_box DOWN_BOX code0 {o->value(progdefaults.SaveMacros);} } } + Fl_Group {} { + label {Change takes effect after program restart} open + xywh {5 330 590 55} box ENGRAVED_FRAME align 17 + } { + Fl_Check_Button btn_dockable_macros { + label {Disable dockable macro bar} + callback {progdefaults.dockable_macros = !o->value(); +progdefaults.changed = true;} + tooltip {Allow minimized main dialog height +411 pixels with WF height = 100} xywh {152 353 296 20} down_box DOWN_BOX + code0 {o->value(!progdefaults.dockable_macros);} + } + } } Fl_Group tabWF_UI { label {WF Ctrls} @@ -1463,10 +1476,10 @@ WF_UI();} } Fl_Group tabColorsFonts { label {Clrs/Fnts} - tooltip {User Interface - Colors / Fonts} xywh {0 50 600 335} + tooltip {User Interface - Colors / Fonts} xywh {0 50 600 335} hide } { Fl_Tabs tabsColors {open - xywh {0 55 600 325} + xywh {0 55 600 330} } { Fl_Group {} { label {Rx/Tx} @@ -2812,7 +2825,7 @@ progdefaults.changed = true;} } Fl_Group {} { label {FFT Processing} open - xywh {0 50 600 335} hide + xywh {0 50 600 335} } { Fl_Group {} {open xywh {55 71 490 135} box ENGRAVED_FRAME @@ -2897,7 +2910,7 @@ progdefaults.changed = true;} } Fl_Group {} { label Mouse open - xywh {0 50 600 335} + xywh {0 50 600 335} hide } { Fl_Group {} {open xywh {55 73 490 170} box ENGRAVED_FRAME diff --git a/src/dialogs/fl_digi.cxx b/src/dialogs/fl_digi.cxx index 8632104c..b9e8d3a2 100644 --- a/src/dialogs/fl_digi.cxx +++ b/src/dialogs/fl_digi.cxx @@ -195,6 +195,8 @@ #define LOG_CONNECT_SERVER _("Connect to server") +#define DOCKED_MACROS_LABEL _("View/Hide 48 macros") + // MAXIMUM allowable string lengths in log fields #define MAX_FREQ 14 #define MAX_TIME 4 @@ -1881,8 +1883,10 @@ void macro_cb(Fl_Widget *w, void *v) restoreFocus(5); } -void colorize_docked_macros(int i) +void colorize_dockable_macros(int i) { + if (!progdefaults.dockable_macros) return; + if (progdefaults.useGroupColors == true) { int k = i / 4; if (k == 0 || k == 3 || k == 6 || k == 9) @@ -1957,7 +1961,7 @@ void colorize_macros() { FL_LOCK_D(); for (int i = 0; i < NUMMACKEYS * NUMKEYROWS; i++) colorize_macro(i); - for (int i = 0; i < 48; i++) colorize_docked_macros(i); + for (int i = 0; i < 48; i++) colorize_dockable_macros(i); btnAltMacros1->labelsize(progdefaults.MacroBtnFontsize); btnAltMacros1->redraw_label(); btnAltMacros2->labelsize(progdefaults.MacroBtnFontsize); @@ -2702,9 +2706,11 @@ void set_macroLabels() btnMacro[i]->redraw_label(); } } - for (int i = 0; i < 48; i++) { - btnDockMacro[i]->label(macros.name[i].c_str()); - btnDockMacro[i]->redraw_label(); + if (progdefaults.dockable_macros) { + for (int i = 0; i < 48; i++) { + btnDockMacro[i]->label(macros.name[i].c_str()); + btnDockMacro[i]->redraw_label(); + } } } @@ -3724,7 +3730,7 @@ int UI_position_macros(int x, int y1, int w, int HTh) // docked macro's - if (progStatus.tbar_is_docked) { + if (progdefaults.dockable_macros && progStatus.tbar_is_docked) { resize_macroframe2(x,y1,w,mh2); macroFrame2->hide(); btnAltMacros2->deactivate(); @@ -4134,6 +4140,8 @@ UI_return: void cb_docked(Fl_Widget*, void*) { + if (!progdefaults.dockable_macros) return; + UI_select(); } @@ -4222,6 +4230,8 @@ void cb_menu_make_default_scripts(Fl_Widget*, void*) void cb_view_hide_macros(Fl_Widget*, void*) { + if (!progdefaults.dockable_macros) return; + progStatus.tile_y = progdefaults.rxtx_swap ? TransmitText->h() : ReceiveText->h(); progStatus.tile_y_ratio = 1.0 * progStatus.tile_y / text_group->h(); @@ -4502,7 +4512,7 @@ _FL_MULTI_LABEL, 0, 14, 0}, { VIEW_MLABEL, 0, 0, 0, FL_SUBMENU, FL_NORMAL_LABEL, 0, 14, 0}, { icons::make_icon_label(_("View/Hide Channels")), 'v', (Fl_Callback*)cb_view_hide_channels, 0, 0, _FL_MULTI_LABEL, 0, 14, 0}, -{ icons::make_icon_label(_("View/Hide 48 macros")), 0, (Fl_Callback*)cb_view_hide_macros, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL, 0, 14, 0}, +{ icons::make_icon_label(DOCKED_MACROS_LABEL), 0, (Fl_Callback*)cb_view_hide_macros, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL, 0, 14, 0}, { icons::make_icon_label(_("Floating scope"), utilities_system_monitor_icon), 'd', (Fl_Callback*)cb_mnuDigiscope, 0, 0, _FL_MULTI_LABEL, 0, 14, 0}, { icons::make_icon_label(MFSK_IMAGE_MLABEL, image_icon), 'm', (Fl_Callback*)cb_mnuPicViewer, 0, FL_MENU_INACTIVE, _FL_MULTI_LABEL, 0, 14, 0}, @@ -5666,22 +5676,24 @@ void create_fl_digi_main_primary() { int fixed_height = Hmenu + - TB_HEIGHT + Hqsoframe + - Hmacros*3 + + Hmacros*2 + Hwfall + Hstatus + 16; // inter group spacings + if (progdefaults.dockable_macros) fixed_height += TB_HEIGHT; main_hmin = minhtext + mintxtext + 5 + fixed_height; - if (progStatus.mainH < main_hmin) progStatus.mainH = main_hmin; + if (progStatus.mainH < main_hmin) { + progStatus.mainH = main_hmin; + } int Htext = main_hmin - fixed_height; if (progStatus.tile_y > Htext) progStatus.tile_y = Htext / 2; - fl_digi_main = new dropwin(progStatus.mainW, main_hmin);//progStatus.mainH); + fl_digi_main = new dropwin(progStatus.mainW, main_hmin); mnuFrame = new Fl_Group(0,0,progStatus.mainW, Hmenu); mnu = new Fl_Menu_Bar(pad, 0, progStatus.mainW - 325 - pad, Hmenu); @@ -5737,24 +5749,33 @@ void create_fl_digi_main_primary() { mnuFrame->end(); // add draggable toolbar with 4 rows of 12 macros each - dock = new dockgroup(pad, mnu->h() + 2, fl_digi_main->w() - 2*pad, TB_HEIGHT); - dock->box(FL_THIN_DOWN_BOX); - dock->end(); - dock->set_window(fl_digi_main); + if (progdefaults.dockable_macros) { + dock = new dockgroup(pad, mnu->h() + 2, fl_digi_main->w() - Hmenu - 2*pad, TB_HEIGHT); + dock->box(FL_THIN_DOWN_BOX); + dock->end(); + dock->set_window(fl_digi_main); - // Create a toolgroup already docked in this dock - add_docked(dock); - dock->redraw(); +// Create a toolgroup already docked in this dock + add_docked(dock); + dock->redraw(); - // Record in the dropwin which dock to use - fl_digi_main->set_dock(dock); +// Record in the dropwin which dock to use + fl_digi_main->set_dock(dock); - fl_digi_main->begin(); + fl_digi_main->begin(); // docked window workspace - fl_digi_main->workspace = new Fl_Group( - pad, dock->y() + dock->h(), - dock->w(), fl_digi_main->h() - dock->h() - dock->y() - pad); + fl_digi_main->workspace = new Fl_Group( + pad, dock->y() + dock->h(), + dock->w(), fl_digi_main->h() - dock->h() - dock->y() - 2 * pad); + } else { + fl_digi_main->begin(); + fl_digi_main->workspace = new Fl_Group( + pad, mnu->h() + 2, + fl_digi_main->w() - 2*pad, fl_digi_main->h() - Hmenu - 2 * pad); + getMenuItem(DOCKED_MACROS_LABEL)->hide(); + + } // reset the message dialog font fl_message_font(FL_HELVETICA, FL_NORMAL_SIZE); @@ -7214,7 +7235,8 @@ void create_fl_digi_main_primary() { fl_digi_main->end(); fl_digi_main->resizable(fl_digi_main->workspace); - dock->callback(cb_docked); + if (progdefaults.dockable_macros) + dock->callback(cb_docked); fl_digi_main->callback(cb_wMain); @@ -7256,12 +7278,15 @@ void create_fl_digi_main_primary() { toggle_smeter(); - if (progStatus.tbar_is_docked) // do not change interface state + if (progdefaults.dockable_macros) { + if (progStatus.tbar_is_docked) // do not change interface state + UI_select(); + else { + progStatus.tbar_is_docked = true; // for tbar toggle + cb_view_hide_macros((Fl_Widget *)0, (void *)0); + } + } else UI_select(); - else { - progStatus.tbar_is_docked = true; // for tbar toggle - cb_view_hide_macros((Fl_Widget *)0, (void *)0); - } wf->UI_select(progStatus.WF_UI); diff --git a/src/include/confdialog.h b/src/include/confdialog.h index ceffbd1a..dbf5f720 100644 --- a/src/include/confdialog.h +++ b/src/include/confdialog.h @@ -143,6 +143,7 @@ extern Fl_Round_Button *btn_scheme_12; extern Fl_Check_Button *btnUseLastMacro; extern Fl_Check_Button *btnDisplayMacroFilename; extern Fl_Check_Button *btn_save_macros_on_exit; +extern Fl_Check_Button *btn_dockable_macros; extern Fl_Group *tabWF_UI; extern Fl_Check_Button *btnWF_UIrev; extern Fl_Check_Button *btnWF_UIx1; diff --git a/src/include/configuration.h b/src/include/configuration.h index 321171db..da64df78 100644 --- a/src/include/configuration.h +++ b/src/include/configuration.h @@ -1902,7 +1902,10 @@ 16) \ ELEM_(bool, psk8DCDShortFlag, "PSK8DCDSHORTFLAG", \ "Flag: Change DCD pre-ample length", \ - false) + false) \ + ELEM_(bool, dockable_macros, "DOCKABLE_MACROS", \ + "Allow dockable macros", \ + true) // declare the struct diff --git a/src/misc/macroedit.cxx b/src/misc/macroedit.cxx index 497f6ca4..23573f31 100644 --- a/src/misc/macroedit.cxx +++ b/src/misc/macroedit.cxx @@ -320,9 +320,10 @@ void update_macro_button(int iMacro, const char *text, const char *name) btnMacro[iMacro % NUMMACKEYS]->label( macros.name[iMacro].c_str() ); btnMacro[iMacro % NUMMACKEYS]->redraw_label(); } - btnDockMacro[iMacro]->label(macros.name[iMacro].c_str()); - btnDockMacro[iMacro]->redraw_label(); - + if (progdefaults.dockable_macros) { + btnDockMacro[iMacro]->label(macros.name[iMacro].c_str()); + btnDockMacro[iMacro]->redraw_label(); + } macros.changed = true; } diff --git a/src/misc/status.cxx b/src/misc/status.cxx index 93509619..c89ff3cc 100644 --- a/src/misc/status.cxx +++ b/src/misc/status.cxx @@ -570,7 +570,7 @@ void status::loadLastState() if (mainW > Fl::w()) mainW = Fl::w(); spref.get("main_h", mainH, mainH); - if (mainH < HMIN) mainH = HMIN; +// if (mainH < HMIN) mainH = HMIN; if (mainH > Fl::w()) mainH = Fl::h(); spref.get("wf_ui", i, WF_UI); WF_UI = i;