linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #01361
[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2162: Fix crashes related to file lists
------------------------------------------------------------
revno: 2162
committer: poy <poy@xxxxxxxxxx>
branch nick: repo
timestamp: Fri 2010-06-18 12:09:23 +0200
message:
Fix crashes related to file lists
modified:
changelog.txt
dcpp/SettingsManager.cpp
dcpp/SettingsManager.h
help/settings_tabs.html
win32/DirectoryListingFrame.cpp
win32/DirectoryListingFrame.h
win32/TabsPage.cpp
--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk
Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'changelog.txt'
--- changelog.txt 2010-06-18 09:27:23 +0000
+++ changelog.txt 2010-06-18 10:09:23 +0000
@@ -1,6 +1,7 @@
* [L#550300] Catch more potential file corruptions (thanks bigmuscle)
* [ADC] NAT traversal to allow passive-passive connections (thanks cologic)
* Reduce donwload reconnect attempts after connection failures (poy)
+* Fix crashes related to file lists (poy)
-- 0.762 2010-05-16 --
* Stability improvement related to menus (poy)
=== modified file 'dcpp/SettingsManager.cpp'
--- dcpp/SettingsManager.cpp 2010-02-25 20:19:44 +0000
+++ dcpp/SettingsManager.cpp 2010-06-18 10:09:23 +0000
@@ -74,7 +74,7 @@
"AutoDropAll", "AutoDropFilelists", "AutoDropDisconnect",
"OutgoingConnections",
"NoIpOverride", "SearchOnlyFreeSlots", "LastSearchType", "BoldFinishedDownloads", "BoldFinishedUploads", "BoldQueue",
- "BoldHub", "BoldPm", "BoldSearch", "BoldSearchSpy", "SocketInBuffer", "SocketOutBuffer",
+ "BoldHub", "BoldPm", "BoldFL", "BoldSearch", "BoldSearchSpy", "SocketInBuffer", "SocketOutBuffer",
"BoldWaitingUsers", "BoldSystemLog", "AutoRefreshTime",
"UseTLS", "AutoSearchLimit", "AltSortOrder", "AutoKickNoFavs", "PromptPassword", "SpyFrameIgnoreTthSearches",
"DontDlAlreadyQueued", "MaxCommandLength", "AllowUntrustedHubs", "AllowUntrustedClients",
@@ -255,6 +255,7 @@
setDefault(BOLD_QUEUE, true);
setDefault(BOLD_HUB, true);
setDefault(BOLD_PM, true);
+ setDefault(BOLD_FL, true);
setDefault(BOLD_SEARCH, true);
setDefault(BOLD_SEARCH_SPY, true);
setDefault(BOLD_WAITING_USERS, true);
=== modified file 'dcpp/SettingsManager.h'
--- dcpp/SettingsManager.h 2010-02-25 20:19:44 +0000
+++ dcpp/SettingsManager.h 2010-06-18 10:09:23 +0000
@@ -87,7 +87,7 @@
AUTODROP_ALL, AUTODROP_FILELISTS, AUTODROP_DISCONNECT,
OUTGOING_CONNECTIONS,
NO_IP_OVERRIDE, SEARCH_ONLY_FREE_SLOTS, LAST_SEARCH_TYPE, BOLD_FINISHED_DOWNLOADS, BOLD_FINISHED_UPLOADS, BOLD_QUEUE,
- BOLD_HUB, BOLD_PM, BOLD_SEARCH, BOLD_SEARCH_SPY, SOCKET_IN_BUFFER, SOCKET_OUT_BUFFER,
+ BOLD_HUB, BOLD_PM, BOLD_FL, BOLD_SEARCH, BOLD_SEARCH_SPY, SOCKET_IN_BUFFER, SOCKET_OUT_BUFFER,
BOLD_WAITING_USERS, BOLD_SYSTEM_LOG, AUTO_REFRESH_TIME,
USE_TLS, AUTO_SEARCH_LIMIT, ALT_SORT_ORDER, AUTO_KICK_NO_FAVS, PROMPT_PASSWORD, SPY_FRAME_IGNORE_TTH_SEARCHES,
DONT_DL_ALREADY_QUEUED, MAX_COMMAND_LENGTH, ALLOW_UNTRUSTED_HUBS, ALLOW_UNTRUSTED_CLIENTS,
=== modified file 'help/settings_tabs.html'
--- help/settings_tabs.html 2008-11-13 16:27:41 +0000
+++ help/settings_tabs.html 2010-06-18 10:09:23 +0000
@@ -16,6 +16,9 @@
<dt>Private message</dt>
<dd cshelp="IDH_SETTINGS_TABS_BOLD_PM">When a private message appears in a
<a href="window_pm.html">Private message</a> window that's not focused, the tab will be highlighted if you have this option selected.</dd>
+<dt>File List</dt>
+ <dd cshelp="IDH_SETTINGS_TABS_BOLD_FL">When the content of a
+<a href="window_file_list.html">File List</a> window that's not focused has changed, the tab will be highlighted if you have this option selected.</dd>
<dt>Search</dt>
<dd cshelp="IDH_SETTINGS_TABS_BOLD_SEARCH">When a search result is received in a
<a href="window_search.html">Search</a> window that's not focused, the tab will be highlighted if you have this option selected.</dd>
=== modified file 'win32/DirectoryListingFrame.cpp'
--- win32/DirectoryListingFrame.cpp 2010-05-16 17:26:49 +0000
+++ win32/DirectoryListingFrame.cpp 2010-06-18 10:09:23 +0000
@@ -80,20 +80,22 @@
}
void DirectoryListingFrame::openWindow(dwt::TabView* mdiParent, const tstring& aFile, const tstring& aDir, const HintedUser& aUser, int64_t aSpeed) {
- bool wasActive = false;
UserIter prev = lists.find(aUser);
- if(prev != lists.end()) {
- wasActive = prev->second->isActive();
- // close the other window this way instead of via SendMessage so we don't have to wait for it
- MSG msg = { prev->second->handle(), WM_CLOSE };
- prev->second->getDispatcher().chain(msg);
+ if(prev == lists.end()) {
+ openWindow_(false, mdiParent, aFile, aDir, aUser, aSpeed);
+ } else {
+ bool wasActive = prev->second->isActive();
+ prev->second->close();
+ mdiParent->callAsync(std::tr1::bind(&DirectoryListingFrame::openWindow_, wasActive, mdiParent, aFile, aDir, aUser, aSpeed));
}
+}
+void DirectoryListingFrame::openWindow_(bool activate, dwt::TabView* mdiParent, const tstring& aFile, const tstring& aDir, const HintedUser& aUser, int64_t aSpeed) {
DirectoryListingFrame* frame = new DirectoryListingFrame(mdiParent, aUser, aSpeed);
frame->loadFile(aFile, aDir);
- if(!wasActive && BOOLSETTING(POPUNDER_FILELIST))
- frame->setDirty(SettingsManager::POPUNDER_FILELIST); /// @todo add a setting
+ if(!activate && BOOLSETTING(POPUNDER_FILELIST))
+ frame->setDirty(SettingsManager::BOLD_FL);
else
frame->activate();
}
=== modified file 'win32/DirectoryListingFrame.h'
--- win32/DirectoryListingFrame.h 2010-03-20 14:12:35 +0000
+++ win32/DirectoryListingFrame.h 2010-06-18 10:09:23 +0000
@@ -66,6 +66,9 @@
const string& getId() const;
static void openWindow(dwt::TabView* mdiParent, const tstring& aFile, const tstring& aDir, const HintedUser& aUser, int64_t aSpeed);
+private:
+ static void openWindow_(bool activate, dwt::TabView* mdiParent, const tstring& aFile, const tstring& aDir, const HintedUser& aUser, int64_t aSpeed);
+public:
static void openWindow(dwt::TabView* mdiParent, const HintedUser& aUser, const string& txt, int64_t aSpeed);
static void openOwnList(dwt::TabView* parent);
static void closeAll();
=== modified file 'win32/TabsPage.cpp'
--- win32/TabsPage.cpp 2010-02-11 21:44:13 +0000
+++ win32/TabsPage.cpp 2010-06-18 10:09:23 +0000
@@ -30,6 +30,7 @@
PropPage::ListItem TabsPage::listItems[] = {
{ SettingsManager::BOLD_HUB, N_("Hub"), IDH_SETTINGS_TABS_BOLD_HUB },
{ SettingsManager::BOLD_PM, N_("Private message"), IDH_SETTINGS_TABS_BOLD_PM },
+ { SettingsManager::BOLD_FL, N_("File List"), IDH_SETTINGS_TABS_BOLD_FL },
{ SettingsManager::BOLD_SEARCH, N_("Search"), IDH_SETTINGS_TABS_BOLD_SEARCH },
{ SettingsManager::BOLD_SEARCH_SPY, N_("Search Spy"), IDH_SETTINGS_TABS_BOLD_SEARCH_SPY },
{ SettingsManager::BOLD_SYSTEM_LOG, N_("System Log"), IDH_SETTINGS_TABS_BOLD_SYSTEM_LOG },