]> git.lyx.org Git - features.git/commitdiff
Small changes; ChangeLog is your friend
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 11 Apr 2000 16:57:16 +0000 (16:57 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 11 Apr 2000 16:57:16 +0000 (16:57 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@648 a592a061-630c-0410-9148-cb99ea01b6c8

ChangeLog
src/buffer.C
src/insets/insetlatexaccent.C
src/lyx_gui_misc.C
src/lyx_gui_misc.h
src/lyx_main.C
src/lyxlex_pimpl.C
src/lyxserver.C
src/menus.C
src/support/DebugStream.h
src/tex-strings.C

index d8f19193e67cd3b32a5765aa3f3b4ad68ea9affa..c4f3add827ff16908c5d4356777103602e077490 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,15 +1,42 @@
+2000-04-11  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
+
+       * src/lyxserver.C (callback): fix dispatch of functions
+
+       * src/insets/insetlatexaccent.C (checkContents): turn bogus
+       printf() into lyxerr call. 
+
+       * src/tex-strings.C (tex_fonts): add "pslatex" to the choice of
+       fonts. 
+
+       * src/menus.C (ShowInsertMenu): rename "Figure" to "Graphic",
+       "Table" to "Table Box", "Float" to "Floating Material"; deletes
+       the "Float" from each of the subitems.
+       (ShowHelpMenu): add entry for "FAQ" and "TOC".
+
+       * src/support/DebugStream.h: add an #ifdef to work around a gcc
+       2.8.x compiler error. Yes, I know, gcc 2.8.1 is bad, but I
+       documented the change so that the workaround can be nuked later.
+
+       * src/lyx_gui_misc.C (getScreenDPI): new function. Code moved from 
+       LyX::init().
+       
+       * src/lyxlex_pimpl.C (next): do not re-declare the default value
+       of arguments.
+       * src/buffer.C (getLatexName): ditto
+       (setReadonly): ditto
+
 2000-04-11  Lars Gullik Bjønnes  <larsbj@lyx.org>
 
        * src/LaTeXFeatures.h: add a const reference to BufferParams, to
        avoid some uses of current_view. Added also a bufferParams()
-       mathod to get at this.
+       method to get at this.
 
        * src/lyxtext.h: changed params->buffer and paramters->bparams.
 
 2000-04-10  Lars Gullik Bjønnes  <larsbj@lyx.org>
 
        * src/lyxparagraph.[Ch]: removed
-       operator<(LyXParagraph::InsetTabe..., added a struct matchIT
+       operator<(LyXParagraph::InsetTable..., added a struct matchIT
        with operators used by lower_bound and
        upper_bound in InsetTable's
        Make struct InsetTable private again. Used matchpos.
        * src/*: Add "explicit" on several constructors, I added probably
        some unneeded ones. A couple of changes to code because of this.
 
-       * src/BufferView.[Ch]: Used the "pimpl" idom to hide more of the
+       * src/BufferView.[Ch]: Used the "pimpl" idiom to hide more of the
        implementation and private parts from the users of BufferView. Not
        quite finished.
 
-       * src/lyxlex.[Ch]: Used the "pimpl" idom to hide more of the
-       implementaaion and private parts from the users of LyXLex. Not
+       * src/lyxlex.[Ch]: Used the "pimpl" idiom to hide more of the
+       implementation and private parts from the users of LyXLex. Not
        quite finished.
 
        * src/BufferView_pimpl.[Ch]: new files
 
        * src/lyxlex_pimpl.[Ch]: new files
 
-       * src/LyXView.[Ch]: some inline functios move out-of-line
+       * src/LyXView.[Ch]: some inline functions move out-of-line
 
 2000-04-04  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
 
-       * src/lyxparagraph.h: make strict InsetTable public.
+       * src/lyxparagraph.h: make struct InsetTable public.
 
        * src/support/lyxstring.h: change lyxstring::difference_type to be
        ptrdiff_t. Add std:: modifiers to streams.
index b5e5d99dc267bcedd26fc903a3bfd7f967a3f30c..f36aa069e7945b6e222e6a48f86cda9988a7a4a4 100644 (file)
@@ -167,14 +167,14 @@ Buffer::~Buffer()
 }
 
 
-string Buffer::getLatexName(bool no_path = true) const
+string Buffer::getLatexName(bool no_path /* = true */) const
 {
        return ChangeExtension(MakeLatexName(filename), 
                               ".tex", no_path); 
 }
 
 
-void Buffer::setReadonly(bool flag = true)
+void Buffer::setReadonly(bool flag /* = true */)
 {
        if (read_only != flag) {
                read_only = flag; 
index cf0ef61651c8e6fc4691f1792b3bc72c2afdf4d5..076dcace2ec3042589adc4fa55b5baea35eb9b17 100644 (file)
@@ -180,7 +180,7 @@ void InsetLatexAccent::checkContents()
                plusasc = true; // at the top (not really needed)
                break;
        default:
-               printf ("Default\n");
+               lyxerr[Debug::KEY] << "Default" << endl;
                // unknow accent (or something else)
                 return;
         }
index 96959eb131b77010bd5e319a122a645ddcb5f32c..dc3a66d7334b30c1945f1f96611a078d604cf7b9 100644 (file)
@@ -409,3 +409,11 @@ void WarnReadonly(string const & file)
                   _("The document is read-only:"),
                   file);
 }
+
+/// Get the dpi setting of the current screen
+float getScreenDPI()
+{
+       Screen * scr = DefaultScreenOfDisplay(fl_get_display());
+       return ((HeightOfScreen(scr) * 25.4 / HeightMMOfScreen(scr)) +
+               (WidthOfScreen(scr) * 25.4 / WidthMMOfScreen(scr))) / 2;
+}
index 485c30f341c447c39165ae899f7f4e92d0743963..f9c6107e33a57188bd8db73077a6706b84c2c27a 100644 (file)
@@ -61,6 +61,9 @@ std::pair<bool, string> askForText(string const & msg,
 /// Informs the user that changes in the coming form will be ignored
 void WarnReadonly(string const & file);
 
+/// Get the dpi setting of the current screen
+float getScreenDPI();
+
 // inlined functions
 /// rings the audio bell.
 inline
index 93342fcc676e69a70319f528c794d3d0c198eba2..9960324420bc9fc889573e05188347d8f7cfd36b 100644 (file)
@@ -336,16 +336,13 @@ void LyX::init(int */*argc*/, char **argv, bool gui)
                lyxrc.lastfiles = AddName(user_lyxdir, "lastfiles");
        }
 
-       // Calculate screen dpi as average of x-DPI and y-DPI:
        // Disable gui when either lyxrc or easyparse says so
        if (!gui)
                lyxrc.use_gui = false;
  
         // Calculate screen dpi as average of x-DPI and y-DPI:
        if (lyxrc.use_gui) {
-               Screen * scr = DefaultScreenOfDisplay(fl_get_display());
-               lyxrc.dpi = ((HeightOfScreen(scr)* 25.4 / HeightMMOfScreen(scr)) +
-                             (WidthOfScreen(scr)* 25.4 / WidthMMOfScreen(scr))) / 2;
+               lyxrc.dpi = getScreenDPI();
                lyxerr[Debug::INFO] << "DPI setting detected to be "
                                                 << lyxrc.dpi + 0.5 << endl;
        } else {
index 8f9b86ff11c7f48d1c1bb2b09cbdf1f4da8ca3aa..f7674d3991fb4d0060533796f43034babed3913c 100644 (file)
@@ -140,7 +140,7 @@ void LyXLex::Pimpl::setStream(istream & i)
 }
 
 
-bool LyXLex::Pimpl::next(bool esc = false)
+bool LyXLex::Pimpl::next(bool esc /* = false */)
 {
        if (!esc) {
                unsigned char c = 0; // getc() returns an int
index 2221ddd941fbf8ea3f261e4b5db202a69ed84d79..c271a8af8041f2a6f84b6909793bf753cb2fd2d6 100644 (file)
@@ -430,6 +430,7 @@ void LyXServer::callback(LyXServer * serv, string const & msg)
        bool server_only = false;
        while(*p) {
                // --- 1. check 'header' ---
+
                if (strncmp(p, "LYXSRV:", 7) == 0) {
                        server_only = true; 
                } else if(0!= strncmp(p, "LYXCMD:", 7)) {
@@ -527,7 +528,7 @@ void LyXServer::callback(LyXServer * serv, string const & msg)
                        string rval, buf;
                    
                        if (action>= 0) {
-                               rval = serv->func->Dispatch(cmd);
+                               rval = serv->func->Dispatch(action, arg.c_str());
                        } else {
                                rval = "Unknown command";
                        }
index a42aae24819287ae466f0743cd2fc9009129ee1e..84a77f2c77b87001fbb8f0596cf24ef23edf0c02 100644 (file)
@@ -1277,11 +1277,11 @@ void Menus::ShowInsertMenu(FL_OBJECT * ob, long)
 
        int SubInsertFloatList = fl_defpup(FL_ObjWin(ob),
                                           _("Floats%t"
-                                            "|Figure Float%x71"
-                                            "|Table Float%x72"
-                                            "|Wide Figure Float%x73"
-                                            "|Wide Table Float%l%x74"
-                                            "|Algorithm Float%x75"));
+                                            "|Figure%x71"
+                                            "|Table%x72"
+                                            "|Wide Figure%x73"
+                                            "|Wide Table%l%x74"
+                                            "|Algorithm%x75"));
        
        fl_setpup_shortcut(SubInsertFloatList, 71, scex(_("IMF|gG#g#G")));
        fl_setpup_shortcut(SubInsertFloatList, 72, scex(_("IMF|Tt#t#T")));
@@ -1310,14 +1310,14 @@ void Menus::ShowInsertMenu(FL_OBJECT * ob, long)
        fl_setpup_shortcut(SubInsertSpecial, 38, scex(_("IMS|Mm#m#M")));
        
        int InsertMenu = fl_defpup(FL_ObjWin(ob),
-                                  _("Figure..."
-                                    "|Table...%l"
+                                  _("Graphic..."
+                                    "|Table Box...%l"
                                     "|Include File..." 
                                     "|Import ASCII File%m"
                                     "|Insert LyX File...%l"
                                     "|Footnote"
                                     "|Margin Note"
-                                    "|Floats%m%l"      
+                                    "|Floating Material%m%l"      
                                     "|Lists & TOC%m%l"
                                     "|Special Character%m%l"
                                     "|Note..."
@@ -1615,6 +1615,7 @@ static
 char const * doc_files [] = {"Intro", "Tutorial", 
                             "UserGuide", "Extended",
                             "Customization", "Reference",
+                            "FAQ", "TOC",  
                             "BUGS", "LaTeXConfig"}; 
 
 void Menus::ShowHelpMenu(FL_OBJECT * ob, long)
@@ -1633,6 +1634,8 @@ void Menus::ShowHelpMenu(FL_OBJECT * ob, long)
                                   "|Extended Features"
                                   "|Customization"
                                   "|Reference Manual"
+                                  "|FAQ"
+                                  "|Table of Contents"
                                   "|Known Bugs"
                                   "|LaTeX Configuration%l"
                                   "|Copyright and Warranty..."
@@ -1645,11 +1648,13 @@ void Menus::ShowHelpMenu(FL_OBJECT * ob, long)
        fl_setpup_shortcut(HelpMenu,  4, scex(_("HM|xX#x#X")));
        fl_setpup_shortcut(HelpMenu,  5, scex(_("HM|Cc#C#c")));
        fl_setpup_shortcut(HelpMenu,  6, scex(_("HM|Rr#R#r")));
-       fl_setpup_shortcut(HelpMenu,  7, scex(_("HM|Kk#K#k")));
-       fl_setpup_shortcut(HelpMenu,  8, scex(_("HM|Ll#L#l")));
-       fl_setpup_shortcut(HelpMenu,  9, scex(_("HM|oO#o#O")));
-       fl_setpup_shortcut(HelpMenu, 10, scex(_("HM|eE#e#E")));
-       fl_setpup_shortcut(HelpMenu, 11, scex(_("HM|Vv#v#V")));
+       fl_setpup_shortcut(HelpMenu,  7, scex(_("HM|Ff#F#f")));
+       fl_setpup_shortcut(HelpMenu,  8, scex(_("HM|aA#a#A")));
+       fl_setpup_shortcut(HelpMenu,  9, scex(_("HM|Kk#K#k")));
+       fl_setpup_shortcut(HelpMenu, 10, scex(_("HM|Ll#L#l")));
+       fl_setpup_shortcut(HelpMenu, 11, scex(_("HM|oO#o#O")));
+       fl_setpup_shortcut(HelpMenu, 12, scex(_("HM|eE#e#E")));
+       fl_setpup_shortcut(HelpMenu, 13, scex(_("HM|Vv#v#V")));
 
        fl_setpup_position(
                men->_view->getForm()->x + ob->x,
@@ -1663,14 +1668,14 @@ void Menus::ShowHelpMenu(FL_OBJECT * ob, long)
 
        switch (choice) {
        case 1: case 2: case 3: case 4: case 5: 
-       case 6: case 7: case 8:
+       case 6: case 7: case 8: case 9: case 10:
                ProhibitInput();
                men->MenuDocu(doc_files[choice - 1]);
                AllowInput();
                break;
-       case 9: ShowCopyright(); break;
-       case 10: ShowCredits(); break;
-       case 11:
+       case 11: ShowCopyright(); break;
+       case 12: ShowCredits(); break;
+       case 13:
                ProhibitInput();
                fl_show_message((string(_("LyX Version ")) + LYX_VERSION 
                                 + _(" of ") + LYX_RELEASE).c_str(),
index 9e87488a087a0ecd212e983ca9e97997f093edb4..b19c4b812b060953a02ee2f3bbdb6e81c52f8340 100644 (file)
@@ -82,7 +82,15 @@ struct Debug {
     debug[Debug::type(Debug::INFO | Debug::CRIT)] << "...info/crit...\n";
 
 */
+
+// This workaround is needed only for gcc 2.8.1 (and possibly egcs
+// 1.0.x), which generates a compiler error when subclassing from
+// std::. (JMarc)
+#ifdef CXX_WORKING_NAMESPACES
 class DebugStream : public std::ostream {
+#else
+class DebugStream : public ostream {
+#endif
 public:
        /// Constructor, sets the debug level to t.
        explicit DebugStream(Debug::type t = Debug::NONE);
index d194b5bc2f5b33472a9ba2209f187d5c8af10ee0..808917a39326ca9e78a0f388755e2c9ea216c9ac 100644 (file)
@@ -66,7 +66,7 @@ char const * tex_graphics[] = {"default", "dvips", "dvitops", "emtex",
                      "ln", "oztex", "textures", "none", ""};
 
 
-char const * tex_fonts[] = {"default", "times", "palatino", "helvet", "avant",
-                    "newcent", "bookman", ""};
+char const * tex_fonts[] = {"default", "pslatex", "times", "palatino",
+                           "helvet", "avant", "newcent", "bookman", ""};