Fix bugs #32 and #52.

Add a couple of isOK() calls to xforms_helpers functions and remove those
FIXMEs!


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3307 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2002-01-07 17:57:21 +00:00
parent 363e313ecb
commit 9c4446b159
8 changed files with 37 additions and 15 deletions

View File

@ -1,3 +1,8 @@
2002-01-07 Angus Leeming <a.leeming@ic.ac.uk>
* lyx_gui.C (init): set the style of the menu popups to
FL_BOLD_STYLE, thereby fixing bugzilla bug #32.
2002-01-07 Juergen Vigna <jug@sad.it>
* text.C (setHeightOfRow): small fix

View File

@ -1,3 +1,9 @@
2002-01-07 Angus Leeming <a.leeming@ic.ac.uk>
* ControlSpellchecker.C (clearParams): show the closing message
only if some words have been checked, thereby fixing
bugzilla bug #52.
2001-12-11 Michael A. Koziarski <michael@koziarski.org>
* ControlFloat.[Ch]: changes to prevent here definitely being used

View File

@ -233,17 +233,18 @@ void ControlSpellchecker::clearParams()
lv_.view()->endOfSpellCheck();
// show closing message
view().partialUpdate(2);
// show closing message if any words were checked.
if (count_ > 0)
view().partialUpdate(2);
// reset values to initial
rtl_ = false;
word_ = "";
word_.erase();
newval_ = 0.0;
oldval_ = 0;
newvalue_ = 0;
count_ = 0;
message_ = "";
message_.erase();
stop_ = false;
result_ = SpellBase::ISP_OK;
speller_ = 0;

View File

@ -1,3 +1,15 @@
2002-01-07 Angus Leeming <a.leeming@ic.ac.uk>
* FormFiledialog.C (Reread): used locally stored modtime variable
rather than make repeated calls to fileInfo.getModificationTime().
* xforms_helpers.C (ReadableFile, WriteableFile): added a couple of
isOK() checks to the use of the FileInfo instance and removed those
FIXMEs.
* Menubar_pimpl.C: added a variable MENU_LABEL_STYLE and use it.
Set it to FL_BOLD_STYLE, thereby fixing bugzilla bug #32.
2002-01-07 John Levon <moz@compsoc.man.ac.uk>
* form_*:

View File

@ -285,9 +285,8 @@ void FileDialog::Private::Reread()
time_t modtime = fileInfo.getModificationTime();
string Time = ctime(&modtime);
if (curTime > fileInfo.getModificationTime() + SIX_MONTH_SEC
|| curTime < fileInfo.getModificationTime()
+ ONE_HOUR_SEC) {
if (curTime > modtime + SIX_MONTH_SEC
|| curTime < modtime + ONE_HOUR_SEC) {
// The file is fairly old or in the future. POSIX says
// the cutoff is 6 months old. Allow a 1 hour slop
// factor for what is considered "the future", to

View File

@ -43,6 +43,7 @@ namespace {
// Some constants
int const MENU_LABEL_SIZE = FL_NORMAL_SIZE;
int const MENU_LABEL_STYLE = FL_BOLD_STYLE;
int const mheight = 30;
int const mbheight= 22;
// where to place the menubar?
@ -62,7 +63,7 @@ int const action_offset = 1000;
inline
int string_width(string const & str)
{
return fl_get_string_widthTAB(FL_NORMAL_STYLE, MENU_LABEL_SIZE,
return fl_get_string_widthTAB(MENU_LABEL_STYLE, MENU_LABEL_SIZE,
str.c_str(),
static_cast<int>(str.length()));
}
@ -134,7 +135,7 @@ void Menubar::Pimpl::makeMenubar(Menu const & menu)
fl_set_object_boxtype(obj, FL_FLAT_BOX);
fl_set_object_color(obj, FL_MCOL, FL_MCOL);
fl_set_object_lsize(obj, MENU_LABEL_SIZE);
fl_set_object_lstyle(obj, FL_NORMAL_STYLE);
fl_set_object_lstyle(obj, MENU_LABEL_STYLE);
fl_set_object_resize(obj, FL_RESIZE_ALL);
fl_set_object_gravity(obj, NorthWestGravity,
NorthWestGravity);

View File

@ -460,13 +460,11 @@ bool RWInfo::WriteableFile(string const & name)
FileInfo d(name);
// FIXME: what is this supposed to do ?
// .newFile doesn't do what you think it does ...
if (!d.isOK() || !d.isDir()) {
d.newFile(dir);
}
if (!d.isDir()) {
if (!d.isOK() || !d.isDir()) {
error_message = N_("Directory does not exist.");
return false;
}
@ -507,12 +505,12 @@ bool RWInfo::ReadableFile(string const & name)
}
FileInfo d(name);
// FIXME: what is this supposed to do ?
if (!d.isOK() && !d.isDir()) {
d.newFile(dir);
}
if (!d.isDir()) {
if (!d.isOK() || !d.isDir()) {
error_message = N_("Directory does not exist.");
return false;
}

View File

@ -237,7 +237,7 @@ void LyXGUI::init()
// in setDefaults() (Matthias 140496)
// Moved from ::LyXGUI to ::init to allow popup font customization
// (petr 120997).
fl_setpup_fontstyle(FL_NORMAL_STYLE);
fl_setpup_fontstyle(FL_BOLD_STYLE);
fl_setpup_fontsize(FL_NORMAL_SIZE);
fl_setpup_color(FL_MCOL, FL_BLACK);
fl_set_goodies_font(FL_NORMAL_STYLE, FL_NORMAL_SIZE);