Skip to content

Commit

Permalink
Fluid: Fix propagating mergeback check box.
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthiasWM committed Dec 26, 2024
1 parent 83046c9 commit 2327d7e
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 23 deletions.
49 changes: 27 additions & 22 deletions fluid/settings_panel.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,10 @@ static void cb_avoid_early_includes_button(Fl_Check_Button* o, void* v) {
}
}

static void cb_2(Fl_Group* o, void* v) {
propagate_load(o, v);
}

Fl_Check_Button *w_proj_mergeback=(Fl_Check_Button *)0;

static void cb_w_proj_mergeback(Fl_Check_Button* o, void* v) {
Expand Down Expand Up @@ -507,7 +511,7 @@ Fl_Menu_Item menu_layout_choice[] = {
{0,0,0,0,0,0,0,0,0}
};

static void cb_2(Fl_Button*, void* v) {
static void cb_3(Fl_Button*, void* v) {
// Clone the current layout suite

if (v == LOAD) return;
Expand Down Expand Up @@ -765,55 +769,55 @@ static void cb_Gap(Fl_Value_Input* o, void* v) {
}
}

static void cb_3(Fl_Value_Input* o, void* v) {
static void cb_4(Fl_Value_Input* o, void* v) {
if (v == LOAD) {
o->value((double)layout->widget_min_h);
} else {
layout->widget_min_h = (int)o->value();
}
}

static void cb_4(Fl_Value_Input* o, void* v) {
static void cb_5(Fl_Value_Input* o, void* v) {
if (v == LOAD) {
o->value((double)layout->widget_inc_h);
} else {
layout->widget_inc_h = (int)o->value();
}
}

static void cb_5(Fl_Value_Input* o, void* v) {
static void cb_6(Fl_Value_Input* o, void* v) {
if (v == LOAD) {
o->value((double)layout->widget_gap_y);
} else {
layout->widget_gap_y = (int)o->value();
}
}

static void cb_6(Fl_Choice* o, void* v) {
static void cb_7(Fl_Choice* o, void* v) {
if (v == LOAD) {
o->value(layout->labelfont+1);
} else {
layout->labelfont = (int)o->value()-1;
}
}

static void cb_7(Fl_Value_Input* o, void* v) {
static void cb_8(Fl_Value_Input* o, void* v) {
if (v == LOAD) {
o->value(layout->labelsize);
} else {
layout->labelsize = (int)o->value();
}
}

static void cb_8(Fl_Choice* o, void* v) {
static void cb_9(Fl_Choice* o, void* v) {
if (v == LOAD) {
o->value(layout->textfont+1);
} else {
layout->textfont = (int)o->value()-1;
}
}

static void cb_9(Fl_Value_Input* o, void* v) {
static void cb_a(Fl_Value_Input* o, void* v) {
if (v == LOAD) {
o->value(layout->textsize);
} else {
Expand Down Expand Up @@ -905,7 +909,7 @@ static void cb_w_settings_shell_toolbox(Fl_Group* o, void* v) {
}
}

static void cb_a(Fl_Button*, void* v) {
static void cb_b(Fl_Button*, void* v) {
if (v != LOAD) {
int selected = w_settings_shell_list_selected;
Fd_Shell_Command *cmd = new Fd_Shell_Command("new shell command");
Expand Down Expand Up @@ -1079,7 +1083,7 @@ static void cb_Menu(Fl_Input* o, void* v) {
}
}

static void cb_b(Fl_Group* o, void* v) {
static void cb_c(Fl_Group* o, void* v) {
propagate_load(o, v);
}

Expand Down Expand Up @@ -2217,7 +2221,7 @@ static void cb_i18n_pos_file_input(Fl_Input* o, void* v) {
}
}

static void cb_c(Fl_Group* o, void* v) {
static void cb_d(Fl_Group* o, void* v) {
propagate_load(o, v);
}

Expand Down Expand Up @@ -2657,6 +2661,7 @@ Fl_Double_Window* make_settings_window() {
avoid_early_includes_button->callback((Fl_Callback*)cb_avoid_early_includes_button);
} // Fl_Check_Button* avoid_early_includes_button
{ Fl_Group* o = new Fl_Group(100, 283, 220, 20);
o->callback((Fl_Callback*)cb_2);
{ Fl_Box* o = new Fl_Box(100, 283, 0, 20, "Experimental: ");
o->labelfont(1);
o->labelsize(11);
Expand Down Expand Up @@ -2699,7 +2704,7 @@ o->hide();
layout_choice->menu(menu_layout_choice);
} // Fl_Choice* layout_choice
{ Fl_Button* o = new Fl_Button(272, 78, 24, 24, "+");
o->callback((Fl_Callback*)cb_2);
o->callback((Fl_Callback*)cb_3);
} // Fl_Button* o
{ w_layout_menu = new Fl_Menu_Button(296, 78, 24, 24);
w_layout_menu->callback((Fl_Callback*)cb_w_layout_menu);
Expand Down Expand Up @@ -2930,22 +2935,22 @@ o->hide();
o->maximum(32767);
o->step(1);
o->textsize(11);
o->callback((Fl_Callback*)cb_3);
o->callback((Fl_Callback*)cb_4);
} // Fl_Value_Input* o
{ Fl_Value_Input* o = new Fl_Value_Input(145, 440, 55, 20);
o->labelsize(11);
o->maximum(32767);
o->step(1);
o->textsize(11);
o->callback((Fl_Callback*)cb_4);
o->callback((Fl_Callback*)cb_5);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT));
} // Fl_Value_Input* o
{ Fl_Value_Input* o = new Fl_Value_Input(205, 440, 55, 20);
o->labelsize(11);
o->maximum(32767);
o->step(1);
o->textsize(11);
o->callback((Fl_Callback*)cb_5);
o->callback((Fl_Callback*)cb_6);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT));
} // Fl_Value_Input* o
{ Fl_Group* o = new Fl_Group(85, 465, 201, 20, "Label Font:");
Expand All @@ -2959,7 +2964,7 @@ o->hide();
o->labelfont(1);
o->labelsize(11);
o->textsize(11);
o->callback((Fl_Callback*)cb_6);
o->callback((Fl_Callback*)cb_7);
Fl_Group::current()->resizable(o);
o->menu(fontmenu_w_default);
} // Fl_Choice* o
Expand All @@ -2971,7 +2976,7 @@ o->hide();
o->step(1);
o->value(14);
o->textsize(11);
o->callback((Fl_Callback*)cb_7);
o->callback((Fl_Callback*)cb_8);
} // Fl_Value_Input* o
o->end();
} // Fl_Group* o
Expand All @@ -2986,7 +2991,7 @@ o->hide();
o->labelfont(1);
o->labelsize(11);
o->textsize(11);
o->callback((Fl_Callback*)cb_8);
o->callback((Fl_Callback*)cb_9);
o->menu(fontmenu_w_default);
} // Fl_Choice* o
{ Fl_Value_Input* o = new Fl_Value_Input(235, 490, 50, 20);
Expand All @@ -2996,7 +3001,7 @@ o->hide();
o->step(1);
o->value(14);
o->textsize(11);
o->callback((Fl_Callback*)cb_9);
o->callback((Fl_Callback*)cb_a);
} // Fl_Value_Input* o
o->end();
} // Fl_Group* o
Expand Down Expand Up @@ -3029,7 +3034,7 @@ o->hide();
o->tooltip("insert a new shell command into the list after the selected command");
o->labelfont(1);
o->labelsize(11);
o->callback((Fl_Callback*)cb_a);
o->callback((Fl_Callback*)cb_b);
} // Fl_Button* o
{ w_settings_shell_dup = new Fl_Button(124, 200, 24, 22, "++");
w_settings_shell_dup->tooltip("duplicate the selected shell command and insert it into the list");
Expand Down Expand Up @@ -3089,7 +3094,7 @@ o->hide();
o->callback((Fl_Callback*)cb_Menu);
} // Fl_Input* o
{ Fl_Group* o = new Fl_Group(100, 297, 140, 71);
o->callback((Fl_Callback*)cb_b);
o->callback((Fl_Callback*)cb_c);
{ Fl_Shortcut_Button* o = new Fl_Shortcut_Button(100, 297, 130, 20, "Shortcut");
o->tooltip("an optional keyboard shortcut to run this shell command");
o->box(FL_UP_BOX);
Expand Down Expand Up @@ -3316,7 +3321,7 @@ o->hide();
i18n_pos_file_input->callback((Fl_Callback*)cb_i18n_pos_file_input);
} // Fl_Input* i18n_pos_file_input
{ Fl_Group* o = new Fl_Group(100, 178, 90, 20);
o->callback((Fl_Callback*)cb_c);
o->callback((Fl_Callback*)cb_d);
{ i18n_pos_set_input = new Fl_Int_Input(100, 178, 80, 20, "Set:");
i18n_pos_set_input->tooltip("The message set number.");
i18n_pos_set_input->type(2);
Expand Down
3 changes: 2 additions & 1 deletion fluid/settings_panel.fl
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,8 @@ or just ".ext" to set extension.}
}}
tooltip {Do not emit \#include <FL//Fl.H> until it is needed by another include file.} xywh {100 255 220 20} down_box DOWN_BOX labelsize 11
}
Fl_Group {} {open
Fl_Group {} {
callback {propagate_load(o, v);} open
xywh {100 283 220 20}
code3 {// hide this group if experimental features not wanted
\#ifndef FLUID_OPTION_MERGEBACK
Expand Down

0 comments on commit 2327d7e

Please sign in to comment.