linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #04380
[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2586: Fixed SearchFrame hiding splitter part, added splitter hiding in DirectoryListingFrame
------------------------------------------------------------
revno: 2586
committer: iceman50 <bdcdevel@xxxxxxxxx>
branch nick: dcplusplus
timestamp: Sat 2011-08-06 02:00:02 -0500
message:
Fixed SearchFrame hiding splitter part, added splitter hiding in DirectoryListingFrame
modified:
win32/DirectoryListingFrame.cpp
win32/DirectoryListingFrame.h
win32/SearchFrame.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/DirectoryListingFrame.cpp'
--- win32/DirectoryListingFrame.cpp 2011-05-29 21:40:28 +0000
+++ win32/DirectoryListingFrame.cpp 2011-08-06 07:00:02 +0000
@@ -225,7 +225,8 @@
treeRoot(NULL),
loaded(false),
updating(false),
- searching(false)
+ searching(false),
+ showTree(0)
{
grid = addChild(Grid::Seed(2, 1));
grid->column(0).mode = GridInfo::FILL;
@@ -268,7 +269,7 @@
searchGrid->setVisible(false);
{
- auto paned = grid->addChild(SplitterContainer::Seed(0.3));
+ paned = grid->addChild(SplitterContainer::Seed(0.3));
dirs = paned->addChild(WidgetDirs::Seed());
dirs->setHelpId(IDH_FILE_LIST_DIRS);
@@ -349,6 +350,11 @@
}
initStatus();
+
+ showTree = addChild(WinUtil::Seeds::splitCheckBox);
+ showTree->setChecked(true);
+ showTree->onClicked([this] { handleShowTreeClicked(); });
+ status->setWidget(STATUS_SHOW_TREE, showTree);
treeRoot = dirs->insert(NULL, new ItemInfo(true, dl->getRoot()));
@@ -555,6 +561,10 @@
return menu;
}
+void DirectoryListingFrame::handleShowTreeClicked() {
+ paned->maximize(showTree->getChecked() ? NULL : files);
+}
+
void DirectoryListingFrame::addUserCommands(const MenuPtr& parent) {
prepareMenu(parent, UserCommand::CONTEXT_FILELIST, ClientManager::getInstance()->getHubs(dl->getUser().user->getCID(), dl->getUser().hint));
}
=== modified file 'win32/DirectoryListingFrame.h'
--- win32/DirectoryListingFrame.h 2011-05-29 21:40:28 +0000
+++ win32/DirectoryListingFrame.h 2011-08-06 07:00:02 +0000
@@ -47,6 +47,7 @@
public:
enum Status {
+ STATUS_SHOW_TREE,
STATUS_STATUS,
STATUS_SPEED,
STATUS_TOTAL_FILES,
@@ -146,6 +147,9 @@
private:
tstring columns[COLUMN_LAST];
};
+
+ SplitterContainerPtr paned;
+ CheckBoxPtr showTree;
RebarPtr rebar;
ComboBoxPtr pathBox;
=== modified file 'win32/SearchFrame.cpp'
--- win32/SearchFrame.cpp 2011-06-27 16:46:13 +0000
+++ win32/SearchFrame.cpp 2011-08-06 07:00:02 +0000
@@ -560,19 +560,7 @@
}
void SearchFrame::handleShowUIClicked() {
- /* TODO
- bool checked = showUI->getChecked();
-
- if(checked && !paned->getFirst()) {
- paned->setFirst(options);
- } else if(!checked && paned->getFirst()) {
- paned->setFirst(0);
- }
-
- options->setVisible(checked);
- paned->setVisible(checked);
-
- layout(); */
+ paned->maximize(showUI->getChecked() ? NULL : results);
}
LRESULT SearchFrame::handleHubItemChanged(WPARAM wParam, LPARAM lParam) {