diff options
| -rw-r--r-- | CHANGES | 3 | ||||
| -rw-r--r-- | fluid/Fl_Widget_Type.cxx | 9 | ||||
| -rw-r--r-- | fluid/factory.cxx | 14 | ||||
| -rw-r--r-- | fluid/fluid.cxx | 8 | ||||
| -rw-r--r-- | fluid/function_panel.cxx | 17 | ||||
| -rw-r--r-- | fluid/function_panel.fl | 17 | ||||
| -rw-r--r-- | fluid/undo.cxx | 4 | ||||
| -rw-r--r-- | src/fl_shortcut.cxx | 4 |
8 files changed, 43 insertions, 33 deletions
@@ -2,6 +2,9 @@ CHANGES IN FLTK 1.1.7 - Documentation fixes (STR #648, STR #692, STR #730, STR #744, STR #745) + - fl_shortcut_label() now shows letter shortcuts in + uppercase, e.g. "Ctrl+N" instead of "Ctrl+n" to be + consistent with other toolkits. - FLUID now provides unlimited undo/redo support. - FLUID now provides an option to choose which scheme (default, none, plastic) to display. diff --git a/fluid/Fl_Widget_Type.cxx b/fluid/Fl_Widget_Type.cxx index df78ceb51..c7d46b641 100644 --- a/fluid/Fl_Widget_Type.cxx +++ b/fluid/Fl_Widget_Type.cxx @@ -292,16 +292,17 @@ static int haderror; void name_cb(Fl_Input* o, void *v) { if (v == LOAD) { + static char buf[1024]; if (numselected != 1) { - static char buf[16]; - sprintf(buf,"(%d widgets)",numselected); - the_panel->label(buf); + snprintf(buf, sizeof(buf), "Widget Properties (%d widgets)", numselected); o->hide(); } else { o->static_value(current_widget->name()); o->show(); - the_panel->label(current_widget->title()); + snprintf(buf, sizeof(buf), "%s Properties", current_widget->title()); } + + the_panel->label(buf); } else { if (numselected == 1) { current_widget->name(o->value()); diff --git a/fluid/factory.cxx b/fluid/factory.cxx index 814a40d41..8cd57c338 100644 --- a/fluid/factory.cxx +++ b/fluid/factory.cxx @@ -869,13 +869,13 @@ static void cb(Fl_Widget *, void *v) { Fl_Menu_Item New_Menu[] = { {"Code",0,0,0,FL_SUBMENU}, - {"Function/Method...",0,cb,(void*)&Fl_Function_type}, - {"Code...",0,cb,(void*)&Fl_Code_type}, - {"Code Block...",0,cb,(void*)&Fl_CodeBlock_type}, - {"Declaration...",0,cb,(void*)&Fl_Decl_type}, - {"Declaration Block...",0,cb,(void*)&Fl_DeclBlock_type}, - {"Class...",0,cb,(void*)&Fl_Class_type}, - {"Comment...",0,cb,(void*)&Fl_Comment_type}, + {"Function/Method",0,cb,(void*)&Fl_Function_type}, + {"Code",0,cb,(void*)&Fl_Code_type}, + {"Code Block",0,cb,(void*)&Fl_CodeBlock_type}, + {"Declaration",0,cb,(void*)&Fl_Decl_type}, + {"Declaration Block",0,cb,(void*)&Fl_DeclBlock_type}, + {"Class",0,cb,(void*)&Fl_Class_type}, + {"Comment",0,cb,(void*)&Fl_Comment_type}, {0}, {"Group",0,0,0,FL_SUBMENU}, {0,0,cb,(void*)&Fl_Window_type}, diff --git a/fluid/fluid.cxx b/fluid/fluid.cxx index 436649ebf..6cd47e5df 100644 --- a/fluid/fluid.cxx +++ b/fluid/fluid.cxx @@ -631,12 +631,12 @@ Fl_Menu_Item Main_Menu[] = { {"&Redo", FL_CTRL+FL_SHIFT+'z', redo_cb, 0, FL_MENU_DIVIDER}, {"C&ut", FL_CTRL+'x', cut_cb}, {"&Copy", FL_CTRL+'c', copy_cb}, - {"&Delete", FL_Delete, delete_cb}, - {"Dup&licate", FL_CTRL+'d', duplicate_cb}, {"&Paste", FL_CTRL+'v', paste_cb}, + {"Dup&licate", FL_CTRL+'u', duplicate_cb}, + {"&Delete", FL_Delete, delete_cb, 0, FL_MENU_DIVIDER}, {"Select &All", FL_CTRL+'a', select_all_cb}, {"Select &None", FL_CTRL+FL_SHIFT+'a', select_none_cb, 0, FL_MENU_DIVIDER}, - {"&Show Widget Panel...", FL_F+1, openwidget_cb}, + {"Pr&operties...", FL_F+1, openwidget_cb}, {"&Sort",0,sort_cb}, {"&Earlier", FL_F+2, earlier_cb}, {"&Later", FL_F+3, later_cb}, @@ -675,7 +675,7 @@ Fl_Menu_Item Main_Menu[] = { {"&Small",FL_ALT+'2',(Fl_Callback *)widget_size_cb,(void*)11,FL_MENU_RADIO,FL_NORMAL_LABEL,FL_HELVETICA,11}, {"&Normal",FL_ALT+'3',(Fl_Callback *)widget_size_cb,(void*)14,FL_MENU_RADIO|FL_MENU_VALUE}, {0}, - {"&Grid...",FL_ALT+'g',show_grid_cb}, + {"&Grid...",FL_CTRL+'g',show_grid_cb}, {0}, {"&Shell",0,0,0,FL_SUBMENU}, {"Execute &Command...",FL_ALT+'x',(Fl_Callback *)show_shell_window}, diff --git a/fluid/function_panel.cxx b/fluid/function_panel.cxx index 080f07515..b5ab9ad09 100644 --- a/fluid/function_panel.cxx +++ b/fluid/function_panel.cxx @@ -51,7 +51,7 @@ Fl_Button *f_panel_cancel=(Fl_Button *)0; Fl_Window* make_function_panel() { Fl_Window* w; - { Fl_Window* o = function_panel = new Fl_Window(285, 140, "Function/Method"); + { Fl_Window* o = function_panel = new Fl_Window(285, 140, "Function/Method Properties"); w = o; { Fl_Light_Button* o = f_public_button = new Fl_Light_Button(10, 10, 54, 20, "public"); o->tooltip("Make the function or method publicly accessible."); @@ -107,7 +107,7 @@ Fl_Button *code_panel_cancel=(Fl_Button *)0; Fl_Window* make_code_panel() { Fl_Window* w; - { Fl_Window* o = code_panel = new Fl_Window(545, 175, "Code"); + { Fl_Window* o = code_panel = new Fl_Window(545, 175, "Code Properties"); w = o; o->labelsize(11); { Fl_Text_Editor* o = code_input = new Fl_Text_Editor(10, 12, 525, 123); @@ -153,7 +153,7 @@ Fl_Button *codeblock_panel_cancel=(Fl_Button *)0; Fl_Window* make_codeblock_panel() { Fl_Window* w; - { Fl_Window* o = codeblock_panel = new Fl_Window(295, 100, "Code Block"); + { Fl_Window* o = codeblock_panel = new Fl_Window(295, 100, "Code Block Properties"); w = o; o->labelsize(11); { Fl_Input* o = code_before_input = new Fl_Input(10, 10, 275, 20); @@ -201,7 +201,7 @@ Fl_Light_Button *declblock_public_button=(Fl_Light_Button *)0; Fl_Window* make_declblock_panel() { Fl_Window* w; - { Fl_Window* o = declblock_panel = new Fl_Window(295, 125, "Declaration Block"); + { Fl_Window* o = declblock_panel = new Fl_Window(295, 125, "Declaration Block Properties"); w = o; o->labelsize(11); { Fl_Input* o = decl_before_input = new Fl_Input(10, 35, 275, 20); @@ -252,7 +252,7 @@ Fl_Button *decl_panel_cancel=(Fl_Button *)0; Fl_Window* make_decl_panel() { Fl_Window* w; - { Fl_Window* o = decl_panel = new Fl_Window(290, 145, "Declaration"); + { Fl_Window* o = decl_panel = new Fl_Window(290, 145, "Declaration Properties"); w = o; { Fl_Light_Button* o = decl_public_button = new Fl_Light_Button(10, 10, 54, 20, "public"); o->tooltip("Make the declaration publicly accessible."); @@ -297,7 +297,7 @@ Fl_Button *c_panel_cancel=(Fl_Button *)0; Fl_Window* make_class_panel() { Fl_Window* w; - { Fl_Window* o = class_panel = new Fl_Window(285, 140, "Class"); + { Fl_Window* o = class_panel = new Fl_Window(285, 140, "Class Properties"); w = o; o->labelsize(11); { Fl_Light_Button* o = c_public_button = new Fl_Light_Button(10, 10, 54, 20, "public"); @@ -356,7 +356,7 @@ Fl_Button *comment_load=(Fl_Button *)0; Fl_Window* make_comment_panel() { Fl_Window* w; - { Fl_Window* o = comment_panel = new Fl_Window(545, 285, "Comment"); + { Fl_Window* o = comment_panel = new Fl_Window(545, 285, "Comment Properties"); w = o; o->labelsize(11); { Fl_Text_Editor* o = comment_input = new Fl_Text_Editor(95, 10, 438, 241); @@ -422,6 +422,9 @@ void type_make_cb(Fl_Widget*w,void*d) { select_only(t); set_modflag(1); t->open(); + } else { + undo_current --; + undo_last --; } } diff --git a/fluid/function_panel.fl b/fluid/function_panel.fl index 84bcd557f..e7061f9e7 100644 --- a/fluid/function_panel.fl +++ b/fluid/function_panel.fl @@ -46,7 +46,7 @@ decl {extern void select_only(Fl_Type*);} {} Function {make_function_panel()} {open } { Fl_Window function_panel { - label {Function/Method} + label {Function/Method Properties} xywh {855 21 285 140} type Single hide resizable modal } { Fl_Light_Button f_public_button { @@ -79,7 +79,7 @@ Function {make_function_panel()} {open Function {make_code_panel()} {open } { Fl_Window code_panel { - label Code + label {Code Properties} xywh {527 128 545 175} type Single labelsize 11 hide resizable modal } { Fl_Text_Editor code_input { @@ -109,7 +109,7 @@ Function {make_code_panel()} {open Function {make_codeblock_panel()} {open } { Fl_Window codeblock_panel { - label {Code Block} + label {Code Block Properties} xywh {845 158 295 100} type Single labelsize 11 hide resizable modal } { Fl_Input code_before_input { @@ -133,7 +133,7 @@ Function {make_codeblock_panel()} {open Function {make_declblock_panel()} {open } { Fl_Window declblock_panel { - label {Declaration Block} + label {Declaration Block Properties} xywh {665 33 295 125} type Single labelsize 11 hide resizable modal } { Fl_Input decl_before_input { @@ -161,7 +161,7 @@ Function {make_declblock_panel()} {open Function {make_decl_panel()} {open } { Fl_Window decl_panel { - label Declaration + label {Declaration Properties} xywh {789 289 290 145} type Single hide resizable } { Fl_Light_Button decl_public_button { @@ -186,7 +186,7 @@ Function {make_decl_panel()} {open Function {make_class_panel()} {open } { Fl_Window class_panel { - label Class + label {Class Properties} xywh {744 223 285 140} type Single labelsize 11 hide resizable modal } { Fl_Light_Button c_public_button { @@ -215,7 +215,7 @@ Function {make_class_panel()} {open Function {make_comment_panel()} {open } { Fl_Window comment_panel { - label Comment + label {Comment Properties} xywh {328 152 545 285} type Single labelsize 11 hide resizable modal } { Fl_Text_Editor comment_input { @@ -273,6 +273,9 @@ Function {type_make_cb(Fl_Widget*w,void*d)} {open return_type void select_only(t); set_modflag(1); t->open(); + } else { + undo_current --; + undo_last --; }} {} } diff --git a/fluid/undo.cxx b/fluid/undo.cxx index a66bf80dd..9aae0ac08 100644 --- a/fluid/undo.cxx +++ b/fluid/undo.cxx @@ -126,8 +126,8 @@ void undo_cb(Fl_Widget *, void *) { void undo_checkpoint() { char filename[1024]; // Undo checkpoint filename - printf("undo_checkpoint(): undo_current=%d, undo_paused=%d, modflag=%d\n", - undo_current, undo_paused, modflag); +// printf("undo_checkpoint(): undo_current=%d, undo_paused=%d, modflag=%d\n", +// undo_current, undo_paused, modflag); // Don't checkpoint if undo_suspend() has been called... if (undo_paused) return; diff --git a/src/fl_shortcut.cxx b/src/fl_shortcut.cxx index cab47c487..51041fe61 100644 --- a/src/fl_shortcut.cxx +++ b/src/fl_shortcut.cxx @@ -153,7 +153,7 @@ const char * fl_shortcut_label(int shortcut) { *p++ = uchar(key & 127); } else { // if none found, use the keystroke as a match: - *p++ = uchar(key); + *p++ = uchar(toupper(key & 255)); } } *p = 0; @@ -163,7 +163,7 @@ const char * fl_shortcut_label(int shortcut) { if (key == FL_Enter || key == '\r') q="Enter"; // don't use Xlib's "Return": else if (key > 32 && key < 0x100) q = 0; else q = XKeysymToString(key); - if (!q) {*p++ = uchar(key); *p = 0; return buf;} + if (!q) {*p++ = uchar(toupper(key & 255)); *p = 0; return buf;} if (p > buf) {strcpy(p,q); return buf;} else return q; #endif } |
