← Back to team overview

linuxdcpp-team team mailing list archive

[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2212: "Close all hubs" menu

 

------------------------------------------------------------
revno: 2212
committer: eMTee <emtee11@xxxxxxxxx>
branch nick: dcplusplus
timestamp: Wed 2010-08-25 14:54:08 +0200
message:
  "Close all hubs" menu
modified:
  changelog.txt
  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 'changelog.txt'
--- changelog.txt	2010-08-07 15:20:27 +0000
+++ changelog.txt	2010-08-25 12:54:08 +0000
@@ -7,6 +7,8 @@
 * [L#571546] Add an "X" icon to close the active tab (poy)
 * [L#603071] Linux compile fix (thanks netcelli)
 * [L#606435] Prevent potential re-hashing (thanks vasily.n)
+* Automatic incoming connection type detection - enabled by default (emtee)
+* Add "Close all hubs" to Window menu (emtee)
 
 -- 0.770 2010-07-05 --
 * [L#550300] Catch more potential file corruptions (thanks bigmuscle)

=== modified file 'win32/HubFrame.cpp'
--- win32/HubFrame.cpp	2010-07-10 14:36:48 +0000
+++ win32/HubFrame.cpp	2010-08-25 12:54:08 +0000
@@ -64,10 +64,10 @@
 	new HubFrame(mdiParent, url);
 }
 
-void HubFrame::closeDisconnected() {
+void HubFrame::closeAll(bool all) {
 	for(FrameIter i = frames.begin(); i != frames.end(); ++i) {
 		HubFrame* frame = *i;
-		if(!(frame->client->isConnected())) {
+		if(all || !(frame->client->isConnected())) {
 			frame->close(true);
 		}
 	}

=== modified file 'win32/HubFrame.h'
--- win32/HubFrame.h	2010-03-26 23:00:27 +0000
+++ win32/HubFrame.h	2010-08-25 12:54:08 +0000
@@ -67,7 +67,7 @@
 	const string& getId() const;
 
 	static void openWindow(dwt::TabView* mdiParent, const string& url);
-	static void closeDisconnected();
+	static void closeAll(bool all);
 	static void closeFavGroup(const string& group, bool reversed);
 	static void resortUsers();
 

=== modified file 'win32/MainWindow.cpp'
--- win32/MainWindow.cpp	2010-08-23 16:04:27 +0000
+++ win32/MainWindow.cpp	2010-08-25 12:54:08 +0000
@@ -284,7 +284,8 @@
 	{
 		MenuPtr window = mainMenu->appendPopup(T_("&Window"));
 
-		window->appendItem(T_("Close disconnected hubs"), std::bind(&HubFrame::closeDisconnected), WinUtil::menuIcon(IDI_HUB_OFF));
+		window->appendItem(T_("Close disconnected hubs"), std::bind(&HubFrame::closeAll, false), WinUtil::menuIcon(IDI_HUB_OFF));
+		window->appendItem(T_("Close all hubs"), std::bind(&HubFrame::closeAll, true), WinUtil::menuIcon(IDI_HUB));
 		window->appendItem(T_("Close all hubs of a favorite group"), std::bind(&MainWindow::handleCloseFavGroup, this, false), WinUtil::menuIcon(IDI_FAVORITE_HUBS));
 		window->appendItem(T_("Close hubs not in a favorite group"), std::bind(&MainWindow::handleCloseFavGroup, this, true), WinUtil::menuIcon(IDI_FAVORITE_HUBS));
 		window->appendSeparator();