|
From: <arn...@us...> - 2008-01-19 15:35:33
|
Revision: 968
http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=968&view=rev
Author: arnetheduck
Date: 2008-01-19 07:35:31 -0800 (Sat, 19 Jan 2008)
Log Message:
-----------
Prepare proppages for translation
Modified Paths:
--------------
dcplusplus/trunk/SConstruct
dcplusplus/trunk/win32/Advanced3Page.cpp
dcplusplus/trunk/win32/AdvancedPage.cpp
dcplusplus/trunk/win32/Appearance2Page.cpp
dcplusplus/trunk/win32/AppearancePage.cpp
dcplusplus/trunk/win32/CertificatesPage.cpp
dcplusplus/trunk/win32/DownloadPage.cpp
dcplusplus/trunk/win32/FavoriteDirsPage.cpp
dcplusplus/trunk/win32/GeneralPage.cpp
dcplusplus/trunk/win32/LogPage.cpp
dcplusplus/trunk/win32/NetworkPage.cpp
dcplusplus/trunk/win32/PropPage.cpp
dcplusplus/trunk/win32/PropPage.h
dcplusplus/trunk/win32/QueuePage.cpp
dcplusplus/trunk/win32/TabsPage.cpp
dcplusplus/trunk/win32/TransferView.cpp
dcplusplus/trunk/win32/UCPage.cpp
dcplusplus/trunk/win32/UploadPage.cpp
dcplusplus/trunk/win32/WindowsPage.cpp
Modified: dcplusplus/trunk/SConstruct
===================================================================
--- dcplusplus/trunk/SConstruct 2008-01-19 10:18:34 UTC (rev 967)
+++ dcplusplus/trunk/SConstruct 2008-01-19 15:35:31 UTC (rev 968)
@@ -159,7 +159,7 @@
pot_args = ['xgettext', '--from-code=UTF-8', '--foreign-user',# '--package-name=$PACKAGE',
'--copyright-holder=Jacek Sieka', '--msg...@li...',
'--no-wrap', '--keyword=_', '--keyword=T_', '--keyword=TF_', '--keyword=TFN_:1,2',
- '--keyword=F_', '--keyword=gettext_noop', '--keyword=N_', '--boost',
+ '--keyword=F_', '--keyword=gettext_noop', '--keyword=N_', '--boost', '-s',
'--output=$TARGET', '$SOURCES']
pot_bld = Builder (action = Action([pot_args], 'Extracting messages to $TARGET from $SOURCES'))
Modified: dcplusplus/trunk/win32/Advanced3Page.cpp
===================================================================
--- dcplusplus/trunk/win32/Advanced3Page.cpp 2008-01-19 10:18:34 UTC (rev 967)
+++ dcplusplus/trunk/win32/Advanced3Page.cpp 2008-01-19 15:35:31 UTC (rev 968)
@@ -25,6 +25,7 @@
#include <dcpp/SettingsManager.h>
PropPage::TextItem Advanced3Page::texts[] = {
+#ifdef PORT_ME
{ IDC_SETTINGS_B, ResourceManager::B },
{ IDC_SETTINGS_WRITE_BUFFER, ResourceManager::SETTINGS_WRITE_BUFFER },
{ IDC_SETTINGS_KB, ResourceManager::KiB },
@@ -40,7 +41,8 @@
{ IDC_SETTINGS_AUTO_REFRESH_TIME, ResourceManager::SETTINGS_AUTO_REFRESH_TIME },
{ IDC_SETTINGS_AUTO_SEARCH_LIMIT, ResourceManager::SETTINGS_AUTO_SEARCH_LIMIT },
{ IDC_SETTINGS_MIN_SEGMENT_SIZE, ResourceManager::SETTINGS_MIN_SEGMENT_SIZE },
- { 0, ResourceManager::SETTINGS_AUTO_AWAY }
+#endif
+ { 0, 0 }
};
PropPage::Item Advanced3Page::items[] = {
Modified: dcplusplus/trunk/win32/AdvancedPage.cpp
===================================================================
--- dcplusplus/trunk/win32/AdvancedPage.cpp 2008-01-19 10:18:34 UTC (rev 967)
+++ dcplusplus/trunk/win32/AdvancedPage.cpp 2008-01-19 15:35:31 UTC (rev 968)
@@ -27,6 +27,7 @@
PropPage::Item AdvancedPage::items[] = { { 0, 0, PropPage::T_END } };
AdvancedPage::ListItem AdvancedPage::listItems[] = {
+#ifdef PORT_ME
{ SettingsManager::AUTO_AWAY, ResourceManager::SETTINGS_AUTO_AWAY },
{ SettingsManager::AUTO_FOLLOW, ResourceManager::SETTINGS_AUTO_FOLLOW },
{ SettingsManager::CLEAR_SEARCH, ResourceManager::SETTINGS_CLEAR_SEARCH },
@@ -46,7 +47,8 @@
{ SettingsManager::USE_CTRL_FOR_LINE_HISTORY, ResourceManager::SETTINGS_USE_CTRL_FOR_LINE_HISTORY },
{ SettingsManager::AUTO_KICK_NO_FAVS, ResourceManager::SETTINGS_AUTO_KICK_NO_FAVS },
{ SettingsManager::SHOW_SHELL_MENU, ResourceManager::SETTINGS_SHOW_SHELL_MENU },
- { 0, ResourceManager::SETTINGS_AUTO_AWAY }
+#endif
+ { 0, 0 }
};
AdvancedPage::AdvancedPage(SmartWin::Widget* parent) : PropPage(parent) {
Modified: dcplusplus/trunk/win32/Appearance2Page.cpp
===================================================================
--- dcplusplus/trunk/win32/Appearance2Page.cpp 2008-01-19 10:18:34 UTC (rev 967)
+++ dcplusplus/trunk/win32/Appearance2Page.cpp 2008-01-19 15:35:31 UTC (rev 968)
@@ -26,6 +26,7 @@
#include "WinUtil.h"
PropPage::TextItem Appearance2Page::texts[] = {
+#ifdef PORT_ME
{ IDC_BEEP_NOTIFICATION, ResourceManager::SETTINGS_NOTIFICATION_SOUND },
{ IDC_BROWSE, ResourceManager::BROWSE_ACCEL },
{ IDC_SETTINGS_COLORS, ResourceManager::SETTINGS_COLORS },
@@ -38,7 +39,8 @@
{ IDC_PRIVATE_MESSAGE_BEEP, ResourceManager::SETTINGS_PM_BEEP },
{ IDC_PRIVATE_MESSAGE_BEEP_OPEN, ResourceManager::SETTINGS_PM_BEEP_OPEN },
{ IDC_SETTINGS_DOWNLOAD_BAR_COLOR, ResourceManager::DOWNLOADS },
- { 0, ResourceManager::SETTINGS_AUTO_AWAY }
+#endif
+ { 0, 0 }
};
PropPage::Item Appearance2Page::items[] = {
Modified: dcplusplus/trunk/win32/AppearancePage.cpp
===================================================================
--- dcplusplus/trunk/win32/AppearancePage.cpp 2008-01-19 10:18:34 UTC (rev 967)
+++ dcplusplus/trunk/win32/AppearancePage.cpp 2008-01-19 15:35:31 UTC (rev 968)
@@ -28,12 +28,14 @@
#include "WinUtil.h"
PropPage::TextItem AppearancePage::texts[] = {
+#ifdef PORT_ME
{ IDC_SETTINGS_APPEARANCE_OPTIONS, ResourceManager::SETTINGS_OPTIONS },
{ IDC_SETTINGS_DEFAULT_AWAY_MSG, ResourceManager::SETTINGS_DEFAULT_AWAY_MSG },
{ IDC_SETTINGS_TIME_STAMPS_FORMAT, ResourceManager::SETTINGS_TIME_STAMPS_FORMAT },
{ IDC_SETTINGS_LANGUAGE_FILE, ResourceManager::SETTINGS_LANGUAGE_FILE },
{ IDC_SETTINGS_REQUIRES_RESTART, ResourceManager::SETTINGS_REQUIRES_RESTART },
- { 0, ResourceManager::SETTINGS_AUTO_AWAY }
+#endif
+ { 0, 0 }
};
PropPage::Item AppearancePage::items[] = {
@@ -43,6 +45,7 @@
};
PropPage::ListItem AppearancePage::listItems[] = {
+#ifdef PORT_ME
{ SettingsManager::ALT_SORT_ORDER, ResourceManager::SETTINGS_ALT_SORT_ORDER },
{ SettingsManager::FILTER_MESSAGES, ResourceManager::SETTINGS_FILTER_MESSAGES },
{ SettingsManager::MINIMIZE_TRAY, ResourceManager::SETTINGS_MINIMIZE_TRAY },
@@ -54,7 +57,8 @@
{ SettingsManager::USE_SYSTEM_ICONS, ResourceManager::SETTINGS_USE_SYSTEM_ICONS },
{ SettingsManager::USE_OEM_MONOFONT, ResourceManager::SETTINGS_USE_OEM_MONOFONT },
{ SettingsManager::GET_USER_COUNTRY, ResourceManager::SETTINGS_GET_USER_COUNTRY },
- { 0, ResourceManager::SETTINGS_AUTO_AWAY }
+#endif
+ { 0, 0 }
};
AppearancePage::AppearancePage(SmartWin::Widget* parent) : PropPage(parent), languages(0) {
Modified: dcplusplus/trunk/win32/CertificatesPage.cpp
===================================================================
--- dcplusplus/trunk/win32/CertificatesPage.cpp 2008-01-19 10:18:34 UTC (rev 967)
+++ dcplusplus/trunk/win32/CertificatesPage.cpp 2008-01-19 15:35:31 UTC (rev 968)
@@ -27,7 +27,7 @@
#include "WinUtil.h"
PropPage::TextItem CertificatesPage::texts[] = {
- { 0, ResourceManager::SETTINGS_AUTO_AWAY }
+ { 0, 0 }
};
PropPage::Item CertificatesPage::items[] = {
@@ -38,10 +38,12 @@
};
PropPage::ListItem CertificatesPage::listItems[] = {
+#ifdef PORT_ME
{ SettingsManager::USE_TLS, ResourceManager::SETTINGS_USE_TLS },
{ SettingsManager::ALLOW_UNTRUSTED_HUBS, ResourceManager::SETTINGS_ALLOW_UNTRUSTED_HUBS },
{ SettingsManager::ALLOW_UNTRUSTED_CLIENTS, ResourceManager::SETTINGS_ALLOW_UNTRUSTED_CLIENTS, },
- { 0, ResourceManager::SETTINGS_ALLOW_UNTRUSTED_CLIENTS, },
+#endif
+ { 0, 0 }
};
CertificatesPage::CertificatesPage(SmartWin::Widget* parent) : PropPage(parent) {
Modified: dcplusplus/trunk/win32/DownloadPage.cpp
===================================================================
--- dcplusplus/trunk/win32/DownloadPage.cpp 2008-01-19 10:18:34 UTC (rev 967)
+++ dcplusplus/trunk/win32/DownloadPage.cpp 2008-01-19 15:35:31 UTC (rev 968)
@@ -27,6 +27,7 @@
#include "HubListsDlg.h"
PropPage::TextItem DownloadPage::texts[] = {
+#ifdef PORT_ME
{ IDC_SETTINGS_DIRECTORIES, ResourceManager::SETTINGS_DIRECTORIES },
{ IDC_SETTINGS_DOWNLOAD_DIRECTORY, ResourceManager::SETTINGS_DOWNLOAD_DIRECTORY },
{ IDC_BROWSEDIR, ResourceManager::BROWSE_ACCEL },
@@ -40,7 +41,8 @@
{ IDC_SETTINGS_PUBLIC_HUB_LIST_URL, ResourceManager::SETTINGS_PUBLIC_HUB_LIST_URL },
{ IDC_SETTINGS_LIST_CONFIG, ResourceManager::SETTINGS_CONFIGURE_HUB_LISTS },
{ IDC_SETTINGS_PUBLIC_HUB_LIST_HTTP_PROXY, ResourceManager::SETTINGS_PUBLIC_HUB_LIST_HTTP_PROXY },
- { 0, ResourceManager::SETTINGS_AUTO_AWAY }
+#endif
+ { 0, 0 }
};
PropPage::Item DownloadPage::items[] = {
Modified: dcplusplus/trunk/win32/FavoriteDirsPage.cpp
===================================================================
--- dcplusplus/trunk/win32/FavoriteDirsPage.cpp 2008-01-19 10:18:34 UTC (rev 967)
+++ dcplusplus/trunk/win32/FavoriteDirsPage.cpp 2008-01-19 15:35:31 UTC (rev 968)
@@ -29,11 +29,13 @@
#include "LineDlg.h"
PropPage::TextItem FavoriteDirsPage::texts[] = {
+#ifdef PORT_ME
{ IDC_SETTINGS_FAVORITE_DIRECTORIES, ResourceManager::SETTINGS_FAVORITE_DIRS },
{ IDC_REMOVE, ResourceManager::REMOVE },
{ IDC_ADD, ResourceManager::SETTINGS_ADD_FOLDER },
{ IDC_RENAME, ResourceManager::SETTINGS_RENAME_FOLDER },
- { 0, ResourceManager::SETTINGS_AUTO_AWAY }
+#endif
+ { 0, 0 }
};
FavoriteDirsPage::FavoriteDirsPage(SmartWin::Widget* parent) : PropPage(parent) {
Modified: dcplusplus/trunk/win32/GeneralPage.cpp
===================================================================
--- dcplusplus/trunk/win32/GeneralPage.cpp 2008-01-19 10:18:34 UTC (rev 967)
+++ dcplusplus/trunk/win32/GeneralPage.cpp 2008-01-19 15:35:31 UTC (rev 968)
@@ -25,13 +25,15 @@
#include <dcpp/SettingsManager.h>
PropPage::TextItem GeneralPage::texts[] = {
+#ifdef PORT_ME
{ IDC_SETTINGS_PERSONAL_INFORMATION, ResourceManager::SETTINGS_PERSONAL_INFORMATION },
{ IDC_SETTINGS_NICK, ResourceManager::NICK },
{ IDC_SETTINGS_EMAIL, ResourceManager::EMAIL },
{ IDC_SETTINGS_DESCRIPTION, ResourceManager::DESCRIPTION },
{ IDC_SETTINGS_UPLOAD_LINE_SPEED, ResourceManager::SETTINGS_UPLOAD_LINE_SPEED },
{ IDC_SETTINGS_MEBIBITS, ResourceManager::MiBITSPS },
- { 0, ResourceManager::SETTINGS_AUTO_AWAY }
+#endif
+ { 0, 0 }
};
PropPage::Item GeneralPage::items[] = {
Modified: dcplusplus/trunk/win32/LogPage.cpp
===================================================================
--- dcplusplus/trunk/win32/LogPage.cpp 2008-01-19 10:18:34 UTC (rev 967)
+++ dcplusplus/trunk/win32/LogPage.cpp 2008-01-19 15:35:31 UTC (rev 968)
@@ -28,12 +28,14 @@
#include "WinUtil.h"
PropPage::TextItem LogPage::texts[] = {
+#ifdef PORT_ME
{ IDC_SETTINGS_LOGGING, ResourceManager::SETTINGS_LOGGING },
{ IDC_SETTINGS_LOG_DIR, ResourceManager::DIRECTORY },
{ IDC_BROWSE_LOG, ResourceManager::BROWSE_ACCEL },
{ IDC_SETTINGS_FORMAT, ResourceManager::SETTINGS_FORMAT },
{ IDC_SETTINGS_FILE_NAME, ResourceManager::SETTINGS_FILE_NAME },
- { 0, ResourceManager::SETTINGS_AUTO_AWAY }
+#endif
+ { 0, 0 }
};
PropPage::Item LogPage::items[] = {
@@ -42,6 +44,7 @@
};
PropPage::ListItem LogPage::listItems[] = {
+#ifdef PORT_ME
{ SettingsManager::LOG_MAIN_CHAT, ResourceManager::SETTINGS_LOG_MAIN_CHAT },
{ SettingsManager::LOG_PRIVATE_CHAT, ResourceManager::SETTINGS_LOG_PRIVATE_CHAT },
{ SettingsManager::LOG_DOWNLOADS, ResourceManager::SETTINGS_LOG_DOWNLOADS },
@@ -49,7 +52,8 @@
{ SettingsManager::LOG_SYSTEM, ResourceManager::SETTINGS_LOG_SYSTEM_MESSAGES },
{ SettingsManager::LOG_STATUS_MESSAGES, ResourceManager::SETTINGS_LOG_STATUS_MESSAGES },
{ SettingsManager::LOG_FILELIST_TRANSFERS, ResourceManager::SETTINGS_LOG_FILELIST_TRANSFERS },
- { 0, ResourceManager::SETTINGS_AUTO_AWAY }
+#endif
+ { 0, 0 }
};
LogPage::LogPage(SmartWin::Widget* parent) : PropPage(parent) {
Modified: dcplusplus/trunk/win32/NetworkPage.cpp
===================================================================
--- dcplusplus/trunk/win32/NetworkPage.cpp 2008-01-19 10:18:34 UTC (rev 967)
+++ dcplusplus/trunk/win32/NetworkPage.cpp 2008-01-19 15:35:31 UTC (rev 968)
@@ -27,6 +27,7 @@
#include "WinUtil.h"
PropPage::TextItem NetworkPage::texts[] = {
+#ifdef PORT_ME
{ IDC_DIRECT, ResourceManager::SETTINGS_DIRECT },
{ IDC_DIRECT_OUT, ResourceManager::SETTINGS_DIRECT },
{ IDC_FIREWALL_UPNP, ResourceManager::SETTINGS_FIREWALL_UPNP },
@@ -46,7 +47,8 @@
{ IDC_SOCKS_RESOLVE, ResourceManager::SETTINGS_SOCKS5_RESOLVE },
{ IDC_SETTINGS_INCOMING, ResourceManager::SETTINGS_INCOMING },
{ IDC_SETTINGS_OUTGOING, ResourceManager::SETTINGS_OUTGOING },
- { 0, ResourceManager::SETTINGS_AUTO_AWAY }
+#endif
+ { 0, 0 }
};
PropPage::Item NetworkPage::items[] = {
Modified: dcplusplus/trunk/win32/PropPage.cpp
===================================================================
--- dcplusplus/trunk/win32/PropPage.cpp 2008-01-19 10:18:34 UTC (rev 967)
+++ dcplusplus/trunk/win32/PropPage.cpp 2008-01-19 15:35:31 UTC (rev 968)
@@ -67,8 +67,9 @@
LVITEM lvi = { LVIF_TEXT };
for(int i = 0; listItems[i].setting != 0; i++) {
+ tstring str = T_(listItems[i].desc);
lvi.iItem = i;
- lvi.pszText = const_cast<TCHAR*>(CTSTRING_I(listItems[i].desc));
+ lvi.pszText = const_cast<TCHAR*>(str.c_str());
ListView_InsertItem(list, &lvi);
ListView_SetCheckState(list, i, settings->getBool(SettingsManager::IntSetting(listItems[i].setting), true));
}
@@ -124,7 +125,7 @@
if (textItems != NULL) {
for(int i = 0; textItems[i].itemID != 0; i++) {
::SetDlgItemText(page, textItems[i].itemID,
- CTSTRING_I(textItems[i].translatedString));
+ CT_(textItems[i].translatedString));
}
}
}
Modified: dcplusplus/trunk/win32/PropPage.h
===================================================================
--- dcplusplus/trunk/win32/PropPage.h 2008-01-19 10:18:34 UTC (rev 967)
+++ dcplusplus/trunk/win32/PropPage.h 2008-01-19 15:35:31 UTC (rev 968)
@@ -21,7 +21,6 @@
#define SETTINGS_BUF_LEN 1024
-#include <dcpp/ResourceManager.h>
#include "WidgetFactory.h"
#include "resource.h"
@@ -47,11 +46,11 @@
};
struct ListItem {
int setting;
- ResourceManager::Strings desc;
+ const char* desc;
};
struct TextItem {
WORD itemID;
- ResourceManager::Strings translatedString;
+ const char* translatedString;
};
protected:
Modified: dcplusplus/trunk/win32/QueuePage.cpp
===================================================================
--- dcplusplus/trunk/win32/QueuePage.cpp 2008-01-19 10:18:34 UTC (rev 967)
+++ dcplusplus/trunk/win32/QueuePage.cpp 2008-01-19 15:35:31 UTC (rev 968)
@@ -25,6 +25,7 @@
#include <dcpp/SettingsManager.h>
PropPage::TextItem QueuePage::texts[] = {
+#ifdef PORT_ME
{ IDC_SETTINGS_AUTOPRIO, ResourceManager::SETTINGS_PRIO_AUTOPRIO },
{ IDC_SETTINGS_PRIO_HIGHEST, ResourceManager::SETTINGS_PRIO_HIGHEST },
{ IDC_SETTINGS_KB3, ResourceManager::KiB },
@@ -47,7 +48,8 @@
{ IDC_SETTINGS_AUTODROP_FILESIZE, ResourceManager::SETTINGS_AUTODROP_FILESIZE },
{ IDC_SETTINGS_KB7, ResourceManager::KiB },
{ IDC_SETTINGS_OTHER_QUEUE_OPTIONS, ResourceManager::SETTINGS_OTHER_QUEUE_OPTIONS },
- { 0, ResourceManager::SETTINGS_AUTO_AWAY }
+#endif
+ { 0, 0 }
};
PropPage::Item QueuePage::items[] = {
@@ -65,6 +67,7 @@
};
PropPage::ListItem QueuePage::optionItems[] = {
+#ifdef PORT_ME
{ SettingsManager::PRIO_LOWEST, ResourceManager::SETTINGS_PRIO_LOWEST },
{ SettingsManager::AUTODROP_ALL, ResourceManager::SETTINGS_AUTODROP_ALL },
{ SettingsManager::AUTODROP_FILELISTS, ResourceManager::SETTINGS_AUTODROP_FILELISTS },
@@ -75,7 +78,8 @@
{ SettingsManager::DONT_DL_ALREADY_SHARED, ResourceManager::SETTINGS_DONT_DL_ALREADY_SHARED },
{ SettingsManager::DONT_DL_ALREADY_QUEUED, ResourceManager::SETTINGS_DONT_DL_ALREADY_QUEUED },
{ SettingsManager::ANTI_FRAG, ResourceManager::SETTINGS_ANTI_FRAG },
- { 0, ResourceManager::SETTINGS_AUTO_AWAY }
+#endif
+ { 0, 0 }
};
QueuePage::QueuePage(SmartWin::Widget* parent) : PropPage(parent) {
Modified: dcplusplus/trunk/win32/TabsPage.cpp
===================================================================
--- dcplusplus/trunk/win32/TabsPage.cpp 2008-01-19 10:18:34 UTC (rev 967)
+++ dcplusplus/trunk/win32/TabsPage.cpp 2008-01-19 15:35:31 UTC (rev 968)
@@ -29,11 +29,14 @@
};
PropPage::TextItem TabsPage::texts[] = {
+#ifdef PORT_ME
{ IDC_SETTINGS_BOLD_CONTENTS, ResourceManager::SETTINGS_BOLD_OPTIONS },
- { 0, ResourceManager::SETTINGS_AUTO_AWAY }
+#endif
+ { 0, 0 }
};
PropPage::ListItem TabsPage::listItems[] = {
+#ifdef PORT_ME
{ SettingsManager::BOLD_HUB, ResourceManager::HUB },
{ SettingsManager::BOLD_PM, ResourceManager::PRIVATE_MESSAGE },
{ SettingsManager::BOLD_SEARCH, ResourceManager::SEARCH },
@@ -42,7 +45,8 @@
{ SettingsManager::BOLD_FINISHED_DOWNLOADS, ResourceManager::FINISHED_DOWNLOADS },
{ SettingsManager::BOLD_WAITING_USERS, ResourceManager::WAITING_USERS },
{ SettingsManager::BOLD_FINISHED_UPLOADS, ResourceManager::FINISHED_UPLOADS },
- { 0, ResourceManager::SETTINGS_AUTO_AWAY }
+#endif
+ { 0, 0 }
};
TabsPage::TabsPage(SmartWin::Widget* parent) : PropPage(parent) {
Modified: dcplusplus/trunk/win32/TransferView.cpp
===================================================================
--- dcplusplus/trunk/win32/TransferView.cpp 2008-01-19 10:18:34 UTC (rev 967)
+++ dcplusplus/trunk/win32/TransferView.cpp 2008-01-19 15:35:31 UTC (rev 968)
@@ -40,7 +40,7 @@
N_("User"),
N_("Status"),
N_("Speed"),
- N_("Transfered"),
+ N_("Transfered (Ratio)"),
N_("Queued"),
N_("Cipher"),
N_("IP")
@@ -127,7 +127,6 @@
}
/// @todo Fix multiple selection menu...
- int i = -1;
ItemInfo* ii = transfers->getSelectedData();
WidgetMenuPtr contextMenu = makeContextMenu(ii);
contextMenu->trackPopupMenu(this, pt, TPM_LEFTALIGN | TPM_RIGHTBUTTON);
@@ -404,9 +403,8 @@
columns[COLUMN_TRANSFERED] = Text::toT(Util::toString(0));
if(aDownload) {
queued = QueueManager::getInstance()->getQueued(u);
- columns[COLUMN_QUEUED] = Text::toT(Util::toString(queued));
+ columns[COLUMN_QUEUED] = Text::toT(Util::formatBytes(queued));
}
-
}
void TransferView::ItemInfo::update(const UpdateInfo& ui) {
@@ -415,28 +413,29 @@
if(download) {
// Also update queued when status changes...
queued = QueueManager::getInstance()->getQueued(user);
- columns[COLUMN_QUEUED] = Text::toT(Util::toString(queued));
+ columns[COLUMN_QUEUED] = Text::toT(Util::formatBytes(queued));
}
-
}
+
if(ui.updateMask & UpdateInfo::MASK_STATUS_STRING) {
// No slots etc from transfermanager better than disconnected from connectionmanager
if(!transferFailed)
columns[COLUMN_STATUS] = ui.statusString;
transferFailed = ui.transferFailed;
}
+
if(ui.updateMask & UpdateInfo::MASK_TRANSFERED) {
actual = ui.actual;
transfered = ui.transfered;
if(actual == transfered) {
columns[COLUMN_TRANSFERED] = Text::toT(Util::formatBytes(transfered));
} else {
- columns[COLUMN_TRANSFERED] = str(TF_("%1% (%2%, %3%%%)")
+ columns[COLUMN_TRANSFERED] = str(TF_("%1% (%|.2|)")
% Text::toT(Util::formatBytes(transfered))
- % Text::toT(Util::formatBytes(actual))
- % (actual * 100.0 / transfered));
+ % (static_cast<double>(actual) / transfered));
}
}
+
if(ui.updateMask & UpdateInfo::MASK_SPEED) {
speed = ui.speed;
if (status == STATUS_RUNNING) {
@@ -445,9 +444,11 @@
columns[COLUMN_SPEED] = Util::emptyStringT;
}
}
+
if(ui.updateMask & UpdateInfo::MASK_IP) {
columns[COLUMN_IP] = ui.ip;
}
+
if(ui.updateMask & UpdateInfo::MASK_CIPHER) {
columns[COLUMN_CIPHER] = ui.cipher;
}
Modified: dcplusplus/trunk/win32/UCPage.cpp
===================================================================
--- dcplusplus/trunk/win32/UCPage.cpp 2008-01-19 10:18:34 UTC (rev 967)
+++ dcplusplus/trunk/win32/UCPage.cpp 2008-01-19 15:35:31 UTC (rev 968)
@@ -28,12 +28,14 @@
#include "HoldRedraw.h"
PropPage::TextItem UCPage::texts[] = {
- { IDC_MOVE_UP, ResourceManager::MOVE_UP },
+ { IDC_MOVE_UP, N_("Move &Up") },
+#ifdef PORT_ME
{ IDC_MOVE_DOWN, ResourceManager::MOVE_DOWN },
{ IDC_ADD_MENU, ResourceManager::ADD },
{ IDC_CHANGE_MENU, ResourceManager::SETTINGS_CHANGE },
{ IDC_REMOVE_MENU, ResourceManager::REMOVE },
- { 0, ResourceManager::SETTINGS_AUTO_AWAY }
+#endif
+ { 0, 0 }
};
PropPage::Item UCPage::items[] = {
Modified: dcplusplus/trunk/win32/UploadPage.cpp
===================================================================
--- dcplusplus/trunk/win32/UploadPage.cpp 2008-01-19 10:18:34 UTC (rev 967)
+++ dcplusplus/trunk/win32/UploadPage.cpp 2008-01-19 15:35:31 UTC (rev 968)
@@ -30,6 +30,7 @@
#include "HashProgressDlg.h"
PropPage::TextItem UploadPage::texts[] = {
+#ifdef PORT_ME
{ IDC_SETTINGS_SHARED_DIRECTORIES, ResourceManager::SETTINGS_SHARED_DIRECTORIES },
{ IDC_SETTINGS_SHARE_SIZE, ResourceManager::SETTINGS_SHARE_SIZE },
{ IDC_SHAREHIDDEN, ResourceManager::SETTINGS_SHARE_HIDDEN },
@@ -40,7 +41,8 @@
{ IDC_SETTINGS_KBPS, ResourceManager::KiBPS },
{ IDC_SETTINGS_UPLOADS_SLOTS, ResourceManager::SETTINGS_UPLOADS_SLOTS },
{ IDC_SETTINGS_ONLY_HASHED, ResourceManager::SETTINGS_ONLY_HASHED },
- { 0, ResourceManager::SETTINGS_AUTO_AWAY }
+#endif
+ { 0, 0 }
};
PropPage::Item UploadPage::items[] = {
Modified: dcplusplus/trunk/win32/WindowsPage.cpp
===================================================================
--- dcplusplus/trunk/win32/WindowsPage.cpp 2008-01-19 10:18:34 UTC (rev 967)
+++ dcplusplus/trunk/win32/WindowsPage.cpp 2008-01-19 15:35:31 UTC (rev 968)
@@ -27,13 +27,16 @@
PropPage::Item WindowsPage::items[] = { { 0, 0, PropPage::T_END } };
PropPage::TextItem WindowsPage::textItem[] = {
+#ifdef PORT_ME
{ IDC_SETTINGS_AUTO_OPEN, ResourceManager::SETTINGS_AUTO_OPEN },
{ IDC_SETTINGS_WINDOWS_OPTIONS, ResourceManager::SETTINGS_WINDOWS_OPTIONS },
{ IDC_SETTINGS_CONFIRM_OPTIONS, ResourceManager::SETTINGS_CONFIRM_DIALOG_OPTIONS },
- { 0, ResourceManager::SETTINGS_AUTO_AWAY }
+#endif
+ { 0, 0 }
};
WindowsPage::ListItem WindowsPage::listItems[] = {
+#ifdef PORT_ME
{ SettingsManager::OPEN_SYSTEM_LOG, ResourceManager::SYSTEM_LOG },
{ SettingsManager::OPEN_FAVORITE_USERS, ResourceManager::FAVORITE_USERS },
{ SettingsManager::OPEN_QUEUE, ResourceManager::DOWNLOAD_QUEUE },
@@ -46,10 +49,12 @@
{ SettingsManager::OPEN_PUBLIC, ResourceManager::PUBLIC_HUBS },
{ SettingsManager::OPEN_FAVORITE_HUBS, ResourceManager::FAVORITE_HUBS },
{ SettingsManager::OPEN_DOWNLOADS, ResourceManager::DOWNLOADS },
- { 0, ResourceManager::SETTINGS_AUTO_AWAY }
+#endif
+ { 0, 0 }
};
WindowsPage::ListItem WindowsPage::optionItems[] = {
+#ifdef PORT_ME
{ SettingsManager::POPUP_PMS, ResourceManager::SETTINGS_POPUP_PMS },
{ SettingsManager::POPUP_HUB_PMS, ResourceManager::SETTINGS_POPUP_HUB_PMS },
{ SettingsManager::POPUP_BOT_PMS, ResourceManager::SETTINGS_POPUP_BOT_PMS },
@@ -60,14 +65,17 @@
{ SettingsManager::IGNORE_BOT_PMS, ResourceManager::SETTINGS_IGNORE_BOT_PMS },
{ SettingsManager::TOGGLE_ACTIVE_WINDOW, ResourceManager::SETTINGS_TOGGLE_ACTIVE_WINDOW },
{ SettingsManager::PROMPT_PASSWORD, ResourceManager::SETTINGS_PROMPT_PASSWORD },
- { 0, ResourceManager::SETTINGS_AUTO_AWAY }
+#endif
+ { 0, 0 }
};
WindowsPage::ListItem WindowsPage::confirmItems[] = {
+#ifdef PORT_ME
{ SettingsManager::CONFIRM_EXIT, ResourceManager::SETTINGS_CONFIRM_EXIT },
{ SettingsManager::CONFIRM_HUB_REMOVAL, ResourceManager::SETTINGS_CONFIRM_HUB_REMOVAL },
{ SettingsManager::CONFIRM_ITEM_REMOVAL, ResourceManager::SETTINGS_CONFIRM_ITEM_REMOVAL },
- { 0, ResourceManager::SETTINGS_AUTO_AWAY }
+#endif
+ { 0, 0 }
};
WindowsPage::WindowsPage(SmartWin::Widget* parent) : PropPage(parent) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|