linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #05801
[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2966: Add the option to reconnect all disconnected hubs
------------------------------------------------------------
revno: 2966
committer: iceman50 <bdcdevel@xxxxxxxxx>
branch nick: dcplusplus
timestamp: Thu 2012-06-28 11:43:57 -0500
message:
Add the option to reconnect all disconnected hubs
modified:
win32/HubFrame.cpp
win32/HubFrame.h
win32/MainWindow.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 'win32/HubFrame.cpp'
--- win32/HubFrame.cpp 2012-06-23 12:31:10 +0000
+++ win32/HubFrame.cpp 2012-06-28 16:43:57 +0000
@@ -134,6 +134,13 @@
});
}
+void HubFrame::reconnectDisconnected() {
+ for(auto i: frames) {
+ if(!i->client->isConnected())
+ i->handleReconnect();
+ }
+}
+
void HubFrame::resortUsers() {
for(auto i: frames)
i->resortForFavsFirst(true);
=== modified file 'win32/HubFrame.h'
--- win32/HubFrame.h 2012-06-23 12:31:10 +0000
+++ win32/HubFrame.h 2012-06-28 16:43:57 +0000
@@ -75,6 +75,8 @@
public:
static void closeAll(bool disconnected);
static void closeFavGroup(const string& group, bool reversed);
+
+ static void reconnectDisconnected();
static void resortUsers();
=== modified file 'win32/MainWindow.cpp'
--- win32/MainWindow.cpp 2012-06-21 18:52:47 +0000
+++ win32/MainWindow.cpp 2012-06-28 16:43:57 +0000
@@ -348,6 +348,9 @@
{
auto window = mainMenu->appendPopup(T_("&Window"));
+ window->appendItem(T_("Reconnect disconnected hubs"), &HubFrame::reconnectDisconnected, WinUtil::menuIcon(IDI_RECONNECT));
+ window->appendSeparator();
+
window->appendItem(T_("Close all hubs"), [] { HubFrame::closeAll(false); }, WinUtil::menuIcon(IDI_HUB));
window->appendItem(T_("Close disconnected hubs"), [] { HubFrame::closeAll(true); }, WinUtil::menuIcon(IDI_HUB_OFF));
window->appendItem(T_("Close all hubs of a favorite group"), [this] { handleCloseFavGroup(false); }, WinUtil::menuIcon(IDI_FAVORITE_HUBS));