In the features forum, I found this idea which I think is great:
An option to only close un-used hubs (meaning the hubs you don't have any up- or downloads with).
See also:
http://dcplusplus.sourceforge.net/forum ... 0794#60794
But because I started coding it and got stuck, I thought it belongs better over here.
If anybody could help, it would be appreciated !
It should be placed just like the "Close disconnected" feature, in the Window menu.
The idea is like this:
If a hub is named in the TranferViews Hub column, some connection (up- or download) is active.
In the file Hubframe.cpp it should look like this:
Code: Select all
void HubFrame::closeAllUnusedHubs() {
for(FrameIter i=frames.begin(); i!= frames.end(); ++i) {
if(!(i->second->isActiveHub)) {
i->second->PostMessage(WM_CLOSE);
}
}
};
Now I'm a bit stuck where and how I should set this isActiveHub to true when a hub is used.
I guess it should be something like:
Code: Select all
if (Util::stricmp(TransferView::COLUMN_HUB, name_of_hub_window)==0)
isActiveHub = true
Thanks for helping !