← Back to team overview

linuxdcpp-team team mailing list archive

[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2446: misc piled up changes

 

------------------------------------------------------------
revno: 2446
committer: poy <poy@xxxxxxxxxx>
branch nick: trunk
timestamp: Wed 2011-03-02 16:52:05 +0100
message:
  misc piled up changes
modified:
  dcpp/NmdcHub.cpp
  dwt/src/Taskbar.cpp
  win32/HubFrame.cpp
  win32/RichTextBox.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 'dcpp/NmdcHub.cpp'
--- dcpp/NmdcHub.cpp	2011-01-29 14:15:43 +0000
+++ dcpp/NmdcHub.cpp	2011-03-02 15:52:05 +0000
@@ -707,17 +707,17 @@
 		if(!message.replyTo || !message.from) {
 			if(!message.replyTo) {
 				// Assume it's from the hub
-				OnlineUser* replyTo = &getUser(rtNick);
-				replyTo->getIdentity().setHub(true);
-				replyTo->getIdentity().setHidden(true);
-				fire(ClientListener::UserUpdated(), this, *replyTo);
+				OnlineUser& replyTo = getUser(rtNick);
+				replyTo.getIdentity().setHub(true);
+				replyTo.getIdentity().setHidden(true);
+				fire(ClientListener::UserUpdated(), this, replyTo);
 			}
 			if(!message.from) {
 				// Assume it's from the hub
-				OnlineUser* from = &getUser(fromNick);
-				from->getIdentity().setHub(true);
-				from->getIdentity().setHidden(true);
-				fire(ClientListener::UserUpdated(), this, *from);
+				OnlineUser& from = getUser(fromNick);
+				from.getIdentity().setHub(true);
+				from.getIdentity().setHidden(true);
+				fire(ClientListener::UserUpdated(), this, from);
 			}
 
 			// Update pointers just in case they've been invalidated

=== modified file 'dwt/src/Taskbar.cpp'
--- dwt/src/Taskbar.cpp	2011-01-27 17:35:08 +0000
+++ dwt/src/Taskbar.cpp	2011-03-02 15:52:05 +0000
@@ -96,19 +96,21 @@
 #endif
 				if(::CoCreateInstance(CLSID_TaskbarList, 0, CLSCTX_INPROC_SERVER, IID_ITaskbarList,
 					reinterpret_cast<LPVOID*>(&taskbar)) != S_OK) { taskbar = 0; }
-				if(taskbar && taskbar->HrInit() == S_OK) {
-					LibraryLoader lib_user32(_T("user32"));
-					typedef BOOL (WINAPI *t_ChangeWindowMessageFilterEx)(HWND, UINT, DWORD, void*);
-					t_ChangeWindowMessageFilterEx ChangeWindowMessageFilterEx;
-					if(ChangeWindowMessageFilterEx = reinterpret_cast<t_ChangeWindowMessageFilterEx>(
-						lib_user32.getProcAddress(_T("ChangeWindowMessageFilterEx"))))
-					{
-						ChangeWindowMessageFilterEx(window->handle(), WM_DWMSENDICONICTHUMBNAIL, 1/*MSGFLT_ALLOW*/, 0);
-						ChangeWindowMessageFilterEx(window->handle(), WM_DWMSENDICONICLIVEPREVIEWBITMAP, 1/*MSGFLT_ALLOW*/, 0);
+				if(taskbar) {
+					if(taskbar->HrInit() == S_OK) {
+						LibraryLoader lib_user32(_T("user32"));
+						typedef BOOL (WINAPI *t_ChangeWindowMessageFilterEx)(HWND, UINT, DWORD, void*);
+						t_ChangeWindowMessageFilterEx ChangeWindowMessageFilterEx;
+						if(ChangeWindowMessageFilterEx = reinterpret_cast<t_ChangeWindowMessageFilterEx>(
+							lib_user32.getProcAddress(_T("ChangeWindowMessageFilterEx"))))
+						{
+							ChangeWindowMessageFilterEx(window->handle(), WM_DWMSENDICONICTHUMBNAIL, 1/*MSGFLT_ALLOW*/, 0);
+							ChangeWindowMessageFilterEx(window->handle(), WM_DWMSENDICONICLIVEPREVIEWBITMAP, 1/*MSGFLT_ALLOW*/, 0);
+						}
+					} else {
+						taskbar->Release();
+						taskbar = 0;
 					}
-				} else {
-					taskbar->Release();
-					taskbar = 0;
 				}
 			}
 			return 0;

=== modified file 'win32/HubFrame.cpp'
--- win32/HubFrame.cpp	2011-02-25 16:41:03 +0000
+++ win32/HubFrame.cpp	2011-03-02 15:52:05 +0000
@@ -186,7 +186,7 @@
 		}
 		filterType->addValue(T_("Any"));
 		filterType->setSelected(COLUMN_LAST);
-		filterType->onSelectionChanged(std::bind(&HubFrame::updateUserList, this, (UserInfo*)0));
+		filterType->onSelectionChanged([this] { updateUserList(); });
 	}
 
 	showUsers = addChild(WinUtil::Seeds::splitCheckBox);
@@ -625,10 +625,7 @@
 
 		resort = ui->update(u.identity, users->getSortColumn()) || resort;
 		if(showUsers->getChecked()) {
-			int pos = users->find(ui);
-			if(pos != -1) {
-				users->update(pos);
-			}
+			users->update(ui);
 			updateUserList(ui);
 		}
 

=== modified file 'win32/RichTextBox.cpp'
--- win32/RichTextBox.cpp	2011-02-25 16:41:03 +0000
+++ win32/RichTextBox.cpp	2011-03-02 15:52:05 +0000
@@ -63,7 +63,7 @@
 
 	menu->appendSeparator();
 	menu->appendItem(T_("&Find...\tCtrl+F"), [this] { findTextNew(); }, dwt::IconPtr(), !getText().empty());
-	menu->appendItem(T_("&Find Next\tF3"), [this] { findTextNext(); }, dwt::IconPtr(), !getText().empty());
+	menu->appendItem(T_("Find &Next\tF3"), [this] { findTextNext(); }, dwt::IconPtr(), !getText().empty());
 
 	return menu;
 }