Fixed issue with fossil 1.2.0 where a new type of user query (yes to all/no) caused Fuel to hang
Upped version to 0.9.5 Minor GUI Tweaks FossilOrigin-Name: d7d817fe47606c591cc03e8d71e744d187bca5d7
This commit is contained in:
@ -241,7 +241,7 @@ bool MainWindow::openWorkspace(const QString &path)
|
|||||||
|
|
||||||
if(!QFileInfo(metadata_file).exists())
|
if(!QFileInfo(metadata_file).exists())
|
||||||
{
|
{
|
||||||
if(ANSWER_YES !=DialogQuery(this, tr("Open Fossil"), "No workspace found.\nWould you like to make one here?"))
|
if(QMessageBox::Yes !=DialogQuery(this, tr("Open Fossil"), "No workspace found.\nWould you like to make one here?"))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Ok open the fossil
|
// Ok open the fossil
|
||||||
@ -365,7 +365,7 @@ void MainWindow::on_actionCloseRepository_triggered()
|
|||||||
if(getRepoStatus()!=REPO_OK)
|
if(getRepoStatus()!=REPO_OK)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(ANSWER_YES !=DialogQuery(this, tr("Close Workspace"), "Are you sure want to close this workspace?"))
|
if(QMessageBox::Yes !=DialogQuery(this, tr("Close Workspace"), "Are you sure want to close this workspace?"))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Close Repo
|
// Close Repo
|
||||||
@ -950,7 +950,9 @@ bool MainWindow::runFossilRaw(const QStringList &args, QStringList *output, int
|
|||||||
bool ends_qmark = !last_line.isEmpty() && last_line[last_line.length()-1]=='?';
|
bool ends_qmark = !last_line.isEmpty() && last_line[last_line.length()-1]=='?';
|
||||||
bool have_yn_query = last_line.toLower().indexOf("y/n")!=-1;
|
bool have_yn_query = last_line.toLower().indexOf("y/n")!=-1;
|
||||||
int have_yna_query = last_line.toLower().indexOf("a=always/y/n")!=-1 || last_line.toLower().indexOf("yes/no/all")!=-1;
|
int have_yna_query = last_line.toLower().indexOf("a=always/y/n")!=-1 || last_line.toLower().indexOf("yes/no/all")!=-1;
|
||||||
bool have_query = ends_qmark && (have_yn_query || have_yna_query);
|
int have_an_query = last_line.toLower().indexOf("a=always/n")!=-1;
|
||||||
|
|
||||||
|
bool have_query = ends_qmark && (have_yn_query || have_yna_query || have_an_query);
|
||||||
|
|
||||||
// Flush only the unnecessary part of the buffer to the log
|
// Flush only the unnecessary part of the buffer to the log
|
||||||
QStringList log_lines = buffer.left(last_line_start).split(EOL_MARK);
|
QStringList log_lines = buffer.left(last_line_start).split(EOL_MARK);
|
||||||
@ -975,13 +977,13 @@ bool MainWindow::runFossilRaw(const QStringList &args, QStringList *output, int
|
|||||||
{
|
{
|
||||||
log(last_line);
|
log(last_line);
|
||||||
QString query = ParseFossilQuery(last_line);
|
QString query = ParseFossilQuery(last_line);
|
||||||
DialogAnswer res = DialogQuery(this, "Fossil", query, true);
|
QMessageBox::StandardButton res = DialogQuery(this, "Fossil", query, QMessageBox::YesToAll|QMessageBox::Yes|QMessageBox::No);
|
||||||
if(res==ANSWER_YES)
|
if(res==QMessageBox::Yes)
|
||||||
{
|
{
|
||||||
process.write(ans_yes.toAscii());
|
process.write(ans_yes.toAscii());
|
||||||
log("Y\n");
|
log("Y\n");
|
||||||
}
|
}
|
||||||
else if(res==ANSWER_YESALL)
|
else if(res==QMessageBox::YesAll)
|
||||||
{
|
{
|
||||||
process.write(ans_always.toAscii());
|
process.write(ans_always.toAscii());
|
||||||
log("A\n");
|
log("A\n");
|
||||||
@ -997,9 +999,9 @@ bool MainWindow::runFossilRaw(const QStringList &args, QStringList *output, int
|
|||||||
{
|
{
|
||||||
log(last_line);
|
log(last_line);
|
||||||
QString query = ParseFossilQuery(last_line);
|
QString query = ParseFossilQuery(last_line);
|
||||||
DialogAnswer res = DialogQuery(this, "Fossil", query, false);
|
QMessageBox::StandardButton res = DialogQuery(this, "Fossil", query);
|
||||||
|
|
||||||
if(res==ANSWER_YES)
|
if(res==QMessageBox::Yes)
|
||||||
{
|
{
|
||||||
process.write(ans_yes.toAscii());
|
process.write(ans_yes.toAscii());
|
||||||
log("Y\n");
|
log("Y\n");
|
||||||
@ -1012,6 +1014,23 @@ bool MainWindow::runFossilRaw(const QStringList &args, QStringList *output, int
|
|||||||
|
|
||||||
buffer.clear();
|
buffer.clear();
|
||||||
}
|
}
|
||||||
|
else if(have_query && have_an_query)
|
||||||
|
{
|
||||||
|
log(last_line);
|
||||||
|
QString query = ParseFossilQuery(last_line);
|
||||||
|
QMessageBox::StandardButton res = DialogQuery(this, "Fossil", query, QMessageBox::YesToAll|QMessageBox::No);
|
||||||
|
if(res==QMessageBox::YesAll)
|
||||||
|
{
|
||||||
|
process.write(ans_always.toAscii());
|
||||||
|
log("A\n");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
process.write(ans_no.toAscii());
|
||||||
|
log("N\n");
|
||||||
|
}
|
||||||
|
buffer.clear();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Must be finished by now
|
// Must be finished by now
|
||||||
@ -1278,13 +1297,17 @@ void MainWindow::on_actionDiff_triggered()
|
|||||||
bool MainWindow::startUI()
|
bool MainWindow::startUI()
|
||||||
{
|
{
|
||||||
if(uiRunning())
|
if(uiRunning())
|
||||||
|
{
|
||||||
|
log("Fossil UI is already running\n");
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
fossilUI.setParent(this);
|
fossilUI.setParent(this);
|
||||||
fossilUI.setProcessChannelMode(QProcess::MergedChannels);
|
fossilUI.setProcessChannelMode(QProcess::MergedChannels);
|
||||||
fossilUI.setWorkingDirectory(getCurrentWorkspace());
|
fossilUI.setWorkingDirectory(getCurrentWorkspace());
|
||||||
|
|
||||||
log("> fossil ui\n");
|
log("<b>> fossil ui</b><br>", true);
|
||||||
|
log("Starting Fossil UI. Please wait.\n");
|
||||||
QString fossil = getFossilPath();
|
QString fossil = getFossilPath();
|
||||||
|
|
||||||
fossilUI.start(fossil, QStringList() << "ui");
|
fossilUI.start(fossil, QStringList() << "ui");
|
||||||
|
@ -205,9 +205,8 @@
|
|||||||
<addaction name="actionFossilUI"/>
|
<addaction name="actionFossilUI"/>
|
||||||
<addaction name="actionTimeline"/>
|
<addaction name="actionTimeline"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="actionOpenContaining"/>
|
|
||||||
<addaction name="actionSettings"/>
|
|
||||||
<addaction name="actionClearLog"/>
|
<addaction name="actionClearLog"/>
|
||||||
|
<addaction name="actionOpenContaining"/>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QStatusBar" name="statusBar"/>
|
<widget class="QStatusBar" name="statusBar"/>
|
||||||
<action name="actionRefresh">
|
<action name="actionRefresh">
|
||||||
|
@ -100,6 +100,6 @@ void SettingsDialog::on_btnSelectGMerge_clicked()
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void SettingsDialog::on_btnClearMessageHistory_clicked()
|
void SettingsDialog::on_btnClearMessageHistory_clicked()
|
||||||
{
|
{
|
||||||
if(DialogQuery(this, tr("Clear Commit Message History"), tr("Are you sure want to clear the commit message history?"))==ANSWER_YES)
|
if(DialogQuery(this, tr("Clear Commit Message History"), tr("Are you sure want to clear the commit message history?"))==QMessageBox::Yes)
|
||||||
settings->Mappings[FUEL_SETTING_COMMIT_MSG].Value = QStringList();
|
settings->Mappings[FUEL_SETTING_COMMIT_MSG].Value = QStringList();
|
||||||
}
|
}
|
||||||
|
14
Utils.cpp
14
Utils.cpp
@ -3,23 +3,15 @@
|
|||||||
#include <QDialogButtonBox>
|
#include <QDialogButtonBox>
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
DialogAnswer DialogQuery(QWidget *parent, const QString &title, const QString &query, bool yesToAllButton)
|
QMessageBox::StandardButton DialogQuery(QWidget *parent, const QString &title, const QString &query, QMessageBox::StandardButtons buttons)
|
||||||
{
|
{
|
||||||
QMessageBox::StandardButtons buttons = QMessageBox::Yes|QMessageBox::No;
|
|
||||||
if(yesToAllButton)
|
|
||||||
buttons |= QMessageBox::YesToAll;
|
|
||||||
|
|
||||||
QMessageBox mb(QMessageBox::Question, title, query, buttons, parent, Qt::Dialog | Qt::MSWindowsFixedSizeDialogHint | Qt::Sheet );
|
QMessageBox mb(QMessageBox::Question, title, query, buttons, parent, Qt::Dialog | Qt::MSWindowsFixedSizeDialogHint | Qt::Sheet );
|
||||||
mb.setDefaultButton(QMessageBox::No);
|
mb.setDefaultButton(QMessageBox::No);
|
||||||
mb.setWindowModality(Qt::WindowModal);
|
mb.setWindowModality(Qt::WindowModal);
|
||||||
mb.setModal(true);
|
mb.setModal(true);
|
||||||
mb.exec();
|
mb.exec();
|
||||||
int res = mb.standardButton(mb.clickedButton());
|
QMessageBox::StandardButton res = mb.standardButton(mb.clickedButton());
|
||||||
if(res==QDialogButtonBox::Yes)
|
return res;
|
||||||
return ANSWER_YES;
|
|
||||||
else if(res==QDialogButtonBox::YesToAll)
|
|
||||||
return ANSWER_YESALL;
|
|
||||||
return ANSWER_NO;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
11
Utils.h
11
Utils.h
@ -2,16 +2,9 @@
|
|||||||
#define UTILS_H
|
#define UTILS_H
|
||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QWidget>
|
#include <QMessageBox>
|
||||||
|
|
||||||
enum DialogAnswer
|
QMessageBox::StandardButton DialogQuery(QWidget *parent, const QString &title, const QString &query, QMessageBox::StandardButtons buttons = QMessageBox::Yes|QMessageBox::No);
|
||||||
{
|
|
||||||
ANSWER_YES,
|
|
||||||
ANSWER_NO,
|
|
||||||
ANSWER_YESALL
|
|
||||||
};
|
|
||||||
|
|
||||||
DialogAnswer DialogQuery(QWidget *parent, const QString &title, const QString &query, bool yesToAllButton=false);
|
|
||||||
|
|
||||||
|
|
||||||
#endif // UTILS_H
|
#endif // UTILS_H
|
||||||
|
2
main.cpp
2
main.cpp
@ -5,7 +5,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
a.setApplicationName("Fuel");
|
a.setApplicationName("Fuel");
|
||||||
a.setApplicationVersion("0.9.4");
|
a.setApplicationVersion("0.9.5");
|
||||||
a.setOrganizationDomain("karanik.com");
|
a.setOrganizationDomain("karanik.com");
|
||||||
a.setOrganizationName("Karanik");
|
a.setOrganizationName("Karanik");
|
||||||
|
|
||||||
|
22
manifest
22
manifest
@ -1,19 +1,19 @@
|
|||||||
C Improved\stooltip\stext\sof\sactions\nFixed\sempty\spop-menu\sin\stoolbar\n
|
C Fixed\sissue\swith\sfossil\s1.2.0\swhere\sa\snew\stype\sof\suser\squery\s(yes\sto\sall/no)\scaused\sFuel\sto\shang\nUpped\sversion\sto\s0.9.5\nMinor\sGUI\sTweaks
|
||||||
D 2011-10-22T08:41:13.960
|
D 2011-10-22T15:03:48.488
|
||||||
F CommitDialog.cpp bc05504be08d9ffe2b24d341a18e37035e1941b7
|
F CommitDialog.cpp bc05504be08d9ffe2b24d341a18e37035e1941b7
|
||||||
F CommitDialog.h 65a7238dcdd41b578536a0b0ac2a65f2e7f23c9a
|
F CommitDialog.h 65a7238dcdd41b578536a0b0ac2a65f2e7f23c9a
|
||||||
F CommitDialog.ui 5067623f6af6f5a42c87df903278e383e945e154
|
F CommitDialog.ui 5067623f6af6f5a42c87df903278e383e945e154
|
||||||
F FileActionDialog.cpp fcaebf9986f789b3440d5390b3458ad5f86fe0c8
|
F FileActionDialog.cpp fcaebf9986f789b3440d5390b3458ad5f86fe0c8
|
||||||
F FileActionDialog.h 15db1650b3a13d70bc338371e4c033c66e3b79ce
|
F FileActionDialog.h 15db1650b3a13d70bc338371e4c033c66e3b79ce
|
||||||
F FileActionDialog.ui c63644428579741aeb5fa052e237ba799ced9ad7
|
F FileActionDialog.ui c63644428579741aeb5fa052e237ba799ced9ad7
|
||||||
F MainWindow.cpp 1e1037c4a8047c1396b71e0ea669f7cc371beeb4
|
F MainWindow.cpp 8c0864e0923d0dbdb59a6adbea4aa2236d2daca3
|
||||||
F MainWindow.h 643f13d4b5615c51c38b164768bf62258ccb94b1
|
F MainWindow.h 643f13d4b5615c51c38b164768bf62258ccb94b1
|
||||||
F MainWindow.ui 0539292f618b60a94355ef35f59fa3bac6cab105
|
F MainWindow.ui 0afb7d2a8e9ce2cff2966295f9eefaed01f1ed51
|
||||||
F SettingsDialog.cpp b9dc5eebf3a2404f4ea8a573fc46cce19ab3d639
|
F SettingsDialog.cpp e1fad18cc020d08b82c6d35dc94f6624deec9a3b
|
||||||
F SettingsDialog.h f5da6cab4ccc82e2eb78ec835fb849c4c104d6cc
|
F SettingsDialog.h f5da6cab4ccc82e2eb78ec835fb849c4c104d6cc
|
||||||
F SettingsDialog.ui 778aaf233b8ac3ddac7dcfecc2fca7bd8ca5be1a
|
F SettingsDialog.ui 778aaf233b8ac3ddac7dcfecc2fca7bd8ca5be1a
|
||||||
F Utils.cpp 4bd6f104d7d666bdae2bbe54e392e8372f6ca186
|
F Utils.cpp 2587d8073d6c2c1da49622c387cc457a0081f7b5
|
||||||
F Utils.h e5ebab82b3455f2ea06d92e6b9eb18355470076c
|
F Utils.h a71d82474747466f4c225128d26a703b510230d4
|
||||||
F fuel.pro 3dc8e31fde8137143dea0ae44a81eb6733d86168
|
F fuel.pro 3dc8e31fde8137143dea0ae44a81eb6733d86168
|
||||||
F fuel.rc 8e9ac966f283102c11a77cd7f936cdc09e09bd79
|
F fuel.rc 8e9ac966f283102c11a77cd7f936cdc09e09bd79
|
||||||
F icons/Address\sBook-01.png ef2cec80ea5a559b72e8be4a344a1869fe69cbd8
|
F icons/Address\sBook-01.png ef2cec80ea5a559b72e8be4a344a1869fe69cbd8
|
||||||
@ -172,9 +172,9 @@ F icons/fuel.icns 81e535004b62db801a02f3e15d0a33afc9d4070b
|
|||||||
F icons/fuel.ico eb529ab3332a17b9302ef3e851db5b9ebce2a038
|
F icons/fuel.ico eb529ab3332a17b9302ef3e851db5b9ebce2a038
|
||||||
F installer/fuel.iss 13b6a938bcdf273cbd3649d2549887baa1577214
|
F installer/fuel.iss 13b6a938bcdf273cbd3649d2549887baa1577214
|
||||||
F installer/license.txt 4cc77b90af91e615a64ae04893fdffa7939db84c
|
F installer/license.txt 4cc77b90af91e615a64ae04893fdffa7939db84c
|
||||||
F main.cpp f67a9b5c9ca0b634b19ef08e7136032372d37f93
|
F main.cpp 46bf5ddc90fca01c9ef2e8e3d14b4d32217945dd
|
||||||
F resources.qrc e98383ed205f4e37100c60057e0129c3b86dea53
|
F resources.qrc e98383ed205f4e37100c60057e0129c3b86dea53
|
||||||
P b0fda22886a7415ddf5d70457f3f7c8fe7ecf636
|
P af6bd9ca628ed1fe33819ac18706ed2bcabc79d2
|
||||||
R e00c1b3ea6f98e52316fb62058db3cb4
|
R 9f76f7cb520c390eaafad0ef9a9d36d5
|
||||||
U kostas
|
U kostas
|
||||||
Z 776ad1437e04c1e2a30ae4fcf3fe5105
|
Z bf67ad5420324215cd78ba9fd7ee459a
|
||||||
|
@ -1 +1 @@
|
|||||||
af6bd9ca628ed1fe33819ac18706ed2bcabc79d2
|
d7d817fe47606c591cc03e8d71e744d187bca5d7
|
Reference in New Issue
Block a user