mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
* Include bibtex and makeindex logs to log file dialog.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32230 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
48168a92b4
commit
f73e3b358e
@ -19,6 +19,7 @@
|
|||||||
#include "Lexer.h"
|
#include "Lexer.h"
|
||||||
|
|
||||||
#include "support/docstring.h"
|
#include "support/docstring.h"
|
||||||
|
#include "support/FileName.h"
|
||||||
#include "support/gettext.h"
|
#include "support/gettext.h"
|
||||||
|
|
||||||
#include <QTextBrowser>
|
#include <QTextBrowser>
|
||||||
@ -117,6 +118,8 @@ GuiLog::GuiLog(GuiView & lv)
|
|||||||
connect(findPB, SIGNAL(clicked()), this, SLOT(find()));
|
connect(findPB, SIGNAL(clicked()), this, SLOT(find()));
|
||||||
// FIXME: find via returnPressed() does not work!
|
// FIXME: find via returnPressed() does not work!
|
||||||
connect(findLE, SIGNAL(returnPressed()), this, SLOT(find()));
|
connect(findLE, SIGNAL(returnPressed()), this, SLOT(find()));
|
||||||
|
connect(logTypeCO, SIGNAL(activated(int)),
|
||||||
|
this, SLOT(typeChanged(int)));
|
||||||
|
|
||||||
bc().setPolicy(ButtonPolicy::OkCancelPolicy);
|
bc().setPolicy(ButtonPolicy::OkCancelPolicy);
|
||||||
|
|
||||||
@ -146,6 +149,25 @@ void GuiLog::updateContents()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void GuiLog::typeChanged(int i)
|
||||||
|
{
|
||||||
|
string const type =
|
||||||
|
fromqstr(logTypeCO->itemData(i).toString());
|
||||||
|
string ext;
|
||||||
|
if (type == "latex")
|
||||||
|
ext = "log";
|
||||||
|
else if (type == "bibtex")
|
||||||
|
ext = "blg";
|
||||||
|
else if (type == "index")
|
||||||
|
ext = "ilg";
|
||||||
|
|
||||||
|
if (!ext.empty())
|
||||||
|
logfile_.changeExtension(ext);
|
||||||
|
|
||||||
|
updateContents();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void GuiLog::find()
|
void GuiLog::find()
|
||||||
{
|
{
|
||||||
logTB->find(findLE->text());
|
logTB->find(findLE->text());
|
||||||
@ -194,19 +216,35 @@ bool GuiLog::initialiseParams(string const & data)
|
|||||||
// Parsing of the data failed.
|
// Parsing of the data failed.
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (logtype == "latex")
|
logTypeCO->setEnabled(logtype == "latex");
|
||||||
|
logTypeCO->clear();
|
||||||
|
|
||||||
|
FileName log(logfile);
|
||||||
|
|
||||||
|
if (logtype == "latex") {
|
||||||
type_ = LatexLog;
|
type_ = LatexLog;
|
||||||
|
logTypeCO->addItem(qt_("LaTeX"), toqstr(logtype));
|
||||||
|
FileName tmp = log;
|
||||||
|
tmp.changeExtension("blg");
|
||||||
|
if (tmp.exists())
|
||||||
|
logTypeCO->addItem(qt_("BibTeX"), QString("bibtex"));
|
||||||
|
tmp.changeExtension("ilg");
|
||||||
|
if (tmp.exists())
|
||||||
|
logTypeCO->addItem(qt_("Index"), QString("index"));
|
||||||
// FIXME: not sure "literate" still works.
|
// FIXME: not sure "literate" still works.
|
||||||
else if (logtype == "literate")
|
} else if (logtype == "literate") {
|
||||||
type_ = LiterateLog;
|
type_ = LiterateLog;
|
||||||
else if (logtype == "lyx2lyx")
|
logTypeCO->addItem(qt_("Literate"), toqstr(logtype));
|
||||||
|
} else if (logtype == "lyx2lyx") {
|
||||||
type_ = Lyx2lyxLog;
|
type_ = Lyx2lyxLog;
|
||||||
else if (logtype == "vc")
|
logTypeCO->addItem(qt_("LyX2LyX"), toqstr(logtype));
|
||||||
|
} else if (logtype == "vc") {
|
||||||
type_ = VCLog;
|
type_ = VCLog;
|
||||||
else
|
logTypeCO->addItem(qt_("Version Control"), toqstr(logtype));
|
||||||
|
} else
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
logfile_ = FileName(logfile);
|
logfile_ = log;
|
||||||
|
|
||||||
updateContents();
|
updateContents();
|
||||||
|
|
||||||
@ -256,7 +294,7 @@ void GuiLog::getContents(ostream & ss) const
|
|||||||
|
|
||||||
switch (type_) {
|
switch (type_) {
|
||||||
case LatexLog:
|
case LatexLog:
|
||||||
ss << to_utf8(_("No LaTeX log file found."));
|
ss << to_utf8(_("Log file not found."));
|
||||||
break;
|
break;
|
||||||
case LiterateLog:
|
case LiterateLog:
|
||||||
ss << to_utf8(_("No literate programming build log file found."));
|
ss << to_utf8(_("No literate programming build log file found."));
|
||||||
|
@ -41,6 +41,8 @@ private Q_SLOTS:
|
|||||||
void on_nextErrorPB_clicked();
|
void on_nextErrorPB_clicked();
|
||||||
/// jump to next warning
|
/// jump to next warning
|
||||||
void on_nextWarningPB_clicked();
|
void on_nextWarningPB_clicked();
|
||||||
|
/// Log type changed
|
||||||
|
void typeChanged(int);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// Apply changes
|
/// Apply changes
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>421</width>
|
<width>421</width>
|
||||||
<height>441</height>
|
<height>474</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle" >
|
<property name="windowTitle" >
|
||||||
@ -22,14 +22,7 @@
|
|||||||
<property name="spacing" >
|
<property name="spacing" >
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="2" column="1" colspan="5" >
|
<item row="3" column="0" >
|
||||||
<widget class="QLineEdit" name="findLE" >
|
|
||||||
<property name="toolTip" >
|
|
||||||
<string>Hit Enter to search, or click Go!</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0" >
|
|
||||||
<widget class="QLabel" name="findLA" >
|
<widget class="QLabel" name="findLA" >
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string>&Find:</string>
|
<string>&Find:</string>
|
||||||
@ -39,57 +32,63 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="0" colspan="7" >
|
<item row="3" column="1" colspan="5" >
|
||||||
<widget class="QTextBrowser" name="logTB" />
|
<widget class="QLineEdit" name="findLE" >
|
||||||
</item>
|
|
||||||
<item row="1" column="3" colspan="2" >
|
|
||||||
<widget class="QPushButton" name="nextErrorPB" >
|
|
||||||
<property name="toolTip" >
|
<property name="toolTip" >
|
||||||
<string>Jump to the next error message.</string>
|
<string>Hit Enter to search, or click Go!</string>
|
||||||
</property>
|
|
||||||
<property name="text" >
|
|
||||||
<string>Next &Error</string>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="5" colspan="2" >
|
<item row="0" column="0" >
|
||||||
<widget class="QPushButton" name="nextWarningPB" >
|
<widget class="QLabel" name="logTypeLA" >
|
||||||
<property name="toolTip" >
|
|
||||||
<string>Jump to the next warning message.</string>
|
|
||||||
</property>
|
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string>Next &Warning</string>
|
<string>Log &Type:</string>
|
||||||
|
</property>
|
||||||
|
<property name="buddy" >
|
||||||
|
<cstring>logTypeCO</cstring>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="6" >
|
<item row="0" column="4" colspan="3" >
|
||||||
<widget class="QPushButton" name="findPB" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>&Go!</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0" colspan="3" >
|
|
||||||
<spacer>
|
<spacer>
|
||||||
<property name="orientation" >
|
<property name="orientation" >
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" >
|
<property name="sizeHint" >
|
||||||
<size>
|
<size>
|
||||||
<width>201</width>
|
<width>161</width>
|
||||||
<height>20</height>
|
<height>20</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0" colspan="2" >
|
<item row="0" column="1" colspan="3" >
|
||||||
<widget class="QPushButton" name="copyPB" >
|
<widget class="QComboBox" name="logTypeCO" />
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0" colspan="7" >
|
||||||
|
<widget class="QTextBrowser" name="logTB" />
|
||||||
|
</item>
|
||||||
|
<item row="4" column="4" colspan="2" >
|
||||||
|
<widget class="QPushButton" name="updatePB" >
|
||||||
|
<property name="toolTip" >
|
||||||
|
<string>Update the display</string>
|
||||||
|
</property>
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string>Copy to Clip&board</string>
|
<string>&Update</string>
|
||||||
|
</property>
|
||||||
|
<property name="default" >
|
||||||
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="2" colspan="2" >
|
<item row="4" column="6" >
|
||||||
|
<widget class="QPushButton" name="closePB" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>&Close</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="2" colspan="2" >
|
||||||
<spacer>
|
<spacer>
|
||||||
<property name="orientation" >
|
<property name="orientation" >
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
@ -105,23 +104,50 @@
|
|||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="6" >
|
<item row="4" column="0" colspan="2" >
|
||||||
<widget class="QPushButton" name="closePB" >
|
<widget class="QPushButton" name="copyPB" >
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string>&Close</string>
|
<string>Copy to Clip&board</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="4" colspan="2" >
|
<item row="2" column="0" colspan="3" >
|
||||||
<widget class="QPushButton" name="updatePB" >
|
<spacer>
|
||||||
|
<property name="orientation" >
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" >
|
||||||
|
<size>
|
||||||
|
<width>201</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="6" >
|
||||||
|
<widget class="QPushButton" name="findPB" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>&Go!</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="5" colspan="2" >
|
||||||
|
<widget class="QPushButton" name="nextWarningPB" >
|
||||||
<property name="toolTip" >
|
<property name="toolTip" >
|
||||||
<string>Update the display</string>
|
<string>Jump to the next warning message.</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string>&Update</string>
|
<string>Next &Warning</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="default" >
|
</widget>
|
||||||
<bool>true</bool>
|
</item>
|
||||||
|
<item row="2" column="3" colspan="2" >
|
||||||
|
<widget class="QPushButton" name="nextErrorPB" >
|
||||||
|
<property name="toolTip" >
|
||||||
|
<string>Jump to the next error message.</string>
|
||||||
|
</property>
|
||||||
|
<property name="text" >
|
||||||
|
<string>Next &Error</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
Loading…
Reference in New Issue
Block a user