From 982d104adb5b5c73990c81b1cd53eb6e65f6fa1e Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Wed, 26 Apr 2023 20:24:33 +0200 Subject: [PATCH] FLUID: Initialisation orner in menus: #722 --- fluid/Fd_Snap_Action.cxx | 4 ++-- fluid/Fd_Snap_Action.h | 2 ++ fluid/fluid.cxx | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/fluid/Fd_Snap_Action.cxx b/fluid/Fd_Snap_Action.cxx index 5212184db..7a4338ec6 100644 --- a/fluid/Fd_Snap_Action.cxx +++ b/fluid/Fd_Snap_Action.cxx @@ -93,7 +93,7 @@ static Fd_Layout_Suite static_suite_list[] = { { (char*)"Grid", (char*)"@fd_beaker Grid", { &grid_app, &grid_dlg, &grid_tool }, FD_STORE_INTERNAL } }; -static Fl_Menu_Item static_main_menu[] = { +Fl_Menu_Item main_layout_submenu_[] = { { static_suite_list[0].menu_label, 0, select_layout_suite_cb, (void*)0, FL_MENU_RADIO|FL_MENU_VALUE }, { static_suite_list[1].menu_label, 0, select_layout_suite_cb, (void*)1, FL_MENU_RADIO }, { NULL } @@ -517,7 +517,7 @@ void fd_file(Fl_Color c) { Fd_Layout_List::Fd_Layout_List() -: main_menu_(static_main_menu), +: main_menu_(main_layout_submenu_), choice_menu_(static_choice_menu), list_(static_suite_list), list_size_(2), diff --git a/fluid/Fd_Snap_Action.h b/fluid/Fd_Snap_Action.h index 769d9c6d8..201ed497d 100644 --- a/fluid/Fd_Snap_Action.h +++ b/fluid/Fd_Snap_Action.h @@ -21,6 +21,8 @@ struct Fl_Menu_Item; +extern Fl_Menu_Item main_layout_submenu_[]; + enum { FD_STORE_INTERNAL, FD_STORE_USER, diff --git a/fluid/fluid.cxx b/fluid/fluid.cxx index 7a5af1b8a..1a6345544 100644 --- a/fluid/fluid.cxx +++ b/fluid/fluid.cxx @@ -1466,7 +1466,7 @@ Fl_Menu_Item Main_Menu[] = { {"&Vertical",0,(Fl_Callback *)align_widget_cb,(void*)41}, {0}, {"&Grid and Size Settings...",FL_COMMAND+'g',show_grid_cb, NULL, FL_MENU_DIVIDER}, - {"Presets", 0, layout_suite_marker, (void*)g_layout_list.main_menu_, FL_SUBMENU_POINTER }, + {"Presets", 0, layout_suite_marker, (void*)main_layout_submenu_, FL_SUBMENU_POINTER }, {"Application", 0, select_layout_preset_cb, (void*)0, FL_MENU_RADIO|FL_MENU_VALUE }, {"Dialog", 0, select_layout_preset_cb, (void*)1, FL_MENU_RADIO }, {"Toolbox", 0, select_layout_preset_cb, (void*)2, FL_MENU_RADIO },