+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.
}
-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;
plusasc = true; // at the top (not really needed)
break;
default:
- printf ("Default\n");
+ lyxerr[Debug::KEY] << "Default" << endl;
// unknow accent (or something else)
return;
}
_("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;
+}
/// 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
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 {
}
-bool LyXLex::Pimpl::next(bool esc = false)
+bool LyXLex::Pimpl::next(bool esc /* = false */)
{
if (!esc) {
unsigned char c = 0; // getc() returns an int
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)) {
string rval, buf;
if (action>= 0) {
- rval = serv->func->Dispatch(cmd);
+ rval = serv->func->Dispatch(action, arg.c_str());
} else {
rval = "Unknown command";
}
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")));
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..."
char const * doc_files [] = {"Intro", "Tutorial",
"UserGuide", "Extended",
"Customization", "Reference",
+ "FAQ", "TOC",
"BUGS", "LaTeXConfig"};
void Menus::ShowHelpMenu(FL_OBJECT * ob, long)
"|Extended Features"
"|Customization"
"|Reference Manual"
+ "|FAQ"
+ "|Table of Contents"
"|Known Bugs"
"|LaTeX Configuration%l"
"|Copyright and Warranty..."
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,
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(),
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);
"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", ""};