summaryrefslogtreecommitdiff
path: root/fluid/panels/widget_panel.cxx
diff options
context:
space:
mode:
authormaxim nikonov <maxim.nikonov@hqo.co>2026-02-06 18:12:40 +0500
committermaxim nikonov <maxim.nikonov@hqo.co>2026-02-06 18:12:40 +0500
commitb4995f979d127cea667b4e2b71c91e9db4ab52ef (patch)
treefbebc775e10932bace8d6a7c3481b1ba200c64db /fluid/panels/widget_panel.cxx
parent9575eb0a1ffa8150f70f88b5f6b55f342c3c0088 (diff)
wip
Diffstat (limited to 'fluid/panels/widget_panel.cxx')
-rw-r--r--fluid/panels/widget_panel.cxx27
1 files changed, 18 insertions, 9 deletions
diff --git a/fluid/panels/widget_panel.cxx b/fluid/panels/widget_panel.cxx
index 1f60bc178..33720b5ac 100644
--- a/fluid/panels/widget_panel.cxx
+++ b/fluid/panels/widget_panel.cxx
@@ -101,7 +101,8 @@ static void cb_image_panel_imagew(fld::widget::Formula_Input* o, void* v) {
}
} else {
int mod = 0;
- for (Node *t = Fluid.proj.tree.first; t; t = t->next) {
+ Node *t;
+ for (t = Fluid.proj.tree.first; t; t = t->next) {
if (t->selected && t->is_widget()) {
Widget_Node* wt = ((Widget_Node*)t);
wt->scale_image_w_ = o->value();
@@ -133,7 +134,8 @@ static void cb_image_panel_imageh(fld::widget::Formula_Input* o, void* v) {
}
} else {
int mod = 0;
- for (Node *t = Fluid.proj.tree.first; t; t = t->next) {
+ Node *t;
+ for (t = Fluid.proj.tree.first; t; t = t->next) {
if (t->selected && t->is_widget()) {
Widget_Node* wt = ((Widget_Node*)t);
wt->scale_image_h_ = o->value();
@@ -241,7 +243,8 @@ static void cb_image_panel_deimagew(fld::widget::Formula_Input* o, void* v) {
}
} else {
int mod = 0;
- for (Node *t = Fluid.proj.tree.first; t; t = t->next) {
+ Node *t;
+ for (t = Fluid.proj.tree.first; t; t = t->next) {
if (t->selected && t->is_widget()) {
Widget_Node* wt = ((Widget_Node*)t);
wt->scale_deimage_w_ = o->value();
@@ -273,7 +276,8 @@ static void cb_image_panel_deimageh(fld::widget::Formula_Input* o, void* v) {
}
} else {
int mod = 0;
- for (Node *t = Fluid.proj.tree.first; t; t = t->next) {
+ Node *t;
+ for (t = Fluid.proj.tree.first; t; t = t->next) {
if (t->selected && t->is_widget()) {
Widget_Node* wt = ((Widget_Node*)t);
wt->scale_deimage_h_ = o->value();
@@ -555,7 +559,8 @@ void flex_margin_cb(Fl_Value_Input* i, void* v, void (*load_margin)(Fl_Flex*,Fl_
} else {
int mod = 0;
int new_value = (int)i->value();
- for (Node *o = Fluid.proj.tree.first; o; o = o->next) {
+ Node *o;
+ for (o = Fluid.proj.tree.first; o; o = o->next) {
if (o->selected && o->is_a(FLD_NODE_TYPE_Flex)) {
Flex_Node* q = (Flex_Node*)o;
Fl_Flex* w = (Fl_Flex*)q->o;
@@ -1654,7 +1659,8 @@ static void cb_Hotspot(Fl_Light_Button* o, void* v) {
Node *p = current_widget->parent;
if (!p || !p->is_widget()) return;
while (!p->is_a(FLD_NODE_TYPE_Window)) p = p->parent;
- for (Node *q = p->next; q && q->level > p->level; q = q->next) {
+ Node *q;
+ for (q = p->next; q && q->level > p->level; q = q->next) {
if (q->is_widget() && q != current_widget)
((Widget_Node*)q)->hotspot(0);
}
@@ -1771,7 +1777,8 @@ static void cb_7(Fl_Choice* o, void* v) {
if (current_widget->is_a(FLD_NODE_TYPE_Menu_Item)) {o->deactivate(); return;} else o->activate();
int n = current_widget->o->box();
if (!n) n = ZERO_ENTRY;
- for (int j = 0; j < 72 /*int(sizeof(boxmenu)/sizeof(*boxmenu))*/; j++)
+ int j;
+ for (j = 0; j < 72 /*int(sizeof(boxmenu)/sizeof(*boxmenu))*/; j++)
if (boxmenu[j].argument() == n) {o->value(j); break;}
} else {
int mod = 0;
@@ -1846,7 +1853,8 @@ static void cb_9(Fl_Choice* o, void* v) {
}
o->activate();
if (!n) n = ZERO_ENTRY;
- for (int j = 0; j < 72 /*int(sizeof(boxmenu)/sizeof(*boxmenu))*/; j++)
+ int j;
+ for (j = 0; j < 72 /*int(sizeof(boxmenu)/sizeof(*boxmenu))*/; j++)
if (boxmenu[j].argument() == n) {o->value(j); break;}
} else {
int mod = 0;
@@ -2711,7 +2719,8 @@ static void cb_comment_predefined_2(Fl_Menu_Button* o, void* v) {
"My Comment");
if (xname) {
char *name = fl_strdup(xname);
- for (char*s=name;*s;s++) if (*s==':') *s = ';';
+ char *s;
+ for (s =name;*s;s++) if (*s==':') *s = ';';
int n;
Fl_Preferences db(Fl_Preferences::USER_L, "fltk.org", "fluid_comments");
db.set(name, comment_tabs_name->buffer()->text());