mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-07 02:28:35 +00:00
consistent shortcuts on Cancel (Esc) and Close (Esc & Return) buttons
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1503 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
16a7d8015e
commit
5ee7cb857c
@ -1,3 +1,26 @@
|
||||
2001-02-14 Angus Leeming <a.leeming@ic.ac.uk>
|
||||
|
||||
* FormBrowser.C: used OkCancelPolicy for ButtonController rather than
|
||||
IgnorantPolicy.
|
||||
|
||||
* forms/form_browser.fd:
|
||||
* forms/form_copyright.fd:
|
||||
* forms/form_error.fd:
|
||||
* forms/form_tabular.fd:
|
||||
* forms/form_toc.fd:
|
||||
Consistent shortcuts for Close button: Esc and Return only.
|
||||
|
||||
* forms/form_citation.fd:
|
||||
* forms/form_document.fd:
|
||||
* forms/form_index.fd:
|
||||
* forms/form_paragraph.fd:
|
||||
* forms/form_preferences.fd:
|
||||
* forms/form_print.fd:
|
||||
* forms/form_ref.fd:
|
||||
* forms/form_tabular_create.fd:
|
||||
* forms/form_url.fd:
|
||||
Consistent shortcut for Cancel button: Esc only.
|
||||
|
||||
2001-02-12 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
* Dialogs.C: new Splash. Include, Bibitem/tex
|
||||
|
@ -24,7 +24,7 @@ using SigC::slot;
|
||||
#endif
|
||||
|
||||
FormBrowser::FormBrowser(LyXView * lv, Dialogs * d, const string & name)
|
||||
: FormBaseBD(lv, d, name, new IgnorantPolicy),
|
||||
: FormBaseBD(lv, d, name, new OkCancelPolicy),
|
||||
dialog_(0)
|
||||
{
|
||||
}
|
||||
@ -43,7 +43,7 @@ void FormBrowser::build()
|
||||
minh_ = form()->h;
|
||||
|
||||
// Manage the close button
|
||||
bc_.setOK(dialog_->button_close);
|
||||
bc_.setCancel(dialog_->button_close);
|
||||
bc_.refresh();
|
||||
}
|
||||
|
||||
|
@ -27,10 +27,14 @@ FD_form_browser * FormBrowser::build_browser()
|
||||
obj = fl_add_box(FL_UP_BOX, 0, 0, 470, 380, "");
|
||||
fdui->browser = obj = fl_add_browser(FL_NORMAL_BROWSER, 10, 10, 450, 320, "");
|
||||
fl_set_object_gravity(obj, FL_NorthWest, FL_SouthEast);
|
||||
fdui->button_close = obj = fl_add_button(FL_RETURN_BUTTON, 370, 340, 90, 30, _("Close"));
|
||||
{
|
||||
char const * const dummy = N_("Close|^[^M");
|
||||
fdui->button_close = obj = fl_add_button(FL_NORMAL_BUTTON, 370, 340, 90, 30, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
|
||||
fl_set_object_callback(obj, C_FormBaseOKCB, 0);
|
||||
fl_set_object_callback(obj, C_FormBaseCancelCB, 0);
|
||||
{
|
||||
char const * const dummy = N_("Update|#Uu");
|
||||
fdui->button_update = obj = fl_add_button(FL_NORMAL_BUTTON, 270, 340, 90, 30, idex(_(dummy)));
|
||||
|
@ -5,7 +5,7 @@
|
||||
#define FD_form_browser_h_
|
||||
|
||||
/** Callbacks, globals and object handlers **/
|
||||
extern "C" void C_FormBaseOKCB(FL_OBJECT *, long);
|
||||
extern "C" void C_FormBaseCancelCB(FL_OBJECT *, long);
|
||||
extern "C" void C_FormBaseInputCB(FL_OBJECT *, long);
|
||||
|
||||
|
||||
|
@ -107,7 +107,7 @@ FD_form_citation * FormCitation::build_citation()
|
||||
fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
|
||||
fl_set_object_callback(obj, C_FormBaseApplyCB, 0);
|
||||
{
|
||||
char const * const dummy = N_("Cancel|#C^[");
|
||||
char const * const dummy = N_("Cancel|^[");
|
||||
fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 330, 630, 90, 30, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ FD_form_copyright * FormCopyright::build_copyright()
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_lalign(obj, FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
|
||||
{
|
||||
char const * const dummy = N_("Close|#C^[^M");
|
||||
char const * const dummy = N_("Close|^[^M");
|
||||
fdui->button_cancel = obj = fl_add_button(FL_RETURN_BUTTON, 160, 390, 140, 30, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ FD_form_tabbed_document * FormDocument::build_tabbed_document()
|
||||
fdui->tabbed_folder = obj = fl_add_tabfolder(FL_TOP_TABFOLDER, 20, 15, 435, 365, _("Tabbed folder"));
|
||||
fl_set_object_resize(obj, FL_RESIZE_ALL);
|
||||
{
|
||||
char const * const dummy = N_("Cancel|#C^[");
|
||||
char const * const dummy = N_("Cancel|^[");
|
||||
fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 355, 410, 100, 30, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ FD_form_error * FormError::build_error()
|
||||
fdui->message = obj = fl_add_box(FL_FRAME_BOX, 10, 10, 380, 180, "");
|
||||
fl_set_object_gravity(obj, FL_NorthWest, FL_SouthEast);
|
||||
{
|
||||
char const * const dummy = N_("Close|#C^[^M");
|
||||
char const * const dummy = N_("Close|^[^M");
|
||||
fdui->button_cancel = obj = fl_add_button(FL_RETURN_BUTTON, 135, 200, 130, 30, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
|
@ -25,8 +25,11 @@ FD_form_index * FormIndex::build_index()
|
||||
fdui->form = fl_bgn_form(FL_NO_BOX, 520, 100);
|
||||
fdui->form->u_vdata = this;
|
||||
obj = fl_add_box(FL_UP_BOX, 0, 0, 520, 100, "");
|
||||
fdui->input_key = obj = fl_add_input(FL_NORMAL_INPUT, 90, 10, 420, 30, _("Keyword"));
|
||||
fl_set_input_shortcut(obj, scex(_("Keyword|#K")), 1);
|
||||
{
|
||||
char const * const dummy = N_("Keyword|#K");
|
||||
fdui->input_key = obj = fl_add_input(FL_NORMAL_INPUT, 90, 10, 420, 30, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_resize(obj, FL_RESIZE_X);
|
||||
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||
@ -50,7 +53,7 @@ FD_form_index * FormIndex::build_index()
|
||||
fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
|
||||
fl_set_object_callback(obj, C_FormBaseApplyCB, 0);
|
||||
{
|
||||
char const * const dummy = N_("Cancel|#C^[");
|
||||
char const * const dummy = N_("Cancel|^[");
|
||||
fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 410, 60, 100, 30, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
|
@ -314,7 +314,7 @@ FD_form_tabbed_paragraph * FormParagraph::build_tabbed_paragraph()
|
||||
fdui->tabbed_folder = obj = fl_add_tabfolder(FL_TOP_TABFOLDER, 10, 10, 490, 270, _("Tabbed folder"));
|
||||
fl_set_object_resize(obj, FL_RESIZE_ALL);
|
||||
{
|
||||
char const * const dummy = N_("Cancel|C#C^[");
|
||||
char const * const dummy = N_("Cancel|^[");
|
||||
fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 400, 310, 100, 30, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ FD_form_preferences * FormPreferences::build_preferences()
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseApplyCB, 0);
|
||||
{
|
||||
char const * const dummy = N_("Cancel|C#C^[");
|
||||
char const * const dummy = N_("Cancel|^[");
|
||||
fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 370, 390, 90, 30, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ FD_form_print * FormPrint::build_print()
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseApplyCB, 0);
|
||||
{
|
||||
char const * const dummy = N_("Cancel|C#C^[");
|
||||
char const * const dummy = N_("Cancel|^[");
|
||||
fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 230, 350, 100, 30, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ FD_form_ref * FormRef::build_ref()
|
||||
fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
|
||||
fl_set_object_callback(obj, C_FormBaseOKCB, 0);
|
||||
{
|
||||
char const * const dummy = N_("Cancel|#C^[");
|
||||
char const * const dummy = N_("Cancel|^[");
|
||||
fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 430, 300, 90, 30, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ FD_form_tabular * FormTabular::build_tabular()
|
||||
fdui->tabFolder = obj = fl_add_tabfolder(FL_TOP_TABFOLDER, 0, 0, 505, 250, _("Tabbed folder"));
|
||||
fl_set_object_resize(obj, FL_RESIZE_ALL);
|
||||
{
|
||||
char const * const dummy = N_("Close|#C^[");
|
||||
char const * const dummy = N_("Close|^[^M");
|
||||
fdui->button_close = obj = fl_add_button(FL_NORMAL_BUTTON, 415, 260, 90, 30, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ FD_form_tabular_create * FormTabularCreate::build_tabular_create()
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseApplyCB, 0);
|
||||
{
|
||||
char const * const dummy = N_("Cancel|#C^[");
|
||||
char const * const dummy = N_("Cancel|^[");
|
||||
fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 210, 90, 90, 30, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ FD_form_toc * FormToc::build_toc()
|
||||
fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
|
||||
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||
{
|
||||
char const * const dummy = N_("Close|#C^[^M");
|
||||
char const * const dummy = N_("Close|^[^M");
|
||||
fdui->button_cancel = obj = fl_add_button(FL_RETURN_BUTTON, 310, 300, 100, 30, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ FD_form_url * FormUrl::build_url()
|
||||
fl_set_object_resize(obj, FL_RESIZE_X);
|
||||
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||
{
|
||||
char const * const dummy = N_("Cancel|#C^[");
|
||||
char const * const dummy = N_("Cancel|^[");
|
||||
fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 410, 130, 100, 30, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ argument:
|
||||
|
||||
--------------------
|
||||
class: FL_BUTTON
|
||||
type: RETURN_BUTTON
|
||||
type: NORMAL_BUTTON
|
||||
box: 370 340 90 30
|
||||
boxtype: FL_UP_BOX
|
||||
colors: FL_COL1 FL_COL1
|
||||
@ -58,12 +58,12 @@ alignment: FL_ALIGN_CENTER
|
||||
style: FL_NORMAL_STYLE
|
||||
size: FL_NORMAL_SIZE
|
||||
lcol: FL_BLACK
|
||||
label: Close
|
||||
shortcut: ^M
|
||||
label: Close|^[^M
|
||||
shortcut:
|
||||
resize: FL_RESIZE_NONE
|
||||
gravity: FL_SouthEast FL_SouthEast
|
||||
name: button_close
|
||||
callback: C_FormBaseOKCB
|
||||
callback: C_FormBaseCancelCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
|
@ -274,7 +274,7 @@ alignment: FL_ALIGN_CENTER
|
||||
style: FL_NORMAL_STYLE
|
||||
size: FL_DEFAULT_SIZE
|
||||
lcol: FL_BLACK
|
||||
label: Cancel|#C^[
|
||||
label: Cancel|^[
|
||||
shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_SouthEast FL_SouthEast
|
||||
|
@ -94,7 +94,7 @@ alignment: FL_ALIGN_CENTER
|
||||
style: FL_NORMAL_STYLE
|
||||
size: FL_NORMAL_SIZE
|
||||
lcol: FL_BLACK
|
||||
label: Close|#C^[^M
|
||||
label: Close|^[^M
|
||||
shortcut:
|
||||
resize: FL_RESIZE_NONE
|
||||
gravity: FL_South FL_South
|
||||
|
@ -59,7 +59,7 @@ alignment: FL_ALIGN_CENTER
|
||||
style: FL_NORMAL_STYLE
|
||||
size: FL_NORMAL_SIZE
|
||||
lcol: FL_BLACK
|
||||
label: Cancel|#C^[
|
||||
label: Cancel|^[
|
||||
shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
|
@ -58,7 +58,7 @@ alignment: FL_ALIGN_CENTER
|
||||
style: FL_NORMAL_STYLE
|
||||
size: FL_DEFAULT_SIZE
|
||||
lcol: FL_BLACK
|
||||
label: Close|#C^[^M
|
||||
label: Close|^[^M
|
||||
shortcut:
|
||||
resize: FL_RESIZE_NONE
|
||||
gravity: FL_South FL_South
|
||||
|
@ -40,8 +40,8 @@ alignment: FL_ALIGN_LEFT
|
||||
style: FL_NORMAL_STYLE
|
||||
size: FL_NORMAL_SIZE
|
||||
lcol: FL_BLACK
|
||||
label: Keyword
|
||||
shortcut: Keyword|#K
|
||||
label: Keyword|#K
|
||||
shortcut:
|
||||
resize: FL_RESIZE_X
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: input_key
|
||||
@ -112,7 +112,7 @@ alignment: FL_ALIGN_CENTER
|
||||
style: FL_NORMAL_STYLE
|
||||
size: FL_NORMAL_SIZE
|
||||
lcol: FL_BLACK
|
||||
label: Cancel|#C^[
|
||||
label: Cancel|^[
|
||||
shortcut:
|
||||
resize: FL_RESIZE_NONE
|
||||
gravity: FL_SouthEast FL_SouthEast
|
||||
|
@ -970,7 +970,7 @@ alignment: FL_ALIGN_CENTER
|
||||
style: FL_NORMAL_STYLE
|
||||
size: FL_NORMAL_SIZE
|
||||
lcol: FL_BLACK
|
||||
label: Cancel|C#C^[
|
||||
label: Cancel|^[
|
||||
shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
|
@ -77,7 +77,7 @@ alignment: FL_ALIGN_CENTER
|
||||
style: FL_NORMAL_STYLE
|
||||
size: FL_NORMAL_SIZE
|
||||
lcol: FL_BLACK
|
||||
label: Cancel|C#C^[
|
||||
label: Cancel|^[
|
||||
shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
|
@ -184,7 +184,7 @@ alignment: FL_ALIGN_CENTER
|
||||
style: FL_NORMAL_STYLE
|
||||
size: FL_NORMAL_SIZE
|
||||
lcol: FL_BLACK
|
||||
label: Cancel|C#C^[
|
||||
label: Cancel|^[
|
||||
shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
|
@ -184,7 +184,7 @@ alignment: FL_ALIGN_CENTER
|
||||
style: FL_NORMAL_STYLE
|
||||
size: FL_DEFAULT_SIZE
|
||||
lcol: FL_BLACK
|
||||
label: Cancel|#C^[
|
||||
label: Cancel|^[
|
||||
shortcut:
|
||||
resize: FL_RESIZE_NONE
|
||||
gravity: FL_SouthEast FL_SouthEast
|
||||
|
@ -59,7 +59,7 @@ alignment: FL_ALIGN_CENTER
|
||||
style: FL_NORMAL_STYLE
|
||||
size: FL_NORMAL_SIZE
|
||||
lcol: FL_BLACK
|
||||
label: Close|#C^[
|
||||
label: Close|^[^M
|
||||
shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
|
@ -77,7 +77,7 @@ alignment: FL_ALIGN_CENTER
|
||||
style: FL_NORMAL_STYLE
|
||||
size: FL_NORMAL_SIZE
|
||||
lcol: FL_BLACK
|
||||
label: Cancel|#C^[
|
||||
label: Cancel|^[
|
||||
shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
|
@ -94,8 +94,8 @@ alignment: FL_ALIGN_CENTER
|
||||
style: FL_NORMAL_STYLE
|
||||
size: FL_NORMAL_SIZE
|
||||
lcol: FL_BLACK
|
||||
label: Close|#C^[^M
|
||||
shortcut: ^M
|
||||
label: Close|^[^M
|
||||
shortcut:
|
||||
resize: FL_RESIZE_NONE
|
||||
gravity: FL_SouthEast FL_SouthEast
|
||||
name: button_cancel
|
||||
|
@ -94,7 +94,7 @@ alignment: FL_ALIGN_CENTER
|
||||
style: FL_NORMAL_STYLE
|
||||
size: FL_NORMAL_SIZE
|
||||
lcol: FL_BLACK
|
||||
label: Cancel|#C^[
|
||||
label: Cancel|^[
|
||||
shortcut:
|
||||
resize: FL_RESIZE_NONE
|
||||
gravity: FL_SouthEast FL_SouthEast
|
||||
|
Loading…
Reference in New Issue
Block a user