Jean-Marc Lasgouttes wrote:
> Could you 'cvs update' and send me the remaining parts that I
> forgot?

Attached. Many thanks,
Jürgen.
Index: lib/ChangeLog
===================================================================
RCS file: /cvs/lyx/lyx-devel/lib/ChangeLog,v
retrieving revision 1.377
diff -u -r1.377 ChangeLog
--- lib/ChangeLog	2003/02/13 17:49:06	1.377
+++ lib/ChangeLog	2003/02/14 14:24:30
@@ -1,3 +1,8 @@
+2003-02-14  Juergen Spitzmueller  <[EMAIL PROTECTED]>
+
+	* scripts/TeXFiles.sh: Add search for *.bib-files (>bibFiles.lst)
+	changed version to 0.3.
+
 2003-02-11  Jean-Marc Lasgouttes  <[EMAIL PROTECTED]>
 
 	* templates/elsart.lyx: 
Index: lib/scripts/TeXFiles.sh
===================================================================
RCS file: /cvs/lyx/lyx-devel/lib/scripts/TeXFiles.sh,v
retrieving revision 1.5
diff -u -r1.5 TeXFiles.sh
--- lib/scripts/TeXFiles.sh	2002/08/09 15:42:45	1.5
+++ lib/scripts/TeXFiles.sh	2003/02/14 14:24:32
@@ -4,27 +4,31 @@
 # TeX class files	-> option cls 
 # TeX style files 	-> option sty
 # bibtex style files 	-> option bst
+# bibtex database files -> option bib
 #
 # with the help
 # of kpsewhich and creates a 
-# bstFiles.lst, clsFiles.lst, styFiles.lst
+# bstFiles.lst, clsFiles.lst, styFiles.lst, bibFiles.lst
 # without any parameter all files are created.
 #
 # Herbert Voss <[EMAIL PROTECTED]>
 #
 # Updates from Jean-Marc Lasgouttes.
 #
+# bib support added by Juergen Spitzmueller (v0.3)
+#
 CLS_STYLEFILE=clsFiles.lst
 STY_STYLEFILE=styFiles.lst
 BST_STYLEFILE=bstFiles.lst
-version='$Id: TeXFiles.sh,v 0.2 2001-10-15'
+BIB_FILES=bibFiles.lst
+version='$Id: TeXFiles.sh,v 0.3 2003-02-14'
 progname=`echo $0 | sed 's%.*/%%'`
-usage="Usage: TeXFiles.sh [-version | cls | sty | bst] 
+usage="Usage: TeXFiles.sh [-version | cls | sty | bst | bib ] 
        Default is without any Parameters,
        so that all files will be created"
 
 types=$1
-test -z "$types" && types="cls sty bst"
+test -z "$types" && types="cls sty bst bib"
 
 #
 # MS-DOS and MS-Windows define $COMSPEC or $ComSpec and use ';' to separate
@@ -59,6 +63,8 @@
         kpsetype=.tex;;
    bst) outfile=$BST_STYLEFILE
         kpsetype=.bst;;
+   bib) outfile=$BIB_FILES
+        kpsetype=.bib;;
    *)   echo "ERROR: unknown type $type"
         exit 1;;
   esac
Index: src/frontends/controllers/ChangeLog
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/controllers/ChangeLog,v
retrieving revision 1.276
diff -u -r1.276 ChangeLog
--- src/frontends/controllers/ChangeLog	2003/02/14 13:52:31	1.276
+++ src/frontends/controllers/ChangeLog	2003/02/14 14:24:38
@@ -1,4 +1,7 @@
-2003-02-09  Juergen Spitzmueller  <[EMAIL PROTECTED]>
+2003-02-14  Juergen Spitzmueller  <[EMAIL PROTECTED]>
+
+	* ControlBibtex.[Ch]: new function getBibFiles() (provides list
+	of available *.bib-files from bibFiles.lst).
 
 	* tex_helpers.C (getTexFileList): sort and dis-duplicate
 	listWithoutPath correctly.
Index: src/frontends/controllers/ControlBibtex.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/controllers/ControlBibtex.C,v
retrieving revision 1.26
diff -u -r1.26 ControlBibtex.C
--- src/frontends/controllers/ControlBibtex.C	2003/02/13 16:52:46	1.26
+++ src/frontends/controllers/ControlBibtex.C	2003/02/14 14:24:38
@@ -76,6 +76,18 @@
 }
 
 
+string const ControlBibtex::getBibFiles() const
+{
+	string list = getTexFileList("bibFiles.lst", false);
+	// test, if we have a valid list, otherwise run rescan
+	if (list.empty()) {
+		rescanBibStyles();
+		list = getTexFileList("bibFiles.lst", false);
+	}
+	return list;
+}
+
+
 void ControlBibtex::rescanBibStyles() const
 {
 	rescanTexStyles();
Index: src/frontends/controllers/ControlBibtex.h
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/controllers/ControlBibtex.h,v
retrieving revision 1.14
diff -u -r1.14 ControlBibtex.h
--- src/frontends/controllers/ControlBibtex.h	2003/02/13 16:52:46	1.14
+++ src/frontends/controllers/ControlBibtex.h	2003/02/14 14:24:38
@@ -26,7 +26,9 @@
 	string const Browse(string const &, string const &, string const &);
 	/// get the list of bst files
 	string const getBibStyles() const;
-	/// build filelists of all availabe bst/cls/sty-files. done through
+	/// get the list of bib files
+	string const getBibFiles() const;
+	/// build filelists of all availabe bib/bst/cls/sty-files. done through
 	/// kpsewhich and an external script, saved in *Files.lst
 	void rescanBibStyles() const;
 private:
Index: src/frontends/qt2/ChangeLog
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/qt2/ChangeLog,v
retrieving revision 1.398
diff -u -r1.398 ChangeLog
--- src/frontends/qt2/ChangeLog	2003/02/14 13:52:32	1.398
+++ src/frontends/qt2/ChangeLog	2003/02/14 14:24:43
@@ -1,8 +1,11 @@
-2003-02-09  Juergen Spitzmueller  <[EMAIL PROTECTED]>
+2003-02-14  Juergen Spitzmueller  <[EMAIL PROTECTED]>
 
 	* QBibtexDialog.C: Fix browsing mechanism of *.sty files (bug 773).
-
+	
 	* ui/QBibtexDialogBase.ui: Remove unused Update button (bug 773).
+	Replace addBib LineEdit with ComboBox.
+	
+	* QBibtex.C: Insert available .bib-files into addBibCB. 
 
 2003-02-13  John Levon  <[EMAIL PROTECTED]>
 
Index: src/frontends/qt2/QBibtex.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/qt2/QBibtex.C,v
retrieving revision 1.18
diff -u -r1.18 QBibtex.C
--- src/frontends/qt2/QBibtex.C	2003/02/13 16:52:52	1.18
+++ src/frontends/qt2/QBibtex.C	2003/02/14 14:24:43
@@ -71,6 +71,18 @@
 		if (!bib.empty())
 			dialog_->databaseLB->insertItem(toqstr(bib));
 	}
+	
+	dialog_->addBibCB->clear();
+
+	vector<string> const bib_str = getVectorFromString(
+		controller().getBibFiles(), "\n");
+	for (vector<string>::const_iterator it = bib_str.begin();
+		it != bib_str.end(); ++it) {
+		string bibItem(ChangeExtension(*it, ""));
+		dialog_->addBibCB->insertItem(toqstr(bibItem));
+	}
+	dialog_->addBibCB->clearEdit();
+
 
 	string bibtotoc = "bibtotoc";
 	string bibstyle(controller().params().getOptions());
Index: src/frontends/qt2/QBibtexDialog.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/qt2/QBibtexDialog.C,v
retrieving revision 1.16
diff -u -r1.16 QBibtexDialog.C
--- src/frontends/qt2/QBibtexDialog.C	2003/02/14 13:52:32	1.16
+++ src/frontends/qt2/QBibtexDialog.C	2003/02/14 14:24:43
@@ -60,7 +60,7 @@
 	if (!file.isNull()) {
 		string const filen = ChangeExtension(fromqstr(file), "");
 		bool present = false;
-		int pres = 0;
+		unsigned int pres = 0;
 
 		for (unsigned int i = 0; i != styleCB->count(); i++) {
 			if (fromqstr(styleCB->text(i)) == filen) {
@@ -100,7 +100,7 @@
 
 void QBibtexDialog::addPressed()
 {
-	QString const file = addBibED->text();
+	QString const file = addBibCB->currentText();
 	if (!file.isNull()) {
 		string const f = ChangeExtension(file.latin1(), "");
 		bool present = false;
Index: src/frontends/qt2/ui/QBibtexDialogBase.ui
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/qt2/ui/QBibtexDialogBase.ui,v
retrieving revision 1.2
diff -u -r1.2 QBibtexDialogBase.ui
--- src/frontends/qt2/ui/QBibtexDialogBase.ui	2003/02/14 13:52:32	1.2
+++ src/frontends/qt2/ui/QBibtexDialogBase.ui	2003/02/14 14:24:45
@@ -13,7 +13,7 @@
         <rect>
             <x>0</x>
             <y>0</y>
-            <width>281</width>
+            <width>265</width>
             <height>315</height>
         </rect>
     </property>
@@ -72,7 +72,7 @@
             </property>
             <property>
                 <name>toolTip</name>
-                <string>Available BibTeX databases</string>
+                <string>Selected BibTeX databases</string>
             </property>
         </widget>
         <widget row="1"  column="1" >
@@ -90,17 +90,6 @@
                 <string>Add a BibTeX database file</string>
             </property>
         </widget>
-        <widget row="1"  column="0" >
-            <class>QLineEdit</class>
-            <property stdset="1">
-                <name>name</name>
-                <cstring>addBibED</cstring>
-            </property>
-            <property>
-                <name>toolTip</name>
-                <string>Add a BibTeX file manually</string>
-            </property>
-        </widget>
         <widget row="2"  column="1" >
             <class>QPushButton</class>
             <property stdset="1">
@@ -156,25 +145,6 @@
                 </size>
             </property>
         </spacer>
-        <widget row="6"  column="0" >
-            <class>QComboBox</class>
-            <property stdset="1">
-                <name>name</name>
-                <cstring>styleCB</cstring>
-            </property>
-            <property stdset="1">
-                <name>editable</name>
-                <bool>true</bool>
-            </property>
-            <property stdset="1">
-                <name>autoCompletion</name>
-                <bool>true</bool>
-            </property>
-            <property stdset="1">
-                <name>duplicatesEnabled</name>
-                <bool>false</bool>
-            </property>
-        </widget>
         <widget row="5"  column="0" >
             <class>QLabel</class>
             <property stdset="1">
@@ -213,7 +183,7 @@
                 <string>Choose a style file</string>
             </property>
         </widget>
-        <widget row="9"  column="0"  rowspan="1"  colspan="2" >
+        <widget row="8"  column="0"  rowspan="1"  colspan="2" >
             <class>QLayoutWidget</class>
             <property stdset="1">
                 <name>name</name>
@@ -277,7 +247,7 @@
                 </widget>
             </hbox>
         </widget>
-        <widget row="8"  column="0" >
+        <widget row="7"  column="0" >
             <class>QCheckBox</class>
             <property stdset="1">
                 <name>name</name>
@@ -290,6 +260,52 @@
             <property>
                 <name>toolTip</name>
                 <string>Add bibliography to the table of contents</string>
+            </property>
+        </widget>
+        <widget row="6"  column="0" >
+            <class>QComboBox</class>
+            <property stdset="1">
+                <name>name</name>
+                <cstring>styleCB</cstring>
+            </property>
+            <property stdset="1">
+                <name>editable</name>
+                <bool>true</bool>
+            </property>
+            <property stdset="1">
+                <name>autoCompletion</name>
+                <bool>true</bool>
+            </property>
+            <property stdset="1">
+                <name>duplicatesEnabled</name>
+                <bool>false</bool>
+            </property>
+            <property>
+                <name>toolTip</name>
+                <string>Chose a style file</string>
+            </property>
+        </widget>
+        <widget row="1"  column="0" >
+            <class>QComboBox</class>
+            <property stdset="1">
+                <name>name</name>
+                <cstring>addBibCB</cstring>
+            </property>
+            <property stdset="1">
+                <name>editable</name>
+                <bool>true</bool>
+            </property>
+            <property stdset="1">
+                <name>autoCompletion</name>
+                <bool>true</bool>
+            </property>
+            <property stdset="1">
+                <name>duplicatesEnabled</name>
+                <bool>false</bool>
+            </property>
+            <property>
+                <name>toolTip</name>
+                <string>Select a database</string>
             </property>
         </widget>
     </grid>

Reply via email to