GMO for BG

This commit is contained in:
Richard Kimberly Heck 2019-05-12 23:30:13 -04:00
parent 15b90e4cc1
commit 5b84f11f80
7 changed files with 36 additions and 1 deletions

BIN
po/bg.gmo Normal file

Binary file not shown.

BIN
po/cs.gmo

Binary file not shown.

BIN
po/de.gmo

Binary file not shown.

BIN
po/sk.gmo

Binary file not shown.

View File

@ -305,6 +305,26 @@ typedef map<string, GuiToolbar *> ToolbarMap;
typedef shared_ptr<Dialog> DialogPtr; typedef shared_ptr<Dialog> DialogPtr;
// see https://wiki.qt.io/Clickable_QLabel
class QClickableLabel : public QLabel {
Q_OBJECT
public:
explicit QClickableLabel(QWidget * parent)
: QLabel(parent)
{}
~QClickableLabel() {}
Q_SIGNALS:
void clicked();
protected:
void mousePressEvent(QMouseEvent *) {
Q_EMIT clicked();
}
};
} // namespace } // namespace
@ -610,7 +630,7 @@ GuiView::GuiView(int id)
setAcceptDrops(true); setAcceptDrops(true);
// add busy indicator to statusbar // add busy indicator to statusbar
QLabel * busylabel = new QLabel(statusBar()); QClickableLabel * busylabel = new QClickableLabel(statusBar());
statusBar()->addPermanentWidget(busylabel); statusBar()->addPermanentWidget(busylabel);
search_mode mode = theGuiApp()->imageSearchMode(); search_mode mode = theGuiApp()->imageSearchMode();
QString fn = toqstr(lyx::libFileSearch("images", "busy", "gif", mode).absFileName()); QString fn = toqstr(lyx::libFileSearch("images", "busy", "gif", mode).absFileName());
@ -623,6 +643,7 @@ GuiView::GuiView(int id)
busylabel, SLOT(show())); busylabel, SLOT(show()));
connect(&d.processing_thread_watcher_, SIGNAL(finished()), connect(&d.processing_thread_watcher_, SIGNAL(finished()),
busylabel, SLOT(hide())); busylabel, SLOT(hide()));
connect(busylabel, SIGNAL(clicked()), this, SLOT(checkKillBackground()));
QFontMetrics const fm(statusBar()->fontMetrics()); QFontMetrics const fm(statusBar()->fontMetrics());
int const iconheight = max(int(d.normalIconSize), fm.height()); int const iconheight = max(int(d.normalIconSize), fm.height());
@ -713,6 +734,17 @@ void GuiView::disableShellEscape()
} }
void GuiView::checkKillBackground()
{
docstring const ttl = _("Cancel background process?");
docstring const msg = _("Do you want to cancel the background export process?");
const int decision =
Alert::prompt(ttl, msg, 1, 1, _("&Cancel Export"), _("Conti&nue"));
if (decision == 0)
Systemcall::killscript();
}
QVector<GuiWorkArea*> GuiView::GuiViewPrivate::guiWorkAreas() QVector<GuiWorkArea*> GuiView::GuiViewPrivate::guiWorkAreas()
{ {
QVector<GuiWorkArea*> areas; QVector<GuiWorkArea*> areas;

View File

@ -231,6 +231,8 @@ public Q_SLOTS:
void updateWindowTitle(GuiWorkArea * wa); void updateWindowTitle(GuiWorkArea * wa);
/// ///
void disableShellEscape(); void disableShellEscape();
///
void checkKillBackground();
private Q_SLOTS: private Q_SLOTS:
/// ///

View File

@ -197,6 +197,7 @@ MOCHEADER = \
GuiChanges.h \ GuiChanges.h \
GuiCharacter.h \ GuiCharacter.h \
GuiCitation.h \ GuiCitation.h \
GuiClickableLabel.h \
GuiClipboard.h \ GuiClipboard.h \
GuiCommandBuffer.h \ GuiCommandBuffer.h \
GuiCommandEdit.h \ GuiCommandEdit.h \