mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Activate the Ok, Apply buttons on pasting with the middle mouse button
for all remaining FL_INPUT objects that didn't yet do so. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3716 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
f7c9b1176d
commit
e918b1cc2b
@ -1,5 +1,30 @@
|
||||
2002-03-09 Angus Leeming <a.leeming@ic.ac.uk>
|
||||
|
||||
* FeedbackController.C: improve a comment.
|
||||
|
||||
* FormFiledialog.C: whitespace change.
|
||||
|
||||
* FormBibitem.C (build):
|
||||
* FormBibtex.C (build):
|
||||
* FormCitation.C (build):
|
||||
* FormDocument.C (build):
|
||||
* FormExternal.C (build):
|
||||
* FormGraphics.C (build):
|
||||
* FormInclude.C (build):
|
||||
* FormIndex.C (build):
|
||||
* FormMathsMatrix.C (build):
|
||||
* FormMinipage.C (build):
|
||||
* FormParagraph.C (build):
|
||||
* FormPrint.C (build):
|
||||
* FormRef.C (build):
|
||||
* FormSendto.C (build):
|
||||
* FormSpellchecker.C (build):
|
||||
* FormTabular.C (build):
|
||||
* FormThesaurus.C (build):
|
||||
* FormUrl.C (build): invoke setPrehandler for all FL_INPUT objects.
|
||||
Means that pasting with the middle mouse button will activate the
|
||||
Ok, Apply buttons.
|
||||
|
||||
* FeedbackController.C (MessageCB): fix crash by removing
|
||||
Assert(message_widget_) and returning silently in this case.
|
||||
Can happen quite justifiably.
|
||||
|
@ -9,7 +9,7 @@
|
||||
/* A common interface for posting feedback messages to a message widget in
|
||||
* xforms.
|
||||
* Derive FormBase and FormBaseDeprecated from it, so daughter classes of
|
||||
* either can interface tooltips in the same way.
|
||||
* either can use the same interface.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
@ -33,6 +33,9 @@ void FormBibitem::build()
|
||||
fl_set_input_return(dialog_->key, FL_RETURN_CHANGED);
|
||||
fl_set_input_return(dialog_->label, FL_RETURN_CHANGED);
|
||||
|
||||
setPrehandler(dialog_->key);
|
||||
setPrehandler(dialog_->label);
|
||||
|
||||
// Manage the ok, apply, restore and cancel/close buttons
|
||||
bc().setOK(dialog_->button_ok);
|
||||
bc().setCancel(dialog_->button_cancel);
|
||||
|
@ -45,6 +45,9 @@ void FormBibtex::build()
|
||||
fl_set_input_return(dialog_->database, FL_RETURN_CHANGED);
|
||||
fl_set_input_return(dialog_->style, FL_RETURN_CHANGED);
|
||||
|
||||
setPrehandler(dialog_->database);
|
||||
setPrehandler(dialog_->style);
|
||||
|
||||
// Manage the ok, apply, restore and cancel/close buttons
|
||||
bc().setOK(dialog_->button_ok);
|
||||
bc().setCancel(dialog_->button_cancel);
|
||||
|
@ -150,6 +150,10 @@ void FormCitation::build()
|
||||
fl_set_button(dialog_->button_search_case, 0);
|
||||
fl_set_button(dialog_->button_search_type, 0);
|
||||
|
||||
setPrehandler(dialog_->input_search);
|
||||
setPrehandler(dialog_->input_before);
|
||||
setPrehandler(dialog_->input_after);
|
||||
|
||||
// Manage the ok, apply, restore and cancel/close buttons
|
||||
bc().setOK(dialog_->button_ok);
|
||||
bc().setApply(dialog_->button_apply);
|
||||
|
@ -121,6 +121,15 @@ void FormDocument::build()
|
||||
fl_set_input_return(paper_->input_head_sep, FL_RETURN_CHANGED);
|
||||
fl_set_input_return(paper_->input_foot_skip, FL_RETURN_CHANGED);
|
||||
|
||||
setPrehandler(paper_->input_custom_width);
|
||||
setPrehandler(paper_->input_custom_height);
|
||||
setPrehandler(paper_->input_top_margin);
|
||||
setPrehandler(paper_->input_bottom_margin);
|
||||
setPrehandler(paper_->input_inner_margin);
|
||||
setPrehandler(paper_->input_outer_margin);
|
||||
setPrehandler(paper_->input_head_height);
|
||||
setPrehandler(paper_->input_head_sep);
|
||||
setPrehandler(paper_->input_foot_skip);
|
||||
|
||||
// Create the contents of the unit choices
|
||||
// Don't include the "%" terms...
|
||||
@ -200,6 +209,10 @@ void FormDocument::build()
|
||||
fl_set_input_return(class_->input_doc_skip, FL_RETURN_CHANGED);
|
||||
fl_set_input_return(class_->input_doc_spacing, FL_RETURN_CHANGED);
|
||||
|
||||
setPrehandler(class_->input_doc_extra);
|
||||
setPrehandler(class_->input_doc_skip);
|
||||
setPrehandler(class_->input_doc_spacing);
|
||||
|
||||
// Set input filters on doc spacing to make it accept only
|
||||
// unsigned numbers.
|
||||
fl_set_input_filter(class_->input_doc_spacing, fl_unsigned_float_filter);
|
||||
@ -254,6 +267,8 @@ void FormDocument::build()
|
||||
// the document options form
|
||||
options_.reset(build_doc_options());
|
||||
fl_set_input_return(options_->input_float_placement, FL_RETURN_CHANGED);
|
||||
setPrehandler(options_->input_float_placement);
|
||||
|
||||
fl_set_counter_bounds(options_->slider_secnumdepth,-2,5);
|
||||
fl_set_counter_bounds(options_->slider_tocdepth,-1,5);
|
||||
fl_set_counter_step(options_->slider_secnumdepth,1,1);
|
||||
@ -282,6 +297,7 @@ void FormDocument::build()
|
||||
" normal | large | Large | LARGE | huge | Huge"));
|
||||
fl_set_choice(bullets_->choice_bullet_size, 1);
|
||||
fl_set_input_return(bullets_->input_bullet_latex, FL_RETURN_CHANGED);
|
||||
setPrehandler(bullets_->input_bullet_latex);
|
||||
fl_set_input_maxchars(bullets_->input_bullet_latex, 80);
|
||||
|
||||
bc().addReadOnly (bullets_->bmtable_bullet_panel);
|
||||
|
@ -48,7 +48,12 @@ void FormExternal::build()
|
||||
string const choice =
|
||||
" " + getStringFromVector(controller().getTemplates(), " | ") + " ";
|
||||
fl_addto_choice(dialog_->choice_template, choice.c_str());
|
||||
fl_set_input_return (dialog_->input_filename, FL_RETURN_CHANGED);
|
||||
|
||||
fl_set_input_return (dialog_->input_filename, FL_RETURN_CHANGED);
|
||||
fl_set_input_return (dialog_->input_parameters, FL_RETURN_CHANGED);
|
||||
|
||||
setPrehandler(dialog_->input_filename);
|
||||
setPrehandler(dialog_->input_parameters);
|
||||
|
||||
bc().setOK(dialog_->button_ok);
|
||||
bc().setApply(dialog_->button_apply);
|
||||
|
@ -444,7 +444,7 @@ FileDialog::Private::Private()
|
||||
C_LyXFileDlg_FileDlgCB, 12);
|
||||
fl_set_object_callback(pFileDlgForm->User2,
|
||||
C_LyXFileDlg_FileDlgCB, 13);
|
||||
|
||||
|
||||
// Make sure pressing the close box doesn't crash LyX. (RvdK)
|
||||
fl_set_form_atclose(pFileDlgForm->form,
|
||||
C_LyXFileDlg_CancelCB, 0);
|
||||
|
@ -81,6 +81,10 @@ void FormGraphics::build()
|
||||
fl_set_input_maxchars(file_->input_rotate_angle, ROTATE_MAXCHARS);
|
||||
fl_set_input_filter(file_->input_rotate_angle, fl_float_filter);
|
||||
|
||||
setPrehandler(file_->input_filename);
|
||||
setPrehandler(file_->input_subcaption);
|
||||
setPrehandler(file_->input_rotate_angle);
|
||||
|
||||
string const choice_origin =
|
||||
"center|" // c
|
||||
"leftTop|leftBottom|leftBaseline|" // lt lb lB
|
||||
@ -101,6 +105,10 @@ void FormGraphics::build()
|
||||
fl_set_input_return (lyxview_->input_lyxheight, FL_RETURN_CHANGED);
|
||||
fl_set_input_return (lyxview_->input_lyxscale, FL_RETURN_CHANGED);
|
||||
|
||||
setPrehandler(lyxview_->input_lyxwidth);
|
||||
setPrehandler(lyxview_->input_lyxheight);
|
||||
setPrehandler(lyxview_->input_lyxscale);
|
||||
|
||||
fl_addto_choice(lyxview_->choice_width_lyxwidth, choice_Length_WithUnit.c_str());
|
||||
fl_addto_choice(lyxview_->choice_width_lyxheight, choice_Length_WithUnit.c_str());
|
||||
|
||||
@ -117,6 +125,10 @@ void FormGraphics::build()
|
||||
fl_set_input_return (size_->input_width, FL_RETURN_CHANGED);
|
||||
fl_set_input_return (size_->input_height, FL_RETURN_CHANGED);
|
||||
|
||||
setPrehandler(size_->input_scale);
|
||||
setPrehandler(size_->input_width);
|
||||
setPrehandler(size_->input_height);
|
||||
|
||||
fl_set_input_maxchars(size_->input_scale, SCALE_MAXDIGITS);
|
||||
fl_set_input_maxchars(size_->input_width, WIDTH_MAXDIGITS);
|
||||
fl_set_input_maxchars(size_->input_height, HEIGHT_MAXDIGITS);
|
||||
@ -141,6 +153,12 @@ void FormGraphics::build()
|
||||
fl_set_input_filter(bbox_->input_bb_x0, fl_unsigned_float_filter);
|
||||
fl_set_input_filter(bbox_->input_bb_y0, fl_unsigned_float_filter);
|
||||
fl_set_input_filter(bbox_->input_bb_x1, fl_unsigned_float_filter);
|
||||
fl_set_input_filter(bbox_->input_bb_y1, fl_unsigned_float_filter);
|
||||
|
||||
setPrehandler(bbox_->input_bb_x0);
|
||||
setPrehandler(bbox_->input_bb_y0);
|
||||
setPrehandler(bbox_->input_bb_x1);
|
||||
setPrehandler(bbox_->input_bb_y1);
|
||||
|
||||
string const bb_units = "pt|cm|in";
|
||||
fl_addto_choice(bbox_->choice_bb_units, bb_units.c_str());
|
||||
@ -151,6 +169,7 @@ void FormGraphics::build()
|
||||
special_.reset(build_special());
|
||||
|
||||
fl_set_input_return (special_->input_special, FL_RETURN_CHANGED);
|
||||
setPrehandler(special_->input_special);
|
||||
|
||||
// add the different tabfolders
|
||||
fl_addto_tabfolder(dialog_->tabFolder, _("File"), file_->form);
|
||||
|
@ -35,6 +35,7 @@ void FormInclude::build()
|
||||
dialog_.reset(build_include());
|
||||
|
||||
fl_set_input_return(dialog_->input_filename, FL_RETURN_CHANGED);
|
||||
setPrehandler(dialog_->input_filename);
|
||||
|
||||
// Manage the ok and cancel buttons
|
||||
bc().setOK(dialog_->button_ok);
|
||||
|
@ -30,6 +30,7 @@ void FormIndex::build()
|
||||
dialog_.reset(build_index());
|
||||
|
||||
fl_set_input_return(dialog_->input_key, FL_RETURN_CHANGED);
|
||||
setPrehandler(dialog_->input_key);
|
||||
|
||||
// Manage the ok, apply, restore and cancel/close buttons
|
||||
bc().setOK(dialog_->button_ok);
|
||||
|
@ -75,6 +75,7 @@ void FormMathsMatrix::build()
|
||||
dialog_->input_halign->u_vdata = this;
|
||||
fl_set_input_filter(dialog_->input_halign,
|
||||
C_FormMathsMatrixAlignFilter);
|
||||
setPrehandler(dialog_->input_halign);
|
||||
|
||||
bc().setOK(dialog_->button_ok);
|
||||
bc().setApply(dialog_->button_apply);
|
||||
|
@ -33,6 +33,7 @@ void FormMinipage::build()
|
||||
dialog_.reset(build_minipage());
|
||||
|
||||
fl_set_input_return(dialog_->input_width, FL_RETURN_CHANGED);
|
||||
setPrehandler(dialog_->input_width);
|
||||
|
||||
string const choice = getStringFromVector(getLatexUnits(), "|");
|
||||
fl_addto_choice(dialog_->choice_width_units, subst(choice, "%", "%%").c_str());
|
||||
|
@ -126,6 +126,11 @@ void FormParagraph::build()
|
||||
fl_set_input_return(dialog_->input_linespacing, FL_RETURN_CHANGED);
|
||||
fl_set_input_filter(dialog_->input_linespacing, fl_unsigned_float_filter);
|
||||
|
||||
setPrehandler(dialog_->input_space_above);
|
||||
setPrehandler(dialog_->input_space_below);
|
||||
setPrehandler(dialog_->input_labelwidth);
|
||||
setPrehandler(dialog_->input_linespacing);
|
||||
|
||||
// Create the contents of the unit choices
|
||||
// Don't include the "%" terms...
|
||||
#warning A bit dangerous... (Lgb)
|
||||
|
@ -75,6 +75,12 @@ void FormPrint::build()
|
||||
fl_set_input_filter(dialog_->input_count,
|
||||
fl_unsigned_int_filter);
|
||||
|
||||
setPrehandler(dialog_->input_printer);
|
||||
setPrehandler(dialog_->input_file);
|
||||
setPrehandler(dialog_->input_from_page);
|
||||
setPrehandler(dialog_->input_to_page);
|
||||
setPrehandler(dialog_->input_count);
|
||||
|
||||
// what limits (if any) make sense for these?
|
||||
fl_set_input_maxchars(dialog_->input_printer, 255);
|
||||
fl_set_input_maxchars(dialog_->input_file, 255);
|
||||
|
@ -46,7 +46,13 @@ void FormRef::build()
|
||||
// Force the user to use the browser to change refs.
|
||||
fl_deactivate_object(dialog_->input_ref);
|
||||
|
||||
// Manage the ok and cancel/close buttons
|
||||
fl_set_input_return(dialog_->input_name, FL_RETURN_CHANGED);
|
||||
fl_set_input_return(dialog_->input_ref, FL_RETURN_CHANGED);
|
||||
|
||||
setPrehandler(dialog_->input_name);
|
||||
setPrehandler(dialog_->input_ref);
|
||||
|
||||
// Manage the ok and cancel/close buttons
|
||||
bc().setOK(dialog_->button_ok);
|
||||
bc().setApply(dialog_->button_apply);
|
||||
bc().setCancel(dialog_->button_cancel);
|
||||
|
@ -35,6 +35,7 @@ void FormSendto::build()
|
||||
dialog_.reset(build_sendto());
|
||||
|
||||
fl_set_input_return(dialog_->input_command, FL_RETURN_CHANGED);
|
||||
setPrehandler(dialog_->input_command);
|
||||
|
||||
// Manage the ok, apply, restore and cancel/close buttons
|
||||
bc().setOK(dialog_->button_ok);
|
||||
|
@ -35,6 +35,9 @@ void FormSpellchecker::build()
|
||||
fl_set_browser_dblclick_callback(dialog_->browser,
|
||||
C_FormBaseInputCB, 2);
|
||||
|
||||
fl_set_input_return(dialog_->input, FL_RETURN_CHANGED);
|
||||
setPrehandler(dialog_->input);
|
||||
|
||||
// Manage the buttons
|
||||
bc().setCancel(dialog_->done);
|
||||
bc().addReadOnly(dialog_->replace);
|
||||
|
@ -110,6 +110,10 @@ void FormTabular::updateInset(InsetTabular * inset)
|
||||
void FormTabular::build()
|
||||
{
|
||||
dialog_.reset(build_tabular());
|
||||
|
||||
setPrehandler(dialog_->input_tabular_column);
|
||||
setPrehandler(dialog_->input_tabular_row);
|
||||
|
||||
tabular_options_.reset(build_tabular_options());
|
||||
column_options_.reset(build_column_options());
|
||||
cell_options_.reset(build_cell_options());
|
||||
@ -119,11 +123,18 @@ void FormTabular::build()
|
||||
FL_RETURN_END);
|
||||
fl_set_input_return(column_options_->input_special_alignment,
|
||||
FL_RETURN_END);
|
||||
|
||||
setPrehandler(column_options_->input_column_width);
|
||||
setPrehandler(column_options_->input_special_alignment);
|
||||
|
||||
fl_set_input_return(cell_options_->input_mcolumn_width,
|
||||
FL_RETURN_END);
|
||||
fl_set_input_return(cell_options_->input_special_multialign,
|
||||
FL_RETURN_END);
|
||||
|
||||
setPrehandler(cell_options_->input_mcolumn_width);
|
||||
setPrehandler(cell_options_->input_special_multialign);
|
||||
|
||||
fl_addto_tabfolder(dialog_->tabFolder, _("Tabular"),
|
||||
tabular_options_->form);
|
||||
fl_addto_tabfolder(dialog_->tabFolder, _("Column/Row"),
|
||||
|
@ -37,6 +37,12 @@ FormThesaurus::FormThesaurus(ControlThesaurus & c)
|
||||
void FormThesaurus::build()
|
||||
{
|
||||
dialog_.reset(build_thesaurus());
|
||||
|
||||
fl_set_input_return(dialog_->input_entry, FL_RETURN_CHANGED);
|
||||
fl_set_input_return(dialog_->input_replace, FL_RETURN_CHANGED);
|
||||
|
||||
setPrehandler(dialog_->input_entry);
|
||||
setPrehandler(dialog_->input_replace);
|
||||
|
||||
// Manage the ok, apply and cancel/close buttons
|
||||
bc().setCancel(dialog_->button_close);
|
||||
|
@ -32,6 +32,9 @@ void FormUrl::build()
|
||||
fl_set_input_return(dialog_->name, FL_RETURN_CHANGED);
|
||||
fl_set_input_return(dialog_->url, FL_RETURN_CHANGED);
|
||||
|
||||
setPrehandler(dialog_->name);
|
||||
setPrehandler(dialog_->url);
|
||||
|
||||
// Manage the ok, apply, restore and cancel/close buttons
|
||||
bc().setOK(dialog_->button_ok);
|
||||
bc().setApply(dialog_->button_apply);
|
||||
|
Loading…
Reference in New Issue
Block a user