← Back to team overview

linuxdcpp-team team mailing list archive

[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2455: Restore some status bars

 

------------------------------------------------------------
revno: 2455
committer: Jacek Sieka <arnetheduck@xxxxxxxxx>
branch nick: dcplusplus
timestamp: Tue 2011-03-15 22:16:24 +0100
message:
  Restore some status bars
modified:
  dwt/include/dwt/widgets/Rebar.h
  dwt/include/dwt/widgets/StatusBar.h
  dwt/src/widgets/Rebar.cpp
  dwt/src/widgets/StatusBar.cpp
  win32/ADLSearchFrame.cpp
  win32/DirectoryListingFrame.cpp
  win32/FinishedFrameBase.h
  win32/HubFrame.cpp
  win32/MainWindow.cpp
  win32/NotepadFrame.cpp
  win32/PrivateFrame.cpp
  win32/PublicHubsFrame.cpp
  win32/QueueFrame.cpp
  win32/SearchFrame.cpp
  win32/SpyFrame.cpp
  win32/StatsFrame.cpp
  win32/SystemFrame.cpp
  win32/UsersFrame.cpp
  win32/WaitingUsersFrame.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 'dwt/include/dwt/widgets/Rebar.h'
--- dwt/include/dwt/widgets/Rebar.h	2011-01-10 21:49:08 +0000
+++ dwt/include/dwt/widgets/Rebar.h	2011-03-15 21:16:24 +0000
@@ -87,7 +87,7 @@
 	/** Call this one after the container widget has been resized to make sure the
 	  * Rebar is having the right size...
 	  */
-	void refresh();
+	int refresh();
 
 	/** @param style see the REBARBANDINFO doc for possible values (fStyle section) */
 	void add(Widget* w, unsigned style = 0, const tstring& text = tstring());

=== modified file 'dwt/include/dwt/widgets/StatusBar.h'
--- dwt/include/dwt/widgets/StatusBar.h	2011-03-15 19:52:17 +0000
+++ dwt/include/dwt/widgets/StatusBar.h	2011-03-15 21:16:24 +0000
@@ -141,7 +141,7 @@
 	  */
 	void create(const Seed& cs = Seed());
 
-	void layout();
+	int refresh();
 
 	virtual bool handleMessage(const MSG& msg, LRESULT& retVal);
 

=== modified file 'dwt/src/widgets/Rebar.cpp'
--- dwt/src/widgets/Rebar.cpp	2011-03-02 21:33:22 +0000
+++ dwt/src/widgets/Rebar.cpp	2011-03-15 21:16:24 +0000
@@ -49,9 +49,10 @@
 	BaseType::create(cs);
 }
 
-void Rebar::refresh() {
+int Rebar::refresh() {
 	// use dummy sizes to avoid flickering; the rebar will figure out the proper sizes by itself.
 	::MoveWindow(handle(), 0, 0, 0, 0, TRUE);
+	return BaseType::getWindowSize().y;
 }
 
 void Rebar::add(Widget* w, unsigned style, const tstring& text) {

=== modified file 'dwt/src/widgets/StatusBar.cpp'
--- dwt/src/widgets/StatusBar.cpp	2011-03-15 19:52:17 +0000
+++ dwt/src/widgets/StatusBar.cpp	2011-03-15 21:16:24 +0000
@@ -144,13 +144,13 @@
 	parts[part].dblClickF = f;
 }
 
-void StatusBar::layout() {
+int StatusBar::refresh() {
 	// The status bar will auto-resize itself - all we need to do is to layout the sections
-	// TODO sendMessage(WM_SIZE);
+	sendMessage(WM_SIZE);
 
-	Point sz(BaseType::getWindowSize());
-	// TODO r.size.y -= sz.y;
+	auto sz = BaseType::getWindowSize();
 	layoutSections(sz);
+	return sz.y;
 }
 
 bool StatusBar::handleMessage(const MSG& msg, LRESULT& retVal) {

=== modified file 'win32/ADLSearchFrame.cpp'
--- win32/ADLSearchFrame.cpp	2011-03-15 19:52:17 +0000
+++ win32/ADLSearchFrame.cpp	2011-03-15 21:16:24 +0000
@@ -127,7 +127,7 @@
 void ADLSearchFrame::layout() {
 	dwt::Rectangle r(getClientSize());
 
-	// TODO status->layout(r);
+	r.size.y -= status->refresh();
 
 	grid->resize(r);
 }

=== modified file 'win32/DirectoryListingFrame.cpp'
--- win32/DirectoryListingFrame.cpp	2011-03-15 19:52:17 +0000
+++ win32/DirectoryListingFrame.cpp	2011-03-15 21:16:24 +0000
@@ -378,12 +378,11 @@
 void DirectoryListingFrame::layout() {
 	dwt::Rectangle r(getClientSize());
 
-	rebar->refresh();
-	dwt::Point pt = rebar->getWindowSize();
-	r.pos.y += pt.y;
-	r.size.y -= pt.y;
+	auto y = rebar->refresh();
+	r.pos.y += y;
+	r.size.y -= y;
 
-	// TODO status->layout(r);
+	r.size.y -= status->refresh();
 
 	status->mapWidget(STATUS_FILE_LIST_DIFF, listDiff);
 	status->mapWidget(STATUS_MATCH_QUEUE, matchQueue);

=== modified file 'win32/FinishedFrameBase.h'
--- win32/FinishedFrameBase.h	2011-03-15 19:52:17 +0000
+++ win32/FinishedFrameBase.h	2011-03-15 21:16:24 +0000
@@ -164,7 +164,7 @@
 	void layout() {
 		dwt::Rectangle r(this->getClientSize());
 
-		//  TODO this->status->layout(r);
+		r.size.y -= this->status->refresh();
 		if(onlyFull)
 			this->status->mapWidget(STATUS_ONLY_FULL, onlyFull);
 

=== modified file 'win32/HubFrame.cpp'
--- win32/HubFrame.cpp	2011-03-15 19:52:17 +0000
+++ win32/HubFrame.cpp	2011-03-15 21:16:24 +0000
@@ -262,7 +262,7 @@
 
 	dwt::Rectangle r(getClientSize());
 
-	// TODO status->layout(r);
+	r.size.y -= status->refresh();
 	status->mapWidget(STATUS_SHOW_USERS, showUsers);
 
 	int ymessage = message->getTextSize(_T("A")).y * messageLines + 10;

=== modified file 'win32/MainWindow.cpp'
--- win32/MainWindow.cpp	2011-03-15 19:52:17 +0000
+++ win32/MainWindow.cpp	2011-03-15 21:16:24 +0000
@@ -865,14 +865,13 @@
 	dwt::Rectangle r(getClientSize());
 
 	if(!rebar->empty()) {
-		rebar->refresh();
-		dwt::Point pt = rebar->getWindowSize();
-		r.pos.y += pt.y;
-		r.size.y -= pt.y;
+		auto y = rebar->refresh();
+		r.pos.y += y;
+		r.size.y -= y;
 	}
 
 	if(status) {
-		// TODO status->layout(r);
+		r.size.y -= status->refresh();
 		layoutSlotsSpin();
 	}
 

=== modified file 'win32/NotepadFrame.cpp'
--- win32/NotepadFrame.cpp	2011-03-15 19:52:17 +0000
+++ win32/NotepadFrame.cpp	2011-03-15 21:16:24 +0000
@@ -65,7 +65,7 @@
 void NotepadFrame::layout() {
 	dwt::Rectangle r(dwt::Point(0, 0), getClientSize());
 
-	// TODO status->layout(r);
+	r.size.y -= status->refresh();
 
 	pad->resize(r);
 }

=== modified file 'win32/PrivateFrame.cpp'
--- win32/PrivateFrame.cpp	2011-03-15 19:52:17 +0000
+++ win32/PrivateFrame.cpp	2011-03-15 21:16:24 +0000
@@ -215,7 +215,7 @@
 
 	dwt::Rectangle r(getClientSize());
 
-	// TODO status->layout(r);
+	r.size.y -= status->refresh();
 
 	int ymessage = message->getTextSize(_T("A")).y * messageLines + 10;
 	dwt::Rectangle rm(0, r.size.y - ymessage, r.width(), ymessage);

=== modified file 'win32/PublicHubsFrame.cpp'
--- win32/PublicHubsFrame.cpp	2011-03-15 19:52:17 +0000
+++ win32/PublicHubsFrame.cpp	2011-03-15 21:16:24 +0000
@@ -236,7 +236,7 @@
 void PublicHubsFrame::layout() {
 	dwt::Rectangle r(getClientSize());
 
-	// TODO status->layout(r);
+	r.size.y -= status->refresh();
 
 	grid->resize(r);
 }

=== modified file 'win32/QueueFrame.cpp'
--- win32/QueueFrame.cpp	2011-03-15 19:52:17 +0000
+++ win32/QueueFrame.cpp	2011-03-15 21:16:24 +0000
@@ -116,7 +116,7 @@
 void QueueFrame::layout() {
 	dwt::Rectangle r(getClientSize());
 
-	// TODO status->layout(r);
+	r.size.y -= status->refresh();
 	status->mapWidget(STATUS_SHOW_TREE, showTree);
 
 	paned->resize(r);

=== modified file 'win32/SearchFrame.cpp'
--- win32/SearchFrame.cpp	2011-03-15 19:52:17 +0000
+++ win32/SearchFrame.cpp	2011-03-15 21:16:24 +0000
@@ -329,7 +329,7 @@
 void SearchFrame::layout() {
 	dwt::Rectangle r(getClientSize());
 
-	// TODO status->layout(r);
+	r.size.y -= status->refresh();
 	status->mapWidget(STATUS_SHOW_UI, showUI);
 
 	paned->resize(r);

=== modified file 'win32/SpyFrame.cpp'
--- win32/SpyFrame.cpp	2011-03-15 19:52:17 +0000
+++ win32/SpyFrame.cpp	2011-03-15 21:16:24 +0000
@@ -95,7 +95,7 @@
 void SpyFrame::layout() {
 	dwt::Rectangle r(this->getClientSize());
 
-	// TODO status->layout(r);
+	r.size.y -= status->refresh();
 	status->mapWidget(STATUS_IGNORE_TTH, ignoreTTH);
 
 	searches->resize(r);

=== modified file 'win32/StatsFrame.cpp'
--- win32/StatsFrame.cpp	2011-03-15 19:52:17 +0000
+++ win32/StatsFrame.cpp	2011-03-15 21:16:24 +0000
@@ -130,7 +130,7 @@
 void StatsFrame::layout() {
 	dwt::Rectangle r(getClientSize());
 
-	// TODO status->layout(r);
+	r.size.y -= status->refresh();
 
 	width = r.width();
 	height = r.size.y - 1;

=== modified file 'win32/SystemFrame.cpp'
--- win32/SystemFrame.cpp	2011-03-15 19:52:17 +0000
+++ win32/SystemFrame.cpp	2011-03-15 21:16:24 +0000
@@ -81,7 +81,7 @@
 void SystemFrame::layout() {
 	dwt::Rectangle r(this->getClientSize());
 
-	// TODO status->layout(r);
+	r.size.y -= status->refresh();
 
 	log->resize(r);
 }

=== modified file 'win32/UsersFrame.cpp'
--- win32/UsersFrame.cpp	2011-03-15 19:52:17 +0000
+++ win32/UsersFrame.cpp	2011-03-15 21:16:24 +0000
@@ -178,7 +178,7 @@
 void UsersFrame::layout() {
 	dwt::Rectangle r(dwt::Point(0, 0), getClientSize());
 
-	// TODO status->layout(r);
+	r.size.y -= status->refresh();
 
 	auto r2 = r;
 	auto r2y = filter->getPreferredSize().y;

=== modified file 'win32/WaitingUsersFrame.cpp'
--- win32/WaitingUsersFrame.cpp	2011-03-15 19:52:17 +0000
+++ win32/WaitingUsersFrame.cpp	2011-03-15 21:16:24 +0000
@@ -55,7 +55,7 @@
 void WaitingUsersFrame::layout() {
 	dwt::Rectangle r(this->getClientSize());
 
-	// TODO status->layout(r);
+	r.size.y -= status->refresh();
 
 	queued->resize(r);
 }