From 3576b67db9fa0a3d8d5c1747cc3560504d31d125 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 5 Mar 2014 12:52:30 +0000 Subject: - adaptation for standard Windows ways of handling Unicode; - obsoleted code removed; - code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@8407 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/HistoryStats/src/dlgoption_suboutput.cpp | 315 +++++++++++------------ 1 file changed, 153 insertions(+), 162 deletions(-) (limited to 'plugins/HistoryStats/src/dlgoption_suboutput.cpp') diff --git a/plugins/HistoryStats/src/dlgoption_suboutput.cpp b/plugins/HistoryStats/src/dlgoption_suboutput.cpp index aa10236451..704f837bb2 100644 --- a/plugins/HistoryStats/src/dlgoption_suboutput.cpp +++ b/plugins/HistoryStats/src/dlgoption_suboutput.cpp @@ -5,38 +5,38 @@ * DlgOption::SubOutput */ -DlgOption::SubOutput::SubOutput() - : m_hRemoveEmptyContacts(NULL) - , m_hRemoveInChatsZero(NULL) - , m_hRemoveInBytesZero(NULL) - , m_hRemoveOutChatsZero(NULL) - , m_hRemoveOutBytesZero(NULL) - , m_hOmitContacts(NULL) - , m_hOmitByValue(NULL) - , m_hOmitByValueData(NULL) - , m_hOmitByValueLimit(NULL) - , m_hOmitByTime(NULL) - , m_hOmitByTimeDays(NULL) - , m_hOmitByRank(NULL) - , m_hOmitNumOnTop(NULL) - , m_hOmittedInTotals(NULL) - , m_hOmittedInExtraRow(NULL) - , m_hCalcTotals(NULL) - , m_hTableHeader(NULL) - , m_hTableHeaderRepeat(NULL) - , m_hTableHeaderVerbose(NULL) - , m_hHeaderTooltips(NULL) - , m_hHeaderTooltipsIfCustom(NULL) - , m_hSort(NULL) - , m_hNick(NULL) - , m_hOutputVariables(NULL) - , m_hOutputFile(NULL) - , m_hOutputExtraToFolder(NULL) - , m_hOutputExtraFolder(NULL) - , m_hOverwriteAlways(NULL) - , m_hAutoOpenOptions(NULL) - , m_hAutoOpenStartup(NULL) - , m_hAutoOpenMenu(NULL) +DlgOption::SubOutput::SubOutput() : + m_hRemoveEmptyContacts(NULL), + m_hRemoveInChatsZero(NULL), + m_hRemoveInBytesZero(NULL), + m_hRemoveOutChatsZero(NULL), + m_hRemoveOutBytesZero(NULL), + m_hOmitContacts(NULL), + m_hOmitByValue(NULL), + m_hOmitByValueData(NULL), + m_hOmitByValueLimit(NULL), + m_hOmitByTime(NULL), + m_hOmitByTimeDays(NULL), + m_hOmitByRank(NULL), + m_hOmitNumOnTop(NULL), + m_hOmittedInTotals(NULL), + m_hOmittedInExtraRow(NULL), + m_hCalcTotals(NULL), + m_hTableHeader(NULL), + m_hTableHeaderRepeat(NULL), + m_hTableHeaderVerbose(NULL), + m_hHeaderTooltips(NULL), + m_hHeaderTooltipsIfCustom(NULL), + m_hSort(NULL), + m_hNick(NULL), + m_hOutputVariables(NULL), + m_hOutputFile(NULL), + m_hOutputExtraToFolder(NULL), + m_hOutputExtraFolder(NULL), + m_hOverwriteAlways(NULL), + m_hAutoOpenOptions(NULL), + m_hAutoOpenStartup(NULL), + m_hAutoOpenMenu(NULL) { array_each_(i, m_hSortBy) { @@ -55,38 +55,33 @@ DlgOption::SubOutput::~SubOutput() BOOL DlgOption::SubOutput::handleMsg(UINT msg, WPARAM wParam, LPARAM lParam) { - switch (msg) - { - case WM_WINDOWPOSCHANGED: - { - RECT rClient, rWnd; - - GetClientRect(getHWnd(), &rClient); - - // options tree - rWnd = utils::getWindowRect(getHWnd(), m_Options); - rWnd.right = rClient.right; - rWnd.bottom = rClient.bottom; - utils::moveWindow(m_Options, rWnd); - } - break; - - case WM_NOTIFY: - { - NMHDR* p = reinterpret_cast(lParam); - - if (p->idFrom == IDC_OPTIONS) - { - if (p->code == OptionsCtrl::OCN_MODIFIED) - { - OptionsCtrl::NMOPTIONSCTRL* pNM = reinterpret_cast(lParam); - - onChanged(pNM->hItem); - return TRUE; - } - } + switch (msg) { + case WM_WINDOWPOSCHANGED: + { + RECT rClient, rWnd; + + GetClientRect(getHWnd(), &rClient); + + // options tree + rWnd = utils::getWindowRect(getHWnd(), m_Options); + rWnd.right = rClient.right; + rWnd.bottom = rClient.bottom; + utils::moveWindow(m_Options, rWnd); + } + break; + + case WM_NOTIFY: + NMHDR* p = reinterpret_cast(lParam); + + if (p->idFrom == IDC_OPTIONS) { + if (p->code == OptionsCtrl::OCN_MODIFIED) { + OptionsCtrl::NMOPTIONSCTRL* pNM = reinterpret_cast(lParam); + + onChanged(pNM->hItem); + return TRUE; } - break; + } + break; } return FALSE; @@ -103,83 +98,83 @@ void DlgOption::SubOutput::onWMInitDialog() OptionsCtrl::Item hTemp; OptionsCtrl::Item hTemp2; - /**/hTemp = m_Options.insertGroup(NULL, i18n(muT("Contact filtering and totals")), OptionsCtrl::OCF_ROOTGROUP | OptionsCtrl::OCF_NODISABLECHILDS); - /**/ m_hRemoveEmptyContacts = m_Options.insertCheck(hTemp, i18n(muT("Remove contacts with empty history"))); - /**/ m_hRemoveOutChatsZero = m_Options.insertCheck(hTemp, i18n(muT("Remove contacts with only incoming chats")), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK); - /**/ m_hRemoveOutBytesZero = m_Options.insertCheck(m_hRemoveOutChatsZero, i18n(muT("Remove only if you never answered"))); - /**/ m_hRemoveInChatsZero = m_Options.insertCheck(hTemp, i18n(muT("Remove contacts with only outgoing chats")), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK); - /**/ m_hRemoveInBytesZero = m_Options.insertCheck(m_hRemoveInChatsZero, i18n(muT("Remove only if contact never answered"))); - /**/ m_hOmitContacts = m_Options.insertCheck(hTemp, i18n(muT("Limit number of contacts in statistics")), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK); - /**/ hTemp2 = m_Options.insertGroup(m_hOmitContacts, i18n(muT("Criteria"))); - /**/ m_hOmitByValue = m_Options.insertCheck(hTemp2, i18n(muT("Omit contacts that didn't produce a certain amount of data")), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK); - /**/ m_hOmitByValueData = m_Options.insertCombo(m_hOmitByValue, i18n(muT("Omit if"))); - /**/ m_hOmitByValueLimit = m_Options.insertEdit(m_hOmitByValue, i18n(muT("...is less than")), muT(""), OptionsCtrl::OCF_NUMBER); - /**/ m_hOmitByTime = m_Options.insertCheck(hTemp2, i18n(muT("Omit contacts that were inactive for some time")), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK); - /**/ m_hOmitByTimeDays = m_Options.insertEdit(m_hOmitByTime, i18n(muT("Maximum inactivity time (days)")), muT(""), OptionsCtrl::OCF_NUMBER); - /**/ m_hOmitByRank = m_Options.insertCheck(hTemp2, i18n(muT("Omit all contacts not in \"Top n\"")), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK); - /**/ m_hOmitNumOnTop = m_Options.insertEdit(m_hOmitByRank, i18n(muT("Number of contacts in \"Top n\"")), muT("10"), OptionsCtrl::OCF_NUMBER); - /**/ m_hOmittedInTotals = m_Options.insertCheck(m_hOmitContacts, i18n(muT("Include omitted contacts in totals"))); - /**/ m_hOmittedInExtraRow = m_Options.insertCheck(m_hOmitContacts, i18n(muT("Include totals of omitted contacts in additional row"))); - /**/ m_hCalcTotals = m_Options.insertCheck(hTemp, i18n(muT("Include totals in statistics"))); - /**/hTemp = m_Options.insertGroup(NULL, i18n(muT("Table header")), OptionsCtrl::OCF_ROOTGROUP | OptionsCtrl::OCF_NODISABLECHILDS); - /**/ m_hTableHeader = m_Options.insertCheck(hTemp, i18n(muT("Output header")), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK | OptionsCtrl::OCF_DISABLED | OptionsCtrl::OCF_NODISABLECHILDS); - /**/ m_hTableHeaderRepeat = m_Options.insertEdit(m_hTableHeader, i18n(muT("Repeat header every n contacts (0=don't repeat)")), muT("0"), OptionsCtrl::OCF_NUMBER); - /**/ m_hTableHeaderVerbose = m_Options.insertCheck(m_hTableHeader, i18n(muT("Make column titles more verbose"))); - /**/ m_hHeaderTooltips = m_Options.insertCheck(m_hTableHeader, i18n(muT("Show tooltips with detailed information in column titles")), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK); - /**/ m_hHeaderTooltipsIfCustom = m_Options.insertCheck(m_hHeaderTooltips, i18n(muT("Only show if a custom title was entered or if titles are not verbose"))); - /**/m_hSort = m_Options.insertGroup(NULL, i18n(muT("Sorting")), OptionsCtrl::OCF_ROOTGROUP); - /**/hTemp = m_Options.insertGroup(NULL, i18n(muT("HTML file generation")), OptionsCtrl::OCF_ROOTGROUP); - /**/ m_hNick = m_Options.insertEdit(hTemp, i18n(muT("Own nick for statistics"))); - /**/ hTemp2 = m_Options.insertGroup(hTemp, i18n(muT("Output files and folders"))); - /**/ m_hOutputVariables = m_Options.insertCheck(hTemp2, i18n(muT("Substitute variables in output file name and subfolder for additional files"))); - /**/ m_hOutputFile = m_Options.insertEdit(hTemp2, i18n(muT("Output file"))); - /**/ m_hOutputExtraToFolder = m_Options.insertCheck(hTemp2, i18n(muT("Output additional files to subfolder")), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK); - /**/ m_hOutputExtraFolder = m_Options.insertEdit(m_hOutputExtraToFolder, i18n(muT("Subfolder for additional files"))); - /**/ m_hOverwriteAlways = m_Options.insertCheck(hTemp2, i18n(muT("Always overwrite already existing files (dangerous!)"))); - /**/ hTemp2 = m_Options.insertGroup(hTemp, i18n(muT("Auto open statistics after being generated..."))); - /**/ m_hAutoOpenOptions = m_Options.insertCheck(hTemp2, i18n(muT("...via button \"Create statistics\" in options"))); - /**/ m_hAutoOpenStartup = m_Options.insertCheck(hTemp2, i18n(muT("...on Miranda IM's startup"))); - /**/ m_hAutoOpenMenu = m_Options.insertCheck(hTemp2, i18n(muT("...via Miranda IM's main menu"))); + hTemp = m_Options.insertGroup(NULL, TranslateT("Contact filtering and totals"), OptionsCtrl::OCF_ROOTGROUP | OptionsCtrl::OCF_NODISABLECHILDS); + m_hRemoveEmptyContacts = m_Options.insertCheck(hTemp, TranslateT("Remove contacts with empty history")); + m_hRemoveOutChatsZero = m_Options.insertCheck(hTemp, TranslateT("Remove contacts with only incoming chats"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK); + m_hRemoveOutBytesZero = m_Options.insertCheck(m_hRemoveOutChatsZero, TranslateT("Remove only if you never answered")); + m_hRemoveInChatsZero = m_Options.insertCheck(hTemp, TranslateT("Remove contacts with only outgoing chats"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK); + m_hRemoveInBytesZero = m_Options.insertCheck(m_hRemoveInChatsZero, TranslateT("Remove only if contact never answered")); + m_hOmitContacts = m_Options.insertCheck(hTemp, TranslateT("Limit number of contacts in statistics"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK); + hTemp2 = m_Options.insertGroup(m_hOmitContacts, TranslateT("Criteria")); + m_hOmitByValue = m_Options.insertCheck(hTemp2, TranslateT("Omit contacts that didn't produce a certain amount of data"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK); + m_hOmitByValueData = m_Options.insertCombo(m_hOmitByValue, TranslateT("Omit if")); + m_hOmitByValueLimit = m_Options.insertEdit(m_hOmitByValue, TranslateT("...is less than"), _T(""), OptionsCtrl::OCF_NUMBER); + m_hOmitByTime = m_Options.insertCheck(hTemp2, TranslateT("Omit contacts that were inactive for some time"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK); + m_hOmitByTimeDays = m_Options.insertEdit(m_hOmitByTime, TranslateT("Maximum inactivity time (days)"), _T(""), OptionsCtrl::OCF_NUMBER); + m_hOmitByRank = m_Options.insertCheck(hTemp2, TranslateT("Omit all contacts not in \"Top n\""), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK); + m_hOmitNumOnTop = m_Options.insertEdit(m_hOmitByRank, TranslateT("Number of contacts in \"Top n\""), _T("10"), OptionsCtrl::OCF_NUMBER); + m_hOmittedInTotals = m_Options.insertCheck(m_hOmitContacts, TranslateT("Include omitted contacts in totals")); + m_hOmittedInExtraRow = m_Options.insertCheck(m_hOmitContacts, TranslateT("Include totals of omitted contacts in additional row")); + m_hCalcTotals = m_Options.insertCheck(hTemp, TranslateT("Include totals in statistics")); + hTemp = m_Options.insertGroup(NULL, TranslateT("Table header"), OptionsCtrl::OCF_ROOTGROUP | OptionsCtrl::OCF_NODISABLECHILDS); + m_hTableHeader = m_Options.insertCheck(hTemp, TranslateT("Output header"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK | OptionsCtrl::OCF_DISABLED | OptionsCtrl::OCF_NODISABLECHILDS); + m_hTableHeaderRepeat = m_Options.insertEdit(m_hTableHeader, TranslateT("Repeat header every n contacts (0=don't repeat)"), _T("0"), OptionsCtrl::OCF_NUMBER); + m_hTableHeaderVerbose = m_Options.insertCheck(m_hTableHeader, TranslateT("Make column titles more verbose")); + m_hHeaderTooltips = m_Options.insertCheck(m_hTableHeader, TranslateT("Show tooltips with detailed information in column titles"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK); + m_hHeaderTooltipsIfCustom = m_Options.insertCheck(m_hHeaderTooltips, TranslateT("Only show if a custom title was entered or if titles are not verbose")); + m_hSort = m_Options.insertGroup(NULL, TranslateT("Sorting"), OptionsCtrl::OCF_ROOTGROUP); + hTemp = m_Options.insertGroup(NULL, TranslateT("HTML file generation"), OptionsCtrl::OCF_ROOTGROUP); + m_hNick = m_Options.insertEdit(hTemp, TranslateT("Own nick for statistics")); + hTemp2 = m_Options.insertGroup(hTemp, TranslateT("Output files and folders")); + m_hOutputVariables = m_Options.insertCheck(hTemp2, TranslateT("Substitute variables in output file name and subfolder for additional files")); + m_hOutputFile = m_Options.insertEdit(hTemp2, TranslateT("Output file")); + m_hOutputExtraToFolder = m_Options.insertCheck(hTemp2, TranslateT("Output additional files to subfolder"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK); + m_hOutputExtraFolder = m_Options.insertEdit(m_hOutputExtraToFolder, TranslateT("Subfolder for additional files")); + m_hOverwriteAlways = m_Options.insertCheck(hTemp2, TranslateT("Always overwrite already existing files (dangerous!)")); + hTemp2 = m_Options.insertGroup(hTemp, TranslateT("Auto open statistics after being generated...")); + m_hAutoOpenOptions = m_Options.insertCheck(hTemp2, TranslateT("...via button \"Create statistics\" in options")); + m_hAutoOpenStartup = m_Options.insertCheck(hTemp2, TranslateT("...on Miranda IM's startup")); + m_hAutoOpenMenu = m_Options.insertCheck(hTemp2, TranslateT("...via Miranda IM's main menu")); // our sort levels - static const mu_text* sortLevels[Settings::cNumSortLevels] = { - I18N(muT("First sort by")), - I18N(muT("Then sort by")), - I18N(muT("Finally sort by")) + static const TCHAR* sortLevels[Settings::cNumSortLevels] = { + LPGENT("First sort by"), + LPGENT("Then sort by"), + LPGENT("Finally sort by") }; // our sort keys static const struct { int key; - mu_text* desc; + TCHAR* desc; } sortKeys[] = { - { Settings::skNick , I18N(muT("Nick")) }, - { Settings::skProtocol , I18N(muT("Protocol")) }, - { Settings::skGroup , I18N(muT("Group")) }, - { Settings::skBytesIn , I18N(muT("Characters (incoming, absolute)")) }, - { Settings::skBytesOut , I18N(muT("Characters (outgoing, absolute)")) }, - { Settings::skBytesTotal , I18N(muT("Characters (all, absolute)")) }, - { Settings::skBytesInAvg , I18N(muT("Characters (incoming, average)")) }, - { Settings::skBytesOutAvg , I18N(muT("Characters (outgoing, average)")) }, - { Settings::skBytesTotalAvg , I18N(muT("Characters (all, average)")) }, - { Settings::skMessagesIn , I18N(muT("Messages (incoming, absolute)")) }, - { Settings::skMessagesOut , I18N(muT("Messages (outgoing, absolute)")) }, - { Settings::skMessagesTotal , I18N(muT("Messages (all, absolute)")) }, - { Settings::skMessagesInAvg , I18N(muT("Messages (incoming, average)")) }, - { Settings::skMessagesOutAvg , I18N(muT("Messages (outgoing, average)")) }, - { Settings::skMessagesTotalAvg , I18N(muT("Messages (all, average)")) }, - { Settings::skChatsIn , I18N(muT("Chats (incoming, absolute)")) }, - { Settings::skChatsOut , I18N(muT("Chats (outgoing, absolute)")) }, - { Settings::skChatsTotal , I18N(muT("Chats (all, absolute)")) }, - { Settings::skChatsInAvg , I18N(muT("Chats (incoming, average)")) }, - { Settings::skChatsOutAvg , I18N(muT("Chats (outgoing, average)")) }, - { Settings::skChatsTotalAvg , I18N(muT("Chats (all, average)")) }, - { Settings::skChatDurationTotal , I18N(muT("Chat duration (total)")) }, - { Settings::skChatDurationMin , I18N(muT("Chat duration (minimum)")) }, - { Settings::skChatDurationAvg , I18N(muT("Chat duration (average)")) }, - { Settings::skChatDurationMax , I18N(muT("Chat duration (maximum)")) }, - { Settings::skTimeOfFirstMessage, I18N(muT("Time of first message to/from contact")) }, - { Settings::skTimeOfLastMessage , I18N(muT("Time of last message to/from contact")) }, + { Settings::skNick , LPGENT("Nick") }, + { Settings::skProtocol , LPGENT("Protocol") }, + { Settings::skGroup , LPGENT("Group") }, + { Settings::skBytesIn , LPGENT("Characters (incoming, absolute)") }, + { Settings::skBytesOut , LPGENT("Characters (outgoing, absolute)") }, + { Settings::skBytesTotal , LPGENT("Characters (all, absolute)") }, + { Settings::skBytesInAvg , LPGENT("Characters (incoming, average)") }, + { Settings::skBytesOutAvg , LPGENT("Characters (outgoing, average)") }, + { Settings::skBytesTotalAvg , LPGENT("Characters (all, average)") }, + { Settings::skMessagesIn , LPGENT("Messages (incoming, absolute)") }, + { Settings::skMessagesOut , LPGENT("Messages (outgoing, absolute)") }, + { Settings::skMessagesTotal , LPGENT("Messages (all, absolute)") }, + { Settings::skMessagesInAvg , LPGENT("Messages (incoming, average)") }, + { Settings::skMessagesOutAvg , LPGENT("Messages (outgoing, average)") }, + { Settings::skMessagesTotalAvg , LPGENT("Messages (all, average)") }, + { Settings::skChatsIn , LPGENT("Chats (incoming, absolute)") }, + { Settings::skChatsOut , LPGENT("Chats (outgoing, absolute)") }, + { Settings::skChatsTotal , LPGENT("Chats (all, absolute)") }, + { Settings::skChatsInAvg , LPGENT("Chats (incoming, average)") }, + { Settings::skChatsOutAvg , LPGENT("Chats (outgoing, average)") }, + { Settings::skChatsTotalAvg , LPGENT("Chats (all, average)") }, + { Settings::skChatDurationTotal , LPGENT("Chat duration (total)") }, + { Settings::skChatDurationMin , LPGENT("Chat duration (minimum)") }, + { Settings::skChatDurationAvg , LPGENT("Chat duration (average)") }, + { Settings::skChatDurationMax , LPGENT("Chat duration (maximum)") }, + { Settings::skTimeOfFirstMessage, LPGENT("Time of first message to/from contact") }, + { Settings::skTimeOfLastMessage , LPGENT("Time of last message to/from contact") }, }; m_SortKeyToIndex.resize(Settings::skLAST - Settings::skFIRST + 1); @@ -193,48 +188,48 @@ void DlgOption::SubOutput::onWMInitDialog() array_each_(i, sortLevels) { - m_hSortBy[i] = m_Options.insertCombo(m_hSort, i18n(sortLevels[i]), (i == 0) ? 0 : OptionsCtrl::OCF_DISABLECHILDSONINDEX0); + m_hSortBy[i] = m_Options.insertCombo(m_hSort, TranslateTS(sortLevels[i]), (i == 0) ? 0 : OptionsCtrl::OCF_DISABLECHILDSONINDEX0); if (i != 0) { - m_Options.addComboItem(m_hSortBy[i], i18n(muT("(nothing)"))); + m_Options.addComboItem(m_hSortBy[i], TranslateT("(nothing)")); } array_each_(j, sortKeys) { - m_Options.addComboItem(m_hSortBy[i], i18n(sortKeys[j].desc)); + m_Options.addComboItem(m_hSortBy[i], TranslateTS(sortKeys[j].desc)); } - /**/m_hSortDir[i] = m_Options.insertRadio(m_hSortBy[i], NULL, i18n(muT("Ascending"))); - /**/ m_Options.insertRadio(m_hSortBy[i], m_hSortDir[i], i18n(muT("Descending"))); + m_hSortDir[i] = m_Options.insertRadio(m_hSortBy[i], NULL, TranslateT("Ascending")); + m_Options.insertRadio(m_hSortBy[i], m_hSortDir[i], TranslateT("Descending")); } // our "omit by value" data - static const mu_text* omitData[] = { - I18N(muT("Characters (incoming, absolute)")), - I18N(muT("Characters (outgoing, absolute)")), - I18N(muT("Characters (all, absolute)")), - I18N(muT("Characters (incoming, average per week)")), - I18N(muT("Characters (outgoing, average per week)")), - I18N(muT("Characters (all, average per week)")), - I18N(muT("Messages (incoming, absolute)")), - I18N(muT("Messages (outgoing, absolute)")), - I18N(muT("Messages (all, absolute)")), - I18N(muT("Messages (incoming, average per week)")), - I18N(muT("Messages (outgoing, average per week)")), - I18N(muT("Messages (all, average per week)")), - I18N(muT("Chats (incoming, absolute)")), - I18N(muT("Chats (outgoing, absolute)")), - I18N(muT("Chats (all, absolute)")), - I18N(muT("Chats (incoming, average per week)")), - I18N(muT("Chats (outgoing, average per week)")), - I18N(muT("Chats (all, average per week)")), - I18N(muT("Chat duration (total, hours)")), + static const TCHAR* omitData[] = { + LPGENT("Characters (incoming, absolute)"), + LPGENT("Characters (outgoing, absolute)"), + LPGENT("Characters (all, absolute)"), + LPGENT("Characters (incoming, average per week)"), + LPGENT("Characters (outgoing, average per week)"), + LPGENT("Characters (all, average per week)"), + LPGENT("Messages (incoming, absolute)"), + LPGENT("Messages (outgoing, absolute)"), + LPGENT("Messages (all, absolute)"), + LPGENT("Messages (incoming, average per week)"), + LPGENT("Messages (outgoing, average per week)"), + LPGENT("Messages (all, average per week)"), + LPGENT("Chats (incoming, absolute)"), + LPGENT("Chats (outgoing, absolute)"), + LPGENT("Chats (all, absolute)"), + LPGENT("Chats (incoming, average per week)"), + LPGENT("Chats (outgoing, average per week)"), + LPGENT("Chats (all, average per week)"), + LPGENT("Chat duration (total, hours)"), }; array_each_(i, omitData) { - m_Options.addComboItem(m_hOmitByValueData, i18n(omitData[i])); + m_Options.addComboItem(m_hOmitByValueData, TranslateTS(omitData[i])); } m_Options.ensureVisible(NULL); @@ -338,13 +333,9 @@ void DlgOption::SubOutput::saveSettings() void DlgOption::SubOutput::onChanged(HANDLE hItem) { if (hItem == m_hSortBy[1]) - { m_Options.enableItem(m_hSortBy[2], m_Options.getComboSelected(m_hSortBy[1]) != 0); - } else if (hItem == m_hCalcTotals || hItem == m_hOmitContacts) - { m_Options.enableItem(m_hOmittedInTotals, m_Options.isItemChecked(m_hCalcTotals) && m_Options.isItemChecked(m_hOmitContacts)); - } getParent()->settingsChanged(); } -- cgit v1.2.3