From: Lars Gullik Bjønnes Date: Thu, 21 Mar 2002 21:21:28 +0000 (+0000) Subject: ws cleanup X-Git-Tag: 1.6.10~19595 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=f7ba7c8e9f3dcd2a5de79c7e93bf8edeec3b8e35;p=features.git ws cleanup git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3806 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/frontends/Alert.C b/src/frontends/Alert.C index 4463d63d75..e351d116bc 100644 --- a/src/frontends/Alert.C +++ b/src/frontends/Alert.C @@ -11,12 +11,12 @@ #include "Alert.h" #include "debug.h" -#include "lyxrc.h" - +#include "lyxrc.h" + #include "Alert_pimpl.h" #include - + using std::endl; using std::pair; using std::make_pair; @@ -28,7 +28,7 @@ void Alert::alert(string const & s1, string const & s2, string const & s3) lyxerr << "------------------------------" << endl << s1 << endl << s2 << endl << s3 << endl << "------------------------------" << endl; - } else { + } else { alert_pimpl(s1, s2, s3); } } diff --git a/src/frontends/Alert.h b/src/frontends/Alert.h index 6f8efd0e07..450bc2daac 100644 --- a/src/frontends/Alert.h +++ b/src/frontends/Alert.h @@ -17,23 +17,23 @@ namespace Alert { /// show an alert message -void alert(string const & s1, string const & s2 = string(), +void alert(string const & s1, string const & s2 = string(), string const & s3 = string()); /// show an alert message and strerror(errno) void err_alert(string const & s1, string const & s2 = string()); -/// ask a question +/// ask a question bool askQuestion(string const & s1, string const & s2 = string(), string const & s3 = string(), bool default_value = true); /// Returns 1 for yes, 2 for no, 3 for cancel. -int askConfirmation(string const & s1, string const & s2 = string(), +int askConfirmation(string const & s1, string const & s2 = string(), string const & s3 = string(), int default_value = 1); /// Asks for a text std::pair const -askForText(string const & msg, +askForText(string const & msg, string const & dflt = string()); } diff --git a/src/frontends/Alert_pimpl.h b/src/frontends/Alert_pimpl.h index cedbde7909..f771bbf7ec 100644 --- a/src/frontends/Alert_pimpl.h +++ b/src/frontends/Alert_pimpl.h @@ -7,7 +7,7 @@ */ #include "debug.h" - + // GUI-specific implementations void alert_pimpl(string const & s1, string const & s2, string const & s3); bool askQuestion_pimpl(string const & s1, string const & s2, string const & s3); diff --git a/src/frontends/ChangeLog b/src/frontends/ChangeLog index 2bd1a72a9a..b57884ea0f 100644 --- a/src/frontends/ChangeLog +++ b/src/frontends/ChangeLog @@ -1,5 +1,7 @@ 2002-03-21 Lars Gullik Bjønnes + * most files: ws cleanup + * Makefile.am: remove ld -r stuff 2002-03-20 Lars Gullik Bjønnes @@ -61,17 +63,17 @@ 2001-12-19 Jean-Marc Lasgouttes - * Timeout.h: + * Timeout.h: * FileDialog.h: do not include in header files. 2001-12-12 Angus Leeming * Alert.h: remove spurious semi-colon at the end of the namespace - scope. + scope. 2001-11-22 John Levon - * Makefile.am: + * Makefile.am: * Alert.h: * Alert.C: * Alert_pimpl.h: alerts etc. @@ -88,12 +90,12 @@ 2001-08-27 John Levon - * GUIRunTime.h: initApplication() should take a & to argc - + * GUIRunTime.h: initApplication() should take a & to argc + 2001-08-01 John Levon * Liason.C: IsDirWriteable changed - + 2001-07-30 Jean-Marc Lasgouttes * Liason.C: #include LAssert.h @@ -101,20 +103,20 @@ 2001-07-24 John Levon * Dialogs.h: add showThesaurus - + 2001-07-13 Edwin Leuven - + * Dialogs.h: add showAboutlyx and remove showCredits and Copyright 2001-07-13 Edwin Leuven * Dialogs.h: added showSpellchecker - + 2001-07-03 Jean-Marc Lasgouttes - * GUIRunTime.h: (x11Display): - (x11Screen): - (x11Colormap): + * GUIRunTime.h: (x11Display): + (x11Screen): + (x11Colormap): (x11VisualDepth): new methods 2001-07-03 Lars Gullik Bjønnes @@ -128,7 +130,7 @@ 2001-06-22 John Levon * Makefile.am: remove kde frontend - + 2001-06-15 Angus Leeming * Dialogs.h: removed unused signal showCharacter. @@ -201,7 +203,7 @@ * DialogBase.h: commented out abstract method show(). - * Dialogs.h: The dialogs are now stored as a + * Dialogs.h: The dialogs are now stored as a std::vector >. Removed using directives. (d-tor) removed. diff --git a/src/frontends/DialogBase.h b/src/frontends/DialogBase.h index 7637ab4ab4..b6227f6613 100644 --- a/src/frontends/DialogBase.h +++ b/src/frontends/DialogBase.h @@ -3,7 +3,7 @@ * Abstract base class of all dialogs. * Author: Allan Rae * This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * diff --git a/src/frontends/Dialogs.C b/src/frontends/Dialogs.C index 120c1ceb10..e26c29b736 100644 --- a/src/frontends/Dialogs.C +++ b/src/frontends/Dialogs.C @@ -1,8 +1,8 @@ /* This file is part of - * ====================================================== - * + * ====================================================== + * * LyX, The Document Processor - * + * * Copyright 1995 Matthias Ettrich * Copyright 1995-2001 The LyX Team. * diff --git a/src/frontends/Dialogs.h b/src/frontends/Dialogs.h index 84c1297abe..972c250955 100644 --- a/src/frontends/Dialogs.h +++ b/src/frontends/Dialogs.h @@ -77,10 +77,10 @@ public: //@{ /// Hide all visible dialogs SigC::Signal0 hideAll; - + /// Hide any dialogs that require a buffer for them to operate SigC::Signal0 hideBufferDependent; - + /** Update visible, buffer-dependent dialogs If the bool is true then a buffer change has occurred else its still the same buffer. @@ -112,7 +112,7 @@ public: /// SigC::Signal1 showError; /// show the external inset dialog - SigC::Signal1 showExternal; + SigC::Signal1 showExternal; /// show the contents of a file. SigC::Signal1 showFile; /// show all forked child processes @@ -129,8 +129,8 @@ public: SigC::Signal1 showInfo; /// show the LaTeX log or build file SigC::Signal0 showLogFile; - /// display the top-level maths panel - SigC::Signal0 showMathPanel; + /// display the top-level maths panel + SigC::Signal0 showMathPanel; /// SigC::Signal1 showMinipage; /// @@ -172,7 +172,7 @@ public: /// show the TexInfo SigC::Signal0 showTexinfo; /// show the thesaurus dialog - SigC::Signal1 showThesaurus; + SigC::Signal1 showThesaurus; /// SigC::Signal1 showTOC; /// diff --git a/src/frontends/FileDialog.h b/src/frontends/FileDialog.h index 6b1533be7c..38d6e396b0 100644 --- a/src/frontends/FileDialog.h +++ b/src/frontends/FileDialog.h @@ -57,14 +57,14 @@ public: kb_action a = LFUN_SELECT_FILE_SYNC, Button b1 = Button(string(), string()), Button b2 = Button(string(), string())); - + ~FileDialog(); /** * Choose a file for selection, starting in directory \param * path, with the file selection \param mask. The \param mask - * string is of the form : + * string is of the form : * * | * diff --git a/src/frontends/GUIRunTime.h b/src/frontends/GUIRunTime.h index 72221fed67..b6ac9fbf49 100644 --- a/src/frontends/GUIRunTime.h +++ b/src/frontends/GUIRunTime.h @@ -1,7 +1,7 @@ // -*- C++ -*- /* This file is part of * ====================================================== - * + * * LyX, The Document Processor * * Copyright 2000-2001 The LyX Team. @@ -24,7 +24,7 @@ class LyXView; */ class GUIRunTime { public: - /// initialise the toolkit + /// initialise the toolkit static int initApplication(int & argc, char * argv[]); /// process pending events @@ -59,6 +59,6 @@ public: int x11VisualDepth(); /// the server's DPI estimate static - float getScreenDPI(); + float getScreenDPI(); }; #endif diff --git a/src/frontends/Liason.C b/src/frontends/Liason.C index b1ae6425e3..ee8d456c83 100644 --- a/src/frontends/Liason.C +++ b/src/frontends/Liason.C @@ -1,8 +1,8 @@ /* This file is part of - * ====================================================== - * + * ====================================================== + * * LyX, The Document Processor - * + * * Copyright 1995 Matthias Ettrich * Copyright 1995-2001 The LyX Team. * @@ -45,10 +45,10 @@ PrinterParams getPrinterParams(Buffer * buffer) } -bool printBuffer(Buffer * buffer, PrinterParams const & pp) +bool printBuffer(Buffer * buffer, PrinterParams const & pp) { string command(lyxrc.print_command + ' '); - + if (pp.target == PrinterParams::PRINTER && lyxrc.print_adapt_output // dvips wants a printer name && !pp.printer_name.empty()) {// printer name given @@ -65,7 +65,7 @@ bool printBuffer(Buffer * buffer, PrinterParams const & pp) case PrinterParams::ODD: command += lyxrc.print_oddpage_flag + ' '; break; - + default: // only option left is print all of them break; diff --git a/src/frontends/Liason.h b/src/frontends/Liason.h index 4be47ca122..4f36465111 100644 --- a/src/frontends/Liason.h +++ b/src/frontends/Liason.h @@ -41,7 +41,7 @@ class BufferParams; until XTL and the compilers of the world are ready for something more elaborate. This is basically the Communicator class from the lyx cvs module all over again. - + Eventually, we will switch back to the XTL+LyXFunc combination that worked so nicely on a very small number of compilers and systems. See the "dialogbase" branch of lyx-devel cvs module for xtl implementation. @@ -59,7 +59,3 @@ namespace Liason { } // namespace Liason #endif - - - - diff --git a/src/frontends/Menubar.C b/src/frontends/Menubar.C index 5d22634219..156dd056df 100644 --- a/src/frontends/Menubar.C +++ b/src/frontends/Menubar.C @@ -1,6 +1,6 @@ /* This file is part of - * ====================================================== - * + * ====================================================== + * * LyX, The Document Processor * * Copyright 1995 Matthias Ettrich diff --git a/src/frontends/Menubar.h b/src/frontends/Menubar.h index c70b2d49c8..1c3341149c 100644 --- a/src/frontends/Menubar.h +++ b/src/frontends/Menubar.h @@ -1,7 +1,7 @@ // -*- C++ -*- /* This file is part of * ====================================================== - * + * * LyX, The Document Processor * Copyright 1995 Matthias Ettrich * Copyright 1995-2001 The LyX Team. @@ -24,7 +24,7 @@ class LyXView; class MenuBackend; /** The LyX GUI independent menubar class - The GUI interface is implemented in the corresponding Menubar_pimpl class. + The GUI interface is implemented in the corresponding Menubar_pimpl class. */ class Menubar { public: diff --git a/src/frontends/Toolbar.C b/src/frontends/Toolbar.C index dc1237a6f7..a01dcc314a 100644 --- a/src/frontends/Toolbar.C +++ b/src/frontends/Toolbar.C @@ -1,6 +1,6 @@ /* This file is part of - * ====================================================== - * + * ====================================================== + * * LyX, The Document Processor * * Copyright 1995 Matthias Ettrich @@ -87,7 +87,7 @@ void Toolbar::updateLayoutList(bool force) pimpl_->updateLayoutList(force); } - + void Toolbar::openLayoutList() { pimpl_->openLayoutList(); @@ -112,7 +112,7 @@ void Toolbar::add(string const & func, bool doclean) if (tf == -1) { lyxerr << "Toolbar::add: no LyX command called`" - << func << "'exists!" << endl; + << func << "'exists!" << endl; } else { pimpl_->add(tf, doclean); } diff --git a/src/frontends/Toolbar.h b/src/frontends/Toolbar.h index b4e398ef6c..0f15083bc0 100644 --- a/src/frontends/Toolbar.h +++ b/src/frontends/Toolbar.h @@ -1,7 +1,7 @@ // -*- C++ -*- /* This file is part of * ====================================================== - * + * * LyX, The Document Processor * Copyright 1995 Matthias Ettrich * Copyright 1995-2001 The LyX Team. @@ -24,7 +24,7 @@ class LyXView; class ToolbarDefaults; /** The LyX GUI independent toolbar class - The GUI interface is implemented in the corresponding Toolbar_pimpl class. + The GUI interface is implemented in the corresponding Toolbar_pimpl class. */ class Toolbar { public: @@ -33,7 +33,7 @@ public: /// ~Toolbar(); - + /// (re)sets the toolbar void set(bool doingmain = false); @@ -41,15 +41,15 @@ public: frame, where you can change the toolbar realtime. */ void edit(); /// add a new button to the toolbar. - void add(int , bool doclean = true); + void add(int , bool doclean = true); /// name of func instead of kb_action void add(string const & , bool doclean = true); /// invokes the n'th icon in the toolbar void push(int); /// activates the toolbar - void activate(); + void activate(); /// deactivates the toolbar - void deactivate(); + void deactivate(); /// update the state of the icons void update(); diff --git a/src/frontends/controllers/ButtonController.h b/src/frontends/controllers/ButtonController.h index 43f7b041a6..f1f50ef57b 100644 --- a/src/frontends/controllers/ButtonController.h +++ b/src/frontends/controllers/ButtonController.h @@ -29,11 +29,11 @@ public: /// GuiBC(string const & cancel, string const & close); - /// + /// void setOK(Button * obj) { okay_ = obj; } - /// + /// void setApply(Button * obj) { apply_ = obj; } - /// + /// void setCancel(Button * obj) { cancel_ = obj; } /// void setRestore(Button * obj) { restore_ = obj; } @@ -59,7 +59,7 @@ private: Button * apply_; Button * cancel_; Button * restore_; - + typedef std::list Widgets; Widgets read_only_; }; diff --git a/src/frontends/controllers/ButtonControllerBase.C b/src/frontends/controllers/ButtonControllerBase.C index 551c26e5a1..43c84e2273 100644 --- a/src/frontends/controllers/ButtonControllerBase.C +++ b/src/frontends/controllers/ButtonControllerBase.C @@ -1,5 +1,5 @@ /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * @@ -18,7 +18,7 @@ #include #include "ButtonControllerBase.h" #include "support/LAssert.h" -#include "debug.h" +#include "debug.h" ButtonControllerBase::ButtonControllerBase(string const & cancel, @@ -84,7 +84,7 @@ void ButtonControllerBase::invalid() bool ButtonControllerBase::readOnly(bool ro) { lyxerr[Debug::GUI] << "Setting controller ro: " << ro << std::endl; - + if (ro) { bp().input(ButtonPolicy::SMI_READ_ONLY); } else { diff --git a/src/frontends/controllers/ButtonControllerBase.h b/src/frontends/controllers/ButtonControllerBase.h index 5d4b876413..29cd424660 100644 --- a/src/frontends/controllers/ButtonControllerBase.h +++ b/src/frontends/controllers/ButtonControllerBase.h @@ -1,6 +1,6 @@ // -*- C++ -*- /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * @@ -78,7 +78,7 @@ protected: /// string cancel_label_; /// - string close_label_; + string close_label_; }; #endif // BUTTONCONTROLLERBASE_H diff --git a/src/frontends/controllers/ButtonPolicies.C b/src/frontends/controllers/ButtonPolicies.C index a1510d6327..5193bce658 100644 --- a/src/frontends/controllers/ButtonPolicies.C +++ b/src/frontends/controllers/ButtonPolicies.C @@ -38,7 +38,7 @@ void nextState(ButtonPolicy::State & state, lyxerr[Debug::GUI] << "Transition from state " << state << " to state " << tmp << " after input " << in << std::endl; - + if (ButtonPolicy::BOGUS != tmp) { state = tmp; } else { @@ -112,7 +112,7 @@ void PreferencesPolicy::input(SMInput input) //lyxerr << "PreferencesPolicy::input" << endl; // CANCEL and HIDE always take us to INITIAL for all cases. // Note that I didn't put that special case in the helper function - // because it doesn't belong there. Some other + // because it doesn't belong there. Some other // This is probably optimising for the wrong case since it occurs as the // dialog will be hidden. It would have saved a little memory in the // state machine if I could have gotten map working. ARRae 20000813 @@ -172,7 +172,7 @@ OkCancelPolicy::OkCancelPolicy() void OkCancelPolicy::input(SMInput input) { //lyxerr << "OkCancelPolicy::input" << endl; - + // CANCEL and HIDE always take us to INITIAL for all cases if (SMI_CANCEL == input || SMI_HIDE == input) { @@ -246,7 +246,7 @@ OkCancelReadOnlyPolicy::OkCancelReadOnlyPolicy() void OkCancelReadOnlyPolicy::input(SMInput input) { //lyxerr << "OkCancelReadOnlyPolicy::input" << endl; - + // CANCEL and HIDE always take us to INITIAL for all cases if (SMI_CANCEL == input || SMI_HIDE == input) { @@ -324,7 +324,7 @@ NoRepeatedApplyReadOnlyPolicy::NoRepeatedApplyReadOnlyPolicy() void NoRepeatedApplyReadOnlyPolicy::input(SMInput input) { //lyxerr << "NoReapeatedApplyReadOnlyPolicy::input" << endl; - + // CANCEL and HIDE always take us to INITIAL for all cases if (SMI_CANCEL == input || SMI_HIDE == input) { @@ -416,7 +416,7 @@ OkApplyCancelReadOnlyPolicy::OkApplyCancelReadOnlyPolicy() void OkApplyCancelReadOnlyPolicy::input(SMInput input) { //lyxerr << "OkApplyCancelReadOnlyPolicy::input" << endl; - + // CANCEL and HIDE always take us to INITIAL for all cases if (SMI_CANCEL == input || SMI_HIDE == input) { @@ -482,7 +482,7 @@ OkApplyCancelPolicy::OkApplyCancelPolicy() void OkApplyCancelPolicy::input(SMInput input) { //lyxerr << "OkApplyCancelPolicy::input" << endl; - + // CANCEL and HIDE always take us to INITIAL for all cases if (SMI_CANCEL == input || SMI_HIDE == input) { @@ -540,7 +540,7 @@ NoRepeatedApplyPolicy::NoRepeatedApplyPolicy() void NoRepeatedApplyPolicy::input(SMInput input) { //lyxerr << "NoRepeatedApplyPolicy::input" << endl; - + // CANCEL and HIDE always take us to INITIAL for all cases if (SMI_CANCEL == input || SMI_HIDE == input) { diff --git a/src/frontends/controllers/ButtonPolicies.h b/src/frontends/controllers/ButtonPolicies.h index 654f78049f..23b3bae608 100644 --- a/src/frontends/controllers/ButtonPolicies.h +++ b/src/frontends/controllers/ButtonPolicies.h @@ -98,7 +98,7 @@ public: /// BOGUS = 55 }; - + /// The various button types. enum Button { /// @@ -115,7 +115,7 @@ public: /// static const Button ALL_BUTTONS = Button(OKAY | APPLY | CANCEL | RESTORE); - + /** State machine inputs. All the policies so far have both CANCEL and HIDE always going to INITIAL. This won't necessarily be true for all [future] policies @@ -131,7 +131,7 @@ public: SMI_INVALID, /// an apply-and-hide action has happened SMI_OKAY, - /// an apply action has happened + /// an apply action has happened SMI_APPLY, /// a cancel action has happened SMI_CANCEL, @@ -143,7 +143,7 @@ public: SMI_READ_ONLY, /// the dialog contents can be modified SMI_READ_WRITE, - /// the state of the dialog contents has not changed + /// the state of the dialog contents has not changed SMI_NOOP, /// for internal use SMI_TOTAL @@ -195,7 +195,7 @@ public: OkCancelPolicy(); /// //virtual ~OkCancelPolicy() {} - + /// Trigger a transition with this input. virtual void input(SMInput); /** Activation status of a button. @@ -238,7 +238,7 @@ public: OkCancelReadOnlyPolicy(); /// //virtual ~OkCancelReadOnlyPolicy() {} - + /// Trigger a transition with this input. virtual void input(SMInput); /// Activation status of a button. @@ -284,7 +284,7 @@ public: NoRepeatedApplyReadOnlyPolicy(); /// //virtual ~NoRepeatedApplyReadOnlyPolicy() {} - + /// Trigger a transition with this input. virtual void input(SMInput); /// Activation status of a button. @@ -327,7 +327,7 @@ public: OkApplyCancelReadOnlyPolicy(); /// //virtual ~OkApplyCancelReadOnlyPolicy() {} - + /// Trigger a transition with this input. virtual void input(SMInput); /// Activation status of a button. @@ -363,7 +363,7 @@ public: OkApplyCancelPolicy(); /// //virtual ~OkApplyCancelPolicy() {} - + /// Trigger a transition with this input. virtual void input(SMInput); /// Activation status of a button. @@ -396,7 +396,7 @@ public: NoRepeatedApplyPolicy(); /// //virtual ~NoRepeatedApplyPolicy() {} - + /// Trigger a transition with this input. virtual void input(SMInput); /// Activation status of a button. @@ -430,7 +430,7 @@ public: PreferencesPolicy(); /// //virtual ~PreferencesPolicy() {} - + /// Trigger a transition with this input. virtual void input(SMInput); /// Activation status of a button. @@ -460,7 +460,7 @@ private: class IgnorantPolicy : public ButtonPolicy { public: //virtual ~IgnorantPolicy() {} - + /// Trigger a transition with this input. virtual void input(SMInput) {} /// Activation status of a button. diff --git a/src/frontends/controllers/ChangeLog b/src/frontends/controllers/ChangeLog index 5552ab8e8b..6a3423d8a9 100644 --- a/src/frontends/controllers/ChangeLog +++ b/src/frontends/controllers/ChangeLog @@ -1,3 +1,7 @@ +2002-03-21 Lars Gullik Bjønnes + + * most files: ws cleanup + 2002-03-18 Angus Leeming * biblio.C (getInfo): string::c_str() never returns NULL. Don't test @@ -7,7 +11,7 @@ * ControlGraphics.C: * ControlInclude.C: better error messages - + 2002-03-11 Herbert Voss * biblio.C (parseBibTeX): fix another minibug with an @@ -20,7 +24,7 @@ 2002-03-09 Herbert Voss - * ControlGraphics.[Ch]: adding checkFilename() for testing + * ControlGraphics.[Ch]: adding checkFilename() for testing of non-existing files 2002-03-07 Lars Gullik Bjønnes @@ -35,7 +39,7 @@ 2002-03-05 Herbert Voss * biblio.C (getInfo): simplify if using paragraph layout - "bibliography". + "bibliography". 2002-03-05 Angus Leeming @@ -80,7 +84,7 @@ * ControlGraphics.C: remove #include "support/syscall.h" as it's not used. - * ControlTexinfo.C: + * ControlTexinfo.C: change Systemcalls::System to Systemcalls::Wait and No change of functionality, just reflects the stripped down Systemcalls class. @@ -105,7 +109,7 @@ * ControlSpellchecker.C: clear any selection left (bug #211) - + 2002-02-01 Herbert Voss * ControlGraphics.[C] (readBB): search only, if it is a @@ -153,7 +157,7 @@ * biblio.C (getInfo): fix bug when no author is given - * biblio.C (parseBibTeX): change the parsing, so that + * biblio.C (parseBibTeX): change the parsing, so that '#'-characters in a bibtex entry are no more a problem. 2002-01-19 Jean-Marc Lasgouttes @@ -233,7 +237,7 @@ Rename ControlDialogs.h as ControlDialog.h. Add ButtonController.tmpl ControlDialog.tmpl ControlInset.tmpl to EXTRA_DIST. - + 2002-01-15 Angus Leeming * ControlInset.h (apply): fix bug unearthed by Michael Koziarski. @@ -259,15 +263,15 @@ * helper_funcs.h (browseFile): add default empty button descriptions. - * ControlGraphics.C (Browse): - * ControlBibtex.C (Browse): + * ControlGraphics.C (Browse): + * ControlBibtex.C (Browse): * ControlInclude.C (Browse): add shortcuts to directory buttons 2002-01-12 John Levon * ControlThesaurus.h: * ControlThesaurus.C: update to Aiksaurus 0.14 - + 2002-01-07 Angus Leeming * ControlSpellchecker.C (clearParams): show the closing message @@ -286,11 +290,11 @@ 2001-11-04 John Levon * ControlToc.C: changes for floatlist - + 2001-11-04 John Levon * ControlVCLog.C: use _() - + 2001-10-23 Jean-Marc Lasgouttes * ControlSpellchecker.C: include since FreeBSD needs @@ -316,7 +320,7 @@ * ControlTexinfo.C: new path for the shellscript TeXFiles.sh and some more stuff from FormTexinfo.C - + * ControlShowFile.C: hiding the update-button 2001-10-09 Herbert Voss @@ -428,16 +432,16 @@ * ControlDialogs.h: remove bc() hack, now fixed in Qt2 frontend. use member dialog_built_ instead of shared static. - - * ButtonController.h: + + * ButtonController.h: * ButtonPolicies.C: more debug info - + * ButtonControllerBase.C: call refresh() when setting readOnly ! - + * GUI.h: External form has apply, use the right policy * character.C: fix two off-by-one errors when latex font was removed - + 2001-08-15 Angus Leeming * ControlInset.h (apply): tentative fix for the press Apply multiple @@ -447,11 +451,11 @@ * ControlCharacter.C: fix typo - * ViewBase.h: + * ViewBase.h: * ControlDialogs.C: * ControlInsets.C: make sure dialog is built before it is shown, so it works properly the very first time it is shown - + 2001-08-20 Herbert Voss * ControlBibtex.[Ch]: enhanced bibtex-data gui to browse for databases @@ -472,7 +476,7 @@ 2001-08-09 Allan Rae - * Makefile.am (SUBDIRS, dist-hook): remove bogus entries. + * Makefile.am (SUBDIRS, dist-hook): remove bogus entries. 2001-08-07 Angus Leeming @@ -532,7 +536,7 @@ * ControlInclude.h: * ControlInclude.C: implement ability to load file - + 2001-07-18 Juergen Vigna * ControlSearch.C (replace): changes to lyxfind.h function calls. @@ -568,7 +572,7 @@ 2001-07-17 Edwin Leuven * ControlSpellchecker.[Ch]: remove member quit() and some cleaning - + 2001-07-16 Juergen Vigna * ControlSpellchecker.C (show): use the lyxrc.use_pspell flag (if @@ -590,7 +594,7 @@ 2001-07-13 Jean-Marc Lasgouttes - * ControlSpellchecker.C (getSuggestion): + * ControlSpellchecker.C (getSuggestion): (getWord): add std:: qualifier 2001-07-13 Edwin Leuven @@ -598,7 +602,7 @@ * ControlSpellchecker.[Ch]: added * ViewBase.h: added partialUpdate(int) member * GUI.h: added spell stuff - + 2001-07-12 Lars Gullik Bjønnes * ControlExternal.C: (*it). -> it-> @@ -698,11 +702,11 @@ 2001-04-17 Lars Gullik Bjønnes * ButtonControllerBase.h: C++ mode, inherit privately from - noncopyable + noncopyable * ButtonPolicies.h: ditto * ButtonController.h: C++ mode, swap init order of restore_ and - cancel_ + cancel_ 2001-04-06 John Levon @@ -724,16 +728,16 @@ 2001-04-05 Jean-Marc Lasgouttes - * ControlToc.C: - * ControlSearch.C: - * ControlPrint.C: - * ControlPreamble.C: - * ControlInclude.C: - * ControlGraphics.C: - * ControlExternal.C: + * ControlToc.C: + * ControlSearch.C: + * ControlPrint.C: + * ControlPreamble.C: + * ControlInclude.C: + * ControlGraphics.C: + * ControlExternal.C: * ControlCopyright.C: include gettext.h - * ControlCharacter.C: + * ControlCharacter.C: * character.C: include gettext.h and language.h 2001-04-03 John Levon @@ -779,7 +783,7 @@ * ViewBase.h: * ControlConnections.h: associated change in #include and class names. - + * ControlExternal.[Ch]: new files; a controller for the External Material popup. @@ -931,7 +935,7 @@ 2001-03-23 Jean-Marc Lasgouttes * ControlCredits.C (getCredits): remove std:: qualifier for - getline(). + getline(). 2001-03-23 Lars Gullik Bjønnes @@ -1052,9 +1056,9 @@ * ControlCommand.h (c-tor): give kb_action a default value of LFUN_NOACTION. - + * ControlCommand.C (apply): do nothing if kb_action is LFUN_NOACTION. - + * ControlCitation.[Ch]: moved search functions out of class. (bibkeysInfo): new method. Returns const reference to private data. (searchKeys): added case-sensitive switch. Used only by simpleSearch @@ -1115,7 +1119,7 @@ * ControlCitation.h: the templatised class GUICitation instantiates the methods view() and bc(). It also stores the instances of the View and ButtonController. - + 2001-02-23 Angus Leeming * ButtonControllerBase.[Ch]: renamed as ButtonController.[Ch]. Class diff --git a/src/frontends/controllers/ControlAboutlyx.C b/src/frontends/controllers/ControlAboutlyx.C index 845cca1b82..eee683f365 100644 --- a/src/frontends/controllers/ControlAboutlyx.C +++ b/src/frontends/controllers/ControlAboutlyx.C @@ -92,6 +92,6 @@ string const ControlAboutlyx::getVersion() const << "\n" << _("User directory: ") << MakeDisplayPath(user_lyxdir); - + return ss.str().c_str(); } diff --git a/src/frontends/controllers/ControlAboutlyx.h b/src/frontends/controllers/ControlAboutlyx.h index 3f0b33b720..83b1d6ecd5 100644 --- a/src/frontends/controllers/ControlAboutlyx.h +++ b/src/frontends/controllers/ControlAboutlyx.h @@ -28,7 +28,7 @@ public: /// stringstream & getCredits(stringstream &) const; - + /// string const getCopyright() const; @@ -40,7 +40,7 @@ public: /// string const getVersion() const; - + private: /// not needed. @@ -48,4 +48,3 @@ private: }; #endif // CONTROLABOUTLYX_H - diff --git a/src/frontends/controllers/ControlBibitem.C b/src/frontends/controllers/ControlBibitem.C index 2f57feb387..b1e2b884b5 100644 --- a/src/frontends/controllers/ControlBibitem.C +++ b/src/frontends/controllers/ControlBibitem.C @@ -1,5 +1,5 @@ /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * diff --git a/src/frontends/controllers/ControlBibitem.h b/src/frontends/controllers/ControlBibitem.h index 0b0d94b6c1..6800fac8ba 100644 --- a/src/frontends/controllers/ControlBibitem.h +++ b/src/frontends/controllers/ControlBibitem.h @@ -1,6 +1,6 @@ // -*- C++ -*- /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * diff --git a/src/frontends/controllers/ControlBibtex.C b/src/frontends/controllers/ControlBibtex.C index 3ac31c5ce9..0175c942a3 100644 --- a/src/frontends/controllers/ControlBibtex.C +++ b/src/frontends/controllers/ControlBibtex.C @@ -1,5 +1,5 @@ /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * @@ -61,8 +61,8 @@ void ControlBibtex::applyParamsNoInset() {} -string const ControlBibtex::Browse(string const & in_name, - string const & title, +string const ControlBibtex::Browse(string const & in_name, + string const & title, string const & pattern) { pair dir1(N_("Documents|#o#O"), string(lyxrc.document_path)); diff --git a/src/frontends/controllers/ControlBibtex.h b/src/frontends/controllers/ControlBibtex.h index d107098e89..2778d6701b 100644 --- a/src/frontends/controllers/ControlBibtex.h +++ b/src/frontends/controllers/ControlBibtex.h @@ -1,6 +1,6 @@ // -*- C++ -*- /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * @@ -31,11 +31,11 @@ public: ControlBibtex(LyXView &, Dialogs &); /// Browse for a file string const Browse(string const &, string const &, string const &); - + private: /// Dispatch the changed parameters to the kernel. virtual void applyParamsToInset(); - /// + /// virtual void applyParamsNoInset(); }; diff --git a/src/frontends/controllers/ControlButtons.C b/src/frontends/controllers/ControlButtons.C index 77af841914..4b9560acb3 100644 --- a/src/frontends/controllers/ControlButtons.C +++ b/src/frontends/controllers/ControlButtons.C @@ -1,5 +1,5 @@ /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * @@ -60,5 +60,5 @@ void ControlButtons::RestoreButton() bool ControlButtons::IconifyWithMain() const { - return lyxrc.dialogs_iconify_with_main; + return lyxrc.dialogs_iconify_with_main; } diff --git a/src/frontends/controllers/ControlButtons.h b/src/frontends/controllers/ControlButtons.h index e59504f4a2..53264ee2c0 100644 --- a/src/frontends/controllers/ControlButtons.h +++ b/src/frontends/controllers/ControlButtons.h @@ -1,6 +1,6 @@ // -*- C++ -*- /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * @@ -89,7 +89,7 @@ protected: private: /// bool is_closing_; - + }; #endif // CONTROLBUTTONS_H diff --git a/src/frontends/controllers/ControlCitation.C b/src/frontends/controllers/ControlCitation.C index 89716acf3b..d7852e334d 100644 --- a/src/frontends/controllers/ControlCitation.C +++ b/src/frontends/controllers/ControlCitation.C @@ -1,5 +1,5 @@ /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * diff --git a/src/frontends/controllers/ControlCitation.h b/src/frontends/controllers/ControlCitation.h index c0d26e7456..14387a2194 100644 --- a/src/frontends/controllers/ControlCitation.h +++ b/src/frontends/controllers/ControlCitation.h @@ -1,6 +1,6 @@ // -*- C++ -*- /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * @@ -45,7 +45,7 @@ public: private: /// create the InfoMap of keys and data virtual void setDaughterParams(); - /// + /// virtual void clearDaughterParams(); /** disconnect from the inset when the Apply button is pressed. diff --git a/src/frontends/controllers/ControlCommand.C b/src/frontends/controllers/ControlCommand.C index 8d76de20d7..35226c7c53 100644 --- a/src/frontends/controllers/ControlCommand.C +++ b/src/frontends/controllers/ControlCommand.C @@ -1,5 +1,5 @@ /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * @@ -59,4 +59,3 @@ void ControlCommand::applyParamsNoInset() if (action_ == LFUN_NOACTION) return; lv_.getLyXFunc()->dispatch(action_, params().getAsString()); } - diff --git a/src/frontends/controllers/ControlCommand.h b/src/frontends/controllers/ControlCommand.h index 709c73fbb1..c77205c9bf 100644 --- a/src/frontends/controllers/ControlCommand.h +++ b/src/frontends/controllers/ControlCommand.h @@ -1,6 +1,6 @@ // -*- C++ -*- /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * @@ -17,7 +17,7 @@ * The class is likely to be changed as other Inset controllers are created * and it becomes clear just what functionality can be moved back into * ControlInset. - * + * */ #ifndef CONTROLCOMMAND_H @@ -31,7 +31,7 @@ #include "insets/insetcommand.h" #include "commandtags.h" // kb_action -/** The Inset dialog controller. Connects/disconnects signals, launches +/** The Inset dialog controller. Connects/disconnects signals, launches GUI-dependent View and returns the output from this View to the kernel. */ class ControlCommand : public ControlInset @@ -43,7 +43,7 @@ public: private: /// Dispatch the changed parameters to the kernel. virtual void applyParamsToInset(); - /// + /// virtual void applyParamsNoInset(); /// get the parameters from the string passed to createInset. virtual InsetCommandParams const getParams(string const &); diff --git a/src/frontends/controllers/ControlConnections.C b/src/frontends/controllers/ControlConnections.C index 5a207f588e..ca90b5ee77 100644 --- a/src/frontends/controllers/ControlConnections.C +++ b/src/frontends/controllers/ControlConnections.C @@ -1,5 +1,5 @@ /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * @@ -75,7 +75,7 @@ ControlConnectBase::DocTypes ControlConnectBase::docType() const ControlConnectBI::ControlConnectBI(LyXView & lv, Dialogs & d) - : ControlConnectBase(lv, d) + : ControlConnectBase(lv, d) {} diff --git a/src/frontends/controllers/ControlConnections.h b/src/frontends/controllers/ControlConnections.h index ca27eeed33..1967bb8e66 100644 --- a/src/frontends/controllers/ControlConnections.h +++ b/src/frontends/controllers/ControlConnections.h @@ -1,6 +1,6 @@ // -*- C++ -*- /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * @@ -62,7 +62,7 @@ public: ControlConnectBase(LyXView &, Dialogs &); /// The View may need to know if the buffer is read-only. bool isReadonly() const; - /// + /// DocTypes docType() const; protected: @@ -99,8 +99,8 @@ protected: class ControlConnectBI : public ControlConnectBase { public: - /// - ControlConnectBI(LyXView &, Dialogs &); + /// + ControlConnectBI(LyXView &, Dialogs &); protected: /// diff --git a/src/frontends/controllers/ControlDialog.h b/src/frontends/controllers/ControlDialog.h index 183a13252b..a2cbfd0fbd 100644 --- a/src/frontends/controllers/ControlDialog.h +++ b/src/frontends/controllers/ControlDialog.h @@ -7,8 +7,8 @@ * \author Angus Leeming * * ControlDialog is to be used as a parent class for dialogs that are not - * views onto parameters of insets. (An ugly description I know, but I hope - * the meaning is clear! Can anyone do any better?) Examples would be the + * views onto parameters of insets. (An ugly description I know, but I hope + * the meaning is clear! Can anyone do any better?) Examples would be the * Document and Paragraph dialogs. */ diff --git a/src/frontends/controllers/ControlDialog_impl.h b/src/frontends/controllers/ControlDialog_impl.h index 5bc16cd87f..83464908a3 100644 --- a/src/frontends/controllers/ControlDialog_impl.h +++ b/src/frontends/controllers/ControlDialog_impl.h @@ -20,7 +20,7 @@ class Dialogs; class LyXView; -class ControlDialogBD : public ControlDialog +class ControlDialogBD : public ControlDialog { public: /// diff --git a/src/frontends/controllers/ControlERT.C b/src/frontends/controllers/ControlERT.C index f224530dc8..6115604b9a 100644 --- a/src/frontends/controllers/ControlERT.C +++ b/src/frontends/controllers/ControlERT.C @@ -1,5 +1,5 @@ /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * diff --git a/src/frontends/controllers/ControlERT.h b/src/frontends/controllers/ControlERT.h index 37c9314a8e..d223bb5328 100644 --- a/src/frontends/controllers/ControlERT.h +++ b/src/frontends/controllers/ControlERT.h @@ -1,9 +1,9 @@ // -*- C++ -*- /* This file is part of * ====================================================== - * + * * LyX, The Document Processor - * + * * Copyright 2001 The LyX Team. * *====================================================== @@ -54,7 +54,7 @@ public: private: /// Dispatch the changed parameters to the kernel. virtual void applyParamsToInset(); - /// + /// virtual void applyParamsNoInset(); /// get the parameters from the string passed to createInset. virtual ERTParams const getParams(string const &) diff --git a/src/frontends/controllers/ControlError.C b/src/frontends/controllers/ControlError.C index 4720ff5495..d6c94ea769 100644 --- a/src/frontends/controllers/ControlError.C +++ b/src/frontends/controllers/ControlError.C @@ -1,5 +1,5 @@ /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * @@ -38,4 +38,3 @@ string const ControlError::getParams(InsetError const & inset) { return inset.getContents(); } - diff --git a/src/frontends/controllers/ControlError.h b/src/frontends/controllers/ControlError.h index c4505a1f9b..ee47576a06 100644 --- a/src/frontends/controllers/ControlError.h +++ b/src/frontends/controllers/ControlError.h @@ -2,7 +2,7 @@ /* * \file ControlError.h * This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * @@ -35,7 +35,7 @@ public: private: /// not needed. virtual void applyParamsToInset() {} - /// + /// virtual void applyParamsNoInset() {} /// get the parameters from the string passed to createInset. virtual string const getParams(string const &) { return string(); } diff --git a/src/frontends/controllers/ControlExternal.C b/src/frontends/controllers/ControlExternal.C index 0c7afb7fe2..e55f1b8a22 100644 --- a/src/frontends/controllers/ControlExternal.C +++ b/src/frontends/controllers/ControlExternal.C @@ -1,5 +1,5 @@ /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * @@ -53,7 +53,7 @@ InsetExternal::Params const ControlExternal::getParams(string const &) return InsetExternal::Params(); } -InsetExternal::Params const +InsetExternal::Params const ControlExternal::getParams(InsetExternal const & inset) { return inset.params(); diff --git a/src/frontends/controllers/ControlExternal.h b/src/frontends/controllers/ControlExternal.h index d40228960c..f57fe01c5d 100644 --- a/src/frontends/controllers/ControlExternal.h +++ b/src/frontends/controllers/ControlExternal.h @@ -1,6 +1,6 @@ // -*- C++ -*- /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * @@ -25,7 +25,7 @@ #include "insets/insetexternal.h" /** A controller for External dialogs. - */ + */ class ControlExternal : public ControlInset { @@ -49,7 +49,7 @@ public: string const Browse(string const &) const; private: - /// + /// virtual void applyParamsToInset(); /// not needed. virtual void applyParamsNoInset() {} diff --git a/src/frontends/controllers/ControlFloat.C b/src/frontends/controllers/ControlFloat.C index fd700ae35c..64f22fde39 100644 --- a/src/frontends/controllers/ControlFloat.C +++ b/src/frontends/controllers/ControlFloat.C @@ -1,5 +1,5 @@ /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * @@ -64,6 +64,6 @@ FloatParams::FloatParams() FloatParams::FloatParams(InsetFloat const & inset) - : placement(inset.placement()), + : placement(inset.placement()), allow_here_definitely(!inset.wide()) {} diff --git a/src/frontends/controllers/ControlFloat.h b/src/frontends/controllers/ControlFloat.h index 63083eb641..cf93d6fe16 100644 --- a/src/frontends/controllers/ControlFloat.h +++ b/src/frontends/controllers/ControlFloat.h @@ -1,9 +1,9 @@ // -*- C++ -*- /* This file is part of * ====================================================== - * + * * LyX, The Document Processor - * + * * Copyright 2001 The LyX Team. * *====================================================== @@ -38,14 +38,14 @@ struct FloatParams { inline -bool operator==(FloatParams const & p1, FloatParams const & p2) +bool operator==(FloatParams const & p1, FloatParams const & p2) { return p1.placement == p2.placement && p1.allow_here_definitely == p2.allow_here_definitely; } inline -bool operator!=(FloatParams const & p1, FloatParams const & p2) +bool operator!=(FloatParams const & p1, FloatParams const & p2) { return !(p1 == p2); } @@ -60,7 +60,7 @@ public: private: /// Dispatch the changed parameters to the kernel. virtual void applyParamsToInset(); - /// + /// virtual void applyParamsNoInset(); /// get the parameters from the string passed to createInset. virtual FloatParams const getParams(string const &) diff --git a/src/frontends/controllers/ControlForks.C b/src/frontends/controllers/ControlForks.C index d90b7a1d28..4ffbfb82bc 100644 --- a/src/frontends/controllers/ControlForks.C +++ b/src/frontends/controllers/ControlForks.C @@ -1,4 +1,4 @@ -/** +/** * \file ControlForks.C * Copyright 2001 The LyX Team * Read COPYING @@ -93,4 +93,3 @@ void ControlForks::clearParams() pids_.clear(); childrenChanged_.disconnect(); } - diff --git a/src/frontends/controllers/ControlForks.h b/src/frontends/controllers/ControlForks.h index 46de1853d3..51ea5f5428 100644 --- a/src/frontends/controllers/ControlForks.h +++ b/src/frontends/controllers/ControlForks.h @@ -1,5 +1,5 @@ // -*- C++ -*- -/** +/** * \file ControlForks.h * Copyright 2001 The LyX Team * Read COPYING diff --git a/src/frontends/controllers/ControlGraphics.C b/src/frontends/controllers/ControlGraphics.C index bdca7e6229..c488988803 100644 --- a/src/frontends/controllers/ControlGraphics.C +++ b/src/frontends/controllers/ControlGraphics.C @@ -1,5 +1,5 @@ /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * @@ -12,12 +12,12 @@ * \author Herbert Voss */ -#include +#include #include #ifdef __GNUG__ #pragma implementation -#endif +#endif #include "ViewBase.h" #include "ButtonControllerBase.h" @@ -81,41 +81,41 @@ void ControlGraphics::applyParamsNoInset() // We need these in the file browser. extern string system_lyxdir; extern string user_lyxdir; - + string const ControlGraphics::Browse(string const & in_name) { string const title = N_("Select graphics file"); - // FIXME: currently we need the second '|' to prevent mis-interpretation + // FIXME: currently we need the second '|' to prevent mis-interpretation string const pattern = "*.(ps|eps|png|jpeg|jpg|gif|gz)|"; - // Does user clipart directory exist? - string clipdir = AddName (user_lyxdir, "clipart"); - FileInfo fileInfo(clipdir); - if (!(fileInfo.isOK() && fileInfo.isDir())) - // No - bail out to system clipart directory - clipdir = AddName (system_lyxdir, "clipart"); + // Does user clipart directory exist? + string clipdir = AddName (user_lyxdir, "clipart"); + FileInfo fileInfo(clipdir); + if (!(fileInfo.isOK() && fileInfo.isDir())) + // No - bail out to system clipart directory + clipdir = AddName (system_lyxdir, "clipart"); pair dir1(N_("Clipart|#C#c"), clipdir); pair dir2(N_("Documents|#o#O"), string(lyxrc.document_path)); // Show the file browser dialog return browseFile(&lv_, in_name, title, pattern, dir1, dir2); } - + string const ControlGraphics::readBB(string const & file) { // in a file it's an entry like %%BoundingBox:23 45 321 345 // the first number can following without a space, so we have -// to check a bit more. +// to check a bit more. // on the other hand some plot programs write the bb at the // end of the file. Than we have in the header a -// %%BoundingBox: (atend) +// %%BoundingBox: (atend) // In this case we must check until the end. string file_ = file; if (zippedFile(file_)) file_ = unzipFile(file_); std::ifstream is(file_.c_str()); - if (!contains(getExtFromContents(file_),"ps")) // bb exists? + if (!contains(getExtFromContents(file_),"ps")) // bb exists? return string(); while (is) { string s; @@ -124,7 +124,7 @@ string const ControlGraphics::readBB(string const & file) string a, b, c, d; is >> a >> b >> c >> d; if (is && !contains(a,"atend")) { // bb at the end? - if (s != "%%BoundingBox:") + if (s != "%%BoundingBox:") return (s.substr(14)+" "+a+" "+b+" "+c+" "); else return (a+" "+b+" "+c+" "+d+" "); diff --git a/src/frontends/controllers/ControlGraphics.h b/src/frontends/controllers/ControlGraphics.h index 8b760701d0..f9c2cc74fc 100644 --- a/src/frontends/controllers/ControlGraphics.h +++ b/src/frontends/controllers/ControlGraphics.h @@ -1,6 +1,6 @@ // -*- C++ -*- /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * @@ -18,7 +18,7 @@ #ifdef __GNUG__ #pragma interface -#endif +#endif #include "ControlInset.h" @@ -45,7 +45,7 @@ public: private: /// Dispatch the changed parameters to the kernel. virtual void applyParamsToInset(); - /// + /// virtual void applyParamsNoInset(); /// get the parameters from the string passed to createInset. virtual InsetGraphicsParams const getParams(string const &); @@ -54,4 +54,3 @@ private: }; #endif // CONTROLGRAPHICS_H - diff --git a/src/frontends/controllers/ControlInclude.C b/src/frontends/controllers/ControlInclude.C index 3d0806a367..a9134e0fbf 100644 --- a/src/frontends/controllers/ControlInclude.C +++ b/src/frontends/controllers/ControlInclude.C @@ -53,7 +53,7 @@ string const ControlInclude::Browse(string const & in_name, Type in_type) string const title = _("Select document to include"); // input TeX, verbatim, or LyX file ? - string pattern; + string pattern; switch (in_type) { case INPUT: pattern = _("*.tex| LaTeX Documents (*.tex)"); @@ -67,12 +67,12 @@ string const ControlInclude::Browse(string const & in_name, Type in_type) pattern = _("*.lyx| LyX Documents (*.lyx)"); break; } - + pair dir1(N_("Documents|#o#O"), string(lyxrc.document_path)); string const docpath = OnlyPath(params().masterFilename_); - + return browseRelFile(&lv_, in_name, docpath, title, pattern, dir1); } @@ -85,11 +85,10 @@ void ControlInclude::load(string const & file) bool ControlInclude::fileExists(string const & file) { - string const fileWithAbsPath = MakeAbsPath(file, OnlyPath(params().masterFilename_)); + string const fileWithAbsPath = MakeAbsPath(file, OnlyPath(params().masterFilename_)); if (IsFileReadable(fileWithAbsPath)) return true; else Alert::alert(_("Specified file doesn't exist !")); return false; } - diff --git a/src/frontends/controllers/ControlInclude.h b/src/frontends/controllers/ControlInclude.h index 1fbac04c2c..4d2a871efd 100644 --- a/src/frontends/controllers/ControlInclude.h +++ b/src/frontends/controllers/ControlInclude.h @@ -41,10 +41,10 @@ public: string const Browse(string const &, Type); /// load a file - void load(string const & file); + void load(string const & file); /// test if file exist - bool fileExists(string const & file); + bool fileExists(string const & file); private: /// Dispatch the changed parameters to the kernel. diff --git a/src/frontends/controllers/ControlIndex.C b/src/frontends/controllers/ControlIndex.C index 36c96bd379..6b2cd0702c 100644 --- a/src/frontends/controllers/ControlIndex.C +++ b/src/frontends/controllers/ControlIndex.C @@ -1,5 +1,5 @@ /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * diff --git a/src/frontends/controllers/ControlIndex.h b/src/frontends/controllers/ControlIndex.h index 6ee17cdaae..692539abab 100644 --- a/src/frontends/controllers/ControlIndex.h +++ b/src/frontends/controllers/ControlIndex.h @@ -1,6 +1,6 @@ // -*- C++ -*- /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * diff --git a/src/frontends/controllers/ControlInset.h b/src/frontends/controllers/ControlInset.h index e7a21d7be1..34353d8d49 100644 --- a/src/frontends/controllers/ControlInset.h +++ b/src/frontends/controllers/ControlInset.h @@ -1,6 +1,6 @@ // -*- C++ -*- /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * @@ -72,7 +72,7 @@ private: virtual bool disconnectOnApply() { return false; } - + /// Instantiation of ControlButtons virtual methods. /// Get changed parameters and Dispatch them to the kernel. @@ -92,7 +92,7 @@ private: void connectInset(Inset * = 0); /// pointer to the inset passed through connectInset - Inset * inset_; + Inset * inset_; /// inset::hide connection. SigC::Connection ih_; /** A local copy of the inset's params. @@ -102,7 +102,7 @@ private: /// is the dialog built ? bool dialog_built_; - + }; diff --git a/src/frontends/controllers/ControlLog.C b/src/frontends/controllers/ControlLog.C index 479c60cb7e..c878e05042 100644 --- a/src/frontends/controllers/ControlLog.C +++ b/src/frontends/controllers/ControlLog.C @@ -1,5 +1,5 @@ /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * diff --git a/src/frontends/controllers/ControlLog.h b/src/frontends/controllers/ControlLog.h index 69896c56ee..54255a8332 100644 --- a/src/frontends/controllers/ControlLog.h +++ b/src/frontends/controllers/ControlLog.h @@ -1,6 +1,6 @@ // -*- C++ -*- /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * diff --git a/src/frontends/controllers/ControlMinipage.C b/src/frontends/controllers/ControlMinipage.C index 44e50d237b..f8fe7fe521 100644 --- a/src/frontends/controllers/ControlMinipage.C +++ b/src/frontends/controllers/ControlMinipage.C @@ -1,5 +1,5 @@ /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * diff --git a/src/frontends/controllers/ControlMinipage.h b/src/frontends/controllers/ControlMinipage.h index 0e9a9e7187..7e2ce3902d 100644 --- a/src/frontends/controllers/ControlMinipage.h +++ b/src/frontends/controllers/ControlMinipage.h @@ -1,9 +1,9 @@ // -*- C++ -*- /* This file is part of * ====================================================== - * + * * LyX, The Document Processor - * + * * Copyright 2001 The LyX Team. * *====================================================== @@ -56,7 +56,7 @@ public: private: /// Dispatch the changed parameters to the kernel. virtual void applyParamsToInset(); - /// + /// virtual void applyParamsNoInset(); /// get the parameters from the string passed to createInset. virtual MinipageParams const getParams(string const &) diff --git a/src/frontends/controllers/ControlPreamble.C b/src/frontends/controllers/ControlPreamble.C index 6036305f46..814b518289 100644 --- a/src/frontends/controllers/ControlPreamble.C +++ b/src/frontends/controllers/ControlPreamble.C @@ -36,7 +36,7 @@ void ControlPreamble::apply() { if (!lv_.view()->available()) return; - + view().apply(); lv_.buffer()->params.preamble = params(); diff --git a/src/frontends/controllers/ControlPreamble.h b/src/frontends/controllers/ControlPreamble.h index ffb0c7b8ca..3042abce12 100644 --- a/src/frontends/controllers/ControlPreamble.h +++ b/src/frontends/controllers/ControlPreamble.h @@ -33,7 +33,7 @@ private: virtual void setParams(); /// clean-up on hide. virtual void clearParams(); - + /// string * params_; }; diff --git a/src/frontends/controllers/ControlPrint.C b/src/frontends/controllers/ControlPrint.C index afb426a856..112afe0f52 100644 --- a/src/frontends/controllers/ControlPrint.C +++ b/src/frontends/controllers/ControlPrint.C @@ -1,8 +1,8 @@ /* This file is part of * ====================================================== - * + * * LyX, The Document Processor - * + * * Copyright 2001 The LyX Team. * *====================================================== @@ -49,7 +49,7 @@ void ControlPrint::apply() { if (!lv_.view()->available()) return; - + view().apply(); if (!printBuffer(lv_.buffer(), params())) { diff --git a/src/frontends/controllers/ControlPrint.h b/src/frontends/controllers/ControlPrint.h index 1fa6739d63..d88362ceb6 100644 --- a/src/frontends/controllers/ControlPrint.h +++ b/src/frontends/controllers/ControlPrint.h @@ -1,9 +1,9 @@ // -*- C++ -*- /* This file is part of * ====================================================== - * + * * LyX, The Document Processor - * + * * Copyright 2001 The LyX Team. * *====================================================== @@ -27,7 +27,7 @@ class PrinterParams; */ class ControlPrint : public ControlDialogBD { public: - /// + /// ControlPrint(LyXView &, Dialogs &); /// Browse for a file @@ -42,7 +42,7 @@ private: virtual void setParams(); /// clean-up on hide. virtual void clearParams(); - + /// PrinterParams * params_; }; diff --git a/src/frontends/controllers/ControlRef.C b/src/frontends/controllers/ControlRef.C index c500dd4a4c..295c3c9091 100644 --- a/src/frontends/controllers/ControlRef.C +++ b/src/frontends/controllers/ControlRef.C @@ -1,5 +1,5 @@ /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * @@ -66,7 +66,7 @@ void ControlRef::gotoBookmark() const vector const ControlRef::getBufferList() const { - + vector buffers = bufferlist.getFileNames(); for (vector::iterator it = buffers.begin(); it != buffers.end(); ++it) { diff --git a/src/frontends/controllers/ControlRef.h b/src/frontends/controllers/ControlRef.h index 5ccaf74633..df6c4e9322 100644 --- a/src/frontends/controllers/ControlRef.h +++ b/src/frontends/controllers/ControlRef.h @@ -1,6 +1,6 @@ // -*- C++ -*- /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * diff --git a/src/frontends/controllers/ControlSearch.C b/src/frontends/controllers/ControlSearch.C index e7ac92f036..958238e2ac 100644 --- a/src/frontends/controllers/ControlSearch.C +++ b/src/frontends/controllers/ControlSearch.C @@ -1,5 +1,5 @@ /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * @@ -48,8 +48,8 @@ void ControlSearch::find(string const & search, bool casesensitive, bool matchword, bool forward) const { bool const found = LyXFind(lv_.view(), search, - forward, false, casesensitive, matchword); - + forward, false, casesensitive, matchword); + if (!found) setMinibuffer(&lv_, _("String not found!")); } @@ -63,9 +63,9 @@ void ControlSearch::replace(string const & search, string const & replace, // changed bool const once = !all; int const replace_count = LyXReplace(lv_.view(), - search, replace, true, casesensitive, - matchword, all, once); - + search, replace, true, casesensitive, + matchword, all, once); + if (replace_count == 0) { setMinibuffer(&lv_, _("String not found!")); } else { diff --git a/src/frontends/controllers/ControlSearch.h b/src/frontends/controllers/ControlSearch.h index 3027f411f0..8334e3a094 100644 --- a/src/frontends/controllers/ControlSearch.h +++ b/src/frontends/controllers/ControlSearch.h @@ -1,6 +1,6 @@ // -*- C++ -*- /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * @@ -28,7 +28,7 @@ class ControlSearch : public ControlDialogBD { public: /// ControlSearch(LyXView &, Dialogs &); - + /// Searches occurence of string void find(string const & search, bool casesensitive, bool matchword, bool forward) const; diff --git a/src/frontends/controllers/ControlSendto.C b/src/frontends/controllers/ControlSendto.C index a2a0ad1cc0..7c9f320e34 100644 --- a/src/frontends/controllers/ControlSendto.C +++ b/src/frontends/controllers/ControlSendto.C @@ -106,7 +106,7 @@ void ControlSendto::apply() { if (!lv_.view()->available()) return; - + view().apply(); if (command_.empty() || !format_) @@ -126,7 +126,7 @@ void ControlSendto::apply() } else { Exporter::Export(lv_.buffer(), format_->name(), true, filename); - } + } // Substitute $$FName for filename string command = command_; @@ -138,4 +138,3 @@ void ControlSendto::apply() Systemcall call; call.startscript(Systemcall::DontWait, command); } - diff --git a/src/frontends/controllers/ControlSpellchecker.C b/src/frontends/controllers/ControlSpellchecker.C index 2571de4e14..c4e66b5443 100644 --- a/src/frontends/controllers/ControlSpellchecker.C +++ b/src/frontends/controllers/ControlSpellchecker.C @@ -1,5 +1,5 @@ /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * @@ -33,7 +33,7 @@ #include "buffer.h" #include "lyxrc.h" #include "BufferView.h" -#include "LyXView.h" +#include "LyXView.h" #include "lyxtext.h" #include "gettext.h" #include "support/lstrings.h" @@ -72,18 +72,18 @@ void ControlSpellchecker::setParams() if (lyxrc.use_pspell) { tmp = (lyxrc.isp_use_alt_lang) ? lyxrc.isp_alt_lang : lv_.buffer()->params.language->code(); - + speller_ = new PSpell(lv_.view()->buffer()->params, tmp); } else { #endif tmp = (lyxrc.isp_use_alt_lang) ? lyxrc.isp_alt_lang : lv_.buffer()->params.language->lang(); - + speller_ = new ISpell(lv_.view()->buffer()->params, tmp); #ifdef USE_PSPELL } #endif - + if (lyxrc.isp_use_alt_lang) { Language const * lang = languages.getLanguage(tmp); if (lang) @@ -91,7 +91,7 @@ void ControlSpellchecker::setParams() } else { rtl_ = lv_.buffer()->params.language->RightToLeft(); } - + if (speller_->error() != 0) { #if 0 message_ = speller_->error(); @@ -109,21 +109,21 @@ void ControlSpellchecker::check() { result_ = SpellBase::ISP_OK; stop_ = false; - + // clear any old selection LyXText * text = lv_.view()->getLyXText(); lv_.view()->toggleSelection(true); lv_.view()->update(text, BufferView::SELECT); - + while ((result_==SpellBase::ISP_OK || result_==SpellBase::ISP_IGNORE) && !stop_) { word_ = lv_.view()->nextWord(newval_); - + if (word_.empty()) { clearParams(); break; } - + ++count_; // Update slider if and only if value has changed @@ -133,12 +133,12 @@ void ControlSpellchecker::check() // set progress bar view().partialUpdate(0); } - + if (!speller_->alive()) clearParams(); - + result_ = speller_->check(word_); } - + if (!stop_ && !word_.empty()) lv_.view()->selectLastWord(); @@ -176,12 +176,12 @@ string ControlSpellchecker::getSuggestion() // segfaults when nextMiss is 0 string tmp; char const * w = speller_->nextMiss(); - + if (w!=0) { tmp = w; if (rtl_) std::reverse(tmp.begin(), tmp.end()); } - + return tmp; } @@ -211,7 +211,7 @@ void ControlSpellchecker::stop() void ControlSpellchecker::clearParams() { if (!speller_) return; - + if (speller_->alive()) { speller_->close(); message_ = tostr(count_); @@ -234,9 +234,9 @@ void ControlSpellchecker::clearParams() // make sure that the dialog is not launched emergency_exit_ = true; } - + delete speller_; - + lv_.view()->endOfSpellCheck(); // show closing message if any words were checked. diff --git a/src/frontends/controllers/ControlSpellchecker.h b/src/frontends/controllers/ControlSpellchecker.h index eeaf11e215..9a2aa71b34 100644 --- a/src/frontends/controllers/ControlSpellchecker.h +++ b/src/frontends/controllers/ControlSpellchecker.h @@ -1,6 +1,6 @@ // -*- C++ -*- /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * @@ -40,7 +40,7 @@ public: /// ignore all occurances of word void ignoreAll(); - + /// stop checking void stop(); @@ -49,7 +49,7 @@ public: /// spell options void options(); - + /// get suggestion string getSuggestion(); @@ -58,16 +58,16 @@ public: /// returns progress value int getProgress() { - return oldval_; + return oldval_; } /// returns exit message string getMessage() { return message_; } - + private: - + /// set the params before show or update void setParams(); /// clean-up on hide. @@ -101,7 +101,7 @@ private: /// The actual spellchecker object SpellBase * speller_; - + }; #endif // CONTROLSPELLCHECKER_H diff --git a/src/frontends/controllers/ControlTabularCreate.C b/src/frontends/controllers/ControlTabularCreate.C index 6c925ae2f6..ad7661e130 100644 --- a/src/frontends/controllers/ControlTabularCreate.C +++ b/src/frontends/controllers/ControlTabularCreate.C @@ -1,5 +1,5 @@ /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * @@ -49,10 +49,10 @@ void ControlTabularCreate::apply() { if (!lv_.view()->available()) return; - + view().apply(); - string const val(tostr(params().first) + " " + tostr(params().second)); - + string const val(tostr(params().first) + " " + tostr(params().second)); + lv_.getLyXFunc()->dispatch(LFUN_INSET_TABULAR, val); } diff --git a/src/frontends/controllers/ControlTabularCreate.h b/src/frontends/controllers/ControlTabularCreate.h index 2da3b45d84..dcb94e8774 100644 --- a/src/frontends/controllers/ControlTabularCreate.h +++ b/src/frontends/controllers/ControlTabularCreate.h @@ -1,9 +1,9 @@ // -*- C++ -*- /* This file is part of * ====================================================== - * + * * LyX, The Document Processor - * + * * Copyright 2001 The LyX Team. * *====================================================== @@ -15,7 +15,7 @@ #define CONTROLTABULARCREATE_H #include - + #ifdef __GNUG__ #pragma interface #endif @@ -26,9 +26,9 @@ */ class ControlTabularCreate : public ControlDialogBD { public: - /// + /// ControlTabularCreate(LyXView &, Dialogs &); - + typedef std::pair rowsCols; /// @@ -40,7 +40,7 @@ private: /// set the params before show or update virtual void setParams(); - + /// rows, cols params rowsCols params_; }; diff --git a/src/frontends/controllers/ControlTexinfo.C b/src/frontends/controllers/ControlTexinfo.C index f49d7674b5..280be5d4a8 100644 --- a/src/frontends/controllers/ControlTexinfo.C +++ b/src/frontends/controllers/ControlTexinfo.C @@ -1,5 +1,5 @@ /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * @@ -61,9 +61,9 @@ void ControlTexinfo::runTexhash() const //path to texhash through system Systemcall one; one.startscript(Systemcall::Wait, "texhash"); - + p.pop(); -// Alert::alert(_("texhash run!"), +// Alert::alert(_("texhash run!"), // _("rebuilding of the TeX-tree could only be successfull"), // _("if you have had user-write-permissions to the tex-dir.")); } @@ -74,10 +74,10 @@ namespace { string const sortEntries(string & str_in) { std::vector dbase = getVectorFromString(str_in,"\n"); - std::sort(dbase.begin(), dbase.end()); // sort entries - std::vector::iterator p = - std::unique(dbase.begin(), dbase.end()); // compact - dbase.erase(p, dbase.end()); // shrink + std::sort(dbase.begin(), dbase.end()); // sort entries + std::vector::iterator p = + std::unique(dbase.begin(), dbase.end()); // compact + dbase.erase(p, dbase.end()); // shrink return getStringFromVector(dbase,"\n"); } @@ -93,7 +93,7 @@ ControlTexinfo::getContents(texFileSuffix type, bool withFullPath) const string filename; switch (type) { - case bst: + case bst: filename = bstFilename; break; case cls: @@ -127,4 +127,3 @@ void ControlTexinfo::viewFile(string const filename) const { lv_.getDialogs()->showFile(filename); } - diff --git a/src/frontends/controllers/ControlTexinfo.h b/src/frontends/controllers/ControlTexinfo.h index 849e41fd62..d11df12191 100644 --- a/src/frontends/controllers/ControlTexinfo.h +++ b/src/frontends/controllers/ControlTexinfo.h @@ -1,6 +1,6 @@ // -*- C++ -*- /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * diff --git a/src/frontends/controllers/ControlThesaurus.h b/src/frontends/controllers/ControlThesaurus.h index 9cd6aacffd..8d348772f2 100644 --- a/src/frontends/controllers/ControlThesaurus.h +++ b/src/frontends/controllers/ControlThesaurus.h @@ -27,7 +27,7 @@ class ControlThesaurus : public ControlDialogBD { public: /// ControlThesaurus(LyXView &, Dialogs &); - + /// replace the particular string void replace(string const & newstr); @@ -36,7 +36,7 @@ public: /// get meanings Thesaurus::Meanings const & getMeanings(string const & str); - + /// the text string const & text() { return oldstr_; diff --git a/src/frontends/controllers/ControlToc.C b/src/frontends/controllers/ControlToc.C index 3d32d7cbc3..20a9f596d1 100644 --- a/src/frontends/controllers/ControlToc.C +++ b/src/frontends/controllers/ControlToc.C @@ -1,5 +1,5 @@ /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * @@ -84,7 +84,7 @@ Buffer::SingleList const ControlToc::getContents(string const & type) const } -namespace toc +namespace toc { string const getType(string const & cmdName) @@ -97,5 +97,5 @@ string const getType(string const & cmdName) return type; } - -} // namespace toc + +} // namespace toc diff --git a/src/frontends/controllers/ControlToc.h b/src/frontends/controllers/ControlToc.h index fc3823b871..6047ce2c39 100644 --- a/src/frontends/controllers/ControlToc.h +++ b/src/frontends/controllers/ControlToc.h @@ -1,6 +1,6 @@ // -*- C++ -*- /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * @@ -40,7 +40,7 @@ public: Buffer::SingleList const getContents(string const & type) const; }; -namespace toc +namespace toc { /** Given the cmdName of the TOC param, returns the type used by ControlToc::getContents() */ diff --git a/src/frontends/controllers/ControlUrl.C b/src/frontends/controllers/ControlUrl.C index b8896bfa25..174663f2be 100644 --- a/src/frontends/controllers/ControlUrl.C +++ b/src/frontends/controllers/ControlUrl.C @@ -1,5 +1,5 @@ /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * diff --git a/src/frontends/controllers/ControlUrl.h b/src/frontends/controllers/ControlUrl.h index c32e0abbe4..8071ba9694 100644 --- a/src/frontends/controllers/ControlUrl.h +++ b/src/frontends/controllers/ControlUrl.h @@ -1,6 +1,6 @@ // -*- C++ -*- /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * @@ -23,7 +23,7 @@ /** A controller for the Url Dialog. */ -class ControlUrl : public ControlCommand +class ControlUrl : public ControlCommand { public: /// diff --git a/src/frontends/controllers/ControlVCLog.C b/src/frontends/controllers/ControlVCLog.C index 350465afd4..4e79491e8c 100644 --- a/src/frontends/controllers/ControlVCLog.C +++ b/src/frontends/controllers/ControlVCLog.C @@ -60,7 +60,7 @@ stringstream & ControlVCLog::getVCLogFile(stringstream & ss) const ss << in.rdbuf(); found = ss.good(); } - + if (!found) ss << _("No version control log file found.") << endl; diff --git a/src/frontends/controllers/ControlVCLog.h b/src/frontends/controllers/ControlVCLog.h index 55ce1e37d7..1a44d0c826 100644 --- a/src/frontends/controllers/ControlVCLog.h +++ b/src/frontends/controllers/ControlVCLog.h @@ -1,6 +1,6 @@ // -*- C++ -*- /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * diff --git a/src/frontends/controllers/GUI.h b/src/frontends/controllers/GUI.h index be96beb82e..adab6c4252 100644 --- a/src/frontends/controllers/GUI.h +++ b/src/frontends/controllers/GUI.h @@ -345,7 +345,7 @@ public: template class GUITabularCreate : public GUI { + OkApplyCancelReadOnlyPolicy, GUIbc> { public: /// GUITabularCreate(LyXView & lv, Dialogs & d) @@ -370,7 +370,7 @@ public: template class GUIThesaurus : public GUI { + OkApplyCancelReadOnlyPolicy, GUIbc> { public: /// GUIThesaurus(LyXView & lv, Dialogs & d) @@ -378,7 +378,7 @@ public: OkApplyCancelReadOnlyPolicy, GUIbc>(lv, d) {} }; - + /** Specialization for Url dialog */ template diff --git a/src/frontends/controllers/ViewBase.h b/src/frontends/controllers/ViewBase.h index 121533f711..b12eed5295 100644 --- a/src/frontends/controllers/ViewBase.h +++ b/src/frontends/controllers/ViewBase.h @@ -1,6 +1,6 @@ // -*- C++ -*- /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * @@ -19,9 +19,9 @@ class ViewBase { public: - /// + /// ViewBase(ControlButtons & c) : controller_(c) {} - /// + /// virtual ~ViewBase() {} /// Apply changes to LyX data from dialog. @@ -40,20 +40,20 @@ public: /** These shortcuts allow (e.g. xform's) global callback functions access to the buttons without making the whole controller_ public. */ - /// - void ApplyButton() { controller_.ApplyButton(); } - /// - void OKButton() { controller_.OKButton(); } - /// - void CancelButton() { controller_.CancelButton(); } - /// - void RestoreButton() { controller_.RestoreButton(); } - + /// + void ApplyButton() { controller_.ApplyButton(); } + /// + void OKButton() { controller_.OKButton(); } + /// + void CancelButton() { controller_.CancelButton(); } + /// + void RestoreButton() { controller_.RestoreButton(); } + /** Defaults to nothing. Can be used by the Controller, however, to indicate to the View that something has changed and that the dialog therefore needs updating. */ virtual void partialUpdate(int) {} - + protected: /// The view is, after all, controlled! ControlButtons & controller_; diff --git a/src/frontends/controllers/biblio.C b/src/frontends/controllers/biblio.C index f294e51740..12fe7f12ef 100644 --- a/src/frontends/controllers/biblio.C +++ b/src/frontends/controllers/biblio.C @@ -1,5 +1,5 @@ /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * @@ -34,15 +34,15 @@ using std::min; using std::vector; using std::sort; -namespace biblio +namespace biblio { namespace { using namespace biblio; - + char const * const citeCommands[] = { - "cite", "citet", "citep", "citealt", "citealp", "citeauthor", + "cite", "citet", "citep", "citealt", "citealp", "citeauthor", "citeyear", "citeyearpar" }; unsigned int const nCiteCommands = @@ -66,7 +66,7 @@ CiteStyle const citeStylesUCase[] = { unsigned int const nCiteStylesUCase = sizeof(citeStylesUCase) / sizeof(CiteStyle); - + // The functions doing the dirty work for the search. vector::const_iterator @@ -107,14 +107,14 @@ simpleSearch(InfoMap const & theMap, break; } } - + if (found) return it; } return keys.end(); } - + vector::const_iterator regexSearch(InfoMap const & theMap, vector const & keys, @@ -158,7 +158,7 @@ string const familyName(string const & name) idx = fname.rfind("."); if (idx != string::npos) fname = frontStrip(fname.substr(idx+1)); - + return fname; } @@ -167,7 +167,7 @@ string const getAbbreviatedAuthor(InfoMap const & map, string const & key) { lyx::Assert(!map.empty()); - InfoMap::const_iterator it = map.find(key); + InfoMap::const_iterator it = map.find(key); string author; if (it != map.end()) { @@ -204,7 +204,7 @@ string const getYear(InfoMap const & map, string const & key) { lyx::Assert(!map.empty()); - InfoMap::const_iterator it = map.find(key); + InfoMap::const_iterator it = map.find(key); string year; @@ -213,16 +213,16 @@ string const getYear(InfoMap const & map, string const & key) if (year.empty()) year = "50BC"; - + return year; } -} // namespace anon +} // namespace anon // A functor for use with std::sort, leading to case insensitive sorting -struct compareNoCase: public std::binary_function +struct compareNoCase: public std::binary_function { bool operator()(string const & s1, string const & s2) const { return compare_no_case(s1, s2) < 0; @@ -246,7 +246,7 @@ string const getInfo(InfoMap const & map, string const & key) { lyx::Assert(!map.empty()); - InfoMap::const_iterator it = map.find(key); + InfoMap::const_iterator it = map.find(key); if (it == map.end()) return string(); // is the entry a BibTeX one or one from lyx-layout "bibliography"? @@ -301,7 +301,7 @@ string const getInfo(InfoMap const & map, string const & key) // This should never happen (or at least be very unusual!) return it->second; } - + vector::const_iterator searchKeys(InfoMap const & theMap, @@ -315,7 +315,7 @@ searchKeys(InfoMap const & theMap, // Preliminary checks if (start < keys.begin() || start >= keys.end()) return keys.end(); - + string search_expr = frontStrip(strip(expr)); if (search_expr.empty()) return keys.end(); @@ -358,10 +358,10 @@ string const parseBibTeX(string data, string const & findkey) return string(); // now get only the important line of the bibtex entry. - // all entries are devided by ',' except the last one. + // all entries are devided by ',' except the last one. data += ','; // now we have same behaviour for all entries // because the last one is "blah ... }" - Entries = 0; + Entries = 0; dummy = token(data, ',', Entries); while (!contains(lowercase(dummy), findkey) && !dummy.empty()) dummy = token(data, ',', ++Entries); @@ -376,7 +376,7 @@ string const parseBibTeX(string data, string const & findkey) keyvalue += (',' + dummy); dummy = token(data, ',', ++Entries); } - data = keyvalue; // now we have the important line + data = keyvalue; // now we have the important line data = strip(data, ' '); // all spaces if (!contains(data, '{')) // no opening '{' data = strip(data, '}');// maybe there is a main closing '}' @@ -407,18 +407,18 @@ string const parseBibTeX(string data, string const & findkey) } else { // no {} and no "", pure data but with a // possible ',' at the end - return strip(data,','); + return strip(data,','); } string tmp = data.substr(keypos); while (tmp.find('{') != string::npos && tmp.find('}') != string::npos && tmp.find('{') < tmp.find('}') && tmp.find('{') < tmp.find(enclosing)) { - + keypos += tmp.find('{') + 1; tmp = data.substr(keypos); keypos += tmp.find('}') + 1; - tmp = data.substr(keypos); + tmp = data.substr(keypos); } if (tmp.find(enclosing) == string::npos) return data; @@ -434,7 +434,7 @@ string const parseBibTeX(string data, string const & findkey) CitationStyle const getCitationStyle(string const & command) { if (command.empty()) return CitationStyle(); - + CitationStyle cs; string cmd = command; @@ -479,7 +479,7 @@ string const getCiteCommand(CiteStyle command, bool full, bool forceUCase) return cite; } - + vector const getCiteStyles(bool usingNatbib) { unsigned int nStyles = 1; @@ -510,12 +510,12 @@ getNumericalStrings(string const & key, vec[0] = _("No database"); return vec; } - + vector vec(styles.size()); string const author = getAbbreviatedAuthor(map, key); string const year = getYear(map, key); - + for (vector::size_type i = 0; i != vec.size(); ++i) { string str; @@ -524,27 +524,27 @@ getNumericalStrings(string const & key, case CITEP: str = "[#ID]"; break; - + case CITET: str = author + " [#ID]"; break; - + case CITEALT: str = author + " #ID"; break; - + case CITEALP: str = "#ID"; break; - + case CITEAUTHOR: str = author; break; - + case CITEYEAR: str = year; break; - + case CITEYEARPAR: str = "(" + year + ")"; break; @@ -552,7 +552,7 @@ getNumericalStrings(string const & key, vec[i] = str; } - + return vec; } @@ -566,12 +566,12 @@ getAuthorYearStrings(string const & key, vec[0] = _("No database"); return vec; } - + vector vec(styles.size()); string const author = getAbbreviatedAuthor(map, key); string const year = getYear(map, key); - + for (vector::size_type i = 0; i != vec.size(); ++i) { string str; @@ -579,28 +579,28 @@ getAuthorYearStrings(string const & key, case CITET: str = author + " (" + year + ")"; break; - + case CITE: case CITEP: str = "(" + author + ", " + year + ")"; break; - + case CITEALT: str = author + " " + year ; break; - + case CITEALP: str = author + ", " + year ; break; - + case CITEAUTHOR: str = author; break; - + case CITEYEAR: str = year; break; - + case CITEYEARPAR: str = "(" + year + ")"; break; @@ -608,8 +608,8 @@ getAuthorYearStrings(string const & key, vec[i] = str; } - + return vec; } -} // namespace biblio +} // namespace biblio diff --git a/src/frontends/controllers/biblio.h b/src/frontends/controllers/biblio.h index d1021ded09..b933aa53be 100644 --- a/src/frontends/controllers/biblio.h +++ b/src/frontends/controllers/biblio.h @@ -1,6 +1,6 @@ // -*- C++ -*- /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * @@ -22,7 +22,7 @@ #endif /** Functions of use to citation and bibtex GUI controllers and views */ -namespace biblio +namespace biblio { /// enum CiteStyle { @@ -118,7 +118,7 @@ namespace biblio [XX] is used in place of the actual reference Eg, the vector will contain: [XX], Jones et al. [XX], ... - + User supplies : the key, the InfoMap of bibkeys info, @@ -132,10 +132,10 @@ namespace biblio /** "Translates" the available Citation Styles into strings for this key. The returned string is displayed by the GUI. - + Eg, the vector will contain: Jones et al. (1990), (Jones et al. 1990), Jones et al. 1990, ... - + User supplies : the key, the InfoMap of bibkeys info, @@ -145,6 +145,6 @@ namespace biblio getAuthorYearStrings(string const & key, InfoMap const & map, std::vector const & styles); -} // namespace biblio +} // namespace biblio #endif // BIBLIOHELPERS_H diff --git a/src/frontends/controllers/character.C b/src/frontends/controllers/character.C index 722fa72479..5b18932b43 100644 --- a/src/frontends/controllers/character.C +++ b/src/frontends/controllers/character.C @@ -1,5 +1,5 @@ /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * @@ -59,7 +59,7 @@ vector const getSeriesData() series[2] = pr; pr.first = _("Reset"); pr.second = LyXFont::INHERIT_SERIES; series[3] = pr; - + return series; } @@ -81,7 +81,7 @@ vector const getShapeData() shape[4] = pr; pr.first = _("Reset"); pr.second = LyXFont::INHERIT_SHAPE; shape[5] = pr; - + return shape; } @@ -119,7 +119,7 @@ vector const getSizeData() size[12] = pr; pr.first = _("Reset"); pr.second = LyXFont::INHERIT_SIZE; size[13] = pr; - + return size; } @@ -139,7 +139,7 @@ vector const getBarData() bar[3] = pr; pr.first = _("Reset"); pr.second = INHERIT; bar[4] = pr; - + return bar; } @@ -171,7 +171,7 @@ vector const getColorData() color[9] = pr; pr.first = _("Reset"); pr.second = LColor::inherit; color[10] = pr; - + return color; } @@ -184,12 +184,12 @@ vector const getLanguageData() langs[1] = _("Reset"); vector::size_type i = 1; - for (Languages::const_iterator cit = languages.begin(); + for (Languages::const_iterator cit = languages.begin(); cit != languages.end(); ++cit) { langs[++i] = cit->second.lang(); } return langs; } - + } // namespace character diff --git a/src/frontends/controllers/character.h b/src/frontends/controllers/character.h index a13b5576cb..483f4b8b90 100644 --- a/src/frontends/controllers/character.h +++ b/src/frontends/controllers/character.h @@ -1,6 +1,6 @@ // -*- C++ -*- /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * diff --git a/src/frontends/controllers/helper_funcs.C b/src/frontends/controllers/helper_funcs.C index 3648282def..7bb293c1cf 100644 --- a/src/frontends/controllers/helper_funcs.C +++ b/src/frontends/controllers/helper_funcs.C @@ -1,5 +1,5 @@ /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * @@ -77,7 +77,7 @@ vector const getVectorFromString(string const & str, string const browseFile(LyXView * lv, string const & filename, string const & title, - string const & pattern, + string const & pattern, pair const & dir1, pair const & dir2) { @@ -88,18 +88,18 @@ string const browseFile(LyXView * lv, string const & filename, FileDialog fileDlg(lv, title, LFUN_SELECT_FILE_SYNC, dir1, dir2); FileDialog::Result result; - + while (1) { result = fileDlg.Select(lastPath, pattern, OnlyFilename(filename)); - if (result.second.empty()) + if (result.second.empty()) return result.second; lastPath = OnlyPath(result.second); if (result.second.find_first_of("#~$% ") == string::npos) - break; - + break; + Alert::alert(_("Filename can't contain any " "of these characters:"), _("space, '#', '~', '$' or '%'.")); @@ -112,12 +112,12 @@ string const browseFile(LyXView * lv, string const & filename, string const browseRelFile(LyXView * lv, string const & filename, string const & refpath, string const & title, - string const & pattern, + string const & pattern, pair const & dir1, pair const & dir2) { string const fname = MakeAbsPath(filename, refpath); - + string const outname = browseFile(lv, fname, title, pattern, dir1, dir2); string const reloutname = MakeRelPath(outname, refpath); diff --git a/src/frontends/controllers/helper_funcs.h b/src/frontends/controllers/helper_funcs.h index 937e44bd45..2252cbcc27 100644 --- a/src/frontends/controllers/helper_funcs.h +++ b/src/frontends/controllers/helper_funcs.h @@ -1,6 +1,6 @@ // -*- C++ -*- /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * @@ -32,7 +32,7 @@ std::vector const getVectorFromString(string const & str, string const & delim=","); class LyXView; - + /** Launch a file dialog and return the chosen file. filename: a suggested filename. title: the title of the dialog. @@ -41,7 +41,7 @@ class LyXView; */ string const browseFile(LyXView *lv, string const & filename, string const & title, - string const & pattern, + string const & pattern, std::pair const & dir1 = std::make_pair(string(), string()), std::pair const & dir2 = std::make_pair(string(), string())); @@ -55,7 +55,7 @@ string const browseFile(LyXView *lv, string const & filename, string const browseRelFile(LyXView *lv, string const & filename, string const & refpath, string const & title, - string const & pattern, + string const & pattern, std::pair const & dir1 = std::make_pair(string(), string()), std::pair const & dir2 = std::make_pair(string(), string())); @@ -81,7 +81,7 @@ struct seconder { typedef typename Pair::second_type second_type; second_type const & operator()(Pair const & p) { return p.second; } }; - + } /// diff --git a/src/frontends/gnome/ChangeLog b/src/frontends/gnome/ChangeLog index b47b48130f..d2904c5f36 100644 --- a/src/frontends/gnome/ChangeLog +++ b/src/frontends/gnome/ChangeLog @@ -1,14 +1,18 @@ +2002-03-21 Lars Gullik Bjønnes + + * most files: ws cleanup + 2002-03-16 Michael A. Koziarski - * Makefile.am: Cleanup and linking fix. + * Makefile.am: Cleanup and linking fix. * README: Added procedure for adding a new dialog. * Dialogs.C (tooltipsEnable): new method. 2002-03-14 Michael A. Koziarski * Timeout_pimpl.C - * Timeout_pimpl.h: implemented running to fix compilation, linking - fix still to come + * Timeout_pimpl.h: implemented running to fix compilation, linking + fix still to come 2002-03-11 Lars Gullik Bjønnes @@ -29,7 +33,7 @@ 2002-03-02 Lars Gullik Bjønnes - * Makefile.am: get rid of LYX_LIBS + * Makefile.am: get rid of LYX_LIBS 2002-02-10 Michael A. Koziarski @@ -54,7 +58,7 @@ 2002-01-12 Michael A. Koziarski * various: Cleaned out the old stuff, standardised the new - stuff. + stuff. * GnomeBase.C * GnomeBase.h: Changed the constructor to take one argument. The dialog name. The path and name of the glade files can be @@ -67,7 +71,7 @@ * FormTabularCreate.C * FormTabularCreate.h: updated them to use the new system. Removed Local inline *Clicked functions as they're now in the base - class. + class. * README: new, brief outline of what I'm doing here. * accessors.py: Described in README, generates the accessor functions from the glade file. @@ -83,7 +87,7 @@ 2002-01-08 Martin Vermeer - * Menubar_pimpl.C (composeUIInfo): + * Menubar_pimpl.C (composeUIInfo): (update): use FuncStatus 2002-01-03 Michael Koziarski @@ -115,7 +119,7 @@ 2001-08-27 John Levon * GUIRunTime.C: initApplication() should take a int & argc, add debug - + 2001-07-19 Baruch Even * Menubar_pimpl.C: Renamed LyXFunc::Dispatch to LyXFunc::dispatch. @@ -129,7 +133,7 @@ * Makefile.am: * Dialogs.C: Removed Citation and Copyright dialogs from build. Left them in repository until they get redone as About Dialog. - + * FileDialog.C: * Menubar_pimpl.C: * Menubar_pimpl.h: @@ -188,10 +192,10 @@ 2001-04-16 Allan Rae - * gnomeBC.C (setButtonLabel): - * Menubar_pimpl.C (updateAllLists): + * gnomeBC.C (setButtonLabel): + * Menubar_pimpl.C (updateAllLists): * GnomeBase.C (loadXML): #warning triggers an error on Sun CC 6.0 as - an unrecognised preprocessor directive. So ensure they're wrapped. + an unrecognised preprocessor directive. So ensure they're wrapped. 2001-04-03 Baruch Even @@ -205,7 +209,7 @@ * GnomeBase.C: * GnomeBase.h: s/ControlButton/ControlButtons/ s/UndoAll/Restore/ - + 2001-04-02 Michael Koziarski * FormCopyright.[Ch]: Reimplemented as an MVC dialog. @@ -268,7 +272,7 @@ 2001-03-26 Baruch Even - * Various files: Fixes to get the gnome frontend to compile again. + * Various files: Fixes to get the gnome frontend to compile again. Removed most xforms dialogs in order to reduce compilation breaks caused by the moves to MVC in the xforms frontend. diff --git a/src/frontends/gnome/Dialogs.C b/src/frontends/gnome/Dialogs.C index 40a4e5e2cc..d4ca73b192 100644 --- a/src/frontends/gnome/Dialogs.C +++ b/src/frontends/gnome/Dialogs.C @@ -46,7 +46,7 @@ #include "FormVCLog.h" #include "FormDocument.h" -#include "FormExternal.h" +#include "FormExternal.h" #include "FormGraphics.h" #include "FormInclude.h" #include "FormIndex.h" @@ -74,7 +74,7 @@ Dialogs::Dialogs(LyXView * lv) add(new GUITabularCreate(*lv, *this)); add(new GUIERT(*lv, *this)); -/* +/* add(new GUIBibitem(*lv, *this)); add(new GUIBibtex(*lv, *this)); add(new GUICharacter(*lv, *this)); @@ -84,13 +84,13 @@ Dialogs::Dialogs(LyXView * lv) // For now we use the gnome non MVC dialogs add(new FormCitation(lv, this)); - + add(new FormDocument(lv, this)); add(new FormExternal(lv, this)); add(new FormGraphics(lv, this)); add(new FormInclude(lv, this)); add(new FormIndex(lv, this)); - add(new FormMathsPanel(lv, this)); + add(new FormMathsPanel(lv, this)); add(new FormParagraph(lv, this)); add(new FormPreamble(lv, this)); add(new FormPreferences(lv, this)); @@ -126,9 +126,9 @@ A. To avoid a segfault. the newly created Dialogs instance using `this'. (*) -- I'm using signals exclusively to guarantee that the gui code - remains hidden from the rest of the system. In fact the only + remains hidden from the rest of the system. In fact the only header related to dialogs that anything in the non-gui-specific - code gets to see is Dialogs.h! Even Dialogs.h doesn't know what a + code gets to see is Dialogs.h! Even Dialogs.h doesn't know what a FormCopyright class looks like or that its even going to be used! No other gui dialog headers are seen outside of the gui-specific @@ -144,31 +144,31 @@ A. To avoid a segfault. by adding a specific show or update signal. For example, spellchecker needs to set the next suspect word and its options/replacements so we need a: - Signal0 updateSpellChecker; + Signal0 updateSpellChecker; Since we would have to have a - Signal0 showSpellChecker; + Signal0 showSpellChecker; in order to just see the spellchecker and let the user push the [Start] button then the updateSpellChecker signal will make the SpellChecker dialog get the new word and replacements list from LyX. If you really, really wanted to you could define a signal that would pass the new word and replacements: - Signal2 > updateSpellChecker; + Signal2 > updateSpellChecker; (or something similar) but, why bother when the spellchecker can get it anyway with a LyXFunc call or two. Besides if someone extends - what a dialog does then they also have to change code in the rest of - LyX to pass more parameters or get the extra info via a function + what a dialog does then they also have to change code in the rest of + LyX to pass more parameters or get the extra info via a function call anyway. Thus reducing the independence of the two code bases. - We don't need a separate update signal for each dialog because most of + We don't need a separate update signal for each dialog because most of them will be changed only when the buffer is changed (either by closing the current open buffer or switching to another buffer in the current LyXView -- different BufferView same LyXView or same BufferView same LyXView). - So we minimise signals but maximise independence and programming + So we minimise signals but maximise independence and programming simplicity, understandability and maintainability. It's also extremely easy to add support for Qt or gtk-- because they use signals already. Guis that use callbacks, like xforms, must have their diff --git a/src/frontends/gnome/FileDialog.C b/src/frontends/gnome/FileDialog.C index 162d49723f..3d57350753 100644 --- a/src/frontends/gnome/FileDialog.C +++ b/src/frontends/gnome/FileDialog.C @@ -1,12 +1,12 @@ /* This file is part of * ================================================= - * + * * LyX, The Document Processor * Copyright 1995-2000 The LyX Team. * - * ================================================= + * ================================================= * - * \author Baruch Even + * \author Baruch Even **/ #ifdef __GNUG__ @@ -40,7 +40,7 @@ public: void button_clicked(bool canceled); void ok_clicked() { button_clicked(false); } void cancel_clicked() { button_clicked(true); } - + private: Gtk::FileSelection sel_; bool modal_; @@ -48,11 +48,11 @@ private: }; FileDialog::Private::Private(string const & title) - : sel_(title), modal_(false) + : sel_(title), modal_(false) { - sel_.get_ok_button()->clicked.connect(slot(this, + sel_.get_ok_button()->clicked.connect(slot(this, &FileDialog::Private::ok_clicked)); - sel_.get_cancel_button()->clicked.connect(slot(this, + sel_.get_cancel_button()->clicked.connect(slot(this, &FileDialog::Private::cancel_clicked)); } @@ -63,7 +63,7 @@ string const FileDialog::Private::exec() sel_.show(); Gnome::Main::run(); // Find if its canceled or oked and return as needed. - + if (canceled_) return string(); else @@ -79,7 +79,7 @@ void FileDialog::Private::button_clicked(bool canceled) // FileDialog -FileDialog::FileDialog(LyXView * lv, string const & title, kb_action a, +FileDialog::FileDialog(LyXView * lv, string const & title, kb_action a, Button /*b1*/, Button /*b2*/) : private_(new Private(title)) , lv_(lv), title_(title), success_(a) @@ -94,8 +94,8 @@ FileDialog::~FileDialog() } -FileDialog::Result const -FileDialog::Select(string const & path, string const & mask, +FileDialog::Result const +FileDialog::Select(string const & path, string const & mask, string const & suggested) { // For some reason we need to ignore the asynchronous method... @@ -108,14 +108,14 @@ FileDialog::Select(string const & path, string const & mask, } #endif lyxerr << "Synchronous file dialog." << std::endl; - + lyxerr << "Path: " << path << "\nMask: " << mask << "\nSuggested: " << suggested << std::endl; - + string filter = mask; rsplit(mask, filter, '|'); private_->set_complete(mask); private_->set_filename(path+suggested); - + lv_->prohibitInput(); string const filename = private_->exec(); lv_->allowInput(); diff --git a/src/frontends/gnome/FormCitation.C b/src/frontends/gnome/FormCitation.C index cdfba62e53..40e4deec4f 100644 --- a/src/frontends/gnome/FormCitation.C +++ b/src/frontends/gnome/FormCitation.C @@ -1,5 +1,5 @@ /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * @@ -88,13 +88,13 @@ FormCitation::~FormCitation() void FormCitation::showInset( InsetCommand * const inset ) { if( dialog_!=0 || inset == 0 ) return; - + inset_ = inset; ih_ = inset_->hideDialog.connect(SigC::slot(this, &FormCitation::hide)); u_ = d_->updateBufferDependent.connect(SigC::slot(this, &FormCitation::updateSlot)); h_ = d_->hideBufferDependent.connect(SigC::slot(this, &FormCitation::hide)); - + params = inset->params(); if ( params.getContents().empty() ) showStageSearch(); @@ -105,10 +105,10 @@ void FormCitation::showInset( InsetCommand * const inset ) void FormCitation::createInset( string const & arg ) { if( dialog_!=0 ) return; - - u_ = d_->updateBufferDependent.connect(SigC::slot(this, &FormCitation::updateSlot)); + + u_ = d_->updateBufferDependent.connect(SigC::slot(this, &FormCitation::updateSlot)); h_ = d_->hideBufferDependent.connect(SigC::slot(this, &FormCitation::hide)); - + params.setFromString( arg ); showStageSearch(); } @@ -122,13 +122,13 @@ void parseBibTeX(string const & dat, { unsigned int i; string data(dat); - + keyvalue = ""; - + for (i=0; i 1 && data[0]=='=') @@ -193,13 +193,13 @@ void parseBibTeX(string const & dat, keypos = data.find(','); value = data.substr(0, keypos); - + if (keypos+1column(i).set_width( gnome_config_get_int(w.c_str()) ); } - + // retrieving data vector > blist = lv_->buffer()->getBibkeyList(); @@ -286,9 +286,9 @@ void FormCitation::initWidgets() bibkeys.push_back(blist[i].first); bibkeysInfo.push_back(blist[i].second); } - - blist.clear(); - + + blist.clear(); + // updating list search(); @@ -312,7 +312,7 @@ void FormCitation::initWidgets() r.clear(); r.push_back(tmp); clist_selected_->rows().push_back(r); - + keys = frontStrip( split(keys, tmp, ',') ); } @@ -341,7 +341,7 @@ void FormCitation::storeWidgets() gnome_config_set_int(w.c_str(), button_regexp_->get_active()); } - if (paned_info_ != 0) + if (paned_info_ != 0) { string w = path + "/" + CONF_PANE_INFO; gnome_config_set_int(w.c_str(), paned_info_->width() - info_->width()); @@ -382,7 +382,7 @@ void FormCitation::showStageAction() // set up spacing bbox->set_spacing(4); bbox->set_layout(GTK_BUTTONBOX_SPREAD); - + bbox->children().push_back(Element(*b_add, false, false)); bbox->children().push_back(Element(*b_edit, false, false)); bbox->children().push_back(Element(*b_cancel, false, false)); @@ -394,13 +394,13 @@ void FormCitation::showStageAction() b_add->add_accelerator("clicked", *accel, b_add->get_accelkey(), 0, GTK_ACCEL_VISIBLE); b_edit->add_accelerator("clicked", *accel, b_edit->get_accelkey(), 0, GTK_ACCEL_VISIBLE); - + // packing dialog to main window dialog_ = mbox; mainAppWin->add_action(*dialog_, _(" Citation: Select action "), false, accel); initWidgets(); - + // setting focus gtk_widget_grab_focus (GTK_WIDGET(b_add->gtkobj())); @@ -420,7 +420,7 @@ void FormCitation::moveFromActionToSearch() // stores configuration and cleans all widgets storeWidgets(); cleanupWidgets(); - + // moves to stage "search" mainAppWin->remove_action(); showStageSearch(); @@ -432,7 +432,7 @@ void FormCitation::moveFromActionToEdit() // stores configuration and cleans all widgets storeWidgets(); cleanupWidgets(); - + // moves to stage "edit" mainAppWin->remove_action(); showStageEdit(); @@ -448,14 +448,14 @@ void FormCitation::showStageSearch() Gtk::Box * mbox = manage( new Gtk::HBox() ); Gtk::ButtonBox * bbox = manage( new Gtk::HButtonBox() ); Gtk::Separator * sep = manage( new Gtk::VSeparator() ); - + search_text_ = manage( new Gnome::Entry() ); - + button_regexp_ = manage( new Gtk::CheckButton(_("Use Regular Expression")) ); b_ok = manage( new Gtk::Button(_("Search")) ); b_cancel = Gtk::wrap( GTK_BUTTON( gnome_stock_button(GNOME_STOCK_BUTTON_CANCEL) ) ); - + // set up spacing mbox->set_spacing(4); bbox->set_spacing(4); @@ -474,7 +474,7 @@ void FormCitation::showStageSearch() mainAppWin->add_action(*dialog_, _(" Insert Citation: Enter keyword(s) or regular expression ")); initWidgets(); - + // setting focus GTK_WIDGET_SET_FLAGS (GTK_WIDGET(search_text_->get_entry()->gtkobj()), GTK_CAN_DEFAULT); gtk_widget_grab_focus (GTK_WIDGET(search_text_->get_entry()->gtkobj())); @@ -497,7 +497,7 @@ void FormCitation::moveFromSearchToSelect() // stores configuration and cleans all widgets storeWidgets(); cleanupWidgets(); - + // moves to stage "select" mainAppWin->remove_action(); showStageSelect(); @@ -518,7 +518,7 @@ void FormCitation::showStageSelect() info_ = manage( new Gnome::Less() ); paned_info_ = manage( new Gtk::HPaned() ); text_after_ = manage( new Gnome::Entry() ); - + b_ok = Gtk::wrap( GTK_BUTTON( gnome_stock_button(GNOME_STOCK_BUTTON_OK) ) ); b_cancel = Gtk::wrap( GTK_BUTTON( gnome_stock_button(GNOME_STOCK_BUTTON_CANCEL) ) ); @@ -535,7 +535,7 @@ void FormCitation::showStageSelect() clist_bib_ = manage( new Gtk::CList(colnames) ); bbox->set_layout(GTK_BUTTONBOX_END); - + // set up spacing mbox->set_spacing(4); bbox->set_spacing(4); @@ -557,13 +557,13 @@ void FormCitation::showStageSelect() mbox->children().push_back(Element(*paned_info_,true,true)); mbox->children().push_back(Element(*sep, false, false)); mbox->children().push_back(Element(*tbox, false, false)); - + // packing dialog to main window dialog_ = mbox; mainAppWin->add_action(*dialog_, _(" Insert Citation: Select citation "), true); initWidgets(); - + // setting focus GTK_WIDGET_SET_FLAGS (GTK_WIDGET(b_ok->gtkobj()), GTK_CAN_DEFAULT); GTK_WIDGET_SET_FLAGS (GTK_WIDGET(b_cancel->gtkobj()), GTK_CAN_DEFAULT); @@ -604,9 +604,9 @@ void FormCitation::showStageEdit() colnames.push_back(" "); clist_selected_ = manage( new Gtk::CList(colnames) ); clist_selected_->column_titles_hide(); - + text_after_ = manage( new Gnome::Entry() ); - + button_unselect_ = manage( new Gnome::PixButton( _("_Remove"), GNOME_STOCK_PIXMAP_TRASH ) ); button_up_ = manage( new Gnome::PixButton( _("_Up"), GNOME_STOCK_PIXMAP_UP ) ); button_down_ = manage( new Gnome::PixButton( _("_Down"), GNOME_STOCK_PIXMAP_DOWN ) ); @@ -618,7 +618,7 @@ void FormCitation::showStageEdit() bbox->set_layout(GTK_BUTTONBOX_END); actbbox->set_layout(GTK_BUTTONBOX_START); - + // set up spacing mbox->set_spacing(4); bbox->set_spacing(4); @@ -647,7 +647,7 @@ void FormCitation::showStageEdit() mbox->children().push_back(Element(*t2box,true,true)); mbox->children().push_back(Element(*manage(new Gtk::HSeparator()), false, false)); mbox->children().push_back(Element(*tbox, false, false)); - + // accelerators Gtk::AccelGroup * accel = Gtk::AccelGroup::create(); @@ -678,7 +678,7 @@ void FormCitation::showStageEdit() button_unselect_->clicked.connect(SigC::slot(this, &FormCitation::removeCitation)); button_up_->clicked.connect(SigC::slot(this, &FormCitation::moveCitationUp)); - button_down_->clicked.connect(SigC::slot(this, &FormCitation::moveCitationDown)); + button_down_->clicked.connect(SigC::slot(this, &FormCitation::moveCitationDown)); clist_selected_->select_row.connect(SigC::bind(SigC::slot(this, &FormCitation::selectionToggled), true, true)); @@ -700,15 +700,15 @@ void FormCitation::addItemToBibList(int i) // don't change the order of these first two items: // callback functions depend on the data stored in the first column (its hided) // and in the second column (shown to user) - r.push_back( tostr(i) ); + r.push_back( tostr(i) ); r.push_back( key ); - + // this can be changed (configured by user?) parseBibTeX( info, "author", val); r.push_back(val); parseBibTeX( info, "title", val); r.push_back(val); parseBibTeX( info, "year", val); r.push_back(val); parseBibTeX( info, "journal", val); r.push_back(val); - + clist_bib_->rows().push_back(r); } @@ -748,7 +748,7 @@ void FormCitation::selectionToggled(gint row, { bool keyfound = false; string info; - + // the first column in clist_bib_ contains the index keyfound = true; info = bibkeysInfo[ strToInt(clist_bib_->cell(row,0).get_text()) ]; @@ -813,14 +813,14 @@ void FormCitation::applySelect() string contents = frontStrip( strip(params.getContents()) ); if (!contents.empty()) contents += ", "; - + int sz = clist_bib_->selection().size(); for (int i=0; i < sz; ++i) { if (i > 0) contents += ", "; contents += clist_bib_->selection()[i][1].get_text(); } - + params.setContents( contents ); params.setOptions( text_after_->get_entry()->get_text() ); @@ -873,7 +873,7 @@ void FormCitation::applyEdit() lv_->getLyXFunc()->Dispatch( LFUN_CITATION_INSERT, params.getAsString() ); } - + // close dialog storeWidgets(); hide(); @@ -896,7 +896,7 @@ void FormCitation::searchReg() { string rexptxt(search_string_); rexptxt = frontStrip( strip( rexptxt ) ); - + LRegex reg(rexptxt); // populating clist_bib_ @@ -912,7 +912,7 @@ void FormCitation::searchReg() if (rexptxt.empty()) additem = true; else additem = (reg.exec(data).size() > 0); - + if ( additem ) addItemToBibList(i); } @@ -933,7 +933,7 @@ void FormCitation::searchSimple() searchwords.push_back(tmp); stext = frontStrip( split(stext, tmp, ' ') ); } - + // populating clist_bib_ clist_bib_->rows().clear(); @@ -949,7 +949,7 @@ void FormCitation::searchSimple() for (int j = 0; additem && j < szs; ++j) if (data.find(searchwords[j]) == string::npos) additem = false; - + if (additem) addItemToBibList(i); } diff --git a/src/frontends/gnome/FormCitation.h b/src/frontends/gnome/FormCitation.h index 48b7a8b1ca..15cd0212a6 100644 --- a/src/frontends/gnome/FormCitation.h +++ b/src/frontends/gnome/FormCitation.h @@ -1,6 +1,6 @@ // -*- C++ -*- /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * @@ -75,7 +75,7 @@ private: void moveFromActionToSearch(); /// moves from Action to Edit "stage" void moveFromActionToEdit(); - + /// sort biblist void sortBibList(gint); /// update state of the buttons @@ -110,7 +110,7 @@ private: void initWidgets(); /// stores configuration of all non-0 member widgets void storeWidgets(); - + /** Which LyXFunc do we use? We could modify Dialogs to have a visible LyXFunc* instead and save a couple of bytes per dialog. @@ -147,12 +147,12 @@ private: Gnome::PixButton * button_up_; Gnome::PixButton * button_down_; Gtk::CheckButton * button_regexp_; - + Gtk::CList * clist_selected_; Gtk::CList * clist_bib_; - + Gtk::Paned * paned_info_; - + std::vector bibkeys; /// std::vector bibkeysInfo; diff --git a/src/frontends/gnome/FormCopyright.C b/src/frontends/gnome/FormCopyright.C index 06ff40564e..a89e91a9cb 100644 --- a/src/frontends/gnome/FormCopyright.C +++ b/src/frontends/gnome/FormCopyright.C @@ -1,10 +1,10 @@ /* This file is part of * ================================================= - * + * * LyX, The Document Processor * Copyright 1995-2000 The LyX Team. * - * ================================================= + * ================================================= * * \author Michael Koziarski */ diff --git a/src/frontends/gnome/FormCopyright.h b/src/frontends/gnome/FormCopyright.h index f8d3287172..c84193033e 100644 --- a/src/frontends/gnome/FormCopyright.h +++ b/src/frontends/gnome/FormCopyright.h @@ -1,12 +1,12 @@ // -*- C++ -*- /* This file is part of * ================================================= - * + * * LyX, The Document Processor * Copyright 1995 Matthias Ettrich. * Copyright 1995-2000 The LyX Team. * - * ================================================= + * ================================================= * * \author Michael Koziarski * */ @@ -36,11 +36,11 @@ public: /// ~FormCopyright() {}; - void apply() {}; + void apply() {}; void update() {}; - + private: - + /// Build the dialog void build(); Gtk::Button * ok(); @@ -49,7 +49,7 @@ private: Gtk::Label * copyright(); Gtk::Label * license(); /// The ok button - + }; #endif diff --git a/src/frontends/gnome/FormCredits.C b/src/frontends/gnome/FormCredits.C index b16fe82822..edc80af27d 100644 --- a/src/frontends/gnome/FormCredits.C +++ b/src/frontends/gnome/FormCredits.C @@ -1,10 +1,10 @@ /* This file is part of * ================================================= - * + * * LyX, The Document Processor * Copyright 1995-2000 The LyX Team. * - * ================================================= + * ================================================= * * \author Michael Koziarski */ @@ -39,7 +39,7 @@ void FormCredits::build() // Do not update the dialog when we insert the text text()->freeze(); - + // Get the credits into the string stream stringstream ss; string credits = controller().getCredits(ss).str(); @@ -64,7 +64,7 @@ void FormCredits::build() string const r("R-"); index = italic.find(r); italic.replace(index, r.size()-1, "i"); - + //lyxerr << "Bold: " << bold << "\nItalic: " << italic << std::endl; c_bold.set_font(Gdk_Font(bold)); c_italic.set_font(Gdk_Font(italic)); @@ -75,9 +75,9 @@ void FormCredits::build() std::string::size_type end = credits.find('\n'); string const line = credits.substr(0, ++end); credits = credits.substr(end); - + // lyxerr << "Line got: '" << line << "'\nend = " << end << std::endl; - + string const prefix = line.substr(0, 2); if (prefix == bold) { text()->insert(c_bold, line.substr(2)); @@ -87,7 +87,7 @@ void FormCredits::build() text()->insert(line); } } - + // Allow the text area to be drawn. text()->thaw(); } diff --git a/src/frontends/gnome/FormCredits.h b/src/frontends/gnome/FormCredits.h index b80a3ebf93..0c0400aaab 100644 --- a/src/frontends/gnome/FormCredits.h +++ b/src/frontends/gnome/FormCredits.h @@ -1,12 +1,12 @@ // -*- C++ -*- /* This file is part of * ================================================= - * + * * LyX, The Document Processor * Copyright 1995 Matthias Ettrich. * Copyright 1995-2000 The LyX Team. * - * ================================================= + * ================================================= * * \author Michael Koziarski * */ @@ -38,9 +38,9 @@ public: void apply() {}; void update() {}; - + private: - + /// Build the dialog void build(); @@ -48,7 +48,7 @@ private: /// The ok button Gtk::Button * ok(); - + Gtk::Text * text(); }; diff --git a/src/frontends/gnome/FormERT.C b/src/frontends/gnome/FormERT.C index cac6f18b7f..fe0a69d7e0 100644 --- a/src/frontends/gnome/FormERT.C +++ b/src/frontends/gnome/FormERT.C @@ -1,10 +1,10 @@ /* This file is part of * ================================================= - * + * * LyX, The Document Processor * Copyright 1995-2000 The LyX Team. * - * ================================================= + * ================================================= * * \author Michael Koziarski */ @@ -44,7 +44,7 @@ void FormERT::build() // Make sure everything is in the correct state. bc().refresh(); - + // Manage the read-only aware widgets. bc().addReadOnly(open()); bc().addReadOnly(inlined()); @@ -76,7 +76,7 @@ void FormERT::apply() controller().params().status = InsetERT::Open; else if (collapsed()->get_active()) controller().params().status = InsetERT::Collapsed; - else + else controller().params().status = InsetERT::Inlined; } @@ -106,27 +106,27 @@ bool FormERT::validate() const } -Gtk::Button * FormERT::ok_btn() const +Gtk::Button * FormERT::ok_btn() const { - return getWidget("r_ok_btn"); + return getWidget("r_ok_btn"); } -Gtk::Button * FormERT::apply_btn() const +Gtk::Button * FormERT::apply_btn() const { - return getWidget("r_apply_btn"); + return getWidget("r_apply_btn"); } -Gtk::Button * FormERT::cancel_btn() const +Gtk::Button * FormERT::cancel_btn() const { - return getWidget("r_cancel_btn"); + return getWidget("r_cancel_btn"); } -Gtk::RadioButton * FormERT::open() const +Gtk::RadioButton * FormERT::open() const { - return getWidget("r_open"); + return getWidget("r_open"); } -Gtk::RadioButton * FormERT::collapsed() const +Gtk::RadioButton * FormERT::collapsed() const { - return getWidget("r_collapsed"); + return getWidget("r_collapsed"); } -Gtk::RadioButton * FormERT::inlined() const +Gtk::RadioButton * FormERT::inlined() const { - return getWidget("r_inlined"); + return getWidget("r_inlined"); } diff --git a/src/frontends/gnome/FormERT.h b/src/frontends/gnome/FormERT.h index a294947f04..d56c7f5dbb 100644 --- a/src/frontends/gnome/FormERT.h +++ b/src/frontends/gnome/FormERT.h @@ -1,12 +1,12 @@ // -*- C++ -*- /* This file is part of * ================================================= - * + * * LyX, The Document Processor * Copyright 1995 Matthias Ettrich. * Copyright 1995-2000 The LyX Team. * - * ================================================= + * ================================================= * * \author Michael Koziarski * */ @@ -38,7 +38,7 @@ public: void apply(); void update(); - + private: /// Build the dialog void build(); @@ -63,7 +63,7 @@ private: Gtk::RadioButton * collapsed() const; /// generated by accessors.py Gtk::RadioButton * inlined() const; - + /// do input validation SigC::Connection slot_open; diff --git a/src/frontends/gnome/FormError.C b/src/frontends/gnome/FormError.C index 729fc05a49..3654e5d936 100644 --- a/src/frontends/gnome/FormError.C +++ b/src/frontends/gnome/FormError.C @@ -1,10 +1,10 @@ /* This file is part of * ================================================= - * + * * LyX, The Document Processor * Copyright 1995-2000 The LyX Team. * - * ================================================= + * ================================================= * * \author Baruch Even */ @@ -44,12 +44,12 @@ void FormError::update() textarea()->insert(controller().params()); } -Gtk::Button * FormError::button_close() const +Gtk::Button * FormError::button_close() const { - return getWidget("r_button_close"); + return getWidget("r_button_close"); } -Gtk::Text * FormError::textarea() const +Gtk::Text * FormError::textarea() const { - return getWidget("r_textarea"); + return getWidget("r_textarea"); } diff --git a/src/frontends/gnome/FormError.h b/src/frontends/gnome/FormError.h index 2a01a1ab54..d4f10405a9 100644 --- a/src/frontends/gnome/FormError.h +++ b/src/frontends/gnome/FormError.h @@ -1,12 +1,12 @@ // -*- C++ -*- /* This file is part of * ================================================= - * + * * LyX, The Document Processor * Copyright 1995 Matthias Ettrich. * Copyright 1995-2000 The LyX Team. * - * ================================================= + * ================================================= * * \author Baruch Even * */ @@ -41,7 +41,7 @@ public: void apply() {} /// void update(); - + private: /// Build the dialog void build(); @@ -51,7 +51,7 @@ private: /// void CloseClicked() { CancelButton(); } - + /// generated by accessors.py Gtk::Button * button_close() const; /// generated by accessors.py diff --git a/src/frontends/gnome/FormIndex.C b/src/frontends/gnome/FormIndex.C index 7e787bc015..5392c43fbb 100644 --- a/src/frontends/gnome/FormIndex.C +++ b/src/frontends/gnome/FormIndex.C @@ -1,5 +1,5 @@ /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * @@ -61,10 +61,10 @@ FormIndex::~FormIndex() void FormIndex::showInset( InsetCommand * const inset ) { if( dialog_!=0 || inset == 0 ) return; - + inset_ = inset; ih_ = inset_->hideDialog.connect(slot(this, &FormIndex::hide)); - + params = inset->params(); show(); } @@ -72,7 +72,7 @@ void FormIndex::showInset( InsetCommand * const inset ) void FormIndex::createInset( string const & arg ) { if( dialog_!=0 ) return; - + params.setFromString( arg ); show(); } @@ -82,17 +82,17 @@ void FormIndex::show() if (!dialog_) { using namespace Gtk::Box_Helpers; - + Gtk::Label * label = manage( new Gtk::Label(_("Keyword")) ); Gtk::Box * mbox = manage( new Gtk::HBox() ); Gtk::ButtonBox * bbox = manage( new Gtk::HButtonBox() ); Gtk::Separator * sep = manage( new Gtk::VSeparator() ); keyword_ = manage( new Gnome::Entry() ); - + b_ok = Gtk::wrap( GTK_BUTTON( gnome_stock_button(GNOME_STOCK_BUTTON_OK) ) ); b_cancel = Gtk::wrap( GTK_BUTTON( gnome_stock_button(GNOME_STOCK_BUTTON_CANCEL) ) ); - + // set up spacing mbox->set_spacing(2); bbox->set_spacing(4); @@ -101,7 +101,7 @@ void FormIndex::show() keyword_->set_max_saved(10); keyword_->load_history(); keyword_->set_use_arrows_always(true); - + // packing bbox->children().push_back(Element(*b_ok, false, false)); bbox->children().push_back(Element(*b_cancel, false, false)); @@ -142,19 +142,19 @@ void FormIndex::updateSlot(bool switched) hide(); return; } - + if (dialog_ != 0 && lv_->view()->available()) { keyword_->get_entry()->set_text(params.getContents().c_str()); - + bool sens = (!(lv_->buffer()->isReadonly())); - + keyword_->set_sensitive(sens); b_ok->set_sensitive(sens); } } - + void FormIndex::hide() { if (dialog_!=0) mainAppWin->remove_action(); @@ -199,4 +199,3 @@ void FormIndex::apply() // hide the dialog hide(); } - diff --git a/src/frontends/gnome/FormIndex.h b/src/frontends/gnome/FormIndex.h index 28132b648b..9820ca40f1 100644 --- a/src/frontends/gnome/FormIndex.h +++ b/src/frontends/gnome/FormIndex.h @@ -1,6 +1,6 @@ // -*- C++ -*- /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * @@ -37,7 +37,7 @@ private: void createInset( string const & ); /// Slot launching dialog to an existing inset void showInset( InsetCommand * const ); - + /// Update dialog before showing it virtual void update() { } virtual void updateSlot(bool = false); @@ -49,7 +49,7 @@ private: void show(); /// Hide the dialog. void hide(); - + /** Which LyXFunc do we use? We could modify Dialogs to have a visible LyXFunc* instead and save a couple of bytes per dialog. diff --git a/src/frontends/gnome/FormPrint.C b/src/frontends/gnome/FormPrint.C index d2ee57de3b..e1309f0eaa 100644 --- a/src/frontends/gnome/FormPrint.C +++ b/src/frontends/gnome/FormPrint.C @@ -1,7 +1,7 @@ /* FormPrint.C * FormPrint Interface Class Implementation * This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * @@ -140,10 +140,10 @@ void FormPrint::apply() from = print_from_->get_text(); to = print_to_->get_value_as_int(); } - + PrinterParams::Target t(PrinterParams::PRINTER); if (printto_file_->get_active()) t = PrinterParams::FILE; - + // we really should use the return value here I think. if (!printBuffer(lv_->buffer(), PrinterParams(t, @@ -183,17 +183,17 @@ void FormPrint::updateSlot(bool) case PrinterParams::ODD: print_odd_->set_active(true); break; - + case PrinterParams::EVEN: print_even_->set_active(true); break; - + case PrinterParams::ALL: default: print_all_->set_active(true); break; } - + // hmmm... maybe a bit weird but maybe not // we might just be remembering the last // time this was printed. diff --git a/src/frontends/gnome/FormPrint.h b/src/frontends/gnome/FormPrint.h index ab90e572e2..d5be0183de 100644 --- a/src/frontends/gnome/FormPrint.h +++ b/src/frontends/gnome/FormPrint.h @@ -1,9 +1,9 @@ // -*- C++ -*- /* This file is part of - * ====================================================== - * + * ====================================================== + * * LyX, The Document Processor - * + * * Copyright 2000 The LyX Team. * * ====================================================== */ @@ -43,7 +43,7 @@ public: /// ~FormPrint(); //@} - + private: /**@name Slot Methods */ @@ -58,18 +58,18 @@ private: /// Free memory void free(); //@} - + /**@name Dialog internal methods */ //@{ /// Apply from dialog void apply(); //@} - + /**@name Private Data */ //@{ /// Real GUI implementation. Gtk::Widget * dialog_; - + Gtk::RadioButton * print_all_; Gtk::RadioButton * print_odd_; Gtk::RadioButton * print_even_; @@ -78,7 +78,7 @@ private: Gtk::SpinButton * print_from_; Gtk::SpinButton * print_to_; - + Gtk::RadioButton * order_normal_; Gtk::RadioButton * order_reverse_; @@ -90,7 +90,7 @@ private: Gnome::Entry * printto_printcommand_; Gnome::FileEntry * printto_fileentry_; - + /// Which LyXView do we belong to? LyXView * lv_; Dialogs * d_; diff --git a/src/frontends/gnome/FormRef.C b/src/frontends/gnome/FormRef.C index 6cacca2e99..e18476ea42 100644 --- a/src/frontends/gnome/FormRef.C +++ b/src/frontends/gnome/FormRef.C @@ -1,5 +1,5 @@ /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * @@ -69,12 +69,12 @@ FormRef::~FormRef() void FormRef::showInset( InsetCommand * const inset ) { if( dialog_!=0 || inset == 0 ) return; - + inset_ = inset; ih_ = inset_->hideDialog.connect(slot(this, &FormRef::hide)); acttype_ = EDIT; - + params = inset->params(); showStageAction(); } @@ -83,7 +83,7 @@ void FormRef::showInset( InsetCommand * const inset ) void FormRef::createInset( string const & arg ) { if( dialog_!=0 ) return; - + acttype_ = INSERT; params.setFromString( arg ); @@ -128,7 +128,7 @@ void FormRef::showStageError(string const & mess) h_ = d_->hideBufferDependent.connect(slot(this, &FormRef::hide)); } } - + void FormRef::showStageSelect() { @@ -156,7 +156,7 @@ void FormRef::showStageSelect() list_->rows().push_back(r); } list_->rows()[0].select(); // there is always at least one item. otherwise we go to stateError - + b_ok = Gtk::wrap( GTK_BUTTON( gnome_stock_button(GNOME_STOCK_BUTTON_OK) ) ); b_cancel = Gtk::wrap( GTK_BUTTON( gnome_stock_button(GNOME_STOCK_BUTTON_CANCEL) ) ); @@ -177,11 +177,11 @@ void FormRef::showStageSelect() bbox->children().push_back(Element(*b_cancel, false, false)); alig->add( *bbox ); - + mbox->children().push_back(Element(*sw, true, true)); mbox->children().push_back(Element(*manage(new Gtk::VSeparator()), false, false)); mbox->children().push_back(Element(*alig, false, false)); - + // packing dialog to main window dialog_ = mbox; mainAppWin->add_action(*dialog_, _(" Reference: Select reference "), true); @@ -225,14 +225,14 @@ void FormRef::showStageAction() b_goto = manage(new Gnome::PixButton(GOTO_REF_LABEL, GNOME_STOCK_PIXMAP_JUMP_TO)); gototype_ = GOREF; - + name_ = manage( new Gnome::Entry() ); choice_ = manage( new Gtk::OptionMenu() ); - + b_ok = Gtk::wrap( GTK_BUTTON( gnome_stock_button(GNOME_STOCK_BUTTON_OK) ) ); b_cancel = Gtk::wrap( GTK_BUTTON( gnome_stock_button(GNOME_STOCK_BUTTON_CANCEL) ) ); - + // set up spacing table->set_row_spacings(4); table->set_col_spacings(4); @@ -252,7 +252,7 @@ void FormRef::showStageAction() // fill choice Gtk::Menu * menu = manage( new Gtk::Menu() ); Gtk::MenuItem * e; - + e = manage( new Gtk::MenuItem(_("Ref")) ); e->activate.connect(bind(slot(this, &FormRef::changeType), REF)); e->show(); @@ -281,7 +281,7 @@ void FormRef::showStageAction() choice_-> set_menu ( *menu ); switch ( getType() ) { - case REF: { choice_-> set_history(0); break; } + case REF: { choice_-> set_history(0); break; } case PAGEREF: { choice_-> set_history(1); break; } case VREF: { choice_-> set_history(2); break; } case VPAGEREF: { choice_-> set_history(3); break; } @@ -289,16 +289,16 @@ void FormRef::showStageAction() } changeType( getType() ); - + // filling widgets with data name_->get_entry()->set_text(params.getOptions()); - + // pack widgets bbox->children().push_back(Element(*b_goto, false, false)); bbox->children().push_back(Element(*b_ok, false, false)); bbox->children().push_back(Element(*b_cancel, false, false)); - + table->attach( *manage( new Gtk::Label(_("Type:")) ), 0, 1, 0, 1, 0, 0 ); table->attach( *manage( new Gtk::Label(_("Name:")) ), 0, 1, 1, 2, 0, 0 ); table->attach( *choice_, 1, 2, 0, 1 ); @@ -379,10 +379,10 @@ void FormRef::apply() { if ( lv_->buffer()->isReadonly() ) return; - + params.setCmdName(getName(reftype_)); params.setOptions(name_->get_entry()->get_text()); - + if (inset_ != 0) { // Only update if contents have changed @@ -401,7 +401,7 @@ void FormRef::apply() // save configuration name_->save_history(); - + // hide the dialog hide(); } @@ -414,22 +414,22 @@ void FormRef::changeType(Type t) FormRef::Type FormRef::getType() const { Type type; - + if( params.getCmdName() == "ref" ) type = REF; - + else if( params.getCmdName() == "pageref" ) type = PAGEREF; - + else if( params.getCmdName() == "vref" ) type = VREF; - + else if( params.getCmdName() == "vpageref" ) type = VPAGEREF; - + else type = PRETTYREF; - + return type; } @@ -437,7 +437,7 @@ FormRef::Type FormRef::getType() const string FormRef::getName( Type type ) const { string name; - + switch( type ) { case REF: name = "ref"; @@ -455,6 +455,6 @@ string FormRef::getName( Type type ) const name = "prettyref"; break; } - + return name; } diff --git a/src/frontends/gnome/FormRef.h b/src/frontends/gnome/FormRef.h index 22a214fdbc..b0e112f8d8 100644 --- a/src/frontends/gnome/FormRef.h +++ b/src/frontends/gnome/FormRef.h @@ -1,6 +1,6 @@ // -*- C++ -*- /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * @@ -69,9 +69,9 @@ private: void createInset( string const & ); /// Slot launching dialog to an existing inset void showInset( InsetCommand * const ); - + /// Update dialog before showing it (not used in this implementation) - virtual void update() { } + virtual void update() { } virtual void updateSlot(bool = false); /// Apply from dialog (modify or create inset) virtual void apply(); @@ -89,7 +89,7 @@ private: void hide(); /// Go to reference or return back void gotoRef(); - + /// moves from Search to Select "stage" void moveFromSelectToAction(); @@ -119,7 +119,7 @@ private: SigC::Connection h_; /// inset::hide connection. SigC::Connection ih_; - /// + /// std::vector refs; /// Type reftype_; @@ -127,7 +127,7 @@ private: Goto gototype_; /// ActionType acttype_; - + /// Real GUI implementation. Gtk::Container * dialog_; Gtk::CList * list_; diff --git a/src/frontends/gnome/FormTabularCreate.C b/src/frontends/gnome/FormTabularCreate.C index e2b74b6696..8c2a97a3ef 100644 --- a/src/frontends/gnome/FormTabularCreate.C +++ b/src/frontends/gnome/FormTabularCreate.C @@ -1,10 +1,10 @@ /* This file is part of * ================================================= - * + * * LyX, The Document Processor * Copyright 1995-2000 The LyX Team. * - * ================================================= + * ================================================= * * \author Michael Koziarski */ @@ -39,13 +39,13 @@ FormTabularCreate::~FormTabularCreate() void FormTabularCreate::build() { // Connect the buttons. - ok_btn()->clicked.connect(SigC::slot(this, - &FormTabularCreate::OKClicked)); - cancel_btn()->clicked.connect(SigC::slot(this, - &FormTabularCreate::CancelClicked)); - apply_btn()->clicked.connect(SigC::slot(this, - &FormTabularCreate::ApplyClicked)); - + ok_btn()->clicked.connect(SigC::slot(this, + &FormTabularCreate::OKClicked)); + cancel_btn()->clicked.connect(SigC::slot(this, + &FormTabularCreate::CancelClicked)); + apply_btn()->clicked.connect(SigC::slot(this, + &FormTabularCreate::ApplyClicked)); + // Manage the buttons state bc().setOK(ok_btn()); bc().setCancel(cancel_btn()); @@ -71,29 +71,28 @@ void FormTabularCreate::update() bool FormTabularCreate::validate() const { - return ( rows()->get_value_as_int() > 0 ) && + return ( rows()->get_value_as_int() > 0 ) && ( cols()->get_value_as_int() > 0 ); } -Gtk::Button * FormTabularCreate::ok_btn() const +Gtk::Button * FormTabularCreate::ok_btn() const { - return getWidget("r_ok_btn"); + return getWidget("r_ok_btn"); } -Gtk::Button * FormTabularCreate::apply_btn() const +Gtk::Button * FormTabularCreate::apply_btn() const { - return getWidget("r_apply_btn"); + return getWidget("r_apply_btn"); } -Gtk::Button * FormTabularCreate::cancel_btn() const +Gtk::Button * FormTabularCreate::cancel_btn() const { - return getWidget("r_cancel_btn"); + return getWidget("r_cancel_btn"); } -Gtk::SpinButton * FormTabularCreate::rows() const +Gtk::SpinButton * FormTabularCreate::rows() const { - return getWidget("r_rows"); + return getWidget("r_rows"); } -Gtk::SpinButton * FormTabularCreate::cols() const +Gtk::SpinButton * FormTabularCreate::cols() const { - return getWidget("r_cols"); + return getWidget("r_cols"); } - diff --git a/src/frontends/gnome/FormTabularCreate.h b/src/frontends/gnome/FormTabularCreate.h index eb2d06c033..4142d197a4 100644 --- a/src/frontends/gnome/FormTabularCreate.h +++ b/src/frontends/gnome/FormTabularCreate.h @@ -1,12 +1,12 @@ // -*- C++ -*- /* This file is part of * ================================================= - * + * * LyX, The Document Processor * Copyright 1995 Matthias Ettrich. * Copyright 1995-2000 The LyX Team. * - * ================================================= + * ================================================= * * \author Michael Koziarski * */ @@ -36,7 +36,7 @@ public: ~FormTabularCreate(); void apply(); - + private: /// Build the dialog void build(); diff --git a/src/frontends/gnome/FormToc.C b/src/frontends/gnome/FormToc.C index 31efa078be..e694a0c5e1 100644 --- a/src/frontends/gnome/FormToc.C +++ b/src/frontends/gnome/FormToc.C @@ -1,5 +1,5 @@ /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * @@ -56,10 +56,10 @@ FormToc::~FormToc() void FormToc::showInset( InsetCommand * const inset ) { if ( dialog_!=0 || inset == 0 ) return; - + inset_ = inset; ih_ = inset_->hideDialog.connect(SigC::slot(this, &FormToc::hide)); - + params = inset->params(); show(); } @@ -68,7 +68,7 @@ void FormToc::showInset( InsetCommand * const inset ) void FormToc::createInset( string const & arg ) { if( dialog_!=0 ) return; - + params.setFromString( arg ); show(); } @@ -95,7 +95,7 @@ void FormToc::show() Gtk::MenuItem * e; choice_->get_menu()->items().clear(); - + e = manage( new Gtk::MenuItem(_("Table of Contents")) ); e->activate.connect(SigC::bind(SigC::slot(this, &FormToc::changeList), Buffer::TOC_TOC)); choice_->get_menu()->append( *e ); @@ -115,7 +115,7 @@ void FormToc::show() // wrap buttons and connect slots b_refresh = Gtk::wrap( GTK_BUTTON( lookup_widget(pd, "button_refresh") ) ); b_close = Gtk::wrap( GTK_BUTTON( lookup_widget(pd, "button_close") ) ); - + b_refresh->clicked.connect(SigC::bind(SigC::slot(this, &FormToc::updateSlot),false)); b_close->clicked.connect(dialog_->destroy.slot()); dialog_->destroy.connect(SigC::slot(this, &FormToc::free)); @@ -152,14 +152,14 @@ void FormToc::updateSlot(bool) list_->items().push_back( *l ); return; } - - + + if (dialog_ != 0 && lv_->view()->available()) { int selection = 0; - + if( params.getCmdName() == "tableofcontents" ) { type = Buffer::TOC_TOC; @@ -188,7 +188,7 @@ void FormToc::updateSlot(bool) ignore_callback_ = true; choice_->set_history(selection); ignore_callback_ = false; - + list_->items().clear(); dialog_->set_title(wintitle); @@ -212,7 +212,7 @@ void FormToc::updateSlot(bool) void FormToc::apply(Buffer::TocItem tg) { -#if 0 +#if 0 // Doesn't compile anymore... if (!lv_->view()->available()) return; @@ -264,4 +264,3 @@ void FormToc::free() ih_.disconnect(); } } - diff --git a/src/frontends/gnome/FormToc.h b/src/frontends/gnome/FormToc.h index 562f5af545..088802af62 100644 --- a/src/frontends/gnome/FormToc.h +++ b/src/frontends/gnome/FormToc.h @@ -4,7 +4,7 @@ // #if 0 // // -*- C++ -*- // /* This file is part of -// * ====================================================== +// * ====================================================== // * // * LyX, The Document Processor // * @@ -42,9 +42,9 @@ // void createInset( string const & ); // /// Slot launching dialog to an existing inset // void showInset( InsetCommand * const ); - + // /// Update dialog before showing it -// virtual void update() { } +// virtual void update() { } // virtual void updateSlot(bool = false); // /// Explicitly free the dialog. // void free(); @@ -56,7 +56,7 @@ // void apply(Buffer::TocItem); // /// change type of the list // void changeList(Buffer::TocType); - + // /** Which LyXFunc do we use? // We could modify Dialogs to have a visible LyXFunc* instead and // save a couple of bytes per dialog. diff --git a/src/frontends/gnome/FormUrl.C b/src/frontends/gnome/FormUrl.C index a968af512f..0b128ed39b 100644 --- a/src/frontends/gnome/FormUrl.C +++ b/src/frontends/gnome/FormUrl.C @@ -1,10 +1,10 @@ /* This file is part of * ================================================= - * + * * LyX, The Document Processor * Copyright 1995-2000 The LyX Team. * - * ================================================= + * ================================================= * * \author Baruch Even */ @@ -51,7 +51,7 @@ void FormUrl::build() // Make sure everything is in the correct state. bc().refresh(); - + // Manage the read-only aware widgets. bc().addReadOnly(html_cb()); bc().addReadOnly(name()); @@ -97,7 +97,7 @@ void FormUrl::update() // This avoids the problem of having the buttons enabled when the dialog // starts. disconnect_signals(); - + url()->set_text(controller().params().getContents()); name()->set_text(controller().params().getOptions()); @@ -113,33 +113,31 @@ bool FormUrl::validate() const return !url()->get_text().empty() && !name()->get_text().empty(); } -Gtk::Button * FormUrl::restore_btn() const +Gtk::Button * FormUrl::restore_btn() const { - return getWidget("r_restore_btn"); + return getWidget("r_restore_btn"); } -Gtk::Button * FormUrl::ok_btn() const +Gtk::Button * FormUrl::ok_btn() const { - return getWidget("r_ok_btn"); + return getWidget("r_ok_btn"); } -Gtk::Button * FormUrl::apply_btn() const +Gtk::Button * FormUrl::apply_btn() const { - return getWidget("r_apply_btn"); + return getWidget("r_apply_btn"); } -Gtk::Button * FormUrl::cancel_btn() const +Gtk::Button * FormUrl::cancel_btn() const { - return getWidget("r_cancel_btn"); + return getWidget("r_cancel_btn"); } -Gtk::Entry * FormUrl::url() const +Gtk::Entry * FormUrl::url() const { - return getWidget("r_url"); + return getWidget("r_url"); } -Gtk::Entry * FormUrl::name() const +Gtk::Entry * FormUrl::name() const { - return getWidget("r_name"); + return getWidget("r_name"); } -Gtk::CheckButton * FormUrl::html_cb() const +Gtk::CheckButton * FormUrl::html_cb() const { - return getWidget("r_html_cb"); + return getWidget("r_html_cb"); } - - diff --git a/src/frontends/gnome/FormUrl.h b/src/frontends/gnome/FormUrl.h index 3d25fc5389..ffdf996ff8 100644 --- a/src/frontends/gnome/FormUrl.h +++ b/src/frontends/gnome/FormUrl.h @@ -1,12 +1,12 @@ // -*- C++ -*- /* This file is part of * ================================================= - * + * * LyX, The Document Processor * Copyright 1995 Matthias Ettrich. * Copyright 1995-2000 The LyX Team. * - * ================================================= + * ================================================= * * \author Baruch Even * */ @@ -39,7 +39,7 @@ public: void apply(); void update(); - + private: /// Build the dialog void build(); @@ -66,7 +66,7 @@ private: Gtk::Entry * name() const; /// generated by accessors.py Gtk::CheckButton * html_cb() const; - + /// Keeps the connection to the input validator. SigC::Connection slot_url_; SigC::Connection slot_name_; diff --git a/src/frontends/gnome/GUIRunTime.C b/src/frontends/gnome/GUIRunTime.C index ca9b855382..ccd1d48d8d 100644 --- a/src/frontends/gnome/GUIRunTime.C +++ b/src/frontends/gnome/GUIRunTime.C @@ -1,9 +1,8 @@ - /* This file is part of * ====================================================== - * + * * LyX, The Document Processor - * + * * Copyright 2000 The LyX Team. * *======================================================*/ @@ -86,7 +85,7 @@ int GUIRunTime::initApplication(int &, char * argv[]) return 0; } -void GUIRunTime::processEvents() +void GUIRunTime::processEvents() { while (Gnome::Main::instance()->events_pending()) Gnome::Main::instance()->iteration(FALSE); @@ -143,7 +142,7 @@ void GUIRunTime::initialiseGraphics() { using namespace grfx; using SigC::slot; - + #if defined(HAVE_FLIMAGE_DUP) && defined(HAVE_FLIMAGE_TO_PIXMAP) // connect the image loader based on the xforms library GImage::newImage.connect(slot(&xformsGImage::newImage)); diff --git a/src/frontends/gnome/GnomeBase.C b/src/frontends/gnome/GnomeBase.C index b524d9833a..8bff90e9b7 100644 --- a/src/frontends/gnome/GnomeBase.C +++ b/src/frontends/gnome/GnomeBase.C @@ -1,6 +1,6 @@ /* This file is part of * ================================================= - * + * * LyX, The Document Processor * Copyright 1995 Matthias Ettrich. * Copyright 1995-2000 The LyX Team. @@ -20,20 +20,20 @@ #include -GnomeBase::GnomeBase(ControlButtons & c, +GnomeBase::GnomeBase(ControlButtons & c, string const & name) : ViewBC(c) , file_(name + ".glade"), widget_name_(name), xml_(0) , dialog_(0) {} - + GnomeBase::~GnomeBase() { if (xml_) gtk_object_unref(GTK_OBJECT(xml_)); } - + void GnomeBase::loadXML() const { #ifdef WITH_WARNINGS @@ -46,9 +46,9 @@ void GnomeBase::loadXML() const lyxerr << "Cannot find glade file. Aborting." << std::endl; lyx::Assert(true); } - + lyxerr[Debug::GUI] << "Glade file to open is " << file << '\n'; - + xml_ = glade_xml_new(file.c_str(), widget_name_.c_str()); } @@ -76,36 +76,36 @@ bool GnomeBase::validate() return true; } -void GnomeBase::OKClicked() -{ +void GnomeBase::OKClicked() +{ lyxerr[Debug::GUI] << "OKClicked()\n"; - OKButton(); + OKButton(); } -void GnomeBase::CancelClicked() -{ - CancelButton(); +void GnomeBase::CancelClicked() +{ + CancelButton(); } -void GnomeBase::ApplyClicked() -{ - ApplyButton(); +void GnomeBase::ApplyClicked() +{ + ApplyButton(); } -void GnomeBase::RestoreClicked() -{ - RestoreButton(); +void GnomeBase::RestoreClicked() +{ + RestoreButton(); } -void GnomeBase::InputChanged() -{ - bc().valid(validate()); +void GnomeBase::InputChanged() +{ + bc().valid(validate()); } Gnome::Dialog * GnomeBase::dialog() { - if (!dialog_) + if (!dialog_) dialog_ = getWidget(widget_name_.c_str()); - + return dialog_; } diff --git a/src/frontends/gnome/GnomeBase.h b/src/frontends/gnome/GnomeBase.h index 2b4f2f0064..b795b8621e 100644 --- a/src/frontends/gnome/GnomeBase.h +++ b/src/frontends/gnome/GnomeBase.h @@ -1,11 +1,11 @@ // -*- C++ -*- /* This file is part of * ================================================= - * + * * LyX, The Document Processor * Copyright 1995-2000 The LyX Team. * - * ================================================= + * ================================================= * * \author Baruch Even **/ @@ -32,7 +32,7 @@ class Dialog; */ class GnomeBase : public ViewBC, public SigC::Object { public: - /// + /// GnomeBase(ControlButtons & c, string const & name); /// virtual ~GnomeBase(); @@ -40,7 +40,7 @@ public: protected: /// Get the widget named 'name' from the xml representation. template - T* getWidget(char const * name) const; + T* getWidget(char const * name) const; /// Get the dialog we use. Gnome::Dialog * dialog(); @@ -93,7 +93,7 @@ T* GnomeBase::getWidget(char const * name) const /** * This class is used to provide a simple automatic casting of the controller. - * We chose not to make GnomeBase a template since it has some size and we + * We chose not to make GnomeBase a template since it has some size and we * have no reason to duplicate it by making it a template. * * Basically the FormCB template instantiates GnomeBase and passes diff --git a/src/frontends/gnome/Timeout_pimpl.C b/src/frontends/gnome/Timeout_pimpl.C index 97dba44e76..c397a628c9 100644 --- a/src/frontends/gnome/Timeout_pimpl.C +++ b/src/frontends/gnome/Timeout_pimpl.C @@ -31,16 +31,16 @@ void Timeout::Pimpl::reset() bool Timeout::Pimpl::running() const { - return running_; + return running_; } - + void Timeout::Pimpl::start() { if (conn_.connected()) { lyxerr << "Timeout::start: already running!" << std::endl; stop(); } - + conn_ = Gnome::Main::timeout.connect( SigC::slot(this, &Timeout::Pimpl::timeoutEvent), owner_->timeout_ms diff --git a/src/frontends/gnome/Timeout_pimpl.h b/src/frontends/gnome/Timeout_pimpl.h index edd9a69001..1979041a7e 100644 --- a/src/frontends/gnome/Timeout_pimpl.h +++ b/src/frontends/gnome/Timeout_pimpl.h @@ -31,10 +31,10 @@ public: /// stop the timer void stop(); /// reset - void reset(); - /// Is the timer running? - bool running() const; - + void reset(); + /// Is the timer running? + bool running() const; + public: /// The timeout signal, this gets called when the timeout passed. @@ -44,8 +44,8 @@ private: Timeout * owner_; /// Timer connection SigC::Connection conn_; - /// Used for running as SigC::Connection::connected() isn't const - bool running_; + /// Used for running as SigC::Connection::connected() isn't const + bool running_; }; #endif diff --git a/src/frontends/gnome/gnomeBC.C b/src/frontends/gnome/gnomeBC.C index a4e7d34405..810e8a9d67 100644 --- a/src/frontends/gnome/gnomeBC.C +++ b/src/frontends/gnome/gnomeBC.C @@ -21,7 +21,7 @@ void gnomeBC::setWidgetEnabled(Gtk::Widget * obj, bool enabled) } -void gnomeBC::setButtonEnabled(Gtk::Button * btn, bool enabled) +void gnomeBC::setButtonEnabled(Gtk::Button * btn, bool enabled) { if (btn) btn->set_sensitive(enabled); diff --git a/src/frontends/gnome/gnome_helpers.C b/src/frontends/gnome/gnome_helpers.C index e946ebe3b6..0dd4e2a7d2 100644 --- a/src/frontends/gnome/gnome_helpers.C +++ b/src/frontends/gnome/gnome_helpers.C @@ -1,8 +1,8 @@ /* This file is part of - * ====================================================== - * + * ====================================================== + * * LyX, The Document Processor - * + * * Copyright 2000 The LyX Team. * * ====================================================== */ @@ -52,7 +52,7 @@ get_font_name (const GdkFont * font) #endif status = XGetFontProperty (font_structs[0], font_atom, &atom); } else { - status = XGetFontProperty ( + status = XGetFontProperty ( static_cast(GDK_FONT_XFONT (font)) , font_atom, &atom); } diff --git a/src/frontends/gnome/gnome_helpers.h b/src/frontends/gnome/gnome_helpers.h index 8c7094e0fe..8f63fd1d63 100644 --- a/src/frontends/gnome/gnome_helpers.h +++ b/src/frontends/gnome/gnome_helpers.h @@ -1,7 +1,7 @@ // -*- C++ -*- /* This file is part of * ================================================= - * + * * LyX, The Document Processor * Copyright 1995-2000 The LyX Team. * @@ -18,7 +18,7 @@ #include #include -// Glade Helper Function. +// Glade Helper Function. /** This function will get a widget from the glade XML representation and @@ -26,7 +26,7 @@ */ template T* getWidgetPtr(GladeXML* xml, char const * name) -{ +{ T* result = static_cast(Gtk::wrap_auto((GtkObject*)glade_xml_get_widget(xml, name))); if (result == NULL) { diff --git a/src/frontends/gnome/pixbutton.h b/src/frontends/gnome/pixbutton.h index 955c1bb878..bbec75cf57 100644 --- a/src/frontends/gnome/pixbutton.h +++ b/src/frontends/gnome/pixbutton.h @@ -1,9 +1,9 @@ // -*- C++ -*- /* This file is part of - * ====================================================== - * + * ====================================================== + * * LyX, The Document Processor - * + * * Copyright 2000 The LyX Team. * * ====================================================== */ @@ -38,7 +38,7 @@ namespace Gnome add(*b); accelkey_ = l->parse_uline(label); - + l->show(); p->show(); b->show(); @@ -55,4 +55,3 @@ namespace Gnome } #endif - diff --git a/src/frontends/gnome/support.h b/src/frontends/gnome/support.h index d9bb0728a7..f05ed8d78e 100644 --- a/src/frontends/gnome/support.h +++ b/src/frontends/gnome/support.h @@ -15,7 +15,7 @@ * you want returned. */ GtkWidget* lookup_widget (GtkWidget *widget, - const gchar *widget_name); + const gchar *widget_name); /* get_widget() is deprecated. Use lookup_widget instead. */ #define get_widget lookup_widget @@ -27,8 +27,7 @@ GtkWidget* lookup_widget (GtkWidget *widget, /* This is used to create the pixmaps in the interface. */ GtkWidget* create_pixmap (GtkWidget *widget, - const gchar *filename, - gboolean gnome_pixmap); + const gchar *filename, + gboolean gnome_pixmap); GdkImlibImage* create_image (const gchar *filename); - diff --git a/src/frontends/qt2/Alert_pimpl.C b/src/frontends/qt2/Alert_pimpl.C index 2be46343b9..5939e3ddd7 100644 --- a/src/frontends/qt2/Alert_pimpl.C +++ b/src/frontends/qt2/Alert_pimpl.C @@ -12,17 +12,17 @@ #include #include #include "ui/QAskForTextDialog.h" - + #include FORMS_H_LOCATION - + #include - + #include - + #include "Alert.h" -#include "Alert_pimpl.h" +#include "Alert_pimpl.h" #include "xforms_helpers.h" - + using std::pair; using std::make_pair; @@ -50,15 +50,15 @@ pair const askForText_pimpl(string const & msg, string const & dfl { string title = _("LyX: "); title += msg; - - QAskForTextDialog d(0, msg.c_str(), true); + + QAskForTextDialog d(0, msg.c_str(), true); // less than ideal ! d.askLA->setText((string("&") + msg).c_str()); d.askLE->setText(dflt.c_str()); int ret = d.exec(); d.hide(); - + if (ret) return make_pair(true, d.askLE->text().latin1()); else diff --git a/src/frontends/qt2/ChangeLog b/src/frontends/qt2/ChangeLog index 219be1c548..f3d33e2397 100644 --- a/src/frontends/qt2/ChangeLog +++ b/src/frontends/qt2/ChangeLog @@ -1,3 +1,7 @@ +2002-03-21 Lars Gullik Bjønnes + + * most files: ws cleanup + 2002-03-11 Lars Gullik Bjønnes * docygen fixes. @@ -30,20 +34,20 @@ * ui/moc/Makefile.am: fix compile * xforms/: compile the necessary files via symlinks - + * QPreambleDialog.C: new systemcall interface * Timeout_pimpl.h: * Timeout_pimpl.C: add running() - * Dialogs.C: add init graphics, and doc/par xforms forms - + * Dialogs.C: add init graphics, and doc/par xforms forms + 2002-02-06 John Levon * QToc.C: fix crash - + 2002-02-06 Edwin Leuven - + * QGraphics.C: compilation fix * QTexinfoDialog.C: * QTexinfoDialog.h: @@ -99,7 +103,7 @@ * Makefile.am: * Makefile.dialogs: don't compile QPar/Doc for now, as they cause problems - + 2002-01-20 John Levon * Makefile.am: @@ -109,7 +113,7 @@ * QTocDialog.h: * QTocDialog.C: * ui/QTocDialog.ui: resuscitate TOC dialog - + 2002-01-20 John Levon * QCitation.h: @@ -132,15 +136,15 @@ 2002-01-15 John Levon - * Makefile.am: + * Makefile.am: * FileDialog_private.h: fix compile * QThesaurus.h: * QThesaurus.C: * QThesaurusDialog.h: * QThesaurusDialog.C: - * ui/QThesaurusDialog.ui: new thesaurus code - + * ui/QThesaurusDialog.ui: new thesaurus code + 2002-01-14 Angus Leeming * QMinipage.C (apply, update_contents): MinipageParams::width renamed @@ -149,12 +153,12 @@ 2002-01-04 John Levon * QParagraph.C: add needed include - + 2001-12-08 John Levon * Makefile.am: * Dialogs.C: bring back unconverted dialogs - + 2001-12-05 John Levon * QParagraph.C: @@ -162,14 +166,14 @@ * QParagraphDialog.C: use new vspace API * QTocDialog.C: silence warnings - + 2001-12-05 Lars Gullik Bjønnes - * qttableview.C: change "while(" to "while (" + * qttableview.C: change "while(" to "while (" 2001-12-05 Allan Rae - * QParagraph.C (apply): + * QParagraph.C (apply): (update): Use the right LyXText -- extending John's fix 2001-12-01 Maks Orlovich @@ -202,17 +206,17 @@ * ui/moc/Makefile.am: remove unportable # at beginning of declaration. - * ui/Makefile.am: + * ui/Makefile.am: * Makefile.am: remove extra DISTCLEANFILES declaration 2001-10-07 Adrien Rebollo - * ui/QDocumentDialog.ui: + * ui/QDocumentDialog.ui: * QDocument.C (build_dialog): support latin4 2001-10-05 Adrien Rebollo - * ui/QDocumentDialog.ui: + * ui/QDocumentDialog.ui: * QDocument.C (build_dialog): support latin3 2001-09-27 Angus Leeming @@ -229,7 +233,7 @@ * QRef.C: fix compile * README: update - + 2001-09-09 Lars Gullik Bjønnes * Makefile.am (libqt2_la_LIBADD): rename from OBJADD, depend on @@ -238,9 +242,9 @@ 2001-09-06 John Levon * ui/QMinipageDialog.ui: fix layout, remove old slot - + * QRefDialog.C: fix warning - + 2001-09-02 Edwin Leuven * ui/QSpellcheckerDialog.ui: reworded layout @@ -257,7 +261,7 @@ * QSpellchecker.[Ch]: * QSpellcheckerDialog.[Ch]: * ui/QSpellcheckerDialog.ui: add spellchecker dialog - + 2001-08-31 Edwin Leuven * ui/QMinipageDialog.ui: layout tweak again (but it's getting better) @@ -282,21 +286,21 @@ * emptytable.C: * ui/QTabularCreateDialog.ui: fix layout when table size is changed - + 2001-08-31 John Levon * Dialogs.C: * QSearch.[Ch]: * QSearchDialog.[Ch]: * ui/QSearchDialog.ui: add search back - + 2001-08-29 John Levon * Dialogs.C: * QPrint.[Ch]: * QPrintDialog.[Ch]: * ui/QPrintDialog.ui: add print dialog back - + 2001-08-29 John Levon * Makefile.am: @@ -340,7 +344,7 @@ * QIndexDialog.C: add QWhatsThis in C source * README: document this restriction - + 2001-08-29 John Levon * QMinipage.[Ch]: @@ -360,7 +364,7 @@ * QVCLog.[Ch]: * QVCLogDialog.[Ch]: * ui/QVCLogDialog.ui: - * Dialogs.C: + * Dialogs.C: * Makefile.am: * Makefile.dialogs: add log and vclog dialogs @@ -374,7 +378,7 @@ * ui/Makefile.am: * ui/QTabularCreateDialog.ui: bring back tabcreate - + 2001-08-28 John Levon * ui/QCharacterDialog.ui: @@ -386,7 +390,7 @@ * Makefile.am: * Makefile.dialogs: * Dialogs.C: add graphics dialog - + 2001-08-28 John Levon * QThesaurus.C: clear selection on update @@ -397,13 +401,13 @@ * Makefile.am: * Makefile.dialogs: * Dialogs.C: add Include dialog - + * README: add note about crashes - + 2001-08-27 John Levon * QThesaurusDialog.C: whoops, forgot to clear before update - + 2001-08-27 John Levon * QBibtex.C: @@ -413,36 +417,36 @@ delete button * QExternalDialog.C: fix file dialog thing - - * QThesaurus.h: - * QThesaurus.C: + + * QThesaurus.h: + * QThesaurus.C: * QThesaurusDialog.h: - * QThesaurusDialog.C: + * QThesaurusDialog.C: * ui/QThesaurusDialog.ui: fix compile, get working - + * moc/Makefile.am: fix builddir != srcdir - + 2001-08-27 John Levon * GUIRunTime.C: fix argc handling - + 2001-08-27 John Levon - * ui/*.ui: + * ui/*.ui: * ui/Makefile.am: add some sed magic to replace tr() with _() - + 2001-08-27 John Levon * Makefile.am: remove accidentally committed xforms file - + 2001-08-27 John Levon * Dialogs.C: - * Makefile.dialogs: + * Makefile.dialogs: * QThesaurus.[Ch]: * QThesaurusDialog.[Ch]: * ui/QThesaurusDialog.ui: add thesaurus dialog - + 2001-08-27 John Levon * Dialogs.C: @@ -451,7 +455,7 @@ * QExternal.[Ch]: * QExternalDialog.[Ch]: * ui/QExternalDialog.ui: add external dialog - + 2001-08-26 John Levon * Dialogs.C: @@ -459,12 +463,12 @@ * QERT.[Ch]: * QERTDialog.[Ch]: * ui/QERTDialog.ui: add ERT dialog - + 2001-08-26 John Levon * Dialogs.C: * Makefile.am: - * Makefile.dialogs: + * Makefile.dialogs: * QError.[Ch]: * QErrorDialog.[Ch]: * ui/QErrorDialog.ui: add LaTeX error dialog @@ -476,7 +480,7 @@ * QCharacterDialog.[Ch]: * ui/QcharacterDialog.ui: make work again, add auto-apply feature - + 2001-08-26 John Levon * Dialogs.C: @@ -485,7 +489,7 @@ * QBibitem.[Ch]: * QBibitemDialog.[Ch]: * ui/QBibitemDialog.ui: add Bibitem dialog - + 2001-08-26 John Levon * Dialogs.C: @@ -495,36 +499,36 @@ * ui/QBibtexDialog.ui: added BibTeX dialog. * README: update - + 2001-08-26 John Levon * Qt2BC.C: whoops, reversed sense of setReadOnly() - + 2001-08-26 John Levon - * Dialogs.C: + * Dialogs.C: * QRef.[Ch]: * ui/QRefDialog.ui: add Ref dialog back * QAbout.[Ch]: - * QCitation.[Ch]: - * QDocument.[Ch]: - * QIndex.[Ch]: + * QCitation.[Ch]: + * QDocument.[Ch]: + * QIndex.[Ch]: * QURL.[Ch]: - * Qt2Base.h: protect build() with updating_ too + * Qt2Base.h: protect build() with updating_ too * QCitationDialog.C: use Qt2Base::readOnly * README: update - + 2001-08-25 John Levon * Dialogs.C: add URL - + * QAbout.h: * QCitation.h: - * QDocument.h: - * QIndex.C: + * QDocument.h: + * QIndex.C: * Qt2Base.h: * Qt2Base.C: add an updating_ variable to prevent bc() breakage. @@ -534,21 +538,21 @@ * QURLDialog.h: * QURLDialog.C: * ui/QURLDialog.ui: make alive again - - * Qt2BC.C: make lineedits ReadOnly not disabled - + + * Qt2BC.C: make lineedits ReadOnly not disabled + * README: update - + * ui/QCitationDialog.ui: small cleanups * ui/QIndexDialog.ui: add a what's this - + 2001-08-24 John Levon * Dialogs.C: include the right files * QCitation.C: closePB not cancelPB - + * QCitationDialog.C: * QCitationDialog.h: * ui/QCitationDialog.ui: small fixes @@ -556,15 +560,15 @@ * QIndex.h: * QIndex.C: * QIndexDialog.C: - * QIndexDialog.h: + * QIndexDialog.h: * ui/QIndexDialog.ui: more fixes - + * Qt2Base.h: - * Qt2Base.C: add reset() to workaround problem. + * Qt2Base.C: add reset() to workaround problem. * README: update - * Makefile.am: + * Makefile.am: * Timeout_pimpl.h: * Timeout_pimpl.C: add the timer @@ -574,9 +578,9 @@ * Makefile.am: * Qt2BC.h: * Qt2BC.C: - * QAbout.C: + * QAbout.C: * QCitation.C: - * QDocument.h: + * QDocument.h: * Qt2Base.C: * Qt2Base.h: rename qt2BC -> Qt2BC, set focus for widget enable @@ -587,32 +591,32 @@ * Qt2Base.h: * Qt2Base.C: add a virtual isValid(), and predicate what changed() tells the BC on the return value - + * README: update - + 2001-08-21 John Levon * Dialogs.C: add QIndex * ui/Makefile.am: * Makefile.am: fix build - + * ui/QAboutDialog.ui: * QAbout.C: finish dialog * ui/QCitationDialog.ui: * QCitationDialog.C: BC fixes - - * ui/QIndexDialog.ui: + + * ui/QIndexDialog.ui: * QIndex.h: - * QIndex.C: + * QIndex.C: * QIndexDialog.h: * QIndexDialog.C: got index dialog working 2001-08-19 John Levon * all files: enormous naming re-jig and tidy - + 2001-07-13 Angus Leeming Consistent use of Lsstream.h: @@ -633,7 +637,7 @@ * FormCitationDialogImpl.C: added using directive. * qt2BC.[Ch]: qt2BC now derives from GuiBC. - No idea why this wasn't done ages ago! + No idea why this wasn't done ages ago! 2001-06-15 Angus Leeming @@ -664,7 +668,7 @@ * : fix random space pepper to use hard tabs. Also add where necessitated by using LString.h - + 2001-05-22 Adrien Rebollo * FormDocument.C (build): add iso8859-15 support. @@ -700,7 +704,7 @@ * Qt2Base.h: * Qt2Base.C: s/ControlButton/ControlButtons/ - + 2001-04-02 Kalle Dalheimer * Makefile.am: Simplified Makefile.am @@ -721,7 +725,7 @@ * Makefile.am: added missing xform dialogs * FormParagraph.C: only extra setting if wanted * FormParagraph.h: add namespace to connection - + 2001-03-16 Kalle Dalheimer * FormParagraph.C (apply): Only call SetParagraphExtraOpt() when @@ -743,7 +747,7 @@ * Makefile.am: updated * FormSplash.[Ch]: added * FormSplashImpl.[Ch]: added - + 2001-03-09 Edwin Leuven * Makefile.am: updated @@ -770,7 +774,7 @@ * chardlg.ui * chardlg.[Ch] * chardlgimpl.[Ch] - + 2001-02-16 John Levon * FormParagraph.C: fix bview->update() diff --git a/src/frontends/qt2/Dialogs.C b/src/frontends/qt2/Dialogs.C index fb92b5691d..b6d8f9a398 100644 --- a/src/frontends/qt2/Dialogs.C +++ b/src/frontends/qt2/Dialogs.C @@ -79,7 +79,7 @@ #include "xforms/FormPreferences.h" #include "xforms/FormShowFile.h" #include "xforms/FormTabular.h" - + #include "GUI.h" Dialogs::Dialogs(LyXView * lv) @@ -99,10 +99,10 @@ Dialogs::Dialogs(LyXView * lv) add(new GUIIndex(*lv, *this)); add(new GUILog(*lv, *this)); add(new GUIMinipage(*lv, *this)); - add(new GUIPreamble(*lv, *this)); + add(new GUIPreamble(*lv, *this)); add(new GUIPrint(*lv, *this)); add(new GUIRef(*lv, *this)); - add(new GUISearch(*lv, *this)); + add(new GUISearch(*lv, *this)); add(new GUIShowFile(*lv, *this)); add(new GUISpellchecker(*lv, *this)); add(new GUITabularCreate(*lv, *this)); @@ -114,11 +114,11 @@ Dialogs::Dialogs(LyXView * lv) // dialogs not yet MVCd add(new FormDocument(lv, this)); - add(new FormMathsPanel(lv, this)); + add(new FormMathsPanel(lv, this)); add(new FormParagraph(lv, this)); add(new FormPreferences(lv, this)); add(new FormTabular(lv, this)); - + // reduce the number of connections needed in // dialogs by a simple connection here. hideAll.connect(hideBufferDependent.slot()); diff --git a/src/frontends/qt2/FileDialog.C b/src/frontends/qt2/FileDialog.C index 2afa3e2a80..fcc3dd9223 100644 --- a/src/frontends/qt2/FileDialog.C +++ b/src/frontends/qt2/FileDialog.C @@ -11,13 +11,13 @@ #endif #include -#include +#include #include - + #include "commandtags.h" #include "LString.h" #include "frontends/FileDialog.h" -#include "FileDialog_private.h" +#include "FileDialog_private.h" #include "debug.h" using std::make_pair; @@ -41,13 +41,13 @@ FileDialog::Result const FileDialog::Select(string const & path, string const & string filter = mask; if (mask.empty()) filter = _("*|All files"); - + LyXFileDialog * dlg = new LyXFileDialog(lv_, success_, path, filter, title_); lyxerr[Debug::GUI] << "Select with path \"" << path << "\", mask \"" << filter << "\", suggested \"" << suggested << endl; if (!suggested.empty()) dlg->setSelection(suggested.c_str()); - + if (success_ == LFUN_SELECT_FILE_SYNC) { FileDialog::Result result; lyxerr[Debug::GUI] << "Synchronous FileDialog : " << endl; @@ -57,7 +57,7 @@ FileDialog::Result const FileDialog::Select(string const & path, string const & if (res == QDialog::Accepted) result.second = string(dlg->selectedFile().data()); delete dlg; - return result; + return result; } dlg->show(); return make_pair(FileDialog::Later, string()); diff --git a/src/frontends/qt2/FileDialog_private.C b/src/frontends/qt2/FileDialog_private.C index 553a20b1cd..313b80f5c0 100644 --- a/src/frontends/qt2/FileDialog_private.C +++ b/src/frontends/qt2/FileDialog_private.C @@ -36,6 +36,6 @@ void LyXFileDialog::done(int what) } else if (what == QDialog::Accepted) { lv_->getLyXFunc()->dispatch(action_, selectedFile().data()); } - + delete this; } diff --git a/src/frontends/qt2/FileDialog_private.h b/src/frontends/qt2/FileDialog_private.h index 6463876336..c0b2985168 100644 --- a/src/frontends/qt2/FileDialog_private.h +++ b/src/frontends/qt2/FileDialog_private.h @@ -11,11 +11,11 @@ #define FILEDIALOG_PRIVATE_H #include - + #include #include "LString.h" -#include "lyxfunc.h" +#include "lyxfunc.h" #include "frontends/FileDialog.h" diff --git a/src/frontends/qt2/GUIRunTime.C b/src/frontends/qt2/GUIRunTime.C index dd9dea9184..c09c81d06f 100644 --- a/src/frontends/qt2/GUIRunTime.C +++ b/src/frontends/qt2/GUIRunTime.C @@ -14,8 +14,8 @@ #include #include - -#include "QtLyXView.h" + +#include "QtLyXView.h" #include "XFormsView.h" #include "GUIRunTime.h" #include "debug.h" @@ -47,7 +47,7 @@ extern bool finished; int GUIRunTime::initApplication(int & argc, char * argv[]) { int const xforms_include_version = FL_INCLUDE_VERSION; - + // Check the XForms version in the forms.h header against // the one in the libforms. If they don't match quit the // execution of LyX. Better with a clean fast exit than @@ -69,8 +69,8 @@ int GUIRunTime::initApplication(int & argc, char * argv[]) return 0; } - -void GUIRunTime::processEvents() + +void GUIRunTime::processEvents() { qApp->processEvents(); } @@ -97,14 +97,14 @@ LyXView * GUIRunTime::createMainView(int w, int h) return new XFormsView(w, h); } - + // Called by the graphics cache to connect the appropriate frontend // image loading routines to the LyX kernel. void GUIRunTime::initialiseGraphics() { using namespace grfx; using SigC::slot; - + #if defined(HAVE_FLIMAGE_DUP) && defined(HAVE_FLIMAGE_TO_PIXMAP) // connect the image loader based on the xforms library GImage::newImage.connect(slot(&xformsGImage::newImage)); @@ -126,25 +126,25 @@ Display * GUIRunTime::x11Display() int GUIRunTime::x11Screen() { - //return p.device()->x11Screen(); + //return p.device()->x11Screen(); return fl_screen; } Colormap GUIRunTime::x11Colormap() { - //return p.device()->x11Colormap(); + //return p.device()->x11Colormap(); return fl_state[fl_get_vclass()].colormap; } - -int GUIRunTime::x11VisualDepth() + +int GUIRunTime::x11VisualDepth() { //return p.device()->x11Depth(); return fl_get_visual_depth(); } - + float GUIRunTime::getScreenDPI() { Screen * scr = ScreenOfDisplay(fl_get_display(), fl_screen); @@ -152,8 +152,8 @@ float GUIRunTime::getScreenDPI() (WidthOfScreen(scr) * 25.4 / WidthMMOfScreen(scr))) / 2; } - -void GUIRunTime::setDefaults() + +void GUIRunTime::setDefaults() { FL_IOPT cntl; cntl.buttonFontSize = FL_NORMAL_SIZE; diff --git a/src/frontends/qt2/QAbout.C b/src/frontends/qt2/QAbout.C index 73ea5e3f91..62fc9cfd79 100644 --- a/src/frontends/qt2/QAbout.C +++ b/src/frontends/qt2/QAbout.C @@ -13,12 +13,12 @@ #include "debug.h" #include "gettext.h" #include "QAboutDialog.h" - + #include #include #include #include "QtLyXView.h" - + #include "ButtonControllerBase.h" #include "Qt2BC.h" #include "ControlAboutlyx.h" @@ -28,7 +28,7 @@ using std::getline; typedef Qt2CB > base_class; -QAbout::QAbout(ControlAboutlyx & c) +QAbout::QAbout(ControlAboutlyx & c) : base_class(c, _("About LyX")) { } @@ -46,16 +46,16 @@ void QAbout::build_dialog() dialog_->copyright->append("\n"); dialog_->copyright->append(controller().getDisclaimer().c_str()); - dialog_->versionLA->setText(controller().getVersion().c_str()); - + dialog_->versionLA->setText(controller().getVersion().c_str()); + stringstream in; controller().getCredits(in); istringstream ss(in.str().c_str()); - + string s; string out; - + while (getline(ss, s)) { if (prefixIs(s, "@b")) out += "" + s.substr(2) + ""; @@ -65,9 +65,9 @@ void QAbout::build_dialog() out += s; out += "
"; } - + dialog_->creditsTV->setText(out.c_str()); - + // Manage the cancel/close button bc().setCancel(dialog_->closePB); bc().refresh(); diff --git a/src/frontends/qt2/QAbout.h b/src/frontends/qt2/QAbout.h index 525038b683..d08dae41a8 100644 --- a/src/frontends/qt2/QAbout.h +++ b/src/frontends/qt2/QAbout.h @@ -21,10 +21,10 @@ class ControlAboutlyx; class QAbout : public Qt2CB > { -public: +public: QAbout(ControlAboutlyx &); -private: +private: /// not needed virtual void apply() {} /// not needed diff --git a/src/frontends/qt2/QAboutDialog.C b/src/frontends/qt2/QAboutDialog.C index 94e642d856..c6cb3e418e 100644 --- a/src/frontends/qt2/QAboutDialog.C +++ b/src/frontends/qt2/QAboutDialog.C @@ -13,7 +13,7 @@ QAboutDialog::QAboutDialog(QWidget * parent, const char * name, bool modal, WFl { } - + QAboutDialog::~QAboutDialog() { } diff --git a/src/frontends/qt2/QAboutDialog.h b/src/frontends/qt2/QAboutDialog.h index 4ae90d19af..cf8c485cf5 100644 --- a/src/frontends/qt2/QAboutDialog.h +++ b/src/frontends/qt2/QAboutDialog.h @@ -11,7 +11,7 @@ #include "ui/QAboutDialogBase.h" class QAboutDialog : public QAboutDialogBase -{ +{ Q_OBJECT public: QAboutDialog(QWidget * parent = 0, const char * name = 0, bool modal = FALSE, WFlags fl = 0); diff --git a/src/frontends/qt2/QBibitem.C b/src/frontends/qt2/QBibitem.C index 5fe69f55b9..2ab0914988 100644 --- a/src/frontends/qt2/QBibitem.C +++ b/src/frontends/qt2/QBibitem.C @@ -15,7 +15,7 @@ #include "QBibitem.h" #include "Qt2BC.h" #include "gettext.h" -#include "debug.h" +#include "debug.h" #include #include @@ -48,8 +48,8 @@ void QBibitem::update_contents() void QBibitem::apply() { - controller().params().setContents(dialog_->keyED->text().latin1()); - controller().params().setOptions(dialog_->labelED->text().latin1()); + controller().params().setContents(dialog_->keyED->text().latin1()); + controller().params().setOptions(dialog_->labelED->text().latin1()); } diff --git a/src/frontends/qt2/QBibitem.h b/src/frontends/qt2/QBibitem.h index aafbee1914..06bcc895fe 100644 --- a/src/frontends/qt2/QBibitem.h +++ b/src/frontends/qt2/QBibitem.h @@ -16,17 +16,17 @@ class ControlBibitem; class QBibitemDialog; class QBibitem : - public Qt2CB > + public Qt2CB > { friend class QBibitemDialog; - -public: + +public: QBibitem(ControlBibitem &); protected: virtual bool isValid(); - -private: + +private: /// Apply changes virtual void apply(); /// update diff --git a/src/frontends/qt2/QBibitemDialog.C b/src/frontends/qt2/QBibitemDialog.C index 71d1114f00..eeae27a41a 100644 --- a/src/frontends/qt2/QBibitemDialog.C +++ b/src/frontends/qt2/QBibitemDialog.C @@ -8,11 +8,11 @@ #include #include - + #include "QBibitemDialog.h" #include "QBibitem.h" #include "Dialogs.h" -#include "ControlBibitem.h" +#include "ControlBibitem.h" QBibitemDialog::QBibitemDialog(QBibitem * form) : QBibitemDialogBase(0, 0, false, 0), @@ -24,7 +24,7 @@ QBibitemDialog::QBibitemDialog(QBibitem * form) form, SLOT(slotClose())); } - + void QBibitemDialog::change_adaptor() { form_->changed(); diff --git a/src/frontends/qt2/QBibitemDialog.h b/src/frontends/qt2/QBibitemDialog.h index 169b8d70b0..e3c10fca77 100644 --- a/src/frontends/qt2/QBibitemDialog.h +++ b/src/frontends/qt2/QBibitemDialog.h @@ -8,7 +8,7 @@ #ifndef QBIBITEMDIALOG_H #define QBIBITEMDIALOG_H - + #include "ui/QBibitemDialogBase.h" class QBibitem; @@ -22,7 +22,7 @@ public: protected slots: virtual void change_adaptor(); - + protected: virtual void closeEvent(QCloseEvent * e); diff --git a/src/frontends/qt2/QBibtex.C b/src/frontends/qt2/QBibtex.C index b8ca2328bc..fd657aac29 100644 --- a/src/frontends/qt2/QBibtex.C +++ b/src/frontends/qt2/QBibtex.C @@ -15,7 +15,7 @@ #include "QBibtex.h" #include "Qt2BC.h" #include "gettext.h" -#include "debug.h" +#include "debug.h" #include #include @@ -44,7 +44,7 @@ void QBibtex::build_dialog() bc().addReadOnly(dialog_->stylePB); bc().addReadOnly(dialog_->bibtocCB); bc().addReadOnly(dialog_->databasePB); - bc().addReadOnly(dialog_->deletePB); + bc().addReadOnly(dialog_->deletePB); } @@ -62,7 +62,7 @@ void QBibtex::update_contents() dialog_->databaseLB->inSort(bib.c_str()); } - string bibtotoc = "bibtotoc"; + string bibtotoc = "bibtotoc"; string bibstyle(controller().params().getOptions().c_str()); // bibtotoc exists? @@ -80,7 +80,7 @@ void QBibtex::update_contents() dialog_->deletePB->setEnabled(false); dialog_->styleED->setEnabled(false); dialog_->stylePB->setEnabled(false); - + if (bibstyle == "plain" || bibstyle.empty()) dialog_->styleCO->setCurrentItem(0); else if (bibstyle == "unsrt") @@ -115,7 +115,7 @@ void QBibtex::apply() bibstyle = dialog_->styleED->text().latin1(); bool const bibtotoc(dialog_->bibtocCB->isChecked()); - + if (bibtotoc && (!bibstyle.empty())) { // both bibtotoc and style controller().params().setOptions("bibtotoc," + bibstyle); diff --git a/src/frontends/qt2/QBibtex.h b/src/frontends/qt2/QBibtex.h index 512e79e4b3..58dcedc42d 100644 --- a/src/frontends/qt2/QBibtex.h +++ b/src/frontends/qt2/QBibtex.h @@ -16,17 +16,17 @@ class ControlBibtex; class QBibtexDialog; class QBibtex : - public Qt2CB > + public Qt2CB > { friend class QBibtexDialog; - -public: + +public: QBibtex(ControlBibtex &); protected: virtual bool isValid(); - -private: + +private: /// Apply changes virtual void apply(); /// update diff --git a/src/frontends/qt2/QBibtexDialog.C b/src/frontends/qt2/QBibtexDialog.C index a6fbcea7b3..6e16519508 100644 --- a/src/frontends/qt2/QBibtexDialog.C +++ b/src/frontends/qt2/QBibtexDialog.C @@ -13,12 +13,12 @@ #include #include #include - + #include "QBibtexDialog.h" #include "QBibtex.h" #include "Dialogs.h" -#include "ControlBibtex.h" -#include "gettext.h" +#include "ControlBibtex.h" +#include "gettext.h" #include "debug.h" #include "support/filetools.h" @@ -33,7 +33,7 @@ QBibtexDialog::QBibtexDialog(QBibtex * form) form, SLOT(slotClose())); } - + void QBibtexDialog::change_adaptor() { form_->changed(); @@ -42,7 +42,7 @@ void QBibtexDialog::change_adaptor() void QBibtexDialog::browsePressed() { - QString file = QFileDialog::getOpenFileName(QString::null, + QString file = QFileDialog::getOpenFileName(QString::null, _("BibTeX style files (*.bst)"), this, 0, _("Select a BibTeX style")); if (!file.isNull()) { styleED->setText(ChangeExtension(OnlyFilename(file.latin1()), "").c_str()); @@ -50,11 +50,11 @@ void QBibtexDialog::browsePressed() } } - + void QBibtexDialog::addPressed() { - QString file = QFileDialog::getOpenFileName(QString::null, - _("BibTeX database files (*.bib)"), this, 0, _("Select a BibTeX database to add")); + QString file = QFileDialog::getOpenFileName(QString::null, + _("BibTeX database files (*.bib)"), this, 0, _("Select a BibTeX database to add")); if (!file.isNull()) { // FIXME: check duplicates databaseLB->insertItem(ChangeExtension(file.latin1(), "").c_str()); @@ -62,18 +62,18 @@ void QBibtexDialog::addPressed() } } - + void QBibtexDialog::deletePressed() { databaseLB->removeItem(databaseLB->currentItem()); } - + void QBibtexDialog::styleChanged(const QString & sel) { if (form_->readOnly()) return; - + if (string(_("Other ...")) == sel.latin1()) { styleED->setEnabled(true); stylePB->setEnabled(true); @@ -84,13 +84,13 @@ void QBibtexDialog::styleChanged(const QString & sel) } } - + void QBibtexDialog::databaseChanged() { deletePB->setEnabled(!form_->readOnly() && databaseLB->currentItem() != -1); } - + void QBibtexDialog::closeEvent(QCloseEvent *e) { form_->slotWMHide(); diff --git a/src/frontends/qt2/QBibtexDialog.h b/src/frontends/qt2/QBibtexDialog.h index dd9b9ef989..9ab1693720 100644 --- a/src/frontends/qt2/QBibtexDialog.h +++ b/src/frontends/qt2/QBibtexDialog.h @@ -8,9 +8,9 @@ #ifndef QBIBTEXDIALOG_H #define QBIBTEXDIALOG_H - + #include - + #include "ui/QBibtexDialogBase.h" class QBibtex; @@ -27,9 +27,9 @@ protected slots: virtual void addPressed(); virtual void deletePressed(); virtual void styleChanged(const QString &); - virtual void databaseChanged(); + virtual void databaseChanged(); + - protected: virtual void closeEvent(QCloseEvent * e); diff --git a/src/frontends/qt2/QCharacter.C b/src/frontends/qt2/QCharacter.C index 83afefacd7..31b08aaad0 100644 --- a/src/frontends/qt2/QCharacter.C +++ b/src/frontends/qt2/QCharacter.C @@ -24,9 +24,9 @@ using namespace character; using std::vector; - + typedef Qt2CB > base_class; - + QCharacter::QCharacter(ControlCharacter & c) : base_class(c, _("Character")) { @@ -73,7 +73,7 @@ void QCharacter::build_dialog() cit != language.end(); ++cit) { dialog_->langCO->insertItem(cit->c_str(), -1); } - + bc().setOK(dialog_->okPB); bc().setApply(dialog_->applyPB); bc().setCancel(dialog_->closePB); @@ -90,21 +90,21 @@ void QCharacter::build_dialog() namespace { - + template int findPos2nd(vector > const & vec, B const & val) { vector >::const_iterator cit = vec.begin(); for (; cit != vec.end(); ++cit) { if (cit->second == val) - return int(cit - vec.begin()); + return int(cit - vec.begin()); } return 0; } - + } // namespace anon - - + + void QCharacter::update_contents() { dialog_->familyCO->setCurrentItem(findPos2nd(family, controller().getFamily())); @@ -115,9 +115,9 @@ void QCharacter::update_contents() dialog_->colorCO->setCurrentItem(findPos2nd(color, controller().getColor())); dialog_->toggleallCB->setChecked(controller().getToggleAll()); - + string const thelanguage(controller().getLanguage()); - int i = 0; + int i = 0; for (vector::const_iterator cit = language.begin(); cit != language.end(); ++i, ++cit) { if (*cit == thelanguage) { @@ -127,7 +127,7 @@ void QCharacter::update_contents() } } - + void QCharacter::apply() { controller().setFamily(family[dialog_->familyCO->currentItem()].second); @@ -136,8 +136,8 @@ void QCharacter::apply() controller().setSize(size[dialog_->sizeCO->currentItem()].second); controller().setBar(bar[dialog_->miscCO->currentItem()].second); controller().setColor(color[dialog_->colorCO->currentItem()].second); - + controller().setLanguage(dialog_->langCO->currentText().latin1()); - + controller().setToggleAll(dialog_->toggleallCB->isChecked()); } diff --git a/src/frontends/qt2/QCharacter.h b/src/frontends/qt2/QCharacter.h index ec23cc4f28..523a3bc5d2 100644 --- a/src/frontends/qt2/QCharacter.h +++ b/src/frontends/qt2/QCharacter.h @@ -13,31 +13,31 @@ #include #include - -#include "LString.h" + +#include "LString.h" #include "Qt2Base.h" -#include "controllers/character.h" - +#include "controllers/character.h" + class ControlCharacter; class QCharacterDialog; class QCharacter : - public Qt2CB > + public Qt2CB > { friend class QCharacterDialog; - -public: + +public: QCharacter(ControlCharacter &); -private: +private: /// Apply changes virtual void apply(); /// update virtual void update_contents(); /// build the dialog virtual void build_dialog(); - + std::vector family; std::vector series; std::vector shape; diff --git a/src/frontends/qt2/QCharacterDialog.C b/src/frontends/qt2/QCharacterDialog.C index 254c48d3d7..4a62097465 100644 --- a/src/frontends/qt2/QCharacterDialog.C +++ b/src/frontends/qt2/QCharacterDialog.C @@ -14,7 +14,7 @@ #include QCharacterDialog::QCharacterDialog(QCharacter * form) - : QCharacterDialogBase(0, 0, false, 0), + : QCharacterDialogBase(0, 0, false, 0), form_(form) { connect(okPB, SIGNAL(clicked()), @@ -24,12 +24,12 @@ QCharacterDialog::QCharacterDialog(QCharacter * form) connect(closePB, SIGNAL(clicked()), form_, SLOT(slotClose())); } - + void QCharacterDialog::change_adaptor() { form_->changed(); - + if (!autoapplyCB->isChecked()) return; @@ -44,10 +44,10 @@ void QCharacterDialog::change_adaptor() shapeCO->setCurrentItem(0); miscCO->setCurrentItem(0); langCO->setCurrentItem(0); - colorCO->setCurrentItem(0); + colorCO->setCurrentItem(0); } - + void QCharacterDialog::closeEvent(QCloseEvent * e) { form_->slotWMHide(); diff --git a/src/frontends/qt2/QCharacterDialog.h b/src/frontends/qt2/QCharacterDialog.h index 9b755430e8..0984e14050 100644 --- a/src/frontends/qt2/QCharacterDialog.h +++ b/src/frontends/qt2/QCharacterDialog.h @@ -20,13 +20,13 @@ #include class LyXFont; - + class QCharacterDialog : public QCharacterDialogBase { Q_OBJECT public: QCharacterDialog(QCharacter * form); - + protected: void closeEvent(QCloseEvent * e); diff --git a/src/frontends/qt2/QCitation.C b/src/frontends/qt2/QCitation.C index 74c9c71bbd..7b57544afe 100644 --- a/src/frontends/qt2/QCitation.C +++ b/src/frontends/qt2/QCitation.C @@ -15,7 +15,7 @@ #include "QCitationDialog.h" #include "QCitation.h" - + #include #include #include @@ -23,7 +23,7 @@ #include #include -#include "QtLyXView.h" +#include "QtLyXView.h" #include "Qt2BC.h" #include "ControlCitation.h" #include "debug.h" @@ -50,17 +50,17 @@ void QCitation::apply() { vector const & styles = ControlCitation::getCiteStyles(); - + int const choice = dialog_->citationStyleCO->currentItem(); bool const full = dialog_->fulllistCB->isChecked(); bool const force = dialog_->forceuppercaseCB->isChecked(); - - string const command = - biblio::getCiteCommand(styles[choice], full, force); - + + string const command = + biblio::getCiteCommand(styles[choice], full, force); + controller().params().setCmdName(command); controller().params().setContents(getStringFromVector(citekeys)); - + string const after = dialog_->textAfterED->text().latin1(); controller().params().setOptions(after); } @@ -70,7 +70,7 @@ void QCitation::hide() { citekeys.clear(); bibkeys.clear(); - + Qt2Base::hide(); } @@ -95,7 +95,7 @@ void QCitation::build_dialog() bc().addReadOnly(dialog_->citationStyleCO); bc().addReadOnly(dialog_->forceuppercaseCB); bc().addReadOnly(dialog_->fulllistCB); - // add when enabled ! + // add when enabled ! //bc().addReadOnly(dialog_->textBeforeED); bc().addReadOnly(dialog_->textAfterED); } @@ -108,46 +108,46 @@ void QCitation::fillStyles() if (!citekeys.empty()) key = citekeys[0]; - + dialog_->citationStyleCO->clear(); vector const & sty = controller().getCiteStrings(key); - + for (vector::const_iterator it = sty.begin(); it != sty.end(); ++it) { dialog_->citationStyleCO->insertItem(it->c_str()); } } - + void QCitation::updateStyle() { string const & command = controller().params().getCmdName(); - + // Find the style of the citekeys vector const & styles = ControlCitation::getCiteStyles(); - biblio::CitationStyle cs = biblio::getCitationStyle(command); - + biblio::CitationStyle cs = biblio::getCitationStyle(command); + vector::const_iterator cit = find(styles.begin(), styles.end(), cs.style); - + dialog_->citationStyleCO->setCurrentItem(0); - dialog_->fulllistCB->setChecked(false); - dialog_->forceuppercaseCB->setChecked(false); - + dialog_->fulllistCB->setChecked(false); + dialog_->forceuppercaseCB->setChecked(false); + if (cit != styles.end()) { int const i = int(cit - styles.begin()); dialog_->citationStyleCO->setCurrentItem(i); dialog_->fulllistCB->setChecked(cs.full); dialog_->forceuppercaseCB->setChecked(cs.forceUCase); - } + } bool const natbib = controller().usingNatbib(); - dialog_->citationStyleCO->setEnabled(natbib); - dialog_->fulllistCB->setEnabled(natbib); - dialog_->forceuppercaseCB->setEnabled(natbib); + dialog_->citationStyleCO->setEnabled(natbib); + dialog_->fulllistCB->setEnabled(natbib); + dialog_->forceuppercaseCB->setEnabled(natbib); } - + void QCitation::update_contents() { @@ -167,10 +167,10 @@ void QCitation::update_contents() dialog_->textAfterED->setText(controller().params().getOptions().c_str()); fillStyles(); - + updateStyle(); } - + void QCitation::updateBrowser(QListBox* browser, vector const & keys) const diff --git a/src/frontends/qt2/QCitation.h b/src/frontends/qt2/QCitation.h index 63979386f1..e3eaa35aa9 100644 --- a/src/frontends/qt2/QCitation.h +++ b/src/frontends/qt2/QCitation.h @@ -22,10 +22,10 @@ class QListBox; class ControlCitation; class QCitationDialog; -class QCitation : public Qt2CB > +class QCitation : public Qt2CB > { friend class QCitationDialog; - + public: /// QCitation(ControlCitation &); @@ -50,10 +50,10 @@ private: /// fill the styles combo void fillStyles(); - + /// set the styles combo void updateStyle(); - + void updateBrowser(QListBox *, std::vector const &) const; /// void setBibButtons(State) const; diff --git a/src/frontends/qt2/QCitationDialog.C b/src/frontends/qt2/QCitationDialog.C index 49e2505946..cad9ab0ce9 100644 --- a/src/frontends/qt2/QCitationDialog.C +++ b/src/frontends/qt2/QCitationDialog.C @@ -61,14 +61,14 @@ QCitationDialog::~QCitationDialog() void QCitationDialog::slotBibSelected(int sel) { slotBibHighlighted(sel); - - if (form_->readOnly()) + + if (form_->readOnly()) return; - + slotAddClicked(); } - + void QCitationDialog::slotBibHighlighted(int sel) { biblio::InfoMap const & theMap = form_->controller().bibkeysInfo(); @@ -264,22 +264,22 @@ void QCitationDialog::doFind(biblio::Direction dir) start -= 1; bool const caseSensitive = searchCaseCB->isChecked(); - + vector::const_iterator cit = biblio::searchKeys(theMap, form_->bibkeys, str, start, type, dir, caseSensitive); - // FIXME: should work ... + // FIXME: should work ... if (cit == form_->bibkeys.end()) { // not found. let's loop round if (dir == biblio::FORWARD) start = form_->bibkeys.begin(); else start = form_->bibkeys.end(); - + cit = biblio::searchKeys(theMap, form_->bibkeys, str, start, type, dir, caseSensitive); - + if (cit == form_->bibkeys.end()) return; } diff --git a/src/frontends/qt2/QCitationDialog.h b/src/frontends/qt2/QCitationDialog.h index cafb378e68..faa0a5ee05 100644 --- a/src/frontends/qt2/QCitationDialog.h +++ b/src/frontends/qt2/QCitationDialog.h @@ -11,7 +11,7 @@ #include #include "support/lstrings.h" - + #include "ui/QCitationDialogBase.h" #include "QCitation.h" #include "controllers/biblio.h" @@ -37,10 +37,10 @@ protected slots: virtual void changed_adaptor() { form_->changed(); } - + private: void doFind(biblio::Direction dir); - + private: QCitation * form_; }; diff --git a/src/frontends/qt2/QDocument.C b/src/frontends/qt2/QDocument.C index 610fd74393..3a49e2b229 100644 --- a/src/frontends/qt2/QDocument.C +++ b/src/frontends/qt2/QDocument.C @@ -41,7 +41,7 @@ using SigC::slot; typedef Qt2CB > base_class; -#if 0 +#if 0 QDocument::QDocument(ControlDocument & c) : base_class(c, _("Document Settings")) { @@ -51,7 +51,7 @@ QDocument::QDocument(ControlDocument & c) QDocument::QDocument(LyXView *, Dialogs *) { } -#endif +#endif void QDocument::build_dialog() @@ -59,7 +59,7 @@ void QDocument::build_dialog() // the tabbed folder //dialog_.reset(new QDocumentDialog()); -#if 0 +#if 0 // Manage the restore, ok, apply, restore and cancel/close buttons bc().setOK(dialog_->okPB); bc().setApply(dialog_->applyPB); @@ -211,7 +211,7 @@ void QDocument::build_dialog() bc().addReadOnly (dialog->bulletPanelBG); bc().addReadOnly (dialog->bulletSizeCO); bc().addReadOnly (dialog->bulletLatexED); -#endif +#endif } @@ -220,7 +220,7 @@ void QDocument::apply() //if (!lv_->view()->available() || !dialog_.get()) // return; -#if 0 +#if 0 bool redo = class_apply(); paper_apply(); redo = language_apply() || redo; @@ -232,13 +232,13 @@ void QDocument::apply() } lv_->buffer()->markDirty(); setMinibuffer(lv_, _("Document layout set")); -#endif +#endif } void QDocument::cancel() { -#if 0 +#if 0 // this avoids confusion when reopening BufferParams & param = lv_->buffer()->params; param.temp_bullets[0] = param.user_defined_bullets[0]; @@ -246,7 +246,7 @@ void QDocument::cancel() param.temp_bullets[2] = param.user_defined_bullets[2]; param.temp_bullets[3] = param.user_defined_bullets[3]; hide(); -#endif +#endif } @@ -255,7 +255,7 @@ void QDocument::update_contents() if (!dialog_.get()) return; -#if 0 +#if 0 checkReadOnly(); BufferParams const & params = lv_->buffer()->params; @@ -265,7 +265,7 @@ void QDocument::update_contents() language_update(params); options_update(params); bullets_update(params); -#endif +#endif } @@ -342,9 +342,9 @@ bool QDocument::class_apply() params.fonts = dialog_->docFontsCO->currentText(); params.fontsize = dialog_->docFontSizeCO->currentText(); params.pagestyle = dialog->docPagestyleCO->currentText(); - + unsigned int const new_class = dialog_->docClassCO->currentItem(); - + if (params.textclass != new_class) { // try to load new_class if (textclasslist.Load(new_class)) { @@ -514,7 +514,7 @@ bool QDocument::language_apply() && old_language->RightToLeft() == new_language->RightToLeft() && !lv_->buffer()->isMultiLingual()) lv_->buffer()->ChangeLanguage(old_language, new_language); - + if (old_language != new_language) redo = true; @@ -866,14 +866,14 @@ void QDocument::InputBulletLaTeX(FL_OBJECT *, long) void QDocument::BulletDepth(FL_OBJECT * ob, State cb) { /* Should I do the following: - * 1. change to the panel that the current bullet belongs in + * 1. change to the panel that the current bullet belongs in * 2. show that bullet as selected * 3. change the size setting to the size of the bullet in Q. * 4. display the latex equivalent in the latex box * * I'm inclined to just go with 3 and 4 at the moment and * maybe try to support the others later - */ + */ BufferParams & param = lv_->buffer()->params; int data = 0; @@ -1023,4 +1023,4 @@ void QDocument::UpdateLayoutDocument(BufferParams const & params) options_update(params); bullets_update(params); } -#endif // 0 +#endif // 0 diff --git a/src/frontends/qt2/QDocument.h b/src/frontends/qt2/QDocument.h index 4fce4481d7..8f892bf96d 100644 --- a/src/frontends/qt2/QDocument.h +++ b/src/frontends/qt2/QDocument.h @@ -7,7 +7,7 @@ * \author Kalle Dalheimer */ - + #ifndef QDOCUMENT_H #define QDOCUMENT_H @@ -16,7 +16,7 @@ #include "Qt2Base.h" #include "Qt2BC.h" -#include "QtLyXView.h" +#include "QtLyXView.h" #ifdef __GNUG_ #pragma interface @@ -32,7 +32,7 @@ class QDocument //FIXME !!!!! : public Qt2CB > { public: - // FIXME!!!!!!! + // FIXME!!!!!!! QDocument(LyXView *, Dialogs *); private: /// @@ -72,8 +72,8 @@ private: virtual Qt2BC & bc(); /// Build the dialog virtual void build_dialog(); -// /// Filter the inputs -// virtual bool input( FL_OBJECT *, long ); +// /// Filter the inputs +// virtual bool input( FL_OBJECT *, long ); /// Update the dialog. virtual void update_contents(); /// Apply from dialog @@ -81,8 +81,8 @@ private: /// Cancel from dialog virtual void cancel(); -// /// -// virtual QDialog* form() const; +// /// +// virtual QDialog* form() const; #if 0 /// @@ -151,12 +151,12 @@ private: int current_bullet_panel; /// int current_bullet_depth; -// /// -// FL_OBJECT * fbullet; -// /// -// boost::scoped_ptr combo_language; -// /// -// boost::scoped_ptr combo_doc_class; +// /// +// FL_OBJECT * fbullet; +// /// +// boost::scoped_ptr combo_language; +// /// +// boost::scoped_ptr combo_doc_class; /// The ButtonController ButtonController bc_; }; diff --git a/src/frontends/qt2/QDocumentDialog.C b/src/frontends/qt2/QDocumentDialog.C index 2489847158..4304f1f5ef 100644 --- a/src/frontends/qt2/QDocumentDialog.C +++ b/src/frontends/qt2/QDocumentDialog.C @@ -7,7 +7,7 @@ */ #include - + #include "QDocumentDialog.h" #include "Dialogs.h" #include "QDocument.h" @@ -23,7 +23,7 @@ QDocumentDialog::QDocumentDialog(QDocument * form, QWidget * parent, const char : QDocumentDialogBase(parent, name, modal, fl), form_(form) { -#if 0 +#if 0 // Copy the pointers to the bullet buttons into an array so that // they can all be manipulated together. bulletbuttons[0] = bullet00PB; @@ -62,16 +62,16 @@ QDocumentDialog::QDocumentDialog(QDocument * form, QWidget * parent, const char bulletbuttons[33] = bullet53PB; bulletbuttons[34] = bullet54PB; bulletbuttons[35] = bullet55PB; -#endif +#endif } - + QDocumentDialog::~QDocumentDialog() { } -#if 0 +#if 0 void QDocumentDialog::slotApply() { form->apply(); @@ -85,7 +85,7 @@ void QDocumentDialog::slotAMSMath(bool) form->checkDocumentInput( amsMathCB ); } - + void QDocumentDialog::slotBulletDepth1() { form->bulletDepth( 0 ); @@ -97,7 +97,7 @@ void QDocumentDialog::slotBulletDepth2() form->bulletDepth( 1 ); } - + void QDocumentDialog::slotBulletDepth3() { form->bulletDepth( 2 ); @@ -373,7 +373,7 @@ void QDocumentDialog::slotQuoteStyle(int) form->checkDocumentInput( quoteStyleTypeCO ); } - + void QDocumentDialog::slotQuoteType(int) { // Intentionally left blank @@ -437,12 +437,12 @@ void QDocumentDialog::slotUseGeometryPackage(bool) form->checkDocumentInput( CheckBox1 ); } - + void QDocumentDialog::slotWidth(const QString&) { form->checkDocumentInput( customWidthED ); } -#endif +#endif void QDocumentDialog::closeEvent( QCloseEvent* e ) diff --git a/src/frontends/qt2/QDocumentDialog.h b/src/frontends/qt2/QDocumentDialog.h index d1d19c1c3f..da61d0f7f3 100644 --- a/src/frontends/qt2/QDocumentDialog.h +++ b/src/frontends/qt2/QDocumentDialog.h @@ -8,7 +8,7 @@ #ifndef QDOCUMENTDIALOG_H #define QDOCUMENTDIALOG_H - + #include "ui/QDocumentDialogBase.h" class QDocument; @@ -21,7 +21,7 @@ public: ~QDocumentDialog(); public slots: -#if 0 +#if 0 void slotApply(); void slotBulletLaTeX(const QString&); void slotAMSMath(bool); @@ -73,7 +73,7 @@ public slots: void slotTOCDepth(int); void slotUseGeometryPackage(bool); void slotWidth(const QString&); -#endif +#endif protected: void closeEvent(QCloseEvent *); diff --git a/src/frontends/qt2/QERT.C b/src/frontends/qt2/QERT.C index 4b56c82026..6ba4cc3edd 100644 --- a/src/frontends/qt2/QERT.C +++ b/src/frontends/qt2/QERT.C @@ -18,7 +18,7 @@ #include typedef Qt2CB > base_class; - + QERT::QERT(ControlERT & c) : base_class(c, _("LaTeX ERT")) { @@ -33,7 +33,7 @@ void QERT::build_dialog() bc().setCancel(dialog_->closePB); } - + void QERT::apply() { if (dialog_->openRB->isChecked()) @@ -44,16 +44,16 @@ void QERT::apply() controller().params().status = InsetERT::Collapsed; } - + void QERT::update_contents() { QRadioButton * rb; - + switch (controller().params().status) { case InsetERT::Open: rb = dialog_->openRB; break; case InsetERT::Inlined: rb = dialog_->inlineRB; break; case InsetERT::Collapsed: rb = dialog_->collapsedRB; break; - } - + } + rb->setChecked(true); } diff --git a/src/frontends/qt2/QERT.h b/src/frontends/qt2/QERT.h index 5c42aff9a4..4132468066 100644 --- a/src/frontends/qt2/QERT.h +++ b/src/frontends/qt2/QERT.h @@ -16,14 +16,14 @@ class ControlERT; class QERTDialog; class QERT : - public Qt2CB > + public Qt2CB > { friend class QERTDialog; - -public: + +public: QERT(ControlERT &); -private: +private: /// Apply changes virtual void apply(); /// update diff --git a/src/frontends/qt2/QERTDialog.C b/src/frontends/qt2/QERTDialog.C index a2732033e3..6ec86c10be 100644 --- a/src/frontends/qt2/QERTDialog.C +++ b/src/frontends/qt2/QERTDialog.C @@ -22,7 +22,7 @@ QERTDialog::QERTDialog(QERT * form) form, SLOT(slotClose())); } - + void QERTDialog::closeEvent(QCloseEvent * e) { form_->slotWMHide(); diff --git a/src/frontends/qt2/QERTDialog.h b/src/frontends/qt2/QERTDialog.h index 7373a24b5b..00af171af7 100644 --- a/src/frontends/qt2/QERTDialog.h +++ b/src/frontends/qt2/QERTDialog.h @@ -8,9 +8,9 @@ #ifndef QERTDIALOG_H #define QERTDIALOG_H - + #include - + #include "ui/QERTDialogBase.h" #include "QERT.h" @@ -24,7 +24,7 @@ protected slots: void change_adaptor() { form_->changed(); } - + protected: virtual void closeEvent(QCloseEvent * e); diff --git a/src/frontends/qt2/QError.C b/src/frontends/qt2/QError.C index 4053e2be2f..a86622b4fd 100644 --- a/src/frontends/qt2/QError.C +++ b/src/frontends/qt2/QError.C @@ -18,7 +18,7 @@ #include typedef Qt2CB > base_class; - + QError::QError(ControlError & c) : base_class(c, _("LaTeX Error")) { @@ -32,7 +32,7 @@ void QError::build_dialog() bc().setCancel(dialog_->closePB); } - + void QError::update_contents() { dialog_->errorTV->setText(controller().params().c_str()); diff --git a/src/frontends/qt2/QError.h b/src/frontends/qt2/QError.h index f43c78a8e2..60cc3d7b60 100644 --- a/src/frontends/qt2/QError.h +++ b/src/frontends/qt2/QError.h @@ -16,14 +16,14 @@ class ControlError; class QErrorDialog; class QError : - public Qt2CB > + public Qt2CB > { friend class QErrorDialog; - -public: + +public: QError(ControlError &); -private: +private: /// Apply changes virtual void apply() {}; /// update diff --git a/src/frontends/qt2/QErrorDialog.C b/src/frontends/qt2/QErrorDialog.C index 55aa28e5f9..00672e8916 100644 --- a/src/frontends/qt2/QErrorDialog.C +++ b/src/frontends/qt2/QErrorDialog.C @@ -21,7 +21,7 @@ QErrorDialog::QErrorDialog(QError * form) form, SLOT(slotClose())); } - + void QErrorDialog::closeEvent(QCloseEvent * e) { form_->slotWMHide(); diff --git a/src/frontends/qt2/QErrorDialog.h b/src/frontends/qt2/QErrorDialog.h index 786b908577..c93fb10b9f 100644 --- a/src/frontends/qt2/QErrorDialog.h +++ b/src/frontends/qt2/QErrorDialog.h @@ -8,9 +8,9 @@ #ifndef QERRORDIALOG_H #define QERRORDIALOG_H - + #include - + #include "ui/QErrorDialogBase.h" class QError; diff --git a/src/frontends/qt2/QExternal.C b/src/frontends/qt2/QExternal.C index 28637a8bf5..35ea8bc7b1 100644 --- a/src/frontends/qt2/QExternal.C +++ b/src/frontends/qt2/QExternal.C @@ -7,7 +7,7 @@ */ #include -#include +#include #include "QExternalDialog.h" #include "ControlExternal.h" @@ -17,11 +17,11 @@ #include #include -#include +#include #include typedef Qt2CB > base_class; - + QExternal::QExternal(ControlExternal & c) : base_class(c, _("External")) { @@ -40,23 +40,23 @@ void QExternal::build_dialog() bc().addReadOnly(dialog_->browsePB); std::vector templates(controller().getTemplates()); - + for (std::vector::const_iterator cit = templates.begin(); cit != templates.end(); ++cit) { dialog_->externalCO->insertItem(cit->c_str(), -1); } } - + void QExternal::update_contents() { InsetExternal::Params const & params = controller().params(); dialog_->fileED->setText(params.filename.c_str()); dialog_->paramsED->setText(params.parameters.c_str()); - + dialog_->externalCO->setCurrentItem(controller().getTemplateNumber(params.templ.lyxName)); - dialog_->externalTV->setText(controller().params().templ.helpText.c_str()); + dialog_->externalTV->setText(controller().params().templ.helpText.c_str()); isValid(); } @@ -64,10 +64,10 @@ void QExternal::update_contents() string const & QExternal::helpText() { controller().params().templ = controller().getTemplate(dialog_->externalCO->currentItem() + 1); - return controller().params().templ.helpText; + return controller().params().templ.helpText; } - + void QExternal::apply() { controller().params().filename = @@ -82,8 +82,8 @@ void QExternal::apply() bool QExternal::isValid() { bool const valid = !string(dialog_->fileED->text()).empty(); - dialog_->viewPB->setEnabled(valid); - dialog_->editPB->setEnabled(valid); - dialog_->updatePB->setEnabled(valid); + dialog_->viewPB->setEnabled(valid); + dialog_->editPB->setEnabled(valid); + dialog_->updatePB->setEnabled(valid); return valid; } diff --git a/src/frontends/qt2/QExternal.h b/src/frontends/qt2/QExternal.h index db81229615..185a4d6e1c 100644 --- a/src/frontends/qt2/QExternal.h +++ b/src/frontends/qt2/QExternal.h @@ -16,24 +16,24 @@ class ControlExternal; class QExternalDialog; class QExternal : - public Qt2CB > + public Qt2CB > { friend class QExternalDialog; - -public: + +public: QExternal(ControlExternal &); protected: virtual bool isValid(); - -private: + +private: /// Apply changes virtual void apply(); /// update virtual void update_contents(); /// build the dialog virtual void build_dialog(); - + /// get the right helptext string const & helpText(); }; diff --git a/src/frontends/qt2/QExternalDialog.C b/src/frontends/qt2/QExternalDialog.C index 7ad27c2987..afdb771e28 100644 --- a/src/frontends/qt2/QExternalDialog.C +++ b/src/frontends/qt2/QExternalDialog.C @@ -7,17 +7,17 @@ */ #include - + #include #include #include #include #include -#include +#include -#include "gettext.h" +#include "gettext.h" #include "QExternalDialog.h" -#include "ControlExternal.h" +#include "ControlExternal.h" #include "Dialogs.h" #include "QExternal.h" @@ -31,52 +31,52 @@ QExternalDialog::QExternalDialog(QExternal * form) form, SLOT(slotClose())); } - + void QExternalDialog::change_adaptor() { form_->changed(); } - + void QExternalDialog::closeEvent(QCloseEvent * e) { form_->slotWMHide(); e->accept(); } - + void QExternalDialog::editClicked() { form_->changed(); form_->controller().editExternal(); } - + void QExternalDialog::viewClicked() { form_->changed(); form_->controller().viewExternal(); } - + void QExternalDialog::updateClicked() { form_->changed(); form_->controller().updateExternal(); } - + void QExternalDialog::browseClicked() { - QString file = QFileDialog::getOpenFileName(QString::null, - _("External material (*)"), this, 0, _("Select external material")); + QString file = QFileDialog::getOpenFileName(QString::null, + _("External material (*)"), this, 0, _("Select external material")); if (!file.isNull()) { fileED->setText(file.latin1()); form_->changed(); } } - + void QExternalDialog::templateChanged() { externalTV->setText(form_->helpText().c_str()); diff --git a/src/frontends/qt2/QExternalDialog.h b/src/frontends/qt2/QExternalDialog.h index f4581824bb..e2023d94e5 100644 --- a/src/frontends/qt2/QExternalDialog.h +++ b/src/frontends/qt2/QExternalDialog.h @@ -8,9 +8,9 @@ #ifndef QEXTERNALDIALOG_H #define QEXTERNALDIALOG_H - + #include - + #include "ui/QExternalDialogBase.h" class QExternal; @@ -28,7 +28,7 @@ protected slots: virtual void updateClicked(); virtual void browseClicked(); virtual void templateChanged(); - + protected: virtual void closeEvent(QCloseEvent * e); diff --git a/src/frontends/qt2/QFloat.C b/src/frontends/qt2/QFloat.C index f73bbe5d6a..f609d1d0d3 100644 --- a/src/frontends/qt2/QFloat.C +++ b/src/frontends/qt2/QFloat.C @@ -26,7 +26,7 @@ #include typedef Qt2CB > base_class; - + QFloat::QFloat(ControlFloat & c) : base_class(c, _("LaTeX Information")) { @@ -43,7 +43,7 @@ void QFloat::build_dialog() bc().setRestore(dialog_->restorePB); } - + void QFloat::update_contents() { bool top = false; @@ -81,7 +81,7 @@ void QFloat::update_contents() void QFloat::apply() { string placement; - + if (dialog_->forcehere->isChecked()) { placement += "H"; } else { diff --git a/src/frontends/qt2/QFloat.h b/src/frontends/qt2/QFloat.h index 8dc0998044..96df6dc5f1 100644 --- a/src/frontends/qt2/QFloat.h +++ b/src/frontends/qt2/QFloat.h @@ -21,7 +21,7 @@ class QFloatDialog; /// class QFloat - : public Qt2CB > + : public Qt2CB > { public: /// @@ -31,14 +31,10 @@ public: private: /// Apply changes virtual void apply(); - /// update + /// update virtual void update_contents(); /// build the dialog virtual void build_dialog(); }; #endif // QFLOAT_H - - - - diff --git a/src/frontends/qt2/QFloatDialog.C b/src/frontends/qt2/QFloatDialog.C index 82409d996a..5fe5046482 100644 --- a/src/frontends/qt2/QFloatDialog.C +++ b/src/frontends/qt2/QFloatDialog.C @@ -10,9 +10,9 @@ #include -#include "LString.h" - -#include "ControlFloat.h" +#include "LString.h" + +#include "ControlFloat.h" #include "QFloatDialog.h" #include "Dialogs.h" #include "QFloat.h" @@ -31,16 +31,15 @@ QFloatDialog::QFloatDialog(QFloat * form) form, SLOT(slotClose())); } - + void QFloatDialog::change_adaptor() { form_->changed(); } - + void QFloatDialog::closeEvent(QCloseEvent * e) { form_->slotWMHide(); e->accept(); } - diff --git a/src/frontends/qt2/QFloatDialog.h b/src/frontends/qt2/QFloatDialog.h index f7175afea2..e1a7e6817e 100644 --- a/src/frontends/qt2/QFloatDialog.h +++ b/src/frontends/qt2/QFloatDialog.h @@ -8,9 +8,9 @@ #ifndef QFLOATDIALOG_H #define QFLOATDIALOG_H - + #include - + #include "ui/QFloatDialogBase.h" class QFloat; @@ -32,6 +32,3 @@ private: }; #endif // QFLOATDIALOG_H - - - diff --git a/src/frontends/qt2/QGraphics.C b/src/frontends/qt2/QGraphics.C index cfe81b2c0a..6d4b904135 100644 --- a/src/frontends/qt2/QGraphics.C +++ b/src/frontends/qt2/QGraphics.C @@ -28,7 +28,7 @@ #include "QGraphics.h" #include "Qt2BC.h" #include "gettext.h" -#include "debug.h" +#include "debug.h" #include "QtLyXView.h" #include "ControlGraphics.h" @@ -38,7 +38,7 @@ #include "support/filetools.h" // for MakeAbsPath etc #include "insets/insetgraphicsParams.h" #include "lyxrc.h" // for lyxrc.display_graphics - + typedef Qt2CB > base_class; @@ -56,7 +56,7 @@ void QGraphics::build_dialog() bc().setApply(dialog_->applyPB); bc().setCancel(dialog_->closePB); bc().setRestore(dialog_->restorePB); - + bc().addReadOnly(dialog_->rotateGB); bc().addReadOnly(dialog_->latexoptionsGB); bc().addReadOnly(dialog_->bbGB); @@ -72,12 +72,12 @@ void QGraphics::build_dialog() void QGraphics::update_contents() { InsetGraphicsParams & igp = controller().params(); - + string unit = "cm"; if (lyxrc.default_papersize < 3) unit = "in"; string const defaultUnit = string(unit); - + // Update dialog with details from inset dialog_->filename->setText(igp.filename.c_str()); @@ -85,7 +85,7 @@ void QGraphics::update_contents() // path, because the controller knows nothing about the doc-dir controller().bbChanged = false; if (igp.bb.empty()) { - string const fileWithAbsPath = MakeAbsPath(igp.filename, OnlyPath(igp.filename)); + string const fileWithAbsPath = MakeAbsPath(igp.filename, OnlyPath(igp.filename)); string bb = controller().readBB(fileWithAbsPath); if (!bb.empty()) { // get the values from the file @@ -103,11 +103,11 @@ void QGraphics::update_contents() dialog_->rtX->setText(token(igp.bb,' ',2).c_str()); dialog_->rtY->setText(token(igp.bb,' ',3).c_str()); } - + // Update the draft and clip mode dialog_->draft->setChecked(igp.draft); dialog_->clip->setChecked(igp.clip); - + // Update the subcaption check button and input field dialog_->subfigure->setChecked(igp.subcaption); dialog_->subcaption->setText(igp.subcaptionText.c_str()); @@ -130,10 +130,10 @@ void QGraphics::update_contents() break; } } - + dialog_->widthUnit->setCurrentItem(igp.width.unit()); dialog_->heightUnit->setCurrentItem(igp.height.unit()); - + switch (igp.size_type) { case InsetGraphicsParams::DEFAULT_SIZE: { dialog_->defaultRB->setChecked(TRUE); @@ -152,14 +152,14 @@ void QGraphics::update_contents() // aspect ratio dialog_->aspectratio->setChecked(igp.keepAspectRatio); - + // now the lyx-internally viewsize dialog_->displaywidthUnit->setCurrentItem(igp.lyxwidth.unit()); dialog_->displayheightUnit->setCurrentItem(igp.lyxheight.unit()); - + // Update the rotate angle dialog_->angle->setText(tostr(igp.rotateAngle).c_str()); - + if (igp.rotateOrigin.empty()) { dialog_->origin->setCurrentItem(0); } else { @@ -176,18 +176,18 @@ void QGraphics::apply() { // Create the parameters structure and fill the data from the dialog. InsetGraphicsParams & igp = controller().params(); - + igp.filename = dialog_->filename->text(); - + if (!controller().bbChanged) // different to the original one? - igp.bb = string(); // don't write anything + igp.bb = string(); // don't write anything else { string bb; string lbX(dialog_->lbX->text()); string lbY(dialog_->lbY->text()); string rtX(dialog_->rtX->text()); string rtY(dialog_->rtY->text()); - + if (lbX.empty()) bb = "0 "; else @@ -207,13 +207,13 @@ void QGraphics::apply() igp.bb = bb; } - + igp.draft = dialog_->draft->isChecked(); - + igp.clip = dialog_->clip->isChecked(); - + igp.subcaption = dialog_->subfigure->isChecked(); - + igp.subcaptionText = dialog_->subcaption->text(); switch(dialog_->show->currentItem()) { @@ -223,7 +223,7 @@ void QGraphics::apply() case 3: igp.display = InsetGraphicsParams::NONE; break; default:; } - + if (dialog_->defaultRB->isChecked()) igp.size_type = InsetGraphicsParams::DEFAULT_SIZE; else if (dialog_->customRB->isChecked()) @@ -248,7 +248,7 @@ void QGraphics::apply() igp.keepAspectRatio = dialog_->aspectratio->isChecked(); igp.rotateAngle = strToDbl(string(dialog_->angle->text())); - + while (igp.rotateAngle < 0.0 || igp.rotateAngle > 360.0) { if (igp.rotateAngle < 0.0) { igp.rotateAngle += 360.0; @@ -256,14 +256,14 @@ void QGraphics::apply() igp.rotateAngle -= 360.0; } } - + if ((dialog_->origin->currentItem()) > 0) igp.rotateOrigin = dialog_->origin->currentText(); else igp.rotateOrigin = string(); - + igp.special = dialog_->latexoptions->text(); - + } @@ -271,16 +271,16 @@ void QGraphics::browse() { string const & name = controller().Browse(dialog_->filename->text().latin1()); if (!name.empty()) - dialog_->filename->setText(name.c_str()); + dialog_->filename->setText(name.c_str()); } void QGraphics::get() { string const filename(dialog_->filename->text()); if (!filename.empty()) { - string const fileWithAbsPath = MakeAbsPath(filename, OnlyPath(filename)); + string const fileWithAbsPath = MakeAbsPath(filename, OnlyPath(filename)); string bb = controller().readBB(fileWithAbsPath); - if (!bb.empty()) { + if (!bb.empty()) { dialog_->lbX->setText(token(bb,' ',0).c_str()); dialog_->lbY->setText(token(bb,' ',1).c_str()); dialog_->rtX->setText(token(bb,' ',2).c_str()); @@ -295,5 +295,3 @@ bool QGraphics::isValid() { return !string(dialog_->filename->text().latin1()).empty(); } - - diff --git a/src/frontends/qt2/QGraphics.h b/src/frontends/qt2/QGraphics.h index 11c3dffa48..bc5b703e4f 100644 --- a/src/frontends/qt2/QGraphics.h +++ b/src/frontends/qt2/QGraphics.h @@ -15,14 +15,14 @@ #endif #include "Qt2Base.h" -#include "insets/insetgraphics.h" +#include "insets/insetgraphics.h" class ControlGraphics; class QGraphicsDialog; /// class QGraphics - : public Qt2CB > + : public Qt2CB > { public: /// @@ -32,7 +32,7 @@ public: protected: virtual bool isValid(); - + private: /// Apply changes virtual void apply(); @@ -42,15 +42,9 @@ private: virtual void build_dialog(); /// browse for a file - void browse(); + void browse(); /// get bounding box from file - void get(); + void get(); }; #endif // QGRAPHICS_H - - - - - - diff --git a/src/frontends/qt2/QGraphicsDialog.C b/src/frontends/qt2/QGraphicsDialog.C index 13fa42f744..7e3355b537 100644 --- a/src/frontends/qt2/QGraphicsDialog.C +++ b/src/frontends/qt2/QGraphicsDialog.C @@ -13,13 +13,13 @@ #include #include -#include "LString.h" - +#include "LString.h" + #include "QGraphicsDialog.h" -#include "ControlGraphics.h" +#include "ControlGraphics.h" #include "Dialogs.h" #include "QGraphics.h" -#include "debug.h" +#include "debug.h" QGraphicsDialog::QGraphicsDialog(QGraphics * form) : QGraphicsDialogBase(0, 0, false, 0), @@ -35,13 +35,13 @@ QGraphicsDialog::QGraphicsDialog(QGraphics * form) form, SLOT(slotRestore())); } - + void QGraphicsDialog::change_adaptor() { form_->changed(); } - + void QGraphicsDialog::closeEvent(QCloseEvent * e) { form_->slotWMHide(); @@ -58,4 +58,3 @@ void QGraphicsDialog::get_clicked() { form_->get(); } - diff --git a/src/frontends/qt2/QGraphicsDialog.h b/src/frontends/qt2/QGraphicsDialog.h index 671f336087..ad71d99807 100644 --- a/src/frontends/qt2/QGraphicsDialog.h +++ b/src/frontends/qt2/QGraphicsDialog.h @@ -8,9 +8,9 @@ #ifndef QGRAPHICSDIALOG_H #define QGRAPHICSDIALOG_H - + #include - + #include "ui/QGraphicsDialogBase.h" class QGraphics; diff --git a/src/frontends/qt2/QInclude.C b/src/frontends/qt2/QInclude.C index 5c64b41311..887eba36e7 100644 --- a/src/frontends/qt2/QInclude.C +++ b/src/frontends/qt2/QInclude.C @@ -17,7 +17,7 @@ #include "QInclude.h" #include "Qt2BC.h" #include "gettext.h" -#include "debug.h" +#include "debug.h" #include #include @@ -78,7 +78,7 @@ void QInclude::update_contents() dialog_->visiblespaceCB->setChecked(cmdname == "verbatiminput*"); dialog_->visiblespaceCB->setEnabled(true); } - + if (cmdname.empty()) dialog_->includeRB->setChecked(true); } @@ -117,7 +117,7 @@ void QInclude::browse() string const & name = controller().Browse(dialog_->filenameED->text().latin1(), type); if (!name.empty()) - dialog_->filenameED->setText(name.c_str()); + dialog_->filenameED->setText(name.c_str()); } diff --git a/src/frontends/qt2/QInclude.h b/src/frontends/qt2/QInclude.h index 286838a16c..a6cc7e56d4 100644 --- a/src/frontends/qt2/QInclude.h +++ b/src/frontends/qt2/QInclude.h @@ -21,7 +21,7 @@ class QIncludeDialog; /// class QInclude - : public Qt2CB > + : public Qt2CB > { public: /// @@ -31,7 +31,7 @@ public: protected: virtual bool isValid(); - + private: /// Apply changes virtual void apply(); @@ -41,10 +41,10 @@ private: virtual void build_dialog(); /// load the file - void load(); + void load(); /// browse for a file - void browse(); + void browse(); }; #endif // QINCLUDE_H diff --git a/src/frontends/qt2/QIncludeDialog.C b/src/frontends/qt2/QIncludeDialog.C index f8b0d3dbdc..17dd2c24b8 100644 --- a/src/frontends/qt2/QIncludeDialog.C +++ b/src/frontends/qt2/QIncludeDialog.C @@ -13,13 +13,13 @@ #include #include -#include "LString.h" - +#include "LString.h" + #include "QIncludeDialog.h" -#include "ControlInclude.h" +#include "ControlInclude.h" #include "Dialogs.h" #include "QInclude.h" -#include "debug.h" +#include "debug.h" QIncludeDialog::QIncludeDialog(QInclude * form) : QIncludeDialogBase(0, 0, false, 0), @@ -31,13 +31,13 @@ QIncludeDialog::QIncludeDialog(QInclude * form) form, SLOT(slotClose())); } - + void QIncludeDialog::change_adaptor() { form_->changed(); } - + void QIncludeDialog::closeEvent(QCloseEvent * e) { form_->slotWMHide(); @@ -53,19 +53,19 @@ void QIncludeDialog::typeChanged(int v) visiblespaceCB->setEnabled(false); visiblespaceCB->setChecked(false); break; - default: + default: visiblespaceCB->setEnabled(true); break; - } + } } - + void QIncludeDialog::loadClicked() { form_->load(); } - + void QIncludeDialog::browseClicked() { form_->browse(); diff --git a/src/frontends/qt2/QIncludeDialog.h b/src/frontends/qt2/QIncludeDialog.h index 54d7dbb9b3..3ce7bc4685 100644 --- a/src/frontends/qt2/QIncludeDialog.h +++ b/src/frontends/qt2/QIncludeDialog.h @@ -8,9 +8,9 @@ #ifndef QINCLUDEDIALOG_H #define QINCLUDEDIALOG_H - + #include - + #include "ui/QIncludeDialogBase.h" class QInclude; @@ -22,7 +22,7 @@ public: QIncludeDialog(QInclude * form); void updateLists(); - + protected slots: virtual void change_adaptor(); virtual void loadClicked(); diff --git a/src/frontends/qt2/QIndex.C b/src/frontends/qt2/QIndex.C index d99e60407f..60d98b4916 100644 --- a/src/frontends/qt2/QIndex.C +++ b/src/frontends/qt2/QIndex.C @@ -18,7 +18,7 @@ #include typedef Qt2CB > base_class; - + QIndex::QIndex(ControlIndex & c) : base_class(c, _("Index")) { @@ -34,13 +34,13 @@ void QIndex::build_dialog() bc().addReadOnly(dialog_->keywordED); } - + void QIndex::update_contents() { dialog_->keywordED->setText(controller().params().getContents().c_str()); } - + void QIndex::apply() { controller().params().setContents(dialog_->keywordED->text().latin1()); diff --git a/src/frontends/qt2/QIndex.h b/src/frontends/qt2/QIndex.h index 44d8c965e5..82c2773d9d 100644 --- a/src/frontends/qt2/QIndex.h +++ b/src/frontends/qt2/QIndex.h @@ -17,17 +17,17 @@ class ControlIndex; class QIndexDialog; class QIndex : - public Qt2CB > + public Qt2CB > { friend class QIndexDialog; - -public: + +public: QIndex(ControlIndex &); protected: virtual bool isValid(); - -private: + +private: /// Apply changes virtual void apply(); /// update diff --git a/src/frontends/qt2/QIndexDialog.C b/src/frontends/qt2/QIndexDialog.C index 48572ab5b9..30fae546a9 100644 --- a/src/frontends/qt2/QIndexDialog.C +++ b/src/frontends/qt2/QIndexDialog.C @@ -42,13 +42,13 @@ QIndexDialog::QIndexDialog(QIndex * form) "documentation.\n")); } - + void QIndexDialog::change_adaptor() { form_->changed(); } - + void QIndexDialog::closeEvent(QCloseEvent * e) { form_->slotWMHide(); diff --git a/src/frontends/qt2/QIndexDialog.h b/src/frontends/qt2/QIndexDialog.h index 56645548f8..5cf64868e8 100644 --- a/src/frontends/qt2/QIndexDialog.h +++ b/src/frontends/qt2/QIndexDialog.h @@ -8,9 +8,9 @@ #ifndef QINDEXDIALOG_H #define QINDEXDIALOG_H - + #include - + #include "ui/QIndexDialogBase.h" class QIndex; @@ -23,7 +23,7 @@ public: protected slots: virtual void change_adaptor(); - + protected: virtual void closeEvent(QCloseEvent * e); diff --git a/src/frontends/qt2/QLog.C b/src/frontends/qt2/QLog.C index 079b53a1c7..7759a52fe0 100644 --- a/src/frontends/qt2/QLog.C +++ b/src/frontends/qt2/QLog.C @@ -7,7 +7,7 @@ */ #include -#include +#include #ifdef __GNUG__ #pragma implementation @@ -15,12 +15,12 @@ #include #include - + #include "QLogDialog.h" #include "QLog.h" #include "Qt2BC.h" #include "gettext.h" - + #include "QtLyXView.h" #include "ControlLog.h" @@ -68,6 +68,6 @@ void QLog::update_contents() while (getline(ifstr, line)) text += line + "\n"; - + dialog_->logTV->setText(text.c_str()); } diff --git a/src/frontends/qt2/QLog.h b/src/frontends/qt2/QLog.h index eb3645f551..eef767afec 100644 --- a/src/frontends/qt2/QLog.h +++ b/src/frontends/qt2/QLog.h @@ -21,7 +21,7 @@ class QLogDialog; /// class QLog - : public Qt2CB > + : public Qt2CB > { public: /// diff --git a/src/frontends/qt2/QLogDialog.C b/src/frontends/qt2/QLogDialog.C index 0fe4f682a4..d9ce878562 100644 --- a/src/frontends/qt2/QLogDialog.C +++ b/src/frontends/qt2/QLogDialog.C @@ -16,7 +16,7 @@ #include "QLog.h" #include "QtLyXView.h" -#include "ControlLog.h" +#include "ControlLog.h" QLogDialog::QLogDialog(QLog * form) : QLogDialogBase(0, 0, false, 0), @@ -26,7 +26,7 @@ QLogDialog::QLogDialog(QLog * form) form, SLOT(slotClose())); } - + void QLogDialog::closeEvent(QCloseEvent * e) { form_->slotWMHide(); diff --git a/src/frontends/qt2/QLogDialog.h b/src/frontends/qt2/QLogDialog.h index 7ae346523d..b670c5ae50 100644 --- a/src/frontends/qt2/QLogDialog.h +++ b/src/frontends/qt2/QLogDialog.h @@ -8,9 +8,9 @@ #ifndef QLOGDIALOG_H #define QLOGDIALOG_H - + #include - + #include "ui/QLogDialogBase.h" class QLog; diff --git a/src/frontends/qt2/QMinipage.C b/src/frontends/qt2/QMinipage.C index a30eb6ec39..fafbb86122 100644 --- a/src/frontends/qt2/QMinipage.C +++ b/src/frontends/qt2/QMinipage.C @@ -16,13 +16,13 @@ #include #include #include "lengthcombo.h" - + #include "QMinipageDialog.h" #include "QMinipage.h" #include "Qt2BC.h" #include "gettext.h" #include "support/lstrings.h" - + #include "QtLyXView.h" #include "ControlMinipage.h" @@ -46,7 +46,7 @@ void QMinipage::build_dialog() bc().addReadOnly(dialog_->widthED); bc().addReadOnly(dialog_->unitsLC); - bc().addReadOnly(dialog_->valignCO); + bc().addReadOnly(dialog_->valignCO); } @@ -72,7 +72,7 @@ void QMinipage::apply() } } - + namespace { string const numtostr(double val) { string a(tostr(val)); @@ -81,15 +81,15 @@ namespace { return a; } } // namespace anon - - + + void QMinipage::update_contents() { LyXLength len(controller().params().pageWidth); dialog_->widthED->setText(numtostr(len.value()).c_str()); dialog_->unitsLC->setCurrentItem(len.unit()); lyxerr << "width " << numtostr(len.value()).c_str() << " units " << len.unit() << std::endl; - + int item = 0; switch (controller().params().pos) { case InsetMinipage::center: @@ -99,5 +99,5 @@ void QMinipage::update_contents() item = 2; break; } - dialog_->valignCO->setCurrentItem(item); + dialog_->valignCO->setCurrentItem(item); } diff --git a/src/frontends/qt2/QMinipage.h b/src/frontends/qt2/QMinipage.h index f53691ecf8..b6ae553b6f 100644 --- a/src/frontends/qt2/QMinipage.h +++ b/src/frontends/qt2/QMinipage.h @@ -21,7 +21,7 @@ class QMinipageDialog; /// class QMinipage - : public Qt2CB > + : public Qt2CB > { public: /// diff --git a/src/frontends/qt2/QMinipageDialog.C b/src/frontends/qt2/QMinipageDialog.C index b3b4661821..abca6bd60b 100644 --- a/src/frontends/qt2/QMinipageDialog.C +++ b/src/frontends/qt2/QMinipageDialog.C @@ -12,13 +12,13 @@ #include #include #include "lengthcombo.h" - + #include "QMinipageDialog.h" #include "Dialogs.h" #include "QMinipage.h" #include "QtLyXView.h" -#include "ControlMinipage.h" +#include "ControlMinipage.h" QMinipageDialog::QMinipageDialog(QMinipage * form) : QMinipageDialogBase(0, 0, false, 0), @@ -34,7 +34,7 @@ QMinipageDialog::QMinipageDialog(QMinipage * form) form, SLOT(slotClose())); } - + void QMinipageDialog::closeEvent(QCloseEvent * e) { form_->slotWMHide(); diff --git a/src/frontends/qt2/QMinipageDialog.h b/src/frontends/qt2/QMinipageDialog.h index 553b30f046..3e2dc07751 100644 --- a/src/frontends/qt2/QMinipageDialog.h +++ b/src/frontends/qt2/QMinipageDialog.h @@ -8,9 +8,9 @@ #ifndef QMINIPAGEDIALOG_H #define QMINIPAGEDIALOG_H - + #include - + #include "ui/QMinipageDialogBase.h" class QMinipage; diff --git a/src/frontends/qt2/QParagraph.h b/src/frontends/qt2/QParagraph.h index 3f96094ee1..90ce3989d8 100644 --- a/src/frontends/qt2/QParagraph.h +++ b/src/frontends/qt2/QParagraph.h @@ -19,7 +19,7 @@ class LyXView; class QParagraphDialog; class QParagraph : public DialogBase { -public: +public: QParagraph(LyXView *, Dialogs *); ~QParagraph(); @@ -29,8 +29,8 @@ public: void update(bool switched = false); /// Close the connections void close(); - -private: + +private: /// Create the dialog if necessary, update it and display it. void show(); /// Hide the dialog. @@ -41,15 +41,15 @@ private: /// the LyXView we belong to LyXView * lv_; - + /// Used so we can get at the signals we have to connect to. Dialogs * d_; - + /// Hide connection. SigC::Connection h_; - + /// readonly file or not - bool readonly; + bool readonly; }; #endif // QPARAGRAPH_H diff --git a/src/frontends/qt2/QParagraphDialog.C b/src/frontends/qt2/QParagraphDialog.C index 58da428a36..2a6d327bf1 100644 --- a/src/frontends/qt2/QParagraphDialog.C +++ b/src/frontends/qt2/QParagraphDialog.C @@ -13,7 +13,7 @@ #include "QParagraphDialog.h" #include "QParagraph.h" -#include "support/lstrings.h" +#include "support/lstrings.h" #include "debug.h" #include @@ -28,7 +28,7 @@ using std::endl; QParagraphDialog::QParagraphDialog(QParagraph * form, QWidget * parent, char const * name, bool modal, WFlags fl) - : QParagraphDialogBase(parent, name, modal, fl), + : QParagraphDialogBase(parent, name, modal, fl), form_(form) { setCaption(name); @@ -95,7 +95,7 @@ void QParagraphDialog::setSpace(VSpace::vspace_kind kindabove, bool keepabove, bool keepbelow) { int item = 0; - + switch (kindabove) { case VSpace::NONE: item = 0; break; case VSpace::DEFSKIP: item = 1; break; @@ -106,7 +106,7 @@ void QParagraphDialog::setSpace(VSpace::vspace_kind kindabove, case VSpace::LENGTH: item = 6; break; } spacingAbove->setCurrentItem(item); - + switch (kindbelow) { case VSpace::NONE: item = 0; break; case VSpace::DEFSKIP: item = 1; break; @@ -117,20 +117,20 @@ void QParagraphDialog::setSpace(VSpace::vspace_kind kindabove, case VSpace::LENGTH: item = 6; break; } spacingBelow->setCurrentItem(item); - + spacingAboveValue->setEnabled(kindabove == VSpace::LENGTH); spacingAbovePlus->setEnabled(kindabove == VSpace::LENGTH); spacingAboveMinus->setEnabled(kindabove == VSpace::LENGTH); spacingBelowValue->setEnabled(kindbelow == VSpace::LENGTH); spacingBelowPlus->setEnabled(kindbelow == VSpace::LENGTH); spacingBelowMinus->setEnabled(kindbelow == VSpace::LENGTH); - + spacingAboveKeep->setChecked(keepabove); spacingBelowKeep->setChecked(keepbelow); } -void QParagraphDialog::setAboveLength(float val, float plus, float minus, +void QParagraphDialog::setAboveLength(float val, float plus, float minus, LyXLength::UNIT vunit, LyXLength::UNIT punit, LyXLength::UNIT munit) @@ -144,7 +144,7 @@ void QParagraphDialog::setAboveLength(float val, float plus, float minus, spacingAbovePlus->setText(tostr(plus).c_str()); spacingAboveMinus->setText(tostr(minus).c_str()); } - + spacingAboveValueUnit->setCurrentItem(getItem(vunit)); spacingAbovePlusUnit->setCurrentItem(getItem(punit)); spacingAboveMinusUnit->setCurrentItem(getItem(munit)); @@ -152,7 +152,7 @@ void QParagraphDialog::setAboveLength(float val, float plus, float minus, } -void QParagraphDialog::setBelowLength(float val, float plus, float minus, +void QParagraphDialog::setBelowLength(float val, float plus, float minus, LyXLength::UNIT vunit, LyXLength::UNIT punit, LyXLength::UNIT munit) @@ -166,7 +166,7 @@ void QParagraphDialog::setBelowLength(float val, float plus, float minus, spacingBelowPlus->setText(tostr(plus).c_str()); spacingBelowMinus->setText(tostr(minus).c_str()); } - + spacingBelowValueUnit->setCurrentItem(getItem(vunit)); spacingBelowPlusUnit->setCurrentItem(getItem(punit)); spacingBelowMinusUnit->setCurrentItem(getItem(munit)); @@ -174,7 +174,7 @@ void QParagraphDialog::setBelowLength(float val, float plus, float minus, void QParagraphDialog::setExtra(float widthval, LyXLength::UNIT units, - string const & percent, int align, + string const & percent, int align, bool hfill, bool startminipage, Paragraph::PEXTRA_TYPE type) { @@ -191,38 +191,38 @@ void QParagraphDialog::setExtra(float widthval, LyXLength::UNIT units, } } else extraWidth->setText(""); - + switch (type) { - case Paragraph::PEXTRA_NONE: - extraType->setCurrentItem(0); + case Paragraph::PEXTRA_NONE: + extraType->setCurrentItem(0); break; - case Paragraph::PEXTRA_MINIPAGE: - extraType->setCurrentItem(1); - enable_extraOptions(1); - enable_minipageOptions(1); + case Paragraph::PEXTRA_MINIPAGE: + extraType->setCurrentItem(1); + enable_extraOptions(1); + enable_minipageOptions(1); break; - case Paragraph::PEXTRA_FLOATFLT: - extraType->setCurrentItem(2); - enable_extraOptions(2); + case Paragraph::PEXTRA_FLOATFLT: + extraType->setCurrentItem(2); + enable_extraOptions(2); break; - case Paragraph::PEXTRA_INDENT: - extraType->setCurrentItem(3); - enable_extraOptions(3); + case Paragraph::PEXTRA_INDENT: + extraType->setCurrentItem(3); + enable_extraOptions(3); break; } - + switch (align) { - case Paragraph::MINIPAGE_ALIGN_TOP: - minipageValign->setCurrentItem(0); + case Paragraph::MINIPAGE_ALIGN_TOP: + minipageValign->setCurrentItem(0); break; - case Paragraph::MINIPAGE_ALIGN_MIDDLE: - minipageValign->setCurrentItem(1); + case Paragraph::MINIPAGE_ALIGN_MIDDLE: + minipageValign->setCurrentItem(1); break; - case Paragraph::MINIPAGE_ALIGN_BOTTOM: - minipageValign->setCurrentItem(2); + case Paragraph::MINIPAGE_ALIGN_BOTTOM: + minipageValign->setCurrentItem(2); break; } - + minipageHfill->setChecked(hfill); minipageStart->setChecked(startminipage); } @@ -241,7 +241,7 @@ LyXGlueLength QParagraphDialog::getAboveLength() const return len; } - + LyXGlueLength QParagraphDialog::getBelowLength() const { LyXGlueLength len( @@ -259,8 +259,8 @@ LyXGlueLength QParagraphDialog::getBelowLength() const LyXLength QParagraphDialog::getExtraWidth() const { if (extraUnit->currentItem() != 11) { - LyXLength len( - (extraWidth->text()).toDouble(), + LyXLength len( + (extraWidth->text()).toDouble(), getLyXLength(extraUnit->currentItem()) ); return len; @@ -270,7 +270,7 @@ LyXLength QParagraphDialog::getExtraWidth() const } } - + string QParagraphDialog::getExtraWidthPercent() const { double val = (extraWidth->text()).toDouble(); @@ -282,13 +282,13 @@ string QParagraphDialog::getExtraWidthPercent() const } -char const * QParagraphDialog::getLabelWidth() const +char const * QParagraphDialog::getLabelWidth() const { - return labelWidth->text(); + return labelWidth->text(); } -LyXAlignment QParagraphDialog::getAlign() const +LyXAlignment QParagraphDialog::getAlign() const { switch (alignment->currentItem()) { case 0: return LYX_ALIGN_BLOCK; @@ -298,63 +298,63 @@ LyXAlignment QParagraphDialog::getAlign() const default: return LYX_ALIGN_CENTER; } } - - -bool QParagraphDialog::getAboveKeep() const -{ - return spacingAboveKeep->isChecked(); + + +bool QParagraphDialog::getAboveKeep() const +{ + return spacingAboveKeep->isChecked(); } - -bool QParagraphDialog::getBelowKeep() const -{ - return spacingBelowKeep->isChecked(); + +bool QParagraphDialog::getBelowKeep() const +{ + return spacingBelowKeep->isChecked(); } - -bool QParagraphDialog::getLineAbove() const -{ - return lineAbove->isChecked(); + +bool QParagraphDialog::getLineAbove() const +{ + return lineAbove->isChecked(); } - -bool QParagraphDialog::getLineBelow() const -{ - return lineBelow->isChecked(); + +bool QParagraphDialog::getLineBelow() const +{ + return lineBelow->isChecked(); } - -bool QParagraphDialog::getPagebreakAbove() const -{ - return pagebreakAbove->isChecked(); + +bool QParagraphDialog::getPagebreakAbove() const +{ + return pagebreakAbove->isChecked(); } - -bool QParagraphDialog::getPagebreakBelow() const + +bool QParagraphDialog::getPagebreakBelow() const { - return pagebreakBelow->isChecked(); + return pagebreakBelow->isChecked(); } - -bool QParagraphDialog::getNoIndent() const + +bool QParagraphDialog::getNoIndent() const { - return noIndent->isChecked(); + return noIndent->isChecked(); } - -VSpace::vspace_kind QParagraphDialog::getSpaceAboveKind() const + +VSpace::vspace_kind QParagraphDialog::getSpaceAboveKind() const { return getSpaceKind(spacingAbove->currentItem()); } - -VSpace::vspace_kind QParagraphDialog::getSpaceBelowKind() const + +VSpace::vspace_kind QParagraphDialog::getSpaceBelowKind() const { return getSpaceKind(spacingBelow->currentItem()); } -Paragraph::PEXTRA_TYPE QParagraphDialog::getExtraType() const +Paragraph::PEXTRA_TYPE QParagraphDialog::getExtraType() const { switch (extraType->currentItem()) { case 0: return Paragraph::PEXTRA_NONE; @@ -365,8 +365,8 @@ Paragraph::PEXTRA_TYPE QParagraphDialog::getExtraType() const return Paragraph::PEXTRA_NONE; } - -Paragraph::MINIPAGE_ALIGNMENT QParagraphDialog::getExtraAlign() const + +Paragraph::MINIPAGE_ALIGNMENT QParagraphDialog::getExtraAlign() const { switch (minipageValign->currentItem()) { case 0: return Paragraph::MINIPAGE_ALIGN_TOP; @@ -376,20 +376,20 @@ Paragraph::MINIPAGE_ALIGNMENT QParagraphDialog::getExtraAlign() const } } - -bool QParagraphDialog::getHfillBetween() const + +bool QParagraphDialog::getHfillBetween() const { return minipageHfill->isChecked(); } -bool QParagraphDialog::getStartNewMinipage() const +bool QParagraphDialog::getStartNewMinipage() const { return minipageStart->isChecked(); } -VSpace::vspace_kind QParagraphDialog::getSpaceKind(int val) const +VSpace::vspace_kind QParagraphDialog::getSpaceKind(int val) const { switch (val) { case 0: return VSpace::NONE; @@ -407,7 +407,7 @@ VSpace::vspace_kind QParagraphDialog::getSpaceKind(int val) const } -LyXLength::UNIT QParagraphDialog::getLyXLength(int val) const +LyXLength::UNIT QParagraphDialog::getLyXLength(int val) const { switch (val) { case 0: return LyXLength::CM; @@ -428,8 +428,8 @@ LyXLength::UNIT QParagraphDialog::getLyXLength(int val) const return LyXLength::UNIT_NONE; } - -int QParagraphDialog::getItem(LyXLength::UNIT unit) const + +int QParagraphDialog::getItem(LyXLength::UNIT unit) const { int item = 0; switch (unit) { @@ -517,7 +517,7 @@ void QParagraphDialog::apply_adaptor() } -void QParagraphDialog::cancel_adaptor() +void QParagraphDialog::cancel_adaptor() { form_->close(); hide(); diff --git a/src/frontends/qt2/QParagraphDialog.h b/src/frontends/qt2/QParagraphDialog.h index 67f1d04f62..9d391d5068 100644 --- a/src/frontends/qt2/QParagraphDialog.h +++ b/src/frontends/qt2/QParagraphDialog.h @@ -12,7 +12,7 @@ #define QPARAGRAPHDIALOG_H #include - + #include "ui/QParagraphDialogBase.h" #include "vspace.h" #include "paragraph.h" @@ -24,13 +24,13 @@ class QParagraph; class QParagraphDialog : public QParagraphDialogBase { Q_OBJECT - + public: QParagraphDialog(QParagraph * form, QWidget * parent = 0, char const * name = 0, bool modal = FALSE, WFlags fl = 0); ~QParagraphDialog(); - + void setReadOnly(bool); void setLabelWidth(char const *); void setAlign(int); @@ -46,7 +46,7 @@ public: LyXGlueLength getBelowLength() const; LyXLength getExtraWidth() const; string getExtraWidthPercent() const; - // FIXME: return a std::string ! + // FIXME: return a std::string ! char const * getLabelWidth() const; LyXAlignment getAlign() const; bool getAboveKeep() const; diff --git a/src/frontends/qt2/QPreamble.C b/src/frontends/qt2/QPreamble.C index 707425be5d..55aa006439 100644 --- a/src/frontends/qt2/QPreamble.C +++ b/src/frontends/qt2/QPreamble.C @@ -7,7 +7,7 @@ */ #include -#include +#include #ifdef __GNUG__ #pragma implementation @@ -15,12 +15,12 @@ #include #include - + #include "QPreambleDialog.h" #include "QPreamble.h" #include "Qt2BC.h" #include "gettext.h" - + #include "QtLyXView.h" #include "ControlPreamble.h" diff --git a/src/frontends/qt2/QPreamble.h b/src/frontends/qt2/QPreamble.h index 1bb1c98196..99d7c4e638 100644 --- a/src/frontends/qt2/QPreamble.h +++ b/src/frontends/qt2/QPreamble.h @@ -21,7 +21,7 @@ class QPreambleDialog; /// class QPreamble - : public Qt2CB > + : public Qt2CB > { public: /// diff --git a/src/frontends/qt2/QPreambleDialog.C b/src/frontends/qt2/QPreambleDialog.C index 50be09ac38..658e6313e0 100644 --- a/src/frontends/qt2/QPreambleDialog.C +++ b/src/frontends/qt2/QPreambleDialog.C @@ -20,10 +20,10 @@ #include "support/lyxlib.h" #include "support/forkedcall.h" #include "support/filetools.h" -#include "gettext.h" - +#include "gettext.h" + #include "QtLyXView.h" -#include "ControlPreamble.h" +#include "ControlPreamble.h" using std::getline; @@ -39,7 +39,7 @@ QPreambleDialog::QPreambleDialog(QPreamble * form) form, SLOT(slotClose())); } - + void QPreambleDialog::closeEvent(QCloseEvent * e) { form_->slotWMHide(); @@ -52,7 +52,7 @@ void QPreambleDialog::change_adaptor() form_->changed(); } - + void QPreambleDialog::editClicked() { // find an editor @@ -60,11 +60,11 @@ void QPreambleDialog::editClicked() if (editor.empty()) { static string lastentry = ""; editor = QInputDialog::getText( - _("Enter editor program"), _("Editor"), QLineEdit::Normal, + _("Enter editor program"), _("Editor"), QLineEdit::Normal, lastentry.c_str()).latin1(); if (editor.empty()) return; - lastentry = editor; + lastentry = editor; } string const text(preambleLE->text().latin1()); @@ -80,7 +80,7 @@ void QPreambleDialog::editClicked() file.close(); editor += " " + filename; - + Forkedcall call; // FIXME: make async @@ -98,9 +98,9 @@ void QPreambleDialog::editClicked() string newtext; string line; - + while (getline(in, line)) { - newtext += line + "\n"; + newtext += line + "\n"; } in.close(); diff --git a/src/frontends/qt2/QPreambleDialog.h b/src/frontends/qt2/QPreambleDialog.h index 8365436bf4..a44a6dbb2a 100644 --- a/src/frontends/qt2/QPreambleDialog.h +++ b/src/frontends/qt2/QPreambleDialog.h @@ -8,9 +8,9 @@ #ifndef QPreambleDIAPreamble_H #define QPreambleDIAPreamble_H - + #include - + #include "ui/QPreambleDialogBase.h" class QPreamble; @@ -23,7 +23,7 @@ public: protected slots: virtual void editClicked(); - virtual void change_adaptor(); + virtual void change_adaptor(); protected: virtual void closeEvent(QCloseEvent * e); diff --git a/src/frontends/qt2/QPrint.C b/src/frontends/qt2/QPrint.C index 0a0ad259cd..602127426b 100644 --- a/src/frontends/qt2/QPrint.C +++ b/src/frontends/qt2/QPrint.C @@ -18,17 +18,17 @@ #include #include #include - + #include "QPrintDialog.h" #include "QPrint.h" #include "Qt2BC.h" #include "gettext.h" - + #include "QtLyXView.h" #include "ControlPrint.h" #include "support/lstrings.h" - + typedef Qt2CB > base_class; QPrint::QPrint(ControlPrint & c) @@ -41,7 +41,7 @@ void QPrint::build_dialog() { dialog_.reset(new QPrintDialog(this)); - bc().setOK(dialog_->printPB); + bc().setOK(dialog_->printPB); bc().setCancel(dialog_->closePB); } @@ -52,11 +52,11 @@ void QPrint::update_contents() dialog_->printerED->setText(pp.printer_name.c_str()); dialog_->fileED->setText(pp.file_name.c_str()); - + dialog_->printerRB->setChecked(true); if (pp.target == PrinterParams::FILE) dialog_->fileRB->setChecked(true); - + dialog_->reverseCB->setChecked(pp.reverse_order); QRadioButton * button; @@ -66,7 +66,7 @@ void QPrint::update_contents() case PrinterParams::EVEN: button = dialog_->evenRB; break; } button->setChecked(true); - + // hmmm... maybe a bit weird but maybe not // we might just be remembering the last // time this was printed. @@ -74,7 +74,7 @@ void QPrint::update_contents() dialog_->fromED->setText(pp.from_page.c_str()); dialog_->toED->setText(""); - if (pp.to_page) + if (pp.to_page) dialog_->toED->setText(tostr(pp.to_page).c_str()); } else { dialog_->fromED->setText(""); @@ -116,6 +116,6 @@ void QPrint::apply() dialog_->reverseCB->isChecked(), !dialog_->collateCB->isChecked(), strToInt(dialog_->copiesSB->text().latin1())); - + controller().params() = pp; } diff --git a/src/frontends/qt2/QPrint.h b/src/frontends/qt2/QPrint.h index e6606deb84..ec1a8d035c 100644 --- a/src/frontends/qt2/QPrint.h +++ b/src/frontends/qt2/QPrint.h @@ -22,7 +22,7 @@ class QPrintDialog; /// class QPrint - : public Qt2CB > + : public Qt2CB > { public: /// diff --git a/src/frontends/qt2/QPrintDialog.C b/src/frontends/qt2/QPrintDialog.C index 19831a61b7..411d45b833 100644 --- a/src/frontends/qt2/QPrintDialog.C +++ b/src/frontends/qt2/QPrintDialog.C @@ -40,11 +40,11 @@ void QPrintDialog::change_adaptor() { form_->changed(); } - - + + void QPrintDialog::browseClicked() { - QString file = QFileDialog::getOpenFileName(QString::null, + QString file = QFileDialog::getOpenFileName(QString::null, _("PostScript files (*.ps)"), this, 0, _("Select a file to print to")); if (!file.isNull()) { fileED->setText(file); @@ -52,7 +52,7 @@ void QPrintDialog::browseClicked() } } - + void QPrintDialog::fileChanged() { if (!fileED->text().isEmpty()) @@ -60,28 +60,28 @@ void QPrintDialog::fileChanged() form_->changed(); } - + void QPrintDialog::copiesChanged(int i) { collateCB->setEnabled(i != 1); form_->changed(); } - + void QPrintDialog::printerChanged() { printerRB->setChecked(true); form_->changed(); } - + void QPrintDialog::pagerangeChanged() { int from = strToUnsignedInt(fromED->text().latin1()); int to = strToUnsignedInt(toED->text().latin1()); - + if (!toED->text().isEmpty() && from > to) fromED->setText(toED->text()); - + form_->changed(); } diff --git a/src/frontends/qt2/QPrintDialog.h b/src/frontends/qt2/QPrintDialog.h index 524d344aef..46dd720a06 100644 --- a/src/frontends/qt2/QPrintDialog.h +++ b/src/frontends/qt2/QPrintDialog.h @@ -11,9 +11,9 @@ #define QPRINTDIALOG_H #include - + #include "ui/QPrintDialogBase.h" -#include "lyxrc.h" +#include "lyxrc.h" #include "PrinterParams.h" class QPrint; @@ -23,7 +23,7 @@ class QPrintDialog : public QPrintDialogBase public: QPrintDialog(QPrint * f); - + protected slots: virtual void change_adaptor(); virtual void browseClicked(); diff --git a/src/frontends/qt2/QRef.C b/src/frontends/qt2/QRef.C index b8aef69f5c..a088407ffb 100644 --- a/src/frontends/qt2/QRef.C +++ b/src/frontends/qt2/QRef.C @@ -9,11 +9,11 @@ #include #include "support/lstrings.h" - + #include "QRefDialog.h" #include "ControlRef.h" #include "QRef.h" -#include "Qt2BC.h" +#include "Qt2BC.h" #include "gettext.h" #include "insets/insetref.h" @@ -27,7 +27,7 @@ using std::endl; typedef Qt2CB > base_class; - + QRef::QRef(ControlRef & c) : base_class(c, _("Cross Reference")), sort_(false), at_ref_(false) @@ -39,8 +39,8 @@ void QRef::build_dialog() { dialog_.reset(new QRefDialog(this)); - bc().setOK(dialog_->okPB); - bc().setCancel(dialog_->closePB); + bc().setOK(dialog_->okPB); + bc().setCancel(dialog_->closePB); bc().addReadOnly(dialog_->refsLB); bc().addReadOnly(dialog_->sortCB); bc().addReadOnly(dialog_->nameED); @@ -48,7 +48,7 @@ void QRef::build_dialog() bc().addReadOnly(dialog_->typeCO); } - + void QRef::update_contents() { dialog_->referenceED->setText(controller().params().getContents().c_str()); @@ -82,14 +82,14 @@ bool QRef::nameAllowed() controller().docType() != ControlRef::LITERATE; } - + bool QRef::typeAllowed() { return controller().docType() == ControlRef::LINUXDOC || controller().docType() == ControlRef::DOCBOOK; } - + void QRef::setGoBack() { dialog_->gotoPB->setText(_("&Go back")); @@ -97,7 +97,7 @@ void QRef::setGoBack() QToolTip::add(dialog_->gotoPB, _("Go back")); } - + void QRef::setGotoRef() { dialog_->gotoPB->setText(_("&Goto")); @@ -105,7 +105,7 @@ void QRef::setGotoRef() QToolTip::add(dialog_->gotoPB, _("Go to reference")); } - + void QRef::gotoRef() { string ref(dialog_->referenceED->text()); @@ -122,7 +122,7 @@ void QRef::gotoRef() at_ref_ = !at_ref_; } - + void QRef::redoRefs() { dialog_->refsLB->setAutoUpdate(false); @@ -159,6 +159,6 @@ void QRef::updateRefs() dialog_->refsLB->clear(); refs_ = controller().getLabelList(string()); dialog_->sortCB->setEnabled(!refs_.empty()); - dialog_->refsLB->setEnabled(!refs_.empty()); + dialog_->refsLB->setEnabled(!refs_.empty()); redoRefs(); } diff --git a/src/frontends/qt2/QRef.h b/src/frontends/qt2/QRef.h index 59f35802ab..c9758813ed 100644 --- a/src/frontends/qt2/QRef.h +++ b/src/frontends/qt2/QRef.h @@ -12,7 +12,7 @@ #include #include #include "LString.h" - + #include "Qt2Base.h" class ControlRef; @@ -22,45 +22,45 @@ class QRef : public Qt2CB > { friend class QRefDialog; - -public: + +public: QRef(ControlRef & c); private: - /// apply changes - virtual void apply(); + /// apply changes + virtual void apply(); /// build dialog virtual void build_dialog(); /// update dialog virtual void update_contents(); - /// is name allowed for this ? + /// is name allowed for this ? bool nameAllowed(); /// is type allowed for this ? bool typeAllowed(); - + /// go to current reference void gotoRef(); /// set go back button void setGoBack(); - + /// set goto ref button void setGotoRef(); - + /// re-enter references void redoRefs(); - + /// update references void updateRefs(); - + /// sort or not persistent state - bool sort_; + bool sort_; - /// at a reference ? + /// at a reference ? bool at_ref_; - + /// the references std::vector refs_; }; diff --git a/src/frontends/qt2/QRefDialog.C b/src/frontends/qt2/QRefDialog.C index 32ba84dcbe..8a95e2b996 100644 --- a/src/frontends/qt2/QRefDialog.C +++ b/src/frontends/qt2/QRefDialog.C @@ -10,12 +10,12 @@ #include #include -#include +#include #include -#include - +#include + #include "QRefDialog.h" -#include "ControlRef.h" +#include "ControlRef.h" #include "Dialogs.h" #include "QRef.h" #include "debug.h" @@ -48,8 +48,8 @@ void QRefDialog::refHighlighted(const QString & sel) if (form_->readOnly()) return; - referenceED->setText(sel); - if (form_->at_ref_) + referenceED->setText(sel); + if (form_->at_ref_) form_->gotoRef(); gotoPB->setEnabled(true); if (form_->typeAllowed()) @@ -58,7 +58,7 @@ void QRefDialog::refHighlighted(const QString & sel) nameED->setEnabled(true); } - + void QRefDialog::refSelected(const QString &) { form_->gotoRef(); diff --git a/src/frontends/qt2/QRefDialog.h b/src/frontends/qt2/QRefDialog.h index 5813579393..314879f1a6 100644 --- a/src/frontends/qt2/QRefDialog.h +++ b/src/frontends/qt2/QRefDialog.h @@ -9,9 +9,9 @@ #ifndef QREFDIALOG_H #define QREFDIALOG_H - + #include - + #include "ui/QRefDialogBase.h" class QRef; diff --git a/src/frontends/qt2/QSearch.C b/src/frontends/qt2/QSearch.C index becd8ecd8c..698ce9b5a1 100644 --- a/src/frontends/qt2/QSearch.C +++ b/src/frontends/qt2/QSearch.C @@ -7,7 +7,7 @@ */ #include -#include +#include #ifdef __GNUG__ #pragma implementation @@ -16,12 +16,12 @@ #include #include #include - + #include "QSearchDialog.h" #include "QSearch.h" #include "Qt2BC.h" #include "gettext.h" - + #include "QtLyXView.h" #include "ControlSearch.h" @@ -38,24 +38,24 @@ void QSearch::build_dialog() dialog_.reset(new QSearchDialog(this)); bc().setCancel(dialog_->closePB); - bc().addReadOnly(dialog_->replaceCO); - bc().addReadOnly(dialog_->replacePB); - bc().addReadOnly(dialog_->replaceallPB); + bc().addReadOnly(dialog_->replaceCO); + bc().addReadOnly(dialog_->replacePB); + bc().addReadOnly(dialog_->replaceallPB); bc().addReadOnly(dialog_->caseCB); bc().addReadOnly(dialog_->wordsCB); bc().addReadOnly(dialog_->backwardsCB); - dialog_->replacePB->setEnabled(false); - dialog_->replaceallPB->setEnabled(false); + dialog_->replacePB->setEnabled(false); + dialog_->replaceallPB->setEnabled(false); } - + void QSearch::find(string const & str, bool casesens, bool words, bool backwards) { controller().find(str, casesens, words, !backwards); } - + void QSearch::replace(string const & findstr, string const & replacestr, bool casesens, bool words, bool all) { diff --git a/src/frontends/qt2/QSearch.h b/src/frontends/qt2/QSearch.h index df6df73f18..f523414c36 100644 --- a/src/frontends/qt2/QSearch.h +++ b/src/frontends/qt2/QSearch.h @@ -21,7 +21,7 @@ class QSearchDialog; /// class QSearch - : public Qt2CB > + : public Qt2CB > { public: /// diff --git a/src/frontends/qt2/QSearchDialog.C b/src/frontends/qt2/QSearchDialog.C index bf8bd9ddb0..41a65e449b 100644 --- a/src/frontends/qt2/QSearchDialog.C +++ b/src/frontends/qt2/QSearchDialog.C @@ -22,10 +22,10 @@ QSearchDialog::QSearchDialog(QSearch * form) form_(form) { connect(closePB, SIGNAL(clicked()), - form_, SLOT(slotClose())); + form_, SLOT(slotClose())); } - + void QSearchDialog::closeEvent(QCloseEvent * e) { form_->slotWMHide(); @@ -43,10 +43,10 @@ void QSearchDialog::findChanged() findPB->setEnabled(true); replacePB->setEnabled(!form_->readOnly()); replaceallPB->setEnabled(!form_->readOnly()); - } + } } - + void QSearchDialog::findClicked() { string const find(findCO->currentText().latin1()); @@ -64,9 +64,9 @@ void QSearchDialog::replaceClicked() form_->replace(find, replace, caseCB->isChecked(), wordsCB->isChecked(), - false); + false); } - + void QSearchDialog::replaceallClicked() { diff --git a/src/frontends/qt2/QSearchDialog.h b/src/frontends/qt2/QSearchDialog.h index 38b6e8cc60..2d32340b82 100644 --- a/src/frontends/qt2/QSearchDialog.h +++ b/src/frontends/qt2/QSearchDialog.h @@ -10,7 +10,7 @@ #define QSEARCHDIALOG_H #include - + #include "ui/QSearchDialogBase.h" #include "QSearch.h" @@ -22,20 +22,20 @@ class QSearchDialog : public QSearchDialogBase public: QSearchDialog(QSearch * form); - + protected slots: void findChanged(); void findClicked(); void replaceClicked(); void replaceallClicked(); - + protected: void closeEvent(QCloseEvent * e); private: // add a string to the combo if needed void remember(string const & find, QComboBox & combo); - + QSearch * form_; }; diff --git a/src/frontends/qt2/QShowFile.C b/src/frontends/qt2/QShowFile.C index fc944dc022..b428cd5297 100644 --- a/src/frontends/qt2/QShowFile.C +++ b/src/frontends/qt2/QShowFile.C @@ -18,7 +18,7 @@ #include typedef Qt2CB > base_class; - + QShowFile::QShowFile(ControlShowFile & c) : base_class(c, _("ShowFile")) { @@ -32,7 +32,7 @@ void QShowFile::build_dialog() bc().setCancel(dialog_->closePB); } - + void QShowFile::update_contents() { dialog_->setName(controller().getFileName().c_str()); @@ -44,5 +44,3 @@ void QShowFile::update_contents() dialog_->text->setText(contents.c_str()); } - - diff --git a/src/frontends/qt2/QShowFile.h b/src/frontends/qt2/QShowFile.h index 8838f44cc4..3a1017c71a 100644 --- a/src/frontends/qt2/QShowFile.h +++ b/src/frontends/qt2/QShowFile.h @@ -16,14 +16,14 @@ class ControlShowFile; class QShowFileDialog; class QShowFile : - public Qt2CB > + public Qt2CB > { friend class QShowFileDialog; - -public: + +public: QShowFile(ControlShowFile &); -private: +private: /// Apply changes virtual void apply() {}; /// update diff --git a/src/frontends/qt2/QShowFileDialog.C b/src/frontends/qt2/QShowFileDialog.C index 2d64f7b034..467c0cbbc3 100644 --- a/src/frontends/qt2/QShowFileDialog.C +++ b/src/frontends/qt2/QShowFileDialog.C @@ -21,7 +21,7 @@ QShowFileDialog::QShowFileDialog(QShowFile * form) form, SLOT(slotClose())); } - + void QShowFileDialog::closeEvent(QCloseEvent * e) { form_->slotWMHide(); diff --git a/src/frontends/qt2/QShowFileDialog.h b/src/frontends/qt2/QShowFileDialog.h index 517f85d021..1dd3311c44 100644 --- a/src/frontends/qt2/QShowFileDialog.h +++ b/src/frontends/qt2/QShowFileDialog.h @@ -8,9 +8,9 @@ #ifndef QSHOWFILEDIALOG_H #define QSHOWFILEDIALOG_H - + #include - + #include "ui/QShowFileDialogBase.h" class QShowFile; diff --git a/src/frontends/qt2/QSpellchecker.C b/src/frontends/qt2/QSpellchecker.C index f84d2221aa..cbd553def9 100644 --- a/src/frontends/qt2/QSpellchecker.C +++ b/src/frontends/qt2/QSpellchecker.C @@ -7,7 +7,7 @@ */ #include - + #include "ControlSpellchecker.h" #include "QSpellcheckerDialog.h" #include "QSpellchecker.h" @@ -15,14 +15,14 @@ #include "gettext.h" #include -#include +#include #include #include #include #include typedef Qt2CB > base_class; - + QSpellchecker::QSpellchecker(ControlSpellchecker & c) : base_class(c, _("Spellchecker")) { @@ -37,15 +37,15 @@ void QSpellchecker::build_dialog() dialog_->wordED->setReadOnly(true); } - + void QSpellchecker::update_contents() { dialog_->wordED->setText(""); dialog_->replaceCO->clear(); dialog_->suggestionsLB->clear(); } - - + + void QSpellchecker::accept() { controller().ignoreAll(); @@ -54,7 +54,7 @@ void QSpellchecker::accept() void QSpellchecker::add() { - controller().insert(); + controller().insert(); } @@ -78,7 +78,7 @@ void QSpellchecker::options() void QSpellchecker::spellcheck() { - controller().check(); + controller().check(); dialog_->spellcheckPB->setEnabled(false); } @@ -87,10 +87,10 @@ void QSpellchecker::stop() { controller().stop(); dialog_->spellcheckPB->setEnabled(true); - hide(); + hide(); } - + void QSpellchecker::partialUpdate(int id) { switch (id) { @@ -101,7 +101,7 @@ void QSpellchecker::partialUpdate(int id) { dialog_->wordED->setText(controller().getWord().c_str()); dialog_->suggestionsLB->clear(); - + string w; while (!(w = controller().getSuggestion()).empty()) { dialog_->suggestionsLB->insertItem(w.c_str()); diff --git a/src/frontends/qt2/QSpellchecker.h b/src/frontends/qt2/QSpellchecker.h index 4deed6bb81..b9c6a40a52 100644 --- a/src/frontends/qt2/QSpellchecker.h +++ b/src/frontends/qt2/QSpellchecker.h @@ -13,30 +13,30 @@ #include "Qt2Base.h" - -class ControlSpellchecker; + +class ControlSpellchecker; class QSpellcheckerDialog; class QSpellchecker : - public Qt2CB > + public Qt2CB > { friend class QSpellcheckerDialog; - -public: + +public: QSpellchecker(ControlSpellchecker &); - /// update from controller + /// update from controller void partialUpdate(int id); - + private: - void stop(); + void stop(); void accept(); void add(); void ignore(); void replace(); void options(); void spellcheck(); - + /// Apply changes virtual void apply() {}; /// update diff --git a/src/frontends/qt2/QSpellcheckerDialog.C b/src/frontends/qt2/QSpellcheckerDialog.C index 258c30d477..8527620e03 100644 --- a/src/frontends/qt2/QSpellcheckerDialog.C +++ b/src/frontends/qt2/QSpellcheckerDialog.C @@ -26,14 +26,14 @@ QSpellcheckerDialog::QSpellcheckerDialog(QSpellchecker * form) this, SLOT(stop())); } - + void QSpellcheckerDialog:: suggestionChanged(const QString & str) { if (replaceCO->count() != 0) replaceCO->changeItem(str, 0); else replaceCO->insertItem(str); - + replaceCO->setCurrentItem(0); } @@ -52,8 +52,8 @@ void QSpellcheckerDialog:: replaceChanged(const QString & str) if (i != suggestionsLB->count()) suggestionsLB->setCurrentItem(i); } - - + + void QSpellcheckerDialog::closeEvent(QCloseEvent * e) { form_->slotWMHide(); diff --git a/src/frontends/qt2/QSpellcheckerDialog.h b/src/frontends/qt2/QSpellcheckerDialog.h index 89d0db01d6..ac11fcc642 100644 --- a/src/frontends/qt2/QSpellcheckerDialog.h +++ b/src/frontends/qt2/QSpellcheckerDialog.h @@ -8,9 +8,9 @@ #ifndef QSPELLCHECKERDIALOG_H #define QSPELLCHECKERDIALOG_H - + #include - + #include "ui/QSpellcheckerDialogBase.h" #include "QSpellchecker.h" @@ -25,7 +25,7 @@ protected slots: virtual void stop() { form_->stop(); } - + virtual void acceptClicked() { form_->accept(); } @@ -45,8 +45,8 @@ protected slots: form_->options(); } virtual void suggestionChanged(const QString &); - virtual void replaceChanged(const QString &); - + virtual void replaceChanged(const QString &); + protected: virtual void closeEvent(QCloseEvent * e); diff --git a/src/frontends/qt2/QTabularCreate.C b/src/frontends/qt2/QTabularCreate.C index bb989feff6..20aa4d6641 100644 --- a/src/frontends/qt2/QTabularCreate.C +++ b/src/frontends/qt2/QTabularCreate.C @@ -17,7 +17,7 @@ #include "QTabularCreate.h" #include "Qt2BC.h" #include "gettext.h" -#include "debug.h" +#include "debug.h" #include #include diff --git a/src/frontends/qt2/QTabularCreate.h b/src/frontends/qt2/QTabularCreate.h index b242267614..1f3cd09f0c 100644 --- a/src/frontends/qt2/QTabularCreate.h +++ b/src/frontends/qt2/QTabularCreate.h @@ -21,7 +21,7 @@ class QTabularCreateDialog; /// class QTabularCreate - : public Qt2CB > + : public Qt2CB > { public: /// diff --git a/src/frontends/qt2/QTabularCreateDialog.C b/src/frontends/qt2/QTabularCreateDialog.C index 7222f3235d..4009305639 100644 --- a/src/frontends/qt2/QTabularCreateDialog.C +++ b/src/frontends/qt2/QTabularCreateDialog.C @@ -12,7 +12,7 @@ #include "QTabularCreateDialog.h" #include "QTabularCreate.h" - + #include "support/lstrings.h" #include @@ -33,13 +33,13 @@ QTabularCreateDialog::QTabularCreateDialog(QTabularCreate * form) form_, SLOT(slotClose())); } - + void QTabularCreateDialog::columnsChanged(int) { form_->changed(); } - + void QTabularCreateDialog::rowsChanged(int) { form_->changed(); diff --git a/src/frontends/qt2/QTabularCreateDialog.h b/src/frontends/qt2/QTabularCreateDialog.h index 43ab65138e..eac2ee9842 100644 --- a/src/frontends/qt2/QTabularCreateDialog.h +++ b/src/frontends/qt2/QTabularCreateDialog.h @@ -9,7 +9,7 @@ #ifndef QTABULARCREATEDIALOG_H #define QTABULARCREATEDIALOG_H - + #include "ui/QTabularCreateDialogBase.h" class QTabularCreate; @@ -23,7 +23,7 @@ public: protected slots: virtual void columnsChanged(int); virtual void rowsChanged(int); - + private: QTabularCreate * form_; }; diff --git a/src/frontends/qt2/QTexinfo.C b/src/frontends/qt2/QTexinfo.C index 504c5fbc32..f10bed706b 100644 --- a/src/frontends/qt2/QTexinfo.C +++ b/src/frontends/qt2/QTexinfo.C @@ -28,7 +28,7 @@ using std::vector; typedef Qt2CB > base_class; - + QTexinfo::QTexinfo(ControlTexinfo & c) : base_class(c, _("LaTeX Information")), warningPosted(false), activeStyle(ControlTexinfo::cls) @@ -49,21 +49,21 @@ void QTexinfo::build_dialog() void QTexinfo::updateStyles(ControlTexinfo::texFileSuffix whichStyle) { bool const withFullPath = dialog_->path->isChecked(); - + string const str = controller().getContents(whichStyle, withFullPath); std::vector flist = getVectorFromString(str,"\n"); - + dialog_->fileList->clear(); - + for (vector::const_iterator fitem = flist.begin(); fitem != flist.end(); ++fitem) { dialog_->fileList->insertItem((*fitem).c_str()); } - + activeStyle = whichStyle; } - + void QTexinfo::updateStyles() { updateStyles(activeStyle); diff --git a/src/frontends/qt2/QTexinfo.h b/src/frontends/qt2/QTexinfo.h index 276941ce7e..2f460e0eb9 100644 --- a/src/frontends/qt2/QTexinfo.h +++ b/src/frontends/qt2/QTexinfo.h @@ -22,7 +22,7 @@ class QTexinfoDialog; /// class QTexinfo - : public Qt2CB > + : public Qt2CB > { public: /// diff --git a/src/frontends/qt2/QTexinfoDialog.C b/src/frontends/qt2/QTexinfoDialog.C index 96bed18daa..93d615ab3d 100644 --- a/src/frontends/qt2/QTexinfoDialog.C +++ b/src/frontends/qt2/QTexinfoDialog.C @@ -9,9 +9,9 @@ #include #include -#include "LString.h" - -#include "ControlTexinfo.h" +#include "LString.h" + +#include "ControlTexinfo.h" #include "QTexinfoDialog.h" #include "Dialogs.h" #include "QTexinfo.h" @@ -28,13 +28,13 @@ QTexinfoDialog::QTexinfoDialog(QTexinfo * form) form, SLOT(slotClose())); } - + void QTexinfoDialog::change_adaptor() { form_->changed(); } - + void QTexinfoDialog::closeEvent(QCloseEvent * e) { form_->slotWMHide(); @@ -74,5 +74,5 @@ void QTexinfoDialog::update() default: break; } - + } diff --git a/src/frontends/qt2/QTexinfoDialog.h b/src/frontends/qt2/QTexinfoDialog.h index 6885165a24..0be6a39d48 100644 --- a/src/frontends/qt2/QTexinfoDialog.h +++ b/src/frontends/qt2/QTexinfoDialog.h @@ -8,9 +8,9 @@ #ifndef QTEXINFODIALOG_H #define QTEXINFODIALOG_H - + #include - + #include "ui/QTexinfoDialogBase.h" class QTexinfo; diff --git a/src/frontends/qt2/QThesaurus.C b/src/frontends/qt2/QThesaurus.C index 11cb78849c..c3282f055b 100644 --- a/src/frontends/qt2/QThesaurus.C +++ b/src/frontends/qt2/QThesaurus.C @@ -23,7 +23,7 @@ #include typedef Qt2CB > base_class; - + QThesaurus::QThesaurus(ControlThesaurus & c) : base_class(c, _("Thesaurus")) { @@ -40,15 +40,15 @@ void QThesaurus::build_dialog() bc().addReadOnly(dialog_->replacePB); } - + void QThesaurus::update_contents() { dialog_->entryED->setText(controller().text().c_str()); dialog_->replaceED->setText(""); - dialog_->updateLists(); + dialog_->updateLists(); } - + void QThesaurus::replace() { controller().replace(dialog_->replaceED->text().latin1()); diff --git a/src/frontends/qt2/QThesaurus.h b/src/frontends/qt2/QThesaurus.h index 79b8ecee63..25d1b34b9b 100644 --- a/src/frontends/qt2/QThesaurus.h +++ b/src/frontends/qt2/QThesaurus.h @@ -21,7 +21,7 @@ class QThesaurusDialog; /// class QThesaurus - : public Qt2CB > + : public Qt2CB > { public: /// @@ -37,7 +37,7 @@ private: virtual void build_dialog(); /// replace the word - void replace(); + void replace(); }; #endif // QTHESAURUS_H diff --git a/src/frontends/qt2/QThesaurusDialog.C b/src/frontends/qt2/QThesaurusDialog.C index 580272ad5f..2ccf03d103 100644 --- a/src/frontends/qt2/QThesaurusDialog.C +++ b/src/frontends/qt2/QThesaurusDialog.C @@ -9,16 +9,16 @@ #include #include -#include "LString.h" - -#include "ControlThesaurus.h" +#include "LString.h" + +#include "ControlThesaurus.h" #include "QThesaurusDialog.h" #include "Dialogs.h" #include "QThesaurus.h" #include #include -#include +#include QThesaurusDialog::QThesaurusDialog(QThesaurus * form) : QThesaurusDialogBase(0, 0, false, 0), @@ -28,13 +28,13 @@ QThesaurusDialog::QThesaurusDialog(QThesaurus * form) form, SLOT(slotClose())); } - + void QThesaurusDialog::change_adaptor() { form_->changed(); } - + void QThesaurusDialog::closeEvent(QCloseEvent * e) { form_->slotWMHide(); @@ -47,25 +47,25 @@ void QThesaurusDialog::entryChanged() updateLists(); } - + void QThesaurusDialog::replaceClicked() { form_->replace(); } - + void QThesaurusDialog::selectionChanged(QListViewItem * item) { if (form_->readOnly()) return; - + string const entry(item->text(0).latin1()); replaceED->setText(entry.c_str()); replacePB->setEnabled(true); form_->changed(); } - + void QThesaurusDialog::selectionClicked(QListViewItem * item) { entryED->setText(item->text(0)); @@ -73,17 +73,17 @@ void QThesaurusDialog::selectionClicked(QListViewItem * item) updateLists(); } - + void QThesaurusDialog::updateLists() { meaningsLV->clear(); - + std::vector matches; meaningsLV->setUpdatesEnabled(false); - + Thesaurus::Meanings meanings = form_->controller().getMeanings(entryED->text().latin1()); - + for (Thesaurus::Meanings::const_iterator cit = meanings.begin(); cit != meanings.end(); ++cit) { QListViewItem * i = new QListViewItem(meaningsLV); @@ -96,7 +96,7 @@ void QThesaurusDialog::updateLists() i2->setOpen(true); } } - + meaningsLV->setUpdatesEnabled(true); meaningsLV->update(); } diff --git a/src/frontends/qt2/QThesaurusDialog.h b/src/frontends/qt2/QThesaurusDialog.h index 36e9bb7102..d2d89331eb 100644 --- a/src/frontends/qt2/QThesaurusDialog.h +++ b/src/frontends/qt2/QThesaurusDialog.h @@ -8,9 +8,9 @@ #ifndef QTHESAURUSDIALOG_H #define QTHESAURUSDIALOG_H - + #include - + #include "ui/QThesaurusDialogBase.h" class QThesaurus; @@ -23,7 +23,7 @@ public: QThesaurusDialog(QThesaurus * form); void updateLists(); - + protected slots: virtual void change_adaptor(); virtual void entryChanged(); diff --git a/src/frontends/qt2/QToc.C b/src/frontends/qt2/QToc.C index 2806b253db..3ea21704e4 100644 --- a/src/frontends/qt2/QToc.C +++ b/src/frontends/qt2/QToc.C @@ -18,41 +18,41 @@ #include #include #include - + #include "QTocDialog.h" #include "QToc.h" -#include "Qt2BC.h" +#include "Qt2BC.h" #include "gettext.h" #include "support/lstrings.h" #include "debug.h" #include "QtLyXView.h" - + using std::endl; using std::pair; using std::stack; using std::vector; - + typedef Qt2CB > base_class; - + QToc::QToc(ControlToc & c) : base_class(c, _("Table of contents")) {} - - + + void QToc::build_dialog() { dialog_.reset(new QTocDialog(this)); - // Manage the cancel/close button + // Manage the cancel/close button bc().setCancel(dialog_->closePB); } void QToc::updateType() -{ +{ dialog_->typeCO->clear(); - + vector const & choice = controller().getTypes(); string const & type = toc::getType(controller().params().getCmdName()); @@ -64,30 +64,30 @@ void QToc::updateType() dialog_->setCaption(type.c_str()); } } -} - - +} + + void QToc::update_contents() { updateType(); updateToc(depth_); } - + void QToc::updateToc(int newdepth) { char const * str = dialog_->typeCO->currentText().latin1(); string type (str ? str : ""); - + Buffer::SingleList const & contents = controller().getContents(type); - + // Check if all elements are the same. if (newdepth == depth_ && toclist == contents) { return; } dialog_->tocLV->clear(); - + depth_ = newdepth; toclist = contents; @@ -138,7 +138,7 @@ void QToc::updateToc(int newdepth) else item = (last) ? (new QListViewItem(parent,last)) : (new QListViewItem(parent)); } - + lyxerr[Debug::GUI] << "Table of contents" << endl << "Added item " << iter->str.c_str() << " at depth " << iter->depth << ", previous sibling \"" << (last ? last->text(0).latin1() : "0") << "\", parent \"" << (parent ? parent->text(0).latin1() : "0") << "\"" << endl; @@ -156,14 +156,14 @@ void QToc::updateToc(int newdepth) void QToc::select(string const & text) { Buffer::SingleList::const_iterator iter = toclist.begin(); - + for (; iter != toclist.end(); ++iter) { if (iter->str == text) break; } - + if (iter == toclist.end()) { - lyxerr[Debug::GUI] << "Couldn't find highlighted TOC entry : " + lyxerr[Debug::GUI] << "Couldn't find highlighted TOC entry : " << text << endl; return; } diff --git a/src/frontends/qt2/QToc.h b/src/frontends/qt2/QToc.h index dda236452f..253465becd 100644 --- a/src/frontends/qt2/QToc.h +++ b/src/frontends/qt2/QToc.h @@ -5,7 +5,7 @@ * Read the file COPYING * * \author John Levon - * \author Kalle Dalheimer + * \author Kalle Dalheimer */ #ifndef QTOC_H @@ -18,18 +18,18 @@ #include "Qt2Base.h" #include "ControlToc.h" - + class ControlToc; class QTocDialog; -class QToc : - public Qt2CB > +class QToc : + public Qt2CB > { public: QToc(ControlToc &); friend class QTocDialog; - + private: /// update the listview void updateToc(int newdepth); @@ -39,13 +39,13 @@ private: /// select an entry void select(string const & text); - + /// set the depth void set_depth(int depth); - + virtual void apply() {}; - - /// update dialog + + /// update dialog virtual void update_contents(); /// build dialog diff --git a/src/frontends/qt2/QTocDialog.C b/src/frontends/qt2/QTocDialog.C index a2a4e73a76..7661537e96 100644 --- a/src/frontends/qt2/QTocDialog.C +++ b/src/frontends/qt2/QTocDialog.C @@ -21,19 +21,19 @@ QTocDialog::QTocDialog(QToc * form) connect(closePB, SIGNAL(clicked()), form, SLOT(slotClose())); } - + QTocDialog::~QTocDialog() { } - + void QTocDialog::activate_adaptor(int) { form_->updateToc(form_->depth_); } - - + + void QTocDialog::depth_adaptor(int depth) { form_->set_depth(depth); @@ -51,7 +51,7 @@ void QTocDialog::update_adaptor() form_->update(); } - + void QTocDialog::closeEvent(QCloseEvent * e) { form_->slotWMHide(); diff --git a/src/frontends/qt2/QTocDialog.h b/src/frontends/qt2/QTocDialog.h index f678e81c1c..72187d2036 100644 --- a/src/frontends/qt2/QTocDialog.h +++ b/src/frontends/qt2/QTocDialog.h @@ -8,7 +8,7 @@ #ifndef QTOCDIALOG_H #define QTOCDIALOG_H - + #include "ui/QTocDialogBase.h" class QToc; diff --git a/src/frontends/qt2/QURL.C b/src/frontends/qt2/QURL.C index a8c8145316..17c61ff56c 100644 --- a/src/frontends/qt2/QURL.C +++ b/src/frontends/qt2/QURL.C @@ -12,7 +12,7 @@ #include #include #include - + #include "ControlUrl.h" #include "Qt2BC.h" #include "QURL.h" @@ -20,7 +20,7 @@ #include "gettext.h" typedef Qt2CB > base_class; - + QURL::QURL(ControlUrl & c) : base_class(c, _("URL")) { @@ -38,7 +38,7 @@ void QURL::build_dialog() bc().addReadOnly(dialog_->hyperlinkCB); } - + void QURL::update_contents() { dialog_->urlED->setText(controller().params().getContents().c_str()); @@ -46,7 +46,7 @@ void QURL::update_contents() dialog_->hyperlinkCB->setChecked(controller().params().getCmdName() != "url"); } - + void QURL::apply() { controller().params().setContents(dialog_->urlED->text().latin1()); @@ -64,5 +64,5 @@ bool QURL::isValid() string const u(dialog_->urlED->text().latin1()); string const n(dialog_->nameED->text().latin1()); - return !u.empty() && !n.empty(); -} + return !u.empty() && !n.empty(); +} diff --git a/src/frontends/qt2/QURL.h b/src/frontends/qt2/QURL.h index 70d3339dc6..a5707440b7 100644 --- a/src/frontends/qt2/QURL.h +++ b/src/frontends/qt2/QURL.h @@ -10,21 +10,21 @@ #define QURL_H #include "Qt2Base.h" - + class ControlUrl; class QURLDialog; class QURL : - public Qt2CB > + public Qt2CB > { - friend class QURLDialog; -public: + friend class QURLDialog; +public: QURL(ControlUrl & c); protected: virtual bool isValid(); - -private: + +private: /// apply dialog virtual void apply(); /// build dialog diff --git a/src/frontends/qt2/QURLDialog.C b/src/frontends/qt2/QURLDialog.C index af3694bf36..28f88df353 100644 --- a/src/frontends/qt2/QURLDialog.C +++ b/src/frontends/qt2/QURLDialog.C @@ -7,9 +7,9 @@ */ #include - + #include - + #include "QURLDialog.h" #include "Dialogs.h" #include "QURL.h" @@ -24,12 +24,12 @@ QURLDialog::QURLDialog(QURL * form) form_, SLOT(slotClose())); } - + QURLDialog::~QURLDialog() { } - + void QURLDialog::changed_adaptor() { form_->changed(); diff --git a/src/frontends/qt2/QURLDialog.h b/src/frontends/qt2/QURLDialog.h index b4c1bcba40..59bc0e567a 100644 --- a/src/frontends/qt2/QURLDialog.h +++ b/src/frontends/qt2/QURLDialog.h @@ -8,7 +8,7 @@ #ifndef QURLDIALOG_H #define QURLDIALOG_H - + #include "ui/QURLDialogBase.h" class QURL; diff --git a/src/frontends/qt2/QVCLog.C b/src/frontends/qt2/QVCLog.C index 32d477b82b..59bdf1d661 100644 --- a/src/frontends/qt2/QVCLog.C +++ b/src/frontends/qt2/QVCLog.C @@ -15,12 +15,12 @@ #include #include - + #include "QVCLogDialog.h" #include "QVCLog.h" #include "Qt2BC.h" #include "gettext.h" - + #include "QtLyXView.h" #include "ControlVCLog.h" @@ -42,11 +42,11 @@ void QVCLog::build_dialog() void QVCLog::update_contents() { - dialog_->setCaption(string(_("Version control log for ") + controller().getBufferFileName()).c_str()); + dialog_->setCaption(string(_("Version control log for ") + controller().getBufferFileName()).c_str()); dialog_->vclogTV->setText(""); stringstream ss; - + dialog_->vclogTV->setText(controller().getVCLogFile(ss).str().c_str()); } diff --git a/src/frontends/qt2/QVCLog.h b/src/frontends/qt2/QVCLog.h index 4413295868..53c0a6da06 100644 --- a/src/frontends/qt2/QVCLog.h +++ b/src/frontends/qt2/QVCLog.h @@ -21,7 +21,7 @@ class QVCLogDialog; /// class QVCLog - : public Qt2CB > + : public Qt2CB > { public: /// diff --git a/src/frontends/qt2/QVCLogDialog.C b/src/frontends/qt2/QVCLogDialog.C index ac42d4fca0..46167f5774 100644 --- a/src/frontends/qt2/QVCLogDialog.C +++ b/src/frontends/qt2/QVCLogDialog.C @@ -16,7 +16,7 @@ #include "QVCLog.h" #include "QtLyXView.h" -#include "ControlVCLog.h" +#include "ControlVCLog.h" QVCLogDialog::QVCLogDialog(QVCLog * form) : QVCLogDialogBase(0, 0, false, 0), @@ -26,7 +26,7 @@ QVCLogDialog::QVCLogDialog(QVCLog * form) form, SLOT(slotClose())); } - + void QVCLogDialog::closeEvent(QCloseEvent * e) { form_->slotWMHide(); diff --git a/src/frontends/qt2/QVCLogDialog.h b/src/frontends/qt2/QVCLogDialog.h index ea61dbb378..408e18a678 100644 --- a/src/frontends/qt2/QVCLogDialog.h +++ b/src/frontends/qt2/QVCLogDialog.h @@ -8,9 +8,9 @@ #ifndef QVCLOGDIALOG_H #define QVCLOGDIALOG_H - + #include - + #include "ui/QVCLogDialogBase.h" class QVCLog; diff --git a/src/frontends/qt2/Qt2BC.C b/src/frontends/qt2/Qt2BC.C index befb038f9f..0c364b38bd 100644 --- a/src/frontends/qt2/Qt2BC.C +++ b/src/frontends/qt2/Qt2BC.C @@ -35,14 +35,14 @@ void Qt2BC::setWidgetEnabled(QWidget * obj, bool enabled) { // yuck, rtti, but the user comes first if (obj->inherits("QLineEdit")) { - QLineEdit * le(static_cast(obj)); + QLineEdit * le(static_cast(obj)); le->setReadOnly(!enabled); } else { obj->setEnabled(enabled); } - + QWidget::FocusPolicy const p = - (enabled) ? QWidget::StrongFocus : QWidget::NoFocus; + (enabled) ? QWidget::StrongFocus : QWidget::NoFocus; obj->setFocusPolicy(p); } diff --git a/src/frontends/qt2/Qt2Base.C b/src/frontends/qt2/Qt2Base.C index 5d23347d99..b16305dfee 100644 --- a/src/frontends/qt2/Qt2Base.C +++ b/src/frontends/qt2/Qt2Base.C @@ -17,10 +17,10 @@ #endif #include -#include +#include -#include "debug.h" -#include "QtLyXView.h" +#include "debug.h" +#include "QtLyXView.h" #include "Dialogs.h" #include "Qt2Base.h" #include "Qt2BC.h" @@ -62,14 +62,14 @@ bool Qt2Base::isValid() return true; } - + void Qt2Base::changed() { if (updating_) return; - + if (isValid()) - bc().valid(); + bc().valid(); else bc().invalid(); } diff --git a/src/frontends/qt2/Qt2Base.h b/src/frontends/qt2/Qt2Base.h index 272c504ac2..2e2ba50ae7 100644 --- a/src/frontends/qt2/Qt2Base.h +++ b/src/frontends/qt2/Qt2Base.h @@ -14,8 +14,8 @@ #ifndef QT2BASE_H #define QT2BASE_H -#include - +#include + #include #include #include @@ -54,24 +54,24 @@ protected: /// Create the dialog if necessary, update it and display it. virtual void show(); /// update the dialog's contents - virtual void update_contents() = 0; + virtual void update_contents() = 0; /// the dialog has changed contents - virtual void changed(); + virtual void changed(); - /// is the dialog currently valid ? + /// is the dialog currently valid ? virtual bool isValid(); /// are we updating ? - bool updating_; - + bool updating_; + protected slots: // dialog closed from WM void slotWMHide(); // Restore button clicked void slotRestore(); - + // OK button clicked void slotOK(); @@ -87,7 +87,7 @@ private: private: /// dialog title, displayed by WM. - QString title_; + QString title_; }; @@ -96,16 +96,16 @@ class Qt2DB: public Qt2Base { protected: Qt2DB(ControlButtons &, QString const &); - - /// update the dialog + + /// update the dialog virtual void update(); - + /// Build the dialog virtual void build(); - + /// Pointer to the actual instantiation of the Qt dialog virtual QDialog * form() const; - + /// Real GUI implementation. boost::scoped_ptr dialog_; @@ -129,25 +129,25 @@ template void Qt2DB::update() { form()->setUpdatesEnabled(false); - + // protect the BC from unwarranted state transitions - + qApp->processEvents(); updating_ = true; update_contents(); qApp->processEvents(); updating_ = false; - + form()->setUpdatesEnabled(true); form()->update(); } - + template void Qt2DB::build() { // protect the BC from unwarranted state transitions - + qApp->processEvents(); updating_ = true; build_dialog(); @@ -155,7 +155,7 @@ void Qt2DB::build() updating_ = false; } - + template class Qt2CB: public Base { diff --git a/src/frontends/qt2/Timeout_pimpl.C b/src/frontends/qt2/Timeout_pimpl.C index 41bde71e8c..a3e6dfc427 100644 --- a/src/frontends/qt2/Timeout_pimpl.C +++ b/src/frontends/qt2/Timeout_pimpl.C @@ -27,7 +27,7 @@ void Timeout::Pimpl::timerEvent(QTimerEvent *) { owner_->emit(); } - + void Timeout::Pimpl::reset() { @@ -41,14 +41,14 @@ bool Timeout::Pimpl::running() const return timeout_id != -1; } - + void Timeout::Pimpl::start() { if (running()) lyxerr << "Timeout::start: already running!" << endl; timeout_id = startTimer(owner_->timeout_ms); } - + void Timeout::Pimpl::stop() { diff --git a/src/frontends/qt2/Timeout_pimpl.h b/src/frontends/qt2/Timeout_pimpl.h index cfaf13f737..25357ec69d 100644 --- a/src/frontends/qt2/Timeout_pimpl.h +++ b/src/frontends/qt2/Timeout_pimpl.h @@ -20,10 +20,10 @@ #include -#include +#include // stupid Qt #undef emit - + /** * This class executes the callback when the timeout expires * using Qt mechanisms @@ -39,7 +39,7 @@ public: /// reset void reset(); /// is the timer running ? - bool running() const; + bool running() const; protected: /// slot diff --git a/src/frontends/qt2/emptytable.C b/src/frontends/qt2/emptytable.C index a811c09c56..340d866f5f 100644 --- a/src/frontends/qt2/emptytable.C +++ b/src/frontends/qt2/emptytable.C @@ -29,7 +29,7 @@ QSize EmptyTable::sizeHint() const return QSize(cellsize * numCols(), cellsize * numRows()); } - + void EmptyTable::paintCell(QPainter *p, int row, int col) { int const x2 = cellWidth(col) - 1; @@ -73,9 +73,9 @@ void EmptyTable::mouseMoveEvent(QMouseEvent *ev) int const x = ev->pos().x(); int const y = ev->pos().y(); - if (x > 0) + if (x > 0) setNumberColumns(x / cellsize + leftCell()); - if (y > 0) + if (y > 0) setNumberRows(y / cellsize + topCell()); } diff --git a/src/frontends/qt2/emptytable.h b/src/frontends/qt2/emptytable.h index 75d35a35e6..cb4d9024e8 100644 --- a/src/frontends/qt2/emptytable.h +++ b/src/frontends/qt2/emptytable.h @@ -9,7 +9,7 @@ #ifndef EMPTYTABLE_H #define EMPTYTABLE_H -#include +#include #include "qttableview.h" /** @@ -20,17 +20,17 @@ class EmptyTable : public QtTableView { Q_OBJECT public: EmptyTable(QWidget * parent = 0, const char * name = 0); - + ~EmptyTable() {}; virtual QSize sizeHint() const; - + public slots: - /// set the number of columns in the table and emit colsChanged() signal + /// set the number of columns in the table and emit colsChanged() signal void setNumberColumns(int nr_cols); - /// set the number of rows in the table and emit rowsChanged() signal + /// set the number of rows in the table and emit rowsChanged() signal void setNumberRows(int nr_rows); - + signals: /// the number of columns changed void colsChanged(int); @@ -41,9 +41,9 @@ protected: /// fill in a cell virtual void paintCell(class QPainter *, int, int); virtual void mouseMoveEvent(QMouseEvent *); - + private: - /// number of current columns + /// number of current columns unsigned int cols; /// number of current rows unsigned int rows; diff --git a/src/frontends/qt2/lengthcombo.C b/src/frontends/qt2/lengthcombo.C index 736a5eb056..a36113de72 100644 --- a/src/frontends/qt2/lengthcombo.C +++ b/src/frontends/qt2/lengthcombo.C @@ -8,10 +8,10 @@ #include #include "gettext.h" - + #include "lengthcombo.h" - -#include + +#include LengthCombo::LengthCombo(QWidget * parent, char * name) : QComboBox(parent, name) @@ -40,7 +40,7 @@ LengthCombo::LengthCombo(QWidget * parent, char * name) LyXLength::UNIT LengthCombo::currentLengthItem() const -{ +{ LyXLength::UNIT unit; int i = currentItem(); switch (i) { @@ -63,15 +63,15 @@ LyXLength::UNIT LengthCombo::currentLengthItem() const // FIXME: LyXLength::PE ? }; return unit; -} - +} + void LengthCombo::has_activated(int) { emit selectionChanged(currentLengthItem()); } - + void LengthCombo::setCurrentItem(LyXLength::UNIT unit) { int i; diff --git a/src/frontends/qt2/lengthcombo.h b/src/frontends/qt2/lengthcombo.h index 93ab0fed6e..21fc3197af 100644 --- a/src/frontends/qt2/lengthcombo.h +++ b/src/frontends/qt2/lengthcombo.h @@ -10,10 +10,10 @@ #define LENGTHCOMBO_H #include - -#include - -#include "vspace.h" + +#include + +#include "vspace.h" /** * A combo box for selecting LyXLength::UNIT types. @@ -25,10 +25,10 @@ public: /// set the current item virtual void setCurrentItem(LyXLength::UNIT unit); - + /// get the current item LyXLength::UNIT currentLengthItem() const; - + protected slots: virtual void has_activated(int index); diff --git a/src/frontends/qt2/qttableview.C b/src/frontends/qt2/qttableview.C index 6251f4b1b9..da81025c0e 100644 --- a/src/frontends/qt2/qttableview.C +++ b/src/frontends/qt2/qttableview.C @@ -1,5 +1,5 @@ /********************************************************************** -** $Id: qttableview.C,v 1.2 2001/12/05 08:04:18 larsbj Exp $ +** $Id: qttableview.C,v 1.3 2002/03/21 21:19:37 larsbj Exp $ ** ** Implementation of QtTableView class ** @@ -25,7 +25,7 @@ #endif #ifndef Q_ASSERT #define Q_ASSERT ASSERT -#endif +#endif enum ScrollBarDirtyFlags { verGeometry = 0x01, @@ -1084,8 +1084,8 @@ void QtTableView::coverCornerSquare( bool enable ) Q_CHECK_PTR( cornerSquare ); cornerSquare->setGeometry( maxViewX() + frameWidth() + 1, maxViewY() + frameWidth() + 1, - VSBEXT, - HSBEXT); + VSBEXT, + HSBEXT); } if ( autoUpdate() && cornerSquare ) { if ( enable ) @@ -1289,7 +1289,7 @@ void QtTableView::paintEvent( QPaintEvent *e ) if ( !contentsRect().contains( updateR, TRUE ) ) {// update frame ? drawFrame( &paint ); - if ( updateR.left() < frameWidth() ) //### + if ( updateR.left() < frameWidth() ) //### updateR.setLeft( frameWidth() ); if ( updateR.top() < frameWidth() ) updateR.setTop( frameWidth() ); @@ -1451,7 +1451,7 @@ QScrollBar *QtTableView::verticalScrollBar() const #ifndef QT_NO_CURSOR sb->setCursor( arrowCursor ); #endif - sb->resize( sb->sizeHint() ); // height is irrelevant + sb->resize( sb->sizeHint() ); // height is irrelevant Q_CHECK_PTR(sb); sb->setTracking( FALSE ); sb->setFocusPolicy( NoFocus ); @@ -1848,8 +1848,8 @@ int QtTableView::minViewY() const int QtTableView::maxViewX() const { return width() - 1 - frameWidth() - - (tFlags & Tbl_vScrollBar ? VSBEXT - : 0); + - (tFlags & Tbl_vScrollBar ? VSBEXT + : 0); } @@ -1864,8 +1864,8 @@ int QtTableView::maxViewX() const int QtTableView::maxViewY() const { return height() - 1 - frameWidth() - - (tFlags & Tbl_hScrollBar ? HSBEXT - : 0); + - (tFlags & Tbl_hScrollBar ? HSBEXT + : 0); } @@ -1998,8 +1998,8 @@ void QtTableView::updateScrollBars( uint f ) if ( testTableFlags(Tbl_hScrollBar) && (sbDirty & horMask) != 0 ) { if ( sbDirty & horGeometry ) hScrollBar->setGeometry( 0,height() - HSBEXT, - viewWidth() + frameWidth()*2, - HSBEXT); + viewWidth() + frameWidth()*2, + HSBEXT); if ( sbDirty & horSteps ) { if ( cellW ) @@ -2022,8 +2022,8 @@ void QtTableView::updateScrollBars( uint f ) if ( testTableFlags(Tbl_vScrollBar) && (sbDirty & verMask) != 0 ) { if ( sbDirty & verGeometry ) vScrollBar->setGeometry( width() - VSBEXT, 0, - VSBEXT, - viewHeight() + frameWidth()*2 ); + VSBEXT, + viewHeight() + frameWidth()*2 ); if ( sbDirty & verSteps ) { if ( cellH ) @@ -2055,16 +2055,16 @@ void QtTableView::updateScrollBars( uint f ) void QtTableView::updateFrameSize() { int rw = width() - ( testTableFlags(Tbl_vScrollBar) ? - VSBEXT : 0 ); + VSBEXT : 0 ); int rh = height() - ( testTableFlags(Tbl_hScrollBar) ? - HSBEXT : 0 ); + HSBEXT : 0 ); if ( rw < 0 ) rw = 0; if ( rh < 0 ) rh = 0; if ( autoUpdate() ) { - int fh = frameRect().height(); + int fh = frameRect().height(); int fw = frameRect().width(); setFrameRect( QRect(0,0,rw,rh) ); diff --git a/src/frontends/xforms/Alert_pimpl.C b/src/frontends/xforms/Alert_pimpl.C index d52a189511..b39b983c48 100644 --- a/src/frontends/xforms/Alert_pimpl.C +++ b/src/frontends/xforms/Alert_pimpl.C @@ -13,13 +13,13 @@ #endif #include "Alert.h" -#include "Alert_pimpl.h" +#include "Alert_pimpl.h" #include "xforms_helpers.h" #include "gettext.h" #include #include FORMS_H_LOCATION - + using std::pair; using std::make_pair; @@ -43,10 +43,10 @@ int askConfirmation_pimpl(string const & s1, string const & s2, string const & s fl_set_choices_shortcut(scex(_("Yes|Yy#y")), scex(_("No|Nn#n")), scex(_("Cancel|^["))); - return fl_show_choice(s1.c_str(), s2.c_str(), s3.c_str(), + return fl_show_choice(s1.c_str(), s2.c_str(), s3.c_str(), 3, idex(_("Yes|Yy#y")), idex(_("No|Nn#n")), - idex(_("Cancel|^[")), 3); + idex(_("Cancel|^[")), 3); } diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index c35a6f4d49..79da121a12 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,7 @@ +2002-03-21 Lars Gullik Bjønnes + + * several files: ws cleanup + 2002-03-20 Angus Leeming * lots: whitespace changes. @@ -36,7 +40,7 @@ only if the dialog is visible. (getTooltip): renamed get. (toggleTooltips): renamed set and made public, - + * FormBase.C (show): * FormBaseDeprecated.C (show): move tooltip-inards into Tooltip. @@ -57,7 +61,7 @@ 2002-03-14 John Levon * GUIRunTime.C: add spaces to error messages - + 2002-03-13 Angus Leeming * FormBase.C (show): @@ -81,7 +85,7 @@ 2. Rename all button_cancel as button_close. 3. Ensure that all objects follow the naming scheme outlined in forms/README - + class | prefix ------------------+------- FL_BROWSER | browser @@ -151,7 +155,7 @@ 2002-03-10 John Levon * FormToc.C: make goto not reset the dialog - + 2002-03-08 Angus Leeming * FeedbackController.[Ch]: new files, providing a standard interface to @@ -355,7 +359,7 @@ 2002-02-11 John Levon * FormMinipage.C: return SMI_VALID on other form changes - + 2002-02-11 Juergen Spitzmueller * FormParagraph.C (update): [VSpace:] Delete the special method @@ -365,7 +369,7 @@ and updateWidgetsFromLength. 2002-02-10 Rob Lahaye - + * forms/form_external.fd: * form_external.C: change color2 of a few buttons into the proper grey color. @@ -383,7 +387,7 @@ * FormGraphics.C: * form_graphics.[Ch]: simplify the bounding box folder of the Graphic GUI - + 2002-02-08 Jean-Marc Lasgouttes * Menubar_pimpl.C (create_submenu): work around an xforms bug (?) @@ -417,7 +421,7 @@ * FormCitation.[Ch]: * FormTexinfo.[Ch]: * Makefile.am: altered appropriately. - + 2002-02-06 Juergen Spitzmueller * forms/form_texinfo.fd: @@ -450,7 +454,7 @@ 2002-02-05 Herbert Voss - * forms/form_graphics.fd: Noew the same view of the + * forms/form_graphics.fd: Noew the same view of the buttons as in preferences (LyXView). Make some things clear with better names. * FormGraphic.C: cosmetic changes to the layout. Delete @@ -462,7 +466,7 @@ * forms/form.citation.fd,form.bibtex.fd: add text_info * FormTexinfo.[Ch]: Delete Help mechanism, add tooltips and help messages. * FormCitation.[Ch],FormBibtex.[Ch]: add tooltips and help messages (actually - no tooltips in Bibtex). + no tooltips in Bibtex). 2002-02-05 Angus Leeming @@ -499,7 +503,7 @@ 2002-02-03 Herbert Voss - * xforms_helpers.C: fix bug with unit "%" in + * xforms_helpers.C: fix bug with unit "%" in updateWidgetsFromLengthString(...) 2002-02-02 Herbert Voss @@ -573,8 +577,8 @@ 2002-01-27 Herbert Voss - * FormGraphic.[Ch]: - * form_graphic.[Ch]: + * FormGraphic.[Ch]: + * form_graphic.[Ch]: * forms/form_graphic.fd: rewritten to support graphicx with all options and to be sure that the old figinsets are correct converted. @@ -621,7 +625,7 @@ * Toolbar_pimpl.C (update): disable layout combox when LFUN_LAYOUT is disabled - * combox.C (activate): + * combox.C (activate): (deactivate): change color of labels to reflect the state of the combox @@ -653,7 +657,7 @@ 2002-01-17 John Levon * FormDocument.C: enable line spacing input properly - + 2002-01-17 John Levon * forms/form_preferences.fd: @@ -661,12 +665,12 @@ * form_preferences.C: * FormPreferences.h: * FormPreferences.C: use better variable name - + 2002-01-17 John Levon * forms/form_preferences.fd: change "Use Scalable Fonts" to "Rescale bitmap fonts" - + 2002-01-16 Angus Leeming * FormMathsPanel.C: @@ -701,32 +705,32 @@ * xformsBC.C: #include ButtonController.tmpl, containing the instatiation of the button controller. - + 2002-01-15 John Levon * FormThesaurus.C: fix a crash 2002-1-15 Martin Vermeer - * FormMathsDelim.C: - * form_maths_delim_C: - * form_maths_delim.h: - * form_maths_delin.fd: - Put three radio buttons on the delimiters pop-up. It works as follows: - - left mouse middle mouse right mouse - ---------------------------------------------------------------------- - Left radio button | ( () ) - Middle radio button | () () ) - Right radio button | ) ) ) - ---------------------------------------------------------------------- - - Where + * FormMathsDelim.C: + * form_maths_delim_C: + * form_maths_delim.h: + * form_maths_delin.fd: + Put three radio buttons on the delimiters pop-up. It works as follows: + + left mouse middle mouse right mouse + ---------------------------------------------------------------------- + Left radio button | ( () ) + Middle radio button | () () ) + Right radio button | ) ) ) + ---------------------------------------------------------------------- + + Where ( left-side delimiter selected ) right-side delimiter selected () "symmnetric pair" selected, of which the clicked delimiter is - the left one. + the left one. So, if the middle radio button is activated ("()\nBoth") and you click on "[" with the default (left) mouse button, you get the delimiter pair "[]". @@ -791,7 +795,7 @@ 2002-01-14 John Levon * FormSpellchecker.C: disable resizing due to xforms bug - + 2002-01-13 Jean-Marc Lasgouttes * FormFiledialog.C (Reread): skip broken symlinks @@ -806,10 +810,10 @@ * MathsSymbols.C (get_pixmap_from_symbol): add a default statement in the switch. - * FormPreferences.C (Interface::input): - (Language::input): + * FormPreferences.C (Interface::input): + (Language::input): (Paths::input): add shortcuts to file dialogs directory buttons - + * FormPreference.h (browse): add default empty parameters for buttons descriptions. @@ -823,14 +827,14 @@ * form_thesaurus.h: * form_thesaurus.C: * forms/form_thesaurus.fd: update to Aiksaurus 0.14 - + 2002-01-12 Jean-Marc Lasgouttes * Toolbar_pimpl.C (setPixmap): simplify a bit 2002-01-10 Jean-Marc Lasgouttes - * Toolbar_pimpl.C (ToolbarCB): + * Toolbar_pimpl.C (ToolbarCB): * Menubar_pimpl.C (MenuCallback): use verboseDispatch instead of dispatch. @@ -838,7 +842,7 @@ * FormTabular.C (FormTabular): Fix Purify UMR. - * FormPreferences.C (build): "Conversion" is a better name. + * FormPreferences.C (build): "Conversion" is a better name. 2002-01-10 Martin Vermeer @@ -869,7 +873,7 @@ 2002-01-09 Martin Vermeer * forms/form_maths_style.fd: - * FormMathsStyle.[Ch]: New files, Implementing a mathed pop-up for math + * FormMathsStyle.[Ch]: New files, Implementing a mathed pop-up for math size "styles" and font types. * FormMathsPanel.[Ch]: * MathsSymbols.C: @@ -877,7 +881,7 @@ 2002-01-08 Martin Vermeer - * Menubar_pimpl.C (create_submenu): + * Menubar_pimpl.C (create_submenu): * Toolbar_pimpl.C (update): use FuncStatus. 2002-01-08 Angus Leeming @@ -915,13 +919,13 @@ * form_*: * forms/form_*: change radio buttons to round3dbutton - + 2002-01-05 John Levon * FormFiledialog.C: add FIXME - + * xforms_helpers.C: fix use of FileInfo - + 2002-01-07 John Levon * FormTabular.h: @@ -930,7 +934,7 @@ * form_tabular.C: * forms/form_tabular.fd: ugly fix to get around some of the UI problems (bug #110). - + 2002-01-04 Jürgen Spitzmüller * FormDocument.C: Recognize the default paper settings too @@ -950,9 +954,9 @@ * DropDown.C: always include in sources. - * xforms_helpers.h: - * FormFiledialog.h: - * Timeout_pimpl.h: + * xforms_helpers.h: + * FormFiledialog.h: + * Timeout_pimpl.h: * DropDown.h: do not include in headers 2001-12-20 Juergen Vigna @@ -972,7 +976,7 @@ * FormToc.C: fix crash when no entries, and update types properly - + 2001-12-11 Ben Stanley * Menubar_pimpl.C: Fixed a crashing bug when document has more @@ -1011,13 +1015,13 @@ 2001-12-05 John Levon - * FormParagraph.C (getCurrentParagraph): + * FormParagraph.C (getCurrentParagraph): (apply): get the right LyXText ! - + 2001-11-29 John Levon * FormParagraph.C: disallow page breaks in insets - + 2001-11-23 John Levon * FormParagraph.C: allow signed space above/below, actually @@ -1026,7 +1030,7 @@ 2001-11-04 John Levon * FormToc.C: fixes to make floatlists work - + 2001-11-23 John Levon * Makefile.am: @@ -1037,7 +1041,7 @@ * forms/fdfix.sh: move idex etc. to here * GUIRunTime.C: move getScreenDPI() to here - + 2001-11-20 Jürgen Spitzmüller * forms/form_ref.fd, form_preferences.fd, form_citation.fd, @@ -1057,7 +1061,7 @@ * FormFiledialog.C: don't reset path if new dir doesn't exist. - + 2001-11-12 Jürgen Spitzmüller * forms/form_document.fd: Renamed "Save as Class Defaults" @@ -1070,16 +1074,16 @@ 2001-11-07 John Levon * DropDown.C: fix crash, improve behaviour a bit - + 2001-11-07 Jean-Marc Lasgouttes - * FormDocument.C (class_apply): - (paper_apply): - (language_apply): - (options_apply): + * FormDocument.C (class_apply): + (paper_apply): + (language_apply): + (options_apply): (bullets_apply): add a version of these methods taking a BufferParams& parameters. The original versions are now wrappers - around these. + around these. (saveParamsAsDefault): new function, moved from old LFUN_LAYOUT_SAVE_DEFAULT code. @@ -1088,11 +1092,11 @@ * Makefile.am: * DropDown.h: * DropDown.C: drop-down completion - + 2001-11-04 John Levon * forms/form_graphics.fd: change clashing shortcut - + 2001-10-24 Juergen Vigna * FormTabular.C: changed calls for footer/headers of longtabulars. @@ -1116,8 +1120,8 @@ 2001-10-19 Jürgen Spitzmüller * forms/form_document.fd: - Class: add a value choice for Default Skip. - Some rearrangements (minor tweaks). + Class: add a value choice for Default Skip. + Some rearrangements (minor tweaks). * FormDocument.C: Handle that choice, minor tweaks. * forms/form_paragraph.fd: Add value choices * FormParagraph.C: Handle that choices. @@ -1139,7 +1143,7 @@ * FormTexinfo.[Ch]: some changes to the code 2001-10-10 André Pönitz - + * FormsMathMatrix.C: add missing space between v- and h-alignment parameters @@ -1370,10 +1374,10 @@ * FormPreferences.[Ch] (connect, disconnect): removed (redundant). * FormMaths*.C (c-tor): prohibit resizing of the dialog. - + 2001-09-07 Jean-Marc Lasgouttes - * Toolbar_pimpl.C (setLayout): + * Toolbar_pimpl.C (setLayout): (layoutSelected): make them work even when gettext has been translating the interface. @@ -1425,7 +1429,7 @@ 2001-09-02 John Levon * FormParagraph.C: fix default line spacing case - + 2001-08-31 John Levon * FormParagraph.C: disable space inputs when != Length @@ -1436,15 +1440,15 @@ * form_preferences.h: * form_preferences.C: * forms/form_preferences.fd: add view_dvi_paper_option - + 2001-08-31 John Levon * FormMathsPanel.h: sub dialogs must be Ignorant. - + 2001-08-31 John Levon * FormParagraph.C: fix to not allow 0 linespacing - + 2001-08-29 Angus Leeming * FormCitation.C (c-tor): prevent re-sizing of the dialog. @@ -1487,14 +1491,14 @@ 2001-08-27 John Levon * GUIRunTime.C: initApplication() should take a int & argc - + 2001-08-24 John Levon * FormCitation.h: * FormCitation.C: tidy code a little - + * GUIRunTime.C: more informative error - + 2001-08-23 Angus Leeming * forms/form_preferences.fd: order the items "logically" so that @@ -1551,19 +1555,19 @@ * combox.h: fix source doc - * form_math_matrix.C: + * form_math_matrix.C: * forms/form_math_matrix.fd: new layout - + 2001-08-16 John Levon * form_paragraph.h: * form_paragraph.C: * forms/form_paragraph.fd: * FormParagraph.C: support per-para linespacing - + * forms/form_float.fd: * form_float.C: fix shortcut typo - + 2001-08-15 Angus Leeming * forms/form_character.fd: small adjustment to the position of John's @@ -1608,7 +1612,7 @@ * form_maths_panel.C: * form_maths_panel.h: * forms/form_maths_panel.fd: re-add dots bitmaps - + * FormRef.C: "Goto" -> "Go to" 2001-07-29 John Levon @@ -1673,11 +1677,11 @@ * FormGraphics.C: * forms/form_graphics.fd: Removed inline option, all InsetGraphics figures are inlined. - + 2001-07-23 John Levon * FormInclude.C: add load file facility back - + 2001-07-23 John Levon * FormCharacter.C: disable resizing as it doesn't work @@ -1755,15 +1759,15 @@ 2001-07-03 Jean-Marc Lasgouttes - * GUIRunTime.C (x11Display): - (x11Screen): - (x11Colormap): + * GUIRunTime.C (x11Display): + (x11Screen): + (x11Colormap): (x11VisualDepth): new methods 2001-07-03 Lars Gullik Bjønnes * FormDocument.C (class_apply): call CutAndPaste::'s staitc method - directly. + directly. * Toolbar_pimpl.h: make owner be a XFormsView, small changes because of this. @@ -1785,14 +1789,14 @@ * FormPrint.C (input): modify to select radio_file when the user uses the filename input - + 2001-06-26 The LyX Project * combox.C (remove): send debug output to Debug::GUI. 2001-06-26 The LyX Project - * Menubar_pimpl.C (create_submenu): + * Menubar_pimpl.C (create_submenu): * Toolbar_pimpl.C (update): update to use func_status 2001-06-25 The LyX Project @@ -1847,9 +1851,9 @@ 2001-06-01 Jean-Marc Lasgouttes - * MathsSymbols.C: + * MathsSymbols.C: * FormMathsMatrix.C: bring C functions into global namespace if - necessary. + necessary. 2001-05-31 Lars Gullik Bjønnes @@ -1893,9 +1897,9 @@ 2001-04-16 Allan Rae - * xforms_helpers.C (formatted): + * xforms_helpers.C (formatted): * Menubar_pimpl.C (add_toc): #warning triggers an error on Sun CC 6.0 - as an unrecognised preprocessor directive. So ensure they're wrapped. + as an unrecognised preprocessor directive. So ensure they're wrapped. 2001-04-06 John Levon @@ -1947,7 +1951,7 @@ Squashed bug when creating a new inset, the keys field contained one (empty) key. No more; thanks, Dekel. - * FormExternal.C: + * FormExternal.C: * forms/form_external.fd: added Apply button. 2001-03-30 Angus Leeming @@ -2095,7 +2099,7 @@ 2001-03-19 Angus Leeming * FormBaseDeprecated.[Ch]: rename title as title_. - + * FormBaseDeprecated.C: restore John's trick to give the dialog a border with limited functionality. It got lost in the MVC merge. @@ -2126,7 +2130,7 @@ * FormTabularCreate.C (build): * FormToc.C (build): * FormUrl.C (build): removed initialisation of minw_, minh_. - + * The Maths Panel stuff no longer causes a crash on exit from LyX. * FormMaths.[Ch]: @@ -2163,10 +2167,10 @@ * Dialogs.C (Dialogs): create minipage options dialog. - * forms/form_minipage.fd: - * form_minipage.C: - * form_minipage.h: - * FormMinipage.C: + * forms/form_minipage.fd: + * form_minipage.C: + * form_minipage.h: + * FormMinipage.C: * FormMinipage.h: new files for the minipage options dialog. 2001-03-16 Angus Leeming @@ -2184,7 +2188,7 @@ 2001-03-16 Jean-Marc Lasgouttes * FormMaths.C (C_FormMathsDelimCB): add usual .c_str() for lyxstring - compatibility. + compatibility. 2001-03-16 Angus Leeming @@ -2261,13 +2265,13 @@ * Makefile.am: added FormCredits.[Ch] and form_credits.[Ch] * forms/makefile: added form_credits.fd - + * Dialogs.C: added FormCredits and removed ShowCredits. - + * FormCredits.[Ch]: * forms/form_credits.fd: * forms/form_search.fd: ported to the MVC way. - + 2001-03-07 Angus Leeming * xforms_helpers.h (formatted): now has default arguments for size and @@ -2275,7 +2279,7 @@ * FormCitation.[Ch]: moved code out of this class and into ControlCitation and associated helper funcs. - + 2001-03-05 Angus Leeming * FormBase.[Ch]: (InputCB): use ButtonController::input() rather than @@ -2384,7 +2388,7 @@ * forms/form_splash.fd: * FormSplash.h: * FormSplash.C: make independent of FormBase, tidy - + * Menubar_pimpl.C: destroy splash on interaction 2001-03-12 John Levon @@ -2411,7 +2415,7 @@ 2001-03-07 Edwin Leuven - * added credits: + * added credits: * Dialogs.C: * Makefile.am: * FormCredits.[Ch]: @@ -2423,7 +2427,7 @@ * Menubar_pimpl.h: make Pipl::ItemInfo::item_ a boost::shared_ptr, make ButtonList contain boost::shared_ptr - * Menubar_pimpl.C (~Pimpl): remove destructor + * Menubar_pimpl.C (~Pimpl): remove destructor 2001-03-06 John Levon @@ -2517,9 +2521,9 @@ * form_character.C: added * form_character.h: added * forms/form_character.fd: added - + 2001-02-23 Dekel Tsur - + * FormPreferences.C: Handle lyxrc.language_use_babel and lyxrc.language_global_options. @@ -2536,7 +2540,7 @@ 2001-02-21 Dekel Tsur - * FormDocument.C (checkMarginValues): Activate "use geometry" button + * FormDocument.C (checkMarginValues): Activate "use geometry" button if using custom paper size/margin. 2001-02-21 Allan Rae @@ -2545,13 +2549,13 @@ 2001-02-20 Edwin Leuven - * src/frontends/xforms/Dialogs.C: added preamble - * src/frontends/xforms/FormPreamble.C: added - * src/frontends/xforms/FormPreamble.h: added - * src/frontends/xforms/Makefile.am: added - * src/frontends/xforms/form_preamble.C: added - * src/frontends/xforms/form_preamble.h: added - * src/frontends/xforms/form_preamble.fd: added + * src/frontends/xforms/Dialogs.C: added preamble + * src/frontends/xforms/FormPreamble.C: added + * src/frontends/xforms/FormPreamble.h: added + * src/frontends/xforms/Makefile.am: added + * src/frontends/xforms/form_preamble.C: added + * src/frontends/xforms/form_preamble.h: added + * src/frontends/xforms/form_preamble.fd: added 2001-02-19 Angus Leeming @@ -2715,7 +2719,7 @@ 2001-01-25 Jean-Marc Lasgouttes * FormPreferences.C (GetFrom): fix crash when there is no format - defined. + defined. (GetTo): ditto. 2001-01-23 Angus Leeming @@ -2726,10 +2730,10 @@ 2001-01-21 Dekel Tsur * FormRef.C (update): Do not update dialog_->{ref,name,type} - if inset_ == 0. + if inset_ == 0. Deactivate the type button when buffer is LinuxDoc/Docbook (build): Uncomment calls to addReadOnly(). - (updateBrowser) Do not disable the update button when there are no + (updateBrowser) Do not disable the update button when there are no keys. (build, getType, getName): Use InsetRef::types. @@ -2742,4 +2746,3 @@ 2001-01-17 Dekel Tsur * FormRef.C (input): Fix the behavior of goto reference button. - diff --git a/src/frontends/xforms/Color.C b/src/frontends/xforms/Color.C index aa1795b45d..e6faa725e6 100644 --- a/src/frontends/xforms/Color.C +++ b/src/frontends/xforms/Color.C @@ -31,9 +31,9 @@ RGBColor::RGBColor(HSVColor const & hsv) double h = hsv.h; double const s = hsv.s; double const v = hsv.v; - + double rd, gd, bd; - + if (h == nohue || s == 0.0) { rd = gd = bd = v; } else { diff --git a/src/frontends/xforms/Dialogs.C b/src/frontends/xforms/Dialogs.C index dd327660d7..e2edfd3f64 100644 --- a/src/frontends/xforms/Dialogs.C +++ b/src/frontends/xforms/Dialogs.C @@ -69,8 +69,8 @@ #include "FormShowFile.h" #include "FormSpellchecker.h" #include "FormTabularCreate.h" -#include "FormTexinfo.h" -#include "FormThesaurus.h" +#include "FormTexinfo.h" +#include "FormThesaurus.h" #include "FormToc.h" #include "FormUrl.h" #include "FormVCLog.h" @@ -124,11 +124,11 @@ Dialogs::Dialogs(LyXView * lv) add(new GUIVCLog(*lv, *this)); add(new FormDocument(lv, this)); - add(new FormMathsPanel(lv, this)); + add(new FormMathsPanel(lv, this)); add(new FormParagraph(lv, this)); add(new FormPreferences(lv, this)); add(new FormTabular(lv, this)); - + // reduce the number of connections needed in // dialogs by a simple connection here. hideAll.connect(hideBufferDependent.slot()); diff --git a/src/frontends/xforms/DropDown.C b/src/frontends/xforms/DropDown.C index 49d412141b..4ed42f70ba 100644 --- a/src/frontends/xforms/DropDown.C +++ b/src/frontends/xforms/DropDown.C @@ -23,23 +23,23 @@ using std::vector; namespace { - + extern "C" void C_CompletedCB(FL_OBJECT * ob, long) { DropDown * d = static_cast(ob->u_vdata); d->completed(); } - + extern "C" int C_PeekCB(FL_FORM * form, void *xev) { DropDown * d = static_cast(form->u_vdata); return d->peek(static_cast(xev)); } - + } // namespace anon - + DropDown::DropDown(LyXView * lv, FL_OBJECT * ob) : lv_(lv) { @@ -47,20 +47,20 @@ DropDown::DropDown(LyXView * lv, FL_OBJECT * ob) fl_add_box(FL_UP_BOX, 0, 0, ob->w, 100, ""); browser_ = fl_add_browser(FL_SELECT_BROWSER, 0, 0, ob->w, 100, ""); form_->u_vdata = this; - browser_->u_vdata = this; + browser_->u_vdata = this; fl_set_object_callback(browser_, C_CompletedCB, 0); fl_register_raw_callback(form_, KeyPressMask|ButtonPressMask, C_PeekCB); fl_end_form(); } - + DropDown::~DropDown() { - if (form_->visible) + if (form_->visible) fl_hide_form(form_); fl_free_form(form_); } - + void DropDown::select(vector const & choices, int x, int y, int w) { @@ -108,7 +108,7 @@ void DropDown::line_down() if (fl_get_browser(browser_) < fl_get_browser_topline(browser_)) fl_set_browser_topline(browser_, fl_get_browser(browser_)); } - + int DropDown::peek(XEvent * xev) { @@ -116,7 +116,7 @@ int DropDown::peek(XEvent * xev) unsigned int keymask; fl_get_mouse(&x, &y, &keymask); - + if (xev->type == ButtonPress) { if (!(x >= form_->x && x <= (form_->x + form_->w) && y >= form_->y && y << (form_->y + form_->h))) { @@ -136,7 +136,7 @@ int DropDown::peek(XEvent * xev) line_up(); return 1; case XK_Return: - completed(); + completed(); return 1; case XK_Escape: fl_deselect_browser(browser_); @@ -146,7 +146,7 @@ int DropDown::peek(XEvent * xev) // FIXME: if someone has a got a way to // convince the event to fall back to the // minibuffer, I'm glad to hear it. - // fl_XPutBackEvent() doesn't work. + // fl_XPutBackEvent() doesn't work. // This is a bit less elegant perhaps, but works // well enough. Angus 11 Jan 2002 @@ -156,7 +156,7 @@ int DropDown::peek(XEvent * xev) } } } - return 0; + return 0; } diff --git a/src/frontends/xforms/DropDown.h b/src/frontends/xforms/DropDown.h index 1fb4ccd074..491eea49a2 100644 --- a/src/frontends/xforms/DropDown.h +++ b/src/frontends/xforms/DropDown.h @@ -9,24 +9,24 @@ #ifndef DROPDOWN_H #define DROPDOWN_H - + #ifdef __GNUG_ #pragma interface #endif #include "LyXView.h" -#include +#include #include "LString.h" #include FORMS_H_LOCATION #include - + class DropDown { public: /// constructor DropDown(LyXView * lv, FL_OBJECT * ob); /// destructor ~DropDown(); - + /// choose from the list of choices. void select(std::vector const & choices, int x, int y, int w); @@ -38,23 +38,23 @@ public: /// signal for completion SigC::Signal1 result; - + /// signal that a key was pressed SigC::Signal1 keypress; - + /// X event int peek(XEvent *); private: - /// move up a browser line + /// move up a browser line void line_up(); /// move down a browser line void line_down(); - + /// owning lyxview LyXView * lv_; - + /// our form FL_FORM * form_; diff --git a/src/frontends/xforms/FeedbackController.C b/src/frontends/xforms/FeedbackController.C index 4f04a25081..18a2213f0c 100644 --- a/src/frontends/xforms/FeedbackController.C +++ b/src/frontends/xforms/FeedbackController.C @@ -47,7 +47,7 @@ void FeedbackController::MessageCB(FL_OBJECT * ob, int event) lyx::Assert(ob); switch (event) { - case FL_ENTER: + case FL_ENTER: { string const feedback = getFeedback(ob); if (feedback.empty() && warning_posted_) @@ -56,7 +56,7 @@ void FeedbackController::MessageCB(FL_OBJECT * ob, int event) warning_posted_ = false; postMessage(getFeedback(ob)); break; - } + } case FL_LEAVE: if (!warning_posted_) diff --git a/src/frontends/xforms/FileDialog.C b/src/frontends/xforms/FileDialog.C index 6dad5b4e9b..ade7afffbd 100644 --- a/src/frontends/xforms/FileDialog.C +++ b/src/frontends/xforms/FileDialog.C @@ -16,13 +16,13 @@ #include "frontends/FileDialog.h" // temp. hack until Allow/prohibitInput is not // needed any more in src/ - for now it's simplest -// to leave it there -#include "LyXView.h" +// to leave it there +#include "LyXView.h" #include "bufferview_funcs.h" #include "gettext.h" #include "commandtags.h" #include "debug.h" -#include "support/lstrings.h" +#include "support/lstrings.h" #include @@ -35,7 +35,7 @@ FileDialog::FileDialog(LyXView *lv, string const &t, kb_action s, Button b1, But { private_ = new FileDialog::Private(); - private_->SetButton(0, b1.first, b1.second); + private_->SetButton(0, b1.first, b1.second); private_->SetButton(1, b2.first, b2.second); } @@ -69,8 +69,8 @@ FileDialog::Result const FileDialog::Select(string const & path, string const & result.first = FileDialog::Chosen; result.second = private_->Select(title_, path, filter, suggested); - + lv_->allowInput(); - + return result; } diff --git a/src/frontends/xforms/FormAboutlyx.C b/src/frontends/xforms/FormAboutlyx.C index 6f5a7577d7..016232aa1b 100644 --- a/src/frontends/xforms/FormAboutlyx.C +++ b/src/frontends/xforms/FormAboutlyx.C @@ -35,14 +35,14 @@ void FormAboutlyx::build() // create version tab version_.reset(build_tab_version()); - fl_set_object_label(version_->text_version, + fl_set_object_label(version_->text_version, controller().getVersion().c_str()); - fl_set_object_label(version_->text_copyright, + fl_set_object_label(version_->text_copyright, controller().getCopyright().c_str()); // create license and warranty tab license_.reset(build_tab_license()); - + string str = formatted(controller().getLicense(), license_->text_license->w-10); fl_set_object_label(license_->text_license, str.c_str()); @@ -54,7 +54,7 @@ void FormAboutlyx::build() // create credits credits_.reset(build_tab_credits()); stringstream ss; - fl_add_browser_line(credits_->browser_credits, + fl_add_browser_line(credits_->browser_credits, controller().getCredits(ss).str().c_str()); // stack tabs diff --git a/src/frontends/xforms/FormBase.C b/src/frontends/xforms/FormBase.C index 34144ebc20..52a9572b01 100644 --- a/src/frontends/xforms/FormBase.C +++ b/src/frontends/xforms/FormBase.C @@ -212,11 +212,11 @@ static int C_PrehandlerCB(FL_OBJECT * ob, int event, if (!ob->form) return 0; FormBase * ptr = static_cast(ob->form->u_vdata); - + if (ptr) ptr->PrehandlerCB(ob, event, key); return 0; } - + } // extern "C" diff --git a/src/frontends/xforms/FormBase.h b/src/frontends/xforms/FormBase.h index 852d6248a4..660b78b90b 100644 --- a/src/frontends/xforms/FormBase.h +++ b/src/frontends/xforms/FormBase.h @@ -64,7 +64,7 @@ protected: private: /// Pointer to the actual instantiation of xform's form virtual FL_FORM * form() const = 0; - /// Filter the inputs on callback from xforms + /// Filter the inputs on callback from xforms virtual ButtonPolicy::SMInput input(FL_OBJECT *, long); /** Redraw the form (on receipt of a Signal indicating, for example, @@ -79,7 +79,7 @@ private: /// Can the dialog be resized after it has been created? bool allow_resize_; /// dialog title, displayed by WM. - string title_; + string title_; /// Tooltips * tooltips_; }; diff --git a/src/frontends/xforms/FormBaseDeprecated.C b/src/frontends/xforms/FormBaseDeprecated.C index 8c92155574..f04ee4b686 100644 --- a/src/frontends/xforms/FormBaseDeprecated.C +++ b/src/frontends/xforms/FormBaseDeprecated.C @@ -84,7 +84,7 @@ void FormBaseDeprecated::show() build(); bc().refresh(); - + // work around dumb xforms sizing bug minw_ = form()->w; minh_ = form()->h; @@ -98,15 +98,15 @@ void FormBaseDeprecated::show() if (form()->visible) { fl_raise_form(form()); - /* This XMapWindow() will hopefully ensure that - * iconified dialogs are de-iconified. Mad props - * out to those crazy Xlib guys for forgetting a - * XDeiconifyWindow(). At least WindowMaker, when - * being notified of the redirected MapRequest will - * specifically de-iconify. From source, fvwm2 seems - * to do the same. - */ - XMapWindow(fl_get_display(), form()->window); + /* This XMapWindow() will hopefully ensure that + * iconified dialogs are de-iconified. Mad props + * out to those crazy Xlib guys for forgetting a + * XDeiconifyWindow(). At least WindowMaker, when + * being notified of the redirected MapRequest will + * specifically de-iconify. From source, fvwm2 seems + * to do the same. + */ + XMapWindow(fl_get_display(), form()->window); } else { connect(); diff --git a/src/frontends/xforms/FormBaseDeprecated.h b/src/frontends/xforms/FormBaseDeprecated.h index 24e6ad8901..8f551aeffd 100644 --- a/src/frontends/xforms/FormBaseDeprecated.h +++ b/src/frontends/xforms/FormBaseDeprecated.h @@ -124,7 +124,7 @@ protected: // methods /// Redraw connection. SigC::Connection r_; /// dialog title, displayed by WM. - string title_; + string title_; private: /// The dialog's minimum allowable dimensions. diff --git a/src/frontends/xforms/FormBibitem.C b/src/frontends/xforms/FormBibitem.C index 856cd3299f..a4a6de241a 100644 --- a/src/frontends/xforms/FormBibitem.C +++ b/src/frontends/xforms/FormBibitem.C @@ -3,7 +3,7 @@ * Copyright 2001 the LyX Team * Read the file COPYING * - * \author Angus Leeming, a.leeming@ic.ac.uk + * \author Angus Leeming, a.leeming@ic.ac.uk * \author John Levon, moz@compsoc.man.ac.uk */ @@ -36,7 +36,7 @@ void FormBibitem::build() setPrehandler(dialog_->input_key); setPrehandler(dialog_->input_label); - // Manage the ok, apply, restore and cancel/close buttons + // Manage the ok, apply, restore and cancel/close buttons bc().setOK(dialog_->button_ok); bc().setCancel(dialog_->button_close); @@ -47,7 +47,7 @@ void FormBibitem::build() ButtonPolicy::SMInput FormBibitem::input(FL_OBJECT *, long) { - // minimal validation + // minimal validation if (!compare(fl_get_input(dialog_->input_key), "")) return ButtonPolicy::SMI_NOOP; diff --git a/src/frontends/xforms/FormBibtex.C b/src/frontends/xforms/FormBibtex.C index b6ac763db0..c9606f45ba 100644 --- a/src/frontends/xforms/FormBibtex.C +++ b/src/frontends/xforms/FormBibtex.C @@ -48,7 +48,7 @@ void FormBibtex::build() setPrehandler(dialog_->input_database); setPrehandler(dialog_->input_style); - // Manage the ok, apply, restore and cancel/close buttons + // Manage the ok, apply, restore and cancel/close buttons bc().setOK(dialog_->button_ok); bc().setCancel(dialog_->button_close); @@ -76,9 +76,9 @@ void FormBibtex::build() ButtonPolicy::SMInput FormBibtex::input(FL_OBJECT * ob, long) { if (ob == dialog_->button_database_browse) { - // When browsing, take the first file only + // When browsing, take the first file only string const in_name = fl_get_input(dialog_->input_database); - string out_name = + string out_name = controller().Browse("", "Select Database", "*.bib| BibTeX Databases (*.bib)"); @@ -87,25 +87,25 @@ ButtonPolicy::SMInput FormBibtex::input(FL_OBJECT * ob, long) if (!in_name.empty()) out_name = in_name + ", " + out_name; - fl_freeze_form(form()); + fl_freeze_form(form()); fl_set_input(dialog_->input_database, out_name.c_str()); - fl_unfreeze_form(form()); + fl_unfreeze_form(form()); } } if (ob == dialog_->button_style_browse) { string const in_name = fl_get_input(dialog_->input_style); - string out_name = + string out_name = controller().Browse(in_name, "Select BibTeX-Style", "*.bst| BibTeX Styles (*.bst)"); if (!out_name.empty()) { - fl_freeze_form(form()); + fl_freeze_form(form()); fl_set_input(dialog_->input_style, out_name.c_str()); - fl_unfreeze_form(form()); + fl_unfreeze_form(form()); } } - + if (!compare(fl_get_input(dialog_->input_database),"")) { return ButtonPolicy::SMI_NOOP; } @@ -118,7 +118,7 @@ void FormBibtex::update() { fl_set_input(dialog_->input_database, controller().params().getContents().c_str()); - string bibtotoc = "bibtotoc"; + string bibtotoc = "bibtotoc"; string bibstyle (controller().params().getOptions().c_str()); if (prefixIs(bibstyle,bibtotoc)) { // bibtotoc exists? fl_set_button(dialog_->check_bibtotoc,1); @@ -159,7 +159,7 @@ string const unique_and_no_extensions(string const & str_in) eliminate_duplicates(dbase); return subst(getStringFromVector(dbase),",",", "); } - + } // namespace anon @@ -172,7 +172,7 @@ void FormBibtex::apply() controller().params().setOptions(""); return; } - + controller().params().setContents(unique_and_no_extensions(db)); // empty is valid! @@ -183,7 +183,7 @@ void FormBibtex::apply() } bool const bibtotoc = fl_get_button(dialog_->check_bibtotoc); - + if (bibtotoc && (!bibstyle.empty())) { // both bibtotoc and style controller().params().setOptions("bibtotoc,"+bibstyle); diff --git a/src/frontends/xforms/FormBrowser.C b/src/frontends/xforms/FormBrowser.C index 54e9c910e5..151f2747d0 100644 --- a/src/frontends/xforms/FormBrowser.C +++ b/src/frontends/xforms/FormBrowser.C @@ -19,7 +19,7 @@ FormBrowser::FormBrowser(ControlButtons & c, string const & t, bool allowResize) : FormDB(c, t, allowResize) {} - + void FormBrowser::build() { diff --git a/src/frontends/xforms/FormCharacter.C b/src/frontends/xforms/FormCharacter.C index 7158d36d7c..a7758ed2b1 100644 --- a/src/frontends/xforms/FormCharacter.C +++ b/src/frontends/xforms/FormCharacter.C @@ -96,7 +96,7 @@ void FormCharacter::build() fl_end_form(); // build up the combox entries - for (vector::const_iterator cit = language.begin(); + for (vector::const_iterator cit = language.begin(); cit != language.end(); ++cit) { combo_language2_->addto(*cit); } @@ -118,16 +118,16 @@ void FormCharacter::apply() pos = fl_get_choice(dialog_->choice_series); controller().setSeries(series_[pos-1]); - + pos = fl_get_choice(dialog_->choice_shape); controller().setShape(shape_[pos-1]); pos = fl_get_choice(dialog_->choice_size); controller().setSize(size_[pos-1]); - + pos = fl_get_choice(dialog_->choice_bar); controller().setBar(bar_[pos-1]); - + pos = fl_get_choice(dialog_->choice_color); controller().setColor(color_[pos-1]); @@ -156,7 +156,7 @@ void FormCharacter::update() { int pos = int(findPos(family_, controller().getFamily())); fl_set_choice(dialog_->choice_family, pos+1); - + pos = int(findPos(series_, controller().getSeries())); fl_set_choice(dialog_->choice_series, pos+1); @@ -185,7 +185,7 @@ ButtonPolicy::SMInput FormCharacter::input(FL_OBJECT *, long) int pos = fl_get_choice(dialog_->choice_family); if (family_[pos-1] != LyXFont::IGNORE_FAMILY) activate = ButtonPolicy::SMI_VALID; - + pos = fl_get_choice(dialog_->choice_series); if (series_[pos-1] != LyXFont::IGNORE_SERIES) activate = ButtonPolicy::SMI_VALID; diff --git a/src/frontends/xforms/FormCharacter.h b/src/frontends/xforms/FormCharacter.h index 86018efbd1..b6dcbef10f 100644 --- a/src/frontends/xforms/FormCharacter.h +++ b/src/frontends/xforms/FormCharacter.h @@ -1,9 +1,9 @@ // -*- C++ -*- -/** +/** * \file FormCharacter.h * Copyright 2001 The LyX Team. * See the file COPYING. - * + * * \author Edwin Leuven, leuven@fee.uva.nl * \author Angus Leeming, a.leeming@ic.ac.uk */ @@ -26,7 +26,7 @@ class Combox; struct FD_form_character; -/** +/** * This class provides an XForms implementation of the Character Dialog. * The character dialog allows users to change the character settings * in their documents. @@ -40,10 +40,10 @@ private: /// Apply from dialog virtual void apply(); - + /// Build the dialog virtual void build(); - + /// Update the dialog. virtual void update(); @@ -56,7 +56,7 @@ private: /// Fdesign generated method FD_form_character * build_character(); - + /// boost::scoped_ptr combo_language2_; /// diff --git a/src/frontends/xforms/FormCitation.C b/src/frontends/xforms/FormCitation.C index d06beea7e9..ec86fa46b9 100644 --- a/src/frontends/xforms/FormCitation.C +++ b/src/frontends/xforms/FormCitation.C @@ -34,7 +34,7 @@ using std::vector; namespace { // shamelessly stolen from Menubar_pimpl.C -int string_width(string const & str) +int string_width(string const & str) { return fl_get_string_widthTAB(FL_NORMAL_STYLE, FL_NORMAL_SIZE, str.c_str(), @@ -156,7 +156,7 @@ void FormCitation::build() setPrehandler(dialog_->input_before); setPrehandler(dialog_->input_after); - // Manage the ok, apply, restore and cancel/close buttons + // Manage the ok, apply, restore and cancel/close buttons bc().setOK(dialog_->button_ok); bc().setApply(dialog_->button_apply); bc().setCancel(dialog_->button_close); @@ -256,7 +256,7 @@ void FormCitation::findBiblio(biblio::Direction const dir) fl_select_browser_line(dialog_->browser_bib, found); input(dialog_->browser_bib, 0); } - + ButtonPolicy::SMInput FormCitation::input(FL_OBJECT * ob, long) { @@ -451,7 +451,7 @@ void FormCitation::update() setEnabled(dialog_->check_full_author_list, natbib); setEnabled(dialog_->check_force_uppercase, natbib); setEnabled(dialog_->choice_style, natbib); - + // No keys have been selected yet, so... fl_clear_browser(dialog_->browser_info); setBibButtons(OFF); diff --git a/src/frontends/xforms/FormDocument.C b/src/frontends/xforms/FormDocument.C index 4432d80a33..72c12f46dd 100644 --- a/src/frontends/xforms/FormDocument.C +++ b/src/frontends/xforms/FormDocument.C @@ -34,10 +34,10 @@ #include "Liason.h" #include "CutAndPaste.h" #include "bufferview_funcs.h" -#include "xforms_helpers.h" +#include "xforms_helpers.h" #include "debug.h" #include "input_validators.h" // fl_unsigned_float_filter -#include "helper_funcs.h" +#include "helper_funcs.h" #include "lyx_main.h" // for user_lyxdir #include "insets/insetquotes.h" @@ -214,7 +214,7 @@ void FormDocument::build() 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); @@ -399,15 +399,15 @@ bool saveParamsAsDefault(BufferParams const ¶ms) _("for the document layout as default?"), _("(they will be valid for any new document)"))) return false; - + string const fname = AddName(AddPath(user_lyxdir, "templates/"), "defaults.lyx"); Buffer defaults = Buffer(fname); defaults.params = params; - + // add an empty paragraph. Is this enough? defaults.paragraph = new Paragraph; - + return defaults.writeFile(defaults.fileName(), false); } @@ -677,7 +677,7 @@ bool FormDocument::class_apply(BufferParams ¶ms) params.pagestyle = fl_get_choice_text(class_->choice_doc_pagestyle); params.textclass = combo_doc_class->get() - 1; - + BufferParams::PARSEP tmpsep = params.paragraph_separation; if (fl_get_button(class_->radio_doc_indent)) params.paragraph_separation = BufferParams::PARSEP_INDENT; @@ -685,7 +685,7 @@ bool FormDocument::class_apply(BufferParams ¶ms) params.paragraph_separation = BufferParams::PARSEP_SKIP; if (tmpsep != params.paragraph_separation) redo = true; - + VSpace tmpdefskip = params.getDefSkip(); switch (fl_get_choice (class_->choice_doc_skip)) { case 1: @@ -694,7 +694,7 @@ bool FormDocument::class_apply(BufferParams ¶ms) case 2: params.setDefSkip(VSpace(VSpace::MEDSKIP)); break; - case 3: + case 3: params.setDefSkip(VSpace(VSpace::BIGSKIP)); break; case 4: @@ -713,7 +713,7 @@ bool FormDocument::class_apply(BufferParams ¶ms) } if (!(tmpdefskip == params.getDefSkip())) redo = true; - + if (fl_get_button(class_->radio_doc_columns_two)) params.columns = 2; else @@ -722,7 +722,7 @@ bool FormDocument::class_apply(BufferParams ¶ms) params.sides = LyXTextClass::TwoSides; else params.sides = LyXTextClass::OneSide; - + Spacing tmpSpacing = params.spacing; switch (fl_get_choice(class_->choice_doc_spacing)) { case 1: @@ -739,15 +739,15 @@ bool FormDocument::class_apply(BufferParams ¶ms) break; case 4: lyxerr[Debug::INFO] << "Spacing: OTHER\n"; - params.spacing.set(Spacing::Other, + params.spacing.set(Spacing::Other, fl_get_input(class_->input_doc_spacing)); break; } if (tmpSpacing != params.spacing) redo = true; - + params.options = fl_get_input(class_->input_doc_extra); - + return redo; } @@ -781,7 +781,7 @@ bool FormDocument::class_apply() Alert::alert(_("Conversion Errors!"),s, _("into chosen document class")); } - + } else { // problem changing class -- warn user and retain old style Alert::alert(_("Conversion Errors!"), @@ -790,7 +790,7 @@ bool FormDocument::class_apply() combo_doc_class->select(int(old_class) + 1); } } - + return redo; } @@ -882,13 +882,13 @@ bool FormDocument::language_apply(BufferParams & params) break; } params.quotes_language = lga; - if (fl_get_button(language_->radio_single)) + if (fl_get_button(language_->radio_single)) params.quotes_times = InsetQuotes::SingleQ; else params.quotes_times = InsetQuotes::DoubleQ; Language const * old_language = params.language; - Language const * new_language = + Language const * new_language = languages.getLanguage(combo_language->getline()); if (!new_language) new_language = default_language; @@ -930,7 +930,7 @@ bool FormDocument::options_apply(BufferParams & params) if (params.secnumdepth != tmpchar) redo = true; params.secnumdepth = tmpchar; - + params.tocdepth = int(fl_get_counter_value(options_->counter_tocdepth)); params.float_placement = @@ -998,13 +998,13 @@ void FormDocument::class_update(BufferParams const & params) setEnabled(class_->input_doc_skip, input_length); switch (params.getDefSkip().kind()) { - case VSpace::SMALLSKIP: + case VSpace::SMALLSKIP: fl_set_choice (class_->choice_doc_skip, 1); break; - case VSpace::MEDSKIP: + case VSpace::MEDSKIP: fl_set_choice (class_->choice_doc_skip, 2); break; - case VSpace::BIGSKIP: + case VSpace::BIGSKIP: fl_set_choice (class_->choice_doc_skip, 3); break; case VSpace::LENGTH: @@ -1038,7 +1038,7 @@ void FormDocument::class_update(BufferParams const & params) fl_set_button(class_->radio_doc_columns_two, 1); else fl_set_button(class_->radio_doc_columns_one, 1); - + fl_set_input(class_->input_doc_spacing, ""); setEnabled(class_->input_doc_spacing, false); @@ -1060,7 +1060,7 @@ void FormDocument::class_update(BufferParams const & params) { fl_set_choice(class_->choice_doc_spacing, 4); char sval[20]; - sprintf(sval,"%g",params.spacing.getValue()); + sprintf(sval,"%g",params.spacing.getValue()); fl_set_input(class_->input_doc_spacing, sval); setEnabled(class_->input_doc_spacing, true); break; @@ -1282,7 +1282,7 @@ bool FormDocument::CheckDocumentInput(FL_OBJECT * ob, long) if (!ok) { postWarning(_("Invalid Length (valid example: 10mm)")); return false; - } else { + } else { clearMessage(); return true; } @@ -1309,7 +1309,7 @@ void FormDocument::ChoiceBulletSize(FL_OBJECT * ob, long /*data*/) { BufferParams & param = lv_->buffer()->params; - // convert from 1-6 range to -1-4 + // convert from 1-6 range to -1-4 param.temp_bullets[current_bullet_depth].setSize(fl_get_choice(ob) - 2); fl_set_input(bullets_->input_bullet_latex, param.temp_bullets[current_bullet_depth].getText().c_str()); @@ -1365,7 +1365,7 @@ void FormDocument::BulletPanel(FL_OBJECT * /*ob*/, State cb) { /* Here we have to change the background pixmap to that selected */ /* by the user. (eg. standard.xpm, psnfss1.xpm etc...) */ - + int data = 0; if (cb == BULLETPANEL1) data = 0; @@ -1428,10 +1428,10 @@ void FormDocument::BulletBMTable(FL_OBJECT * ob, long /*data*/) /* handle the user input by setting the current bullet depth's pixmap */ /* to that extracted from the current chosen position of the BMTable */ /* Don't forget to free the button's old pixmap first. */ - + BufferParams & param = lv_->buffer()->params; int bmtable_button = fl_get_bmtable(ob); - + /* try to keep the button held down till another is pushed */ /* fl_set_bmtable(ob, 1, bmtable_button); */ param.temp_bullets[current_bullet_depth].setFont(current_bullet_panel); diff --git a/src/frontends/xforms/FormError.C b/src/frontends/xforms/FormError.C index cc92b20bba..52b2332362 100644 --- a/src/frontends/xforms/FormError.C +++ b/src/frontends/xforms/FormError.C @@ -29,7 +29,7 @@ void FormError::build() { dialog_.reset(build_error()); - // Manage the cancel/close button + // Manage the cancel/close button bc().setCancel(dialog_->button_close); } diff --git a/src/frontends/xforms/FormFiledialog.C b/src/frontends/xforms/FormFiledialog.C index f227a947f0..f24b18a8a4 100644 --- a/src/frontends/xforms/FormFiledialog.C +++ b/src/frontends/xforms/FormFiledialog.C @@ -82,13 +82,13 @@ long const SIX_MONTH_SEC = 6L * 30L * 24L * 60L * 60L; long const ONE_HOUR_SEC = 60L * 60L; extern "C" { - + static int C_LyXFileDlg_CancelCB(FL_FORM *fl, void *xev) { return FileDialog::Private::CancelCB(fl, xev); } - + static void C_LyXFileDlg_DoubleClickCB(FL_OBJECT * ob, long data) { @@ -133,17 +133,17 @@ void UserCache::add(uid_t ID) const { string pszNewName; struct passwd * pEntry; - + // gets user name if ((pEntry = getpwuid(ID))) pszNewName = pEntry->pw_name; else { pszNewName = tostr(ID); } - + // adds new node users[ID] = pszNewName; -} +} /// Group cache class definition @@ -176,7 +176,7 @@ void GroupCache::add(gid_t ID) const { string pszNewName; struct group * pEntry; - + // gets user name if ((pEntry = getgrgid(ID))) pszNewName = pEntry->gr_name; else { @@ -248,7 +248,7 @@ void FileDialog::Private::Reread() File = split(File, Temp, '/'); } while (!File.empty() || !Temp.empty()) { - string dline = "@b"+line + Temp + '/'; + string dline = "@b"+line + Temp + '/'; fl_add_browser_line(pFileDlgForm->List, dline.c_str()); File = split(File, Temp, '/'); line += ' '; @@ -265,7 +265,7 @@ void FileDialog::Private::Reread() // If the pattern doesn't start with a dot, skip hidden files if (!pszMask.empty() && pszMask[0] != '.' && pDirEntry->d_name[0] == '.') - continue; + continue; // Gets filename string fname = pDirEntry->d_name; @@ -282,15 +282,15 @@ void FileDialog::Private::Reread() // can this really happen? if (!fileInfo.isOK()) continue; - + fileInfo.modeString(szMode); unsigned int nlink = fileInfo.getNumberOfLinks(); - string user = lyxUserCache.find(fileInfo.getUid()); + string user = lyxUserCache.find(fileInfo.getUid()); string group = lyxGroupCache.find(fileInfo.getGid()); time_t modtime = fileInfo.getModificationTime(); string Time = ctime(&modtime); - + if (curTime > modtime + SIX_MONTH_SEC || curTime < modtime + ONE_HOUR_SEC) { // The file is fairly old or in the future. POSIX says @@ -368,7 +368,7 @@ void FileDialog::Private::Reread() // Sort the names sort(direntries.begin(), direntries.end(), comp_direntry()); - + // Add them to directory box for (DirEntries::const_iterator cit = direntries.begin(); cit != direntries.end(); ++cit) { @@ -384,14 +384,14 @@ void FileDialog::Private::Reread() // SetDirectory: sets dialog current directory void FileDialog::Private::SetDirectory(string const & Path) { - + string tmp; - if (Path.empty()) + if (Path.empty()) tmp = lyx::getcwd(); else tmp = MakeAbsPath(ExpandPath(Path), pszDirectory); - + // must check the directory exists DIR * pDirectory = ::opendir(tmp.c_str()); if (!pDirectory) { @@ -448,7 +448,7 @@ FileDialog::Private::Private() // Make sure pressing the close box doesn't crash LyX. (RvdK) fl_set_form_atclose(pFileDlgForm->form, C_LyXFileDlg_CancelCB, 0); - // Register doubleclick callback + // Register doubleclick callback fl_set_browser_dblclick_callback(pFileDlgForm->List, C_LyXFileDlg_DoubleClickCB, 0); @@ -483,7 +483,7 @@ void FileDialog::Private::SetButton(int iIndex, string const & pszName, if (iIndex == 0) { pObject = pFileDlgForm->User1; pTemp = &pszUserPath1; - } else if (iIndex == 1) { + } else if (iIndex == 1) { pObject = pFileDlgForm->User2; pTemp = &pszUserPath2; } else return; @@ -510,7 +510,7 @@ string const FileDialog::Private::GetDirectory() const } namespace { - bool x_sync_kludge(bool ret) + bool x_sync_kludge(bool ret) { XSync(fl_get_display(), false); return ret; @@ -523,11 +523,11 @@ bool FileDialog::Private::RunDialog() force_cancel = false; force_ok = false; - // event loop - while (true) { - FL_OBJECT * pObject = fl_do_forms(); + // event loop + while (true) { + FL_OBJECT * pObject = fl_do_forms(); - if (pObject == pFileDlgForm->Ready) { + if (pObject == pFileDlgForm->Ready) { if (HandleOK()) return x_sync_kludge(true); @@ -560,7 +560,7 @@ void FileDialog::Private::FileDlgCB(FL_OBJECT *, long lArgument) case 2: // list pCurrentDlg->HandleListHit(); - break; + break; case 10: // rescan pCurrentDlg->SetDirectory(fl_get_input(pFileDlgForm->DirBox)); @@ -683,7 +683,7 @@ bool FileDialog::Private::HandleOK() Reread(); return false; } - + // Handle return from list int const select = fl_get_browser(pFileDlgForm->List); if (select > iDepth) { @@ -709,7 +709,7 @@ int FileDialog::Private::CancelCB(FL_FORM *, void *) { // Simulate a click on the cancel button pCurrentDlg->Force(true); - return FL_IGNORE; + return FL_IGNORE; } @@ -761,7 +761,7 @@ string const FileDialog::Private::Select(string const & title, } } } - + if (sel != 0) fl_select_browser_line(pFileDlgForm->List, sel); int const top = max(sel - 5, 1); fl_set_browser_topline(pFileDlgForm->List, top); @@ -782,7 +782,7 @@ string const FileDialog::Private::Select(string const & title, title.c_str()); isOk = RunDialog(); - + fl_hide_form(pFileDlgForm->form); fl_activate_all_forms(); pCurrentDlg = 0; diff --git a/src/frontends/xforms/FormFloat.C b/src/frontends/xforms/FormFloat.C index 07b442aa3a..88437e25a1 100644 --- a/src/frontends/xforms/FormFloat.C +++ b/src/frontends/xforms/FormFloat.C @@ -80,7 +80,7 @@ void FormFloat::update() bool here_definitely = false; string placement(controller().params().placement); - + if (contains(placement, "H")) { here_definitely = true; } else { diff --git a/src/frontends/xforms/FormForks.C b/src/frontends/xforms/FormForks.C index e54df5a7e7..0a8efb021d 100644 --- a/src/frontends/xforms/FormForks.C +++ b/src/frontends/xforms/FormForks.C @@ -44,7 +44,7 @@ void FormForks::build() { fl_clear_browser(dialog_->browser_children); fl_clear_browser(dialog_->browser_kill); - // Manage the ok, apply, restore and cancel/close buttons + // Manage the ok, apply, restore and cancel/close buttons bc().setOK(dialog_->button_ok); bc().setApply(dialog_->button_apply); bc().setCancel(dialog_->button_close); @@ -176,7 +176,7 @@ ButtonPolicy::SMInput FormForks::input(FL_OBJECT * ob, long) if (ob == dialog_->browser_children) { activate = input_browser_children(); - + } else if (ob == dialog_->browser_kill) { activate = input_browser_kill(); @@ -212,7 +212,7 @@ ButtonPolicy::SMInput FormForks::input_browser_children() string pid_str; split(selection, pid_str, '\t'); - vector const kill_vec = + vector const kill_vec = getVectorFromBrowser(dialog_->browser_kill); vector::const_iterator it = @@ -250,7 +250,7 @@ public: private: string pid_; }; - + } // namespace anon @@ -282,7 +282,7 @@ ButtonPolicy::SMInput FormForks::input_browser_kill() fl_select_browser_line(dialog_->browser_children, n+1); fl_set_browser_topline(dialog_->browser_children, n+1); } - + setEnabled(dialog_->button_remove, true); setEnabled(dialog_->button_add, false); @@ -306,7 +306,7 @@ vector const getPIDvector(FL_OBJECT * ob) return vec; } - + } // namespace anon @@ -330,7 +330,7 @@ ButtonPolicy::SMInput FormForks::input_button_all() // to resolve a warning about comparison between signed and unsigned. int const pid_vec_size = int(pid_vec.size()); - + if (fl_get_browser_maxline(dialog_->browser_kill) != pid_vec_size) { activate = ButtonPolicy::SMI_VALID; @@ -370,7 +370,7 @@ ButtonPolicy::SMInput FormForks::input_button_add() string pid_str; split(selection, pid_str, '\t'); - vector const kill_vec = + vector const kill_vec = getVectorFromBrowser(dialog_->browser_kill); vector::const_iterator it = diff --git a/src/frontends/xforms/FormGraphics.C b/src/frontends/xforms/FormGraphics.C index 02198a76b1..c27db20180 100644 --- a/src/frontends/xforms/FormGraphics.C +++ b/src/frontends/xforms/FormGraphics.C @@ -7,11 +7,11 @@ * \author Herbert Voss, voss@perce.de */ -#include +#include #ifdef __GNUG__ #pragma implementation -#endif +#endif #include "xformsBC.h" #include "ControlGraphics.h" @@ -37,8 +37,8 @@ int const WIDTH_MAXDIGITS = 10; int const HEIGHT_MAXDIGITS = 10; int const ROTATE_MAXCHARS = 4; int const FILENAME_MAXCHARS = 1024; -string defaultUnit("cm"); - +string defaultUnit("cm"); + /// Given input and choice widgets, create a LyXLength LyXLength getLyXLengthFromWidgets(FL_OBJECT * input, FL_OBJECT * choice) { @@ -74,7 +74,7 @@ void FormGraphics::build() // Allow the base class to control messages setMessageWidget(dialog_->text_warning); - // Manage the ok, apply, restore and cancel/close buttons + // Manage the ok, apply, restore and cancel/close buttons bc().setOK(dialog_->button_ok); bc().setApply(dialog_->button_apply); bc().setCancel(dialog_->button_close); @@ -93,8 +93,8 @@ void FormGraphics::build() setPrehandler(file_->input_filename); setPrehandler(file_->input_subcaption); setPrehandler(file_->input_rotate_angle); - - string const choice_origin = + + string const choice_origin = "center|" // c "leftTop|leftBottom|leftBaseline|" // lt lb lB "centerTop|centerBottom|centerBaseline|" // ct cb cB @@ -188,7 +188,7 @@ void FormGraphics::build() fl_addto_tabfolder(dialog_->tabfolder, _("Extras"), special_->form); // set the right default unit if (lyxrc.default_papersize < 3) - defaultUnit = "in"; + defaultUnit = "in"; } @@ -254,7 +254,7 @@ void FormGraphics::apply() else igp.size_type = InsetGraphicsParams::SCALE; - igp.width = getLyXLengthFromWidgets(size_->input_width, + igp.width = getLyXLengthFromWidgets(size_->input_width, size_->choice_width_units); igp.height = getLyXLengthFromWidgets(size_->input_height, @@ -265,7 +265,7 @@ void FormGraphics::apply() // the bb section if (!controller().bbChanged) // different to the original one? - igp.bb = string(); // don't write anything + igp.bb = string(); // don't write anything else { string bb; if (getStringFromInput(bbox_->input_bb_x0).empty()) @@ -297,7 +297,7 @@ void FormGraphics::apply() } -void FormGraphics::update() { +void FormGraphics::update() { // Update dialog with details from inset InsetGraphicsParams & igp = controller().params(); @@ -309,7 +309,7 @@ void FormGraphics::update() { fl_get_button(file_->check_subcaption)); fl_set_button(file_->check_rotate, igp.rotate); fl_set_input(file_->input_rotate_angle, - tostr(igp.rotateAngle).c_str()); + tostr(igp.rotateAngle).c_str()); if (igp.rotateOrigin.empty()) fl_set_choice(file_->choice_origin,1); else @@ -338,7 +338,7 @@ void FormGraphics::update() { case InsetGraphicsParams::NONE: fl_set_button(lyxview_->radio_nodisplay, 1); break; - } + } updateWidgetsFromLength(lyxview_->input_lyxwidth, lyxview_->choice_width_lyxwidth, igp.lyxwidth, defaultUnit); updateWidgetsFromLength(lyxview_->input_lyxheight, @@ -414,17 +414,17 @@ void FormGraphics::update() { } } fl_set_button(size_->check_aspectratio, igp.keepAspectRatio); - - // the bb section + + // the bb section // set the bounding box values, if exists. First we need the whole // path, because the controller knows nothing about the doc-dir controller().bbChanged = false; if (igp.bb.empty()) { lyxerr[Debug::GRAPHICS] << "update:: no BoundingBox" << endl; - string const fileWithAbsPath = - MakeAbsPath(igp.filename, OnlyPath(igp.filename)); - string const bb = controller().readBB(fileWithAbsPath); - if (!bb.empty()) { + string const fileWithAbsPath = + MakeAbsPath(igp.filename, OnlyPath(igp.filename)); + string const bb = controller().readBB(fileWithAbsPath); + if (!bb.empty()) { // get the values from the file // in this case we always have the point-unit fl_set_input(bbox_->input_bb_x0, token(bb,' ',0).c_str()); @@ -438,7 +438,7 @@ void FormGraphics::update() { fl_set_input(bbox_->input_bb_y1, bb.c_str()); } fl_set_choice(bbox_->choice_bb_units, 1); // "pt" - } else { // get the values from the inset + } else { // get the values from the inset lyxerr[Debug::GRAPHICS] << "update:: igp has BoundingBox" << endl; controller().bbChanged = true; LyXLength anyLength; @@ -472,8 +472,8 @@ bool isValid(FL_OBJECT * ob) } // namespace anon - - + + ButtonPolicy::SMInput FormGraphics::input(FL_OBJECT * ob, long) { // the file section @@ -485,87 +485,87 @@ ButtonPolicy::SMInput FormGraphics::input(FL_OBJECT * ob, long) fl_set_input(file_->input_filename, out_name.c_str()); } } else if (ob == file_->check_subcaption) { - setEnabled(file_->input_subcaption, + setEnabled(file_->input_subcaption, fl_get_button(file_->check_subcaption)); } else if (ob == file_->check_rotate) { - setEnabled(file_->input_rotate_angle, + setEnabled(file_->input_rotate_angle, fl_get_button(file_->check_rotate)); - setEnabled(file_->choice_origin, + setEnabled(file_->choice_origin, fl_get_button(file_->check_rotate)); // the lyxview section } else if (ob == lyxview_->radio_lyxasis) { - setEnabled(lyxview_->input_lyxwidth, 0); - setEnabled(lyxview_->choice_width_lyxwidth, 0); - setEnabled(lyxview_->input_lyxheight, 0); - setEnabled(lyxview_->choice_width_lyxheight, 0); - setEnabled(lyxview_->input_lyxscale, 0); + setEnabled(lyxview_->input_lyxwidth, 0); + setEnabled(lyxview_->choice_width_lyxwidth, 0); + setEnabled(lyxview_->input_lyxheight, 0); + setEnabled(lyxview_->choice_width_lyxheight, 0); + setEnabled(lyxview_->input_lyxscale, 0); } else if (ob == lyxview_->radio_lyxwh) { - setEnabled(lyxview_->input_lyxwidth, 1); - setEnabled(lyxview_->choice_width_lyxwidth, 1); - setEnabled(lyxview_->input_lyxheight, 1); - setEnabled(lyxview_->choice_width_lyxheight, 1); - setEnabled(lyxview_->input_lyxscale, 0); + setEnabled(lyxview_->input_lyxwidth, 1); + setEnabled(lyxview_->choice_width_lyxwidth, 1); + setEnabled(lyxview_->input_lyxheight, 1); + setEnabled(lyxview_->choice_width_lyxheight, 1); + setEnabled(lyxview_->input_lyxscale, 0); } else if (ob == lyxview_->radio_lyxscale) { - setEnabled(lyxview_->input_lyxwidth, 0); - setEnabled(lyxview_->choice_width_lyxwidth, 0); - setEnabled(lyxview_->input_lyxheight, 0); - setEnabled(lyxview_->choice_width_lyxheight, 0); - setEnabled(lyxview_->input_lyxscale, 1); + setEnabled(lyxview_->input_lyxwidth, 0); + setEnabled(lyxview_->choice_width_lyxwidth, 0); + setEnabled(lyxview_->input_lyxheight, 0); + setEnabled(lyxview_->choice_width_lyxheight, 0); + setEnabled(lyxview_->input_lyxscale, 1); } else if (ob == lyxview_->button_latex_values) { - if (contains(fl_get_choice_text(size_->choice_width_units),'%')) + if (contains(fl_get_choice_text(size_->choice_width_units),'%')) Alert::alert(_("Warning!"), _("The units t%, p%, c% and l% are not allowed here."), _("Cannot use the values from LaTeX size!")); else { - LyXLength dummy = + LyXLength dummy = getLyXLengthFromWidgets(size_->input_width, size_->choice_width_units); - updateWidgetsFromLength(lyxview_->input_lyxwidth, + updateWidgetsFromLength(lyxview_->input_lyxwidth, lyxview_->choice_width_lyxwidth, dummy, defaultUnit); - dummy = getLyXLengthFromWidgets(size_->input_height, + dummy = getLyXLengthFromWidgets(size_->input_height, size_->choice_height_units); - updateWidgetsFromLength(lyxview_->input_lyxheight, + updateWidgetsFromLength(lyxview_->input_lyxheight, lyxview_->choice_width_lyxheight, dummy, defaultUnit); - string const scale = getStringFromInput(size_->input_scale); - fl_set_input(lyxview_->input_lyxscale, scale.c_str()); - if (fl_get_button (size_->radio_asis) == 1) { - fl_set_button (lyxview_->radio_lyxasis, 1); + string const scale = getStringFromInput(size_->input_scale); + fl_set_input(lyxview_->input_lyxscale, scale.c_str()); + if (fl_get_button (size_->radio_asis) == 1) { + fl_set_button (lyxview_->radio_lyxasis, 1); + setEnabled(lyxview_->input_lyxwidth, 0); + setEnabled(lyxview_->choice_width_lyxwidth, 0); + setEnabled(lyxview_->input_lyxheight, 0); + setEnabled(lyxview_->choice_width_lyxheight, 0); + setEnabled(lyxview_->input_lyxscale, 0); + } else if (fl_get_button (size_->radio_wh) == 1) { + fl_set_button (lyxview_->radio_lyxwh, 1); + setEnabled(lyxview_->input_lyxwidth, 1); + setEnabled(lyxview_->choice_width_lyxwidth, 1); + setEnabled(lyxview_->input_lyxheight, 1); + setEnabled(lyxview_->choice_width_lyxheight, 1); + setEnabled(lyxview_->input_lyxscale, 0); + } else if (fl_get_button (size_->radio_scale) ==1) { + fl_set_button (lyxview_->radio_lyxscale, 1); setEnabled(lyxview_->input_lyxwidth, 0); - setEnabled(lyxview_->choice_width_lyxwidth, 0); - setEnabled(lyxview_->input_lyxheight, 0); - setEnabled(lyxview_->choice_width_lyxheight, 0); - setEnabled(lyxview_->input_lyxscale, 0); - } else if (fl_get_button (size_->radio_wh) == 1) { - fl_set_button (lyxview_->radio_lyxwh, 1); - setEnabled(lyxview_->input_lyxwidth, 1); - setEnabled(lyxview_->choice_width_lyxwidth, 1); - setEnabled(lyxview_->input_lyxheight, 1); - setEnabled(lyxview_->choice_width_lyxheight, 1); - setEnabled(lyxview_->input_lyxscale, 0); - } else if (fl_get_button (size_->radio_scale) ==1) { - fl_set_button (lyxview_->radio_lyxscale, 1); - setEnabled(lyxview_->input_lyxwidth, 0); - setEnabled(lyxview_->choice_width_lyxwidth, 0); - setEnabled(lyxview_->input_lyxheight, 0); - setEnabled(lyxview_->choice_width_lyxheight, 0); - setEnabled(lyxview_->input_lyxscale, 1); - } + setEnabled(lyxview_->choice_width_lyxwidth, 0); + setEnabled(lyxview_->input_lyxheight, 0); + setEnabled(lyxview_->choice_width_lyxheight, 0); + setEnabled(lyxview_->input_lyxscale, 1); + } } // the bb section - } else if (!controller().bbChanged && + } else if (!controller().bbChanged && (ob == bbox_->choice_bb_units || ob == bbox_->input_bb_x0 || ob == bbox_->input_bb_y0 || ob == bbox_->input_bb_x1 || ob == bbox_->input_bb_y1)) { - controller().bbChanged = true; + controller().bbChanged = true; } else if (ob == bbox_->button_getBB) { string const filename = getStringFromInput(file_->input_filename); if (!filename.empty()) { - string const fileWithAbsPath = MakeAbsPath(filename, OnlyPath(filename)); + string const fileWithAbsPath = MakeAbsPath(filename, OnlyPath(filename)); string bb = controller().readBB(fileWithAbsPath); if (!bb.empty()) { fl_set_input(bbox_->input_bb_x0, token(bb,' ',0).c_str()); @@ -586,26 +586,26 @@ ButtonPolicy::SMInput FormGraphics::input(FL_OBJECT * ob, long) // the size section } else if (ob == size_->radio_asis) { - setEnabled(size_->input_width, 0); - setEnabled(size_->choice_width_units, 0); - setEnabled(size_->input_height, 0); - setEnabled(size_->choice_height_units, 0); + setEnabled(size_->input_width, 0); + setEnabled(size_->choice_width_units, 0); + setEnabled(size_->input_height, 0); + setEnabled(size_->choice_height_units, 0); setEnabled(size_->check_aspectratio, 0); - setEnabled(size_->input_scale, 0); + setEnabled(size_->input_scale, 0); } else if (ob == size_->radio_wh) { - setEnabled(size_->input_width, 1); - setEnabled(size_->choice_width_units, 1); - setEnabled(size_->input_height, 1); - setEnabled(size_->choice_height_units, 1); + setEnabled(size_->input_width, 1); + setEnabled(size_->choice_width_units, 1); + setEnabled(size_->input_height, 1); + setEnabled(size_->choice_height_units, 1); setEnabled(size_->check_aspectratio, 1); - setEnabled(size_->input_scale, 0); + setEnabled(size_->input_scale, 0); } else if (ob == size_->radio_scale) { - setEnabled(size_->input_width, 0); - setEnabled(size_->choice_width_units, 0); - setEnabled(size_->input_height, 0); - setEnabled(size_->choice_height_units, 0); + setEnabled(size_->input_width, 0); + setEnabled(size_->choice_width_units, 0); + setEnabled(size_->input_height, 0); + setEnabled(size_->choice_height_units, 0); setEnabled(size_->check_aspectratio, 0); - setEnabled(size_->input_scale, 1); + setEnabled(size_->input_scale, 1); } else if (ob == size_->button_lyx_values) { LyXLength dummy = getLyXLengthFromWidgets(lyxview_->input_lyxwidth, lyxview_->choice_width_lyxwidth); @@ -658,9 +658,9 @@ ButtonPolicy::SMInput FormGraphics::input(FL_OBJECT * ob, long) // deactivate OK/ Apply buttons and // spit out warnings if invalid - if (ob == bbox_->input_bb_x0 || ob == bbox_->input_bb_x1 || - ob == bbox_->input_bb_y0 || ob == bbox_->input_bb_y1 || - ob == size_->input_width || ob == size_->input_height || + if (ob == bbox_->input_bb_x0 || ob == bbox_->input_bb_x1 || + ob == bbox_->input_bb_y0 || ob == bbox_->input_bb_y1 || + ob == size_->input_width || ob == size_->input_height || ob == lyxview_->input_lyxwidth || ob == lyxview_->input_lyxheight) { if (invalid) { postWarning(_("Invalid Length!")); diff --git a/src/frontends/xforms/FormGraphics.h b/src/frontends/xforms/FormGraphics.h index f486f68117..20e7c3440e 100644 --- a/src/frontends/xforms/FormGraphics.h +++ b/src/frontends/xforms/FormGraphics.h @@ -15,7 +15,7 @@ #ifdef __GNUG__ #pragma interface -#endif +#endif #include "FormBase.h" #include "RadioButtonGroup.h" diff --git a/src/frontends/xforms/FormInclude.C b/src/frontends/xforms/FormInclude.C index fb951eac19..d40f600c24 100644 --- a/src/frontends/xforms/FormInclude.C +++ b/src/frontends/xforms/FormInclude.C @@ -81,7 +81,7 @@ void FormInclude::update() fl_set_button(dialog_->check_visiblespace, 0); setEnabled(dialog_->check_visiblespace, false); } - + if (cmdname.empty()) fl_set_button(dialog_->radio_useinclude, 1); } @@ -124,10 +124,10 @@ ButtonPolicy::SMInput FormInclude::input(FL_OBJECT * ob, long) type = ControlInclude::INCLUDE; string const in_name = fl_get_input(dialog_->input_filename); - fl_freeze_form(form()); + fl_freeze_form(form()); string const out_name = controller().Browse(in_name, type); fl_set_input(dialog_->input_filename, out_name.c_str()); - fl_unfreeze_form(form()); + fl_unfreeze_form(form()); } else if (ob == dialog_->button_load) { string const in_name = fl_get_input(dialog_->input_filename); @@ -151,6 +151,6 @@ ButtonPolicy::SMInput FormInclude::input(FL_OBJECT * ob, long) if (strip(in_name).empty()) action = ButtonPolicy::SMI_INVALID; } - + return action; } diff --git a/src/frontends/xforms/FormIndex.C b/src/frontends/xforms/FormIndex.C index 8412b61434..369fa138b2 100644 --- a/src/frontends/xforms/FormIndex.C +++ b/src/frontends/xforms/FormIndex.C @@ -32,7 +32,7 @@ void FormIndex::build() fl_set_input_return(dialog_->input_key, FL_RETURN_CHANGED); setPrehandler(dialog_->input_key); - // Manage the ok, apply, restore and cancel/close buttons + // Manage the ok, apply, restore and cancel/close buttons bc().setOK(dialog_->button_ok); bc().setApply(dialog_->button_apply); bc().setCancel(dialog_->button_close); diff --git a/src/frontends/xforms/FormInset.C b/src/frontends/xforms/FormInset.C index 9113ed271f..5f6c102cc5 100644 --- a/src/frontends/xforms/FormInset.C +++ b/src/frontends/xforms/FormInset.C @@ -65,7 +65,7 @@ void FormCommand::disconnect() FormInset::disconnect(); } - + void FormCommand::showInset(InsetCommand * inset) { if (inset == 0) return; // maybe we should Assert this? diff --git a/src/frontends/xforms/FormInset.h b/src/frontends/xforms/FormInset.h index fabff8ff9a..666380d4aa 100644 --- a/src/frontends/xforms/FormInset.h +++ b/src/frontends/xforms/FormInset.h @@ -61,7 +61,7 @@ protected: /// pointer to the inset passed through showInset InsetCommand * inset_; /// the nitty-griity. What is modified and passed back - InsetCommandParams params; + InsetCommandParams params; }; #endif diff --git a/src/frontends/xforms/FormMathsBitmap.C b/src/frontends/xforms/FormMathsBitmap.C index faee1fea87..580ff6fb1c 100644 --- a/src/frontends/xforms/FormMathsBitmap.C +++ b/src/frontends/xforms/FormMathsBitmap.C @@ -11,7 +11,7 @@ #include #include #include - + #include XPM_H_LOCATION #ifdef __GNUG__ @@ -36,7 +36,7 @@ using std::max; extern "C" void C_FormBaseDeprecatedCancelCB(FL_OBJECT *, long); extern "C" void C_FormBaseDeprecatedInputCB(FL_OBJECT *, long); -FormMathsBitmap::FormMathsBitmap(LyXView * lv, Dialogs * d, +FormMathsBitmap::FormMathsBitmap(LyXView * lv, Dialogs * d, FormMathsPanel const & p, string const & t, vector const & l) : FormMathsSub(lv, d, p, t, false), @@ -85,7 +85,7 @@ void FormMathsBitmap::build() y_ = max(y_, obj->y + obj->h); } - + char const * const label = N_("Close|^["); x_ = (form_->w - 90) / 2; y_ += 10; @@ -106,7 +106,7 @@ void FormMathsBitmap::addBitmap(int nt, int nx, int ny, int bw, int bh, unsigned char const * data, bool vert) { // Add a bitmap to a button panel: one bitmap per panel. - // nt is the number of buttons and nx, ny the nr. of buttons + // nt is the number of buttons and nx, ny the nr. of buttons // in x and y direction. // bw, bh and data are the bitmap dimensions width, height and // bit pattern; these come directly from an .xbm file included @@ -114,7 +114,7 @@ void FormMathsBitmap::addBitmap(int nt, int nx, int ny, int bw, int bh, // vert indicates whether the next button panel within this // window will be below (true, default) or next to this one. // - // The scaling of the bitmap on top of the buttons will be + // The scaling of the bitmap on top of the buttons will be // correct if the nx, ny values are given correctly. int wx = bw + ww_ / 2; int wy = bh + ww_ / 2; @@ -171,7 +171,7 @@ bool FormMathsBitmap::input(FL_OBJECT * ob, long) { int const i = GetIndex(ob); - if (i < 0) + if (i < 0) return false; latex_chosen_ = latex_[i]; diff --git a/src/frontends/xforms/FormMathsBitmap.h b/src/frontends/xforms/FormMathsBitmap.h index d7d6c7c3dc..3e0adaf748 100644 --- a/src/frontends/xforms/FormMathsBitmap.h +++ b/src/frontends/xforms/FormMathsBitmap.h @@ -22,7 +22,7 @@ #include "LString.h" #include "FormMathsPanel.h" -/** +/** * This class provides an XForms implementation of a maths bitmap form. */ class FormMathsBitmap : public FormMathsSub { @@ -34,7 +34,7 @@ public: typedef lyx::shared_c_ptr bm_ptr; /// typedef lyx::shared_c_ptr fl_ptr; - + /// FormMathsBitmap(LyXView *, Dialogs * d, FormMathsPanel const &, string const &, std::vector const &); diff --git a/src/frontends/xforms/FormMathsDeco.C b/src/frontends/xforms/FormMathsDeco.C index 640408c619..f4cf2bb95c 100644 --- a/src/frontends/xforms/FormMathsDeco.C +++ b/src/frontends/xforms/FormMathsDeco.C @@ -24,17 +24,17 @@ static char const * decoration_names[] = { - "widehat", "widetilde", "overbrace", "overleftarrow", "overrightarrow", + "widehat", "widetilde", "overbrace", "overleftarrow", "overrightarrow", "overline", "underbrace", "underline", "underleftarrow", "underrightarrow", "underleftrightarrow", "overleftrightarrow", "hat", "acute", "bar", "dot", - "check", "grave", "vec", "ddot", + "check", "grave", "vec", "ddot", "breve", "tilde" }; static int const nr_decoration_names = sizeof(decoration_names) / sizeof(char const *); - + FormMathsDeco::FormMathsDeco(LyXView * lv, Dialogs * d, FormMathsPanel const & p) : FormMathsSub(lv, d, p, _("Maths Decorations & Accents"), false) @@ -44,7 +44,7 @@ FormMathsDeco::FormMathsDeco(LyXView * lv, Dialogs * d, FL_FORM * FormMathsDeco::form() const { if (dialog_.get()) - return dialog_->form; + return dialog_->form; return 0; } @@ -80,7 +80,7 @@ bool FormMathsDeco::input(FL_OBJECT * ob, long) if (deco_ < 0) return false; //if (ob == dialog_->bmtable_deco1) - // deco_ += 0; + // deco_ += 0; if (ob == dialog_->bmtable_deco2) deco_ += 10; apply(); diff --git a/src/frontends/xforms/FormMathsDeco.h b/src/frontends/xforms/FormMathsDeco.h index 1febeff43b..1c048fb57f 100644 --- a/src/frontends/xforms/FormMathsDeco.h +++ b/src/frontends/xforms/FormMathsDeco.h @@ -1,10 +1,10 @@ // -*- C++ -*- -/** +/** * \file FormMathsDeco.h * Copyright 2001 The LyX Team. * See the file COPYING. - * - * \author Alejandro Aguilar Sierra + * + * \author Alejandro Aguilar Sierra * \author John Levon, moz@compsoc.man.ac.uk * \author Angus Leeming, a.leeming@ic.ac.uk */ @@ -22,7 +22,7 @@ struct FD_form_maths_deco; -/** +/** * This class provides an XForms implementation of the maths deco. */ class FormMathsDeco : public FormMathsSub { @@ -43,7 +43,7 @@ private: // build the form FD_form_maths_deco * build_maths_deco(); - + // Real GUI implementation boost::scoped_ptr dialog_; diff --git a/src/frontends/xforms/FormMathsDelim.C b/src/frontends/xforms/FormMathsDelim.C index 832c51d08d..58e6ee49d5 100644 --- a/src/frontends/xforms/FormMathsDelim.C +++ b/src/frontends/xforms/FormMathsDelim.C @@ -27,10 +27,10 @@ #include "delim.xbm" #include "delim0.xpm" -static int const delim_rversion[] = { +static int const delim_rversion[] = { 1,1,3,3,4,5,7,7,9,9,10,11, 13,13,14,15,16,17,19,19,20,21,22,23 }; - + static char const * delim_values[] = { "(", ")", "lceil", "rceil", "uparrow", "Uparrow", "[", "]", "lfloor", "rfloor", "updownarrow", "Updownarrow", @@ -40,7 +40,7 @@ static char const * delim_values[] = { using std::endl; -FormMathsDelim::FormMathsDelim(LyXView * lv, Dialogs * d, +FormMathsDelim::FormMathsDelim(LyXView * lv, Dialogs * d, FormMathsPanel const & p) : FormMathsSub(lv, d, p, _("Maths Delimiters"), false) {} @@ -49,7 +49,7 @@ FormMathsDelim::FormMathsDelim(LyXView * lv, Dialogs * d, FL_FORM * FormMathsDelim::form() const { if (dialog_.get()) - return dialog_->form; + return dialog_->form; return 0; } @@ -57,13 +57,13 @@ FL_FORM * FormMathsDelim::form() const void FormMathsDelim::build() { dialog_.reset(build_maths_delim()); - + fl_set_button(dialog_->radio_left, 1); fl_set_pixmap_data(dialog_->button_pix, const_cast(delim0)); dialog_->radio_left->u_ldata = 0; dialog_->radio_right->u_ldata = 1; dialog_->radio_both->u_ldata = 2; - + fl_set_bmtable_data(dialog_->bmtable, 6, 4, delim_width, delim_height, delim_bits); fl_set_bmtable_maxitems(dialog_->bmtable, 23); @@ -101,7 +101,7 @@ bool FormMathsDelim::input(FL_OBJECT *, long) int const button = fl_get_bmtable_numb(dialog_->bmtable); bool const both = (button == FL_MIDDLE_MOUSE || fl_get_button(dialog_->radio_both) != 0); - + if (i >= 0) { if (side || (button == FL_RIGHT_MOUSE)) right = i; @@ -111,14 +111,14 @@ bool FormMathsDelim::input(FL_OBJECT *, long) right = delim_rversion[i]; } } - + Pixmap p1, p2; - + p1 = fl_get_pixmap_pixmap(dialog_->button_pix, &p1, &p2); fl_draw_bmtable_item(dialog_->bmtable, left, p1, 0, 0); fl_draw_bmtable_item(dialog_->bmtable, right, p1, 16, 0); fl_redraw_object(dialog_->button_pix); - + dialog_->radio_left->u_ldata = left; dialog_->radio_right->u_ldata = right; diff --git a/src/frontends/xforms/FormMathsDelim.h b/src/frontends/xforms/FormMathsDelim.h index a0b22a6f1c..aac3f5422b 100644 --- a/src/frontends/xforms/FormMathsDelim.h +++ b/src/frontends/xforms/FormMathsDelim.h @@ -1,10 +1,10 @@ // -*- C++ -*- -/** +/** * \file FormMathsDelim.h * Copyright 2001 The LyX Team. * See the file COPYING. - * - * \author Alejandro Aguilar Sierra + * + * \author Alejandro Aguilar Sierra * \author John Levon, moz@compsoc.man.ac.uk * \author Angus Leeming, a.leeming@ic.ac.uk */ @@ -22,7 +22,7 @@ struct FD_form_maths_delim; -/** +/** * This class provides an XForms implementation of the maths delim. */ class FormMathsDelim : public FormMathsSub { @@ -43,7 +43,7 @@ private: // build the form FD_form_maths_delim * build_maths_delim(); - + // Real GUI implementation boost::scoped_ptr dialog_; }; diff --git a/src/frontends/xforms/FormMathsMatrix.C b/src/frontends/xforms/FormMathsMatrix.C index 11fb88c87e..621b66f4b5 100644 --- a/src/frontends/xforms/FormMathsMatrix.C +++ b/src/frontends/xforms/FormMathsMatrix.C @@ -36,7 +36,7 @@ static char v_align_c[] = "tcb"; extern "C" { - + static int C_FormMathsMatrixAlignFilter(FL_OBJECT * ob, char const *, char const * cur, int c) @@ -47,7 +47,7 @@ extern "C" { lyx::Assert(pre); return pre->AlignFilter(cur, c); } - + } @@ -60,7 +60,7 @@ FormMathsMatrix::FormMathsMatrix(LyXView * lv, Dialogs * d, FL_FORM * FormMathsMatrix::form() const { if (dialog_.get()) - return dialog_->form; + return dialog_->form; return 0; } @@ -94,10 +94,10 @@ void FormMathsMatrix::apply() char const * sh = fl_get_input(dialog_->input_halign); int const nx = int(fl_get_slider_value(dialog_->slider_columns) + 0.5); int const ny = int(fl_get_slider_value(dialog_->slider_rows) + 0.5); - + ostringstream ost; ost << nx << ' ' << ny << ' ' << c << ' ' << sh; - + lv_->getLyXFunc()->dispatch(LFUN_INSERT_MATRIX, ost.str().c_str()); } @@ -109,7 +109,7 @@ bool FormMathsMatrix::input(FL_OBJECT * ob, long) int const nx = int(fl_get_slider_value(dialog_->slider_columns)+0.5); for (int i = 0; i < nx; ++i) h_align_str[i] = 'c'; - + h_align_str[nx] = '\0'; fl_set_input(dialog_->input_halign, h_align_str); @@ -121,7 +121,7 @@ bool FormMathsMatrix::input(FL_OBJECT * ob, long) int FormMathsMatrix::AlignFilter(char const * cur, int c) { size_t len = strlen(cur); - + int const n = int(fl_get_slider_value(dialog_->slider_columns) + 0.5) - int(len) + int(lyx::count(cur, cur + len, '|')); @@ -130,6 +130,6 @@ int FormMathsMatrix::AlignFilter(char const * cur, int c) if (c == 'c' || c == 'l' || c == 'r' || c == '|') return FL_VALID; - + return FL_INVALID; } diff --git a/src/frontends/xforms/FormMathsMatrix.h b/src/frontends/xforms/FormMathsMatrix.h index a6631a5786..347c36b6bd 100644 --- a/src/frontends/xforms/FormMathsMatrix.h +++ b/src/frontends/xforms/FormMathsMatrix.h @@ -1,10 +1,10 @@ // -*- C++ -*- -/** +/** * \file FormMathsMatrix.h * Copyright 2001 The LyX Team. * See the file COPYING. - * - * \author Alejandro Aguilar Sierra + * + * \author Alejandro Aguilar Sierra * \author John Levon, moz@compsoc.man.ac.uk * \author Angus Leeming, a.leeming@ic.ac.uk */ @@ -22,7 +22,7 @@ struct FD_form_maths_matrix; -/** +/** * This class provides an XForms implementation of the maths matrix. */ class FormMathsMatrix : public FormMathsSub { @@ -44,7 +44,7 @@ private: // build the form FD_form_maths_matrix * build_maths_matrix(); - + // Real GUI implementation boost::scoped_ptr dialog_; }; diff --git a/src/frontends/xforms/FormMathsPanel.C b/src/frontends/xforms/FormMathsPanel.C index fcab83b7bd..465c6f1927 100644 --- a/src/frontends/xforms/FormMathsPanel.C +++ b/src/frontends/xforms/FormMathsPanel.C @@ -77,7 +77,7 @@ FormMathsPanel::FormMathsPanel(LyXView * lv, Dialogs * d) style_.reset( new FormMathsStyle( lv, d, *this)); typedef vector StringVec; - + StringVec latex(nr_latex_arrow); for (StringVec::size_type i = 0; i < latex.size(); ++i) { latex[i] = latex_arrow[i]; @@ -159,7 +159,7 @@ FormMathsPanel::FormMathsPanel(LyXView * lv, Dialogs * d) FL_FORM * FormMathsPanel::form() const { if (dialog_.get()) - return dialog_->form; + return dialog_->form; return 0; } @@ -173,11 +173,11 @@ void FormMathsPanel::setActive(FormMathsSub * a) const void FormMathsPanel::build() { dialog_.reset(build_maths_panel()); - + for (int i = 0; i < nr_function_names; ++i) fl_add_browser_line(dialog_->browser_funcs, function_names[i]); - + fl_set_pixmap_data(dialog_->button_sqrt, const_cast(sqrt_xpm)); fl_set_pixmap_data(dialog_->button_frac, @@ -203,7 +203,7 @@ void FormMathsPanel::build() arrow_->addBitmap(7, 2, 4, larrow_width, larrow_height, larrow_bits, false); arrow_->addBitmap(4, 2, 2, darrow_width, darrow_height, darrow_bits); - + boperator_->addBitmap(31, 4, 8, bop_width, bop_height, bop_bits); brelats_->addBitmap(35, 4, 9, brel_width, brel_height, brel_bits); @@ -215,21 +215,21 @@ void FormMathsPanel::build() misc_->addBitmap(5, 5, 1, misc4_width, misc4_height, misc4_bits); misc_->addBitmap(6, 3, 2, misc2_width, misc2_height, misc2_bits, false); misc_->addBitmap(4, 2, 2, misc3_width, misc3_height, misc3_bits); - + dots_->addBitmap(4, 4, 1, dots_width, dots_height, dots_bits); varsize_->addBitmap(14, 3, 5, varsz_width, varsz_height, varsz_bits); ams_misc_->addBitmap(9, 5, 2, ams1_width, ams1_height, ams1_bits); ams_misc_->addBitmap(26, 3, 9, ams7_width, ams7_height, ams7_bits); - + ams_arrows_->addBitmap(32, 3, 11, ams2_width, ams2_height, ams2_bits); ams_arrows_->addBitmap(6, 3, 2, ams3_width, ams3_height, ams3_bits); ams_rel_->addBitmap(66, 6, 11, ams_rel_width, ams_rel_height, ams_rel_bits); ams_nrel_->addBitmap(51, 6, 9, ams_nrel_width, ams_nrel_height, ams_nrel_bits); - + ams_ops_->addBitmap(23, 3, 8, ams_ops_width, ams_ops_height, ams_ops_bits); bc().setCancel(dialog_->button_close); @@ -275,7 +275,7 @@ bool FormMathsPanel::input(FL_OBJECT *, long data) active_->hide(); dots_->show(); break; - + case MM_VARSIZE: if (active_ && active_ != varsize_.get()) active_->hide(); @@ -287,7 +287,7 @@ bool FormMathsPanel::input(FL_OBJECT *, long data) active_->hide(); ams_misc_->show(); break; - + case MM_AMS_ARROWS: if (active_ && active_ != ams_arrows_.get()) active_->hide(); @@ -382,9 +382,9 @@ bool FormMathsPanel::input(FL_OBJECT *, long data) void FormMathsPanel::insertSymbol(string const & sym, bool bs) const { - if (bs) + if (bs) lv_->getLyXFunc()->dispatch(LFUN_INSERT_MATH, '\\' + sym); - else + else lv_->getLyXFunc()->dispatch(LFUN_INSERT_MATH, sym); } diff --git a/src/frontends/xforms/FormMathsPanel.h b/src/frontends/xforms/FormMathsPanel.h index 87ae8ff60e..bface63092 100644 --- a/src/frontends/xforms/FormMathsPanel.h +++ b/src/frontends/xforms/FormMathsPanel.h @@ -1,10 +1,10 @@ // -*- C++ -*- -/** +/** * \file FormMathsPanel.h * Copyright 2001 The LyX Team. * See the file COPYING. - * - * \author Alejandro Aguilar Sierra + * + * \author Alejandro Aguilar Sierra * \author John Levon, moz@compsoc.man.ac.uk * \author Angus Leeming, a.leeming@ic.ac.uk */ @@ -30,7 +30,7 @@ class FormMathsStyle; class FormMathsSub; struct FD_form_maths_panel; -/// values used by the xforms callbacks +/// values used by the xforms callbacks enum MathsCallbackValues { MM_GREEK, MM_ARROW, @@ -57,8 +57,8 @@ enum MathsCallbackValues { MM_AMS_OPS, MM_FUNC }; - -/** + +/** * This class provides an XForms implementation of the maths panel. */ class FormMathsPanel : public FormBaseBD { @@ -67,25 +67,25 @@ public: FormMathsPanel(LyXView *, Dialogs *); /// void setActive(FormMathsSub *) const; - /// dispatch a symbol insert + /// dispatch a symbol insert void insertSymbol(string const & sym, bool bs = true) const; /// dispatch an LFUN: void dispatchFunc(kb_action action) const; private: /// Pointer to the actual instantiation of the ButtonController. virtual xformsBC & bc(); - + /// Build the dialog virtual void build(); /// input handler virtual bool input(FL_OBJECT *, long); - + /// Pointer to the actual instantiation of the xforms form virtual FL_FORM * form() const; // build the panels FD_form_maths_panel * build_maths_panel(); - + /// send LFUN_MATH_DISPLAY void mathDisplay() const; diff --git a/src/frontends/xforms/FormMathsSpace.C b/src/frontends/xforms/FormMathsSpace.C index 11402a6a14..af57cce0fd 100644 --- a/src/frontends/xforms/FormMathsSpace.C +++ b/src/frontends/xforms/FormMathsSpace.C @@ -30,7 +30,7 @@ FormMathsSpace::FormMathsSpace(LyXView * lv, Dialogs * d, FL_FORM * FormMathsSpace::form() const { if (dialog_.get()) - return dialog_->form; + return dialog_->form; return 0; } @@ -61,7 +61,7 @@ void FormMathsSpace::apply() bool FormMathsSpace::input(FL_OBJECT *, long data) { space_ = -1; - + if (data >= 0 && data < 6) { space_ = short(data); apply(); diff --git a/src/frontends/xforms/FormMathsSpace.h b/src/frontends/xforms/FormMathsSpace.h index f9e4f534be..a15338b700 100644 --- a/src/frontends/xforms/FormMathsSpace.h +++ b/src/frontends/xforms/FormMathsSpace.h @@ -1,10 +1,10 @@ // -*- C++ -*- -/** +/** * \file FormMathsSpace.h * Copyright 2001 The LyX Team. * See the file COPYING. - * - * \author Alejandro Aguilar Sierra + * + * \author Alejandro Aguilar Sierra * \author John Levon, moz@compsoc.man.ac.uk * \author Angus Leeming, a.leeming@ic.ac.uk */ @@ -22,7 +22,7 @@ struct FD_form_maths_space; -/** +/** * This class provides an XForms implementation of the maths space. */ class FormMathsSpace : public FormMathsSub { @@ -43,7 +43,7 @@ private: // build the form FD_form_maths_space * build_maths_space(); - + // Real GUI implementation boost::scoped_ptr dialog_; diff --git a/src/frontends/xforms/FormMathsStyle.C b/src/frontends/xforms/FormMathsStyle.C index 86db7273c9..e326eee152 100644 --- a/src/frontends/xforms/FormMathsStyle.C +++ b/src/frontends/xforms/FormMathsStyle.C @@ -46,7 +46,7 @@ FormMathsStyle::FormMathsStyle(LyXView * lv, Dialogs * d, FL_FORM * FormMathsStyle::form() const { if (dialog_.get()) - return dialog_->form; + return dialog_->form; return 0; } @@ -81,9 +81,9 @@ void FormMathsStyle::build() void FormMathsStyle::apply() { - if ((style_ >= 0) && (style_ < 4)) + if ((style_ >= 0) && (style_ < 4)) parent_.insertSymbol(latex_mathstyle[style_]); - else if ((style_ >= 4) && (style_ < 14)) + else if ((style_ >= 4) && (style_ < 14)) parent_.dispatchFunc(latex_mathfontcmds[style_ - 4]); } @@ -92,7 +92,7 @@ bool FormMathsStyle::input(FL_OBJECT * ob, long data) { style_ = fl_get_bmtable(ob); if (style_ < 0) return false; - //if (ob == dialog_->bmtable_style1) style_ += 0; + //if (ob == dialog_->bmtable_style1) style_ += 0; if (ob == dialog_->bmtable_style2) style_ += 1; if (ob == dialog_->bmtable_font1) style_ += 4; if (ob == dialog_->bmtable_font2) style_ += 9; diff --git a/src/frontends/xforms/FormMathsStyle.h b/src/frontends/xforms/FormMathsStyle.h index 18b28edd64..10aed7ff1c 100644 --- a/src/frontends/xforms/FormMathsStyle.h +++ b/src/frontends/xforms/FormMathsStyle.h @@ -1,10 +1,10 @@ // -*- C++ -*- -/** +/** * \file FormMathsStyle.h * Copyright 2001 The LyX Team. * See the file COPYING. - * - * \author Alejandro Aguilar Sierra + * + * \author Alejandro Aguilar Sierra * \author John Levon, moz@compsoc.man.ac.uk * \author Angus Leeming, a.leeming@ic.ac.uk */ @@ -22,7 +22,7 @@ struct FD_form_maths_style; -/** +/** * This class provides an XForms implementation of the maths style. */ class FormMathsStyle : public FormMathsSub { @@ -43,7 +43,7 @@ private: // build the form FD_form_maths_style * build_maths_style(); - + // Real GUI implementation boost::scoped_ptr dialog_; diff --git a/src/frontends/xforms/FormMinipage.C b/src/frontends/xforms/FormMinipage.C index 8c3a1a5ac8..b4b08c95d7 100644 --- a/src/frontends/xforms/FormMinipage.C +++ b/src/frontends/xforms/FormMinipage.C @@ -96,7 +96,7 @@ ButtonPolicy::SMInput FormMinipage::input(FL_OBJECT * ob, long) ButtonPolicy::SMInput action = ButtonPolicy::SMI_NOOP; - if (ob == dialog_->radio_top || + if (ob == dialog_->radio_top || ob == dialog_->radio_middle || ob == dialog_->radio_bottom || ob == dialog_->choice_width_units) diff --git a/src/frontends/xforms/FormParagraph.C b/src/frontends/xforms/FormParagraph.C index 390849314c..f7d38a1d0c 100644 --- a/src/frontends/xforms/FormParagraph.C +++ b/src/frontends/xforms/FormParagraph.C @@ -120,7 +120,7 @@ void FormParagraph::build() "| Medskip | Bigskip | VFill | Length ")); fl_addto_choice(dialog_->choice_space_below, _(" None | Defskip | Smallskip " - "| Medskip | Bigskip | VFill | Length ")); + "| Medskip | Bigskip | VFill | Length ")); fl_addto_choice(dialog_->choice_linespacing, _(" Default | Single | OneHalf | Double | Other ")); @@ -179,7 +179,7 @@ void FormParagraph::build() bc_.addReadOnly(dialog_->input_space_below); bc_.addReadOnly(dialog_->check_space_below); bc_.addReadOnly(dialog_->choice_linespacing); - bc_.addReadOnly(dialog_->input_linespacing); + bc_.addReadOnly(dialog_->input_linespacing); bc_.addReadOnly(dialog_->check_noindent); bc_.addReadOnly(dialog_->input_labelwidth); } @@ -251,7 +251,7 @@ void validateVSpaceWidgets(FL_OBJECT * choice_type, FL_OBJECT * input_length) fl_set_choice(choice_type, 1); } -} // namespace anon +} // namespace anon void FormParagraph::apply() @@ -290,7 +290,7 @@ void FormParagraph::apply() align = LYX_ALIGN_RIGHT; else if (fl_get_button(dialog_->radio_align_center)) align = LYX_ALIGN_CENTER; - else + else align = LYX_ALIGN_BLOCK; string const labelwidthstring = @@ -327,7 +327,7 @@ void FormParagraph::apply() align, labelwidthstring, noindent); // Actually apply these settings - lv_->view()->update(text, + lv_->view()->update(text, BufferView::SELECT | BufferView::FITCUR | BufferView::CHANGE); lv_->buffer()->markDirty(); setMinibuffer(lv_, _("Paragraph layout set")); @@ -391,7 +391,7 @@ void setWidgetsFromVSpace(VSpace const & space, fl_set_button(check_keep, space.keep()); } -} // namespace anon +} // namespace anon void FormParagraph::update() @@ -485,13 +485,13 @@ void FormParagraph::update() dialog_->input_space_above, dialog_->choice_value_space_above, dialog_->check_space_above); - + setWidgetsFromVSpace(par_->params().spaceBottom(), dialog_->choice_space_below, dialog_->input_space_below, dialog_->choice_value_space_below, dialog_->check_space_below); - + fl_set_button(dialog_->check_noindent, par_->params().noindent()); } @@ -528,7 +528,7 @@ void synchronizeSpaceWidgets(FL_OBJECT * choice_type, } } } - + bool validSpaceWidgets(FL_OBJECT * choice_type, FL_OBJECT * input_length) { // Paranoia check! @@ -546,7 +546,7 @@ bool validSpaceWidgets(FL_OBJECT * choice_type, FL_OBJECT * input_length) } // namespace anon - + bool FormParagraph::input(FL_OBJECT * ob, long) { clearMessage(); diff --git a/src/frontends/xforms/FormParagraph.h b/src/frontends/xforms/FormParagraph.h index 9078dabb54..572d6cc824 100644 --- a/src/frontends/xforms/FormParagraph.h +++ b/src/frontends/xforms/FormParagraph.h @@ -51,7 +51,7 @@ private: Paragraph const * getCurrentParagraph() const; /// virtual FL_FORM * form() const; - + /// Fdesign generated method FD_form_paragraph * build_paragraph(); diff --git a/src/frontends/xforms/FormPreamble.h b/src/frontends/xforms/FormPreamble.h index 2efaf2118a..449482d60b 100644 --- a/src/frontends/xforms/FormPreamble.h +++ b/src/frontends/xforms/FormPreamble.h @@ -26,13 +26,13 @@ public: /// FormPreamble(ControlPreamble &); private: - /// Apply from dialog + /// Apply from dialog virtual void apply(); /// Build the dialog virtual void build(); /// Update the dialog virtual void update(); - + /// Fdesign generated method FD_form_preamble * build_preamble(); }; diff --git a/src/frontends/xforms/FormPreferences.C b/src/frontends/xforms/FormPreferences.C index b1432e15e4..bea4d64bc7 100644 --- a/src/frontends/xforms/FormPreferences.C +++ b/src/frontends/xforms/FormPreferences.C @@ -72,7 +72,7 @@ Converters local_converters; FormPreferences::FormPreferences(LyXView * lv, Dialogs * d) : FormBaseBI(lv, d, _("Preferences"), false), colors_(*this), converters_(*this), inputs_misc_(*this), - formats_(*this), interface_(*this), language_(*this), + formats_(*this), interface_(*this), language_(*this), lnf_misc_(*this), outputs_misc_(*this), paths_(*this), printer_(*this), screen_fonts_(*this), spelloptions_(*this) { @@ -140,7 +140,7 @@ void FormPreferences::ok() AddName(user_lyxdir, "preferences.xform"); colors_.modifiedXformsPrefs = !XformsColor::write(filename); } - + lv_->getLyXFunc()->dispatch(LFUN_SAVEPREFERENCES); } @@ -170,7 +170,7 @@ void FormPreferences::build() // Allow the base class to control messages setMessageWidget(dialog_->text_warning); - + // build the tab folders converters_tab_.reset(build_inner_tab()); look_n_feel_tab_.reset(build_inner_tab()); @@ -327,7 +327,7 @@ string const FormPreferences::getFeedback(FL_OBJECT * ob) bool FormPreferences::input(FL_OBJECT * ob, long) { lyx::Assert(ob); - + // whatever checks you need to ensure the user hasn't entered // some totally ridiculous value somewhere. Change activate to suit. // comments before each test describe what is _valid_ @@ -357,7 +357,7 @@ bool FormPreferences::input(FL_OBJECT * ob, long) void FormPreferences::update() { if (!dialog_.get()) return; - + // read lyxrc entries colors_.update(); formats_.update(); // Must be before converters_.update() @@ -405,7 +405,7 @@ void FormPreferences::Colors::apply() if (modifiedXformsPrefs) { for (vector::const_iterator cit = - xformsColorDB.begin(); + xformsColorDB.begin(); cit != xformsColorDB.end(); ++cit) { fl_mapcolor(cit->colorID, cit->r, cit->g, cit->b); @@ -439,7 +439,7 @@ void FormPreferences::Colors::apply() // Create a valid X11 name of the form "#rrggbb" string const hexname = X11hexname(cit->color()); - + if (lcolor.getX11Name(lc) != hexname) { lyxerr[Debug::GUI] << "FormPreferences::Colors::apply: " @@ -475,15 +475,15 @@ void FormPreferences::Colors::build() fl_set_slider_bounds(dialog_->slider_value, 0.0, 1.0); fl_set_slider_step(dialog_->slider_value, 0.01); fl_set_slider_return(dialog_->slider_value, FL_RETURN_CHANGED); - + fl_set_slider_bounds(dialog_->slider_red, 0.0, 255.0); fl_set_slider_step(dialog_->slider_red, 1.0); fl_set_slider_return(dialog_->slider_red, FL_RETURN_CHANGED); - + fl_set_slider_bounds(dialog_->slider_green, 0.0, 255.0); fl_set_slider_step(dialog_->slider_green, 1.0); fl_set_slider_return(dialog_->slider_green, FL_RETURN_CHANGED); - + fl_set_slider_bounds(dialog_->slider_blue, 0.0, 255.0); fl_set_slider_step(dialog_->slider_blue, 1.0); fl_set_slider_return(dialog_->slider_blue, FL_RETURN_CHANGED); @@ -534,7 +534,7 @@ void FormPreferences::Colors::input(FL_OBJECT const * const ob) { if (ob == dialog_->browser_lyx_objs) { InputBrowserLyX(); - + } else if (ob == dialog_->dial_hue || ob == dialog_->slider_saturation || ob == dialog_->slider_value) { @@ -597,10 +597,10 @@ void FormPreferences::Colors::InputBrowserLyX() const // Display either RGB or HSV but not both! SwitchColorSpace(); - + // Deactivate the modify button to begin with... setEnabled(dialog_->button_modify, false); - + fl_unfreeze_form(dialog_->form); } @@ -614,13 +614,13 @@ void FormPreferences::Colors::InputHSV() int const h = int(hue); int const s = int(100.0 * sat); int const v = int(100.0 * val); - + string const label = tostr(h) + string(", ") + tostr(s) + string(", ") + tostr(v); fl_set_object_label(dialog_->text_color_values, label.c_str()); RGBColor col = HSVColor(hue, sat, val); - + fl_freeze_form(dialog_->form); fl_mapcolor(GUI_COLOR_CHOICE, col.r, col.g, col.b); @@ -637,10 +637,10 @@ void FormPreferences::Colors::InputHSV() fl_unfreeze_form(dialog_->form); if (selLyX < 1) return; - + fl_getmcolor(GUI_COLOR_CHOICE, &col.r, &col.g, &col.b); bool modify = false; - + // Is the choice an Xforms color... if (selLyX - 1 < xformsColorDB.size()) { vector::size_type const i = selLyX - 1; @@ -666,7 +666,7 @@ void FormPreferences::Colors::InputRGB() string const label = tostr(red) + string(", ") + tostr(green) + string(", ") + tostr(blue); fl_set_object_label(dialog_->text_color_values, label.c_str()); - + fl_freeze_form(dialog_->form); RGBColor col = RGBColor(red, green, blue); @@ -679,9 +679,9 @@ void FormPreferences::Colors::InputRGB() fl_unfreeze_form(dialog_->form); if (selLyX < 1) return; - + bool modify = false; - + // Is the choice an Xforms color... if (selLyX - 1 < xformsColorDB.size()) { vector::size_type const i = selLyX - 1; @@ -839,7 +839,7 @@ void FormPreferences::Colors::Modify() } fl_freeze_form(dialog_->form); - setEnabled(dialog_->button_modify, false); + setEnabled(dialog_->button_modify, false); fl_unfreeze_form(dialog_->form); } @@ -863,7 +863,7 @@ void FormPreferences::Colors::SwitchColorSpace() const HSVColor hsv = HSVColor(col); hsv.h = max(hsv.h, 0.0); - + fl_set_dial_value(dialog_->dial_hue, hsv.h); fl_set_slider_value(dialog_->slider_saturation, hsv.s); fl_set_slider_value(dialog_->slider_value, hsv.v); @@ -882,7 +882,7 @@ void FormPreferences::Colors::SwitchColorSpace() const string const label = tostr(h) + string(", ") + tostr(s) + string(", ") + tostr(v); fl_set_object_label(dialog_->text_color_values, label.c_str()); - + } else { fl_show_object(dialog_->slider_red); fl_show_object(dialog_->slider_blue); @@ -903,7 +903,7 @@ void FormPreferences::Colors::SwitchColorSpace() const string(", ") + tostr(b); fl_set_object_label(dialog_->text_color_values, label.c_str()); } - + fl_unfreeze_form(dialog_->form); } @@ -1051,7 +1051,7 @@ bool FormPreferences::Converters::Add() } -bool FormPreferences::Converters::Browser() +bool FormPreferences::Converters::Browser() { int const i = fl_get_browser(dialog_->browser_all); if (i <= 0) return false; @@ -1075,7 +1075,7 @@ bool FormPreferences::Converters::Browser() setEnabled(dialog_->button_add, false); setEnabled(dialog_->button_delete, true); - + fl_unfreeze_form(dialog_->form); return false; } @@ -1097,12 +1097,12 @@ bool FormPreferences::Converters::Input() string const from = GetFrom(); string const to = GetTo(); int const sel = local_converters.getNumber(from, to); - + fl_freeze_form(dialog_->form); if (sel < 0) { fl_set_object_label(dialog_->button_add, idex(_("Add|#A"))); - fl_set_button_shortcut(dialog_->button_add, + fl_set_button_shortcut(dialog_->button_add, scex(_("Add|#A")), 1); fl_deselect_browser(dialog_->browser_all); @@ -1112,7 +1112,7 @@ bool FormPreferences::Converters::Input() fl_set_object_label(dialog_->button_add, idex(_("Modify|#M"))); fl_set_button_shortcut(dialog_->button_add, scex(_("Modify|#M")), 1); - + int top = max(sel-5, 0); fl_set_browser_topline(dialog_->browser_all, top); fl_select_browser_line(dialog_->browser_all, sel+1); @@ -1324,7 +1324,7 @@ bool FormPreferences::Formats::Add() } -bool FormPreferences::Formats::Browser() +bool FormPreferences::Formats::Browser() { int const i = fl_get_browser(dialog_->browser_all); if (i <= 0) return false; @@ -1344,7 +1344,7 @@ bool FormPreferences::Formats::Browser() setEnabled(dialog_->button_add, false); setEnabled(dialog_->button_delete, true); - + fl_unfreeze_form(dialog_->form); return false; } @@ -1534,7 +1534,7 @@ bool FormPreferences::Interface::input(FL_OBJECT const * const ob) parent_.browse(dialog_->input_bind_file, N_("Bind file"), "*.bind", dir1, dir2); - + } else if (ob == dialog_->button_ui_file_browse) { string dir = AddName(system_lyxdir, "ui"); string name = N_("Sys UI|#S#s"); @@ -1547,7 +1547,7 @@ bool FormPreferences::Interface::input(FL_OBJECT const * const ob) parent_.browse(dialog_->input_ui_file, N_("UI file"), "*.ui", dir1, dir2); } - + return true; } @@ -1595,7 +1595,7 @@ void FormPreferences::Language::apply() lyxrc.primary_kbmap = name_1; lyxrc.secondary_kbmap = name_2; } - + button = fl_get_button(dialog_->check_rtl_support); lyxrc.rtl_support = static_cast(button); @@ -1660,7 +1660,7 @@ void FormPreferences::Language::build() // to use its address in a block-if statement. // No it's not! Leads to crash. // setPrehandler( - // reinterpret_cast(combo_default_lang), + // reinterpret_cast(combo_default_lang), // C_FormPreferencesFeedbackCB); setPrehandler(dialog_->input_kbmap1); @@ -1767,7 +1767,7 @@ void FormPreferences::Language::update() fl_set_input(dialog_->input_kbmap1, ""); fl_set_input(dialog_->input_kbmap2, ""); } - + fl_set_button(dialog_->check_rtl_support, lyxrc.rtl_support); fl_set_button(dialog_->check_mark_foreign, lyxrc.mark_foreign_language); @@ -1908,7 +1908,7 @@ FormPreferences::LnFmisc::feedback(FL_OBJECT const * const ob) const void FormPreferences::LnFmisc::update() { fl_set_button(dialog_->check_banner, lyxrc.show_banner); - fl_set_button(dialog_->check_auto_region_delete, + fl_set_button(dialog_->check_auto_region_delete, lyxrc.auto_region_delete); fl_set_button(dialog_->check_exit_confirm, lyxrc.exit_confirmation); fl_set_button(dialog_->check_display_shrtcuts, lyxrc.display_shortcuts); @@ -2023,7 +2023,7 @@ void FormPreferences::OutputsMisc::update() fl_set_input(dialog_->input_checktex, lyxrc.chktex_command.c_str()); fl_set_input(dialog_->input_paperoption, - lyxrc.view_dvi_paper_option.c_str()); + lyxrc.view_dvi_paper_option.c_str()); fl_set_button(dialog_->check_autoreset_classopt, lyxrc.auto_reset_options); @@ -2056,7 +2056,7 @@ void FormPreferences::Paths::apply() button = fl_get_button(dialog_->check_last_files); str = fl_get_input(dialog_->input_lastfiles); if (!button) str.erase(); - + lyxrc.check_lastfiles = button; lyxrc.lastfiles = str; lyxrc.num_lastfiles = static_cast @@ -2136,7 +2136,7 @@ FormPreferences::Paths::feedback(FL_OBJECT const * const ob) const bool FormPreferences::Paths::input(FL_OBJECT const * const ob) { bool activate = true; - + // !ob if function is called from Paths::update() to de/activate // objects, // otherwise the function is called by an xforms CB via input(). @@ -2238,7 +2238,7 @@ bool FormPreferences::Paths::input(FL_OBJECT const * const ob) parent_.browse(dialog_->input_serverpipe, N_("LyX Server pipes"), string()); } - + return activate; } @@ -2268,7 +2268,7 @@ void FormPreferences::Paths::update() if (lyxrc.check_lastfiles) str = lyxrc.lastfiles; fl_set_button(dialog_->check_last_files, - lyxrc.check_lastfiles); + lyxrc.check_lastfiles); fl_set_input(dialog_->input_lastfiles, str.c_str()); fl_set_counter_value(dialog_->counter_lastfiles, lyxrc.num_lastfiles); @@ -2509,7 +2509,7 @@ void FormPreferences::ScreenFonts::apply() const changed = true; lyxrc.dpi = ivalue; } - + double dvalue = strToDbl(fl_get_input(dialog_->input_tiny)); if (lyxrc.font_sizes[LyXFont::SIZE_TINY] != dvalue) { changed = true; @@ -2633,7 +2633,7 @@ void FormPreferences::ScreenFonts::build() setPrehandler(dialog_->input_huger); } - + string const FormPreferences::ScreenFonts::feedback(FL_OBJECT const * const ob) const { @@ -2651,7 +2651,7 @@ FormPreferences::ScreenFonts::feedback(FL_OBJECT const * const ob) const str = lyxrc.getDescription(LyXRC::RC_SCREEN_FONT_ENCODING); else if (ob == dialog_->counter_zoom) str = lyxrc.getDescription(LyXRC::RC_SCREEN_ZOOM); - else if (ob == dialog_->counter_dpi) + else if (ob == dialog_->counter_dpi) str = lyxrc.getDescription(LyXRC::RC_SCREEN_DPI); else if (ob == dialog_->input_tiny || ob == dialog_->input_script @@ -2716,7 +2716,7 @@ bool FormPreferences::ScreenFonts::input() if (!activate) parent_.postWarning(str); - + return activate; } @@ -2775,7 +2775,7 @@ void FormPreferences::SpellOptions::apply() string choice = fl_get_choice_text(dialog_->choice_spell_command); choice = strip(frontStrip(choice)); - + lyxrc.isp_command = choice; #if 0 @@ -2806,7 +2806,7 @@ void FormPreferences::SpellOptions::apply() choice = fl_get_input(dialog_->input_escape_chars); if (button && choice.empty()) button = 0; if (!button) choice.erase(); - + lyxrc.isp_use_esc_chars = static_cast(button); lyxrc.isp_esc_chars = choice; @@ -2933,7 +2933,7 @@ bool FormPreferences::SpellOptions::input(FL_OBJECT const * const ob) parent_.browse(dialog_->input_personal_dict, N_("Personal dictionary"), "*.ispell"); } - + return true; // All input is valid! } @@ -2955,14 +2955,14 @@ void FormPreferences::SpellOptions::update() choice = 2; #endif fl_set_choice(dialog_->choice_spell_command, choice); - + string str; if (lyxrc.isp_use_alt_lang) str = lyxrc.isp_alt_lang; fl_set_button(dialog_->check_alt_lang, lyxrc.isp_use_alt_lang); fl_set_input(dialog_->input_alt_lang, str.c_str()); - + str.erase(); if (lyxrc.isp_use_esc_chars) str = lyxrc.isp_esc_chars; @@ -2990,7 +2990,7 @@ void FormPreferences::SpellOptions::update() void FormPreferences::browse(FL_OBJECT * inpt, string const & title, - string const & pattern, + string const & pattern, pair const & dir1, pair const & dir2) { diff --git a/src/frontends/xforms/FormPreferences.h b/src/frontends/xforms/FormPreferences.h index cee9831599..8837daebe9 100644 --- a/src/frontends/xforms/FormPreferences.h +++ b/src/frontends/xforms/FormPreferences.h @@ -73,14 +73,14 @@ private: virtual void build(); /// Pointer to the actual instantiation of the xforms form. virtual FL_FORM * form() const; - /// control which feedback message is output - string const getFeedback(FL_OBJECT *); + /// control which feedback message is output + string const getFeedback(FL_OBJECT *); /// void browse(FL_OBJECT * input, - string const & title, string const & pattern, - std::pair const & dir1= std::make_pair(string(),string()), + string const & title, string const & pattern, + std::pair const & dir1= std::make_pair(string(),string()), std::pair const & dir2 = std::make_pair(string(),string())); - + /// Fdesign generated methods FD_form_preferences * build_preferences(); /// @@ -148,7 +148,7 @@ private: void input(FL_OBJECT const * const); /// void update() { LoadBrowserLyX(); } - + /// Flag whether Xforms colors have changed since last file save bool modifiedXformsPrefs; @@ -289,7 +289,7 @@ private: }; /// friend class InputsMisc; - + /// class Interface { public: @@ -347,7 +347,7 @@ private: }; /// friend class Language; - + /// class LnFmisc { public: @@ -506,7 +506,7 @@ private: /** The tab folders. */ - + /// Colors colors_; /// diff --git a/src/frontends/xforms/FormPrint.C b/src/frontends/xforms/FormPrint.C index 54f38c2fff..f9d82aca0d 100644 --- a/src/frontends/xforms/FormPrint.C +++ b/src/frontends/xforms/FormPrint.C @@ -231,9 +231,9 @@ ButtonPolicy::SMInput FormPrint::input(FL_OBJECT * ob, long) fl_set_button(dialog_->radio_printer, 0); } } - + // if we type into file, select that as a target - if (ob == dialog_->input_file && fl_get_button(dialog_->radio_printer) + if (ob == dialog_->input_file && fl_get_button(dialog_->radio_printer) && strlen(fl_get_input(dialog_->input_file))) { fl_set_button(dialog_->radio_file, 1); fl_set_button(dialog_->radio_printer, 0); @@ -241,6 +241,6 @@ ButtonPolicy::SMInput FormPrint::input(FL_OBJECT * ob, long) fl_set_button(dialog_->radio_file, 0); fl_set_button(dialog_->radio_printer, 1); } - + return activate; } diff --git a/src/frontends/xforms/FormPrint.h b/src/frontends/xforms/FormPrint.h index 92efbb5487..c056f526fb 100644 --- a/src/frontends/xforms/FormPrint.h +++ b/src/frontends/xforms/FormPrint.h @@ -29,7 +29,7 @@ struct FD_form_print; */ class FormPrint : public FormCB > { public: - /// + /// FormPrint(ControlPrint &); private: diff --git a/src/frontends/xforms/FormRef.C b/src/frontends/xforms/FormRef.C index 187139d424..a1c62d58ea 100644 --- a/src/frontends/xforms/FormRef.C +++ b/src/frontends/xforms/FormRef.C @@ -39,7 +39,7 @@ void FormRef::build() { dialog_.reset(build_ref()); - for (int i = 0; !InsetRef::types[i].latex_name.empty(); ++i) + for (int i = 0; !InsetRef::types[i].latex_name.empty(); ++i) fl_addto_choice(dialog_->choice_type, _(InsetRef::types[i].gui_name.c_str())); @@ -70,7 +70,7 @@ void FormRef::update() controller().params().getContents().c_str()); fl_set_input(dialog_->input_name, controller().params().getOptions().c_str()); - fl_set_choice(dialog_->choice_type, + fl_set_choice(dialog_->choice_type, InsetRef::getType(controller().params().getCmdName()) + 1); at_ref_ = false; @@ -97,7 +97,7 @@ void FormRef::update() vector const buffers = controller().getBufferList(); vector const choice_buffers = getVectorFromChoice(dialog_->choice_buffer); - + // If different from the current contents of the choice, then update it if (buffers != choice_buffers) { // create a string of entries " entry1 | entry2 | entry3 " @@ -137,7 +137,7 @@ void FormRef::updateBrowser(vector const & akeys) const if (keys.empty()) { fl_add_browser_line(dialog_->browser_refs, _("*** No labels found in document ***")); - + setEnabled(dialog_->browser_refs, false); setEnabled(dialog_->check_sort, false); @@ -187,7 +187,7 @@ ButtonPolicy::SMInput FormRef::input(FL_OBJECT * ob, long) at_ref_ = !at_ref_; if (at_ref_) { controller().gotoRef(fl_get_input(dialog_->input_ref)); - fl_set_object_label(dialog_->button_go, _("Go back")); + fl_set_object_label(dialog_->button_go, _("Go back")); } else { controller().gotoBookmark(); fl_set_object_label(dialog_->button_go, @@ -214,7 +214,7 @@ ButtonPolicy::SMInput FormRef::input(FL_OBJECT * ob, long) setEnabled(dialog_->button_go, true); fl_set_object_lcol(dialog_->input_ref, FL_BLACK); - } else if (ob == dialog_->button_update || + } else if (ob == dialog_->button_update || ob == dialog_->check_sort || ob == dialog_->choice_buffer) { diff --git a/src/frontends/xforms/FormRef.h b/src/frontends/xforms/FormRef.h index e69e8d1e17..9f85c6a734 100644 --- a/src/frontends/xforms/FormRef.h +++ b/src/frontends/xforms/FormRef.h @@ -44,7 +44,7 @@ private: /// bool at_ref_; - /// + /// std::vector refs_; }; diff --git a/src/frontends/xforms/FormSearch.C b/src/frontends/xforms/FormSearch.C index f22dccf865..26a763fad7 100644 --- a/src/frontends/xforms/FormSearch.C +++ b/src/frontends/xforms/FormSearch.C @@ -27,7 +27,7 @@ FormSearch::FormSearch(ControlSearch & c) void FormSearch::build() { dialog_.reset(build_search()); - + // Manage the ok, apply and cancel/close buttons bc().setCancel(dialog_->button_close); bc().addReadOnly(dialog_->input_replace); @@ -41,7 +41,7 @@ ButtonPolicy::SMInput FormSearch::input(FL_OBJECT * obj, long) if (obj == dialog_->button_findnext || obj == dialog_->button_findprev) { bool const forward = (obj == dialog_->button_findnext); - + controller().find(fl_get_input(dialog_->input_search), fl_get_button(dialog_->check_casesensitive), fl_get_button(dialog_->check_matchword), @@ -50,13 +50,13 @@ ButtonPolicy::SMInput FormSearch::input(FL_OBJECT * obj, long) } else if (obj == dialog_->button_replace || obj == dialog_->button_replaceall) { bool const all = (obj == dialog_->button_replaceall); - + controller().replace(fl_get_input(dialog_->input_search), fl_get_input(dialog_->input_replace), fl_get_button(dialog_->check_casesensitive), fl_get_button(dialog_->check_matchword), all); } - + return ButtonPolicy::SMI_VALID; } diff --git a/src/frontends/xforms/FormSearch.h b/src/frontends/xforms/FormSearch.h index 93b0d922e7..7b33bb4c3b 100644 --- a/src/frontends/xforms/FormSearch.h +++ b/src/frontends/xforms/FormSearch.h @@ -25,7 +25,7 @@ class FormSearch : public FormCB > { public: /// FormSearch(ControlSearch &); - + private: /// not needed. virtual void apply() {} @@ -36,7 +36,7 @@ private: /// Filter the inputs virtual ButtonPolicy::SMInput input(FL_OBJECT *, long); - + /// Fdesign generated method FD_form_search * build_search(); }; diff --git a/src/frontends/xforms/FormSendto.C b/src/frontends/xforms/FormSendto.C index 6ace8e2078..e795da854c 100644 --- a/src/frontends/xforms/FormSendto.C +++ b/src/frontends/xforms/FormSendto.C @@ -37,7 +37,7 @@ void FormSendto::build() fl_set_input_return(dialog_->input_command, FL_RETURN_CHANGED); setPrehandler(dialog_->input_command); - // Manage the ok, apply, restore and cancel/close buttons + // Manage the ok, apply, restore and cancel/close buttons bc().setOK(dialog_->button_ok); bc().setApply(dialog_->button_apply); bc().setCancel(dialog_->button_close); diff --git a/src/frontends/xforms/FormSpellchecker.C b/src/frontends/xforms/FormSpellchecker.C index 6dadfd2ff7..2315ddd83f 100644 --- a/src/frontends/xforms/FormSpellchecker.C +++ b/src/frontends/xforms/FormSpellchecker.C @@ -28,7 +28,7 @@ FormSpellchecker::FormSpellchecker(ControlSpellchecker & c) void FormSpellchecker::build() { dialog_.reset(build_spellchecker()); - + fl_set_slider_bounds(dialog_->slider, 0.0, 100.0); fl_set_slider_step(dialog_->slider, 1.0); @@ -133,10 +133,10 @@ void FormSpellchecker::partialUpdate(int id) fl_show_messages(controller().getMessage().c_str()); hide(); } - + } - + void FormSpellchecker::showMessage(const char * msg) { fl_show_message(msg, "", ""); diff --git a/src/frontends/xforms/FormSpellchecker.h b/src/frontends/xforms/FormSpellchecker.h index 1bb7deb6ad..fe1e93ad3e 100644 --- a/src/frontends/xforms/FormSpellchecker.h +++ b/src/frontends/xforms/FormSpellchecker.h @@ -25,18 +25,18 @@ class FormSpellchecker : public FormCBinput_column_width, - FL_RETURN_END); + FL_RETURN_END); fl_set_input_return(column_options_->input_special_alignment, - FL_RETURN_END); + 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_RETURN_END); fl_set_input_return(cell_options_->input_special_multialign, - FL_RETURN_END); + FL_RETURN_END); setPrehandler(cell_options_->input_mcolumn_width); setPrehandler(cell_options_->input_special_multialign); fl_addto_tabfolder(dialog_->tabfolder, _("Tabular"), - tabular_options_->form); + tabular_options_->form); fl_addto_tabfolder(dialog_->tabfolder, _("Column/Row"), - column_options_->form); + column_options_->form); fl_addto_tabfolder(dialog_->tabfolder, _("Cell"), - cell_options_->form); + cell_options_->form); fl_addto_tabfolder(dialog_->tabfolder, _("LongTable"), - longtable_options_->form); + longtable_options_->form); // Create the contents of the unit choices // Don't include the "%" terms... @@ -159,16 +159,16 @@ void FormTabular::build() #else vector::iterator ret = remove_if(units_vec.begin(), units_vec.end(), - bind2nd(contains_functor(), "%")); + bind2nd(contains_functor(), "%")); units_vec.erase(ret, units_vec.end()); #endif - + string units = getStringFromVector(units_vec, "|"); fl_addto_choice(column_options_->choice_value_column_width, - units.c_str()); + units.c_str()); fl_addto_choice(cell_options_->choice_value_mcolumn_width, - units.c_str()); + units.c_str()); } @@ -176,7 +176,7 @@ void FormTabular::update() { if (closing_) return; - + if (!inset_ || !inset_->tabular.get()) return; @@ -204,10 +204,10 @@ void FormTabular::update() if (tabular->IsMultiColumn(cell)) { fl_set_button(cell_options_->check_multicolumn, 1); fl_set_button(cell_options_->check_border_top, - tabular->TopLine(cell)?1:0); + tabular->TopLine(cell)?1:0); setEnabled(cell_options_->check_border_top, true); fl_set_button(cell_options_->check_border_bottom, - tabular->BottomLine(cell)?1:0); + tabular->BottomLine(cell)?1:0); setEnabled(cell_options_->check_border_bottom, true); // pay attention to left/right lines they are only allowed // to set if we are in first/last cell of row or if the left/right @@ -255,8 +255,8 @@ void FormTabular::update() bool const metric = lyxrc.default_papersize > 3; string const default_unit = metric ? "cm" : "in"; updateWidgetsFromLength(cell_options_->input_mcolumn_width, - cell_options_->choice_value_mcolumn_width, - pwidth, default_unit); + cell_options_->choice_value_mcolumn_width, + pwidth, default_unit); if (!lv_->buffer()->isReadonly()) { setEnabled(cell_options_->input_special_multialign, true); @@ -267,7 +267,7 @@ void FormTabular::update() setEnabled(cell_options_->radio_valign_top, !pwidth.zero()); setEnabled(cell_options_->radio_valign_bottom, !pwidth.zero()); setEnabled(cell_options_->radio_valign_center, !pwidth.zero()); - + setEnabled(cell_options_->radio_align_left, pwidth.zero()); setEnabled(cell_options_->radio_align_right, pwidth.zero()); setEnabled(cell_options_->radio_align_center, pwidth.zero()); @@ -341,8 +341,8 @@ void FormTabular::update() bool const metric = lyxrc.default_papersize > 3; string const default_unit = metric ? "cm" : "in"; updateWidgetsFromLength(column_options_->input_column_width, - column_options_->choice_value_column_width, - pwidth, default_unit); + column_options_->choice_value_column_width, + pwidth, default_unit); setEnabled(column_options_->input_column_width, !isReadonly); setEnabled(column_options_->choice_value_column_width, !isReadonly); @@ -379,16 +379,16 @@ void FormTabular::update() setEnabled(column_options_->radio_align_left, pwidth.zero()); setEnabled(column_options_->radio_align_right, pwidth.zero()); setEnabled(column_options_->radio_align_center, pwidth.zero()); - + setEnabled(column_options_->radio_valign_top, !pwidth.zero()); setEnabled(column_options_->radio_valign_bottom, !pwidth.zero()); setEnabled(column_options_->radio_valign_center, !pwidth.zero()); fl_set_button(tabular_options_->check_longtable, - tabular->IsLongTabular()); + tabular->IsLongTabular()); bool const enable = tabular->IsLongTabular(); - + setEnabled(longtable_options_->check_lt_firsthead, enable); setEnabled(longtable_options_->check_1head_2border_above, enable); setEnabled(longtable_options_->check_1head_2border_below, enable); @@ -412,9 +412,9 @@ void FormTabular::update() fl_set_button(longtable_options_->check_lt_head, row_set); if (ltt.set) { fl_set_button(longtable_options_->check_head_2border_above, - ltt.topDL); + ltt.topDL); fl_set_button(longtable_options_->check_head_2border_above, - ltt.topDL); + ltt.topDL); use_empty = true; } else { setEnabled(longtable_options_->check_head_2border_above, 0); @@ -430,9 +430,9 @@ void FormTabular::update() fl_set_button(longtable_options_->check_lt_firsthead, row_set); if (ltt.set && (!ltt.empty || !use_empty)) { fl_set_button(longtable_options_->check_1head_2border_above, - ltt.topDL); + ltt.topDL); fl_set_button(longtable_options_->check_1head_2border_above, - ltt.topDL); + ltt.topDL); } else { setEnabled(longtable_options_->check_1head_2border_above, 0); setEnabled(longtable_options_->check_1head_2border_below, 0); @@ -449,9 +449,9 @@ void FormTabular::update() fl_set_button(longtable_options_->check_lt_foot, row_set); if (ltt.set) { fl_set_button(longtable_options_->check_foot_2border_above, - ltt.topDL); + ltt.topDL); fl_set_button(longtable_options_->check_foot_2border_above, - ltt.topDL); + ltt.topDL); use_empty = true; } else { setEnabled(longtable_options_->check_foot_2border_above, 0); @@ -467,9 +467,9 @@ void FormTabular::update() fl_set_button(longtable_options_->check_lt_lastfoot, row_set); if (ltt.set && (!ltt.empty || !use_empty)) { fl_set_button(longtable_options_->check_lastfoot_2border_above, - ltt.topDL); + ltt.topDL); fl_set_button(longtable_options_->check_lastfoot_2border_above, - ltt.topDL); + ltt.topDL); } else { setEnabled(longtable_options_->check_lastfoot_2border_above,0); setEnabled(longtable_options_->check_lastfoot_2border_below,0); @@ -477,13 +477,13 @@ void FormTabular::update() fl_set_button(longtable_options_->check_lastfoot_2border_above, 0); if (use_empty) { fl_set_button(longtable_options_->check_lastfoot_empty, - ltt.empty); + ltt.empty); if (ltt.empty) setEnabled(longtable_options_->check_lt_lastfoot, 0); } } fl_set_button(longtable_options_->check_lt_newpage, - tabular->GetLTNewPage(row)); + tabular->GetLTNewPage(row)); } else { fl_set_button(longtable_options_->check_lt_firsthead, 0); fl_set_button(longtable_options_->check_1head_2border_above, 0); @@ -502,7 +502,7 @@ void FormTabular::update() fl_set_button(longtable_options_->check_lt_newpage, 0); } fl_set_button(tabular_options_->check_rotate_tabular, - tabular->GetRotateTabular()); + tabular->GetRotateTabular()); } @@ -532,7 +532,7 @@ bool FormTabular::input(FL_OBJECT * ob, long) if (str1 != str2) input(column_options_->input_column_width, 0); str1 = getLengthFromWidgets(cell_options_->input_mcolumn_width, - cell_options_->choice_value_mcolumn_width); + cell_options_->choice_value_mcolumn_width); llen = tabular->GetMColumnPWidth(cell); if (llen.zero()) str2 = ""; @@ -552,7 +552,7 @@ bool FormTabular::input(FL_OBJECT * ob, long) ok(); return true; } - + if (actCell_ != cell) { update(); postWarning(_("Wrong Cursor position, updated window")); @@ -582,7 +582,7 @@ bool FormTabular::input(FL_OBJECT * ob, long) update(); // update for alignment return true; } - + if ((ob == cell_options_->input_mcolumn_width) || (ob == cell_options_->choice_value_mcolumn_width)) { string const str = @@ -656,19 +656,19 @@ bool FormTabular::input(FL_OBJECT * ob, long) num = LyXTabular::SET_USEBOX; special = "2"; } else if ((ob == longtable_options_->check_lt_firsthead) || - (ob == longtable_options_->check_1head_2border_above) || - (ob == longtable_options_->check_1head_2border_below) || - (ob == longtable_options_->check_1head_empty) || - (ob == longtable_options_->check_lt_head) || - (ob == longtable_options_->check_head_2border_above) || - (ob == longtable_options_->check_head_2border_below) || - (ob == longtable_options_->check_lt_foot) || - (ob == longtable_options_->check_foot_2border_above) || - (ob == longtable_options_->check_foot_2border_below) || - (ob == longtable_options_->check_lt_lastfoot) || - (ob == longtable_options_->check_lastfoot_2border_above) || - (ob == longtable_options_->check_lastfoot_2border_below) || - (ob == longtable_options_->check_lastfoot_empty)) { + (ob == longtable_options_->check_1head_2border_above) || + (ob == longtable_options_->check_1head_2border_below) || + (ob == longtable_options_->check_1head_empty) || + (ob == longtable_options_->check_lt_head) || + (ob == longtable_options_->check_head_2border_above) || + (ob == longtable_options_->check_head_2border_below) || + (ob == longtable_options_->check_lt_foot) || + (ob == longtable_options_->check_foot_2border_above) || + (ob == longtable_options_->check_foot_2border_below) || + (ob == longtable_options_->check_lt_lastfoot) || + (ob == longtable_options_->check_lastfoot_2border_above) || + (ob == longtable_options_->check_lastfoot_2border_below) || + (ob == longtable_options_->check_lastfoot_empty)) { num = static_cast(checkLongtableOptions(ob, special)); } else if (ob == longtable_options_->check_lt_newpage) { num = LyXTabular::SET_LTNEWPAGE; @@ -700,7 +700,7 @@ bool FormTabular::input(FL_OBJECT * ob, long) num = LyXTabular::M_VALIGN_CENTER; else return false; - + inset_->tabularFeatures(lv_->view(), num, special); update(); diff --git a/src/frontends/xforms/FormTabularCreate.C b/src/frontends/xforms/FormTabularCreate.C index 47fcb36935..ce7b40e047 100644 --- a/src/frontends/xforms/FormTabularCreate.C +++ b/src/frontends/xforms/FormTabularCreate.C @@ -41,7 +41,7 @@ void FormTabularCreate::build() fl_set_slider_precision(dialog_->slider_rows, 0); fl_set_slider_precision(dialog_->slider_columns, 0); - // Manage the ok, apply and cancel/close buttons + // Manage the ok, apply and cancel/close buttons bc().setOK(dialog_->button_ok); bc().setApply(dialog_->button_apply); bc().setCancel(dialog_->button_close); diff --git a/src/frontends/xforms/FormTabularCreate.h b/src/frontends/xforms/FormTabularCreate.h index a16ed11fc2..9a2c92a997 100644 --- a/src/frontends/xforms/FormTabularCreate.h +++ b/src/frontends/xforms/FormTabularCreate.h @@ -26,7 +26,7 @@ struct FD_form_tabular_create; class FormTabularCreate : public FormCB > { public: - /// + /// FormTabularCreate(ControlTabularCreate &); private: diff --git a/src/frontends/xforms/FormTexinfo.C b/src/frontends/xforms/FormTexinfo.C index 3a54234168..4a8217db25 100644 --- a/src/frontends/xforms/FormTexinfo.C +++ b/src/frontends/xforms/FormTexinfo.C @@ -22,7 +22,7 @@ #include "debug.h" #include "xforms_helpers.h" #include "support/LAssert.h" - + typedef FormCB > base_class; FormTexinfo::FormTexinfo(ControlTexinfo & c) @@ -69,10 +69,10 @@ ButtonPolicy::SMInput FormTexinfo::input(FL_OBJECT * ob, long) { updateStyles(ControlTexinfo::cls); } else if (ob == dialog_->radio_sty) { - updateStyles(ControlTexinfo::sty); + updateStyles(ControlTexinfo::sty); } else if (ob == dialog_->radio_bst) { - updateStyles(ControlTexinfo::bst); + updateStyles(ControlTexinfo::bst); } else if (ob == dialog_->button_rescan) { // build new *Files.lst @@ -106,11 +106,11 @@ ButtonPolicy::SMInput FormTexinfo::input(FL_OBJECT * ob, long) { void FormTexinfo::updateStyles(ControlTexinfo::texFileSuffix whichStyle) { - fl_clear_browser(dialog_->browser); + fl_clear_browser(dialog_->browser); bool const withFullPath = fl_get_button(dialog_->check_fullpath); - string const str = + string const str = controller().getContents(whichStyle, withFullPath); fl_add_browser_line(dialog_->browser, str.c_str()); diff --git a/src/frontends/xforms/FormThesaurus.C b/src/frontends/xforms/FormThesaurus.C index 4f2b097ea7..1bc58581a4 100644 --- a/src/frontends/xforms/FormThesaurus.C +++ b/src/frontends/xforms/FormThesaurus.C @@ -44,7 +44,7 @@ void FormThesaurus::build() setPrehandler(dialog_->input_entry); setPrehandler(dialog_->input_replace); - + // Manage the ok, apply and cancel/close buttons bc().setCancel(dialog_->button_close); bc().addReadOnly(dialog_->input_replace); @@ -68,7 +68,7 @@ void FormThesaurus::update() void FormThesaurus::updateMeanings(string const & str) { fl_clear_browser(dialog_->browser_meanings); - + fl_set_input(dialog_->input_entry, str.c_str()); fl_set_browser_topline(dialog_->browser_meanings, 1); @@ -82,7 +82,7 @@ void FormThesaurus::updateMeanings(string const & str) for (; cit != end; ++cit) { fl_add_browser_line(dialog_->browser_meanings, cit->first.c_str()); - + vector const & tmpvec = cit->second; vector::const_iterator cit2 = tmpvec.begin(); vector::const_iterator end2 = tmpvec.end(); @@ -93,7 +93,7 @@ void FormThesaurus::updateMeanings(string const & str) ent.c_str()); } } - + fl_unfreeze_form(form()); fl_redraw_form(form()); } @@ -126,12 +126,12 @@ void FormThesaurus::setReplace(string const & templ, string const & nstr) } else if (templ.size() > 0 && isupper(templ[0])) { bool rest_lower = true; string::const_iterator cit2 = beg + 1; - + for (; cit2 != end; ++cit2) { if (isupper(*cit2)) rest_lower = false; } - + if (rest_lower) { str = lowercase(nstr); str[0] = uppercase(nstr[0]); @@ -146,7 +146,7 @@ ButtonPolicy::SMInput FormThesaurus::input(FL_OBJECT * obj, long) { if (obj == dialog_->input_entry) { string s = strip(frontStrip(fl_get_input(dialog_->input_entry))); - + updateMeanings(s); if (s.empty()) { diff --git a/src/frontends/xforms/FormThesaurus.h b/src/frontends/xforms/FormThesaurus.h index a4a93fda8f..3ef7f5057b 100644 --- a/src/frontends/xforms/FormThesaurus.h +++ b/src/frontends/xforms/FormThesaurus.h @@ -30,7 +30,7 @@ class FormThesaurus : public FormCB public: /// FormThesaurus(ControlThesaurus &); - + private: /// not needed. virtual void apply() {} @@ -50,7 +50,7 @@ private: /// Filter the inputs virtual ButtonPolicy::SMInput input(FL_OBJECT *, long); - + /// for double click handling int clickline_; diff --git a/src/frontends/xforms/FormToc.C b/src/frontends/xforms/FormToc.C index b9e3e9267f..0570578d4d 100644 --- a/src/frontends/xforms/FormToc.C +++ b/src/frontends/xforms/FormToc.C @@ -41,7 +41,7 @@ void FormToc::build() " " + getStringFromVector(controller().getTypes(), " | ") + " "; fl_addto_choice(dialog_->choice_toc_type, choice.c_str()); - // Manage the cancel/close button + // Manage the cancel/close button bc().setCancel(dialog_->button_close); } @@ -67,7 +67,7 @@ ButtonPolicy::SMInput FormToc::input(FL_OBJECT * ob, long) if (ob != dialog_->choice_toc_type) { updateType(); } - + updateContents(); return ButtonPolicy::SMI_VALID; @@ -83,7 +83,7 @@ void FormToc::updateType() // And select the correct one string const type = toc::getType(controller().params().getCmdName()); - + fl_set_choice(dialog_->choice_toc_type, 1); for (int i = 1; i <= fl_get_choice_maxitems(dialog_->choice_toc_type); ++i) { @@ -101,14 +101,14 @@ void FormToc::updateType() void FormToc::updateContents() { char const * tmp = fl_get_choice_text(dialog_->choice_toc_type); - + if (!tmp) { fl_clear_browser(dialog_->browser_toc); fl_add_browser_line(dialog_->browser_toc, _("*** No Lists ***")); return; } - + string const type = frontStrip(strip(tmp)); Buffer::SingleList const contents = controller().getContents(type); @@ -118,12 +118,12 @@ void FormToc::updateContents() fl_add_browser_line(dialog_->browser_toc, _("*** No Lists ***")); } - + // Check if all elements are the same. if (toclist_ == contents) { return; } - + // List has changed. Update browser toclist_ = contents; @@ -135,12 +135,12 @@ void FormToc::updateContents() Buffer::SingleList::const_iterator cit = toclist_.begin(); Buffer::SingleList::const_iterator end = toclist_.end(); - + for (; cit != end; ++cit) { string const line = string(4 * cit->depth, ' ') + cit->str; fl_add_browser_line(dialog_->browser_toc, line.c_str()); } - + fl_set_browser_topline(dialog_->browser_toc, topline); fl_select_browser_line(dialog_->browser_toc, line); } diff --git a/src/frontends/xforms/FormUrl.C b/src/frontends/xforms/FormUrl.C index 994fc9591c..2769657217 100644 --- a/src/frontends/xforms/FormUrl.C +++ b/src/frontends/xforms/FormUrl.C @@ -35,7 +35,7 @@ void FormUrl::build() setPrehandler(dialog_->input_name); setPrehandler(dialog_->input_url); - // Manage the ok, apply, restore and cancel/close buttons + // Manage the ok, apply, restore and cancel/close buttons bc().setOK(dialog_->button_ok); bc().setApply(dialog_->button_apply); bc().setCancel(dialog_->button_close); diff --git a/src/frontends/xforms/FormVCLog.C b/src/frontends/xforms/FormVCLog.C index 4b69470635..6973fb057e 100644 --- a/src/frontends/xforms/FormVCLog.C +++ b/src/frontends/xforms/FormVCLog.C @@ -29,7 +29,7 @@ void FormVCLog::update() fl_clear_browser(dialog_->browser); stringstream ss; - + fl_add_browser_line(dialog_->browser, controller().getVCLogFile(ss).str().c_str()); } diff --git a/src/frontends/xforms/GUIRunTime.C b/src/frontends/xforms/GUIRunTime.C index 1e884a0f04..fb117044de 100644 --- a/src/frontends/xforms/GUIRunTime.C +++ b/src/frontends/xforms/GUIRunTime.C @@ -76,7 +76,7 @@ int GUIRunTime::initApplication(int &, char * []) } -void GUIRunTime::processEvents() +void GUIRunTime::processEvents() { if (fl_do_forms() == FL_EVENT) { XEvent ev; @@ -137,7 +137,7 @@ void GUIRunTime::initialiseGraphics() { using namespace grfx; using SigC::slot; - + #if defined(HAVE_FLIMAGE_DUP) && defined(HAVE_FLIMAGE_TO_PIXMAP) // connect the image loader based on the xforms library GImage::newImage.connect(slot(&xformsGImage::newImage)); diff --git a/src/frontends/xforms/MathsSymbols.C b/src/frontends/xforms/MathsSymbols.C index e93cefa439..ef2f07d7ac 100644 --- a/src/frontends/xforms/MathsSymbols.C +++ b/src/frontends/xforms/MathsSymbols.C @@ -9,19 +9,19 @@ #include #include - + #include XPM_H_LOCATION #ifdef __GNUG__ #pragma implementation #endif -#include "support/LAssert.h" +#include "support/LAssert.h" #include "support/lstrings.h" #include "debug.h" #include "MathsSymbols.h" #include "FormMathsPanel.h" - + using std::max; using std::endl; using std::ostream; @@ -135,12 +135,12 @@ char const * latex_misc[] = { "Re", "Im", "aleph", "wp", "hbar", "angle", "top", "bot", "Vert", "neg", "flat", "natural", "sharp", "surd", "triangle", - "diamondsuit", "heartsuit", "clubsuit", "spadesuit", - "textrm Å", "textrm Ø", "mathcircumflex", "_", + "diamondsuit", "heartsuit", "clubsuit", "spadesuit", + "textrm Å", "textrm Ø", "mathcircumflex", "_", "mathrm T", - "mathbb N", "mathbb Z", "mathbb Q", + "mathbb N", "mathbb Z", "mathbb Q", "mathbb R", "mathbb C", "mathbb H", - "mathcal F", "mathcal L", + "mathcal F", "mathcal L", "mathcal H", "mathcal O", "" }; @@ -182,7 +182,7 @@ char const * latex_ams_arrows[] = { "rightleftarrows", "rightrightarrows", "rightleftarrows", "twoheadrightarrow", "rightarrowtail", "looparrowright", "rightleftharpoons", "curvearrowright", "circlearrowright", - "Rsh", "downdownarrows", "upharpoonright", + "Rsh", "downdownarrows", "upharpoonright", "downharpoonright", "rightsquigarrow", "nleftarrow", "nrightarrow", "nLeftarrow", "nRightarrow", "nleftrightarrow", "nLeftrightarrow" @@ -212,7 +212,7 @@ char const * latex_ams_nrel[] = { "lvertneqq", "lnsim", "lnapprox", "gnapprox", "nsucc", "nsucceq", "nprec", "npreceq", "precnsim","succnsim", "succnapprox", "ncong", "precnapprox", "nsim", "nshortmid", "nshortparallel", "nparallel", "nvDash", - + "nmid", "nvdash", "nvDash","nVDash", "ntriangleright", "ntrianglerighteq", "ntriangleleft", "ntrianglelefteq", "nsubseteq", "nsupseteq", "nsupseteqq", "supsetneq", "subsetneq", "varsubsetneq", "subsetneqq", "varsupsetneq", "supsetneqq", "varsupsetneqq", @@ -251,7 +251,7 @@ static char const ** mathed_get_pixmap_from_icon(int d) default: return 0; } } - + static char const ** pixmapFromBitmapData(char const * s, int wx, int hx) { char const ** data = 0; @@ -408,11 +408,11 @@ static char const ** pixmapFromBitmapData(char const * s, int wx, int hx) return data; } - + char const ** get_pixmap_from_symbol(char const * arg, int wx, int hx) { lyx::Assert(arg); - + char const ** data = 0; latexkeys const * l = in_word_set(arg); if (!l) diff --git a/src/frontends/xforms/MathsSymbols.h b/src/frontends/xforms/MathsSymbols.h index eeb1c2212f..afdc6d6e7f 100644 --- a/src/frontends/xforms/MathsSymbols.h +++ b/src/frontends/xforms/MathsSymbols.h @@ -47,5 +47,5 @@ extern int const nr_latex_ams_ops; char const ** get_pixmap_from_symbol(char const *, int, int); - + #endif /* MATHS_SYMBOLS_H */ diff --git a/src/frontends/xforms/Menubar_pimpl.C b/src/frontends/xforms/Menubar_pimpl.C index 6e9ad42a6c..a9efd984aa 100644 --- a/src/frontends/xforms/Menubar_pimpl.C +++ b/src/frontends/xforms/Menubar_pimpl.C @@ -49,19 +49,19 @@ int const mbheight= 22; // where to place the menubar? int const yloc = (mheight - mbheight)/2; //air + bw; int const mbadd = 20; // menu button add (to width) -// Some space between buttons on the menubar +// Some space between buttons on the menubar int const air = 2; char const * menu_tabstop = "aa"; char const * default_tabstop = "aaaaaaaa"; // We do not want to mix position values in a menu (like the index of // a submenu) with the action numbers which convey actual information. // Therefore we offset all the action values by an arbitrary large -// constant. +// constant. int const action_offset = 1000; // This is used a few times below. inline -int string_width(string const & str) +int string_width(string const & str) { return fl_get_string_widthTAB(MENU_LABEL_STYLE, MENU_LABEL_SIZE, str.c_str(), @@ -79,11 +79,11 @@ extern "C" { { Menubar::Pimpl::MenuCallback(ob, button); } - + } -Menubar::Pimpl::Pimpl(LyXView * view, MenuBackend const & mb) +Menubar::Pimpl::Pimpl(LyXView * view, MenuBackend const & mb) : owner_(view), menubackend_(&mb), current_group_(0) { for (MenuBackend::const_iterator menu = menubackend_->begin(); @@ -105,14 +105,14 @@ Menubar::Pimpl::Pimpl(LyXView * view, MenuBackend const & mb) void Menubar::Pimpl::makeMenubar(Menu const & menu) { - FL_FORM * form = static_cast(owner_)->getForm(); + FL_FORM * form = static_cast(owner_)->getForm(); int moffset = 0; // Create menu frame if there is non yet. FL_OBJECT * frame = fl_add_frame(FL_UP_FRAME, 0, 0, form->w, mheight, ""); fl_set_object_resize(frame, FL_RESIZE_ALL); - fl_set_object_gravity(frame, NorthWestGravity, + fl_set_object_gravity(frame, NorthWestGravity, NorthEastGravity); Menu::const_iterator i = menu.begin(); @@ -131,14 +131,14 @@ void Menubar::Pimpl::makeMenubar(Menu const & menu) obj = fl_add_button(FL_MENU_BUTTON, air + moffset, yloc, width + mbadd, - mbheight, + mbheight, label.c_str()); fl_set_object_boxtype(obj, FL_FLAT_BOX); fl_set_object_color(obj, FL_MCOL, FL_MCOL); fl_set_object_lsize(obj, MENU_LABEL_SIZE); fl_set_object_lstyle(obj, MENU_LABEL_STYLE); fl_set_object_resize(obj, FL_RESIZE_ALL); - fl_set_object_gravity(obj, NorthWestGravity, + fl_set_object_gravity(obj, NorthWestGravity, NorthWestGravity); moffset += obj->w + air; fl_set_object_shortcut(obj, shortcut.c_str(), 1); @@ -153,9 +153,9 @@ void Menubar::Pimpl::makeMenubar(Menu const & menu) } -void Menubar::Pimpl::set(string const & menu_name) +void Menubar::Pimpl::set(string const & menu_name) { - lyxerr[Debug::GUI] << "Entering Menubar::Pimpl::set " + lyxerr[Debug::GUI] << "Entering Menubar::Pimpl::set " << "for menu `" << menu_name << "'" << endl; if (menu_name != current_menu_name_) { @@ -172,7 +172,7 @@ void Menubar::Pimpl::set(string const & menu_name) << current_group_ << endl; fl_hide_object(current_group_); } - + lyxerr[Debug::GUI] << " showing group " << mbit->second << endl; fl_show_object(mbit->second); @@ -183,7 +183,7 @@ void Menubar::Pimpl::set(string const & menu_name) } else lyxerr [Debug::GUI] << "Menubar::Pimpl::set: Nothing to do." << endl; -} +} void Menubar::Pimpl::openByName(string const & name) @@ -367,8 +367,8 @@ void Menubar::Pimpl::add_toc(int menu, string const & extra_label, string const m = floatList[cit->first]->second.name() + "%m"; fl_addtopup(menu, m.c_str(), menu_first_sub); } - - + + // Handle normal TOC cit = toc_list.find("TOC"); if (cit == end) { @@ -382,12 +382,12 @@ void Menubar::Pimpl::add_toc(int menu, string const & extra_label, } -int Menubar::Pimpl::create_submenu(Window win, LyXView * view, - string const & menu_name, - vector & smn) +int Menubar::Pimpl::create_submenu(Window win, LyXView * view, + string const & menu_name, + vector & smn) { - if (!menubackend_->hasMenu(menu_name)) { - lyxerr << "ERROR:create_submenu: Unknown menu `" + if (!menubackend_->hasMenu(menu_name)) { + lyxerr << "ERROR:create_submenu: Unknown menu `" << menu_name << "'" << endl; return -1; } @@ -397,7 +397,7 @@ int Menubar::Pimpl::create_submenu(Window win, LyXView * view, int const menu = get_new_submenu(smn, win); fl_setpup_softedge(menu, true); fl_setpup_bw(menu, -1); - lyxerr[Debug::GUI] << "Adding menu " << menu + lyxerr[Debug::GUI] << "Adding menu " << menu << " in deletion list" << endl; // Compute the size of the largest label (because xforms is @@ -416,8 +416,8 @@ int Menubar::Pimpl::create_submenu(Window win, LyXView * view, } } } - lyxerr[Debug::GUI] << "max_width=" << max_width - << ", widest_label=`" << widest_label + lyxerr[Debug::GUI] << "max_width=" << max_width + << ", widest_label=`" << widest_label << "'" << endl; // Compute where to put separators @@ -438,14 +438,14 @@ int Menubar::Pimpl::create_submenu(Window win, LyXView * view, switch (item.kind()) { case MenuItem::Command: { - FuncStatus const flag = - view->getLyXFunc()->getStatus(item.action()); + FuncStatus const flag = + view->getLyXFunc()->getStatus(item.action()); // handle optional entries. - if (item.optional() + if (item.optional() && (flag.disabled())) { - lyxerr[Debug::GUI] - << "Skipping optional item " - << item.label() << endl; + lyxerr[Debug::GUI] + << "Skipping optional item " + << item.label() << endl; break; } @@ -458,14 +458,14 @@ int Menubar::Pimpl::create_submenu(Window win, LyXView * view, if (!accel.empty()) { // Try to be clever and add just enough // tabs to align shortcuts. - do + do label += '\t'; while (string_width(label) < max_width + 5); label += accel.substr(1,accel.find(']') - 1); } label += "%x" + tostr(item.action() + action_offset) + extra_label; - + // Modify the entry using the function status string pupmode; if (flag.onoff(true)) @@ -482,21 +482,21 @@ int Menubar::Pimpl::create_submenu(Window win, LyXView * view, if (!shortcut.empty()) { shortcut += lowercase(shortcut[0]); label += "%h"; - fl_addtopup(menu, label.c_str(), + fl_addtopup(menu, label.c_str(), shortcut.c_str()); } else fl_addtopup(menu, label.c_str()); - - lyxerr[Debug::GUI] << "Command: \"" + + lyxerr[Debug::GUI] << "Command: \"" << lyxaction.getActionName(item.action()) << "\", binding \"" << accel - << "\", shortcut \"" << shortcut + << "\", shortcut \"" << shortcut << "\"" << endl; break; } case MenuItem::Submenu: { - int submenu = create_submenu(win, view, + int submenu = create_submenu(win, view, item.submenu(), smn); if (submenu == -1) return -1; @@ -523,8 +523,8 @@ int Menubar::Pimpl::create_submenu(Window win, LyXView * view, add_toc(menu, extra_label, smn, win); break; - case MenuItem::Documents: - case MenuItem::Lastfiles: + case MenuItem::Documents: + case MenuItem::Lastfiles: case MenuItem::ViewFormats: case MenuItem::UpdateFormats: case MenuItem::ExportFormats: @@ -544,10 +544,10 @@ int Menubar::Pimpl::create_submenu(Window win, LyXView * view, void Menubar::Pimpl::MenuCallback(FL_OBJECT * ob, long button) { ItemInfo * iteminfo = static_cast(ob->u_vdata); -// lyxerr << "MenuCallback: ItemInfo address=" << iteminfo -// << "Val=(pimpl_=" << iteminfo->pimpl_ -// << ", item_=" << iteminfo->item_ -// << ", obj_=" << iteminfo->obj_ << ")" <pimpl_ +// << ", item_=" << iteminfo->item_ +// << ", obj_=" << iteminfo->obj_ << ")" <pimpl_->owner_; MenuItem const * item = iteminfo->item_.get(); @@ -561,19 +561,19 @@ void Menubar::Pimpl::MenuCallback(FL_OBJECT * ob, long button) // Paranoia check lyx::Assert(item->kind() == MenuItem::Submenu); - + // set tabstop length fl_set_tabstop(menu_tabstop); vector submenus; int menu = iteminfo->pimpl_-> - create_submenu(FL_ObjWin(ob), view, + create_submenu(FL_ObjWin(ob), view, item->submenu(), submenus); if (menu != -1) { // place popup fl_setpup_position(static_cast(view)->getForm()->x + ob->x, - static_cast(view)->getForm()->y + ob->y + ob->h + 10); + static_cast(view)->getForm()->y + ob->y + ob->h + 10); int choice = fl_dopup(menu); - + if (button == 1) { // set the pseudo menu-button back fl_set_object_boxtype(ob, FL_FLAT_BOX); @@ -592,7 +592,7 @@ void Menubar::Pimpl::MenuCallback(FL_OBJECT * ob, long button) } else { lyxerr << "Error in MenuCallback" << endl; } - + for_each(submenus.begin(), submenus.end(), fl_freepup); // restore tabstop length fl_set_tabstop(default_tabstop); diff --git a/src/frontends/xforms/Menubar_pimpl.h b/src/frontends/xforms/Menubar_pimpl.h index cac54fda23..ae522dfbdf 100644 --- a/src/frontends/xforms/Menubar_pimpl.h +++ b/src/frontends/xforms/Menubar_pimpl.h @@ -29,7 +29,7 @@ class LyXView; /** The LyX GUI independent menubar class - The GUI interface is implemented in the corresponding Menubar_pimpl class. + The GUI interface is implemented in the corresponding Menubar_pimpl class. */ struct Menubar::Pimpl { public: @@ -51,25 +51,25 @@ public: std::vector & smn, Window win); /// int create_submenu(Window win, LyXView * view, - string const & menuname, - std::vector & smn); + string const & menuname, + std::vector & smn); - /// update the state of the menuitems - void update() {} + /// update the state of the menuitems + void update() {} private: // void makeMenubar(Menu const &menu); - /// + /// LyXView * owner_; /// MenuBackend const * menubackend_; /// struct ItemInfo { /// - ItemInfo(Menubar::Pimpl * p, MenuItem const * i, + ItemInfo(Menubar::Pimpl * p, MenuItem const * i, FL_OBJECT * o) - + : pimpl_(p), obj_(o) { item_.reset(i); } /// Menubar::Pimpl * pimpl_; diff --git a/src/frontends/xforms/RadioButtonGroup.C b/src/frontends/xforms/RadioButtonGroup.C index c6a7e71530..4e0868db7d 100644 --- a/src/frontends/xforms/RadioButtonGroup.C +++ b/src/frontends/xforms/RadioButtonGroup.C @@ -8,11 +8,11 @@ * \author Baruch Even, baruch.even@writeme.com */ -#include +#include #ifdef __GNUG__ #pragma implementation -#endif +#endif #include "RadioButtonGroup.h" @@ -77,7 +77,7 @@ void RadioButtonGroup::setButton(int value) find_if(map.begin(), map.end(), lyx::equal_2nd_in_pair(value)); #endif - + // If we found nothing, report it and return if (it == map.end()) { lyxerr << "BUG: Requested value in RadioButtonGroup doesn't exists" @@ -116,4 +116,3 @@ int RadioButtonGroup::getButton() // Else return 0. return 0; } - diff --git a/src/frontends/xforms/RadioButtonGroup.h b/src/frontends/xforms/RadioButtonGroup.h index a24f008ea5..533035be1f 100644 --- a/src/frontends/xforms/RadioButtonGroup.h +++ b/src/frontends/xforms/RadioButtonGroup.h @@ -19,7 +19,7 @@ #ifdef __GNUG__ #pragma interface -#endif +#endif /** This class simplifies the work with a group of radio buttons, @@ -52,4 +52,4 @@ private: ButtonValueMap map; }; -#endif +#endif diff --git a/src/frontends/xforms/Timeout_pimpl.C b/src/frontends/xforms/Timeout_pimpl.C index 6ea6bb3331..d663bdc794 100644 --- a/src/frontends/xforms/Timeout_pimpl.C +++ b/src/frontends/xforms/Timeout_pimpl.C @@ -23,7 +23,7 @@ using std::endl; namespace { extern "C" { - + static void C_intern_timeout_cb(int, void * data) { diff --git a/src/frontends/xforms/Toolbar_pimpl.C b/src/frontends/xforms/Toolbar_pimpl.C index fe790b609f..b4c7c523eb 100644 --- a/src/frontends/xforms/Toolbar_pimpl.C +++ b/src/frontends/xforms/Toolbar_pimpl.C @@ -25,13 +25,13 @@ #include "buffer.h" #include "lyxtextclasslist.h" #include "LyXAction.h" -#include "MathsSymbols.h" +#include "MathsSymbols.h" #include "gettext.h" #include "Tooltips.h" #include "support/LAssert.h" #include "support/filetools.h" -#include "support/lstrings.h" +#include "support/lstrings.h" using std::endl; @@ -66,7 +66,7 @@ void Toolbar::Pimpl::toolbarItem::clean() } -Toolbar::Pimpl::toolbarItem & +Toolbar::Pimpl::toolbarItem & Toolbar::Pimpl::toolbarItem::operator=(toolbarItem const & ti) { // Are we assigning the object onto itself? @@ -75,11 +75,11 @@ Toolbar::Pimpl::toolbarItem::operator=(toolbarItem const & ti) // If we already have an icon, release it. clean(); - + // do we have to check icon too? action = ti.action; icon = 0; // locally we need to get the icon anew - + return *this; } @@ -175,7 +175,7 @@ void Toolbar::Pimpl::layoutSelected() string const & layoutguiname = combox->getline(); LyXTextClass const & tc = textclasslist[owner->buffer()->params.textclass]; - + LyXTextClass::const_iterator end = tc.end(); for (LyXTextClass::const_iterator cit = tc.begin(); cit != end; ++cit) { @@ -187,7 +187,7 @@ void Toolbar::Pimpl::layoutSelected() lyxerr << "ERROR (Toolbar::Pimpl::layoutSelected): layout not found!" << endl; } - + void Toolbar::Pimpl::setLayout(string const & layout) { @@ -243,19 +243,19 @@ namespace { void ToolbarCB(FL_OBJECT * ob, long ac) { XFormsView * owner = static_cast(ob->u_vdata); - + owner->getLyXFunc()->verboseDispatch(int(ac), true); } extern "C" { - + static void C_Toolbar_ToolbarCB(FL_OBJECT * ob, long data) { ToolbarCB(ob, data); } - + } @@ -268,13 +268,13 @@ void setPixmap(FL_OBJECT * obj, int action, int buttonwidth, int height) string const name = lyxaction.getActionName(act); if (!arg.empty()) xpm_name = subst(name + ' ' + arg, ' ','_'); - else + else xpm_name = name; string fullname = LibFileSearch("images", xpm_name, "xpm"); if (!fullname.empty()) { - lyxerr[Debug::GUI] << "Full icon name is `" + lyxerr[Debug::GUI] << "Full icon name is `" << fullname << "'" << endl; fl_set_pixmapbutton_file(obj, fullname.c_str()); return; @@ -292,11 +292,11 @@ void setPixmap(FL_OBJECT * obj, int action, int buttonwidth, int height) return; } } - + lyxerr << "Unable to find icon `" << xpm_name << "'" << endl; fullname = LibFileSearch("images", "unknown", "xpm"); if (!fullname.empty()) { - lyxerr[Debug::GUI] << "Using default `unknown' icon" + lyxerr[Debug::GUI] << "Using default `unknown' icon" << endl; fl_set_pixmapbutton_file(obj, fullname.c_str()); } @@ -309,9 +309,9 @@ void Toolbar::Pimpl::set(bool doingmain) { // we shouldn't set if we have not cleaned if (!cleaned) return; - + FL_OBJECT * obj; - + if (!doingmain) { fl_freeze_form(owner->getForm()); fl_addto_form(owner->getForm()); @@ -339,7 +339,7 @@ void Toolbar::Pimpl::set(bool doingmain) break; default: xpos += standardspacing; - item->icon = obj = + item->icon = obj = fl_add_pixmapbutton(FL_NORMAL_BUTTON, xpos, ypos, buttonwidth, @@ -356,7 +356,7 @@ void Toolbar::Pimpl::set(bool doingmain) // initialise the tooltip string const tip = _(lyxaction.helpText(obj->argument)); tooltip_->init(obj, tip); - + // The view that this object belongs to. obj->u_vdata = owner; @@ -395,11 +395,11 @@ void Toolbar::Pimpl::add(int action, bool doclean) if (!doclean && owner) { // first "hide" the toolbar buttons. This is not a real hide // actually it deletes and frees the button altogether. - lyxerr << "Toolbar::add: \"hide\" the toolbar buttons." + lyxerr << "Toolbar::add: \"hide\" the toolbar buttons." << endl; lightReset(); - + fl_freeze_form(owner->getForm()); ToolbarList::iterator p = toollist.begin(); @@ -415,7 +415,7 @@ void Toolbar::Pimpl::add(int action, bool doclean) fl_unfreeze_form(owner->getForm()); cleaned = true; // this is not completely true, but OK anyway } - + // there exist some special actions not part of // kb_action: SEPARATOR, LAYOUTS @@ -454,7 +454,7 @@ void Toolbar::Pimpl::push(int nth) { lyxerr[Debug::GUI] << "Toolbar::push: trying to trigger no `" << nth << '\'' << endl; - + if (nth <= 0 || nth >= int(toollist.size())) { // item nth not found... return; @@ -464,7 +464,7 @@ void Toolbar::Pimpl::push(int nth) } -void Toolbar::Pimpl::reset() +void Toolbar::Pimpl::reset() { //toollist = 0; // what is this supposed to do? cleaned = false; diff --git a/src/frontends/xforms/Toolbar_pimpl.h b/src/frontends/xforms/Toolbar_pimpl.h index b579723fee..8209d4f923 100644 --- a/src/frontends/xforms/Toolbar_pimpl.h +++ b/src/frontends/xforms/Toolbar_pimpl.h @@ -37,7 +37,7 @@ public: Pimpl(LyXView * o, int x, int y); /// ~Pimpl(); - + /// (re)sets the toolbar void set(bool doingmain = false); @@ -46,13 +46,13 @@ public: */ void edit(); /// add a new button to the toolbar. - void add(int, bool doclean = true); + void add(int, bool doclean = true); /// invokes the n'th icon in the toolbar void push(int); /// activates the toolbar - void activate(); + void activate(); /// deactivates the toolbar - void deactivate(); + void deactivate(); /// update the state of the icons void update(); @@ -65,7 +65,7 @@ public: /// Erase the layout list void clearLayoutList(); /// the non-static version of layoutSelectedCB - void layoutSelected(); + void layoutSelected(); /// struct toolbarItem diff --git a/src/frontends/xforms/Tooltips.C b/src/frontends/xforms/Tooltips.C index fb1283163f..4e004ffc3e 100644 --- a/src/frontends/xforms/Tooltips.C +++ b/src/frontends/xforms/Tooltips.C @@ -95,7 +95,7 @@ namespace { int TooltipHandler(FL_OBJECT *ob, int event); void TooltipTimerCB(FL_OBJECT * timer, long data); - + } extern "C" { @@ -113,7 +113,7 @@ static void C_TooltipTimerCB(FL_OBJECT * ob, long data) } } - + Tooltips::Tooltips() : tooltip_timer_(0) @@ -174,7 +174,7 @@ void Tooltips::init(FL_OBJECT * ob, string const & tip) } -string const Tooltips::get(FL_OBJECT * ob) const +string const Tooltips::get(FL_OBJECT * ob) const { TooltipsMap::const_iterator it = tooltipsMap.find(ob); if (it == tooltipsMap.end()) diff --git a/src/frontends/xforms/bmtable.h b/src/frontends/xforms/bmtable.h index 5efd29bc24..14e098020f 100644 --- a/src/frontends/xforms/bmtable.h +++ b/src/frontends/xforms/bmtable.h @@ -7,12 +7,12 @@ * \author Alejandro Aguilar Sierra */ -/* A bitmap table uses a single bitmap to simulate a 2d array +/* A bitmap table uses a single bitmap to simulate a 2d array * of bitmap buttons. It can be used to build bitmap menus. */ #ifndef BMTABLE_H -#define BMTABLE_H +#define BMTABLE_H #ifdef __GNUG__ #pragma interface @@ -43,10 +43,10 @@ extern "C" /**/ -FL_OBJECT *fl_create_bmtable(int, FL_Coord, FL_Coord, +FL_OBJECT *fl_create_bmtable(int, FL_Coord, FL_Coord, FL_Coord, FL_Coord, char const *); /**/ -FL_OBJECT *fl_add_bmtable(int, FL_Coord, FL_Coord, +FL_OBJECT *fl_add_bmtable(int, FL_Coord, FL_Coord, FL_Coord, FL_Coord, char const *); /** Same as fl_get_button_numb() */ @@ -69,21 +69,21 @@ void fl_set_bmtable_adjust(FL_OBJECT *, int ox, int oy, int dx, int dy); /** The number of items is by default nc x nr, but you can change it */ void fl_set_bmtable_maxitems(FL_OBJECT *, int); /**/ -int fl_get_bmtable_maxitems(FL_OBJECT *); +int fl_get_bmtable_maxitems(FL_OBJECT *); /** Returns the index of the selected item or -1 if none was selected */ int fl_get_bmtable(FL_OBJECT *); /** Replace an item's sub_bitmap at id position */ -void fl_replace_bmtable_item(FL_OBJECT *ob, int id, int cw, int ch, char *data); +void fl_replace_bmtable_item(FL_OBJECT *ob, int id, int cw, int ch, char *data); -/** Get the sub_bitmap from id position. You must alloc memory for the data. */ +/** Get the sub_bitmap from id position. You must alloc memory for the data. */ void fl_get_bmtable_item(FL_OBJECT *ob, int id, int *cw, int *ch, char *data); /** Returns a pixmap from the table, if available. */ Pixmap fl_get_bmtable_pixmap(FL_OBJECT *); -/** Draws a single item on a drawable */ +/** Draws a single item on a drawable */ void fl_draw_bmtable_item(FL_OBJECT *ob, int i, Drawable d, int xx, int yy); /** Free the current bitmap in preparation for installing a new one */ @@ -97,4 +97,3 @@ void fl_free_bmtable_pixmap(FL_OBJECT *ob); #endif #endif /* BMTABLE_H */ - diff --git a/src/frontends/xforms/combox.C b/src/frontends/xforms/combox.C index 2fa57fd7ac..d181c92061 100644 --- a/src/frontends/xforms/combox.C +++ b/src/frontends/xforms/combox.C @@ -8,27 +8,27 @@ */ /* A combination of two objects (a button and a browser) is encapsulated to - * get a combobox-like object. All XForms functions are hidden. - * - */ + * get a combobox-like object. All XForms functions are hidden. + * + */ /* Change log: - * - * 2/06/1996, Alejandro Aguilar Sierra + * + * 2/06/1996, Alejandro Aguilar Sierra * Created and tested. - * - * 4/06/1996, Alejandro Aguilar Sierra + * + * 4/06/1996, Alejandro Aguilar Sierra * Added droplist mode (a button with a black down arrow at right) * and support for middle and right buttons, as XForms choice object. * * 6/06/1996, Lars Gullik Bjønnes * Added a combox with an input object. and a pre and a post handle. - * - * 22/07/96, Alejandro Aguilar Sierra + * + * 22/07/96, Alejandro Aguilar Sierra * Assigned to the browser its own popup window. No more need of * external pre and post handlers to simulate the wanted behaviour. - * - */ + * + */ #include @@ -46,19 +46,19 @@ using std::endl; // These are C wrappers around static members of Combox, used as // callbacks for xforms. extern "C" { - + static void C_Combox_input_cb(FL_OBJECT * ob, long data) { Combox::input_cb(ob, data); } - + static - void C_Combox_combo_cb(FL_OBJECT * ob, long data) + void C_Combox_combo_cb(FL_OBJECT * ob, long data) { Combox::combo_cb(ob, data); } - + static int C_Combox_peek_event(FL_FORM * form, void *xev) { @@ -90,7 +90,7 @@ Combox::~Combox() void Combox::clear() { - if (browser) fl_clear_browser(browser); + if (browser) fl_clear_browser(browser); sel = 0; if (type == FL_COMBOX_INPUT) fl_set_input(label, ""); @@ -105,15 +105,15 @@ void Combox::remove() lyxerr[Debug::GUI] << "Button: " << button << endl; if (button) { fl_delete_object(button); - fl_free_object(button); + fl_free_object(button); } - + lyxerr[Debug::GUI] << "Label: " << label << endl; if (label && label != button) { fl_delete_object(label); - fl_free_object(label); + fl_free_object(label); } - + lyxerr[Debug::GUI] << "Form: " << form << endl; lyxerr[Debug::GUI] << "Browser: " << browser << endl; if (form && browser) { @@ -121,8 +121,8 @@ void Combox::remove() fl_free_object(browser); fl_free_form(form); } - button = 0; - browser = 0; + button = 0; + browser = 0; label = 0; form = 0; sel = 0; @@ -134,14 +134,14 @@ void Combox::addline(string const & text) { if (!browser) return; fl_add_browser_line(browser, text.c_str()); - + // By default the first item is selected if (!sel) { sel = 1; if (type == FL_COMBOX_INPUT) fl_set_input(label, text.c_str()); else - fl_set_object_label(label, text.c_str()); + fl_set_object_label(label, text.c_str()); } is_empty = false; } @@ -151,7 +151,7 @@ bool Combox::select(string const & t) { if (!browser || t.empty()) return false; int const maxline = fl_get_browser_maxline(browser); - + for (int i = 1; i <= maxline; ++i) { if (t == fl_get_browser_line(browser, i)) { select(i); @@ -165,14 +165,14 @@ bool Combox::select(string const & t) void Combox::select(int i) { if (!browser || !button) return; - if (i > 0 && i <= fl_get_browser_maxline(browser)) sel = i; + if (i > 0 && i <= fl_get_browser_maxline(browser)) sel = i; fl_deactivate_object(button); - + if (type == FL_COMBOX_INPUT) fl_set_input(label, fl_get_browser_line(browser, sel)); else - fl_set_object_label(label, fl_get_browser_line(browser, sel)); - fl_activate_object(button); + fl_set_object_label(label, fl_get_browser_line(browser, sel)); + fl_activate_object(button); } @@ -184,7 +184,7 @@ void Combox::add(int x, int y, int w, int hmin, int hmax, tabfolder2 = tabfolder2_; FL_OBJECT * obj; - + switch (type) { case FL_COMBOX_DROPLIST: { @@ -193,7 +193,7 @@ void Combox::add(int x, int y, int w, int hmin, int hmax, fl_set_object_color(obj, FL_MCOL, FL_MCOL); fl_set_object_dblbuffer(obj, 1); fl_set_object_callback(obj, C_Combox_combo_cb, 0); - label = obj = fl_add_button(FL_NORMAL_TEXT, x, y, w-22, hmin, ""); + label = obj = fl_add_button(FL_NORMAL_TEXT, x, y, w-22, hmin, ""); fl_set_object_boxtype(obj, FL_DOWN_BOX); fl_set_object_color(obj, FL_MCOL, FL_BLACK); fl_set_object_lalign(obj, FL_ALIGN_CENTER|FL_ALIGN_INSIDE); @@ -249,7 +249,7 @@ void Combox::add(int x, int y, int w, int hmin, int hmax, fl_end_form(); browser->u_vdata = this; form->u_vdata = browser; - fl_register_raw_callback(form, + fl_register_raw_callback(form, ButtonPressMask|KeyPressMask, C_Combox_peek_event); @@ -271,16 +271,16 @@ void Combox::redraw() if (button) fl_redraw_object(button); if (label) fl_redraw_object(label); } - + void Combox::show() { if (_pre) _pre(); - + int tmp; XGetInputFocus(fl_get_display(), &save_window, &tmp); //BUG-Fix Dietmar XFlush(fl_get_display()); if (button && type != FL_COMBOX_NORMAL) { - fl_set_object_label(button, "@2<-"); + fl_set_object_label(button, "@2<-"); fl_redraw_object(button); } @@ -308,7 +308,7 @@ void Combox::show() x += tabfolder1->form->x; y += tabfolder1->form->y; } - + } else { x += label->form->x; y += label->form->y; @@ -316,7 +316,7 @@ void Combox::show() fl_set_form_position(form, x, y); fl_show_form(form, FL_PLACE_POSITION, FL_NOBORDER, ""); - if (sel > 0) { + if (sel > 0) { fl_set_browser_topline(browser, sel); fl_select_browser_line(browser, sel); } @@ -328,34 +328,34 @@ void Combox::show() } void Combox::hide(int who) -{ +{ if (!who && browser && label) { sel = fl_get_browser(browser); - + if (type == FL_COMBOX_INPUT) fl_set_input(label, fl_get_browser_line(browser, sel)); else fl_set_object_label(label, - fl_get_browser_line(browser, sel)); + fl_get_browser_line(browser, sel)); // if (callback) callback(sel, cb_arg); } - XUngrabPointer(fl_get_display(), 0); + XUngrabPointer(fl_get_display(), 0); XFlush(fl_get_display()); - if (form) { + if (form) { fl_hide_form(form); XSetInputFocus(fl_get_display(), save_window, RevertToParent, CurrentTime); // BUG-FIX-Dietmar XFlush(fl_get_display()); - } + } if (button) { - if (type != FL_COMBOX_NORMAL) { + if (type != FL_COMBOX_NORMAL) { fl_set_object_label(button, "@2->"); fl_redraw_object(button); } - } + } if (!who && browser && label && callback) callback(sel, cb_arg, this); - if (_post) _post(); + if (_post) _post(); } @@ -405,20 +405,20 @@ void Combox::combo_cb(FL_OBJECT * ob, long data) Combox * combo = static_cast(ob->u_vdata); switch (data) { case 0: - { + { int const i = combo->get(); switch (fl_get_button_numb(ob)) { - case 2: + case 2: { - combo->select(i - 1); + combo->select(i - 1); if (combo->callback) combo->callback(combo->sel, combo->cb_arg, combo); break; } - case 3: + case 3: { - combo->select(i + 1); + combo->select(i + 1); if (combo->callback) combo->callback(combo->sel, combo->cb_arg, combo); @@ -439,22 +439,22 @@ int Combox::peek_event(FL_FORM * form, void * xev) { FL_OBJECT * ob = static_cast(form->u_vdata); Combox * combo = static_cast(ob->u_vdata); - - // below mouse does not work like we need it + + // below mouse does not work like we need it if (static_cast(xev)->type == ButtonPress && ( static_cast(xev)->xbutton.x - ob->x < 0 || static_cast(xev)->xbutton.x - ob->x > ob->w || static_cast(xev)->xbutton.y - ob->y < 0 || static_cast(xev)->xbutton.y - ob->y > ob->h)) { - combo->hide(1); + combo->hide(1); return 1; } - + if (static_cast(xev)->type != KeyPress) return 0; - + char s_r[10]; s_r[9] = '\0'; KeySym keysym_return; - XLookupString(&static_cast(xev)->xkey, s_r, 10, + XLookupString(&static_cast(xev)->xkey, s_r, 10, &keysym_return, 0); XFlush(fl_get_display()); switch (keysym_return) { @@ -463,7 +463,7 @@ int Combox::peek_event(FL_FORM * form, void * xev) fl_get_browser_maxline(combo->browser)) fl_select_browser_line(combo->browser, fl_get_browser(combo->browser)+1); - if (fl_get_browser(combo->browser)>= + if (fl_get_browser(combo->browser)>= fl_get_browser_topline(combo->browser) + fl_get_browser_screenlines(combo->browser)) fl_set_browser_topline(combo->browser, @@ -473,12 +473,12 @@ int Combox::peek_event(FL_FORM * form, void * xev) fl_get_browser_topline(combo->browser)) fl_set_browser_topline(combo->browser, fl_get_browser(combo->browser)); - return 1; + return 1; case XK_Up: if (fl_get_browser(combo->browser) > 1) fl_select_browser_line(combo->browser, fl_get_browser(combo->browser)-1); - if (fl_get_browser(combo->browser)>= + if (fl_get_browser(combo->browser)>= fl_get_browser_topline(combo->browser) + fl_get_browser_screenlines(combo->browser)) fl_set_browser_topline(combo->browser, @@ -496,7 +496,7 @@ int Combox::peek_event(FL_FORM * form, void * xev) combo->hide(1); return 1; } - return 0; + return 0; } @@ -512,17 +512,17 @@ typedef struct { Combox combo(FL_COMBOX_INPUT); FD_test *fd_test; - + FD_test *create_form_test(void) { FL_OBJECT *obj; FD_test *fdui = (FD_test *) fl_calloc(1, sizeof(*fdui)); - + fdui->test = fl_bgn_form(FL_NO_BOX, 320, 190); obj = fl_add_box(FL_UP_BOX, 0, 0, 320, 190, ""); obj = fl_add_box(FL_DOWN_BOX, 10, 50, 300, 110, ""); obj = fl_add_button(FL_NORMAL_BUTTON, 250, 10, 50, 30, _("Done")); - combo.add(10, 15, 120, 25, 135); + combo.add(10, 15, 120, 25, 135); fl_end_form(); return fdui; @@ -536,8 +536,8 @@ void combo_cb(int i) int main(int argc, char *argv[]) { //int n1; - - // Same defaults as in lyx + + // Same defaults as in lyx FL_IOPT cntl; cntl.buttonFontSize = FL_NORMAL_SIZE; cntl.browserFontSize = FL_NORMAL_SIZE; @@ -545,14 +545,14 @@ int main(int argc, char *argv[]) cntl.choiceFontSize = FL_NORMAL_SIZE; cntl.inputFontSize = FL_NORMAL_SIZE; cntl.borderWidth = -2; - fl_set_defaults(FL_PDButtonFontSize, &cntl); - fl_set_defaults(FL_PDBrowserFontSize, &cntl); - fl_set_defaults(FL_PDLabelFontSize, &cntl); - fl_set_defaults(FL_PDChoiceFontSize, &cntl); - fl_set_defaults(FL_PDInputFontSize, &cntl); + fl_set_defaults(FL_PDButtonFontSize, &cntl); + fl_set_defaults(FL_PDBrowserFontSize, &cntl); + fl_set_defaults(FL_PDLabelFontSize, &cntl); + fl_set_defaults(FL_PDChoiceFontSize, &cntl); + fl_set_defaults(FL_PDInputFontSize, &cntl); fl_set_defaults(FL_PDBorderWidth, &cntl); fl_initialize(&argc, argv, 0, 0, 0); - + fd_test = create_form_test(); /* fill-in form initialization code */ @@ -569,7 +569,7 @@ int main(int argc, char *argv[]) combo.addline("Verbatim"); combo.setcallback(combo_cb); // combo.select(4); - + /* show the first form */ fl_show_form(fd_test->test, FL_PLACE_CENTER, FL_FULLBORDER, "test"); fl_do_forms(); diff --git a/src/frontends/xforms/combox.h b/src/frontends/xforms/combox.h index 8e322cda50..eed93b0fef 100644 --- a/src/frontends/xforms/combox.h +++ b/src/frontends/xforms/combox.h @@ -12,14 +12,14 @@ * get a combobox-like object. All XForms functions are hidden. * * Change log: - * - * 2/06/1996, Alejandro Aguilar Sierra + * + * 2/06/1996, Alejandro Aguilar Sierra * Created and tested. - * - * 4/06/1996, Alejandro Aguilar Sierra + * + * 4/06/1996, Alejandro Aguilar Sierra * Added droplist mode (a button with a black down arrow at right) * and support for middle and right buttons, as XForms choice object. - */ + */ #ifndef COMBOX_H #define COMBOX_H @@ -68,44 +68,44 @@ public: */ void add(int x, int y, int w, int hmin, int hmax, FL_OBJECT * tabfolder1_ = 0, FL_OBJECT * tabfolder2_ = 0); - + /// Add lines. Same as for fl_browser object void addline(string const &); /// Add lines. Same as for fl_browser object void addto(string const &); - + /// Returns the selected item int get() const; - + /// Returns a pointer to the selected line of text string const getline() const; - + /// Select an arbitrary item void select(int); /// - bool select(string const &); - + bool select(string const &); + /// Clear all the list void clear(); /// Is the combox cleared (empty) bool empty() const { return is_empty; } - - /// Remove the objects from the form they are in. + + /// Remove the objects from the form they are in. void remove(); - /** + /** * Assign a callback to this object. The callback should be a void - * function with a int, a void pointer, and a Combox pointer as + * function with a int, a void pointer, and a Combox pointer as * parameters. */ void setcallback(FL_COMBO_CB, void *); - - /// Pre handler + + /// Pre handler void setpre(FL_COMBO_PRE_POST); /// Post handler void setpost(FL_COMBO_PRE_POST); - + /// XForms attributes void resize(unsigned); /// @@ -115,7 +115,7 @@ public: /// void deactivate(); /// - void shortcut(string const &, int); + void shortcut(string const &, int); /// void redraw(); /// @@ -125,9 +125,9 @@ public: /// static void input_cb(FL_OBJECT *, long); /// - static int peek_event(FL_FORM *, void *); + static int peek_event(FL_FORM *, void *); protected: - /// At least Hide should not be public + /// At least Hide should not be public void hide(int who = 0); /// FL_OBJECT * browser; @@ -135,7 +135,7 @@ public: /// combox_type type; /// - int bw; + int bw; /// int bh; /// @@ -155,7 +155,7 @@ public: /// FL_OBJECT * label; /// - FL_FORM* form; + FL_FORM* form; /// FL_OBJECT * tabfolder1; /// @@ -164,7 +164,7 @@ public: -//----------------- Inline methods --------------------------- +//----------------- Inline methods --------------------------- inline void Combox::addto(string const & text) @@ -180,7 +180,7 @@ inline void Combox::resize(unsigned r) { fl_set_object_resize(button, r); - if (label!= button) fl_set_object_resize(label, r); + if (label!= button) fl_set_object_resize(label, r); } @@ -188,7 +188,7 @@ inline void Combox::gravity(unsigned g1, unsigned g2) { fl_set_object_gravity(button, g1, g2); - if (label!= button) fl_set_object_gravity(label, g1, g2); + if (label!= button) fl_set_object_gravity(label, g1, g2); } @@ -232,7 +232,7 @@ int Combox::get() const inline string const Combox::getline() const { - if (type == FL_COMBOX_INPUT) + if (type == FL_COMBOX_INPUT) return fl_get_input(label); else return (browser && sel > 0) ? diff --git a/src/frontends/xforms/form_aboutlyx.C b/src/frontends/xforms/form_aboutlyx.C index 59f7b17f48..8ca063a8a3 100644 --- a/src/frontends/xforms/form_aboutlyx.C +++ b/src/frontends/xforms/form_aboutlyx.C @@ -126,4 +126,3 @@ FD_form_tab_license * FormAboutlyx::build_tab_license() return fdui; } /*---------------------------------------*/ - diff --git a/src/frontends/xforms/form_bibitem.C b/src/frontends/xforms/form_bibitem.C index e656e0d58f..5c247ea0f5 100644 --- a/src/frontends/xforms/form_bibitem.C +++ b/src/frontends/xforms/form_bibitem.C @@ -56,4 +56,3 @@ FD_form_bibitem * FormBibitem::build_bibitem() return fdui; } /*---------------------------------------*/ - diff --git a/src/frontends/xforms/form_bibtex.C b/src/frontends/xforms/form_bibtex.C index 0ec2c8fcc9..af26aaa2e9 100644 --- a/src/frontends/xforms/form_bibtex.C +++ b/src/frontends/xforms/form_bibtex.C @@ -74,4 +74,3 @@ FD_form_bibtex * FormBibtex::build_bibtex() return fdui; } /*---------------------------------------*/ - diff --git a/src/frontends/xforms/form_browser.C b/src/frontends/xforms/form_browser.C index 1461173f75..d5a54c0177 100644 --- a/src/frontends/xforms/form_browser.C +++ b/src/frontends/xforms/form_browser.C @@ -50,4 +50,3 @@ FD_form_browser * FormBrowser::build_browser() return fdui; } /*---------------------------------------*/ - diff --git a/src/frontends/xforms/form_character.C b/src/frontends/xforms/form_character.C index 73158cb025..3fc9a52ef7 100644 --- a/src/frontends/xforms/form_character.C +++ b/src/frontends/xforms/form_character.C @@ -135,4 +135,3 @@ FD_form_character * FormCharacter::build_character() return fdui; } /*---------------------------------------*/ - diff --git a/src/frontends/xforms/form_citation.C b/src/frontends/xforms/form_citation.C index 8194a2d5f5..aa51bf9823 100644 --- a/src/frontends/xforms/form_citation.C +++ b/src/frontends/xforms/form_citation.C @@ -197,4 +197,3 @@ FD_form_citation * FormCitation::build_citation() return fdui; } /*---------------------------------------*/ - diff --git a/src/frontends/xforms/form_document.C b/src/frontends/xforms/form_document.C index e9558e9266..c0691dcec3 100644 --- a/src/frontends/xforms/form_document.C +++ b/src/frontends/xforms/form_document.C @@ -685,4 +685,3 @@ FD_form_doc_bullet * FormDocument::build_doc_bullet() return fdui; } /*---------------------------------------*/ - diff --git a/src/frontends/xforms/form_error.C b/src/frontends/xforms/form_error.C index 920c1e95f4..975d5fb780 100644 --- a/src/frontends/xforms/form_error.C +++ b/src/frontends/xforms/form_error.C @@ -42,4 +42,3 @@ FD_form_error * FormError::build_error() return fdui; } /*---------------------------------------*/ - diff --git a/src/frontends/xforms/form_ert.C b/src/frontends/xforms/form_ert.C index e87777883d..ede3e138d6 100644 --- a/src/frontends/xforms/form_ert.C +++ b/src/frontends/xforms/form_ert.C @@ -79,4 +79,3 @@ FD_form_ert * FormERT::build_ert() return fdui; } /*---------------------------------------*/ - diff --git a/src/frontends/xforms/form_external.C b/src/frontends/xforms/form_external.C index 02c8188421..09a0cda407 100644 --- a/src/frontends/xforms/form_external.C +++ b/src/frontends/xforms/form_external.C @@ -113,4 +113,3 @@ FD_form_external * FormExternal::build_external() return fdui; } /*---------------------------------------*/ - diff --git a/src/frontends/xforms/form_filedialog.C b/src/frontends/xforms/form_filedialog.C index 5ddce85089..0422af09d3 100644 --- a/src/frontends/xforms/form_filedialog.C +++ b/src/frontends/xforms/form_filedialog.C @@ -105,4 +105,3 @@ FD_form_filedialog * FileDialog::Private::build_filedialog() return fdui; } /*---------------------------------------*/ - diff --git a/src/frontends/xforms/form_float.C b/src/frontends/xforms/form_float.C index ea277eb3a4..77645b946c 100644 --- a/src/frontends/xforms/form_float.C +++ b/src/frontends/xforms/form_float.C @@ -95,4 +95,3 @@ FD_form_float * FormFloat::build_float() return fdui; } /*---------------------------------------*/ - diff --git a/src/frontends/xforms/form_forks.C b/src/frontends/xforms/form_forks.C index d7768c9b34..bafc1ff169 100644 --- a/src/frontends/xforms/form_forks.C +++ b/src/frontends/xforms/form_forks.C @@ -77,4 +77,3 @@ FD_form_forks * FormForks::build_forks() return fdui; } /*---------------------------------------*/ - diff --git a/src/frontends/xforms/form_graphics.C b/src/frontends/xforms/form_graphics.C index 61dcd9ca66..d01de6730d 100644 --- a/src/frontends/xforms/form_graphics.C +++ b/src/frontends/xforms/form_graphics.C @@ -523,4 +523,3 @@ FD_form_lyxview * FormGraphics::build_lyxview() return fdui; } /*---------------------------------------*/ - diff --git a/src/frontends/xforms/form_include.C b/src/frontends/xforms/form_include.C index aeaeee9197..8a0c8a37b1 100644 --- a/src/frontends/xforms/form_include.C +++ b/src/frontends/xforms/form_include.C @@ -104,4 +104,3 @@ FD_form_include * FormInclude::build_include() return fdui; } /*---------------------------------------*/ - diff --git a/src/frontends/xforms/form_index.C b/src/frontends/xforms/form_index.C index a79fa5bb54..176e9554ea 100644 --- a/src/frontends/xforms/form_index.C +++ b/src/frontends/xforms/form_index.C @@ -67,4 +67,3 @@ FD_form_index * FormIndex::build_index() return fdui; } /*---------------------------------------*/ - diff --git a/src/frontends/xforms/form_maths_deco.C b/src/frontends/xforms/form_maths_deco.C index c3260c761f..0620323d2f 100644 --- a/src/frontends/xforms/form_maths_deco.C +++ b/src/frontends/xforms/form_maths_deco.C @@ -42,4 +42,3 @@ FD_form_maths_deco * FormMathsDeco::build_maths_deco() return fdui; } /*---------------------------------------*/ - diff --git a/src/frontends/xforms/form_maths_delim.C b/src/frontends/xforms/form_maths_delim.C index f75740758a..f0febbce79 100644 --- a/src/frontends/xforms/form_maths_delim.C +++ b/src/frontends/xforms/form_maths_delim.C @@ -80,4 +80,3 @@ FD_form_maths_delim * FormMathsDelim::build_maths_delim() return fdui; } /*---------------------------------------*/ - diff --git a/src/frontends/xforms/form_maths_matrix.C b/src/frontends/xforms/form_maths_matrix.C index 2d6a8172f7..7b1c204875 100644 --- a/src/frontends/xforms/form_maths_matrix.C +++ b/src/frontends/xforms/form_maths_matrix.C @@ -80,4 +80,3 @@ FD_form_maths_matrix * FormMathsMatrix::build_maths_matrix() return fdui; } /*---------------------------------------*/ - diff --git a/src/frontends/xforms/form_maths_panel.C b/src/frontends/xforms/form_maths_panel.C index 8267e30481..dbf27338d4 100644 --- a/src/frontends/xforms/form_maths_panel.C +++ b/src/frontends/xforms/form_maths_panel.C @@ -123,4 +123,3 @@ FD_form_maths_panel * FormMathsPanel::build_maths_panel() return fdui; } /*---------------------------------------*/ - diff --git a/src/frontends/xforms/form_maths_space.C b/src/frontends/xforms/form_maths_space.C index 3c6e9b5523..79fd56e8c6 100644 --- a/src/frontends/xforms/form_maths_space.C +++ b/src/frontends/xforms/form_maths_space.C @@ -80,4 +80,3 @@ FD_form_maths_space * FormMathsSpace::build_maths_space() return fdui; } /*---------------------------------------*/ - diff --git a/src/frontends/xforms/form_maths_style.C b/src/frontends/xforms/form_maths_style.C index cff4cf6b84..3fd82d0bcd 100644 --- a/src/frontends/xforms/form_maths_style.C +++ b/src/frontends/xforms/form_maths_style.C @@ -53,4 +53,3 @@ FD_form_maths_style * FormMathsStyle::build_maths_style() return fdui; } /*---------------------------------------*/ - diff --git a/src/frontends/xforms/form_minipage.C b/src/frontends/xforms/form_minipage.C index a10069a08a..42e7922d91 100644 --- a/src/frontends/xforms/form_minipage.C +++ b/src/frontends/xforms/form_minipage.C @@ -97,4 +97,3 @@ FD_form_minipage * FormMinipage::build_minipage() return fdui; } /*---------------------------------------*/ - diff --git a/src/frontends/xforms/form_paragraph.C b/src/frontends/xforms/form_paragraph.C index db47c93bc5..8554a81851 100644 --- a/src/frontends/xforms/form_paragraph.C +++ b/src/frontends/xforms/form_paragraph.C @@ -214,4 +214,3 @@ FD_form_paragraph * FormParagraph::build_paragraph() return fdui; } /*---------------------------------------*/ - diff --git a/src/frontends/xforms/form_preamble.C b/src/frontends/xforms/form_preamble.C index fe25888c08..b88b14367f 100644 --- a/src/frontends/xforms/form_preamble.C +++ b/src/frontends/xforms/form_preamble.C @@ -60,4 +60,3 @@ FD_form_preamble * FormPreamble::build_preamble() return fdui; } /*---------------------------------------*/ - diff --git a/src/frontends/xforms/form_preferences.C b/src/frontends/xforms/form_preferences.C index 6695a1f999..45afbe5543 100644 --- a/src/frontends/xforms/form_preferences.C +++ b/src/frontends/xforms/form_preferences.C @@ -1166,4 +1166,3 @@ FD_form_outputs_misc * FormPreferences::build_outputs_misc() return fdui; } /*---------------------------------------*/ - diff --git a/src/frontends/xforms/form_print.C b/src/frontends/xforms/form_print.C index 3db941be53..feb1366eb9 100644 --- a/src/frontends/xforms/form_print.C +++ b/src/frontends/xforms/form_print.C @@ -156,4 +156,3 @@ FD_form_print * FormPrint::build_print() return fdui; } /*---------------------------------------*/ - diff --git a/src/frontends/xforms/form_ref.C b/src/frontends/xforms/form_ref.C index 50e912578f..b3f2a9c949 100644 --- a/src/frontends/xforms/form_ref.C +++ b/src/frontends/xforms/form_ref.C @@ -107,4 +107,3 @@ FD_form_ref * FormRef::build_ref() return fdui; } /*---------------------------------------*/ - diff --git a/src/frontends/xforms/form_search.C b/src/frontends/xforms/form_search.C index 8b68e191e4..c9fc9c68cf 100644 --- a/src/frontends/xforms/form_search.C +++ b/src/frontends/xforms/form_search.C @@ -106,4 +106,3 @@ FD_form_search * FormSearch::build_search() return fdui; } /*---------------------------------------*/ - diff --git a/src/frontends/xforms/form_sendto.C b/src/frontends/xforms/form_sendto.C index 51b581d623..efbab4a28b 100644 --- a/src/frontends/xforms/form_sendto.C +++ b/src/frontends/xforms/form_sendto.C @@ -70,4 +70,3 @@ FD_form_sendto * FormSendto::build_sendto() return fdui; } /*---------------------------------------*/ - diff --git a/src/frontends/xforms/form_spellchecker.C b/src/frontends/xforms/form_spellchecker.C index 377db38dad..86f7709bc0 100644 --- a/src/frontends/xforms/form_spellchecker.C +++ b/src/frontends/xforms/form_spellchecker.C @@ -113,4 +113,3 @@ FD_form_spellchecker * FormSpellchecker::build_spellchecker() return fdui; } /*---------------------------------------*/ - diff --git a/src/frontends/xforms/form_tabular.C b/src/frontends/xforms/form_tabular.C index 77be5dfaf7..98eb1b0152 100644 --- a/src/frontends/xforms/form_tabular.C +++ b/src/frontends/xforms/form_tabular.C @@ -540,4 +540,3 @@ FD_form_longtable_options * FormTabular::build_longtable_options() return fdui; } /*---------------------------------------*/ - diff --git a/src/frontends/xforms/form_tabular_create.C b/src/frontends/xforms/form_tabular_create.C index 6b75af640c..0d4fbacd14 100644 --- a/src/frontends/xforms/form_tabular_create.C +++ b/src/frontends/xforms/form_tabular_create.C @@ -57,4 +57,3 @@ FD_form_tabular_create * FormTabularCreate::build_tabular_create() return fdui; } /*---------------------------------------*/ - diff --git a/src/frontends/xforms/form_texinfo.C b/src/frontends/xforms/form_texinfo.C index c7db533588..7370d07888 100644 --- a/src/frontends/xforms/form_texinfo.C +++ b/src/frontends/xforms/form_texinfo.C @@ -118,4 +118,3 @@ FD_form_texinfo * FormTexinfo::build_texinfo() return fdui; } /*---------------------------------------*/ - diff --git a/src/frontends/xforms/form_thesaurus.C b/src/frontends/xforms/form_thesaurus.C index e09d99f824..de60aab2f2 100644 --- a/src/frontends/xforms/form_thesaurus.C +++ b/src/frontends/xforms/form_thesaurus.C @@ -61,4 +61,3 @@ FD_form_thesaurus * FormThesaurus::build_thesaurus() return fdui; } /*---------------------------------------*/ - diff --git a/src/frontends/xforms/form_toc.C b/src/frontends/xforms/form_toc.C index 6118d0ef86..7b9fcc3189 100644 --- a/src/frontends/xforms/form_toc.C +++ b/src/frontends/xforms/form_toc.C @@ -59,4 +59,3 @@ FD_form_toc * FormToc::build_toc() return fdui; } /*---------------------------------------*/ - diff --git a/src/frontends/xforms/form_url.C b/src/frontends/xforms/form_url.C index b47b9bc408..00dd2ec247 100644 --- a/src/frontends/xforms/form_url.C +++ b/src/frontends/xforms/form_url.C @@ -87,4 +87,3 @@ FD_form_url * FormUrl::build_url() return fdui; } /*---------------------------------------*/ - diff --git a/src/frontends/xforms/input_validators.C b/src/frontends/xforms/input_validators.C index 9a56b6f627..ae1e3ad3a8 100644 --- a/src/frontends/xforms/input_validators.C +++ b/src/frontends/xforms/input_validators.C @@ -107,7 +107,7 @@ void fl_print_range_filter(FL_OBJECT * ob, That might be acceptable if there was a "to_page" entry however if you start making a page range in the "from" field you can do it all in the "from" field. That is, a - range in the "from" field immmediately blanks the "to" + range in the "from" field immmediately blanks the "to" field. */ } return FL_INVALID|FL_RINGBELL; @@ -139,7 +139,7 @@ void fl_print_range_filter(FL_OBJECT * ob, } } } -#endif +#endif #if defined(__cplusplus) } diff --git a/src/frontends/xforms/xformsGImage.h b/src/frontends/xforms/xformsGImage.h index d1f67faf40..6135505507 100644 --- a/src/frontends/xforms/xformsGImage.h +++ b/src/frontends/xforms/xformsGImage.h @@ -43,7 +43,7 @@ public: /// Get the image width unsigned int getWidth() const; - + /// Get the image height unsigned int getHeight() const; @@ -62,10 +62,10 @@ public: /// Clip the image using params. void clip(GParams const & params); - + /// Rotate the image using params. void rotate(GParams const & params); - + /// Scale the image using params. void scale(GParams const & params); @@ -95,7 +95,7 @@ private: /// PIXMAP_SUCCESS }; - + PixmapStatus pixmap_status_; /// Emit this signal when the loading process is finished. diff --git a/src/frontends/xforms/xforms_helpers.C b/src/frontends/xforms/xforms_helpers.C index fbf3287c47..f006a59364 100644 --- a/src/frontends/xforms/xforms_helpers.C +++ b/src/frontends/xforms/xforms_helpers.C @@ -16,7 +16,7 @@ #ifdef __GNUG_ #pragma implementation #endif - + #include "xforms_helpers.h" #include "lyxlex.h" #include "gettext.h" @@ -53,7 +53,7 @@ char const * flyx_ident_extract(char const * sc) while (se[0]!= 0 && se[0] != '|') ++se; if (se[0] == 0) return sc; - + char * sb = new char[se - sc + 1]; int index = 0; register char const * sd = sc; @@ -78,7 +78,7 @@ void setEnabled(FL_OBJECT * ob, bool enable) } } - + // Given an fl_choice, create a vector of its entries vector const getVectorFromChoice(FL_OBJECT * ob) { @@ -109,7 +109,7 @@ string const getStringFromInput(FL_OBJECT * ob) // Given an fl_browser, return the contents of line string const getStringFromBrowser(FL_OBJECT * ob, int line) { - if (!ob || ob->objclass != FL_BROWSER || + if (!ob || ob->objclass != FL_BROWSER || line < 1 || line > fl_get_browser_maxline(ob)) return string(); @@ -172,7 +172,7 @@ string getLengthFromWidgets(FL_OBJECT * input, FL_OBJECT * choice) return length + unit; } - + #if 0 // old code which can be deleted if the new one, now enabled, @@ -254,7 +254,7 @@ void updateWidgetsFromLengthString(FL_OBJECT * input, FL_OBJECT * choice, } } } - + fl_set_input(input, len.c_str()); fl_set_choice(choice, unitpos); } @@ -289,7 +289,7 @@ void updateWidgetsFromLength(FL_OBJECT * input, FL_OBJECT * choice, ostringstream buffer; buffer << len.value(); fl_set_input(input, buffer.str().c_str()); - fl_set_choice_text(choice, + fl_set_choice_text(choice, subst(stringFromUnit(len.unit()),"%","%%").c_str()); } } @@ -316,7 +316,7 @@ string formatted(string const & sin, int w, int size, int style) word.erase(); } if ((*sit) == '\n') word += '\n'; - + } else { word += (*sit); } @@ -400,7 +400,7 @@ string formatted(string const & sin, int w, int size, int style) line += ' '; line += word; } - + if (nxtpos == string::npos) { if (!line.empty()) sout += line; @@ -410,7 +410,7 @@ string formatted(string const & sin, int w, int size, int style) curpos = nxtpos+1; } #endif - + return sout; } @@ -436,7 +436,7 @@ keyword_item xformTags[] = { { "\\gui_inactive", FL_INACTIVE }, { "\\gui_pointer", FL_FREE_COL16 }, { "\\gui_push_button", FL_YELLOW }, - { "\\gui_selected", FL_MCOL }, + { "\\gui_selected", FL_MCOL }, { "\\gui_text", FL_BLACK } }; @@ -458,7 +458,7 @@ bool XformsColor::read(string const & filename) switch (le) { case LyXLex::LEX_UNDEF: lexrc.printError("Unknown tag `$$Token'"); - continue; + continue; case LyXLex::LEX_FEOF: continue; default: break; @@ -602,7 +602,7 @@ bool RWInfo::WriteableFile(string const & name) error_message = N_("Directory does not exist."); return false; } - + if (!d.writable()) { error_message = N_("Cannot write to this directory."); return false; @@ -618,7 +618,7 @@ bool RWInfo::WriteableFile(string const & name) error_message = N_("Cannot write to this file."); return false; } - + return true; } @@ -648,7 +648,7 @@ bool RWInfo::ReadableFile(string const & name) error_message = N_("Directory does not exist."); return false; } - + if (!d.readable()) { error_message = N_("Cannot read from this directory."); return false; @@ -664,7 +664,7 @@ bool RWInfo::ReadableFile(string const & name) error_message = N_("File does not exist."); return false; } - + if (!f.readable()) { error_message = N_("Cannot read from this file."); return false; diff --git a/src/frontends/xforms/xforms_helpers.h b/src/frontends/xforms/xforms_helpers.h index 44bafe5484..b2e0e16285 100644 --- a/src/frontends/xforms/xforms_helpers.h +++ b/src/frontends/xforms/xforms_helpers.h @@ -15,10 +15,10 @@ #endif #include FORMS_H_LOCATION - + #include "Color.h" #include "LString.h" - + #include class LyXLength; @@ -27,7 +27,7 @@ class LyXLength; string const choice_Length_All = "cm|mm|in|t%%|c%%|p%%|l%%|ex|em|pt|sp|bp|dd|pc|cc|mu"; string const choice_Length_WithUnit = - "cm|mm|in|ex|em|pt|sp|bp|dd|pc|cc|mu"; // all with a Unit + "cm|mm|in|ex|em|pt|sp|bp|dd|pc|cc|mu"; // all with a Unit /// Extract shortcut from | string char const * flyx_shortcut_extract(char const * sc);