projects
/
quassel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
846375c
)
added max count to delete confirm dialog
author
Johannes Huber
<johu@gmx.de>
Tue, 2 Mar 2010 21:14:41 +0000
(22:14 +0100)
committer
Manuel Nickschas
<sputnick@quassel-irc.org>
Wed, 3 Mar 2010 02:36:11 +0000
(
03:36
+0100)
src/uisupport/networkmodelcontroller.cpp
patch
|
blob
|
history
diff --git
a/src/uisupport/networkmodelcontroller.cpp
b/src/uisupport/networkmodelcontroller.cpp
index
75e6e8e
..
111e1c3
100644
(file)
--- a/
src/uisupport/networkmodelcontroller.cpp
+++ b/
src/uisupport/networkmodelcontroller.cpp
@@
-153,9
+153,18
@@
void NetworkModelController::removeBuffers(const QModelIndexList &indexList) {
if(inactive.count()) {
msg = tr("Do you want to delete the following buffer(s) permanently?", 0, inactive.count());
msg += "<ul>";
if(inactive.count()) {
msg = tr("Do you want to delete the following buffer(s) permanently?", 0, inactive.count());
msg += "<ul>";
- foreach(BufferInfo info, inactive)
- msg += QString("<li>%1</li>").arg(info.bufferName());
+ int count = 0;
+ foreach(BufferInfo info, inactive) {
+ if(count < 10) {
+ msg += QString("<li>%1</li>").arg(info.bufferName());
+ count++;
+ }
+ else
+ break;
+ }
msg += "</ul>";
msg += "</ul>";
+ if(count > 9 && inactive.size() - count != 0)
+ msg += tr("...and <b>%1</b> more<br><br>").arg(inactive.size() - count);
msg += tr("<b>Note:</b> This will delete all related data, including all backlog data, from the core's database and cannot be undone.");
if(inactive.count() != indexList.count())
msg += tr("<br>Active channel buffers cannot be deleted, please part the channel first.");
msg += tr("<b>Note:</b> This will delete all related data, including all backlog data, from the core's database and cannot be undone.");
if(inactive.count() != indexList.count())
msg += tr("<br>Active channel buffers cannot be deleted, please part the channel first.");