← Back to team overview

linuxdcpp-team team mailing list archive

[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2844: use the right HWND when moving a queue dir (fixes #919663)

 

------------------------------------------------------------
revno: 2844
committer: poy <poy@xxxxxxxxxx>
branch nick: trunk
timestamp: Sun 2012-01-29 20:25:56 +0100
message:
  use the right HWND when moving a queue dir (fixes #919663)
modified:
  dwt/include/dwt/widgets/Tree.h
  win32/QueueFrame.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/Tree.h'
--- dwt/include/dwt/widgets/Tree.h	2012-01-13 20:55:20 +0000
+++ dwt/include/dwt/widgets/Tree.h	2012-01-29 19:25:56 +0000
@@ -239,6 +239,10 @@
 	void create( const Seed & cs = Seed() );
 
 	virtual void layout();
+
+	/// @todo should not be public
+	HWND treeHandle() const { return tree->handle(); }
+
 protected:
 	// Constructor Taking pointer to parent
 	explicit Tree( Widget * parent );
@@ -248,7 +252,6 @@
 	virtual ~Tree()
 	{}
 
-	HWND treeHandle() const { return tree->handle(); }
 private:
 	ImageListPtr itsNormalImageList;
 	ImageListPtr itsStateImageList;

=== modified file 'win32/QueueFrame.cpp'
--- win32/QueueFrame.cpp	2012-01-22 20:27:14 +0000
+++ win32/QueueFrame.cpp	2012-01-29 19:25:56 +0000
@@ -58,8 +58,6 @@
 	{ N_("Type"), 60, false }
 };
 
-#define FILE_LIST_NAME _T("File Lists")
-
 QueueFrame::QueueFrame(TabViewPtr parent) :
 BaseType(parent, T_("Download Queue"), IDH_QUEUE, IDI_QUEUE),
 paned(0),
@@ -434,7 +432,7 @@
 		// We assume we haven't added it yet, and that all filelists go to the same
 		// directory...
 		dcassert(fileLists == NULL);
-		fileLists = dirs->insert(NULL, new DirItemInfo(dir, FILE_LIST_NAME), true);
+		fileLists = dirs->insert(NULL, new DirItemInfo(dir, T_("File Lists")), true);
 		return fileLists;
 	}
 
@@ -812,7 +810,8 @@
 		moveNode(next, ht);
 		next = dirs->getChild(item);
 	}
-	TreeView_DeleteItem(dirs->handle(), item);
+	/// @todo do it with dwt calls
+	TreeView_DeleteItem(dirs->treeHandle(), item);
 }
 
 const string& QueueFrame::getSelectedDir() {