}
} else if (token == "\\added_space_top") {
lex.nextToken();
- par->params().spaceTop(VSpace(lex.getString()));
+ VSpace value = VSpace(lex.getString());
+ if ((value.length().len().value() != 0) ||
+ (value.kind() != VSpace::LENGTH))
+ par->params().spaceTop(value);
} else if (token == "\\added_space_bottom") {
lex.nextToken();
- par->params().spaceBottom(VSpace(lex.getString()));
+ VSpace value = VSpace(lex.getString());
+ if ((value.length().len().value() != 0) ||
+ (value.kind() != VSpace::LENGTH))
+ par->params().spaceBottom(value);
#ifndef NO_COMPABILITY
#ifndef NO_PEXTRA_REALLY
} else if (token == "\\pextra_type") {
+2002-02-08 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
+
+ * Menubar_pimpl.C (create_submenu): work around an xforms bug (?)
+ where one could not have both toggleon and disabled.
2002-02-08 Herbert Voss <voss@lyx.org>
switch (item.kind()) {
case MenuItem::Command: {
- FuncStatus flag =
+ FuncStatus const flag =
view->getLyXFunc()->getStatus(item.action());
-
// handle optional entries.
if (item.optional()
&& (flag.disabled())) {
// Modify the entry using the function status
string pupmode;
- if (flag.disabled() || flag.unknown())
- pupmode += "%i";
if (flag.onoff(true))
pupmode += "%B";
if (flag.onoff(false))
pupmode += "%b";
+ if (flag.disabled() || flag.unknown())
+ pupmode += "%i";
label += pupmode;
// Finally the menu shortcut
2002-02-08 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
+ * filetools.C (do_popen): use os::read_mode().
+
+ * os_win32.C (read_mode):
+ * os_os2.C (read_mode):
+ * os_unix.C (read_mode): new method
+
* filetools.C (do_popen): fix for cygwin compatibility (from Claus
Hentschel). This code should maybe be moved to os:: class.
// pstream (process stream), with the
// variants ipstream, opstream
- // CYGWIN needs 'b', but linux only works without it
-#ifdef __CYGWIN__
- FILE * inf = ::popen(cmd.c_str(), "rb");
-#else
- FILE * inf = ::popen(cmd.c_str(), "r");
-#endif
+ FILE * inf = ::popen(cmd.c_str(), os::read_mode());
// (Claus Hentschel) Check if popen was succesful ;-)
if (!inf)
static string internal_path(string const &p);
// is path absolute?
static bool is_absolute_path(string const & p);
-
+ // returns a string suitable to be passed to fopen/popen when
+ // reading a file
+ static char const * read_mode();
//
static void warn(string mesg);
private:
&& isalpha(static_cast<unsigned char>(p[0]))
&& p[1] == ':');
}
+
+
+// returns a string suitable to be passed to fopen/popen when
+// reading a file
+char const * os::read_mode()
+{
+ return "r";
+}
{
return (!p.empty() && p[0] == '/');
}
+
+// returns a string suitable to be passed to fopen/popen when
+// reading a file
+char const * os::read_mode()
+{
+ return "r";
+}
return isDosPath | isUnixPath;
}
+
+// returns a string suitable to be passed to fopen/popen when
+// reading a file
+char const * os::read_mode()
+{
+ return "rb";
+}