[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    extragear/network/ktorrent
From:       Joris Guisson <joris.guisson () gmail ! com>
Date:       2010-10-27 16:08:39
Message-ID: 20101027160839.E4953AC897 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1190425 by guisson:

Don't show an error message for each duplicate tracker which is added

 M  +1 -0      ChangeLog  
 M  +7 -1      plugins/infowidget/trackerview.cpp  


--- trunk/extragear/network/ktorrent/ChangeLog #1190424:1190425
@@ -25,6 +25,7 @@
 - Show notifications when automatic update of IP filter fails (243458)
 - Add video streaming support (234212)
 - Make ratio configurable at which the share ratio becomes green (254144)
+- Don't show an error message for each duplicate tracker which is added
 
 Changes in 4.0.5:
 - Fix crash due to uncaught exception when creating torrent (255020)
--- trunk/extragear/network/ktorrent/plugins/infowidget/trackerview.cpp \
#1190424:1190425 @@ -112,6 +112,7 @@
 			KMessageBox::errorList(this, i18n("Several URL's could not be added because they \
are malformed:"),invalid);  }
 			
+		KUrl::List dupes;
 		QList<bt::TrackerInterface*> tl;
 		foreach (const KUrl & url,urls)
 		{
@@ -119,7 +120,7 @@
 			bt::TrackerInterface* trk = tc->getTrackersList()->addTracker(url,true);
 			if (!trk)
 			{
-				KMessageBox::sorry(0,i18n("There already is a tracker named \
<b>%1</b>.",url.prettyUrl())); +				dupes.append(url);
 			}
 			else
 			{
@@ -127,6 +128,11 @@
 			}
 		}
 		
+		if (dupes.size() == 1)
+			KMessageBox::sorry(0,i18n("There already is a tracker named \
<b>%1</b>.",dupes.front().prettyUrl())); +		else if (dupes.size() > 1)
+			KMessageBox::informationList(0,i18n("The following duplicate trackers were not \
added:"),dupes.toStringList()); +		
 		model->addTrackers(tl);
 	}
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic