]> git.lyx.org Git - features.git/commitdiff
Edwin's "about" patch + consistent use of Lsstream.h
authorAngus Leeming <leeming@lyx.org>
Fri, 13 Jul 2001 14:03:48 +0000 (14:03 +0000)
committerAngus Leeming <leeming@lyx.org>
Fri, 13 Jul 2001 14:03:48 +0000 (14:03 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2239 a592a061-630c-0410-9148-cb99ea01b6c8

63 files changed:
lib/ChangeLog
lib/ui/default.ui
src/ChangeLog
src/Lsstream.h
src/LyXAction.C
src/buffer.C
src/commandtags.h
src/frontends/ChangeLog
src/frontends/Dialogs.h
src/frontends/controllers/ChangeLog
src/frontends/controllers/ControlAboutlyx.C [new file with mode: 0644]
src/frontends/controllers/ControlAboutlyx.h [new file with mode: 0644]
src/frontends/controllers/ControlCopyright.C
src/frontends/controllers/ControlCopyright.h
src/frontends/controllers/ControlCredits.C
src/frontends/controllers/ControlCredits.h
src/frontends/controllers/ControlVCLog.C
src/frontends/controllers/ControlVCLog.h
src/frontends/controllers/GUI.h
src/frontends/controllers/Makefile.am
src/frontends/controllers/ViewBase.h
src/frontends/gnome/ChangeLog
src/frontends/gnome/FormCredits.C
src/frontends/qt2/ChangeLog
src/frontends/qt2/FormCredits.C
src/frontends/xforms/ChangeLog
src/frontends/xforms/Dialogs.C
src/frontends/xforms/FormAboutlyx.C [new file with mode: 0644]
src/frontends/xforms/FormAboutlyx.h [new file with mode: 0644]
src/frontends/xforms/FormCopyright.C
src/frontends/xforms/FormCopyright.h
src/frontends/xforms/FormCredits.C
src/frontends/xforms/FormCredits.h
src/frontends/xforms/FormMathsDelim.C
src/frontends/xforms/FormMathsMatrix.C
src/frontends/xforms/FormVCLog.C
src/frontends/xforms/Makefile.am
src/frontends/xforms/form_aboutlyx.C [new file with mode: 0644]
src/frontends/xforms/form_aboutlyx.h [new file with mode: 0644]
src/frontends/xforms/form_copyright.C
src/frontends/xforms/form_copyright.h
src/frontends/xforms/form_credits.C
src/frontends/xforms/form_credits.h
src/frontends/xforms/forms/form_aboutlyx.fd [new file with mode: 0644]
src/frontends/xforms/forms/form_copyright.fd
src/frontends/xforms/forms/form_credits.fd
src/frontends/xforms/forms/makefile
src/insets/ChangeLog
src/insets/figinset.C
src/insets/insetgraphics.C
src/insets/insetinclude.C
src/insets/insettext.C
src/lyxfont.C
src/lyxfunc.C
src/mathed/ChangeLog
src/mathed/formula.C
src/mathed/math_cursor.C
src/paragraph.C
src/support/ChangeLog
src/support/filetools.C
src/text.C
src/text2.C
src/vspace.C

index b9796a83279edc206a15d1bf5bf19cc163626ca0..2d998ecd2f6bddb08080dc19e959b3063fbe7d18 100644 (file)
@@ -2,6 +2,10 @@
 
        * bind/*.bind: do the same correctly for all files :)
 
+2001-07-13  Edwin Leuven  <leuven@fee.uva.nl>
+
+       * ui/default.ui: remove credits/version/copyright add about lyx
+
 2001-07-12  Juergen Vigna  <jug@sad.it>
 
        * bind/cua.bind: moved C-l from mode-tex to ert-insert
index e48ee9d3770df50eda060745d31b553d38e64c8a..7238604144b49e8303f8fcbde2d3fe9630e94594 100644 (file)
@@ -325,9 +325,7 @@ Menuset
        Item "Known Bugs|K" "help-open BUGS"
        Item "LaTeX Configuration|L" "help-open LaTeXConfig"
        Separator
-       Item "Copyright and Warranty...|o" "help-copyright"
-       Item "Credits...|d" "help-credits"
-       Item "Version...|V" "help-version"
+       Item "About LyX|X" "help-aboutlyx"
     End
 
 End
index 0687d3eb56d8e3b83691cc9e6ec6120f1c442913..73345784fc9adc9a22c36ced5a3a16c409ed2a2b 100644 (file)
@@ -1,3 +1,23 @@
+2001-07-13  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       Consistent use of Lsstream.h:
+       * Lsstream.h: added using std::stringstream for consistencies sake.
+
+       * buffer.C: removed using std::stringstream
+
+       * lyxfont.C (stateText):
+       * paragraph.C (asString):
+       * text.C (selectNextWord, selectSelectedWord):
+       * text2.C (setCounter):
+       * vspace.C (asString, asLatexString):
+       std::ostringstream -> ostringstream.
+
+2001-07-13  Edwin Leuven  <leuven@fee.uva.nl>
+
+       * LyXAction.C: add LFUN_HELP_ABOUTLYX
+       * commandtags.h: add LFUN_HELP_ABOUTLYX
+       * lyxfunc.C: add about lyx remove credits/copyright/version stuff
+
 2001-07-13  Edwin Leuven  <leuven@fee.uva.nl>
 
        * BufferView_pimpl.C: sigchldchecker instead of sigchldhandeler in
index 14cb9d5b3c165602e48341c35a355da0fe37690e..9c8b3c74d3ca953b428c4ee4b62e2e24208134f4 100644 (file)
@@ -24,5 +24,6 @@
 
 using std::istringstream;
 using std::ostringstream;
+using std::stringstream;
 
 #endif
index ca2531057365f8dafb65e54247004ec200392aec..e2d123d13c7782a52a41266f9457015d42001c4e 100644 (file)
@@ -420,6 +420,8 @@ void LyXAction::init()
                { LFUN_TRANSPOSE_CHARS, "chars-transpose", "", Noop },
                { LFUN_FLOAT_LIST, "float-list", "Insert a float list", Noop },
                { LFUN_ESCAPE, "escape", "", Noop },
+               { LFUN_HELP_ABOUTLYX, "help-aboutlyx",
+                 N_("Display information about LyX"), NoBuffer },
                { LFUN_NOACTION, "", "", Noop }
        };
 
index af26e74104b5c5fd7e4b30e71d868e962fdea9b6..f92beccb9121c0979f50bd519ef55ada7e3fbaff 100644 (file)
 #include "BufferView.h"
 #include "ParagraphParameters.h"
 
-using std::stringstream;
 using std::ostream;
 using std::ofstream;
 using std::ifstream;
@@ -3244,7 +3243,7 @@ void Buffer::simpleDocBookOnePar(ostream & os, string & extra,
 
                if (c == Paragraph::META_INSET) {
                        Inset * inset = par->getInset(i);
-                       std::ostringstream ost;
+                       ostringstream ost;
                        inset->docBook(this, ost);
                        string tmp_out = ost.str().c_str();
 
index b52fd2f5371d0b428dde4566d74da37d96392e72..0908881e363c0266eeb559e5e80990115f3488ad 100644 (file)
@@ -295,7 +295,8 @@ enum kb_action {
        LFUN_MESSAGE_PUSH,              // Lgb 20010410
        LFUN_MESSAGE_POP,               // Lgb 20010410
        LFUN_TRANSPOSE_CHARS,           // Lgb 20010425
-       LFUN_ESCAPE,                    // Lgb 20010517
+       LFUN_ESCAPE, // 260             // Lgb 20010517
+       LFUN_HELP_ABOUTLYX,             // Edwin 20010712
        LFUN_LASTACTION  /* this marks the end of the table */
 };
 
index 66fbde6d91c72ab3b4738fc6cdbb2b2d2b626917..37731740cf1a79a777eec2ad4e507924cca304fe 100644 (file)
@@ -1,3 +1,7 @@
+2001-07-13  Edwin Leuven  <leuven@fee.uva.nl>
+       
+       * Dialogs.h: add showAboutlyx and remove showCredits and Copyright
+
 2001-07-13  Edwin Leuven  <leuven@fee.uva.nl>
 
        * Dialogs.h: added showSpellchecker
index 05c712d52661e45cad79c3e3d9eb04d730146578..39578b22d0a35d95e3882f5c940e7164c8ac5ab3 100644 (file)
@@ -85,6 +85,8 @@ public:
        //@{
        /// Do we really have to push this?
        SigC::Signal1<void, std::vector<string> const &> SetDocumentClassChoice;
+       ///
+       SigC::Signal0<void> showAboutlyx;
        /// show the key and label of a bibliography entry
        SigC::Signal1<void, InsetCommand *> showBibitem;
        /// show the bibtex dialog
@@ -98,10 +100,6 @@ public:
        ///
        SigC::Signal1<void, string const &> createCitation;
        ///
-       SigC::Signal0<void> showCopyright;
-       ///
-       SigC::Signal0<void> showCredits;
-       ///
        SigC::Signal0<void> showDocument;
        ///
        SigC::Signal1<void, InsetError *> showError;
index 5120678cbab2af91f936dfb3343500f2b27b46e4..c5f9b2cf7f49c0f0a8567cb24ffd8f325adbcd22 100644 (file)
@@ -1,9 +1,22 @@
+2001-07-13  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       Consistent use of Lsstream.h:
+       * ControlAboutlyx.[Ch] (getCredits):
+       * ControlVCLog.[Ch] (getVCLogFile): std::stringstream -> stringstream.
+
+2001-07-13  Edwin Leuven  <leuven@fee.uva.nl>
+
+       * ControlCredits.[Ch]: removed
+       * ControlCopyright.[Ch]: removed
+       * ControlAboutlyx.[Ch]: added (replaces previous)
+       * GUI.h: removed credits and copyright added about lyx stuff
+
 2001-07-13  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
 
        * ControlSpellchecker.C (getSuggestion): 
        (getWord): add std:: qualifier
 
-2001-07-13  Edwin Leuven  <leuven@fee.uva.nl>
+>001-07-13  Edwin Leuven  <leuven@fee.uva.nl>
 
        * ControlSpellchecker.[Ch]: added
        * ViewBase.h: added partialUpdate(int) member
@@ -27,8 +40,8 @@
        * *.[h]: added // -*- C++ -*-
        * *.[C]: removed // -*- C++ -*-
 
-       * ControlCharacter.[Ch]: added // -*- C++ -*-
-       (setParams): Check contents of font_ to activate Apply button.
+       * ControlCharacter.[Ch]: (setParams): Check contents of font_ to
+       activate Apply button.
        (clearParams): removed.
        font_ is now stored as a boost::scoped_ptr.
        font_ is no longer deleted on hide(), so it's contents can now be used
diff --git a/src/frontends/controllers/ControlAboutlyx.C b/src/frontends/controllers/ControlAboutlyx.C
new file mode 100644 (file)
index 0000000..eee78a7
--- /dev/null
@@ -0,0 +1,97 @@
+/**
+ * \file ControlAboutlyx.C
+ * Copyright 2001 The LyX Team.
+ * See the file COPYING.
+ *
+ * \author Edwin Leuven, leuven@fee.uva.nl
+ * \author Angus Leeming, a.leeming@.ac.uk
+ */
+
+#include <config.h>
+#include <fstream>
+
+#ifdef __GNUG__
+#pragma implementation
+#endif
+
+#include "ViewBase.h"
+#include "ButtonControllerBase.h"
+#include "ControlAboutlyx.h"
+#include "Dialogs.h"
+#include "LyXView.h"
+#include "Lsstream.h"
+#include "BufferView.h"
+#include "gettext.h"
+#include "support/filetools.h" // FileSearch
+#include "version.h"
+
+// needed for the browser
+extern string system_lyxdir;
+extern string user_lyxdir;
+
+ControlAboutlyx::ControlAboutlyx(LyXView & lv, Dialogs & d)
+       : ControlDialog<ControlConnectBI>(lv, d)
+{
+       d_.showAboutlyx.connect(SigC::slot(this, &ControlAboutlyx::show));
+}
+
+
+stringstream & ControlAboutlyx::getCredits(stringstream & ss) const
+{
+       string const name = FileSearch(system_lyxdir, "CREDITS");
+
+       bool found(!name.empty());
+
+       if (found) {
+               std::ifstream in(name.c_str());
+               found = (in.get());
+
+               if (found) {
+                       in.seekg(0, std::ios::beg); // rewind to the beginning
+
+                       ss << in.rdbuf();
+                       found = (ss.good());
+               }
+       }
+
+       if (!found) {
+               ss << _("ERROR: LyX wasn't able to read CREDITS file\n")
+                  << _("Please install correctly to estimate the great\n")
+                  << _("amount of work other people have done for the LyX project.");
+       }
+
+       return ss;
+}
+
+string const ControlAboutlyx::getCopyright() const
+{
+       return _("LyX is Copyright (C) 1995 by Matthias Ettrich,\n1995-2001 LyX Team");
+}
+
+string const ControlAboutlyx::getLicense() const
+{
+       return _("This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.");
+}
+
+string const ControlAboutlyx::getDisclaimer() const
+{
+       return _("LyX is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\nSee the GNU General Public License for more details.\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.");
+}
+
+string const ControlAboutlyx::getVersion() const
+{
+       stringstream ss;
+
+       ss << _("LyX Version ")
+          << LYX_VERSION
+          << " of "
+          << LYX_RELEASE
+          << "\n"
+          << ("Library directory: ")
+          << MakeDisplayPath(system_lyxdir)
+          << "\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
new file mode 100644 (file)
index 0000000..9cd1e2c
--- /dev/null
@@ -0,0 +1,51 @@
+// -*- C++ -*-
+/**
+ * \file ControlAboutLyX.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>
+ */
+
+#ifndef CONTROLABOUTLYX_H
+#define CONTROLABOUTLYX_H
+
+#include "Lsstream.h"
+
+#ifdef __GNUG__
+#pragma interface
+#endif
+
+#include "ControlDialogs.h"
+
+/** A controller for the About LyX dialogs.
+ */
+class ControlAboutlyx : public ControlDialog<ControlConnectBI> {
+public:
+       ///
+       ControlAboutlyx(LyXView &, Dialogs &);
+
+       ///
+       stringstream & getCredits(stringstream &) const;
+       
+       ///
+       string const getCopyright() const;
+
+       ///
+       string const getLicense() const;
+
+       ///
+       string const getDisclaimer() const;
+
+       ///
+       string const getVersion() const;
+       
+
+private:
+       /// not needed.
+       virtual void apply() {}
+};
+
+#endif // CONTROLABOUTLYX_H
+
index ac51fdf3a78a682b810118f4d3e241e4b281d2b2..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,46 +0,0 @@
-/*
- * \file ControlCopyright.C
- * Copyright 2000-2001 The LyX Team.
- * See the file COPYING.
- *
- * \author Allan Rae
- * \author Angus Leeming, a.leeming@.ac.uk
- */
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include <config.h>
-
-#include "ViewBase.h"
-#include "ButtonControllerBase.h"
-#include "ControlCopyright.h"
-#include "Dialogs.h"
-#include "LyXView.h"
-#include "BufferView.h"
-#include "gettext.h"
-
-using SigC::slot;
-
-ControlCopyright::ControlCopyright(LyXView & lv, Dialogs & d)
-       : ControlDialog<ControlConnectBI>(lv, d)
-{
-       d_.showCopyright.connect(slot(this, &ControlCopyright::show));
-}
-
-
-string const ControlCopyright::getCopyright() const
-{
-       return _("LyX is Copyright (C) 1995 by Matthias Ettrich,\n1995-2001 LyX Team");
-}
-
-string const ControlCopyright::getLicence() const
-{
-       return _("This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.");
-}
-
-string const ControlCopyright::getDisclaimer() const
-{
-       return _("LyX is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\nSee the GNU General Public License for more details.\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.");
-}
index 886e37773ccd120a1f1604b8c98e2218005f21d2..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,39 +0,0 @@
-// -*- C++ -*-
-/*
- * \file ControlCopyright.C
- * Copyright 2000-2001 The LyX Team.
- * See the file COPYING.
- *
- * \author Allan Rae
- * \author Angus Leeming, a.leeming@.ac.uk
- */
-
-#ifndef CONTROLCOPYRIGHT_H
-#define CONTROLCOPYRIGHT_H
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "ControlDialogs.h"
-
-/** A controller for Copyright dialogs.
- */
-class ControlCopyright : public ControlDialog<ControlConnectBI> {
-public:
-       ///
-       ControlCopyright(LyXView &, Dialogs &);
-
-       ///
-       string const getCopyright() const;
-       ///
-       string const getLicence() const;
-       ///
-       string const getDisclaimer() const;
-
-private:
-       /// not needed.
-       virtual void apply() {}
-};
-
-#endif // CONTROLCOPYRIGHT_H
index 2d7c3849fb2e2495d50c712b14d26acdb8a1c2fe..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,62 +0,0 @@
-/**
- * \file ControlCredits.C
- * Copyright 2001 The LyX Team.
- * See the file COPYING.
- *
- * \author Edwin Leuven, leuven@fee.uva.nl
- * \author Angus Leeming, a.leeming@.ac.uk
- */
-
-#include <config.h>
-#include <fstream>
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include "ViewBase.h"
-#include "ButtonControllerBase.h"
-#include "ControlCredits.h"
-#include "Dialogs.h"
-#include "LyXView.h"
-#include "BufferView.h"
-#include "gettext.h"
-#include "support/filetools.h" // FileSearch
-
-// needed for the browser
-extern string system_lyxdir;
-
-
-ControlCredits::ControlCredits(LyXView & lv, Dialogs & d)
-       : ControlDialog<ControlConnectBI>(lv, d)
-{
-       d_.showCredits.connect(SigC::slot(this, &ControlCredits::show));
-}
-
-
-std::stringstream & ControlCredits::getCredits(std::stringstream & ss) const
-{
-       string const name = FileSearch(system_lyxdir, "CREDITS");
-
-       bool found(!name.empty());
-
-       if (found) {
-               std::ifstream in(name.c_str());
-               found = (in.get());
-
-               if (found) {
-                       in.seekg(0, std::ios::beg); // rewind to the beginning
-
-                       ss << in.rdbuf();
-                       found = (ss.good());
-               }
-       }
-
-       if (!found) {
-               ss << _("ERROR: LyX wasn't able to read CREDITS file\n")
-                  << _("Please install correctly to estimate the great\n")
-                  << _("amount of work other people have done for the LyX project.");
-       }
-
-       return ss;
-}
index 5cbeda72b9a2ef0d4b7c8357e39479b62cad2634..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,38 +0,0 @@
-// -*- C++ -*-
-/**
- * \file ControlCredits.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>
- */
-
-#ifndef CONTROLCREDITS_H
-#define CONTROLCREDITS_H
-
-#include "Lsstream.h"
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "ControlDialogs.h"
-
-/** A controller for the Credits dialogs.
- */
-class ControlCredits : public ControlDialog<ControlConnectBI> {
-public:
-       ///
-       ControlCredits(LyXView &, Dialogs &);
-
-       ///
-       std::stringstream & getCredits(std::stringstream &) const;
-
-private:
-       /// not needed.
-       virtual void apply() {}
-};
-
-#endif // CONTROLCREDITS_H
-
index 600ea3c996664fc9b470f85b5b4e4fb69a85044c..ae24ffabcdef66b5433a68fcd2310212ce4ebcae 100644 (file)
@@ -44,7 +44,7 @@ string const ControlVCLog::getBufferFileName() const
 }
 
 
-std::stringstream & ControlVCLog::getVCLogFile(std::stringstream & ss) const
+stringstream & ControlVCLog::getVCLogFile(stringstream & ss) const
 {
        string const name = lv_.view()->buffer()->lyxvc.getLogFile();
 
index 509a24bcb89a77f7bf0f271d616ea02af5fa4d91..1b6eeed7a80904473450756894137a3748ff20e0 100644 (file)
 /**
  * A controller for the Version Control log viewer.
  */
-class stringstream;
-
 class ControlVCLog : public ControlDialog<ControlConnectBD> {
 public:
        ///
        ControlVCLog(LyXView &, Dialogs &);
        /// get a stringstream containing the log file
-       std::stringstream & getVCLogFile(std::stringstream & ss) const;
+       stringstream & getVCLogFile(stringstream & ss) const;
        /// get the filename of the buffer
        string const getBufferFileName() const;
 
index e0c6482e36f446dd15ef8d6c65234818450f6eee..14eb9755dcc0110df449e47acf41ee336047bf85 100644 (file)
@@ -52,6 +52,18 @@ class OkCancelPolicy;
 class OkCancelReadOnlyPolicy;
 class NoRepeatedApplyReadOnlyPolicy;
 
+/** Specialization for About LyX dialog
+ */
+class ControlAboutlyx;
+
+template <class GUIview, class GUIbc>
+class GUIAboutlyx :
+       public GUI<ControlAboutlyx, GUIview, OkCancelPolicy, GUIbc> {
+public:
+       ///
+       GUIAboutlyx(LyXView & lv, Dialogs & d)
+               : GUI<ControlAboutlyx, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
+};
 
 /** Specialization for Bibitem dialog
  */
@@ -113,34 +125,6 @@ public:
 };
 
 
-/** Specialization for Copyright dialog
- */
-class ControlCopyright;
-
-template <class GUIview, class GUIbc>
-class GUICopyright :
-       public GUI<ControlCopyright, GUIview, OkCancelPolicy, GUIbc> {
-public:
-       ///
-       GUICopyright(LyXView & lv, Dialogs & d)
-               : GUI<ControlCopyright, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
-};
-
-
-/** Specialization for Credits dialog
- */
-class ControlCredits;
-
-template <class GUIview, class GUIbc>
-class GUICredits :
-       public GUI<ControlCredits, GUIview, OkCancelPolicy, GUIbc> {
-public:
-       ///
-       GUICredits(LyXView & lv, Dialogs & d)
-               : GUI<ControlCredits, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
-};
-
-
 /** Specialization for Error dialog
  */
 class ControlError;
index db785eba7e6abf11a84a279ad091843feb29f229..f3454699538429dcd5d12bee053d2ebfefa4a73f 100644 (file)
@@ -19,6 +19,8 @@ libcontrollers_la_SOURCES=\
        ButtonControllerBase.h \
        ButtonPolicies.C \
        ButtonPolicies.h \
+       ControlAboutlyx.C \
+       ControlAboutlyx.h \
        ControlBibitem.C \
        ControlBibitem.h \
        ControlBibtex.C \
@@ -33,10 +35,6 @@ libcontrollers_la_SOURCES=\
        ControlCommand.h \
        ControlConnections.C \
        ControlConnections.h \
-       ControlCopyright.C \
-       ControlCopyright.h \
-       ControlCredits.h \
-       ControlCredits.C \
        ControlDialogs.h \
        ControlError.h \
        ControlError.C \
index b00b58a9cac46ff5dbc238d4b32ac044dc8127b8..1e233614a1e409ac44ef8269c4d08159007b3227 100644 (file)
@@ -51,7 +51,7 @@ public:
        /** 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 id) {}
+       virtual void partialUpdate(int) {}
    
 protected:
        /// The view is, after all, controlled!
index 242e349e9103a978fc5e2f2789e8630eb4947bc1..862757d95b3287e3e01f51b6e69fa419270b5715 100644 (file)
@@ -1,3 +1,8 @@
+2001-07-13  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       Consistent use of Lsstream.h:
+       * FormCredits.C (build): std::stringstream -> stringstream.
+
 2001-06-16  Angus Leeming  <a.leeming@ic.ac.uk>
 
        * gnomeBC.h: clean-up of included files.
index 092260d8f5997f14e434e238449ad988fc62b418..b16fe828222b8bad80bb4518bc76d8a91d9bfca3 100644 (file)
@@ -41,7 +41,7 @@ void FormCredits::build()
        text()->freeze();
        
        // Get the credits into the string stream
-       std::stringstream ss;
+       stringstream ss;
        string credits = controller().getCredits(ss).str();
 
        // Create the strings that we need to detect.
index 5463cc9080838650b7dbdf8b93945795158ba7df..107618474ff739bffb5f601487053506e2de524a 100644 (file)
@@ -1,3 +1,8 @@
+2001-07-13  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       Consistent use of Lsstream.h:
+       * FormCredits.C (build): std::stringstream -> stringstream.
+
 2001-06-17  Angus Leeming  <a.leeming@ic.ac.uk>
 
        * FormCitation.C (build): removed bc().refresh() call as the controller
index 103d51efd144be21cdef0de47fcf11f5579675cd..cd7c8d417e1086ce19b2b9964c3af28cbcbefe87 100644 (file)
@@ -43,7 +43,7 @@ void FormCredits::build()
        bc().setCancel(dialog_->okPB);
        bc().refresh();
 
-       std::stringstream ss;
+       stringstream ss;
        QString xformscredits = controller().getCredits( ss ).str().c_str();
        QStringList xformslist = QStringList::split( '\n', controller().getCredits( ss ).str().c_str(), true );
        for( QStringList::Iterator it = xformslist.begin(); it != xformslist.end(); ++it ) {
index a83ed65de8acfd3f612cdceb645751cfeb884d84..8fe81c282bf2b86e612736c3ed3580b438a32fa5 100644 (file)
@@ -1,3 +1,27 @@
+2001-07-13  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       Consistent use of Lsstream.h:
+       * FormAboutlyx.C (build):
+       * FormVCLog.C (update): std::ostringstream -> ostringstream.
+
+       * FormMathsDelim.C (apply):
+       * FormMathsMatrix.C (apply): std::stringstream -> stringstream.
+
+2001-07-13  Edwin Leuven  <leuven@fee.uva.nl>
+
+       * implement 1 about lyx dialog instead of 3 separate ones
+
+       * FormCredits.[Ch]: removed
+       * FormCopyright.[Ch]: removed
+       * form_credits.[Ch]: removed
+       * forms/form_credits.fd: removed
+       * form_copyright.[Ch]: removed
+       * forms/form_copyright.fd: removed
+       * FormAboutlyx.[Ch]: added
+       * form_aboutlyx.[Ch]: added
+       * forms/form_aboutlyx.fd: added
+       * Dialogs.C: add about lyx stuff
+
 2001-07-13  Edwin Leuven  <leuven@fee.uva.nl>
 
        * add spellchecker
index 430da846db7df7ca769db6f033a485b962c22a48..eb03517a858987d25fa8c6a31f16bad0e101c100 100644 (file)
 
 #include "xformsBC.h"
 
+#include "ControlAboutlyx.h"
 #include "ControlBibitem.h"
 #include "ControlBibtex.h"
 #include "ControlCharacter.h"
 #include "ControlCitation.h"
-#include "ControlCopyright.h"
-#include "ControlCredits.h"
 #include "ControlError.h"
 #include "ControlExternal.h" 
 #include "ControlGraphics.h"
 #include "GUI.h"
 
 #include "combox.h"       // needed for clean destruction of boost::scoped_ptr
+#include "form_aboutlyx.h"
 #include "form_bibitem.h"
 #include "form_bibtex.h"
 #include "form_browser.h"
 #include "form_character.h"
 #include "form_citation.h"
-#include "form_copyright.h"
-#include "form_credits.h"
 #include "form_error.h"
 #include "form_external.h" 
 #include "form_graphics.h"
 #include "form_toc.h"
 #include "form_url.h"
 
+#include "FormAboutlyx.h"
 #include "FormBibitem.h"
 #include "FormBibtex.h"
 #include "FormCharacter.h"
 #include "FormCitation.h"
-#include "FormCopyright.h"
-#include "FormCredits.h"
 #include "FormError.h"
 #include "FormExternal.h" 
 #include "FormGraphics.h"
@@ -108,12 +105,11 @@ Dialogs::Dialogs(LyXView * lv)
 {
        splash_.reset(new GUISplash<FormSplash>(*this));
 
+       add(new GUIAboutlyx<FormAboutlyx, xformsBC>(*lv, *this));
        add(new GUIBibitem<FormBibitem, xformsBC>(*lv, *this));
        add(new GUIBibtex<FormBibtex, xformsBC>(*lv, *this));
        add(new GUICharacter<FormCharacter, xformsBC>(*lv, *this));
        add(new GUICitation<FormCitation, xformsBC>(*lv, *this));
-       add(new GUICopyright<FormCopyright, xformsBC>(*lv, *this));
-       add(new GUICredits<FormCredits, xformsBC>(*lv, *this));
        add(new GUIError<FormError, xformsBC>(*lv, *this));
        add(new GUIExternal<FormExternal, xformsBC>(*lv, *this));
        add(new GUIGraphics<FormGraphics, xformsBC>(*lv, *this));
diff --git a/src/frontends/xforms/FormAboutlyx.C b/src/frontends/xforms/FormAboutlyx.C
new file mode 100644 (file)
index 0000000..e1b7ee7
--- /dev/null
@@ -0,0 +1,83 @@
+/**
+ * \file FormAboutlyx.C
+ * Copyright 2001 The LyX Team.
+ * See the file COPYING.
+ *
+ * \author Edwin Leuven, leuven@fee.uva.nl
+ * \author Angus Leeming, a.leeming@.ac.uk
+ */
+
+#ifdef __GNUG__
+#pragma implementation
+#endif
+
+#include <config.h>
+
+#include "xformsBC.h"
+#include "ControlAboutlyx.h"
+#include "FormAboutlyx.h"
+#include "form_aboutlyx.h"
+#include "xforms_helpers.h"
+#include "Lsstream.h"
+
+using std::getline;
+
+typedef FormCB<ControlAboutlyx, FormDB<FD_form_aboutlyx> > base_class;
+
+FormAboutlyx::FormAboutlyx(ControlAboutlyx & c)
+       : base_class(c, _("About LyX"))
+{}
+
+FL_FORM * FormAboutlyx::form() const
+{
+    if (dialog_.get()) return dialog_->form;
+    return 0;
+}
+
+void FormAboutlyx::build()
+{
+       dialog_.reset(build_aboutlyx());
+
+       // create version tab
+       version_.reset(build_tab_version());
+       fl_set_object_label(version_->text_version, 
+                           controller().getVersion().c_str());
+       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());
+
+       str = formatted(controller().getDisclaimer(),
+                       license_->text_warranty->w-10);
+       fl_set_object_label(license_->text_warranty, str.c_str());
+
+       // create credits
+       credits_.reset(build_tab_credits());
+       stringstream ss;
+       fl_add_browser_line(credits_->browser_credits, 
+                           controller().getCredits(ss).str().c_str());
+
+       // stack tabs
+       fl_addto_tabfolder(dialog_->tabbed_folder,_("Copyright and Version"),
+                      version_->form);
+       fl_addto_tabfolder(dialog_->tabbed_folder,_("License and Warranty"),
+                      license_->form);
+       fl_addto_tabfolder(dialog_->tabbed_folder,_("Credits"),
+                      credits_->form);
+
+       fl_set_form_maxsize( dialog_->form,
+                            dialog_->form->w,  dialog_->form->h);
+
+       // Manage the cancel/close button
+       bc().setCancel(dialog_->close);
+}
+
+
+
+
+
diff --git a/src/frontends/xforms/FormAboutlyx.h b/src/frontends/xforms/FormAboutlyx.h
new file mode 100644 (file)
index 0000000..f648f20
--- /dev/null
@@ -0,0 +1,68 @@
+// -*- C++ -*-
+/**
+ * \file FormAboutlyx.h
+ * Copyright 2001 The LyX Team.
+ * See the file COPYING.
+ *
+ * \author Edwin Leuven <leuven@fee.uva.nl>
+ * \author Angus Leeming <a.leeming@.ac.uk>
+ */
+
+#ifndef FORMABOUTLYX_H
+#define FORMABOUTLYX_H
+
+#include <vector>
+#include <boost/smart_ptr.hpp>
+
+#ifdef __GNUG__
+#pragma interface
+#endif
+
+
+#include "FormBase.h"
+
+class ControlAboutlyx;
+struct FD_form_aboutlyx;
+struct FD_form_tab_version;
+struct FD_form_tab_credits;
+struct FD_form_tab_license;
+
+/** This class provides an XForms implementation of the FormAboutlyx Dialog.
+ */
+class FormAboutlyx : public FormCB<ControlAboutlyx, FormDB<FD_form_aboutlyx> > {
+public:
+       ///
+       FormAboutlyx(ControlAboutlyx &);
+
+private:
+       /// not needed.
+       virtual void apply() {}
+       /// not needed.
+       virtual void update() {}
+       /// Build the dialog
+       virtual void build();
+
+       ///
+       virtual FL_FORM * form() const;
+
+       /// Fdesign generated method
+       FD_form_aboutlyx * build_aboutlyx();
+       ///
+       FD_form_tab_version * build_tab_version();
+       ///
+       FD_form_tab_credits * build_tab_credits();
+       ///
+       FD_form_tab_license * build_tab_license();
+
+       /// Real GUI implementation.
+       boost::scoped_ptr<FD_form_aboutlyx> dialog_;
+       ///
+       boost::scoped_ptr<FD_form_tab_version> version_;
+       ///
+       boost::scoped_ptr<FD_form_tab_credits> credits_;
+       ///
+       boost::scoped_ptr<FD_form_tab_license> license_;
+};
+
+#endif // FORMABOUTLYX_H
+
index 5103aa535a8a73395d88ad448c25a1e3c3731068..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,50 +0,0 @@
-/*
- * \file FormCopyright.C
- * Copyright 2000-2001 The LyX Team.
- * See the file COPYING.
- *
- * \author Allan Rae, rae@lyx.org
- * \author Angus Leeming, a.leeming@.ac.uk
- */
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include <config.h>
-
-#include "xformsBC.h"
-#include "ControlCopyright.h"
-#include "FormCopyright.h"
-#include "form_copyright.h"
-#include "xforms_helpers.h"
-
-typedef FormCB<ControlCopyright, FormDB<FD_form_copyright> > base_class;
-
-FormCopyright::FormCopyright(ControlCopyright & c)
-       : base_class(c, _("Copyright and Warranty"))
-{}
-
-
-void FormCopyright::build()
-{
-       dialog_.reset(build_copyright());
-
-       string str = formatted(controller().getCopyright(),
-                              dialog_->text_copyright->w-10);
-
-       fl_set_object_label(dialog_->text_copyright, str.c_str());
-
-       str = formatted(controller().getLicence(),
-                       dialog_->text_licence->w-10);
-
-       fl_set_object_label(dialog_->text_licence, str.c_str());
-
-       str = formatted(controller().getDisclaimer(),
-                       dialog_->text_disclaimer->w-10);
-
-       fl_set_object_label(dialog_->text_disclaimer, str.c_str());
-       
-        // Manage the cancel/close button
-       bc().setCancel(dialog_->button_cancel);
-}
index 1ab43b72d2401b7b37db4f0891f0ee8ed4c7ca0e..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,52 +0,0 @@
-// -*- C++ -*-
-/**
- * \file FormCopyright.h
- * This file is part of
- * ====================================================== 
- *
- *           LyX, The Document Processor
- *
- *           Copyright 1995 Matthias Ettrich
- *           Copyright 1995-2001 The LyX Team.
- *
- *           This file Copyright 2000-2001
- *           Allan Rae
- * ======================================================
- *
- * \author Allan Rae
- * \author Angus Leeming, a.leeming@.ac.uk
- */
-
-#ifndef FORMCOPYRIGHT_H
-#define FORMCOPYRIGHT_H
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "FormBase.h"
-
-class ControlCopyright;
-struct FD_form_copyright;
-
-/** This class provides an XForms implementation of the FormCopyright Dialog.
- */
-class FormCopyright
-       : public FormCB<ControlCopyright, FormDB<FD_form_copyright> > {
-public:
-       ///
-       FormCopyright(ControlCopyright &);
-
-private:
-       /// not needed.
-       virtual void apply() {}
-       /// Build the dialog
-       virtual void build();
-       /// not needed.
-       virtual void update() {}
-
-       /// Fdesign generated method
-       FD_form_copyright * build_copyright();
-};
-
-#endif // FORMCOPYRIGHT_H
index 89c320e55aa844041288d50c3473fe13da68977a..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,42 +0,0 @@
-/**
- * \file FormCredits.C
- * Copyright 2001 The LyX Team.
- * See the file COPYING.
- *
- * \author Edwin Leuven, leuven@fee.uva.nl
- * \author Angus Leeming, a.leeming@.ac.uk
- */
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include <config.h>
-
-#include "xformsBC.h"
-#include "ControlCredits.h"
-#include "FormCredits.h"
-#include "form_credits.h"
-#include "xforms_helpers.h"
-#include "Lsstream.h"
-
-using std::getline;
-
-typedef FormCB<ControlCredits, FormDB<FD_form_credits> > base_class;
-
-FormCredits::FormCredits(ControlCredits & c)
-       : base_class(c, _("Credits"))
-{}
-
-
-void FormCredits::build()
-{
-       dialog_.reset(build_credits());
-
-       // Manage the cancel/close button
-       bc().setCancel(dialog_->button_cancel);
-
-       std::stringstream ss;
-       fl_add_browser_line(dialog_->browser_credits, 
-                           controller().getCredits(ss).str().c_str());
-}
index aff26344bb7fc4526a7b102560ab5864a3aaf1a3..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,43 +0,0 @@
-// -*- C++ -*-
-/**
- * \file FormCredits.h
- * Copyright 2001 The LyX Team.
- * See the file COPYING.
- *
- * \author Edwin Leuven, leuven@fee.uva.nl
- * \author Angus Leeming, a.leeming@.ac.uk
- */
-
-#ifndef FORMCREDITS_H
-#define FORMCREDITS_H
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "FormBase.h"
-
-class ControlCredits;
-struct FD_form_credits;
-
-/** This class provides an XForms implementation of the FormCredits Dialog.
- */
-class FormCredits : public FormCB<ControlCredits, FormDB<FD_form_credits> > {
-public:
-       ///
-       FormCredits(ControlCredits &);
-
-private:
-       /// not needed.
-       virtual void apply() {}
-       /// not needed.
-       virtual void update() {}
-       /// Build the dialog
-       virtual void build();
-
-       /// Fdesign generated method
-       FD_form_credits * build_credits();
-};
-
-#endif
-
index 01d243649ee51a19e9eceac1ea6a8328a46c5b79..414fcb04da90dd4208e74325c1e7bbd535770aa1 100644 (file)
@@ -83,7 +83,7 @@ void FormMathsDelim::apply()
        int const left = int(dialog_->radio_left->u_ldata);
        int const right= int(dialog_->radio_right->u_ldata);
 
-       std::ostringstream ost;
+       ostringstream ost;
        ost << delim_values[left] << ' ' << delim_values[right];
 
        lv_->getLyXFunc()->Dispatch(LFUN_MATH_DELIM, ost.str().c_str());
index 8f68e8393ee68fc0e6465083ff7221e7f9a93879..2421d32674b3e7ee3fdb518f69e4cd26544eb191 100644 (file)
@@ -85,7 +85,7 @@ void FormMathsMatrix::apply()
        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);
  
-       std::ostringstream ost;
+       ostringstream ost;
        ost << nx << ' ' << ny << ' ' << c << sh;
  
        lv_->getLyXFunc()->Dispatch(LFUN_INSERT_MATRIX, ost.str().c_str());
index 7620ad4c839c4834322a72901fadb06d210a11cb..b9ccbe3d1ca93d1f488fa979f0e1c7aacca281c7 100644 (file)
@@ -3,17 +3,18 @@
  * John Levon, moz@compsoc.man.ac.uk
  */
 
+#include <config.h>
+#include "Lsstream.h"
+
 #ifdef __GNUG__
 #pragma implementation
 #endif
 
-#include <config.h>
 #include "xformsBC.h"
 #include "ControlVCLog.h"
 #include "FormVCLog.h"
 #include "form_browser.h"
 #include "gettext.h"
-#include "Lsstream.h"
 
 FormVCLog::FormVCLog(ControlVCLog & c)
        : FormCB<ControlVCLog, FormBrowser>(c, _("Version Control Log"))
@@ -24,7 +25,7 @@ void FormVCLog::update()
 {
        fl_clear_browser(dialog_->browser);
 
-       std::stringstream ss;
+       stringstream ss;
  
        fl_add_browser_line(dialog_->browser,
                            controller().getVCLogFile(ss).str().c_str());
index 90328b5ac74e217ce29c3de8262b07c095e55565..8d6f6ecca79c0b1136dea245aa1c5979189be98a 100644 (file)
@@ -26,6 +26,10 @@ libxforms_la_SOURCES = \
        form_filedialog.C \
        form_filedialog.h \
        GUIRunTime.C \
+       FormAboutlyx.C \
+       FormAboutlyx.h \
+       form_aboutlyx.C \
+       form_aboutlyx.h \
        FormBase.C \
        FormBase.h \
        FormBaseDeprecated.C \
@@ -50,14 +54,6 @@ libxforms_la_SOURCES = \
        FormCitation.h \
        form_citation.C \
        form_citation.h \
-       FormCopyright.C \
-       FormCopyright.h \
-       form_copyright.C \
-       form_copyright.h \
-       FormCredits.C \
-       FormCredits.h \
-       form_credits.C \
-       form_credits.h \
        FormDocument.C \
        FormDocument.h \
        form_document.C \
diff --git a/src/frontends/xforms/form_aboutlyx.C b/src/frontends/xforms/form_aboutlyx.C
new file mode 100644 (file)
index 0000000..4659135
--- /dev/null
@@ -0,0 +1,129 @@
+// File modified by fdfix.sh for use by lyx (with xforms >= 0.88) and gettext
+#include <config.h>
+#include "lyx_gui_misc.h"
+#include "gettext.h"
+
+/* Form definition file generated with fdesign. */
+
+#include FORMS_H_LOCATION
+#include <stdlib.h>
+#include "form_aboutlyx.h"
+#include "FormAboutlyx.h"
+
+FD_form_aboutlyx::~FD_form_aboutlyx()
+{
+  if ( form->visible ) fl_hide_form( form );
+  fl_free_form( form );
+}
+
+
+FD_form_aboutlyx * FormAboutlyx::build_aboutlyx()
+{
+  FL_OBJECT *obj;
+  FD_form_aboutlyx *fdui = new FD_form_aboutlyx;
+
+  fdui->form = fl_bgn_form(FL_NO_BOX, 450, 370);
+  fdui->form->u_vdata = this;
+  obj = fl_add_box(FL_UP_BOX, 0, 0, 450, 370, "");
+  {
+    char const * const dummy = N_("Close|#C");
+    fdui->close = obj = fl_add_button(FL_NORMAL_BUTTON, 320, 330, 120, 30, idex(_(dummy)));
+    fl_set_button_shortcut(obj, scex(_(dummy)), 1);
+  }
+    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_callback(obj, C_FormBaseCancelCB, 0);
+  fdui->tabbed_folder = obj = fl_add_tabfolder(FL_TOP_TABFOLDER, 10, 20, 430, 300, "");
+    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+  fl_end_form();
+
+  fdui->form->fdui = fdui;
+
+  return fdui;
+}
+/*---------------------------------------*/
+
+FD_form_tab_version::~FD_form_tab_version()
+{
+  if ( form->visible ) fl_hide_form( form );
+  fl_free_form( form );
+}
+
+
+FD_form_tab_version * FormAboutlyx::build_tab_version()
+{
+  FL_OBJECT *obj;
+  FD_form_tab_version *fdui = new FD_form_tab_version;
+
+  fdui->form = fl_bgn_form(FL_NO_BOX, 430, 280);
+  fdui->form->u_vdata = this;
+  obj = fl_add_box(FL_UP_BOX, 0, 0, 430, 280, "");
+  fdui->text_version = obj = fl_add_text(FL_NORMAL_TEXT, 10, 120, 410, 150, _("Text"));
+    fl_set_object_boxtype(obj, FL_FRAME_BOX);
+    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_lalign(obj, FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
+  fdui->text_copyright = obj = fl_add_text(FL_NORMAL_TEXT, 10, 10, 410, 100, _("Text"));
+    fl_set_object_boxtype(obj, FL_FRAME_BOX);
+    fl_set_object_lalign(obj, FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
+  fl_end_form();
+
+  fdui->form->fdui = fdui;
+
+  return fdui;
+}
+/*---------------------------------------*/
+
+FD_form_tab_credits::~FD_form_tab_credits()
+{
+  if ( form->visible ) fl_hide_form( form );
+  fl_free_form( form );
+}
+
+
+FD_form_tab_credits * FormAboutlyx::build_tab_credits()
+{
+  FL_OBJECT *obj;
+  FD_form_tab_credits *fdui = new FD_form_tab_credits;
+
+  fdui->form = fl_bgn_form(FL_NO_BOX, 430, 280);
+  fdui->form->u_vdata = this;
+  obj = fl_add_box(FL_UP_BOX, 0, 0, 430, 280, "");
+  fdui->browser_credits = obj = fl_add_browser(FL_NORMAL_BROWSER, 10, 10, 410, 260, "");
+    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+  fl_end_form();
+
+  fdui->form->fdui = fdui;
+
+  return fdui;
+}
+/*---------------------------------------*/
+
+FD_form_tab_license::~FD_form_tab_license()
+{
+  if ( form->visible ) fl_hide_form( form );
+  fl_free_form( form );
+}
+
+
+FD_form_tab_license * FormAboutlyx::build_tab_license()
+{
+  FL_OBJECT *obj;
+  FD_form_tab_license *fdui = new FD_form_tab_license;
+
+  fdui->form = fl_bgn_form(FL_NO_BOX, 430, 280);
+  fdui->form->u_vdata = this;
+  obj = fl_add_box(FL_UP_BOX, 0, 0, 430, 280, "");
+  fdui->text_license = obj = fl_add_text(FL_NORMAL_TEXT, 10, 10, 410, 100, _("Text"));
+    fl_set_object_boxtype(obj, FL_FRAME_BOX);
+    fl_set_object_lalign(obj, FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
+  fdui->text_warranty = obj = fl_add_text(FL_NORMAL_TEXT, 10, 120, 410, 150, _("Text"));
+    fl_set_object_boxtype(obj, FL_FRAME_BOX);
+    fl_set_object_lalign(obj, FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
+  fl_end_form();
+
+  fdui->form->fdui = fdui;
+
+  return fdui;
+}
+/*---------------------------------------*/
+
diff --git a/src/frontends/xforms/form_aboutlyx.h b/src/frontends/xforms/form_aboutlyx.h
new file mode 100644 (file)
index 0000000..85da322
--- /dev/null
@@ -0,0 +1,44 @@
+// File modified by fdfix.sh for use by lyx (with xforms >= 0.88) and gettext
+/** Header file generated with fdesign **/
+
+#ifndef FD_form_aboutlyx_h_
+#define FD_form_aboutlyx_h_
+
+/** Callbacks, globals and object handlers **/
+extern  "C" void C_FormBaseCancelCB(FL_OBJECT *, long);
+
+
+extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);
+
+
+
+/**** Forms and Objects ****/
+struct FD_form_aboutlyx {
+       ~FD_form_aboutlyx();
+
+       FL_FORM *form;
+       FL_OBJECT *close;
+       FL_OBJECT *tabbed_folder;
+};
+struct FD_form_tab_version {
+       ~FD_form_tab_version();
+
+       FL_FORM *form;
+       FL_OBJECT *text_version;
+       FL_OBJECT *text_copyright;
+};
+struct FD_form_tab_credits {
+       ~FD_form_tab_credits();
+
+       FL_FORM *form;
+       FL_OBJECT *browser_credits;
+};
+struct FD_form_tab_license {
+       ~FD_form_tab_license();
+
+       FL_FORM *form;
+       FL_OBJECT *text_license;
+       FL_OBJECT *text_warranty;
+};
+
+#endif /* FD_form_aboutlyx_h_ */
index 3d9425c06e5e0a32e9bdcd7278112559c6e18091..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,56 +0,0 @@
-// File modified by fdfix.sh for use by lyx (with xforms >= 0.88) and gettext
-#include <config.h>
-#include "lyx_gui_misc.h"
-#include "gettext.h"
-
-/* Form definition file generated with fdesign. */
-
-#include FORMS_H_LOCATION
-#include <stdlib.h>
-#include "form_copyright.h"
-#include "FormCopyright.h"
-
-FD_form_copyright::~FD_form_copyright()
-{
-  if ( form->visible ) fl_hide_form( form );
-  fl_free_form( form );
-}
-
-
-FD_form_copyright * FormCopyright::build_copyright()
-{
-  FL_OBJECT *obj;
-  FD_form_copyright *fdui = new FD_form_copyright;
-
-  fdui->form = fl_bgn_form(FL_NO_BOX, 450, 430);
-  fdui->form->u_vdata = this;
-  obj = fl_add_box(FL_UP_BOX, 0, 0, 450, 430, "");
-  fdui->text_copyright = obj = fl_add_text(FL_NORMAL_TEXT, 10, 10, 430, 50, "");
-    fl_set_object_boxtype(obj, FL_FRAME_BOX);
-    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_lalign(obj, FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
-  fdui->text_licence = obj = fl_add_text(FL_NORMAL_TEXT, 10, 70, 430, 110, "");
-    fl_set_object_boxtype(obj, FL_FRAME_BOX);
-    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_lalign(obj, FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
-  fdui->text_disclaimer = obj = fl_add_text(FL_NORMAL_TEXT, 10, 190, 430, 190, "");
-    fl_set_object_boxtype(obj, FL_FRAME_BOX);
-    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_lalign(obj, FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
-  {
-    char const * const dummy = N_("Close|^[^M");
-    fdui->button_cancel = obj = fl_add_button(FL_RETURN_BUTTON, 160, 390, 140, 30, idex(_(dummy)));
-    fl_set_button_shortcut(obj, scex(_(dummy)), 1);
-  }
-    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_gravity(obj, FL_South, FL_South);
-    fl_set_object_resize(obj, FL_RESIZE_NONE);
-    fl_set_object_callback(obj, C_FormBaseCancelCB, 0);
-  fl_end_form();
-
-  fdui->form->fdui = fdui;
-
-  return fdui;
-}
-/*---------------------------------------*/
-
index ee94cb3cd667776c31d29e0563987983d40ed50d..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,22 +0,0 @@
-// File modified by fdfix.sh for use by lyx (with xforms >= 0.88) and gettext
-/** Header file generated with fdesign **/
-
-#ifndef FD_form_copyright_h_
-#define FD_form_copyright_h_
-
-/** Callbacks, globals and object handlers **/
-extern  "C" void C_FormBaseCancelCB(FL_OBJECT *, long);
-
-
-/**** Forms and Objects ****/
-struct FD_form_copyright {
-       ~FD_form_copyright();
-
-       FL_FORM *form;
-       FL_OBJECT *text_copyright;
-       FL_OBJECT *text_licence;
-       FL_OBJECT *text_disclaimer;
-       FL_OBJECT *button_cancel;
-};
-
-#endif /* FD_form_copyright_h_ */
index 7a36aad2852e412f16b07907e4eff9772b396603..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,51 +0,0 @@
-// File modified by fdfix.sh for use by lyx (with xforms >= 0.88) and gettext
-#include <config.h>
-#include "lyx_gui_misc.h"
-#include "gettext.h"
-
-/* Form definition file generated with fdesign. */
-
-#include FORMS_H_LOCATION
-#include <stdlib.h>
-#include "form_credits.h"
-#include "FormCredits.h"
-
-FD_form_credits::~FD_form_credits()
-{
-  if ( form->visible ) fl_hide_form( form );
-  fl_free_form( form );
-}
-
-
-FD_form_credits * FormCredits::build_credits()
-{
-  FL_OBJECT *obj;
-  FD_form_credits *fdui = new FD_form_credits;
-
-  fdui->form = fl_bgn_form(FL_NO_BOX, 500, 330);
-  fdui->form->u_vdata = this;
-  obj = fl_add_box(FL_UP_BOX, 0, 0, 500, 330, "");
-  fdui->button_cancel = obj = fl_add_button(FL_RETURN_BUTTON, 180, 290, 140, 30, _("OK"));
-    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_gravity(obj, FL_South, FL_South);
-    fl_set_object_resize(obj, FL_RESIZE_NONE);
-    fl_set_object_callback(obj, C_FormBaseCancelCB, 0);
-  obj = fl_add_text(FL_NORMAL_TEXT, 10, 40, 480, 30, _("Matthias"));
-    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_lalign(obj, FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
-    fl_set_object_lstyle(obj, FL_ITALIC_STYLE);
-    fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
-  obj = fl_add_text(FL_NORMAL_TEXT, 10, 10, 480, 30, _("All these people have contributed to the LyX project. Thanks, "));
-    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_lalign(obj, FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
-    fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
-  fdui->browser_credits = obj = fl_add_browser(FL_NORMAL_BROWSER, 10, 80, 480, 200, "");
-    fl_set_object_gravity(obj, FL_NorthWest, FL_SouthEast);
-  fl_end_form();
-
-  fdui->form->fdui = fdui;
-
-  return fdui;
-}
-/*---------------------------------------*/
-
index ef9791d423f9aa49420c277fe8e649ac7d8cac5e..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,20 +0,0 @@
-// File modified by fdfix.sh for use by lyx (with xforms >= 0.88) and gettext
-/** Header file generated with fdesign **/
-
-#ifndef FD_form_credits_h_
-#define FD_form_credits_h_
-
-/** Callbacks, globals and object handlers **/
-extern  "C" void C_FormBaseCancelCB(FL_OBJECT *, long);
-
-
-/**** Forms and Objects ****/
-struct FD_form_credits {
-       ~FD_form_credits();
-
-       FL_FORM *form;
-       FL_OBJECT *button_cancel;
-       FL_OBJECT *browser_credits;
-};
-
-#endif /* FD_form_credits_h_ */
diff --git a/src/frontends/xforms/forms/form_aboutlyx.fd b/src/frontends/xforms/forms/form_aboutlyx.fd
new file mode 100644 (file)
index 0000000..627c4a5
--- /dev/null
@@ -0,0 +1,232 @@
+Magic: 13000
+
+Internal Form Definition File
+    (do not change)
+
+Number of forms: 4
+Unit of measure: FL_COORD_PIXEL
+
+=============== FORM ===============
+Name: form_aboutlyx
+Width: 450
+Height: 370
+Number of Objects: 3
+
+--------------------
+class: FL_BOX
+type: UP_BOX
+box: 0 0 450 370
+boxtype: FL_UP_BOX
+colors: FL_COL1 FL_COL1
+alignment: FL_ALIGN_CENTER
+style: FL_NORMAL_STYLE
+size: FL_DEFAULT_SIZE
+lcol: FL_BLACK
+label: 
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: 
+callback: 
+argument: 
+
+--------------------
+class: FL_BUTTON
+type: NORMAL_BUTTON
+box: 320 330 120 30
+boxtype: FL_UP_BOX
+colors: FL_COL1 FL_COL1
+alignment: FL_ALIGN_CENTER
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: Close|#C
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: close
+callback: C_FormBaseCancelCB
+argument: 0
+
+--------------------
+class: FL_TABFOLDER
+type: TOP_TABFOLDER
+box: 10 20 430 300
+boxtype: FL_UP_BOX
+colors: FL_COL1 FL_COL1
+alignment: FL_ALIGN_TOP_LEFT
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: 
+shortcut: 
+resize: FL_RESIZE_NONE
+gravity: FL_NoGravity FL_NoGravity
+name: tabbed_folder
+callback: 
+argument: 
+
+=============== FORM ===============
+Name: form_tab_version
+Width: 430
+Height: 280
+Number of Objects: 3
+
+--------------------
+class: FL_BOX
+type: UP_BOX
+box: 0 0 430 280
+boxtype: FL_UP_BOX
+colors: FL_COL1 FL_COL1
+alignment: FL_ALIGN_CENTER
+style: FL_NORMAL_STYLE
+size: FL_DEFAULT_SIZE
+lcol: FL_BLACK
+label: 
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: 
+callback: 
+argument: 
+
+--------------------
+class: FL_TEXT
+type: NORMAL_TEXT
+box: 10 120 410 150
+boxtype: FL_FRAME_BOX
+colors: FL_COL1 FL_MCOL
+alignment: FL_ALIGN_CENTER|FL_ALIGN_INSIDE
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: Text
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: text_version
+callback: 
+argument: 
+
+--------------------
+class: FL_TEXT
+type: NORMAL_TEXT
+box: 10 10 410 100
+boxtype: FL_FRAME_BOX
+colors: FL_COL1 FL_MCOL
+alignment: FL_ALIGN_CENTER|FL_ALIGN_INSIDE
+style: FL_NORMAL_STYLE
+size: FL_DEFAULT_SIZE
+lcol: FL_BLACK
+label: Text
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: text_copyright
+callback: 
+argument: 
+
+=============== FORM ===============
+Name: form_tab_credits
+Width: 430
+Height: 280
+Number of Objects: 2
+
+--------------------
+class: FL_BOX
+type: UP_BOX
+box: 0 0 430 280
+boxtype: FL_UP_BOX
+colors: FL_COL1 FL_COL1
+alignment: FL_ALIGN_CENTER
+style: FL_NORMAL_STYLE
+size: FL_DEFAULT_SIZE
+lcol: FL_BLACK
+label: 
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: 
+callback: 
+argument: 
+
+--------------------
+class: FL_BROWSER
+type: NORMAL_BROWSER
+box: 10 10 410 260
+boxtype: FL_DOWN_BOX
+colors: FL_COL1 FL_YELLOW
+alignment: FL_ALIGN_BOTTOM
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: 
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: browser_credits
+callback: C_FormBaseInputCB
+argument: 0
+
+=============== FORM ===============
+Name: form_tab_license
+Width: 430
+Height: 280
+Number of Objects: 3
+
+--------------------
+class: FL_BOX
+type: UP_BOX
+box: 0 0 430 280
+boxtype: FL_UP_BOX
+colors: FL_COL1 FL_COL1
+alignment: FL_ALIGN_CENTER
+style: FL_NORMAL_STYLE
+size: FL_DEFAULT_SIZE
+lcol: FL_BLACK
+label: 
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: 
+callback: 
+argument: 
+
+--------------------
+class: FL_TEXT
+type: NORMAL_TEXT
+box: 10 10 410 100
+boxtype: FL_FRAME_BOX
+colors: FL_COL1 FL_MCOL
+alignment: FL_ALIGN_CENTER|FL_ALIGN_INSIDE
+style: FL_NORMAL_STYLE
+size: FL_DEFAULT_SIZE
+lcol: FL_BLACK
+label: Text
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: text_license
+callback: 
+argument: 
+
+--------------------
+class: FL_TEXT
+type: NORMAL_TEXT
+box: 10 120 410 150
+boxtype: FL_FRAME_BOX
+colors: FL_COL1 FL_MCOL
+alignment: FL_ALIGN_CENTER|FL_ALIGN_INSIDE
+style: FL_NORMAL_STYLE
+size: FL_DEFAULT_SIZE
+lcol: FL_BLACK
+label: Text
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: text_warranty
+callback: 
+argument: 
+
+==============================
+create_the_forms
index cc16d01bd38d91bb1c1c0113e6ae5af5af9f09fa..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,106 +0,0 @@
-Magic: 13000
-
-Internal Form Definition File
-    (do not change)
-
-Number of forms: 1
-Unit of measure: FL_COORD_PIXEL
-
-=============== FORM ===============
-Name: form_copyright
-Width: 450
-Height: 430
-Number of Objects: 5
-
---------------------
-class: FL_BOX
-type: UP_BOX
-box: 0 0 450 430
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label: 
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: 
-callback: 
-argument: 
-
---------------------
-class: FL_TEXT
-type: NORMAL_TEXT
-box: 10 10 430 50
-boxtype: FL_FRAME_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_CENTER|FL_ALIGN_INSIDE
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: 
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: text_copyright
-callback: 
-argument: 
-
---------------------
-class: FL_TEXT
-type: NORMAL_TEXT
-box: 10 70 430 110
-boxtype: FL_FRAME_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_CENTER|FL_ALIGN_INSIDE
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: 
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: text_licence
-callback: 
-argument: 
-
---------------------
-class: FL_TEXT
-type: NORMAL_TEXT
-box: 10 190 430 190
-boxtype: FL_FRAME_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_CENTER|FL_ALIGN_INSIDE
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: 
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: text_disclaimer
-callback: 
-argument: 
-
---------------------
-class: FL_BUTTON
-type: RETURN_BUTTON
-box: 160 390 140 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Close|^[^M
-shortcut: 
-resize: FL_RESIZE_NONE
-gravity: FL_South FL_South
-name: button_cancel
-callback: C_FormBaseCancelCB
-argument: 0
-
-==============================
-create_the_forms
index 56bce85c7d1dcb090187cc565014df8a48e38a4e..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,106 +0,0 @@
-Magic: 13000
-
-Internal Form Definition File
-    (do not change)
-
-Number of forms: 1
-Unit of measure: FL_COORD_PIXEL
-
-=============== FORM ===============
-Name: form_credits
-Width: 500
-Height: 330
-Number of Objects: 5
-
---------------------
-class: FL_BOX
-type: UP_BOX
-box: 0 0 500 330
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label: 
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: 
-callback: 
-argument: 
-
---------------------
-class: FL_BUTTON
-type: RETURN_BUTTON
-box: 180 290 140 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: OK
-shortcut: ^M
-resize: FL_RESIZE_NONE
-gravity: FL_South FL_South
-name: button_cancel
-callback: C_FormBaseCancelCB
-argument: 0
-
---------------------
-class: FL_TEXT
-type: NORMAL_TEXT
-box: 10 40 480 30
-boxtype: FL_FLAT_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_CENTER|FL_ALIGN_INSIDE
-style: FL_ITALIC_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Matthias
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NorthWest FL_NorthEast
-name: 
-callback: 
-argument: 
-
---------------------
-class: FL_TEXT
-type: NORMAL_TEXT
-box: 10 10 480 30
-boxtype: FL_FLAT_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_CENTER|FL_ALIGN_INSIDE
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: All these people have contributed to the LyX project. Thanks,
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NorthWest FL_NorthEast
-name: 
-callback: 
-argument: 
-
---------------------
-class: FL_BROWSER
-type: NORMAL_BROWSER
-box: 10 80 480 200
-boxtype: FL_DOWN_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_BOTTOM
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label: 
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NorthWest FL_SouthEast
-name: browser_credits
-callback: 
-argument: 
-
-==============================
-create_the_forms
index dbec4898868faee63ddecac635826af9b63f43a0..18e3826be5c1651d7b14775c84f6d343132c872a 100644 (file)
 SHELL = /bin/sh
 .SUFFIXES: .fd .c
 
-SRCS =  form_bibitem.fd \
+SRCS =  form_aboutlyx.fd \
+       form_bibitem.fd \
+       form_bibtex.fd \
        form_bibtex.fd \
        form_browser.fd \
        form_character.fd \
        form_citation.fd \
-       form_copyright.fd \
-       form_credits.fd \
        form_document.fd \
        form_error.fd \
        form_external.fd \
index 0dc8a76994abf12289f3e1bbd089be04f0cc9b52..6182cce4e3e5365acdc10aa20f12b0e7879063c1 100644 (file)
@@ -1,3 +1,13 @@
+2001-07-13  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       Consistent use of Lsstream.h:
+       * figinset.C: removed using std::ostringstream directive.
+
+       * insetgraphics.C (createLatexOptions):
+       * insetinclude.C (unique_id):
+       std::ostringstream -> ostringstream.
+       * insettext.C (localDispatch): std::istringstream -> istringstream.
+
 2001-07-13  Juergen Vigna  <jug@sad.it>
 
        * insetfloat.C (insertInsetAllowed): added missing const_cast.
index f8c81fc2a93b4c3e0bbedcc216fa3bd3f82d4a75..b76802efeaf81863aebd4add1a72b79259d14904 100644 (file)
@@ -76,7 +76,6 @@ using std::vector;
 using std::find;
 using std::flush;
 using std::endl;
-using std::ostringstream;
 using std::copy;
 using std::pair;
 using std::make_pair;
index ef7b1fac4c9af93d111391ef06eb750d92c05709..6b66c8a0363f9ef9b79b6b1b509680008cbec4bc 100644 (file)
@@ -394,7 +394,7 @@ InsetGraphics::createLatexOptions() const
        // Calculate the options part of the command, we must do it to a string
        // stream since we might have a trailing comma that we would like to remove
        // before writing it to the output stream.
-       std::ostringstream options;
+       ostringstream options;
 
        formatResize(options, "width", params.widthResize, params.widthSize);
        formatResize(options, "height", params.heightResize, params.heightSize);
index 3e66d587a2961046a9b3b4419a65c14ae25d33a7..ea25f71c8920fa6962bb74b2989f77ee29b3cd8a 100644 (file)
@@ -35,7 +35,7 @@ string const unique_id()
 {
        static unsigned int seed = 1000;
 
-       std::ostringstream ost;
+       ostringstream ost;
        ost << "file" << ++seed;
 
        // Needed if we use lyxstring.
index d4142702a97a79c47d9ffd3f63157280fb697d51..e896b11139b19c3d4312d86ce43ca0aece56f5d2 100644 (file)
@@ -1145,7 +1145,7 @@ InsetText::localDispatch(BufferView * bv,
                        cur_value = par->params().spacing().getValue();
                }
                                
-               std::istringstream istr(arg.c_str());
+               istringstream istr(arg.c_str());
                string tmp;
                istr >> tmp;
                Spacing::Space new_spacing = cur_spacing;
index 7dae2cab0d2fb20fcfc3974fca08401b136c7a89..819b401c116cdfe6935fa71afa4453e3daa8a073 100644 (file)
@@ -557,7 +557,7 @@ bool LyXFont::resolved() const
 /// Build GUI description of font state
 string const LyXFont::stateText(BufferParams * params) const
 {
-       std::ostringstream ost;
+       ostringstream ost;
        if (family() != INHERIT_FAMILY)
                ost << _(GUIFamilyNames[family()]) << ", ";
        if (series() != INHERIT_SERIES)
index adaa4699818b7405d49216750940b4043098f43b..6369647b40fb6b3397a86fa770c397a6b5f48666 100644 (file)
@@ -1090,13 +1090,13 @@ string const LyXFunc::Dispatch(int ac,
 #warning Find another implementation here (or another lyxfunc)!
 #endif
 #endif
-       case LFUN_HELP_COPYRIGHT:
-               owner->getDialogs()->showCopyright();
+       case LFUN_HELP_ABOUTLYX:
+               owner->getDialogs()->showAboutlyx();
                break;
 
+       case LFUN_HELP_COPYRIGHT:
        case LFUN_HELP_CREDITS:
-               owner->getDialogs()->showCredits();
-               break;
+               
 
         case LFUN_HELP_OPEN:
        {
@@ -1122,20 +1122,7 @@ string const LyXFunc::Dispatch(int ac,
                break;
         }
 
-       case LFUN_HELP_VERSION: {
-               owner->prohibitInput();
-               string msg(_("LyX Version "));
-               msg += LYX_VERSION;
-               msg += " of ";
-               msg += LYX_RELEASE;
-               fl_show_message(msg.c_str(),
-                               (_("Library directory: ")
-                                + MakeDisplayPath(system_lyxdir)).c_str(),
-                               (_("User directory: ") 
-                                + MakeDisplayPath(user_lyxdir)).c_str());
-               owner->allowInput();
-               break;
-       }
+       case LFUN_HELP_VERSION:
        
                // --- version control -------------------------------
        case LFUN_VC_REGISTER:
index 7149d66a2e640820fcc34a6335e90e43a08dbd0c..7c73593516cfeedef540af744a999b0782fec6a9 100644 (file)
@@ -1,3 +1,9 @@
+2001-07-13  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       Consistent use of Lsstream.h:
+       * formula.C: removed using std::ostringstream directive.
+       * math_cursor.C: std::istringstream -> istringstream.
+
 2001-07-13  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
 
        * math_decorationinset.h: add std:: qualifier
index dc8867387418674f022e6a4401c9df9e6f15330b..abd83ef8620aea146a753e9b07d8ecfe611e2ab6 100644 (file)
@@ -38,7 +38,6 @@
 #include "math_matrixinset.h"
 #include "mathed/support.h"
 
-using std::ostringstream;
 using std::ostream;
 using std::ifstream;
 using std::istream;
index 442bb17eed43155f1ba6498d728f50da8b6d9618..7b1f7d91c5ddcb2a3365033ea9123122cb0447b6 100644 (file)
@@ -596,7 +596,7 @@ in_word_set(s) << " \n";
                        int n = 1;
                        string v_align;
                        string h_align;
-                       std::istringstream is(s.substr(7).c_str());
+                       istringstream is(s.substr(7).c_str());
                        is >> m >> n >> v_align >> h_align;
                        m = std::max(1, m);
                        n = std::max(1, n);
index 99564189715530e13631cf719b86a544cb67bbef..24a1f110836acb96db2472545373333bcda7a066 100644 (file)
@@ -1896,7 +1896,7 @@ string const Paragraph::asString(Buffer const * buffer, bool label)
                        s += c;
                else if (c == META_INSET &&
                         getInset(i)->lyxCode() == Inset::MATH_CODE) {
-                       std::ostringstream ost;
+                       ostringstream ost;
                        getInset(i)->ascii(buffer, ost);
                        s += subst(ost.str().c_str(),'\n',' ');
                }
@@ -1913,7 +1913,7 @@ string const Paragraph::asString(Buffer const * buffer,
                            Paragraph::size_type beg,
                            Paragraph::size_type end)
 {
-       std::ostringstream ost;
+       ostringstream ost;
 
        if (beg == 0 && !params().labelString().empty())
                ost << params().labelString() << ' ';
index 56cd9a58e5d4b3b63661c92e9d6c96c663fd9f69..d0d4a5e15ae18b56d45fecc2a15254ebe3d3603c 100644 (file)
@@ -1,3 +1,8 @@
+2001-07-13  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       Consistent use of Lsstream.h:
+       * filetools.C (GetFileContents): std::ostringstream -> ostringstream.
+
 2001-07-12  Lars Gullik Bjønnes  <larsbj@birdstep.com>
 
        * translator.h: (*it). -> it->
index c247043bc34f6ace27376f27651bb7bd30a41920..d4bccefe31201ede327f47f431f303c13a7f1427 100644 (file)
@@ -731,7 +731,7 @@ string const GetFileContents(string const & fname)
        FileInfo finfo(fname);
        if (finfo.exist()) {
                ifstream ifs(fname.c_str());
-               std::ostringstream ofs;
+               ostringstream ofs;
                if (ifs && ofs) {
                        ofs << ifs.rdbuf();
                        ifs.close();
index 8d43f09089dcbbd1815e3f4d7d165256ea8bb9b2..3b21f04f20fc104d03be607814ae2e5129b80ea5 100644 (file)
@@ -2261,7 +2261,7 @@ string const LyXText::selectNextWord(BufferView * bview,
        // Start the selection from here
        selection.cursor = cursor;
        
-       std::ostringstream latex;
+       ostringstream latex;
 
        // and find the end of the word 
        // (optional hyphens are part of a word)
@@ -2295,7 +2295,7 @@ void LyXText::selectSelectedWord(BufferView * bview)
        
        // set the sel cursor
        selection.cursor = cursor;
-       std::ostringstream latex;
+       ostringstream latex;
        
        // now find the end of the word
        while (cursor.pos() < cursor.par()->size()
index a33a829bac268b1821963c2ce114c21500955c4b..c4f7064999d60d46b66be39e36f646f2d36d2608 100644 (file)
@@ -1269,7 +1269,7 @@ void LyXText::setCounter(Buffer const * buf, Paragraph * par) const
                                        par->params().labelString(string());
                        }
 
-                       std::ostringstream s;
+                       ostringstream s;
 
                        if (!par->params().appendix()) {
                                switch (2 * LABEL_COUNTER_CHAPTER -
@@ -1411,7 +1411,7 @@ void LyXText::setCounter(Buffer const * buf, Paragraph * par) const
                        par->incCounter(i + par->enumdepth);
                        int number = par->getCounter(i + par->enumdepth);
 
-                       std::ostringstream s;
+                       ostringstream s;
 
                        switch (par->enumdepth) {
                        case 1:
index 36d28a845a76dc2e6d38ab0e6270d3c3aba513c5..a314e312543f6d74e3cf4a839ec072eecf27a33b 100644 (file)
@@ -326,7 +326,7 @@ LyXLength::LyXLength(string const & data)
 
 string const LyXLength::asString() const
 {
-       std::ostringstream buffer;
+       ostringstream buffer;
        buffer << val << unit_name[uni]; // setw?
        return buffer.str().c_str();
 }
@@ -334,7 +334,7 @@ string const LyXLength::asString() const
 
 string const LyXLength::asLatexString() const
 {
-       std::ostringstream buffer;
+       ostringstream buffer;
        switch(uni) {
        case PW:
        case PE:
@@ -376,7 +376,7 @@ LyXGlueLength::LyXGlueLength (string const & data)
 
 string const LyXGlueLength::asString() const
 {
-       std::ostringstream buffer;
+       ostringstream buffer;
 
        if (plus_val != 0.0)
                if (minus_val != 0.0)
@@ -430,7 +430,7 @@ string const LyXGlueLength::asString() const
 
 string const LyXGlueLength::asLatexString() const
 {
-       std::ostringstream buffer;
+       ostringstream buffer;
 
        if (plus_val != 0.0)
                if (minus_val != 0.0)