Various small fixes

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1306 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2001-01-09 13:58:48 +00:00
parent 12747e1af9
commit 43772015fd
10 changed files with 54 additions and 13 deletions

View File

@ -1,3 +1,21 @@
2001-01-07 Dekel Tsur <dekelts@tau.ac.il>
* lib/build-listerrors: Exit if literate-article doesn't appear in
textclass.lst
2001-01-09 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* src/combox.h (getline): small fix for sun CC 6.0
* src/combox.C (input_cb): ditto.
* src/spellchecker.C (sigchldhandler): ditto.
* src/lyx_main.C (init): do not query for creation of user
directory when running without a GUI.
2001-01-08 Dekel Tsur <dekelts@tau.ac.il>
* src/mathed/formula.C (LocalDispatch): Toggle font properties.
2001-01-07 Dekel Tsur <dekelts@tau.ac.il>
* BufferView2.C (open_new_inset): Added 2nd argument.

View File

@ -21,6 +21,12 @@ else
lyx=lyx
fi
if [ -z "`grep literate-article textclass.lst`" ]
then
touch listerrors
exit 0
fi
$lyx --export literate $dir/examples/Literate.lyx
# if no literate support stuff is installed nothing will be output
if [ -f $dir/examples/Literate.nw ]
@ -31,6 +37,9 @@ else
# you don't have noweb installed so we'll produce a dummy file
# just so make doesn't keep trying to output it.
touch listerrors
# tell the user nothing bad happened
echo
echo "LyX did not detect NoWeb support. Proceeding normally."
fi
exit 0

View File

@ -356,7 +356,7 @@ void Combox::input_cb(FL_OBJECT * ob, long)
char const * text = fl_get_input(ob);
combo->addto(text ? text : string());
combo->addto(text ? string(text) : string());
combo->is_empty = false;
}

View File

@ -232,7 +232,7 @@ string const Combox::getline() const
return fl_get_input(label);
else
return (browser && sel > 0) ?
fl_get_browser_line(browser, sel) : string();
string(fl_get_browser_line(browser, sel)) : string();
}
#endif

View File

@ -548,7 +548,7 @@ int Menubar::Pimpl::create_submenu(Window win, LyXView * view,
// tabs to align shortcuts.
do
label += '\t';
while (string_width(label) < max_width);
while (string_width(label) < max_width + 5);
label += accel.substr(1,accel.find(']') - 1);
}
label += "%x" + tostr(item.action() + action_offset)

View File

@ -351,10 +351,10 @@ void LyX::init(int */*argc*/, char **argv, bool gui)
bool explicit_userdir = true;
if (user_lyxdir.empty()) {
// LYX_USERDIR_11x environment variable
// LYX_USERDIR_11x environment variable
user_lyxdir = GetEnvPath("LYX_USERDIR_11x");
// default behaviour
// default behaviour
if (user_lyxdir.empty())
user_lyxdir = AddPath(GetEnvPath("HOME"),
string(".") + PACKAGE);
@ -364,8 +364,10 @@ void LyX::init(int */*argc*/, char **argv, bool gui)
lyxerr[Debug::INIT] << "User LyX directory: '"
<< user_lyxdir << '\'' << endl;
// Check that user LyX directory is ok.
queryUserLyXDir(explicit_userdir);
// Check that user LyX directory is ok. We don't do that if
// running in batch mode.
if (gui)
queryUserLyXDir(explicit_userdir);
//
// Shine up lyxrc defaults

View File

@ -896,12 +896,12 @@ InsetFormula::LocalDispatch(BufferView * bv,
}
// Math fonts
case LFUN_BOLD: mathcursor->setLastCode(LM_TC_BF); break;
case LFUN_SANS: mathcursor->setLastCode( LM_TC_SF); break;
case LFUN_EMPH: mathcursor->setLastCode(LM_TC_CAL); break;
case LFUN_ROMAN: mathcursor->setLastCode(LM_TC_RM); break;
case LFUN_CODE: mathcursor->setLastCode(LM_TC_TT); break;
case LFUN_DEFAULT: mathcursor->setLastCode(LM_TC_VAR ) ; break;
case LFUN_BOLD: mathcursor->toggleLastCode(LM_TC_BF); break;
case LFUN_SANS: mathcursor->toggleLastCode(LM_TC_SF); break;
case LFUN_EMPH: mathcursor->toggleLastCode(LM_TC_CAL); break;
case LFUN_ROMAN: mathcursor->toggleLastCode(LM_TC_RM); break;
case LFUN_CODE: mathcursor->toggleLastCode(LM_TC_TT); break;
case LFUN_DEFAULT: mathcursor->setLastCode(LM_TC_VAR); break;
case LFUN_TEX:
{
// varcode = LM_TC_TEX;

View File

@ -1030,3 +1030,11 @@ void MathedCursor::doAccent(MathedInset * p)
accent = 0; // consumed!
}
void MathedCursor::toggleLastCode(MathedTextCodes t)
{
if (lastcode == t)
lastcode = LM_TC_VAR;
else
lastcode = t;
}

View File

@ -127,6 +127,8 @@ class MathedCursor {
///
void setLastCode(MathedTextCodes t) { lastcode = t; }
///
void toggleLastCode(MathedTextCodes t);
///
MathedTextCodes getLastCode() const { return lastcode; }
protected:

View File

@ -966,7 +966,9 @@ bool RunSpellChecker(BufferView * bv)
}
}
#ifdef WITH_WARNINGS
#warning should go somewhere more sensible
#endif
void sigchldhandler(pid_t pid, int * status)
{
#ifndef USE_PSPELL