summaryrefslogtreecommitdiff
path: root/fluid/Fl_Window_Type.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2007-05-10 12:06:31 +0000
committerMatthias Melcher <fltk@matthiasm.com>2007-05-10 12:06:31 +0000
commite42fac099f8d56e24987183edaf0e3d2386770b8 (patch)
tree88c3c3d2f19a752fc8fa22ada59ed05c350cfa8c /fluid/Fl_Window_Type.cxx
parentee1d3823a0e6c1d62554311341dc01cc002b5a1a (diff)
Annoyed by the limitation in Fluid to generate keyboard shortucts for either Mac or Win32/Linux, I added a Project option. If checked, all keyboard shortcuts containing the modifier FL_CTRL or FL_META will instead be writte as FL_COMMAND|shortcut. This will generate FL_META shortcuts on the Mac and FL_CTRL shortcuts on the PC.
This is compatible to old Fluid files. The .fl file will not change (except for the project wide setting itself) and no information is lost. As the only limitation, it is not possible to write any combination of FL_META and FL_CTRL while "use FL_COMMAND" is set. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5808 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'fluid/Fl_Window_Type.cxx')
-rw-r--r--fluid/Fl_Window_Type.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/fluid/Fl_Window_Type.cxx b/fluid/Fl_Window_Type.cxx
index dec2cddef..f43a14929 100644
--- a/fluid/Fl_Window_Type.cxx
+++ b/fluid/Fl_Window_Type.cxx
@@ -49,6 +49,7 @@ extern int snap;
extern int show_guides;
int include_H_from_C = 1;
+int use_FL_COMMAND = 0;
extern int i18n_type;
extern const char* i18n_include;
extern const char* i18n_function;
@@ -183,6 +184,7 @@ extern const char* code_file_name;
void show_project_cb(Fl_Widget *, void *) {
if(project_window==0) make_project_window();
include_H_from_C_button->value(include_H_from_C);
+ use_FL_COMMAND_button->value(use_FL_COMMAND);
header_file_input->value(header_file_name);
code_file_input->value(code_file_name);
i18n_type_chooser->value(i18n_type);
@@ -247,13 +249,20 @@ void code_input_cb(Fl_Input* i, void*) {
code_file_name = i->value();
}
-void include_H_from_C_button_cb(Fl_Light_Button* b, void*) {
+void include_H_from_C_button_cb(Fl_Check_Button* b, void*) {
if (include_H_from_C != b->value()) {
set_modflag(1);
include_H_from_C = b->value();
}
}
+void use_FL_COMMAND_button_cb(Fl_Check_Button* b, void*) {
+ if (use_FL_COMMAND != b->value()) {
+ set_modflag(1);
+ use_FL_COMMAND = b->value();
+ }
+}
+
////////////////////////////////////////////////////////////////
Fl_Menu_Item window_type_menu[] = {