From c3acdc91bed98406492ac114d54257dd4dbf98b3 Mon Sep 17 00:00:00 2001 From: upstream svn Date: Tue, 11 May 2010 12:55:05 +0000 Subject: [PATCH] Upstream tarball 10142 --- .svn-revision | 2 +- .../MacOSX/aMule-Xcode}/English.lproj/en | 0 .../MacOSX/aMule-Xcode}/README BEFORE BUILDING.rtf | 0 .../aMule-Xcode}/aMule.xcodeproj/project.pbxproj | 736 +++++---- .../MacOSX/aMule-Xcode}/aMule_Xcode-Info.plist | 2 +- .../MacOSX/aMule-Xcode}/aMule_Xcode_Prefix.pch | 0 .../MacOSX/aMule-Xcode}/amule.icns | Bin src/BaseClient.cpp | 17 +- src/ClientList.cpp | 4 +- src/ClientListCtrl.cpp | 1165 ------------- src/ClientListCtrl.h | 322 ---- src/ClientTCPSocket.cpp | 4 +- src/Constants.h | 25 +- src/DownloadClient.cpp | 22 +- src/DownloadListCtrl.cpp | 1709 +++++--------------- src/DownloadListCtrl.h | 97 +- src/DownloadQueue.cpp | 21 +- src/ExternalConn.cpp | 4 +- src/FileDetailDialog.cpp | 4 +- src/GenericClientListCtrl.cpp | 1182 ++++++++++++++ src/GenericClientListCtrl.h | 231 +++ src/GuiEvents.cpp | 58 +- src/GuiEvents.h | 35 +- src/KnownFile.cpp | 15 + src/KnownFile.h | 5 +- src/Makefile.am | 9 +- src/Makefile.in | 143 +- src/MuleListCtrl.cpp | 90 +- src/MuleListCtrl.h | 16 + src/OtherFunctions.h | 12 +- src/PartFile.cpp | 3 +- src/PartFile.h | 9 +- src/SharedFilePeersListCtrl.cpp | 67 + src/SharedFilePeersListCtrl.h | 63 + src/SharedFilesCtrl.cpp | 17 +- src/SharedFilesCtrl.h | 5 - src/SharedFilesWnd.cpp | 251 ++- src/SharedFilesWnd.h | 23 +- src/SourceListCtrl.cpp | 65 + src/SourceListCtrl.h | 65 + src/TransferWnd.cpp | 56 +- src/TransferWnd.h | 8 +- src/UploadClient.cpp | 11 +- src/UploadQueue.cpp | 11 +- src/amule-remote-gui.cpp | 23 +- src/amuleDlg.cpp | 20 +- src/muuli_wdr.cpp | 298 ++-- src/muuli_wdr.h | 608 +++---- src/updownclient.h | 6 + 49 files changed, 3501 insertions(+), 4038 deletions(-) rename {aMule-Xcode => platforms/MacOSX/aMule-Xcode}/English.lproj/en (100%) rename {aMule-Xcode => platforms/MacOSX/aMule-Xcode}/README BEFORE BUILDING.rtf (100%) rename {aMule-Xcode => platforms/MacOSX/aMule-Xcode}/aMule.xcodeproj/project.pbxproj (78%) rename {aMule-Xcode => platforms/MacOSX/aMule-Xcode}/aMule_Xcode-Info.plist (97%) rename {aMule-Xcode => platforms/MacOSX/aMule-Xcode}/aMule_Xcode_Prefix.pch (100%) rename {aMule.app/Contents/Resources => platforms/MacOSX/aMule-Xcode}/amule.icns (100%) delete mode 100644 src/ClientListCtrl.cpp delete mode 100644 src/ClientListCtrl.h create mode 100644 src/GenericClientListCtrl.cpp create mode 100644 src/GenericClientListCtrl.h create mode 100644 src/SharedFilePeersListCtrl.cpp create mode 100644 src/SharedFilePeersListCtrl.h create mode 100644 src/SourceListCtrl.cpp create mode 100644 src/SourceListCtrl.h diff --git a/.svn-revision b/.svn-revision index a5049f85..b9f8c0b8 100644 --- a/.svn-revision +++ b/.svn-revision @@ -1 +1 @@ -10140 +10142 diff --git a/aMule-Xcode/English.lproj/en b/platforms/MacOSX/aMule-Xcode/English.lproj/en similarity index 100% rename from aMule-Xcode/English.lproj/en rename to platforms/MacOSX/aMule-Xcode/English.lproj/en diff --git a/aMule-Xcode/README BEFORE BUILDING.rtf b/platforms/MacOSX/aMule-Xcode/README BEFORE BUILDING.rtf similarity index 100% rename from aMule-Xcode/README BEFORE BUILDING.rtf rename to platforms/MacOSX/aMule-Xcode/README BEFORE BUILDING.rtf diff --git a/aMule-Xcode/aMule.xcodeproj/project.pbxproj b/platforms/MacOSX/aMule-Xcode/aMule.xcodeproj/project.pbxproj similarity index 78% rename from aMule-Xcode/aMule.xcodeproj/project.pbxproj rename to platforms/MacOSX/aMule-Xcode/aMule.xcodeproj/project.pbxproj index 72feb75c..ad889e37 100644 --- a/aMule-Xcode/aMule.xcodeproj/project.pbxproj +++ b/platforms/MacOSX/aMule-Xcode/aMule.xcodeproj/project.pbxproj @@ -7,6 +7,10 @@ objects = { /* Begin PBXBuildFile section */ + 483344701196275F00D9BE75 /* amule.icns in Resources */ = {isa = PBXBuildFile; fileRef = 4833446F1196275F00D9BE75 /* amule.icns */; }; + 4848D2CF1192E83100ED40CC /* GenericClientListCtrl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4848D2CD1192E83100ED40CC /* GenericClientListCtrl.cpp */; }; + 4848DC291192E85A00ED40CC /* SharedFilePeersListCtrl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4848D8091192E85900ED40CC /* SharedFilePeersListCtrl.cpp */; }; + 4848DC2A1192E85A00ED40CC /* SourceListCtrl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4848D80B1192E85900ED40CC /* SourceListCtrl.cpp */; }; 487911DA11925E61002C086E /* CFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4879119511925E61002C086E /* CFile.cpp */; }; 487911DB11925E61002C086E /* DataToText.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4879119711925E61002C086E /* DataToText.cpp */; }; 487911DC11925E61002C086E /* ED2KLink.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4879119911925E61002C086E /* ED2KLink.cpp */; }; @@ -100,7 +104,6 @@ 48791EDF11926CC7002C086E /* CatDialog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 48791EB011926CC7002C086E /* CatDialog.cpp */; }; 48791EE011926CC7002C086E /* ChatSelector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 48791EB211926CC7002C086E /* ChatSelector.cpp */; }; 48791EE111926CC7002C086E /* ClientDetailDialog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 48791EB411926CC7002C086E /* ClientDetailDialog.cpp */; }; - 48791EE211926CC7002C086E /* ClientListCtrl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 48791EB611926CC7002C086E /* ClientListCtrl.cpp */; }; 48791EE311926CC7002C086E /* DirectoryTreeCtrl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 48791EB811926CC7002C086E /* DirectoryTreeCtrl.cpp */; }; 48791EE411926CC7002C086E /* DownloadListCtrl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 48791EBA11926CC7002C086E /* DownloadListCtrl.cpp */; }; 48791EE511926CC7002C086E /* FileDetailDialog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 48791EBC11926CC7002C086E /* FileDetailDialog.cpp */; }; @@ -165,289 +168,294 @@ 256AC3F00F4B6AF500CF3369 /* aMule_Xcode_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = aMule_Xcode_Prefix.pch; sourceTree = ""; }; 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; - 4879119511925E61002C086E /* CFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CFile.cpp; path = ../src/CFile.cpp; sourceTree = SOURCE_ROOT; }; - 4879119611925E61002C086E /* CFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CFile.h; path = ../src/CFile.h; sourceTree = SOURCE_ROOT; }; - 4879119711925E61002C086E /* DataToText.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DataToText.cpp; path = ../src/DataToText.cpp; sourceTree = SOURCE_ROOT; }; - 4879119811925E61002C086E /* DataToText.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DataToText.h; path = ../src/DataToText.h; sourceTree = SOURCE_ROOT; }; - 4879119911925E61002C086E /* ED2KLink.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ED2KLink.cpp; path = ../src/ED2KLink.cpp; sourceTree = SOURCE_ROOT; }; - 4879119A11925E61002C086E /* ED2KLink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ED2KLink.h; path = ../src/ED2KLink.h; sourceTree = SOURCE_ROOT; }; - 4879119B11925E61002C086E /* GapList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GapList.cpp; path = ../src/GapList.cpp; sourceTree = SOURCE_ROOT; }; - 4879119C11925E61002C086E /* GapList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GapList.h; path = ../src/GapList.h; sourceTree = SOURCE_ROOT; }; - 4879119D11925E61002C086E /* MagnetURI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MagnetURI.cpp; path = ../src/MagnetURI.cpp; sourceTree = SOURCE_ROOT; }; - 4879119E11925E61002C086E /* MagnetURI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MagnetURI.h; path = ../src/MagnetURI.h; sourceTree = SOURCE_ROOT; }; - 4879119F11925E61002C086E /* MemFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MemFile.cpp; path = ../src/MemFile.cpp; sourceTree = SOURCE_ROOT; }; - 487911A011925E61002C086E /* MemFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MemFile.h; path = ../src/MemFile.h; sourceTree = SOURCE_ROOT; }; - 487911A311925E61002C086E /* Packet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Packet.cpp; path = ../src/Packet.cpp; sourceTree = SOURCE_ROOT; }; - 487911A411925E61002C086E /* Packet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Packet.h; path = ../src/Packet.h; sourceTree = SOURCE_ROOT; }; - 487911A511925E61002C086E /* RLE.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RLE.cpp; path = ../src/RLE.cpp; sourceTree = SOURCE_ROOT; }; - 487911A611925E61002C086E /* RLE.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RLE.h; path = ../src/RLE.h; sourceTree = SOURCE_ROOT; }; - 487911A711925E61002C086E /* SafeFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SafeFile.cpp; path = ../src/SafeFile.cpp; sourceTree = SOURCE_ROOT; }; - 487911A811925E61002C086E /* SafeFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SafeFile.h; path = ../src/SafeFile.h; sourceTree = SOURCE_ROOT; }; - 487911A911925E61002C086E /* SHA.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SHA.cpp; path = ../src/SHA.cpp; sourceTree = SOURCE_ROOT; }; - 487911AA11925E61002C086E /* SHA.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SHA.h; path = ../src/SHA.h; sourceTree = SOURCE_ROOT; }; - 487911AB11925E61002C086E /* Tag.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Tag.cpp; path = ../src/Tag.cpp; sourceTree = SOURCE_ROOT; }; - 487911AC11925E61002C086E /* Tag.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Tag.h; path = ../src/Tag.h; sourceTree = SOURCE_ROOT; }; - 487911AD11925E61002C086E /* Timer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Timer.cpp; path = ../src/Timer.cpp; sourceTree = SOURCE_ROOT; }; - 487911AE11925E61002C086E /* Timer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Timer.h; path = ../src/Timer.h; sourceTree = SOURCE_ROOT; }; - 487911E811925FDD002C086E /* AsyncDNS.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AsyncDNS.cpp; path = ../src/AsyncDNS.cpp; sourceTree = SOURCE_ROOT; }; - 487911E911925FDD002C086E /* AsyncDNS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AsyncDNS.h; path = ../src/AsyncDNS.h; sourceTree = SOURCE_ROOT; }; - 487911EA11925FDD002C086E /* DeadSourceList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DeadSourceList.cpp; path = ../src/DeadSourceList.cpp; sourceTree = SOURCE_ROOT; }; - 487911EB11925FDD002C086E /* DeadSourceList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DeadSourceList.h; path = ../src/DeadSourceList.h; sourceTree = SOURCE_ROOT; }; - 487911EC11925FDD002C086E /* FileArea.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FileArea.cpp; path = ../src/FileArea.cpp; sourceTree = SOURCE_ROOT; }; - 487911ED11925FDD002C086E /* FileArea.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileArea.h; path = ../src/FileArea.h; sourceTree = SOURCE_ROOT; }; - 487911EE11925FDD002C086E /* FileAutoClose.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FileAutoClose.cpp; path = ../src/FileAutoClose.cpp; sourceTree = SOURCE_ROOT; }; - 487911EF11925FDD002C086E /* FileAutoClose.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileAutoClose.h; path = ../src/FileAutoClose.h; sourceTree = SOURCE_ROOT; }; - 487911F011925FDD002C086E /* Friend.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Friend.cpp; path = ../src/Friend.cpp; sourceTree = SOURCE_ROOT; }; - 487911F111925FDD002C086E /* Friend.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Friend.h; path = ../src/Friend.h; sourceTree = SOURCE_ROOT; }; - 487911F211925FDD002C086E /* Parser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Parser.cpp; path = ../src/Parser.cpp; sourceTree = SOURCE_ROOT; }; - 487911F311925FDD002C086E /* Parser.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Parser.hpp; path = ../src/Parser.hpp; sourceTree = SOURCE_ROOT; }; - 487911F411925FDD002C086E /* PlatformSpecific.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PlatformSpecific.cpp; path = ../src/PlatformSpecific.cpp; sourceTree = SOURCE_ROOT; }; - 487911F511925FDD002C086E /* PlatformSpecific.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PlatformSpecific.h; path = ../src/PlatformSpecific.h; sourceTree = SOURCE_ROOT; }; - 487911F611925FDD002C086E /* RandomFunctions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RandomFunctions.cpp; path = ../src/RandomFunctions.cpp; sourceTree = SOURCE_ROOT; }; - 487911F711925FDD002C086E /* RandomFunctions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RandomFunctions.h; path = ../src/RandomFunctions.h; sourceTree = SOURCE_ROOT; }; - 487911F811925FDD002C086E /* RC4Encrypt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RC4Encrypt.cpp; path = ../src/RC4Encrypt.cpp; sourceTree = SOURCE_ROOT; }; - 487911F911925FDD002C086E /* RC4Encrypt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RC4Encrypt.h; path = ../src/RC4Encrypt.h; sourceTree = SOURCE_ROOT; }; - 487911FA11925FDD002C086E /* Scanner.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Scanner.cpp; path = ../src/Scanner.cpp; sourceTree = SOURCE_ROOT; }; - 487911FB11925FDD002C086E /* Scanner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Scanner.h; path = ../src/Scanner.h; sourceTree = SOURCE_ROOT; }; - 487911FC11925FDD002C086E /* StateMachine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StateMachine.cpp; path = ../src/StateMachine.cpp; sourceTree = SOURCE_ROOT; }; - 487911FD11925FDD002C086E /* StateMachine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StateMachine.h; path = ../src/StateMachine.h; sourceTree = SOURCE_ROOT; }; - 487911FE11925FDD002C086E /* ThreadScheduler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadScheduler.cpp; path = ../src/ThreadScheduler.cpp; sourceTree = SOURCE_ROOT; }; - 487911FF11925FDD002C086E /* ThreadScheduler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadScheduler.h; path = ../src/ThreadScheduler.h; sourceTree = SOURCE_ROOT; }; - 4879120011925FDD002C086E /* UPnPBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UPnPBase.cpp; path = ../src/UPnPBase.cpp; sourceTree = SOURCE_ROOT; }; - 4879120111925FDD002C086E /* UPnPBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UPnPBase.h; path = ../src/UPnPBase.h; sourceTree = SOURCE_ROOT; }; - 487917E11192601E002C086E /* Entry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Entry.cpp; path = ../src/kademlia/kademlia/Entry.cpp; sourceTree = SOURCE_ROOT; }; - 487917E21192601E002C086E /* Entry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Entry.h; path = ../src/kademlia/kademlia/Entry.h; sourceTree = SOURCE_ROOT; }; - 487917E31192601E002C086E /* SearchManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SearchManager.cpp; path = ../src/kademlia/kademlia/SearchManager.cpp; sourceTree = SOURCE_ROOT; }; - 487917E41192601E002C086E /* SearchManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SearchManager.h; path = ../src/kademlia/kademlia/SearchManager.h; sourceTree = SOURCE_ROOT; }; - 48791CD91192607A002C086E /* Contact.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Contact.cpp; path = ../src/kademlia/routing/Contact.cpp; sourceTree = SOURCE_ROOT; }; - 48791CDA1192607A002C086E /* Contact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Contact.h; path = ../src/kademlia/routing/Contact.h; sourceTree = SOURCE_ROOT; }; - 48791CDB1192607A002C086E /* RoutingBin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RoutingBin.cpp; path = ../src/kademlia/routing/RoutingBin.cpp; sourceTree = SOURCE_ROOT; }; - 48791CDC1192607A002C086E /* RoutingBin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RoutingBin.h; path = ../src/kademlia/routing/RoutingBin.h; sourceTree = SOURCE_ROOT; }; - 48791D0A119260A0002C086E /* UInt128.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UInt128.cpp; path = ../src/kademlia/utils/UInt128.cpp; sourceTree = SOURCE_ROOT; }; - 48791D0B119260A0002C086E /* UInt128.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UInt128.h; path = ../src/kademlia/utils/UInt128.h; sourceTree = SOURCE_ROOT; }; - 48791D0E11926A0E002C086E /* BarShader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BarShader.cpp; path = ../src/BarShader.cpp; sourceTree = SOURCE_ROOT; }; - 48791D0F11926A0E002C086E /* BarShader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BarShader.h; path = ../src/BarShader.h; sourceTree = SOURCE_ROOT; }; - 48791D1011926A0E002C086E /* ChatWnd.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ChatWnd.cpp; path = ../src/ChatWnd.cpp; sourceTree = SOURCE_ROOT; }; - 48791D1111926A0E002C086E /* ChatWnd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChatWnd.h; path = ../src/ChatWnd.h; sourceTree = SOURCE_ROOT; }; - 48791D1211926A0E002C086E /* ColorFrameCtrl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ColorFrameCtrl.cpp; path = ../src/ColorFrameCtrl.cpp; sourceTree = SOURCE_ROOT; }; - 48791D1311926A0E002C086E /* ColorFrameCtrl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ColorFrameCtrl.h; path = ../src/ColorFrameCtrl.h; sourceTree = SOURCE_ROOT; }; - 48791D1411926A0E002C086E /* CommentDialog.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommentDialog.cpp; path = ../src/CommentDialog.cpp; sourceTree = SOURCE_ROOT; }; - 48791D1511926A0E002C086E /* CommentDialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommentDialog.h; path = ../src/CommentDialog.h; sourceTree = SOURCE_ROOT; }; - 48791D1611926A0E002C086E /* CommentDialogLst.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommentDialogLst.cpp; path = ../src/CommentDialogLst.cpp; sourceTree = SOURCE_ROOT; }; - 48791D1711926A0E002C086E /* CommentDialogLst.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommentDialogLst.h; path = ../src/CommentDialogLst.h; sourceTree = SOURCE_ROOT; }; - 48791D1811926A0E002C086E /* EditServerListDlg.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = EditServerListDlg.cpp; path = ../src/EditServerListDlg.cpp; sourceTree = SOURCE_ROOT; }; - 48791D1911926A0E002C086E /* EditServerListDlg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EditServerListDlg.h; path = ../src/EditServerListDlg.h; sourceTree = SOURCE_ROOT; }; - 48791D1A11926A0E002C086E /* FileDetailListCtrl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FileDetailListCtrl.cpp; path = ../src/FileDetailListCtrl.cpp; sourceTree = SOURCE_ROOT; }; - 48791D1B11926A0E002C086E /* FileDetailListCtrl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileDetailListCtrl.h; path = ../src/FileDetailListCtrl.h; sourceTree = SOURCE_ROOT; }; - 48791D1C11926A0E002C086E /* IP2Country.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IP2Country.cpp; path = ../src/IP2Country.cpp; sourceTree = SOURCE_ROOT; }; - 48791D1D11926A0E002C086E /* IP2Country.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IP2Country.h; path = ../src/IP2Country.h; sourceTree = SOURCE_ROOT; }; - 48791D1E11926A0E002C086E /* MuleCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MuleCollection.cpp; path = ../src/MuleCollection.cpp; sourceTree = SOURCE_ROOT; }; - 48791D1F11926A0E002C086E /* MuleCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MuleCollection.h; path = ../src/MuleCollection.h; sourceTree = SOURCE_ROOT; }; - 48791D2011926A0E002C086E /* MuleGifCtrl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MuleGifCtrl.cpp; path = ../src/MuleGifCtrl.cpp; sourceTree = SOURCE_ROOT; }; - 48791D2111926A0E002C086E /* MuleGifCtrl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MuleGifCtrl.h; path = ../src/MuleGifCtrl.h; sourceTree = SOURCE_ROOT; }; - 48791D2211926A0E002C086E /* MuleListCtrl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MuleListCtrl.cpp; path = ../src/MuleListCtrl.cpp; sourceTree = SOURCE_ROOT; }; - 48791D2311926A0E002C086E /* MuleListCtrl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MuleListCtrl.h; path = ../src/MuleListCtrl.h; sourceTree = SOURCE_ROOT; }; - 48791D2411926A0E002C086E /* MuleNotebook.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MuleNotebook.cpp; path = ../src/MuleNotebook.cpp; sourceTree = SOURCE_ROOT; }; - 48791D2511926A0E002C086E /* MuleNotebook.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MuleNotebook.h; path = ../src/MuleNotebook.h; sourceTree = SOURCE_ROOT; }; - 48791D2611926A0E002C086E /* MuleTextCtrl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MuleTextCtrl.cpp; path = ../src/MuleTextCtrl.cpp; sourceTree = SOURCE_ROOT; }; - 48791D2711926A0E002C086E /* MuleTextCtrl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MuleTextCtrl.h; path = ../src/MuleTextCtrl.h; sourceTree = SOURCE_ROOT; }; - 48791D2811926A0E002C086E /* muuli_wdr.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = muuli_wdr.cpp; path = ../src/muuli_wdr.cpp; sourceTree = SOURCE_ROOT; }; - 48791D2911926A0E002C086E /* muuli_wdr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = muuli_wdr.h; path = ../src/muuli_wdr.h; sourceTree = SOURCE_ROOT; }; - 48791D3911926A2E002C086E /* listctrl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = listctrl.cpp; path = ../src/extern/wxWidgets/listctrl.cpp; sourceTree = SOURCE_ROOT; }; - 48791D3A11926A2E002C086E /* listctrl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = listctrl.h; path = ../src/extern/wxWidgets/listctrl.h; sourceTree = SOURCE_ROOT; }; - 48791D3D11926AEE002C086E /* amule.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = amule.cpp; path = ../src/amule.cpp; sourceTree = SOURCE_ROOT; }; - 48791D3E11926AEE002C086E /* amule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = amule.h; path = ../src/amule.h; sourceTree = SOURCE_ROOT; }; - 48791D3F11926AEE002C086E /* BaseClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BaseClient.cpp; path = ../src/BaseClient.cpp; sourceTree = SOURCE_ROOT; }; - 48791D4011926AEE002C086E /* CanceledFileList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CanceledFileList.cpp; path = ../src/CanceledFileList.cpp; sourceTree = SOURCE_ROOT; }; - 48791D4111926AEE002C086E /* CanceledFileList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CanceledFileList.h; path = ../src/CanceledFileList.h; sourceTree = SOURCE_ROOT; }; - 48791D4211926AEE002C086E /* ClientCreditsList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClientCreditsList.cpp; path = ../src/ClientCreditsList.cpp; sourceTree = SOURCE_ROOT; }; - 48791D4311926AEE002C086E /* ClientCreditsList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClientCreditsList.h; path = ../src/ClientCreditsList.h; sourceTree = SOURCE_ROOT; }; - 48791D4411926AEE002C086E /* ClientList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClientList.cpp; path = ../src/ClientList.cpp; sourceTree = SOURCE_ROOT; }; - 48791D4511926AEE002C086E /* ClientList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClientList.h; path = ../src/ClientList.h; sourceTree = SOURCE_ROOT; }; - 48791D4611926AEE002C086E /* ClientTCPSocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClientTCPSocket.cpp; path = ../src/ClientTCPSocket.cpp; sourceTree = SOURCE_ROOT; }; - 48791D4711926AEE002C086E /* ClientTCPSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClientTCPSocket.h; path = ../src/ClientTCPSocket.h; sourceTree = SOURCE_ROOT; }; - 48791D4811926AEE002C086E /* ClientUDPSocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClientUDPSocket.cpp; path = ../src/ClientUDPSocket.cpp; sourceTree = SOURCE_ROOT; }; - 48791D4911926AEE002C086E /* ClientUDPSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClientUDPSocket.h; path = ../src/ClientUDPSocket.h; sourceTree = SOURCE_ROOT; }; - 48791D4A11926AEE002C086E /* CorruptionBlackBox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CorruptionBlackBox.cpp; path = ../src/CorruptionBlackBox.cpp; sourceTree = SOURCE_ROOT; }; - 48791D4B11926AEE002C086E /* CorruptionBlackBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CorruptionBlackBox.h; path = ../src/CorruptionBlackBox.h; sourceTree = SOURCE_ROOT; }; - 48791D4C11926AEE002C086E /* DownloadClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DownloadClient.cpp; path = ../src/DownloadClient.cpp; sourceTree = SOURCE_ROOT; }; - 48791D4D11926AEE002C086E /* DownloadQueue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DownloadQueue.cpp; path = ../src/DownloadQueue.cpp; sourceTree = SOURCE_ROOT; }; - 48791D4E11926AEE002C086E /* DownloadQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DownloadQueue.h; path = ../src/DownloadQueue.h; sourceTree = SOURCE_ROOT; }; - 48791D4F11926AEE002C086E /* ECSpecialCoreTags.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ECSpecialCoreTags.cpp; path = ../src/ECSpecialCoreTags.cpp; sourceTree = SOURCE_ROOT; }; - 48791D5011926AEE002C086E /* EMSocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = EMSocket.cpp; path = ../src/EMSocket.cpp; sourceTree = SOURCE_ROOT; }; - 48791D5111926AEE002C086E /* EMSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EMSocket.h; path = ../src/EMSocket.h; sourceTree = SOURCE_ROOT; }; - 48791D5211926AEE002C086E /* EncryptedDatagramSocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = EncryptedDatagramSocket.cpp; path = ../src/EncryptedDatagramSocket.cpp; sourceTree = SOURCE_ROOT; }; - 48791D5311926AEE002C086E /* EncryptedDatagramSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EncryptedDatagramSocket.h; path = ../src/EncryptedDatagramSocket.h; sourceTree = SOURCE_ROOT; }; - 48791D5411926AEE002C086E /* EncryptedStreamSocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = EncryptedStreamSocket.cpp; path = ../src/EncryptedStreamSocket.cpp; sourceTree = SOURCE_ROOT; }; - 48791D5511926AEE002C086E /* EncryptedStreamSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EncryptedStreamSocket.h; path = ../src/EncryptedStreamSocket.h; sourceTree = SOURCE_ROOT; }; - 48791D5611926AEE002C086E /* ExternalConn.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ExternalConn.cpp; path = ../src/ExternalConn.cpp; sourceTree = SOURCE_ROOT; }; - 48791D5711926AEE002C086E /* FriendList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FriendList.cpp; path = ../src/FriendList.cpp; sourceTree = SOURCE_ROOT; }; - 48791D5811926AEE002C086E /* FriendList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FriendList.h; path = ../src/FriendList.h; sourceTree = SOURCE_ROOT; }; - 48791D5911926AEE002C086E /* HTTPDownload.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HTTPDownload.cpp; path = ../src/HTTPDownload.cpp; sourceTree = SOURCE_ROOT; }; - 48791D5A11926AEE002C086E /* HTTPDownload.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPDownload.h; path = ../src/HTTPDownload.h; sourceTree = SOURCE_ROOT; }; - 48791D5B11926AEE002C086E /* IPFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IPFilter.cpp; path = ../src/IPFilter.cpp; sourceTree = SOURCE_ROOT; }; - 48791D5C11926AEE002C086E /* IPFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IPFilter.h; path = ../src/IPFilter.h; sourceTree = SOURCE_ROOT; }; - 48791D5D11926AEE002C086E /* KnownFileList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = KnownFileList.cpp; path = ../src/KnownFileList.cpp; sourceTree = SOURCE_ROOT; }; - 48791D5E11926AEE002C086E /* KnownFileList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = KnownFileList.h; path = ../src/KnownFileList.h; sourceTree = SOURCE_ROOT; }; - 48791D5F11926AEE002C086E /* ListenSocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ListenSocket.cpp; path = ../src/ListenSocket.cpp; sourceTree = SOURCE_ROOT; }; - 48791D6011926AEE002C086E /* ListenSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ListenSocket.h; path = ../src/ListenSocket.h; sourceTree = SOURCE_ROOT; }; - 48791D6111926AEE002C086E /* MuleUDPSocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MuleUDPSocket.cpp; path = ../src/MuleUDPSocket.cpp; sourceTree = SOURCE_ROOT; }; - 48791D6211926AEE002C086E /* MuleUDPSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MuleUDPSocket.h; path = ../src/MuleUDPSocket.h; sourceTree = SOURCE_ROOT; }; - 48791D6311926AEE002C086E /* PartFileConvert.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PartFileConvert.cpp; path = ../src/PartFileConvert.cpp; sourceTree = SOURCE_ROOT; }; - 48791D6411926AEE002C086E /* PartFileConvert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PartFileConvert.h; path = ../src/PartFileConvert.h; sourceTree = SOURCE_ROOT; }; - 48791D6511926AEE002C086E /* SearchFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SearchFile.cpp; path = ../src/SearchFile.cpp; sourceTree = SOURCE_ROOT; }; - 48791D6611926AEE002C086E /* SearchFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SearchFile.h; path = ../src/SearchFile.h; sourceTree = SOURCE_ROOT; }; - 48791D6711926AEE002C086E /* SearchList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SearchList.cpp; path = ../src/SearchList.cpp; sourceTree = SOURCE_ROOT; }; - 48791D6811926AEE002C086E /* SearchList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SearchList.h; path = ../src/SearchList.h; sourceTree = SOURCE_ROOT; }; - 48791D6911926AEE002C086E /* ServerConnect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ServerConnect.cpp; path = ../src/ServerConnect.cpp; sourceTree = SOURCE_ROOT; }; - 48791D6A11926AEE002C086E /* ServerConnect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ServerConnect.h; path = ../src/ServerConnect.h; sourceTree = SOURCE_ROOT; }; - 48791D6B11926AEE002C086E /* ServerList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ServerList.cpp; path = ../src/ServerList.cpp; sourceTree = SOURCE_ROOT; }; - 48791D6C11926AEE002C086E /* ServerList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ServerList.h; path = ../src/ServerList.h; sourceTree = SOURCE_ROOT; }; - 48791D6D11926AEE002C086E /* ServerSocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ServerSocket.cpp; path = ../src/ServerSocket.cpp; sourceTree = SOURCE_ROOT; }; - 48791D6E11926AEE002C086E /* ServerSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ServerSocket.h; path = ../src/ServerSocket.h; sourceTree = SOURCE_ROOT; }; - 48791D6F11926AEE002C086E /* ServerUDPSocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ServerUDPSocket.cpp; path = ../src/ServerUDPSocket.cpp; sourceTree = SOURCE_ROOT; }; - 48791D7011926AEE002C086E /* ServerUDPSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ServerUDPSocket.h; path = ../src/ServerUDPSocket.h; sourceTree = SOURCE_ROOT; }; - 48791D7111926AEE002C086E /* SharedFileList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SharedFileList.cpp; path = ../src/SharedFileList.cpp; sourceTree = SOURCE_ROOT; }; - 48791D7211926AEE002C086E /* SharedFileList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SharedFileList.h; path = ../src/SharedFileList.h; sourceTree = SOURCE_ROOT; }; - 48791D7311926AEE002C086E /* TerminationProcessAmuleweb.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TerminationProcessAmuleweb.cpp; path = ../src/TerminationProcessAmuleweb.cpp; sourceTree = SOURCE_ROOT; }; - 48791D7411926AEE002C086E /* TerminationProcessAmuleweb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TerminationProcessAmuleweb.h; path = ../src/TerminationProcessAmuleweb.h; sourceTree = SOURCE_ROOT; }; - 48791D7511926AEE002C086E /* ThreadTasks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadTasks.cpp; path = ../src/ThreadTasks.cpp; sourceTree = SOURCE_ROOT; }; - 48791D7611926AEE002C086E /* ThreadTasks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadTasks.h; path = ../src/ThreadTasks.h; sourceTree = SOURCE_ROOT; }; - 48791D7711926AEE002C086E /* UploadBandwidthThrottler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UploadBandwidthThrottler.cpp; path = ../src/UploadBandwidthThrottler.cpp; sourceTree = SOURCE_ROOT; }; - 48791D7811926AEE002C086E /* UploadBandwidthThrottler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UploadBandwidthThrottler.h; path = ../src/UploadBandwidthThrottler.h; sourceTree = SOURCE_ROOT; }; - 48791D7911926AEE002C086E /* UploadClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UploadClient.cpp; path = ../src/UploadClient.cpp; sourceTree = SOURCE_ROOT; }; - 48791D7A11926AEE002C086E /* UploadQueue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UploadQueue.cpp; path = ../src/UploadQueue.cpp; sourceTree = SOURCE_ROOT; }; - 48791D7B11926AEE002C086E /* UploadQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UploadQueue.h; path = ../src/UploadQueue.h; sourceTree = SOURCE_ROOT; }; - 48791DE311926B21002C086E /* KademliaUDPListener.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = KademliaUDPListener.cpp; path = ../src/kademlia/net/KademliaUDPListener.cpp; sourceTree = SOURCE_ROOT; }; - 48791DE411926B21002C086E /* KademliaUDPListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = KademliaUDPListener.h; path = ../src/kademlia/net/KademliaUDPListener.h; sourceTree = SOURCE_ROOT; }; - 48791DE511926B21002C086E /* PacketTracking.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PacketTracking.cpp; path = ../src/kademlia/net/PacketTracking.cpp; sourceTree = SOURCE_ROOT; }; - 48791DE611926B21002C086E /* PacketTracking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PacketTracking.h; path = ../src/kademlia/net/PacketTracking.h; sourceTree = SOURCE_ROOT; }; - 48791E2511926B41002C086E /* Indexed.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Indexed.cpp; path = ../src/kademlia/kademlia/Indexed.cpp; sourceTree = SOURCE_ROOT; }; - 48791E2611926B41002C086E /* Indexed.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Indexed.h; path = ../src/kademlia/kademlia/Indexed.h; sourceTree = SOURCE_ROOT; }; - 48791E2711926B41002C086E /* Kademlia.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Kademlia.cpp; path = ../src/kademlia/kademlia/Kademlia.cpp; sourceTree = SOURCE_ROOT; }; - 48791E2811926B41002C086E /* Kademlia.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Kademlia.h; path = ../src/kademlia/kademlia/Kademlia.h; sourceTree = SOURCE_ROOT; }; - 48791E2911926B41002C086E /* Prefs.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Prefs.cpp; path = ../src/kademlia/kademlia/Prefs.cpp; sourceTree = SOURCE_ROOT; }; - 48791E2A11926B41002C086E /* Prefs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Prefs.h; path = ../src/kademlia/kademlia/Prefs.h; sourceTree = SOURCE_ROOT; }; - 48791E2B11926B41002C086E /* Search.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Search.cpp; path = ../src/kademlia/kademlia/Search.cpp; sourceTree = SOURCE_ROOT; }; - 48791E2C11926B41002C086E /* Search.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Search.h; path = ../src/kademlia/kademlia/Search.h; sourceTree = SOURCE_ROOT; }; - 48791E2D11926B41002C086E /* UDPFirewallTester.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UDPFirewallTester.cpp; path = ../src/kademlia/kademlia/UDPFirewallTester.cpp; sourceTree = SOURCE_ROOT; }; - 48791E2E11926B41002C086E /* UDPFirewallTester.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UDPFirewallTester.h; path = ../src/kademlia/kademlia/UDPFirewallTester.h; sourceTree = SOURCE_ROOT; }; - 48791E7C11926B54002C086E /* RoutingZone.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RoutingZone.cpp; path = ../src/kademlia/routing/RoutingZone.cpp; sourceTree = SOURCE_ROOT; }; - 48791E7D11926B54002C086E /* RoutingZone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RoutingZone.h; path = ../src/kademlia/routing/RoutingZone.h; sourceTree = SOURCE_ROOT; }; - 48791EAB11926CC7002C086E /* AddFriend.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AddFriend.cpp; path = ../src/AddFriend.cpp; sourceTree = SOURCE_ROOT; }; - 48791EAC11926CC7002C086E /* AddFriend.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AddFriend.h; path = ../src/AddFriend.h; sourceTree = SOURCE_ROOT; }; - 48791EAD11926CC7002C086E /* amule-gui.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "amule-gui.cpp"; path = "../src/amule-gui.cpp"; sourceTree = SOURCE_ROOT; }; - 48791EAE11926CC7002C086E /* amuleDlg.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = amuleDlg.cpp; path = ../src/amuleDlg.cpp; sourceTree = SOURCE_ROOT; }; - 48791EAF11926CC7002C086E /* amuleDlg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = amuleDlg.h; path = ../src/amuleDlg.h; sourceTree = SOURCE_ROOT; }; - 48791EB011926CC7002C086E /* CatDialog.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CatDialog.cpp; path = ../src/CatDialog.cpp; sourceTree = SOURCE_ROOT; }; - 48791EB111926CC7002C086E /* CatDialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CatDialog.h; path = ../src/CatDialog.h; sourceTree = SOURCE_ROOT; }; - 48791EB211926CC7002C086E /* ChatSelector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ChatSelector.cpp; path = ../src/ChatSelector.cpp; sourceTree = SOURCE_ROOT; }; - 48791EB311926CC7002C086E /* ChatSelector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChatSelector.h; path = ../src/ChatSelector.h; sourceTree = SOURCE_ROOT; }; - 48791EB411926CC7002C086E /* ClientDetailDialog.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClientDetailDialog.cpp; path = ../src/ClientDetailDialog.cpp; sourceTree = SOURCE_ROOT; }; - 48791EB511926CC7002C086E /* ClientDetailDialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClientDetailDialog.h; path = ../src/ClientDetailDialog.h; sourceTree = SOURCE_ROOT; }; - 48791EB611926CC7002C086E /* ClientListCtrl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClientListCtrl.cpp; path = ../src/ClientListCtrl.cpp; sourceTree = SOURCE_ROOT; }; - 48791EB711926CC7002C086E /* ClientListCtrl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClientListCtrl.h; path = ../src/ClientListCtrl.h; sourceTree = SOURCE_ROOT; }; - 48791EB811926CC7002C086E /* DirectoryTreeCtrl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DirectoryTreeCtrl.cpp; path = ../src/DirectoryTreeCtrl.cpp; sourceTree = SOURCE_ROOT; }; - 48791EB911926CC7002C086E /* DirectoryTreeCtrl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DirectoryTreeCtrl.h; path = ../src/DirectoryTreeCtrl.h; sourceTree = SOURCE_ROOT; }; - 48791EBA11926CC7002C086E /* DownloadListCtrl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DownloadListCtrl.cpp; path = ../src/DownloadListCtrl.cpp; sourceTree = SOURCE_ROOT; }; - 48791EBB11926CC7002C086E /* DownloadListCtrl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DownloadListCtrl.h; path = ../src/DownloadListCtrl.h; sourceTree = SOURCE_ROOT; }; - 48791EBC11926CC7002C086E /* FileDetailDialog.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FileDetailDialog.cpp; path = ../src/FileDetailDialog.cpp; sourceTree = SOURCE_ROOT; }; - 48791EBD11926CC7002C086E /* FileDetailDialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileDetailDialog.h; path = ../src/FileDetailDialog.h; sourceTree = SOURCE_ROOT; }; - 48791EBE11926CC7002C086E /* FriendListCtrl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FriendListCtrl.cpp; path = ../src/FriendListCtrl.cpp; sourceTree = SOURCE_ROOT; }; - 48791EBF11926CC7002C086E /* FriendListCtrl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FriendListCtrl.h; path = ../src/FriendListCtrl.h; sourceTree = SOURCE_ROOT; }; - 48791EC011926CC7002C086E /* KadDlg.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = KadDlg.cpp; path = ../src/KadDlg.cpp; sourceTree = SOURCE_ROOT; }; - 48791EC111926CC7002C086E /* KadDlg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = KadDlg.h; path = ../src/KadDlg.h; sourceTree = SOURCE_ROOT; }; - 48791EC211926CC7002C086E /* MuleColour.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MuleColour.cpp; path = ../src/MuleColour.cpp; sourceTree = SOURCE_ROOT; }; - 48791EC311926CC7002C086E /* MuleColour.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MuleColour.h; path = ../src/MuleColour.h; sourceTree = SOURCE_ROOT; }; - 48791EC411926CC7002C086E /* MuleTrayIcon.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MuleTrayIcon.cpp; path = ../src/MuleTrayIcon.cpp; sourceTree = SOURCE_ROOT; }; - 48791EC511926CC7002C086E /* MuleTrayIcon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MuleTrayIcon.h; path = ../src/MuleTrayIcon.h; sourceTree = SOURCE_ROOT; }; - 48791EC611926CC7002C086E /* OScopeCtrl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OScopeCtrl.cpp; path = ../src/OScopeCtrl.cpp; sourceTree = SOURCE_ROOT; }; - 48791EC711926CC7002C086E /* OScopeCtrl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OScopeCtrl.h; path = ../src/OScopeCtrl.h; sourceTree = SOURCE_ROOT; }; - 48791EC811926CC7002C086E /* PartFileConvertDlg.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PartFileConvertDlg.cpp; path = ../src/PartFileConvertDlg.cpp; sourceTree = SOURCE_ROOT; }; - 48791EC911926CC7002C086E /* PartFileConvertDlg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PartFileConvertDlg.h; path = ../src/PartFileConvertDlg.h; sourceTree = SOURCE_ROOT; }; - 48791ECA11926CC7002C086E /* PrefsUnifiedDlg.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PrefsUnifiedDlg.cpp; path = ../src/PrefsUnifiedDlg.cpp; sourceTree = SOURCE_ROOT; }; - 48791ECB11926CC7002C086E /* PrefsUnifiedDlg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PrefsUnifiedDlg.h; path = ../src/PrefsUnifiedDlg.h; sourceTree = SOURCE_ROOT; }; - 48791ECC11926CC7002C086E /* SearchDlg.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SearchDlg.cpp; path = ../src/SearchDlg.cpp; sourceTree = SOURCE_ROOT; }; - 48791ECD11926CC7002C086E /* SearchDlg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SearchDlg.h; path = ../src/SearchDlg.h; sourceTree = SOURCE_ROOT; }; - 48791ECE11926CC7002C086E /* SearchListCtrl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SearchListCtrl.cpp; path = ../src/SearchListCtrl.cpp; sourceTree = SOURCE_ROOT; }; - 48791ECF11926CC7002C086E /* SearchListCtrl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SearchListCtrl.h; path = ../src/SearchListCtrl.h; sourceTree = SOURCE_ROOT; }; - 48791ED011926CC7002C086E /* ServerListCtrl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ServerListCtrl.cpp; path = ../src/ServerListCtrl.cpp; sourceTree = SOURCE_ROOT; }; - 48791ED111926CC7002C086E /* ServerListCtrl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ServerListCtrl.h; path = ../src/ServerListCtrl.h; sourceTree = SOURCE_ROOT; }; - 48791ED211926CC7002C086E /* ServerWnd.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ServerWnd.cpp; path = ../src/ServerWnd.cpp; sourceTree = SOURCE_ROOT; }; - 48791ED311926CC7002C086E /* ServerWnd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ServerWnd.h; path = ../src/ServerWnd.h; sourceTree = SOURCE_ROOT; }; - 48791ED411926CC7002C086E /* SharedFilesCtrl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SharedFilesCtrl.cpp; path = ../src/SharedFilesCtrl.cpp; sourceTree = SOURCE_ROOT; }; - 48791ED511926CC7002C086E /* SharedFilesCtrl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SharedFilesCtrl.h; path = ../src/SharedFilesCtrl.h; sourceTree = SOURCE_ROOT; }; - 48791ED611926CC7002C086E /* SharedFilesWnd.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SharedFilesWnd.cpp; path = ../src/SharedFilesWnd.cpp; sourceTree = SOURCE_ROOT; }; - 48791ED711926CC7002C086E /* SharedFilesWnd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SharedFilesWnd.h; path = ../src/SharedFilesWnd.h; sourceTree = SOURCE_ROOT; }; - 48791ED811926CC7002C086E /* StatisticsDlg.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StatisticsDlg.cpp; path = ../src/StatisticsDlg.cpp; sourceTree = SOURCE_ROOT; }; - 48791ED911926CC7002C086E /* StatisticsDlg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StatisticsDlg.h; path = ../src/StatisticsDlg.h; sourceTree = SOURCE_ROOT; }; - 48791EDA11926CC7002C086E /* TransferWnd.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TransferWnd.cpp; path = ../src/TransferWnd.cpp; sourceTree = SOURCE_ROOT; }; - 48791EDB11926CC7002C086E /* TransferWnd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TransferWnd.h; path = ../src/TransferWnd.h; sourceTree = SOURCE_ROOT; }; - 48791F6611926F24002C086E /* amuleAppCommon.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = amuleAppCommon.cpp; path = ../src/amuleAppCommon.cpp; sourceTree = SOURCE_ROOT; }; - 48791F6711926F24002C086E /* ClientCredits.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClientCredits.cpp; path = ../src/ClientCredits.cpp; sourceTree = SOURCE_ROOT; }; - 48791F6811926F24002C086E /* ClientCredits.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClientCredits.h; path = ../src/ClientCredits.h; sourceTree = SOURCE_ROOT; }; - 48791F6911926F24002C086E /* ECSpecialMuleTags.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ECSpecialMuleTags.cpp; path = ../src/ECSpecialMuleTags.cpp; sourceTree = SOURCE_ROOT; }; - 48791F6A11926F24002C086E /* GetTickCount.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GetTickCount.cpp; path = ../src/GetTickCount.cpp; sourceTree = SOURCE_ROOT; }; - 48791F6B11926F24002C086E /* GetTickCount.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GetTickCount.h; path = ../src/GetTickCount.h; sourceTree = SOURCE_ROOT; }; - 48791F6C11926F24002C086E /* GuiEvents.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GuiEvents.cpp; path = ../src/GuiEvents.cpp; sourceTree = SOURCE_ROOT; }; - 48791F6D11926F24002C086E /* GuiEvents.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GuiEvents.h; path = ../src/GuiEvents.h; sourceTree = SOURCE_ROOT; }; - 48791F6E11926F24002C086E /* KnownFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = KnownFile.cpp; path = ../src/KnownFile.cpp; sourceTree = SOURCE_ROOT; }; - 48791F6F11926F24002C086E /* KnownFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = KnownFile.h; path = ../src/KnownFile.h; sourceTree = SOURCE_ROOT; }; - 48791F7011926F24002C086E /* Logger.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Logger.cpp; path = ../src/Logger.cpp; sourceTree = SOURCE_ROOT; }; - 48791F7111926F24002C086E /* Logger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Logger.h; path = ../src/Logger.h; sourceTree = SOURCE_ROOT; }; - 48791F7211926F24002C086E /* PartFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PartFile.cpp; path = ../src/PartFile.cpp; sourceTree = SOURCE_ROOT; }; - 48791F7311926F24002C086E /* PartFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PartFile.h; path = ../src/PartFile.h; sourceTree = SOURCE_ROOT; }; - 48791F7411926F24002C086E /* Preferences.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Preferences.cpp; path = ../src/Preferences.cpp; sourceTree = SOURCE_ROOT; }; - 48791F7511926F24002C086E /* Preferences.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Preferences.h; path = ../src/Preferences.h; sourceTree = SOURCE_ROOT; }; - 48791F7611926F24002C086E /* Proxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Proxy.cpp; path = ../src/Proxy.cpp; sourceTree = SOURCE_ROOT; }; - 48791F7711926F24002C086E /* Proxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Proxy.h; path = ../src/Proxy.h; sourceTree = SOURCE_ROOT; }; - 48791F7811926F24002C086E /* Server.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Server.cpp; path = ../src/Server.cpp; sourceTree = SOURCE_ROOT; }; - 48791F7911926F24002C086E /* Server.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Server.h; path = ../src/Server.h; sourceTree = SOURCE_ROOT; }; - 48791F7A11926F24002C086E /* SHAHashSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SHAHashSet.cpp; path = ../src/SHAHashSet.cpp; sourceTree = SOURCE_ROOT; }; - 48791F7B11926F24002C086E /* SHAHashSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SHAHashSet.h; path = ../src/SHAHashSet.h; sourceTree = SOURCE_ROOT; }; - 48791F7C11926F24002C086E /* Statistics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Statistics.cpp; path = ../src/Statistics.cpp; sourceTree = SOURCE_ROOT; }; - 48791F7D11926F24002C086E /* Statistics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Statistics.h; path = ../src/Statistics.h; sourceTree = SOURCE_ROOT; }; - 48791F7E11926F24002C086E /* StatTree.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StatTree.cpp; path = ../src/StatTree.cpp; sourceTree = SOURCE_ROOT; }; - 48791F7F11926F24002C086E /* StatTree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StatTree.h; path = ../src/StatTree.h; sourceTree = SOURCE_ROOT; }; - 48791F8011926F24002C086E /* TerminationProcess.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TerminationProcess.cpp; path = ../src/TerminationProcess.cpp; sourceTree = SOURCE_ROOT; }; - 48791F8111926F24002C086E /* TerminationProcess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TerminationProcess.h; path = ../src/TerminationProcess.h; sourceTree = SOURCE_ROOT; }; - 48791F8211926F24002C086E /* UserEvents.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UserEvents.cpp; path = ../src/UserEvents.cpp; sourceTree = SOURCE_ROOT; }; - 48791F8311926F24002C086E /* UserEvents.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UserEvents.h; path = ../src/UserEvents.h; sourceTree = SOURCE_ROOT; }; - 48791FD611926F74002C086E /* NetworkFunctions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NetworkFunctions.cpp; path = ../src/NetworkFunctions.cpp; sourceTree = SOURCE_ROOT; }; - 48791FD711926F74002C086E /* NetworkFunctions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NetworkFunctions.h; path = ../src/NetworkFunctions.h; sourceTree = SOURCE_ROOT; }; - 48791FD811926F74002C086E /* OtherFunctions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OtherFunctions.cpp; path = ../src/OtherFunctions.cpp; sourceTree = SOURCE_ROOT; }; - 48791FD911926F74002C086E /* OtherFunctions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OtherFunctions.h; path = ../src/OtherFunctions.h; sourceTree = SOURCE_ROOT; }; + 4833446F1196275F00D9BE75 /* amule.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = amule.icns; sourceTree = ""; }; + 4848D2CD1192E83100ED40CC /* GenericClientListCtrl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GenericClientListCtrl.cpp; path = ../../../src/GenericClientListCtrl.cpp; sourceTree = SOURCE_ROOT; }; + 4848D2CE1192E83100ED40CC /* GenericClientListCtrl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GenericClientListCtrl.h; path = ../../../src/GenericClientListCtrl.h; sourceTree = SOURCE_ROOT; }; + 4848D8091192E85900ED40CC /* SharedFilePeersListCtrl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SharedFilePeersListCtrl.cpp; path = ../../../src/SharedFilePeersListCtrl.cpp; sourceTree = SOURCE_ROOT; }; + 4848D80A1192E85900ED40CC /* SharedFilePeersListCtrl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SharedFilePeersListCtrl.h; path = ../../../src/SharedFilePeersListCtrl.h; sourceTree = SOURCE_ROOT; }; + 4848D80B1192E85900ED40CC /* SourceListCtrl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SourceListCtrl.cpp; path = ../../../src/SourceListCtrl.cpp; sourceTree = SOURCE_ROOT; }; + 4848D80C1192E85900ED40CC /* SourceListCtrl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SourceListCtrl.h; path = ../../../src/SourceListCtrl.h; sourceTree = SOURCE_ROOT; }; + 4879119511925E61002C086E /* CFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CFile.cpp; path = ../../../src/CFile.cpp; sourceTree = SOURCE_ROOT; }; + 4879119611925E61002C086E /* CFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CFile.h; path = ../../../src/CFile.h; sourceTree = SOURCE_ROOT; }; + 4879119711925E61002C086E /* DataToText.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DataToText.cpp; path = ../../../src/DataToText.cpp; sourceTree = SOURCE_ROOT; }; + 4879119811925E61002C086E /* DataToText.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DataToText.h; path = ../../../src/DataToText.h; sourceTree = SOURCE_ROOT; }; + 4879119911925E61002C086E /* ED2KLink.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ED2KLink.cpp; path = ../../../src/ED2KLink.cpp; sourceTree = SOURCE_ROOT; }; + 4879119A11925E61002C086E /* ED2KLink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ED2KLink.h; path = ../../../src/ED2KLink.h; sourceTree = SOURCE_ROOT; }; + 4879119B11925E61002C086E /* GapList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GapList.cpp; path = ../../../src/GapList.cpp; sourceTree = SOURCE_ROOT; }; + 4879119C11925E61002C086E /* GapList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GapList.h; path = ../../../src/GapList.h; sourceTree = SOURCE_ROOT; }; + 4879119D11925E61002C086E /* MagnetURI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MagnetURI.cpp; path = ../../../src/MagnetURI.cpp; sourceTree = SOURCE_ROOT; }; + 4879119E11925E61002C086E /* MagnetURI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MagnetURI.h; path = ../../../src/MagnetURI.h; sourceTree = SOURCE_ROOT; }; + 4879119F11925E61002C086E /* MemFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MemFile.cpp; path = ../../../src/MemFile.cpp; sourceTree = SOURCE_ROOT; }; + 487911A011925E61002C086E /* MemFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MemFile.h; path = ../../../src/MemFile.h; sourceTree = SOURCE_ROOT; }; + 487911A311925E61002C086E /* Packet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Packet.cpp; path = ../../../src/Packet.cpp; sourceTree = SOURCE_ROOT; }; + 487911A411925E61002C086E /* Packet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Packet.h; path = ../../../src/Packet.h; sourceTree = SOURCE_ROOT; }; + 487911A511925E61002C086E /* RLE.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RLE.cpp; path = ../../../src/RLE.cpp; sourceTree = SOURCE_ROOT; }; + 487911A611925E61002C086E /* RLE.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RLE.h; path = ../../../src/RLE.h; sourceTree = SOURCE_ROOT; }; + 487911A711925E61002C086E /* SafeFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SafeFile.cpp; path = ../../../src/SafeFile.cpp; sourceTree = SOURCE_ROOT; }; + 487911A811925E61002C086E /* SafeFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SafeFile.h; path = ../../../src/SafeFile.h; sourceTree = SOURCE_ROOT; }; + 487911A911925E61002C086E /* SHA.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SHA.cpp; path = ../../../src/SHA.cpp; sourceTree = SOURCE_ROOT; }; + 487911AA11925E61002C086E /* SHA.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SHA.h; path = ../../../src/SHA.h; sourceTree = SOURCE_ROOT; }; + 487911AB11925E61002C086E /* Tag.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Tag.cpp; path = ../../../src/Tag.cpp; sourceTree = SOURCE_ROOT; }; + 487911AC11925E61002C086E /* Tag.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Tag.h; path = ../../../src/Tag.h; sourceTree = SOURCE_ROOT; }; + 487911AD11925E61002C086E /* Timer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Timer.cpp; path = ../../../src/Timer.cpp; sourceTree = SOURCE_ROOT; }; + 487911AE11925E61002C086E /* Timer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Timer.h; path = ../../../src/Timer.h; sourceTree = SOURCE_ROOT; }; + 487911E811925FDD002C086E /* AsyncDNS.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AsyncDNS.cpp; path = ../../../src/AsyncDNS.cpp; sourceTree = SOURCE_ROOT; }; + 487911E911925FDD002C086E /* AsyncDNS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AsyncDNS.h; path = ../../../src/AsyncDNS.h; sourceTree = SOURCE_ROOT; }; + 487911EA11925FDD002C086E /* DeadSourceList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DeadSourceList.cpp; path = ../../../src/DeadSourceList.cpp; sourceTree = SOURCE_ROOT; }; + 487911EB11925FDD002C086E /* DeadSourceList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DeadSourceList.h; path = ../../../src/DeadSourceList.h; sourceTree = SOURCE_ROOT; }; + 487911EC11925FDD002C086E /* FileArea.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FileArea.cpp; path = ../../../src/FileArea.cpp; sourceTree = SOURCE_ROOT; }; + 487911ED11925FDD002C086E /* FileArea.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileArea.h; path = ../../../src/FileArea.h; sourceTree = SOURCE_ROOT; }; + 487911EE11925FDD002C086E /* FileAutoClose.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FileAutoClose.cpp; path = ../../../src/FileAutoClose.cpp; sourceTree = SOURCE_ROOT; }; + 487911EF11925FDD002C086E /* FileAutoClose.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileAutoClose.h; path = ../../../src/FileAutoClose.h; sourceTree = SOURCE_ROOT; }; + 487911F011925FDD002C086E /* Friend.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Friend.cpp; path = ../../../src/Friend.cpp; sourceTree = SOURCE_ROOT; }; + 487911F111925FDD002C086E /* Friend.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Friend.h; path = ../../../src/Friend.h; sourceTree = SOURCE_ROOT; }; + 487911F211925FDD002C086E /* Parser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Parser.cpp; path = ../../../src/Parser.cpp; sourceTree = SOURCE_ROOT; }; + 487911F311925FDD002C086E /* Parser.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Parser.hpp; path = ../../../src/Parser.hpp; sourceTree = SOURCE_ROOT; }; + 487911F411925FDD002C086E /* PlatformSpecific.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PlatformSpecific.cpp; path = ../../../src/PlatformSpecific.cpp; sourceTree = SOURCE_ROOT; }; + 487911F511925FDD002C086E /* PlatformSpecific.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PlatformSpecific.h; path = ../../../src/PlatformSpecific.h; sourceTree = SOURCE_ROOT; }; + 487911F611925FDD002C086E /* RandomFunctions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RandomFunctions.cpp; path = ../../../src/RandomFunctions.cpp; sourceTree = SOURCE_ROOT; }; + 487911F711925FDD002C086E /* RandomFunctions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RandomFunctions.h; path = ../../../src/RandomFunctions.h; sourceTree = SOURCE_ROOT; }; + 487911F811925FDD002C086E /* RC4Encrypt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RC4Encrypt.cpp; path = ../../../src/RC4Encrypt.cpp; sourceTree = SOURCE_ROOT; }; + 487911F911925FDD002C086E /* RC4Encrypt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RC4Encrypt.h; path = ../../../src/RC4Encrypt.h; sourceTree = SOURCE_ROOT; }; + 487911FA11925FDD002C086E /* Scanner.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Scanner.cpp; path = ../../../src/Scanner.cpp; sourceTree = SOURCE_ROOT; }; + 487911FB11925FDD002C086E /* Scanner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Scanner.h; path = ../../../src/Scanner.h; sourceTree = SOURCE_ROOT; }; + 487911FC11925FDD002C086E /* StateMachine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StateMachine.cpp; path = ../../../src/StateMachine.cpp; sourceTree = SOURCE_ROOT; }; + 487911FD11925FDD002C086E /* StateMachine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StateMachine.h; path = ../../../src/StateMachine.h; sourceTree = SOURCE_ROOT; }; + 487911FE11925FDD002C086E /* ThreadScheduler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadScheduler.cpp; path = ../../../src/ThreadScheduler.cpp; sourceTree = SOURCE_ROOT; }; + 487911FF11925FDD002C086E /* ThreadScheduler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadScheduler.h; path = ../../../src/ThreadScheduler.h; sourceTree = SOURCE_ROOT; }; + 4879120011925FDD002C086E /* UPnPBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UPnPBase.cpp; path = ../../../src/UPnPBase.cpp; sourceTree = SOURCE_ROOT; }; + 4879120111925FDD002C086E /* UPnPBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UPnPBase.h; path = ../../../src/UPnPBase.h; sourceTree = SOURCE_ROOT; }; + 487917E11192601E002C086E /* Entry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Entry.cpp; path = ../../../src/kademlia/kademlia/Entry.cpp; sourceTree = SOURCE_ROOT; }; + 487917E21192601E002C086E /* Entry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Entry.h; path = ../../../src/kademlia/kademlia/Entry.h; sourceTree = SOURCE_ROOT; }; + 487917E31192601E002C086E /* SearchManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SearchManager.cpp; path = ../../../src/kademlia/kademlia/SearchManager.cpp; sourceTree = SOURCE_ROOT; }; + 487917E41192601E002C086E /* SearchManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SearchManager.h; path = ../../../src/kademlia/kademlia/SearchManager.h; sourceTree = SOURCE_ROOT; }; + 48791CD91192607A002C086E /* Contact.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Contact.cpp; path = ../../../src/kademlia/routing/Contact.cpp; sourceTree = SOURCE_ROOT; }; + 48791CDA1192607A002C086E /* Contact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Contact.h; path = ../../../src/kademlia/routing/Contact.h; sourceTree = SOURCE_ROOT; }; + 48791CDB1192607A002C086E /* RoutingBin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RoutingBin.cpp; path = ../../../src/kademlia/routing/RoutingBin.cpp; sourceTree = SOURCE_ROOT; }; + 48791CDC1192607A002C086E /* RoutingBin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RoutingBin.h; path = ../../../src/kademlia/routing/RoutingBin.h; sourceTree = SOURCE_ROOT; }; + 48791D0A119260A0002C086E /* UInt128.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UInt128.cpp; path = ../../../src/kademlia/utils/UInt128.cpp; sourceTree = SOURCE_ROOT; }; + 48791D0B119260A0002C086E /* UInt128.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UInt128.h; path = ../../../src/kademlia/utils/UInt128.h; sourceTree = SOURCE_ROOT; }; + 48791D0E11926A0E002C086E /* BarShader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BarShader.cpp; path = ../../../src/BarShader.cpp; sourceTree = SOURCE_ROOT; }; + 48791D0F11926A0E002C086E /* BarShader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BarShader.h; path = ../../../src/BarShader.h; sourceTree = SOURCE_ROOT; }; + 48791D1011926A0E002C086E /* ChatWnd.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ChatWnd.cpp; path = ../../../src/ChatWnd.cpp; sourceTree = SOURCE_ROOT; }; + 48791D1111926A0E002C086E /* ChatWnd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChatWnd.h; path = ../../../src/ChatWnd.h; sourceTree = SOURCE_ROOT; }; + 48791D1211926A0E002C086E /* ColorFrameCtrl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ColorFrameCtrl.cpp; path = ../../../src/ColorFrameCtrl.cpp; sourceTree = SOURCE_ROOT; }; + 48791D1311926A0E002C086E /* ColorFrameCtrl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ColorFrameCtrl.h; path = ../../../src/ColorFrameCtrl.h; sourceTree = SOURCE_ROOT; }; + 48791D1411926A0E002C086E /* CommentDialog.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommentDialog.cpp; path = ../../../src/CommentDialog.cpp; sourceTree = SOURCE_ROOT; }; + 48791D1511926A0E002C086E /* CommentDialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommentDialog.h; path = ../../../src/CommentDialog.h; sourceTree = SOURCE_ROOT; }; + 48791D1611926A0E002C086E /* CommentDialogLst.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommentDialogLst.cpp; path = ../../../src/CommentDialogLst.cpp; sourceTree = SOURCE_ROOT; }; + 48791D1711926A0E002C086E /* CommentDialogLst.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommentDialogLst.h; path = ../../../src/CommentDialogLst.h; sourceTree = SOURCE_ROOT; }; + 48791D1811926A0E002C086E /* EditServerListDlg.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = EditServerListDlg.cpp; path = ../../../src/EditServerListDlg.cpp; sourceTree = SOURCE_ROOT; }; + 48791D1911926A0E002C086E /* EditServerListDlg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EditServerListDlg.h; path = ../../../src/EditServerListDlg.h; sourceTree = SOURCE_ROOT; }; + 48791D1A11926A0E002C086E /* FileDetailListCtrl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FileDetailListCtrl.cpp; path = ../../../src/FileDetailListCtrl.cpp; sourceTree = SOURCE_ROOT; }; + 48791D1B11926A0E002C086E /* FileDetailListCtrl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileDetailListCtrl.h; path = ../../../src/FileDetailListCtrl.h; sourceTree = SOURCE_ROOT; }; + 48791D1C11926A0E002C086E /* IP2Country.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IP2Country.cpp; path = ../../../src/IP2Country.cpp; sourceTree = SOURCE_ROOT; }; + 48791D1D11926A0E002C086E /* IP2Country.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IP2Country.h; path = ../../../src/IP2Country.h; sourceTree = SOURCE_ROOT; }; + 48791D1E11926A0E002C086E /* MuleCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MuleCollection.cpp; path = ../../../src/MuleCollection.cpp; sourceTree = SOURCE_ROOT; }; + 48791D1F11926A0E002C086E /* MuleCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MuleCollection.h; path = ../../../src/MuleCollection.h; sourceTree = SOURCE_ROOT; }; + 48791D2011926A0E002C086E /* MuleGifCtrl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MuleGifCtrl.cpp; path = ../../../src/MuleGifCtrl.cpp; sourceTree = SOURCE_ROOT; }; + 48791D2111926A0E002C086E /* MuleGifCtrl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MuleGifCtrl.h; path = ../../../src/MuleGifCtrl.h; sourceTree = SOURCE_ROOT; }; + 48791D2211926A0E002C086E /* MuleListCtrl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MuleListCtrl.cpp; path = ../../../src/MuleListCtrl.cpp; sourceTree = SOURCE_ROOT; }; + 48791D2311926A0E002C086E /* MuleListCtrl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MuleListCtrl.h; path = ../../../src/MuleListCtrl.h; sourceTree = SOURCE_ROOT; }; + 48791D2411926A0E002C086E /* MuleNotebook.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MuleNotebook.cpp; path = ../../../src/MuleNotebook.cpp; sourceTree = SOURCE_ROOT; }; + 48791D2511926A0E002C086E /* MuleNotebook.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MuleNotebook.h; path = ../../../src/MuleNotebook.h; sourceTree = SOURCE_ROOT; }; + 48791D2611926A0E002C086E /* MuleTextCtrl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MuleTextCtrl.cpp; path = ../../../src/MuleTextCtrl.cpp; sourceTree = SOURCE_ROOT; }; + 48791D2711926A0E002C086E /* MuleTextCtrl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MuleTextCtrl.h; path = ../../../src/MuleTextCtrl.h; sourceTree = SOURCE_ROOT; }; + 48791D2811926A0E002C086E /* muuli_wdr.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = muuli_wdr.cpp; path = ../../../src/muuli_wdr.cpp; sourceTree = SOURCE_ROOT; }; + 48791D2911926A0E002C086E /* muuli_wdr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = muuli_wdr.h; path = ../../../src/muuli_wdr.h; sourceTree = SOURCE_ROOT; }; + 48791D3911926A2E002C086E /* listctrl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = listctrl.cpp; path = ../../../src/extern/wxWidgets/listctrl.cpp; sourceTree = SOURCE_ROOT; }; + 48791D3A11926A2E002C086E /* listctrl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = listctrl.h; path = ../../../src/extern/wxWidgets/listctrl.h; sourceTree = SOURCE_ROOT; }; + 48791D3D11926AEE002C086E /* amule.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = amule.cpp; path = ../../../src/amule.cpp; sourceTree = SOURCE_ROOT; }; + 48791D3E11926AEE002C086E /* amule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = amule.h; path = ../../../src/amule.h; sourceTree = SOURCE_ROOT; }; + 48791D3F11926AEE002C086E /* BaseClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BaseClient.cpp; path = ../../../src/BaseClient.cpp; sourceTree = SOURCE_ROOT; }; + 48791D4011926AEE002C086E /* CanceledFileList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CanceledFileList.cpp; path = ../../../src/CanceledFileList.cpp; sourceTree = SOURCE_ROOT; }; + 48791D4111926AEE002C086E /* CanceledFileList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CanceledFileList.h; path = ../../../src/CanceledFileList.h; sourceTree = SOURCE_ROOT; }; + 48791D4211926AEE002C086E /* ClientCreditsList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClientCreditsList.cpp; path = ../../../src/ClientCreditsList.cpp; sourceTree = SOURCE_ROOT; }; + 48791D4311926AEE002C086E /* ClientCreditsList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClientCreditsList.h; path = ../../../src/ClientCreditsList.h; sourceTree = SOURCE_ROOT; }; + 48791D4411926AEE002C086E /* ClientList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClientList.cpp; path = ../../../src/ClientList.cpp; sourceTree = SOURCE_ROOT; }; + 48791D4511926AEE002C086E /* ClientList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClientList.h; path = ../../../src/ClientList.h; sourceTree = SOURCE_ROOT; }; + 48791D4611926AEE002C086E /* ClientTCPSocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClientTCPSocket.cpp; path = ../../../src/ClientTCPSocket.cpp; sourceTree = SOURCE_ROOT; }; + 48791D4711926AEE002C086E /* ClientTCPSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClientTCPSocket.h; path = ../../../src/ClientTCPSocket.h; sourceTree = SOURCE_ROOT; }; + 48791D4811926AEE002C086E /* ClientUDPSocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClientUDPSocket.cpp; path = ../../../src/ClientUDPSocket.cpp; sourceTree = SOURCE_ROOT; }; + 48791D4911926AEE002C086E /* ClientUDPSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClientUDPSocket.h; path = ../../../src/ClientUDPSocket.h; sourceTree = SOURCE_ROOT; }; + 48791D4A11926AEE002C086E /* CorruptionBlackBox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CorruptionBlackBox.cpp; path = ../../../src/CorruptionBlackBox.cpp; sourceTree = SOURCE_ROOT; }; + 48791D4B11926AEE002C086E /* CorruptionBlackBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CorruptionBlackBox.h; path = ../../../src/CorruptionBlackBox.h; sourceTree = SOURCE_ROOT; }; + 48791D4C11926AEE002C086E /* DownloadClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DownloadClient.cpp; path = ../../../src/DownloadClient.cpp; sourceTree = SOURCE_ROOT; }; + 48791D4D11926AEE002C086E /* DownloadQueue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DownloadQueue.cpp; path = ../../../src/DownloadQueue.cpp; sourceTree = SOURCE_ROOT; }; + 48791D4E11926AEE002C086E /* DownloadQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DownloadQueue.h; path = ../../../src/DownloadQueue.h; sourceTree = SOURCE_ROOT; }; + 48791D4F11926AEE002C086E /* ECSpecialCoreTags.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ECSpecialCoreTags.cpp; path = ../../../src/ECSpecialCoreTags.cpp; sourceTree = SOURCE_ROOT; }; + 48791D5011926AEE002C086E /* EMSocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = EMSocket.cpp; path = ../../../src/EMSocket.cpp; sourceTree = SOURCE_ROOT; }; + 48791D5111926AEE002C086E /* EMSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EMSocket.h; path = ../../../src/EMSocket.h; sourceTree = SOURCE_ROOT; }; + 48791D5211926AEE002C086E /* EncryptedDatagramSocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = EncryptedDatagramSocket.cpp; path = ../../../src/EncryptedDatagramSocket.cpp; sourceTree = SOURCE_ROOT; }; + 48791D5311926AEE002C086E /* EncryptedDatagramSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EncryptedDatagramSocket.h; path = ../../../src/EncryptedDatagramSocket.h; sourceTree = SOURCE_ROOT; }; + 48791D5411926AEE002C086E /* EncryptedStreamSocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = EncryptedStreamSocket.cpp; path = ../../../src/EncryptedStreamSocket.cpp; sourceTree = SOURCE_ROOT; }; + 48791D5511926AEE002C086E /* EncryptedStreamSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EncryptedStreamSocket.h; path = ../../../src/EncryptedStreamSocket.h; sourceTree = SOURCE_ROOT; }; + 48791D5611926AEE002C086E /* ExternalConn.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ExternalConn.cpp; path = ../../../src/ExternalConn.cpp; sourceTree = SOURCE_ROOT; }; + 48791D5711926AEE002C086E /* FriendList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FriendList.cpp; path = ../../../src/FriendList.cpp; sourceTree = SOURCE_ROOT; }; + 48791D5811926AEE002C086E /* FriendList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FriendList.h; path = ../../../src/FriendList.h; sourceTree = SOURCE_ROOT; }; + 48791D5911926AEE002C086E /* HTTPDownload.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HTTPDownload.cpp; path = ../../../src/HTTPDownload.cpp; sourceTree = SOURCE_ROOT; }; + 48791D5A11926AEE002C086E /* HTTPDownload.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPDownload.h; path = ../../../src/HTTPDownload.h; sourceTree = SOURCE_ROOT; }; + 48791D5B11926AEE002C086E /* IPFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IPFilter.cpp; path = ../../../src/IPFilter.cpp; sourceTree = SOURCE_ROOT; }; + 48791D5C11926AEE002C086E /* IPFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IPFilter.h; path = ../../../src/IPFilter.h; sourceTree = SOURCE_ROOT; }; + 48791D5D11926AEE002C086E /* KnownFileList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = KnownFileList.cpp; path = ../../../src/KnownFileList.cpp; sourceTree = SOURCE_ROOT; }; + 48791D5E11926AEE002C086E /* KnownFileList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = KnownFileList.h; path = ../../../src/KnownFileList.h; sourceTree = SOURCE_ROOT; }; + 48791D5F11926AEE002C086E /* ListenSocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ListenSocket.cpp; path = ../../../src/ListenSocket.cpp; sourceTree = SOURCE_ROOT; }; + 48791D6011926AEE002C086E /* ListenSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ListenSocket.h; path = ../../../src/ListenSocket.h; sourceTree = SOURCE_ROOT; }; + 48791D6111926AEE002C086E /* MuleUDPSocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MuleUDPSocket.cpp; path = ../../../src/MuleUDPSocket.cpp; sourceTree = SOURCE_ROOT; }; + 48791D6211926AEE002C086E /* MuleUDPSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MuleUDPSocket.h; path = ../../../src/MuleUDPSocket.h; sourceTree = SOURCE_ROOT; }; + 48791D6311926AEE002C086E /* PartFileConvert.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PartFileConvert.cpp; path = ../../../src/PartFileConvert.cpp; sourceTree = SOURCE_ROOT; }; + 48791D6411926AEE002C086E /* PartFileConvert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PartFileConvert.h; path = ../../../src/PartFileConvert.h; sourceTree = SOURCE_ROOT; }; + 48791D6511926AEE002C086E /* SearchFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SearchFile.cpp; path = ../../../src/SearchFile.cpp; sourceTree = SOURCE_ROOT; }; + 48791D6611926AEE002C086E /* SearchFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SearchFile.h; path = ../../../src/SearchFile.h; sourceTree = SOURCE_ROOT; }; + 48791D6711926AEE002C086E /* SearchList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SearchList.cpp; path = ../../../src/SearchList.cpp; sourceTree = SOURCE_ROOT; }; + 48791D6811926AEE002C086E /* SearchList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SearchList.h; path = ../../../src/SearchList.h; sourceTree = SOURCE_ROOT; }; + 48791D6911926AEE002C086E /* ServerConnect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ServerConnect.cpp; path = ../../../src/ServerConnect.cpp; sourceTree = SOURCE_ROOT; }; + 48791D6A11926AEE002C086E /* ServerConnect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ServerConnect.h; path = ../../../src/ServerConnect.h; sourceTree = SOURCE_ROOT; }; + 48791D6B11926AEE002C086E /* ServerList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ServerList.cpp; path = ../../../src/ServerList.cpp; sourceTree = SOURCE_ROOT; }; + 48791D6C11926AEE002C086E /* ServerList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ServerList.h; path = ../../../src/ServerList.h; sourceTree = SOURCE_ROOT; }; + 48791D6D11926AEE002C086E /* ServerSocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ServerSocket.cpp; path = ../../../src/ServerSocket.cpp; sourceTree = SOURCE_ROOT; }; + 48791D6E11926AEE002C086E /* ServerSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ServerSocket.h; path = ../../../src/ServerSocket.h; sourceTree = SOURCE_ROOT; }; + 48791D6F11926AEE002C086E /* ServerUDPSocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ServerUDPSocket.cpp; path = ../../../src/ServerUDPSocket.cpp; sourceTree = SOURCE_ROOT; }; + 48791D7011926AEE002C086E /* ServerUDPSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ServerUDPSocket.h; path = ../../../src/ServerUDPSocket.h; sourceTree = SOURCE_ROOT; }; + 48791D7111926AEE002C086E /* SharedFileList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SharedFileList.cpp; path = ../../../src/SharedFileList.cpp; sourceTree = SOURCE_ROOT; }; + 48791D7211926AEE002C086E /* SharedFileList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SharedFileList.h; path = ../../../src/SharedFileList.h; sourceTree = SOURCE_ROOT; }; + 48791D7311926AEE002C086E /* TerminationProcessAmuleweb.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TerminationProcessAmuleweb.cpp; path = ../../../src/TerminationProcessAmuleweb.cpp; sourceTree = SOURCE_ROOT; }; + 48791D7411926AEE002C086E /* TerminationProcessAmuleweb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TerminationProcessAmuleweb.h; path = ../../../src/TerminationProcessAmuleweb.h; sourceTree = SOURCE_ROOT; }; + 48791D7511926AEE002C086E /* ThreadTasks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadTasks.cpp; path = ../../../src/ThreadTasks.cpp; sourceTree = SOURCE_ROOT; }; + 48791D7611926AEE002C086E /* ThreadTasks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadTasks.h; path = ../../../src/ThreadTasks.h; sourceTree = SOURCE_ROOT; }; + 48791D7711926AEE002C086E /* UploadBandwidthThrottler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UploadBandwidthThrottler.cpp; path = ../../../src/UploadBandwidthThrottler.cpp; sourceTree = SOURCE_ROOT; }; + 48791D7811926AEE002C086E /* UploadBandwidthThrottler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UploadBandwidthThrottler.h; path = ../../../src/UploadBandwidthThrottler.h; sourceTree = SOURCE_ROOT; }; + 48791D7911926AEE002C086E /* UploadClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UploadClient.cpp; path = ../../../src/UploadClient.cpp; sourceTree = SOURCE_ROOT; }; + 48791D7A11926AEE002C086E /* UploadQueue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UploadQueue.cpp; path = ../../../src/UploadQueue.cpp; sourceTree = SOURCE_ROOT; }; + 48791D7B11926AEE002C086E /* UploadQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UploadQueue.h; path = ../../../src/UploadQueue.h; sourceTree = SOURCE_ROOT; }; + 48791DE311926B21002C086E /* KademliaUDPListener.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = KademliaUDPListener.cpp; path = ../../../src/kademlia/net/KademliaUDPListener.cpp; sourceTree = SOURCE_ROOT; }; + 48791DE411926B21002C086E /* KademliaUDPListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = KademliaUDPListener.h; path = ../../../src/kademlia/net/KademliaUDPListener.h; sourceTree = SOURCE_ROOT; }; + 48791DE511926B21002C086E /* PacketTracking.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PacketTracking.cpp; path = ../../../src/kademlia/net/PacketTracking.cpp; sourceTree = SOURCE_ROOT; }; + 48791DE611926B21002C086E /* PacketTracking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PacketTracking.h; path = ../../../src/kademlia/net/PacketTracking.h; sourceTree = SOURCE_ROOT; }; + 48791E2511926B41002C086E /* Indexed.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Indexed.cpp; path = ../../../src/kademlia/kademlia/Indexed.cpp; sourceTree = SOURCE_ROOT; }; + 48791E2611926B41002C086E /* Indexed.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Indexed.h; path = ../../../src/kademlia/kademlia/Indexed.h; sourceTree = SOURCE_ROOT; }; + 48791E2711926B41002C086E /* Kademlia.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Kademlia.cpp; path = ../../../src/kademlia/kademlia/Kademlia.cpp; sourceTree = SOURCE_ROOT; }; + 48791E2811926B41002C086E /* Kademlia.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Kademlia.h; path = ../../../src/kademlia/kademlia/Kademlia.h; sourceTree = SOURCE_ROOT; }; + 48791E2911926B41002C086E /* Prefs.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Prefs.cpp; path = ../../../src/kademlia/kademlia/Prefs.cpp; sourceTree = SOURCE_ROOT; }; + 48791E2A11926B41002C086E /* Prefs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Prefs.h; path = ../../../src/kademlia/kademlia/Prefs.h; sourceTree = SOURCE_ROOT; }; + 48791E2B11926B41002C086E /* Search.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Search.cpp; path = ../../../src/kademlia/kademlia/Search.cpp; sourceTree = SOURCE_ROOT; }; + 48791E2C11926B41002C086E /* Search.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Search.h; path = ../../../src/kademlia/kademlia/Search.h; sourceTree = SOURCE_ROOT; }; + 48791E2D11926B41002C086E /* UDPFirewallTester.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UDPFirewallTester.cpp; path = ../../../src/kademlia/kademlia/UDPFirewallTester.cpp; sourceTree = SOURCE_ROOT; }; + 48791E2E11926B41002C086E /* UDPFirewallTester.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UDPFirewallTester.h; path = ../../../src/kademlia/kademlia/UDPFirewallTester.h; sourceTree = SOURCE_ROOT; }; + 48791E7C11926B54002C086E /* RoutingZone.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RoutingZone.cpp; path = ../../../src/kademlia/routing/RoutingZone.cpp; sourceTree = SOURCE_ROOT; }; + 48791E7D11926B54002C086E /* RoutingZone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RoutingZone.h; path = ../../../src/kademlia/routing/RoutingZone.h; sourceTree = SOURCE_ROOT; }; + 48791EAB11926CC7002C086E /* AddFriend.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AddFriend.cpp; path = ../../../src/AddFriend.cpp; sourceTree = SOURCE_ROOT; }; + 48791EAC11926CC7002C086E /* AddFriend.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AddFriend.h; path = ../../../src/AddFriend.h; sourceTree = SOURCE_ROOT; }; + 48791EAD11926CC7002C086E /* amule-gui.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "amule-gui.cpp"; path = "../../../src/amule-gui.cpp"; sourceTree = SOURCE_ROOT; }; + 48791EAE11926CC7002C086E /* amuleDlg.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = amuleDlg.cpp; path = ../../../src/amuleDlg.cpp; sourceTree = SOURCE_ROOT; }; + 48791EAF11926CC7002C086E /* amuleDlg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = amuleDlg.h; path = ../../../src/amuleDlg.h; sourceTree = SOURCE_ROOT; }; + 48791EB011926CC7002C086E /* CatDialog.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CatDialog.cpp; path = ../../../src/CatDialog.cpp; sourceTree = SOURCE_ROOT; }; + 48791EB111926CC7002C086E /* CatDialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CatDialog.h; path = ../../../src/CatDialog.h; sourceTree = SOURCE_ROOT; }; + 48791EB211926CC7002C086E /* ChatSelector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ChatSelector.cpp; path = ../../../src/ChatSelector.cpp; sourceTree = SOURCE_ROOT; }; + 48791EB311926CC7002C086E /* ChatSelector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChatSelector.h; path = ../../../src/ChatSelector.h; sourceTree = SOURCE_ROOT; }; + 48791EB411926CC7002C086E /* ClientDetailDialog.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClientDetailDialog.cpp; path = ../../../src/ClientDetailDialog.cpp; sourceTree = SOURCE_ROOT; }; + 48791EB511926CC7002C086E /* ClientDetailDialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClientDetailDialog.h; path = ../../../src/ClientDetailDialog.h; sourceTree = SOURCE_ROOT; }; + 48791EB811926CC7002C086E /* DirectoryTreeCtrl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DirectoryTreeCtrl.cpp; path = ../../../src/DirectoryTreeCtrl.cpp; sourceTree = SOURCE_ROOT; }; + 48791EB911926CC7002C086E /* DirectoryTreeCtrl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DirectoryTreeCtrl.h; path = ../../../src/DirectoryTreeCtrl.h; sourceTree = SOURCE_ROOT; }; + 48791EBA11926CC7002C086E /* DownloadListCtrl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DownloadListCtrl.cpp; path = ../../../src/DownloadListCtrl.cpp; sourceTree = SOURCE_ROOT; }; + 48791EBB11926CC7002C086E /* DownloadListCtrl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DownloadListCtrl.h; path = ../../../src/DownloadListCtrl.h; sourceTree = SOURCE_ROOT; }; + 48791EBC11926CC7002C086E /* FileDetailDialog.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FileDetailDialog.cpp; path = ../../../src/FileDetailDialog.cpp; sourceTree = SOURCE_ROOT; }; + 48791EBD11926CC7002C086E /* FileDetailDialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileDetailDialog.h; path = ../../../src/FileDetailDialog.h; sourceTree = SOURCE_ROOT; }; + 48791EBE11926CC7002C086E /* FriendListCtrl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FriendListCtrl.cpp; path = ../../../src/FriendListCtrl.cpp; sourceTree = SOURCE_ROOT; }; + 48791EBF11926CC7002C086E /* FriendListCtrl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FriendListCtrl.h; path = ../../../src/FriendListCtrl.h; sourceTree = SOURCE_ROOT; }; + 48791EC011926CC7002C086E /* KadDlg.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = KadDlg.cpp; path = ../../../src/KadDlg.cpp; sourceTree = SOURCE_ROOT; }; + 48791EC111926CC7002C086E /* KadDlg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = KadDlg.h; path = ../../../src/KadDlg.h; sourceTree = SOURCE_ROOT; }; + 48791EC211926CC7002C086E /* MuleColour.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MuleColour.cpp; path = ../../../src/MuleColour.cpp; sourceTree = SOURCE_ROOT; }; + 48791EC311926CC7002C086E /* MuleColour.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MuleColour.h; path = ../../../src/MuleColour.h; sourceTree = SOURCE_ROOT; }; + 48791EC411926CC7002C086E /* MuleTrayIcon.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MuleTrayIcon.cpp; path = ../../../src/MuleTrayIcon.cpp; sourceTree = SOURCE_ROOT; }; + 48791EC511926CC7002C086E /* MuleTrayIcon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MuleTrayIcon.h; path = ../../../src/MuleTrayIcon.h; sourceTree = SOURCE_ROOT; }; + 48791EC611926CC7002C086E /* OScopeCtrl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OScopeCtrl.cpp; path = ../../../src/OScopeCtrl.cpp; sourceTree = SOURCE_ROOT; }; + 48791EC711926CC7002C086E /* OScopeCtrl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OScopeCtrl.h; path = ../../../src/OScopeCtrl.h; sourceTree = SOURCE_ROOT; }; + 48791EC811926CC7002C086E /* PartFileConvertDlg.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PartFileConvertDlg.cpp; path = ../../../src/PartFileConvertDlg.cpp; sourceTree = SOURCE_ROOT; }; + 48791EC911926CC7002C086E /* PartFileConvertDlg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PartFileConvertDlg.h; path = ../../../src/PartFileConvertDlg.h; sourceTree = SOURCE_ROOT; }; + 48791ECA11926CC7002C086E /* PrefsUnifiedDlg.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PrefsUnifiedDlg.cpp; path = ../../../src/PrefsUnifiedDlg.cpp; sourceTree = SOURCE_ROOT; }; + 48791ECB11926CC7002C086E /* PrefsUnifiedDlg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PrefsUnifiedDlg.h; path = ../../../src/PrefsUnifiedDlg.h; sourceTree = SOURCE_ROOT; }; + 48791ECC11926CC7002C086E /* SearchDlg.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SearchDlg.cpp; path = ../../../src/SearchDlg.cpp; sourceTree = SOURCE_ROOT; }; + 48791ECD11926CC7002C086E /* SearchDlg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SearchDlg.h; path = ../../../src/SearchDlg.h; sourceTree = SOURCE_ROOT; }; + 48791ECE11926CC7002C086E /* SearchListCtrl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SearchListCtrl.cpp; path = ../../../src/SearchListCtrl.cpp; sourceTree = SOURCE_ROOT; }; + 48791ECF11926CC7002C086E /* SearchListCtrl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SearchListCtrl.h; path = ../../../src/SearchListCtrl.h; sourceTree = SOURCE_ROOT; }; + 48791ED011926CC7002C086E /* ServerListCtrl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ServerListCtrl.cpp; path = ../../../src/ServerListCtrl.cpp; sourceTree = SOURCE_ROOT; }; + 48791ED111926CC7002C086E /* ServerListCtrl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ServerListCtrl.h; path = ../../../src/ServerListCtrl.h; sourceTree = SOURCE_ROOT; }; + 48791ED211926CC7002C086E /* ServerWnd.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ServerWnd.cpp; path = ../../../src/ServerWnd.cpp; sourceTree = SOURCE_ROOT; }; + 48791ED311926CC7002C086E /* ServerWnd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ServerWnd.h; path = ../../../src/ServerWnd.h; sourceTree = SOURCE_ROOT; }; + 48791ED411926CC7002C086E /* SharedFilesCtrl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SharedFilesCtrl.cpp; path = ../../../src/SharedFilesCtrl.cpp; sourceTree = SOURCE_ROOT; }; + 48791ED511926CC7002C086E /* SharedFilesCtrl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SharedFilesCtrl.h; path = ../../../src/SharedFilesCtrl.h; sourceTree = SOURCE_ROOT; }; + 48791ED611926CC7002C086E /* SharedFilesWnd.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SharedFilesWnd.cpp; path = ../../../src/SharedFilesWnd.cpp; sourceTree = SOURCE_ROOT; }; + 48791ED711926CC7002C086E /* SharedFilesWnd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SharedFilesWnd.h; path = ../../../src/SharedFilesWnd.h; sourceTree = SOURCE_ROOT; }; + 48791ED811926CC7002C086E /* StatisticsDlg.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StatisticsDlg.cpp; path = ../../../src/StatisticsDlg.cpp; sourceTree = SOURCE_ROOT; }; + 48791ED911926CC7002C086E /* StatisticsDlg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StatisticsDlg.h; path = ../../../src/StatisticsDlg.h; sourceTree = SOURCE_ROOT; }; + 48791EDA11926CC7002C086E /* TransferWnd.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TransferWnd.cpp; path = ../../../src/TransferWnd.cpp; sourceTree = SOURCE_ROOT; }; + 48791EDB11926CC7002C086E /* TransferWnd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TransferWnd.h; path = ../../../src/TransferWnd.h; sourceTree = SOURCE_ROOT; }; + 48791F6611926F24002C086E /* amuleAppCommon.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = amuleAppCommon.cpp; path = ../../../src/amuleAppCommon.cpp; sourceTree = SOURCE_ROOT; }; + 48791F6711926F24002C086E /* ClientCredits.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClientCredits.cpp; path = ../../../src/ClientCredits.cpp; sourceTree = SOURCE_ROOT; }; + 48791F6811926F24002C086E /* ClientCredits.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClientCredits.h; path = ../../../src/ClientCredits.h; sourceTree = SOURCE_ROOT; }; + 48791F6911926F24002C086E /* ECSpecialMuleTags.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ECSpecialMuleTags.cpp; path = ../../../src/ECSpecialMuleTags.cpp; sourceTree = SOURCE_ROOT; }; + 48791F6A11926F24002C086E /* GetTickCount.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GetTickCount.cpp; path = ../../../src/GetTickCount.cpp; sourceTree = SOURCE_ROOT; }; + 48791F6B11926F24002C086E /* GetTickCount.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GetTickCount.h; path = ../../../src/GetTickCount.h; sourceTree = SOURCE_ROOT; }; + 48791F6C11926F24002C086E /* GuiEvents.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GuiEvents.cpp; path = ../../../src/GuiEvents.cpp; sourceTree = SOURCE_ROOT; }; + 48791F6D11926F24002C086E /* GuiEvents.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GuiEvents.h; path = ../../../src/GuiEvents.h; sourceTree = SOURCE_ROOT; }; + 48791F6E11926F24002C086E /* KnownFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = KnownFile.cpp; path = ../../../src/KnownFile.cpp; sourceTree = SOURCE_ROOT; }; + 48791F6F11926F24002C086E /* KnownFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = KnownFile.h; path = ../../../src/KnownFile.h; sourceTree = SOURCE_ROOT; }; + 48791F7011926F24002C086E /* Logger.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Logger.cpp; path = ../../../src/Logger.cpp; sourceTree = SOURCE_ROOT; }; + 48791F7111926F24002C086E /* Logger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Logger.h; path = ../../../src/Logger.h; sourceTree = SOURCE_ROOT; }; + 48791F7211926F24002C086E /* PartFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PartFile.cpp; path = ../../../src/PartFile.cpp; sourceTree = SOURCE_ROOT; }; + 48791F7311926F24002C086E /* PartFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PartFile.h; path = ../../../src/PartFile.h; sourceTree = SOURCE_ROOT; }; + 48791F7411926F24002C086E /* Preferences.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Preferences.cpp; path = ../../../src/Preferences.cpp; sourceTree = SOURCE_ROOT; }; + 48791F7511926F24002C086E /* Preferences.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Preferences.h; path = ../../../src/Preferences.h; sourceTree = SOURCE_ROOT; }; + 48791F7611926F24002C086E /* Proxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Proxy.cpp; path = ../../../src/Proxy.cpp; sourceTree = SOURCE_ROOT; }; + 48791F7711926F24002C086E /* Proxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Proxy.h; path = ../../../src/Proxy.h; sourceTree = SOURCE_ROOT; }; + 48791F7811926F24002C086E /* Server.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Server.cpp; path = ../../../src/Server.cpp; sourceTree = SOURCE_ROOT; }; + 48791F7911926F24002C086E /* Server.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Server.h; path = ../../../src/Server.h; sourceTree = SOURCE_ROOT; }; + 48791F7A11926F24002C086E /* SHAHashSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SHAHashSet.cpp; path = ../../../src/SHAHashSet.cpp; sourceTree = SOURCE_ROOT; }; + 48791F7B11926F24002C086E /* SHAHashSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SHAHashSet.h; path = ../../../src/SHAHashSet.h; sourceTree = SOURCE_ROOT; }; + 48791F7C11926F24002C086E /* Statistics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Statistics.cpp; path = ../../../src/Statistics.cpp; sourceTree = SOURCE_ROOT; }; + 48791F7D11926F24002C086E /* Statistics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Statistics.h; path = ../../../src/Statistics.h; sourceTree = SOURCE_ROOT; }; + 48791F7E11926F24002C086E /* StatTree.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StatTree.cpp; path = ../../../src/StatTree.cpp; sourceTree = SOURCE_ROOT; }; + 48791F7F11926F24002C086E /* StatTree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StatTree.h; path = ../../../src/StatTree.h; sourceTree = SOURCE_ROOT; }; + 48791F8011926F24002C086E /* TerminationProcess.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TerminationProcess.cpp; path = ../../../src/TerminationProcess.cpp; sourceTree = SOURCE_ROOT; }; + 48791F8111926F24002C086E /* TerminationProcess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TerminationProcess.h; path = ../../../src/TerminationProcess.h; sourceTree = SOURCE_ROOT; }; + 48791F8211926F24002C086E /* UserEvents.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UserEvents.cpp; path = ../../../src/UserEvents.cpp; sourceTree = SOURCE_ROOT; }; + 48791F8311926F24002C086E /* UserEvents.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UserEvents.h; path = ../../../src/UserEvents.h; sourceTree = SOURCE_ROOT; }; + 48791FD611926F74002C086E /* NetworkFunctions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NetworkFunctions.cpp; path = ../../../src/NetworkFunctions.cpp; sourceTree = SOURCE_ROOT; }; + 48791FD711926F74002C086E /* NetworkFunctions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NetworkFunctions.h; path = ../../../src/NetworkFunctions.h; sourceTree = SOURCE_ROOT; }; + 48791FD811926F74002C086E /* OtherFunctions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OtherFunctions.cpp; path = ../../../src/OtherFunctions.cpp; sourceTree = SOURCE_ROOT; }; + 48791FD911926F74002C086E /* OtherFunctions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OtherFunctions.h; path = ../../../src/OtherFunctions.h; sourceTree = SOURCE_ROOT; }; 487920361192730F002C086E /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; }; - 4879205C119274FA002C086E /* FileFunctions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FileFunctions.cpp; path = ../src/libs/common/FileFunctions.cpp; sourceTree = SOURCE_ROOT; }; - 4879205D119274FA002C086E /* FileFunctions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileFunctions.h; path = ../src/libs/common/FileFunctions.h; sourceTree = SOURCE_ROOT; }; - 4879205E119274FA002C086E /* Format.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Format.cpp; path = ../src/libs/common/Format.cpp; sourceTree = SOURCE_ROOT; }; - 4879205F119274FA002C086E /* Format.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Format.h; path = ../src/libs/common/Format.h; sourceTree = SOURCE_ROOT; }; - 48792060119274FA002C086E /* MD5Sum.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MD5Sum.cpp; path = ../src/libs/common/MD5Sum.cpp; sourceTree = SOURCE_ROOT; }; - 48792061119274FA002C086E /* MD5Sum.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MD5Sum.h; path = ../src/libs/common/MD5Sum.h; sourceTree = SOURCE_ROOT; }; - 48792062119274FA002C086E /* MuleDebug.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MuleDebug.cpp; path = ../src/libs/common/MuleDebug.cpp; sourceTree = SOURCE_ROOT; }; - 48792063119274FA002C086E /* MuleDebug.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MuleDebug.h; path = ../src/libs/common/MuleDebug.h; sourceTree = SOURCE_ROOT; }; - 48792064119274FA002C086E /* Path.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Path.cpp; path = ../src/libs/common/Path.cpp; sourceTree = SOURCE_ROOT; }; - 48792065119274FA002C086E /* Path.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Path.h; path = ../src/libs/common/Path.h; sourceTree = SOURCE_ROOT; }; - 48792066119274FA002C086E /* StringFunctions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StringFunctions.cpp; path = ../src/libs/common/StringFunctions.cpp; sourceTree = SOURCE_ROOT; }; - 48792067119274FA002C086E /* StringFunctions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StringFunctions.h; path = ../src/libs/common/StringFunctions.h; sourceTree = SOURCE_ROOT; }; - 48792068119274FA002C086E /* TextFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TextFile.cpp; path = ../src/libs/common/TextFile.cpp; sourceTree = SOURCE_ROOT; }; - 48792069119274FA002C086E /* TextFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TextFile.h; path = ../src/libs/common/TextFile.h; sourceTree = SOURCE_ROOT; }; - 4879213211927582002C086E /* ECMuleSocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ECMuleSocket.cpp; path = ../src/libs/ec/cpp/ECMuleSocket.cpp; sourceTree = SOURCE_ROOT; }; - 4879213311927582002C086E /* ECMuleSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ECMuleSocket.h; path = ../src/libs/ec/cpp/ECMuleSocket.h; sourceTree = SOURCE_ROOT; }; - 4879213411927582002C086E /* ECPacket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ECPacket.cpp; path = ../src/libs/ec/cpp/ECPacket.cpp; sourceTree = SOURCE_ROOT; }; - 4879213511927582002C086E /* ECPacket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ECPacket.h; path = ../src/libs/ec/cpp/ECPacket.h; sourceTree = SOURCE_ROOT; }; - 4879213611927582002C086E /* ECSocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ECSocket.cpp; path = ../src/libs/ec/cpp/ECSocket.cpp; sourceTree = SOURCE_ROOT; }; - 4879213711927582002C086E /* ECSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ECSocket.h; path = ../src/libs/ec/cpp/ECSocket.h; sourceTree = SOURCE_ROOT; }; - 4879213811927582002C086E /* ECSpecialTags.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ECSpecialTags.cpp; path = ../src/libs/ec/cpp/ECSpecialTags.cpp; sourceTree = SOURCE_ROOT; }; - 4879213911927582002C086E /* ECSpecialTags.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ECSpecialTags.h; path = ../src/libs/ec/cpp/ECSpecialTags.h; sourceTree = SOURCE_ROOT; }; - 4879213A11927582002C086E /* ECTag.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ECTag.cpp; path = ../src/libs/ec/cpp/ECTag.cpp; sourceTree = SOURCE_ROOT; }; - 4879213B11927582002C086E /* ECTag.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ECTag.h; path = ../src/libs/ec/cpp/ECTag.h; sourceTree = SOURCE_ROOT; }; - 4879213C11927582002C086E /* RemoteConnect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RemoteConnect.cpp; path = ../src/libs/ec/cpp/RemoteConnect.cpp; sourceTree = SOURCE_ROOT; }; - 4879213D11927582002C086E /* RemoteConnect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RemoteConnect.h; path = ../src/libs/ec/cpp/RemoteConnect.h; sourceTree = SOURCE_ROOT; }; - 487922C811927626002C086E /* CaptchaDialog.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CaptchaDialog.cpp; path = ../src/CaptchaDialog.cpp; sourceTree = SOURCE_ROOT; }; - 487922C911927626002C086E /* CaptchaDialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CaptchaDialog.h; path = ../src/CaptchaDialog.h; sourceTree = SOURCE_ROOT; }; - 487922CA11927626002C086E /* CaptchaGenerator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CaptchaGenerator.cpp; path = ../src/CaptchaGenerator.cpp; sourceTree = SOURCE_ROOT; }; - 487922CB11927626002C086E /* CaptchaGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CaptchaGenerator.h; path = ../src/CaptchaGenerator.h; sourceTree = SOURCE_ROOT; }; + 4879205C119274FA002C086E /* FileFunctions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FileFunctions.cpp; path = ../../../src/libs/common/FileFunctions.cpp; sourceTree = SOURCE_ROOT; }; + 4879205D119274FA002C086E /* FileFunctions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileFunctions.h; path = ../../../src/libs/common/FileFunctions.h; sourceTree = SOURCE_ROOT; }; + 4879205E119274FA002C086E /* Format.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Format.cpp; path = ../../../src/libs/common/Format.cpp; sourceTree = SOURCE_ROOT; }; + 4879205F119274FA002C086E /* Format.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Format.h; path = ../../../src/libs/common/Format.h; sourceTree = SOURCE_ROOT; }; + 48792060119274FA002C086E /* MD5Sum.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MD5Sum.cpp; path = ../../../src/libs/common/MD5Sum.cpp; sourceTree = SOURCE_ROOT; }; + 48792061119274FA002C086E /* MD5Sum.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MD5Sum.h; path = ../../../src/libs/common/MD5Sum.h; sourceTree = SOURCE_ROOT; }; + 48792062119274FA002C086E /* MuleDebug.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MuleDebug.cpp; path = ../../../src/libs/common/MuleDebug.cpp; sourceTree = SOURCE_ROOT; }; + 48792063119274FA002C086E /* MuleDebug.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MuleDebug.h; path = ../../../src/libs/common/MuleDebug.h; sourceTree = SOURCE_ROOT; }; + 48792064119274FA002C086E /* Path.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Path.cpp; path = ../../../src/libs/common/Path.cpp; sourceTree = SOURCE_ROOT; }; + 48792065119274FA002C086E /* Path.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Path.h; path = ../../../src/libs/common/Path.h; sourceTree = SOURCE_ROOT; }; + 48792066119274FA002C086E /* StringFunctions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StringFunctions.cpp; path = ../../../src/libs/common/StringFunctions.cpp; sourceTree = SOURCE_ROOT; }; + 48792067119274FA002C086E /* StringFunctions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StringFunctions.h; path = ../../../src/libs/common/StringFunctions.h; sourceTree = SOURCE_ROOT; }; + 48792068119274FA002C086E /* TextFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TextFile.cpp; path = ../../../src/libs/common/TextFile.cpp; sourceTree = SOURCE_ROOT; }; + 48792069119274FA002C086E /* TextFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TextFile.h; path = ../../../src/libs/common/TextFile.h; sourceTree = SOURCE_ROOT; }; + 4879213211927582002C086E /* ECMuleSocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ECMuleSocket.cpp; path = ../../../src/libs/ec/cpp/ECMuleSocket.cpp; sourceTree = SOURCE_ROOT; }; + 4879213311927582002C086E /* ECMuleSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ECMuleSocket.h; path = ../../../src/libs/ec/cpp/ECMuleSocket.h; sourceTree = SOURCE_ROOT; }; + 4879213411927582002C086E /* ECPacket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ECPacket.cpp; path = ../../../src/libs/ec/cpp/ECPacket.cpp; sourceTree = SOURCE_ROOT; }; + 4879213511927582002C086E /* ECPacket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ECPacket.h; path = ../../../src/libs/ec/cpp/ECPacket.h; sourceTree = SOURCE_ROOT; }; + 4879213611927582002C086E /* ECSocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ECSocket.cpp; path = ../../../src/libs/ec/cpp/ECSocket.cpp; sourceTree = SOURCE_ROOT; }; + 4879213711927582002C086E /* ECSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ECSocket.h; path = ../../../src/libs/ec/cpp/ECSocket.h; sourceTree = SOURCE_ROOT; }; + 4879213811927582002C086E /* ECSpecialTags.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ECSpecialTags.cpp; path = ../../../src/libs/ec/cpp/ECSpecialTags.cpp; sourceTree = SOURCE_ROOT; }; + 4879213911927582002C086E /* ECSpecialTags.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ECSpecialTags.h; path = ../../../src/libs/ec/cpp/ECSpecialTags.h; sourceTree = SOURCE_ROOT; }; + 4879213A11927582002C086E /* ECTag.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ECTag.cpp; path = ../../../src/libs/ec/cpp/ECTag.cpp; sourceTree = SOURCE_ROOT; }; + 4879213B11927582002C086E /* ECTag.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ECTag.h; path = ../../../src/libs/ec/cpp/ECTag.h; sourceTree = SOURCE_ROOT; }; + 4879213C11927582002C086E /* RemoteConnect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RemoteConnect.cpp; path = ../../../src/libs/ec/cpp/RemoteConnect.cpp; sourceTree = SOURCE_ROOT; }; + 4879213D11927582002C086E /* RemoteConnect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RemoteConnect.h; path = ../../../src/libs/ec/cpp/RemoteConnect.h; sourceTree = SOURCE_ROOT; }; + 487922C811927626002C086E /* CaptchaDialog.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CaptchaDialog.cpp; path = ../../../src/CaptchaDialog.cpp; sourceTree = SOURCE_ROOT; }; + 487922C911927626002C086E /* CaptchaDialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CaptchaDialog.h; path = ../../../src/CaptchaDialog.h; sourceTree = SOURCE_ROOT; }; + 487922CA11927626002C086E /* CaptchaGenerator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CaptchaGenerator.cpp; path = ../../../src/CaptchaGenerator.cpp; sourceTree = SOURCE_ROOT; }; + 487922CB11927626002C086E /* CaptchaGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CaptchaGenerator.h; path = ../../../src/CaptchaGenerator.h; sourceTree = SOURCE_ROOT; }; 488D4E8E1192CB880089BF8E /* README BEFORE BUILDING.rtf */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; path = "README BEFORE BUILDING.rtf"; sourceTree = ""; }; 8D1107310486CEB800E47090 /* aMule_Xcode-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "aMule_Xcode-Info.plist"; sourceTree = ""; }; 8D1107320486CEB800E47090 /* aMule.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = aMule.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -514,7 +522,6 @@ 48792056119274B2002C086E /* libs */, 080E96DDFE201D6D7F000001 /* Classes */, 29B97315FDCFA39411CA2CEA /* Other Sources */, - 29B97317FDCFA39411CA2CEA /* Resources */, 29B97323FDCFA39411CA2CEA /* Frameworks */, 19C28FACFE9D520D11CA2CBB /* Products */, ); @@ -532,6 +539,7 @@ 29B97317FDCFA39411CA2CEA /* Resources */ = { isa = PBXGroup; children = ( + 4833446F1196275F00D9BE75 /* amule.icns */, 8D1107310486CEB800E47090 /* aMule_Xcode-Info.plist */, 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */, ); @@ -581,6 +589,7 @@ 487911E711925EA7002C086E /* libmuleappcore */ = { isa = PBXGroup; children = ( + 29B97317FDCFA39411CA2CEA /* Resources */, 4879120F11925FE2002C086E /* kademlia */, 487911E811925FDD002C086E /* AsyncDNS.cpp */, 487911E911925FDD002C086E /* AsyncDNS.h */, @@ -819,6 +828,12 @@ 48791EAA11926B8E002C086E /* gui_sources */ = { isa = PBXGroup; children = ( + 4848D8091192E85900ED40CC /* SharedFilePeersListCtrl.cpp */, + 4848D80A1192E85900ED40CC /* SharedFilePeersListCtrl.h */, + 4848D80B1192E85900ED40CC /* SourceListCtrl.cpp */, + 4848D80C1192E85900ED40CC /* SourceListCtrl.h */, + 4848D2CD1192E83100ED40CC /* GenericClientListCtrl.cpp */, + 4848D2CE1192E83100ED40CC /* GenericClientListCtrl.h */, 48791EAB11926CC7002C086E /* AddFriend.cpp */, 48791EAC11926CC7002C086E /* AddFriend.h */, 48791EAD11926CC7002C086E /* amule-gui.cpp */, @@ -830,8 +845,6 @@ 48791EB311926CC7002C086E /* ChatSelector.h */, 48791EB411926CC7002C086E /* ClientDetailDialog.cpp */, 48791EB511926CC7002C086E /* ClientDetailDialog.h */, - 48791EB611926CC7002C086E /* ClientListCtrl.cpp */, - 48791EB711926CC7002C086E /* ClientListCtrl.h */, 48791EB811926CC7002C086E /* DirectoryTreeCtrl.cpp */, 48791EB911926CC7002C086E /* DirectoryTreeCtrl.h */, 48791EBA11926CC7002C086E /* DownloadListCtrl.cpp */, @@ -1026,6 +1039,7 @@ files = ( 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */, 488D4E8F1192CB880089BF8E /* README BEFORE BUILDING.rtf in Resources */, + 483344701196275F00D9BE75 /* amule.icns in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1129,7 +1143,6 @@ 48791EDF11926CC7002C086E /* CatDialog.cpp in Sources */, 48791EE011926CC7002C086E /* ChatSelector.cpp in Sources */, 48791EE111926CC7002C086E /* ClientDetailDialog.cpp in Sources */, - 48791EE211926CC7002C086E /* ClientListCtrl.cpp in Sources */, 48791EE311926CC7002C086E /* DirectoryTreeCtrl.cpp in Sources */, 48791EE411926CC7002C086E /* DownloadListCtrl.cpp in Sources */, 48791EE511926CC7002C086E /* FileDetailDialog.cpp in Sources */, @@ -1181,6 +1194,9 @@ 487921EF11927582002C086E /* RemoteConnect.cpp in Sources */, 4879238511927626002C086E /* CaptchaDialog.cpp in Sources */, 4879238611927626002C086E /* CaptchaGenerator.cpp in Sources */, + 4848D2CF1192E83100ED40CC /* GenericClientListCtrl.cpp in Sources */, + 4848DC291192E85A00ED40CC /* SharedFilePeersListCtrl.cpp in Sources */, + 4848DC2A1192E85A00ED40CC /* SourceListCtrl.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1208,18 +1224,19 @@ GCC_VERSION = 4.0; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = "../../src/**"; ONLY_ACTIVE_ARCH = NO; OTHER_CFLAGS = ( - "-I../../wxWidgets-2.8/lib/wx/include/mac-unicode-debug-2.8", - "-I../../wxWidgets-2.8/include", - "-I../../wxWidgets-2.8/contrib/include", + "-I../../../../wxWidgets-2.8/lib/wx/include/mac-unicode-debug-2.8", + "-I../../../../wxWidgets-2.8/include", + "-I../../../../wxWidgets-2.8/contrib/include", "-D_FILE_OFFSET_BITS=64", "-D_LARGE_FILES", "-D__WXDEBUG__", "-D__WXMAC__", ); OTHER_LDFLAGS = ( - "-L/../../wxWidgets-2.8/lib", + "-L../../../../wxWidgets-2.8/lib", "-framework", IOKit, "-framework", @@ -1269,9 +1286,9 @@ GCC_VERSION = 4.0; HEADER_SEARCH_PATHS = ( "$(inherited)", - "\"$(SRCROOT)/../src\"", - "\"$(SRCROOT)/../src/libs/\"/**", - "\"$(SRCROOT)/../src/include/\"/**", + "\"$(SRCROOT)/../../../src\"", + "\"$(SRCROOT)/../../../src/libs/\"/**", + "\"$(SRCROOT)/../../../src/include/\"/**", ); INFOPLIST_FILE = "aMule_Xcode-Info.plist"; INSTALL_PATH = "$(HOME)/Applications"; @@ -1279,22 +1296,23 @@ "$(inherited)", "\"$(SRCROOT)/../src\"", "\"$(SRCROOT)/../src/libs/\"/**", + "\"$(SRCROOT)/../src/libs/ec/cpp\"", ); MACOSX_DEPLOYMENT_TARGET = 10.4; OTHER_CFLAGS = ( - "-I../../", - "-I../../wxWidgets-2.8/lib/wx/include/mac-unicode-debug-static-2.8", - "-I../../wxWidgets-2.8/include", - "-I../../wxWidgets-2.8/contrib/include", + "-I../../../../", + "-I../../../../wxWidgets-2.8/lib/wx/include/mac-unicode-debug-static-2.8", + "-I../../../../wxWidgets-2.8/include", + "-I../../../../wxWidgets-2.8/contrib/include", "-D_FILE_OFFSET_BITS=64", "-D_LARGE_FILES", "-D__WXDEBUG__", "-D__WXMAC__", ); OTHER_LDFLAGS = ( - "-L../../cryptopp/", + "-L../../../../cryptopp/", "-lcryptopp", - "-L../../wxWidgets-2.8/lib", + "-L../../../../wxWidgets-2.8/lib", "-framework", IOKit, "-framework", @@ -1309,16 +1327,16 @@ OpenGL, "-framework", AGL, - "../../wxWidgets-2.8/lib/libwx_macud_richtext-2.8.a", - "../../wxWidgets-2.8/lib/libwx_macud_aui-2.8.a", - "../../wxWidgets-2.8/lib/libwx_macud_xrc-2.8.a", - "../../wxWidgets-2.8/lib/libwx_macud_qa-2.8.a", - "../../wxWidgets-2.8/lib/libwx_macud_html-2.8.a", - "../../wxWidgets-2.8/lib/libwx_macud_adv-2.8.a", - "../../wxWidgets-2.8/lib/libwx_macud_core-2.8.a", - "../../wxWidgets-2.8/lib/libwx_base_carbonud_xml-2.8.a", - "../../wxWidgets-2.8/lib/libwx_base_carbonud_net-2.8.a", - "../../wxWidgets-2.8/lib/libwx_base_carbonud-2.8.a", + "../../../../wxWidgets-2.8/lib/libwx_macud_richtext-2.8.a", + "../../../../wxWidgets-2.8/lib/libwx_macud_aui-2.8.a", + "../../../../wxWidgets-2.8/lib/libwx_macud_xrc-2.8.a", + "../../../../wxWidgets-2.8/lib/libwx_macud_qa-2.8.a", + "../../../../wxWidgets-2.8/lib/libwx_macud_html-2.8.a", + "../../../../wxWidgets-2.8/lib/libwx_macud_adv-2.8.a", + "../../../../wxWidgets-2.8/lib/libwx_macud_core-2.8.a", + "../../../../wxWidgets-2.8/lib/libwx_base_carbonud_xml-2.8.a", + "../../../../wxWidgets-2.8/lib/libwx_base_carbonud_net-2.8.a", + "../../../../wxWidgets-2.8/lib/libwx_base_carbonud-2.8.a", "-framework", WebKit, "-lwxregexud-2.8", @@ -1354,9 +1372,9 @@ GCC_VERSION = 4.0; HEADER_SEARCH_PATHS = ( "$(inherited)", - "\"$(SRCROOT)/../src\"", - "\"$(SRCROOT)/../src/libs/\"/**", - "\"$(SRCROOT)/../src/include/\"/**", + "\"$(SRCROOT)/../../../src\"", + "\"$(SRCROOT)/../../../src/libs/\"/**", + "\"$(SRCROOT)/../../../src/include/\"/**", ); INFOPLIST_FILE = "aMule_Xcode-Info.plist"; INSTALL_PATH = "$(HOME)/Applications"; @@ -1364,22 +1382,23 @@ "$(inherited)", "\"$(SRCROOT)/../src\"", "\"$(SRCROOT)/../src/libs/\"/**", + "\"$(SRCROOT)/../src/libs/ec/cpp\"", ); MACOSX_DEPLOYMENT_TARGET = 10.4; OTHER_CFLAGS = ( - "-I../../", - "-I../../wxWidgets-2.8/lib/wx/include/mac-unicode-debug-static-2.8", - "-I../../wxWidgets-2.8/include", - "-I../../wxWidgets-2.8/contrib/include", + "-I../../../../", + "-I../../../../wxWidgets-2.8/lib/wx/include/mac-unicode-debug-static-2.8", + "-I../../../../wxWidgets-2.8/include", + "-I../../../../wxWidgets-2.8/contrib/include", "-D_FILE_OFFSET_BITS=64", "-D_LARGE_FILES", "-D__WXDEBUG__", "-D__WXMAC__", ); OTHER_LDFLAGS = ( - "-L../../cryptopp/", + "-L../../../../cryptopp/", "-lcryptopp", - "-L../../wxWidgets-2.8/lib", + "-L../../../../wxWidgets-2.8/lib", "-framework", IOKit, "-framework", @@ -1394,16 +1413,16 @@ OpenGL, "-framework", AGL, - "../../wxWidgets-2.8/lib/libwx_macud_richtext-2.8.a", - "../../wxWidgets-2.8/lib/libwx_macud_aui-2.8.a", - "../../wxWidgets-2.8/lib/libwx_macud_xrc-2.8.a", - "../../wxWidgets-2.8/lib/libwx_macud_qa-2.8.a", - "../../wxWidgets-2.8/lib/libwx_macud_html-2.8.a", - "../../wxWidgets-2.8/lib/libwx_macud_adv-2.8.a", - "../../wxWidgets-2.8/lib/libwx_macud_core-2.8.a", - "../../wxWidgets-2.8/lib/libwx_base_carbonud_xml-2.8.a", - "../../wxWidgets-2.8/lib/libwx_base_carbonud_net-2.8.a", - "../../wxWidgets-2.8/lib/libwx_base_carbonud-2.8.a", + "../../../../wxWidgets-2.8/lib/libwx_macud_richtext-2.8.a", + "../../../../wxWidgets-2.8/lib/libwx_macud_aui-2.8.a", + "../../../../wxWidgets-2.8/lib/libwx_macud_xrc-2.8.a", + "../../../../wxWidgets-2.8/lib/libwx_macud_qa-2.8.a", + "../../../../wxWidgets-2.8/lib/libwx_macud_html-2.8.a", + "../../../../wxWidgets-2.8/lib/libwx_macud_adv-2.8.a", + "../../../../wxWidgets-2.8/lib/libwx_macud_core-2.8.a", + "../../../../wxWidgets-2.8/lib/libwx_base_carbonud_xml-2.8.a", + "../../../../wxWidgets-2.8/lib/libwx_base_carbonud_net-2.8.a", + "../../../../wxWidgets-2.8/lib/libwx_base_carbonud-2.8.a", "-framework", WebKit, "-lwxregexud-2.8", @@ -1436,9 +1455,9 @@ GCC_VERSION = 4.0; HEADER_SEARCH_PATHS = ( "$(inherited)", - "\"$(SRCROOT)/../src\"", - "\"$(SRCROOT)/../src/libs/\"/**", - "\"$(SRCROOT)/../src/include/\"/**", + "\"$(SRCROOT)/../../../src\"", + "\"$(SRCROOT)/../../../src/libs/\"/**", + "\"$(SRCROOT)/../../../src/include/\"/**", ); INFOPLIST_FILE = "aMule_Xcode-Info.plist"; INSTALL_PATH = "$(HOME)/Applications"; @@ -1446,22 +1465,23 @@ "$(inherited)", "\"$(SRCROOT)/../src\"", "\"$(SRCROOT)/../src/libs/\"/**", + "\"$(SRCROOT)/../src/libs/ec/cpp\"", ); MACOSX_DEPLOYMENT_TARGET = 10.4; OTHER_CFLAGS = ( - "-I../../", - "-I../../wxWidgets-2.8/lib/wx/include/mac-unicode-debug-static-2.8", - "-I../../wxWidgets-2.8/include", - "-I../../wxWidgets-2.8/contrib/include", + "-I../../../../", + "-I../../../../wxWidgets-2.8/lib/wx/include/mac-unicode-debug-static-2.8", + "-I../../../../wxWidgets-2.8/include", + "-I../../../../wxWidgets-2.8/contrib/include", "-D_FILE_OFFSET_BITS=64", "-D_LARGE_FILES", "-D__WXDEBUG__", "-D__WXMAC__", ); OTHER_LDFLAGS = ( - "-L../../cryptopp/", + "-L../../../../cryptopp/", "-lcryptopp", - "-L../../wxWidgets-2.8/lib", + "-L../../../../wxWidgets-2.8/lib", "-framework", IOKit, "-framework", @@ -1476,16 +1496,16 @@ OpenGL, "-framework", AGL, - "../../wxWidgets-2.8/lib/libwx_macud_richtext-2.8.a", - "../../wxWidgets-2.8/lib/libwx_macud_aui-2.8.a", - "../../wxWidgets-2.8/lib/libwx_macud_xrc-2.8.a", - "../../wxWidgets-2.8/lib/libwx_macud_qa-2.8.a", - "../../wxWidgets-2.8/lib/libwx_macud_html-2.8.a", - "../../wxWidgets-2.8/lib/libwx_macud_adv-2.8.a", - "../../wxWidgets-2.8/lib/libwx_macud_core-2.8.a", - "../../wxWidgets-2.8/lib/libwx_base_carbonud_xml-2.8.a", - "../../wxWidgets-2.8/lib/libwx_base_carbonud_net-2.8.a", - "../../wxWidgets-2.8/lib/libwx_base_carbonud-2.8.a", + "../../../../wxWidgets-2.8/lib/libwx_macud_richtext-2.8.a", + "../../../../wxWidgets-2.8/lib/libwx_macud_aui-2.8.a", + "../../../../wxWidgets-2.8/lib/libwx_macud_xrc-2.8.a", + "../../../../wxWidgets-2.8/lib/libwx_macud_qa-2.8.a", + "../../../../wxWidgets-2.8/lib/libwx_macud_html-2.8.a", + "../../../../wxWidgets-2.8/lib/libwx_macud_adv-2.8.a", + "../../../../wxWidgets-2.8/lib/libwx_macud_core-2.8.a", + "../../../../wxWidgets-2.8/lib/libwx_base_carbonud_xml-2.8.a", + "../../../../wxWidgets-2.8/lib/libwx_base_carbonud_net-2.8.a", + "../../../../wxWidgets-2.8/lib/libwx_base_carbonud-2.8.a", "-framework", WebKit, "-lwxregexud-2.8", @@ -1513,18 +1533,19 @@ GCC_VERSION = 4.0; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = "../../src/**"; ONLY_ACTIVE_ARCH = YES; OTHER_CFLAGS = ( - "-I../../wxWidgets-2.8/lib/wx/include/mac-unicode-debug-2.8", - "-I../../wxWidgets-2.8/include", - "-I../../wxWidgets-2.8/contrib/include", + "-I../../../../wxWidgets-2.8/lib/wx/include/mac-unicode-debug-2.8", + "-I../../../../wxWidgets-2.8/include", + "-I../../../../wxWidgets-2.8/contrib/include", "-D_FILE_OFFSET_BITS=64", "-D_LARGE_FILES", "-D__WXDEBUG__", "-D__WXMAC__", ); OTHER_LDFLAGS = ( - "-L/../../wxWidgets-2.8/lib", + "-L../../../../wxWidgets-2.8/lib", "-framework", IOKit, "-framework", @@ -1552,7 +1573,7 @@ ); PREBINDING = NO; SDKROOT = macosx10.4; - VALID_ARCHS = "i386 ppc"; + VALID_ARCHS = "$(NATIVE_ARCH_ACTUAL)"; }; name = "Development Debug"; }; @@ -1565,17 +1586,18 @@ GCC_VERSION = 4.0; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = "../../src/**"; OTHER_CFLAGS = ( - "-I../../wxWidgets-2.8/lib/wx/include/mac-unicode-debug-2.8", - "-I../../wxWidgets-2.8/include", - "-I../../wxWidgets-2.8/contrib/include", + "-I../../../../wxWidgets-2.8/lib/wx/include/mac-unicode-debug-2.8", + "-I../../../../wxWidgets-2.8/include", + "-I../../../../wxWidgets-2.8/contrib/include", "-D_FILE_OFFSET_BITS=64", "-D_LARGE_FILES", "-D__WXDEBUG__", "-D__WXMAC__", ); OTHER_LDFLAGS = ( - "-L/../../wxWidgets-2.8/lib", + "-L../../../../wxWidgets-2.8/lib", "-framework", IOKit, "-framework", diff --git a/aMule-Xcode/aMule_Xcode-Info.plist b/platforms/MacOSX/aMule-Xcode/aMule_Xcode-Info.plist similarity index 97% rename from aMule-Xcode/aMule_Xcode-Info.plist rename to platforms/MacOSX/aMule-Xcode/aMule_Xcode-Info.plist index 0684e7bc..d14d25c3 100644 --- a/aMule-Xcode/aMule_Xcode-Info.plist +++ b/platforms/MacOSX/aMule-Xcode/aMule_Xcode-Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIconFile - + amule.icns CFBundleIdentifier com.amuleproject.${PRODUCT_NAME:rfc1034identifier} CFBundleInfoDictionaryVersion diff --git a/aMule-Xcode/aMule_Xcode_Prefix.pch b/platforms/MacOSX/aMule-Xcode/aMule_Xcode_Prefix.pch similarity index 100% rename from aMule-Xcode/aMule_Xcode_Prefix.pch rename to platforms/MacOSX/aMule-Xcode/aMule_Xcode_Prefix.pch diff --git a/aMule.app/Contents/Resources/amule.icns b/platforms/MacOSX/aMule-Xcode/amule.icns similarity index 100% rename from aMule.app/Contents/Resources/amule.icns rename to platforms/MacOSX/aMule-Xcode/amule.icns diff --git a/src/BaseClient.cpp b/src/BaseClient.cpp index 2ebe547b..348e60fe 100644 --- a/src/BaseClient.cpp +++ b/src/BaseClient.cpp @@ -296,6 +296,10 @@ CUpDownClient::~CUpDownClient() } #endif + // For security, remove it from the lists unconditionally. + Notify_SharedCtrlRemoveClient((CKnownFile*)NULL, this); + Notify_SourceCtrlRemoveSource(this, (CPartFile*)NULL); + if (m_lastClientSoft == SO_UNKNOWN) { theStats::RemoveUnknownClient(); } else if (m_lastClientSoft != (uint32)(-1)) { @@ -1266,7 +1270,6 @@ bool CUpDownClient::Disconnected(const wxString& strReason, bool bFromSocket) if (GetDownloadState() == DS_CONNECTED) { // successfully connected, but probably didn't respond to our filerequest theApp->clientlist->AddDeadSource(this); - theApp->downloadqueue->RemoveSource(this); } } @@ -1283,19 +1286,26 @@ bool CUpDownClient::Disconnected(const wxString& strReason, bool bFromSocket) m_reqfile->SetHashSetNeeded(true); } + SourceItemType source_type = UNAVAILABLE_SOURCE; + SourceItemType peer_type = UNAVAILABLE_SOURCE; + //check if this client is needed in any way, if not delete it bool bDelete = true; switch (m_nUploadState) { case US_ONUPLOADQUEUE: bDelete = false; + peer_type = AVAILABLE_SOURCE; break; }; + switch (m_nDownloadState) { case DS_ONQUEUE: + source_type = A4AF_SOURCE; // Will be checked. case DS_TOOMANYCONNS: case DS_NONEEDEDPARTS: case DS_LOWTOLOWIP: bDelete = false; + break; }; switch (m_nUploadState) { @@ -1305,6 +1315,7 @@ bool CUpDownClient::Disconnected(const wxString& strReason, bool bFromSocket) theApp->clientlist->AddDeadSource(this); bDelete = true; }; + switch (m_nDownloadState) { case DS_CONNECTING: case DS_WAITCALLBACK: @@ -1335,7 +1346,6 @@ bool CUpDownClient::Disconnected(const wxString& strReason, bool bFromSocket) m_iFileListRequested = 0; } - Notify_ClientCtrlRefreshClient( this ); if (bDelete) { if (m_Friend) { @@ -1343,6 +1353,9 @@ bool CUpDownClient::Disconnected(const wxString& strReason, bool bFromSocket) Notify_ChatRefreshFriend(m_Friend, false); } } else { + Notify_SharedCtrlRefreshClient( this, peer_type); + Notify_SourceCtrlUpdateSource( this, source_type); + m_fHashsetRequesting = 0; SetSentCancelTransfer(0); m_bHelloAnswerPending = false; diff --git a/src/ClientList.cpp b/src/ClientList.cpp index 7a8e4790..eaca4e10 100644 --- a/src/ClientList.cpp +++ b/src/ClientList.cpp @@ -113,7 +113,7 @@ void CClientList::AddClient( CUpDownClient* toadd ) // Update the client-state toadd->m_clientState = CS_LISTED; - Notify_ClientCtrlAddClient( toadd ); + //Notify_ClientCtrlAddClient( toadd ); // We always add the ID/ptr pair, regardles of the actual ID value m_clientList.insert( IDMapPair( toadd->GetUserIDHybrid(), toadd ) ); @@ -539,7 +539,7 @@ void CClientList::ProcessDeleteQueue() theApp->uploadqueue->RemoveFromWaitingQueue( toremove ); theApp->downloadqueue->RemoveSource( toremove ); - Notify_ClientCtrlRemoveClient( toremove ); + //Notify_ClientCtrlRemoveClient( toremove ); delete toremove; } diff --git a/src/ClientListCtrl.cpp b/src/ClientListCtrl.cpp deleted file mode 100644 index b9153dc8..00000000 --- a/src/ClientListCtrl.cpp +++ /dev/null @@ -1,1165 +0,0 @@ -// -// This file is part of the aMule Project. -// -// Copyright (c) 2003-2008 aMule Team ( admin@amule.org / http://www.amule.org ) -// Copyright (c) 2002 Merkur ( devs@emule-project.net / http://www.emule-project.net ) -// -// Any parts of this program derived from the xMule, lMule or eMule project, -// or contributed by third-party developers are copyrighted by their -// respective authors. -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA -// - -#include "ClientListCtrl.h" - -#include -#include - -#include "amule.h" -#include "amuleDlg.h" -#include "BarShader.h" // Needed for CBarShader -#include "ChatWnd.h" -#include "ClientDetailDialog.h" -#include "ClientList.h" -#include "DataToText.h" -#ifdef ENABLE_IP2COUNTRY - #include "IP2Country.h" // Needed for IP2Country -#endif -#include "KnownFile.h" -#include "Preferences.h" -#include "updownclient.h" -#include "UploadQueue.h" - -#include -#include -#include -#include - -//////////////////////////////////////////////////////////// -// Sorter functions. - -int CompareVersions(const CUpDownClient* client1, const CUpDownClient* client2) -{ - if (client1->GetClientSoft() != client2->GetClientSoft()) { - return client1->GetSoftStr().Cmp(client2->GetSoftStr()); - } - - if (client1->GetVersion() != client2->GetVersion()) { - return CmpAny(client1->GetVersion(), client2->GetVersion()); - } - - return client1->GetClientModString().Cmp(client2->GetClientModString()); -} - - -//////////////////////////////////////////////////////////// -// CClientListCtrl - - -BEGIN_EVENT_TABLE( CClientListCtrl, CMuleListCtrl ) - EVT_RIGHT_DOWN(CClientListCtrl::OnRightClick) - EVT_LIST_ITEM_MIDDLE_CLICK(-1, CClientListCtrl::OnMiddleClick) - - EVT_MENU( MP_DETAIL, CClientListCtrl::OnShowDetails ) - EVT_MENU( MP_ADDFRIEND, CClientListCtrl::OnAddFriend ) - EVT_MENU( MP_SHOWLIST, CClientListCtrl::OnViewFiles ) - EVT_MENU( MP_SENDMESSAGE, CClientListCtrl::OnSendMessage ) - EVT_MENU( MP_UNBAN, CClientListCtrl::OnUnbanClient ) - EVT_MENU_RANGE( MP_SWITCHCTRL_0, MP_SWITCHCTRL_9, CClientListCtrl::OnChangeView ) -END_EVENT_TABLE() - - -#define m_imagelist theApp->amuledlg->m_imagelist - - -/** - * This struct is used to keep track of the different view-types. - * - * Each view has a number of attributes, namely a title and serveral functions - * which are used by the CClientListCtrl class. This struct is used to store these - * for easier access. - * - * Please note that none of the values are required, however for a fully functional - * view, it is nescesarry to specificy all of them. - */ -struct ClientListView -{ - //! The name of the view, this is used to load and save column-preferences. - wxString m_title; - - //! Pointer to the initialization function. - void (*m_init)(CClientListCtrl*); - - //! Pointer to the drawing function - void (*m_draw)(CUpDownClient*, int, wxDC*, const wxRect&); - - //! Pointer to the sorting function. - MuleListCtrlCompare m_sort; - - //! Pointer to the function which returns the old column order. - wxString (*m_getOldColumnOrder)(); -}; - - -//! This is the list of currently usable views, in the same order as the ViewType enum. -ClientListView g_listViews[] = -{ - //! None: This view does nothing at all. - { - wxEmptyString, - NULL, - NULL, - NULL, - NULL, - }, - - //! Uploading: The clients currently being uploaded to. - { - wxT("Uploads"), - CUploadingView::Initialize, - CUploadingView::DrawCell, - CUploadingView::SortProc, - CUploadingView::GetOldColumnOrder, - }, - - //! Queued: The clients currently queued for uploading. - { - wxT("Queue"), - CQueuedView::Initialize, - CQueuedView::DrawCell, - CQueuedView::SortProc, - CQueuedView::GetOldColumnOrder, - }, - - //! Clients The complete list of all known clients. - { - wxT("Clients"), - CClientsView::Initialize, - CClientsView::DrawCell, - CClientsView::SortProc, - CClientsView::GetOldColumnOrder, - } -}; - - - -CClientListCtrl::CClientListCtrl( wxWindow *parent, wxWindowID winid, const wxPoint &pos, const wxSize &size, long style, const wxValidator& validator, const wxString& name ) -: -CMuleListCtrl( parent, winid, pos, size, style | wxLC_OWNERDRAW, validator, name ) -{ - m_viewType = vtNone; - - m_menu = NULL; - - m_hilightBrush = CMuleColour(wxSYS_COLOUR_HIGHLIGHT).Blend(125).GetBrush(); - - m_hilightUnfocusBrush = CMuleColour(wxSYS_COLOUR_BTNSHADOW).Blend(125).GetBrush(); - - // We show the uploading-list initially - SetListView( vtUploading ); -} - - -CClientListCtrl::~CClientListCtrl() -{ - -} - - -ViewType CClientListCtrl::GetListView() -{ - return m_viewType; -} - - -void CClientListCtrl::SetListView( ViewType newView ) -{ - if ( m_viewType != newView ) { - if (m_viewType != vtNone) { - SaveSettings(); - ClearAll(); - } - - m_viewType = newView; - - const ClientListView& view = g_listViews[ (int)newView ]; - - // Initialize the selected view - if ( view.m_init ) { - view.m_init( this ); - } - - SetTableName( view.m_title ); - SetSortFunc( view.m_sort ); - - if (newView != vtNone) { - LoadSettings(); - } - } -} - - -void CClientListCtrl::ToggleView() -{ - // Disallow toggling if the list is disabled - if ( m_viewType == vtNone ) { - return; - } - - unsigned int view = (int)m_viewType + 1; - - if ( view < itemsof(g_listViews) ) { - SetListView( (ViewType)(view) ); - } else { - SetListView( (ViewType)(1) ); - } -} - - -///////////////////////////////////////////////////////////////////////////////////////////// -void CClientListCtrl::OnRightClick(wxMouseEvent& event) -{ - long index = CheckSelection(event); - - if ( m_menu == NULL ) { - - bool banned = false; - bool validIP = false; - bool isfriend = false; - bool hasdisabledsharedfiles = false; - - // Check if the client is banned - if ( index > -1 ) { - CUpDownClient *client = reinterpret_cast(GetItemData( index )); - - banned = client->IsBanned(); - validIP = (client->GetIP() != 0); - isfriend = client->IsFriend(); - hasdisabledsharedfiles = client->HasDisabledSharedFiles(); - } - - m_menu = new wxMenu(_("Clients")); - m_menu->Append( MP_DETAIL, _("Show &Details") ); - m_menu->Append( MP_ADDFRIEND, isfriend ? _("Remove from friends") : _("Add to Friends") ); - m_menu->Append( MP_SHOWLIST, _("View Files") ); - m_menu->Append( MP_SENDMESSAGE, _("Send message") ); - m_menu->Append( MP_UNBAN, _("Unban") ); - - m_menu->AppendSeparator(); - - wxMenu* view = new wxMenu(); - view->Append( MP_SWITCHCTRL_0 + 1, _("Show Uploads") ); - view->Append( MP_SWITCHCTRL_0 + 2, _("Show Queue") ); - view->Append( MP_SWITCHCTRL_0 + 3, _("Show Clients") ); - - view->Enable( MP_SWITCHCTRL_0 + (int)m_viewType, false ); - - m_menu->Append( 0, _("Select View"), view ); - - m_menu->Enable( MP_DETAIL, index > -1 ); - m_menu->Enable( MP_SHOWLIST, index > -1 ); - - m_menu->Enable( MP_UNBAN, banned ); - m_menu->Enable( MP_SHOWLIST, !hasdisabledsharedfiles ); - m_menu->Enable( MP_ADDFRIEND, validIP ); - m_menu->Enable( MP_SENDMESSAGE, validIP ); - - PopupMenu( m_menu, event.GetPosition() ); - - delete m_menu; - - m_menu = NULL; - } -} - - -void CClientListCtrl::OnMiddleClick(wxListEvent& event) -{ - long index = CheckSelection(event); - - if (index > -1) { - CUpDownClient *client = reinterpret_cast(GetItemData( index )); - - CClientDetailDialog dialog(this, client); - - dialog.ShowModal(); - } -} - - -void CClientListCtrl::OnChangeView( wxCommandEvent& event ) -{ - int view = event.GetId() - MP_SWITCHCTRL_0; - - SetListView( (ViewType)view ); -} - - -void CClientListCtrl::OnAddFriend( wxCommandEvent& WXUNUSED(event) ) -{ - long index = GetNextItem( -1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED ); - - while ( index != -1 ) { - CUpDownClient *client = reinterpret_cast(GetItemData( index )); - if (client->IsFriend()) { - theApp->amuledlg->m_chatwnd->RemoveFriend(client->GetUserHash(), client->GetIP(), client->GetUserPort()); - } else { - theApp->amuledlg->m_chatwnd->AddFriend( client ); - } - index = GetNextItem( index, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED ); - } -} - - -void CClientListCtrl::OnShowDetails( wxCommandEvent& WXUNUSED(event) ) -{ - long index = GetNextItem( -1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED ); - - if ( index > -1 ) { - CUpDownClient *client = reinterpret_cast(GetItemData( index )); - CClientDetailDialog dialog(this, client); - dialog.ShowModal(); - } -} - - -void CClientListCtrl::OnViewFiles( wxCommandEvent& WXUNUSED(event) ) -{ - long index = GetNextItem( -1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED ); - - if ( index > -1 ) { - CUpDownClient *client = reinterpret_cast(GetItemData( index )); - client->RequestSharedFileList(); - } -} - - -void CClientListCtrl::OnSendMessage( wxCommandEvent& WXUNUSED(event) ) -{ - long index = GetNextItem( -1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED ); - - if ( index > -1 ) { - CUpDownClient *client = reinterpret_cast(GetItemData( index )); - - // These values are cached, since calling wxGetTextFromUser will - // start an event-loop, in which the client may be deleted. - wxString userName = client->GetUserName(); - uint64 userID = GUI_ID(client->GetIP(),client->GetUserPort()); - - wxString message = ::wxGetTextFromUser( _("Send message to user"), _("Message to send:") ); - - if (!message.IsEmpty()) { - theApp->amuledlg->m_chatwnd->SendMessage(message, userName, userID); - } - } -} - - -void CClientListCtrl::OnUnbanClient( wxCommandEvent& WXUNUSED(event) ) -{ - long index = GetNextItem( -1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED ); - - if ( index > -1 ) { - CUpDownClient *client = reinterpret_cast(GetItemData( index )); - if ( client->IsBanned() ) { - client->UnBan(); - } - } -} - - -void CClientListCtrl::InsertClient( CUpDownClient* client, ViewType view ) -{ - wxCHECK_RET(client, wxT("Attempted to add NULL client pointer.")); - - if ( ( m_viewType != view ) || ( view == vtNone ) ) { - return; - } - - long index = InsertItem( GetItemCount(), wxEmptyString ); - SetItemPtrData( index, reinterpret_cast(client) ); - - wxListItem myitem; - myitem.SetId( index ); - myitem.SetBackgroundColour( CMuleColour(wxSYS_COLOUR_LISTBOX) ); - - SetItem(myitem); - - RefreshItem( index ); -} - - -void CClientListCtrl::RemoveClient( CUpDownClient* client, ViewType view ) -{ - wxCHECK_RET(client, wxT("Attempted to remove NULL client pointer.")); - - if ( ( m_viewType != view ) || ( view == vtNone ) ) { - return; - } - - long index = FindItem( -1, reinterpret_cast(client) ); - - if ( index > -1 ) { - DeleteItem( index ); - } -} - - -void CClientListCtrl::UpdateClient( CUpDownClient* client, ViewType view ) -{ - wxCHECK_RET(client, wxT("Attempted to update NULL client pointer.")); - - if ( ( m_viewType != view ) || ( view == vtNone ) ) { - return; - } - - if ( theApp->amuledlg->IsDialogVisible( CamuleDlg::DT_TRANSFER_WND ) ) { - // Visible lines, default to all because not all platforms support the GetVisibleLines function - long first = 0, last = GetItemCount(); - long result = FindItem( -1, reinterpret_cast(client) ); - if ( result > -1 ) { -#ifndef __WXMSW__ - GetVisibleLines( &first, &last ); -#endif - if ( result >= first && result <= last) { - RefreshItem(result); - } - } - } -} - - -void CClientListCtrl::OnDrawItem( int item, wxDC* dc, const wxRect& rect, const wxRect& rectHL, bool highlighted ) -{ - // Don't do any drawing if we not being watched. - if ( !theApp->amuledlg || !theApp->amuledlg->IsDialogVisible( CamuleDlg::DT_TRANSFER_WND ) ) { - return; - } - - if ( highlighted ) { - if ( GetFocus() ) { - dc->SetBackground(m_hilightBrush); - dc->SetTextForeground( CMuleColour(wxSYS_COLOUR_HIGHLIGHTTEXT) ); - } else { - dc->SetBackground(m_hilightUnfocusBrush); - dc->SetTextForeground( CMuleColour(wxSYS_COLOUR_HIGHLIGHTTEXT)); - } - - CMuleColour colour = GetFocus() ? m_hilightBrush.GetColour() : m_hilightUnfocusBrush.GetColour(); - dc->SetPen( *(wxThePenList->FindOrCreatePen( colour.Blend(65), 1, wxSOLID) )); - } else { - dc->SetBackground( CMuleColour(wxSYS_COLOUR_LISTBOX).GetBrush()); - dc->SetTextForeground( CMuleColour(wxSYS_COLOUR_WINDOWTEXT) ); - dc->SetPen(*wxTRANSPARENT_PEN); - } - - dc->SetBrush(dc->GetBackground()); - dc->DrawRectangle(rectHL); - dc->SetPen(*wxTRANSPARENT_PEN); - - CUpDownClient* client = reinterpret_cast(GetItemData(item)); - wxRect cur_rect = rect; - cur_rect.x += 4; - - const ClientListView& view = g_listViews[ (int)m_viewType ]; - - if ( view.m_draw ) { - for ( int i = 0; i < GetColumnCount(); i++ ) { - int width = GetColumnWidth( i ); - if ( width ) { - cur_rect.width = width - 8; - - wxDCClipper clipper( *dc, cur_rect ); - - view.m_draw( client, i, dc, cur_rect ); - } - cur_rect.x += width; - } - } -} - - -wxString CClientListCtrl::GetTTSText(unsigned item) const -{ - CUpDownClient *client = reinterpret_cast(GetItemData( item )); - - return client->GetUserName(); -} - - -wxString CClientListCtrl::GetOldColumnOrder() const -{ - const ClientListView& view = g_listViews[ (int)m_viewType ]; - if (view.m_getOldColumnOrder) { - return view.m_getOldColumnOrder(); - } - return wxEmptyString; -} - - -///////////////////////////////////////////////////////////////////////////////////////////// -void CUploadingView::Initialize( CClientListCtrl* list ) -{ - list->InsertColumn( 0, _("Username"), wxLIST_FORMAT_LEFT, 150, wxT("U") ); - list->InsertColumn( 1, _("File"), wxLIST_FORMAT_LEFT, 275, wxT("F") ); - list->InsertColumn( 2, _("Client Software"), wxLIST_FORMAT_LEFT, 100, wxT("C") ); - list->InsertColumn( 3, _("Speed"), wxLIST_FORMAT_LEFT, 60, wxT("S") ); - list->InsertColumn( 4, _("Transferred"), wxLIST_FORMAT_LEFT, 65, wxT("T") ); - list->InsertColumn( 5, _("Waited"), wxLIST_FORMAT_LEFT, 60, wxT("W") ); - list->InsertColumn( 6, _("Upload Time"), wxLIST_FORMAT_LEFT, 60, wxT("u") ); - list->InsertColumn( 7, _("Status"), wxLIST_FORMAT_LEFT, 110, wxT("s") ); - list->InsertColumn( 8, _("Obtained Parts"), wxLIST_FORMAT_LEFT, 100, wxT("P") ); - list->InsertColumn( 9, _("Upload/Download"), wxLIST_FORMAT_LEFT, 100, wxT("R") ); - list->InsertColumn( 10, _("Remote Status"), wxLIST_FORMAT_LEFT, 100, wxT("r") ); - - // Insert any existing items on the list - const CClientPtrList& uploading = theApp->uploadqueue->GetUploadingList(); - CClientPtrList::const_iterator it = uploading.begin(); - for (; it != uploading.end(); ++it) { - list->InsertClient( *it, list->GetListView() ); - } -} - - -wxString CUploadingView::GetOldColumnOrder() -{ - return wxT("U,F,C,S,T,W,u,s,P,R,r"); -} - - -void CUploadingView::DrawCell( CUpDownClient* client, int column, wxDC* dc, const wxRect& rect ) -{ - wxString buffer; - - switch ( column ) { - case 0: { - uint8 clientImage; - - if ( client->IsFriend() ) { - clientImage = Client_Friend_Smiley; - } else { - switch (client->GetClientSoft()) { - case SO_AMULE: - clientImage = Client_aMule_Smiley; - break; - case SO_MLDONKEY: - case SO_NEW_MLDONKEY: - case SO_NEW2_MLDONKEY: - clientImage = Client_mlDonkey_Smiley; - break; - case SO_EDONKEY: - case SO_EDONKEYHYBRID: - // Maybe we would like to make different icons? - clientImage = Client_eDonkeyHybrid_Smiley; - break; - case SO_EMULE: - clientImage = Client_eMule_Smiley; - break; - case SO_LPHANT: - clientImage = Client_lphant_Smiley; - break; - case SO_SHAREAZA: - case SO_NEW_SHAREAZA: - case SO_NEW2_SHAREAZA: - clientImage = Client_Shareaza_Smiley; - break; - case SO_LXMULE: - clientImage = Client_xMule_Smiley; - break; - default: - // cDonkey, Compat Unk - // No icon for those yet. Using the eMule one + '?' - clientImage = Client_Unknown; - break; - } - } - - m_imagelist.Draw(clientImage, *dc, rect.x, rect.y + 1, - wxIMAGELIST_DRAW_TRANSPARENT); - - if (client->GetScoreRatio() > 1) { - // Has credits, draw the gold star - m_imagelist.Draw(Client_CreditsYellow_Smiley, *dc, rect.x, rect.y + 1, - wxIMAGELIST_DRAW_TRANSPARENT ); - } else if (client->ExtProtocolAvailable()) { - // Ext protocol -> Draw the '+' - m_imagelist.Draw(Client_ExtendedProtocol_Smiley, *dc, rect.x, rect.y + 1, - wxIMAGELIST_DRAW_TRANSPARENT ); - } - - if (client->IsIdentified()) { - // the 'v' - m_imagelist.Draw(Client_SecIdent_Smiley, *dc, rect.x, rect.y + 1, - wxIMAGELIST_DRAW_TRANSPARENT); - } else if (client->IsBadGuy()) { - // the 'X' - m_imagelist.Draw(Client_BadGuy_Smiley, *dc, rect.x, rect.y + 1, - wxIMAGELIST_DRAW_TRANSPARENT); - } - - if (client->HasObfuscatedConnectionBeenEstablished()) { - // the "¿" except it's a key - m_imagelist.Draw(Client_Encryption_Smiley, *dc, rect.x, rect.y + 1, - wxIMAGELIST_DRAW_TRANSPARENT); - } - - wxString userName; -#ifdef ENABLE_IP2COUNTRY - // Draw the flag - const CountryData& countrydata = - theApp->amuledlg->m_IP2Country->GetCountryData(client->GetFullIP()); - dc->DrawBitmap(countrydata.Flag, rect.x + 20, rect.y + 5, - wxIMAGELIST_DRAW_TRANSPARENT); - - userName << countrydata.Name; - userName << wxT(" - "); -#endif // ENABLE_IP2COUNTRY - userName << client->GetUserName(); - dc->DrawText(userName, rect.x + 40, rect.y + 3); - - return; - } - - case 1: - if ( client->GetUploadFile() ) { - buffer = client->GetUploadFile()->GetFileName().GetPrintable(); - } else { - buffer = _("N/A"); - } - break; - - case 2: - buffer = client->GetClientVerString(); - break; - - case 3: - buffer = wxString::Format( wxT("%.1f"), client->GetUploadDatarate() / 1024.0f ); - - buffer += wxT(" "); - buffer += _("kB/s"); - break; - - case 4: - buffer = CastItoXBytes(client->GetSessionUp()); - break; - - case 5: - buffer = CastSecondsToHM((client->GetWaitTime())/1000); - break; - - case 6: - buffer = CastSecondsToHM((client->GetUpStartTimeDelay())/1000); - break; - - case 7: - switch ( client->GetUploadState() ) { - case US_CONNECTING: - buffer = _("Connecting"); - break; - - case US_WAITCALLBACK: - buffer = _("Connecting via server"); - break; - - case US_UPLOADING: - buffer = wxT("<-- "); - buffer.Append(_("Transferring")); - - if (client->GetDownloadState() == DS_DOWNLOADING) { - buffer.Append(wxT(" -->")); - } - break; - - case US_ONUPLOADQUEUE: - buffer = _("On Queue"); - break; - - default: - buffer = _("Unknown"); - } - break; - - case 8: - if ( client->GetUpPartCount() ) { - CUploadingView::DrawStatusBar( client, dc, rect ); - } - return; - - case 9: - buffer = CastItoXBytes( client->GetUploadedTotal() ) + - wxT(" / ") + CastItoXBytes(client->GetDownloadedTotal()); - break; - - case 10: - if ( client->GetDownloadState() == DS_ONQUEUE ) { - if ( client->IsRemoteQueueFull() ) { - buffer = _("Queue Full"); - } else { - if (client->GetRemoteQueueRank()) { - buffer = wxString::Format(_("QR: %u"), client->GetRemoteQueueRank()); - } else { - buffer = _("Unknown"); - } - } - } else if ( client->GetDownloadState() == DS_DOWNLOADING ) { - buffer += wxString::Format( wxT("%.1f"), client->GetKBpsDown() ); - buffer += wxT(" "); - buffer += _("kB/s"); - } else { - buffer = _("Unknown"); - } - break; - } - - dc->DrawText( buffer, rect.x, rect.y + 3 ); -} - - -int CUploadingView::SortProc(wxUIntPtr item1, wxUIntPtr item2, long sortData) -{ - CUpDownClient* client1 = (CUpDownClient*)item1; - CUpDownClient* client2 = (CUpDownClient*)item2; - - // Sorting ascending or decending - int mode = (sortData & CMuleListCtrl::SORT_DES) ? -1 : 1; - - switch (sortData & CMuleListCtrl::COLUMN_MASK) { - // Sort by username - case 0: return mode * client1->GetUserName().CmpNoCase( client2->GetUserName() ); - - - // Sort by requested file - case 1: { - const CKnownFile* file1 = client1->GetUploadFile(); - const CKnownFile* file2 = client2->GetUploadFile(); - - if ( file1 && file2 ) { - return mode * CmpAny(file1->GetFileName(), file2->GetFileName()); - } - - return mode * CmpAny( file1, file2 ); - } - - // Sort by client software - case 2: return mode * CompareVersions(client1, client2); - - // Sort by speed - case 3: return mode * CmpAny( client1->GetUploadDatarate(), client2->GetUploadDatarate() ); - - // Sort by transferred - case 4: return mode * CmpAny( client1->GetSessionUp(), client2->GetSessionUp() ); - - // Sort by wait-time - case 5: return mode * CmpAny( client1->GetWaitTime(), client2->GetWaitTime() ); - - // Sort by upload time - case 6: return mode * CmpAny( client1->GetUpStartTimeDelay(), client2->GetUpStartTimeDelay() ); - - // Sort by state - case 7: return mode * CmpAny( client1->GetUploadState(), client2->GetUploadState() ); - - // Sort by partcount - case 8: return mode * CmpAny( client1->GetUpPartCount(), client2->GetUpPartCount() ); - - // Sort by U/D ratio - case 9: return mode * CmpAny( client2->GetDownloadedTotal(), client1->GetDownloadedTotal() ); - - // Sort by remote rank - case 10: return mode * CmpAny( client2->GetRemoteQueueRank(), client1->GetRemoteQueueRank() ); - - default: - return 0; - } -} - -static const CMuleColour crUnavailable(240, 240, 240); -static const CMuleColour crFlatUnavailable(224, 224, 224); - -static const CMuleColour crAvailable(104, 104, 104); -static const CMuleColour crFlatAvailable(0, 0, 0); - -void CUploadingView::DrawStatusBar( CUpDownClient* client, wxDC* dc, const wxRect& rect1 ) -{ - wxRect rect = rect1; - rect.y += 1; - rect.height -= 2; - - wxPen old_pen = dc->GetPen(); - wxBrush old_brush = dc->GetBrush(); - bool bFlat = thePrefs::UseFlatBar(); - - wxRect barRect = rect; - if (!bFlat) { // round bar has a black border, the bar itself is 1 pixel less on each border - barRect.x ++; - barRect.y ++; - barRect.height -= 2; - barRect.width -= 2; - } - static CBarShader s_StatusBar(16); - - uint32 partCount = client->GetUpPartCount(); - - // Seems the partfile in the client object is not necessarily valid when bar is drawn for the first time. - // Keep it simple and make all parts same size. - s_StatusBar.SetFileSize(partCount * PARTSIZE); - s_StatusBar.SetHeight(barRect.height); - s_StatusBar.SetWidth(barRect.width); - s_StatusBar.Set3dDepth( thePrefs::Get3DDepth() ); - - uint64 uEnd = 0; - for ( uint64 i = 0; i < partCount; i++ ) { - uint64 uStart = PARTSIZE * i; - uEnd = uStart + PARTSIZE - 1; - - s_StatusBar.FillRange(uStart, uEnd, client->IsUpPartAvailable(i) ? (bFlat ? crFlatAvailable : crAvailable) : (bFlat ? crFlatUnavailable : crUnavailable)); - } - // fill the rest (if partStatus is empty) - s_StatusBar.FillRange(uEnd + 1, partCount * PARTSIZE - 1, bFlat ? crFlatUnavailable : crUnavailable); - s_StatusBar.Draw(dc, barRect.x, barRect.y, bFlat); - - if (!bFlat) { - // Draw black border - dc->SetPen( *wxBLACK_PEN ); - dc->SetBrush( *wxTRANSPARENT_BRUSH ); - dc->DrawRectangle(rect); - } - - dc->SetPen( old_pen ); - dc->SetBrush( old_brush ); -} - - -///////////////////////////////////////////////////////////////////////////////////////////// -void CQueuedView::Initialize( CClientListCtrl* list ) -{ - list->InsertColumn( 0, _("Username"), wxLIST_FORMAT_LEFT, 150, wxT("U") ); - list->InsertColumn( 1, _("File"), wxLIST_FORMAT_LEFT, 275, wxT("F") ); - list->InsertColumn( 2, _("Client Software"), wxLIST_FORMAT_LEFT, 100, wxT("C") ); - list->InsertColumn( 3, _("File Priority"), wxLIST_FORMAT_LEFT, 110, wxT("p") ); - list->InsertColumn( 4, _("Rating"), wxLIST_FORMAT_LEFT, 60, wxT("R") ); - list->InsertColumn( 5, _("Score"), wxLIST_FORMAT_LEFT, 60, wxT("c") ); - list->InsertColumn( 6, _("Asked"), wxLIST_FORMAT_LEFT, 60, wxT("A") ); - list->InsertColumn( 7, _("Last Seen"), wxLIST_FORMAT_LEFT, 110, wxT("L") ); - list->InsertColumn( 8, _("Entered Queue"), wxLIST_FORMAT_LEFT, 110, wxT("Q") ); - list->InsertColumn( 9, _("Banned"), wxLIST_FORMAT_LEFT, 60, wxT("B") ); - list->InsertColumn( 10, _("Obtained Parts"), wxLIST_FORMAT_LEFT, 100, wxT("P") ); - - // Insert any existing items on the list - const CClientPtrList& uploading = theApp->uploadqueue->GetWaitingList(); - CClientPtrList::const_iterator it = uploading.begin(); - for (; it != uploading.end(); ++it) { - list->InsertClient( *it, list->GetListView() ); - } -} - - -wxString CQueuedView::GetOldColumnOrder() -{ - return wxT("U,F,C,p,R,c,A,L,Q,B,P"); -} - - -void CQueuedView::DrawCell( CUpDownClient* client, int column, wxDC* dc, const wxRect& rect ) -{ - wxString buffer; - - switch ( column ) { - // These 3 are the same for both lists - case 0: - case 1: - case 2: - CUploadingView::DrawCell( client, column, dc, rect ); - return; - - case 3: - if ( client->GetUploadFile() ) { - buffer = PriorityToStr( client->GetUploadFile()->GetUpPriority(), false ); - } else { - buffer = _("Unknown"); - } - - break; - - case 4: - buffer = wxString::Format( wxT("%.1f"), (float)client->GetScore(false,false,true) ); - break; - - case 5: - if ( client->HasLowID() ) { - buffer = wxString::Format( wxT("%i %s"), client->GetScore(false), _("LowID") ); - } else { - buffer = wxString::Format(wxT("%i"),client->GetScore(false)); - } - break; - - case 6: - buffer = wxString::Format( wxT("%i"), client->GetAskedCount() ); - break; - -#ifndef CLIENT_GUI - case 7: - buffer = CastSecondsToHM((::GetTickCount() - client->GetLastUpRequest())/1000); - break; - - case 8: - buffer = CastSecondsToHM((::GetTickCount() - client->GetWaitStartTime())/1000); - break; -#else - case 7: - buffer = CastSecondsToHM(client->GetLastUpRequest()/1000); - break; - - case 8: - buffer = CastSecondsToHM(client->GetWaitStartTime()/1000); - break; -#endif - case 9: - if ( client->IsBanned() ) { - buffer = _("Yes"); - } else { - buffer = _("No"); - } - - break; - - case 10: - if ( client->GetUpPartCount() ) { - CUploadingView::DrawStatusBar( client, dc, rect ); - } - - return; - } - - dc->DrawText( buffer, rect.x, rect.y + 3 ); -} - - -int CQueuedView::SortProc(wxUIntPtr item1, wxUIntPtr item2, long sortData) -{ - CUpDownClient* client1 = (CUpDownClient*)item1; - CUpDownClient* client2 = (CUpDownClient*)item2; - - // Ascending or decending? - int mode = (sortData & CMuleListCtrl::SORT_DES) ? -1 : 1; - - switch (sortData & CMuleListCtrl::COLUMN_MASK) { - // Sort by username - case 0: return mode * client1->GetUserName().CmpNoCase( client2->GetUserName() ); - - // Sort by filename - case 1: { - const CKnownFile* file1 = client1->GetUploadFile(); - const CKnownFile* file2 = client2->GetUploadFile(); - - if ( file1 && file2 ) { - return mode * CmpAny(file1->GetFileName(), file2->GetFileName()); - } - - // Place files with filenames on top - return -mode * CmpAny( file1, file2 ); - } - - // Sort by client software - case 2: return mode * CompareVersions(client1, client2); - - // Sort by file upload-priority - case 3: { - const CKnownFile* file1 = client1->GetUploadFile(); - const CKnownFile* file2 = client2->GetUploadFile(); - - if ( file1 && file2 ) { - int8 prioA = file1->GetUpPriority(); - int8 prioB = file2->GetUpPriority(); - - // Work-around for PR_VERYLOW which has value 4. See KnownFile.h for that stupidity ... - return mode * CmpAny( ( prioA != PR_VERYLOW ? prioA : -1 ), ( prioB != PR_VERYLOW ? prioB : -1 ) ); - } - - // Place files with priorities on top - return -mode * CmpAny( file1, file2 ); - } - - // Sort by rating - case 4: return mode * CmpAny( client1->GetScore(false,false,true), client2->GetScore(false,false,true) ); - - // Sort by score - case 5: return mode * CmpAny( client1->GetScore(false), client2->GetScore(false) ); - - // Sort by Asked count - case 6: return mode * CmpAny( client1->GetAskedCount(), client2->GetAskedCount() ); - - // Sort by Last seen - case 7: return mode * CmpAny( client1->GetLastUpRequest(), client2->GetLastUpRequest() ); - - // Sort by entered time - case 8: return mode * CmpAny( client1->GetWaitStartTime(), client2->GetWaitStartTime() ); - - // Sort by banned - case 9: return mode * CmpAny( client1->IsBanned(), client2->IsBanned() ); - - default: return 0; - } -} - - -///////////////////////////////////////////////////////////////////////////////////////////// -void CClientsView::Initialize( CClientListCtrl* list ) -{ - list->InsertColumn( 0, _("Username"), wxLIST_FORMAT_LEFT, 150, wxT("U") ); - list->InsertColumn( 1, _("Upload Status"), wxLIST_FORMAT_LEFT, 150, wxT("S") ); - list->InsertColumn( 2, _("Transferred Up"), wxLIST_FORMAT_LEFT, 150, wxT("T") ); - list->InsertColumn( 3, _("Download Status"), wxLIST_FORMAT_LEFT, 150, wxT("s") ); - list->InsertColumn( 4, _("Transferred Down"), wxLIST_FORMAT_LEFT, 150, wxT("t") ); - list->InsertColumn( 5, _("Client Software"), wxLIST_FORMAT_LEFT, 150, wxT("C") ); - list->InsertColumn( 6, _("Connected"), wxLIST_FORMAT_LEFT, 150, wxT("c") ); - list->InsertColumn( 7, _("Userhash"), wxLIST_FORMAT_LEFT, 150, wxT("H") ); - list->InsertColumn( 8, _("Encrypted"), wxLIST_FORMAT_LEFT, 100, wxT("E") ); - list->InsertColumn( 9, _("Hide shared files"), wxLIST_FORMAT_LEFT, 100, wxT("h") ); - - const CClientList::IDMap& clist = theApp->clientlist->GetClientList(); - CClientList::IDMap::const_iterator it = clist.begin(); - - for ( ; it != clist.end(); ++it ) { - list->InsertClient( it->second, list->GetListView() ); - } -} - - -wxString CClientsView::GetOldColumnOrder() -{ - return wxT("U,S,T,s,t,C,c,H,E,h"); -} - - -void CClientsView::DrawCell( CUpDownClient* client, int column, wxDC* dc, const wxRect& rect ) -{ - wxString buffer; - - switch ( column ) { - case 0: - CUploadingView::DrawCell( client, column, dc, rect ); - return; - - case 1: - CUploadingView::DrawCell( client, 7, dc, rect ); - return; - - case 2: - buffer = CastItoXBytes( client->GetUploadedTotal() ); - - break; - - case 3: - buffer = DownloadStateToStr( client->GetDownloadState(), - client->IsRemoteQueueFull() ); - break; - - case 4: - buffer = CastItoXBytes( client->GetDownloadedTotal() ); - break; - - case 5: - buffer = client->GetClientVerString(); - break; - - case 6: - if ( client->IsConnected() ) { - buffer = _("Yes"); - } else { - buffer = _("No"); - } - - break; - - case 7: - buffer = client->GetUserHash().Encode(); - break; - - case 8: - buffer = client->HasObfuscatedConnectionBeenEstablished() ? - _("Yes") : _("No"); - break; - - case 9: - buffer = client->GetUserName().IsEmpty() ? - wxT("?") : - (client->HasDisabledSharedFiles() ? _("Yes") : _("No")); - break; - } - - dc->DrawText( buffer, rect.x, rect.y + 3 ); -} - - -int CClientsView::SortProc(wxUIntPtr item1, wxUIntPtr item2, long sortData) -{ - CUpDownClient* client1 = (CUpDownClient*)item1; - CUpDownClient* client2 = (CUpDownClient*)item2; - - // Ascending or decending? - int mode = (sortData & CMuleListCtrl::SORT_DES) ? -1 : 1; - - switch (sortData & CMuleListCtrl::COLUMN_MASK) { - // Sort by Username - case 0: return mode * client1->GetUserName().CmpNoCase( client2->GetUserName() ); - - // Sort by Uploading-state - case 1: return mode * CmpAny( client1->GetUploadState(), client2->GetUploadState() ); - - // Sort by data-uploaded - case 2: - return mode * CmpAny( client1->GetUploadedTotal(), client2->GetUploadedTotal() ); - - // Sort by Downloading-state - case 3: - if( client1->GetDownloadState() == client2->GetDownloadState() ){ - if( client1->IsRemoteQueueFull() && client2->IsRemoteQueueFull() ) { - return mode * 0; - } else if( client1->IsRemoteQueueFull() ) { - return mode * 1; - } else if( client2->IsRemoteQueueFull() ) { - return mode * -1; - } else { - return mode * 0; - } - } - return mode * CmpAny( client1->GetDownloadState(), client2->GetDownloadState() ); - - // Sort by data downloaded - case 4: - return mode * CmpAny( client1->GetDownloadedTotal(), client2->GetDownloadedTotal() ); - - // Sort by client-software - case 5: return mode * CompareVersions(client1, client2); - - // Sort by connection - case 6: return mode * CmpAny( client1->IsConnected(), client2->IsConnected() ); - - // Sort by user-hash - case 7: return mode * CmpAny( client1->GetUserHash(), client2->GetUserHash() ); - - // Sort by Obfuscation state - case 8: return mode * CmpAny( client2->HasObfuscatedConnectionBeenEstablished(), client1->HasObfuscatedConnectionBeenEstablished() ); - - // Sort by Shared Files DISabled - case 9: return mode * CmpAny( client2->HasDisabledSharedFiles(), client1->HasDisabledSharedFiles() ); - - default: - return 0; - } - -} -// File_checked_for_headers diff --git a/src/ClientListCtrl.h b/src/ClientListCtrl.h deleted file mode 100644 index e6d653eb..00000000 --- a/src/ClientListCtrl.h +++ /dev/null @@ -1,322 +0,0 @@ -// -// This file is part of the aMule Project. -// -// Copyright (c) 2003-2008 aMule Team ( admin@amule.org / http://www.amule.org ) -// Copyright (c) 2002 Merkur ( devs@emule-project.net / http://www.emule-project.net ) -// -// Any parts of this program derived from the xMule, lMule or eMule project, -// or contributed by third-party developers are copyrighted by their -// respective authors. -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA -// - -#ifndef CLIENTLISTCTRL_H -#define CLIENTLISTCTRL_H - -#include "MuleListCtrl.h" // Needed for CMuleListCtrl -#include "Constants.h" // Needed for ViewType -#include - -class CUpDownClient; - - -/** - * This class represents a number of ways of displaying clients, currently - * supporting 3 different "ViewTypes". In other words, this class superseeds - * the 3 widgets that were used to display clients beforehand: - * - CUploadListCtrl - * - CQueueListCtrl - * - CClientListCtrl - * - * This is done in an modular fashion, which means that adding new views is a - * rather trivial task. This approch has the advantage that only one widget exists - * and thus only one actual list is maintained at a time, even though the number - * of calls to the list wont decrease. This however can be trivially fixed if needed. - */ -class CClientListCtrl : public CMuleListCtrl -{ -public: - /** - * Constructor. - * - * @see CMuleListCtrl::CMuleListCtrl - */ - CClientListCtrl( - wxWindow *parent, - wxWindowID winid = -1, - const wxPoint &pos = wxDefaultPosition, - const wxSize &size = wxDefaultSize, - long style = wxLC_ICON, - const wxValidator& validator = wxDefaultValidator, - const wxString &name = wxT("clientlistctrl") ); - - /** - * Destructor. - */ - ~CClientListCtrl(); - - - /** - * Returns the current view-type. - * - * @return The viewtype set by the user or the default value. - */ - ViewType GetListView(); - - /** - * Sets another view-type. - * - * @param newView A view-mode different from the current view-type. - * - * Calling this function resets the list and re-initializes it to display - * clients acording to the specifications of that view-mode. If you wish - * to susspend the list, then use vtNone as the argument. - */ - void SetListView( ViewType newView ); - - - /** - * Adds a new client to the list. - * - * @param client The client to be added. - * @param view The view where the client should be displayed. - * - * This function adds the specified client to the list, provided that the - * view parameter matches the currently selected view-mode. - */ - void InsertClient( CUpDownClient* client, ViewType view ); - - /** - * Removes a client from the list. - * - * @param client The client to be removed. - * @param view The view where the client is being displayed. - * - * This function removes the specified client from the list, provided that - * the view parameter matches the currently selected view-mode. - */ - void RemoveClient( CUpDownClient* client, ViewType view ); - - /** - * Updates a client on the list. - * - * @param client The client to be updated. - * @param view The view where the client is being displayed. - * - * This function updates (redraws) the specified client on the list, provided - * that the view parameter matches the currently selected view-mode. Clients - * that are outside the currently visible range will also be ignored. - */ - void UpdateClient( CUpDownClient* client, ViewType view ); - - - /** - * This function toggles between the different view-types. - * - * Calling this function makes the list switch to the next view-type - * available, provided that the current view-type isn't vtNone. The - * sequence is as specified in the ViewType enum, with the exception - * that vtNone will be skipped. - */ - void ToggleView(); - - -protected: - /// Return old column order. - wxString GetOldColumnOrder() const; - -private: - /** - * Custom cell-drawing function. - */ - virtual void OnDrawItem(int item, wxDC* dc, const wxRect& rc, const wxRect& rectHL, bool hl); - - /** - * @see CMuleListCtrl::GetTTSText - */ - virtual wxString GetTTSText(unsigned item) const; - - - /** - * Event-handler for displaying a menu at right-clicks. - */ - void OnRightClick( wxMouseEvent& event ); - - /** - * Event-handler for displaying the client-details dialog upon middle-clicks. - */ - void OnMiddleClick( wxListEvent& event ); - - /** - * Event-handler for switching between the different view-types. - */ - void OnChangeView( wxCommandEvent& event ); - - /** - * Event-handler for adding a client on the list to the list of friends. - */ - void OnAddFriend( wxCommandEvent& event ); - - /** - * Event-handler for showing details about a client. - */ - void OnShowDetails( wxCommandEvent& event ); - - /** - * Event-handler for requesting the sharedfiles-list of a client. - */ - void OnViewFiles( wxCommandEvent& event ); - - /** - * Event-handler for sending a message to a specific client. - */ - void OnSendMessage( wxCommandEvent& event ); - - /** - * Event-handler for un-banning a client. - */ - void OnUnbanClient( wxCommandEvent& event ); - - - //! The current view-type. The default value is vtUploading. - ViewType m_viewType; - - //! A pointer to the displayed menu, used to ensure that only one menu is displayed at a time. - wxMenu* m_menu; - - //! One of the two most used brushes, cached for performance reasons. - wxBrush m_hilightBrush; - - //! One of the two most used brushes, cached for performance reasons. - wxBrush m_hilightUnfocusBrush; - - - DECLARE_EVENT_TABLE() -}; - - - -/** - * This is the default view for the list, representing a list of clients recieving files. - * - * This struct contains the functions needed to realize the uploading-view. It contains - * the functions used by the CClientListCtrl to prepare, sort and draw the list when the - * Uploading-view is enabled. - */ -struct CUploadingView -{ - /** - * Initializes the view. - * - * @param list The list which wants to make use of the view. - * - * This function is called when the CClientListCtrl changes to this view-type, - * and it is responsible for setting the initial columns and contents. By the - * time this function is called, the list will already be completly empty. - */ - static void Initialize( CClientListCtrl* list ); - - /** - * Draws a specific cell. - * - * @param client The client used as a reference. - * @param column The column to be drawn. - * @param dc The device-context to draw onto. - * @param rect The rectangle to draw in. - * - * This function is used to draw the contents of each row, and is called for - * every visible column. - */ - static void DrawCell( CUpDownClient* client, int column, wxDC* dc, const wxRect& rect ); - - /** - * This is the sorter-function used by the listctrl to sort the contents. - * - * @see wxListCtrl::SortItems - */ - static int wxCALLBACK SortProc(wxUIntPtr item1, wxUIntPtr item2, long sortData); - - /** - * Helperfunction which draws a simple bar-span over the clients requested file. - */ - static void DrawStatusBar( CUpDownClient* client, wxDC* dc, const wxRect &rect ); - - /** - * Return the old column order for this view. - */ - static wxString GetOldColumnOrder(); -}; - - -/** - * This struct contains the functions needed to realize the Queued-clients view. - * - * @see CUploadingView - */ -struct CQueuedView -{ - /** - * @see CUploadingView::Initialize - */ - static void Initialize( CClientListCtrl* list ); - - /** - * @see CUploadingView::DrawCell - */ - static void DrawCell( CUpDownClient* client, int column, wxDC* dc, const wxRect& rect ); - - /** - * @see CUploadingView::SortProc - */ - static int wxCALLBACK SortProc(wxUIntPtr item1, wxUIntPtr item2, long sortData); - - /** - * Return the old column order for this view. - */ - static wxString GetOldColumnOrder(); -}; - - -/** - * This struct contains the functions needed to realize the Clients view. - * - * @see CUploadingView - */ -struct CClientsView -{ - /** - * @see CUploadingView::Initialize - */ - static void Initialize( CClientListCtrl* list ); - - /** - * @see CUploadingView::DrawCell - */ - static void DrawCell( CUpDownClient* client, int column, wxDC* dc, const wxRect& rect ); - - /** - * @see CUploadingView::SortProc - */ - static int wxCALLBACK SortProc(wxUIntPtr item1, wxUIntPtr item2, long sortData); - - /** - * Return the old column order for this view. - */ - static wxString GetOldColumnOrder(); -}; - -#endif -// File_checked_for_headers diff --git a/src/ClientTCPSocket.cpp b/src/ClientTCPSocket.cpp index 72a6e211..33831e2c 100644 --- a/src/ClientTCPSocket.cpp +++ b/src/ClientTCPSocket.cpp @@ -323,7 +323,7 @@ bool CClientTCPSocket::ProcessPacket(const byte* buffer, uint32 size, uint8 opco // Socket might die on ConnectionEstablished somehow. Check it. if (m_client) { - Notify_UploadCtrlRefreshClient( m_client ); + Notify_SharedCtrlRefreshClient( m_client , AVAILABLE_SOURCE); } break; @@ -388,7 +388,7 @@ bool CClientTCPSocket::ProcessPacket(const byte* buffer, uint32 size, uint8 opco theApp->clientlist->AddClient(m_client); m_client->SetCommentDirty(); } - Notify_UploadCtrlRefreshClient( m_client ); + Notify_SharedCtrlRefreshClient( m_client, AVAILABLE_SOURCE ); // send a response packet with standart informations if ((m_client->GetHashType() == SO_EMULE) && !bIsMuleHello) { m_client->SendMuleInfoPacket(false); diff --git a/src/Constants.h b/src/Constants.h index 39afaf3f..3c99e77b 100644 --- a/src/Constants.h +++ b/src/Constants.h @@ -42,20 +42,6 @@ enum ViewType }; -//! These types specifies the char. of a given item on the CDownloadListCtrl -enum DownloadItemType -{ - //! A CPartFile object - FILE_TYPE, - //! A source which is currently queued for another file. - A4AF_SOURCE, - //! A source which has not yet been contacted. - UNAVAILABLE_SOURCE, - //! A source which is currently queued for this file. - AVAILABLE_SOURCE -}; - - // lfroen : custom events for core internal messages // 'cause - there's no wxCommand etc in wxBase enum Core_Event_ID @@ -85,6 +71,17 @@ enum HTTP_Download_File HTTP_GeoIP }; +//! Source types for source showing list. +enum SourceItemType +{ + //! A source which is currently queued for another file. + A4AF_SOURCE, + //! A source which has not yet been contacted. + UNAVAILABLE_SOURCE, + //! A source which is currently queued for this file. + AVAILABLE_SOURCE +}; + // KnownFile constants #define PS_READY 0 diff --git a/src/DownloadClient.cpp b/src/DownloadClient.cpp index 620056e6..94e822fd 100644 --- a/src/DownloadClient.cpp +++ b/src/DownloadClient.cpp @@ -1369,7 +1369,19 @@ void CUpDownClient::UpdateDisplayedInfo(bool force) // And finnaly trigger an event if there's any reason if ( update ) { - Notify_DownloadCtrlUpdateItem(this); + SourceItemType type = A4AF_SOURCE; + switch (GetDownloadState()) { + case DS_DOWNLOADING: + case DS_ONQUEUE: + // We will send A4AF, which will be checked. + break; + default: + type = UNAVAILABLE_SOURCE; + break; + } + + Notify_SourceCtrlUpdateSource(this, type ); + Notify_SharedCtrlRefreshClient(this, AVAILABLE_SOURCE); } m_lastRefreshedDLDisplay = curTick; @@ -1449,7 +1461,7 @@ bool CUpDownClient::SwapToAnotherFile(bool bIgnoreNoNeeded, bool ignoreSuspensio // remove this client from the A4AF list of our new m_reqfile if ( SwapTo->RemoveA4AFSource( this ) ) { - Notify_DownloadCtrlRemoveSource(this, SwapTo); + Notify_SourceCtrlRemoveSource(this, SwapTo); } m_reqfile->RemoveDownloadingSource( this ); @@ -1464,9 +1476,9 @@ bool CUpDownClient::SwapToAnotherFile(bool bIgnoreNoNeeded, bool ignoreSuspensio // Avoid swapping to this file for a while m_A4AF_list[m_reqfile].timestamp = ::GetTickCount(); - Notify_DownloadCtrlAddSource(m_reqfile, this, A4AF_SOURCE); + Notify_SourceCtrlAddSource(m_reqfile, this, A4AF_SOURCE); } else { - Notify_DownloadCtrlRemoveSource( this, m_reqfile ); + Notify_SourceCtrlRemoveSource( this, m_reqfile ); } SetDownloadState(DS_NONE); @@ -1481,7 +1493,7 @@ bool CUpDownClient::SwapToAnotherFile(bool bIgnoreNoNeeded, bool ignoreSuspensio SwapTo->AddSource( this ); - Notify_DownloadCtrlAddSource(SwapTo, this, UNAVAILABLE_SOURCE); + Notify_SourceCtrlAddSource(SwapTo, this, UNAVAILABLE_SOURCE); // Remove the new reqfile from the list of other files m_A4AF_list.erase( target ); diff --git a/src/DownloadListCtrl.cpp b/src/DownloadListCtrl.cpp index 8fc747c3..1c473696 100644 --- a/src/DownloadListCtrl.cpp +++ b/src/DownloadListCtrl.cpp @@ -23,6 +23,8 @@ // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // +#include "DownloadListCtrl.h" // Interface declarations + #include #include @@ -30,16 +32,10 @@ #include "amule.h" // Needed for theApp #include "amuleDlg.h" // Needed for CamuleDlg #include "BarShader.h" // Needed for CBarShader -#include "ClientDetailDialog.h" // Needed for CClientDetailDialog -#include "ChatWnd.h" // Needed for CChatWnd #include "CommentDialogLst.h" // Needed for CCommentDialogLst -#include "DownloadListCtrl.h" // Interface declarations #include "DataToText.h" // Needed for PriorityToStr #include "FileDetailDialog.h" // Needed for CFileDetailDialog #include "GuiEvents.h" // Needed for CoreNotify_* -#ifdef ENABLE_IP2COUNTRY - #include "IP2Country.h" // Needed for IP2Country -#endif #include "Logger.h" #include "muuli_wdr.h" // Needed for ID_DLOADLIST #include "PartFile.h" // Needed for CPartFile @@ -47,79 +43,64 @@ #include "SharedFileList.h" // Needed for CSharedFileList #include "TerminationProcess.h" // Needed for CTerminationProcess #include "updownclient.h" // Needed for CUpDownClient - +#include "TransferWnd.h" +#include "SourceListCtrl.h" class CPartFile; -struct CtrlItem_Struct +struct FileCtrlItem_Struct { - CtrlItem_Struct() + FileCtrlItem_Struct() : dwUpdated(0), status(NULL), - m_owner(NULL), - m_fileValue(NULL), - m_sourceValue(NULL), - m_type(FILE_TYPE) + m_fileValue(NULL) { } - ~CtrlItem_Struct() { + ~FileCtrlItem_Struct() { delete status; } - DownloadItemType GetType() const { - return m_type; - } - - CPartFile* GetOwner() const { - return m_owner; - } - CPartFile* GetFile() const { return m_fileValue; } - CUpDownClient* GetSource() const { - return m_sourceValue; - } - void SetContents(CPartFile* file) { - m_owner = NULL; m_fileValue = file; - m_sourceValue = NULL; - m_owner = NULL; - m_type = FILE_TYPE; - } - - void SetContents(CPartFile* owner, CUpDownClient* source, DownloadItemType type) { - wxCHECK_RET(type != FILE_TYPE, wxT("Invalid type, not a source")); - - m_owner = owner; - m_fileValue = NULL; - m_sourceValue = source; - m_type = type; } - uint32 dwUpdated; wxBitmap* status; private: - CPartFile* m_owner; CPartFile* m_fileValue; - CUpDownClient* m_sourceValue; - DownloadItemType m_type; }; - - #define m_ImageList theApp->amuledlg->m_imagelist - +enum ColumnEnum { + ColumnPart = 0, + ColumnFileName, + ColumnSize, + ColumnTransferred, + ColumnCompleted, + ColumnSpeed, + ColumnProgress, + ColumnSources, + ColumnPriority, + ColumnStatus, + ColumnTimeRemaining, + ColumnLastSeenComplete, + ColumnLastReception, + ColumnNumberOfColumns +}; + BEGIN_EVENT_TABLE(CDownloadListCtrl, CMuleListCtrl) EVT_LIST_ITEM_ACTIVATED(ID_DLOADLIST, CDownloadListCtrl::OnItemActivated) EVT_LIST_ITEM_RIGHT_CLICK(ID_DLOADLIST, CDownloadListCtrl::OnMouseRightClick) EVT_LIST_ITEM_MIDDLE_CLICK(ID_DLOADLIST, CDownloadListCtrl::OnMouseMiddleClick) + EVT_LIST_ITEM_SELECTED(ID_DLOADLIST, CDownloadListCtrl::OnItemSelectionChanged) + EVT_LIST_ITEM_DESELECTED(ID_DLOADLIST, CDownloadListCtrl::OnItemSelectionChanged) EVT_CHAR( CDownloadListCtrl::OnKeyPressed ) @@ -150,21 +131,11 @@ BEGIN_EVENT_TABLE(CDownloadListCtrl, CMuleListCtrl) EVT_MENU( MP_VIEWFILECOMMENTS, CDownloadListCtrl::OnViewFileComments ) EVT_MENU( MP_WS, CDownloadListCtrl::OnGetFeedback ) - EVT_MENU( MP_RAZORSTATS, CDownloadListCtrl::OnGetRazorStats ) - EVT_MENU( MP_CHANGE2FILE, CDownloadListCtrl::OnSwapSource ) - EVT_MENU( MP_SHOWLIST, CDownloadListCtrl::OnViewFiles ) - EVT_MENU( MP_ADDFRIEND, CDownloadListCtrl::OnAddFriend ) - EVT_MENU( MP_SENDMESSAGE, CDownloadListCtrl::OnSendMessage ) - EVT_MENU( MP_DETAIL, CDownloadListCtrl::OnViewClientInfo ) END_EVENT_TABLE() - - //! This listtype is used when gathering the selected items. -typedef std::list ItemList; - - +typedef std::list ItemList; CDownloadListCtrl::CDownloadListCtrl( wxWindow *parent, wxWindowID winid, const wxPoint& pos, const wxSize& size, @@ -202,6 +173,8 @@ CMuleListCtrl( parent, winid, pos, size, style | wxLC_OWNERDRAW, validator, name m_completedFiles = 0; m_filecount = 0; LoadSettings(); + + //m_ready = true; } // This is the order the columns had before extendable list-control settings save/load code was introduced. @@ -219,14 +192,13 @@ CDownloadListCtrl::~CDownloadListCtrl() } } - void CDownloadListCtrl::AddFile( CPartFile* file ) { wxASSERT( file ); // Avoid duplicate entries of files if ( m_ListItems.find( file ) == m_ListItems.end() ) { - CtrlItem_Struct* newitem = new CtrlItem_Struct; + FileCtrlItem_Struct* newitem = new FileCtrlItem_Struct; newitem->SetContents(file); m_ListItems.insert( ListItemsPair( file, newitem ) ); @@ -239,98 +211,11 @@ void CDownloadListCtrl::AddFile( CPartFile* file ) } } - -void CDownloadListCtrl::AddSource(CPartFile* owner, CUpDownClient* source, DownloadItemType type) -{ - wxCHECK_RET(owner, wxT("NULL owner in CDownloadListCtrl::AddSource")); - wxCHECK_RET(source, wxT("NULL source in CDownloadListCtrl::AddSource")); - wxCHECK_RET(type != FILE_TYPE, wxT("Invalid type, not a source")); - - // Update the other instances of this source - bool bFound = false; - ListIteratorPair rangeIt = m_ListItems.equal_range(source); - for ( ListItems::iterator it = rangeIt.first; it != rangeIt.second; ++it ) { - CtrlItem_Struct* cur_item = it->second; - - // Check if this source has been already added to this file => to be sure - if ( cur_item->GetOwner() == owner ) { - // Update this instance with its new setting - cur_item->SetContents(owner, source, type); - cur_item->dwUpdated = 0; - bFound = true; - } else if ( type == AVAILABLE_SOURCE ) { - // The state 'Available' is exclusive - cur_item->SetContents(cur_item->GetOwner(), source, A4AF_SOURCE); - cur_item->dwUpdated = 0; - } - } - - if ( bFound ) { - return; - } - - if ( owner->ShowSources() ) { - CtrlItem_Struct* newitem = new CtrlItem_Struct; - newitem->SetContents(owner, source, type); - - m_ListItems.insert( ListItemsPair(source, newitem) ); - - // Find the owner-object - ListItems::iterator it = m_ListItems.find( owner ); - - if ( it != m_ListItems.end() ) { - long item = FindItem( -1, reinterpret_cast(it->second) ); - - if ( item > -1 ) { - item = InsertItem( item + 1, wxEmptyString ); - - SetItemPtrData( item, reinterpret_cast(newitem) ); - - // background.. this should be in a function - wxListItem listitem; - listitem.m_itemId = item; - - listitem.SetBackgroundColour( GetBackgroundColour() ); - - SetItem( listitem ); - } - } - } -} - - -void CDownloadListCtrl::RemoveSource( const CUpDownClient* source, const CPartFile* owner ) -{ - wxASSERT( source ); - - // Retrieve all entries matching the source - ListIteratorPair rangeIt = m_ListItems.equal_range(source); - - for ( ListItems::iterator it = rangeIt.first; it != rangeIt.second; ) { - ListItems::iterator tmp = it++; - - CtrlItem_Struct* item = tmp->second; - if ( owner == NULL || owner == item->GetOwner() ) { - // Remove it from the m_ListItems - m_ListItems.erase( tmp ); - - long index = FindItem( -1, reinterpret_cast(item) ); - - if ( index > -1 ) { - DeleteItem( index ); - } - - delete item; - } - } -} - - void CDownloadListCtrl::RemoveFile( CPartFile* file ) { wxASSERT( file ); - // Ensure that any assosiated sources and list-entries are removed + // Ensure that any list-entries are removed ShowFile( file, false ); // Find the assosiated list-item @@ -361,48 +246,40 @@ void CDownloadListCtrl::UpdateItem(const void* toupdate) #endif for ( ListItems::iterator it = rangeIt.first; it != rangeIt.second; ++it ) { - CtrlItem_Struct* item = it->second; + FileCtrlItem_Struct* item = it->second; long index = FindItem( -1, reinterpret_cast(item) ); // Determine if the file should be shown in the current category - if ( item->GetType() == FILE_TYPE ) { - CPartFile* file = item->GetFile(); - - bool show = file->CheckShowItemInGivenCat( m_category ); + + CPartFile* file = item->GetFile(); - if ( index > -1 ) { - if ( show ) { - item->dwUpdated = 0; + bool show = file->CheckShowItemInGivenCat( m_category ); - // Only update visible lines - if ( index >= first && index <= last) { - RefreshItem( index ); - } - } else { - // Item should no longer be shown in - // the current category - ShowFile( file, false ); + if ( index > -1 ) { + if ( show ) { + item->dwUpdated = 0; + + // Only update visible lines + if ( index >= first && index <= last) { + RefreshItem( index ); } - } else if ( show ) { - // Item has been hidden but new status means - // that it should it should be shown in the - // current category - ShowFile( file, true ); + } else { + // Item should no longer be shown in + // the current category + ShowFile( file, false ); } + } else if ( show ) { + // Item has been hidden but new status means + // that it should it should be shown in the + // current category + ShowFile( file, true ); + } - if (file->GetStatus() == PS_COMPLETE) { - m_completedFiles = true; - - CastByID(ID_BTNCLRCOMPL, GetParent(), wxButton)->Enable(true); - } - } else { - item->dwUpdated = 0; + if (file->GetStatus() == PS_COMPLETE) { + m_completedFiles = true; - // Only update visible lines - if ( index >= first && index <= last) { - RefreshItem( index ); - } + CastByID(ID_BTNCLRCOMPL, GetParent(), wxButton)->Enable(true); } } } @@ -415,7 +292,7 @@ void CDownloadListCtrl::ShowFile( CPartFile* file, bool show ) ListItems::iterator it = m_ListItems.find( file ); if ( it != m_ListItems.end() ) { - CtrlItem_Struct* item = it->second; + FileCtrlItem_Struct* item = it->second; if ( show ) { // Check if the file is already being displayed @@ -436,9 +313,6 @@ void CDownloadListCtrl::ShowFile( CPartFile* file, bool show ) ShowFilesCount( 1 ); } } else { - // Ensure sources are hidden - ShowSources( file, false ); - // Try to find the file and remove it long index = FindItem( -1, reinterpret_cast(item) ); if ( index > -1 ) { @@ -449,80 +323,24 @@ void CDownloadListCtrl::ShowFile( CPartFile* file, bool show ) } } - -void CDownloadListCtrl::ShowSources( CPartFile* file, bool show ) -{ - // Check if the current state is the same as the new state - if ( file->ShowSources() == show ) { - return; - } - - Freeze(); - - file->SetShowSources( show ); - - if ( show ) { - const CPartFile::SourceSet& normSources = file->GetSourceList(); - const CPartFile::SourceSet& a4afSources = file->GetA4AFList(); - - // Adding normal sources - CPartFile::SourceSet::const_iterator it; - for ( it = normSources.begin(); it != normSources.end(); ++it ) { - switch ((*it)->GetDownloadState()) { - case DS_DOWNLOADING: - case DS_ONQUEUE: - AddSource( file, *it, AVAILABLE_SOURCE ); - default: - // Any other state - AddSource( file, *it, UNAVAILABLE_SOURCE ); - } - - } - - // Adding A4AF sources - for ( it = a4afSources.begin(); it != a4afSources.end(); ++it ) { - AddSource( file, *it, A4AF_SOURCE ); - } - - SortList(); - } else { - for ( int i = GetItemCount() - 1; i >= 0; --i ) { - CtrlItem_Struct* item = (CtrlItem_Struct*)GetItemData(i); - - if ( item->GetType() != FILE_TYPE && item->GetOwner() == file ) { - // Remove from the grand list, this call doesn't remove the source - // from the listctrl, because ShowSources is now false. This also - // deletes the item. - RemoveSource(item->GetSource(), file); - } - } - } - - Thaw(); -} - - void CDownloadListCtrl::ChangeCategory( int newCategory ) { Freeze(); // remove all displayed files with a different cat and show the correct ones for (ListItems::const_iterator it = m_ListItems.begin(); it != m_ListItems.end(); it++) { - const CtrlItem_Struct *cur_item = it->second; - if ( cur_item->GetType() == FILE_TYPE ) { - CPartFile* file = cur_item->GetFile(); + CPartFile* file = it->second->GetFile(); + + bool curVisibility = file->CheckShowItemInGivenCat( m_category ); + bool newVisibility = file->CheckShowItemInGivenCat( newCategory ); - bool curVisibility = file->CheckShowItemInGivenCat( m_category ); - bool newVisibility = file->CheckShowItemInGivenCat( newCategory ); - - // Check if the visibility of the file has changed. However, if the - // current category is the default (0) category, then we can't use - // curVisiblity to see if the visibility has changed but instead - // have to let ShowFile() check if the file is or isn't on the list. - if ( curVisibility != newVisibility || !newCategory ) { - ShowFile( file, newVisibility ); - } + // Check if the visibility of the file has changed. However, if the + // current category is the default (0) category, then we can't use + // curVisiblity to see if the visibility has changed but instead + // have to let ShowFile() check if the file is or isn't on the list. + if ( curVisibility != newVisibility || !newCategory ) { + ShowFile( file, newVisibility ); } } @@ -538,35 +356,21 @@ uint8 CDownloadListCtrl::GetCategory() const } -/* - * - */ -const int itFILES = 1; -const int itSOURCES = 2; - /** * Helper-function: This function is used to gather selected items. * * @param list A pointer to the list to gather items from. - * @param types The desired types OR'd together. - * @return A list containing the selected items of the choosen types. + * @return A list containing the selected items. */ -ItemList GetSelectedItems( CDownloadListCtrl* list, int types ) +ItemList GetSelectedItems( CDownloadListCtrl* list) { ItemList results; long index = list->GetNextItem( -1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED ); while ( index > -1 ) { - CtrlItem_Struct* item = (CtrlItem_Struct*)list->GetItemData( index ); - - bool add = false; - add |= ( item->GetType() == FILE_TYPE ) && ( types & itFILES ); - add |= ( item->GetType() != FILE_TYPE ) && ( types & itSOURCES ); - - if ( add ) { - results.push_back( item ); - } + FileCtrlItem_Struct* item = (FileCtrlItem_Struct*)list->GetItemData( index ); + results.push_back( item ); index = list->GetNextItem( index, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED ); } @@ -577,7 +381,7 @@ ItemList GetSelectedItems( CDownloadListCtrl* list, int types ) void CDownloadListCtrl::OnCancelFile(wxCommandEvent& WXUNUSED(event)) { - ItemList files = ::GetSelectedItems(this, itFILES); + ItemList files = ::GetSelectedItems(this); if (files.size()) { wxString question; if (files.size() == 1) { @@ -617,7 +421,7 @@ void CDownloadListCtrl::OnSetPriority( wxCommandEvent& event ) wxASSERT( false ); } - ItemList files = ::GetSelectedItems( this, itFILES ); + ItemList files = ::GetSelectedItems( this ); for ( ItemList::iterator it = files.begin(); it != files.end(); ++it ) { CPartFile* file = (*it)->GetFile(); @@ -635,7 +439,7 @@ void CDownloadListCtrl::OnSetPriority( wxCommandEvent& event ) void CDownloadListCtrl::OnSwapSources( wxCommandEvent& event ) { - ItemList files = ::GetSelectedItems( this, itFILES ); + ItemList files = ::GetSelectedItems( this ); for ( ItemList::iterator it = files.begin(); it != files.end(); ++it ) { CPartFile* file = (*it)->GetFile(); @@ -659,12 +463,10 @@ void CDownloadListCtrl::OnSwapSources( wxCommandEvent& event ) void CDownloadListCtrl::OnSetCategory( wxCommandEvent& event ) { - ItemList files = ::GetSelectedItems( this, itFILES ); + ItemList files = ::GetSelectedItems( this ); for ( ItemList::iterator it = files.begin(); it != files.end(); ++it ) { - CPartFile* file = (*it)->GetFile(); - - CoreNotify_PartFile_SetCat( file, event.GetId() - MP_ASSIGNCAT ); + CoreNotify_PartFile_SetCat( (*it)->GetFile(), event.GetId() - MP_ASSIGNCAT ); } ChangeCategory( m_category ); @@ -673,7 +475,7 @@ void CDownloadListCtrl::OnSetCategory( wxCommandEvent& event ) void CDownloadListCtrl::OnSetStatus( wxCommandEvent& event ) { - ItemList files = ::GetSelectedItems( this, itFILES ); + ItemList files = ::GetSelectedItems( this ); for ( ItemList::iterator it = files.begin(); it != files.end(); ++it ) { CPartFile* file = (*it)->GetFile(); @@ -688,7 +490,6 @@ void CDownloadListCtrl::OnSetStatus( wxCommandEvent& event ) break; case MP_STOP: - ShowSources(file, false); CoreNotify_PartFile_Stop( file ); break; } @@ -704,7 +505,7 @@ void CDownloadListCtrl::OnClearCompleted( wxCommandEvent& WXUNUSED(event) ) void CDownloadListCtrl::OnGetLink(wxCommandEvent& event) { - ItemList files = ::GetSelectedItems( this, itFILES ); + ItemList files = ::GetSelectedItems( this ); wxString URIs; @@ -727,7 +528,7 @@ void CDownloadListCtrl::OnGetLink(wxCommandEvent& event) void CDownloadListCtrl::OnGetFeedback(wxCommandEvent& WXUNUSED(event)) { wxString feed; - ItemList files = ::GetSelectedItems(this, itFILES); + ItemList files = ::GetSelectedItems( this ); for (ItemList::iterator it = files.begin(); it != files.end(); ++it) { if (feed.IsEmpty()) { @@ -743,29 +544,12 @@ void CDownloadListCtrl::OnGetFeedback(wxCommandEvent& WXUNUSED(event)) } } - -void CDownloadListCtrl::OnGetRazorStats( wxCommandEvent& WXUNUSED(event) ) -{ - ItemList files = ::GetSelectedItems( this, itFILES ); - - if ( files.size() == 1 ) { - CPartFile* file = files.front()->GetFile(); - - theApp->amuledlg->LaunchUrl( - wxT("http://stats.razorback2.com/ed2khistory?ed2k=") + - file->GetFileHash().Encode()); - } -} - - void CDownloadListCtrl::OnViewFileInfo( wxCommandEvent& WXUNUSED(event) ) { - ItemList files = ::GetSelectedItems( this, itFILES ); + ItemList files = ::GetSelectedItems( this ); if ( files.size() == 1 ) { - CPartFile* file = files.front()->GetFile(); - - CFileDetailDialog dialog( this, file ); + CFileDetailDialog dialog( this, files.front()->GetFile() ); dialog.ShowModal(); } } @@ -773,117 +557,53 @@ void CDownloadListCtrl::OnViewFileInfo( wxCommandEvent& WXUNUSED(event) ) void CDownloadListCtrl::OnViewFileComments( wxCommandEvent& WXUNUSED(event) ) { - ItemList files = ::GetSelectedItems( this, itFILES ); + ItemList files = ::GetSelectedItems( this ); if ( files.size() == 1 ) { - CPartFile* file = files.front()->GetFile(); - - CCommentDialogLst dialog( this, file ); + CCommentDialogLst dialog( this, files.front()->GetFile() ); dialog.ShowModal(); } } - void CDownloadListCtrl::OnPreviewFile( wxCommandEvent& WXUNUSED(event) ) { - ItemList files = ::GetSelectedItems( this, itFILES ); + ItemList files = ::GetSelectedItems( this ); if ( files.size() == 1 ) { PreviewFile(files.front()->GetFile()); } } -void CDownloadListCtrl::OnSwapSource( wxCommandEvent& WXUNUSED(event) ) -{ - ItemList sources = ::GetSelectedItems( this, itSOURCES ); - - for ( ItemList::iterator it = sources.begin(); it != sources.end(); ++it ) { - CPartFile* file = (*it)->GetOwner(); - CUpDownClient* source = (*it)->GetSource(); - - source->SwapToAnotherFile( true, false, false, file ); - } -} - - -void CDownloadListCtrl::OnViewFiles( wxCommandEvent& WXUNUSED(event) ) -{ - ItemList sources = ::GetSelectedItems( this, itSOURCES ); - - if ( sources.size() == 1 ) { - CUpDownClient* source = sources.front()->GetSource(); - - source->RequestSharedFileList(); - } -} - - -void CDownloadListCtrl::OnAddFriend( wxCommandEvent& WXUNUSED(event) ) -{ - ItemList sources = ::GetSelectedItems( this, itSOURCES ); +void CDownloadListCtrl::OnItemActivated( wxListEvent& evt ) +{ + CPartFile* file = ((FileCtrlItem_Struct*)GetItemData( evt.GetIndex()))->GetFile(); - for ( ItemList::iterator it = sources.begin(); it != sources.end(); ++it ) { - CUpDownClient* client = (*it)->GetSource(); - if (client->IsFriend()) { - theApp->amuledlg->m_chatwnd->RemoveFriend(client->GetUserHash(), client->GetIP(), client->GetUserPort()); - } else { - theApp->amuledlg->m_chatwnd->AddFriend( client ); - } - } + if ((!file->IsPartFile() || file->GetStatus() == PS_COMPLETE) && file->PreviewAvailable()) { + PreviewFile( file ); + } } +void CDownloadListCtrl::OnItemSelectionChanged( wxListEvent& evt ) +{ + if (!IsSorting()) { + CKnownFileVector filesVector; + filesVector.reserve(GetSelectedItemCount()); -void CDownloadListCtrl::OnSendMessage( wxCommandEvent& WXUNUSED(event) ) -{ - ItemList sources = ::GetSelectedItems( this, itSOURCES ); - - if ( sources.size() == 1 ) { - CUpDownClient* source = (sources.front())->GetSource(); - - // These values are cached, since calling wxGetTextFromUser will - // start an event-loop, in which the client may be deleted. - wxString userName = source->GetUserName(); - uint64 userID = GUI_ID(source->GetIP(), source->GetUserPort()); + long index = GetNextItem( -1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED ); - wxString message = ::wxGetTextFromUser(_("Send message to user"), - _("Message to send:")); - if ( !message.IsEmpty() ) { - theApp->amuledlg->m_chatwnd->SendMessage(message, userName, userID); - } - } -} - - -void CDownloadListCtrl::OnViewClientInfo( wxCommandEvent& WXUNUSED(event) ) -{ - ItemList sources = ::GetSelectedItems( this, itSOURCES ); - - if ( sources.size() == 1 ) { - CUpDownClient* source = (sources.front())->GetSource(); - - CClientDetailDialog dialog( this, source ); - dialog.ShowModal(); - } -} - - -void CDownloadListCtrl::OnItemActivated( wxListEvent& evt ) -{ - CtrlItem_Struct* content = (CtrlItem_Struct*)GetItemData( evt.GetIndex() ); - - if ( content->GetType() == FILE_TYPE ) { - CPartFile* file = content->GetFile(); - - if ((!file->IsPartFile() || file->GetStatus() == PS_COMPLETE) && file->PreviewAvailable()) { - PreviewFile( file ); - } else { - ShowSources( file, !file->ShowSources() ); + while ( index > -1 ) { + CPartFile* file = ((FileCtrlItem_Struct*)GetItemData( index ))->GetFile(); + if (file->IsPartFile()) { + filesVector.push_back(file); + } + index = GetNextItem( index, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED ); } + std::sort(filesVector.begin(), filesVector.end()); + theApp->amuledlg->m_transferwnd->clientlistctrl->ShowSources(filesVector); } } - void CDownloadListCtrl::OnMouseRightClick(wxListEvent& evt) { long index = CheckSelection(evt); @@ -894,156 +614,125 @@ void CDownloadListCtrl::OnMouseRightClick(wxListEvent& evt) delete m_menu; m_menu = NULL; - CtrlItem_Struct* item = (CtrlItem_Struct*)GetItemData( index ); - if (item->GetType() == FILE_TYPE) { - m_menu = new wxMenu( _("Downloads") ); - - wxMenu* priomenu = new wxMenu(); - priomenu->AppendCheckItem(MP_PRIOLOW, _("Low")); - priomenu->AppendCheckItem(MP_PRIONORMAL, _("Normal")); - priomenu->AppendCheckItem(MP_PRIOHIGH, _("High")); - priomenu->AppendCheckItem(MP_PRIOAUTO, _("Auto")); - - m_menu->Append(MP_MENU_PRIO, _("Priority"), priomenu); - m_menu->Append(MP_CANCEL, _("Cancel")); - m_menu->Append(MP_STOP, _("&Stop")); - m_menu->Append(MP_PAUSE, _("&Pause")); - m_menu->Append(MP_RESUME, _("&Resume")); - m_menu->Append(MP_CLEARCOMPLETED, _("C&lear completed")); - //----------------------------------------------------- - m_menu->AppendSeparator(); - //----------------------------------------------------- - wxMenu* extendedmenu = new wxMenu(); - extendedmenu->Append(MP_SWAP_A4AF_TO_THIS, - _("Swap every A4AF to this file now")); - extendedmenu->AppendCheckItem(MP_SWAP_A4AF_TO_THIS_AUTO, - _("Swap every A4AF to this file (Auto)")); - //----------------------------------------------------- - extendedmenu->AppendSeparator(); - //----------------------------------------------------- - extendedmenu->Append(MP_SWAP_A4AF_TO_ANY_OTHER, - _("Swap every A4AF to any other file now")); - //----------------------------------------------------- - m_menu->Append(MP_MENU_EXTD, - _("Extended Options"), extendedmenu); - //----------------------------------------------------- - m_menu->AppendSeparator(); - //----------------------------------------------------- -/* Commented out till RB2 is back - m_menu->Append( MP_RAZORSTATS, - _("Get Razorback 2's stats for this file")); - //----------------------------------------------------- - m_menu->AppendSeparator(); - //----------------------------------------------------- -*/ - m_menu->Append(MP_VIEW, _("Preview")); - m_menu->Append(MP_METINFO, _("Show file &details")); - m_menu->Append(MP_VIEWFILECOMMENTS, - _("Show all comments")); - //----------------------------------------------------- - m_menu->AppendSeparator(); - //----------------------------------------------------- - m_menu->Append(MP_GETMAGNETLINK, - _("Copy magnet URI to clipboard")); - m_menu->Append(MP_GETED2KLINK, - _("Copy eD2k &link to clipboard")); - m_menu->Append(MP_WS, - _("Copy feedback to clipboard")); - //----------------------------------------------------- - m_menu->AppendSeparator(); - //----------------------------------------------------- - // Add dinamic entries - wxMenu *cats = new wxMenu(_("Category")); - if (theApp->glob_prefs->GetCatCount() > 1) { - for (uint32 i = 0; i < theApp->glob_prefs->GetCatCount(); i++) { - if ( i == 0 ) { - cats->Append( MP_ASSIGNCAT, _("unassign") ); - } else { - cats->Append( MP_ASSIGNCAT + i, - theApp->glob_prefs->GetCategory(i)->title ); - } + FileCtrlItem_Struct* item = (FileCtrlItem_Struct*)GetItemData( index ); + m_menu = new wxMenu( _("Downloads") ); + + wxMenu* priomenu = new wxMenu(); + priomenu->AppendCheckItem(MP_PRIOLOW, _("Low")); + priomenu->AppendCheckItem(MP_PRIONORMAL, _("Normal")); + priomenu->AppendCheckItem(MP_PRIOHIGH, _("High")); + priomenu->AppendCheckItem(MP_PRIOAUTO, _("Auto")); + + m_menu->Append(MP_MENU_PRIO, _("Priority"), priomenu); + m_menu->Append(MP_CANCEL, _("Cancel")); + m_menu->Append(MP_STOP, _("&Stop")); + m_menu->Append(MP_PAUSE, _("&Pause")); + m_menu->Append(MP_RESUME, _("&Resume")); + m_menu->Append(MP_CLEARCOMPLETED, _("C&lear completed")); + //----------------------------------------------------- + m_menu->AppendSeparator(); + //----------------------------------------------------- + wxMenu* extendedmenu = new wxMenu(); + extendedmenu->Append(MP_SWAP_A4AF_TO_THIS, + _("Swap every A4AF to this file now")); + extendedmenu->AppendCheckItem(MP_SWAP_A4AF_TO_THIS_AUTO, + _("Swap every A4AF to this file (Auto)")); + //----------------------------------------------------- + extendedmenu->AppendSeparator(); + //----------------------------------------------------- + extendedmenu->Append(MP_SWAP_A4AF_TO_ANY_OTHER, + _("Swap every A4AF to any other file now")); + //----------------------------------------------------- + m_menu->Append(MP_MENU_EXTD, + _("Extended Options"), extendedmenu); + //----------------------------------------------------- + m_menu->AppendSeparator(); + //----------------------------------------------------- + + m_menu->Append(MP_VIEW, _("Preview")); + m_menu->Append(MP_METINFO, _("Show file &details")); + m_menu->Append(MP_VIEWFILECOMMENTS, + _("Show all comments")); + //----------------------------------------------------- + m_menu->AppendSeparator(); + //----------------------------------------------------- + m_menu->Append(MP_GETMAGNETLINK, + _("Copy magnet URI to clipboard")); + m_menu->Append(MP_GETED2KLINK, + _("Copy eD2k &link to clipboard")); + m_menu->Append(MP_WS, + _("Copy feedback to clipboard")); + //----------------------------------------------------- + m_menu->AppendSeparator(); + //----------------------------------------------------- + // Add dinamic entries + wxMenu *cats = new wxMenu(_("Category")); + if (theApp->glob_prefs->GetCatCount() > 1) { + for (uint32 i = 0; i < theApp->glob_prefs->GetCatCount(); i++) { + if ( i == 0 ) { + cats->Append( MP_ASSIGNCAT, _("unassign") ); + } else { + cats->Append( MP_ASSIGNCAT + i, + theApp->glob_prefs->GetCategory(i)->title ); } } - m_menu->Append(MP_MENU_CATS, _("Assign to category"), cats); - m_menu->Enable(MP_MENU_CATS, (theApp->glob_prefs->GetCatCount() > 1) ); - - CPartFile* file = item->GetFile(); - // then set state - bool canStop; - bool canPause; - bool canCancel; - bool fileResumable; - if (file->GetStatus(true) != PS_ALLOCATING) { - const uint8_t fileStatus = file->GetStatus(); - canStop = - (fileStatus != PS_ERROR) && - (fileStatus != PS_COMPLETE) && - (file->IsStopped() != true); - canPause = (file->GetStatus() != PS_PAUSED) && canStop; - fileResumable = - (fileStatus == PS_PAUSED) || - (fileStatus == PS_ERROR) || - (fileStatus == PS_INSUFFICIENT); - canCancel = fileStatus != PS_COMPLETE; - } else { - canStop = canPause = canCancel = fileResumable = false; - } + } + m_menu->Append(MP_MENU_CATS, _("Assign to category"), cats); + m_menu->Enable(MP_MENU_CATS, (theApp->glob_prefs->GetCatCount() > 1) ); + + CPartFile* file = item->GetFile(); + // then set state + bool canStop; + bool canPause; + bool canCancel; + bool fileResumable; + if (file->GetStatus(true) != PS_ALLOCATING) { + const uint8_t fileStatus = file->GetStatus(); + canStop = + (fileStatus != PS_ERROR) && + (fileStatus != PS_COMPLETE) && + (file->IsStopped() != true); + canPause = (file->GetStatus() != PS_PAUSED) && canStop; + fileResumable = + (fileStatus == PS_PAUSED) || + (fileStatus == PS_ERROR) || + (fileStatus == PS_INSUFFICIENT); + canCancel = fileStatus != PS_COMPLETE; + } else { + canStop = canPause = canCancel = fileResumable = false; + } - wxMenu* menu = m_menu; - menu->Enable( MP_CANCEL, canCancel ); - menu->Enable( MP_PAUSE, canPause ); - menu->Enable( MP_STOP, canStop ); - menu->Enable( MP_RESUME, fileResumable ); - menu->Enable( MP_CLEARCOMPLETED, m_completedFiles ); - - wxString view; - if (file->IsPartFile() && (file->GetStatus() != PS_COMPLETE)) { - view = CFormat(wxT("%s [%s]")) % _("Preview") - % file->GetPartMetFileName().RemoveExt(); - } else if ( file->GetStatus() == PS_COMPLETE ) { - view = _("&Open the file"); - } - menu->SetLabel(MP_VIEW, view); - menu->Enable(MP_VIEW, file->PreviewAvailable() ); + wxMenu* menu = m_menu; + menu->Enable( MP_CANCEL, canCancel ); + menu->Enable( MP_PAUSE, canPause ); + menu->Enable( MP_STOP, canStop ); + menu->Enable( MP_RESUME, fileResumable ); + menu->Enable( MP_CLEARCOMPLETED, m_completedFiles ); - menu->Check( MP_SWAP_A4AF_TO_THIS_AUTO, file->IsA4AFAuto() ); + wxString view; + if (file->IsPartFile() && (file->GetStatus() != PS_COMPLETE)) { + view = CFormat(wxT("%s [%s]")) % _("Preview") + % file->GetPartMetFileName().RemoveExt(); + } else if ( file->GetStatus() == PS_COMPLETE ) { + view = _("&Open the file"); + } + menu->SetLabel(MP_VIEW, view); + menu->Enable(MP_VIEW, file->PreviewAvailable() ); - int priority = file->IsAutoDownPriority() ? - PR_AUTO : file->GetDownPriority(); - - priomenu->Check( MP_PRIOHIGH, priority == PR_HIGH ); - priomenu->Check( MP_PRIONORMAL, priority == PR_NORMAL ); - priomenu->Check( MP_PRIOLOW, priority == PR_LOW ); - priomenu->Check( MP_PRIOAUTO, priority == PR_AUTO ); + menu->Check( MP_SWAP_A4AF_TO_THIS_AUTO, file->IsA4AFAuto() ); - menu->Enable( MP_MENU_EXTD, canPause ); + int priority = file->IsAutoDownPriority() ? PR_AUTO : file->GetDownPriority(); - PopupMenu(m_menu, evt.GetPoint()); + priomenu->Check( MP_PRIOHIGH, priority == PR_HIGH ); + priomenu->Check( MP_PRIONORMAL, priority == PR_NORMAL ); + priomenu->Check( MP_PRIOLOW, priority == PR_LOW ); + priomenu->Check( MP_PRIOAUTO, priority == PR_AUTO ); - } else { - CUpDownClient* client = item->GetSource(); - - m_menu = new wxMenu(wxT("Clients")); - m_menu->Append(MP_DETAIL, _("Show &Details")); - m_menu->Append(MP_ADDFRIEND, client->IsFriend() ? _("Remove from friends") : _("Add to Friends")); - m_menu->Append(MP_SHOWLIST, _("View Files")); - m_menu->Append(MP_SENDMESSAGE, _("Send message")); - m_menu->Append(MP_CHANGE2FILE, _("Swap to this file")); - - // Only enable the Swap option for A4AF sources - m_menu->Enable(MP_CHANGE2FILE, (item->GetType() == A4AF_SOURCE)); - // We need a valid IP if we are to message the client - m_menu->Enable(MP_SENDMESSAGE, (client->GetIP() != 0)); - - m_menu->Enable(MP_SHOWLIST, !client->HasDisabledSharedFiles()); - - PopupMenu(m_menu, evt.GetPoint()); - - } - + menu->Enable( MP_MENU_EXTD, canPause ); + + PopupMenu(m_menu, evt.GetPoint()); delete m_menu; m_menu = NULL; - } @@ -1055,13 +744,7 @@ void CDownloadListCtrl::OnMouseMiddleClick(wxListEvent& evt) return; } - CtrlItem_Struct* item = (CtrlItem_Struct*)GetItemData( index ); - - if ( item->GetType() == FILE_TYPE ) { - CFileDetailDialog(this, item->GetFile()).ShowModal(); - } else { - CClientDetailDialog(this, item->GetSource()).ShowModal(); - } + CFileDetailDialog(this, ((FileCtrlItem_Struct*)GetItemData( index ))->GetFile()).ShowModal(); } @@ -1076,7 +759,7 @@ void CDownloadListCtrl::OnKeyPressed( wxKeyEvent& event ) break; } case WXK_F2: { - ItemList files = ::GetSelectedItems( this, itFILES ); + ItemList files = ::GetSelectedItems( this ); if (files.size() == 1) { CPartFile* file = files.front()->GetFile(); @@ -1108,50 +791,37 @@ void CDownloadListCtrl::OnDrawItem( return; } - CtrlItem_Struct* content = (CtrlItem_Struct *)GetItemData(item); + FileCtrlItem_Struct* content = (FileCtrlItem_Struct *)GetItemData(item); // Define text-color and background - if ((content->GetType() == FILE_TYPE) && (highlighted)) { + // and the border of the drawn area + if (highlighted) { + CMuleColour colour; if (GetFocus()) { dc->SetBackground(m_hilightBrush); - dc->SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT)); + colour = m_hilightBrush.GetColour(); } else { dc->SetBackground(m_hilightUnfocusBrush); - dc->SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT)); - } - } else { - dc->SetBackground(*(wxTheBrushList->FindOrCreateBrush( - wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOX), wxSOLID))); - dc->SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT)); - } - - - // Define the border of the drawn area - if ( highlighted ) { - CMuleColour colour; - if ( ( content->GetType() == FILE_TYPE ) && !GetFocus() ) { colour = m_hilightUnfocusBrush.GetColour(); - } else { - colour = m_hilightBrush.GetColour(); } - + dc->SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT)); dc->SetPen( colour.Blend(65).GetPen() ); } else { + dc->SetBackground(*(wxTheBrushList->FindOrCreateBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOX), wxSOLID))); + dc->SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT)); dc->SetPen(*wxTRANSPARENT_PEN); } - - dc->SetBrush( dc->GetBackground() ); + dc->DrawRectangle( rectHL.x, rectHL.y, rectHL.width, rectHL.height ); dc->SetPen(*wxTRANSPARENT_PEN); - if ( content->GetType() == FILE_TYPE && ( !highlighted || !GetFocus() ) ) { + if (!highlighted || !GetFocus() ) { // If we have category, override textforeground with what category tells us. CPartFile *file = content->GetFile(); if ( file->GetCategory() ) { - dc->SetTextForeground( - CMuleColour(theApp->glob_prefs->GetCatColor(file->GetCategory())) ); + dc->SetTextForeground(CMuleColour(theApp->glob_prefs->GetCatColor(file->GetCategory())) ); } } @@ -1159,11 +829,6 @@ void CDownloadListCtrl::OnDrawItem( const int iTextOffset = ( rect.GetHeight() - dc->GetCharHeight() ) / 2; const int iOffset = 4; - // The starting end ending position of the tree - bool tree_show = false; - int tree_start = 0; - int tree_end = 0; - wxRect cur_rec( iOffset, rect.y, 0, rect.height ); for (int i = 0; i < GetColumnCount(); i++) { wxListItem listitem; @@ -1175,11 +840,6 @@ void CDownloadListCtrl::OnDrawItem( // Make a copy of the current rectangle so we can apply specific tweaks wxRect target_rec = cur_rec; if ( i == ColumnProgress ) { - tree_show = ( listitem.GetWidth() > 0 ); - - tree_start = cur_rec.x - iOffset; - tree_end = cur_rec.x + iOffset; - // Double the offset to make room for the cirle-marker target_rec.x += iOffset; target_rec.width -= iOffset; @@ -1189,66 +849,16 @@ void CDownloadListCtrl::OnDrawItem( } // Draw the item - if ( content->GetType() == FILE_TYPE ) { - DrawFileItem(dc, i, target_rec, content); - } else { - DrawSourceItem(dc, i, target_rec, content); - } + DrawFileItem(dc, i, target_rec, content); } // Increment to the next column cur_rec.x += listitem.GetWidth(); } - - // Draw tree last so it draws over selected and focus (looks better) - if ( tree_show ) { - // Gather some information - const bool notLast = item + 1 != GetItemCount(); - const bool notFirst = item != 0; - const bool hasNext = notLast && - ((CtrlItem_Struct*)GetItemData(item + 1))->GetType() != FILE_TYPE; - const bool isOpenRoot = content->GetType() == FILE_TYPE && - (content->GetFile())->ShowSources() && - ((content->GetFile())->GetStatus() != PS_COMPLETE); - const bool isChild = content->GetType() != FILE_TYPE; - - // Might as well calculate these now - const int treeCenter = tree_start + 3; - const int middle = cur_rec.y + ( cur_rec.height + 1 ) / 2; - - // Set up a new pen for drawing the tree - dc->SetPen( *(wxThePenList->FindOrCreatePen(dc->GetTextForeground(), 1, wxSOLID)) ); - - if (isChild) { - // Draw the line to the status bar - dc->DrawLine(tree_end, middle, tree_start + 3, middle); - - // Draw the line to the child node - if (hasNext) { - dc->DrawLine(treeCenter, middle, treeCenter, cur_rec.y + cur_rec.height + 1); - } - - // Draw the line back up to parent node - if (notFirst) { - dc->DrawLine(treeCenter, middle, treeCenter, cur_rec.y - 1); - } - } else if ( isOpenRoot ) { - // Draw empty circle - dc->SetBrush(*wxTRANSPARENT_BRUSH); - - dc->DrawCircle( treeCenter, middle, 3 ); - - // Draw the line to the child node if there are any children - if (hasNext) { - dc->DrawLine(treeCenter, middle + 3, treeCenter, cur_rec.y + cur_rec.height + 1); - } - } - - } } -void CDownloadListCtrl::DrawFileItem( wxDC* dc, int nColumn, const wxRect& rect, CtrlItem_Struct* item ) const +void CDownloadListCtrl::DrawFileItem( wxDC* dc, int nColumn, const wxRect& rect, FileCtrlItem_Struct* item ) const { wxDCClipper clipper( *dc, rect.GetX(), rect.GetY(), rect.GetWidth(), rect.GetHeight() ); @@ -1258,577 +868,219 @@ void CDownloadListCtrl::DrawFileItem( wxDC* dc, int nColumn, const wxRect& rect, wxString text; switch (nColumn) { - // Part Number - case ColumnPart: { - wxString partno; - - - if (file->IsPartFile() && !(file->GetStatus() == PS_COMPLETE)) { - partno = CFormat(wxT("%s")) % file->GetPartMetFileName().RemoveAllExt(); - } - dc->DrawText(partno, rect.GetX(), rect.GetY()); - } - break; - // Filename - case ColumnFileName: { - wxString filename = file->GetFileName().GetPrintable(); - - if (file->HasRating() || file->HasComment()) { - int image = Client_CommentOnly_Smiley; - if (file->HasRating()) { - image = Client_InvalidRating_Smiley + file->UserRating() - 1; - } - - wxASSERT(image >= Client_InvalidRating_Smiley); - wxASSERT(image <= Client_CommentOnly_Smiley); - - int imgWidth = 16; - - // it's already centered by OnDrawItem() ... - m_ImageList.Draw(image, *dc, rect.GetX(), rect.GetY() - 1, - wxIMAGELIST_DRAW_TRANSPARENT); - dc->DrawText(filename, rect.GetX() + imgWidth + 4, rect.GetY()); - } else { - dc->DrawText(filename, rect.GetX(), rect.GetY()); + // Part Number + case ColumnPart: { + if (file->IsPartFile() && !(file->GetStatus() == PS_COMPLETE)) { + text = file->GetPartMetFileName().RemoveAllExt().GetPrintable(); + } + break; } - } - break; - - // Filesize - case ColumnSize: - text = CastItoXBytes( file->GetFileSize() ); - break; - - // Transferred - case ColumnTransferred: - text = CastItoXBytes( file->GetTransferred() ); - break; - - // Completed - case ColumnCompleted: - text = CastItoXBytes( file->GetCompletedSize() ); - break; + // Filename + case ColumnFileName: { + wxString filename = file->GetFileName().GetPrintable(); - // Speed - case ColumnSpeed: - if ( file->GetTransferingSrcCount() ) { - text = wxString::Format( wxT("%.1f "), file->GetKBpsDown() ) + - _("kB/s"); - } - break; - - // Progress - case ColumnProgress: - { - if (thePrefs::ShowProgBar()) - { - int iWidth = rect.GetWidth() - 2; - int iHeight = rect.GetHeight() - 2; - - // DO NOT DRAW IT ALL THE TIME - uint32 dwTicks = GetTickCount(); - - wxMemoryDC cdcStatus; - - if ( item->dwUpdated < dwTicks || !item->status || iWidth != item->status->GetWidth() ) { - if ( item->status == NULL) { - item->status = new wxBitmap(iWidth, iHeight); - } else if ( item->status->GetWidth() != iWidth ) { - // Only recreate if the size has changed - item->status->Create(iWidth, iHeight); - } - - cdcStatus.SelectObject( *item->status ); + if (file->HasRating() || file->HasComment()) { + int image = Client_CommentOnly_Smiley; + if (file->HasRating()) { + image = Client_InvalidRating_Smiley + file->UserRating() - 1; + } + + wxASSERT(image >= Client_InvalidRating_Smiley); + wxASSERT(image <= Client_CommentOnly_Smiley); - if ( thePrefs::UseFlatBar() ) { - DrawFileStatusBar( file, &cdcStatus, - wxRect(0, 0, iWidth, iHeight), true); - } else { - DrawFileStatusBar( file, &cdcStatus, - wxRect(1, 1, iWidth - 2, iHeight - 2), false); - - // Draw black border - cdcStatus.SetPen( *wxBLACK_PEN ); - cdcStatus.SetBrush( *wxTRANSPARENT_BRUSH ); - cdcStatus.DrawRectangle( 0, 0, iWidth, iHeight ); - } - - item->dwUpdated = dwTicks + 5000; // Plus five seconds + int imgWidth = 16; + + // it's already centered by OnDrawItem() ... + m_ImageList.Draw(image, *dc, rect.GetX(), rect.GetY() - 1, + wxIMAGELIST_DRAW_TRANSPARENT); + dc->DrawText(filename, rect.GetX() + imgWidth + 4, rect.GetY()); } else { - cdcStatus.SelectObject( *item->status ); + dc->DrawText(filename, rect.GetX(), rect.GetY()); } - - dc->Blit( rect.GetX(), rect.GetY() + 1, iWidth, iHeight, &cdcStatus, 0, 0); + break; } - if (thePrefs::ShowPercent()) { - // Percentage of completing - // We strip anything below the first decimal point, - // to avoid Format doing roundings - float percent = floor( file->GetPercentCompleted() * 10.0f ) / 10.0f; - - wxString buffer = wxString::Format( wxT("%.1f%%"), percent ); - int middlex = (2*rect.GetX() + rect.GetWidth()) >> 1; - int middley = (2*rect.GetY() + rect.GetHeight()) >> 1; - - wxCoord textwidth, textheight; - - dc->GetTextExtent(buffer, &textwidth, &textheight); - wxColour AktColor = dc->GetTextForeground(); - if (thePrefs::ShowProgBar()) { - dc->SetTextForeground(*wxWHITE); - } else { - dc->SetTextForeground(*wxBLACK); - } - dc->DrawText(buffer, middlex - (textwidth >> 1), middley - (textheight >> 1)); - dc->SetTextForeground(AktColor); - } - } - break; - - // Sources - case ColumnSources: { - uint16 sc = file->GetSourceCount(); - uint16 ncsc = file->GetNotCurrentSourcesCount(); - if ( ncsc ) { - text = wxString::Format( wxT("%i/%i" ), sc - ncsc, sc ); - } else { - text = wxString::Format( wxT("%i"), sc ); - } - - if ( file->GetSrcA4AFCount() ) { - text += wxString::Format( wxT("+%i"), file->GetSrcA4AFCount() ); - } - - if ( file->GetTransferingSrcCount() ) { - text += wxString::Format( wxT(" (%i)"), file->GetTransferingSrcCount() ); - } - - break; - } - - // Priority - case ColumnPriority: - text = PriorityToStr( file->GetDownPriority(), file->IsAutoDownPriority() ); - break; - - // File-status - case ColumnStatus: - text = file->getPartfileStatus(); - break; + // Filesize + case ColumnSize: + text = CastItoXBytes( file->GetFileSize() ); + break; - // Remaining - case ColumnTimeRemaining: { - if ((file->GetStatus() != PS_COMPLETING) && file->IsPartFile()) { - uint64 remainSize = file->GetFileSize() - file->GetCompletedSize(); - sint32 remainTime = file->getTimeRemaining(); - - if (remainTime >= 0) { - text = CastSecondsToHM(remainTime); - } else { - text = _("Unknown"); + // Transferred + case ColumnTransferred: + text = CastItoXBytes( file->GetTransferred() ); + break; + + // Completed + case ColumnCompleted: + text = CastItoXBytes( file->GetCompletedSize() ); + break; + + // Speed + case ColumnSpeed: + if ( file->GetTransferingSrcCount() ) { + text = wxString::Format( wxT("%.1f "), file->GetKBpsDown() ) + + _("kB/s"); } - - text += wxT(" (") + CastItoXBytes(remainSize) + wxT(")"); - } - break; - } - - // Last seen completed - case ColumnLastSeenComplete: { - if ( file->lastseencomplete ) { - text = wxDateTime( file->lastseencomplete ).Format( _("%y/%m/%d %H:%M:%S") ); - } else { - text = _("Unknown"); - } - break; - } + break; - // Last received - case ColumnLastReception: { - const time_t lastReceived = file->GetLastChangeDatetime(); - if (lastReceived) { - text = wxDateTime(lastReceived).Format( _("%y/%m/%d %H:%M:%S") ); - } else { - text = _("Unknown"); - } - } - } // switch - - if ( !text.IsEmpty() ) { - dc->DrawText( text, rect.GetX(), rect.GetY() ); - } -} - - -void CDownloadListCtrl::DrawSourceItem( - wxDC* dc, int nColumn, const wxRect& rect, CtrlItem_Struct* item ) const -{ - wxDCClipper clipper( *dc, rect.GetX(), rect.GetY(), rect.GetWidth(), rect.GetHeight() ); - wxString buffer; + // Progress + case ColumnProgress:{ + if (thePrefs::ShowProgBar()) { + int iWidth = rect.GetWidth() - 2; + int iHeight = rect.GetHeight() - 2; - const CUpDownClient* client = item->GetSource(); - - switch (nColumn) { - // Client name + various icons - case ColumnFileName: { - wxRect cur_rec = rect; - // +3 is added by OnDrawItem()... so take it off - // Kry - eMule says +1, so I'm trusting it - wxPoint point( cur_rec.GetX(), cur_rec.GetY()+1 ); - - if (item->GetType() != A4AF_SOURCE) { - uint8 image = 0; + // DO NOT DRAW IT ALL THE TIME + uint32 dwTicks = GetTickCount(); - switch (client->GetDownloadState()) { - case DS_CONNECTING: - case DS_CONNECTED: - case DS_WAITCALLBACK: - case DS_TOOMANYCONNS: - image = Client_Red_Smiley; - break; - case DS_ONQUEUE: - if (client->IsRemoteQueueFull()) { - image = Client_Grey_Smiley; - } else { - image = Client_Yellow_Smiley; - } - break; - case DS_DOWNLOADING: - case DS_REQHASHSET: - image = Client_Green_Smiley; - break; - case DS_NONEEDEDPARTS: - case DS_LOWTOLOWIP: - image = Client_Grey_Smiley; - break; - default: // DS_NONE i.e. - image = Client_White_Smiley; + wxMemoryDC cdcStatus; + + if ( item->dwUpdated < dwTicks || !item->status || iWidth != item->status->GetWidth() ) { + if ( item->status == NULL) { + item->status = new wxBitmap(iWidth, iHeight); + } else if ( item->status->GetWidth() != iWidth ) { + // Only recreate if the size has changed + item->status->Create(iWidth, iHeight); + } + + cdcStatus.SelectObject( *item->status ); + + if ( thePrefs::UseFlatBar() ) { + DrawFileStatusBar( file, &cdcStatus, + wxRect(0, 0, iWidth, iHeight), true); + } else { + DrawFileStatusBar( file, &cdcStatus, + wxRect(1, 1, iWidth - 2, iHeight - 2), false); + + // Draw black border + cdcStatus.SetPen( *wxBLACK_PEN ); + cdcStatus.SetBrush( *wxTRANSPARENT_BRUSH ); + cdcStatus.DrawRectangle( 0, 0, iWidth, iHeight ); } - - m_ImageList.Draw(image, *dc, point.x, point.y, - wxIMAGELIST_DRAW_TRANSPARENT); - } else { - m_ImageList.Draw(Client_Grey_Smiley, *dc, point.x, point.y, - wxIMAGELIST_DRAW_TRANSPARENT); - } - - cur_rec.x += 20; - wxPoint point2( cur_rec.GetX(), cur_rec.GetY() + 1 ); - - uint8 clientImage; - if ( client->IsFriend() ) { - clientImage = Client_Friend_Smiley; + item->dwUpdated = dwTicks + 5000; // Plus five seconds } else { - switch ( client->GetClientSoft() ) { - case SO_AMULE: - clientImage = Client_aMule_Smiley; - break; - case SO_MLDONKEY: - case SO_NEW_MLDONKEY: - case SO_NEW2_MLDONKEY: - clientImage = Client_mlDonkey_Smiley; - break; - case SO_EDONKEY: - case SO_EDONKEYHYBRID: - clientImage = Client_eDonkeyHybrid_Smiley; - break; - case SO_EMULE: - clientImage = Client_eMule_Smiley; - break; - case SO_LPHANT: - clientImage = Client_lphant_Smiley; - break; - case SO_SHAREAZA: - case SO_NEW_SHAREAZA: - case SO_NEW2_SHAREAZA: - clientImage = Client_Shareaza_Smiley; - break; - case SO_LXMULE: - clientImage = Client_xMule_Smiley; - break; - default: - // cDonkey, Compatible, Unknown - // No icon for those yet. - // Using the eMule one + '?' - clientImage = Client_Unknown; - break; - } + cdcStatus.SelectObject( *item->status ); } - - m_ImageList.Draw(clientImage, *dc, point2.x, point.y, - wxIMAGELIST_DRAW_TRANSPARENT); - - if (client->GetScoreRatio() > 1) { - // Has credits, draw the gold star - m_ImageList.Draw(Client_CreditsYellow_Smiley, *dc, point2.x, point.y, - wxIMAGELIST_DRAW_TRANSPARENT ); - } else if ( client->ExtProtocolAvailable() ) { - // Ext protocol -> Draw the '+' - m_ImageList.Draw(Client_ExtendedProtocol_Smiley, *dc, point2.x, point.y, - wxIMAGELIST_DRAW_TRANSPARENT); - } - - if (client->IsIdentified()) { - // the 'v' - m_ImageList.Draw(Client_SecIdent_Smiley, *dc, point2.x, point.y, - wxIMAGELIST_DRAW_TRANSPARENT); - } else if (client->IsBadGuy()) { - // the 'X' - m_ImageList.Draw(Client_BadGuy_Smiley, *dc, point2.x, point.y, - wxIMAGELIST_DRAW_TRANSPARENT); - } - - if (client->HasObfuscatedConnectionBeenEstablished()) { - // the "¿" except it's a key - m_ImageList.Draw(Client_Encryption_Smiley, *dc, point2.x, point.y, - wxIMAGELIST_DRAW_TRANSPARENT); - } - wxString userName; -#ifdef ENABLE_IP2COUNTRY - // Draw the flag - const CountryData& countrydata = theApp->amuledlg->m_IP2Country->GetCountryData(client->GetFullIP()); - dc->DrawBitmap(countrydata.Flag, - rect.x + 40, rect.y + 5, - wxIMAGELIST_DRAW_TRANSPARENT); + dc->Blit( rect.GetX(), rect.GetY() + 1, iWidth, iHeight, &cdcStatus, 0, 0); - userName << countrydata.Name; + if (thePrefs::ShowPercent()) { + // Percentage of completing + // We strip anything below the first decimal point, + // to avoid Format doing roundings + float percent = floor( file->GetPercentCompleted() * 10.0f ) / 10.0f; - userName << wxT(" - "); -#endif // ENABLE_IP2COUNTRY - if (client->GetUserName().IsEmpty()) { - userName << wxT("?"); - } else { - userName << client->GetUserName(); + wxString buffer = wxString::Format( wxT("%.1f%%"), percent ); + int middlex = (2*rect.GetX() + rect.GetWidth()) >> 1; + int middley = (2*rect.GetY() + rect.GetHeight()) >> 1; + + wxCoord textwidth, textheight; + + dc->GetTextExtent(buffer, &textwidth, &textheight); + wxColour AktColor = dc->GetTextForeground(); + if (thePrefs::ShowProgBar()) { + dc->SetTextForeground(*wxWHITE); + } else { + dc->SetTextForeground(*wxBLACK); + } + dc->DrawText(buffer, middlex - (textwidth >> 1), middley - (textheight >> 1)); + dc->SetTextForeground(AktColor); } - dc->DrawText(userName, rect.GetX() + 60, rect.GetY()); } - break; - case ColumnCompleted: // completed - if (item->GetType() != A4AF_SOURCE && client->GetTransferredDown()) { - buffer = CastItoXBytes(client->GetTransferredDown()); - dc->DrawText(buffer, rect.GetX(), rect.GetY()); - } break; + } - case ColumnSpeed: // speed - if (item->GetType() != A4AF_SOURCE && client->GetKBpsDown() > 0.001) { - buffer = wxString::Format(wxT("%.1f "), - client->GetKBpsDown()) + _("kB/s"); - dc->DrawText(buffer, rect.GetX(), rect.GetY()); + // Sources + case ColumnSources: { + uint16 sc = file->GetSourceCount(); + uint16 ncsc = file->GetNotCurrentSourcesCount(); + if ( ncsc ) { + text = wxString::Format( wxT("%i/%i" ), sc - ncsc, sc ); + } else { + text = wxString::Format( wxT("%i"), sc ); + } + + if ( file->GetSrcA4AFCount() ) { + text += wxString::Format( wxT("+%i"), file->GetSrcA4AFCount() ); + } + + if ( file->GetTransferingSrcCount() ) { + text += wxString::Format( wxT(" (%i)"), file->GetTransferingSrcCount() ); } + + break; + } + + // Priority + case ColumnPriority: + text = PriorityToStr( file->GetDownPriority(), file->IsAutoDownPriority() ); break; - - case ColumnProgress: // file info - if ( thePrefs::ShowProgBar() ) { - int iWidth = rect.GetWidth() - 2; - int iHeight = rect.GetHeight() - 2; - - // don't draw Text beyond the bar - dc->SetClippingRegion(rect.GetX(), rect.GetY() + 1, iWidth, iHeight); - - if ( item->GetType() != A4AF_SOURCE ) { - uint32 dwTicks = GetTickCount(); - - wxMemoryDC cdcStatus; - - if ( item->dwUpdated < dwTicks || !item->status || - iWidth != item->status->GetWidth() ) { - - if (item->status == NULL) { - item->status = new wxBitmap(iWidth, iHeight); - } else if ( item->status->GetWidth() != iWidth ) { - // Only recreate if size has changed - item->status->Create(iWidth, iHeight); - } - - cdcStatus.SelectObject(*(item->status)); - - if ( thePrefs::UseFlatBar() ) { - DrawSourceStatusBar( client, &cdcStatus, - wxRect(0, 0, iWidth, iHeight), true); - } else { - DrawSourceStatusBar( client, &cdcStatus, - wxRect(1, 1, iWidth - 2, iHeight - 2), false); - // Draw black border - cdcStatus.SetPen( *wxBLACK_PEN ); - cdcStatus.SetBrush( *wxTRANSPARENT_BRUSH ); - cdcStatus.DrawRectangle( 0, 0, iWidth, iHeight ); - } - - // Plus ten seconds - item->dwUpdated = dwTicks + 10000; - } else { - cdcStatus.SelectObject(*(item->status)); - } - - dc->Blit(rect.GetX(), rect.GetY() + 1, iWidth, iHeight, &cdcStatus, 0, 0); - } else { - wxString a4af; - CPartFile* p = client->GetRequestFile(); - if (p) { - a4af = p->GetFileName().GetPrintable(); - } else { - a4af = wxT("?"); - } - buffer = CFormat(wxT("%s: %s")) % _("A4AF") % a4af; - - int midx = (2*rect.GetX() + rect.GetWidth()) >> 1; - int midy = (2*rect.GetY() + rect.GetHeight()) >> 1; - - wxCoord txtwidth, txtheight; - - dc->GetTextExtent(buffer, &txtwidth, &txtheight); - - dc->SetTextForeground(*wxBLACK); - dc->DrawText(buffer, wxMax(rect.GetX() + 2, midx - (txtwidth >> 1)), midy - (txtheight >> 1)); - - // Draw black border - dc->SetPen( *wxBLACK_PEN ); - dc->SetBrush( *wxTRANSPARENT_BRUSH ); - dc->DrawRectangle( rect.GetX(), rect.GetY() + 1, iWidth, iHeight ); - } - } + // File-status + case ColumnStatus: + text = file->getPartfileStatus(); break; - - case ColumnSources: { - // Version - dc->DrawText(client->GetClientVerString(), rect.GetX(), rect.GetY()); - break; - } - - case ColumnPriority: // prio - // We only show priority for sources actually queued for that file - if ( item->GetType() != A4AF_SOURCE && - client->GetDownloadState() == DS_ONQUEUE ) { - if (client->IsRemoteQueueFull()) { - buffer = _("Queue Full"); - dc->DrawText(buffer, rect.GetX(), rect.GetY()); + + // Remaining + case ColumnTimeRemaining: { + if ((file->GetStatus() != PS_COMPLETING) && file->IsPartFile()) { + uint64 remainSize = file->GetFileSize() - file->GetCompletedSize(); + sint32 remainTime = file->getTimeRemaining(); + + if (remainTime >= 0) { + text = CastSecondsToHM(remainTime); } else { - if (client->GetRemoteQueueRank()) { - sint16 qrDiff = client->GetRemoteQueueRank() - - client->GetOldRemoteQueueRank(); - if(qrDiff == client->GetRemoteQueueRank() ) { - qrDiff = 0; - } - wxColour savedColour = dc->GetTextForeground(); - if( qrDiff < 0 ) { - dc->SetTextForeground(*wxBLUE); - } - if( qrDiff > 0 ) { - dc->SetTextForeground(*wxRED); - } - //if( qrDiff == 0 ) { - // dc->SetTextForeground(*wxLIGHT_GREY); - //} - buffer = wxString::Format(_("QR: %u (%i)"), - client->GetRemoteQueueRank(), qrDiff); - dc->DrawText(buffer, rect.GetX(), rect.GetY()); - dc->SetTextForeground(savedColour); - } + text = _("Unknown"); } + + text += wxT(" (") + CastItoXBytes(remainSize) + wxT(")"); } break; - - case ColumnStatus: // status - if (item->GetType() != A4AF_SOURCE) { - buffer = DownloadStateToStr( client->GetDownloadState(), - client->IsRemoteQueueFull() ); + } + + // Last seen completed + case ColumnLastSeenComplete: { + if ( file->lastseencomplete ) { + text = wxDateTime( file->lastseencomplete ).Format( _("%y/%m/%d %H:%M:%S") ); } else { - buffer = _("Asked for another file"); - if ( client->GetRequestFile() && - client->GetRequestFile()->GetFileName().IsOk()) { - buffer += CFormat(wxT(" (%s)")) - % client->GetRequestFile()->GetFileName(); - } + text = _("Unknown"); } - dc->DrawText(buffer, rect.GetX(), rect.GetY()); - break; - // Source comes from? - case ColumnTimeRemaining: { - buffer = wxGetTranslation(OriginToText(client->GetSourceFrom())); - dc->DrawText(buffer, rect.GetX(), rect.GetY()); break; - } + } + + // Last received + case ColumnLastReception: { + const time_t lastReceived = file->GetLastChangeDatetime(); + if (lastReceived) { + text = wxDateTime(lastReceived).Format( _("%y/%m/%d %H:%M:%S") ); + } else { + text = _("Unknown"); + } + } + } + + if ( !text.IsEmpty() ) { + dc->DrawText( text, rect.GetX(), rect.GetY() ); } } - wxString CDownloadListCtrl::GetTTSText(unsigned item) const { - CtrlItem_Struct* content = (CtrlItem_Struct*)GetItemData(item); - - if (content->GetType() == FILE_TYPE) { - CPartFile* file = content->GetFile(); - - return file->GetFileName().GetPrintable(); - } - - return wxEmptyString; + return ((FileCtrlItem_Struct*)GetItemData(item))->GetFile()->GetFileName().GetPrintable(); } int CDownloadListCtrl::SortProc(wxUIntPtr param1, wxUIntPtr param2, long sortData) { - CtrlItem_Struct* item1 = (CtrlItem_Struct*)param1; - CtrlItem_Struct* item2 = (CtrlItem_Struct*)param2; + FileCtrlItem_Struct* item1 = (FileCtrlItem_Struct*)param1; + FileCtrlItem_Struct* item2 = (FileCtrlItem_Struct*)param2; int sortMod = (sortData & CMuleListCtrl::SORT_DES) ? -1 : 1; sortData &= CMuleListCtrl::COLUMN_MASK; - int comp = 0; - - if ( item1->GetType() == FILE_TYPE ) { - if ( item2->GetType() == FILE_TYPE ) { - // Both are files, so we just compare them - comp = Compare( item1->GetFile(), item2->GetFile(), sortData); - } else { - // A file and a source, checking if they belong to each other - if ( item1->GetFile() == item2->GetOwner() ) { - // A file should always be above its sources - // Returning directly to avoid the modifier - return -1; - } else { - // Source belongs to anther file, so we compare the files instead - comp = Compare( item1->GetFile(), item2->GetOwner(), sortData); - } - } - } else { - if ( item2->GetType() == FILE_TYPE ) { - // A source and a file, checking if they belong to each other - if ( item1->GetOwner() == item2->GetFile() ) { - // A source should always be below its file - // Returning directly to avoid the modifier - return 1; - } else { - // Source belongs to anther file, so we compare the files instead - comp = Compare( item1->GetOwner(), item2->GetFile(), sortData); - } - } else { - // Two sources, some different possibilites - if ( item1->GetOwner() == item2->GetOwner() ) { - // Avilable sources first, if we have both an - // available and an unavailable - comp = ( item2->GetType() - item1->GetType() ); - - if (comp) { - // A4AF and non-A4AF. The order is fixed regardless of sort-order. - return comp; - } else { - comp = Compare(item1->GetSource(), item2->GetSource(), sortData); - } - } else { - // Belongs to different files, so we compare the files - comp = Compare( item1->GetOwner(), item2->GetOwner(), sortData); - } - } - } // We modify the result so that it matches with ascending or decending - return sortMod * comp; + return sortMod * Compare( item1->GetFile(), item2->GetFile(), sortData); } @@ -1944,108 +1196,6 @@ int CDownloadListCtrl::Compare( const CPartFile* file1, const CPartFile* file2, return result; } - -int CDownloadListCtrl::Compare( - const CUpDownClient* client1, const CUpDownClient* client2, long lParamSort) -{ - switch (lParamSort) { - // Sort by name - case ColumnPart: - case ColumnFileName: - return CmpAny( client1->GetUserName(), client2->GetUserName() ); - - // Sort by status (size field) - case ColumnSize: - return CmpAny( client1->GetDownloadState(), client2->GetDownloadState() ); - - // Sort by transferred in the following fields - case ColumnTransferred: - case ColumnCompleted: - return CmpAny( client1->GetTransferredDown(), client2->GetTransferredDown() ); - - // Sort by speed - case ColumnSpeed: - return CmpAny( client1->GetKBpsDown(), client2->GetKBpsDown() ); - - // Sort by parts offered (Progress field) - case ColumnProgress: - return CmpAny( - client1->GetAvailablePartCount(), - client2->GetAvailablePartCount() ); - - // Sort by client version - case ColumnSources: { - if (client1->GetClientSoft() != client2->GetClientSoft()) { - return client1->GetSoftStr().Cmp(client2->GetSoftStr()); - } - - if (client1->GetVersion() != client2->GetVersion()) { - return CmpAny(client1->GetVersion(), client2->GetVersion()); - } - - return client1->GetClientModString().Cmp(client2->GetClientModString()); - } - - // Sort by Queue-Rank - case ColumnPriority: { - // This will sort by download state: Downloading, OnQueue, Connecting ... - // However, Asked For Another will always be placed last, due to - // sorting in SortProc - if ( client1->GetDownloadState() != client2->GetDownloadState() ) { - return client1->GetDownloadState() - client2->GetDownloadState(); - } - - // Placing items on queue before items on full queues - if ( client1->IsRemoteQueueFull() ) { - if ( client2->IsRemoteQueueFull() ) { - return 0; - } else { - return 1; - } - } else if ( client2->IsRemoteQueueFull() ) { - return -1; - } else { - if ( client1->GetRemoteQueueRank() ) { - if ( client2->GetRemoteQueueRank() ) { - return CmpAny( - client1->GetRemoteQueueRank(), - client2->GetRemoteQueueRank() ); - } else { - return -1; - } - } else { - if ( client2->GetRemoteQueueRank() ) { - return 1; - } else { - return 0; - } - } - } - } - - // Sort by state - case ColumnStatus: { - if (client1->GetDownloadState() == client2->GetDownloadState()) { - return CmpAny( - client1->IsRemoteQueueFull(), - client2->IsRemoteQueueFull() ); - } else { - return CmpAny( - client1->GetDownloadState(), - client2->GetDownloadState() ); - } - } - - // Source of source ;) - case ColumnTimeRemaining: - return CmpAny(client1->GetSourceFrom(), client2->GetSourceFrom()); - - default: - return 0; - } -} - - void CDownloadListCtrl::ClearCompleted() { m_completedFiles = false; @@ -2053,14 +1203,12 @@ void CDownloadListCtrl::ClearCompleted() // Search for completed files for ( ListItems::iterator it = m_ListItems.begin(); it != m_ListItems.end(); ) { - CtrlItem_Struct* item = it->second; ++it; + FileCtrlItem_Struct* item = it->second; ++it; - if ( item->GetType() == FILE_TYPE ) { - CPartFile* file = item->GetFile(); - - if ( file->IsPartFile() == false ) { - RemoveFile(file); - } + CPartFile* file = item->GetFile(); + + if ( file->IsPartFile() == false ) { + RemoveFile(file); } } } @@ -2070,16 +1218,12 @@ void CDownloadListCtrl::ShowFilesCount( int diff ) { m_filecount += diff; - wxString str = wxString::Format( _("Downloads (%i)"), m_filecount ); wxStaticText* label = CastByName( wxT("downloadsLabel"), GetParent(), wxStaticText ); - label->SetLabel( str ); + label->SetLabel( wxString::Format( _("Downloads (%i)"), m_filecount ) ); label->GetParent()->Layout(); } - - - bool CDownloadListCtrl::ShowItemInCurrentCat( const CPartFile* file, int newsel ) const { @@ -2216,65 +1360,6 @@ void CDownloadListCtrl::DrawFileStatusBar( } } -static const CMuleColour crBoth(0, 192, 0); -static const CMuleColour crFlatBoth(0, 150, 0); - -static const CMuleColour crNeither(240, 240, 240); -static const CMuleColour crFlatNeither(224, 224, 224); - -#define crClientOnly crHave -#define crFlatClientOnly crFlatHave -#define crNextPending crFlatPending - -void CDownloadListCtrl::DrawSourceStatusBar( - const CUpDownClient* source, wxDC* dc, const wxRect& rect, bool bFlat) const -{ - static CBarShader s_StatusBar(16); - - CPartFile* reqfile = source->GetRequestFile(); - - s_StatusBar.SetFileSize( reqfile->GetFileSize() ); - s_StatusBar.SetHeight(rect.height); - s_StatusBar.SetWidth(rect.width); - s_StatusBar.Set3dDepth( thePrefs::Get3DDepth() ); - - // Barry - was only showing one part from client, even when reserved bits from 2 parts - wxString gettingParts = source->ShowDownloadingParts(); - - const BitVector& partStatus = source->GetPartStatus(); - - uint64 uEnd = 0; - for ( uint64 i = 0; i < partStatus.size(); i++ ) { - uint64 uStart = PARTSIZE * i; - uEnd = wxMin(reqfile->GetFileSize(), uStart + PARTSIZE) - 1; - - CMuleColour colour; - if (!partStatus[i]) { - colour = bFlat ? crFlatNeither : crNeither; - } else if ( reqfile->IsComplete(uStart, uEnd)) { - colour = bFlat ? crFlatBoth : crBoth; - } else if ( source->GetDownloadState() == DS_DOWNLOADING && - source->GetLastBlockOffset() <= uEnd && - source->GetLastBlockOffset() >= uStart) { - colour = crPending; - } else if (gettingParts.GetChar((uint16)i) == 'Y') { - colour = crNextPending; - } else { - colour = bFlat ? crFlatClientOnly : crClientOnly; - } - - if ( source->GetRequestFile()->IsStopped() ) { - colour.Blend(50); - } - - s_StatusBar.FillRange(uStart, uEnd, colour); - } - // fill the rest (if partStatus is empty) - s_StatusBar.FillRange(uEnd + 1, reqfile->GetFileSize() - 1, bFlat ? crFlatNeither : crNeither); - - s_StatusBar.Draw(dc, rect.x, rect.y, bFlat); -} - #ifdef __WXMSW__ # define QUOTE wxT("\"") #else diff --git a/src/DownloadListCtrl.h b/src/DownloadListCtrl.h index 845ae0be..aadea915 100644 --- a/src/DownloadListCtrl.h +++ b/src/DownloadListCtrl.h @@ -40,24 +40,15 @@ class wxBitmap; class wxRect; class wxDC; -struct CtrlItem_Struct; - - +struct FileCtrlItem_Struct; /** * This class is responsible for representing the download queue. * - * The CDownlodListCtrl class is responsible for drawing not only files being - * downloaded, but also sources assosiated with these. It is in many ways - * primary widget within the application, since it is here that users can - * inspect and manipulate their current downloads. + * The CDownlodListCtrl class is responsible for drawing files being downloaded. + * It is in many ways primary widget within the application, since it is here that + * users can inspect and manipulate their current downloads. * - * Due to the fact that sources are one of the major sources of update-class, - * this class has been designed such that it does not need to recieve these - * unless sources in question are actually being displayed. Upon the initial - * showing of sources (when a file is expanded), a current list of that file's - * sources are requested. If the sources are hidden again, the class will - * discard all knowledge of their existance. */ class CDownloadListCtrl : public CMuleListCtrl { @@ -90,28 +81,6 @@ public: * Please note that duplicates wont be added. */ void AddFile( CPartFile* file ); - - /** - * Adds a source belonging to the specified partfile. - * - * @param owner The owner of this specific source-entry, must be a valid pointer. - * @param source The client object to be added, must be a valid pointer. - * @param available If the source is a current source, or a A4AF source. - * - * Please note that the specified client will only be added to the list if it's - * owner is shown and has ShowSources set to true, otherwise the source will - * simply be ignored. Duplicates wont be added. - */ - void AddSource( CPartFile* owner, CUpDownClient* source, DownloadItemType type ); - - - /** - * Removes a source from the list. - * - * @param source A pointer to the source to be removed. - * @param owner Either a specific file, or NULL to remove the source from all files. - */ - void RemoveSource( const CUpDownClient* source, const CPartFile* owner ); /** * Removes the specified file from the list. @@ -121,15 +90,6 @@ public: * This function also removes any sources assosiated with the file. */ void RemoveFile( CPartFile* file ); - - - /** - * Toggles showing of a file's sources on or off. - * - * @param file The file whoose sources should be shown/hidden. - * @param show Whenever or not to show sources. - */ - void ShowSources( CPartFile* file, bool show ); /** * Shows or hides the sources of a specific file. @@ -153,7 +113,6 @@ public: */ void UpdateItem(const void* toupdate); - /** * Returns the current category. */ @@ -197,28 +156,15 @@ private: /** * Draws a file item. */ - void DrawFileItem( wxDC* dc, int nColumn, const wxRect& rect, CtrlItem_Struct* item ) const; - - /** - * Draws a source item. - */ - void DrawSourceItem( wxDC* dc, int nColumn, const wxRect& rect, CtrlItem_Struct* item ) const; + void DrawFileItem( wxDC* dc, int nColumn, const wxRect& rect, FileCtrlItem_Struct* item ) const; /** * Draws the status (chunk) bar for a file. */ void DrawFileStatusBar( const CPartFile* file, wxDC* dc, const wxRect& rect, bool bFlat ) const; - /** - * Draws the status (chunk) bar for a source. - */ - void DrawSourceStatusBar( const CUpDownClient* source, wxDC* dc, const wxRect& rect, bool bFlat) const; - - static int wxCALLBACK SortProc(wxUIntPtr item1, wxUIntPtr item2, long sortData); - static int Compare( const CPartFile* file1, const CPartFile* file2, long lParamSort ); - static int Compare( const CUpDownClient* client1, const CUpDownClient* client2, long lParamSort); - + static int Compare( const CPartFile* file1, const CPartFile* file2, long lParamSort ); // Event-handlers for files void OnCancelFile( wxCommandEvent& event ); @@ -229,24 +175,16 @@ private: void OnClearCompleted( wxCommandEvent& event ); void OnGetLink( wxCommandEvent& event ); void OnGetFeedback( wxCommandEvent& event ); - void OnGetRazorStats( wxCommandEvent& event ); void OnViewFileInfo( wxCommandEvent& event ); void OnViewFileComments( wxCommandEvent& event ); void OnPreviewFile( wxCommandEvent& event ); - // Event-handlers for sources - void OnSwapSource( wxCommandEvent& event ); - void OnViewFiles( wxCommandEvent& event ); - void OnAddFriend( wxCommandEvent& event ); - void OnSendMessage( wxCommandEvent& event ); - void OnViewClientInfo( wxCommandEvent& event ); - // Misc event-handlers void OnItemActivated( wxListEvent& event ); void OnMouseRightClick( wxListEvent& event ); void OnMouseMiddleClick( wxListEvent& event ); void OnKeyPressed( wxKeyEvent& event ); - + void OnItemSelectionChanged( wxListEvent& event ); /** * Returns true if the given file should be shown in the specified category. @@ -266,7 +204,7 @@ private: //! The type of list used to store items on the listctrl. - typedef std::multimap ListItems; + typedef std::multimap ListItems; //! Shortcut to the pair-type used on the list. typedef ListItems::value_type ListItemsPair; //! This pair is used when searching for equal-ranges. @@ -283,8 +221,7 @@ private: //! Cached brush object. wxBrush m_hilightBrush; //! Cached brush object. - wxBrush m_hilightUnfocusBrush; - + wxBrush m_hilightUnfocusBrush; //! The currently displayed category uint8 m_category; @@ -297,22 +234,6 @@ private: DECLARE_EVENT_TABLE() - enum ColumnEnum { - ColumnPart = 0, - ColumnFileName, - ColumnSize, - ColumnTransferred, - ColumnCompleted, - ColumnSpeed, - ColumnProgress, - ColumnSources, - ColumnPriority, - ColumnStatus, - ColumnTimeRemaining, - ColumnLastSeenComplete, - ColumnLastReception, - ColumnNumberOfColumns - }; }; #endif diff --git a/src/DownloadQueue.cpp b/src/DownloadQueue.cpp index 3eda132c..7dae9456 100644 --- a/src/DownloadQueue.cpp +++ b/src/DownloadQueue.cpp @@ -552,7 +552,7 @@ void CDownloadQueue::CheckAndAddSource(CPartFile* sender, CUpDownClient* source) // Try to add a request for the other file if ( (*it)->AddRequestForAnotherFile(sender)) { // Add it to downloadlistctrl - Notify_DownloadCtrlAddSource(sender, *it, A4AF_SOURCE); + Notify_SourceCtrlAddSource(sender, *it, A4AF_SOURCE); } } @@ -588,7 +588,7 @@ void CDownloadQueue::CheckAndAddSource(CPartFile* sender, CUpDownClient* source) sender->UpdateFileRatingCommentAvail(); } - Notify_DownloadCtrlAddSource(sender, source, UNAVAILABLE_SOURCE); + Notify_SourceCtrlAddSource(sender, source, UNAVAILABLE_SOURCE); } } else { // Unknown client, add it to the clients list @@ -601,7 +601,7 @@ void CDownloadQueue::CheckAndAddSource(CPartFile* sender, CUpDownClient* source) sender->UpdateFileRatingCommentAvail(); } - Notify_DownloadCtrlAddSource(sender, source, UNAVAILABLE_SOURCE); + Notify_SourceCtrlAddSource(sender, source, UNAVAILABLE_SOURCE); } } @@ -646,7 +646,7 @@ void CDownloadQueue::CheckAndAddKnownSource(CPartFile* sender,CUpDownClient* sou if ( file ) { if ( file != sender ) { if ( source->AddRequestForAnotherFile( sender ) ) { - Notify_DownloadCtrlAddSource( sender, source, A4AF_SOURCE ); + Notify_SourceCtrlAddSource( sender, source, A4AF_SOURCE ); } } } else { @@ -658,7 +658,7 @@ void CDownloadQueue::CheckAndAddKnownSource(CPartFile* sender,CUpDownClient* sou source->SetSourceFrom(SF_PASSIVE); sender->AddSource( source ); - Notify_DownloadCtrlAddSource( sender, source, UNAVAILABLE_SOURCE); + Notify_SourceCtrlAddSource( sender, source, UNAVAILABLE_SOURCE); } } @@ -673,6 +673,10 @@ bool CDownloadQueue::RemoveSource(CUpDownClient* toremove, bool WXUNUSED(updatew // Remove from source-list if ( cur_file->DelSource( toremove ) ) { + + // Remove from sourcelist widget + Notify_SourceCtrlRemoveSource(toremove, cur_file); + cur_file->RemoveDownloadingSource(toremove); removed = true; if ( bDoStatsUpdate ) { @@ -691,9 +695,6 @@ bool CDownloadQueue::RemoveSource(CUpDownClient* toremove, bool WXUNUSED(updatew toremove->SetRequestFile( NULL ); toremove->SetDownloadState(DS_NONE); - - // Remove from downloadlist widget - Notify_DownloadCtrlRemoveSource(toremove, (CPartFile*)NULL); toremove->ResetFileStatusInfo(); return removed; @@ -717,9 +718,9 @@ CUpDownClient* CDownloadQueue::GetDownloadClientByIP_UDP(uint32 dwIP, uint16 nUD wxMutexLocker lock( m_mutex ); for ( unsigned int i = 0; i < m_filelist.size(); i++ ) { - const CPartFile::SourceSet& set = m_filelist[i]->GetSourceList(); + const CKnownFile::SourceSet& set = m_filelist[i]->GetSourceList(); - for ( CPartFile::SourceSet::const_iterator it = set.begin(); it != set.end(); it++ ) { + for ( CKnownFile::SourceSet::const_iterator it = set.begin(); it != set.end(); it++ ) { if ( (*it)->GetIP() == dwIP && (*it)->GetUDPPort() == nUDPPort ) { return *it; } diff --git a/src/ExternalConn.cpp b/src/ExternalConn.cpp index 296ec9ca..b0f38524 100644 --- a/src/ExternalConn.cpp +++ b/src/ExternalConn.cpp @@ -741,7 +741,7 @@ static CECPacket *Get_EC_Response_PartFile_Cmd(const CECPacket *request) case EC_OP_PARTFILE_SWAP_A4AF_THIS: if ((pfile->GetStatus(false) == PS_READY) || (pfile->GetStatus(false) == PS_EMPTY)) { - CPartFile::SourceSet::const_iterator it = pfile->GetA4AFList().begin(); + CKnownFile::SourceSet::const_iterator it = pfile->GetA4AFList().begin(); while ( it != pfile->GetA4AFList().end() ) { CUpDownClient *cur_source = *it++; @@ -755,7 +755,7 @@ static CECPacket *Get_EC_Response_PartFile_Cmd(const CECPacket *request) case EC_OP_PARTFILE_SWAP_A4AF_OTHERS: if ((pfile->GetStatus(false) == PS_READY) || (pfile->GetStatus(false) == PS_EMPTY)) { - CPartFile::SourceSet::const_iterator it = pfile->GetSourceList().begin(); + CKnownFile::SourceSet::const_iterator it = pfile->GetSourceList().begin(); while ( it != pfile->GetSourceList().end() ) { CUpDownClient* cur_source = *it++; diff --git a/src/FileDetailDialog.cpp b/src/FileDetailDialog.cpp index c7698259..7f1edbf3 100644 --- a/src/FileDetailDialog.cpp +++ b/src/FileDetailDialog.cpp @@ -179,8 +179,8 @@ void CFileDetailDialog::FillSourcenameList() } } #else // CLIENT_GUI - const CPartFile::SourceSet& sources = m_file->GetSourceList(); - CPartFile::SourceSet::const_iterator it = sources.begin(); + const CKnownFile::SourceSet& sources = m_file->GetSourceList(); + CKnownFile::SourceSet::const_iterator it = sources.begin(); for ( ; it != sources.end(); ++it ) { const CUpDownClient &cur_src = **it; if (cur_src.GetRequestFile() != m_file || diff --git a/src/GenericClientListCtrl.cpp b/src/GenericClientListCtrl.cpp new file mode 100644 index 00000000..cc62f78e --- /dev/null +++ b/src/GenericClientListCtrl.cpp @@ -0,0 +1,1182 @@ +// +// This file is part of the aMule Project. +// +// Copyright (c) 2003-2008 aMule Team ( admin@amule.org / http://www.amule.org ) +// +// Any parts of this program derived from the xMule, lMule or eMule project, +// or contributed by third-party developers are copyrighted by their +// respective authors. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA +// +#include "GenericClientListCtrl.h" + +#include +#include + +#include // Needed for CFormat +#include "amule.h" // Needed for theApp +#include "amuleDlg.h" // Needed for CamuleDlg +#include "BarShader.h" // Needed for CBarShader +#include "ClientDetailDialog.h" // Needed for CClientDetailDialog +#include "ChatWnd.h" // Needed for CChatWnd +#include "CommentDialogLst.h" // Needed for CCommentDialogLst +#include "DataToText.h" // Needed for PriorityToStr +#include "FileDetailDialog.h" // Needed for CFileDetailDialog +#include "GuiEvents.h" // Needed for CoreNotify_* +#ifdef ENABLE_IP2COUNTRY + #include "IP2Country.h" // Needed for IP2Country +#endif +#include "Logger.h" +#include "muuli_wdr.h" // Needed for ID_DLOADLIST +#include "PartFile.h" // Needed for CPartFile +#include "Preferences.h" +#include "SharedFileList.h" // Needed for CSharedFileList +#include "TerminationProcess.h" // Needed for CTerminationProcess +#include "updownclient.h" // Needed for CUpDownClient + +struct ClientCtrlItem_Struct +{ + ClientCtrlItem_Struct() + : dwUpdated(0), + status(NULL), + m_owner(NULL), + m_sourceValue(NULL), + m_type(UNAVAILABLE_SOURCE) + { } + + ~ClientCtrlItem_Struct() { + delete status; + } + + SourceItemType GetType() const { + return m_type; + } + + CKnownFile* GetOwner() const { + return m_owner; + } + + + CUpDownClient* GetSource() const { + return m_sourceValue; + } + + void SetContents(CKnownFile* owner, CUpDownClient* source, SourceItemType type) { + m_owner = owner; + m_sourceValue = source; + m_type = type; + } + + void SetType(SourceItemType type) { m_type = type; } + + uint32 dwUpdated; + wxBitmap* status; + +private: + CKnownFile* m_owner; + CUpDownClient* m_sourceValue; + SourceItemType m_type; +}; + +#define m_ImageList theApp->amuledlg->m_imagelist + +BEGIN_EVENT_TABLE(CGenericClientListCtrl, CMuleListCtrl) + EVT_LIST_ITEM_ACTIVATED(ID_CLIENTLIST, CGenericClientListCtrl::OnItemActivated) + EVT_LIST_ITEM_RIGHT_CLICK(ID_CLIENTLIST, CGenericClientListCtrl::OnMouseRightClick) + EVT_LIST_ITEM_MIDDLE_CLICK(ID_CLIENTLIST, CGenericClientListCtrl::OnMouseMiddleClick) + + EVT_CHAR( CGenericClientListCtrl::OnKeyPressed ) + + EVT_MENU( MP_CHANGE2FILE, CGenericClientListCtrl::OnSwapSource ) + EVT_MENU( MP_SHOWLIST, CGenericClientListCtrl::OnViewFiles ) + EVT_MENU( MP_ADDFRIEND, CGenericClientListCtrl::OnAddFriend ) + EVT_MENU( MP_SENDMESSAGE, CGenericClientListCtrl::OnSendMessage ) + EVT_MENU( MP_DETAIL, CGenericClientListCtrl::OnViewClientInfo ) +END_EVENT_TABLE() + +//! This listtype is used when gathering the selected items. +typedef std::list ItemList; + +CGenericClientListCtrl::CGenericClientListCtrl( + const wxString& tablename, + wxWindow *parent, wxWindowID winid, const wxPoint& pos, const wxSize& size, + long style, const wxValidator& validator, const wxString& name ) +: +CMuleListCtrl( parent, winid, pos, size, style | wxLC_OWNERDRAW | wxLC_VRULES | wxLC_HRULES, validator, name ), +m_columndata(0, NULL) +{ + // Setting the sorter function must be done in the derived class, to use the translation function correctly. + // SetSortFunc( SortProc ); + + // Set the table-name (for loading and saving preferences). + SetTableName( tablename ); + + m_menu = NULL; + m_showing = false; + + m_hilightBrush = CMuleColour(wxSYS_COLOUR_HIGHLIGHT).Blend(125).GetBrush(); + + m_hilightUnfocusBrush = CMuleColour(wxSYS_COLOUR_BTNSHADOW).Blend(125).GetBrush(); + + m_clientcount = 0; +} + +void CGenericClientListCtrl::InitColumnData() +{ + if (!m_columndata.n_columns) { + throw wxString(wxT("CRITICAL: Initialization of the column data lacks subclass information")); + } + + for (int i = 0; i < m_columndata.n_columns; ++i) { + InsertColumn( i, wxGetTranslation(m_columndata.columns[i].name), wxLIST_FORMAT_LEFT, m_columndata.columns[i].width); + } + + LoadSettings(); +} + +CGenericClientListCtrl::~CGenericClientListCtrl() +{ + while ( !m_ListItems.empty() ) { + delete m_ListItems.begin()->second; + m_ListItems.erase( m_ListItems.begin() ); + } +} +void CGenericClientListCtrl::RawAddSource(CKnownFile* owner, CUpDownClient* source, SourceItemType type) +{ + ClientCtrlItem_Struct* newitem = new ClientCtrlItem_Struct; + newitem->SetContents(owner, source, type); + + m_ListItems.insert( ListItemsPair(source, newitem) ); + + long item = InsertItem( GetItemCount(), wxEmptyString ); + SetItemPtrData( item, reinterpret_cast(newitem) ); + SetItemBackgroundColour( item, GetBackgroundColour() ); +} + +void CGenericClientListCtrl::AddSource(CKnownFile* owner, CUpDownClient* source, SourceItemType type) +{ + wxCHECK_RET(owner, wxT("NULL owner in CGenericClientListCtrl::AddSource")); + wxCHECK_RET(source, wxT("NULL source in CGenericClientListCtrl::AddSource")); + + // Update the other instances of this source + bool bFound = false; + ListIteratorPair rangeIt = m_ListItems.equal_range(source); + for ( ListItems::iterator it = rangeIt.first; it != rangeIt.second; ++it ) { + ClientCtrlItem_Struct* cur_item = it->second; + + // Check if this source has been already added to this file => to be sure + if ( cur_item->GetOwner() == owner ) { + // Update this instance with its new setting + if ((type == A4AF_SOURCE) && + cur_item->GetSource()->GetRequestFile() + && std::binary_search(m_knownfiles.begin(), m_knownfiles.end(), cur_item->GetSource()->GetRequestFile())) { + cur_item->SetContents(owner, source, AVAILABLE_SOURCE); + } else { + cur_item->SetContents(owner, source, type); + } + cur_item->dwUpdated = 0; + bFound = true; + } else if ( type == AVAILABLE_SOURCE ) { + // The state 'Available' is exclusive + cur_item->SetContents(cur_item->GetOwner(), source, A4AF_SOURCE); + cur_item->dwUpdated = 0; + } + } + + if ( bFound ) { + return; + } + + if ( std::binary_search(m_knownfiles.begin(), m_knownfiles.end(), owner) ) { + RawAddSource(owner, source, type); + + ShowSourcesCount( 1 ); + } +} + +void CGenericClientListCtrl::RawRemoveSource( ListItems::iterator& it) +{ + ClientCtrlItem_Struct* item = it->second; + + long index = FindItem( -1, reinterpret_cast(item) ); + + if ( index > -1 ) { + DeleteItem( index ); + } + + delete item; + + // Remove it from the m_ListItems + m_ListItems.erase( it ); +} + +void CGenericClientListCtrl::RemoveSource( const CUpDownClient* source, const CKnownFile* owner ) +{ + // A NULL owner means remove it no matter what. + wxCHECK_RET(source, wxT("NULL source in CGenericClientListCtrl::RemoveSource")); + + // Retrieve all entries matching the source + ListIteratorPair rangeIt = m_ListItems.equal_range(source); + + int removedItems = 0; + + for ( ListItems::iterator it = rangeIt.first; it != rangeIt.second; /* no ++, it happens later */) { + ListItems::iterator tmp = it++; + + if ( owner == NULL || owner == tmp->second->GetOwner() ) { + + RawRemoveSource(tmp); + + ++removedItems; + } + } + + ShowSourcesCount((-1) * removedItems); +} + +void CGenericClientListCtrl::UpdateItem(const void* toupdate, SourceItemType type) +{ + // Retrieve all entries matching the source + ListIteratorPair rangeIt = m_ListItems.equal_range( toupdate ); + + if ( rangeIt.first != rangeIt.second ) { + // Visible lines, default to all because not all platforms + // support the GetVisibleLines function + long first = 0, last = GetItemCount(); + + #ifndef __WXMSW__ + // Get visible lines if we need them + GetVisibleLines( &first, &last ); + #endif + + for ( ListItems::iterator it = rangeIt.first; it != rangeIt.second; ++it ) { + ClientCtrlItem_Struct* item = it->second; + + long index = FindItem( -1, reinterpret_cast(item) ); + + if ((type == A4AF_SOURCE) && + item->GetSource()->GetRequestFile() + && std::binary_search(m_knownfiles.begin(), m_knownfiles.end(), item->GetSource()->GetRequestFile())) { + + item->SetType(AVAILABLE_SOURCE); + } else { + item->SetType(type); + } + + item->dwUpdated = 0; + + // Only update visible lines + if ( index >= first && index <= last) { + RefreshItem( index ); + } + } + } +} + +void CGenericClientListCtrl::ShowSources( const CKnownFileVector& files ) +{ + Freeze(); + + // The stored vector is sorted, as it the received one, so we can use binary_search + + for (int i = 0; i < m_knownfiles.size(); ++i) { + // Files that are not in the new list must have show set to false. + if (!std::binary_search(files.begin(), files.end(), m_knownfiles[i])) { + m_knownfiles[i]->SetShowSources( false ); + } + } + + // This will call again SetShowSources in files that were in both vectors. Right now + // that function is just a inline setter, so any way to prevent it would be wasteful, + // but this must be reviewed if that fact changes. + + for (int i = 0; i < files.size(); ++i) { + files[i]->SetShowSources( true ); + } + + // We must cleanup sources that are not in the received files. + + int itemDiff = 0; + + for (ListItems::iterator it = m_ListItems.begin(); it != m_ListItems.end(); /* no ++, it happens later */) { + ListItems::iterator tmp = it++; + ClientCtrlItem_Struct* item = tmp->second; + if (!std::binary_search(files.begin(), files.end(), item->GetOwner())) { + // Remove it from the m_ListItems + RawRemoveSource(tmp); + --itemDiff; + } + } + + for (int i = 0; i < files.size(); ++i) { + + // Only those that weren't showing already + if (!std::binary_search(m_knownfiles.begin(), m_knownfiles.end(), files[i])) { + + CKnownFile* file = files[i]; + + wxASSERT_MSG(file, wxT("NULL file in CGenericClientListCtrl::ShowSources")); + + if (file) { + + CKnownFile::SourceSet::const_iterator it; + + if (file->IsPartFile()) { + const CKnownFile::SourceSet& normSources = (dynamic_cast( file ))->GetSourceList(); + const CKnownFile::SourceSet& a4afSources = (dynamic_cast( file ))->GetA4AFList(); + + // Adding normal sources + for ( it = normSources.begin(); it != normSources.end(); ++it ) { + switch ((*it)->GetDownloadState()) { + case DS_DOWNLOADING: + case DS_ONQUEUE: + RawAddSource( file, *it, AVAILABLE_SOURCE ); + ++itemDiff; + break; + default: + // Any other state + RawAddSource( file, *it, UNAVAILABLE_SOURCE ); + ++itemDiff; + } + } + + // Adding A4AF sources + for ( it = a4afSources.begin(); it != a4afSources.end(); ++it ) { + // Only add if the A4AF file is not in the shown list. + if (!std::binary_search(files.begin(), files.end(), (*it)->GetRequestFile())) { + RawAddSource( file, *it, A4AF_SOURCE ); + ++itemDiff; + } + } + } else { + // Known file + const CKnownFile::SourceSet& sources = file->m_ClientUploadList; + for ( it = sources.begin(); it != sources.end(); ++it ) { + switch ((*it)->GetUploadState()) { + case US_UPLOADING: + case US_ONUPLOADQUEUE: + RawAddSource( file, *it, AVAILABLE_SOURCE ); + ++itemDiff; + break; + default: + // Any other state + RawAddSource( file, *it, UNAVAILABLE_SOURCE ); + ++itemDiff; + } + } + } + } + } + } + + m_knownfiles = files; + + ShowSourcesCount( itemDiff ); + + SortList(); + + Thaw(); +} + +/** + * Helper-function: This function is used to gather selected items. + * + * @param list A pointer to the list to gather items from. + * @return A list containing the selected items of the choosen types. + */ +ItemList GetSelectedItems( CGenericClientListCtrl* list ) +{ + ItemList results; + + long index = list->GetNextItem( -1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED ); + + while ( index > -1 ) { + ClientCtrlItem_Struct* item = (ClientCtrlItem_Struct*)list->GetItemData( index ); + + results.push_back( item ); + + index = list->GetNextItem( index, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED ); + } + + return results; +} + +void CGenericClientListCtrl::OnSwapSource( wxCommandEvent& WXUNUSED(event) ) +{ + + for (int i =0; i < m_knownfiles.size(); ++i) { + wxCHECK_RET(m_knownfiles[i]->IsPartFile(), wxT("File is not a partfile when swapping sources")); + } + + ItemList sources = ::GetSelectedItems( this ); + + for ( ItemList::iterator it = sources.begin(); it != sources.end(); ++it ) { + (*it)->GetSource()->SwapToAnotherFile( true, false, false, dynamic_cast((*it)->GetOwner())); + } +} + + +void CGenericClientListCtrl::OnViewFiles( wxCommandEvent& WXUNUSED(event) ) +{ + ItemList sources = ::GetSelectedItems( this ); + + if ( sources.size() == 1 ) { + sources.front()->GetSource()->RequestSharedFileList(); + } +} + + +void CGenericClientListCtrl::OnAddFriend( wxCommandEvent& WXUNUSED(event) ) +{ + ItemList sources = ::GetSelectedItems( this ); + + for ( ItemList::iterator it = sources.begin(); it != sources.end(); ++it ) { + CUpDownClient* client = (*it)->GetSource(); + if (client->IsFriend()) { + theApp->amuledlg->m_chatwnd->RemoveFriend(client->GetUserHash(), client->GetIP(), client->GetUserPort()); + } else { + theApp->amuledlg->m_chatwnd->AddFriend( client ); + } + } +} + + +void CGenericClientListCtrl::OnSendMessage( wxCommandEvent& WXUNUSED(event) ) +{ + ItemList sources = ::GetSelectedItems( this ); + + if ( sources.size() == 1 ) { + CUpDownClient* source = (sources.front())->GetSource(); + + // These values are cached, since calling wxGetTextFromUser will + // start an event-loop, in which the client may be deleted. + wxString userName = source->GetUserName(); + uint64 userID = GUI_ID(source->GetIP(), source->GetUserPort()); + + wxString message = ::wxGetTextFromUser(_("Send message to user"), + _("Message to send:")); + if ( !message.IsEmpty() ) { + theApp->amuledlg->m_chatwnd->SendMessage(message, userName, userID); + } + } +} + + +void CGenericClientListCtrl::OnViewClientInfo( wxCommandEvent& WXUNUSED(event) ) +{ + ItemList sources = ::GetSelectedItems( this ); + + if ( sources.size() == 1 ) { + CClientDetailDialog( this, sources.front()->GetSource() ).ShowModal(); + } +} + + +void CGenericClientListCtrl::OnItemActivated( wxListEvent& evt ) +{ + CClientDetailDialog( this, ((ClientCtrlItem_Struct*)GetItemData( evt.GetIndex()))->GetSource()).ShowModal(); +} + + +void CGenericClientListCtrl::OnMouseRightClick(wxListEvent& evt) +{ + long index = CheckSelection(evt); + if (index < 0) { + return; + } + + delete m_menu; + m_menu = NULL; + + ClientCtrlItem_Struct* item = (ClientCtrlItem_Struct*)GetItemData( index ); + CUpDownClient* client = item->GetSource(); + + m_menu = new wxMenu(wxT("Clients")); + m_menu->Append(MP_DETAIL, _("Show &Details")); + m_menu->Append(MP_ADDFRIEND, client->IsFriend() ? _("Remove from friends") : _("Add to Friends")); + m_menu->Append(MP_SHOWLIST, _("View Files")); + m_menu->Append(MP_SENDMESSAGE, _("Send message")); + + m_menu->Append(MP_CHANGE2FILE, _("Swap to this file")); + + // Only enable the Swap option for A4AF sources + m_menu->Enable(MP_CHANGE2FILE, (item->GetType() == A4AF_SOURCE)); + // We need a valid IP if we are to message the client + m_menu->Enable(MP_SENDMESSAGE, (client->GetIP() != 0)); + + m_menu->Enable(MP_SHOWLIST, !client->HasDisabledSharedFiles()); + + PopupMenu(m_menu, evt.GetPoint()); + + delete m_menu; + m_menu = NULL; + +} + + +void CGenericClientListCtrl::OnMouseMiddleClick(wxListEvent& evt) +{ + // Check if clicked item is selected. If not, unselect all and select it. + long index = CheckSelection(evt); + if ( index < 0 ) { + return; + } + + CClientDetailDialog(this, ((ClientCtrlItem_Struct*)GetItemData( index ))->GetSource()).ShowModal(); +} + + +void CGenericClientListCtrl::OnKeyPressed( wxKeyEvent& event ) +{ + // No actions right now. + switch (event.GetKeyCode()) { + default: + event.Skip(); + } +} + + +void CGenericClientListCtrl::OnDrawItem( + int item, wxDC* dc, const wxRect& rect, const wxRect& rectHL, bool highlighted) +{ + // Don't do any drawing if there's nobody to see it. + if ( !theApp->amuledlg->IsDialogVisible( GetParentDialog() ) ) { + return; + } + + ClientCtrlItem_Struct* content = (ClientCtrlItem_Struct *)GetItemData(item); + + // Define text-color and background + // and the border of the drawn area + if (highlighted) { + CMuleColour colour; + if (GetFocus()) { + dc->SetBackground(m_hilightBrush); + colour = m_hilightBrush.GetColour(); + } else { + dc->SetBackground(m_hilightUnfocusBrush); + colour = m_hilightUnfocusBrush.GetColour(); + } + dc->SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT)); + dc->SetPen( colour.Blend(65).GetPen() ); + } else { + dc->SetBackground(*(wxTheBrushList->FindOrCreateBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOX), wxSOLID))); + dc->SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT)); + dc->SetPen(*wxTRANSPARENT_PEN); + } + dc->SetBrush( dc->GetBackground() ); + + dc->DrawRectangle( rectHL.x, rectHL.y, rectHL.width, rectHL.height ); + + dc->SetPen(*wxTRANSPARENT_PEN); + + // Various constant values we use + const int iTextOffset = ( rect.GetHeight() - dc->GetCharHeight() ) / 2; + const int iOffset = 4; + + wxRect cur_rec( iOffset, rect.y, 0, rect.height ); + + for (int i = 0; i < GetColumnCount(); ++i) { + + int columnwidth = GetColumnWidth(i); + + if (columnwidth > 2*iOffset) { + // Make a copy of the current rectangle so we can apply specific tweaks + wxRect target_rec = cur_rec; + target_rec.width = columnwidth - 2*iOffset; + + GenericColumnEnum cid = m_columndata.columns[i].cid; + + if ( cid != ColumnUserProgress ) { + // Text column + // will ensure that text is about in the middle ;) + target_rec.y += iTextOffset; + } + + // Draw the item + DrawClientItem(dc, cid, target_rec, content); + } + + // Increment to the next column + cur_rec.x += columnwidth; + } +} + +void CGenericClientListCtrl::DrawClientItem( + wxDC* dc, int nColumn, const wxRect& rect, ClientCtrlItem_Struct* item ) const +{ + wxDCClipper clipper( *dc, rect.GetX(), rect.GetY(), rect.GetWidth(), rect.GetHeight() ); + wxString buffer; + + const CUpDownClient* client = item->GetSource(); + + switch (nColumn) { + // Client name + various icons + case ColumnUserName: { + wxRect cur_rec = rect; + // +3 is added by OnDrawItem()... so take it off + // Kry - eMule says +1, so I'm trusting it + wxPoint point( cur_rec.GetX(), cur_rec.GetY()+1 ); + + if (item->GetType() != A4AF_SOURCE) { + uint8 image = 0; + + switch (client->GetDownloadState()) { + case DS_CONNECTING: + case DS_CONNECTED: + case DS_WAITCALLBACK: + case DS_TOOMANYCONNS: + image = Client_Red_Smiley; + break; + case DS_ONQUEUE: + if (client->IsRemoteQueueFull()) { + image = Client_Grey_Smiley; + } else { + image = Client_Yellow_Smiley; + } + break; + case DS_DOWNLOADING: + case DS_REQHASHSET: + image = Client_Green_Smiley; + break; + case DS_NONEEDEDPARTS: + case DS_LOWTOLOWIP: + image = Client_Grey_Smiley; + break; + default: // DS_NONE i.e. + image = Client_White_Smiley; + } + + m_ImageList.Draw(image, *dc, point.x, point.y, + wxIMAGELIST_DRAW_TRANSPARENT); + } else { + m_ImageList.Draw(Client_Grey_Smiley, *dc, point.x, point.y, + wxIMAGELIST_DRAW_TRANSPARENT); + } + + cur_rec.x += 20; + wxPoint point2( cur_rec.GetX(), cur_rec.GetY() + 1 ); + + uint8 clientImage; + + if ( client->IsFriend() ) { + clientImage = Client_Friend_Smiley; + } else { + switch ( client->GetClientSoft() ) { + case SO_AMULE: + clientImage = Client_aMule_Smiley; + break; + case SO_MLDONKEY: + case SO_NEW_MLDONKEY: + case SO_NEW2_MLDONKEY: + clientImage = Client_mlDonkey_Smiley; + break; + case SO_EDONKEY: + case SO_EDONKEYHYBRID: + clientImage = Client_eDonkeyHybrid_Smiley; + break; + case SO_EMULE: + clientImage = Client_eMule_Smiley; + break; + case SO_LPHANT: + clientImage = Client_lphant_Smiley; + break; + case SO_SHAREAZA: + case SO_NEW_SHAREAZA: + case SO_NEW2_SHAREAZA: + clientImage = Client_Shareaza_Smiley; + break; + case SO_LXMULE: + clientImage = Client_xMule_Smiley; + break; + default: + // cDonkey, Compatible, Unknown + // No icon for those yet. + // Using the eMule one + '?' + clientImage = Client_Unknown; + break; + } + } + + m_ImageList.Draw(clientImage, *dc, point2.x, point.y, + wxIMAGELIST_DRAW_TRANSPARENT); + + if (client->GetScoreRatio() > 1) { + // Has credits, draw the gold star + m_ImageList.Draw(Client_CreditsYellow_Smiley, *dc, point2.x, point.y, + wxIMAGELIST_DRAW_TRANSPARENT ); + } else if ( client->ExtProtocolAvailable() ) { + // Ext protocol -> Draw the '+' + m_ImageList.Draw(Client_ExtendedProtocol_Smiley, *dc, point2.x, point.y, + wxIMAGELIST_DRAW_TRANSPARENT); + } + + if (client->IsIdentified()) { + // the 'v' + m_ImageList.Draw(Client_SecIdent_Smiley, *dc, point2.x, point.y, + wxIMAGELIST_DRAW_TRANSPARENT); + } else if (client->IsBadGuy()) { + // the 'X' + m_ImageList.Draw(Client_BadGuy_Smiley, *dc, point2.x, point.y, + wxIMAGELIST_DRAW_TRANSPARENT); + } + + if (client->HasObfuscatedConnectionBeenEstablished()) { + // the "¿" except it's a key + m_ImageList.Draw(Client_Encryption_Smiley, *dc, point2.x, point.y, + wxIMAGELIST_DRAW_TRANSPARENT); + } + + wxString userName; +#ifdef ENABLE_IP2COUNTRY + // Draw the flag + const CountryData& countrydata = theApp->amuledlg->m_IP2Country->GetCountryData(client->GetFullIP()); + dc->DrawBitmap(countrydata.Flag, + rect.x + 40, rect.y + 5, + wxIMAGELIST_DRAW_TRANSPARENT); + + userName << countrydata.Name; + + userName << wxT(" - "); +#endif // ENABLE_IP2COUNTRY + if (client->GetUserName().IsEmpty()) { + userName << wxT("?"); + } else { + userName << client->GetUserName(); + } + dc->DrawText(userName, rect.GetX() + 60, rect.GetY()); + } + break; + + case ColumnUserDownloaded: + if (item->GetType() != A4AF_SOURCE && client->GetTransferredDown()) { + buffer = CastItoXBytes(client->GetTransferredDown()); + dc->DrawText(buffer, rect.GetX(), rect.GetY()); + } + break; + case ColumnUserUploaded: + if (item->GetType() != A4AF_SOURCE && client->GetTransferredUp()) { + buffer = CastItoXBytes(client->GetTransferredUp()); + dc->DrawText(buffer, rect.GetX(), rect.GetY()); + } + break; + case ColumnUserSpeedDown: + if (item->GetType() != A4AF_SOURCE && client->GetKBpsDown() > 0.001) { + buffer = wxString::Format(wxT("%.1f "), + client->GetKBpsDown()) + _("kB/s"); + dc->DrawText(buffer, rect.GetX(), rect.GetY()); + } + break; + case ColumnUserSpeedUp: + // Datarate is in bytes. + if (item->GetType() != A4AF_SOURCE && client->GetUploadDatarate() > 1024) { + buffer = wxString::Format(wxT("%.1f "), + client->GetUploadDatarate() / 1024.0f) + _("kB/s"); + dc->DrawText(buffer, rect.GetX(), rect.GetY()); + } + break; + case ColumnUserProgress: + if ( thePrefs::ShowProgBar() ) { + int iWidth = rect.GetWidth() - 2; + int iHeight = rect.GetHeight() - 2; + + // don't draw Text beyond the bar + dc->SetClippingRegion(rect.GetX(), rect.GetY() + 1, iWidth, iHeight); + + if ( item->GetType() != A4AF_SOURCE ) { + uint32 dwTicks = GetTickCount(); + + wxMemoryDC cdcStatus; + + if ( item->dwUpdated < dwTicks || !item->status || + iWidth != item->status->GetWidth() ) { + + if (item->status == NULL) { + item->status = new wxBitmap(iWidth, iHeight); + } else if ( item->status->GetWidth() != iWidth ) { + // Only recreate if size has changed + item->status->Create(iWidth, iHeight); + } + + cdcStatus.SelectObject(*(item->status)); + + if ( thePrefs::UseFlatBar() ) { + DrawSourceStatusBar( client, &cdcStatus, + wxRect(0, 0, iWidth, iHeight), true); + } else { + DrawSourceStatusBar( client, &cdcStatus, + wxRect(1, 1, iWidth - 2, iHeight - 2), false); + + // Draw black border + cdcStatus.SetPen( *wxBLACK_PEN ); + cdcStatus.SetBrush( *wxTRANSPARENT_BRUSH ); + cdcStatus.DrawRectangle( 0, 0, iWidth, iHeight ); + } + + // Plus ten seconds + item->dwUpdated = dwTicks + 10000; + } else { + cdcStatus.SelectObject(*(item->status)); + } + + dc->Blit(rect.GetX(), rect.GetY() + 1, iWidth, iHeight, &cdcStatus, 0, 0); + } else { + wxString a4af; + CPartFile* p = client->GetRequestFile(); + if (p) { + a4af = p->GetFileName().GetPrintable(); + } else { + a4af = wxT("?"); + } + buffer = CFormat(wxT("%s: %s")) % _("A4AF") % a4af; + + int midx = (2*rect.GetX() + rect.GetWidth()) >> 1; + int midy = (2*rect.GetY() + rect.GetHeight()) >> 1; + + wxCoord txtwidth, txtheight; + + dc->GetTextExtent(buffer, &txtwidth, &txtheight); + + dc->SetTextForeground(*wxBLACK); + dc->DrawText(buffer, wxMax(rect.GetX() + 2, midx - (txtwidth >> 1)), midy - (txtheight >> 1)); + + // Draw black border + dc->SetPen( *wxBLACK_PEN ); + dc->SetBrush( *wxTRANSPARENT_BRUSH ); + dc->DrawRectangle( rect.GetX(), rect.GetY() + 1, iWidth, iHeight ); + } + } + break; + + case ColumnUserVersion: { + dc->DrawText(client->GetClientVerString(), rect.GetX(), rect.GetY()); + break; + } + + case ColumnUserQueueRankRemote: { + // We only show the queue rank for sources actually queued for that file + if ( item->GetType() != A4AF_SOURCE && client->GetDownloadState() == DS_ONQUEUE ) { + sint16 qrDiff = 0; + wxColour savedColour = dc->GetTextForeground(); + if (client->IsRemoteQueueFull()) { + buffer = _("Queue Full"); + } else { + if (client->GetRemoteQueueRank()) { + qrDiff = client->GetRemoteQueueRank() - + client->GetOldRemoteQueueRank(); + if (qrDiff == client->GetRemoteQueueRank() ) { + qrDiff = 0; + } + if ( qrDiff < 0 ) { + dc->SetTextForeground(*wxBLUE); + } + if ( qrDiff > 0 ) { + dc->SetTextForeground(*wxRED); + } + buffer = wxString::Format(_("QR: %u (%i)"), client->GetRemoteQueueRank(), qrDiff); + } else { + buffer = _("QR: ???"); + } + } + dc->DrawText(buffer, rect.GetX(), rect.GetY()); + if (qrDiff) { + dc->SetTextForeground(savedColour); + } + } + break; + } + case ColumnUserQueueRankLocal: + if (item->GetType() != A4AF_SOURCE) { + if (client->GetUploadState() == US_ONUPLOADQUEUE ) { + uint16 nRank = client->GetRankingInfo(); + if (nRank == 0) { + buffer = _("Waiting for upload slot"); + } else { + buffer = wxString::Format(_("QR: %u"), nRank); + } + } else if (client->GetUploadState() == US_UPLOADING) { + buffer = _("Uploading"); + } else { + buffer = _("None"); + } + dc->DrawText(buffer, rect.GetX(), rect.GetY()); + } + break; + case ColumnUserStatus: + if (item->GetType() != A4AF_SOURCE) { + buffer = DownloadStateToStr( client->GetDownloadState(), + client->IsRemoteQueueFull() ); + } else { + buffer = _("Asked for another file"); + if ( client->GetRequestFile() && + client->GetRequestFile()->GetFileName().IsOk()) { + buffer += CFormat(wxT(" (%s)")) + % client->GetRequestFile()->GetFileName(); + } + } + dc->DrawText(buffer, rect.GetX(), rect.GetY()); + break; + // Source comes from? + case ColumnUserOrigin: { + buffer = wxGetTranslation(OriginToText(client->GetSourceFrom())); + dc->DrawText(buffer, rect.GetX(), rect.GetY()); + break; + } + } +} + +int CGenericClientListCtrl::SortProc(wxUIntPtr param1, wxUIntPtr param2, long sortData) +{ + ClientCtrlItem_Struct* item1 = (ClientCtrlItem_Struct*)param1; + ClientCtrlItem_Struct* item2 = (ClientCtrlItem_Struct*)param2; + + int sortMod = (sortData & CMuleListCtrl::SORT_DES) ? -1 : 1; + sortData &= CMuleListCtrl::COLUMN_MASK; + int comp = 0; + + // Two sources, some different possibilites + // Avilable sources first, if we have both an + // available and an unavailable + comp = ( item2->GetType() - item1->GetType() ); + + if (comp) { + // unavailable and available. The order is fixed regardless of sort-order. + return comp; + } else { + comp = Compare(item1->GetSource(), item2->GetSource(), sortData); + } + + // We modify the result so that it matches with ascending or decending + return sortMod * comp; +} + +int CGenericClientListCtrl::Compare( + const CUpDownClient* client1, const CUpDownClient* client2, long lParamSort) +{ + switch (lParamSort) { + // Sort by name + case ColumnUserName: + return CmpAny( client1->GetUserName(), client2->GetUserName() ); + + // Sort by transferred in the following fields + case ColumnUserDownloaded: + return CmpAny( client1->GetTransferredDown(), client2->GetTransferredDown() ); + + // Sort by transferred in the following fields + case ColumnUserUploaded: + return CmpAny( client1->GetTransferredUp(), client2->GetTransferredUp() ); + + // Sort by speed + case ColumnUserSpeedDown: + return CmpAny( client1->GetKBpsDown(), client2->GetKBpsDown() ); + + // Sort by speed + case ColumnUserSpeedUp: + return CmpAny( client1->GetUploadDatarate(), client2->GetUploadDatarate() ); + + // Sort by parts offered + case ColumnUserProgress: + return CmpAny( + client1->GetAvailablePartCount(), + client2->GetAvailablePartCount() ); + + // Sort by client version + case ColumnUserVersion: { + if (client1->GetClientSoft() != client2->GetClientSoft()) { + return client1->GetSoftStr().Cmp(client2->GetSoftStr()); + } + + if (client1->GetVersion() != client2->GetVersion()) { + return CmpAny(client1->GetVersion(), client2->GetVersion()); + } + + return client1->GetClientModString().Cmp(client2->GetClientModString()); + } + + // Sort by Queue-Rank + case ColumnUserQueueRankRemote: { + // This will sort by download state: Downloading, OnQueue, Connecting ... + // However, Asked For Another will always be placed last, due to + // sorting in SortProc + if ( client1->GetDownloadState() != client2->GetDownloadState() ) { + return client1->GetDownloadState() - client2->GetDownloadState(); + } + + // Placing items on queue before items on full queues + if ( client1->IsRemoteQueueFull() ) { + if ( client2->IsRemoteQueueFull() ) { + return 0; + } else { + return 1; + } + } else if ( client2->IsRemoteQueueFull() ) { + return -1; + } else { + if ( client1->GetRemoteQueueRank() ) { + if ( client2->GetRemoteQueueRank() ) { + return CmpAny( + client1->GetRemoteQueueRank(), + client2->GetRemoteQueueRank() ); + } else { + return -1; + } + } else { + if ( client2->GetRemoteQueueRank() ) { + return 1; + } else { + return 0; + } + } + } + } + + // Sort by Queue-Rank + case ColumnUserQueueRankLocal: { + // This will sort by download state: Downloading, OnQueue, Connecting ... + // However, Asked For Another will always be placed last, due to + // sorting in SortProc + if ( client1->GetUploadState() != client2->GetUploadState() ) { + return client1->GetUploadState() - client2->GetUploadState(); + } + + uint16 rank1 = client1->GetRankingInfo(); + uint16 rank2 = client2->GetRankingInfo(); + // Placing items on queue before items on full queues + if ( !rank1 ) { + if ( !rank2 ) { + return 0; + } else { + return 1; + } + } else if ( !rank2 ) { + return -1; + } else { + if ( rank1 ) { + if ( rank2 ) { + return CmpAny( + rank1, + rank2 ); + } else { + return -1; + } + } else { + if ( rank2 ) { + return 1; + } else { + return 0; + } + } + } + } + + // Sort by state + case ColumnUserStatus: { + if (client1->GetDownloadState() == client2->GetDownloadState()) { + return CmpAny( + client1->IsRemoteQueueFull(), + client2->IsRemoteQueueFull() ); + } else { + return CmpAny( + client1->GetDownloadState(), + client2->GetDownloadState() ); + } + } + + // Source of source ;) + case ColumnUserOrigin: + return CmpAny(client1->GetSourceFrom(), client2->GetSourceFrom()); + + default: + return 0; + } +} + + +void CGenericClientListCtrl::ShowSourcesCount( int diff ) +{ + m_clientcount += diff; + wxStaticText* label = CastByID( ID_CLIENTCOUNT, GetParent(), wxStaticText ); + + if (label) { + wxString str = wxString::Format(wxT("%i"), m_clientcount ); + + label->SetLabel( str ); + label->GetParent()->Layout(); + } +} + +static const CMuleColour crBoth(0, 192, 0); +static const CMuleColour crFlatBoth(0, 150, 0); + +static const CMuleColour crNeither(240, 240, 240); +static const CMuleColour crFlatNeither(224, 224, 224); + +static const CMuleColour crClientOnly(104, 104, 104); +static const CMuleColour crFlatClientOnly(0, 0, 0); + +static const CMuleColour crPending(255, 208, 0); +static const CMuleColour crNextPending(255, 255, 100); + +void CGenericClientListCtrl::DrawSourceStatusBar( + const CUpDownClient* source, wxDC* dc, const wxRect& rect, bool bFlat) const +{ + static CBarShader s_StatusBar(16); + + CPartFile* reqfile = source->GetRequestFile(); + + s_StatusBar.SetFileSize( reqfile->GetFileSize() ); + s_StatusBar.SetHeight(rect.height); + s_StatusBar.SetWidth(rect.width); + s_StatusBar.Set3dDepth( thePrefs::Get3DDepth() ); + + // Barry - was only showing one part from client, even when reserved bits from 2 parts + wxString gettingParts = source->ShowDownloadingParts(); + + const BitVector& partStatus = source->GetPartStatus(); + + uint64 uEnd = 0; + for ( uint64 i = 0; i < partStatus.size(); i++ ) { + uint64 uStart = PARTSIZE * i; + uEnd = wxMin(reqfile->GetFileSize(), uStart + PARTSIZE) - 1; + + CMuleColour colour; + if (!partStatus[i]) { + colour = bFlat ? crFlatNeither : crNeither; + } else if ( reqfile->IsComplete(uStart, uEnd)) { + colour = bFlat ? crFlatBoth : crBoth; + } else if ( source->GetDownloadState() == DS_DOWNLOADING && + source->GetLastBlockOffset() <= uEnd && + source->GetLastBlockOffset() >= uStart) { + colour = crPending; + } else if (gettingParts.GetChar((uint16)i) == 'Y') { + colour = crNextPending; + } else { + colour = bFlat ? crFlatClientOnly : crClientOnly; + } + + if ( source->GetRequestFile()->IsStopped() ) { + colour.Blend(50); + } + + s_StatusBar.FillRange(uStart, uEnd, colour); + } + // fill the rest (if partStatus is empty) + s_StatusBar.FillRange(uEnd + 1, reqfile->GetFileSize() - 1, bFlat ? crFlatNeither : crNeither); + + s_StatusBar.Draw(dc, rect.x, rect.y, bFlat); +} + +// File_checked_for_headers diff --git a/src/GenericClientListCtrl.h b/src/GenericClientListCtrl.h new file mode 100644 index 00000000..8d6d90bf --- /dev/null +++ b/src/GenericClientListCtrl.h @@ -0,0 +1,231 @@ +// +// This file is part of the aMule Project. +// +// Copyright (c) 2003-2008 aMule Team ( admin@amule.org / http://www.amule.org ) +// +// Any parts of this program derived from the xMule, lMule or eMule project, +// or contributed by third-party developers are copyrighted by their +// respective authors. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA +// + +#ifndef GENERICCLIENTLISTCTRL_H +#define GENERICCLIENTLISTCTRL_H + +#include // Needed for std::multimap +#include // Needed for std::vector +#include + +#include "Types.h" // Needed for uint8 +#include "Constants.h" // Needed for DownloadItemType +#include "MuleListCtrl.h" // Needed for CMuleListCtrl +#include "amuleDlg.h" // Needed for CamuleDlg::DialogType + +class CUpDownClient; +class CPartFile; +class wxBitmap; +class wxRect; +class wxDC; + +struct ClientCtrlItem_Struct; + +enum GenericColumnEnum { + ColumnUserName = 0, + ColumnUserDownloaded, + ColumnUserUploaded, + ColumnUserSpeedDown, + ColumnUserSpeedUp, + ColumnUserProgress, + ColumnUserVersion, + ColumnUserQueueRankLocal, + ColumnUserQueueRankRemote, + ColumnUserStatus, + ColumnUserOrigin, + ColumnInvalid +}; + +struct CGenericClientListCtrlColumn { + GenericColumnEnum cid; + wxChar* name; + int width; +}; + +struct GenericColumnInfo { + GenericColumnInfo(int n, CGenericClientListCtrlColumn* col) : n_columns(n), columns(col) { }; + int n_columns; + CGenericClientListCtrlColumn* columns; +}; + +typedef std::vector CKnownFileVector; + +/** + * This class is responsible for representing clients in a generic way. + */ + +class CGenericClientListCtrl : public CMuleListCtrl +{ +public: + /** + * Constructor. + * + * @see CMuleListCtrl::CMuleListCtrl for documentation of parameters. + */ + CGenericClientListCtrl( + const wxString& tablename, + wxWindow *parent, + wxWindowID winid, + const wxPoint &pos, + const wxSize &size, + long style, + const wxValidator& validator, + const wxString &name); + + /** + * Destructor. + */ + virtual ~CGenericClientListCtrl(); + + /** + * Initializes the control. We need a 2-stage initialization so the derived class members can be called. + */ + void InitColumnData(); + + /** + * Adds a source belonging to the specified file. + * + * @param owner The owner of this specific source-entry, must be a valid pointer. + * @param source The client object to be added, must be a valid pointer. + * @param type If the source is a current source, or a A4AF source. + * + * Please note that the specified client will only be added to the list if it's + * owner is shown, otherwise the source will simply be ignored. + * Duplicates wont be added. + */ + void AddSource( CKnownFile* owner, CUpDownClient* source, SourceItemType type ); + + /** + * Removes a source from the list. + * + * @param source A pointer to the source to be removed. + * @param owner Either a specific file, or NULL to remove the source from all files. + */ + void RemoveSource( const CUpDownClient* source, const CKnownFile* owner ); + + /** + * Shows the clients of specific files. + * + * @param file A valid, sorted vector of files whose clients will be shown. + * + * WARNING: The received vector *MUST* be odered with std::sort. + * + */ + void ShowSources( const CKnownFileVector& files ); + + /** + * Updates the state of the specified item, possibly causing a redrawing. + * + * @param toupdate The client to be updated. + * @param type If the source is a current source, or a A4AF source. + * + */ + void UpdateItem(const void* toupdate, SourceItemType type); + + void SetShowing( bool status ) { m_showing = status; } + bool GetShowing() const { return m_showing; } + +protected: + // The columns with their attributes; MUST be defined by the derived class. + GenericColumnInfo m_columndata; + static int wxCALLBACK SortProc(wxUIntPtr item1, wxUIntPtr item2, long sortData); + +private: + /** + * + * Must be overriden by the derived class and return the dialog where this list is. + * @see CamuleDlg::DialogType + * + */ + virtual CamuleDlg::DialogType GetParentDialog() = 0; + + /** + * Updates the displayed number representing the amount of clients currently shown. + */ + void ShowSourcesCount( int diff ); + + /** + * Overloaded function needed for custom drawing of items. + */ + virtual void OnDrawItem( int item, wxDC* dc, const wxRect& rect, const wxRect& rectHL, bool highlighted ); + + /** + * Draws a client item. + */ + void DrawClientItem( wxDC* dc, int nColumn, const wxRect& rect, ClientCtrlItem_Struct* item ) const; + + /** + * Draws the download status (chunk) bar for a client. + */ + void DrawSourceStatusBar( const CUpDownClient* source, wxDC* dc, const wxRect& rect, bool bFlat) const; + + static int Compare( const CUpDownClient* client1, const CUpDownClient* client2, long lParamColumnSort); + + // Event-handlers for clients. + void OnSwapSource( wxCommandEvent& event ); + void OnViewFiles( wxCommandEvent& event ); + void OnAddFriend( wxCommandEvent& event ); + void OnSendMessage( wxCommandEvent& event ); + void OnViewClientInfo( wxCommandEvent& event ); + + // Misc event-handlers + void OnItemActivated( wxListEvent& event ); + void OnMouseRightClick( wxListEvent& event ); + void OnMouseMiddleClick( wxListEvent& event ); + void OnKeyPressed( wxKeyEvent& event ); + + //! The type of list used to store items on the listctrl. + typedef std::multimap ListItems; + //! Shortcut to the pair-type used on the list. + typedef ListItems::value_type ListItemsPair; + //! This pair is used when searching for equal-ranges. + typedef std::pair< ListItems::iterator, ListItems::iterator > ListIteratorPair; + + //! This list contains everything shown on the list. Sources are only to + //! be found on this list if they are being displayed + ListItems m_ListItems; + + //! Pointer to the current menu object, used to avoid multiple menus. + wxMenu* m_menu; + //! Cached brush object. + wxBrush m_hilightBrush; + //! Cached brush object. + wxBrush m_hilightUnfocusBrush; + + //! The number of displayed sources + int m_clientcount; + + //! The files being shown, if any. + CKnownFileVector m_knownfiles; + + DECLARE_EVENT_TABLE() + + bool m_showing; + + void RawAddSource(CKnownFile* owner, CUpDownClient* source, SourceItemType type); + void RawRemoveSource( ListItems::iterator& it ); +}; + +#endif +// File_checked_for_headers diff --git a/src/GuiEvents.cpp b/src/GuiEvents.cpp index 540c360c..737b249d 100644 --- a/src/GuiEvents.cpp +++ b/src/GuiEvents.cpp @@ -18,10 +18,11 @@ # include "TransferWnd.h" # include "SharedFilesWnd.h" # include "ServerListCtrl.h" -# include "ClientListCtrl.h" +# include "SourceListCtrl.h" # include "SharedFilesCtrl.h" # include "DownloadListCtrl.h" # include "muuli_wdr.h" +# include "SharedFilePeersListCtrl.h" # include "PartFileConvertDlg.h" #endif @@ -297,80 +298,75 @@ namespace MuleNotify #endif } - void DownloadCtrlAddSource(CPartFile* NOT_ON_DAEMON(owner), CUpDownClient* NOT_ON_DAEMON(source), DownloadItemType NOT_ON_DAEMON(type)) + void DownloadCtrlRemoveFile(CPartFile* file) { + theApp->ECServerHandler->m_ec_notifier->DownloadFile_RemoveFile(file); #ifndef AMULE_DAEMON if (theApp->amuledlg->m_transferwnd && theApp->amuledlg->m_transferwnd->downloadlistctrl) { - if (owner->ShowSources()) { - theApp->amuledlg->m_transferwnd->downloadlistctrl->AddSource(owner, source, type); - } + theApp->amuledlg->m_transferwnd->downloadlistctrl->RemoveFile(file); } #endif } - - void DownloadCtrlRemoveFile(CPartFile* file) + + void DownloadCtrlSort() { - theApp->ECServerHandler->m_ec_notifier->DownloadFile_RemoveFile(file); #ifndef AMULE_DAEMON if (theApp->amuledlg->m_transferwnd && theApp->amuledlg->m_transferwnd->downloadlistctrl) { - theApp->amuledlg->m_transferwnd->downloadlistctrl->RemoveFile(file); + theApp->amuledlg->m_transferwnd->downloadlistctrl->SortList(); } #endif } - void DownloadCtrlRemoveSource(const CUpDownClient* NOT_ON_DAEMON(source), const CPartFile* NOT_ON_DAEMON(owner)) + void SourceCtrlUpdateSource(CUpDownClient* source, SourceItemType type) { #ifndef AMULE_DAEMON - if (theApp->amuledlg->m_transferwnd && theApp->amuledlg->m_transferwnd->downloadlistctrl) { - if ((owner == NULL) || owner->ShowSources()) { - theApp->amuledlg->m_transferwnd->downloadlistctrl->RemoveSource(source, owner); - } + if (theApp->amuledlg->m_transferwnd && theApp->amuledlg->m_transferwnd->clientlistctrl) { + theApp->amuledlg->m_transferwnd->clientlistctrl->UpdateItem(source, type); } #endif } - void DownloadCtrlHideSource(CPartFile* NOT_ON_DAEMON(file)) + void SourceCtrlAddSource(CPartFile* NOT_ON_DAEMON(owner), CUpDownClient* NOT_ON_DAEMON(source), SourceItemType NOT_ON_DAEMON(type)) { #ifndef AMULE_DAEMON - if (theApp->amuledlg->m_transferwnd && theApp->amuledlg->m_transferwnd->downloadlistctrl) { - theApp->amuledlg->m_transferwnd->downloadlistctrl->ShowSources(file, false); + if (theApp->amuledlg->m_transferwnd && theApp->amuledlg->m_transferwnd->clientlistctrl) { + theApp->amuledlg->m_transferwnd->clientlistctrl->AddSource(owner, source, type); } #endif } - - void DownloadCtrlSort() + + void SourceCtrlRemoveSource(const CUpDownClient* NOT_ON_DAEMON(source), const CPartFile* NOT_ON_DAEMON(owner)) { #ifndef AMULE_DAEMON - if (theApp->amuledlg->m_transferwnd && theApp->amuledlg->m_transferwnd->downloadlistctrl) { - theApp->amuledlg->m_transferwnd->downloadlistctrl->SortList(); + if (theApp->amuledlg->m_transferwnd && theApp->amuledlg->m_transferwnd->clientlistctrl) { + theApp->amuledlg->m_transferwnd->clientlistctrl->RemoveSource(source, owner); } #endif } - - void ClientCtrlAddClient(CUpDownClient* NOT_ON_DAEMON(client), ViewType NOT_ON_DAEMON(type)) + void SharedCtrlAddClient(CKnownFile* NOT_ON_DAEMON(owner), CUpDownClient* NOT_ON_DAEMON(source), SourceItemType type) { #ifndef AMULE_DAEMON - if (theApp->amuledlg->m_transferwnd && theApp->amuledlg->m_transferwnd->clientlistctrl) { - theApp->amuledlg->m_transferwnd->clientlistctrl->InsertClient(client, type); + if (theApp->amuledlg->m_sharedfileswnd && theApp->amuledlg->m_sharedfileswnd->peerslistctrl) { + theApp->amuledlg->m_sharedfileswnd->peerslistctrl->AddSource(owner, source, type); } #endif } - void ClientCtrlRefreshClient(CUpDownClient* NOT_ON_DAEMON(client), ViewType NOT_ON_DAEMON(type)) + void SharedCtrlRefreshClient(CUpDownClient* NOT_ON_DAEMON(client), SourceItemType type) { #ifndef AMULE_DAEMON - if (theApp->amuledlg->m_transferwnd && theApp->amuledlg->m_transferwnd->clientlistctrl) { - theApp->amuledlg->m_transferwnd->clientlistctrl->UpdateClient(client, type); + if (theApp->amuledlg->m_sharedfileswnd && theApp->amuledlg->m_sharedfileswnd->peerslistctrl) { + theApp->amuledlg->m_sharedfileswnd->peerslistctrl->UpdateItem(client, type); } #endif } - void ClientCtrlRemoveClient(CUpDownClient* NOT_ON_DAEMON(client), ViewType NOT_ON_DAEMON(type)) + void SharedCtrlRemoveClient(const CKnownFile* NOT_ON_DAEMON(owner), const CUpDownClient* NOT_ON_DAEMON(source)) { #ifndef AMULE_DAEMON - if (theApp->amuledlg->m_transferwnd && theApp->amuledlg->m_transferwnd->clientlistctrl) { - theApp->amuledlg->m_transferwnd->clientlistctrl->RemoveClient(client, type); + if (theApp->amuledlg->m_sharedfileswnd && theApp->amuledlg->m_sharedfileswnd->peerslistctrl) { + theApp->amuledlg->m_sharedfileswnd->peerslistctrl->RemoveSource(source, owner); } #endif } diff --git a/src/GuiEvents.h b/src/GuiEvents.h index d477dc5c..12c7f41a 100644 --- a/src/GuiEvents.h +++ b/src/GuiEvents.h @@ -85,16 +85,17 @@ namespace MuleNotify void SharedFilesUpdateItem(CKnownFile* file); void DownloadCtrlUpdateItem(const void* item); + void SourceCtrlUpdateSource(CUpDownClient* source, SourceItemType type); void DownloadCtrlAddFile(CPartFile* file); - void DownloadCtrlAddSource(CPartFile* owner, CUpDownClient* source, DownloadItemType type); + void SourceCtrlAddSource(CPartFile* owner, CUpDownClient* source, SourceItemType type); void DownloadCtrlRemoveFile(CPartFile* file); - void DownloadCtrlRemoveSource(const CUpDownClient* source, const CPartFile* owner); + void SourceCtrlRemoveSource(const CUpDownClient* source, const CPartFile* owner); void DownloadCtrlHideSource(CPartFile* file); void DownloadCtrlSort(); - void ClientCtrlAddClient(CUpDownClient* client, ViewType type); - void ClientCtrlRefreshClient(CUpDownClient* client, ViewType type); - void ClientCtrlRemoveClient(CUpDownClient* client, ViewType type); + void SharedCtrlAddClient(CKnownFile* owner, CUpDownClient* client, SourceItemType type); + void SharedCtrlRefreshClient(CUpDownClient* client, SourceItemType type); + void SharedCtrlRemoveClient(const CKnownFile* owner, const CUpDownClient* client); void ServerAdd(CServer* server); void ServerRemove(CServer* server); @@ -422,26 +423,18 @@ typedef void (wxEvtHandler::*MuleNotifyEventFunction)(CMuleGUIEvent&); // download ctrl #define Notify_DownloadCtrlUpdateItem(ptr) MuleNotify::DoNotify(&MuleNotify::DownloadCtrlUpdateItem, ptr) #define Notify_DownloadCtrlAddFile(file) MuleNotify::DoNotify(&MuleNotify::DownloadCtrlAddFile, file) -#define Notify_DownloadCtrlAddSource(p0, p1, val) MuleNotify::DoNotify(&MuleNotify::DownloadCtrlAddSource, p0, p1, val) #define Notify_DownloadCtrlRemoveFile(file) MuleNotify::DoNotify(&MuleNotify::DownloadCtrlRemoveFile, file) -#define Notify_DownloadCtrlRemoveSource(ptr0, ptr1) MuleNotify::DoNotify(&MuleNotify::DownloadCtrlRemoveSource, ptr0, ptr1) -#define Notify_DownloadCtrlHideSource(ptr) MuleNotify::DoNotify(&MuleNotify::DownloadCtrlHideSource, ptr) #define Notify_DownloadCtrlSort() MuleNotify::DoNotify(&MuleNotify::DownloadCtrlSort) +// source ctrl +#define Notify_SourceCtrlUpdateSource(ptr, val) MuleNotify::DoNotify(&MuleNotify::SourceCtrlUpdateSource, ptr, val) +#define Notify_SourceCtrlAddSource(p0, p1, val) MuleNotify::DoNotify(&MuleNotify::SourceCtrlAddSource, p0, p1, val) +#define Notify_SourceCtrlRemoveSource(ptr0, ptr1) MuleNotify::DoNotify(&MuleNotify::SourceCtrlRemoveSource, ptr0, ptr1) + // upload ctrl -#define Notify_UploadCtrlAddClient(ptr) MuleNotify::DoNotify(&MuleNotify::ClientCtrlAddClient, ptr, vtUploading) -#define Notify_UploadCtrlRefreshClient(ptr) MuleNotify::DoNotify(&MuleNotify::ClientCtrlRefreshClient, ptr, vtUploading) -#define Notify_UploadCtrlRemoveClient(ptr) MuleNotify::DoNotify(&MuleNotify::ClientCtrlRemoveClient, ptr, vtUploading) - -// client ctrl -#define Notify_ClientCtrlAddClient(ptr) MuleNotify::DoNotify(&MuleNotify::ClientCtrlAddClient, ptr, vtClients) -#define Notify_ClientCtrlRefreshClient(ptr) MuleNotify::DoNotify(&MuleNotify::ClientCtrlRefreshClient, ptr, vtClients) -#define Notify_ClientCtrlRemoveClient(ptr) MuleNotify::DoNotify(&MuleNotify::ClientCtrlRemoveClient, ptr, vtClients) - -// queue list -#define Notify_QlistAddClient(ptr) MuleNotify::DoNotify(&MuleNotify::ClientCtrlAddClient, ptr, vtQueued) -#define Notify_QlistRefreshClient(ptr) MuleNotify::DoNotify(&MuleNotify::ClientCtrlRefreshClient, ptr, vtQueued) -#define Notify_QlistRemoveClient(ptr) MuleNotify::DoNotify(&MuleNotify::ClientCtrlRemoveClient, ptr, vtQueued) +#define Notify_SharedCtrlAddClient(p0, p1, val) MuleNotify::DoNotify(&MuleNotify::SharedCtrlAddClient, p0, p1, val) +#define Notify_SharedCtrlRefreshClient(ptr, val) MuleNotify::DoNotify(&MuleNotify::SharedCtrlRefreshClient, ptr, val) +#define Notify_SharedCtrlRemoveClient(p0, p1) MuleNotify::DoNotify(&MuleNotify::SharedCtrlRemoveClient, p0, p1) // server #define Notify_ServerAdd(ptr) MuleNotify::DoNotify(&MuleNotify::ServerAdd, ptr) diff --git a/src/KnownFile.cpp b/src/KnownFile.cpp index 71b64e49..2ade44cb 100644 --- a/src/KnownFile.cpp +++ b/src/KnownFile.cpp @@ -299,6 +299,7 @@ CAbstractFile(static_cast(searchFile)) void CKnownFile::Init() { + m_showSources = false; m_nCompleteSourcesTime = time(NULL); m_nCompleteSourcesCount = 0; m_nCompleteSourcesCountLo = 0; @@ -454,6 +455,19 @@ void CKnownFile::AddUploadingClient(CUpDownClient* client) { m_ClientUploadList.insert(client); + SourceItemType type = UNAVAILABLE_SOURCE; + switch (client->GetUploadState()) { + case US_UPLOADING: + case US_ONUPLOADQUEUE: + type = AVAILABLE_SOURCE; + break; + default: { + // Any other state is UNAVAILABLE_SOURCE by default. + } + } + + Notify_SharedCtrlAddClient(this, client, type); + UpdateAutoUpPriority(); } @@ -461,6 +475,7 @@ void CKnownFile::AddUploadingClient(CUpDownClient* client) void CKnownFile::RemoveUploadingClient(CUpDownClient* client) { if (m_ClientUploadList.erase(client)) { + Notify_SharedCtrlRemoveClient(this, client); UpdateAutoUpPriority(); } } diff --git a/src/KnownFile.h b/src/KnownFile.h index 3ec1a014..d14d1a47 100644 --- a/src/KnownFile.h +++ b/src/KnownFile.h @@ -260,7 +260,7 @@ public: uint16 m_nCompleteSourcesCountLo; uint16 m_nCompleteSourcesCountHi; - // Maybe find a common place for this typedef? + // Common for part and known files. typedef std::set SourceSet; SourceSet m_ClientUploadList; ArrayOfUInts16 m_AvailPartFrequency; @@ -293,6 +293,8 @@ public: virtual wxString GetFeedback() const; + void SetShowSources( bool val ) { m_showSources = val; } + bool ShowSources() const { return m_showSources; } #ifdef CLIENT_GUI CKnownFile(CEC_SharedFile_Tag *); @@ -342,6 +344,7 @@ protected: uint32 m_lastPublishTimeKadNotes; uint32 m_lastBuddyIP; + bool m_showSources; private: /** Common initializations for constructors. */ void Init(); diff --git a/src/Makefile.am b/src/Makefile.am index f1a9409f..4099eb6f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -66,7 +66,6 @@ libmuleappcommon_a_SOURCES = \ GapList.cpp \ MagnetURI.cpp \ MemFile.cpp \ - NetworkFunctions.cpp \ Packet.cpp \ RLE.cpp \ SafeFile.cpp \ @@ -174,6 +173,7 @@ gui_sources = \ AddFriend.cpp \ CatDialog.cpp \ ChatSelector.cpp \ + GenericClientListCtrl.cpp \ ClientDetailDialog.cpp \ DirectoryTreeCtrl.cpp \ FileDetailDialog.cpp \ @@ -187,7 +187,8 @@ gui_sources = \ StatisticsDlg.cpp \ SearchListCtrl.cpp \ DownloadListCtrl.cpp \ - ClientListCtrl.cpp \ + SourceListCtrl.cpp \ + SharedFilePeersListCtrl.cpp \ FriendListCtrl.cpp \ ServerListCtrl.cpp \ SharedFilesCtrl.cpp \ @@ -329,7 +330,7 @@ noinst_HEADERS = \ ClientCredits.h \ ClientCreditsList.h \ ClientDetailDialog.h \ - ClientListCtrl.h \ + SharedFilePeersListCtrl.h \ ClientList.h \ ClientTCPSocket.h \ ClientUDPSocket.h \ @@ -361,6 +362,7 @@ noinst_HEADERS = \ FriendList.h \ GapList.h \ GetTickCount.h \ + GenericClientListCtrl.h \ GuiEvents.h \ HTTPDownload.h \ inetdownload.h \ @@ -424,6 +426,7 @@ noinst_HEADERS = \ SharedFileList.h \ SharedFilesCtrl.h \ SharedFilesWnd.h \ + SourceListCtrl.h \ StateMachine.h \ StatisticsDlg.h \ Statistics.h \ diff --git a/src/Makefile.in b/src/Makefile.in index 7080346e..d95e3cb9 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -91,7 +91,6 @@ am_libmuleappcommon_a_OBJECTS = libmuleappcommon_a-CFile.$(OBJEXT) \ libmuleappcommon_a-GapList.$(OBJEXT) \ libmuleappcommon_a-MagnetURI.$(OBJEXT) \ libmuleappcommon_a-MemFile.$(OBJEXT) \ - libmuleappcommon_a-NetworkFunctions.$(OBJEXT) \ libmuleappcommon_a-Packet.$(OBJEXT) \ libmuleappcommon_a-RLE.$(OBJEXT) \ libmuleappcommon_a-SafeFile.$(OBJEXT) \ @@ -176,6 +175,7 @@ am__objects_1 = amule-amule.$(OBJEXT) amule-BaseClient.$(OBJEXT) \ am__objects_2 = amule-amule-gui.$(OBJEXT) amule-amuleDlg.$(OBJEXT) \ amule-AddFriend.$(OBJEXT) amule-CatDialog.$(OBJEXT) \ amule-ChatSelector.$(OBJEXT) \ + amule-GenericClientListCtrl.$(OBJEXT) \ amule-ClientDetailDialog.$(OBJEXT) \ amule-DirectoryTreeCtrl.$(OBJEXT) \ amule-FileDetailDialog.$(OBJEXT) amule-KadDlg.$(OBJEXT) \ @@ -184,10 +184,11 @@ am__objects_2 = amule-amule-gui.$(OBJEXT) amule-amuleDlg.$(OBJEXT) \ amule-ServerWnd.$(OBJEXT) amule-SharedFilesWnd.$(OBJEXT) \ amule-StatisticsDlg.$(OBJEXT) amule-SearchListCtrl.$(OBJEXT) \ amule-DownloadListCtrl.$(OBJEXT) \ - amule-ClientListCtrl.$(OBJEXT) amule-FriendListCtrl.$(OBJEXT) \ - amule-ServerListCtrl.$(OBJEXT) amule-SharedFilesCtrl.$(OBJEXT) \ - amule-MuleTrayIcon.$(OBJEXT) amule-MuleColour.$(OBJEXT) \ - amule-TransferWnd.$(OBJEXT) + amule-SourceListCtrl.$(OBJEXT) \ + amule-SharedFilePeersListCtrl.$(OBJEXT) \ + amule-FriendListCtrl.$(OBJEXT) amule-ServerListCtrl.$(OBJEXT) \ + amule-SharedFilesCtrl.$(OBJEXT) amule-MuleTrayIcon.$(OBJEXT) \ + amule-MuleColour.$(OBJEXT) amule-TransferWnd.$(OBJEXT) am__objects_3 = amule-OtherFunctions.$(OBJEXT) \ amule-NetworkFunctions.$(OBJEXT) am__objects_4 = amule-amuleAppCommon.$(OBJEXT) \ @@ -266,6 +267,7 @@ amuled_OBJECTS = $(am_amuled_OBJECTS) $(nodist_amuled_OBJECTS) am__objects_9 = amulegui-amule-gui.$(OBJEXT) \ amulegui-amuleDlg.$(OBJEXT) amulegui-AddFriend.$(OBJEXT) \ amulegui-CatDialog.$(OBJEXT) amulegui-ChatSelector.$(OBJEXT) \ + amulegui-GenericClientListCtrl.$(OBJEXT) \ amulegui-ClientDetailDialog.$(OBJEXT) \ amulegui-DirectoryTreeCtrl.$(OBJEXT) \ amulegui-FileDetailDialog.$(OBJEXT) amulegui-KadDlg.$(OBJEXT) \ @@ -277,7 +279,8 @@ am__objects_9 = amulegui-amule-gui.$(OBJEXT) \ amulegui-StatisticsDlg.$(OBJEXT) \ amulegui-SearchListCtrl.$(OBJEXT) \ amulegui-DownloadListCtrl.$(OBJEXT) \ - amulegui-ClientListCtrl.$(OBJEXT) \ + amulegui-SourceListCtrl.$(OBJEXT) \ + amulegui-SharedFilePeersListCtrl.$(OBJEXT) \ amulegui-FriendListCtrl.$(OBJEXT) \ amulegui-ServerListCtrl.$(OBJEXT) \ amulegui-SharedFilesCtrl.$(OBJEXT) \ @@ -602,7 +605,6 @@ libmuleappcommon_a_SOURCES = \ GapList.cpp \ MagnetURI.cpp \ MemFile.cpp \ - NetworkFunctions.cpp \ Packet.cpp \ RLE.cpp \ SafeFile.cpp \ @@ -704,6 +706,7 @@ gui_sources = \ AddFriend.cpp \ CatDialog.cpp \ ChatSelector.cpp \ + GenericClientListCtrl.cpp \ ClientDetailDialog.cpp \ DirectoryTreeCtrl.cpp \ FileDetailDialog.cpp \ @@ -717,7 +720,8 @@ gui_sources = \ StatisticsDlg.cpp \ SearchListCtrl.cpp \ DownloadListCtrl.cpp \ - ClientListCtrl.cpp \ + SourceListCtrl.cpp \ + SharedFilePeersListCtrl.cpp \ FriendListCtrl.cpp \ ServerListCtrl.cpp \ SharedFilesCtrl.cpp \ @@ -847,7 +851,7 @@ noinst_HEADERS = \ ClientCredits.h \ ClientCreditsList.h \ ClientDetailDialog.h \ - ClientListCtrl.h \ + SharedFilePeersListCtrl.h \ ClientList.h \ ClientTCPSocket.h \ ClientUDPSocket.h \ @@ -879,6 +883,7 @@ noinst_HEADERS = \ FriendList.h \ GapList.h \ GetTickCount.h \ + GenericClientListCtrl.h \ GuiEvents.h \ HTTPDownload.h \ inetdownload.h \ @@ -942,6 +947,7 @@ noinst_HEADERS = \ SharedFileList.h \ SharedFilesCtrl.h \ SharedFilesWnd.h \ + SourceListCtrl.h \ StateMachine.h \ StatisticsDlg.h \ Statistics.h \ @@ -1077,7 +1083,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amule-ClientCreditsList.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amule-ClientDetailDialog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amule-ClientList.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amule-ClientListCtrl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amule-ClientTCPSocket.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amule-ClientUDPSocket.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amule-CorruptionBlackBox.Po@am__quote@ @@ -1094,6 +1099,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amule-FileDetailDialog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amule-FriendList.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amule-FriendListCtrl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amule-GenericClientListCtrl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amule-GetTickCount.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amule-GuiEvents.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amule-HTTPDownload.Po@am__quote@ @@ -1135,8 +1141,10 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amule-ServerUDPSocket.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amule-ServerWnd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amule-SharedFileList.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amule-SharedFilePeersListCtrl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amule-SharedFilesCtrl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amule-SharedFilesWnd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amule-SourceListCtrl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amule-StatTree.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amule-Statistics.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amule-StatisticsDlg.Po@am__quote@ @@ -1225,12 +1233,12 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amulegui-ChatSelector.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amulegui-ClientCredits.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amulegui-ClientDetailDialog.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amulegui-ClientListCtrl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amulegui-DirectoryTreeCtrl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amulegui-DownloadListCtrl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amulegui-ECSpecialMuleTags.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amulegui-FileDetailDialog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amulegui-FriendListCtrl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amulegui-GenericClientListCtrl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amulegui-GetTickCount.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amulegui-GuiEvents.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amulegui-HTTPDownload.Po@am__quote@ @@ -1253,8 +1261,10 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amulegui-Server.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amulegui-ServerListCtrl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amulegui-ServerWnd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amulegui-SharedFilePeersListCtrl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amulegui-SharedFilesCtrl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amulegui-SharedFilesWnd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amulegui-SourceListCtrl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amulegui-StatTree.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amulegui-Statistics.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amulegui-StatisticsDlg.Po@am__quote@ @@ -1274,7 +1284,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmuleappcommon_a-GapList.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmuleappcommon_a-MagnetURI.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmuleappcommon_a-MemFile.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmuleappcommon_a-NetworkFunctions.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmuleappcommon_a-Packet.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmuleappcommon_a-RLE.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmuleappcommon_a-SHA.Po@am__quote@ @@ -1413,20 +1422,6 @@ libmuleappcommon_a-MemFile.obj: MemFile.cpp @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmuleappcommon_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libmuleappcommon_a-MemFile.obj `if test -f 'MemFile.cpp'; then $(CYGPATH_W) 'MemFile.cpp'; else $(CYGPATH_W) '$(srcdir)/MemFile.cpp'; fi` -libmuleappcommon_a-NetworkFunctions.o: NetworkFunctions.cpp -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmuleappcommon_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libmuleappcommon_a-NetworkFunctions.o -MD -MP -MF "$(DEPDIR)/libmuleappcommon_a-NetworkFunctions.Tpo" -c -o libmuleappcommon_a-NetworkFunctions.o `test -f 'NetworkFunctions.cpp' || echo '$(srcdir)/'`NetworkFunctions.cpp; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libmuleappcommon_a-NetworkFunctions.Tpo" "$(DEPDIR)/libmuleappcommon_a-NetworkFunctions.Po"; else rm -f "$(DEPDIR)/libmuleappcommon_a-NetworkFunctions.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='NetworkFunctions.cpp' object='libmuleappcommon_a-NetworkFunctions.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmuleappcommon_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libmuleappcommon_a-NetworkFunctions.o `test -f 'NetworkFunctions.cpp' || echo '$(srcdir)/'`NetworkFunctions.cpp - -libmuleappcommon_a-NetworkFunctions.obj: NetworkFunctions.cpp -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmuleappcommon_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libmuleappcommon_a-NetworkFunctions.obj -MD -MP -MF "$(DEPDIR)/libmuleappcommon_a-NetworkFunctions.Tpo" -c -o libmuleappcommon_a-NetworkFunctions.obj `if test -f 'NetworkFunctions.cpp'; then $(CYGPATH_W) 'NetworkFunctions.cpp'; else $(CYGPATH_W) '$(srcdir)/NetworkFunctions.cpp'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libmuleappcommon_a-NetworkFunctions.Tpo" "$(DEPDIR)/libmuleappcommon_a-NetworkFunctions.Po"; else rm -f "$(DEPDIR)/libmuleappcommon_a-NetworkFunctions.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='NetworkFunctions.cpp' object='libmuleappcommon_a-NetworkFunctions.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmuleappcommon_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libmuleappcommon_a-NetworkFunctions.obj `if test -f 'NetworkFunctions.cpp'; then $(CYGPATH_W) 'NetworkFunctions.cpp'; else $(CYGPATH_W) '$(srcdir)/NetworkFunctions.cpp'; fi` - libmuleappcommon_a-Packet.o: Packet.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmuleappcommon_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libmuleappcommon_a-Packet.o -MD -MP -MF "$(DEPDIR)/libmuleappcommon_a-Packet.Tpo" -c -o libmuleappcommon_a-Packet.o `test -f 'Packet.cpp' || echo '$(srcdir)/'`Packet.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libmuleappcommon_a-Packet.Tpo" "$(DEPDIR)/libmuleappcommon_a-Packet.Po"; else rm -f "$(DEPDIR)/libmuleappcommon_a-Packet.Tpo"; exit 1; fi @@ -2659,6 +2654,20 @@ amule-ChatSelector.obj: ChatSelector.cpp @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(amule_CPPFLAGS) $(CPPFLAGS) $(amule_CXXFLAGS) $(CXXFLAGS) -c -o amule-ChatSelector.obj `if test -f 'ChatSelector.cpp'; then $(CYGPATH_W) 'ChatSelector.cpp'; else $(CYGPATH_W) '$(srcdir)/ChatSelector.cpp'; fi` +amule-GenericClientListCtrl.o: GenericClientListCtrl.cpp +@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(amule_CPPFLAGS) $(CPPFLAGS) $(amule_CXXFLAGS) $(CXXFLAGS) -MT amule-GenericClientListCtrl.o -MD -MP -MF "$(DEPDIR)/amule-GenericClientListCtrl.Tpo" -c -o amule-GenericClientListCtrl.o `test -f 'GenericClientListCtrl.cpp' || echo '$(srcdir)/'`GenericClientListCtrl.cpp; \ +@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/amule-GenericClientListCtrl.Tpo" "$(DEPDIR)/amule-GenericClientListCtrl.Po"; else rm -f "$(DEPDIR)/amule-GenericClientListCtrl.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='GenericClientListCtrl.cpp' object='amule-GenericClientListCtrl.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(amule_CPPFLAGS) $(CPPFLAGS) $(amule_CXXFLAGS) $(CXXFLAGS) -c -o amule-GenericClientListCtrl.o `test -f 'GenericClientListCtrl.cpp' || echo '$(srcdir)/'`GenericClientListCtrl.cpp + +amule-GenericClientListCtrl.obj: GenericClientListCtrl.cpp +@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(amule_CPPFLAGS) $(CPPFLAGS) $(amule_CXXFLAGS) $(CXXFLAGS) -MT amule-GenericClientListCtrl.obj -MD -MP -MF "$(DEPDIR)/amule-GenericClientListCtrl.Tpo" -c -o amule-GenericClientListCtrl.obj `if test -f 'GenericClientListCtrl.cpp'; then $(CYGPATH_W) 'GenericClientListCtrl.cpp'; else $(CYGPATH_W) '$(srcdir)/GenericClientListCtrl.cpp'; fi`; \ +@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/amule-GenericClientListCtrl.Tpo" "$(DEPDIR)/amule-GenericClientListCtrl.Po"; else rm -f "$(DEPDIR)/amule-GenericClientListCtrl.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='GenericClientListCtrl.cpp' object='amule-GenericClientListCtrl.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(amule_CPPFLAGS) $(CPPFLAGS) $(amule_CXXFLAGS) $(CXXFLAGS) -c -o amule-GenericClientListCtrl.obj `if test -f 'GenericClientListCtrl.cpp'; then $(CYGPATH_W) 'GenericClientListCtrl.cpp'; else $(CYGPATH_W) '$(srcdir)/GenericClientListCtrl.cpp'; fi` + amule-ClientDetailDialog.o: ClientDetailDialog.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(amule_CPPFLAGS) $(CPPFLAGS) $(amule_CXXFLAGS) $(CXXFLAGS) -MT amule-ClientDetailDialog.o -MD -MP -MF "$(DEPDIR)/amule-ClientDetailDialog.Tpo" -c -o amule-ClientDetailDialog.o `test -f 'ClientDetailDialog.cpp' || echo '$(srcdir)/'`ClientDetailDialog.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/amule-ClientDetailDialog.Tpo" "$(DEPDIR)/amule-ClientDetailDialog.Po"; else rm -f "$(DEPDIR)/amule-ClientDetailDialog.Tpo"; exit 1; fi @@ -2841,19 +2850,33 @@ amule-DownloadListCtrl.obj: DownloadListCtrl.cpp @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(amule_CPPFLAGS) $(CPPFLAGS) $(amule_CXXFLAGS) $(CXXFLAGS) -c -o amule-DownloadListCtrl.obj `if test -f 'DownloadListCtrl.cpp'; then $(CYGPATH_W) 'DownloadListCtrl.cpp'; else $(CYGPATH_W) '$(srcdir)/DownloadListCtrl.cpp'; fi` -amule-ClientListCtrl.o: ClientListCtrl.cpp -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(amule_CPPFLAGS) $(CPPFLAGS) $(amule_CXXFLAGS) $(CXXFLAGS) -MT amule-ClientListCtrl.o -MD -MP -MF "$(DEPDIR)/amule-ClientListCtrl.Tpo" -c -o amule-ClientListCtrl.o `test -f 'ClientListCtrl.cpp' || echo '$(srcdir)/'`ClientListCtrl.cpp; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/amule-ClientListCtrl.Tpo" "$(DEPDIR)/amule-ClientListCtrl.Po"; else rm -f "$(DEPDIR)/amule-ClientListCtrl.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ClientListCtrl.cpp' object='amule-ClientListCtrl.o' libtool=no @AMDEPBACKSLASH@ +amule-SourceListCtrl.o: SourceListCtrl.cpp +@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(amule_CPPFLAGS) $(CPPFLAGS) $(amule_CXXFLAGS) $(CXXFLAGS) -MT amule-SourceListCtrl.o -MD -MP -MF "$(DEPDIR)/amule-SourceListCtrl.Tpo" -c -o amule-SourceListCtrl.o `test -f 'SourceListCtrl.cpp' || echo '$(srcdir)/'`SourceListCtrl.cpp; \ +@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/amule-SourceListCtrl.Tpo" "$(DEPDIR)/amule-SourceListCtrl.Po"; else rm -f "$(DEPDIR)/amule-SourceListCtrl.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='SourceListCtrl.cpp' object='amule-SourceListCtrl.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(amule_CPPFLAGS) $(CPPFLAGS) $(amule_CXXFLAGS) $(CXXFLAGS) -c -o amule-SourceListCtrl.o `test -f 'SourceListCtrl.cpp' || echo '$(srcdir)/'`SourceListCtrl.cpp + +amule-SourceListCtrl.obj: SourceListCtrl.cpp +@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(amule_CPPFLAGS) $(CPPFLAGS) $(amule_CXXFLAGS) $(CXXFLAGS) -MT amule-SourceListCtrl.obj -MD -MP -MF "$(DEPDIR)/amule-SourceListCtrl.Tpo" -c -o amule-SourceListCtrl.obj `if test -f 'SourceListCtrl.cpp'; then $(CYGPATH_W) 'SourceListCtrl.cpp'; else $(CYGPATH_W) '$(srcdir)/SourceListCtrl.cpp'; fi`; \ +@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/amule-SourceListCtrl.Tpo" "$(DEPDIR)/amule-SourceListCtrl.Po"; else rm -f "$(DEPDIR)/amule-SourceListCtrl.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='SourceListCtrl.cpp' object='amule-SourceListCtrl.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(amule_CPPFLAGS) $(CPPFLAGS) $(amule_CXXFLAGS) $(CXXFLAGS) -c -o amule-ClientListCtrl.o `test -f 'ClientListCtrl.cpp' || echo '$(srcdir)/'`ClientListCtrl.cpp +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(amule_CPPFLAGS) $(CPPFLAGS) $(amule_CXXFLAGS) $(CXXFLAGS) -c -o amule-SourceListCtrl.obj `if test -f 'SourceListCtrl.cpp'; then $(CYGPATH_W) 'SourceListCtrl.cpp'; else $(CYGPATH_W) '$(srcdir)/SourceListCtrl.cpp'; fi` -amule-ClientListCtrl.obj: ClientListCtrl.cpp -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(amule_CPPFLAGS) $(CPPFLAGS) $(amule_CXXFLAGS) $(CXXFLAGS) -MT amule-ClientListCtrl.obj -MD -MP -MF "$(DEPDIR)/amule-ClientListCtrl.Tpo" -c -o amule-ClientListCtrl.obj `if test -f 'ClientListCtrl.cpp'; then $(CYGPATH_W) 'ClientListCtrl.cpp'; else $(CYGPATH_W) '$(srcdir)/ClientListCtrl.cpp'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/amule-ClientListCtrl.Tpo" "$(DEPDIR)/amule-ClientListCtrl.Po"; else rm -f "$(DEPDIR)/amule-ClientListCtrl.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ClientListCtrl.cpp' object='amule-ClientListCtrl.obj' libtool=no @AMDEPBACKSLASH@ +amule-SharedFilePeersListCtrl.o: SharedFilePeersListCtrl.cpp +@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(amule_CPPFLAGS) $(CPPFLAGS) $(amule_CXXFLAGS) $(CXXFLAGS) -MT amule-SharedFilePeersListCtrl.o -MD -MP -MF "$(DEPDIR)/amule-SharedFilePeersListCtrl.Tpo" -c -o amule-SharedFilePeersListCtrl.o `test -f 'SharedFilePeersListCtrl.cpp' || echo '$(srcdir)/'`SharedFilePeersListCtrl.cpp; \ +@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/amule-SharedFilePeersListCtrl.Tpo" "$(DEPDIR)/amule-SharedFilePeersListCtrl.Po"; else rm -f "$(DEPDIR)/amule-SharedFilePeersListCtrl.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='SharedFilePeersListCtrl.cpp' object='amule-SharedFilePeersListCtrl.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(amule_CPPFLAGS) $(CPPFLAGS) $(amule_CXXFLAGS) $(CXXFLAGS) -c -o amule-ClientListCtrl.obj `if test -f 'ClientListCtrl.cpp'; then $(CYGPATH_W) 'ClientListCtrl.cpp'; else $(CYGPATH_W) '$(srcdir)/ClientListCtrl.cpp'; fi` +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(amule_CPPFLAGS) $(CPPFLAGS) $(amule_CXXFLAGS) $(CXXFLAGS) -c -o amule-SharedFilePeersListCtrl.o `test -f 'SharedFilePeersListCtrl.cpp' || echo '$(srcdir)/'`SharedFilePeersListCtrl.cpp + +amule-SharedFilePeersListCtrl.obj: SharedFilePeersListCtrl.cpp +@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(amule_CPPFLAGS) $(CPPFLAGS) $(amule_CXXFLAGS) $(CXXFLAGS) -MT amule-SharedFilePeersListCtrl.obj -MD -MP -MF "$(DEPDIR)/amule-SharedFilePeersListCtrl.Tpo" -c -o amule-SharedFilePeersListCtrl.obj `if test -f 'SharedFilePeersListCtrl.cpp'; then $(CYGPATH_W) 'SharedFilePeersListCtrl.cpp'; else $(CYGPATH_W) '$(srcdir)/SharedFilePeersListCtrl.cpp'; fi`; \ +@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/amule-SharedFilePeersListCtrl.Tpo" "$(DEPDIR)/amule-SharedFilePeersListCtrl.Po"; else rm -f "$(DEPDIR)/amule-SharedFilePeersListCtrl.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='SharedFilePeersListCtrl.cpp' object='amule-SharedFilePeersListCtrl.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(amule_CPPFLAGS) $(CPPFLAGS) $(amule_CXXFLAGS) $(CXXFLAGS) -c -o amule-SharedFilePeersListCtrl.obj `if test -f 'SharedFilePeersListCtrl.cpp'; then $(CYGPATH_W) 'SharedFilePeersListCtrl.cpp'; else $(CYGPATH_W) '$(srcdir)/SharedFilePeersListCtrl.cpp'; fi` amule-FriendListCtrl.o: FriendListCtrl.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(amule_CPPFLAGS) $(CPPFLAGS) $(amule_CXXFLAGS) $(CXXFLAGS) -MT amule-FriendListCtrl.o -MD -MP -MF "$(DEPDIR)/amule-FriendListCtrl.Tpo" -c -o amule-FriendListCtrl.o `test -f 'FriendListCtrl.cpp' || echo '$(srcdir)/'`FriendListCtrl.cpp; \ @@ -4227,6 +4250,20 @@ amulegui-ChatSelector.obj: ChatSelector.cpp @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(amulegui_CPPFLAGS) $(CPPFLAGS) $(amulegui_CXXFLAGS) $(CXXFLAGS) -c -o amulegui-ChatSelector.obj `if test -f 'ChatSelector.cpp'; then $(CYGPATH_W) 'ChatSelector.cpp'; else $(CYGPATH_W) '$(srcdir)/ChatSelector.cpp'; fi` +amulegui-GenericClientListCtrl.o: GenericClientListCtrl.cpp +@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(amulegui_CPPFLAGS) $(CPPFLAGS) $(amulegui_CXXFLAGS) $(CXXFLAGS) -MT amulegui-GenericClientListCtrl.o -MD -MP -MF "$(DEPDIR)/amulegui-GenericClientListCtrl.Tpo" -c -o amulegui-GenericClientListCtrl.o `test -f 'GenericClientListCtrl.cpp' || echo '$(srcdir)/'`GenericClientListCtrl.cpp; \ +@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/amulegui-GenericClientListCtrl.Tpo" "$(DEPDIR)/amulegui-GenericClientListCtrl.Po"; else rm -f "$(DEPDIR)/amulegui-GenericClientListCtrl.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='GenericClientListCtrl.cpp' object='amulegui-GenericClientListCtrl.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(amulegui_CPPFLAGS) $(CPPFLAGS) $(amulegui_CXXFLAGS) $(CXXFLAGS) -c -o amulegui-GenericClientListCtrl.o `test -f 'GenericClientListCtrl.cpp' || echo '$(srcdir)/'`GenericClientListCtrl.cpp + +amulegui-GenericClientListCtrl.obj: GenericClientListCtrl.cpp +@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(amulegui_CPPFLAGS) $(CPPFLAGS) $(amulegui_CXXFLAGS) $(CXXFLAGS) -MT amulegui-GenericClientListCtrl.obj -MD -MP -MF "$(DEPDIR)/amulegui-GenericClientListCtrl.Tpo" -c -o amulegui-GenericClientListCtrl.obj `if test -f 'GenericClientListCtrl.cpp'; then $(CYGPATH_W) 'GenericClientListCtrl.cpp'; else $(CYGPATH_W) '$(srcdir)/GenericClientListCtrl.cpp'; fi`; \ +@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/amulegui-GenericClientListCtrl.Tpo" "$(DEPDIR)/amulegui-GenericClientListCtrl.Po"; else rm -f "$(DEPDIR)/amulegui-GenericClientListCtrl.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='GenericClientListCtrl.cpp' object='amulegui-GenericClientListCtrl.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(amulegui_CPPFLAGS) $(CPPFLAGS) $(amulegui_CXXFLAGS) $(CXXFLAGS) -c -o amulegui-GenericClientListCtrl.obj `if test -f 'GenericClientListCtrl.cpp'; then $(CYGPATH_W) 'GenericClientListCtrl.cpp'; else $(CYGPATH_W) '$(srcdir)/GenericClientListCtrl.cpp'; fi` + amulegui-ClientDetailDialog.o: ClientDetailDialog.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(amulegui_CPPFLAGS) $(CPPFLAGS) $(amulegui_CXXFLAGS) $(CXXFLAGS) -MT amulegui-ClientDetailDialog.o -MD -MP -MF "$(DEPDIR)/amulegui-ClientDetailDialog.Tpo" -c -o amulegui-ClientDetailDialog.o `test -f 'ClientDetailDialog.cpp' || echo '$(srcdir)/'`ClientDetailDialog.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/amulegui-ClientDetailDialog.Tpo" "$(DEPDIR)/amulegui-ClientDetailDialog.Po"; else rm -f "$(DEPDIR)/amulegui-ClientDetailDialog.Tpo"; exit 1; fi @@ -4409,19 +4446,33 @@ amulegui-DownloadListCtrl.obj: DownloadListCtrl.cpp @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(amulegui_CPPFLAGS) $(CPPFLAGS) $(amulegui_CXXFLAGS) $(CXXFLAGS) -c -o amulegui-DownloadListCtrl.obj `if test -f 'DownloadListCtrl.cpp'; then $(CYGPATH_W) 'DownloadListCtrl.cpp'; else $(CYGPATH_W) '$(srcdir)/DownloadListCtrl.cpp'; fi` -amulegui-ClientListCtrl.o: ClientListCtrl.cpp -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(amulegui_CPPFLAGS) $(CPPFLAGS) $(amulegui_CXXFLAGS) $(CXXFLAGS) -MT amulegui-ClientListCtrl.o -MD -MP -MF "$(DEPDIR)/amulegui-ClientListCtrl.Tpo" -c -o amulegui-ClientListCtrl.o `test -f 'ClientListCtrl.cpp' || echo '$(srcdir)/'`ClientListCtrl.cpp; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/amulegui-ClientListCtrl.Tpo" "$(DEPDIR)/amulegui-ClientListCtrl.Po"; else rm -f "$(DEPDIR)/amulegui-ClientListCtrl.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ClientListCtrl.cpp' object='amulegui-ClientListCtrl.o' libtool=no @AMDEPBACKSLASH@ +amulegui-SourceListCtrl.o: SourceListCtrl.cpp +@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(amulegui_CPPFLAGS) $(CPPFLAGS) $(amulegui_CXXFLAGS) $(CXXFLAGS) -MT amulegui-SourceListCtrl.o -MD -MP -MF "$(DEPDIR)/amulegui-SourceListCtrl.Tpo" -c -o amulegui-SourceListCtrl.o `test -f 'SourceListCtrl.cpp' || echo '$(srcdir)/'`SourceListCtrl.cpp; \ +@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/amulegui-SourceListCtrl.Tpo" "$(DEPDIR)/amulegui-SourceListCtrl.Po"; else rm -f "$(DEPDIR)/amulegui-SourceListCtrl.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='SourceListCtrl.cpp' object='amulegui-SourceListCtrl.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(amulegui_CPPFLAGS) $(CPPFLAGS) $(amulegui_CXXFLAGS) $(CXXFLAGS) -c -o amulegui-SourceListCtrl.o `test -f 'SourceListCtrl.cpp' || echo '$(srcdir)/'`SourceListCtrl.cpp + +amulegui-SourceListCtrl.obj: SourceListCtrl.cpp +@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(amulegui_CPPFLAGS) $(CPPFLAGS) $(amulegui_CXXFLAGS) $(CXXFLAGS) -MT amulegui-SourceListCtrl.obj -MD -MP -MF "$(DEPDIR)/amulegui-SourceListCtrl.Tpo" -c -o amulegui-SourceListCtrl.obj `if test -f 'SourceListCtrl.cpp'; then $(CYGPATH_W) 'SourceListCtrl.cpp'; else $(CYGPATH_W) '$(srcdir)/SourceListCtrl.cpp'; fi`; \ +@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/amulegui-SourceListCtrl.Tpo" "$(DEPDIR)/amulegui-SourceListCtrl.Po"; else rm -f "$(DEPDIR)/amulegui-SourceListCtrl.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='SourceListCtrl.cpp' object='amulegui-SourceListCtrl.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(amulegui_CPPFLAGS) $(CPPFLAGS) $(amulegui_CXXFLAGS) $(CXXFLAGS) -c -o amulegui-SourceListCtrl.obj `if test -f 'SourceListCtrl.cpp'; then $(CYGPATH_W) 'SourceListCtrl.cpp'; else $(CYGPATH_W) '$(srcdir)/SourceListCtrl.cpp'; fi` + +amulegui-SharedFilePeersListCtrl.o: SharedFilePeersListCtrl.cpp +@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(amulegui_CPPFLAGS) $(CPPFLAGS) $(amulegui_CXXFLAGS) $(CXXFLAGS) -MT amulegui-SharedFilePeersListCtrl.o -MD -MP -MF "$(DEPDIR)/amulegui-SharedFilePeersListCtrl.Tpo" -c -o amulegui-SharedFilePeersListCtrl.o `test -f 'SharedFilePeersListCtrl.cpp' || echo '$(srcdir)/'`SharedFilePeersListCtrl.cpp; \ +@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/amulegui-SharedFilePeersListCtrl.Tpo" "$(DEPDIR)/amulegui-SharedFilePeersListCtrl.Po"; else rm -f "$(DEPDIR)/amulegui-SharedFilePeersListCtrl.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='SharedFilePeersListCtrl.cpp' object='amulegui-SharedFilePeersListCtrl.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(amulegui_CPPFLAGS) $(CPPFLAGS) $(amulegui_CXXFLAGS) $(CXXFLAGS) -c -o amulegui-ClientListCtrl.o `test -f 'ClientListCtrl.cpp' || echo '$(srcdir)/'`ClientListCtrl.cpp +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(amulegui_CPPFLAGS) $(CPPFLAGS) $(amulegui_CXXFLAGS) $(CXXFLAGS) -c -o amulegui-SharedFilePeersListCtrl.o `test -f 'SharedFilePeersListCtrl.cpp' || echo '$(srcdir)/'`SharedFilePeersListCtrl.cpp -amulegui-ClientListCtrl.obj: ClientListCtrl.cpp -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(amulegui_CPPFLAGS) $(CPPFLAGS) $(amulegui_CXXFLAGS) $(CXXFLAGS) -MT amulegui-ClientListCtrl.obj -MD -MP -MF "$(DEPDIR)/amulegui-ClientListCtrl.Tpo" -c -o amulegui-ClientListCtrl.obj `if test -f 'ClientListCtrl.cpp'; then $(CYGPATH_W) 'ClientListCtrl.cpp'; else $(CYGPATH_W) '$(srcdir)/ClientListCtrl.cpp'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/amulegui-ClientListCtrl.Tpo" "$(DEPDIR)/amulegui-ClientListCtrl.Po"; else rm -f "$(DEPDIR)/amulegui-ClientListCtrl.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ClientListCtrl.cpp' object='amulegui-ClientListCtrl.obj' libtool=no @AMDEPBACKSLASH@ +amulegui-SharedFilePeersListCtrl.obj: SharedFilePeersListCtrl.cpp +@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(amulegui_CPPFLAGS) $(CPPFLAGS) $(amulegui_CXXFLAGS) $(CXXFLAGS) -MT amulegui-SharedFilePeersListCtrl.obj -MD -MP -MF "$(DEPDIR)/amulegui-SharedFilePeersListCtrl.Tpo" -c -o amulegui-SharedFilePeersListCtrl.obj `if test -f 'SharedFilePeersListCtrl.cpp'; then $(CYGPATH_W) 'SharedFilePeersListCtrl.cpp'; else $(CYGPATH_W) '$(srcdir)/SharedFilePeersListCtrl.cpp'; fi`; \ +@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/amulegui-SharedFilePeersListCtrl.Tpo" "$(DEPDIR)/amulegui-SharedFilePeersListCtrl.Po"; else rm -f "$(DEPDIR)/amulegui-SharedFilePeersListCtrl.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='SharedFilePeersListCtrl.cpp' object='amulegui-SharedFilePeersListCtrl.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(amulegui_CPPFLAGS) $(CPPFLAGS) $(amulegui_CXXFLAGS) $(CXXFLAGS) -c -o amulegui-ClientListCtrl.obj `if test -f 'ClientListCtrl.cpp'; then $(CYGPATH_W) 'ClientListCtrl.cpp'; else $(CYGPATH_W) '$(srcdir)/ClientListCtrl.cpp'; fi` +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(amulegui_CPPFLAGS) $(CPPFLAGS) $(amulegui_CXXFLAGS) $(CXXFLAGS) -c -o amulegui-SharedFilePeersListCtrl.obj `if test -f 'SharedFilePeersListCtrl.cpp'; then $(CYGPATH_W) 'SharedFilePeersListCtrl.cpp'; else $(CYGPATH_W) '$(srcdir)/SharedFilePeersListCtrl.cpp'; fi` amulegui-FriendListCtrl.o: FriendListCtrl.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(amulegui_CPPFLAGS) $(CPPFLAGS) $(amulegui_CXXFLAGS) $(CXXFLAGS) -MT amulegui-FriendListCtrl.o -MD -MP -MF "$(DEPDIR)/amulegui-FriendListCtrl.Tpo" -c -o amulegui-FriendListCtrl.o `test -f 'FriendListCtrl.cpp' || echo '$(srcdir)/'`FriendListCtrl.cpp; \ diff --git a/src/MuleListCtrl.cpp b/src/MuleListCtrl.cpp index 3c9694fc..fd5dc859 100644 --- a/src/MuleListCtrl.cpp +++ b/src/MuleListCtrl.cpp @@ -59,6 +59,7 @@ BEGIN_EVENT_TABLE(CMuleListCtrl, MuleExtern::wxGenericListCtrl) EVT_LIST_COL_CLICK( -1, CMuleListCtrl::OnColumnLClick) EVT_LIST_COL_RIGHT_CLICK( -1, CMuleListCtrl::OnColumnRClick) EVT_LIST_ITEM_SELECTED(-1, CMuleListCtrl::OnItemSelected) + EVT_LIST_ITEM_DESELECTED(-1, CMuleListCtrl::OnItemSelected) EVT_LIST_DELETE_ITEM(-1, CMuleListCtrl::OnItemDeleted) EVT_LIST_DELETE_ALL_ITEMS(-1, CMuleListCtrl::OnAllItemsDeleted) EVT_CHAR( CMuleListCtrl::OnChar) @@ -77,6 +78,7 @@ CMuleListCtrl::CMuleListCtrl(wxWindow *parent, wxWindowID winid, const wxPoint& m_sort_func = NULL; m_tts_time = 0; m_tts_item = -1; + m_isSorting = false; if (imgList.GetImageCount() == 0) { imgList.Add(wxBitmap(sort_dn_xpm)); @@ -340,18 +342,14 @@ int CMuleListCtrl::CompareItems(wxUIntPtr item1, wxUIntPtr item2) return CmpAny(item1, item2); } - -MuleListCtrlCompare g_sort_func = NULL; -CMuleListCtrl* g_sort_list = NULL; - - -int CMuleListCtrl::SortProc(wxUIntPtr item1, wxUIntPtr item2, long) +int CMuleListCtrl::SortProc(wxUIntPtr item1, wxUIntPtr item2, long data) { - const CSortingList& orders = g_sort_list->m_sort_orders; + MuleSortData* sortdata = (MuleSortData*) data; + const CSortingList& orders = sortdata->m_sort_orders; CSortingList::const_iterator it = orders.begin(); for (; it != orders.end(); ++it) { - int result = g_sort_func(item1, item2, it->first | it->second); + int result = sortdata->m_sort_func(item1, item2, it->first | it->second); if (result != 0) { return result; } @@ -361,27 +359,45 @@ int CMuleListCtrl::SortProc(wxUIntPtr item1, wxUIntPtr item2, long) return CmpAny(item1, item2); } - void CMuleListCtrl::SortList() { - wxCHECK_RET(g_sort_func == NULL, wxT("Sort-function already set")); - wxCHECK_RET(g_sort_list == NULL, wxT("Sort-list already set")); + if (!IsSorting() && (m_sort_func && GetColumnCount())) { + + m_isSorting = true; - if (m_sort_func && GetColumnCount()) { // Positions are likely to be invalid after sorting. ResetTTS(); - g_sort_func = m_sort_func; - g_sort_list = this; + MuleSortData sortdata(m_sort_orders, m_sort_func); + + // Store the current selected items + ItemDataList selectedItems = GetSelectedItems(); + // Store the focused item + long pos = GetNextItem( -1, wxLIST_NEXT_ALL, wxLIST_STATE_FOCUSED ); + wxUIntPtr focused = (pos == -1) ? NULL : GetItemData(pos); + + SortItems(SortProc, (long int)&sortdata); - SortItems(SortProc, 0); + // Re-select the selected items. + for (int i = 0; i < selectedItems.size(); ++i) { + long it_pos = FindItem(-1, selectedItems[i]); + if (it_pos != -1) { + SetItemState(it_pos, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED); + } + } + + // Set focus on item if any was focused + if (focused) { + long it_pos = FindItem(-1, focused); + if (it_pos != -1) { + SetItemState(it_pos, wxLIST_STATE_FOCUSED, wxLIST_STATE_FOCUSED); + } + } - g_sort_func = NULL; - g_sort_list = NULL; + m_isSorting = false; } } - CMuleListCtrl::ItemDataList CMuleListCtrl::GetSelectedItems() const { // Create the initial vector with as many items as are selected @@ -441,14 +457,6 @@ void CMuleListCtrl::OnColumnLClick(wxListEvent& evt) return; } - // Get the currently focused item - long pos = GetNextItem( -1, wxLIST_NEXT_ALL, wxLIST_STATE_FOCUSED ); - wxUIntPtr item = 0; - if (pos != -1) { - item = GetItemData(pos); - } - - unsigned sort_order = 0; if (m_sort_orders.front().first == (unsigned)evt.GetColumn()) { // Same column as before, flip the sort-order @@ -473,19 +481,11 @@ void CMuleListCtrl::OnColumnLClick(wxListEvent& evt) sort_order = it->second; break; } - } + } } - SetSorting(evt.GetColumn(), sort_order); - - // Set focus on item if any was focused - if (item != 0) { - long it_pos = FindItem(-1, item); - if (it_pos != -1) { - SetItemState(it_pos,wxLIST_STATE_FOCUSED, wxLIST_STATE_FOCUSED | wxLIST_STATE_SELECTED); - } - } + SetSorting(evt.GetColumn(), sort_order); } @@ -694,15 +694,19 @@ void CMuleListCtrl::OnChar(wxKeyEvent& evt) void CMuleListCtrl::OnItemSelected(wxListEvent& evt) { - // We reset the current TTS session if the user manually changes the selection - if (m_tts_item != evt.GetIndex()) { - ResetTTS(); + if (IsSorting()) { + // Selection/Deselection that happened while sorting. + evt.Veto(); + } else { + // We reset the current TTS session if the user manually changes the selection + if (m_tts_item != evt.GetIndex()) { + ResetTTS(); - // The item is changed so that the next TTS starts from the selected item. - m_tts_item = evt.GetIndex(); + // The item is changed so that the next TTS starts from the selected item. + m_tts_item = evt.GetIndex(); + } + evt.Skip(); } - - evt.Skip(); } diff --git a/src/MuleListCtrl.h b/src/MuleListCtrl.h index 2e588d2a..acd72906 100644 --- a/src/MuleListCtrl.h +++ b/src/MuleListCtrl.h @@ -221,6 +221,11 @@ public: */ bool DeleteColumn(int WXUNUSED(col)) { wxFAIL; return false; } + /** + * Indicates if we're in the process of sorting. + */ + bool IsSorting() const { return m_isSorting; } + protected: /** @@ -395,6 +400,14 @@ private: typedef std::pair CColPair; typedef std::list CSortingList; + class MuleSortData { + public: + MuleSortData(CSortingList sort_orders, MuleListCtrlCompare sort_func) : m_sort_orders(sort_orders), m_sort_func(sort_func) { }; + + CSortingList m_sort_orders; + MuleListCtrlCompare m_sort_func; + }; + //! This list contains in order the columns sequence to sort by. CSortingList m_sort_orders; @@ -443,6 +456,9 @@ private: /// Container for column names, sorted by column index. ColNameList m_column_names; + // True while sorting. + bool m_isSorting; + DECLARE_EVENT_TABLE() }; diff --git a/src/OtherFunctions.h b/src/OtherFunctions.h index fd4c3132..0122dbf4 100644 --- a/src/OtherFunctions.h +++ b/src/OtherFunctions.h @@ -63,13 +63,21 @@ int CmpAny(const TYPE& ArgA, const TYPE& ArgB) //! Overloaded version of CmpAny for use with wxStrings. inline int CmpAny(const wxString& ArgA, const wxString& ArgB) { - return ArgA.CmpNoCase( ArgB ); + if (ArgA.IsEmpty() && !ArgB.IsEmpty()) { + return -1; + } else if (!ArgA.IsEmpty() && ArgB.IsEmpty()) { + return 1; + } else if (ArgA.IsEmpty() && ArgB.IsEmpty()) { + return 0; + } else { + return ArgA.CmpNoCase( ArgB ); + } } //! Overloaded version of CmpAny for use with C-Strings (Unicoded). inline int CmpAny(const wxChar* ArgA, const wxChar* ArgB) { - return wxString( ArgA ).CmpNoCase( ArgB ); + return CmpAny(wxString( ArgA ), wxString( ArgB )); } diff --git a/src/PartFile.cpp b/src/PartFile.cpp index d5b0984e..09d5ea05 100644 --- a/src/PartFile.cpp +++ b/src/PartFile.cpp @@ -2213,7 +2213,7 @@ void CPartFile::RemoveAllSources(bool bTryToSwap) for( SourceSet::iterator it = m_A4AFsrclist.begin(); it != m_A4AFsrclist.end(); ) { CUpDownClient* cur_src = *it++; if ( cur_src->DeleteFileRequest( this ) ) { - Notify_DownloadCtrlRemoveSource(cur_src, this); + Notify_SourceCtrlRemoveSource(cur_src, this); } } m_A4AFsrclist.clear(); @@ -3628,7 +3628,6 @@ void CPartFile::UpdateDisplayedInfo(bool force) void CPartFile::Init() { - m_showSources = false; m_lastsearchtime = 0; lastpurgetime = ::GetTickCount(); m_paused = false; diff --git a/src/PartFile.h b/src/PartFile.h index c641361a..1115ad82 100644 --- a/src/PartFile.h +++ b/src/PartFile.h @@ -150,7 +150,7 @@ public: #endif uint16 GetTransferingSrcCount() const { return transferingsrc; } uint16 GetNotCurrentSourcesCount() const { return m_notCurrentSources; }; - void SetNotCurrentSourcesCount(uint16 new_count) { m_notCurrentSources = new_count; }; + //void SetNotCurrentSourcesCount(uint16 new_count) { m_notCurrentSources = new_count; }; uint16 GetValidSourcesCount() const { return m_validSources; }; uint64 GetNeededSpace(); @@ -249,11 +249,6 @@ public: ArrayOfUInts16 m_SrcpartFrequency; - void SetShowSources( bool val ) { m_showSources = val; } - bool ShowSources() const { return m_showSources; } - - typedef std::set SourceSet; - const SourceSet& GetSourceList() const { return m_SrcList; } const SourceSet& GetA4AFList() const { return m_A4AFsrclist; } @@ -331,8 +326,6 @@ private: #endif uint16 m_notCurrentSources; - - bool m_showSources; uint32 m_validSources; diff --git a/src/SharedFilePeersListCtrl.cpp b/src/SharedFilePeersListCtrl.cpp new file mode 100644 index 00000000..4764b494 --- /dev/null +++ b/src/SharedFilePeersListCtrl.cpp @@ -0,0 +1,67 @@ +// +// This file is part of the aMule Project. +// +// Copyright (c) 2003-2008 aMule Team ( admin@amule.org / http://www.amule.org ) +// +// Any parts of this program derived from the xMule, lMule or eMule project, +// or contributed by third-party developers are copyrighted by their +// respective authors. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA +// +#include "SharedFilePeersListCtrl.h" + + +static CGenericClientListCtrlColumn s_sources_column_info[] = { + { ColumnUserName, wxT("User Name"), 260 }, + { ColumnUserDownloaded, wxT("Downloaded"), 65 }, + { ColumnUserSpeedDown, wxT("Download Speed"), 65 }, + { ColumnUserUploaded, wxT("Uploaded"), 65 }, + { ColumnUserSpeedUp, wxT("Upload Speed"), 65 }, + { ColumnUserProgress, wxT("Available parts"), 170 }, + { ColumnUserVersion, wxT("Version"), 50 }, + { ColumnUserQueueRankLocal, wxT("Queue Rank"), 55 }, + { ColumnUserStatus, wxT("Status"), 70 }, + { ColumnUserOrigin, wxT("Origin"), 110} +}; + +BEGIN_EVENT_TABLE(CSharedFilePeersListCtrl, CGenericClientListCtrl) +END_EVENT_TABLE() + +CSharedFilePeersListCtrl::CSharedFilePeersListCtrl( + wxWindow *parent, wxWindowID winid, const wxPoint& pos, const wxSize& size, + long style, const wxValidator& validator, const wxString& name ) +: +CGenericClientListCtrl( wxT("Peers"), parent, winid, pos, size, style | wxLC_OWNERDRAW, validator, name ) +{ + // Setting the sorter function. + SetSortFunc( SourceSortProc ); + + m_columndata.n_columns = sizeof(s_sources_column_info) / sizeof(CGenericClientListCtrlColumn); + m_columndata.columns = s_sources_column_info; + + InitColumnData(); +} + +CSharedFilePeersListCtrl::~CSharedFilePeersListCtrl() +{ +} + +int CSharedFilePeersListCtrl::SourceSortProc(wxUIntPtr param1, wxUIntPtr param2, long sortData) +{ + return CGenericClientListCtrl::SortProc(param1, param2, s_sources_column_info[sortData & CMuleListCtrl::COLUMN_MASK].cid | sortData & CMuleListCtrl::SORT_DES); +} + +// File_checked_for_headers diff --git a/src/SharedFilePeersListCtrl.h b/src/SharedFilePeersListCtrl.h new file mode 100644 index 00000000..5198ac2c --- /dev/null +++ b/src/SharedFilePeersListCtrl.h @@ -0,0 +1,63 @@ +// +// This file is part of the aMule Project. +// +// Copyright (c) 2003-2008 aMule Team ( admin@amule.org / http://www.amule.org ) +// +// Any parts of this program derived from the xMule, lMule or eMule project, +// or contributed by third-party developers are copyrighted by their +// respective authors. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA +// + +#ifndef SHAREDFILEPEERSLISTCTRL_H +#define SHAREDFILEPEERSLISTCTRL_H + +#include "GenericClientListCtrl.h" // Needed for CGenericClientListCtrl + +/** + * This class is responsible for representing the peers for a shared file. + */ +class CSharedFilePeersListCtrl : public CGenericClientListCtrl +{ +public: + /** + * Constructor. + * + * @see CGenericClientListCtrl::CGenericClientListCtrl for documentation of parameters. + */ + CSharedFilePeersListCtrl( + wxWindow *parent, + wxWindowID winid = -1, + const wxPoint &pos = wxDefaultPosition, + const wxSize &size = wxDefaultSize, + long style = wxLC_ICON, + const wxValidator& validator = wxDefaultValidator, + const wxString &name = wxT("peerslistctrl") ); + + /** + * Destructor. + */ + virtual ~CSharedFilePeersListCtrl(); + +private: + virtual CamuleDlg::DialogType GetParentDialog() { return CamuleDlg::DT_SHARED_WND; } + + static int wxCALLBACK SourceSortProc(wxUIntPtr item1, wxUIntPtr item2, long sortData); + + DECLARE_EVENT_TABLE() +}; + +#endif diff --git a/src/SharedFilesCtrl.cpp b/src/SharedFilesCtrl.cpp index 0b8e1708..ef4f5dc8 100644 --- a/src/SharedFilesCtrl.cpp +++ b/src/SharedFilesCtrl.cpp @@ -56,7 +56,6 @@ BEGIN_EVENT_TABLE(CSharedFilesCtrl,CMuleListCtrl) EVT_MENU( MP_PRIOAUTO, CSharedFilesCtrl::OnSetPriorityAuto ) EVT_MENU( MP_CMT, CSharedFilesCtrl::OnEditComment ) - EVT_MENU( MP_RAZORSTATS, CSharedFilesCtrl::OnGetRazorStats ) EVT_MENU( MP_ADDCOLLECTION, CSharedFilesCtrl::OnAddCollection ) EVT_MENU( MP_GETMAGNETLINK, CSharedFilesCtrl::OnCreateURI ) EVT_MENU( MP_GETED2KLINK, CSharedFilesCtrl::OnCreateURI ) @@ -155,10 +154,7 @@ void CSharedFilesCtrl::OnRightClick(wxListEvent& event) m_menu->AppendSeparator(); m_menu->Append(MP_RENAME, _("Rename")); m_menu->AppendSeparator(); -/* Commented out while it's gone - m_menu->Append( MP_RAZORSTATS, _("Get Razorback 2's stats for this file")); - m_menu->AppendSeparator(); -*/ + if (file->GetFileName().GetExt() == wxT("emulecollection")) { m_menu->Append( MP_ADDCOLLECTION, _("Add files in collection to transfer list")); m_menu->AppendSeparator(); @@ -680,17 +676,6 @@ void CSharedFilesCtrl::DrawAvailabilityBar(CKnownFile* file, wxDC* dc, const wxR dc->SetBrush( old_brush ); } -void CSharedFilesCtrl::OnGetRazorStats( wxCommandEvent& WXUNUSED(event) ) -{ - int item = GetNextItem( -1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED ); - if ( item != -1 ) { - CKnownFile* file = (CKnownFile*)GetItemData( item ); - - theApp->amuledlg->LaunchUrl(wxT("http://stats.razorback2.com/ed2khistory?ed2k=") + file->GetFileHash().Encode()); - } -} - - void CSharedFilesCtrl::OnRename( wxCommandEvent& WXUNUSED(event) ) { int item = GetNextItem( -1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED ); diff --git a/src/SharedFilesCtrl.h b/src/SharedFilesCtrl.h index 59c80951..e5aba744 100644 --- a/src/SharedFilesCtrl.h +++ b/src/SharedFilesCtrl.h @@ -165,11 +165,6 @@ private: * Event-handler for the Create ED2K/Magnet URI items. */ void OnCreateURI( wxCommandEvent& event ); - - /** - * Event handler for get-razorback stats menu item - */ - void OnGetRazorStats( wxCommandEvent& evt ); /** * Event-handler for the Edit Comment menu item. diff --git a/src/SharedFilesWnd.cpp b/src/SharedFilesWnd.cpp index 914d9fd1..f1cf7b83 100644 --- a/src/SharedFilesWnd.cpp +++ b/src/SharedFilesWnd.cpp @@ -23,25 +23,26 @@ // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // - +#include #include // Do_not_auto_remove (win32) #include "SharedFilesWnd.h" // Interface declarations #include "SharedFilesCtrl.h" +#include "SharedFilePeersListCtrl.h" #include "muuli_wdr.h" // Needed for ID_SHFILELIST #include "KnownFileList.h" // Needed for CKnownFileList #include "KnownFile.h" // Needed for CKnownFile #include "amule.h" // Needed for theApp - BEGIN_EVENT_TABLE(CSharedFilesWnd, wxPanel) - EVT_LIST_ITEM_SELECTED( ID_SHFILELIST, CSharedFilesWnd::OnItemActivated ) + EVT_LIST_ITEM_SELECTED( ID_SHFILELIST, CSharedFilesWnd::OnItemSelectionChanged ) + EVT_LIST_ITEM_DESELECTED( ID_SHFILELIST, CSharedFilesWnd::OnItemSelectionChanged ) EVT_BUTTON( ID_BTNRELSHARED, CSharedFilesWnd::OnBtnReloadShared ) + + EVT_SPLITTER_SASH_POS_CHANGING(ID_SHARESSPLATTER, CSharedFilesWnd::OnSashPositionChanging) END_EVENT_TABLE() - - CSharedFilesWnd::CSharedFilesWnd( wxWindow* pParent ) : wxPanel(pParent, -1) { @@ -52,83 +53,130 @@ CSharedFilesWnd::CSharedFilesWnd( wxWindow* pParent ) m_bar_accepted = CastChild( wxT("popbarAccept"), wxGauge ); m_bar_transfer = CastChild( wxT("popbarTrans"), wxGauge ); sharedfilesctrl = CastChild( wxT("sharedFilesCt"), CSharedFilesCtrl ); + peerslistctrl = CastChild( ID_SHAREDCLIENTLIST, CSharedFilePeersListCtrl ); wxASSERT(sharedfilesctrl); + wxASSERT(peerslistctrl); + + m_splitter = 0; + + wxConfigBase *config = wxConfigBase::Get(); + + // Check if the clientlist is hidden + bool show = true; + config->Read( wxT("/GUI/SharedWnd/ShowClientList"), &show, true ); + + if ( !show ) { + // Disable the client-list + wxCommandEvent event; + OnToggleClientList( event ); + } + + // Load the last used splitter position + m_splitter = config->Read( wxT("/GUI/SharedWnd/Splitter"), 463l ); } CSharedFilesWnd::~CSharedFilesWnd() { + wxConfigBase *config = wxConfigBase::Get(); + + if ( !peerslistctrl->GetShowing() ) { + // Save the splitter position + config->Write( wxT("/GUI/SharedWnd/Splitter"), m_splitter ); + + // Save the visible status of the list + config->Write( wxT("/GUI/SharedWnd/ShowClientList"), false ); + } else { + wxSplitterWindow* splitter = CastChild( wxT("sharedsplitterWnd"), wxSplitterWindow ); + + // Save the splitter position + config->Write( wxT("/GUI/SharedWnd/Splitter"), splitter->GetSashPosition() ); + + // Save the visible status of the list + config->Write( wxT("/GUI/SharedWnd/ShowClientList"), true ); + } } void CSharedFilesWnd::SelectionUpdated() { - uint64 lTransferred = theApp->knownfiles->transferred; - uint32 lAccepted = theApp->knownfiles->accepted; - uint32 lRequested = theApp->knownfiles->requested; - m_bar_requests->SetRange( lRequested ); - m_bar_accepted->SetRange( lAccepted ); - m_bar_transfer->SetRange( lTransferred / 1024 ); - - if ( !sharedfilesctrl->GetSelectedItemCount() ) { - // Requests - m_bar_requests->SetValue( 0 ); - CastChild(IDC_SREQUESTED, wxStaticText)->SetLabel( wxT("-") ); - CastChild(IDC_SREQUESTED2, wxStaticText)->SetLabel( wxT("-") ); - - // Accepted requets - m_bar_accepted->SetValue( 0 ); - CastChild(IDC_SACCEPTED, wxStaticText)->SetLabel( wxT("-") ); - CastChild(IDC_SACCEPTED2, wxStaticText)->SetLabel( wxT("-") ); - - // Transferred - m_bar_transfer->SetValue( 0 ); - CastChild(IDC_STRANSFERRED, wxStaticText)->SetLabel( wxT("-") ); - CastChild(IDC_STRANSFERRED2, wxStaticText)->SetLabel( wxT("-") ); - } else { - // Create a total statistic for the selected item(s) - uint32 session_requests = 0; - uint32 session_accepted = 0; - uint64 session_transferred = 0; - uint32 all_requests = 0; - uint32 all_accepted = 0; - uint64 all_transferred = 0; + if (!sharedfilesctrl->IsSorting()) { + uint64 lTransferred = theApp->knownfiles->transferred; + uint32 lAccepted = theApp->knownfiles->accepted; + uint32 lRequested = theApp->knownfiles->requested; + m_bar_requests->SetRange( lRequested ); + m_bar_accepted->SetRange( lAccepted ); + m_bar_transfer->SetRange( lTransferred / 1024 ); - long index = sharedfilesctrl->GetNextItem( -1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED ); - while ( index > -1 ) { - if ( sharedfilesctrl->GetItemState( index, wxLIST_STATE_SELECTED ) ) { - CKnownFile* file = (CKnownFile*)sharedfilesctrl->GetItemData( index ); + if ( !sharedfilesctrl->GetSelectedItemCount() ) { + // Requests + m_bar_requests->SetValue( 0 ); + CastChild(IDC_SREQUESTED, wxStaticText)->SetLabel( wxT("- /") ); + CastChild(IDC_SREQUESTED2, wxStaticText)->SetLabel( wxT("- /") ); + + // Accepted requets + m_bar_accepted->SetValue( 0 ); + CastChild(IDC_SACCEPTED, wxStaticText)->SetLabel( wxT("- /") ); + CastChild(IDC_SACCEPTED2, wxStaticText)->SetLabel( wxT("- /") ); + + // Transferred + m_bar_transfer->SetValue( 0 ); + CastChild(IDC_STRANSFERRED, wxStaticText)->SetLabel( wxT("- /") ); + CastChild(IDC_STRANSFERRED2, wxStaticText)->SetLabel( wxT("- /") ); + } else { + // Create a total statistic for the selected item(s) + uint32 session_requests = 0; + uint32 session_accepted = 0; + uint64 session_transferred = 0; + uint32 all_requests = 0; + uint32 all_accepted = 0; + uint64 all_transferred = 0; - session_requests += file->statistic.GetRequests(); - session_accepted += file->statistic.GetAccepts(); - session_transferred += file->statistic.GetTransferred(); - - all_requests += file->statistic.GetAllTimeRequests(); - all_accepted += file->statistic.GetAllTimeAccepts(); - all_transferred += file->statistic.GetAllTimeTransferred(); - } - index = sharedfilesctrl->GetNextItem( index, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED ); - }; + long index = -1; + CKnownFileVector fileVector; + fileVector.reserve(sharedfilesctrl->GetSelectedItemCount()); + + while ( (index = sharedfilesctrl->GetNextItem( index, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED )) != -1) { + if ( sharedfilesctrl->GetItemState( index, wxLIST_STATE_SELECTED ) ) { + CKnownFile* file = (CKnownFile*)sharedfilesctrl->GetItemData( index ); + wxASSERT(file); + + session_requests += file->statistic.GetRequests(); + session_accepted += file->statistic.GetAccepts(); + session_transferred += file->statistic.GetTransferred(); + + all_requests += file->statistic.GetAllTimeRequests(); + all_accepted += file->statistic.GetAllTimeAccepts(); + all_transferred += file->statistic.GetAllTimeTransferred(); + + fileVector.push_back(file); + } + }; + + std::sort(fileVector.begin(), fileVector.end()); + this->peerslistctrl->ShowSources(fileVector); + + // Requests + session_requests = session_requests > lRequested ? lRequested : session_requests; + m_bar_requests->SetValue( session_requests ); + CastChild(IDC_SREQUESTED, wxStaticText)->SetLabel( wxString::Format(wxT("%u /"), session_requests ) ); + CastChild(IDC_SREQUESTED2, wxStaticText)->SetLabel( wxString::Format(wxT("%u /"), all_requests ) ); - // Requests - session_requests = session_requests > lRequested ? lRequested : session_requests; - m_bar_requests->SetValue( session_requests ); - CastChild(IDC_SREQUESTED, wxStaticText)->SetLabel( wxString::Format(wxT("%u"), session_requests ) ); - CastChild(IDC_SREQUESTED2, wxStaticText)->SetLabel( wxString::Format(wxT("%u"), all_requests ) ); + // Accepted requets + session_accepted = session_accepted > lAccepted ? lAccepted : session_accepted; + m_bar_accepted->SetValue( session_accepted ); + CastChild(IDC_SACCEPTED, wxStaticText)->SetLabel( wxString::Format(wxT("%u /"), session_accepted ) ); + CastChild(IDC_SACCEPTED2, wxStaticText)->SetLabel( wxString::Format(wxT("%u /"), all_accepted ) ); + + // Transferred + session_transferred = session_transferred > lTransferred ? lTransferred : session_transferred; + m_bar_transfer->SetValue( session_transferred / 1024 ); + CastChild(IDC_STRANSFERRED, wxStaticText)->SetLabel( CastItoXBytes( session_transferred ) + wxT(" /")); + CastChild(IDC_STRANSFERRED2, wxStaticText)->SetLabel( CastItoXBytes( all_transferred ) + wxT(" /")); + } - // Accepted requets - session_accepted = session_accepted > lAccepted ? lAccepted : session_accepted; - m_bar_accepted->SetValue( session_accepted ); - CastChild(IDC_SACCEPTED, wxStaticText)->SetLabel( wxString::Format(wxT("%u"), session_accepted ) ); - CastChild(IDC_SACCEPTED2, wxStaticText)->SetLabel( wxString::Format(wxT("%u"), all_accepted ) ); - - // Transferred - session_transferred = session_transferred > lTransferred ? lTransferred : session_transferred; - m_bar_transfer->SetValue( session_transferred / 1024 ); - CastChild(IDC_STRANSFERRED, wxStaticText)->SetLabel( CastItoXBytes( session_transferred ) ); - CastChild(IDC_STRANSFERRED2, wxStaticText)->SetLabel( CastItoXBytes( all_transferred ) ); + Layout(); } - Layout(); } @@ -142,7 +190,7 @@ void CSharedFilesWnd::OnBtnReloadShared( wxCommandEvent& WXUNUSED(evt) ) } -void CSharedFilesWnd::OnItemActivated(wxListEvent& evt) +void CSharedFilesWnd::OnItemSelectionChanged(wxListEvent& evt) { SelectionUpdated(); @@ -153,6 +201,75 @@ void CSharedFilesWnd::OnItemActivated(wxListEvent& evt) void CSharedFilesWnd::RemoveAllSharedFiles() { sharedfilesctrl->DeleteAllItems(); sharedfilesctrl->ShowFilesCount(); + peerslistctrl->DeleteAllItems(); SelectionUpdated(); } + +void CSharedFilesWnd::OnToggleClientList(wxCommandEvent& WXUNUSED(evt)) +{ + wxSplitterWindow* splitter = CastChild( wxT("sharedsplitterWnd"), wxSplitterWindow ); + wxBitmapButton* button = CastChild( ID_SHAREDCLIENTTOGGLE, wxBitmapButton ); + + wxCHECK_RET(splitter, wxT("ERROR: NULL splitter in CSharedFilesWnd::OnToggleClientList")); + wxCHECK_RET(button, wxT("ERROR: NULL button in CSharedFilesWnd::OnToggleClientList")); + + if ( !peerslistctrl->GetShowing() ) { + splitter->SetSashPosition( m_splitter ); + + peerslistctrl->SetShowing( true ); + + button->SetBitmapLabel( amuleDlgImages( 10 ) ); + button->SetBitmapFocus( amuleDlgImages( 10 ) ); + button->SetBitmapSelected( amuleDlgImages( 10 ) ); + + m_splitter = 0; + } else { + peerslistctrl->SetShowing( false ); + + int pos = splitter->GetSashPosition(); + + // Add the height of the listctrl to the top-window + int height = peerslistctrl->GetSize().GetHeight(); + height += splitter->GetWindow1()->GetSize().GetHeight(); + + splitter->SetSashPosition( height ); + + m_splitter = pos; + + button->SetBitmapLabel( amuleDlgImages( 11 ) ); + button->SetBitmapFocus( amuleDlgImages( 11 ) ); + button->SetBitmapSelected( amuleDlgImages( 11 ) ); + } +} + +void CSharedFilesWnd::OnSashPositionChanging(wxSplitterEvent& evt) +{ + if ( evt.GetSashPosition() < 90 ) { + evt.SetSashPosition( 90 ); + } else { + wxSplitterWindow* splitter = wxStaticCast( evt.GetEventObject(), wxSplitterWindow); + + wxCHECK_RET(splitter, wxT("ERROR: NULL splitter in CSharedFilesWnd::OnSashPositionChanging")); + + int height = splitter->GetSize().GetHeight(); + + int header_height = s_sharedfilespeerHeader->GetSize().GetHeight(); + + if ( !peerslistctrl->GetShowing() ) { + if ( height - evt.GetSashPosition() < header_height * 1.5 ) { + evt.Veto(); + } else { + wxCommandEvent event; + OnToggleClientList( event ); + } + } else { + if ( height - evt.GetSashPosition() < header_height * 1.5 ) { + evt.SetSashPosition( height - header_height ); + + wxCommandEvent event; + OnToggleClientList( event ); + } + } + } +} // File_checked_for_headers diff --git a/src/SharedFilesWnd.h b/src/SharedFilesWnd.h index 9a808399..24e45245 100644 --- a/src/SharedFilesWnd.h +++ b/src/SharedFilesWnd.h @@ -31,9 +31,10 @@ class CKnownFile; class CSharedFilesCtrl; +class CSharedFilePeersListCtrl; class wxListEvent; class wxGauge; - +class wxSplitterEvent; /** * This class represents the window containing the list of shared files. @@ -68,7 +69,12 @@ public: //! Pointer to the widget containing the list of shared files. CSharedFilesCtrl* sharedfilesctrl; - + + //! Pointer to the list of clients. + CSharedFilePeersListCtrl* peerslistctrl; + + //! Contains the current (or last if the clientlist is hidden) position of the splitter. + int m_splitter; private: /** * Event-handler for reloading the list of shared files. @@ -76,10 +82,19 @@ private: void OnBtnReloadShared(wxCommandEvent &evt); /** - * Event-handler for showing details about a shared file. + * Event-handler for showing details about a shared file(s). */ - void OnItemActivated(wxListEvent& evt); + void OnItemSelectionChanged(wxListEvent& evt); + /** + * Event-handler for the list-toggle button. + */ + void OnToggleClientList( wxCommandEvent& event ); + + /** + * Event-handler for for changes in the sash divider position. + */ + void OnSashPositionChanging(wxSplitterEvent& evt); //! Pointer to the gauge used for showing requests ratio. wxGauge* m_bar_requests; diff --git a/src/SourceListCtrl.cpp b/src/SourceListCtrl.cpp new file mode 100644 index 00000000..5e944ef8 --- /dev/null +++ b/src/SourceListCtrl.cpp @@ -0,0 +1,65 @@ +// +// This file is part of the aMule Project. +// +// Copyright (c) 2003-2008 aMule Team ( admin@amule.org / http://www.amule.org ) +// +// Any parts of this program derived from the xMule, lMule or eMule project, +// or contributed by third-party developers are copyrighted by their +// respective authors. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA +// +#include "SourceListCtrl.h" + +static CGenericClientListCtrlColumn s_sources_column_info[] = { + { ColumnUserName, wxT("User Name"), 260 }, + { ColumnUserDownloaded, wxT("Downloaded"), 65 }, + { ColumnUserSpeedDown, wxT("Speed"), 65 }, + { ColumnUserUploaded, wxT("Uploaded"), 65 }, + { ColumnUserProgress, wxT("Available parts"), 170 }, + { ColumnUserVersion, wxT("Version"), 50 }, + { ColumnUserQueueRankRemote, wxT("Queue Rank"), 55 }, + { ColumnUserStatus, wxT("Status"), 70 }, + { ColumnUserOrigin, wxT("Origin"), 110} +}; + +BEGIN_EVENT_TABLE(CSourceListCtrl, CGenericClientListCtrl) +END_EVENT_TABLE() + +CSourceListCtrl::CSourceListCtrl( + wxWindow *parent, wxWindowID winid, const wxPoint& pos, const wxSize& size, + long style, const wxValidator& validator, const wxString& name ) +: +CGenericClientListCtrl( wxT("Sources"), parent, winid, pos, size, style | wxLC_OWNERDRAW, validator, name ) +{ + // Setting the sorter function. + SetSortFunc( SourceSortProc ); + + m_columndata.n_columns = sizeof(s_sources_column_info) / sizeof(CGenericClientListCtrlColumn); + m_columndata.columns = s_sources_column_info; + + InitColumnData(); +} + +CSourceListCtrl::~CSourceListCtrl() +{ +} + +int CSourceListCtrl::SourceSortProc(wxUIntPtr param1, wxUIntPtr param2, long sortData) +{ + return CGenericClientListCtrl::SortProc(param1, param2, s_sources_column_info[sortData & CMuleListCtrl::COLUMN_MASK].cid | sortData & CMuleListCtrl::SORT_DES); +} + +// File_checked_for_headers diff --git a/src/SourceListCtrl.h b/src/SourceListCtrl.h new file mode 100644 index 00000000..1d03dc69 --- /dev/null +++ b/src/SourceListCtrl.h @@ -0,0 +1,65 @@ +// +// This file is part of the aMule Project. +// +// Copyright (c) 2003-2008 aMule Team ( admin@amule.org / http://www.amule.org ) +// +// Any parts of this program derived from the xMule, lMule or eMule project, +// or contributed by third-party developers are copyrighted by their +// respective authors. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA +// + +#ifndef SOURCELISTCTRL_H +#define SOURCELISTCTRL_H + +#include "GenericClientListCtrl.h" // Needed for CGenericClientListCtrl + +/** + * This class is responsible for representing the sources for a file. + + */ +class CSourceListCtrl : public CGenericClientListCtrl +{ +public: + /** + * Constructor. + * + * @see CGenericClientListCtrl::CGenericClientListCtrl for documentation of parameters. + */ + CSourceListCtrl( + wxWindow *parent, + wxWindowID winid = -1, + const wxPoint &pos = wxDefaultPosition, + const wxSize &size = wxDefaultSize, + long style = wxLC_ICON, + const wxValidator& validator = wxDefaultValidator, + const wxString &name = wxT("sourcelistctrl") ); + + /** + * Destructor. + */ + virtual ~CSourceListCtrl(); + +private: + virtual CamuleDlg::DialogType GetParentDialog() { return CamuleDlg::DT_TRANSFER_WND; } + + static int wxCALLBACK SourceSortProc(wxUIntPtr item1, wxUIntPtr item2, long sortData); + + DECLARE_EVENT_TABLE() +}; + +#endif +// File_checked_for_headers diff --git a/src/TransferWnd.cpp b/src/TransferWnd.cpp index 4d2127ff..38a03f7e 100644 --- a/src/TransferWnd.cpp +++ b/src/TransferWnd.cpp @@ -41,7 +41,7 @@ #include "DownloadQueue.h" // Needed for CDownloadQueue #include "CatDialog.h" // Needed for CCatDialog #include "DownloadListCtrl.h" // Needed for CDownloadListCtrl -#include "ClientListCtrl.h" // Needed for CClientListCtrl +#include "SourceListCtrl.h" // Needed for CSourceListCtrl #include "amule.h" // Needed for theApp #include "muuli_wdr.h" // Needed for ID_CATEGORIES #include "SearchDlg.h" // Needed for CSearchDlg->UpdateCatChoice() @@ -56,10 +56,9 @@ BEGIN_EVENT_TABLE(CTransferWnd, wxPanel) EVT_RIGHT_DOWN(CTransferWnd::OnNMRclickDLtab) EVT_NOTEBOOK_PAGE_CHANGED(ID_CATEGORIES, CTransferWnd::OnCategoryChanged) - EVT_SPLITTER_SASH_POS_CHANGING(ID_SPLATTER, CTransferWnd::OnSashPositionChanging) + EVT_SPLITTER_SASH_POS_CHANGING(ID_DOWNLOADSSPLATTER, CTransferWnd::OnSashPositionChanging) EVT_BUTTON(ID_BTNCLRCOMPL, CTransferWnd::OnBtnClearDownloads) - EVT_BUTTON(ID_BTNSWITCHUP, CTransferWnd::SwitchUploadList) EVT_BUTTON(ID_CLIENTTOGGLE, CTransferWnd::OnToggleClientList) EVT_MENU_RANGE(MP_CAT_SET0, MP_CAT_SET0 + 15, CTransferWnd::OnSetDefaultCat) @@ -85,7 +84,7 @@ CTransferWnd::CTransferWnd( wxWindow* pParent ) content->Show(this, true); downloadlistctrl = CastChild( wxT("downloadList"), CDownloadListCtrl ); - clientlistctrl = CastChild( ID_CLIENTLIST, CClientListCtrl ); + clientlistctrl = CastChild( ID_CLIENTLIST, CSourceListCtrl ); m_dlTab = CastChild( ID_CATEGORIES, CMuleNotebook ); CMuleNotebook* nb = CastChild( ID_CATEGORIES, CMuleNotebook ); @@ -103,7 +102,6 @@ CTransferWnd::CTransferWnd( wxWindow* pParent ) m_menu = NULL; m_splitter = 0; - wxConfigBase *config = wxConfigBase::Get(); @@ -126,7 +124,7 @@ CTransferWnd::~CTransferWnd() { wxConfigBase *config = wxConfigBase::Get(); - if ( clientlistctrl->GetListView() == vtNone ) { + if ( !clientlistctrl->GetShowing() ) { // Save the splitter position config->Write( wxT("/GUI/TransferWnd/Splitter"), m_splitter ); @@ -306,11 +304,13 @@ void CTransferWnd::OnSetDefaultCat( wxCommandEvent& event ) void CTransferWnd::ShowQueueCount(uint32 number) { +#if 0 wxString str = wxString::Format( wxT("%u (%u %s)"), number, theStats::GetBannedCount(), _("Banned") ); wxStaticText* label = CastChild( ID_CLIENTCOUNT, wxStaticText ); label->SetLabel( str ); label->GetParent()->Layout(); +#endif } @@ -407,7 +407,7 @@ void CTransferWnd::Prepare() int header_height = s_clientlistHeader->GetSize().GetHeight(); wxSplitterWindow* splitter = CastChild( wxT("splitterWnd"), wxSplitterWindow ); - if ( clientlistctrl->GetListView() == vtNone ) { + if ( !clientlistctrl->GetShowing() ) { int height = splitter->GetWindow1()->GetSize().GetHeight(); height += splitter->GetWindow2()->GetSize().GetHeight(); @@ -431,46 +431,15 @@ void CTransferWnd::Prepare() } } - -void CTransferWnd::SwitchUploadList(wxCommandEvent& WXUNUSED(evt)) -{ - clientlistctrl->ToggleView(); - wxStaticText* label = CastChild( wxT("uploadTitle"), wxStaticText ); - - switch ( clientlistctrl->GetListView() ) { - case vtNone: - return; - - case vtUploading: - label->SetLabel( _("Uploads") ); - break; - - case vtQueued: - label->SetLabel( _("On Queue") ); - break; - - case vtClients: - label->SetLabel( _("Clients") ); - break; - } - - label->GetParent()->Layout(); -} - - void CTransferWnd::OnToggleClientList(wxCommandEvent& WXUNUSED(evt)) { wxSplitterWindow* splitter = CastChild( wxT("splitterWnd"), wxSplitterWindow ); wxBitmapButton* button = CastChild( ID_CLIENTTOGGLE, wxBitmapButton ); - // Keeps track of what was last selected. - static ViewType lastView = vtNone; - - - if ( clientlistctrl->GetListView() == vtNone ) { + if ( !clientlistctrl->GetShowing() ) { splitter->SetSashPosition( m_splitter ); - clientlistctrl->SetListView( lastView ); + clientlistctrl->SetShowing( true ); button->SetBitmapLabel( amuleDlgImages( 10 ) ); button->SetBitmapFocus( amuleDlgImages( 10 ) ); @@ -478,8 +447,7 @@ void CTransferWnd::OnToggleClientList(wxCommandEvent& WXUNUSED(evt)) m_splitter = 0; } else { - lastView = clientlistctrl->GetListView(); - clientlistctrl->SetListView( vtNone ); + clientlistctrl->SetShowing( false ); int pos = splitter->GetSashPosition(); @@ -495,8 +463,6 @@ void CTransferWnd::OnToggleClientList(wxCommandEvent& WXUNUSED(evt)) button->SetBitmapFocus( amuleDlgImages( 11 ) ); button->SetBitmapSelected( amuleDlgImages( 11 ) ); } - - FindWindow(ID_BTNSWITCHUP)->Enable( clientlistctrl->GetListView() != vtNone ); } @@ -512,7 +478,7 @@ void CTransferWnd::OnSashPositionChanging(wxSplitterEvent& evt) int height = splitter->GetWindow1()->GetSize().GetHeight(); height += splitter->GetWindow2()->GetSize().GetHeight(); - if ( clientlistctrl->GetListView() == vtNone ) { + if ( !clientlistctrl->GetShowing() ) { if ( height - evt.GetSashPosition() < header_height * 2 ) { evt.Veto(); } else { diff --git a/src/TransferWnd.h b/src/TransferWnd.h index 74c5b513..93477cdd 100644 --- a/src/TransferWnd.h +++ b/src/TransferWnd.h @@ -31,7 +31,7 @@ #include "Types.h" // Needed for uint32 #include "OtherStructs.h" -class CClientListCtrl; +class CSourceListCtrl; class CDownloadListCtrl; class CMuleNotebook; class wxListCtrl; @@ -41,8 +41,6 @@ class wxMouseEvent; class wxEvent; class wxMenu; - - /** * This class takes care of managing the lists and other controls contained * in the transfer-window. It's primary function is to manage the user-defined @@ -127,7 +125,7 @@ public: //! Pointer to the download-queue. CDownloadListCtrl* downloadlistctrl; //! Pointer to the list of clients. - CClientListCtrl* clientlistctrl; + CSourceListCtrl* clientlistctrl; //! Contains the current (or last if the clientlist is hidden) position of the splitter. int m_splitter; @@ -184,7 +182,7 @@ private: void OnToggleClientList( wxCommandEvent& event ); /** - * Event-handler for automatic show/hide of the clientlistctrl. + * Event-handler for changes in the sash divider position. */ void OnSashPositionChanging(wxSplitterEvent& evt); diff --git a/src/UploadClient.cpp b/src/UploadClient.cpp index 33a0d5cc..979de919 100644 --- a/src/UploadClient.cpp +++ b/src/UploadClient.cpp @@ -473,7 +473,7 @@ void CUpDownClient::ProcessExtendedInfo(const CMemFile *data, CKnownFile *tempre m_uploadingfile->UpdateUpPartsFrequency( this, true ); // Increment - Notify_QlistRefreshClient(this); + Notify_SharedCtrlRefreshClient(this, AVAILABLE_SOURCE); } @@ -650,7 +650,7 @@ uint32 CUpDownClient::SendBlockData() m_cSendblock++; if (m_cSendblock == 30){ m_cSendblock = 0; - Notify_UploadCtrlRefreshClient(this); + Notify_SharedCtrlRefreshClient(this, AVAILABLE_SOURCE); } return sentBytesCompleteFile + sentBytesPartFile; @@ -737,13 +737,16 @@ void CUpDownClient::ClearUploadBlockRequests() DeleteContents(m_DoneBlocks_list); } +uint16 CUpDownClient::GetRankingInfo() const { + return theApp->uploadqueue->GetWaitingPosition(this); +} void CUpDownClient::SendRankingInfo(){ if (!ExtProtocolAvailable()) { return; } - uint16 nRank = theApp->uploadqueue->GetWaitingPosition(this); + uint16 nRank = GetRankingInfo(); if (!nRank) { return; } @@ -805,7 +808,7 @@ void CUpDownClient::Ban(){ SetUploadState(US_BANNED); Notify_ShowQueueCount(theStats::GetWaitingUserCount()); - Notify_QlistRefreshClient(this); + Notify_SharedCtrlRefreshClient(this, UNAVAILABLE_SOURCE); } bool CUpDownClient::IsBanned() const diff --git a/src/UploadQueue.cpp b/src/UploadQueue.cpp index f3304858..9dedde53 100644 --- a/src/UploadQueue.cpp +++ b/src/UploadQueue.cpp @@ -181,7 +181,6 @@ void CUploadQueue::AddUpNextClient(CUpDownClient* directadd) if (reqfile) { reqfile->statistic.AddAccepted(); } - Notify_UploadCtrlAddClient(newclient); } void CUploadQueue::Process() @@ -358,9 +357,8 @@ void CUploadQueue::AddClientToQueue(CUpDownClient* client) } client->SendRankingInfo(); - Notify_QlistRefreshClient(client); + Notify_SharedCtrlRefreshClient(client, AVAILABLE_SOURCE); return; - } else { // Hash-clash, remove unidentified clients (possibly both) @@ -441,7 +439,7 @@ void CUploadQueue::AddClientToQueue(CUpDownClient* client) client->ClearAskedCount(); client->SetUploadState(US_ONUPLOADQUEUE); client->SendRankingInfo(); - Notify_QlistAddClient(client); + //Notify_QlistAddClient(client); Notify_ShowQueueCount(m_waitinglist.size()); } } @@ -456,7 +454,6 @@ bool CUploadQueue::RemoveFromUploadQueue(CUpDownClient* client) m_uploadinglist.end(), client); if (it != m_uploadinglist.end()) { - Notify_UploadCtrlRemoveClient(client); m_uploadinglist.erase(it); theStats::RemoveUploadingClient(); if( client->GetTransferredUp() ) { @@ -591,7 +588,7 @@ uint16 CUploadQueue::SuspendUpload( const CMD4Hash& filehash ) theStats::AddWaitingClient(); potential->SetUploadState(US_ONUPLOADQUEUE); potential->SendRankingInfo(); - Notify_QlistRefreshClient(potential); + Notify_SharedCtrlRefreshClient(potential, AVAILABLE_SOURCE); Notify_ShowQueueCount(m_waitinglist.size()); removed++; } @@ -622,7 +619,7 @@ void CUploadQueue::RemoveFromWaitingQueue(CClientPtrList::iterator pos) if( todelete->IsBanned() ) { todelete->UnBan(); } - Notify_QlistRemoveClient(todelete); + //Notify_QlistRemoveClient(todelete); todelete->SetUploadState(US_NONE); } diff --git a/src/amule-remote-gui.cpp b/src/amule-remote-gui.cpp index 7c816e39..4c270f95 100644 --- a/src/amule-remote-gui.cpp +++ b/src/amule-remote-gui.cpp @@ -40,7 +40,7 @@ #include "amule.h" // Interface declarations. #include "amuleDlg.h" // Needed for CamuleDlg #include "ClientCredits.h" -#include "ClientListCtrl.h" +#include "SourceListCtrl.h" #include "DataToText.h" // Needed for GetSoftName() #include "DownloadListCtrl.h" // Needed for CDownloadListCtrl #include "GuiEvents.h" @@ -168,17 +168,8 @@ void CamuleRemoteGuiApp::OnPollTimer(wxTimerEvent&) } else if (amuledlg->m_transferwnd->IsShown()) { // update both downloads and shared files knownfiles->DoRequery(EC_OP_GET_UPDATE, EC_TAG_KNOWNFILE); - switch(amuledlg->m_transferwnd->clientlistctrl->GetListView()) { - case vtUploading: - uploadqueue->ReQueryUp(); - break; - case vtQueued: - uploadqueue->ReQueryWait(); - break; - case vtClients: - break; - case vtNone: - break; + if (amuledlg->m_transferwnd->clientlistctrl->GetShowing()) { + // Kry_GUI Request the client list. } amuledlg->m_transferwnd->ShowQueueCount(theStats::GetWaitingUserCount()); } else if (amuledlg->m_searchwnd->IsShown()) { @@ -1127,6 +1118,9 @@ CUpDownClient::CUpDownClient(CEC_UpDownClient_Tag *tag) : CECID(tag->ID()) m_nServerPort = tag->ServerPort(); m_ServerName = tag->ServerName(); + // TODO: GUI_REWORK + m_rankingInfo = 0; + m_Friend = 0; if (tag->HaveFile()) { m_uploadingfile = theApp->knownfiles->GetByID(tag->FileID()); @@ -1208,7 +1202,7 @@ CUpDownClient *CUpDownClientListRem::CreateItem(CEC_UpDownClient_Tag *tag) CUpDownClient *client = new CUpDownClient(tag); ProcessItemUpdate(tag, client); - theApp->amuledlg->m_transferwnd->clientlistctrl->InsertClient(client, (ViewType)m_viewtype); + //theApp->amuledlg->m_transferwnd->clientlistctrl->InsertClient(client, (ViewType)m_viewtype); return client; } @@ -1216,8 +1210,7 @@ CUpDownClient *CUpDownClientListRem::CreateItem(CEC_UpDownClient_Tag *tag) void CUpDownClientListRem::DeleteItem(CUpDownClient *client) { - theApp->amuledlg->m_transferwnd->clientlistctrl-> - RemoveClient(client, (ViewType)m_viewtype); + //theApp->amuledlg->m_transferwnd->clientlistctrl->RemoveClient(client, (ViewType)m_viewtype); delete client; } diff --git a/src/amuleDlg.cpp b/src/amuleDlg.cpp index d7768473..89668582 100644 --- a/src/amuleDlg.cpp +++ b/src/amuleDlg.cpp @@ -54,7 +54,7 @@ #include // Needed for CFormat #include "amule.h" // Needed for theApp #include "ChatWnd.h" // Needed for CChatWnd -#include "ClientListCtrl.h" // Needed for CClientListCtrl +#include "SourceListCtrl.h" // Needed for CSourceListCtrl #include "DownloadListCtrl.h" // Needed for CDownloadListCtrl #include "DownloadQueue.h" // Needed for CDownloadQueue #include "KadDlg.h" // Needed for CKadDlg @@ -109,7 +109,7 @@ BEGIN_EVENT_TABLE(CamuleDlg, wxFrame) EVT_TOOL(ID_BUTTONNETWORKS, CamuleDlg::OnToolBarButton) EVT_TOOL(ID_BUTTONSEARCH, CamuleDlg::OnToolBarButton) - EVT_TOOL(ID_BUTTONTRANSFER, CamuleDlg::OnToolBarButton) + EVT_TOOL(ID_BUTTONDOWNLOADS, CamuleDlg::OnToolBarButton) EVT_TOOL(ID_BUTTONSHARED, CamuleDlg::OnToolBarButton) EVT_TOOL(ID_BUTTONMESSAGES, CamuleDlg::OnToolBarButton) EVT_TOOL(ID_BUTTONSTATISTICS, CamuleDlg::OnToolBarButton) @@ -269,7 +269,7 @@ m_clientSkinNames(CLIENT_SKIN_SIZE) // Set transfers as active window Create_Toolbar(thePrefs::VerticalToolbar()); SetActiveDialog(DT_TRANSFER_WND, m_transferwnd); - m_wndToolbar->ToggleTool(ID_BUTTONTRANSFER, true ); + m_wndToolbar->ToggleTool(ID_BUTTONDOWNLOADS, true ); bool override_where = (where != wxDefaultPosition); bool override_size = ( @@ -414,7 +414,7 @@ void CamuleDlg::RemoveSystray() void CamuleDlg::OnToolBarButton(wxCommandEvent& ev) { - static int lastbutton = ID_BUTTONTRANSFER; + static int lastbutton = ID_BUTTONDOWNLOADS; // Kry - just if the GUI is ready for it if ( m_is_safe_state ) { @@ -445,7 +445,7 @@ void CamuleDlg::OnToolBarButton(wxCommandEvent& ev) SetActiveDialog(DT_SEARCH_WND, m_searchwnd); break; - case ID_BUTTONTRANSFER: + case ID_BUTTONDOWNLOADS: SetActiveDialog(DT_TRANSFER_WND, m_transferwnd); // Prepare the dialog, sets the splitter-position m_transferwnd->Prepare(); @@ -1324,10 +1324,10 @@ void CamuleDlg::Apply_Toolbar_Skin(wxToolBar *wndToolbar) _("Searches"), m_tblist.GetBitmap(5), wxNullBitmap, wxITEM_CHECK, _("Searches window")); - wndToolbar->AddTool(ID_BUTTONTRANSFER, - _("Transfers"), m_tblist.GetBitmap(4), + wndToolbar->AddTool(ID_BUTTONDOWNLOADS, + _("Downloads"), m_tblist.GetBitmap(4), wxNullBitmap, wxITEM_CHECK, - _("Files transfers window")); + _("Downloads window")); wndToolbar->AddTool(ID_BUTTONSHARED, _("Shared files"), m_tblist.GetBitmap(6), wxNullBitmap, wxITEM_CHECK, @@ -1354,7 +1354,7 @@ void CamuleDlg::Apply_Toolbar_Skin(wxToolBar *wndToolbar) wxNullBitmap, wxITEM_NORMAL, _("About/Help")); - wndToolbar->ToggleTool(ID_BUTTONTRANSFER, true); + wndToolbar->ToggleTool(ID_BUTTONDOWNLOADS, true); // Needed for non-GTK platforms, where the // items don't get added immediatly. @@ -1405,7 +1405,7 @@ void CamuleDlg::OnMainGUISizeChange(wxSizeEvent& evt) wxFrame::OnSize(evt); if (m_transferwnd && m_transferwnd->clientlistctrl) { // Transfer window's splitter set again if it's hidden. - if (m_transferwnd->clientlistctrl->GetListView() == vtNone) { + if (!m_transferwnd->clientlistctrl->GetShowing()) { int height = m_transferwnd->clientlistctrl->GetSize().GetHeight(); wxSplitterWindow* splitter = CastChild(wxT("splitterWnd"), wxSplitterWindow); diff --git a/src/muuli_wdr.cpp b/src/muuli_wdr.cpp index a22c0af3..5971c539 100644 --- a/src/muuli_wdr.cpp +++ b/src/muuli_wdr.cpp @@ -35,6 +35,7 @@ // Custom source #include "ServerListCtrl.h" #include "DownloadListCtrl.h" +#include "SourceListCtrl.h" #include "SharedFilesCtrl.h" #include "OScopeCtrl.h" #include "ColorFrameCtrl.h" @@ -43,9 +44,9 @@ #include "MuleGifCtrl.h" #include "ChatSelector.h" #include "DirectoryTreeCtrl.h" // Needed for CDirectoryTreeCtrl -#include "ClientListCtrl.h" #include "PartFileConvert.h" #include "KadDlg.h" +#include "SharedFilePeersListCtrl.h" // Implement window functions @@ -63,7 +64,8 @@ wxSizer *muleDlg( wxWindow *parent, bool call_fit, bool set_sizer ) item0->Add( item1, 1, wxGROW|wxALIGN_CENTER_VERTICAL, 5 ); - wxBoxSizer *item2 = new wxBoxSizer( wxHORIZONTAL ); + wxFlexGridSizer *item2 = new wxFlexGridSizer( 3, 0, 0 ); + item2->AddGrowableCol( 1 ); s_fed2klh = item2; wxStaticText *item3 = new wxStaticText( parent, -1, _("eD2k Link: "), wxDefaultPosition, wxDefaultSize, 0 ); @@ -71,7 +73,7 @@ wxSizer *muleDlg( wxWindow *parent, bool call_fit, bool set_sizer ) CMuleTextCtrl *item4 = new CMuleTextCtrl( parent, -1, wxT(""), wxDefaultPosition, wxSize(-1,20), wxTE_MULTILINE ); item4->SetName( wxT("FastEd2kLinks") ); - item2->Add( item4, 1, wxGROW|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); + item2->Add( item4, 1, wxGROW|wxALIGN_CENTER_HORIZONTAL|wxALL, 0 ); wxButton *item5 = new wxButton( parent, ID_BUTTON_FAST, _("Commit"), wxDefaultPosition, wxDefaultSize, 0 ); item5->SetToolTip( _("Click here to add the eD2k link in the text control to your download queue.") ); @@ -444,35 +446,32 @@ wxSizer *transferTopPane( wxWindow *parent, bool call_fit, bool set_sizer ) wxSizer *s_clientlistHeader; wxSizer *transferBottomPane( wxWindow *parent, bool call_fit, bool set_sizer ) { - wxBoxSizer *item0 = new wxBoxSizer( wxVERTICAL ); + wxFlexGridSizer *item0 = new wxFlexGridSizer( 2, 0, 0, 0 ); + item0->AddGrowableCol( 0 ); + item0->AddGrowableRow( 1 ); - wxBoxSizer *item1 = new wxBoxSizer( wxHORIZONTAL ); + wxFlexGridSizer *item1 = new wxFlexGridSizer( 3, 0, 1 ); + item1->AddGrowableCol( 1 ); s_clientlistHeader = item1; wxBitmapButton *item2 = new wxBitmapButton( parent, ID_CLIENTTOGGLE, amuleDlgImages( 10 ), wxDefaultPosition, wxDefaultSize ); - item1->Add( item2, 0, wxALIGN_CENTER|wxALL, 5 ); + item1->Add( item2, 0, wxALIGN_CENTER_VERTICAL, 5 ); - wxBitmapButton *item3 = new wxBitmapButton( parent, ID_BTNSWITCHUP, amuleDlgImages( 19 ), wxDefaultPosition, wxDefaultSize ); - item3->SetToolTip( _("Shows Upload / Up-queue") ); - item1->Add( item3, 0, wxALIGN_CENTER|wxALL, 5 ); - - wxStaticText *item4 = new wxStaticText( parent, -1, _("Uploads"), wxDefaultPosition, wxDefaultSize, 0 ); - item4->SetName( wxT("uploadTitle") ); - item1->Add( item4, 0, wxALIGN_CENTER|wxALL, 5 ); + wxBoxSizer *item3 = new wxBoxSizer( wxHORIZONTAL ); - item1->Add( 20, 20, 1, wxGROW|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); + wxStaticText *item4 = new wxStaticText( parent, -1, _("File sources:"), wxDefaultPosition, wxDefaultSize, 0 ); + item3->Add( item4, 0, wxALIGN_CENTER, 5 ); - wxStaticText *item5 = new wxStaticText( parent, -1, _("Clients on queue :"), wxDefaultPosition, wxDefaultSize, 0 ); - item1->Add( item5, 0, wxALIGN_CENTER, 5 ); + wxStaticText *item5 = new wxStaticText( parent, ID_CLIENTCOUNT, wxT("0"), wxDefaultPosition, wxDefaultSize, wxST_NO_AUTORESIZE ); + item5->SetForegroundColour( *wxBLUE ); + item3->Add( item5, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); - wxStaticText *item6 = new wxStaticText( parent, ID_CLIENTCOUNT, wxT("0"), wxDefaultPosition, wxDefaultSize, wxST_NO_AUTORESIZE ); - item6->SetForegroundColour( *wxBLUE ); - item1->Add( item6, 0, wxALIGN_CENTER|wxLEFT|wxRIGHT, 5 ); + item1->Add( item3, 0, wxALIGN_CENTER, 5 ); item0->Add( item1, 0, wxGROW|wxALIGN_CENTER_VERTICAL, 5 ); - CClientListCtrl *item7 = new CClientListCtrl( parent, ID_CLIENTLIST, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxSUNKEN_BORDER ); - item0->Add( item7, 1, wxGROW|wxALIGN_CENTER_VERTICAL, 5 ); + CSourceListCtrl *item6 = new CSourceListCtrl( parent, ID_CLIENTLIST, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxSUNKEN_BORDER ); + item0->Add( item6, 1, wxGROW|wxALIGN_CENTER_VERTICAL, 5 ); if (set_sizer) { @@ -1069,99 +1068,17 @@ wxSizer *addFriendDlg( wxWindow *parent, bool call_fit, bool set_sizer ) wxSizer *sharedfilesDlg( wxWindow *parent, bool call_fit, bool set_sizer ) { - wxStaticBox *item1 = new wxStaticBox( parent, -1, wxT("") ); - wxStaticBoxSizer *item0 = new wxStaticBoxSizer( item1, wxVERTICAL ); - - wxBoxSizer *item2 = new wxBoxSizer( wxHORIZONTAL ); - - wxBitmapButton *item3 = new wxBitmapButton( parent, ID_BTNRELSHARED, amuleDlgImages( 18 ), wxDefaultPosition, wxSize(32,32) ); - item3->SetToolTip( _("Reload your shared files") ); - item2->Add( item3, 0, wxALIGN_CENTER|wxLEFT|wxRIGHT, 5 ); - - wxStaticText *item4 = new wxStaticText( parent, -1, _("Shared Files"), wxDefaultPosition, wxDefaultSize, 0 ); - item4->SetName( wxT("sharedFilesLabel") ); - item2->Add( item4, 0, wxALIGN_CENTER|wxLEFT, 5 ); - - item0->Add( item2, 0, wxALIGN_CENTER_VERTICAL|wxALL, 0 ); - - CSharedFilesCtrl *item5 = new CSharedFilesCtrl( parent, ID_SHFILELIST, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxSUNKEN_BORDER ); - item5->SetName( wxT("sharedFilesCt") ); - item0->Add( item5, 1, wxGROW|wxALIGN_CENTER_VERTICAL, 5 ); - - wxStaticBox *item7 = new wxStaticBox( parent, -1, _("Statistics") ); - wxStaticBoxSizer *item6 = new wxStaticBoxSizer( item7, wxVERTICAL ); - - wxFlexGridSizer *item8 = new wxFlexGridSizer( 5, 0, 0 ); - - wxStaticText *item9 = new wxStaticText( parent, -1, _("Current Session"), wxDefaultPosition, wxDefaultSize, 0 ); - item8->Add( item9, 0, wxALIGN_CENTER|wxLEFT|wxRIGHT|wxBOTTOM, 5 ); - - item8->Add( 20, 20, 0, wxALIGN_CENTER, 5 ); - - item8->Add( 20, 20, 0, wxALIGN_CENTER, 5 ); - - wxStaticText *item10 = new wxStaticText( parent, -1, _("Total"), wxDefaultPosition, wxDefaultSize, 0 ); - item8->Add( item10, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 5 ); - - item8->Add( 20, 20, 0, wxALIGN_CENTER, 5 ); - - wxStaticText *item11 = new wxStaticText( parent, -1, _("Requested :"), wxDefaultPosition, wxDefaultSize, 0 ); - item8->Add( item11, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); - - wxStaticText *item12 = new wxStaticText( parent, IDC_SREQUESTED, _("N/A"), wxDefaultPosition, wxDefaultSize, 0 ); - item12->SetForegroundColour( *wxBLUE ); - item8->Add( item12, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); - - wxGauge *item13 = new wxGauge( parent, -1, 100, wxDefaultPosition, wxSize(200,-1), 0 ); - item13->SetName( wxT("popbar") ); - item8->Add( item13, 0, wxALIGN_CENTER|wxLEFT|wxRIGHT, 5 ); - - wxStaticText *item14 = new wxStaticText( parent, -1, _("Requested :"), wxDefaultPosition, wxDefaultSize, 0 ); - item8->Add( item14, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); - - wxStaticText *item15 = new wxStaticText( parent, IDC_SREQUESTED2, _("N/A"), wxDefaultPosition, wxDefaultSize, 0 ); - item15->SetForegroundColour( *wxBLUE ); - item8->Add( item15, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); - - wxStaticText *item16 = new wxStaticText( parent, -1, _("Active Uploads :"), wxDefaultPosition, wxDefaultSize, 0 ); - item8->Add( item16, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); - - wxStaticText *item17 = new wxStaticText( parent, IDC_SACCEPTED, _("N/A"), wxDefaultPosition, wxDefaultSize, 0 ); - item17->SetForegroundColour( *wxBLUE ); - item8->Add( item17, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); - - wxGauge *item18 = new wxGauge( parent, -1, 100, wxDefaultPosition, wxSize(200,-1), 0 ); - item18->SetName( wxT("popbarAccept") ); - item8->Add( item18, 0, wxALIGN_CENTER|wxLEFT|wxRIGHT|wxTOP, 5 ); - - wxStaticText *item19 = new wxStaticText( parent, -1, _("Active Uploads :"), wxDefaultPosition, wxDefaultSize, 0 ); - item8->Add( item19, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); - - wxStaticText *item20 = new wxStaticText( parent, IDC_SACCEPTED2, _("N/A"), wxDefaultPosition, wxDefaultSize, 0 ); - item20->SetForegroundColour( *wxBLUE ); - item8->Add( item20, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); - - wxStaticText *item21 = new wxStaticText( parent, -1, _("Transferred :"), wxDefaultPosition, wxDefaultSize, 0 ); - item8->Add( item21, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); - - wxStaticText *item22 = new wxStaticText( parent, IDC_STRANSFERRED, _("N/A"), wxDefaultPosition, wxDefaultSize, 0 ); - item22->SetForegroundColour( *wxBLUE ); - item8->Add( item22, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); - - wxGauge *item23 = new wxGauge( parent, -1, 100, wxDefaultPosition, wxSize(200,-1), 0 ); - item23->SetName( wxT("popbarTrans") ); - item8->Add( item23, 0, wxALIGN_CENTER|wxLEFT|wxRIGHT|wxTOP, 5 ); - - wxStaticText *item24 = new wxStaticText( parent, -1, _("Transferred :"), wxDefaultPosition, wxDefaultSize, 0 ); - item8->Add( item24, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); - - wxStaticText *item25 = new wxStaticText( parent, IDC_STRANSFERRED2, _("N/A"), wxDefaultPosition, wxDefaultSize, 0 ); - item25->SetForegroundColour( *wxBLUE ); - item8->Add( item25, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); - - item6->Add( item8, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + wxBoxSizer *item0 = new wxBoxSizer( wxVERTICAL ); - item0->Add( item6, 0, wxALIGN_CENTER|wxTOP, 5 ); + wxSplitterWindow *item1 = new wxSplitterWindow( parent, ID_SHARESSPLATTER, wxDefaultPosition, wxDefaultSize, wxSP_LIVE_UPDATE ); + item1->SetMinimumPaneSize( 20 ); + wxPanel *item2 = new wxPanel( item1, -1 ); + sharedfilesTopDlg( item2, FALSE, TRUE ); + wxPanel *item3 = new wxPanel( item1, -1 ); + sharedfilesBottomDlg( item3, FALSE, TRUE ); + item1->SplitHorizontally( item2, item3 ); + item1->SetName( wxT("sharedsplitterWnd") ); + item0->Add( item1, 1, wxGROW|wxALIGN_CENTER_VERTICAL, 5 ); if (set_sizer) { @@ -2163,7 +2080,12 @@ wxSizer *PreferencesaMuleTweaksTab( wxWindow *parent, bool call_fit, bool set_si item1->Add( item2, 0, wxALIGN_CENTER, 5 ); wxStaticText *item3 = new wxStaticText( parent, -1, - _("Do not change these setting unless you know\nwhat you are doing, otherwise you can easily\nmake things worse for yourself.\n\naMule will run fine without adjusting any of\nthese settings."), + _("Do not change these setting unless you know\n" + "what you are doing, otherwise you can easily\n" + "make things worse for yourself.\n" + "\n" + "aMule will run fine without adjusting any of\n" + "these settings."), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE ); item3->SetForegroundColour( *wxRED ); item1->Add( item3, 0, wxALIGN_CENTER|wxLEFT|wxRIGHT, 5 ); @@ -2573,7 +2495,7 @@ wxSizer *transferDlg( wxWindow *parent, bool call_fit, bool set_sizer ) wxStaticBox *item1 = new wxStaticBox( parent, -1, wxT("") ); wxStaticBoxSizer *item0 = new wxStaticBoxSizer( item1, wxVERTICAL ); - wxSplitterWindow *item2 = new wxSplitterWindow( parent, ID_SPLATTER, wxDefaultPosition, wxDefaultSize, wxSP_LIVE_UPDATE ); + wxSplitterWindow *item2 = new wxSplitterWindow( parent, ID_DOWNLOADSSPLATTER, wxDefaultPosition, wxDefaultSize, wxSP_LIVE_UPDATE ); item2->SetMinimumPaneSize( 20 ); wxPanel *item3 = new wxPanel( item2, -1 ); transferTopPane( item3, FALSE, TRUE ); @@ -2886,7 +2808,8 @@ item9->SetName(wxT("kadScope")); item20->Add( 20, 20, 0, wxALIGN_CENTER|wxALL, 5 ); wxButton *item37 = new wxButton( parent, ID_KNOWNNODECONNECT, - _("Bootstrap from \nknown clients"), + _("Bootstrap from \n" + "known clients"), wxDefaultPosition, wxDefaultSize, 0 ); item20->Add( item37, 0, wxGROW|wxALIGN_CENTER_VERTICAL, 5 ); @@ -3443,6 +3366,145 @@ wxSizer *PreferencesEventsTab( wxWindow *parent, bool call_fit, bool set_sizer ) return item0; } +wxSizer *s_sharedfilespeerHeader; +wxSizer *sharedfilesBottomDlg( wxWindow *parent, bool call_fit, bool set_sizer ) +{ + wxStaticBox *item1 = new wxStaticBox( parent, -1, _("Statistics and queued clients for selected file(s)") ); + wxStaticBoxSizer *item0 = new wxStaticBoxSizer( item1, wxVERTICAL ); + + wxFlexGridSizer *item2 = new wxFlexGridSizer( 4, 0, 0 ); + item2->AddGrowableCol( 0 ); + item2->AddGrowableCol( 1 ); + item2->AddGrowableCol( 2 ); + item2->AddGrowableCol( 3 ); + s_sharedfilespeerHeader = item2; + + wxBitmapButton *item3 = new wxBitmapButton( parent, ID_SHAREDCLIENTTOGGLE, amuleDlgImages( 10 ), wxDefaultPosition, wxDefaultSize ); + item2->Add( item3, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + wxStaticText *item4 = new wxStaticText( parent, -1, _("Requested"), wxDefaultPosition, wxDefaultSize, 0 ); + item2->Add( item4, 0, wxALIGN_CENTER|wxLEFT|wxRIGHT, 5 ); + + wxStaticText *item5 = new wxStaticText( parent, -1, _("Active Uploads"), wxDefaultPosition, wxDefaultSize, 0 ); + item2->Add( item5, 0, wxALIGN_CENTER|wxLEFT|wxRIGHT, 5 ); + + wxStaticText *item6 = new wxStaticText( parent, -1, _("Transferred"), wxDefaultPosition, wxDefaultSize, 0 ); + item2->Add( item6, 0, wxALIGN_CENTER|wxLEFT|wxRIGHT, 5 ); + + wxStaticText *item7 = new wxStaticText( parent, -1, _("Session / All time / % of total files"), wxDefaultPosition, wxDefaultSize, 0 ); + item2->Add( item7, 0, wxALIGN_CENTER|wxLEFT|wxRIGHT, 5 ); + + wxFlexGridSizer *item8 = new wxFlexGridSizer( 4, 0, 0 ); + + wxStaticLine *item9 = new wxStaticLine( parent, ID_LINE, wxDefaultPosition, wxSize(-1,20), wxLI_VERTICAL ); + item8->Add( item9, 0, wxALIGN_CENTER|wxALL, 5 ); + + wxStaticText *item10 = new wxStaticText( parent, IDC_SREQUESTED, _("N/A"), wxDefaultPosition, wxDefaultSize, 0 ); + item10->SetForegroundColour( *wxBLUE ); + item8->Add( item10, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); + + wxStaticText *item11 = new wxStaticText( parent, IDC_SREQUESTED2, _("N/A"), wxDefaultPosition, wxDefaultSize, 0 ); + item11->SetForegroundColour( *wxBLUE ); + item8->Add( item11, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); + + wxGauge *item12 = new wxGauge( parent, -1, 100, wxDefaultPosition, wxSize(200,-1), 0 ); + item12->SetName( wxT("popbar") ); + item8->Add( item12, 0, wxALIGN_CENTER|wxLEFT|wxRIGHT, 5 ); + + item2->Add( item8, 0, wxALIGN_CENTER, 5 ); + + wxFlexGridSizer *item13 = new wxFlexGridSizer( 4, 0, 0 ); + + wxStaticLine *item14 = new wxStaticLine( parent, ID_LINE, wxDefaultPosition, wxSize(-1,20), wxLI_VERTICAL ); + item13->Add( item14, 0, wxALIGN_CENTER|wxALL, 5 ); + + wxStaticText *item15 = new wxStaticText( parent, IDC_SACCEPTED, _("N/A"), wxDefaultPosition, wxDefaultSize, 0 ); + item15->SetForegroundColour( *wxBLUE ); + item13->Add( item15, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); + + wxStaticText *item16 = new wxStaticText( parent, IDC_SACCEPTED2, _("N/A"), wxDefaultPosition, wxDefaultSize, 0 ); + item16->SetForegroundColour( *wxBLUE ); + item13->Add( item16, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); + + wxGauge *item17 = new wxGauge( parent, -1, 100, wxDefaultPosition, wxSize(200,-1), 0 ); + item17->SetName( wxT("popbarAccept") ); + item13->Add( item17, 0, wxALIGN_CENTER|wxLEFT|wxRIGHT|wxTOP, 5 ); + + item2->Add( item13, 0, wxALIGN_CENTER, 5 ); + + wxFlexGridSizer *item18 = new wxFlexGridSizer( 4, 0, 0 ); + + wxStaticLine *item19 = new wxStaticLine( parent, ID_LINE, wxDefaultPosition, wxSize(-1,20), wxLI_VERTICAL ); + item18->Add( item19, 0, wxALIGN_CENTER|wxALL, 5 ); + + wxStaticText *item20 = new wxStaticText( parent, IDC_STRANSFERRED, _("N/A"), wxDefaultPosition, wxDefaultSize, 0 ); + item20->SetForegroundColour( *wxBLUE ); + item18->Add( item20, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); + + wxStaticText *item21 = new wxStaticText( parent, IDC_STRANSFERRED2, _("N/A"), wxDefaultPosition, wxDefaultSize, 0 ); + item21->SetForegroundColour( *wxBLUE ); + item18->Add( item21, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); + + wxGauge *item22 = new wxGauge( parent, -1, 100, wxDefaultPosition, wxSize(200,-1), 0 ); + item22->SetName( wxT("popbarTrans") ); + item18->Add( item22, 0, wxALIGN_CENTER|wxLEFT|wxRIGHT|wxTOP, 5 ); + + item2->Add( item18, 0, wxALIGN_CENTER, 5 ); + + item0->Add( item2, 0, wxGROW|wxALIGN_CENTER_VERTICAL, 5 ); + + wxStaticLine *item23 = new wxStaticLine( parent, ID_LINE, wxDefaultPosition, wxSize(20,-1), wxLI_HORIZONTAL ); + item0->Add( item23, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + CSharedFilePeersListCtrl *item24 = new CSharedFilePeersListCtrl( parent, ID_SHAREDCLIENTLIST, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxSUNKEN_BORDER ); + item24->SetName( wxT("sharedFilesSrcCt") ); + item0->Add( item24, 1, wxGROW|wxALIGN_CENTER_VERTICAL, 5 ); + + if (set_sizer) + { + parent->SetSizer( item0 ); + if (call_fit) + item0->SetSizeHints( parent ); + } + + return item0; +} + +wxSizer *sharedfilesTopDlg( wxWindow *parent, bool call_fit, bool set_sizer ) +{ + wxBoxSizer *item0 = new wxBoxSizer( wxVERTICAL ); + + wxFlexGridSizer *item1 = new wxFlexGridSizer( 3, 0, 0 ); + item1->AddGrowableCol( 0 ); + + wxStaticText *item2 = new wxStaticText( parent, -1, _("Shared files"), wxDefaultPosition, wxDefaultSize, 0 ); + item2->SetName( wxT("sharedFilesLabel") ); + item1->Add( item2, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + wxStaticText *item3 = new wxStaticText( parent, -1, _("Reload:"), wxDefaultPosition, wxDefaultSize, 0 ); + item3->SetName( wxT("sharedFilesLabel") ); + item1->Add( item3, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + wxBitmapButton *item4 = new wxBitmapButton( parent, ID_BTNRELSHARED, amuleDlgImages( 18 ), wxDefaultPosition, wxSize(32,32) ); + item4->SetToolTip( _("Reload your shared files") ); + item1->Add( item4, 0, wxALIGN_CENTER_VERTICAL, 0 ); + + item0->Add( item1, 0, wxGROW|wxALIGN_CENTER_VERTICAL, 0 ); + + CSharedFilesCtrl *item5 = new CSharedFilesCtrl( parent, ID_SHFILELIST, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxSUNKEN_BORDER ); + item5->SetName( wxT("sharedFilesCt") ); + item0->Add( item5, 1, wxGROW|wxALIGN_CENTER_VERTICAL, 5 ); + + if (set_sizer) + { + parent->SetSizer( item0 ); + if (call_fit) + item0->SetSizeHints( parent ); + } + + return item0; +} + // Implement menubar functions // Implement toolbar functions @@ -3455,8 +3517,8 @@ void muleToolbar( wxToolBar *parent ) parent->AddSeparator(); parent->AddTool( ID_BUTTONNETWORKS, _("Networks"), amuleDlgImages( 20 ), wxNullBitmap, wxITEM_CHECK, _("Networks Window") ); parent->AddTool( ID_BUTTONSEARCH, _("Searches"), amuleDlgImages( 22 ), wxNullBitmap, wxITEM_CHECK, _("Searches Window") ); - parent->AddTool( ID_BUTTONTRANSFER, _("Transfers"), amuleDlgImages( 21 ), wxNullBitmap, wxITEM_CHECK, _("Files Transfers Window") ); - parent->ToggleTool( ID_BUTTONTRANSFER, TRUE ); + parent->AddTool( ID_BUTTONDOWNLOADS, _("Downloads"), amuleDlgImages( 21 ), wxNullBitmap, wxITEM_CHECK, _("Downloads Window") ); + parent->ToggleTool( ID_BUTTONDOWNLOADS, TRUE ); parent->AddTool( ID_BUTTONSHARED, _("Shared Files"), amuleDlgImages( 23 ), wxNullBitmap, wxITEM_CHECK, _("Shared Files Window") ); parent->AddTool( ID_BUTTONMESSAGES, _("Messages"), amuleDlgImages( 24 ), wxNullBitmap, wxITEM_CHECK, _("Messages Window") ); parent->AddTool( ID_BUTTONSTATISTICS, _("Statistics"), amuleDlgImages( 25 ), wxNullBitmap, wxITEM_CHECK, _("Statistics Graph Window") ); diff --git a/src/muuli_wdr.h b/src/muuli_wdr.h index 949c9402..cc61a331 100644 --- a/src/muuli_wdr.h +++ b/src/muuli_wdr.h @@ -75,392 +75,400 @@ wxSizer *transferTopPane( wxWindow *parent, bool call_fit = TRUE, bool set_sizer extern wxSizer *s_clientlistHeader; #define ID_CLIENTTOGGLE 10029 -#define ID_BTNSWITCHUP 10030 -#define ID_CLIENTCOUNT 10031 -#define ID_CLIENTLIST 10032 +#define ID_CLIENTCOUNT 10030 +#define ID_CLIENTLIST 10031 wxSizer *transferBottomPane( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE ); -#define ID_FRIENDLIST 10033 -#define IDC_CHATSELECTOR 10034 -#define IDC_CMESSAGE 10035 -#define IDC_CSEND 10036 -#define IDC_CCLOSE 10037 +#define ID_FRIENDLIST 10032 +#define IDC_CHATSELECTOR 10033 +#define IDC_CMESSAGE 10034 +#define IDC_CSEND 10035 +#define IDC_CCLOSE 10036 wxSizer *messagePage( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE ); -#define IDC_FNAME 10038 -#define IDC_METFILE 10039 -#define IDC_FHASH 10040 -#define IDC_FSIZE 10041 -#define IDC_PFSTATUS 10042 -#define IDC_LASTSEENCOMPL 10043 -#define IDC_SOURCECOUNT 10044 -#define IDC_SOURCECOUNT2 10045 -#define IDC_PARTCOUNT 10046 -#define IDC_PARTAVAILABLE 10047 -#define IDC_DATARATE 10048 -#define IDC_DLACTIVETIME 10049 -#define IDC_TRANSFERRED 10050 -#define IDC_COMPLSIZE 10051 -#define IDC_PROCCOMPL 10052 -#define IDC_FD_STATS1 10053 -#define IDC_FD_STATS2 10054 -#define IDC_FD_STATS3 10055 -#define IDC_LISTCTRLFILENAMES 10056 -#define IDC_TAKEOVER 10057 -#define IDC_CMTBT 10058 -#define IDC_BUTTONSTRIP 10059 -#define IDC_FILENAME 10060 -#define IDC_APPLY 10061 -#define IDC_APPLY_AND_CLOSE 10062 +#define IDC_FNAME 10037 +#define IDC_METFILE 10038 +#define IDC_FHASH 10039 +#define IDC_FSIZE 10040 +#define IDC_PFSTATUS 10041 +#define IDC_LASTSEENCOMPL 10042 +#define IDC_SOURCECOUNT 10043 +#define IDC_SOURCECOUNT2 10044 +#define IDC_PARTCOUNT 10045 +#define IDC_PARTAVAILABLE 10046 +#define IDC_DATARATE 10047 +#define IDC_DLACTIVETIME 10048 +#define IDC_TRANSFERRED 10049 +#define IDC_COMPLSIZE 10050 +#define IDC_PROCCOMPL 10051 +#define IDC_FD_STATS1 10052 +#define IDC_FD_STATS2 10053 +#define IDC_FD_STATS3 10054 +#define IDC_LISTCTRLFILENAMES 10055 +#define IDC_TAKEOVER 10056 +#define IDC_CMTBT 10057 +#define IDC_BUTTONSTRIP 10058 +#define IDC_FILENAME 10059 +#define IDC_APPLY 10060 +#define IDC_APPLY_AND_CLOSE 10061 #define ID_CLOSEWNDFD 5100 wxSizer *fileDetails( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE ); -#define IDC_CMT_TEXT 10063 -#define IDC_FC_CLEAR 10064 -#define IDC_RATELIST 10065 -#define IDCOK 10066 -#define IDCCANCEL 10067 +#define IDC_CMT_TEXT 10062 +#define IDC_FC_CLEAR 10063 +#define IDC_RATELIST 10064 +#define IDCOK 10065 +#define IDCCANCEL 10066 wxSizer *commentDlg( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE ); -#define IDC_LST 10068 -#define IDC_CMSTATUS 10069 -#define IDCREF 10070 +#define IDC_LST 10067 +#define IDC_CMSTATUS 10068 +#define IDCREF 10069 wxSizer *commentLstDlg( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE ); -#define ID_ANIMATE 10071 -#define ID_HTTPDOWNLOADPROGRESS 10072 -#define IDC_DOWNLOADSIZE 10073 +#define ID_ANIMATE 10070 +#define ID_HTTPDOWNLOADPROGRESS 10071 +#define IDC_DOWNLOADSIZE 10072 #define ID_HTTPCANCEL 5101 wxSizer *downloadDlg( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE ); -#define ID_IPADDRESS 10074 -#define ID_IPORT 10075 -#define ID_USERNAME 10076 -#define ID_USERHASH 10077 -#define ID_ADDFRIEND 10078 -#define ID_CLOSEDLG 10079 +#define ID_IPADDRESS 10073 +#define ID_IPORT 10074 +#define ID_USERNAME 10075 +#define ID_USERHASH 10076 +#define ID_ADDFRIEND 10077 +#define ID_CLOSEDLG 10078 wxSizer *addFriendDlg( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE ); -#define ID_BTNRELSHARED 10080 -#define ID_SHFILELIST 10081 -#define IDC_SREQUESTED 10082 -#define IDC_SREQUESTED2 10083 -#define IDC_SACCEPTED 10084 -#define IDC_SACCEPTED2 10085 -#define IDC_STRANSFERRED 10086 -#define IDC_STRANSFERRED2 10087 +#define ID_SHARESSPLATTER 10079 wxSizer *sharedfilesDlg( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE ); -#define ID_DLOADSCOPE 10088 -#define IDC_C0 10089 -#define IDC_C0_3 10090 -#define IDC_C0_2 10091 -#define ID_ULOADSCOPE 10092 -#define IDC_C1 10093 -#define IDC_C1_3 10094 -#define IDC_C1_2 10095 -#define ID_OTHERS 10096 -#define IDC_S3 10097 -#define IDC_S0 10098 -#define ID_ACTIVEC 10099 -#define IDC_S1 10100 +#define ID_DLOADSCOPE 10080 +#define IDC_C0 10081 +#define IDC_C0_3 10082 +#define IDC_C0_2 10083 +#define ID_ULOADSCOPE 10084 +#define IDC_C1 10085 +#define IDC_C1_3 10086 +#define IDC_C1_2 10087 +#define ID_OTHERS 10088 +#define IDC_S3 10089 +#define IDC_S0 10090 +#define ID_ACTIVEC 10091 +#define IDC_S1 10092 wxSizer *statsDlg( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE ); -#define ID_DNAME 10101 -#define ID_DHASH 10102 -#define ID_DSOFT 10103 -#define ID_DVERSION 10104 -#define ID_DIP 10105 -#define ID_DID 10106 -#define ID_DSIP 10107 -#define ID_DSNAME 10108 -#define IDT_OBFUSCATION 10109 -#define IDT_KAD 10110 -#define ID_DDOWNLOADING 10111 -#define ID_DAVDR 10112 -#define ID_DAVUR 10113 -#define ID_DDOWN 10114 -#define ID_DDUP 10115 -#define ID_DDOWNTOTAL 10116 -#define ID_DUPTOTAL 10117 -#define ID_DRATIO 10118 -#define IDC_CDIDENT 10119 -#define ID_DRATING 10120 -#define ID_DSCORE 10121 -#define ID_CLOSEWND 10122 +#define ID_DNAME 10093 +#define ID_DHASH 10094 +#define ID_DSOFT 10095 +#define ID_DVERSION 10096 +#define ID_DIP 10097 +#define ID_DID 10098 +#define ID_DSIP 10099 +#define ID_DSNAME 10100 +#define IDT_OBFUSCATION 10101 +#define IDT_KAD 10102 +#define ID_DDOWNLOADING 10103 +#define ID_DAVDR 10104 +#define ID_DAVUR 10105 +#define ID_DDOWN 10106 +#define ID_DDUP 10107 +#define ID_DDOWNTOTAL 10108 +#define ID_DUPTOTAL 10109 +#define ID_DRATIO 10110 +#define IDC_CDIDENT 10111 +#define ID_DRATING 10112 +#define ID_DSCORE 10113 +#define ID_CLOSEWND 10114 wxSizer *clientDetails( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE ); -#define IDC_NICK 10123 -#define IDC_LANGUAGE 10124 -#define IDC_NEWVERSION 10125 -#define IDC_STARTMIN 10126 -#define IDC_EXIT 10127 -#define IDC_ENABLETRAYICON 10128 -#define IDC_MINTRAY 10129 -#define IDC_TOOLTIPDELAY 10130 -#define IDC_BROWSERSELF 10131 -#define IDC_SELBROWSER 10132 -#define IDC_BROWSERTABS 10133 -#define IDC_VIDEOPLAYER 10134 -#define IDC_BROWSEV 10135 -#define IDC_VIDEOBACKUP 10136 +#define IDC_NICK 10115 +#define IDC_LANGUAGE 10116 +#define IDC_NEWVERSION 10117 +#define IDC_STARTMIN 10118 +#define IDC_EXIT 10119 +#define IDC_ENABLETRAYICON 10120 +#define IDC_MINTRAY 10121 +#define IDC_TOOLTIPDELAY 10122 +#define IDC_BROWSERSELF 10123 +#define IDC_SELBROWSER 10124 +#define IDC_BROWSERTABS 10125 +#define IDC_VIDEOPLAYER 10126 +#define IDC_BROWSEV 10127 +#define IDC_VIDEOBACKUP 10128 wxSizer *PreferencesGeneralTab( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE ); -#define IDC_MAXDOWN 10137 -#define IDC_MAXUP 10138 -#define IDC_SLOTALLOC 10139 -#define IDC_PORT 10140 -#define ID_TEXT_CLIENT_UDP_PORT 10141 -#define IDC_UDPENABLE 10142 -#define IDC_UDPPORT 10143 -#define IDC_UPNP_ENABLED 10144 -#define IDC_UPNPTCPPORT 10145 -#define IDC_ADDRESS 10146 -#define ID_TEXT 10147 -#define IDC_MAXSOURCEPERFILE 10148 -#define IDC_MAXCON 10149 -#define IDC_NETWORKKAD 10150 -#define IDC_NETWORKED2K 10151 -#define IDC_AUTOCONNECT 10152 -#define IDC_RECONN 10153 +#define IDC_MAXDOWN 10129 +#define IDC_MAXUP 10130 +#define IDC_SLOTALLOC 10131 +#define IDC_PORT 10132 +#define ID_TEXT_CLIENT_UDP_PORT 10133 +#define IDC_UDPENABLE 10134 +#define IDC_UDPPORT 10135 +#define IDC_UPNP_ENABLED 10136 +#define IDC_UPNPTCPPORT 10137 +#define IDC_ADDRESS 10138 +#define ID_TEXT 10139 +#define IDC_MAXSOURCEPERFILE 10140 +#define IDC_MAXCON 10141 +#define IDC_NETWORKKAD 10142 +#define IDC_NETWORKED2K 10143 +#define IDC_AUTOCONNECT 10144 +#define IDC_RECONN 10145 wxSizer *PreferencesConnectionTab( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE ); -#define IDC_REMOVEDEAD 10154 -#define IDC_SERVERRETRIES 10155 -#define IDC_AUTOSERVER 10156 -#define IDC_EDITADR 10157 -#define IDC_UPDATESERVERCONNECT 10158 -#define IDC_UPDATESERVERCLIENT 10159 -#define IDC_SCORE 10160 -#define IDC_SMARTIDCHECK 10161 -#define IDC_SAFESERVERCONNECT 10162 -#define IDC_AUTOCONNECTSTATICONLY 10163 -#define IDC_MANUALSERVERHIGHPRIO 10164 +#define IDC_REMOVEDEAD 10146 +#define IDC_SERVERRETRIES 10147 +#define IDC_AUTOSERVER 10148 +#define IDC_EDITADR 10149 +#define IDC_UPDATESERVERCONNECT 10150 +#define IDC_UPDATESERVERCLIENT 10151 +#define IDC_SCORE 10152 +#define IDC_SMARTIDCHECK 10153 +#define IDC_SAFESERVERCONNECT 10154 +#define IDC_AUTOCONNECTSTATICONLY 10155 +#define IDC_MANUALSERVERHIGHPRIO 10156 wxSizer *PreferencesServerTab( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE ); -#define IDC_ICH 10165 -#define IDC_AICHTRUST 10166 -#define IDC_ADDNEWFILESPAUSED 10167 -#define IDC_DAP 10168 -#define IDC_PREVIEWPRIO 10169 -#define IDC_STARTNEXTFILE 10170 -#define IDC_STARTNEXTFILE_SAME 10171 -#define IDC_ALLOCFULLFILE 10172 -#define IDC_CHECKDISKSPACE 10173 -#define IDC_MINDISKSPACE 10174 -#define IDC_SRCSEEDS 10175 -#define IDC_FULLCHUNKTRANS 10176 -#define IDC_UAP 10177 +#define IDC_ICH 10157 +#define IDC_AICHTRUST 10158 +#define IDC_ADDNEWFILESPAUSED 10159 +#define IDC_DAP 10160 +#define IDC_PREVIEWPRIO 10161 +#define IDC_STARTNEXTFILE 10162 +#define IDC_STARTNEXTFILE_SAME 10163 +#define IDC_ALLOCFULLFILE 10164 +#define IDC_CHECKDISKSPACE 10165 +#define IDC_MINDISKSPACE 10166 +#define IDC_SRCSEEDS 10167 +#define IDC_FULLCHUNKTRANS 10168 +#define IDC_UAP 10169 wxSizer *PreferencesFilesTab( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE ); -#define IDC_INCFILES 10178 -#define IDC_SELINCDIR 10179 -#define IDC_TEMPFILES 10180 -#define IDC_SELTEMPDIR 10181 -#define IDC_SHARESELECTOR 10182 -#define IDC_SHAREHIDDENFILES 10183 +#define IDC_INCFILES 10170 +#define IDC_SELINCDIR 10171 +#define IDC_TEMPFILES 10172 +#define IDC_SELTEMPDIR 10173 +#define IDC_SHARESELECTOR 10174 +#define IDC_SHAREHIDDENFILES 10175 wxSizer *PreferencesDirectoriesTab( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE ); -#define IDC_SLIDERINFO 10184 -#define IDC_SLIDER 10185 -#define IDC_SLIDERINFO3 10186 -#define IDC_SLIDER3 10187 -#define IDC_SLIDERINFO4 10188 -#define IDC_SLIDER4 10189 -#define IDC_DOWNLOAD_CAP 10190 -#define IDC_UPLOAD_CAP 10191 -#define IDC_COLORSELECTOR 10192 -#define IDC_COLOR_BUTTON 10193 -#define IDC_SLIDERINFO2 10194 -#define IDC_SLIDER2 10195 -#define IDC_CLIENTVERSIONS 10196 +#define IDC_SLIDERINFO 10176 +#define IDC_SLIDER 10177 +#define IDC_SLIDERINFO3 10178 +#define IDC_SLIDER3 10179 +#define IDC_SLIDERINFO4 10180 +#define IDC_SLIDER4 10181 +#define IDC_DOWNLOAD_CAP 10182 +#define IDC_UPLOAD_CAP 10183 +#define IDC_COLORSELECTOR 10184 +#define IDC_COLOR_BUTTON 10185 +#define IDC_SLIDERINFO2 10186 +#define IDC_SLIDER2 10187 +#define IDC_CLIENTVERSIONS 10188 wxSizer *PreferencesStatisticsTab( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE ); -#define IDC_MAXCON5SEC 10197 -#define IDC_FILEBUFFERSIZE_STATIC 10198 -#define IDC_FILEBUFFERSIZE 10199 -#define IDC_QUEUESIZE_STATIC 10200 -#define IDC_QUEUESIZE 10201 -#define IDC_SERVERKEEPALIVE_LABEL 10202 -#define IDC_SERVERKEEPALIVE 10203 +#define IDC_MAXCON5SEC 10189 +#define IDC_FILEBUFFERSIZE_STATIC 10190 +#define IDC_FILEBUFFERSIZE 10191 +#define IDC_QUEUESIZE_STATIC 10192 +#define IDC_QUEUESIZE 10193 +#define IDC_SERVERKEEPALIVE_LABEL 10194 +#define IDC_SERVERKEEPALIVE 10195 wxSizer *PreferencesaMuleTweaksTab( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE ); -#define IDC_SKIN 10204 -#define IDC_FED2KLH 10205 -#define IDC_EXTCATINFO 10206 -#define IDC_SHOWRATEONTITLE 10207 -#define IDC_RATESBEFORETITLE 10208 -#define IDC_RATESAFTERTITLE 10209 -#define IDC_SHOWOVERHEAD 10210 -#define IDC_VERTTOOLBAR 10211 -#define IDC_PERCENT 10212 -#define IDC_PROGBAR 10213 -#define IDC_3DDEPTH 10214 -#define IDC_AUTOSORT 10215 +#define IDC_SKIN 10196 +#define IDC_FED2KLH 10197 +#define IDC_EXTCATINFO 10198 +#define IDC_SHOWRATEONTITLE 10199 +#define IDC_RATESBEFORETITLE 10200 +#define IDC_RATESAFTERTITLE 10201 +#define IDC_SHOWOVERHEAD 10202 +#define IDC_VERTTOOLBAR 10203 +#define IDC_PERCENT 10204 +#define IDC_PROGBAR 10205 +#define IDC_3DDEPTH 10206 +#define IDC_AUTOSORT 10207 wxSizer *PreferencesGuiTweaksTab( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE ); -#define IDC_EXT_CONN_ACCEPT 10216 -#define IDC_EXT_CONN_IP 10217 -#define IDC_EXT_CONN_TCP_PORT 10218 -#define IDC_UPNP_EC_ENABLED 10219 -#define IDC_EXT_CONN_PASSWD 10220 -#define IDC_ENABLE_WEB 10221 -#define IDC_WEBTEMPLATE 10222 -#define IDC_WEB_PASSWD 10223 -#define IDC_ENABLE_WEB_LOW 10224 -#define IDC_WEB_PASSWD_LOW 10225 -#define IDC_WEB_PORT 10226 -#define IDC_UPNP_WEBSERVER_ENABLED 10227 -#define IDC_WEBUPNPTCPPORT 10228 -#define IDC_WEB_REFRESH_TIMEOUT 10229 -#define IDC_WEB_GZIP 10230 +#define IDC_EXT_CONN_ACCEPT 10208 +#define IDC_EXT_CONN_IP 10209 +#define IDC_EXT_CONN_TCP_PORT 10210 +#define IDC_UPNP_EC_ENABLED 10211 +#define IDC_EXT_CONN_PASSWD 10212 +#define IDC_ENABLE_WEB 10213 +#define IDC_WEBTEMPLATE 10214 +#define IDC_WEB_PASSWD 10215 +#define IDC_ENABLE_WEB_LOW 10216 +#define IDC_WEB_PASSWD_LOW 10217 +#define IDC_WEB_PORT 10218 +#define IDC_UPNP_WEBSERVER_ENABLED 10219 +#define IDC_WEBUPNPTCPPORT 10220 +#define IDC_WEB_REFRESH_TIMEOUT 10221 +#define IDC_WEB_GZIP 10222 wxSizer *PreferencesRemoteControlsTab( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE ); extern wxSizer *prefs_sizer; -#define ID_PREFSLISTCTRL 10231 -#define ID_PREFS_OK_TOP 10232 -#define ID_PREFS_CANCEL_TOP 10233 +#define ID_PREFSLISTCTRL 10223 +#define ID_PREFS_OK_TOP 10224 +#define ID_PREFS_CANCEL_TOP 10225 wxSizer *preferencesDlgTop( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE ); -#define IDC_TITLE 10234 -#define IDC_COMMENT 10235 -#define IDC_INCOMING 10236 -#define IDC_BROWSE 10237 -#define IDC_PRIOCOMBO 10238 -#define ID_BOX_CATCOLOR 10239 -#define IDC_CATCOLOR 10240 +#define IDC_TITLE 10226 +#define IDC_COMMENT 10227 +#define IDC_INCOMING 10228 +#define IDC_BROWSE 10229 +#define IDC_PRIOCOMBO 10230 +#define ID_BOX_CATCOLOR 10231 +#define IDC_CATCOLOR 10232 wxSizer *CategoriesEditWindow( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE ); -#define ID_SPLATTER 10241 +#define ID_DOWNLOADSSPLATTER 10233 wxSizer *transferDlg( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE ); -#define ID_SERVERINFO 10242 -#define ID_BTN_RESET_SERVER 10243 +#define ID_SERVERINFO 10234 +#define ID_BTN_RESET_SERVER 10235 wxSizer *ServerInfoLog( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE ); -#define ID_LOGVIEW 10244 -#define ID_BTN_RESET 10245 +#define ID_LOGVIEW 10236 +#define ID_BTN_RESET 10237 wxSizer *aMuleLog( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE ); -#define ID_UPDATELIST 10246 -#define IDC_SERVERLISTURL 10247 -#define IDC_SERVERNAME 10248 -#define IDC_IPADDRESS 10249 -#define IDC_SPORT 10250 -#define ID_ADDTOLIST 10251 -#define IDC_ED2KDISCONNECT 10252 -#define ID_SERVERLIST 10253 +#define ID_UPDATELIST 10238 +#define IDC_SERVERLISTURL 10239 +#define IDC_SERVERNAME 10240 +#define IDC_IPADDRESS 10241 +#define IDC_SPORT 10242 +#define ID_ADDTOLIST 10243 +#define IDC_ED2KDISCONNECT 10244 +#define ID_SERVERLIST 10245 wxSizer *serverListDlgUp( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE ); -#define ID_SRVLOG_NOTEBOOK 10254 +#define ID_SRVLOG_NOTEBOOK 10246 wxSizer *serverListDlgDown( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE ); -#define ID_UPDATEKADLIST 10255 -#define IDC_NODESLISTURL 10256 -#define ID_KADSCOPE 10257 -#define ID_NODE_IP1 10258 -#define ID_NODE_IP2 10259 -#define ID_NODE_IP3 10260 -#define ID_NODE_IP4 10261 -#define ID_NODE_PORT 10262 -#define ID_NODECONNECT 10263 -#define ID_KNOWNNODECONNECT 10264 -#define ID_KADDISCONNECT 10265 +#define ID_UPDATEKADLIST 10247 +#define IDC_NODESLISTURL 10248 +#define ID_KADSCOPE 10249 +#define ID_NODE_IP1 10250 +#define ID_NODE_IP2 10251 +#define ID_NODE_IP3 10252 +#define ID_NODE_IP4 10253 +#define ID_NODE_PORT 10254 +#define ID_NODECONNECT 10255 +#define ID_KNOWNNODECONNECT 10256 +#define ID_KADDISCONNECT 10257 wxSizer *KadDlg( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE ); -#define ID_ED2KINFO 10266 +#define ID_ED2KINFO 10258 wxSizer *ED2K_Info( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE ); -#define IDC_SECIDENT 10267 -#define IDC_SUPPORT_PO 10268 -#define IDC_ENABLE_PO_OUTGOING 10269 -#define IDC_ENFORCE_PO_INCOMING 10270 -#define IDC_SEESHARES 10271 -#define IDC_IPFCLIENTS 10272 -#define IDC_IPFSERVERS 10273 -#define IDC_IPFRELOAD 10274 -#define IDC_IPFILTERURL 10275 -#define IDC_IPFILTERUPDATE 10276 -#define IDC_AUTOIPFILTER 10277 -#define ID_IPFILTERLEVEL 10278 -#define IDC_FILTERLAN 10279 -#define IDC_PARANOID 10280 -#define IDC_IPFILTERSYS 10281 +#define IDC_SECIDENT 10259 +#define IDC_SUPPORT_PO 10260 +#define IDC_ENABLE_PO_OUTGOING 10261 +#define IDC_ENFORCE_PO_INCOMING 10262 +#define IDC_SEESHARES 10263 +#define IDC_IPFCLIENTS 10264 +#define IDC_IPFSERVERS 10265 +#define IDC_IPFRELOAD 10266 +#define IDC_IPFILTERURL 10267 +#define IDC_IPFILTERUPDATE 10268 +#define IDC_AUTOIPFILTER 10269 +#define ID_IPFILTERLEVEL 10270 +#define IDC_FILTERLAN 10271 +#define IDC_PARANOID 10272 +#define IDC_IPFILTERSYS 10273 wxSizer *PreferencesSecurityTab( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE ); -#define IDC_ONLINESIG 10282 -#define IDC_OSUPDATE 10283 -#define IDC_OSDIR 10284 -#define IDC_SELOSDIR 10285 +#define IDC_ONLINESIG 10274 +#define IDC_OSUPDATE 10275 +#define IDC_OSDIR 10276 +#define IDC_SELOSDIR 10277 wxSizer *PreferencesOnlineSigTab( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE ); -#define IDC_MSGFILTER 10286 -#define IDC_MSGFILTER_ALL 10287 -#define IDC_MSGFILTER_NONFRIENDS 10288 -#define IDC_MSGFILTER_NONSECURE 10289 -#define IDC_MSGFILTER_WORD 10290 -#define IDC_MSGWORD 10291 -#define IDC_MSGLOG 10292 -#define IDC_FILTERCOMMENTS 10293 -#define IDC_COMMENTWORD 10294 +#define IDC_MSGFILTER 10278 +#define IDC_MSGFILTER_ALL 10279 +#define IDC_MSGFILTER_NONFRIENDS 10280 +#define IDC_MSGFILTER_NONSECURE 10281 +#define IDC_MSGFILTER_WORD 10282 +#define IDC_MSGWORD 10283 +#define IDC_MSGLOG 10284 +#define IDC_FILTERCOMMENTS 10285 +#define IDC_COMMENTWORD 10286 wxSizer *PreferencesFilteringTab( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE ); -#define ID_PROXY_AUTO_SERVER_CONNECT_WITHOUT_PROXY 10295 -#define ID_PROXY_ENABLE_PASSWORD 10296 -#define ID_PROXY_USER 10297 -#define ID_PROXY_PASSWORD 10298 -#define ID_PROXY_ENABLE_PROXY 10299 -#define ID_PROXY_TYPE 10300 -#define ID_PROXY_NAME 10301 -#define ID_PROXY_PORT 10302 +#define ID_PROXY_AUTO_SERVER_CONNECT_WITHOUT_PROXY 10287 +#define ID_PROXY_ENABLE_PASSWORD 10288 +#define ID_PROXY_USER 10289 +#define ID_PROXY_PASSWORD 10290 +#define ID_PROXY_ENABLE_PROXY 10291 +#define ID_PROXY_TYPE 10292 +#define ID_PROXY_NAME 10293 +#define ID_PROXY_PORT 10294 wxSizer *PreferencesProxyTab( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE ); -#define ID_REMOTE_HOST 10303 -#define ID_REMOTE_PORT 10304 -#define ID_EC_LOGIN 10305 -#define ID_EC_PASSWD 10306 -#define ID_EC_SAVE 10307 +#define ID_REMOTE_HOST 10295 +#define ID_REMOTE_PORT 10296 +#define ID_EC_LOGIN 10297 +#define ID_EC_PASSWD 10298 +#define ID_EC_SAVE 10299 wxSizer *CoreConnect( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE ); -#define ID_VERBOSEDEBUG 10308 -#define ID_DEBUGCATS 10309 +#define ID_VERBOSEDEBUG 10300 +#define ID_DEBUGCATS 10301 wxSizer *PreferencesDebug( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE ); extern wxSizer *IDC_CURJOB; -#define IDC_CONV_PB_LABEL 10310 -#define IDC_CONV_PROZENT 10311 -#define IDC_CONV_PB_CURRENT 10312 -#define IDC_JOBLIST 10313 -#define IDC_ADDITEM 10314 -#define IDC_RETRY 10315 -#define IDC_CONVREMOVE 10316 +#define IDC_CONV_PB_LABEL 10302 +#define IDC_CONV_PROZENT 10303 +#define IDC_CONV_PB_CURRENT 10304 +#define IDC_JOBLIST 10305 +#define IDC_ADDITEM 10306 +#define IDC_RETRY 10307 +#define IDC_CONVREMOVE 10308 wxSizer *convertDlg( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE ); -#define ID_KADINFO 10317 +#define ID_KADINFO 10309 wxSizer *Kad_Info( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE ); extern wxSizer *m_networknotebooksizer; -#define ID_NETNOTEBOOK 10318 +#define ID_NETNOTEBOOK 10310 wxSizer *NetDialog( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE ); extern wxSizer *IDC_PREFS_EVENTS_PAGE; -#define IDC_EVENTLIST 10319 +#define IDC_EVENTLIST 10311 wxSizer *PreferencesEventsTab( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE ); +extern wxSizer *s_sharedfilespeerHeader; +#define ID_SHAREDCLIENTTOGGLE 10312 +#define ID_LINE 10313 +#define IDC_SREQUESTED 10314 +#define IDC_SREQUESTED2 10315 +#define IDC_SACCEPTED 10316 +#define IDC_SACCEPTED2 10317 +#define IDC_STRANSFERRED 10318 +#define IDC_STRANSFERRED2 10319 +#define ID_SHAREDCLIENTLIST 10320 +wxSizer *sharedfilesBottomDlg( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE ); + +#define ID_BTNRELSHARED 10321 +#define ID_SHFILELIST 10322 +wxSizer *sharedfilesTopDlg( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE ); + // Declare menubar functions // Declare toolbar functions -#define ID_BUTTONCONNECT 10320 -#define ID_BUTTONNETWORKS 10321 -#define ID_BUTTONSEARCH 10322 -#define ID_BUTTONTRANSFER 10323 -#define ID_BUTTONSHARED 10324 -#define ID_BUTTONMESSAGES 10325 -#define ID_BUTTONSTATISTICS 10326 -#define ID_BUTTONNEWPREFERENCES 10327 -#define ID_BUTTONIMPORT 10328 -#define ID_ABOUT 10329 +#define ID_BUTTONCONNECT 10323 +#define ID_BUTTONNETWORKS 10324 +#define ID_BUTTONSEARCH 10325 +#define ID_BUTTONDOWNLOADS 10326 +#define ID_BUTTONSHARED 10327 +#define ID_BUTTONMESSAGES 10328 +#define ID_BUTTONSTATISTICS 10329 +#define ID_BUTTONNEWPREFERENCES 10330 +#define ID_BUTTONIMPORT 10331 +#define ID_ABOUT 10332 void muleToolbar( wxToolBar *parent ); // Declare bitmap functions diff --git a/src/updownclient.h b/src/updownclient.h index 2274e74b..2508cad4 100644 --- a/src/updownclient.h +++ b/src/updownclient.h @@ -351,6 +351,12 @@ public: void ClearUploadFileID() { m_requpfileid.Clear(); m_uploadingfile = NULL;}; uint32 SendBlockData(); void ClearUploadBlockRequests(); +#ifndef CLIENT_GUI + uint16 GetRankingInfo() const; +#else + uint16 m_rankingInfo; + uint16 GetRankingInfo() const { return m_rankingInfo; } +#endif void SendRankingInfo(); void SendCommentInfo(CKnownFile *file); bool IsDifferentPartBlock() const; -- 2.11.4.GIT