summaryrefslogtreecommitdiff
path: root/fluid/Fl_Type.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <git@matthiasm.com>2021-12-11 03:33:25 +0100
committerMatthias Melcher <github@matthiasm.com>2021-12-11 03:40:07 +0100
commit1c962bf5e26d3883bfc804b111d28080036d4feb (patch)
tree1e6032e2b9db9d2348fa64c1b39d227ad7347957 /fluid/Fl_Type.cxx
parent235f9ed709d4b6ce6dbf46248250e8586bdd2dfe (diff)
STR 3210: indentation is now controlled in one single position for all source and header files.
Diffstat (limited to 'fluid/Fl_Type.cxx')
-rw-r--r--fluid/Fl_Type.cxx26
1 files changed, 20 insertions, 6 deletions
diff --git a/fluid/Fl_Type.cxx b/fluid/Fl_Type.cxx
index 720482c6a..ff6a48cf6 100644
--- a/fluid/Fl_Type.cxx
+++ b/fluid/Fl_Type.cxx
@@ -171,8 +171,11 @@ void delete_all(int selected_only) {
// reset the setting for the external shell command
shell_prefs_get();
shell_settings_write();
+ widget_browser->hposition(0);
+ widget_browser->position(0);
}
selection_changed(0);
+ widget_browser->redraw();
}
// update a string member:
@@ -553,7 +556,8 @@ void Fl_Type::read_property(const char *c) {
int Fl_Type::read_fdesign(const char*, const char*) {return 0;}
/**
- Write a comment into the header file.
+ Write a comment into the header file.
+ \param[in] pre indent the comment by this string
*/
void Fl_Type::write_comment_h(const char *pre)
{
@@ -609,22 +613,32 @@ void Fl_Type::write_comment_inline_c(const char *pre)
// single line comment
if (pre) write_c("%s", pre);
write_c("// %s\n", s);
- if (!pre) write_c("%s ", indent());
+ if (!pre) write_c("%s", indent_plus(1));
} else {
write_c("%s/*\n", pre?pre:"");
- if (pre) write_c("%s ", pre); else write_c("%s ", indent());
+ if (pre)
+ write_c("%s ", pre);
+ else
+ write_c("%s ", indent_plus(1));
while(*s) {
if (*s=='\n') {
if (s[1]) {
- if (pre) write_c("\n%s ", pre); else write_c("\n%s ", indent());
+ if (pre)
+ write_c("\n%s ", pre);
+ else
+ write_c("\n%s ", indent_plus(1));
}
} else {
write_c("%c", *s); // FIXME this is much too slow!
}
s++;
}
- if (pre) write_c("\n%s */\n", pre); else write_c("\n%s */\n", indent());
- if (!pre) write_c("%s ", indent());
+ if (pre)
+ write_c("\n%s */\n", pre);
+ else
+ write_c("\n%s */\n", indent_plus(1));
+ if (!pre)
+ write_c("%s", indent_plus(1));
}
}
}