Skip to content

Commit

Permalink
Add option to enable ok, cancel button to parseMessage #417
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorsandy committed Oct 1, 2020
1 parent ec0a904 commit 9588c3f
Show file tree
Hide file tree
Showing 14 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion builds/linux/obs/alldeps/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Last Update: July 19, 2020
# Copyright (c) 2017 - 2020 by Trevor SANDY
pkgname=lpub3d
pkgver=2.4.0.1964
pkgver=2.4.0.1965
pkgrel=1
pkgdesc="An LDraw Building Instruction Editor"
url="https://github.com/trevorsandy/lpub3d.git"
Expand Down
6 changes: 3 additions & 3 deletions builds/linux/obs/alldeps/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
lpub3d (2.4.0.1964) debian; urgency=medium
lpub3d (2.4.0.1965) debian; urgency=medium

* LPub3D version 2.4.0.1.1964_20201002 for Linux
* LPub3D version 2.4.0.1.1965_20201002 for Linux

-- Trevor SANDY <[email protected]> Fri, 02 Oct 2020 01:32:26 +0200
-- Trevor SANDY <[email protected]> Fri, 02 Oct 2020 01:33:16 +0200
2 changes: 1 addition & 1 deletion builds/linux/obs/alldeps/debian/lpub3d.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Format: 1.0
Source: lpub3d
Binary: lpub3d
Architecture: any
Version: 2.4.0.1964
Version: 2.4.0.1965
Maintainer: Trevor SANDY <[email protected]>
Homepage: https://trevorsandy.github.io/lpub3d/
Standards-Version: 3.9.7
Expand Down
4 changes: 2 additions & 2 deletions builds/linux/obs/alldeps/lpub3d.spec
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ BuildRequires: fdupes
Summary: An LDraw Building Instruction Editor
Name: lpub3d
Icon: lpub3d.xpm
Version: 2.4.0.1964
Version: 2.4.0.1965
Release: <B_CNT>%{?dist}
URL: https://trevorsandy.github.io/lpub3d
Vendor: Trevor SANDY
Expand Down Expand Up @@ -728,5 +728,5 @@ update-mime-database /usr/share/mime >/dev/null || true
update-desktop-database || true
%endif

* Fri Oct 02 2020 - trevor.dot.sandy.at.gmail.dot.com 2.4.0.1964
* Fri Oct 02 2020 - trevor.dot.sandy.at.gmail.dot.com 2.4.0.1965
- LPub3D Linux package (rpm) release
Binary file modified builds/utilities/ci/secure/.secrets.tar.enc
Binary file not shown.
2 changes: 1 addition & 1 deletion builds/utilities/version.info
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2 4 0 1 1964 d1a26eb
2 4 0 1 1965 ec0a904
2 changes: 1 addition & 1 deletion mainApp/docs/README.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
LPub3D 2.4.0.1.1964 (02 10 2020 01:32:26)
LPub3D 2.4.0.1.1965 (02 10 2020 01:33:16)

Features, enhancements, fixes and changes
------------
Expand Down
2 changes: 1 addition & 1 deletion mainApp/docs/RELEASE_NOTES.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<table class="tg">
<tr>
<th class="tg-0pky">
<h4><a id="LPub3D_0"></a>LPub3D 2.4.0.1.1964 (02 10 2020 01:32:26)</h4>
<h4><a id="LPub3D_0"></a>LPub3D 2.4.0.1.1965 (02 10 2020 01:33:16)</h4>
<hr>
<p>
LPub3D Continuous release.<br>
Expand Down
6 changes: 3 additions & 3 deletions mainApp/lpub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5444,7 +5444,7 @@ void Gui::showLine(const Where &topOfStep, int type)
}
}

void Gui::parseError(const QString message, const Where &here, Preferences::MsgKey msgKey, bool override)
void Gui::parseError(const QString message, const Where &here, Preferences::MsgKey msgKey, bool option)
{
if (parsedMessages.contains(here))
return;
Expand All @@ -5463,11 +5463,11 @@ void Gui::parseError(const QString message, const Where &here, Preferences::MsgK
if (subFileSize(here.modelName) < Preferences::editorLinesPerPage || Preferences::editorBufferedPaging)
showLine(here, LINE_ERROR);
bool okToShowMessage = Preferences::getShowMessagePreference(msgKey);
if (okToShowMessage || override) {
if (okToShowMessage) {
Where messageLine = here;
messageLine.setModelIndex(getSubmodelIndex(messageLine.modelName));
Preferences::MsgID msgID(msgKey,messageLine.indexToString());
Preferences::showMessage(msgID, parseMessage, keyType[msgID.msgKey][0], keyType[msgID.msgKey][1]);
Preferences::showMessage(msgID, parseMessage, keyType[msgID.msgKey][0], keyType[msgID.msgKey][1], option);
}
if (writingToTmp)
emit progressPermMessageSig(QString("Writing submodel [Parse Error%1")
Expand Down
2 changes: 1 addition & 1 deletion mainApp/lpub.h
Original file line number Diff line number Diff line change
Expand Up @@ -1165,7 +1165,7 @@ public slots:
void parseError(const QString errorMsg,
const Where &here,
Preferences::MsgKey msgKey = Preferences::ParseErrors,
bool override = false);
bool option = false);

void statusMessage(LogType logType, QString message);
void statusBarMsg(QString msg);
Expand Down
4 changes: 2 additions & 2 deletions mainApp/lpub_preferences.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3259,7 +3259,7 @@ bool Preferences::getShowMessagePreference(MsgKey key)
return result;
}

int Preferences::showMessage(Preferences::MsgID msgID, const QString &message, const QString &title, const QString &type)
int Preferences::showMessage(Preferences::MsgID msgID, const QString &message, const QString &title, const QString &type, bool option)
{
foreach (QString messageNotShown, messagesNotShown)
if (messageNotShown.startsWith(msgID.toString()))
Expand All @@ -3272,7 +3272,7 @@ int Preferences::showMessage(Preferences::MsgID msgID, const QString &message,
box.setWindowTitle(QString("%1 %2").arg(VER_PRODUCTNAME_STR).arg(title));
box.setText(message);
box.setIcon(QMessageBox::Icon::Warning);
box.setStandardButtons (QMessageBox::Ok | QMessageBox::Cancel);
box.setStandardButtons (option ? QMessageBox::Ok | QMessageBox::Cancel : QMessageBox::Ok);
box.setDefaultButton (QMessageBox::Cancel);
QCheckBox *cb = new QCheckBox(QString("Do not show this %1 again.").arg(type));
box.setCheckBox(cb);
Expand Down
2 changes: 1 addition & 1 deletion mainApp/lpub_preferences.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class Preferences
static void setBlenderVersionPreference(QString);
static void setDebugLogging(bool);

static int showMessage(Preferences::MsgID, const QString &message, const QString &title = "", const QString &type = "");
static int showMessage(Preferences::MsgID, const QString &message, const QString &title = "", const QString &type = "", bool option = false);

static QString lpub3dAppName;
static QString ldrawLibPath;
Expand Down
2 changes: 1 addition & 1 deletion mainApp/nativeviewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2627,7 +2627,7 @@ void Gui::deleteBuildModification()
QString title = "Build Modification";

Preferences::MsgID msgID(Preferences::BuildModErrors, Where(model,line).nameToString());
switch (Preferences::showMessage(msgID, text, title, type))
switch (Preferences::showMessage(msgID, text, title, type, true /*option*/))
{
default:
case QMessageBox::Cancel:
Expand Down
2 changes: 1 addition & 1 deletion mainApp/org.trevorsandy.lpub3d.appdata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
<binary>lpub3d24</binary>
​</provides>
<releases>
<release version="2.4.0.1964" date="2020-10-02">
<release version="2.4.0.1965" date="2020-10-02">
<description>
<p>LPub3D Linux AppImage package</p>
</description>
Expand Down

0 comments on commit 9588c3f

Please sign in to comment.