]> git.lyx.org Git - lyx.git/commitdiff
Activate the Ok, Apply buttons on pasting with the middle mouse button
authorAngus Leeming <leeming@lyx.org>
Mon, 11 Mar 2002 18:24:31 +0000 (18:24 +0000)
committerAngus Leeming <leeming@lyx.org>
Mon, 11 Mar 2002 18:24:31 +0000 (18:24 +0000)
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

21 files changed:
src/frontends/xforms/ChangeLog
src/frontends/xforms/FeedbackController.C
src/frontends/xforms/FormBibitem.C
src/frontends/xforms/FormBibtex.C
src/frontends/xforms/FormCitation.C
src/frontends/xforms/FormDocument.C
src/frontends/xforms/FormExternal.C
src/frontends/xforms/FormFiledialog.C
src/frontends/xforms/FormGraphics.C
src/frontends/xforms/FormInclude.C
src/frontends/xforms/FormIndex.C
src/frontends/xforms/FormMathsMatrix.C
src/frontends/xforms/FormMinipage.C
src/frontends/xforms/FormParagraph.C
src/frontends/xforms/FormPrint.C
src/frontends/xforms/FormRef.C
src/frontends/xforms/FormSendto.C
src/frontends/xforms/FormSpellchecker.C
src/frontends/xforms/FormTabular.C
src/frontends/xforms/FormThesaurus.C
src/frontends/xforms/FormUrl.C

index 4a891a5bf82131f150dd014feaa9458f14beaeed..49e746c87d5d7b92d56e94f75a5aea44f6db71e9 100644 (file)
@@ -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.
index d4aaa523e13c8967688360da862dcc60b11cfb32..f23f92ef125e5aa41481144c9c1cc96987ad65ae 100644 (file)
@@ -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>
index 0b85396a77120cb9b43a1cef3f9f83830a7579bf..bebee863aef6640965770d608d29fd49600753c7 100644 (file)
@@ -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);
index 02678dee4c351c00432f9f96fe95b09f178bcd98..5719d07b710b1f274ef4fdc3aef07154134c4cbb 100644 (file)
@@ -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);
index 39844f9ca3f9b08272ed773c1f4f20132f65ca17..2f583c1bab42e616ad8f626a1e19eb9085cd9f5a 100644 (file)
@@ -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);
index 90393b569b4ae70924673cf9c1e1f7b56a3ecdc4..41fde49c11ab8ea89e2e85ab50310621c149687b 100644 (file)
@@ -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);
index d4f45513e21b10480f3d0f77330e4dda9f12f067..2dd336945a94f6cc6d0ef9371c7731e8628aa0d7 100644 (file)
@@ -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);
index e4c713c99a9a2710a74c1af73464e127af87583b..f227a947f0cbd95022be3e166561f4f9ec487632 100644 (file)
@@ -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);
index 795e229731c121b3494e49e8a42c8ca763d00198..b39f1806c961ad4f74ac7f20a1dbab48e38e8260 100644 (file)
@@ -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);
index dbf38964d4bfc3def15cd8f2ef42afb92e6cd798..c7e44b46736fd58f12d66cd8ad35443d9279746e 100644 (file)
@@ -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);
index 045d36d3f0ebe592579a5abaebad4861ad16e8da..7c09d69658c220b78ed7b4f84a095b81781d356d 100644 (file)
@@ -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);
index 336321ede161e998013b09e901447f902c84088e..332e03e98e8362111baba47a5ddfad61b76e2f59 100644 (file)
@@ -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);
index bb007c099922a16446c0e8de87247b4c6c165b91..26644846c1accdc4973b939f065df05a71cddac6 100644 (file)
@@ -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());
index 6b35359289d9af8c19fc118025534e20ac50f8c1..c489de5156ff357f2eee067624246d0db8e1a405 100644 (file)
@@ -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)
index 08d7a27bd690181477091d9fab34313d5122bb91..2b3db0e10da5daf6ed228a1877ded7f0851f6ef2 100644 (file)
@@ -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);
index 0e3617db9d443cc6bfc4e426677b7ad2b170320d..f88f08e565e4d30bb3d49ab41918fcb554e6c3a8 100644 (file)
@@ -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);
index 9c6e7aaf790b3346487b9e1516371010ee4fd0ef..bb4c29969e6b75717d38c33a9233a255063a1272 100644 (file)
@@ -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);
index 4bc83db3a654f934a904f9ca300f594faed149a7..4c00ebc9a8d18382990b7133a8902d5bc3cd744e 100644 (file)
@@ -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);
index a6eb29fbf0e015801fdc2c7c8a51a59702c9fba3..89bfb5427a111a7030bf8b02c18e0f213457331c 100644 (file)
@@ -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"),
index a0bde91faceb38bd0e2c3bb8a145f47cade03b0b..8cdcff3aff715d9b0da92d06b360d946657073b8 100644 (file)
@@ -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);
index eb41c7dc85f617b733fc1bee05a70cb4a629a97d..a190a463b10d57111223ece76f9673d6582ad838 100644 (file)
@@ -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);