linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #05356
[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2867: Remember the last shared folder
------------------------------------------------------------
revno: 2867
committer: eMTee <emtee11@xxxxxxxxx>
branch nick: dcplusplus
timestamp: Sun 2012-02-12 16:41:21 +0100
message:
Remember the last shared folder
modified:
dcpp/SettingsManager.cpp
dcpp/SettingsManager.h
win32/UploadPage.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/SettingsManager.cpp'
--- dcpp/SettingsManager.cpp 2012-02-07 19:10:02 +0000
+++ dcpp/SettingsManager.cpp 2012-02-12 15:41:21 +0000
@@ -51,7 +51,7 @@
"LogFormatSystem", "LogFormatStatus", "DirectoryListingFrameOrder", "DirectoryListingFrameWidths",
"TLSPrivateKeyFile", "TLSCertificateFile", "TLSTrustedCertificatesPath",
"Language", "DownloadsOrder", "DownloadsWidth", "Toolbar", "LastSearchType", "Mapper",
- "SoundMainChat", "SoundPM", "SoundPMWindow", "SoundFinishedDL", "SoundFinishedFL",
+ "SoundMainChat", "SoundPM", "SoundPMWindow", "SoundFinishedDL", "SoundFinishedFL", "LastSharedFolder",
"SENTRY",
// Ints
"IncomingConnections", "InPort", "Slots", "AutoFollow", "ClearSearch",
@@ -328,6 +328,7 @@
setDefault(USERS_FILTER_QUEUE, false);
setDefault(USERS_FILTER_WAITING, false);
setDefault(MAX_PM_WINDOWS, 50);
+ setDefault(LAST_SHARED_FOLDER, Util::emptyString);
setSearchTypeDefaults();
=== modified file 'dcpp/SettingsManager.h'
--- dcpp/SettingsManager.h 2012-02-04 17:40:35 +0000
+++ dcpp/SettingsManager.h 2012-02-12 15:41:21 +0000
@@ -68,7 +68,7 @@
LOG_FILE_SYSTEM, LOG_FORMAT_SYSTEM, LOG_FORMAT_STATUS, DIRECTORYLISTINGFRAME_ORDER, DIRECTORYLISTINGFRAME_WIDTHS,
TLS_PRIVATE_KEY_FILE, TLS_CERTIFICATE_FILE, TLS_TRUSTED_CERTIFICATES_PATH,
LANGUAGE, DOWNLOADS_ORDER, DOWNLOADS_WIDTHS, TOOLBAR, LAST_SEARCH_TYPE, MAPPER,
- SOUND_MAIN_CHAT, SOUND_PM, SOUND_PM_WINDOW, SOUND_FINISHED_DL, SOUND_FINISHED_FL,
+ SOUND_MAIN_CHAT, SOUND_PM, SOUND_PM_WINDOW, SOUND_FINISHED_DL, SOUND_FINISHED_FL, LAST_SHARED_FOLDER,
STR_LAST };
enum IntSetting { INT_FIRST = STR_LAST + 1,
=== modified file 'win32/UploadPage.cpp'
--- win32/UploadPage.cpp 2012-02-12 12:55:04 +0000
+++ win32/UploadPage.cpp 2012-02-12 15:41:21 +0000
@@ -216,7 +216,7 @@
}
void UploadPage::handleAddClicked() {
- tstring target;
+ tstring target = Text::toT(SETTING(LAST_SHARED_FOLDER));
if(FolderDialog(this).setInitialSelection(CSIDL_PERSONAL).open(target)) {
addDirectory(target);
HashProgressDlg(this, true).run();
@@ -306,6 +306,7 @@
}
break;
}
+ SettingsManager::getInstance()->set(SettingsManager::LAST_SHARED_FOLDER, Text::fromT(aPath));
} catch(const ShareException& e) {
dwt::MessageBox(this).show(Text::toT(e.getError()), _T(APPNAME) _T(" ") _T(VERSIONSTRING),
dwt::MessageBox::BOX_OK, dwt::MessageBox::BOX_ICONSTOP);