summaryrefslogtreecommitdiff
path: root/fluid/panels
diff options
context:
space:
mode:
Diffstat (limited to 'fluid/panels')
-rw-r--r--fluid/panels/settings_panel.cxx8
-rw-r--r--fluid/panels/widget_panel.cxx27
2 files changed, 23 insertions, 12 deletions
diff --git a/fluid/panels/settings_panel.cxx b/fluid/panels/settings_panel.cxx
index 04aa8e900..66df11816 100644
--- a/fluid/panels/settings_panel.cxx
+++ b/fluid/panels/settings_panel.cxx
@@ -545,13 +545,14 @@ Fl_Menu_Button *w_layout_menu=(Fl_Menu_Button *)0;
static void cb_w_layout_menu(Fl_Menu_Button*, void* v) {
if (v == LOAD) {
fld::app::Layout_Suite &suite = (*Fluid.layout_list)[Fluid.layout_list->current_suite()];
+ int i;
if (suite.storage_ == FLD_TOOL_STORE_INTERNAL) {
w_layout_menu_rename->deactivate();
- for (int i=1; i<4; i++) w_layout_menu_storage[i]->deactivate();
+ for (i =1; i<4; i++) w_layout_menu_storage[i]->deactivate();
w_layout_menu_delete->deactivate();
} else {
w_layout_menu_rename->activate();
- for (int i=1; i<4; i++) w_layout_menu_storage[i]->activate();
+ for (i =1; i<4; i++) w_layout_menu_storage[i]->activate();
w_layout_menu_delete->activate();
}
w_layout_menu_storage[(int)(suite.storage_)]->setonly(menu_w_layout_menu);
@@ -889,7 +890,8 @@ static void cb_w_settings_shell_list(Fl_Browser* o, void* v) {
if (g_shell_config) {
o->clear();
w_settings_shell_list_selected = 0;
- for (int i=0; i<g_shell_config->list_size; i++) {
+ int i;
+ for (i =0; i<g_shell_config->list_size; i++) {
Fd_Shell_Command *cmd = g_shell_config->list[i];
o->add(cmd->name);
if (cmd->storage == FLD_TOOL_STORE_USER)
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());