linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #00716
[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2123: propagate the setting def
------------------------------------------------------------
revno: 2123
committer: poy <poy@xxxxxxxxxx>
branch nick: repo
timestamp: Mon 2010-04-05 19:11:06 +0200
message:
propagate the setting def
modified:
win32/UploadPage.cpp
win32/UploadPage.h
--
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/UploadPage.cpp'
--- win32/UploadPage.cpp 2010-04-05 16:53:58 +0000
+++ win32/UploadPage.cpp 2010-04-05 17:11:06 +0000
@@ -87,7 +87,7 @@
// dummy grid so that the check-box doesn't fill the whole row.
CheckBoxPtr shareHidden = cur->addChild(Grid::Seed(1, 1))->addChild(CheckBox::Seed(T_("Share hidden files")));
items.push_back(Item(shareHidden, SettingsManager::SHARE_HIDDEN, PropPage::T_BOOL));
- shareHidden->onClicked(std::tr1::bind(&UploadPage::handleShareHiddenClicked, this, shareHidden));
+ shareHidden->onClicked(std::tr1::bind(&UploadPage::handleShareHiddenClicked, this, shareHidden, items.back()));
shareHidden->setHelpId(IDH_SETTINGS_UPLOAD_SHAREHIDDEN);
}
@@ -190,10 +190,9 @@
addDirectory(*i);
}
-void UploadPage::handleShareHiddenClicked(CheckBoxPtr checkBox) {
+void UploadPage::handleShareHiddenClicked(CheckBoxPtr checkBox, Item& item) {
// Save the checkbox state so that ShareManager knows to include/exclude hidden files
- Item i = items[0]; // The checkbox. Explicit index used - bad!
- SettingsManager::getInstance()->set((SettingsManager::IntSetting)i.setting, checkBox->getChecked());
+ SettingsManager::getInstance()->set((SettingsManager::IntSetting)item.setting, checkBox->getChecked());
// Refresh the share. This is a blocking refresh. Might cause problems?
// Hopefully people won't click the checkbox enough for it to be an issue. :-)
=== modified file 'win32/UploadPage.h'
--- win32/UploadPage.h 2010-02-11 21:44:13 +0000
+++ win32/UploadPage.h 2010-04-05 17:11:06 +0000
@@ -44,7 +44,7 @@
bool handleKeyDown(int c);
LRESULT handleItemChanged();
void handleDragDrop(const TStringList& files);
- void handleShareHiddenClicked(CheckBoxPtr checkBox);
+ void handleShareHiddenClicked(CheckBoxPtr checkBox, Item& item);
void handleAddClicked();
void handleRenameClicked();
void handleRemoveClicked();