{"thread":{"id":"15797","subject":"[QGIT PATCH] Rework the commit confirmation box a bit","startedAt":"2008-10-06T09:11:53Z","lastAt":"2008-10-06T19:03:54Z","messageCount":2,"participants":["Abdelrazak Younes","Marco Costalba"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"92399","messageId":"48E9D659.1090503@lyx.org","threadId":"15797","inReplyTo":null,"subject":"[QGIT PATCH] Rework the commit confirmation box a bit","fromName":"Abdelrazak Younes","fromEmail":"younes@lyx.org","sentAt":"2008-10-06T09:11:53Z","receivedAt":"2008-10-06T09:11:53Z","isPatch":true,"sender":{"key":"younes@lyx.org","avatar":null},"body":"The problem was that the dialog was too big for my whenever too many files\nwere changed. Now, the list of changed files is only shown whenever they are\nless than 20; otherwise it is shown in the detailed text accessible though\nthe 'Show Detail' button.\n---\n  src/commitimpl.cpp |   25 ++++++++++++++++++++-----\n  1 files changed, 20 insertions(+), 5 deletions(-)\n\ndiff --git a/src/commitimpl.cpp b/src/commitimpl.cpp\nindex 1540947..def5209 100644\n--- a/src/commitimpl.cpp\n+++ b/src/commitimpl.cpp\n@@ -236,17 +236,32 @@ bool CommitImpl::checkConfirm(SCRef msg, SCRef \npatchName, SCList selFiles, bool\n          (git->isStGITStack() ? \"refresh top patch with\" :\n                          \"amend last commit with\") :\n          (git->isStGITStack() ? \"create a new patch with\" : \"commit\");\n-    QString text(\"Do you want to \" + whatToDo + \" the following \nfile(s)?\\n\\n\" +\n-                 selFiles.join(\"\\n\") + \"\\n\\nwith the message:\\n\\n\");\n+    QString text(\"Do you want to \" + whatToDo);\n+\n+    bool const fullList = selFiles.size() < 20;\n+    if (fullList) {\n+        text.append(\" the following file(s)?\\n\\n\" + selFiles.join(\"\\n\")\n+            + \"\\n\\nwith the message:\\n\\n\");\n+    } else {\n+        text.append(\" those \" + QString::number(selFiles.size())\n+            + \" files the with the message:\\n\\n\");\n+    }\n+\n      text.append(msg);\n      if (git->isStGITStack())\n          text.append(\"\\n\\nAnd patch name: \" + patchName);\n\n      QTextCodec::setCodecForCStrings(tc);\n\n-    int but = QMessageBox::question(this, \"Commit changes - QGit\",\n-                                    text, \"&Yes\", \"&No\", QString(), 0, 1);\n-    return (but != 1);\n+    QMessageBox msgBox(this);\n+    msgBox.setWindowTitle(\"Commit changes - QGit\");\n+    msgBox.setText(text);\n+    if (!fullList)\n+        msgBox.setDetailedText(selFiles.join(\"\\n\"));\n+    msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);\n+    msgBox.setDefaultButton(QMessageBox::Yes);\n+\n+    return msgBox.exec() != QMessageBox::No;\n  }\n\n  void CommitImpl::pushButtonSettings_clicked() {\n-- \n1.6.0.2.1172.ga5ed0\n"},{"id":"92441","messageId":"e5bfff550810061203udf32302y94ea9c44fec3fe2b@mail.gmail.com","threadId":"15797","inReplyTo":"48E9D659.1090503@lyx.org","subject":"Re: [QGIT PATCH] Rework the commit confirmation box a bit","fromName":"Marco Costalba","fromEmail":"mcostalba@gmail.com","sentAt":"2008-10-06T19:03:54Z","receivedAt":"2008-10-06T19:03:54Z","isPatch":true,"sender":{"key":"mcostalba@gmail.com","avatar":null},"body":"On Mon, Oct 6, 2008 at 11:11 AM, Abdelrazak Younes <younes@lyx.org> wrote:\n> The problem was that the dialog was too big for my whenever too many files\n> were changed. Now, the list of changed files is only shown whenever they are\n> less than 20; otherwise it is shown in the detailed text accessible though\n> the 'Show Detail' button.\n> ---\n\nThanks,\n\n   patch applied and pushed.\n\nMarco\n"}]}