From 209925543676b31dca1238cfd42df9a9ced9ef96 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Wed, 5 Jul 2000 16:20:33 +0000 Subject: [PATCH] New \wheel_jump lyxrc command. Fix dependency with .cot files git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/lyx-1_1_5@860 a592a061-630c-0410-9148-cb99ea01b6c8 --- ChangeLog | 10 ++++++++++ lib/lyxrc.example | 4 ++++ src/BufferView_pimpl.C | 4 ++-- src/LaTeX.C | 1 + src/lyxrc.C | 12 +++++++++++- src/lyxrc.h | 2 ++ 6 files changed, 30 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2e1c4beec2..e2d0d74e2a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2000-07-05 Jean-Marc Lasgouttes + + * src/LaTeX.C: Patch from Baruch to add hebrew table of + contents to the extension list. + +2000-07-04 edscott + + * src/lyxrc.C, src/lyxrc.h, src/BufferView_pimpl.C, + lib/lyxrc.example: added option \wheel_jump + 2000-06-29 Jean-Marc Lasgouttes * src/version.h: set version in cvs to 1.1.5fixcvs, to avoid diff --git a/lib/lyxrc.example b/lib/lyxrc.example index 6066417547..9d2ccefd4a 100644 --- a/lib/lyxrc.example +++ b/lib/lyxrc.example @@ -207,6 +207,10 @@ # is 150%. #\screen_zoom 100 +#The wheel movement factor (for mice with wheels or five button mice) +#Default is 100, about a page down. A value of 10 give me about a line and a half +#\wheel_jump 10 + # LyX normally doesn't update the cursor position if you move the scrollbar. # If you scroll the cursor off the screen and then start typing LyX will # move you back to where the cursor was. If you'd prefer to always have the diff --git a/src/BufferView_pimpl.C b/src/BufferView_pimpl.C index cfaf343469..21f8ef04fe 100644 --- a/src/BufferView_pimpl.C +++ b/src/BufferView_pimpl.C @@ -547,10 +547,10 @@ void BufferView::Pimpl::workAreaButtonPress(int xpos, int ypos, if (button == 4 || button == 5) { switch (button) { case 4: - scrollUp(100); // This number is only temporary + scrollUp(lyxrc.wheel_jump); // default=100, set in lyxrc break; case 5: - scrollDown(100); + scrollDown(lyxrc.wheel_jump); break; } } diff --git a/src/LaTeX.C b/src/LaTeX.C index 70510fff61..0c0a935534 100644 --- a/src/LaTeX.C +++ b/src/LaTeX.C @@ -69,6 +69,7 @@ const texfile_struct all_files[] = { { LaTeX::LOG, ".log"}, { LaTeX::LOT, ".lot"}, { LaTeX::TOC, ".toc"}, + { LaTeX::TOC, ".cot"}, // Hebrew TOC { LaTeX::LTX, ".ltx"}, { LaTeX::TEX, ".tex"} }; diff --git a/src/lyxrc.C b/src/lyxrc.C index c816f69a38..e1de4a78ab 100644 --- a/src/lyxrc.C +++ b/src/lyxrc.C @@ -154,6 +154,7 @@ enum LyXRCTags { RC_DOCBOOK_TO_DVI_COMMAND, RC_DOCBOOK_TO_HTML_COMMAND, RC_DOCBOOK_TO_PDF_COMMAND, + RC_WHEEL_JUMP, RC_LAST }; @@ -266,7 +267,8 @@ keyword_item lyxrcTags[] = { { "\\view_dvi_paper_option", RC_VIEWDVI_PAPEROPTION }, { "\\view_pdf_command", RC_VIEWPDF_COMMAND }, { "\\view_ps_command", RC_VIEWPS_COMMAND }, - { "\\view_pspic_command", RC_VIEWPSPIC_COMMAND } + { "\\view_pspic_command", RC_VIEWPSPIC_COMMAND }, + { "\\wheel_jump", RC_WHEEL_JUMP } }; /* Let the range depend of the size of lyxrcTags. Alejandro 240596 */ @@ -325,6 +327,7 @@ void LyXRC::setDefaults() { dpi = 75; // Because a screen typically is wider than a piece of paper: zoom = 150; + wheel_jump=100; // Default LaTeX font size: font_sizes[LyXFont::SIZE_TINY] = 5.0; font_sizes[LyXFont::SIZE_SCRIPT] = 7.0; @@ -726,6 +729,11 @@ int LyXRC::read(string const & filename) zoom = lexrc.GetInteger(); break; + case RC_WHEEL_JUMP: + if (lexrc.next()) + wheel_jump = lexrc.GetInteger(); + break; + case RC_SCREEN_FONT_SIZES: if (lexrc.next()) font_sizes[LyXFont::SIZE_TINY] = @@ -1213,6 +1221,8 @@ void LyXRC::output(ostream & os) const os << "\\screen_dpi " << dpi << "\n"; case RC_SCREEN_ZOOM: os << "\\screen_zoom " << zoom << "\n"; + case RC_WHEEL_JUMP: + os << "\\wheel_jump " << wheel_jump << "\n"; case RC_SCREEN_FONT_SIZES: os.setf(ios::fixed); os.precision(2); diff --git a/src/lyxrc.h b/src/lyxrc.h index b931af0111..17fc2bdcba 100644 --- a/src/lyxrc.h +++ b/src/lyxrc.h @@ -138,6 +138,8 @@ public: string backupdir_path; /// Zoom factor for screen fonts unsigned int zoom; + /// parameter for button_4 and button_5 + unsigned int wheel_jump; /// Screen font sizes in points for each font size float font_sizes[10]; /// Allow the use of scalable fonts? Default is yes.