fix 773 and more (from Juergen S); fix warning

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6149 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2003-02-14 13:52:32 +00:00
parent 4bc0b6a930
commit f5cc372223
7 changed files with 47 additions and 32 deletions

View File

@ -1,3 +1,8 @@
2003-02-14 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* text2.C (LyXText): change order of initilizers to shut off
warnings
2003-02-14 John Levon <levon@movementarian.org>
* buffer.C: use ParIterator for getParFromID()

View File

@ -1,3 +1,8 @@
2003-02-09 Juergen Spitzmueller <j.spitzmueller@gmx.de>
* tex_helpers.C (getTexFileList): sort and dis-duplicate
listWithoutPath correctly.
2003-02-08 John Levon <levon@movementarian.org>
* ControlPrefs.h:

View File

@ -78,10 +78,16 @@ string const getTexFileList(string const & filename, bool withFullPath)
vector<string> dbase =
getVectorFromString(GetFileContents(file), "\n");
lyx::eliminate_duplicates(dbase);
string const str_out = withFullPath ?
getStringFromVector(dbase, "\n") :
getStringFromVector(listWithoutPath(dbase), "\n");
if (withFullPath) {
lyx::eliminate_duplicates(dbase);
string const str_out =
getStringFromVector(dbase, "\n");
return str_out;
}
vector<string> dbaseWP = listWithoutPath(dbase);
lyx::eliminate_duplicates(dbaseWP);
string const str_out =
getStringFromVector(dbaseWP, "\n");
return str_out;
}

View File

@ -1,3 +1,9 @@
2003-02-09 Juergen Spitzmueller <j.spitzmueller@gmx.de>
* QBibtexDialog.C: Fix browsing mechanism of *.sty files (bug 773).
* ui/QBibtexDialogBase.ui: Remove unused Update button (bug 773).
2003-02-13 John Levon <levon@movementarian.org>
* ui/QSpellcheckerDialogBase.ui: A&dd not &Add, bug 884

View File

@ -58,8 +58,21 @@ void QBibtexDialog::browsePressed()
0,
qt_("Select a BibTeX style"));
if (!file.isNull()) {
string const filen = ChangeExtension(OnlyFilename(fromqstr(file)), "");
styleCB->insertItem(toqstr(filen),0);
string const filen = ChangeExtension(fromqstr(file), "");
bool present = false;
int pres = 0;
for (unsigned int i = 0; i != styleCB->count(); i++) {
if (fromqstr(styleCB->text(i)) == filen) {
present = true;
pres = i;
}
}
if (!present)
styleCB->insertItem(toqstr(filen),0);
styleCB->setCurrentItem(pres);
form_->changed();
}
}

View File

@ -13,8 +13,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>285</width>
<height>333</height>
<width>281</width>
<height>315</height>
</rect>
</property>
<property stdset="1">
@ -213,25 +213,6 @@
<string>Choose a style file</string>
</property>
</widget>
<widget row="7" column="1" >
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>styleListPB</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>&amp;Update</string>
</property>
<property stdset="1">
<name>autoDefault</name>
<bool>false</bool>
</property>
<property>
<name>toolTip</name>
<string>Update style list</string>
</property>
</widget>
<widget row="9" column="0" rowspan="1" colspan="2" >
<class>QLayoutWidget</class>
<property stdset="1">
@ -376,7 +357,6 @@
<tabstop>deletePB</tabstop>
<tabstop>stylePB</tabstop>
<tabstop>styleCB</tabstop>
<tabstop>styleListPB</tabstop>
<tabstop>bibtocCB</tabstop>
<tabstop>okPB</tabstop>
<tabstop>closePB</tabstop>

View File

@ -53,16 +53,16 @@ using lyx::pos_type;
LyXText::LyXText(BufferView * bv)
: height(0), width(0), first_y(0),
bv_owner(bv), inset_owner(0), the_locking_inset(0),
need_break_row(0), refresh_y(0), refresh_row(0),
inset_owner(0), the_locking_inset(0), need_break_row(0),
refresh_y(0), refresh_row(0), bv_owner(bv),
status_(LyXText::UNCHANGED), firstrow(0), lastrow(0)
{}
LyXText::LyXText(InsetText * inset)
: height(0), width(0), first_y(0),
bv_owner(0), inset_owner(inset), the_locking_inset(0),
need_break_row(0), refresh_y(0), refresh_row(0),
inset_owner(inset), the_locking_inset(0), need_break_row(0),
refresh_y(0), refresh_row(0), bv_owner(0),
status_(LyXText::UNCHANGED), firstrow(0), lastrow(0)
{}