Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore mac folder prefs, fix tab focus on find/'end of document' messagebox #92

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ qgit.pro.*
qgit.qbs.*
src/release
.qmake.stash
.DS_Store
20 changes: 16 additions & 4 deletions src/mainimpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ void MainImpl::ActExternalDiff_activated() {
if (!QGit::startProcess(externalDiff, args)) {
QString text("Cannot start external viewer: ");
text.append(args[0]);
QMessageBox::warning(this, "Error - QGit", text);
QMessageBox::warning(this, "Error - QGit", text);
delete externalDiff;
}
}
Expand Down Expand Up @@ -2109,9 +2109,21 @@ void MainImpl::ActFindNext_activated() {
textToFind + "\" not found!", QMessageBox::Ok, 0);
return;
}
if (QMessageBox::question(this, "Find text - QGit", "End of document "
"reached\n\nDo you want to continue from beginning?", QMessageBox::Yes,
QMessageBox::No | QMessageBox::Escape) == QMessageBox::No)
QMessageBox msgBox(this);
msgBox.setWindowTitle("Find text - QGit");
msgBox.setIcon(QMessageBox::Question);
msgBox.setText(tr("End of document reached."));
msgBox.setInformativeText(tr("Do you want to continue from beginning?\n"));
msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
msgBox.setDefaultButton(QMessageBox::No);
msgBox.setBaseSize(QSize(400, 160));
QList<QAbstractButton *> bList = msgBox.buttons();
for (int i=0; i<bList.count(); i++)
{
bList.at(i)->setFocusPolicy(Qt::StrongFocus);
}
int ret = msgBox.exec();
if (ret == QMessageBox::No)
return;

endOfDocument = true;
Expand Down