summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/AVS/src/acc.cpp8
-rw-r--r--plugins/AVS/src/cache.cpp2
-rw-r--r--plugins/AVS/src/image_utils.cpp6
-rw-r--r--plugins/AVS/src/main.cpp2
-rw-r--r--plugins/AVS/src/options.cpp20
-rw-r--r--plugins/AVS/src/poll.cpp2
-rw-r--r--plugins/AVS/src/services.cpp16
-rw-r--r--plugins/AVS/src/utils.cpp28
-rw-r--r--plugins/AddContactPlus/src/addcontact.cpp4
-rw-r--r--plugins/AddContactPlus/src/main.cpp8
-rw-r--r--plugins/Alarms/src/alarm_win.cpp22
-rw-r--r--plugins/Alarms/src/alarmlist.cpp16
-rw-r--r--plugins/Alarms/src/frame.cpp2
-rw-r--r--plugins/AssocMgr/src/assoclist.cpp8
-rw-r--r--plugins/AssocMgr/src/reg.cpp2
-rw-r--r--plugins/AssocMgr/src/test.cpp2
-rw-r--r--plugins/AuthState/src/main.cpp2
-rw-r--r--plugins/AutoRun/src/main.cpp2
-rw-r--r--plugins/AutoShutdown/src/options.cpp2
-rw-r--r--plugins/AutoShutdown/src/settingsdlg.cpp8
-rw-r--r--plugins/AutoShutdown/src/shutdownsvc.cpp6
-rw-r--r--plugins/AutoShutdown/src/utils.cpp6
-rw-r--r--plugins/AutoShutdown/src/watcher.cpp2
-rw-r--r--plugins/AvatarHistory/src/AvatarDlg.cpp10
-rw-r--r--plugins/AvatarHistory/src/AvatarHistory.cpp12
-rw-r--r--plugins/AvatarHistory/src/options.cpp4
-rw-r--r--plugins/AvatarHistory/src/utils.cpp6
-rw-r--r--plugins/BASS_interface/src/Main.cpp24
-rw-r--r--plugins/BasicHistory/src/BasicHistory.cpp2
-rw-r--r--plugins/BasicHistory/src/EventList.cpp2
-rw-r--r--plugins/BasicHistory/src/HistoryWindow.cpp10
-rw-r--r--plugins/BasicHistory/src/Options.cpp42
-rw-r--r--plugins/BasicHistory/src/Scheduler.cpp2
-rw-r--r--plugins/BasicHistory/src/Searcher.cpp2
-rw-r--r--plugins/Boltun/src/boltun.cpp22
-rw-r--r--plugins/Boltun/src/config.cpp6
-rw-r--r--plugins/BossKeyPlus/src/BossKey.cpp10
-rw-r--r--plugins/BossKeyPlus/src/Options.cpp6
-rw-r--r--plugins/BuddyExpectator/src/BuddyExpectator.cpp14
-rw-r--r--plugins/BuddyExpectator/src/options.cpp4
-rw-r--r--plugins/BuddyPounce/src/dialog.cpp10
-rw-r--r--plugins/BuddyPounce/src/main.cpp8
-rw-r--r--plugins/CSList/src/cslist.cpp38
-rw-r--r--plugins/CSList/src/stdafx.h4
-rw-r--r--plugins/ChangeKeyboardLayout/src/hook_events.cpp2
-rw-r--r--plugins/ChangeKeyboardLayout/src/options.cpp2
-rw-r--r--plugins/ClientChangeNotify/src/CString.cpp2
-rw-r--r--plugins/ClientChangeNotify/src/ClientChangeNotify.cpp6
-rw-r--r--plugins/ClientChangeNotify/src/OptDlg.cpp6
-rw-r--r--plugins/ClientChangeNotify/src/Options.cpp8
-rw-r--r--plugins/Clist_blind/src/clcopts.cpp10
-rw-r--r--plugins/Clist_blind/src/cluiopts.cpp4
-rw-r--r--plugins/Clist_blind/src/init.cpp2
-rw-r--r--plugins/Clist_modern/src/cluiframes.cpp6
-rw-r--r--plugins/Clist_modern/src/modern_cachefuncs.cpp22
-rw-r--r--plugins/Clist_modern/src/modern_clc.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_clcitems.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_clcopts.cpp32
-rw-r--r--plugins/Clist_modern/src/modern_clcutils.cpp6
-rw-r--r--plugins/Clist_modern/src/modern_clistevents.cpp4
-rw-r--r--plugins/Clist_modern/src/modern_clistmenus.cpp8
-rw-r--r--plugins/Clist_modern/src/modern_clistopts.cpp8
-rw-r--r--plugins/Clist_modern/src/modern_clui.cpp12
-rw-r--r--plugins/Clist_modern/src/modern_keyboard.cpp14
-rw-r--r--plugins/Clist_modern/src/modern_rowtemplateopt.cpp10
-rw-r--r--plugins/Clist_modern/src/modern_skinengine.cpp12
-rw-r--r--plugins/Clist_modern/src/modern_skinopt.cpp14
-rw-r--r--plugins/Clist_modern/src/modern_skinselector.cpp4
-rw-r--r--plugins/Clist_modern/src/modern_statusbar.cpp6
-rw-r--r--plugins/Clist_modern/src/modern_statusbar_options.cpp4
-rw-r--r--plugins/Clist_modern/src/modern_toolbar.cpp6
-rw-r--r--plugins/Clist_modern/src/modern_viewmodebar.cpp14
-rw-r--r--plugins/Clist_nicer/src/clcitems.cpp16
-rw-r--r--plugins/Clist_nicer/src/clcopts.cpp6
-rw-r--r--plugins/Clist_nicer/src/clui.cpp22
-rw-r--r--plugins/Clist_nicer/src/cluiframes.cpp8
-rw-r--r--plugins/Clist_nicer/src/cluiopts.cpp4
-rw-r--r--plugins/Clist_nicer/src/extBackg.cpp10
-rw-r--r--plugins/Clist_nicer/src/init.cpp2
-rw-r--r--plugins/Clist_nicer/src/viewmodes.cpp12
-rw-r--r--plugins/CmdLine/src/mimcmd_handlers.cpp4
-rw-r--r--plugins/ConnectionNotify/src/ConnectionNotify.cpp12
-rw-r--r--plugins/ConnectionNotify/src/debug.cpp2
-rw-r--r--plugins/Console/src/Console.cpp20
-rw-r--r--plugins/ContactsPlus/src/receive.cpp2
-rw-r--r--plugins/ContactsPlus/src/send.cpp2
-rw-r--r--plugins/ContactsPlus/src/utils.cpp6
-rw-r--r--plugins/CrashDumper/src/crshdmp.cpp10
-rw-r--r--plugins/CrashDumper/src/dumper.cpp24
-rw-r--r--plugins/CrashDumper/src/exhndlr.cpp2
-rw-r--r--plugins/CrashDumper/src/stdafx.h26
-rw-r--r--plugins/CrashDumper/src/ui.cpp2
-rw-r--r--plugins/CrashDumper/src/upload.cpp4
-rw-r--r--plugins/CrashDumper/src/utils.cpp22
-rw-r--r--plugins/Db3x_mmap/src/database.cpp2
-rw-r--r--plugins/Db3x_mmap/src/dbheaders.cpp2
-rw-r--r--plugins/Db3x_mmap/src/ui.cpp2
-rw-r--r--plugins/DbChecker/src/selectdb.cpp2
-rw-r--r--plugins/DbEditorPP/src/main.cpp8
-rw-r--r--plugins/Db_autobackups/src/backup.cpp4
-rw-r--r--plugins/Db_autobackups/src/main.cpp2
-rw-r--r--plugins/Db_autobackups/src/options.cpp8
-rw-r--r--plugins/Dbx_mdb/src/dbintf.cpp2
-rw-r--r--plugins/Dropbox/src/dropbox_events.cpp2
-rw-r--r--plugins/Dropbox/src/dropbox_options.cpp2
-rw-r--r--plugins/Dropbox/src/dropbox_utils.cpp2
-rw-r--r--plugins/Dropbox/src/file_transfer.h6
-rw-r--r--plugins/Exchange/src/dlg_handlers.cpp6
-rw-r--r--plugins/Exchange/src/emails.cpp2
-rw-r--r--plugins/Exchange/src/hooked_events.cpp4
-rw-r--r--plugins/Exchange/src/utils.cpp2
-rw-r--r--plugins/FTPFileYM/src/dialog.cpp14
-rw-r--r--plugins/FTPFileYM/src/ftpfile.cpp8
-rw-r--r--plugins/FTPFileYM/src/job_upload.cpp4
-rw-r--r--plugins/FTPFileYM/src/manager.cpp10
-rw-r--r--plugins/FTPFileYM/src/mir_db.cpp4
-rw-r--r--plugins/FTPFileYM/src/options.cpp2
-rw-r--r--plugins/FavContacts/src/favlist.h2
-rw-r--r--plugins/FavContacts/src/menu.cpp4
-rw-r--r--plugins/FavContacts/src/services.cpp32
-rw-r--r--plugins/FingerprintNG/src/fingerprint.cpp10
-rw-r--r--plugins/FingerprintNG/src/options.cpp2
-rw-r--r--plugins/FloatingContacts/src/main.cpp6
-rw-r--r--plugins/FloatingContacts/src/options.cpp4
-rw-r--r--plugins/Folders/src/dlg_handlers.cpp6
-rw-r--r--plugins/Folders/src/folderItem.cpp14
-rw-r--r--plugins/Folders/src/folderItem.h2
-rw-r--r--plugins/Folders/src/services.cpp6
-rw-r--r--plugins/Folders/src/utils.cpp8
-rw-r--r--plugins/Folders/src/utils.h2
-rw-r--r--plugins/HTTPServer/src/GuiElements.cpp6
-rw-r--r--plugins/HTTPServer/src/main.cpp2
-rw-r--r--plugins/HistoryLinkListPlus/src/linklist.cpp2
-rw-r--r--plugins/HistoryLinkListPlus/src/linklist_fct.cpp6
-rw-r--r--plugins/HistoryStats/src/bandctrlimpl.cpp4
-rw-r--r--plugins/HistoryStats/src/canvas.cpp2
-rw-r--r--plugins/HistoryStats/src/column.h2
-rw-r--r--plugins/HistoryStats/src/column_chatduration.cpp4
-rw-r--r--plugins/HistoryStats/src/column_events.cpp4
-rw-r--r--plugins/HistoryStats/src/column_inout.cpp10
-rw-r--r--plugins/HistoryStats/src/column_inoutgraph.cpp8
-rw-r--r--plugins/HistoryStats/src/column_split.cpp12
-rw-r--r--plugins/HistoryStats/src/column_splittimeline.cpp10
-rw-r--r--plugins/HistoryStats/src/column_timeline.cpp4
-rw-r--r--plugins/HistoryStats/src/column_wordcount.cpp6
-rw-r--r--plugins/HistoryStats/src/column_words.cpp6
-rw-r--r--plugins/HistoryStats/src/dlgfilterwords.cpp4
-rw-r--r--plugins/HistoryStats/src/dlgoption_subcolumns.cpp14
-rw-r--r--plugins/HistoryStats/src/dlgoption_subglobal.cpp8
-rw-r--r--plugins/HistoryStats/src/dlgoption_suboutput.cpp6
-rw-r--r--plugins/HistoryStats/src/iconlib.cpp4
-rw-r--r--plugins/HistoryStats/src/mirandasettings.cpp4
-rw-r--r--plugins/HistoryStats/src/mu_common.cpp12
-rw-r--r--plugins/HistoryStats/src/statistic.cpp2
-rw-r--r--plugins/HistoryStats/src/utils.cpp12
-rw-r--r--plugins/HwHotKeys/src/HwHotKeys_DllMain.cpp2
-rw-r--r--plugins/IEHistory/src/IEHistory.cpp2
-rw-r--r--plugins/IEHistory/src/events.cpp2
-rw-r--r--plugins/IEView/src/Options.cpp4
-rw-r--r--plugins/IEView/src/TemplateHTMLBuilder.cpp4
-rw-r--r--plugins/IEView/src/Utils.cpp2
-rw-r--r--plugins/IgnoreState/src/options.cpp2
-rw-r--r--plugins/Import/src/import.cpp8
-rw-r--r--plugins/Import/src/miranda.cpp8
-rw-r--r--plugins/Import/src/utils.cpp4
-rw-r--r--plugins/KeyboardNotify/src/main.cpp2
-rw-r--r--plugins/KeyboardNotify/src/options.cpp26
-rw-r--r--plugins/KeyboardNotify/src/utils.cpp4
-rw-r--r--plugins/ListeningTo/src/listeningto.cpp16
-rw-r--r--plugins/LotusNotify/src/LotusNotify.cpp26
-rw-r--r--plugins/LotusNotify/src/debug.cpp2
-rw-r--r--plugins/MenuItemEx/src/main.cpp8
-rw-r--r--plugins/MessageState/src/messagestate.cpp6
-rw-r--r--plugins/MirFox/src/MirandaInterface.cpp4
-rw-r--r--plugins/MirFox/src/MirandaOptions.cpp2
-rw-r--r--plugins/MirFox/src/MirandaUtils.cpp10
-rw-r--r--plugins/MirFox/src/MirfoxData.cpp4
-rw-r--r--plugins/MirLua/Modules/m_popup/src/main.cpp4
-rw-r--r--plugins/MirLua/src/m_core.cpp2
-rw-r--r--plugins/MirLua/src/m_genmenu.cpp4
-rw-r--r--plugins/MirLua/src/m_hotkeys.cpp8
-rw-r--r--plugins/MirLua/src/m_icolib.cpp2
-rw-r--r--plugins/MirLua/src/m_message.cpp2
-rw-r--r--plugins/MirLua/src/m_options.cpp6
-rw-r--r--plugins/MirLua/src/m_sounds.cpp8
-rw-r--r--plugins/MirLua/src/mlua.cpp4
-rw-r--r--plugins/MirLua/src/mlua_options.cpp4
-rw-r--r--plugins/MirLua/src/mlua_script_loader.cpp2
-rw-r--r--plugins/MirOTR/src/mirotrmenu.cpp12
-rw-r--r--plugins/MirOTR/src/options.cpp8
-rw-r--r--plugins/MirOTR/src/svcs_menu.cpp4
-rw-r--r--plugins/MirandaG15/src/CAppletManager.cpp14
-rw-r--r--plugins/MirandaG15/src/CConfig.cpp4
-rw-r--r--plugins/MobileState/src/main.cpp2
-rw-r--r--plugins/ModernOpt/src/modernopt.cpp4
-rw-r--r--plugins/ModernOpt/src/mopt_home.cpp4
-rw-r--r--plugins/ModernOpt/src/mopt_selector.cpp2
-rw-r--r--plugins/MsgPopup/src/main.cpp2
-rw-r--r--plugins/MsgPopup/src/options.cpp8
-rwxr-xr-xplugins/Msg_Export/src/FileViewer.cpp2
-rwxr-xr-xplugins/Msg_Export/src/options.cpp4
-rwxr-xr-xplugins/Msg_Export/src/utils.cpp22
-rw-r--r--plugins/MyDetails/src/data.cpp26
-rw-r--r--plugins/MyDetails/src/frame.cpp16
-rw-r--r--plugins/MyDetails/src/mydetails.cpp4
-rw-r--r--plugins/MyDetails/src/options.cpp2
-rw-r--r--plugins/NewAwaySysMod/src/AwayOpt.cpp18
-rw-r--r--plugins/NewAwaySysMod/src/AwaySys.cpp14
-rw-r--r--plugins/NewAwaySysMod/src/CString.cpp2
-rw-r--r--plugins/NewAwaySysMod/src/Client.cpp4
-rw-r--r--plugins/NewAwaySysMod/src/Options.cpp8
-rw-r--r--plugins/NewAwaySysMod/src/Path.h2
-rw-r--r--plugins/NewAwaySysMod/src/Properties.cpp6
-rw-r--r--plugins/NewAwaySysMod/src/ReadAwayMsg.cpp2
-rw-r--r--plugins/NewAwaySysMod/src/SetAwayMsg.cpp6
-rw-r--r--plugins/NewEventNotify/src/popup.cpp6
-rw-r--r--plugins/NewXstatusNotify/src/indsnd.cpp22
-rw-r--r--plugins/NewXstatusNotify/src/main.cpp18
-rw-r--r--plugins/NewXstatusNotify/src/options.cpp54
-rw-r--r--plugins/NewXstatusNotify/src/popup.cpp8
-rw-r--r--plugins/NewXstatusNotify/src/utils.cpp6
-rw-r--r--plugins/NewXstatusNotify/src/utils.h2
-rw-r--r--plugins/NewXstatusNotify/src/xstatus.cpp18
-rw-r--r--plugins/New_GPG/src/init.cpp2
-rwxr-xr-xplugins/New_GPG/src/main.cpp40
-rwxr-xr-xplugins/New_GPG/src/messages.cpp6
-rwxr-xr-xplugins/New_GPG/src/options.cpp26
-rwxr-xr-xplugins/New_GPG/src/utilities.cpp10
-rw-r--r--plugins/NewsAggregator/Src/Authentication.cpp10
-rw-r--r--plugins/NewsAggregator/Src/CheckFeed.cpp76
-rw-r--r--plugins/NewsAggregator/Src/ExportImport.cpp24
-rw-r--r--plugins/NewsAggregator/Src/Menus.cpp2
-rw-r--r--plugins/NewsAggregator/Src/NewsAggregator.cpp6
-rw-r--r--plugins/NewsAggregator/Src/Options.cpp44
-rw-r--r--plugins/NewsAggregator/Src/Services.cpp4
-rw-r--r--plugins/NewsAggregator/Src/Utils.cpp8
-rw-r--r--plugins/NewsAggregator/Src/stdafx.h2
-rw-r--r--plugins/NoHistory/src/dllmain.cpp2
-rw-r--r--plugins/NoHistory/src/options.cpp2
-rw-r--r--plugins/Non-IM Contact/src/contactinfo.cpp8
-rw-r--r--plugins/Non-IM Contact/src/dialog.cpp2
-rw-r--r--plugins/Non-IM Contact/src/http.cpp2
-rw-r--r--plugins/NotesAndReminders/src/hotkeys.cpp12
-rw-r--r--plugins/NotesAndReminders/src/main.cpp4
-rw-r--r--plugins/NotesAndReminders/src/notes.cpp6
-rw-r--r--plugins/NotesAndReminders/src/options.cpp14
-rw-r--r--plugins/NotifyAnything/src/main.cpp8
-rw-r--r--plugins/NotifyAnything/src/options.cpp10
-rw-r--r--plugins/Nudge/src/main.cpp16
-rw-r--r--plugins/Nudge/src/nudge.cpp8
-rw-r--r--plugins/OpenFolder/src/openFolder.cpp8
-rw-r--r--plugins/PackUpdater/Src/Events.cpp6
-rw-r--r--plugins/PackUpdater/Src/Notifications.cpp4
-rw-r--r--plugins/PackUpdater/Src/Options.cpp6
-rw-r--r--plugins/PackUpdater/Src/PackUpdater.cpp4
-rw-r--r--plugins/PackUpdater/Src/Utils.cpp22
-rw-r--r--plugins/PasteIt/src/Options.cpp4
-rw-r--r--plugins/PasteIt/src/PasteIt.cpp8
-rw-r--r--plugins/Ping/src/log.cpp6
-rw-r--r--plugins/Ping/src/menu.cpp2
-rw-r--r--plugins/Ping/src/options.cpp2
-rw-r--r--plugins/Ping/src/ping.cpp2
-rw-r--r--plugins/Ping/src/pinglist.cpp16
-rw-r--r--plugins/Ping/src/pingthread.cpp22
-rw-r--r--plugins/Ping/src/utils.cpp6
-rw-r--r--plugins/PluginUpdater/src/DlgListNew.cpp6
-rw-r--r--plugins/PluginUpdater/src/DlgUpdate.cpp18
-rw-r--r--plugins/PluginUpdater/src/Events.cpp2
-rw-r--r--plugins/PluginUpdater/src/Options.cpp16
-rw-r--r--plugins/PluginUpdater/src/PluginUpdater.cpp2
-rw-r--r--plugins/PluginUpdater/src/Utils.cpp6
-rw-r--r--plugins/Popup/src/actions.cpp4
-rw-r--r--plugins/Popup/src/bitmap_funcs.cpp2
-rw-r--r--plugins/Popup/src/common.h4
-rw-r--r--plugins/Popup/src/config.cpp6
-rw-r--r--plugins/Popup/src/font.cpp44
-rw-r--r--plugins/Popup/src/font.h2
-rw-r--r--plugins/Popup/src/main.cpp10
-rw-r--r--plugins/Popup/src/opt_adv.cpp6
-rw-r--r--plugins/Popup/src/opt_class.cpp6
-rw-r--r--plugins/Popup/src/opt_gen.cpp6
-rw-r--r--plugins/Popup/src/opt_skins.cpp6
-rw-r--r--plugins/Popup/src/opttree.cpp2
-rw-r--r--plugins/Popup/src/popup_wnd2.cpp2
-rw-r--r--plugins/Popup/src/services.cpp12
-rw-r--r--plugins/Popup/src/skin.cpp6
-rw-r--r--plugins/QuickContacts/src/options.cpp2
-rw-r--r--plugins/QuickContacts/src/quickcontacts.cpp34
-rw-r--r--plugins/QuickMessages/src/Utils.cpp10
-rw-r--r--plugins/QuickMessages/src/options.cpp4
-rw-r--r--plugins/QuickReplies/src/events.cpp2
-rw-r--r--plugins/QuickReplies/src/options.cpp4
-rw-r--r--plugins/Quotes/src/CommonOptionDlg.cpp6
-rw-r--r--plugins/Quotes/src/CurrencyConverter.cpp4
-rw-r--r--plugins/Quotes/src/Forex.cpp4
-rw-r--r--plugins/Quotes/src/HTTPSession.cpp2
-rw-r--r--plugins/Quotes/src/QuoteChart.cpp4
-rw-r--r--plugins/Quotes/src/QuotesProviderBase.cpp18
-rw-r--r--plugins/Quotes/src/QuotesProviderDukasCopy.cpp4
-rw-r--r--plugins/Quotes/src/QuotesProviderFinance.cpp4
-rw-r--r--plugins/Quotes/src/QuotesProviderGoogle.cpp8
-rw-r--r--plugins/Quotes/src/QuotesProviderGoogleFinance.cpp2
-rw-r--r--plugins/Quotes/src/QuotesProviderYahoo.cpp4
-rw-r--r--plugins/Quotes/src/SettingsDlg.cpp18
-rw-r--r--plugins/SMS/src/SMS_svc.cpp4
-rw-r--r--plugins/Scriver/src/chat/options.cpp10
-rw-r--r--plugins/Scriver/src/chat/tools.cpp2
-rw-r--r--plugins/Scriver/src/chat/window.cpp4
-rw-r--r--plugins/Scriver/src/infobar.cpp10
-rw-r--r--plugins/Scriver/src/msgdialog.cpp6
-rw-r--r--plugins/Scriver/src/msglog.cpp2
-rw-r--r--plugins/Scriver/src/msgoptions.cpp12
-rw-r--r--plugins/Scriver/src/msgwindow.cpp6
-rw-r--r--plugins/SeenPlugin/src/file.cpp8
-rw-r--r--plugins/SeenPlugin/src/history.cpp12
-rw-r--r--plugins/SeenPlugin/src/main.cpp8
-rw-r--r--plugins/SeenPlugin/src/menu.cpp2
-rw-r--r--plugins/SeenPlugin/src/options.cpp30
-rw-r--r--plugins/SeenPlugin/src/userinfo.cpp2
-rw-r--r--plugins/SeenPlugin/src/utils.cpp20
-rw-r--r--plugins/SendScreenshotPlus/src/CSend.cpp10
-rw-r--r--plugins/SendScreenshotPlus/src/CSendDropbox.cpp2
-rw-r--r--plugins/SendScreenshotPlus/src/CSendFTPFile.cpp2
-rw-r--r--plugins/SendScreenshotPlus/src/CSendHTTPServer.cpp2
-rw-r--r--plugins/SendScreenshotPlus/src/Main.cpp12
-rw-r--r--plugins/SendScreenshotPlus/src/UMainForm.cpp4
-rw-r--r--plugins/SendScreenshotPlus/src/ctrl_button.cpp2
-rw-r--r--plugins/SendScreenshotPlus/src/dlg_msgbox.cpp8
-rw-r--r--plugins/Sessions/Src/Main.cpp20
-rw-r--r--plugins/Sessions/Src/Utils.cpp10
-rw-r--r--plugins/ShellExt/src/options.cpp4
-rw-r--r--plugins/SimpleAR/src/Main.cpp18
-rw-r--r--plugins/SimpleAR/src/Options.cpp12
-rw-r--r--plugins/SimpleStatusMsg/src/awaymsg.cpp2
-rw-r--r--plugins/SimpleStatusMsg/src/main.cpp42
-rw-r--r--plugins/SimpleStatusMsg/src/msgbox.cpp38
-rw-r--r--plugins/SimpleStatusMsg/src/options.cpp32
-rw-r--r--plugins/SkypeStatusChange/src/main.cpp4
-rw-r--r--plugins/SkypeStatusChange/src/options.cpp4
-rw-r--r--plugins/SmileyAdd/src/customsmiley.cpp14
-rw-r--r--plugins/SmileyAdd/src/customsmiley.h2
-rw-r--r--plugins/SmileyAdd/src/download.cpp16
-rw-r--r--plugins/SmileyAdd/src/download.h2
-rw-r--r--plugins/SmileyAdd/src/general.cpp10
-rw-r--r--plugins/SmileyAdd/src/imagecache.cpp24
-rw-r--r--plugins/SmileyAdd/src/imagecache.h10
-rw-r--r--plugins/SmileyAdd/src/options.cpp50
-rw-r--r--plugins/SmileyAdd/src/options.h12
-rw-r--r--plugins/SmileyAdd/src/regexp/WCMatcher.cpp20
-rw-r--r--plugins/SmileyAdd/src/regexp/WCMatcher.h32
-rw-r--r--plugins/SmileyAdd/src/regexp/WCPattern.cpp178
-rw-r--r--plugins/SmileyAdd/src/regexp/WCPattern.h158
-rw-r--r--plugins/SmileyAdd/src/services.cpp32
-rw-r--r--plugins/SmileyAdd/src/smileyroutines.cpp2
-rw-r--r--plugins/SmileyAdd/src/smileys.cpp122
-rw-r--r--plugins/SmileyAdd/src/smileys.h92
-rw-r--r--plugins/SmileyAdd/src/smltool.cpp4
-rw-r--r--plugins/SmileyAdd/src/stdafx.h6
-rw-r--r--plugins/Spamotron/src/options.cpp6
-rw-r--r--plugins/Spamotron/src/stdafx.h2
-rw-r--r--plugins/SpellChecker/src/autoreplace.cpp2
-rw-r--r--plugins/SpellChecker/src/dictionary.cpp8
-rw-r--r--plugins/SpellChecker/src/options.cpp4
-rw-r--r--plugins/SpellChecker/src/spellchecker.cpp6
-rw-r--r--plugins/SpellChecker/src/utils.cpp20
-rw-r--r--plugins/SplashScreen/src/bitmap_funcs.cpp2
-rw-r--r--plugins/SplashScreen/src/main.cpp6
-rw-r--r--plugins/SplashScreen/src/options.cpp12
-rw-r--r--plugins/StatusChange/src/main.cpp2
-rw-r--r--plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp2
-rw-r--r--plugins/StatusPlugins/AdvancedAutoAway/msgoptions.cpp2
-rw-r--r--plugins/StatusPlugins/AdvancedAutoAway/options.cpp4
-rw-r--r--plugins/StatusPlugins/KeepStatus/options.cpp4
-rw-r--r--plugins/StatusPlugins/StartupStatus/options.cpp8
-rw-r--r--plugins/StatusPlugins/StartupStatus/profiles.cpp8
-rw-r--r--plugins/StatusPlugins/StartupStatus/startupstatus.cpp4
-rw-r--r--plugins/StatusPlugins/commonstatus.cpp2
-rwxr-xr-xplugins/StopSpamMod/src/options.cpp2
-rwxr-xr-xplugins/StopSpamMod/src/utilities.cpp6
-rw-r--r--plugins/StopSpamPlus/src/services.cpp2
-rw-r--r--plugins/StopSpamPlus/src/settings.cpp4
-rw-r--r--plugins/StopSpamPlus/src/settings.h6
-rw-r--r--plugins/StopSpamPlus/src/stopspam.cpp2
-rw-r--r--plugins/TabSRMM/src/buttonsbar.cpp10
-rw-r--r--plugins/TabSRMM/src/chat/log.cpp2
-rw-r--r--plugins/TabSRMM/src/chat/muchighlight.cpp14
-rw-r--r--plugins/TabSRMM/src/chat/options.cpp36
-rw-r--r--plugins/TabSRMM/src/chat/tools.cpp4
-rw-r--r--plugins/TabSRMM/src/chat/window.cpp14
-rw-r--r--plugins/TabSRMM/src/contactcache.cpp8
-rw-r--r--plugins/TabSRMM/src/container.cpp36
-rw-r--r--plugins/TabSRMM/src/containeroptions.cpp10
-rw-r--r--plugins/TabSRMM/src/controls.cpp2
-rw-r--r--plugins/TabSRMM/src/eventpopups.cpp2
-rw-r--r--plugins/TabSRMM/src/generic_msghandlers.cpp18
-rw-r--r--plugins/TabSRMM/src/globals.cpp2
-rw-r--r--plugins/TabSRMM/src/hotkeyhandler.cpp2
-rw-r--r--plugins/TabSRMM/src/infopanel.cpp10
-rw-r--r--plugins/TabSRMM/src/mim.cpp12
-rw-r--r--plugins/TabSRMM/src/modplus.cpp2
-rw-r--r--plugins/TabSRMM/src/msgdialog.cpp14
-rw-r--r--plugins/TabSRMM/src/msgdlgutils.cpp12
-rw-r--r--plugins/TabSRMM/src/msgdlgutils.h2
-rw-r--r--plugins/TabSRMM/src/msglog.cpp8
-rw-r--r--plugins/TabSRMM/src/msgoptions.cpp10
-rw-r--r--plugins/TabSRMM/src/msgs.cpp2
-rw-r--r--plugins/TabSRMM/src/selectcontainer.cpp2
-rw-r--r--plugins/TabSRMM/src/sendqueue.cpp6
-rw-r--r--plugins/TabSRMM/src/templates.cpp8
-rw-r--r--plugins/TabSRMM/src/themes.cpp16
-rw-r--r--plugins/TabSRMM/src/typingnotify.cpp2
-rw-r--r--plugins/TabSRMM/src/utils.cpp18
-rw-r--r--plugins/TabSRMM/src/utils.h2
-rw-r--r--plugins/TipperYM/src/bitmap_func.cpp2
-rw-r--r--plugins/TipperYM/src/message_pump.cpp2
-rw-r--r--plugins/TipperYM/src/options.cpp52
-rw-r--r--plugins/TipperYM/src/popwin.cpp4
-rw-r--r--plugins/TipperYM/src/skin_parser.cpp2
-rw-r--r--plugins/TipperYM/src/subst.cpp18
-rw-r--r--plugins/TipperYM/src/tipper.cpp60
-rw-r--r--plugins/TipperYM/src/translations.cpp8
-rw-r--r--plugins/Toaster/src/main.cpp2
-rw-r--r--plugins/Toaster/src/options.cpp2
-rw-r--r--plugins/Toaster/src/toast_notification.cpp2
-rw-r--r--plugins/Toaster/src/utils.h4
-rw-r--r--plugins/TooltipNotify/src/TooltipNotify.cpp16
-rw-r--r--plugins/TopToolBar/src/toolbar.cpp2
-rw-r--r--plugins/TopToolBar/src/toolbarwnd.cpp4
-rw-r--r--plugins/TopToolBar/src/topbutton.cpp8
-rw-r--r--plugins/TopToolBar/src/ttbopt.cpp2
-rw-r--r--plugins/TrafficCounter/src/TrafficCounter.cpp26
-rw-r--r--plugins/TrafficCounter/src/opttree.cpp2
-rw-r--r--plugins/TrafficCounter/src/statistics.cpp2
-rw-r--r--plugins/TranslitSwitcher/src/Layoutproc.cpp4
-rw-r--r--plugins/TranslitSwitcher/src/TranslitSwitcher.cpp16
-rw-r--r--plugins/UserGuide/src/main.cpp4
-rw-r--r--plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp2
-rw-r--r--plugins/UserInfoEx/src/classMAnnivDate.cpp2
-rw-r--r--plugins/UserInfoEx/src/classPsTree.cpp2
-rw-r--r--plugins/UserInfoEx/src/classPsTreeItem.cpp6
-rw-r--r--plugins/UserInfoEx/src/ctrl_annivedit.cpp2
-rw-r--r--plugins/UserInfoEx/src/ctrl_button.cpp2
-rw-r--r--plugins/UserInfoEx/src/ctrl_combo.cpp4
-rw-r--r--plugins/UserInfoEx/src/ctrl_contact.cpp14
-rw-r--r--plugins/UserInfoEx/src/ctrl_edit.cpp4
-rw-r--r--plugins/UserInfoEx/src/dlg_anniversarylist.cpp2
-rw-r--r--plugins/UserInfoEx/src/dlg_msgbox.cpp8
-rw-r--r--plugins/UserInfoEx/src/dlg_propsheet.cpp8
-rw-r--r--plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp2
-rw-r--r--plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.cpp4
-rw-r--r--plugins/UserInfoEx/src/mir_icolib.cpp6
-rw-r--r--plugins/UserInfoEx/src/psp_about.cpp2
-rw-r--r--plugins/UserInfoEx/src/psp_company.cpp12
-rw-r--r--plugins/UserInfoEx/src/psp_contact.cpp20
-rw-r--r--plugins/UserInfoEx/src/psp_general.cpp20
-rw-r--r--plugins/UserInfoEx/src/psp_options.cpp2
-rw-r--r--plugins/UserInfoEx/src/psp_origin.cpp8
-rw-r--r--plugins/UserInfoEx/src/psp_profile.cpp8
-rw-r--r--plugins/UserInfoEx/src/svc_reminder.cpp4
-rw-r--r--plugins/UserInfoEx/src/svc_timezone_old.cpp2
-rw-r--r--plugins/Variables/src/contact.cpp6
-rw-r--r--plugins/Variables/src/dbhelpers.h2
-rw-r--r--plugins/Variables/src/help.cpp8
-rw-r--r--plugins/Variables/src/options.cpp4
-rw-r--r--plugins/Variables/src/parse_metacontacts.cpp6
-rw-r--r--plugins/Variables/src/parse_miranda.cpp10
-rw-r--r--plugins/Variables/src/variables.cpp2
-rwxr-xr-xplugins/Watrack_MPD/src/init.cpp2
-rwxr-xr-xplugins/Watrack_MPD/src/options.cpp6
-rwxr-xr-xplugins/Watrack_MPD/src/utilities.cpp2
-rw-r--r--plugins/Weather/src/weather.cpp4
-rw-r--r--plugins/Weather/src/weather_addstn.cpp22
-rw-r--r--plugins/Weather/src/weather_contacts.cpp54
-rw-r--r--plugins/Weather/src/weather_conv.cpp8
-rw-r--r--plugins/Weather/src/weather_data.cpp58
-rw-r--r--plugins/Weather/src/weather_http.cpp2
-rw-r--r--plugins/Weather/src/weather_info.cpp2
-rw-r--r--plugins/Weather/src/weather_mwin.cpp26
-rw-r--r--plugins/Weather/src/weather_opt.cpp64
-rw-r--r--plugins/Weather/src/weather_popup.cpp8
-rw-r--r--plugins/Weather/src/weather_svcs.cpp2
-rw-r--r--plugins/Weather/src/weather_update.cpp58
-rw-r--r--plugins/WebView/src/main.cpp6
-rw-r--r--plugins/WebView/src/webview.cpp6
-rw-r--r--plugins/WebView/src/webview_alerts.cpp12
-rw-r--r--plugins/WebView/src/webview_datawnd.cpp24
-rw-r--r--plugins/WebView/src/webview_getdata.cpp18
-rw-r--r--plugins/WebView/src/webview_opts.cpp60
-rw-r--r--plugins/WebView/src/webview_services.cpp30
-rw-r--r--plugins/WhenWasIt/src/WhenWasIt.cpp4
-rw-r--r--plugins/WhenWasIt/src/dlg_handlers.cpp12
-rw-r--r--plugins/WhenWasIt/src/hooked_events.cpp2
-rw-r--r--plugins/WhenWasIt/src/icons.cpp2
-rw-r--r--plugins/WhenWasIt/src/services.cpp2
-rw-r--r--plugins/WhoUsesMyFiles/src/wumfplug.cpp6
-rw-r--r--plugins/WinterSpeak/src/ConfigDatabase.cpp8
-rw-r--r--plugins/WinterSpeak/src/main.cpp2
-rw-r--r--plugins/XSoundNotify/src/dialog.cpp16
-rw-r--r--plugins/XSoundNotify/src/options.cpp16
-rw-r--r--plugins/XSoundNotify/src/xsn_main.cpp14
-rw-r--r--plugins/YAMN/src/browser/mailbrowser.cpp4
-rw-r--r--plugins/YAMN/src/main.cpp8
-rw-r--r--plugins/YAMN/src/proto/pop3/pop3comm.cpp6
-rw-r--r--plugins/YAPP/src/yapp.cpp48
-rw-r--r--plugins/YAPP/src/yapp_history_dlg.cpp2
-rw-r--r--plugins/YARelay/src/main.cpp2
-rw-r--r--plugins/YARelay/src/options.cpp2
-rw-r--r--plugins/YahooGroups/src/hooked_events.cpp2
-rw-r--r--plugins/ZeroNotification/src/main.cpp6
-rw-r--r--plugins/wbOSD/src/events.cpp8
-rw-r--r--plugins/wbOSD/src/options.cpp10
511 files changed, 2582 insertions, 2582 deletions
diff --git a/plugins/AVS/src/acc.cpp b/plugins/AVS/src/acc.cpp
index 38e62a954f..1e57d38f08 100644
--- a/plugins/AVS/src/acc.cpp
+++ b/plugins/AVS/src/acc.cpp
@@ -248,11 +248,11 @@ void StartAnimatedGif(ACCData* data)
if (format != PA_FORMAT_GIF)
return;
- FREE_IMAGE_FORMAT fif = fei->FI_GetFileTypeT(ace->szFilename, 0);
+ FREE_IMAGE_FORMAT fif = fei->FI_GetFileTypeU(ace->szFilename, 0);
if (fif == FIF_UNKNOWN)
- fif = fei->FI_GetFIFFromFilenameT(ace->szFilename);
+ fif = fei->FI_GetFIFFromFilenameU(ace->szFilename);
- data->ag.multi = fei->FI_OpenMultiBitmapT(fif, ace->szFilename, FALSE, TRUE, FALSE, GIF_LOAD256);
+ data->ag.multi = fei->FI_OpenMultiBitmapU(fif, ace->szFilename, FALSE, TRUE, FALSE, GIF_LOAD256);
if (data->ag.multi == NULL)
return;
@@ -469,7 +469,7 @@ static LRESULT CALLBACK ACCWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
return TRUE;
case AVATAR_SETNOAVATARTEXT:
- mir_wstrncpy(data->noAvatarText, TranslateTS((wchar_t*)lParam), _countof(data->noAvatarText));
+ mir_wstrncpy(data->noAvatarText, TranslateW((wchar_t*)lParam), _countof(data->noAvatarText));
Invalidate(hwnd);
return TRUE;
diff --git a/plugins/AVS/src/cache.cpp b/plugins/AVS/src/cache.cpp
index 2f521cc01d..6bd8f97177 100644
--- a/plugins/AVS/src/cache.cpp
+++ b/plugins/AVS/src/cache.cpp
@@ -136,7 +136,7 @@ void NotifyMetaAware(MCONTACT hContact, CacheNode *node, AVATARCACHEENTRY *ace)
if (szProto != NULL) {
DBVARIANT dbv = { 0 };
if (!db_get_s(hContact, szProto, "AvatarHash", &dbv)) {
- if (dbv.type == DBVT_TCHAR)
+ if (dbv.type == DBVT_WCHAR)
wcsncpy_s(cacn.hash, dbv.ptszVal, _TRUNCATE);
else if (dbv.type == DBVT_ASCIIZ)
wcsncpy_s(cacn.hash, _A2T(dbv.pszVal), _TRUNCATE);
diff --git a/plugins/AVS/src/image_utils.cpp b/plugins/AVS/src/image_utils.cpp
index 70fe12713e..6219f7d8f5 100644
--- a/plugins/AVS/src/image_utils.cpp
+++ b/plugins/AVS/src/image_utils.cpp
@@ -164,7 +164,7 @@ HBITMAP BmpFilterLoadBitmap(BOOL *bIsTransparent, const wchar_t *ptszFilename)
if (fei == NULL)
return 0;
- FIBITMAP *dib = (FIBITMAP*)CallService(MS_IMG_LOAD, (WPARAM)ptszFilename, IMGL_RETURNDIB | IMGL_TCHAR);
+ FIBITMAP *dib = (FIBITMAP*)CallService(MS_IMG_LOAD, (WPARAM)ptszFilename, IMGL_RETURNDIB | IMGL_WCHAR);
if (dib == NULL)
return 0;
@@ -209,7 +209,7 @@ int BmpFilterSaveBitmap(HBITMAP hBmp, const wchar_t *ptszFile, int flags)
return -1;
wchar_t tszFilename[MAX_PATH];
- if (!PathToAbsoluteT(ptszFile, tszFilename))
+ if (!PathToAbsoluteW(ptszFile, tszFilename))
wcsncpy_s(tszFilename, ptszFile, _TRUNCATE);
if (mir_wstrlen(tszFilename) <= 4)
@@ -222,7 +222,7 @@ int BmpFilterSaveBitmap(HBITMAP hBmp, const wchar_t *ptszFile, int flags)
i.dwMask = IMGI_HBITMAP;
i.fif = FIF_UNKNOWN;
- return !CallService(MS_IMG_SAVE, (WPARAM)&i, MAKELONG(IMGL_TCHAR, flags));
+ return !CallService(MS_IMG_SAVE, (WPARAM)&i, MAKELONG(IMGL_WCHAR, flags));
}
// Other utilities ////////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/AVS/src/main.cpp b/plugins/AVS/src/main.cpp
index a52cd78b6a..1fe80d8d71 100644
--- a/plugins/AVS/src/main.cpp
+++ b/plugins/AVS/src/main.cpp
@@ -381,7 +381,7 @@ static int LoadAvatarModule()
InitServices();
InitPolls();
- wcsncpy_s(g_szDataPath, _countof(g_szDataPath), VARST(L"%miranda_userdata%\\"), _TRUNCATE);
+ wcsncpy_s(g_szDataPath, _countof(g_szDataPath), VARSW(L"%miranda_userdata%\\"), _TRUNCATE);
wcslwr(g_szDataPath);
return 0;
}
diff --git a/plugins/AVS/src/options.cpp b/plugins/AVS/src/options.cpp
index cead97c735..11f36dfb1e 100644
--- a/plugins/AVS/src/options.cpp
+++ b/plugins/AVS/src/options.cpp
@@ -121,7 +121,7 @@ static void SetProtoPic(char *szProto)
wchar_t szNewPath[MAX_PATH];
PathToRelativeT(FileName, szNewPath, g_szDataPath);
- db_set_ts(NULL, PPICT_MODULE, szProto, szNewPath);
+ db_set_ws(NULL, PPICT_MODULE, szProto, szNewPath);
if (!mir_strcmp(AVS_DEFAULT, szProto)) {
for (int i = 0; i < g_ProtoPictures.getCount(); i++) {
@@ -385,8 +385,8 @@ static INT_PTR CALLBACK DlgProcOptionsProtos(HWND hwndDlg, UINT msg, WPARAM wPar
g_selectedProto = GetProtoFromList(hwndDlg, iItem);
if (g_selectedProto) {
DBVARIANT dbv;
- if (!db_get_ts(NULL, PPICT_MODULE, g_selectedProto, &dbv)) {
- if (!PathIsAbsoluteT(VARST(dbv.ptszVal))) {
+ if (!db_get_ws(NULL, PPICT_MODULE, g_selectedProto, &dbv)) {
+ if (!PathIsAbsoluteW(VARSW(dbv.ptszVal))) {
wchar_t szFinalPath[MAX_PATH];
mir_snwprintf(szFinalPath, L"%%miranda_path%%\\%s", dbv.ptszVal);
SetDlgItemText(hwndDlg, IDC_PROTOAVATARNAME, szFinalPath);
@@ -576,7 +576,7 @@ INT_PTR CALLBACK DlgProcAvatarOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
ProtectAvatar(hContact, 0);
if (MessageBox(0, TranslateT("Delete picture file from disk (may be necessary to force a reload, but will delete local pictures)?"), TranslateT("Reset contact picture"), MB_YESNO) == IDYES) {
DBVARIANT dbv = { 0 };
- if (!db_get_ts(hContact, "ContactPhoto", "File", &dbv)) {
+ if (!db_get_ws(hContact, "ContactPhoto", "File", &dbv)) {
DeleteFile(dbv.ptszVal);
db_free(&dbv);
}
@@ -601,7 +601,7 @@ INT_PTR CALLBACK DlgProcAvatarOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
if (MessageBox(0, TranslateT("Delete picture file from disk (may be necessary to force a reload, but will delete local pictures)?"), TranslateT("Reset contact picture"), MB_YESNO) == IDYES) {
DBVARIANT dbv = { 0 };
ProtectAvatar(hContact, 0);
- if (!db_get_ts(hContact, "ContactPhoto", "File", &dbv)) {
+ if (!db_get_ws(hContact, "ContactPhoto", "File", &dbv)) {
DeleteFile(dbv.ptszVal);
db_free(&dbv);
}
@@ -666,15 +666,15 @@ INT_PTR CALLBACK DlgProcAvatarOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
szFinalName[0] = 0;
- if (is_locked && !db_get_ts(hContact, "ContactPhoto", "Backup", &dbv)) {
+ if (is_locked && !db_get_ws(hContact, "ContactPhoto", "Backup", &dbv)) {
MyPathToAbsolute(dbv.ptszVal, szFinalName);
db_free(&dbv);
}
- else if (!db_get_ts(hContact, "ContactPhoto", "RFile", &dbv)) {
+ else if (!db_get_ws(hContact, "ContactPhoto", "RFile", &dbv)) {
MyPathToAbsolute(dbv.ptszVal, szFinalName);
db_free(&dbv);
}
- else if (!db_get_ts(hContact, "ContactPhoto", "File", &dbv)) {
+ else if (!db_get_ws(hContact, "ContactPhoto", "File", &dbv)) {
MyPathToAbsolute(dbv.ptszVal, szFinalName);
db_free(&dbv);
}
@@ -822,7 +822,7 @@ static INT_PTR CALLBACK DlgProcAvatarUserInfo(HWND hwndDlg, UINT msg, WPARAM wPa
ProtectAvatar(hContact, 0);
if (MessageBox(0, TranslateT("Delete picture file from disk (may be necessary to force a reload, but will delete local pictures)?"), TranslateT("Reset contact picture"), MB_YESNO) == IDYES) {
DBVARIANT dbv = { 0 };
- if (!db_get_ts(hContact, "ContactPhoto", "File", &dbv)) {
+ if (!db_get_ws(hContact, "ContactPhoto", "File", &dbv)) {
DeleteFile(dbv.ptszVal);
db_free(&dbv);
}
@@ -846,7 +846,7 @@ static INT_PTR CALLBACK DlgProcAvatarUserInfo(HWND hwndDlg, UINT msg, WPARAM wPa
ProtectAvatar(hContact, 0);
if (MessageBox(0, TranslateT("Delete picture file from disk (may be necessary to force a reload, but will delete local pictures)?"), TranslateT("Reset contact picture"), MB_YESNO) == IDYES) {
DBVARIANT dbv = { 0 };
- if (!db_get_ts(hContact, "ContactPhoto", "File", &dbv)) {
+ if (!db_get_ws(hContact, "ContactPhoto", "File", &dbv)) {
DeleteFile(dbv.ptszVal);
db_free(&dbv);
}
diff --git a/plugins/AVS/src/poll.cpp b/plugins/AVS/src/poll.cpp
index 226bb12278..1b02acda79 100644
--- a/plugins/AVS/src/poll.cpp
+++ b/plugins/AVS/src/poll.cpp
@@ -143,7 +143,7 @@ void ProcessAvatarInfo(MCONTACT hContact, int type, PROTO_AVATAR_INFORMATION *pa
db_unset(hContact, "ContactPhoto", "RFile");
if (!db_get_b(hContact, "ContactPhoto", "Locked", 0))
db_unset(hContact, "ContactPhoto", "Backup");
- db_set_ts(hContact, "ContactPhoto", "File", pai->filename);
+ db_set_ws(hContact, "ContactPhoto", "File", pai->filename);
db_set_w(hContact, "ContactPhoto", "Format", pai->format);
if (pai->format == PA_FORMAT_PNG || pai->format == PA_FORMAT_JPEG
diff --git a/plugins/AVS/src/services.cpp b/plugins/AVS/src/services.cpp
index 817c15630e..cb27c8d98e 100644
--- a/plugins/AVS/src/services.cpp
+++ b/plugins/AVS/src/services.cpp
@@ -161,10 +161,10 @@ static INT_PTR avSetAvatar(MCONTACT hContact, wchar_t *tszPath)
// file exists...
wchar_t szBackupName[MAX_PATH];
PathToRelativeT(szFinalName, szBackupName, g_szDataPath);
- db_set_ts(hContact, "ContactPhoto", "Backup", szBackupName);
+ db_set_ws(hContact, "ContactPhoto", "Backup", szBackupName);
db_set_b(hContact, "ContactPhoto", "Locked", is_locked);
- db_set_ts(hContact, "ContactPhoto", "File", szFinalName);
+ db_set_ws(hContact, "ContactPhoto", "File", szFinalName);
MakePathRelative(hContact, szFinalName);
// Fix cache
@@ -214,7 +214,7 @@ static int InternalRemoveMyAvatar(char *protocol)
if (ret == 0) {
// Has global avatar?
DBVARIANT dbv = { 0 };
- if (!db_get_ts(NULL, AVS_MODULE, "GlobalUserAvatarFile", &dbv)) {
+ if (!db_get_ws(NULL, AVS_MODULE, "GlobalUserAvatarFile", &dbv)) {
db_free(&dbv);
db_set_b(NULL, AVS_MODULE, "GlobalUserAvatarNotConsistent", 1);
DeleteGlobalUserAvatar();
@@ -253,7 +253,7 @@ static int InternalRemoveMyAvatar(char *protocol)
return ret;
}
-static void FilterGetStrings(CMString &filter, BOOL xml, BOOL swf)
+static void FilterGetStrings(CMStringW &filter, BOOL xml, BOOL swf)
{
filter.AppendFormat(L"%s (*.bmp;*.jpg;*.gif;*.png", TranslateT("All files"));
if (swf) filter.Append(L";*.swf");
@@ -510,7 +510,7 @@ static int InternalSetMyAvatar(char *protocol, wchar_t *szFinalName, SetMyAvatar
}
else {
// Try to open if is not a flash or XML
- hBmp = (HBITMAP)CallService(MS_IMG_LOAD, (WPARAM)szFinalName, IMGL_TCHAR);
+ hBmp = (HBITMAP)CallService(MS_IMG_LOAD, (WPARAM)szFinalName, IMGL_WCHAR);
if (hBmp == NULL)
return -4;
}
@@ -590,9 +590,9 @@ static int InternalSetMyAvatar(char *protocol, wchar_t *szFinalName, SetMyAvatar
if (saved) {
wchar_t relFile[1024];
if (PathToRelativeT(globalFile, relFile, g_szDataPath))
- db_set_ts(NULL, AVS_MODULE, "GlobalUserAvatarFile", relFile);
+ db_set_ws(NULL, AVS_MODULE, "GlobalUserAvatarFile", relFile);
else
- db_set_ts(NULL, AVS_MODULE, "GlobalUserAvatarFile", globalFile);
+ db_set_ws(NULL, AVS_MODULE, "GlobalUserAvatarFile", globalFile);
db_set_b(NULL, AVS_MODULE, "GlobalUserAvatarNotConsistent", 0);
}
@@ -661,7 +661,7 @@ INT_PTR avSetMyAvatar(char* protocol, wchar_t* tszPath)
if (tszPath == NULL) {
data.protocol = protocol;
- CMString filter;
+ CMStringW filter;
FilterGetStrings(filter, allAcceptXML, allAcceptSWF);
wchar_t inipath[1024];
diff --git a/plugins/AVS/src/utils.cpp b/plugins/AVS/src/utils.cpp
index 4cfc38d67f..7fcbd8435f 100644
--- a/plugins/AVS/src/utils.cpp
+++ b/plugins/AVS/src/utils.cpp
@@ -30,7 +30,7 @@ void mir_sleep(int time)
void MyPathToAbsolute(const wchar_t *ptszPath, wchar_t *ptszDest)
{
- PathToAbsoluteT(VARST(ptszPath), ptszDest, g_szDataPath);
+ PathToAbsoluteW(VARSW(ptszPath), ptszDest, g_szDataPath);
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -44,9 +44,9 @@ void MakePathRelative(MCONTACT hContact, wchar_t *path)
size_t result = PathToRelativeT(path, szFinalPath, g_szDataPath);
if (result && szFinalPath[0] != '\0') {
- db_set_ts(hContact, "ContactPhoto", "RFile", szFinalPath);
+ db_set_ws(hContact, "ContactPhoto", "RFile", szFinalPath);
if (!db_get_b(hContact, "ContactPhoto", "Locked", 0))
- db_set_ts(hContact, "ContactPhoto", "Backup", szFinalPath);
+ db_set_ws(hContact, "ContactPhoto", "Backup", szFinalPath);
}
}
@@ -56,7 +56,7 @@ void MakePathRelative(MCONTACT hContact, wchar_t *path)
void MakePathRelative(MCONTACT hContact)
{
- ptrW tszPath(db_get_tsa(hContact, "ContactPhoto", "File"));
+ ptrW tszPath(db_get_wsa(hContact, "ContactPhoto", "File"));
if (tszPath)
MakePathRelative(hContact, tszPath);
}
@@ -82,20 +82,20 @@ int CreateAvatarInCache(MCONTACT hContact, avatarCacheEntry *ace, char *szProto)
if (proto == NULL || !db_get_b(NULL, AVS_MODULE, proto, 1))
return -1;
- if (db_get_b(hContact, "ContactPhoto", "Locked", 0) && (tszValue = db_get_tsa(hContact, "ContactPhoto", "Backup")))
+ if (db_get_b(hContact, "ContactPhoto", "Locked", 0) && (tszValue = db_get_wsa(hContact, "ContactPhoto", "Backup")))
MyPathToAbsolute(tszValue, tszFilename);
- else if (tszValue = db_get_tsa(hContact, "ContactPhoto", "RFile"))
+ else if (tszValue = db_get_wsa(hContact, "ContactPhoto", "RFile"))
MyPathToAbsolute(tszValue, tszFilename);
- else if (tszValue = db_get_tsa(hContact, "ContactPhoto", "File"))
+ else if (tszValue = db_get_wsa(hContact, "ContactPhoto", "File"))
MyPathToAbsolute(tszValue, tszFilename);
else return -2;
}
else {
if (hContact == 0) { // create a protocol picture in the proto picture cache
- if (tszValue = db_get_tsa(NULL, PPICT_MODULE, szProto))
+ if (tszValue = db_get_wsa(NULL, PPICT_MODULE, szProto))
MyPathToAbsolute(tszValue, tszFilename);
else if (mir_strcmp(szProto, AVS_DEFAULT)) {
- if (tszValue = db_get_tsa(NULL, PPICT_MODULE, AVS_DEFAULT))
+ if (tszValue = db_get_wsa(NULL, PPICT_MODULE, AVS_DEFAULT))
MyPathToAbsolute(tszValue, tszFilename);
if (!strstr(szProto, "Global avatar for")) {
@@ -104,7 +104,7 @@ int CreateAvatarInCache(MCONTACT hContact, avatarCacheEntry *ace, char *szProto)
return -1;
char key[MAX_PATH];
mir_snprintf(key, "Global avatar for %s accounts", pdescr->szProtoName);
- if (tszValue = db_get_tsa(NULL, PPICT_MODULE, key))
+ if (tszValue = db_get_wsa(NULL, PPICT_MODULE, key))
MyPathToAbsolute(tszValue, tszFilename);
}
}
@@ -114,7 +114,7 @@ int CreateAvatarInCache(MCONTACT hContact, avatarCacheEntry *ace, char *szProto)
// startup and everytime they are changed.
if (szProto[0] == '\0') {
// Global avatar
- if (tszValue = db_get_tsa(NULL, AVS_MODULE, "GlobalUserAvatarFile"))
+ if (tszValue = db_get_wsa(NULL, AVS_MODULE, "GlobalUserAvatarFile"))
MyPathToAbsolute(tszValue, tszFilename);
else
return -10;
@@ -130,7 +130,7 @@ int CreateAvatarInCache(MCONTACT hContact, avatarCacheEntry *ace, char *szProto)
else
MultiByteToWideChar(CP_ACP, 0, szFileName, -1, tszFilename, _countof(tszFilename));
}
- else if (tszValue = db_get_tsa(NULL, szProto, "AvatarFile"))
+ else if (tszValue = db_get_wsa(NULL, szProto, "AvatarFile"))
MyPathToAbsolute(tszValue, tszFilename);
else return -1;
}
@@ -139,7 +139,7 @@ int CreateAvatarInCache(MCONTACT hContact, avatarCacheEntry *ace, char *szProto)
if (mir_wstrlen(tszFilename) < 4)
return -1;
- wcsncpy_s(tszFilename, VARST(tszFilename), _TRUNCATE);
+ wcsncpy_s(tszFilename, VARSW(tszFilename), _TRUNCATE);
if (_waccess(tszFilename, 4) == -1)
return -2;
@@ -432,7 +432,7 @@ int ChangeAvatar(MCONTACT hContact, bool fLoad, bool fNotifyHist, int pa_format)
void DeleteGlobalUserAvatar()
{
DBVARIANT dbv = { 0 };
- if (db_get_ts(NULL, AVS_MODULE, "GlobalUserAvatarFile", &dbv))
+ if (db_get_ws(NULL, AVS_MODULE, "GlobalUserAvatarFile", &dbv))
return;
wchar_t szFilename[MAX_PATH];
diff --git a/plugins/AddContactPlus/src/addcontact.cpp b/plugins/AddContactPlus/src/addcontact.cpp
index 84b1ae5768..4af8e5ca10 100644
--- a/plugins/AddContactPlus/src/addcontact.cpp
+++ b/plugins/AddContactPlus/src/addcontact.cpp
@@ -263,7 +263,7 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM)
psr->cbSize = sizeof(PROTOSEARCHRESULT);
}
- psr->flags = PSR_TCHAR;
+ psr->flags = PSR_UNICODE;
psr->id.w = mir_wstrdup(szUserId);
acs->psr = psr;
@@ -277,7 +277,7 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM)
wchar_t szHandle[256];
if (GetDlgItemText(hdlg, IDC_MYHANDLE, szHandle, _countof(szHandle)))
- db_set_ts(hContact, "CList", "MyHandle", szHandle);
+ db_set_ws(hContact, "CList", "MyHandle", szHandle);
int item = SendDlgItemMessage(hdlg, IDC_GROUP, CB_GETCURSEL, 0, 0);
if (item > 0) {
diff --git a/plugins/AddContactPlus/src/main.cpp b/plugins/AddContactPlus/src/main.cpp
index 2e9191ba85..1fb4cc51bf 100644
--- a/plugins/AddContactPlus/src/main.cpp
+++ b/plugins/AddContactPlus/src/main.cpp
@@ -95,7 +95,7 @@ static int OnAccListChanged(WPARAM, LPARAM)
CMenuItem mi;
SET_UID(mi, 0xb19db907, 0x870e, 0x49fa, 0xa7, 0x1e, 0x43, 0x5e, 0xa8, 0xe5, 0x9b, 0xbd);
mi.position = 500020001;
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
mi.hIcolibItem = icon.hIcolib;
mi.name.w = LPGENW("&Add contact...");
mi.pszService = MS_ADDCONTACTPLUS_SHOW;
@@ -127,10 +127,10 @@ static int CreateButton(WPARAM, LPARAM)
static int OnModulesLoaded(WPARAM, LPARAM)
{
HOTKEYDESC hkd = { sizeof(hkd) };
- hkd.dwFlags = HKD_TCHAR;
+ hkd.dwFlags = HKD_UNICODE;
hkd.pszName = "AddContactPlus_OpenDialog";
- hkd.ptszDescription = LPGENW("Open add contact dialog");
- hkd.ptszSection = LPGENW("Main");
+ hkd.pwszDescription = LPGENW("Open add contact dialog");
+ hkd.pwszSection = LPGENW("Main");
hkd.pszService = MS_ADDCONTACTPLUS_SHOW;
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL | HOTKEYF_SHIFT, 'C') | HKF_MIRANDA_LOCAL;
Hotkey_Register(&hkd);
diff --git a/plugins/Alarms/src/alarm_win.cpp b/plugins/Alarms/src/alarm_win.cpp
index 4052bc7f79..5dfe6730cb 100644
--- a/plugins/Alarms/src/alarm_win.cpp
+++ b/plugins/Alarms/src/alarm_win.cpp
@@ -6,8 +6,8 @@
#define SPEACH_REPEAT_PERIOD 15000 // milliseconds
MWindowList hAlarmWindowList = 0;
-FontIDT title_font_id, window_font_id;
-ColourIDT bk_colour_id;
+FontIDW title_font_id, window_font_id;
+ColourIDW bk_colour_id;
HFONT hTitleFont = 0, hWindowFont = 0;
COLORREF title_font_colour, window_font_colour;
HBRUSH hBackgroundBrush = 0;
@@ -331,15 +331,15 @@ INT_PTR CALLBACK DlgProcAlarm(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar
int ReloadFonts(WPARAM, LPARAM)
{
LOGFONT log_font;
- title_font_colour = CallService(MS_FONT_GETT, (WPARAM)&title_font_id, (LPARAM)&log_font);
+ title_font_colour = CallService(MS_FONT_GETW, (WPARAM)&title_font_id, (LPARAM)&log_font);
DeleteObject(hTitleFont);
hTitleFont = CreateFontIndirect(&log_font);
- window_font_colour = CallService(MS_FONT_GETT, (WPARAM)&window_font_id, (LPARAM)&log_font);
+ window_font_colour = CallService(MS_FONT_GETW, (WPARAM)&window_font_id, (LPARAM)&log_font);
DeleteObject(hWindowFont);
hWindowFont = CreateFontIndirect(&log_font);
- COLORREF bkCol = CallService(MS_COLOUR_GETT, (WPARAM)&bk_colour_id, 0);
+ COLORREF bkCol = CallService(MS_COLOUR_GETW, (WPARAM)&bk_colour_id, 0);
DeleteObject(hBackgroundBrush);
hBackgroundBrush = CreateSolidBrush(bkCol);
@@ -349,7 +349,7 @@ int ReloadFonts(WPARAM, LPARAM)
int AlarmWinModulesLoaded(WPARAM, LPARAM)
{
- title_font_id.cbSize = sizeof(FontIDT);
+ title_font_id.cbSize = sizeof(FontIDW);
mir_wstrcpy(title_font_id.group, LPGENW("Alarms"));
mir_wstrcpy(title_font_id.name, LPGENW("Title"));
mir_strcpy(title_font_id.dbSettingsGroup, MODULE);
@@ -358,9 +358,9 @@ int AlarmWinModulesLoaded(WPARAM, LPARAM)
mir_wstrcpy(title_font_id.backgroundName, LPGENW("Background"));
title_font_id.flags = 0;
title_font_id.order = 0;
- FontRegisterT(&title_font_id);
+ FontRegisterW(&title_font_id);
- window_font_id.cbSize = sizeof(FontIDT);
+ window_font_id.cbSize = sizeof(FontIDW);
mir_wstrcpy(window_font_id.group, LPGENW("Alarms"));
mir_wstrcpy(window_font_id.name, LPGENW("Window"));
mir_strcpy(window_font_id.dbSettingsGroup, MODULE);
@@ -369,9 +369,9 @@ int AlarmWinModulesLoaded(WPARAM, LPARAM)
mir_wstrcpy(window_font_id.backgroundName, LPGENW("Background"));
window_font_id.flags = 0;
window_font_id.order = 1;
- FontRegisterT(&window_font_id);
+ FontRegisterW(&window_font_id);
- bk_colour_id.cbSize = sizeof(ColourIDT);
+ bk_colour_id.cbSize = sizeof(ColourIDW);
mir_strcpy(bk_colour_id.dbSettingsGroup, MODULE);
mir_wstrcpy(bk_colour_id.group, LPGENW("Alarms"));
mir_wstrcpy(bk_colour_id.name, LPGENW("Background"));
@@ -380,7 +380,7 @@ int AlarmWinModulesLoaded(WPARAM, LPARAM)
bk_colour_id.flags = 0;
bk_colour_id.order = 0;
- ColourRegisterT(&bk_colour_id);
+ ColourRegisterW(&bk_colour_id);
ReloadFonts(0, 0);
HookEvent(ME_FONT_RELOAD, ReloadFonts);
diff --git a/plugins/Alarms/src/alarmlist.cpp b/plugins/Alarms/src/alarmlist.cpp
index e108e04132..cc41317231 100644
--- a/plugins/Alarms/src/alarmlist.cpp
+++ b/plugins/Alarms/src/alarmlist.cpp
@@ -190,12 +190,12 @@ void LoadAlarms() {
memset(&alarm, 0, sizeof(ALARM));
mir_snprintf(buff, "Title%d", i);
- if (!db_get_ts(0, MODULE, buff, &dbv)) {
+ if (!db_get_ws(0, MODULE, buff, &dbv)) {
alarm.szTitle = mir_wstrdup(dbv.ptszVal);
db_free(&dbv);
}
mir_snprintf(buff, "Desc%d", i);
- if (!db_get_ts(0, MODULE, buff, &dbv)) {
+ if (!db_get_ws(0, MODULE, buff, &dbv)) {
alarm.szDesc = mir_wstrdup(dbv.ptszVal);
db_free(&dbv);
}
@@ -244,11 +244,11 @@ void LoadAlarms() {
alarm.action = (unsigned short)db_get_dw(0, MODULE, buff, AAF_POPUP | AAF_SOUND);
if (alarm.action & AAF_COMMAND) {
mir_snprintf(buff, "ActionCommand%d", i);
- if (!db_get_ts(0, MODULE, buff, &dbv)) {
+ if (!db_get_ws(0, MODULE, buff, &dbv)) {
alarm.szCommand = mir_wstrdup(dbv.ptszVal);
db_free(&dbv);
mir_snprintf(buff, "ActionParams%d", i);
- if (!db_get_ts(0, MODULE, buff, &dbv)) {
+ if (!db_get_ws(0, MODULE, buff, &dbv)) {
alarm.szCommandParams = mir_wstrdup(dbv.ptszVal);
db_free(&dbv);
}
@@ -289,9 +289,9 @@ void SaveAlarms() {
ALARM *i;
for(alarms.reset(); i = alarms.current(); alarms.next(), index++) {
mir_snprintf(buff, "Title%d", index);
- db_set_ts(0, MODULE, buff, i->szTitle);
+ db_set_ws(0, MODULE, buff, i->szTitle);
mir_snprintf(buff, "Desc%d", index);
- db_set_ts(0, MODULE, buff, i->szDesc);
+ db_set_ws(0, MODULE, buff, i->szDesc);
mir_snprintf(buff, "Occ%d", index);
db_set_w(0, MODULE, buff, i->occurrence);
@@ -328,10 +328,10 @@ void SaveAlarms() {
if (i->action & AAF_COMMAND) {
if (mir_wstrlen(i->szCommand)) {
mir_snprintf(buff, "ActionCommand%d", index);
- db_set_ts(0, MODULE, buff, i->szCommand);
+ db_set_ws(0, MODULE, buff, i->szCommand);
if (mir_wstrlen(i->szCommandParams)) {
mir_snprintf(buff, "ActionParams%d", index);
- db_set_ts(0, MODULE, buff, i->szCommandParams);
+ db_set_ws(0, MODULE, buff, i->szCommandParams);
}
}
}
diff --git a/plugins/Alarms/src/frame.cpp b/plugins/Alarms/src/frame.cpp
index 7ad231858c..9fd38fb638 100644
--- a/plugins/Alarms/src/frame.cpp
+++ b/plugins/Alarms/src/frame.cpp
@@ -508,7 +508,7 @@ int CreateFrame()
Frame.tname = TranslateT("Alarms");
Frame.hWnd = hwnd_plugin;
Frame.align = alBottom;
- Frame.Flags = F_TCHAR | F_VISIBLE | F_SHOWTB | F_SHOWTBTIP;
+ Frame.Flags = F_UNICODE | F_VISIBLE | F_SHOWTB | F_SHOWTBTIP;
Frame.height = 30;
Frame.hIcon = hIconMenuSet;
frame_id = CallService(MS_CLIST_FRAMES_ADDFRAME,(WPARAM)&Frame,0);
diff --git a/plugins/AssocMgr/src/assoclist.cpp b/plugins/AssocMgr/src/assoclist.cpp
index 7305022b0b..d50b40b464 100644
--- a/plugins/AssocMgr/src/assoclist.cpp
+++ b/plugins/AssocMgr/src/assoclist.cpp
@@ -66,7 +66,7 @@ static void SetAssocEnabled(const ASSOCDATA *assoc, BOOL fEnabled)
if (GetModuleFileName(assoc->hInstance, szBuf, _countof(szBuf)))
if (PathToRelativeT(szBuf, szDLL)) {
mir_snprintf(szSetting, "module_%s", assoc->pszClassName);
- db_set_ts(NULL, "AssocMgr", szSetting, szDLL);
+ db_set_ws(NULL, "AssocMgr", szSetting, szDLL);
}
}
@@ -96,8 +96,8 @@ void CleanupAssocEnabledSettings(void)
for (i = 0; i < nSettingsCount; ++i) {
pszSuffix = &ppszSettings[i][8];
mir_snprintf(szSetting, "module_%s", pszSuffix);
- if (!db_get_ts(NULL, "AssocMgr", szSetting, &dbv)) {
- if (PathToAbsoluteT(dbv.ptszVal, szDLL)) {
+ if (!db_get_ws(NULL, "AssocMgr", szSetting, &dbv)) {
+ if (PathToAbsoluteW(dbv.ptszVal, szDLL)) {
// file still exists?
hFile = CreateFile(szDLL, 0, FILE_SHARE_READ, 0, OPEN_EXISTING, 0, 0);
if (hFile == INVALID_HANDLE_VALUE) {
@@ -980,7 +980,7 @@ void InitAssocList(void)
ftd.cbSize = sizeof(FILETYPEDESC);
ftd.pszFileExt = ".dat";
ftd.pszMimeType = NULL;
- ftd.ptszDescription = TranslateT("Miranda NG database");
+ ftd.pwszDescription = TranslateT("Miranda NG database");
ftd.hInstance = hInst;
ftd.nIconResID = IDI_MIRANDAFILE;
ftd.ptszVerbDesc = NULL;
diff --git a/plugins/AssocMgr/src/reg.cpp b/plugins/AssocMgr/src/reg.cpp
index 842ce654a3..84d1705f63 100644
--- a/plugins/AssocMgr/src/reg.cpp
+++ b/plugins/AssocMgr/src/reg.cpp
@@ -127,7 +127,7 @@ wchar_t *MakeRunCommand(BOOL fMirExe,BOOL fFixedDbProfile)
{
wchar_t szDbFile[MAX_PATH], szExe[MAX_PATH], *pszFmt;
if (fFixedDbProfile) {
- if ( CallService(MS_DB_GETPROFILENAMET, _countof(szDbFile), (LPARAM)szDbFile))
+ if ( CallService(MS_DB_GETPROFILENAMEW, _countof(szDbFile), (LPARAM)szDbFile))
return NULL;
wchar_t *p = wcsrchr(szDbFile, '.');
if (p)
diff --git a/plugins/AssocMgr/src/test.cpp b/plugins/AssocMgr/src/test.cpp
index f0d60e6276..2722545302 100644
--- a/plugins/AssocMgr/src/test.cpp
+++ b/plugins/AssocMgr/src/test.cpp
@@ -42,7 +42,7 @@ __inline static int AssocMgr_AddNewFileTypeT(const char *ext, const char *mime,
ftd.cbSize = sizeof(FILETYPEDESC);
ftd.pszFileExt = ext;
ftd.pszMimeType = mime;
- ftd.ptszDescription = desc;
+ ftd.pwszDescription = desc;
ftd.hInstance = hinst;
ftd.nIconResID = iconid;
ftd.ptszVerbDesc = verb;
diff --git a/plugins/AuthState/src/main.cpp b/plugins/AuthState/src/main.cpp
index e5eef4db77..9d971a72c7 100644
--- a/plugins/AuthState/src/main.cpp
+++ b/plugins/AuthState/src/main.cpp
@@ -180,7 +180,7 @@ extern "C" int __declspec(dllexport) Load(void)
CMenuItem mi;
SET_UID(mi, 0xc5a784ea, 0x8b07, 0x4b95, 0xa2, 0xb2, 0x84, 0x9d, 0x87, 0x43, 0x7e, 0xda);
mi.position = -1999901005;
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
mi.name.w = LPGENW("Enable AuthState icons");
mi.pszService = "AuthState/MenuItem";
hUserMenu = Menu_AddContactMenuItem(&mi);
diff --git a/plugins/AutoRun/src/main.cpp b/plugins/AutoRun/src/main.cpp
index eddc483179..0ec952d756 100644
--- a/plugins/AutoRun/src/main.cpp
+++ b/plugins/AutoRun/src/main.cpp
@@ -27,7 +27,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD, LPVOID)
void GetProfilePath(wchar_t *res, size_t resLen)
{
wchar_t dbname[MAX_PATH], exename[MAX_PATH];
- CallService(MS_DB_GETPROFILENAMET, _countof(dbname), (LPARAM)dbname);
+ CallService(MS_DB_GETPROFILENAMEW, _countof(dbname), (LPARAM)dbname);
GetModuleFileName(NULL, exename, _countof(exename));
wchar_t *p = wcsrchr(dbname, '.');
diff --git a/plugins/AutoShutdown/src/options.cpp b/plugins/AutoShutdown/src/options.cpp
index 358f3e04af..267959c1d6 100644
--- a/plugins/AutoShutdown/src/options.cpp
+++ b/plugins/AutoShutdown/src/options.cpp
@@ -113,7 +113,7 @@ static int ShutdownOptInit(WPARAM wParam, LPARAM)
odp.pwszGroup = LPGENW("Events"); /* autotranslated */
odp.pwszTitle = LPGENW("Automatic shutdown"); /* autotranslated */
odp.pwszTab = LPGENW("Automatic shutdown"); /* autotranslated, can be made a tab */
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
odp.pfnDlgProc = ShutdownOptDlgProc;
Options_AddPage(wParam, &odp);
return 0;
diff --git a/plugins/AutoShutdown/src/settingsdlg.cpp b/plugins/AutoShutdown/src/settingsdlg.cpp
index 0488ef6a65..ce4504eb4d 100644
--- a/plugins/AutoShutdown/src/settingsdlg.cpp
+++ b/plugins/AutoShutdown/src/settingsdlg.cpp
@@ -121,7 +121,7 @@ static INT_PTR CALLBACK SettingsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L
SendMessage(hwndCombo, CB_SETLOCALE, (WPARAM)locale, 0); /* sort order */
SendMessage(hwndCombo, CB_INITSTORAGE, _countof(unitNames), _countof(unitNames) * 16); /* approx. */
for (int i = 0; i < _countof(unitNames); ++i) {
- int index = SendMessage(hwndCombo, CB_ADDSTRING, 0, (LPARAM)TranslateTS(unitNames[i]));
+ int index = SendMessage(hwndCombo, CB_ADDSTRING, 0, (LPARAM)TranslateW(unitNames[i]));
if (index != LB_ERR) {
SendMessage(hwndCombo, CB_SETITEMDATA, index, (LPARAM)unitValues[i]);
if (i == 0 || unitValues[i] == lastUnit) SendMessage(hwndCombo, CB_SETCURSEL, index, 0);
@@ -130,7 +130,7 @@ static INT_PTR CALLBACK SettingsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L
}
{
DBVARIANT dbv;
- if (!db_get_ts(NULL, "AutoShutdown", "Message", &dbv)) {
+ if (!db_get_ws(NULL, "AutoShutdown", "Message", &dbv)) {
SetDlgItemText(hwndDlg, IDC_EDIT_MESSAGE, dbv.ptszVal);
mir_free(dbv.ptszVal);
}
@@ -355,7 +355,7 @@ static INT_PTR CALLBACK SettingsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L
wchar_t *pszText = (wchar_t*)mir_alloc(len*sizeof(wchar_t));
if (pszText != NULL && GetWindowText(hwndEdit, pszText, len + 1)) {
TrimString(pszText);
- db_set_ts(NULL, "AutoShutdown", "Message", pszText);
+ db_set_ws(NULL, "AutoShutdown", "Message", pszText);
}
mir_free(pszText); /* does NULL check */
}
@@ -460,7 +460,7 @@ void SetShutdownMenuItem(bool fActive)
mi.name.w = LPGENW("Automatic &shutdown...");
}
mi.pszService = "AutoShutdown/MenuCommand";
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
if (hMainMenuItem != NULL)
Menu_ModifyItem(hMainMenuItem, mi.name.w, mi.hIcolibItem);
else
diff --git a/plugins/AutoShutdown/src/shutdownsvc.cpp b/plugins/AutoShutdown/src/shutdownsvc.cpp
index e8ba15d8a0..d21934975e 100644
--- a/plugins/AutoShutdown/src/shutdownsvc.cpp
+++ b/plugins/AutoShutdown/src/shutdownsvc.cpp
@@ -384,7 +384,7 @@ static INT_PTR CALLBACK ShutdownDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L
case M_UPDATE_COUNTDOWN: /* lParam=(WORD)countdown */
{
wchar_t szText[256];
- mir_snwprintf(szText, TranslateTS(desc[shutdownType - 1]), lParam);
+ mir_snwprintf(szText, TranslateW(desc[shutdownType - 1]), lParam);
SetDlgItemText(hwndDlg, IDC_TEXT_HEADER, szText);
/* countdown finished */
if (!lParam)
@@ -477,7 +477,7 @@ INT_PTR ServiceGetTypeDescription(WPARAM wParam, LPARAM lParam)
if (!wParam || (BYTE)wParam > SDSDT_MAX) return 0;
/* select description */
wchar_t *pszDesc = (wchar_t*)((lParam&GSTDF_LONGDESC) ? apszLong : apszShort)[wParam - 1];
- if (!(lParam&GSTDF_UNTRANSLATED)) pszDesc = TranslateTS(pszDesc);
+ if (!(lParam&GSTDF_UNTRANSLATED)) pszDesc = TranslateW(pszDesc);
/* convert as needed */
if (!(lParam&GSTDF_UNICODE)) {
static char szConvBuf[128];
@@ -496,7 +496,7 @@ void InitShutdownSvc(void)
{
/* Shutdown Dialog */
hwndShutdownDlg = NULL;
- SkinAddNewSoundExT("AutoShutdown_Countdown", LPGENW("Alerts"), LPGENW("Automatic shutdown countdown"));
+ SkinAddNewSoundExW("AutoShutdown_Countdown", LPGENW("Alerts"), LPGENW("Automatic shutdown countdown"));
/* Events */
hEventOkToShutdown = CreateHookableEvent(ME_AUTOSHUTDOWN_OKTOSHUTDOWN);
diff --git a/plugins/AutoShutdown/src/utils.cpp b/plugins/AutoShutdown/src/utils.cpp
index c6724ab982..d071125a2c 100644
--- a/plugins/AutoShutdown/src/utils.cpp
+++ b/plugins/AutoShutdown/src/utils.cpp
@@ -210,10 +210,10 @@ void AddHotkey()
{
HOTKEYDESC hkd = { 0 };
hkd.cbSize = sizeof(hkd);
- hkd.dwFlags = HKD_TCHAR;
+ hkd.dwFlags = HKD_UNICODE;
hkd.pszName = "AutoShutdown_Toggle";
- hkd.ptszDescription = LPGENW("Toggle automatic shutdown");
- hkd.ptszSection = LPGENW("Main");
+ hkd.pwszDescription = LPGENW("Toggle automatic shutdown");
+ hkd.pwszSection = LPGENW("Main");
hkd.pszService = "AutoShutdown/MenuCommand";
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL | HOTKEYF_SHIFT, 'T') | HKF_MIRANDA_LOCAL;
hkd.lParam = FALSE;
diff --git a/plugins/AutoShutdown/src/watcher.cpp b/plugins/AutoShutdown/src/watcher.cpp
index 65a69c73f9..8a7301518b 100644
--- a/plugins/AutoShutdown/src/watcher.cpp
+++ b/plugins/AutoShutdown/src/watcher.cpp
@@ -100,7 +100,7 @@ static int MsgEventAdded(WPARAM, LPARAM hDbEvent)
if (!db_event_get(hDbEvent, &dbe))
if (dbe.eventType == EVENTTYPE_MESSAGE && !(dbe.flags & DBEF_SENT)) {
DBVARIANT dbv;
- if (!db_get_ts(NULL, "AutoShutdown", "Message", &dbv)) {
+ if (!db_get_ws(NULL, "AutoShutdown", "Message", &dbv)) {
TrimString(dbv.ptszVal);
wchar_t *pszMsg = GetMessageText(&dbe.pBlob, &dbe.cbBlob);
if (pszMsg != NULL && wcsstr(pszMsg, dbv.ptszVal) != NULL)
diff --git a/plugins/AvatarHistory/src/AvatarDlg.cpp b/plugins/AvatarHistory/src/AvatarDlg.cpp
index ebd5c219a7..c645d9f9fc 100644
--- a/plugins/AvatarHistory/src/AvatarDlg.cpp
+++ b/plugins/AvatarHistory/src/AvatarDlg.cpp
@@ -441,7 +441,7 @@ int FillAvatarListFromDB(HWND list, MCONTACT hContact)
// Get file in disk
wchar_t path[MAX_PATH];
ptrW tszStoredPath(mir_utf8decodeW((char*)dbei.pBlob));
- PathToAbsoluteT(tszStoredPath, path);
+ PathToAbsoluteW(tszStoredPath, path);
// Add to list
ListEntry *le = new ListEntry();
@@ -478,7 +478,7 @@ bool UpdateAvatarPic(HWND hwnd)
}
SetDlgItemText(hwnd,IDC_AVATARPATH,le->filename);
- HBITMAP avpic = (HBITMAP) CallService(MS_IMG_LOAD, (WPARAM)le->filename, IMGL_TCHAR);
+ HBITMAP avpic = (HBITMAP) CallService(MS_IMG_LOAD, (WPARAM)le->filename, IMGL_WCHAR);
bool found_image = (avpic != NULL);
@@ -515,7 +515,7 @@ void InitMenuItem()
CMenuItem mi;
SET_UID(mi,0x2fb5c7eb, 0xa606, 0x4145, 0x9e, 0x86, 0x73, 0x88, 0x73, 0x1d, 0xe7, 0x5c);
mi.name.w = LPGENW("View Avatar History");
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
mi.position = 1000090010;
mi.hIcolibItem = createDefaultOverlayedIcon(FALSE);
mi.pszService = MS_AVATARHISTORY_SHOWDIALOG;
@@ -562,7 +562,7 @@ int ShowSaveDialog(HWND hwnd, wchar_t* fn, MCONTACT hContact)
ofn.lpstrDefExt = wcsrchr(fn, '.')+1;
DBVARIANT dbvInitDir = {0};
- if (!db_get_ts(hContact,MODULE_NAME,"SavedAvatarFolder",&dbvInitDir))
+ if (!db_get_ws(hContact,MODULE_NAME,"SavedAvatarFolder",&dbvInitDir))
{
ofn.lpstrInitialDir = dbvInitDir.ptszVal;
db_free(&dbvInitDir);
@@ -574,7 +574,7 @@ int ShowSaveDialog(HWND hwnd, wchar_t* fn, MCONTACT hContact)
if (GetSaveFileName(&ofn))
{
CopyFile(fn, file, FALSE);
- db_set_ts(hContact,MODULE_NAME,"SavedAvatarFolder",file);
+ db_set_ws(hContact,MODULE_NAME,"SavedAvatarFolder",file);
}
return 0;
}
diff --git a/plugins/AvatarHistory/src/AvatarHistory.cpp b/plugins/AvatarHistory/src/AvatarHistory.cpp
index a678580bcc..d6bb00dc21 100644
--- a/plugins/AvatarHistory/src/AvatarHistory.cpp
+++ b/plugins/AvatarHistory/src/AvatarHistory.cpp
@@ -116,7 +116,7 @@ static int AvatarChanged(WPARAM hContact, LPARAM lParam)
return 0;
DBVARIANT dbvOldHash = {0};
- bool ret = (db_get_ts(hContact,MODULE_NAME,"AvatarHash",&dbvOldHash) == 0);
+ bool ret = (db_get_ws(hContact,MODULE_NAME,"AvatarHash",&dbvOldHash) == 0);
CONTACTAVATARCHANGEDNOTIFICATION* avatar = (CONTACTAVATARCHANGEDNOTIFICATION*)lParam;
if (avatar == NULL) {
@@ -130,7 +130,7 @@ static int AvatarChanged(WPARAM hContact, LPARAM lParam)
SkinPlaySound("avatar_removed");
// Is a flash avatar or avs could not load it
- db_set_ts(hContact, MODULE_NAME, "AvatarHash", L"-");
+ db_set_ws(hContact, MODULE_NAME, "AvatarHash", L"-");
if (ContactEnabled(hContact, "AvatarPopups", AVH_DEF_AVPOPUPS) && opts.popup_show_removed)
ShowPopup(hContact, NULL, opts.popup_removed);
@@ -143,7 +143,7 @@ static int AvatarChanged(WPARAM hContact, LPARAM lParam)
return 0;
}
SkinPlaySound("avatar_changed");
- db_set_ts(hContact, "AvatarHistory", "AvatarHash", avatar->hash);
+ db_set_ws(hContact, "AvatarHistory", "AvatarHash", avatar->hash);
wchar_t history_filename[MAX_PATH] = L"";
@@ -343,11 +343,11 @@ extern "C" __declspec(dllexport) int Load(void)
CreateServiceFunction(MS_AVATARHISTORY_ENABLED, IsEnabled);
CreateServiceFunction(MS_AVATARHISTORY_GET_CACHED_AVATAR, GetCachedAvatar);
- if (CallService(MS_DB_GETPROFILEPATHT, MAX_PATH, (LPARAM)profilePath) != 0)
+ if (CallService(MS_DB_GETPROFILEPATHW, MAX_PATH, (LPARAM)profilePath) != 0)
mir_wstrcpy(profilePath, L"."); // Failed, use current dir
- SkinAddNewSoundExT("avatar_changed",LPGENW("Avatar History"),LPGENW("Contact changed avatar"));
- SkinAddNewSoundExT("avatar_removed",LPGENW("Avatar History"),LPGENW("Contact removed avatar"));
+ SkinAddNewSoundExW("avatar_changed",LPGENW("Avatar History"),LPGENW("Contact changed avatar"));
+ SkinAddNewSoundExW("avatar_removed",LPGENW("Avatar History"),LPGENW("Contact removed avatar"));
hAvatarWindowsList = WindowList_Create();
diff --git a/plugins/AvatarHistory/src/options.cpp b/plugins/AvatarHistory/src/options.cpp
index 976c9174cd..63e4680071 100644
--- a/plugins/AvatarHistory/src/options.cpp
+++ b/plugins/AvatarHistory/src/options.cpp
@@ -152,7 +152,7 @@ int OptInit(WPARAM wParam, LPARAM)
odp.pwszTitle = LPGENW("Avatar"); // name of the item
odp.pfnDlgProc = OptionsDlgProc;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS);
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
Options_AddPage(wParam, &odp);
if (ServiceExists(MS_POPUP_ADDPOPUPT)) {
@@ -160,7 +160,7 @@ int OptInit(WPARAM wParam, LPARAM)
odp.pwszTitle = LPGENW("Avatar Change");
odp.pfnDlgProc = PopupsDlgProc;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_POPUPS);
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
Options_AddPage(wParam, &odp);
}
return 0;
diff --git a/plugins/AvatarHistory/src/utils.cpp b/plugins/AvatarHistory/src/utils.cpp
index e3c7bbe109..2a97cf3d2f 100644
--- a/plugins/AvatarHistory/src/utils.cpp
+++ b/plugins/AvatarHistory/src/utils.cpp
@@ -93,7 +93,7 @@ wchar_t* GetHistoryFolder(wchar_t *fn)
{
if (fn == NULL) return NULL;
FoldersGetCustomPathT(hFolder, fn, MAX_PATH, basedir);
- CreateDirectoryTreeT(fn);
+ CreateDirectoryTreeW(fn);
return fn;
}
@@ -105,7 +105,7 @@ wchar_t* GetProtocolFolder(wchar_t *fn, char *proto)
proto = Translate("Unknown Protocol");
mir_snwprintf(fn, MAX_PATH, L"%s\\%S", fn, proto);
- CreateDirectoryTreeT(fn);
+ CreateDirectoryTreeW(fn);
return fn;
}
@@ -119,7 +119,7 @@ wchar_t* GetContactFolder(wchar_t *fn, MCONTACT hContact)
wcsncpy_s(uin, (id == NULL) ? TranslateT("Unknown UIN") : id, _TRUNCATE);
ConvertToFilename(uin, MAX_PATH); //added so that weather id's like "yw/CI0000" work
mir_snwprintf(fn, MAX_PATH, L"%s\\%s", fn, uin);
- CreateDirectoryTreeT(fn);
+ CreateDirectoryTreeW(fn);
#ifdef DBGPOPUPS
wchar_t log[1024];
diff --git a/plugins/BASS_interface/src/Main.cpp b/plugins/BASS_interface/src/Main.cpp
index b8d688bb1c..8d3fbac9dd 100644
--- a/plugins/BASS_interface/src/Main.cpp
+++ b/plugins/BASS_interface/src/Main.cpp
@@ -198,7 +198,7 @@ INT_PTR CALLBACK OptionsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara
SendDlgItemMessage(hwndDlg, IDC_OUTDEVICE, CB_SETCURSEL, 0, 0);
BASS_DEVICEINFO info;
- ptrW tszDeviceName(db_get_tsa(NULL, ModuleName, OPT_OUTDEVICE));
+ ptrW tszDeviceName(db_get_wsa(NULL, ModuleName, OPT_OUTDEVICE));
for (int i = 1; BASS_GetDeviceInfo(i + newBass, &info); i++) {
SendDlgItemMessage(hwndDlg, IDC_OUTDEVICE, CB_ADDSTRING, 0, _A2T(info.name));
if (!mir_wstrcmp(tszDeviceName, _A2T(info.name)))
@@ -227,7 +227,7 @@ INT_PTR CALLBACK OptionsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara
SYSTEMTIME systime = { 0 };
GetDlgItemText(hwndDlg, IDC_OUTDEVICE, tmp, _countof(tmp));
- db_set_ts(NULL, ModuleName, OPT_OUTDEVICE, tmp);
+ db_set_ws(NULL, ModuleName, OPT_OUTDEVICE, tmp);
Volume = (DWORD)SendDlgItemMessage(hwndDlg, IDC_VOLUME, TBM_GETPOS, 0, 0);
db_set_b(NULL, ModuleName, OPT_VOLUME, Volume);
@@ -424,11 +424,11 @@ static LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR
int ReloadColors(WPARAM, LPARAM)
{
- ColourIDT colourid = { 0 };
+ ColourIDW colourid = { 0 };
colourid.cbSize = sizeof(colourid);
mir_wstrcpy(colourid.group, _A2W(ModuleName));
mir_wstrcpy(colourid.name, LPGENW("Frame background"));
- clBack = CallService(MS_COLOUR_GETT, (WPARAM)&colourid, 0);
+ clBack = CallService(MS_COLOUR_GETW, (WPARAM)&colourid, 0);
if (hBkgBrush)
DeleteObject(hBkgBrush);
@@ -460,13 +460,13 @@ void CreateFrame()
Frame.tname = TranslateT("Bass Interface");
Frame.hWnd = hwnd_plugin;
Frame.align = alBottom;
- Frame.Flags = F_TCHAR | F_VISIBLE | F_SHOWTB | F_SHOWTBTIP;
+ Frame.Flags = F_UNICODE | F_VISIBLE | F_SHOWTB | F_SHOWTBTIP;
Frame.height = 22;
Frame.hIcon = Skin_LoadIcon(SKINICON_OTHER_FRAME);
frame_id = (HANDLE)CallService(MS_CLIST_FRAMES_ADDFRAME, (WPARAM)&Frame, 0);
- ColourIDT colourid = { 0 };
- colourid.cbSize = sizeof(ColourIDT);
+ ColourIDW colourid = { 0 };
+ colourid.cbSize = sizeof(ColourIDW);
strcpy_s(colourid.dbSettingsGroup, ModuleName);
strcpy_s(colourid.setting, "ColorFrame");
@@ -474,7 +474,7 @@ void CreateFrame()
wcscpy_s(colourid.group, _A2W(ModuleName));
colourid.defcolour = GetSysColor(COLOR_3DFACE);
- ColourRegisterT(&colourid);
+ ColourRegisterW(&colourid);
HookEvent(ME_COLOUR_RELOAD, ReloadColors);
ReloadColors(0, 0);
@@ -499,7 +499,7 @@ void LoadBassLibrary(const wchar_t *ptszPath)
DBVARIANT dbv = { 0 };
BASS_DEVICEINFO info;
- if (!db_get_ts(NULL, ModuleName, OPT_OUTDEVICE, &dbv))
+ if (!db_get_ws(NULL, ModuleName, OPT_OUTDEVICE, &dbv))
for (size_t i = 1; BASS_GetDeviceInfo((DWORD)i, &info); i++)
if (!mir_wstrcmp(dbv.ptszVal, _A2T(info.name)))
device = (int)i;
@@ -550,9 +550,9 @@ int OnModulesLoaded(WPARAM, LPARAM)
}
else {
DBVARIANT dbv;
- if (db_get_ts(NULL, ModuleName, OPT_BASSPATH, &dbv)) {
- mir_wstrncpy(CurrBassPath, VARST(L"Plugins\\Bass\\bass.dll"), _countof(CurrBassPath));
- db_set_ts(NULL, ModuleName, OPT_BASSPATH, CurrBassPath);
+ if (db_get_ws(NULL, ModuleName, OPT_BASSPATH, &dbv)) {
+ mir_wstrncpy(CurrBassPath, VARSW(L"Plugins\\Bass\\bass.dll"), _countof(CurrBassPath));
+ db_set_ws(NULL, ModuleName, OPT_BASSPATH, CurrBassPath);
}
else {
mir_wstrcpy(CurrBassPath, dbv.ptszVal);
diff --git a/plugins/BasicHistory/src/BasicHistory.cpp b/plugins/BasicHistory/src/BasicHistory.cpp
index 91150ad439..8c91b57629 100644
--- a/plugins/BasicHistory/src/BasicHistory.cpp
+++ b/plugins/BasicHistory/src/BasicHistory.cpp
@@ -143,7 +143,7 @@ void InitTaskMenuItems()
int pos = (int)taskMenus.size();
for (; taskIt != Options::instance->taskOptions.end(); ++taskIt) {
CMenuItem mi;
- mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
+ mi.flags = CMIF_UNICODE | CMIF_KEEPUNTRANSLATED;
mi.pszService = MS_HISTORY_EXECUTE_TASK;
mi.root = hTaskMainMenu;
mi.name.w = (wchar_t*)taskIt->taskName.c_str();
diff --git a/plugins/BasicHistory/src/EventList.cpp b/plugins/BasicHistory/src/EventList.cpp
index bea541c11a..932242a65d 100644
--- a/plugins/BasicHistory/src/EventList.cpp
+++ b/plugins/BasicHistory/src/EventList.cpp
@@ -448,7 +448,7 @@ std::wstring HistoryEventList::GetContactId()
static void GetMessageDescription(DBEVENTINFO *dbei, wchar_t* buf, int cbBuf)
{
- wchar_t *msg = DbGetEventTextT(dbei, CP_ACP);
+ wchar_t *msg = DbGetEventTextW(dbei, CP_ACP);
wcsncpy_s(buf, cbBuf, msg ? msg : TranslateT("Invalid Message"), _TRUNCATE);
buf[cbBuf - 1] = 0;
mir_free(msg);
diff --git a/plugins/BasicHistory/src/HistoryWindow.cpp b/plugins/BasicHistory/src/HistoryWindow.cpp
index be1dac8781..6d5017ce14 100644
--- a/plugins/BasicHistory/src/HistoryWindow.cpp
+++ b/plugins/BasicHistory/src/HistoryWindow.cpp
@@ -505,7 +505,7 @@ void __stdcall ShowMessageWindow(void* arg)
if (dt->m_str.empty())
CallService(MS_MSG_SENDMESSAGE, dt->m_hContact, 0);
else
- CallService(MS_MSG_SENDMESSAGET, dt->m_hContact, (LPARAM)dt->m_str.c_str());
+ CallService(MS_MSG_SENDMESSAGEW, dt->m_hContact, (LPARAM)dt->m_str.c_str());
delete dt;
}
@@ -566,14 +566,14 @@ INT_PTR CALLBACK HistoryWindow::DlgProcHistory(HWND hwndDlg, UINT msg, WPARAM wP
if (HIWORD(wParam) == BN_CLICKED) {
if (Button_GetCheck(GetDlgItem(hwndDlg, IDC_SHOWHIDE)) & BST_CHECKED) {
SendDlgItemMessage(hwndDlg, IDC_SHOWHIDE, BM_SETIMAGE, IMAGE_ICON, (LPARAM)historyWindow->minusIco);
- SendDlgItemMessage(hwndDlg, IDC_SHOWHIDE, BUTTONADDTOOLTIP, (WPARAM)LPGENW("Hide Contacts"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_SHOWHIDE, BUTTONADDTOOLTIP, (WPARAM)LPGENW("Hide Contacts"), BATF_UNICODE);
historyWindow->isContactList = true;
ShowWindow(GetDlgItem(hwndDlg, IDC_LIST_CONTACTS), SW_SHOW);
ShowWindow(historyWindow->splitterYhWnd, SW_SHOW);
}
else {
SendDlgItemMessage(hwndDlg, IDC_SHOWHIDE, BM_SETIMAGE, IMAGE_ICON, (LPARAM)historyWindow->plusIco);
- SendDlgItemMessage(hwndDlg, IDC_SHOWHIDE, BUTTONADDTOOLTIP, (WPARAM)LPGENW("Show Contacts"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_SHOWHIDE, BUTTONADDTOOLTIP, (WPARAM)LPGENW("Show Contacts"), BATF_UNICODE);
historyWindow->isContactList = false;
ShowWindow(GetDlgItem(hwndDlg, IDC_LIST_CONTACTS), SW_HIDE);
ShowWindow(historyWindow->splitterYhWnd, SW_HIDE);
@@ -988,13 +988,13 @@ void HistoryWindow::Initialise()
SendDlgItemMessage(m_hWnd, IDC_SHOWHIDE, BUTTONSETASFLATBTN, TRUE, 0);
if (m_hContact == NULL || Options::instance->showContacts) {
SendDlgItemMessage(m_hWnd, IDC_SHOWHIDE, BM_SETIMAGE, IMAGE_ICON, (LPARAM)minusIco);
- SendDlgItemMessage(m_hWnd, IDC_SHOWHIDE, BUTTONADDTOOLTIP, (WPARAM)LPGENW("Hide Contacts"), BATF_TCHAR);
+ SendDlgItemMessage(m_hWnd, IDC_SHOWHIDE, BUTTONADDTOOLTIP, (WPARAM)LPGENW("Hide Contacts"), BATF_UNICODE);
Button_SetCheck(GetDlgItem(m_hWnd, IDC_SHOWHIDE), BST_CHECKED);
isContactList = true;
}
else {
SendDlgItemMessage(m_hWnd, IDC_SHOWHIDE, BM_SETIMAGE, IMAGE_ICON, (LPARAM)plusIco);
- SendDlgItemMessage(m_hWnd, IDC_SHOWHIDE, BUTTONADDTOOLTIP, (WPARAM)LPGENW("Show Contacts"), BATF_TCHAR);
+ SendDlgItemMessage(m_hWnd, IDC_SHOWHIDE, BUTTONADDTOOLTIP, (WPARAM)LPGENW("Show Contacts"), BATF_UNICODE);
Button_SetCheck(GetDlgItem(m_hWnd, IDC_SHOWHIDE), BST_UNCHECKED);
ShowWindow(GetDlgItem(m_hWnd, IDC_LIST_CONTACTS), SW_HIDE);
ShowWindow(splitterYhWnd, SW_HIDE);
diff --git a/plugins/BasicHistory/src/Options.cpp b/plugins/BasicHistory/src/Options.cpp
index 4e243c3682..f27b62597d 100644
--- a/plugins/BasicHistory/src/Options.cpp
+++ b/plugins/BasicHistory/src/Options.cpp
@@ -122,7 +122,7 @@ int Options::InitOptions(WPARAM wParam, LPARAM)
OPTIONSDIALOGPAGE odp = { 0 };
odp.position = 100000000;
odp.hInstance = hInst;
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
odp.pwszTitle = LPGENW("History");
odp.pwszTab = LPGENW("Group list");
@@ -174,8 +174,8 @@ struct ColorOptionsList {
struct HotkeyOptionsList {
const char *pszName;
- const wchar_t *ptszDescription;
- const wchar_t *ptszSection;
+ const wchar_t *pwszDescription;
+ const wchar_t *pwszSection;
const char *pszService;
WORD DefHotKey;
LPARAM lParam;
@@ -231,11 +231,11 @@ const int g_hotkeysSize = _countof(g_HotkeyOptionsList);
void Options::Load(void)
{
- FontIDT fid = {0};
- ColourIDT cid = {0};
+ FontIDW fid = {0};
+ ColourIDW cid = {0};
HOTKEYDESC hid = {0};
- fid.cbSize = sizeof(FontIDT);
- cid.cbSize = sizeof(ColourIDT);
+ fid.cbSize = sizeof(FontIDW);
+ cid.cbSize = sizeof(ColourIDW);
hid.cbSize = sizeof(HOTKEYDESC);
strncpy_s(fid.dbSettingsGroup, "BasicHistory_Fonts", _TRUNCATE);
wcsncpy_s(fid.backgroundGroup, L"History", _TRUNCATE);
@@ -251,7 +251,7 @@ void Options::Load(void)
wcsncpy_s(fid.name, g_FontOptionsList[i].szDescr, _TRUNCATE);
wcsncpy_s(fid.backgroundName, g_FontOptionsList[i].szBackgroundName, _TRUNCATE);
fid.flags = FIDF_DEFAULTVALID | FIDF_CLASSGENERAL | g_FontOptionsList[i].flags;
- FontRegisterT(&fid);
+ FontRegisterW(&fid);
}
strncpy_s(cid.dbSettingsGroup, "BasicHistory_Fonts", _TRUNCATE);
@@ -261,14 +261,14 @@ void Options::Load(void)
mir_snprintf(cid.setting, _countof(cid.setting), "Color%d", i);
cid.order = i;
cid.defcolour = g_ColorOptionsList[i].def;
- ColourRegisterT(&cid);
+ ColourRegisterW(&cid);
}
- hid.dwFlags = HKD_TCHAR;
+ hid.dwFlags = HKD_UNICODE;
for (int i = 0; i < g_hotkeysSize; ++i) {
hid.pszName = g_HotkeyOptionsList[i].pszName;
- hid.ptszDescription = g_HotkeyOptionsList[i].ptszDescription;
- hid.ptszSection = g_HotkeyOptionsList[i].ptszSection;
+ hid.pwszDescription = g_HotkeyOptionsList[i].pwszDescription;
+ hid.pwszSection = g_HotkeyOptionsList[i].pwszSection;
hid.pszService = g_HotkeyOptionsList[i].pszService;
hid.DefHotKey = g_HotkeyOptionsList[i].DefHotKey;
hid.lParam = g_HotkeyOptionsList[i].lParam;
@@ -408,20 +408,20 @@ void Options::Load(void)
COLORREF Options::GetFont(Fonts fontId, PLOGFONT font)
{
- FontIDT fid = {0};
- fid.cbSize = sizeof(FontIDT);
+ FontIDW fid = {0};
+ fid.cbSize = sizeof(FontIDW);
wcsncpy_s(fid.group, LPGENW("History"), _TRUNCATE);
wcsncpy_s(fid.name, g_FontOptionsList[fontId].szDescr, _TRUNCATE);
- return (COLORREF)CallService(MS_FONT_GETT, (WPARAM)&fid, (LPARAM)font);
+ return (COLORREF)CallService(MS_FONT_GETW, (WPARAM)&fid, (LPARAM)font);
}
COLORREF Options::GetColor(Colors colorId)
{
- ColourIDT cid = {0};
- cid.cbSize = sizeof(ColourIDT);
+ ColourIDW cid = {0};
+ cid.cbSize = sizeof(ColourIDW);
wcsncpy_s(cid.group, LPGENW("History"), _TRUNCATE);
wcsncpy_s(cid.name, g_ColorOptionsList[colorId].tszName, _TRUNCATE);
- return (COLORREF)CallService(MS_COLOUR_GETT, (WPARAM)&cid, NULL);
+ return (COLORREF)CallService(MS_COLOUR_GETW, (WPARAM)&cid, NULL);
}
void Options::Save()
@@ -780,7 +780,7 @@ void ReloadEventLB(HWND hwndLB, const FilterOptions &sel)
mir_snwprintf(buf, L"%d", *it);
ListBox_AddString(hwndLB, buf);
}
- else ListBox_AddString(hwndLB, TranslateTS(EventNames[selCpIdx].name));
+ else ListBox_AddString(hwndLB, TranslateW(EventNames[selCpIdx].name));
}
}
@@ -872,7 +872,7 @@ INT_PTR CALLBACK Options::DlgProcOptsMain(HWND hwndDlg, UINT msg, WPARAM wParam,
ComboBox_AddString(events, TranslateT("Incoming events"));
ComboBox_AddString(events, TranslateT("Outgoing events"));
for (int i = 0 ; i < _countof(EventNames); ++i)
- ComboBox_AddString(events, TranslateTS(EventNames[i].name));
+ ComboBox_AddString(events, TranslateW(EventNames[i].name));
ComboBox_AddString(defFilter, TranslateT("Default history events"));
ComboBox_AddString(defFilter, TranslateT("All events"));
@@ -1276,7 +1276,7 @@ void InitCodepageCB(HWND hwndCB, unsigned int codepage, const std::wstring& name
int selCpIdx = -1;
ComboBox_LimitText(hwndCB, 256);
for (int i = 0; i < cpCount; ++i) {
- ComboBox_AddString(hwndCB, TranslateTS(cpTable[i].cpName));
+ ComboBox_AddString(hwndCB, TranslateW(cpTable[i].cpName));
if (cpTable[i].cpId == codepage && name == cpTable[i].cpName)
selCpIdx = i;
}
diff --git a/plugins/BasicHistory/src/Scheduler.cpp b/plugins/BasicHistory/src/Scheduler.cpp
index 238a65cfdf..9c391dce1a 100644
--- a/plugins/BasicHistory/src/Scheduler.cpp
+++ b/plugins/BasicHistory/src/Scheduler.cpp
@@ -74,7 +74,7 @@ void InitScheduler()
test.flags = PCF_TCHAR;
test.hIcon = Skin_LoadIcon(SKINICON_OTHER_HISTORY);
test.iSeconds = 10;
- test.ptszDescription = TranslateT("History task");
+ test.pwszDescription = TranslateT("History task");
test.pszName = MODULE;
if (hPopupClass = Popup_RegisterClass(&test))
HookEvent(ME_SYSTEM_SHUTDOWN, OnShutdown);
diff --git a/plugins/BasicHistory/src/Searcher.cpp b/plugins/BasicHistory/src/Searcher.cpp
index 97158d7796..a2f09eb24c 100644
--- a/plugins/BasicHistory/src/Searcher.cpp
+++ b/plugins/BasicHistory/src/Searcher.cpp
@@ -302,7 +302,7 @@ void Searcher::Find()
mir_snwprintf(buf, TranslateT("\"%s\" not found"), str);
MessageBox(context->m_hWnd, buf, TranslateT("Search"), MB_OK | MB_ICONINFORMATION);
}
- else MessageBox(context->m_hWnd, TranslateTS(onlyGroup ? LPGENW("You have reached the end of the group.") : LPGENW("You have reached the end of the history.")), TranslateT("Search"), MB_OK | MB_ICONINFORMATION);
+ else MessageBox(context->m_hWnd, TranslateW(onlyGroup ? LPGENW("You have reached the end of the group.") : LPGENW("You have reached the end of the history.")), TranslateT("Search"), MB_OK | MB_ICONINFORMATION);
}
bool Searcher::IsInSel(int sel, wchar_t *strFind)
diff --git a/plugins/Boltun/src/boltun.cpp b/plugins/Boltun/src/boltun.cpp
index ebe6dd21d6..42278611c0 100644
--- a/plugins/Boltun/src/boltun.cpp
+++ b/plugins/Boltun/src/boltun.cpp
@@ -218,7 +218,7 @@ static int MessageEventAdded(WPARAM hContact, LPARAM hDbEvent)
return 0;
DBEVENTGETTEXT egt;
egt.codepage = CP_ACP;
- egt.datatype = DBVT_TCHAR;
+ egt.datatype = DBVT_WCHAR;
egt.dbei = &dbei;
wchar_t* s = (wchar_t*)(void*)CallService(MS_DB_EVENT_GETTEXT, 0, (LPARAM)&egt);
free(dbei.pBlob);
@@ -312,7 +312,7 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPAR
if (bTranslated)
Config.WarnText = c;
else
- Config.WarnText = TranslateTS(DEFAULT_WARN_TEXT);
+ Config.WarnText = TranslateW(DEFAULT_WARN_TEXT);
}
return TRUE;
}
@@ -369,9 +369,9 @@ static INT_PTR CALLBACK EngineDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LP
ofn.lStructSize = sizeof(OPENFILENAME);
ofn.hwndOwner = GetParent(hwndDlg);
- wchar_t *mind = TranslateTS(MIND_FILE_DESC);
- wchar_t *anyfile = TranslateTS(ALL_FILES_DESC);
- CMString filt(FORMAT, MIND_DIALOG_FILTER, mind, anyfile);
+ wchar_t *mind = TranslateW(MIND_FILE_DESC);
+ wchar_t *anyfile = TranslateW(ALL_FILES_DESC);
+ CMStringW filt(FORMAT, MIND_DIALOG_FILTER, mind, anyfile);
filt.Replace('\1', '\0');
ofn.lpstrFilter = filt;
@@ -407,8 +407,8 @@ static INT_PTR CALLBACK EngineDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LP
bTranslated = blInit = LoadMind(c, line);
if (!bTranslated) {
wchar_t message[5000];
- mir_snwprintf(message, TranslateTS(FAILED_TO_LOAD_BASE), line, c);
- MessageBox(NULL, message, TranslateTS(BOLTUN_ERROR), MB_ICONERROR | MB_TASKMODAL | MB_OK);
+ mir_snwprintf(message, TranslateW(FAILED_TO_LOAD_BASE), line, c);
+ MessageBox(NULL, message, TranslateW(BOLTUN_ERROR), MB_ICONERROR | MB_TASKMODAL | MB_OK);
}
}
break;
@@ -575,8 +575,8 @@ extern "C" int __declspec(dllexport) Load(void)
blInit = LoadMind(Config.MindFileName, line);
if (!blInit) {
wchar_t path[2000];
- mir_snwprintf(path, TranslateTS(FAILED_TO_LOAD_BASE), line, (const wchar_t*)Config.MindFileName);
- MessageBox(NULL, path, TranslateTS(BOLTUN_ERROR), MB_ICONERROR | MB_TASKMODAL | MB_OK);
+ mir_snwprintf(path, TranslateW(FAILED_TO_LOAD_BASE), line, (const wchar_t*)Config.MindFileName);
+ MessageBox(NULL, path, TranslateW(BOLTUN_ERROR), MB_ICONERROR | MB_TASKMODAL | MB_OK);
}
return 0;
}
@@ -593,8 +593,8 @@ extern "C" int __declspec(dllexport) Unload(void)
//So in case of saving error we will remain silent
#if 0
wchar_t path[MAX_PATH];
- mir_snwprintf(path, TranslateTS(FAILED_TO_SAVE_BASE), (const wchar_t*)Config.MindFileName);
- wchar_t* err = TranslateTS(BOLTUN_ERROR);
+ mir_snwprintf(path, TranslateW(FAILED_TO_SAVE_BASE), (const wchar_t*)Config.MindFileName);
+ wchar_t* err = TranslateW(BOLTUN_ERROR);
MessageBox(NULL, path, err, MB_ICONERROR | MB_TASKMODAL | MB_OK); */
#endif
}
diff --git a/plugins/Boltun/src/config.cpp b/plugins/Boltun/src/config.cpp
index 68d6035315..7137a8af1a 100644
--- a/plugins/Boltun/src/config.cpp
+++ b/plugins/Boltun/src/config.cpp
@@ -40,7 +40,7 @@ inline wchar_t* GetString(char* key, const wchar_t* def)
{
DBVARIANT dbv;
wchar_t* val;
- if (!db_get_ts(NULL, BOLTUN_KEY, key, &dbv))
+ if (!db_get_ws(NULL, BOLTUN_KEY, key, &dbv))
{
size_t len = mir_wstrlen(dbv.ptszVal) + 1;
val = new wchar_t[len];
@@ -61,7 +61,7 @@ inline const wchar_t* SetString(char* key, const wchar_t* value)
size_t len = mir_wstrlen(value) + 1;
wchar_t* val = new wchar_t[len];
wcscpy_s(val, len, value);
- db_set_ts(NULL, BOLTUN_KEY, key, val);
+ db_set_ws(NULL, BOLTUN_KEY, key, val);
return val;
}
@@ -97,7 +97,7 @@ BUILDINTETTERS(AnswerPauseTime, DB_WAIT_TIME, 2);
BUILDINTETTERS(AnswerThinkTime, DB_THINK_TIME, 4);
BUILDETTERS(PauseDepends, DB_PAUSE_DEPENDS, TRUE);
BUILDETTERS(PauseRandom, DB_PAUSE_RANDOM, TRUE);
-BUILDSTRETTERS(WarnText, DB_WARN_TEXT, TranslateTS(DEFAULT_WARN_TEXT));
+BUILDSTRETTERS(WarnText, DB_WARN_TEXT, TranslateW(DEFAULT_WARN_TEXT));
BUILDSTRETTERS(MindFileName, DB_MIND_FILE_NAME, DEFAULT_MIND_FILE);
BUILDETTERS(EngineStaySilent, DB_ENGINE_SILENT, FALSE);
BUILDETTERS(EngineMakeLowerCase, DB_ENGINE_LOWERCASE, FALSE);
diff --git a/plugins/BossKeyPlus/src/BossKey.cpp b/plugins/BossKeyPlus/src/BossKey.cpp
index d1e1fab75e..745cabb98c 100644
--- a/plugins/BossKeyPlus/src/BossKey.cpp
+++ b/plugins/BossKeyPlus/src/BossKey.cpp
@@ -196,7 +196,7 @@ BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM)
wchar_t* GetDefStatusMsg(unsigned uStatus, const char* szProto)
{
- return (wchar_t*)CallService(MS_AWAYMSG_GETSTATUSMSGT, uStatus, (LPARAM)szProto);
+ return (wchar_t*)CallService(MS_AWAYMSG_GETSTATUSMSGW, uStatus, (LPARAM)szProto);
}
void SetStatus(const char* szProto, unsigned status, wchar_t *tszAwayMsg)
@@ -221,7 +221,7 @@ static int ChangeAllProtoStatuses(unsigned statusMode, wchar_t *msg)
if (g_wMask & OPT_SETONLINEBACK){ // need to save old statuses & status messages
oldStatus[i] = status;
if (ProtoServiceExists(proto[i]->szModuleName, PS_GETMYAWAYMSG))
- oldStatusMsg[i] = (wchar_t*)CallProtoService(proto[i]->szModuleName, PS_GETMYAWAYMSG, 0, SGMA_TCHAR);
+ oldStatusMsg[i] = (wchar_t*)CallProtoService(proto[i]->szModuleName, PS_GETMYAWAYMSG, 0, SGMA_UNICODE);
else
oldStatusMsg[i] = GetDefStatusMsg(status, proto[i]->szModuleName);
}
@@ -253,7 +253,7 @@ static void CreateTrayIcon(bool create)
{
NOTIFYICONDATA nim;
DBVARIANT dbVar;
- if (!db_get_ts(NULL, MOD_NAME, "ToolTipText", &dbVar)) {
+ if (!db_get_ws(NULL, MOD_NAME, "ToolTipText", &dbVar)) {
wcsncpy_s(nim.szTip, dbVar.ptszVal, _TRUNCATE);
db_free(&dbVar);
}
@@ -319,7 +319,7 @@ LRESULT CALLBACK ListenWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara
BYTE bReqMode = db_get_b(NULL, MOD_NAME, "stattype", 2);
unsigned uMode = (STATUS_ARR_TO_ID[bReqMode]);
DBVARIANT dbVar;
- if (g_wMask & OPT_USEDEFMSG || db_get_ts(NULL, MOD_NAME, "statmsg", &dbVar))
+ if (g_wMask & OPT_USEDEFMSG || db_get_ws(NULL, MOD_NAME, "statmsg", &dbVar))
{
wchar_t *ptszDefMsg = GetDefStatusMsg(uMode, 0);
ChangeAllProtoStatuses(uMode, ptszDefMsg);
@@ -532,7 +532,7 @@ void BossKeyMenuItemInit(void) // Add menu item
{
CMenuItem mi;
SET_UID(mi, 0x42428114, 0xfac7, 0x44c2, 0x9a, 0x11, 0x18, 0xbe, 0x81, 0xd4, 0xa9, 0xe3);
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
mi.position = 2000100000;
mi.hIcolibItem = IcoLib_GetIcon("hidemim");
mi.name.w = LPGENW("Hide");
diff --git a/plugins/BossKeyPlus/src/Options.cpp b/plugins/BossKeyPlus/src/Options.cpp
index fab96b3e27..682689a7df 100644
--- a/plugins/BossKeyPlus/src/Options.cpp
+++ b/plugins/BossKeyPlus/src/Options.cpp
@@ -82,7 +82,7 @@ INT_PTR CALLBACK MainOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam
wchar_t tszMsg[1025];
GetDlgItemText(hwndDlg, IDC_MAINOPT_STATMSG, tszMsg, _countof(tszMsg));
if (tszMsg[0] != 0)
- db_set_ts(NULL, MOD_NAME, "statmsg", tszMsg);
+ db_set_ws(NULL, MOD_NAME, "statmsg", tszMsg);
else // delete current setting
db_unset(NULL, MOD_NAME, "statmsg");
}
@@ -123,7 +123,7 @@ INT_PTR CALLBACK MainOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam
else {
DBVARIANT dbVar;
SendDlgItemMessage(hwndDlg, IDC_MAINOPT_STATMSG, EM_LIMITTEXT, 1024, 0);
- if (!db_get_ts(NULL, MOD_NAME, "statmsg", &dbVar)) {
+ if (!db_get_ws(NULL, MOD_NAME, "statmsg", &dbVar)) {
SetDlgItemText(hwndDlg, IDC_MAINOPT_STATMSG, dbVar.ptszVal);
db_free(&dbVar);
}
@@ -326,7 +326,7 @@ int OptsDlgInit(WPARAM wParam, LPARAM)
optDi.pwszTitle = LPGENW("BossKey");
optDi.pwszGroup = LPGENW("Events");
optDi.pwszTab = LPGENW("Main");
- optDi.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ optDi.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
Options_AddPage(wParam, &optDi);
optDi.pfnDlgProc = AdvOptDlg;
diff --git a/plugins/BuddyExpectator/src/BuddyExpectator.cpp b/plugins/BuddyExpectator/src/BuddyExpectator.cpp
index 4fc8a9e978..027ce00eff 100644
--- a/plugins/BuddyExpectator/src/BuddyExpectator.cpp
+++ b/plugins/BuddyExpectator/src/BuddyExpectator.cpp
@@ -344,7 +344,7 @@ INT_PTR MissYouAction(WPARAM wParam, LPARAM lParam)
}
else hContact = wParam;
- CallService(MS_MSG_SENDMESSAGET, hContact, 0);
+ CallService(MS_MSG_SENDMESSAGEW, hContact, 0);
return 0;
}
@@ -361,7 +361,7 @@ INT_PTR ContactReturnedAction(WPARAM hContact, LPARAM lParam)
}
if (options.iShowMessageWindow > 0)
- CallService(MS_MSG_SENDMESSAGET, hContact, 0);
+ CallService(MS_MSG_SENDMESSAGEW, hContact, 0);
if (options.iShowUDetails > 0)
CallService(MS_USERINFO_SHOWDIALOG, hContact, 0);
@@ -593,10 +593,10 @@ int ModulesLoaded(WPARAM, LPARAM)
HookEvent(ME_USERINFO_INITIALISE, UserinfoInit);
// add sounds support
- SkinAddNewSoundExT("buddyExpectatorReturn", LPGENW("BuddyExpectator"), LPGENW("Contact returned"));
- SkinAddNewSoundExT("buddyExpectatorStillAbsent", LPGENW("BuddyExpectator"), LPGENW("Contact still absent"));
- SkinAddNewSoundExT("buddyExpectatorMissYou", LPGENW("BuddyExpectator"), LPGENW("Miss you event"));
- SkinAddNewSoundExT("buddyExpectatorHide", LPGENW("BuddyExpectator"), LPGENW("Hide contact event"));
+ SkinAddNewSoundExW("buddyExpectatorReturn", LPGENW("BuddyExpectator"), LPGENW("Contact returned"));
+ SkinAddNewSoundExW("buddyExpectatorStillAbsent", LPGENW("BuddyExpectator"), LPGENW("Contact still absent"));
+ SkinAddNewSoundExW("buddyExpectatorMissYou", LPGENW("BuddyExpectator"), LPGENW("Miss you event"));
+ SkinAddNewSoundExW("buddyExpectatorHide", LPGENW("BuddyExpectator"), LPGENW("Hide contact event"));
timer_id = SetTimer(0, 0, 1000 * 60 * 60 * 4, TimerProc); // check every 4 hours
@@ -609,7 +609,7 @@ int ModulesLoaded(WPARAM, LPARAM)
CMenuItem mi;
SET_UID(mi, 0xc48c31d4, 0x56b6, 0x48c6, 0x8e, 0xe9, 0xe6, 0x57, 0xb5, 0x80, 0xb8, 0x1e);
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
mi.hIcolibItem = iconList[2].hIcolib;
mi.position = 200000;
mi.name.w = LPGENW("Enable Miss You");
diff --git a/plugins/BuddyExpectator/src/options.cpp b/plugins/BuddyExpectator/src/options.cpp
index c2bdeb591c..269ec50eaf 100644
--- a/plugins/BuddyExpectator/src/options.cpp
+++ b/plugins/BuddyExpectator/src/options.cpp
@@ -437,7 +437,7 @@ static int OptionsInit(WPARAM wParam, LPARAM)
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONSPANEL);
odp.pwszTitle = LPGENW("Buddy Expectator");
odp.pfnDlgProc = OptionsFrameProc;
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
Options_AddPage(wParam, &odp);
if (ServiceExists(MS_POPUP_ADDPOPUPT)) {
@@ -531,7 +531,7 @@ int UserinfoInit(WPARAM wparam, LPARAM lparam)
OPTIONSDIALOGPAGE uip = { sizeof(uip) };
uip.hInstance = hInst;
uip.pszTemplate = MAKEINTRESOURCEA(IDD_USERINFO);
- uip.flags = ODPF_TCHAR;
+ uip.flags = ODPF_UNICODE;
uip.pwszTitle = LPGENW("Buddy Expectator");
uip.pfnDlgProc = UserinfoDlgProc;
UserInfo_AddPage(wparam, &uip);
diff --git a/plugins/BuddyPounce/src/dialog.cpp b/plugins/BuddyPounce/src/dialog.cpp
index 12a70ba570..ed2d9f0a85 100644
--- a/plugins/BuddyPounce/src/dialog.cpp
+++ b/plugins/BuddyPounce/src/dialog.cpp
@@ -65,11 +65,11 @@ void hideAll(HWND hwnd)
void getDefaultMessage(HWND hwnd, UINT control, MCONTACT hContact)
{
DBVARIANT dbv;
- if (!db_get_ts(hContact, modname, "PounceMsg", &dbv)) {
+ if (!db_get_ws(hContact, modname, "PounceMsg", &dbv)) {
SetDlgItemText(hwnd, control, dbv.ptszVal);
db_free(&dbv);
}
- else if (!db_get_ts(NULL, modname, "PounceMsg", &dbv)) {
+ else if (!db_get_ws(NULL, modname, "PounceMsg", &dbv)) {
SetDlgItemText(hwnd, control, dbv.ptszVal);
db_free(&dbv);
}
@@ -224,7 +224,7 @@ INT_PTR CALLBACK BuddyPounceSimpleDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, L
if (length>1) {
wchar_t *text = (wchar_t*)_alloca(length*sizeof(wchar_t));
GetDlgItemText(hwnd, IDC_MESSAGE, text, length);
- db_set_ts(hContact, modname, "PounceMsg", text);
+ db_set_ws(hContact, modname, "PounceMsg", text);
}
else db_unset(hContact, modname, "PounceMsg");
}
@@ -510,7 +510,7 @@ INT_PTR CALLBACK SendPounceDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR)spdps);
{
DBVARIANT dbv;
- if (db_get_ts(spdps->hContact, modname, "PounceMsg", &dbv))
+ if (db_get_ws(spdps->hContact, modname, "PounceMsg", &dbv))
DestroyWindow(hwnd);
else {
SetDlgItemText(hwnd,IDC_MESSAGE, dbv.ptszVal);
@@ -567,7 +567,7 @@ INT_PTR CALLBACK PounceSentDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
hContact = lParam;
{
DBVARIANT dbv;
- if (db_get_ts(hContact, modname, "PounceMsg", &dbv))
+ if (db_get_ws(hContact, modname, "PounceMsg", &dbv))
DestroyWindow(hwnd);
else {
SetDlgItemText(hwnd, IDC_MESSAGE, dbv.ptszVal);
diff --git a/plugins/BuddyPounce/src/main.cpp b/plugins/BuddyPounce/src/main.cpp
index 35e6f5d9ba..dc69bbb53d 100644
--- a/plugins/BuddyPounce/src/main.cpp
+++ b/plugins/BuddyPounce/src/main.cpp
@@ -67,7 +67,7 @@ int MsgAck(WPARAM, LPARAM lParam)
DBEVENTINFO dbei = { 0 };
DBVARIANT dbv;
int reuse = db_get_b(ack->hContact,modname, "Reuse", 0);
- if (!db_get_ts(ack->hContact, modname, "PounceMsg", &dbv) && (dbv.ptszVal[0] != '\0')) {
+ if (!db_get_ws(ack->hContact, modname, "PounceMsg", &dbv) && (dbv.ptszVal[0] != '\0')) {
T2Utf pszUtf(dbv.ptszVal);
dbei.cbSize = sizeof(dbei);
dbei.eventType = EVENTTYPE_MESSAGE;
@@ -95,7 +95,7 @@ int MsgAck(WPARAM, LPARAM lParam)
int BuddyPounceOptInit(WPARAM wParam, LPARAM)
{
OPTIONSDIALOGPAGE odp = { 0 };
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
odp.hInstance = hInst;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS);
odp.pwszGroup = LPGENW("Message sessions");
@@ -160,7 +160,7 @@ int UserOnlineSettingChanged(WPARAM hContact, LPARAM lParam)
if (newStatus != oldStatus && hContact != NULL && newStatus != ID_STATUS_OFFLINE) {
DBVARIANT dbv;
- if (!db_get_ts(hContact, modname, "PounceMsg", &dbv) && (dbv.ptszVal[0] != '\0')) {
+ if (!db_get_ws(hContact, modname, "PounceMsg", &dbv) && (dbv.ptszVal[0] != '\0')) {
// check my status
if (statusCheck(db_get_w(hContact, modname, "SendIfMyStatusIsFLAG", 0), CallProtoService(szProto, PS_GETSTATUS,0,0))
// check the contacts status
@@ -213,7 +213,7 @@ INT_PTR AddToPounce(WPARAM wParam, LPARAM lParam)
MCONTACT hContact = wParam;
wchar_t* message = (wchar_t*)lParam;
DBVARIANT dbv;
- if (!db_get_ts(hContact, modname, "PounceMsg",&dbv))
+ if (!db_get_ws(hContact, modname, "PounceMsg",&dbv))
{
wchar_t* newPounce = (wchar_t*)mir_alloc(mir_wstrlen(dbv.ptszVal) + mir_wstrlen(message) + 1);
if (!newPounce) return 1;
diff --git a/plugins/CSList/src/cslist.cpp b/plugins/CSList/src/cslist.cpp
index ecb5941fea..22937da7fa 100644
--- a/plugins/CSList/src/cslist.cpp
+++ b/plugins/CSList/src/cslist.cpp
@@ -129,7 +129,7 @@ extern "C" __declspec(dllexport) int Load()
SKINICONDESC sid = { 0 };
sid.defaultFile.w = tszFile;
- sid.flags = SIDF_ALL_TCHAR;
+ sid.flags = SIDF_ALL_UNICODE;
sid.section.w = MODULENAME;
for (int i = 0; i < _countof(forms); i++) {
@@ -164,10 +164,10 @@ extern "C" __declspec(dllexport) int Unload()
void RegisterHotkeys(char buf[200], wchar_t* accName, int Number)
{
HOTKEYDESC hotkey = { sizeof(hotkey) };
- hotkey.dwFlags = HKD_TCHAR;
+ hotkey.dwFlags = HKD_UNICODE;
hotkey.pszName = buf;
- hotkey.ptszDescription = accName;
- hotkey.ptszSection = LPGENW("Custom Status List");
+ hotkey.pwszDescription = accName;
+ hotkey.pwszSection = LPGENW("Custom Status List");
hotkey.pszService = buf;
hotkey.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL | HOTKEYF_SHIFT, '0' + Number);
Hotkey_Register(&hotkey);
@@ -188,7 +188,7 @@ void SetStatus(WORD code, StatusItem* item, char *szAccName)
int statusToSet;
CUSTOM_STATUS ics = { sizeof(CUSTOM_STATUS) };
- ics.flags = CSSF_MASK_STATUS | CSSF_MASK_NAME | CSSF_MASK_MESSAGE | CSSF_TCHAR;
+ ics.flags = CSSF_MASK_STATUS | CSSF_MASK_NAME | CSSF_MASK_MESSAGE | CSSF_UNICODE;
if (code == IDC_CANCEL) {
statusToSet = 0;
@@ -238,7 +238,7 @@ void addProtoStatusMenuItem(char *protoName)
CreateServiceFunctionParam(buf, showList, (LPARAM)protoName);
CMenuItem mi;
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
mi.hIcolibItem = forms[0].hIcoLibItem;
mi.name.w = MODULENAME;
mi.position = 2000040000;
@@ -261,14 +261,14 @@ void importCustomStatuses(CSWindow* csw, int result)
si->m_iIcon = i - 1;
mir_snprintf(bufTitle, "XStatus%dName", i);
- if (!db_get_ts(NULL, protoName, bufTitle, &dbv)) {
+ if (!db_get_ws(NULL, protoName, bufTitle, &dbv)) {
mir_wstrcpy(si->m_tszTitle, dbv.ptszVal);
db_free(&dbv);
}
else si->m_tszTitle[0] = 0;
mir_snprintf(bufMessage, "XStatus%dMsg", i);
- if (!db_get_ts(NULL, protoName, bufMessage, &dbv)) {
+ if (!db_get_ws(NULL, protoName, bufMessage, &dbv)) {
mir_wstrcpy(si->m_tszMessage, dbv.ptszVal);
db_free(&dbv);
}
@@ -366,7 +366,7 @@ void CSWindow::initButtons()
SendDlgItemMessage(m_handle, forms[i].idc, BM_SETIMAGE, IMAGE_ICON, (LPARAM)IcoLib_GetIconByHandle(forms[i].hIcoLibItem));
SendDlgItemMessage(m_handle, forms[i].idc, BUTTONSETASFLATBTN, TRUE, 0); //maybe set as BUTTONSETDEFAULT?
- SendDlgItemMessage(m_handle, forms[i].idc, BUTTONADDTOOLTIP, (WPARAM)TranslateTS(forms[i].ptszTitle), BATF_TCHAR);
+ SendDlgItemMessage(m_handle, forms[i].idc, BUTTONADDTOOLTIP, (WPARAM)TranslateW(forms[i].ptszTitle), BATF_UNICODE);
}
}
@@ -486,7 +486,7 @@ void CSAMWindow::setCombo()
WPARAM iStatus;
wchar_t tszName[100];
CUSTOM_STATUS cs = { sizeof(cs) };
- cs.flags = CSSF_MASK_NAME | CSSF_DEFAULT_NAME | CSSF_TCHAR;
+ cs.flags = CSSF_MASK_NAME | CSSF_DEFAULT_NAME | CSSF_UNICODE;
cs.ptszName = tszName;
cs.wParam = &iStatus;
@@ -500,7 +500,7 @@ void CSAMWindow::setCombo()
cbi.mask = CBEIF_TEXT | CBEIF_IMAGE | CBEIF_SELECTEDIMAGE;
cbi.iItem = -1;
cbi.iImage = cbi.iSelectedImage = i - 1;
- cbi.pszText = TranslateTS(tszName);
+ cbi.pszText = TranslateW(tszName);
SendMessage(m_hCombo, CBEM_INSERTITEM, 0, (LPARAM)&cbi);
}
SendMessage(m_hCombo, CB_SETCURSEL, 0, 0); // first 0 sets selection to top
@@ -574,11 +574,11 @@ void CSAMWindow::checkItemValidity()
wchar_t tszTitle[100];
CUSTOM_STATUS cs = { sizeof(cs) };
- cs.flags = CSSF_MASK_NAME | CSSF_DEFAULT_NAME | CSSF_TCHAR;
+ cs.flags = CSSF_MASK_NAME | CSSF_DEFAULT_NAME | CSSF_UNICODE;
cs.ptszName = tszTitle;
cs.wParam = &i;
if (CallProtoService(pdescr->szModuleName, PS_GETCUSTOMSTATUSEX, 0, (LPARAM)&cs) == 0)
- mir_wstrncpy(m_item->m_tszTitle, TranslateTS(tszTitle), _countof(m_item->m_tszTitle));
+ mir_wstrncpy(m_item->m_tszTitle, TranslateW(tszTitle), _countof(m_item->m_tszTitle));
if (mir_wstrcmp(m_item->m_tszMessage, tszInputMessage))
mir_wstrcpy(m_item->m_tszMessage, tszInputMessage), m_bChanged = true;
@@ -747,14 +747,14 @@ void CSItemsList::loadItems(char *protoName)
item->m_iIcon = getByte(dbSetting, DEFAULT_ITEM_ICON);
mir_snprintf(dbSetting, "%s_Item%dTitle", protoName, i);
- if (!getTString(dbSetting, &dbv)) {
+ if (!getWString(dbSetting, &dbv)) {
mir_wstrcpy(item->m_tszTitle, dbv.ptszVal);
db_free(&dbv);
}
else item->m_tszTitle[0] = 0;
mir_snprintf(dbSetting, "%s_Item%dMessage", protoName, i);
- if (!getTString(dbSetting, &dbv)) {
+ if (!getWString(dbSetting, &dbv)) {
mir_wstrcpy(item->m_tszMessage, dbv.ptszVal);
db_free(&dbv);
}
@@ -781,9 +781,9 @@ void CSItemsList::saveItems(char *protoName)
mir_snprintf(dbSetting, "%s_Item%dIcon", protoName, i);
setByte(dbSetting, item->m_iIcon);
mir_snprintf(dbSetting, "%s_Item%dTitle", protoName, i);
- setTString(dbSetting, item->m_tszTitle);
+ setWString(dbSetting, item->m_tszTitle);
mir_snprintf(dbSetting, "%s_Item%dMessage", protoName, i);
- setTString(dbSetting, item->m_tszMessage);
+ setWString(dbSetting, item->m_tszMessage);
mir_snprintf(dbSetting, "%s_Item%dFavourite", protoName, i);
setByte(dbSetting, item->m_bFavourite);
}
@@ -852,7 +852,7 @@ INT_PTR CALLBACK CSWindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lpa
case IDC_REMOVE:
if (getByte("ConfirmDeletion", DEFAULT_PLUGIN_CONFIRM_ITEMS_DELETION))
- if (MessageBox(hwnd, TranslateT("Do you really want to delete selected item?"), TranslateTS(MODULENAME), MB_YESNO | MB_DEFBUTTON2 | MB_ICONQUESTION) == IDNO)
+ if (MessageBox(hwnd, TranslateT("Do you really want to delete selected item?"), TranslateW(MODULENAME), MB_YESNO | MB_DEFBUTTON2 | MB_ICONQUESTION) == IDNO)
break;
csw->m_itemslist->m_list->remove(csw->m_listview->getPositionInList());
@@ -893,7 +893,7 @@ INT_PTR CALLBACK CSWindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lpa
else {
result = MessageBox(hwnd,
TranslateT("Do you want old database entries to be deleted after Import?"),
- TranslateTS(MODULENAME), MB_YESNOCANCEL | MB_DEFBUTTON2 | MB_ICONQUESTION);
+ TranslateW(MODULENAME), MB_YESNOCANCEL | MB_DEFBUTTON2 | MB_ICONQUESTION);
if (result == IDCANCEL)
break;
}
diff --git a/plugins/CSList/src/stdafx.h b/plugins/CSList/src/stdafx.h
index e64119f5ea..7e80f4519f 100644
--- a/plugins/CSList/src/stdafx.h
+++ b/plugins/CSList/src/stdafx.h
@@ -90,8 +90,8 @@
#define setWord(setting, value) db_set_w(NULL, MODNAME, setting, value)
#define getDword(setting, error) db_get_dw(NULL, MODNAME, setting, error)
#define setDword(setting, value) db_set_dw(NULL, MODNAME, setting, value)
-#define getTString(setting, dest) db_get_ts(NULL, MODNAME, setting, dest)
-#define setTString(setting, value) db_set_ts(NULL, MODNAME, setting, value)
+#define getWString(setting, dest) db_get_ws(NULL, MODNAME, setting, dest)
+#define setWString(setting, value) db_set_ws(NULL, MODNAME, setting, value)
#define deleteSetting(setting) db_unset(NULL, MODNAME, setting)
// --
diff --git a/plugins/ChangeKeyboardLayout/src/hook_events.cpp b/plugins/ChangeKeyboardLayout/src/hook_events.cpp
index be5c8f100d..9abe24c248 100644
--- a/plugins/ChangeKeyboardLayout/src/hook_events.cpp
+++ b/plugins/ChangeKeyboardLayout/src/hook_events.cpp
@@ -101,7 +101,7 @@ int ModulesLoaded(WPARAM, LPARAM)
for (int i = 0; i < bLayNum; i++) {
LPTSTR ptszCurrLayout = GenerateLayoutString(hklLayouts[i]);
LPSTR ptszTemp = GetNameOfLayout(hklLayouts[i]);
- ptrW tszValue(db_get_tsa(NULL, ModuleName, ptszTemp));
+ ptrW tszValue(db_get_wsa(NULL, ModuleName, ptszTemp));
if (tszValue == 0)
ptszLayStrings[i] = ptszCurrLayout;
else if (!mir_wstrcmp(tszValue, ptszEmptySting))
diff --git a/plugins/ChangeKeyboardLayout/src/options.cpp b/plugins/ChangeKeyboardLayout/src/options.cpp
index a610cef0fe..27540781fe 100644
--- a/plugins/ChangeKeyboardLayout/src/options.cpp
+++ b/plugins/ChangeKeyboardLayout/src/options.cpp
@@ -211,7 +211,7 @@ INT_PTR CALLBACK DlgMainProcOptions(HWND hWnd, UINT uiMessage, WPARAM wParam, LP
pszNameLay = GetNameOfLayout(hklLayouts[i]);
if (mir_wstrcmp(ptszMemLay, ptszGenLay) != 0)
- db_set_ts(NULL, ModuleName, pszNameLay, ptszMemLay);
+ db_set_ws(NULL, ModuleName, pszNameLay, ptszMemLay);
else
db_unset(NULL, ModuleName, pszNameLay);
diff --git a/plugins/ClientChangeNotify/src/CString.cpp b/plugins/ClientChangeNotify/src/CString.cpp
index 4f4064d60a..edee2fe0e6 100644
--- a/plugins/ClientChangeNotify/src/CString.cpp
+++ b/plugins/ClientChangeNotify/src/CString.cpp
@@ -280,7 +280,7 @@ CString db_get_s(MCONTACT hContact, const char *szModule, const char *szSetting,
TCString db_get_s(MCONTACT hContact, const char *szModule, const char *szSetting, const wchar_t *szDefaultValue)
{
- ptrW p( db_get_tsa(hContact, szModule, szSetting));
+ ptrW p( db_get_wsa(hContact, szModule, szSetting));
return TCString(p == NULL ? szDefaultValue : p);
}
diff --git a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
index f70270d757..67f13a01a7 100644
--- a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
+++ b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
@@ -203,7 +203,7 @@ int ContactSettingChanged(WPARAM hContact, LPARAM lParam)
return 0;
}
sd.OldMirVer = db_get_s(hContact, MOD_NAME, DB_OLDMIRVER, L"");
- db_set_ts(hContact, MOD_NAME, DB_OLDMIRVER, sd.MirVer); // we have to write it here, because we modify sd.OldMirVer and sd.MirVer to conform our settings later
+ db_set_ws(hContact, MOD_NAME, DB_OLDMIRVER, sd.MirVer); // we have to write it here, because we modify sd.OldMirVer and sd.MirVer to conform our settings later
if (sd.OldMirVer.IsEmpty()) // looks like it's the right way to do
return 0;
@@ -331,7 +331,7 @@ int MirandaLoaded(WPARAM, LPARAM)
CMenuItem mi;
SET_UID(mi, 0xfabb9181, 0xdb92, 0x43f4, 0x86, 0x40, 0xca, 0xb6, 0x4c, 0x93, 0x34, 0x27);
mi.root = Menu_CreateRoot(MO_MAIN, LPGENW("Popups"), 0);
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
if (g_PopupOptPage.GetDBValueCopy(IDC_POPUPOPTDLG_POPUPNOTIFY))
mi.name.w = LPGENW("Disable c&lient change notification");
else
@@ -361,7 +361,7 @@ extern "C" int __declspec(dllexport) Load(void)
TCString Str;
Str = db_get_s(NULL, MOD_NAME, DB_IGNORESUBSTRINGS, L"");
if (Str.GetLen()) // fix incorrect regexp from v0.1.1.0
- db_set_ts(NULL, MOD_NAME, DB_IGNORESUBSTRINGS, Str.Replace(L"/Miranda[0-9A-F]{8}/", L"/[0-9A-F]{8}(\\W|$)/"));
+ db_set_ws(NULL, MOD_NAME, DB_IGNORESUBSTRINGS, Str.Replace(L"/Miranda[0-9A-F]{8}/", L"/[0-9A-F]{8}(\\W|$)/"));
db_set_b(NULL, MOD_NAME, DB_SETTINGSVER, 1);
}
diff --git a/plugins/ClientChangeNotify/src/OptDlg.cpp b/plugins/ClientChangeNotify/src/OptDlg.cpp
index 9ec69fe61c..ffc13577d3 100644
--- a/plugins/ClientChangeNotify/src/OptDlg.cpp
+++ b/plugins/ClientChangeNotify/src/OptDlg.cpp
@@ -87,8 +87,8 @@ INT_PTR CALLBACK PopupOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara
HWND hLCombo = GetDlgItem(hwndDlg, IDC_POPUPOPTDLG_LCLICK_ACTION);
HWND hRCombo = GetDlgItem(hwndDlg, IDC_POPUPOPTDLG_RCLICK_ACTION);
for (int i = 0; i < _countof(PopupActions); i++) {
- SendMessage(hLCombo, CB_SETITEMDATA, SendMessage(hLCombo, CB_ADDSTRING, 0, (LPARAM)TranslateTS(PopupActions[i].Text)), PopupActions[i].Action);
- SendMessage(hRCombo, CB_SETITEMDATA, SendMessage(hRCombo, CB_ADDSTRING, 0, (LPARAM)TranslateTS(PopupActions[i].Text)), PopupActions[i].Action);
+ SendMessage(hLCombo, CB_SETITEMDATA, SendMessage(hLCombo, CB_ADDSTRING, 0, (LPARAM)TranslateW(PopupActions[i].Text)), PopupActions[i].Action);
+ SendMessage(hRCombo, CB_SETITEMDATA, SendMessage(hRCombo, CB_ADDSTRING, 0, (LPARAM)TranslateW(PopupActions[i].Text)), PopupActions[i].Action);
}
g_PopupOptPage.DBToMemToPage();
EnablePopupOptDlgControls();
@@ -168,7 +168,7 @@ int OptionsDlgInit(WPARAM wParam, LPARAM)
optDi.pszTemplate = MAKEINTRESOURCEA(IDD_POPUPOPTDLG);
optDi.hInstance = g_hInstance;
optDi.pwszGroup = LPGENW("Popups");
- optDi.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ optDi.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
Options_AddPage(wParam, &optDi);
}
return 0;
diff --git a/plugins/ClientChangeNotify/src/Options.cpp b/plugins/ClientChangeNotify/src/Options.cpp
index 62463ea611..0a81d2f701 100644
--- a/plugins/ClientChangeNotify/src/Options.cpp
+++ b/plugins/ClientChangeNotify/src/Options.cpp
@@ -151,7 +151,7 @@ TCString COptItem::GetStrDBVal(const CString &sModule, CString *sDBSettingPrefix
void COptItem::SetStrDBVal(const CString &sModule, TCString &Str, CString *sDBSettingPrefix)
{
if (sDBSetting != NULL && !m_bReadOnly) {
- db_set_ts(NULL, sModule, sDBSettingPrefix ? (*sDBSettingPrefix + sDBSetting) : sDBSetting, Str);
+ db_set_ws(NULL, sModule, sDBSettingPrefix ? (*sDBSettingPrefix + sDBSetting) : sDBSetting, Str);
}
}
@@ -331,7 +331,7 @@ void COptItem_TreeCtrl::MemToDB(const CString &sModule, CString *sDBSettingPrefi
CString StrID;
_itoa(m_value[i].ID, StrID.GetBuffer(64), 10);
StrID.ReleaseBuffer();
- db_set_ts(NULL, sModule, *sDBSettingPrefix + sDBSetting + TREEITEM_DBSTR_TITLE + StrID, m_value[i].Title);
+ db_set_ws(NULL, sModule, *sDBSettingPrefix + sDBSetting + TREEITEM_DBSTR_TITLE + StrID, m_value[i].Title);
if (!(TreeFlags & TREECTRL_FLAG_IS_SINGLE_LEVEL))
db_set_w(NULL, sModule, *sDBSettingPrefix + sDBSetting + TREEITEM_DBSTR_PARENT + StrID, m_value[i].ParentID);
@@ -340,7 +340,7 @@ void COptItem_TreeCtrl::MemToDB(const CString &sModule, CString *sDBSettingPrefi
db_set_b(NULL, sModule, *sDBSettingPrefix + sDBSetting + TREEITEM_DBSTR_FLAGS + StrID, m_value[i].Flags);
if (User_Str1_DBName != NULL && m_value[i].User_Str1 != NULL)
- db_set_ts(NULL, sModule, *sDBSettingPrefix + sDBSetting + User_Str1_DBName + StrID, m_value[i].User_Str1);
+ db_set_ws(NULL, sModule, *sDBSettingPrefix + sDBSetting + User_Str1_DBName + StrID, m_value[i].User_Str1);
}
COptItem::MemToDB(sModule, sDBSettingPrefix);
}
@@ -703,7 +703,7 @@ void COptItem_ListCtrl::MemToDB(const CString &sModule, CString *sDBSettingPrefi
CString StrID;
_itoa(i, StrID.GetBuffer(64), 10);
StrID.ReleaseBuffer();
- db_set_ts(NULL, sModule, *sDBSettingPrefix + sDBSetting + LISTITEM_DBSTR_TEXT + StrID, m_value[i].Text);
+ db_set_ws(NULL, sModule, *sDBSettingPrefix + sDBSetting + LISTITEM_DBSTR_TEXT + StrID, m_value[i].Text);
}
COptItem::MemToDB(sModule, sDBSettingPrefix);
}
diff --git a/plugins/Clist_blind/src/clcopts.cpp b/plugins/Clist_blind/src/clcopts.cpp
index 3a60f5c8cf..576d958b48 100644
--- a/plugins/Clist_blind/src/clcopts.cpp
+++ b/plugins/Clist_blind/src/clcopts.cpp
@@ -93,7 +93,7 @@ static void FillCheckBoxTree(HWND hwndTree, const struct CheckBoxValues_t *value
tvis.item.mask = TVIF_PARAM | TVIF_TEXT | TVIF_STATE;
for (int i = 0; i < nValues; i++) {
tvis.item.lParam = values[i].style;
- tvis.item.pszText = TranslateTS( values[i].szDescr );
+ tvis.item.pszText = TranslateW( values[i].szDescr );
tvis.item.stateMask = TVIS_STATEIMAGEMASK;
tvis.item.state = INDEXTOSTATEIMAGEMASK((style & tvis.item.lParam) != 0 ? 2 : 1);
TreeView_InsertItem( hwndTree, &tvis);
@@ -233,13 +233,13 @@ static INT_PTR CALLBACK DlgProcClcMainOpts(HWND hwndDlg, UINT msg, WPARAM wParam
db_set_b(NULL, "CLC", "NoVScrollBar", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_NOSCROLLBAR) ? 1 : 0));
GetDlgItemText(hwndDlg, IDC_T_CONTACT, tmp, _countof(tmp));
- db_set_ts(NULL, "CLC", "TemplateContact", tmp);
+ db_set_ws(NULL, "CLC", "TemplateContact", tmp);
GetDlgItemText(hwndDlg, IDC_T_GROUP, tmp, _countof(tmp));
- db_set_ts(NULL, "CLC", "TemplateGroup", tmp);
+ db_set_ws(NULL, "CLC", "TemplateGroup", tmp);
GetDlgItemText(hwndDlg, IDC_T_DIVIDER, tmp, _countof(tmp));
- db_set_ts(NULL, "CLC", "TemplateDivider", tmp);
+ db_set_ws(NULL, "CLC", "TemplateDivider", tmp);
GetDlgItemText(hwndDlg, IDC_T_INFO, tmp, _countof(tmp));
- db_set_ts(NULL, "CLC", "TemplateInfo", tmp);
+ db_set_ws(NULL, "CLC", "TemplateInfo", tmp);
pcli->pfnClcOptionsChanged();
return TRUE;
diff --git a/plugins/Clist_blind/src/cluiopts.cpp b/plugins/Clist_blind/src/cluiopts.cpp
index bccb11eca6..34e804d442 100644
--- a/plugins/Clist_blind/src/cluiopts.cpp
+++ b/plugins/Clist_blind/src/cluiopts.cpp
@@ -72,7 +72,7 @@ static INT_PTR CALLBACK DlgProcCluiOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
{
DBVARIANT dbv;
- if (!db_get_ts(NULL, "CList", "TitleText", &dbv)) {
+ if (!db_get_ws(NULL, "CList", "TitleText", &dbv)) {
SetDlgItemText(hwndDlg, IDC_TITLETEXT, dbv.ptszVal);
db_free(&dbv);
}
@@ -169,7 +169,7 @@ static INT_PTR CALLBACK DlgProcCluiOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
{
wchar_t title[256];
GetDlgItemText(hwndDlg, IDC_TITLETEXT, title, _countof(title));
- db_set_ts(NULL, "CList", "TitleText", title);
+ db_set_ws(NULL, "CList", "TitleText", title);
SetWindowText(pcli->hwndContactList, title);
}
pcli->pfnLoadCluiGlobalOpts();
diff --git a/plugins/Clist_blind/src/init.cpp b/plugins/Clist_blind/src/init.cpp
index d1889144f1..d09979acad 100644
--- a/plugins/Clist_blind/src/init.cpp
+++ b/plugins/Clist_blind/src/init.cpp
@@ -182,7 +182,7 @@ wchar_t* MyDBGetContactSettingTString(MCONTACT hContact, char* module, char* set
out[0] = '\0';
- if (!db_get_ts(hContact, module, setting, &dbv)) {
+ if (!db_get_ws(hContact, module, setting, &dbv)) {
if (dbv.type == DBVT_ASCIIZ)
MultiByteToWideChar(CP_ACP, 0, dbv.pszVal, -1, out, (int)len);
else if (dbv.type == DBVT_UTF8)
diff --git a/plugins/Clist_modern/src/cluiframes.cpp b/plugins/Clist_modern/src/cluiframes.cpp
index 4cd01abef0..701715a7c3 100644
--- a/plugins/Clist_modern/src/cluiframes.cpp
+++ b/plugins/Clist_modern/src/cluiframes.cpp
@@ -678,7 +678,7 @@ static int LocateStorePosition(int Frameid, int maxstored)
for (int i = 0; i < maxstored; i++) {
mir_snprintf(settingname, "Name%d", i);
DBVARIANT dbv = { 0 };
- if (db_get_ts(NULL, CLUIFrameModule, settingname, &dbv))
+ if (db_get_ws(NULL, CLUIFrameModule, settingname, &dbv))
continue;
if (mir_wstrcmpi(dbv.ptszVal, g_pfwFrames[Frameid].name) == 0) {
@@ -1502,7 +1502,7 @@ static int CLUIFramesLoadMainMenu()
for (int i = 0; i < g_nFramesCount; i++) {
FRAMEWND &F = g_pfwFrames[i];
mi.hIcolibItem = F.TitleBar.hicon;
- mi.flags = CMIF_SYSTEM | CMIF_TCHAR;
+ mi.flags = CMIF_SYSTEM | CMIF_UNICODE;
mi.position = separator++;
mi.name.w = F.TitleBar.tbname ? F.TitleBar.tbname : F.name;
mi.pszService = 0;
@@ -2362,7 +2362,7 @@ int OnFrameTitleBarBackgroundChange(WPARAM, LPARAM)
}
if (g_CluiData.fDisableSkinEngine) {
if (db_get_b(NULL, "FrameTitleBar", "UseBitmap", CLCDEFAULT_USEBITMAP)) {
- ptrW tszBitmapName(db_get_tsa(NULL, "FrameTitleBar", "BkBitmap"));
+ ptrW tszBitmapName(db_get_wsa(NULL, "FrameTitleBar", "BkBitmap"));
if (tszBitmapName)
sttBmpBackground = Bitmap_Load(tszBitmapName);
}
diff --git a/plugins/Clist_modern/src/modern_cachefuncs.cpp b/plugins/Clist_modern/src/modern_cachefuncs.cpp
index 2406754e47..f3c081c4b2 100644
--- a/plugins/Clist_modern/src/modern_cachefuncs.cpp
+++ b/plugins/Clist_modern/src/modern_cachefuncs.cpp
@@ -282,7 +282,7 @@ int GetStatusName(wchar_t *text, int text_size, ClcCacheEntry *pdnce, BOOL xstat
// Get XStatusName
if (!noAwayMsg && !noXstatus && xstatus_has_priority && pdnce->hContact && pdnce->m_pszProto) {
DBVARIANT dbv = { 0 };
- if (!db_get_ts(pdnce->hContact, pdnce->m_pszProto, "XStatusName", &dbv)) {
+ if (!db_get_ws(pdnce->hContact, pdnce->m_pszProto, "XStatusName", &dbv)) {
//mir_wstrncpy(text, dbv.pszVal, text_size);
CopySkipUnprintableChars(text, dbv.ptszVal, text_size - 1);
db_free(&dbv);
@@ -302,7 +302,7 @@ int GetStatusName(wchar_t *text, int text_size, ClcCacheEntry *pdnce, BOOL xstat
// Get XStatusName
if (!noAwayMsg && !noXstatus && !xstatus_has_priority && pdnce->hContact && pdnce->m_pszProto) {
DBVARIANT dbv = { 0 };
- if (!db_get_ts(pdnce->hContact, pdnce->m_pszProto, "XStatusName", &dbv)) {
+ if (!db_get_ws(pdnce->hContact, pdnce->m_pszProto, "XStatusName", &dbv)) {
CopySkipUnprintableChars(text, dbv.ptszVal, text_size - 1);
db_free(&dbv);
@@ -324,7 +324,7 @@ void GetListeningTo(wchar_t *text, int text_size, ClcCacheEntry *pdnce)
if (pdnce->m_iStatus == ID_STATUS_OFFLINE || pdnce->m_iStatus == 0)
return;
- ptrW tszValue(db_get_tsa(pdnce->hContact, pdnce->m_pszProto, "ListeningTo"));
+ ptrW tszValue(db_get_wsa(pdnce->hContact, pdnce->m_pszProto, "ListeningTo"));
if (tszValue != NULL)
CopySkipUnprintableChars(text, tszValue, text_size - 1);
}
@@ -345,7 +345,7 @@ int GetStatusMessage(wchar_t *text, int text_size, ClcCacheEntry *pdnce, BOOL xs
// Get XStatusMsg
if (!noAwayMsg && xstatus_has_priority && pdnce->hContact && pdnce->m_pszProto) {
- ptrW tszXStatusMsg(db_get_tsa(pdnce->hContact, pdnce->m_pszProto, "XStatusMsg"));
+ ptrW tszXStatusMsg(db_get_wsa(pdnce->hContact, pdnce->m_pszProto, "XStatusMsg"));
if (tszXStatusMsg != NULL) {
CopySkipUnprintableChars(text, tszXStatusMsg, text_size - 1);
if (text[0] != '\0')
@@ -355,7 +355,7 @@ int GetStatusMessage(wchar_t *text, int text_size, ClcCacheEntry *pdnce, BOOL xs
// Get StatusMsg
if (pdnce->hContact && text[0] == '\0') {
- ptrW tszStatusMsg(db_get_tsa(pdnce->hContact, "CList", "StatusMsg"));
+ ptrW tszStatusMsg(db_get_wsa(pdnce->hContact, "CList", "StatusMsg"));
if (tszStatusMsg != NULL) {
CopySkipUnprintableChars(text, tszStatusMsg, text_size - 1);
if (text[0] != '\0')
@@ -366,7 +366,7 @@ int GetStatusMessage(wchar_t *text, int text_size, ClcCacheEntry *pdnce, BOOL xs
// Get XStatusMsg
if (!noAwayMsg && !xstatus_has_priority && pdnce->hContact && pdnce->m_pszProto && text[0] == '\0') {
// Try to get XStatusMsg
- ptrW tszXStatusMsg(db_get_tsa(pdnce->hContact, pdnce->m_pszProto, "XStatusMsg"));
+ ptrW tszXStatusMsg(db_get_wsa(pdnce->hContact, pdnce->m_pszProto, "XStatusMsg"));
if (tszXStatusMsg != NULL) {
CopySkipUnprintableChars(text, tszXStatusMsg, text_size - 1);
if (text[0] != '\0')
@@ -391,7 +391,7 @@ int Cache_GetLineText(ClcCacheEntry *pdnce, int type, LPTSTR text, int text_size
LBL_Status:
if (GetStatusName(text, text_size, pdnce, line.xstatus_has_priority) == -1 && line.use_name_and_message_for_xstatus) {
// Try to get XStatusMsg
- ptrW tszXStatusMsg(db_get_tsa(pdnce->hContact, pdnce->m_pszProto, "XStatusMsg"));
+ ptrW tszXStatusMsg(db_get_wsa(pdnce->hContact, pdnce->m_pszProto, "XStatusMsg"));
if (tszXStatusMsg != NULL && tszXStatusMsg[0] != 0) {
wchar_t *tmp = NEWWSTR_ALLOCA(text);
mir_snwprintf(text, text_size, L"%s: %s", tmp, tszXStatusMsg);
@@ -402,7 +402,7 @@ LBL_Status:
case TEXT_NICKNAME:
if (pdnce->hContact && pdnce->m_pszProto) {
- ptrW tszNick(db_get_tsa(pdnce->hContact, pdnce->m_pszProto, "Nick"));
+ ptrW tszNick(db_get_wsa(pdnce->hContact, pdnce->m_pszProto, "Nick"));
if (tszNick != NULL) {
mir_wstrncpy(text, tszNick, text_size);
CopySkipUnprintableChars(text, text, text_size - 1);
@@ -413,7 +413,7 @@ LBL_Status:
case TEXT_STATUS_MESSAGE:
if (GetStatusMessage(text, text_size, pdnce, line.xstatus_has_priority) == -1 && line.use_name_and_message_for_xstatus) {
// Try to get XStatusName
- ptrW tszXStatusName(db_get_tsa(pdnce->hContact, pdnce->m_pszProto, "XStatusName"));
+ ptrW tszXStatusName(db_get_wsa(pdnce->hContact, pdnce->m_pszProto, "XStatusName"));
if (tszXStatusName != NULL && tszXStatusName[0] != 0) {
wchar_t *tmp = NEWWSTR_ALLOCA(text);
mir_snwprintf(text, text_size, L"%s: %s", tszXStatusName, tmp);
@@ -422,7 +422,7 @@ LBL_Status:
}
else if (line.use_name_and_message_for_xstatus && line.xstatus_has_priority) {
// Try to get XStatusName
- ptrW tszXStatusName(db_get_tsa(pdnce->hContact, pdnce->m_pszProto, "XStatusName"));
+ ptrW tszXStatusName(db_get_wsa(pdnce->hContact, pdnce->m_pszProto, "XStatusName"));
if (tszXStatusName != NULL && tszXStatusName[0] != 0) {
mir_wstrncpy(text, tszXStatusName, text_size);
CopySkipUnprintableChars(text, text, text_size - 1);
@@ -477,7 +477,7 @@ void Cache_GetFirstLineText(ClcData *dat, ClcContact *contact)
wchar_t *name = pcli->pfnGetContactDisplayName(contact->hContact, 0);
if (dat->first_line_append_nick && !dat->bForceInDialog) {
DBVARIANT dbv = { 0 };
- if (!db_get_ts(pdnce->hContact, pdnce->m_pszProto, "Nick", &dbv)) {
+ if (!db_get_ws(pdnce->hContact, pdnce->m_pszProto, "Nick", &dbv)) {
wchar_t nick[_countof(contact->szText)];
mir_wstrncpy(nick, dbv.ptszVal, _countof(contact->szText));
db_free(&dbv);
diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp
index ed48ac41bc..2f9b9d7f2c 100644
--- a/plugins/Clist_modern/src/modern_clc.cpp
+++ b/plugins/Clist_modern/src/modern_clc.cpp
@@ -1567,7 +1567,7 @@ static int clcHookModulesLoaded(WPARAM, LPARAM)
SKINICONDESC sid = { 0 };
sid.defaultFile.w = szMyPath;
- sid.flags = SIDF_PATH_TCHAR;
+ sid.flags = SIDF_PATH_UNICODE;
sid.section.a = LPGEN("Contact list");
sid.description.a = LPGEN("Listening to");
diff --git a/plugins/Clist_modern/src/modern_clcitems.cpp b/plugins/Clist_modern/src/modern_clcitems.cpp
index d23703ba0a..c9a86d389e 100644
--- a/plugins/Clist_modern/src/modern_clcitems.cpp
+++ b/plugins/Clist_modern/src/modern_clcitems.cpp
@@ -433,7 +433,7 @@ int CLVM_GetContactHiddenStatus(MCONTACT hContact, char *szProto, ClcData *dat)
}
if (g_CluiData.bFilterEffective & CLVM_FILTER_GROUPS) {
- ptrW tszGroup(db_get_tsa(hContact, "CList", "Group"));
+ ptrW tszGroup(db_get_wsa(hContact, "CList", "Group"));
if (tszGroup != NULL) {
wchar_t szGroupMask[256];
mir_snwprintf(szGroupMask, L"%s|", tszGroup);
diff --git a/plugins/Clist_modern/src/modern_clcopts.cpp b/plugins/Clist_modern/src/modern_clcopts.cpp
index bacc564cc9..3e0f9e51e9 100644
--- a/plugins/Clist_modern/src/modern_clcopts.cpp
+++ b/plugins/Clist_modern/src/modern_clcopts.cpp
@@ -123,8 +123,8 @@ void RegisterCLUIFonts(void)
if (registered)
return;
- FontIDT fontid = { 0 };
- EffectIDT effectid = { 0 };
+ FontIDW fontid = { 0 };
+ EffectIDW effectid = { 0 };
char idstr[10];
int index = 0;
@@ -150,7 +150,7 @@ void RegisterCLUIFonts(void)
fontid.deffontsettings.style = fontOptionsList[i].defStyle;
mir_wstrncpy(fontid.deffontsettings.szFace, fontOptionsList[i].szDefFace, _countof(fontid.deffontsettings.szFace));
- FontRegisterT(&fontid);
+ FontRegisterW(&fontid);
mir_wstrncpy(effectid.group, fontOptionsList[i].szGroup, _countof(effectid.group));
mir_wstrncpy(effectid.name, fontOptionsList[i].szDescr, _countof(effectid.name));
@@ -162,10 +162,10 @@ void RegisterCLUIFonts(void)
effectid.defeffect.baseColour = fontOptionsList[i].defeffect.baseColour;
effectid.defeffect.secondaryColour = fontOptionsList[i].defeffect.secondaryColour;
- EffectRegisterT(&effectid);
+ EffectRegisterW(&effectid);
}
- ColourIDT colourid = { 0 };
+ ColourIDW colourid = { 0 };
colourid.cbSize = sizeof(colourid);
for (int i = 0; i < _countof(colourOptionsList); i++) {
@@ -175,7 +175,7 @@ void RegisterCLUIFonts(void)
mir_strncpy(colourid.dbSettingsGroup, colourOptionsList[i].chGroup, _countof(colourid.dbSettingsGroup));
colourid.defcolour = colourOptionsList[i].defColour;
colourid.order = i + 1;
- ColourRegisterT(&colourid);
+ ColourRegisterW(&colourid);
}
registered = true;
}
@@ -203,12 +203,12 @@ void GetFontSetting(int i, LOGFONT *lf, COLORREF *colour, BYTE *effect, COLORREF
if (index == _countof(fontOptionsList))
return;
- FontIDT fontid = { 0 };
+ FontIDW fontid = { 0 };
fontid.cbSize = sizeof(fontid);
mir_wstrncpy(fontid.group, fontOptionsList[index].szGroup, _countof(fontid.group));
mir_wstrncpy(fontid.name, fontOptionsList[index].szDescr, _countof(fontid.name));
- COLORREF col = CallService(MS_FONT_GETT, (WPARAM)&fontid, (LPARAM)lf);
+ COLORREF col = CallService(MS_FONT_GETW, (WPARAM)&fontid, (LPARAM)lf);
if (colour)
*colour = col;
@@ -284,7 +284,7 @@ static void FillCheckBoxTree(HWND hwndTree, const struct CheckBoxValues_t *value
tvis.item.mask = TVIF_PARAM | TVIF_TEXT | TVIF_STATE;
for (int i = 0; i < nValues; i++) {
tvis.item.lParam = values[i].style;
- tvis.item.pszText = TranslateTS(values[i].szDescr);
+ tvis.item.pszText = TranslateW(values[i].szDescr);
tvis.item.stateMask = TVIS_STATEIMAGEMASK;
tvis.item.state = INDEXTOSTATEIMAGEMASK((style & tvis.item.lParam) != 0 ? 2 : 1);
TreeView_InsertItem(hwndTree, &tvis);
@@ -508,11 +508,11 @@ static INT_PTR CALLBACK DlgProcClistOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
int i, item;
int s1, s2, s3;
for (i = 0; i < _countof(sortby); i++) {
- item = SendDlgItemMessage(hwndDlg, IDC_CLSORT1, CB_ADDSTRING, 0, (LPARAM)TranslateTS(sortby[i]));
+ item = SendDlgItemMessage(hwndDlg, IDC_CLSORT1, CB_ADDSTRING, 0, (LPARAM)TranslateW(sortby[i]));
SendDlgItemMessage(hwndDlg, IDC_CLSORT1, CB_SETITEMDATA, item, 0);
- item = SendDlgItemMessage(hwndDlg, IDC_CLSORT2, CB_ADDSTRING, 0, (LPARAM)TranslateTS(sortby[i]));
+ item = SendDlgItemMessage(hwndDlg, IDC_CLSORT2, CB_ADDSTRING, 0, (LPARAM)TranslateW(sortby[i]));
SendDlgItemMessage(hwndDlg, IDC_CLSORT2, CB_SETITEMDATA, item, 0);
- item = SendDlgItemMessage(hwndDlg, IDC_CLSORT3, CB_ADDSTRING, 0, (LPARAM)TranslateTS(sortby[i]));
+ item = SendDlgItemMessage(hwndDlg, IDC_CLSORT3, CB_ADDSTRING, 0, (LPARAM)TranslateW(sortby[i]));
SendDlgItemMessage(hwndDlg, IDC_CLSORT3, CB_SETITEMDATA, item, 0);
}
@@ -1003,7 +1003,7 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP
{
DBVARIANT dbv = { 0 };
wchar_t *s;
- if (!db_get_ts(NULL, "CList", "TitleText", &dbv))
+ if (!db_get_ws(NULL, "CList", "TitleText", &dbv))
s = dbv.ptszVal;
else
s = _A2W(MIRANDANAME);
@@ -1665,11 +1665,11 @@ static INT_PTR CALLBACK DlgProcModernOptions(HWND hwndDlg, UINT msg, WPARAM wPar
SendMessage(hwndDlg, WM_HSCROLL, 0x12345678, 0);
for (i = 0; i < _countof(sortby); i++) {
- item = SendDlgItemMessage(hwndDlg, IDC_CLSORT1, CB_ADDSTRING, 0, (LPARAM)TranslateTS(sortby[i]));
+ item = SendDlgItemMessage(hwndDlg, IDC_CLSORT1, CB_ADDSTRING, 0, (LPARAM)TranslateW(sortby[i]));
SendDlgItemMessage(hwndDlg, IDC_CLSORT1, CB_SETITEMDATA, item, 0);
- item = SendDlgItemMessage(hwndDlg, IDC_CLSORT2, CB_ADDSTRING, 0, (LPARAM)TranslateTS(sortby[i]));
+ item = SendDlgItemMessage(hwndDlg, IDC_CLSORT2, CB_ADDSTRING, 0, (LPARAM)TranslateW(sortby[i]));
SendDlgItemMessage(hwndDlg, IDC_CLSORT2, CB_SETITEMDATA, item, 0);
- item = SendDlgItemMessage(hwndDlg, IDC_CLSORT3, CB_ADDSTRING, 0, (LPARAM)TranslateTS(sortby[i]));
+ item = SendDlgItemMessage(hwndDlg, IDC_CLSORT3, CB_ADDSTRING, 0, (LPARAM)TranslateW(sortby[i]));
SendDlgItemMessage(hwndDlg, IDC_CLSORT3, CB_SETITEMDATA, item, 0);
}
diff --git a/plugins/Clist_modern/src/modern_clcutils.cpp b/plugins/Clist_modern/src/modern_clcutils.cpp
index 1d99f11abf..96aead2961 100644
--- a/plugins/Clist_modern/src/modern_clcutils.cpp
+++ b/plugins/Clist_modern/src/modern_clcutils.cpp
@@ -560,7 +560,7 @@ void cli_LoadCLCOptions(HWND hwnd, ClcData *dat, BOOL bFirst)
dat->secondLine.draw_smileys = db_get_b(NULL, "CList", "SecondLineDrawSmileys", SETTING_SECONDLINE_SMILEYS_DEFAULT);
dat->secondLine.type = db_get_w(NULL, "CList", "SecondLineType", SETTING_SECONDLINE_TYPE_DEFAULT);
- ptrW tszLineText(db_get_tsa(NULL, "CList", "SecondLineText"));
+ ptrW tszLineText(db_get_wsa(NULL, "CList", "SecondLineText"));
if (tszLineText)
mir_wstrncpy(dat->secondLine.text, tszLineText, _countof(dat->secondLine.text));
else
@@ -580,7 +580,7 @@ void cli_LoadCLCOptions(HWND hwnd, ClcData *dat, BOOL bFirst)
dat->thirdLine.draw_smileys = db_get_b(NULL, "CList", "ThirdLineDrawSmileys", SETTING_THIRDLINE_SMILEYS_DEFAULT);
dat->thirdLine.type = db_get_w(NULL, "CList", "ThirdLineType", SETTING_THIRDLINE_TYPE_DEFAULT);
- ptrW tszLineText(db_get_tsa(NULL, "CList", "ThirdLineText"));
+ ptrW tszLineText(db_get_wsa(NULL, "CList", "ThirdLineText"));
if (tszLineText)
mir_wstrncpy(dat->thirdLine.text, tszLineText, _countof(dat->thirdLine.text));
else
@@ -608,7 +608,7 @@ void cli_LoadCLCOptions(HWND hwnd, ClcData *dat, BOOL bFirst)
dat->MenuTextHiColor = cliGetColor("Menu", "SelTextColour", CLCDEFAULT_MODERN_SELTEXTCOLOUR);
if (db_get_b(NULL, "Menu", "UseBitmap", CLCDEFAULT_USEBITMAP)) {
- ptrW tszBitmap(db_get_tsa(NULL, "Menu", "BkBitmap"));
+ ptrW tszBitmap(db_get_wsa(NULL, "Menu", "BkBitmap"));
if (tszBitmap != NULL)
dat->hMenuBackground = Bitmap_Load(tszBitmap);
}
diff --git a/plugins/Clist_modern/src/modern_clistevents.cpp b/plugins/Clist_modern/src/modern_clistevents.cpp
index 2585918e00..7982455b5a 100644
--- a/plugins/Clist_modern/src/modern_clistevents.cpp
+++ b/plugins/Clist_modern/src/modern_clistevents.cpp
@@ -249,7 +249,7 @@ static int ehhEventAreaBackgroundSettingsChanged(WPARAM, LPARAM)
if (g_CluiData.fDisableSkinEngine) {
event_area.bkColour = cliGetColor("EventArea", "BkColour", CLCDEFAULT_BKCOLOUR);
if (db_get_b(NULL, "EventArea", "UseBitmap", CLCDEFAULT_USEBITMAP)) {
- ptrW tszBitmap(db_get_tsa(NULL, "EventArea", "BkBitmap"));
+ ptrW tszBitmap(db_get_wsa(NULL, "EventArea", "BkBitmap"));
if (tszBitmap != NULL)
event_area.hBmpBackground = Bitmap_Load(tszBitmap);
}
@@ -511,7 +511,7 @@ int EventArea_Create(HWND hCluiWnd)
Frame.hWnd = g_CluiData.hwndEventFrame;
Frame.align = alBottom;
Frame.hIcon = Skin_LoadIcon(SKINICON_OTHER_FRAME);
- Frame.Flags = (db_get_b(NULL, "CLUI", "ShowEventArea", SETTING_SHOWEVENTAREAFRAME_DEFAULT) ? F_VISIBLE : 0) | F_LOCKED | F_NOBORDER | F_NO_SUBCONTAINER | F_TCHAR;
+ Frame.Flags = (db_get_b(NULL, "CLUI", "ShowEventArea", SETTING_SHOWEVENTAREAFRAME_DEFAULT) ? F_VISIBLE : 0) | F_LOCKED | F_NOBORDER | F_NO_SUBCONTAINER | F_UNICODE;
Frame.height = h;
Frame.tname = L"EventArea"; //do not translate
Frame.TBtname = TranslateT("Event area");
diff --git a/plugins/Clist_modern/src/modern_clistmenus.cpp b/plugins/Clist_modern/src/modern_clistmenus.cpp
index 2605dea546..7d97a9d428 100644
--- a/plugins/Clist_modern/src/modern_clistmenus.cpp
+++ b/plugins/Clist_modern/src/modern_clistmenus.cpp
@@ -84,11 +84,11 @@ static int FAV_OnContactMenuBuild(WPARAM hContact, LPARAM)
if (bContactRate > _countof(rates) - 1)
bContactRate = _countof(rates) - 1;
- CMString tszName;
+ CMStringW tszName;
if (!bContactRate)
tszName = FAVMENUROOTNAME;
else
- tszName.Format(L"%s (%s)", TranslateTS(FAVMENUROOTNAME), TranslateTS(rates[bContactRate]));
+ tszName.Format(L"%s (%s)", TranslateW(FAVMENUROOTNAME), TranslateW(rates[bContactRate]));
Menu_ModifyItem(hFavoriteContactMenu, tszName);
for (int i = 0; i < _countof(rates); i++)
@@ -125,13 +125,13 @@ int LoadFavoriteContactMenu()
CMenuItem mi;
SET_UID(mi, 0xf99a2320, 0xc024, 0x48bd, 0x81, 0xf7, 0x9f, 0xa2, 0x5, 0xb0, 0x7f, 0xdc);
mi.name.w = FAVMENUROOTNAME;
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
hFavoriteContactMenu = Menu_AddContactMenuItem(&mi);
Menu_ConfigureItem(hFavoriteContactMenu, MCI_OPT_UNIQUENAME, "ModernClistMenu_ContactRate");
UNSET_UID(mi);
mi.root = hFavoriteContactMenu;
- mi.flags = CMIF_TCHAR | CMIF_SYSTEM; // not included into new menu settings
+ mi.flags = CMIF_UNICODE | CMIF_SYSTEM; // not included into new menu settings
mi.pszService = CLUI_FAVSETRATE;
for (int i = 0; i < _countof(rates); i++) {
mi.hIcolibItem = iconList[i].hIcolib;
diff --git a/plugins/Clist_modern/src/modern_clistopts.cpp b/plugins/Clist_modern/src/modern_clistopts.cpp
index 051ef974a9..2039a0deb4 100644
--- a/plugins/Clist_modern/src/modern_clistopts.cpp
+++ b/plugins/Clist_modern/src/modern_clistopts.cpp
@@ -510,7 +510,7 @@ static INT_PTR CALLBACK DlgProcItemTextOpts(HWND hwndDlg, UINT msg, WPARAM wPara
int item;
wchar_t *align[] = { LPGENW("Left align group names"), LPGENW("Center group names"), LPGENW("Right align group names") };
for (int i = 0; i < sizeof(align) / sizeof(char*); i++)
- item = SendDlgItemMessage(hwndDlg, IDC_ALIGNGROUPCOMBO, CB_ADDSTRING, 0, (LPARAM)TranslateTS(align[i]));
+ item = SendDlgItemMessage(hwndDlg, IDC_ALIGNGROUPCOMBO, CB_ADDSTRING, 0, (LPARAM)TranslateW(align[i]));
SendDlgItemMessage(hwndDlg, IDC_ALIGNGROUPCOMBO, CB_SETCURSEL, db_get_b(NULL, "CList", "AlignGroupCaptions", SETTING_ALIGNGROPCAPTION_DEFAULT), 0);
}
CheckDlgButton(hwndDlg, IDC_ALIGN_RIGHT, db_get_b(NULL, "CList", "TextAlignToRight", SETTING_TEXT_RIGHTALIGN_DEFAULT) == 1 ? BST_CHECKED : BST_UNCHECKED);
@@ -584,7 +584,7 @@ static INT_PTR CALLBACK DlgProcItemSecondLineOpts(HWND hwndDlg, UINT msg, WPARAM
CheckDlgButton(hwndDlg, IDC_DRAW_SMILEYS, db_get_b(NULL, "CList", "SecondLineDrawSmileys", SETTING_SECONDLINE_SMILEYS_DEFAULT) == 1 ? BST_CHECKED : BST_UNCHECKED);
{
- ptrW tszText(db_get_tsa(NULL, "CList", "SecondLineText"));
+ ptrW tszText(db_get_wsa(NULL, "CList", "SecondLineText"));
if (tszText)
SetDlgItemText(hwndDlg, IDC_VARIABLE_TEXT, tszText);
}
@@ -719,7 +719,7 @@ static INT_PTR CALLBACK DlgProcItemSecondLineOpts(HWND hwndDlg, UINT msg, WPARAM
wchar_t t[TEXT_TEXT_MAX_LENGTH];
GetDlgItemText(hwndDlg, IDC_VARIABLE_TEXT, t, _countof(t));
t[TEXT_TEXT_MAX_LENGTH - 1] = '\0';
- db_set_ts(NULL, "CList", "SecondLineText", t);
+ db_set_ws(NULL, "CList", "SecondLineText", t);
db_set_b(NULL, "CList", "SecondLineXStatusHasPriority", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_XSTATUS_HAS_PRIORITY));
db_set_b(NULL, "CList", "SecondLineShowStatusIfNoAway", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SHOW_STATUS_IF_NOAWAY));
@@ -750,7 +750,7 @@ static INT_PTR CALLBACK DlgProcItemThirdLineOpts(HWND hwndDlg, UINT msg, WPARAM
CheckDlgButton(hwndDlg, IDC_DRAW_SMILEYS, db_get_b(NULL, "CList", "ThirdLineDrawSmileys", SETTING_THIRDLINE_SMILEYS_DEFAULT) == 1 ? BST_CHECKED : BST_UNCHECKED);
{
DBVARIANT dbv;
- if (!db_get_ts(NULL, "CList", "ThirdLineText", &dbv)) {
+ if (!db_get_ws(NULL, "CList", "ThirdLineText", &dbv)) {
SetDlgItemText(hwndDlg, IDC_VARIABLE_TEXT, dbv.ptszVal);
db_free(&dbv);
}
diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp
index 6fd42fbb23..a545ba2928 100644
--- a/plugins/Clist_modern/src/modern_clui.cpp
+++ b/plugins/Clist_modern/src/modern_clui.cpp
@@ -411,7 +411,7 @@ HRESULT CLUI::CreateCLC()
Frame.hWnd = pcli->hwndContactTree;
Frame.align = alClient;
Frame.hIcon = Skin_LoadIcon(SKINICON_OTHER_FRAME);
- Frame.Flags = F_VISIBLE | F_SHOWTBTIP | F_NO_SUBCONTAINER | F_TCHAR;
+ Frame.Flags = F_VISIBLE | F_SHOWTBTIP | F_NO_SUBCONTAINER | F_UNICODE;
Frame.tname = LPGENW("My contacts");
Frame.TBtname = TranslateT("My contacts");
hFrameContactTree = (HWND)CallService(MS_CLIST_FRAMES_ADDFRAME, (WPARAM)&Frame, 0);
@@ -666,7 +666,7 @@ void CLUI_ChangeWindowMode()
// 4 - Set Title
wchar_t titleText[255] = { 0 };
DBVARIANT dbv;
- if (db_get_ts(NULL, "CList", "TitleText", &dbv))
+ if (db_get_ws(NULL, "CList", "TitleText", &dbv))
mir_wstrncpy(titleText, _A2W(MIRANDANAME), _countof(titleText));
else {
mir_wstrncpy(titleText, dbv.ptszVal, _countof(titleText));
@@ -888,7 +888,7 @@ static int CLUI_GetConnectingIconForProtoCount(char *szAccoName)
wchar_t *str = wcsrchr(szRelativePath, '\\');
if (str != NULL)
*str = 0;
- PathToAbsoluteT(szRelativePath, tszFolderPath);
+ PathToAbsoluteW(szRelativePath, tszFolderPath);
}
if (szAccoName) {
@@ -920,7 +920,7 @@ static HICON CLUI_LoadIconFromExternalFile(wchar_t *filename, int i)
{
wchar_t szPath[MAX_PATH], szFullPath[MAX_PATH];
mir_snwprintf(szPath, L"Icons\\%s", filename);
- PathToAbsoluteT(szPath, szFullPath);
+ PathToAbsoluteW(szPath, szFullPath);
if (_waccess(szPath, 0))
return NULL;
@@ -1516,12 +1516,12 @@ HANDLE RegisterIcolibIconHandle(char *szIcoID, char *szSectionName, char *szDesc
SKINICONDESC sid = { 0 };
sid.section.a = szSectionName;
sid.pszName = szIcoID;
- sid.flags |= SIDF_PATH_TCHAR;
+ sid.flags |= SIDF_PATH_UNICODE;
sid.description.a = szDescription;
sid.defaultFile.w = fileFull;
if (tszDefaultFile) {
- PathToAbsoluteT(tszDefaultFile, fileFull);
+ PathToAbsoluteW(tszDefaultFile, fileFull);
if (!FileExists(fileFull))
fileFull[0] = '\0';
}
diff --git a/plugins/Clist_modern/src/modern_keyboard.cpp b/plugins/Clist_modern/src/modern_keyboard.cpp
index f4773c48e2..174efbed7f 100644
--- a/plugins/Clist_modern/src/modern_keyboard.cpp
+++ b/plugins/Clist_modern/src/modern_keyboard.cpp
@@ -47,23 +47,23 @@ int InitSkinHotKeys(void)
HOTKEYDESC shk = { 0 };
shk.cbSize = sizeof(shk);
- shk.dwFlags = HKD_TCHAR;
+ shk.dwFlags = HKD_UNICODE;
- shk.ptszDescription = LPGENW("Close Miranda");
+ shk.pwszDescription = LPGENW("Close Miranda");
shk.pszName = "CloseMiranda";
- shk.ptszSection = LPGENW("Main");
+ shk.pwszSection = LPGENW("Main");
shk.pszService = "CLIST/HK/CloseMiranda";
Hotkey_Register(&shk);
- shk.ptszDescription = LPGENW("Restore last status");
+ shk.pwszDescription = LPGENW("Restore last status");
shk.pszName = "RestoreLastStatus";
- shk.ptszSection = LPGENW("Status");
+ shk.pwszSection = LPGENW("Status");
shk.pszService = "CLIST/HK/RestoreStatus";
Hotkey_Register(&shk);
- shk.ptszDescription = LPGENW("Show/Hide offline users");
+ shk.pwszDescription = LPGENW("Show/Hide offline users");
shk.pszName = "ShowHideOfflineUsers";
- shk.ptszSection = LPGENW("Main");
+ shk.pwszSection = LPGENW("Main");
shk.pszService = MS_CLIST_TOGGLEHIDEOFFLINE;
Hotkey_Register(&shk);
diff --git a/plugins/Clist_modern/src/modern_rowtemplateopt.cpp b/plugins/Clist_modern/src/modern_rowtemplateopt.cpp
index 2cbabaafe4..5b160a3c07 100644
--- a/plugins/Clist_modern/src/modern_rowtemplateopt.cpp
+++ b/plugins/Clist_modern/src/modern_rowtemplateopt.cpp
@@ -314,14 +314,14 @@ void RefreshTree(HWND hwndDlg, HTREEITEM hti)
if (cell->type == 0)
mir_snwprintf(buf, TranslateT("Empty %s cell"), cell->cont == TC_COL ? TranslateT("column") : TranslateT("line"));
else
- mir_wstrncpy(buf, TranslateTS(types[cell->type]), _countof(buf));
+ mir_wstrncpy(buf, TranslateW(types[cell->type]), _countof(buf));
}
else
{
if (cell->type == 0)
mir_wstrncpy(buf, (cell->cont != TC_COL ? TranslateT("columns") : TranslateT("lines")), _countof(buf));
else
- mir_snwprintf(buf, TranslateT("%s, contain %s"), TranslateTS(types[cell->type]), cell->cont != TC_COL ? TranslateT("columns") : TranslateT("lines"));
+ mir_snwprintf(buf, TranslateT("%s, contain %s"), TranslateW(types[cell->type]), cell->cont != TC_COL ? TranslateT("columns") : TranslateT("lines"));
}
if (cell->layer) mir_wstrncat(buf, TranslateT(" layered"), _countof(buf) - mir_wstrlen(buf));
tvi.mask = TVIF_HANDLE | TVIF_TEXT;
@@ -357,21 +357,21 @@ INT_PTR CALLBACK DlgTmplEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
int i, item;
for (i = 0; i < _countof(types); i++) {
- item = SendDlgItemMessage(hwndDlg, IDC_CONTTYPE, CB_ADDSTRING, 0, (LPARAM)TranslateTS(types[i]));
+ item = SendDlgItemMessage(hwndDlg, IDC_CONTTYPE, CB_ADDSTRING, 0, (LPARAM)TranslateW(types[i]));
SendDlgItemMessage(hwndDlg, IDC_CONTTYPE, CB_SETITEMDATA, item, 0);
}
SendDlgItemMessage(hwndDlg, IDC_CONTTYPE, CB_SETCURSEL, 0, 0);
wchar_t *h_alignment[] = { L"left", L"hCenter", L"right" };
for (i = 0; i < _countof(h_alignment); i++) {
- item = SendDlgItemMessage(hwndDlg, IDC_HALIGN, CB_ADDSTRING, 0, (LPARAM)TranslateTS(h_alignment[i]));
+ item = SendDlgItemMessage(hwndDlg, IDC_HALIGN, CB_ADDSTRING, 0, (LPARAM)TranslateW(h_alignment[i]));
SendDlgItemMessage(hwndDlg, IDC_HALIGN, CB_SETITEMDATA, item, 0);
}
SendDlgItemMessage(hwndDlg, IDC_HALIGN, CB_SETCURSEL, 0, 0);
wchar_t *v_alignment[] = { L"top", L"vCenter", L"bottom" };
for (i = 0; i < _countof(v_alignment); i++) {
- item = SendDlgItemMessage(hwndDlg, IDC_VALIGN, CB_ADDSTRING, 0, (LPARAM)TranslateTS(v_alignment[i]));
+ item = SendDlgItemMessage(hwndDlg, IDC_VALIGN, CB_ADDSTRING, 0, (LPARAM)TranslateW(v_alignment[i]));
SendDlgItemMessage(hwndDlg, IDC_VALIGN, CB_SETITEMDATA, item, 0);
}
SendDlgItemMessage(hwndDlg, IDC_VALIGN, CB_SETCURSEL, 0, 0);
diff --git a/plugins/Clist_modern/src/modern_skinengine.cpp b/plugins/Clist_modern/src/modern_skinengine.cpp
index f493876e60..167a0a8d07 100644
--- a/plugins/Clist_modern/src/modern_skinengine.cpp
+++ b/plugins/Clist_modern/src/modern_skinengine.cpp
@@ -1469,7 +1469,7 @@ void ske_PreMultiplyChannels(HBITMAP hbmp, BYTE Mult)
int ske_GetFullFilename(wchar_t *buf, const wchar_t *file, wchar_t *skinfolder, BOOL madeAbsolute)
{
- wchar_t *SkinPlace = db_get_tsa(NULL, SKIN, "SkinFolder");
+ wchar_t *SkinPlace = db_get_wsa(NULL, SKIN, "SkinFolder");
if (SkinPlace == NULL)
SkinPlace = mir_wstrdup(L"\\Skin\\default");
@@ -1481,9 +1481,9 @@ int ske_GetFullFilename(wchar_t *buf, const wchar_t *file, wchar_t *skinfolder,
if (madeAbsolute) {
if (b2[0] == '\\' && b2[1] != '\\')
- PathToAbsoluteT(b2 + 1, buf);
+ PathToAbsoluteW(b2 + 1, buf);
else
- PathToAbsoluteT(b2, buf);
+ PathToAbsoluteW(b2, buf);
}
else mir_wstrncpy(buf, b2, MAX_PATH);
@@ -1912,7 +1912,7 @@ static int ske_GetSkinFromDB(char *, SKINOBJECTSLIST *Skin)
Skin->pMaskList = (LISTMODERNMASK*)mir_alloc(sizeof(LISTMODERNMASK));
memset(Skin->pMaskList, 0, sizeof(LISTMODERNMASK));
- Skin->szSkinPlace = db_get_tsa(NULL, SKIN, "SkinFolder");
+ Skin->szSkinPlace = db_get_wsa(NULL, SKIN, "SkinFolder");
if (!Skin->szSkinPlace || (wcschr(Skin->szSkinPlace, '%') && !db_get_b(NULL, SKIN, "Modified", 0))) {
BOOL bOnlyObjects = FALSE;
if (Skin->szSkinPlace && wcschr(Skin->szSkinPlace, '%'))
@@ -1972,8 +1972,8 @@ int ske_LoadSkinFromIniFile(wchar_t *szFileName, BOOL bOnlyObjects)
IniParser::GetSkinFolder(szFileName, skinFolder);
PathToRelativeT(szFileName, skinFile);
- db_set_ts(NULL, SKIN, "SkinFolder", skinFolder);
- db_set_ts(NULL, SKIN, "SkinFile", skinFile);
+ db_set_ws(NULL, SKIN, "SkinFolder", skinFolder);
+ db_set_ws(NULL, SKIN, "SkinFile", skinFile);
parser.Parse(IniParser::WriteStrToDb, 1);
return 0;
diff --git a/plugins/Clist_modern/src/modern_skinopt.cpp b/plugins/Clist_modern/src/modern_skinopt.cpp
index 5207c15c8b..c52fa1533e 100644
--- a/plugins/Clist_modern/src/modern_skinopt.cpp
+++ b/plugins/Clist_modern/src/modern_skinopt.cpp
@@ -55,7 +55,7 @@ int SkinOptInit(WPARAM wParam, LPARAM)
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_SKIN);
odp.pwszGroup = LPGENW("Skins");
odp.pwszTitle = LPGENW("Contact list");
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
Options_AddPage(wParam, &odp);
}
return 0;
@@ -262,7 +262,7 @@ INT_PTR CALLBACK DlgSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara
GetPrivateProfileString(L"Skin_Description_Section", L"Preview", L"", imfn, _countof(imfn), sd->File);
IniParser::GetSkinFolder(sd->File, skinfolder);
mir_snwprintf(prfn, L"%s\\%s", skinfolder, imfn);
- PathToAbsoluteT(prfn, imfn);
+ PathToAbsoluteW(prfn, imfn);
hPreviewBitmap = ske_LoadGlyphImage(imfn);
EnableWindow(GetDlgItem(hwndDlg, IDC_BUTTON_APPLY_SKIN), TRUE);
@@ -367,9 +367,9 @@ HTREEITEM FillAvailableSkinList(HWND hwndDlg)
SearchSkinFiles(hwndDlg, SkinsFolder);
{
wchar_t skinfull[MAX_PATH];
- ptrW skinfile(db_get_tsa(NULL, SKIN, "SkinFile"));
+ ptrW skinfile(db_get_wsa(NULL, SKIN, "SkinFile"));
if (skinfile) {
- PathToAbsoluteT(skinfile, skinfull);
+ PathToAbsoluteW(skinfile, skinfull);
res = AddSkinToListFullName(hwndDlg, skinfull);
}
}
@@ -471,10 +471,10 @@ HTREEITEM AddItemToTree(HWND hTree, wchar_t *itemName, void *data)
INT_PTR SvcActiveSkin(WPARAM, LPARAM)
{
- ptrW skinfile(db_get_tsa(NULL, SKIN, "SkinFile"));
+ ptrW skinfile(db_get_wsa(NULL, SKIN, "SkinFile"));
if (skinfile) {
wchar_t skinfull[MAX_PATH];
- PathToAbsoluteT(skinfile, skinfull);
+ PathToAbsoluteW(skinfile, skinfull);
return (INT_PTR)mir_wstrdup(skinfull);
}
@@ -525,7 +525,7 @@ INT_PTR SvcPreviewSkin(WPARAM wParam, LPARAM lParam)
GetPrivateProfileString(L"Skin_Description_Section", L"Preview", L"", imfn, _countof(imfn), (LPCTSTR)lParam);
IniParser::GetSkinFolder((LPCTSTR)lParam, skinfolder);
mir_snwprintf(prfn, L"%s\\%s", skinfolder, imfn);
- PathToAbsoluteT(prfn, imfn);
+ PathToAbsoluteW(prfn, imfn);
hPreviewBitmap = ske_LoadGlyphImage(imfn);
if (hPreviewBitmap) {
diff --git a/plugins/Clist_modern/src/modern_skinselector.cpp b/plugins/Clist_modern/src/modern_skinselector.cpp
index 119ceb7f8d..f50b22618a 100644
--- a/plugins/Clist_modern/src/modern_skinselector.cpp
+++ b/plugins/Clist_modern/src/modern_skinselector.cpp
@@ -469,8 +469,8 @@ int RegisterButtonByParce(char * ObjectName, char * Params)
+ ((TL[3] == 'C') ? SBF_ALIGN_BR_VCENTER : 0)
+ ((TL[4] == 'I') ? SBF_CALL_ON_PRESS : 0);
if (a)
- return ModernSkinButton_AddButton(pcli->hwndContactList, ObjectName + 1, pServiceName, pStatusServiceName, "\0", Left, Top, Right, Bottom, alingnto, TranslateTS(Hint), Section, Type, MinWidth, MinHeight);
- return ModernSkinButton_AddButton(pcli->hwndContactList, ObjectName + 1, pServiceName, pStatusServiceName, "\0", Left, Top, Right, Bottom, alingnto, TranslateTS(Hint), NULL, NULL, MinWidth, MinHeight);
+ return ModernSkinButton_AddButton(pcli->hwndContactList, ObjectName + 1, pServiceName, pStatusServiceName, "\0", Left, Top, Right, Bottom, alingnto, TranslateW(Hint), Section, Type, MinWidth, MinHeight);
+ return ModernSkinButton_AddButton(pcli->hwndContactList, ObjectName + 1, pServiceName, pStatusServiceName, "\0", Left, Top, Right, Bottom, alingnto, TranslateW(Hint), NULL, NULL, MinWidth, MinHeight);
}
//Parse DB string and add object
diff --git a/plugins/Clist_modern/src/modern_statusbar.cpp b/plugins/Clist_modern/src/modern_statusbar.cpp
index 8e2e364a9b..0284519c59 100644
--- a/plugins/Clist_modern/src/modern_statusbar.cpp
+++ b/plugins/Clist_modern/src/modern_statusbar.cpp
@@ -106,7 +106,7 @@ int LoadStatusBarData()
if (g_CluiData.fDisableSkinEngine) {
g_StatusBarData.bkColour = cliGetColor("StatusBar", "BkColour", CLCDEFAULT_BKCOLOUR);
if (db_get_b(NULL, "StatusBar", "UseBitmap", CLCDEFAULT_USEBITMAP)) {
- ptrW tszBitmapName(db_get_tsa(NULL, "StatusBar", "BkBitmap"));
+ ptrW tszBitmapName(db_get_wsa(NULL, "StatusBar", "BkBitmap"));
if (tszBitmapName)
g_StatusBarData.hBmpBackground = Bitmap_Load(tszBitmapName);
}
@@ -345,7 +345,7 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC)
if ((p.xStatusMode & 8) && p.iProtoStatus > ID_STATUS_OFFLINE) {
wchar_t str[512];
CUSTOM_STATUS cs = { sizeof(cs) };
- cs.flags = CSSF_MASK_NAME | CSSF_TCHAR;
+ cs.flags = CSSF_MASK_NAME | CSSF_UNICODE;
cs.ptszName = str;
if (CallProtoService(p.szAccountName, PS_GETCUSTOMSTATUSEX, 0, (LPARAM)&cs) == 0)
p.tszProtoXStatus = mir_wstrdup(str);
@@ -883,7 +883,7 @@ HWND StatusBar_Create(HWND parent)
Frame.hWnd = hModernStatusBar;
Frame.align = alBottom;
Frame.hIcon = Skin_LoadIcon(SKINICON_OTHER_FRAME);
- Frame.Flags = F_LOCKED | F_NOBORDER | F_NO_SUBCONTAINER | F_TCHAR;
+ Frame.Flags = F_LOCKED | F_NOBORDER | F_NO_SUBCONTAINER | F_UNICODE;
if (db_get_b(NULL, "CLUI", "ShowSBar", SETTING_SHOWSBAR_DEFAULT))
Frame.Flags |= F_VISIBLE;
Frame.height = h;
diff --git a/plugins/Clist_modern/src/modern_statusbar_options.cpp b/plugins/Clist_modern/src/modern_statusbar_options.cpp
index 44218b6bba..c875d29f5c 100644
--- a/plugins/Clist_modern/src/modern_statusbar_options.cpp
+++ b/plugins/Clist_modern/src/modern_statusbar_options.cpp
@@ -239,14 +239,14 @@ INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
{
wchar_t *align[] = { LPGENW("Left"), LPGENW("Center"), LPGENW("Right") };
for (int i = 0; i < _countof(align); i++)
- SendDlgItemMessage(hwndDlg, IDC_SBAR_HORIZ_ALIGN, CB_ADDSTRING, 0, (LPARAM)TranslateTS(align[i]));
+ SendDlgItemMessage(hwndDlg, IDC_SBAR_HORIZ_ALIGN, CB_ADDSTRING, 0, (LPARAM)TranslateW(align[i]));
SendDlgItemMessage(hwndDlg, IDC_SBAR_HORIZ_ALIGN, CB_SETCURSEL, db_get_b(NULL, "CLUI", "Align", SETTING_ALIGN_DEFAULT), 0);
}
{
wchar_t *align[] = { LPGENW("Top"), LPGENW("Center"), LPGENW("Bottom") };
for (int i = 0; i < _countof(align); i++)
- SendDlgItemMessage(hwndDlg, IDC_SBAR_VERT_ALIGN, CB_ADDSTRING, 0, (LPARAM)TranslateTS(align[i]));
+ SendDlgItemMessage(hwndDlg, IDC_SBAR_VERT_ALIGN, CB_ADDSTRING, 0, (LPARAM)TranslateW(align[i]));
SendDlgItemMessage(hwndDlg, IDC_SBAR_VERT_ALIGN, CB_SETCURSEL, db_get_b(NULL, "CLUI", "VAlign", SETTING_VALIGN_DEFAULT), 0);
}
diff --git a/plugins/Clist_modern/src/modern_toolbar.cpp b/plugins/Clist_modern/src/modern_toolbar.cpp
index 3009c46d0c..b31609f534 100644
--- a/plugins/Clist_modern/src/modern_toolbar.cpp
+++ b/plugins/Clist_modern/src/modern_toolbar.cpp
@@ -138,7 +138,7 @@ static int ehhToolBarBackgroundSettingsChanged(WPARAM, LPARAM)
if (g_CluiData.fDisableSkinEngine) {
tbdat.mtb_bkColour = cliGetColor("ToolBar", "BkColour", CLCDEFAULT_BKCOLOUR);
if (db_get_b(NULL, "ToolBar", "UseBitmap", CLCDEFAULT_USEBITMAP)) {
- ptrW tszBitmapName(db_get_tsa(NULL, "ToolBar", "BkBitmap"));
+ ptrW tszBitmapName(db_get_wsa(NULL, "ToolBar", "BkBitmap"));
if (tszBitmapName)
tbdat.mtb_hBmpBackground = Bitmap_Load(tszBitmapName);
}
@@ -282,7 +282,7 @@ void CustomizeToolbar(HWND hwnd)
Frame.tname = L"Toolbar";
Frame.hWnd = hwnd;
Frame.align = alTop;
- Frame.Flags = F_VISIBLE | F_NOBORDER | F_LOCKED | F_TCHAR | F_NO_SUBCONTAINER;
+ Frame.Flags = F_VISIBLE | F_NOBORDER | F_LOCKED | F_UNICODE | F_NO_SUBCONTAINER;
Frame.height = 18;
Frame.hIcon = Skin_LoadIcon(SKINICON_OTHER_FRAME);
pMTBInfo->hFrame = (HANDLE)CallService(MS_CLIST_FRAMES_ADDFRAME, (WPARAM)&Frame, 0);
@@ -344,7 +344,7 @@ static int Toolbar_ModulesLoaded(WPARAM, LPARAM)
}
if (!ServiceExists(MS_TTB_REMOVEBUTTON) && bOldSetting == 1)
- if (IDYES == MessageBox(NULL, TranslateTS(szWarning), TranslateT("Toolbar upgrade"), MB_ICONQUESTION | MB_YESNO))
+ if (IDYES == MessageBox(NULL, TranslateW(szWarning), TranslateT("Toolbar upgrade"), MB_ICONQUESTION | MB_YESNO))
Utils_OpenUrl(szUrl);
return 0;
diff --git a/plugins/Clist_modern/src/modern_viewmodebar.cpp b/plugins/Clist_modern/src/modern_viewmodebar.cpp
index bcfec081be..adb51b8167 100644
--- a/plugins/Clist_modern/src/modern_viewmodebar.cpp
+++ b/plugins/Clist_modern/src/modern_viewmodebar.cpp
@@ -511,7 +511,7 @@ static void UpdateFilters()
return;
mir_snprintf(szSetting, "%c%s_GF", 246, szBuf);
- ptrW szGF(db_get_tsa(NULL, CLVM_MODULE, szSetting));
+ ptrW szGF(db_get_wsa(NULL, CLVM_MODULE, szSetting));
if (szGF == NULL)
return;
@@ -926,7 +926,7 @@ LRESULT CALLBACK ViewModeFrameWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
hwndSelector = CreateWindow(MIRANDABUTTONCLASS, L"", BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | WS_TABSTOP, 0, 0, 20, 20,
hwnd, (HMENU)IDC_SELECTMODE, g_hInst, NULL);
MakeButtonSkinned(hwndSelector);
- SendMessage(hwndSelector, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Select a view mode"), BATF_TCHAR);
+ SendMessage(hwndSelector, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Select a view mode"), BATF_UNICODE);
SendMessage(hwndSelector, BUTTONSETMARGINS, 0, (LPARAM)&rcMargins);
SendMessage(hwndSelector, BUTTONSETID, 0, (LPARAM) "ViewMode.Select");
SendMessage(hwndSelector, WM_SETFONT, 0, (LPARAM)FONTID_VIEMODES + 1);
@@ -938,7 +938,7 @@ LRESULT CALLBACK ViewModeFrameWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
HWND hwndButton = CreateWindow(MIRANDABUTTONCLASS, L"", BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | WS_TABSTOP, 0, 0, 20, 20,
hwnd, (HMENU)IDC_CONFIGUREMODES, g_hInst, NULL);
MakeButtonSkinned(hwndButton);
- SendMessage(hwndButton, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Setup view modes"), BATF_TCHAR);
+ SendMessage(hwndButton, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Setup view modes"), BATF_UNICODE);
SendMessage(hwndButton, BUTTONSETID, 0, (LPARAM) "ViewMode.Setup");
SendMessage(hwndButton, BUTTONSETASFLATBTN, TRUE, 0);
SendMessage(hwndButton, MBM_UPDATETRANSPARENTFLAG, 0, 2);
@@ -946,7 +946,7 @@ LRESULT CALLBACK ViewModeFrameWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
hwndButton = CreateWindow(MIRANDABUTTONCLASS, L"", BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | WS_TABSTOP, 0, 0, 20, 20,
hwnd, (HMENU)IDC_RESETMODES, g_hInst, NULL);
MakeButtonSkinned(hwndButton);
- SendMessage(hwndButton, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Clear view mode and return to default display"), BATF_TCHAR);
+ SendMessage(hwndButton, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Clear view mode and return to default display"), BATF_UNICODE);
SendMessage(hwndButton, BUTTONSETID, 0, (LPARAM) "ViewMode.Clear");
SendMessage(hwnd, WM_USER + 100, 0, 0);
SendMessage(hwndButton, BUTTONSETASFLATBTN, TRUE, 0);
@@ -1167,7 +1167,7 @@ static int ehhViewModeBackgroundSettingsChanged(WPARAM, LPARAM)
if (g_CluiData.fDisableSkinEngine) {
view_mode.bkColour = cliGetColor("ViewMode", "BkColour", CLCDEFAULT_BKCOLOUR);
if (db_get_b(NULL, "ViewMode", "UseBitmap", CLCDEFAULT_USEBITMAP)) {
- ptrW tszBitmapName(db_get_tsa(NULL, "ViewMode", "BkBitmap"));
+ ptrW tszBitmapName(db_get_wsa(NULL, "ViewMode", "BkBitmap"));
if (tszBitmapName)
view_mode.hBmpBackground = Bitmap_Load(tszBitmapName);
}
@@ -1202,7 +1202,7 @@ void CreateViewModeFrame()
frame.hIcon = Skin_LoadIcon(SKINICON_OTHER_FRAME);
frame.height = 18;
frame.TBtname = TranslateT("View modes");
- frame.Flags = F_VISIBLE | F_SHOWTBTIP | F_NOBORDER | F_NO_SUBCONTAINER | F_TCHAR;
+ frame.Flags = F_VISIBLE | F_SHOWTBTIP | F_NOBORDER | F_NO_SUBCONTAINER | F_UNICODE;
frame.align = alBottom;
frame.hWnd = CreateWindowEx(0, L"CLVMFrameWindow", _A2W(CLVM_MODULE), WS_VISIBLE | WS_CHILD | WS_TABSTOP | WS_CLIPCHILDREN, 0, 0, 20, 20, pcli->hwndContactList, (HMENU)0, g_hInst, NULL);
g_hwndViewModeFrame = frame.hWnd;
@@ -1267,7 +1267,7 @@ void ApplyViewMode(const char *Name, bool onlySelector)
mir_free(dbv.pszVal);
}
mir_snprintf(szSetting, "%c%s_GF", 246, Name);
- if (!db_get_ts(NULL, CLVM_MODULE, szSetting, &dbv)) {
+ if (!db_get_ws(NULL, CLVM_MODULE, szSetting, &dbv)) {
if (mir_wstrlen(dbv.ptszVal) >= 2) {
mir_wstrncpy(g_CluiData.groupFilter, dbv.ptszVal, _countof(g_CluiData.groupFilter));
g_CluiData.groupFilter[_countof(g_CluiData.groupFilter) - 1] = 0;
diff --git a/plugins/Clist_nicer/src/clcitems.cpp b/plugins/Clist_nicer/src/clcitems.cpp
index 4aeb70399c..b50a7127e5 100644
--- a/plugins/Clist_nicer/src/clcitems.cpp
+++ b/plugins/Clist_nicer/src/clcitems.cpp
@@ -163,7 +163,7 @@ BYTE GetCachedStatusMsg(TExtraCache *p, char *szProto)
MCONTACT hContact = p->hContact;
DBVARIANT dbv = { 0 };
- INT_PTR result = db_get_ts(hContact, "CList", "StatusMsg", &dbv);
+ INT_PTR result = db_get_ws(hContact, "CList", "StatusMsg", &dbv);
if (!result && mir_wstrlen(dbv.ptszVal) > 0)
p->bStatusMsgValid = STATUSMSG_CLIST;
else {
@@ -172,11 +172,11 @@ BYTE GetCachedStatusMsg(TExtraCache *p, char *szProto)
if (szProto) {
if (!result)
db_free(&dbv);
- if (!(result = db_get_ts(hContact, szProto, "YMsg", &dbv)) && mir_wstrlen(dbv.ptszVal) > 0)
+ if (!(result = db_get_ws(hContact, szProto, "YMsg", &dbv)) && mir_wstrlen(dbv.ptszVal) > 0)
p->bStatusMsgValid = STATUSMSG_YIM;
- else if (!(result = db_get_ts(hContact, szProto, "StatusDescr", &dbv)) && mir_wstrlen(dbv.ptszVal) > 0)
+ else if (!(result = db_get_ws(hContact, szProto, "StatusDescr", &dbv)) && mir_wstrlen(dbv.ptszVal) > 0)
p->bStatusMsgValid = STATUSMSG_GG;
- else if (!(result = db_get_ts(hContact, szProto, "XStatusMsg", &dbv)) && mir_wstrlen(dbv.ptszVal) > 0)
+ else if (!(result = db_get_ws(hContact, szProto, "XStatusMsg", &dbv)) && mir_wstrlen(dbv.ptszVal) > 0)
p->bStatusMsgValid = STATUSMSG_XSTATUS;
}
}
@@ -184,7 +184,7 @@ BYTE GetCachedStatusMsg(TExtraCache *p, char *szProto)
if (p->bStatusMsgValid == STATUSMSG_NOTFOUND) { // no status msg, consider xstatus name (if available)
if (!result)
db_free(&dbv);
- result = db_get_ts(hContact, szProto, "XStatusName", &dbv);
+ result = db_get_ws(hContact, szProto, "XStatusName", &dbv);
if (!result && mir_wstrlen(dbv.ptszVal) > 1) {
size_t iLen = mir_wstrlen(dbv.ptszVal);
p->bStatusMsgValid = STATUSMSG_XSTATUSNAME;
@@ -200,11 +200,11 @@ BYTE GetCachedStatusMsg(TExtraCache *p, char *szProto)
cst.flags = CSSF_MASK_STATUS;
cst.status = &xStatus;
if (ProtoServiceExists(szProto, PS_GETCUSTOMSTATUSEX) && !CallProtoService(szProto, PS_GETCUSTOMSTATUSEX, hContact, (LPARAM)&cst) && xStatus > 0) {
- cst.flags = CSSF_MASK_NAME | CSSF_DEFAULT_NAME | CSSF_TCHAR;
+ cst.flags = CSSF_MASK_NAME | CSSF_DEFAULT_NAME | CSSF_UNICODE;
cst.wParam = &xStatus2;
cst.ptszName = xStatusName;
if (!CallProtoService(szProto, PS_GETCUSTOMSTATUSEX, hContact, (LPARAM)&cst)) {
- wchar_t *szwXstatusName = TranslateTS(xStatusName);
+ wchar_t *szwXstatusName = TranslateW(xStatusName);
p->statusMsg = (wchar_t *)realloc(p->statusMsg, (mir_wstrlen(szwXstatusName) + 2) * sizeof(wchar_t));
wcsncpy(p->statusMsg, szwXstatusName, mir_wstrlen(szwXstatusName) + 1);
p->bStatusMsgValid = STATUSMSG_XSTATUSNAME;
@@ -407,7 +407,7 @@ int CLVM_GetContactHiddenStatus(MCONTACT hContact, char *szProto, struct ClcData
}
if (cfg::dat.bFilterEffective & CLVM_FILTER_GROUPS) {
- ptrW tszGroup(db_get_tsa(hContact, "CList", "Group"));
+ ptrW tszGroup(db_get_wsa(hContact, "CList", "Group"));
if (tszGroup != NULL) {
wchar_t szGroupMask[256];
mir_snwprintf(szGroupMask, L"%s|", tszGroup);
diff --git a/plugins/Clist_nicer/src/clcopts.cpp b/plugins/Clist_nicer/src/clcopts.cpp
index 5d73f252b9..579407f4d6 100644
--- a/plugins/Clist_nicer/src/clcopts.cpp
+++ b/plugins/Clist_nicer/src/clcopts.cpp
@@ -88,7 +88,7 @@ static void FillCheckBoxTree(HWND hwndTree, const struct CheckBoxValues_t *value
tvis.item.mask = TVIF_PARAM | TVIF_TEXT | TVIF_STATE;
for (i = 0; i < nValues; i++) {
tvis.item.lParam = values[i].style;
- tvis.item.pszText = TranslateTS(values[i].szDescr);
+ tvis.item.pszText = TranslateW(values[i].szDescr);
tvis.item.stateMask = TVIS_STATEIMAGEMASK;
tvis.item.state = INDEXTOSTATEIMAGEMASK((style & tvis.item.lParam) != 0 ? 2 : 1);
TreeView_InsertItem(hwndTree, &tvis);
@@ -710,9 +710,9 @@ static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
CheckDlgButton(hwndDlg, IDC_SKINMODE, cfg::dat.bWallpaperMode ? BST_CHECKED : BST_UNCHECKED);
{
DBVARIANT dbv;
- if (!db_get_ts(NULL, "CLC", "BkBitmap", &dbv)) {
+ if (!db_get_ws(NULL, "CLC", "BkBitmap", &dbv)) {
wchar_t szPath[MAX_PATH];
- if (PathToAbsoluteT(dbv.ptszVal, szPath))
+ if (PathToAbsoluteW(dbv.ptszVal, szPath))
SetDlgItemText(hwndDlg, IDC_FILENAME, szPath);
db_free(&dbv);
diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp
index 639cffa96e..5cde52aab1 100644
--- a/plugins/Clist_nicer/src/clui.cpp
+++ b/plugins/Clist_nicer/src/clui.cpp
@@ -185,7 +185,7 @@ static int CreateCLC()
frame.TBtname = TranslateT("Event area");
frame.hIcon = Skin_LoadIcon(SKINICON_OTHER_FRAME);
frame.height = 20;
- frame.Flags = F_VISIBLE | F_SHOWTBTIP | F_NOBORDER | F_TCHAR;
+ frame.Flags = F_VISIBLE | F_SHOWTBTIP | F_NOBORDER | F_UNICODE;
frame.align = alBottom;
frame.hWnd = CreateWindowExA(0, "EventAreaClass", "evt", WS_VISIBLE | WS_CHILD | WS_TABSTOP, 0, 0, 20, 20, pcli->hwndContactList, (HMENU)0, g_hInst, NULL);
g_hwndEventArea = frame.hWnd;
@@ -200,12 +200,12 @@ static int CreateCLC()
Frame.hWnd = pcli->hwndContactTree;
Frame.align = alClient;
Frame.hIcon = Skin_LoadIcon(SKINICON_OTHER_FRAME);
- Frame.Flags = F_VISIBLE | F_SHOWTB | F_SHOWTBTIP | F_NOBORDER | F_TCHAR;
+ Frame.Flags = F_VISIBLE | F_SHOWTB | F_SHOWTBTIP | F_NOBORDER | F_UNICODE;
Frame.tname = L"My contacts";
Frame.TBtname = TranslateT("My contacts");
Frame.height = 200;
hFrameContactTree = (HWND)CallService(MS_CLIST_FRAMES_ADDFRAME, (WPARAM)&Frame, 0);
- CallService(MS_CLIST_FRAMES_SETFRAMEOPTIONS, MAKEWPARAM(FO_TBTIPNAME | FO_TCHAR, hFrameContactTree), (LPARAM)TranslateT("My contacts"));
+ CallService(MS_CLIST_FRAMES_SETFRAMEOPTIONS, MAKEWPARAM(FO_TBTIPNAME | FO_UNICODETEXT, hFrameContactTree), (LPARAM)TranslateT("My contacts"));
// ugly, but working hack. Prevent that annoying little scroll bar from appearing in the "My Contacts" title bar
DWORD flags = (DWORD)CallService(MS_CLIST_FRAMES_GETFRAMEOPTIONS, MAKEWPARAM(FO_FLAGS, hFrameContactTree), 0);
@@ -1983,7 +1983,7 @@ static clistFontDescr[] =
void FS_RegisterFonts()
{
- FontIDT fid = { sizeof(fid) };
+ FontIDW fid = { sizeof(fid) };
wcsncpy(fid.group, LPGENW("Contact list"), _countof(fid.group));
strncpy(fid.dbSettingsGroup, "CLC", 5);
fid.flags = FIDF_DEFAULTVALID | FIDF_ALLOWEFFECTS | FIDF_APPENDNAME | FIDF_SAVEPOINTSIZE;
@@ -2008,12 +2008,12 @@ void FS_RegisterFonts()
mir_snprintf(idstr, "Font%d", i);
strncpy(fid.prefix, idstr, _countof(fid.prefix));
fid.order = i;
- FontRegisterT(&fid);
+ FontRegisterW(&fid);
}
ReleaseDC(NULL, hdc);
// and colours
- ColourIDT colourid = { 0 };
+ ColourIDW colourid = { 0 };
colourid.cbSize = sizeof(colourid);
colourid.order = 0;
strncpy(colourid.dbSettingsGroup, "CLC", sizeof(colourid.dbSettingsGroup));
@@ -2022,30 +2022,30 @@ void FS_RegisterFonts()
wcsncpy(colourid.name, LPGENW("Background"), _countof(colourid.name));
wcsncpy(colourid.group, LPGENW("Contact list"), _countof(colourid.group));
colourid.defcolour = CLCDEFAULT_BKCOLOUR;
- ColourRegisterT(&colourid);
+ ColourRegisterW(&colourid);
strncpy(colourid.setting, "SelTextColour", sizeof(colourid.setting));
wcsncpy(colourid.name, LPGENW("Selected text"), _countof(colourid.name));
colourid.order = 1;
colourid.defcolour = CLCDEFAULT_SELTEXTCOLOUR;
- ColourRegisterT(&colourid);
+ ColourRegisterW(&colourid);
strncpy(colourid.setting, "HotTextColour", sizeof(colourid.setting));
wcsncpy(colourid.name, LPGENW("Hottrack text"), _countof(colourid.name));
colourid.order = 1;
colourid.defcolour = CLCDEFAULT_HOTTEXTCOLOUR;
- ColourRegisterT(&colourid);
+ ColourRegisterW(&colourid);
strncpy(colourid.setting, "QuickSearchColour", sizeof(colourid.setting));
wcsncpy(colourid.name, LPGENW("Quicksearch text"), _countof(colourid.name));
colourid.order = 1;
colourid.defcolour = CLCDEFAULT_QUICKSEARCHCOLOUR;
- ColourRegisterT(&colourid);
+ ColourRegisterW(&colourid);
strncpy(colourid.dbSettingsGroup, "CLUI", sizeof(colourid.dbSettingsGroup));
strncpy(colourid.setting, "clr_frameborder", sizeof(colourid.setting));
wcsncpy(colourid.name, LPGENW("Embedded frames border"), _countof(colourid.name));
colourid.order = 1;
colourid.defcolour = RGB(40, 40, 40);
- ColourRegisterT(&colourid);
+ ColourRegisterW(&colourid);
}
diff --git a/plugins/Clist_nicer/src/cluiframes.cpp b/plugins/Clist_nicer/src/cluiframes.cpp
index 4e7b17a37f..a3a6475ccf 100644
--- a/plugins/Clist_nicer/src/cluiframes.cpp
+++ b/plugins/Clist_nicer/src/cluiframes.cpp
@@ -441,7 +441,7 @@ int DBStoreFrameSettingsAtPos(int pos, int Frameid)
_itoa(pos, sadd, 10);
- db_set_ts(0, CLUIFrameModule, AS(buf, "Name", sadd), Frames[Frameid].name);
+ db_set_ws(0, CLUIFrameModule, AS(buf, "Name", sadd), Frames[Frameid].name);
//boolean
db_set_b(0, CLUIFrameModule, AS(buf, "Collapse", sadd), (BYTE)btoint(Frames[Frameid].collapsed));
db_set_b(0, CLUIFrameModule, AS(buf, "Locked", sadd), (BYTE)btoint(Frames[Frameid].Locked));
@@ -472,7 +472,7 @@ int LocateStorePosition(int Frameid, int maxstored)
for (int i = 0; i < maxstored; i++) {
char settingname[255];
mir_snprintf(settingname, "Name%d", i);
- ptrW frmname(db_get_tsa(0, CLUIFrameModule, settingname));
+ ptrW frmname(db_get_wsa(0, CLUIFrameModule, settingname));
if (frmname == NULL) continue;
if (mir_wstrcmpi(frmname, Frames[Frameid].name) == 0)
return i;
@@ -1342,7 +1342,7 @@ static int CLUIFramesLoadMainMenu()
// create frames menu
CMenuItem mi;
mi.root = cont.MainMenuItem;
- mi.flags = CMIF_TCHAR | CMIF_SYSTEM;
+ mi.flags = CMIF_UNICODE | CMIF_SYSTEM;
int separator = (int)3000200000;
for (int i = 0; i < nFramescount; i++) {
FRAMEWND &F = Frames[i];
@@ -2153,7 +2153,7 @@ int OnFrameTitleBarBackgroundChange()
hBmpBackground = NULL;
}
if (db_get_b(NULL, "FrameTitleBar", "UseBitmap", CLCDEFAULT_USEBITMAP)) {
- ptrW tszBitmapName(db_get_tsa(NULL, "FrameTitleBar", "BkBitmap"));
+ ptrW tszBitmapName(db_get_wsa(NULL, "FrameTitleBar", "BkBitmap"));
if (tszBitmapName != NULL)
hBmpBackground = Bitmap_Load(tszBitmapName);
}
diff --git a/plugins/Clist_nicer/src/cluiopts.cpp b/plugins/Clist_nicer/src/cluiopts.cpp
index f3cdc54267..f99933c311 100644
--- a/plugins/Clist_nicer/src/cluiopts.cpp
+++ b/plugins/Clist_nicer/src/cluiopts.cpp
@@ -84,7 +84,7 @@ INT_PTR CALLBACK DlgProcCluiOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
Utils::enableDlgControl(hwndDlg, IDC_AUTOSIZEUPWARD, FALSE);
}
{
- ptrW tszTitle(db_get_tsa(NULL, "CList", "TitleText"));
+ ptrW tszTitle(db_get_wsa(NULL, "CList", "TitleText"));
if (tszTitle != NULL)
SetDlgItemText(hwndDlg, IDC_TITLETEXT, tszTitle);
else
@@ -235,7 +235,7 @@ INT_PTR CALLBACK DlgProcCluiOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
wchar_t title[256];
GetDlgItemText(hwndDlg, IDC_TITLETEXT, title, _countof(title));
- db_set_ts(NULL, "CList", "TitleText", title);
+ db_set_ws(NULL, "CList", "TitleText", title);
SetWindowText(pcli->hwndContactList, title);
cfg::dat.dwFlags = IsDlgButtonChecked(hwndDlg, IDC_ROUNDEDBORDER) ? cfg::dat.dwFlags | CLUI_FRAME_ROUNDEDFRAME : cfg::dat.dwFlags & ~CLUI_FRAME_ROUNDEDFRAME;
diff --git a/plugins/Clist_nicer/src/extBackg.cpp b/plugins/Clist_nicer/src/extBackg.cpp
index f25aa3dc81..a796250e76 100644
--- a/plugins/Clist_nicer/src/extBackg.cpp
+++ b/plugins/Clist_nicer/src/extBackg.cpp
@@ -1166,7 +1166,7 @@ static void BTN_ReadItem(char *itemName, char *file)
void IMG_LoadItems()
{
DBVARIANT dbv;
- if (db_get_ts(NULL, "CLC", "AdvancedSkin", &dbv))
+ if (db_get_ws(NULL, "CLC", "AdvancedSkin", &dbv))
return;
wchar_t tszFileName[MAX_PATH];
@@ -1443,7 +1443,7 @@ static void ApplyCLUISkin()
DBVARIANT dbv = { 0 };
wchar_t tszFinalName[MAX_PATH];
char szFinalName[MAX_PATH];
- if (!db_get_ts(NULL, "CLC", "AdvancedSkin", &dbv)) {
+ if (!db_get_ws(NULL, "CLC", "AdvancedSkin", &dbv)) {
MY_pathToAbsolute(dbv.ptszVal, tszFinalName);
WideCharToMultiByte(CP_ACP, 0, tszFinalName, MAX_PATH, szFinalName, MAX_PATH, 0, 0);
@@ -1496,7 +1496,7 @@ static INT_PTR CALLBACK DlgProcSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
else
Utils::enableDlgControl(hwndDlg, IDC_RELOAD, FALSE);
CheckDlgButton(hwndDlg, IDC_USESKIN, db_get_b(NULL, "CLUI", "useskin", 0) ? BST_CHECKED : BST_UNCHECKED);
- if (!db_get_ts(NULL, "CLC", "AdvancedSkin", &dbv)) {
+ if (!db_get_ws(NULL, "CLC", "AdvancedSkin", &dbv)) {
SetDlgItemText(hwndDlg, IDC_SKINFILENAME, dbv.ptszVal);
db_free(&dbv);
}
@@ -1542,14 +1542,14 @@ static INT_PTR CALLBACK DlgProcSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
int skinChanged = 0;
DBVARIANT dbv = { 0 };
- if (!db_get_ts(NULL, "CLC", "AdvancedSkin", &dbv)) {
+ if (!db_get_ws(NULL, "CLC", "AdvancedSkin", &dbv)) {
if (mir_wstrcmp(dbv.ptszVal, final_path))
skinChanged = TRUE;
db_free(&dbv);
}
else
skinChanged = TRUE;
- db_set_ts(NULL, "CLC", "AdvancedSkin", final_path);
+ db_set_ws(NULL, "CLC", "AdvancedSkin", final_path);
db_set_b(NULL, "CLUI", "skin_changed", (BYTE)skinChanged);
SetDlgItemText(hwndDlg, IDC_SKINFILENAME, final_path);
}
diff --git a/plugins/Clist_nicer/src/init.cpp b/plugins/Clist_nicer/src/init.cpp
index 07397d6c33..a9f25d0472 100644
--- a/plugins/Clist_nicer/src/init.cpp
+++ b/plugins/Clist_nicer/src/init.cpp
@@ -182,7 +182,7 @@ extern "C" int __declspec(dllexport) CListInitialise()
cfg::dat.dwFlags |= (db_get_b(NULL, "CLUI", "ShowSBar", 1) ? CLUI_FRAME_SBARSHOW : 0);
cfg::dat.soundsOff = db_get_b(NULL, "Skin", "UseSound", 1) ? 0 : 1;
- CallService(MS_DB_GETPROFILEPATHT, MAX_PATH, (LPARAM)cfg::dat.tszProfilePath);
+ CallService(MS_DB_GETPROFILEPATHW, MAX_PATH, (LPARAM)cfg::dat.tszProfilePath);
wcslwr(cfg::dat.tszProfilePath);
// get the clist interface
diff --git a/plugins/Clist_nicer/src/viewmodes.cpp b/plugins/Clist_nicer/src/viewmodes.cpp
index 8a0e588ce9..b1ca3a8640 100644
--- a/plugins/Clist_nicer/src/viewmodes.cpp
+++ b/plugins/Clist_nicer/src/viewmodes.cpp
@@ -215,7 +215,7 @@ static int FillDialog(HWND hwnd)
ListView_InsertColumn(hwndList, 0, &lvc);
for (i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++) {
- item.pszText = TranslateTS(pcli->pfnGetStatusModeDescription(i, 0));
+ item.pszText = TranslateW(pcli->pfnGetStatusModeDescription(i, 0));
item.iItem = i - ID_STATUS_OFFLINE;
ListView_InsertItem(hwndList, &item);
}
@@ -304,7 +304,7 @@ void SaveViewMode(const char *name, const wchar_t *szGroupFilter, const char *sz
mir_snprintf(szSetting, "%c%s_PF", 246, name);
db_set_s(NULL, CLVM_MODULE, szSetting, szProtoFilter);
mir_snprintf(szSetting, "%c%s_GF", 246, name);
- db_set_ts(NULL, CLVM_MODULE, szSetting, szGroupFilter);
+ db_set_ws(NULL, CLVM_MODULE, szSetting, szGroupFilter);
mir_snprintf(szSetting, "%c%s_SM", 246, name);
db_set_dw(NULL, CLVM_MODULE, szSetting, statusMask);
mir_snprintf(szSetting, "%c%s_SSM", 246, name);
@@ -320,7 +320,7 @@ void SaveViewMode(const char *name, const wchar_t *szGroupFilter, const char *sz
// saves the state of the filter definitions for the current item
void SaveState()
{
- CMString newGroupFilter(L"|");
+ CMStringW newGroupFilter(L"|");
CMStringA newProtoFilter("|");
DWORD statusMask = 0;
DWORD operators = 0;
@@ -443,7 +443,7 @@ void UpdateFilters()
goto cleanup;
mir_snprintf(szSetting, "%c%s_GF", 246, szBuf);
- if (db_get_ts(NULL, CLVM_MODULE, szSetting, &dbv_gf))
+ if (db_get_ws(NULL, CLVM_MODULE, szSetting, &dbv_gf))
goto cleanup;
mir_snprintf(szSetting, "%c%s_OPT", 246, szBuf);
@@ -1019,7 +1019,7 @@ void CreateViewModeFrame()
frame.TBtname = TranslateT("View modes");
frame.hIcon = Skin_LoadIcon(SKINICON_OTHER_FRAME);
frame.height = 22;
- frame.Flags = F_VISIBLE | F_SHOWTBTIP | F_NOBORDER | F_TCHAR;
+ frame.Flags = F_VISIBLE | F_SHOWTBTIP | F_NOBORDER | F_UNICODE;
frame.align = alBottom;
frame.hWnd = CreateWindowEx(0, L"CLVMFrameWindow", L"CLVM", WS_VISIBLE | WS_CHILD | WS_TABSTOP | WS_CLIPCHILDREN, 0, 0, 20, 20, pcli->hwndContactList, (HMENU)0, g_hInst, NULL);
g_hwndViewModeFrame = frame.hWnd;
@@ -1042,7 +1042,7 @@ void ApplyViewMode(const char *name)
}
mir_snprintf(szSetting, "%c%s_GF", 246, name);
- ptrW tszGroups(db_get_tsa(NULL, CLVM_MODULE, szSetting));
+ ptrW tszGroups(db_get_wsa(NULL, CLVM_MODULE, szSetting));
if (mir_wstrlen(tszGroups) >= 2) {
wcsncpy_s(cfg::dat.groupFilter, tszGroups, _TRUNCATE);
cfg::dat.bFilterEffective |= CLVM_FILTER_GROUPS;
diff --git a/plugins/CmdLine/src/mimcmd_handlers.cpp b/plugins/CmdLine/src/mimcmd_handlers.cpp
index 7bef6f8f5b..1d18f4bc8b 100644
--- a/plugins/CmdLine/src/mimcmd_handlers.cpp
+++ b/plugins/CmdLine/src/mimcmd_handlers.cpp
@@ -1288,7 +1288,7 @@ void __cdecl OpenMessageWindowThread(void *data)
{
MCONTACT hContact = (UINT_PTR)data;
if (hContact) {
- CallServiceSync(MS_MSG_SENDMESSAGET, hContact, 0);
+ CallServiceSync(MS_MSG_SENDMESSAGEW, hContact, 0);
}
}
@@ -1569,7 +1569,7 @@ void HandleSetNicknameCommand(PCommand command, TArgument *argv, int argc, PRepl
mir_strcpy(protocol, argv[2]);
mir_strcpy(nickname, argv[3]);
- int res = CallProtoService(protocol, PS_SETMYNICKNAME, SMNN_TCHAR, (LPARAM)nickname);
+ int res = CallProtoService(protocol, PS_SETMYNICKNAME, SMNN_UNICODE, (LPARAM)nickname);
if (res == 0) {
reply->code = MIMRES_SUCCESS;
diff --git a/plugins/ConnectionNotify/src/ConnectionNotify.cpp b/plugins/ConnectionNotify/src/ConnectionNotify.cpp
index e62f6c83b9..46200dfaec 100644
--- a/plugins/ConnectionNotify/src/ConnectionNotify.cpp
+++ b/plugins/ConnectionNotify/src/ConnectionNotify.cpp
@@ -97,9 +97,9 @@ void saveSettingsConnections(struct CONNECTION *connHead)
while (tmp != NULL) {
mir_snprintf(buff, "%dFilterIntIp", i);
- db_set_ts(NULL, PLUGINNAME, buff, tmp->strIntIp);
+ db_set_ws(NULL, PLUGINNAME, buff, tmp->strIntIp);
mir_snprintf(buff, "%dFilterExtIp", i);
- db_set_ts(NULL, PLUGINNAME, buff, tmp->strExtIp);
+ db_set_ws(NULL, PLUGINNAME, buff, tmp->strExtIp);
mir_snprintf(buff, "%dFilterPName", i);
db_set_ws(NULL, PLUGINNAME, buff, tmp->PName);
mir_snprintf(buff, "%dFilterIntPort", i);
@@ -126,15 +126,15 @@ struct CONNECTION* LoadSettingsConnections()
for (i = settingFiltersCount - 1; i >= 0; i--) {
struct CONNECTION *conn = (struct CONNECTION*)mir_alloc(sizeof(struct CONNECTION));
mir_snprintf(buff, "%dFilterIntIp", i);
- if (!db_get_ts(NULL, PLUGINNAME, buff, &dbv))
+ if (!db_get_ws(NULL, PLUGINNAME, buff, &dbv))
wcsncpy(conn->strIntIp, dbv.ptszVal, _countof(conn->strIntIp));
db_free(&dbv);
mir_snprintf(buff, "%dFilterExtIp", i);
- if (!db_get_ts(NULL, PLUGINNAME, buff, &dbv))
+ if (!db_get_ws(NULL, PLUGINNAME, buff, &dbv))
wcsncpy(conn->strExtIp, dbv.ptszVal, _countof(conn->strExtIp));
db_free(&dbv);
mir_snprintf(buff, "%dFilterPName", i);
- if (!db_get_ts(NULL, PLUGINNAME, buff, &dbv))
+ if (!db_get_ws(NULL, PLUGINNAME, buff, &dbv))
wcsncpy(conn->PName, dbv.ptszVal, _countof(conn->PName));
db_free(&dbv);
@@ -590,7 +590,7 @@ int ConnectionNotifyOptInit(WPARAM wParam, LPARAM)
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_DIALOG);
odp.pwszTitle = _A2W(PLUGINNAME);
odp.pwszGroup = LPGENW("Plugins");
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
odp.pfnDlgProc = DlgProcConnectionNotifyOpts;//callback function name
Options_AddPage(wParam, &odp);
return 0;
diff --git a/plugins/ConnectionNotify/src/debug.cpp b/plugins/ConnectionNotify/src/debug.cpp
index 506a0e07a1..d7c32e755b 100644
--- a/plugins/ConnectionNotify/src/debug.cpp
+++ b/plugins/ConnectionNotify/src/debug.cpp
@@ -2,7 +2,7 @@
void _OutputDebugString(wchar_t* lpOutputString, ...)
{
- CMString format;
+ CMStringW format;
va_list args;
va_start(args, lpOutputString);
format.FormatV(lpOutputString, args);
diff --git a/plugins/Console/src/Console.cpp b/plugins/Console/src/Console.cpp
index 856a2752c7..c3bc12a83c 100644
--- a/plugins/Console/src/Console.cpp
+++ b/plugins/Console/src/Console.cpp
@@ -331,7 +331,7 @@ static INT_PTR CALLBACK LogDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LP
HWND hwnd = GetDlgItem(hwndDlg, ctrls[i].control);
SendMessage(hwnd, ctrls[i].type, 0, 0);
SendMessage(hwnd, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcons[i + ICON_FIRST]);
- SendMessage(hwnd, BUTTONADDTOOLTIP, (WPARAM)TranslateTS(ctrls[i].tooltip), BATF_TCHAR);
+ SendMessage(hwnd, BUTTONADDTOOLTIP, (WPARAM)TranslateW(ctrls[i].tooltip), BATF_UNICODE);
}
CheckDlgButton(hwndDlg, IDC_SCROLL, dat->Scroll ? BST_CHECKED : BST_UNCHECKED);
@@ -617,9 +617,9 @@ static INT_PTR CALLBACK ConsoleDlgProc(HWND hwndDlg, UINT message, WPARAM wParam
// restore position
Utils_RestoreWindowPosition(hwndDlg, NULL, "Console", "Console", RWPF_HIDDEN);
- CallService(MS_DB_GETPROFILENAMET, (WPARAM)_countof(name), (LPARAM)name);
+ CallService(MS_DB_GETPROFILENAMEW, (WPARAM)_countof(name), (LPARAM)name);
- CallService(MS_DB_GETPROFILEPATHT, (WPARAM)_countof(path), (LPARAM)path);
+ CallService(MS_DB_GETPROFILEPATHW, (WPARAM)_countof(path), (LPARAM)path);
mir_snwprintf(title, L"%s - %s\\%s", TranslateT("Miranda Console"), path, name);
@@ -1093,13 +1093,13 @@ static int OnFontChange(WPARAM, LPARAM)
if (hwndConsole) {
HFONT hf = NULL;
LOGFONT LogFont = { 0 };
- FontIDT fid = { 0 };
+ FontIDW fid = { 0 };
fid.cbSize = sizeof(fid);
mir_wstrncpy(fid.group, LPGENW("Console"), _countof(fid.group));
mir_wstrncpy(fid.name, LPGENW("Text"), _countof(fid.name));
- colLogFont = (COLORREF)CallService(MS_FONT_GETT, (WPARAM)&fid, (LPARAM)&LogFont);
+ colLogFont = (COLORREF)CallService(MS_FONT_GETW, (WPARAM)&fid, (LPARAM)&LogFont);
if (LogFont.lfHeight != 0) {
hf = CreateFontIndirect(&LogFont);
@@ -1118,7 +1118,7 @@ static int OnSystemModulesLoaded(WPARAM, LPARAM)
{
CreateServiceFunction(MS_CONSOLE_SHOW_HIDE, ShowHideConsole);
- FontIDT fid = { 0 };
+ FontIDW fid = { 0 };
fid.cbSize = sizeof(fid);
mir_wstrncpy(fid.group, LPGENW("Console"), _countof(fid.group));
mir_wstrncpy(fid.name, LPGENW("Text"), _countof(fid.name));
@@ -1132,18 +1132,18 @@ static int OnSystemModulesLoaded(WPARAM, LPARAM)
fid.deffontsettings.size = 10;
fid.deffontsettings.style = 0;
mir_wstrncpy(fid.deffontsettings.szFace, L"Courier", _countof(fid.deffontsettings.szFace));
- FontRegisterT(&fid);
+ FontRegisterW(&fid);
HookEvent(ME_FONT_RELOAD, OnFontChange);
- ColourIDT cid = { 0 };
+ ColourIDW cid = { 0 };
cid.cbSize = sizeof(cid);
mir_wstrncpy(cid.group, LPGENW("Console"), _countof(cid.group));
mir_wstrncpy(cid.name, LPGENW("Background"), _countof(cid.name));
mir_strncpy(cid.dbSettingsGroup, "Console", _countof(cid.dbSettingsGroup));
mir_strncpy(cid.setting, "BgColor", _countof(cid.setting));
cid.defcolour = RGB(255, 255, 255);
- ColourRegisterT(&cid);
+ ColourRegisterW(&cid);
HookEvent(ME_COLOUR_RELOAD, OnColourChange);
@@ -1161,7 +1161,7 @@ static int OnSystemModulesLoaded(WPARAM, LPARAM)
CMenuItem mi;
SET_UID(mi, 0x6d97694e, 0x2024, 0x4560, 0xbb, 0xbc, 0x20, 0x62, 0x7e, 0x5, 0xdf, 0xb3);
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
mi.hIcolibItem = hIcons[0];
mi.position = 1900000000;
mi.name.w = (IsWindowVisible(hwndConsole)) ? LPGENW("Hide Console") : LPGENW("Show Console");
diff --git a/plugins/ContactsPlus/src/receive.cpp b/plugins/ContactsPlus/src/receive.cpp
index fe354361d6..affed99313 100644
--- a/plugins/ContactsPlus/src/receive.cpp
+++ b/plugins/ContactsPlus/src/receive.cpp
@@ -323,7 +323,7 @@ INT_PTR CALLBACK RecvDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara
if (ServiceExists(MS_CLIST_CONTACTCHANGEGROUP))
CallService(MS_CLIST_CONTACTCHANGEGROUP, hContact, (LPARAM)nGroupId);
else
- db_set_ts(hContact, "CList", "Group", caGroup);
+ db_set_ws(hContact, "CList", "Group", caGroup);
}
break;
}
diff --git a/plugins/ContactsPlus/src/send.cpp b/plugins/ContactsPlus/src/send.cpp
index 5031b03ac9..93da4f592d 100644
--- a/plugins/ContactsPlus/src/send.cpp
+++ b/plugins/ContactsPlus/src/send.cpp
@@ -479,7 +479,7 @@ INT_PTR CALLBACK ErrorDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar
TranslateDialogDefault(hwndDlg);
{
if (lParam)
- SetDlgItemText(hwndDlg, IDC_ERRORTEXT, TranslateTS((wchar_t*)lParam));
+ SetDlgItemText(hwndDlg, IDC_ERRORTEXT, TranslateW((wchar_t*)lParam));
RECT rc, rcParent;
GetWindowRect(hwndDlg, &rc);
diff --git a/plugins/ContactsPlus/src/utils.cpp b/plugins/ContactsPlus/src/utils.cpp
index 0cb84a1642..257cdb555f 100644
--- a/plugins/ContactsPlus/src/utils.cpp
+++ b/plugins/ContactsPlus/src/utils.cpp
@@ -115,7 +115,7 @@ void DrawProtocolIcon(HWND hwndDlg, LPARAM lParam, MCONTACT hContact)
void UpdateDialogTitle(HWND hwndDlg, MCONTACT hContact, wchar_t *pszTitleStart)
{
wchar_t newtitle[512];
- mir_wstrncpy(newtitle, TranslateTS(pszTitleStart), _countof(newtitle));
+ mir_wstrncpy(newtitle, TranslateW(pszTitleStart), _countof(newtitle));
if (hContact) {
char *szProto = GetContactProto(hContact);
@@ -130,7 +130,7 @@ void UpdateDialogTitle(HWND hwndDlg, MCONTACT hContact, wchar_t *pszTitleStart)
SetDlgItemText(hwndDlg, IDC_NAME, uid ? uid : contactName);
wchar_t *szStatus = pcli->pfnGetStatusModeDescription(db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE), 0);
- mir_snwprintf(newtitle, L"%s %s (%s)", TranslateTS(pszTitleStart), contactName, szStatus);
+ mir_snwprintf(newtitle, L"%s %s (%s)", TranslateW(pszTitleStart), contactName, szStatus);
}
}
@@ -152,7 +152,7 @@ HICON InitMButton(HWND hDlg, int idButton, int idIcon, wchar_t *szTip)
SendMessage(hButton, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon);
SendMessage(hButton, BUTTONSETASFLATBTN, TRUE, 0);
- SendMessage(hButton, BUTTONADDTOOLTIP, (WPARAM)szTip, BATF_TCHAR);
+ SendMessage(hButton, BUTTONADDTOOLTIP, (WPARAM)szTip, BATF_UNICODE);
return hIcon;
}
diff --git a/plugins/CrashDumper/src/crshdmp.cpp b/plugins/CrashDumper/src/crshdmp.cpp
index eec8817037..d351160b0b 100644
--- a/plugins/CrashDumper/src/crshdmp.cpp
+++ b/plugins/CrashDumper/src/crshdmp.cpp
@@ -65,14 +65,14 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_SERVIC
INT_PTR StoreVersionInfoToFile(WPARAM, LPARAM lParam)
{
- CreateDirectoryTreeT(VersionInfoFolder);
+ CreateDirectoryTreeW(VersionInfoFolder);
wchar_t path[MAX_PATH];
mir_snwprintf(path, TEXT("%s\\VersionInfo.txt"), VersionInfoFolder);
HANDLE hDumpFile = CreateFile(path, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if (hDumpFile != INVALID_HANDLE_VALUE) {
- CMString buffer;
+ CMStringW buffer;
PrintVersionInfo(buffer, (unsigned int)lParam | VI_FLAG_PRNVAR);
WriteUtfFile(hDumpFile, T2Utf(buffer.c_str()));
@@ -87,7 +87,7 @@ INT_PTR StoreVersionInfoToFile(WPARAM, LPARAM lParam)
INT_PTR StoreVersionInfoToClipboard(WPARAM, LPARAM lParam)
{
- CMString buffer;
+ CMStringW buffer;
WriteBBFile(buffer, true);
PrintVersionInfo(buffer, (unsigned int)lParam | VI_FLAG_PRNVAR | VI_FLAG_FORMAT);
WriteBBFile(buffer, false);
@@ -99,7 +99,7 @@ INT_PTR StoreVersionInfoToClipboard(WPARAM, LPARAM lParam)
INT_PTR UploadVersionInfo(WPARAM, LPARAM lParam)
{
- CMString buffer;
+ CMStringW buffer;
PrintVersionInfo(buffer);
VerTrnsfr *trn = (VerTrnsfr*)mir_alloc(sizeof(VerTrnsfr));
@@ -130,7 +130,7 @@ INT_PTR GetVersionInfo(WPARAM wParam, LPARAM lParam)
{
int result = 1; //failure
if (lParam != NULL) {
- CMString buffer;
+ CMStringW buffer;
PrintVersionInfo(buffer, (unsigned int)wParam);
char **retData = (char **)lParam;
*retData = mir_utf8encodeW(buffer.c_str());
diff --git a/plugins/CrashDumper/src/dumper.cpp b/plugins/CrashDumper/src/dumper.cpp
index 7843451951..f802e4e33b 100644
--- a/plugins/CrashDumper/src/dumper.cpp
+++ b/plugins/CrashDumper/src/dumper.cpp
@@ -34,7 +34,7 @@ void CreateMiniDump(HANDLE hDumpFile, PEXCEPTION_POINTERS exc_ptr)
}
-void WriteBBFile(CMString& buffer, bool hdr)
+void WriteBBFile(CMStringW& buffer, bool hdr)
{
static const wchar_t header[] = TEXT("[spoiler=VersionInfo][quote]");
static const wchar_t footer[] = TEXT("[/quote][/spoiler]");
@@ -55,7 +55,7 @@ void WriteUtfFile(HANDLE hDumpFile, char* bufu)
BOOL CALLBACK LoadedModules64(LPCSTR, DWORD64 ModuleBase, ULONG ModuleSize, PVOID UserContext)
{
- CMString& buffer = *(CMString*)UserContext;
+ CMStringW& buffer = *(CMStringW*)UserContext;
const HMODULE hModule = (HMODULE)ModuleBase;
@@ -100,7 +100,7 @@ BOOL CALLBACK LoadedModulesFind64(LPCSTR ModuleName, DWORD64 ModuleBase, ULONG M
}
-void GetLinkedModulesInfo(wchar_t *moduleName, CMString &buffer)
+void GetLinkedModulesInfo(wchar_t *moduleName, CMStringW &buffer)
{
HANDLE hDllFile = CreateFile(moduleName, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if (hDllFile == INVALID_HANDLE_VALUE)
@@ -165,11 +165,11 @@ struct ListItem
{
ListItem() : str(), next(NULL) {}
- CMString str;
+ CMStringW str;
ListItem *next;
};
-static void GetPluginsString(CMString& buffer, unsigned& flags)
+static void GetPluginsString(CMStringW& buffer, unsigned& flags)
{
buffer.AppendFormat(TEXT("Service Mode: %s\r\n"), servicemode ? TEXT("Yes") : TEXT("No"));
@@ -186,7 +186,7 @@ static void GetPluginsString(CMString& buffer, unsigned& flags)
size_t count = 0, ucount = 0;
- CMString ubuffer;
+ CMStringW ubuffer;
ListItem* dlllist = NULL;
static const wchar_t format[] = TEXT("\xa4 %s v.%s%d.%d.%d.%d%s [%s] - %S %s\r\n");
@@ -299,7 +299,7 @@ struct ProtoCount
bool nloaded;
};
-static void GetProtocolStrings(CMString& buffer)
+static void GetProtocolStrings(CMStringW& buffer)
{
PROTOACCOUNT **accList;
int accCount;
@@ -350,7 +350,7 @@ static void GetProtocolStrings(CMString& buffer)
}
-static void GetWeatherStrings(CMString& buffer, unsigned flags)
+static void GetWeatherStrings(CMStringW& buffer, unsigned flags)
{
wchar_t path[MAX_PATH];
GetModuleFileName(NULL, path, MAX_PATH);
@@ -417,7 +417,7 @@ static void GetWeatherStrings(CMString& buffer, unsigned flags)
}
-static void GetIconStrings(CMString& buffer)
+static void GetIconStrings(CMStringW& buffer)
{
wchar_t path[MAX_PATH];
GetModuleFileName(NULL, path, MAX_PATH);
@@ -442,7 +442,7 @@ static void GetIconStrings(CMString& buffer)
}
-void PrintVersionInfo(CMString& buffer, unsigned flags)
+void PrintVersionInfo(CMStringW& buffer, unsigned flags)
{
GetProcessorString(buffer);
buffer.Append(L"\r\n");
@@ -576,7 +576,7 @@ void CreateCrashReport(HANDLE hDumpFile, PEXCEPTION_POINTERS exc_ptr, const wcha
wchar_t curtime[30];
GetISO8061Time(NULL, curtime, 30);
- CMString buffer;
+ CMStringW buffer;
buffer.AppendFormat(TEXT("Miranda Crash Report from %s. Crash Dumper v.%d.%d.%d.%d\r\n"),
curtime,
HIBYTE(HIWORD(pluginInfoEx->version)), LOBYTE(HIWORD(pluginInfoEx->version)),
@@ -654,7 +654,7 @@ void CreateCrashReport(HANDLE hDumpFile, PEXCEPTION_POINTERS exc_ptr, const wcha
static const wchar_t formatc[] = TEXT("\r\nLikely cause of the crash plugin: %S\r\n\r\n");
if (pi->shortName) {
- CMString crashcause;
+ CMStringW crashcause;
crashcause.AppendFormat(formatc, pi->shortName);
buffer.Insert(crashpos, crashcause);
}
diff --git a/plugins/CrashDumper/src/exhndlr.cpp b/plugins/CrashDumper/src/exhndlr.cpp
index eef812a33a..0a23ed5ba9 100644
--- a/plugins/CrashDumper/src/exhndlr.cpp
+++ b/plugins/CrashDumper/src/exhndlr.cpp
@@ -51,7 +51,7 @@ void myfilterWorker(PEXCEPTION_POINTERS exc_ptr, bool notify)
HANDLE hDumpFile = NULL;
GetLocalTime(&st);
- CreateDirectoryTreeT(CrashLogFolder);
+ CreateDirectoryTreeW(CrashLogFolder);
__try {
if (dtsubfldr) {
diff --git a/plugins/CrashDumper/src/stdafx.h b/plugins/CrashDumper/src/stdafx.h
index f7abf43d21..6a0dc8bede 100644
--- a/plugins/CrashDumper/src/stdafx.h
+++ b/plugins/CrashDumper/src/stdafx.h
@@ -95,30 +95,30 @@ extern bool servicemode, clsdates, dtsubfldr, catchcrashes, needrestart;
extern wchar_t CrashLogFolder[MAX_PATH];
extern wchar_t VersionInfoFolder[MAX_PATH];
-void WriteBBFile(CMString& buffer, bool hdr);
+void WriteBBFile(CMStringW& buffer, bool hdr);
void WriteUtfFile(HANDLE hDumpFile, char* bufu);
LONG WINAPI myfilter(PEXCEPTION_POINTERS exc_ptr);
LONG WINAPI myfilterv(PEXCEPTION_POINTERS exc_ptr);
DWORD MirandaThreadFilter(DWORD code, EXCEPTION_POINTERS* info);
-void GetInternetExplorerVersion(CMString& buffer);
-void GetProcessorString(CMString& buffer);
-void GetFreeMemoryString(CMString& buffer);
-void GetFreeDiskString(LPCTSTR dirname, CMString& buffer);
-void GetAdminString(CMString& buffer);
-void GetLanguageString(CMString& buffer);
-void GetLanguagePackString(CMString& buffer);
-void GetWow64String(CMString& buffer);
-void GetVersionInfo(HMODULE hLib, CMString& buffer);
+void GetInternetExplorerVersion(CMStringW& buffer);
+void GetProcessorString(CMStringW& buffer);
+void GetFreeMemoryString(CMStringW& buffer);
+void GetFreeDiskString(LPCTSTR dirname, CMStringW& buffer);
+void GetAdminString(CMStringW& buffer);
+void GetLanguageString(CMStringW& buffer);
+void GetLanguagePackString(CMStringW& buffer);
+void GetWow64String(CMStringW& buffer);
+void GetVersionInfo(HMODULE hLib, CMStringW& buffer);
void GetISO8061Time(SYSTEMTIME* stLocal, LPTSTR lpszString, DWORD dwSize);
-void ReadableExceptionInfo(PEXCEPTION_RECORD excrec, CMString& buffer);
+void ReadableExceptionInfo(PEXCEPTION_RECORD excrec, CMStringW& buffer);
void GetLastWriteTime(LPCTSTR fileName, LPTSTR lpszString, DWORD dwSize);
void GetLastWriteTime(FILETIME* ftime, LPTSTR lpszString, DWORD dwSize);
-void StoreStringToClip(CMString& buffer);
+void StoreStringToClip(CMStringW& buffer);
void ShowMessage(int type, const wchar_t* format, ...);
bool IsPluginEnabled(wchar_t* filename);
@@ -127,7 +127,7 @@ const PLUGININFOEX* GetPluginInfoEx(void);
void CreateMiniDump(HANDLE hDumpFile, PEXCEPTION_POINTERS exc_ptr);
void CreateCrashReport(HANDLE hDumpFile, PEXCEPTION_POINTERS exc_ptr, const wchar_t* msg);
-void PrintVersionInfo(CMString& buffer, unsigned flags = VI_FLAG_PRNVAR);
+void PrintVersionInfo(CMStringW& buffer, unsigned flags = VI_FLAG_PRNVAR);
bool ProcessVIHash(bool store);
void InitExceptionHandler(void);
diff --git a/plugins/CrashDumper/src/ui.cpp b/plugins/CrashDumper/src/ui.cpp
index 319740aaa7..e2d6c71002 100644
--- a/plugins/CrashDumper/src/ui.cpp
+++ b/plugins/CrashDumper/src/ui.cpp
@@ -72,7 +72,7 @@ INT_PTR CALLBACK DlgProcView(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara
mir_wstrcpy(chf.szFaceName, TEXT("Courier New"));
SendDlgItemMessage(hwndDlg, IDC_VIEWVERSIONINFO, EM_SETCHARFORMAT, SCF_ALL, (LPARAM)&chf);
- CMString buffer;
+ CMStringW buffer;
PrintVersionInfo(buffer, (unsigned int)lParam);
SetDlgItemText(hwndDlg, IDC_VIEWVERSIONINFO, buffer.c_str());
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam);
diff --git a/plugins/CrashDumper/src/upload.cpp b/plugins/CrashDumper/src/upload.cpp
index ad180b0589..dd7583cf79 100644
--- a/plugins/CrashDumper/src/upload.cpp
+++ b/plugins/CrashDumper/src/upload.cpp
@@ -215,7 +215,7 @@ void __cdecl VersionInfoUploadThread(void* arg)
void UploadInit(void)
{
NETLIBUSER nlu = { sizeof(nlu) };
- nlu.flags = NUF_OUTGOING | NUF_HTTPCONNS | NUF_NOHTTPSOPTION | NUF_TCHAR;
+ nlu.flags = NUF_OUTGOING | NUF_HTTPCONNS | NUF_NOHTTPSOPTION | NUF_UNICODE;
nlu.szSettingsModule = (char*)PluginName;
nlu.ptszDescriptiveName = TranslateT("Crash Dumper HTTP connections");
hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu);
@@ -228,7 +228,7 @@ void UploadClose(void)
bool ProcessVIHash(bool store)
{
- CMString buffer;
+ CMStringW buffer;
PrintVersionInfo(buffer, 0);
BYTE hash[16];
diff --git a/plugins/CrashDumper/src/utils.cpp b/plugins/CrashDumper/src/utils.cpp
index df32598f4a..2fd7e8f815 100644
--- a/plugins/CrashDumper/src/utils.cpp
+++ b/plugins/CrashDumper/src/utils.cpp
@@ -100,7 +100,7 @@ PLUGININFOEX* GetMirInfo(HMODULE hModule)
return bpi(mirandaVersion);
}
-void GetInternetExplorerVersion(CMString &buffer)
+void GetInternetExplorerVersion(CMStringW &buffer)
{
HKEY hKey;
DWORD size;
@@ -164,7 +164,7 @@ void TrimMultiSpaces(wchar_t *str)
}
}
-void GetProcessorString(CMString &buffer)
+void GetProcessorString(CMStringW &buffer)
{
HKEY hKey;
DWORD size;
@@ -197,7 +197,7 @@ void GetProcessorString(CMString &buffer)
buffer.AppendFormat(TEXT(" [%u CPUs]"), si.dwNumberOfProcessors);
}
-void GetFreeMemoryString(CMString &buffer)
+void GetFreeMemoryString(CMStringW &buffer)
{
unsigned ram;
MEMORYSTATUSEX ms = { 0 };
@@ -207,7 +207,7 @@ void GetFreeMemoryString(CMString &buffer)
buffer.AppendFormat(TEXT("Installed RAM: %u MBytes"), ram);
}
-void GetFreeDiskString(LPCTSTR dirname, CMString &buffer)
+void GetFreeDiskString(LPCTSTR dirname, CMStringW &buffer)
{
ULARGE_INTEGER tnb, tfb, fs = { 0 };
GetDiskFreeSpaceEx(dirname, &fs, &tnb, &tfb);
@@ -216,7 +216,7 @@ void GetFreeDiskString(LPCTSTR dirname, CMString &buffer)
buffer.AppendFormat(TEXT("Free disk space on Miranda partition: %u MBytes"), fs.LowPart);
}
-void ReadableExceptionInfo(PEXCEPTION_RECORD excrec, CMString& buffer)
+void ReadableExceptionInfo(PEXCEPTION_RECORD excrec, CMStringW& buffer)
{
buffer.Append(TEXT("Exception: "));
@@ -317,7 +317,7 @@ void ReadableExceptionInfo(PEXCEPTION_RECORD excrec, CMString& buffer)
}
}
-void GetAdminString(CMString &buffer)
+void GetAdminString(CMStringW &buffer)
{
BOOL b;
__try {
@@ -341,7 +341,7 @@ void GetAdminString(CMString &buffer)
buffer.AppendFormat(TEXT("Administrator privileges: %s"), b ? TEXT("Yes") : TEXT("No"));
}
-void GetLanguageString(CMString &buffer)
+void GetLanguageString(CMStringW &buffer)
{
wchar_t name1[256], name2[256], name3[256], name4[256];
@@ -354,7 +354,7 @@ void GetLanguageString(CMString &buffer)
buffer.AppendFormat(TEXT("OS Languages: (UI | Locale (User/System)) : %s/%s | %s/%s"), name3, name4, name1, name2);
}
-void GetLanguagePackString(CMString &buffer)
+void GetLanguagePackString(CMStringW &buffer)
{
buffer.Append(TEXT("Language pack: "));
if (packlcid != LOCALE_USER_DEFAULT) {
@@ -372,7 +372,7 @@ void GetLanguagePackString(CMString &buffer)
buffer.Append(TEXT("No language pack installed"));
}
-void GetWow64String(CMString &buffer)
+void GetWow64String(CMStringW &buffer)
{
BOOL wow64 = 0;
if (!IsWow64Process(GetCurrentProcess(), &wow64))
@@ -382,7 +382,7 @@ void GetWow64String(CMString &buffer)
buffer.Append(TEXT(" [running inside WOW64]"));
}
-void GetVersionInfo(HMODULE hLib, CMString& buffer)
+void GetVersionInfo(HMODULE hLib, CMStringW& buffer)
{
HRSRC hVersion = FindResource(hLib, MAKEINTRESOURCE(VS_VERSION_INFO), RT_VERSION);
if (hVersion != NULL) {
@@ -406,7 +406,7 @@ void GetVersionInfo(HMODULE hLib, CMString& buffer)
}
}
-void StoreStringToClip(CMString& buffer)
+void StoreStringToClip(CMStringW& buffer)
{
int bufLen = (buffer.GetLength() + 1) * sizeof(wchar_t);
HANDLE hData = GlobalAlloc(GMEM_MOVEABLE, bufLen);
diff --git a/plugins/Db3x_mmap/src/database.cpp b/plugins/Db3x_mmap/src/database.cpp
index 80dc43d777..85c94ad360 100644
--- a/plugins/Db3x_mmap/src/database.cpp
+++ b/plugins/Db3x_mmap/src/database.cpp
@@ -91,7 +91,7 @@ void __cdecl dbpanic(void *)
MessageBox(0, err, TranslateT("Database Error"), MB_SETFOREGROUND | MB_TOPMOST | MB_APPLMODAL | MB_ICONWARNING | MB_OK);
}
- else MessageBox(0, TranslateTS(tszPanic), TranslateT("Database Panic"), MB_SETFOREGROUND | MB_TOPMOST | MB_APPLMODAL | MB_ICONWARNING | MB_OK);
+ else MessageBox(0, TranslateW(tszPanic), TranslateT("Database Panic"), MB_SETFOREGROUND | MB_TOPMOST | MB_APPLMODAL | MB_ICONWARNING | MB_OK);
TerminateProcess(GetCurrentProcess(), 255);
}
diff --git a/plugins/Db3x_mmap/src/dbheaders.cpp b/plugins/Db3x_mmap/src/dbheaders.cpp
index 8cd51d5a6b..d769a189b7 100644
--- a/plugins/Db3x_mmap/src/dbheaders.cpp
+++ b/plugins/Db3x_mmap/src/dbheaders.cpp
@@ -69,7 +69,7 @@ int CDb3Mmap::CheckDbHeaders(bool bInteractive)
if (!memcmp(&m_dbHeader.signature, &dbSignatureSD, sizeof(m_dbHeader.signature))) {
if (bInteractive)
- if (IDYES == MessageBox(NULL, TranslateTS(tszOldHeaders), TranslateT("Obsolete database format"), MB_YESNO | MB_ICONWARNING)) {
+ if (IDYES == MessageBox(NULL, TranslateW(tszOldHeaders), TranslateT("Obsolete database format"), MB_YESNO | MB_ICONWARNING)) {
wchar_t tszCurPath[MAX_PATH];
GetModuleFileName(NULL, tszCurPath, _countof(tszCurPath));
wchar_t *p = wcsrchr(tszCurPath, '\\');
diff --git a/plugins/Db3x_mmap/src/ui.cpp b/plugins/Db3x_mmap/src/ui.cpp
index 5e6929572f..9c18e83900 100644
--- a/plugins/Db3x_mmap/src/ui.cpp
+++ b/plugins/Db3x_mmap/src/ui.cpp
@@ -317,7 +317,7 @@ static int OnModulesLoaded(PVOID obj, WPARAM, LPARAM)
Menu_ConfigureItem(mi.root, MCI_OPT_UID, "F7C5567C-D1EE-484B-B4F6-24677A5AAAEF");
SET_UID(mi, 0x50321866, 0xba1, 0x46dd, 0xb3, 0xa6, 0xc3, 0xcc, 0x55, 0xf2, 0x42, 0x9e);
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
mi.hIcolibItem = iconList[1].hIcolib;
mi.name.w = db->GetMenuTitle();
mi.pszService = MS_DB_CHANGEPASSWORD;
diff --git a/plugins/DbChecker/src/selectdb.cpp b/plugins/DbChecker/src/selectdb.cpp
index 0a704fe2ef..5fe836c21d 100644
--- a/plugins/DbChecker/src/selectdb.cpp
+++ b/plugins/DbChecker/src/selectdb.cpp
@@ -47,7 +47,7 @@ int OpenDatabase(HWND hdlg, INT iNextPage)
if (dblink->CheckDB == NULL) {
mir_snwprintf(tszMsg,
TranslateT("Database driver '%s' doesn't support checking."),
- TranslateTS(dblink->szFullName));
+ TranslateW(dblink->szFullName));
goto LBL_Error;
}
diff --git a/plugins/DbEditorPP/src/main.cpp b/plugins/DbEditorPP/src/main.cpp
index 20026bb8bc..d997ab744e 100644
--- a/plugins/DbEditorPP/src/main.cpp
+++ b/plugins/DbEditorPP/src/main.cpp
@@ -132,11 +132,11 @@ int ModulesLoaded(WPARAM, LPARAM)
// Register hotkeys
_A2T text(modFullname);
HOTKEYDESC hkd = { sizeof(hkd) };
- hkd.dwFlags = HKD_TCHAR;
+ hkd.dwFlags = HKD_UNICODE;
hkd.pszName = "hk_dbepp_open";
hkd.pszService = "DBEditorpp/MenuCommand";
- hkd.ptszDescription = LPGENW("Open Database Editor");
- hkd.ptszSection = text;
+ hkd.pwszDescription = LPGENW("Open Database Editor");
+ hkd.pwszSection = text;
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_SHIFT | HOTKEYF_EXT, 'D');
Hotkey_Register(&hkd);
@@ -529,7 +529,7 @@ void loadListSettings(HWND hwnd, ColumnsSettings *cs)
sLC.mask = LVCF_FMT | LVCF_TEXT | LVCF_WIDTH;
int i = 0;
while (cs[i].name) {
- sLC.pszText = TranslateTS(cs[i].name);
+ sLC.pszText = TranslateW(cs[i].name);
sLC.cx = db_get_w(NULL, modname, cs[i].dbname, cs[i].defsize);
ListView_InsertColumn(hwnd, cs[i].index, &sLC);
i++;
diff --git a/plugins/Db_autobackups/src/backup.cpp b/plugins/Db_autobackups/src/backup.cpp
index ea18899542..d95b9e59f1 100644
--- a/plugins/Db_autobackups/src/backup.cpp
+++ b/plugins/Db_autobackups/src/backup.cpp
@@ -186,7 +186,7 @@ int Backup(wchar_t *backup_filename)
HWND progress_dialog = NULL;
SYSTEMTIME st;
- CallService(MS_DB_GETPROFILENAMET, _countof(dbname), (LPARAM)dbname);
+ CallService(MS_DB_GETPROFILENAMEW, _countof(dbname), (LPARAM)dbname);
if (backup_filename == NULL) {
int err;
@@ -196,7 +196,7 @@ int Backup(wchar_t *backup_filename)
bZip = options.use_zip != 0;
backupfolder = Utils_ReplaceVarsT(options.folder);
// ensure the backup folder exists (either create it or return non-zero signifying error)
- err = CreateDirectoryTreeT(backupfolder);
+ err = CreateDirectoryTreeW(backupfolder);
if (err != ERROR_ALREADY_EXISTS && err != 0) {
mir_free(backupfolder);
return 1;
diff --git a/plugins/Db_autobackups/src/main.cpp b/plugins/Db_autobackups/src/main.cpp
index 4efd79dec5..448e15fab4 100644
--- a/plugins/Db_autobackups/src/main.cpp
+++ b/plugins/Db_autobackups/src/main.cpp
@@ -36,7 +36,7 @@ static INT_PTR DBSaveAs(WPARAM, LPARAM)
{
wchar_t fname_buff[MAX_PATH], tszFilter[200];
OPENFILENAME ofn = { 0 };
- CallService(MS_DB_GETPROFILENAMET, _countof(fname_buff), (LPARAM)fname_buff);
+ CallService(MS_DB_GETPROFILENAMEW, _countof(fname_buff), (LPARAM)fname_buff);
mir_snwprintf(tszFilter, L"%s (*.dat)%c*.dat%c%s (*.zip)%c*.zip%c%s (*.*)%c*%c",
TranslateT("Miranda NG databases"), 0, 0,
diff --git a/plugins/Db_autobackups/src/options.cpp b/plugins/Db_autobackups/src/options.cpp
index 52ca03f8ad..d7d54eae55 100644
--- a/plugins/Db_autobackups/src/options.cpp
+++ b/plugins/Db_autobackups/src/options.cpp
@@ -42,7 +42,7 @@ int LoadOptions(void)
if (!ServiceExists(MS_FOLDERS_GET_PATH)) {
DBVARIANT dbv;
- if (!db_get_ts(0, "AutoBackups", "Folder", &dbv)) {
+ if (!db_get_ws(0, "AutoBackups", "Folder", &dbv)) {
wchar_t *tmp = Utils_ReplaceVarsT(dbv.ptszVal);
if (mir_wstrlen(tmp) >= 2 && tmp[1] == ':')
@@ -82,10 +82,10 @@ int SaveOptions(void)
size_t opt_len = mir_wstrlen(options.folder);
if (opt_len > prof_len && wcsncmp(options.folder, prof_dir, prof_len) == 0) {
- db_set_ts(0, "AutoBackups", "Folder", (options.folder + prof_len));
+ db_set_ws(0, "AutoBackups", "Folder", (options.folder + prof_len));
}
else
- db_set_ts(0, "AutoBackups", "Folder", options.folder);
+ db_set_ws(0, "AutoBackups", "Folder", options.folder);
wchar_t *tmp = Utils_ReplaceVarsT(options.folder);
if (mir_wstrlen(tmp) < 2 || tmp[1] != ':') {
@@ -365,7 +365,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
mir_snwprintf(backupfolder, L"%s\\%s", profilePath, tmp);
mir_free(tmp);
- int err = CreateDirectoryTreeT(backupfolder);
+ int err = CreateDirectoryTreeW(backupfolder);
if (err != ERROR_ALREADY_EXISTS && err != 0) {
wchar_t msg_buff[512];
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, 0, err, 0, msg_buff, 512, 0);
diff --git a/plugins/Dbx_mdb/src/dbintf.cpp b/plugins/Dbx_mdb/src/dbintf.cpp
index a47dd6b677..8dbc56fa22 100644
--- a/plugins/Dbx_mdb/src/dbintf.cpp
+++ b/plugins/Dbx_mdb/src/dbintf.cpp
@@ -230,7 +230,7 @@ EXTERN_C void __cdecl dbpanic(void *)
MessageBox(0, err, TranslateT("Database Error"), MB_SETFOREGROUND | MB_TOPMOST | MB_APPLMODAL | MB_ICONWARNING | MB_OK);
}
- else MessageBox(0, TranslateTS(tszPanic), TranslateT("Database Panic"), MB_SETFOREGROUND | MB_TOPMOST | MB_APPLMODAL | MB_ICONWARNING | MB_OK);
+ else MessageBox(0, TranslateW(tszPanic), TranslateT("Database Panic"), MB_SETFOREGROUND | MB_TOPMOST | MB_APPLMODAL | MB_ICONWARNING | MB_OK);
TerminateProcess(GetCurrentProcess(), 255);
}
diff --git a/plugins/Dropbox/src/dropbox_events.cpp b/plugins/Dropbox/src/dropbox_events.cpp
index 24f4a384a7..a6454efe64 100644
--- a/plugins/Dropbox/src/dropbox_events.cpp
+++ b/plugins/Dropbox/src/dropbox_events.cpp
@@ -10,7 +10,7 @@ int CDropbox::OnModulesLoaded(WPARAM, LPARAM)
HookEventObj(ME_FILEDLG_CANCELED, GlobalEvent<&CDropbox::OnFileDialogCancelled>, this);
NETLIBUSER nlu = { sizeof(nlu) };
- nlu.flags = NUF_INCOMING | NUF_OUTGOING | NUF_HTTPCONNS | NUF_TCHAR;
+ nlu.flags = NUF_INCOMING | NUF_OUTGOING | NUF_HTTPCONNS | NUF_UNICODE;
nlu.szSettingsModule = MODULE;
nlu.ptszDescriptiveName = L"Dropbox";
diff --git a/plugins/Dropbox/src/dropbox_options.cpp b/plugins/Dropbox/src/dropbox_options.cpp
index 3bba4c0520..20f3f99474 100644
--- a/plugins/Dropbox/src/dropbox_options.cpp
+++ b/plugins/Dropbox/src/dropbox_options.cpp
@@ -153,7 +153,7 @@ int CDropbox::OnOptionsInitialized(WPARAM wParam, LPARAM)
{
OPTIONSDIALOGPAGE odp = { 0 };
odp.pwszTitle = MODULEW;
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR | ODPF_DONTTRANSLATE;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE | ODPF_DONTTRANSLATE;
odp.pwszGroup = LPGENW("Network");
odp.pwszTab = LPGENW("General");
diff --git a/plugins/Dropbox/src/dropbox_utils.cpp b/plugins/Dropbox/src/dropbox_utils.cpp
index b388117db5..c8ef7f06c8 100644
--- a/plugins/Dropbox/src/dropbox_utils.cpp
+++ b/plugins/Dropbox/src/dropbox_utils.cpp
@@ -105,7 +105,7 @@ void CDropbox::SendToContact(MCONTACT hContact, const wchar_t *data)
const char *szProto = GetContactProto(hContact);
if (db_get_b(hContact, szProto, "ChatRoom", 0) == TRUE) {
- ptrW tszChatRoom(db_get_tsa(hContact, szProto, "ChatRoomID"));
+ ptrW tszChatRoom(db_get_wsa(hContact, szProto, "ChatRoomID"));
GCDEST gcd = { szProto, tszChatRoom, GC_EVENT_SENDMESSAGE };
GCEVENT gce = { sizeof(gce), &gcd };
gce.bIsMe = TRUE;
diff --git a/plugins/Dropbox/src/file_transfer.h b/plugins/Dropbox/src/file_transfer.h
index f5ef1e56fd..8c50542bed 100644
--- a/plugins/Dropbox/src/file_transfer.h
+++ b/plugins/Dropbox/src/file_transfer.h
@@ -15,9 +15,9 @@ private:
const wchar_t* folderName;
int relativePathStart;
- CMString serverFolder;
+ CMStringW serverFolder;
- CMString data;
+ CMStringW data;
public:
FileTransferParam(MCONTACT hContact)
@@ -31,7 +31,7 @@ public:
relativePathStart = 0;
pfts.cbSize = sizeof(this->pfts);
- pfts.flags = PFTS_TCHAR | PFTS_SENDING;
+ pfts.flags = PFTS_UNICODE | PFTS_SENDING;
pfts.hContact = hContact;
pfts.currentFileNumber = -1;
pfts.currentFileProgress = 0;
diff --git a/plugins/Exchange/src/dlg_handlers.cpp b/plugins/Exchange/src/dlg_handlers.cpp
index 93e5cde48f..6a4d7cc15e 100644
--- a/plugins/Exchange/src/dlg_handlers.cpp
+++ b/plugins/Exchange/src/dlg_handlers.cpp
@@ -112,13 +112,13 @@ INT_PTR CALLBACK DlgProcOptions(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPara
wchar_t buffer[4096];
GetDlgItemText(hWnd, IDC_USER_EDIT, buffer, _countof(buffer));
- db_set_ts(NULL, ModuleName, "Username", buffer);
+ db_set_ws(NULL, ModuleName, "Username", buffer);
GetDlgItemText(hWnd, IDC_PASSWORD_EDIT, buffer, _countof(buffer));
- db_set_ts(NULL, ModuleName, "Password", buffer);
+ db_set_ws(NULL, ModuleName, "Password", buffer);
GetDlgItemText(hWnd, IDC_SERVER_EDIT, buffer, _countof(buffer));
- db_set_ts(NULL, ModuleName, "Server", buffer);
+ db_set_ws(NULL, ModuleName, "Server", buffer);
GetDlgItemText(hWnd, IDC_PORT_EDIT, buffer, _countof(buffer));
db_set_dw(NULL, ModuleName, "Port", GetDlgItemInt(hWnd, IDC_PORT_EDIT, NULL, FALSE));
diff --git a/plugins/Exchange/src/emails.cpp b/plugins/Exchange/src/emails.cpp
index 5f22aa6a29..51fdb00455 100644
--- a/plugins/Exchange/src/emails.cpp
+++ b/plugins/Exchange/src/emails.cpp
@@ -62,7 +62,7 @@ int CExchangeServer::Connect(int bForceConnect)
wchar_t server[1024];
GetStringFromDatabase("Username", L"", user, _countof(user));
- wcsncpy_s(user, VARST(user), _TRUNCATE);
+ wcsncpy_s(user, VARSW(user), _TRUNCATE);
GetStringFromDatabase("Password", L"", password, _countof(password));
GetStringFromDatabase("Server", L"", server, _countof(server));
diff --git a/plugins/Exchange/src/hooked_events.cpp b/plugins/Exchange/src/hooked_events.cpp
index c484e976c3..4d70d44ceb 100644
--- a/plugins/Exchange/src/hooked_events.cpp
+++ b/plugins/Exchange/src/hooked_events.cpp
@@ -65,7 +65,7 @@ int OnModulesLoaded(WPARAM, LPARAM)
mi.hIcolibItem = hiMailIcon;
mi.position = 10000000;
mi.pszService = MS_EXCHANGE_CHECKEMAIL;
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
mi.name.w = LPGENW("Check exchange mailbox");
Menu_AddMainMenuItem(&mi);
@@ -85,7 +85,7 @@ int OnOptionsInitialise(WPARAM wParam, LPARAM)
odp.pwszTitle = LPGENW("Exchange notify");
odp.pwszGroup = LPGENW("Plugins");
odp.groupPosition = 910000000;
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
odp.pfnDlgProc = DlgProcOptions;
Options_AddPage(wParam, &odp);
return 0;
diff --git a/plugins/Exchange/src/utils.cpp b/plugins/Exchange/src/utils.cpp
index e65843eb88..97fc4cca13 100644
--- a/plugins/Exchange/src/utils.cpp
+++ b/plugins/Exchange/src/utils.cpp
@@ -113,7 +113,7 @@ int GetStringFromDatabase(char *szSettingName, wchar_t *szError, wchar_t *szResu
DBVARIANT dbv = { 0 };
int res = 1;
dbv.type = DBVT_ASCIIZ;
- if (db_get_ts(NULL, ModuleName, szSettingName, &dbv) == 0) {
+ if (db_get_ws(NULL, ModuleName, szSettingName, &dbv) == 0) {
res = 0;
size_t tmp = mir_wstrlen(dbv.ptszVal);
size_t len = (tmp < size - 1) ? tmp : size - 1;
diff --git a/plugins/FTPFileYM/src/dialog.cpp b/plugins/FTPFileYM/src/dialog.cpp
index 06c914070c..36ae1f824c 100644
--- a/plugins/FTPFileYM/src/dialog.cpp
+++ b/plugins/FTPFileYM/src/dialog.cpp
@@ -191,31 +191,31 @@ INT_PTR CALLBACK UploadDialog::UploadDlgProc(HWND hwndDlg, UINT msg, WPARAM wPar
SendDlgItemMessage(hwndDlg, IDC_UP_CONTACT, WM_SETFONT, (WPARAM)hFont, 0);
SendDlgItemMessage(hwndDlg, IDC_BTN_PROTO, BUTTONSETASFLATBTN, 0, 0);
- SendDlgItemMessage(hwndDlg, IDC_BTN_PROTO, BUTTONADDTOOLTIP, (WPARAM)TranslateT("User Info"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_BTN_PROTO, BUTTONADDTOOLTIP, (WPARAM)TranslateT("User Info"), BATF_UNICODE);
SendDlgItemMessage(hwndDlg, IDC_BTN_PAUSE, BUTTONSETASFLATBTN, 0, 0);
SendDlgItemMessage(hwndDlg, IDC_BTN_PAUSE, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Utils::loadIconEx("pause"));
- SendDlgItemMessage(hwndDlg, IDC_BTN_PAUSE, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Pause"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_BTN_PAUSE, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Pause"), BATF_UNICODE);
SendDlgItemMessage(hwndDlg, IDC_BTN_CLIPBOARD, BUTTONSETASFLATBTN, 0, 0);
SendDlgItemMessage(hwndDlg, IDC_BTN_CLIPBOARD, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Utils::loadIconEx("clipboard"));
- SendDlgItemMessage(hwndDlg, IDC_BTN_CLIPBOARD, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Copy Link to Clipboard"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_BTN_CLIPBOARD, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Copy Link to Clipboard"), BATF_UNICODE);
SendDlgItemMessage(hwndDlg, IDC_BTN_DOWNLOAD, BUTTONSETASFLATBTN, 0, 0);
SendDlgItemMessage(hwndDlg, IDC_BTN_DOWNLOAD, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_LoadIcon(SKINICON_EVENT_URL));
- SendDlgItemMessage(hwndDlg, IDC_BTN_DOWNLOAD, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Open in Browser"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_BTN_DOWNLOAD, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Open in Browser"), BATF_UNICODE);
SendDlgItemMessage(hwndDlg, IDC_BTN_FILEMANAGER, BUTTONSETASFLATBTN, 0, 0);
SendDlgItemMessage(hwndDlg, IDC_BTN_FILEMANAGER, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Utils::loadIconEx("main"));
- SendDlgItemMessage(hwndDlg, IDC_BTN_FILEMANAGER, BUTTONADDTOOLTIP, (WPARAM)TranslateT("FTP File Manager"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_BTN_FILEMANAGER, BUTTONADDTOOLTIP, (WPARAM)TranslateT("FTP File Manager"), BATF_UNICODE);
SendDlgItemMessage(hwndDlg, IDC_BTN_OPTIONS, BUTTONSETASFLATBTN, 0, 0);
SendDlgItemMessage(hwndDlg, IDC_BTN_OPTIONS, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_LoadIcon(SKINICON_OTHER_OPTIONS));
- SendDlgItemMessage(hwndDlg, IDC_BTN_OPTIONS, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Options"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_BTN_OPTIONS, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Options"), BATF_UNICODE);
SendDlgItemMessage(hwndDlg, IDC_BTN_CLOSE, BUTTONSETASFLATBTN, 0, 0);
SendDlgItemMessage(hwndDlg, IDC_BTN_CLOSE, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_LoadIcon(SKINICON_OTHER_DELETE));
- SendDlgItemMessage(hwndDlg, IDC_BTN_CLOSE, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Close"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_BTN_CLOSE, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Close"), BATF_UNICODE);
}
break;
diff --git a/plugins/FTPFileYM/src/ftpfile.cpp b/plugins/FTPFileYM/src/ftpfile.cpp
index f2681e24c4..c915436f48 100644
--- a/plugins/FTPFileYM/src/ftpfile.cpp
+++ b/plugins/FTPFileYM/src/ftpfile.cpp
@@ -93,7 +93,7 @@ void InitMenuItems()
CMenuItem mi;
SET_UID(mi, 0xB7132F5A, 0x65FC, 0x42C5, 0xB4, 0xCB, 0x54, 0xBC, 0xAC, 0x58, 0x34, 0xE9);
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
mi.hIcolibItem = iconList[ServerList::FTP_COUNT].hIcolib;
mi.position = 3000090001;
mi.name.w = LPGENW("FTP File");
@@ -104,10 +104,10 @@ void InitMenuItems()
memset(&mi, 0, sizeof(mi));
mi.name.w = stzName;
- mi.flags = CMIF_TCHAR | CMIF_SYSTEM;
+ mi.flags = CMIF_UNICODE | CMIF_SYSTEM;
CMenuItem mi2;
- mi2.flags = CMIF_TCHAR | CMIF_SYSTEM;
+ mi2.flags = CMIF_UNICODE | CMIF_SYSTEM;
mi2.pszService = MS_FTPFILE_CONTACTMENU;
for (int i = 0; i < ServerList::FTP_COUNT; i++) {
@@ -155,7 +155,7 @@ void InitMenuItems()
memset(&mi, 0, sizeof(mi));
SET_UID(mi, 0x0C17CAD7, 0x7F23, 0x449B, 0xB9, 0xCD, 0xFF, 0x50, 0xDA, 0x69, 0xF3, 0x6F);
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
mi.hIcolibItem = iconList[ServerList::FTP_COUNT].hIcolib;
mi.position = 3000090001;
mi.name.w = LPGENW("FTP File manager");
diff --git a/plugins/FTPFileYM/src/job_upload.cpp b/plugins/FTPFileYM/src/job_upload.cpp
index 5bd60536f5..8443dafb6b 100644
--- a/plugins/FTPFileYM/src/job_upload.cpp
+++ b/plugins/FTPFileYM/src/job_upload.cpp
@@ -434,11 +434,11 @@ void UploadJob::refreshTab(bool bTabChanged)
if (bTabChanged) {
if (isPaused()) {
SendDlgItemMessage(uDlg->m_hwnd, IDC_BTN_PAUSE, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Utils::loadIconEx("resume"));
- SendDlgItemMessage(uDlg->m_hwnd, IDC_BTN_PAUSE, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Resume"), BATF_TCHAR);
+ SendDlgItemMessage(uDlg->m_hwnd, IDC_BTN_PAUSE, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Resume"), BATF_UNICODE);
}
else {
SendDlgItemMessage(uDlg->m_hwnd, IDC_BTN_PAUSE, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Utils::loadIconEx("pause"));
- SendDlgItemMessage(uDlg->m_hwnd, IDC_BTN_PAUSE, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Pause"), BATF_TCHAR);
+ SendDlgItemMessage(uDlg->m_hwnd, IDC_BTN_PAUSE, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Pause"), BATF_UNICODE);
}
ShowWindow(GetDlgItem(uDlg->m_hwnd, IDC_ST_REMAIN), !isCompleted() ? SW_SHOW : SW_HIDE);
diff --git a/plugins/FTPFileYM/src/manager.cpp b/plugins/FTPFileYM/src/manager.cpp
index 84e648bcfd..c77cd62fc2 100644
--- a/plugins/FTPFileYM/src/manager.cpp
+++ b/plugins/FTPFileYM/src/manager.cpp
@@ -227,19 +227,19 @@ INT_PTR CALLBACK Manager::ManagerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam,
SendDlgItemMessage(hwndDlg, IDC_BTN_SELECTALL, BUTTONSETASFLATBTN, 0, 0);
SendDlgItemMessage(hwndDlg, IDC_BTN_SELECTALL, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_LoadIcon(SKINICON_OTHER_TICK));
- SendDlgItemMessage(hwndDlg, IDC_BTN_SELECTALL, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Select All"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_BTN_SELECTALL, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Select All"), BATF_UNICODE);
SendDlgItemMessage(hwndDlg, IDC_BTN_DESELECTALL, BUTTONSETASFLATBTN, 0, 0);
SendDlgItemMessage(hwndDlg, IDC_BTN_DESELECTALL, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_LoadIcon(SKINICON_OTHER_NOTICK));
- SendDlgItemMessage(hwndDlg, IDC_BTN_DESELECTALL, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Clear All"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_BTN_DESELECTALL, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Clear All"), BATF_UNICODE);
SendDlgItemMessage(hwndDlg, IDC_BTN_DELETEFROMLIST, BUTTONSETASFLATBTN, 0, 0);
SendDlgItemMessage(hwndDlg, IDC_BTN_DELETEFROMLIST, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Utils::loadIconEx("clear"));
- SendDlgItemMessage(hwndDlg, IDC_BTN_DELETEFROMLIST, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Delete from List"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_BTN_DELETEFROMLIST, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Delete from List"), BATF_UNICODE);
SendDlgItemMessage(hwndDlg, IDC_BTN_DELETE, BUTTONSETASFLATBTN, 0, 0);
SendDlgItemMessage(hwndDlg, IDC_BTN_DELETE, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Utils::loadIconEx("delete"));
- SendDlgItemMessage(hwndDlg, IDC_BTN_DELETE, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Delete from FTP"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_BTN_DELETE, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Delete from FTP"), BATF_UNICODE);
SendDlgItemMessage(hwndDlg, IDC_BTN_CLOSE, BUTTONSETASFLATBTN, 0, 0);
SendDlgItemMessage(hwndDlg, IDC_BTN_CLOSE, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_LoadIcon(SKINICON_OTHER_EXIT));
- SendDlgItemMessage(hwndDlg, IDC_BTN_CLOSE, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Close"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_BTN_CLOSE, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Close"), BATF_UNICODE);
return TRUE;
case WM_COMMAND:
diff --git a/plugins/FTPFileYM/src/mir_db.cpp b/plugins/FTPFileYM/src/mir_db.cpp
index dadc502028..e7c693585a 100644
--- a/plugins/FTPFileYM/src/mir_db.cpp
+++ b/plugins/FTPFileYM/src/mir_db.cpp
@@ -50,7 +50,7 @@ int DB::setStringF(MCONTACT hContact, char *szModule, char *szSetting, int id, w
{
char formSet[256];
mir_snprintf(formSet, szSetting, id);
- return db_set_ts(hContact, szModule, formSet, stzValue);
+ return db_set_ws(hContact, szModule, formSet, stzValue);
}
int DB::getByteF(MCONTACT hContact, char *szModule, char *szSetting, int id, int iErrorValue)
@@ -97,7 +97,7 @@ int DB::getAStringF(MCONTACT hContact, char *szModule, char *szSetting, int id,
int DB::getString(MCONTACT hContact, char *szModule, char *szSetting, wchar_t *buff)
{
DBVARIANT dbv;
- if (!db_get_ts(hContact, szModule, szSetting, &dbv)) {
+ if (!db_get_ws(hContact, szModule, szSetting, &dbv)) {
mir_wstrcpy(buff, dbv.ptszVal);
db_free(&dbv);
return 0;
diff --git a/plugins/FTPFileYM/src/options.cpp b/plugins/FTPFileYM/src/options.cpp
index fa0632194b..38777bcc6a 100644
--- a/plugins/FTPFileYM/src/options.cpp
+++ b/plugins/FTPFileYM/src/options.cpp
@@ -249,7 +249,7 @@ int Options::InitOptions(WPARAM wParam, LPARAM)
OPTIONSDIALOGPAGE odp = { 0 };
odp.position = 100000000;
odp.hInstance = hInst;
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
odp.pwszTitle = LPGENW("FTP File");
odp.pwszGroup = LPGENW("Services");
diff --git a/plugins/FavContacts/src/favlist.h b/plugins/FavContacts/src/favlist.h
index 3cbb4a8285..b111550237 100644
--- a/plugins/FavContacts/src/favlist.h
+++ b/plugins/FavContacts/src/favlist.h
@@ -20,7 +20,7 @@ public:
name = mir_wstrdup(pcli->pfnGetContactDisplayName(hContact, 0));
if (g_Options.bUseGroups) {
- if ((group = db_get_tsa(hContact, "CList", "Group")) == NULL)
+ if ((group = db_get_wsa(hContact, "CList", "Group")) == NULL)
group = mir_wstrdup(TranslateT("<no group>"));
}
else group = mir_wstrdup(TranslateT("Favorite Contacts"));
diff --git a/plugins/FavContacts/src/menu.cpp b/plugins/FavContacts/src/menu.cpp
index 64568587c2..ebf50f87fa 100644
--- a/plugins/FavContacts/src/menu.cpp
+++ b/plugins/FavContacts/src/menu.cpp
@@ -71,7 +71,7 @@ static BOOL sttMeasureItem_Contact(LPMEASUREITEMSTRUCT lpmis, Options *options)
if (options->bSecondLine) {
bool bFree = false;
- wchar_t *title = db_get_tsa(hContact, "CList", "StatusMsg");
+ wchar_t *title = db_get_wsa(hContact, "CList", "StatusMsg");
if (title == NULL) {
char *proto = GetContactProto(hContact);
int status = db_get_w(hContact, proto, "Status", ID_STATUS_OFFLINE);
@@ -315,7 +315,7 @@ static BOOL sttDrawItem_Contact(LPDRAWITEMSTRUCT lpdis, Options *options = NULL)
if (options->bSecondLine) {
bool bFree = false;
- wchar_t *title = db_get_tsa(hContact, "CList", "StatusMsg");
+ wchar_t *title = db_get_wsa(hContact, "CList", "StatusMsg");
if (title == NULL) {
int status = db_get_w(hContact, proto, "Status", ID_STATUS_OFFLINE);
title = pcli->pfnGetStatusModeDescription(status, 0);
diff --git a/plugins/FavContacts/src/services.cpp b/plugins/FavContacts/src/services.cpp
index 00a053b996..2a6cab99c5 100644
--- a/plugins/FavContacts/src/services.cpp
+++ b/plugins/FavContacts/src/services.cpp
@@ -127,29 +127,29 @@ int ProcessReloadFonts(WPARAM, LPARAM)
if (g_Options.hfntSecond) DeleteObject(g_Options.hfntSecond);
LOGFONT lf = { 0 };
- FontIDT fontid = { sizeof(fontid) };
+ FontIDW fontid = { sizeof(fontid) };
mir_wstrcpy(fontid.group, LPGENW("Favorite Contacts"));
mir_wstrcpy(fontid.name, LPGENW("Contact name"));
- g_Options.clLine1 = CallService(MS_FONT_GETT, (WPARAM)&fontid, (LPARAM)&lf);
+ g_Options.clLine1 = CallService(MS_FONT_GETW, (WPARAM)&fontid, (LPARAM)&lf);
g_Options.hfntName = CreateFontIndirect(&lf);
mir_wstrcpy(fontid.name, LPGENW("Second line"));
- g_Options.clLine2 = CallService(MS_FONT_GETT, (WPARAM)&fontid, (LPARAM)&lf);
+ g_Options.clLine2 = CallService(MS_FONT_GETW, (WPARAM)&fontid, (LPARAM)&lf);
g_Options.hfntSecond = CreateFontIndirect(&lf);
mir_wstrcpy(fontid.name, LPGENW("Selected contact name (color)"));
- g_Options.clLine1Sel = CallService(MS_FONT_GETT, (WPARAM)&fontid, (LPARAM)&lf);
+ g_Options.clLine1Sel = CallService(MS_FONT_GETW, (WPARAM)&fontid, (LPARAM)&lf);
mir_wstrcpy(fontid.name, LPGENW("Selected second line (color)"));
- g_Options.clLine2Sel = CallService(MS_FONT_GETT, (WPARAM)&fontid, (LPARAM)&lf);
+ g_Options.clLine2Sel = CallService(MS_FONT_GETW, (WPARAM)&fontid, (LPARAM)&lf);
- ColourIDT colourid = { sizeof(colourid) };
+ ColourIDW colourid = { sizeof(colourid) };
mir_wstrcpy(colourid.group, LPGENW("Favorite Contacts"));
mir_wstrcpy(colourid.name, LPGENW("Background"));
- g_Options.clBack = CallService(MS_COLOUR_GETT, (WPARAM)&colourid, (LPARAM)&lf);
+ g_Options.clBack = CallService(MS_COLOUR_GETW, (WPARAM)&colourid, (LPARAM)&lf);
mir_wstrcpy(colourid.name, LPGENW("Selected background"));
- g_Options.clBackSel = CallService(MS_COLOUR_GETT, (WPARAM)&colourid, (LPARAM)&lf);
+ g_Options.clBackSel = CallService(MS_COLOUR_GETW, (WPARAM)&colourid, (LPARAM)&lf);
return 0;
}
@@ -170,7 +170,7 @@ int ProcessModulesLoaded(WPARAM, LPARAM)
/////////////////////////////////////////////////////////////////////////////////////
- FontIDT fontid = { sizeof(fontid) };
+ FontIDW fontid = { sizeof(fontid) };
mir_wstrcpy(fontid.group, LPGENW("Favorite Contacts"));
mir_strcpy(fontid.dbSettingsGroup, "FavContacts");
mir_wstrcpy(fontid.backgroundGroup, LPGENW("Favorite Contacts"));
@@ -186,13 +186,13 @@ int ProcessModulesLoaded(WPARAM, LPARAM)
mir_strcpy(fontid.prefix, "fntName");
fontid.deffontsettings.colour = GetSysColor(COLOR_MENUTEXT);
fontid.deffontsettings.style = DBFONTF_BOLD;
- FontRegisterT(&fontid);
+ FontRegisterW(&fontid);
mir_wstrcpy(fontid.name, LPGENW("Second line"));
mir_strcpy(fontid.prefix, "fntSecond");
fontid.deffontsettings.colour = sttShadeColor(GetSysColor(COLOR_MENUTEXT), GetSysColor(COLOR_MENU));
fontid.deffontsettings.style = 0;
- FontRegisterT(&fontid);
+ FontRegisterW(&fontid);
mir_wstrcpy(fontid.backgroundName, LPGENW("Selected background"));
@@ -200,29 +200,29 @@ int ProcessModulesLoaded(WPARAM, LPARAM)
mir_strcpy(fontid.prefix, "fntNameSel");
fontid.deffontsettings.colour = GetSysColor(COLOR_HIGHLIGHTTEXT);
fontid.deffontsettings.style = DBFONTF_BOLD;
- FontRegisterT(&fontid);
+ FontRegisterW(&fontid);
mir_wstrcpy(fontid.name, LPGENW("Selected second line (color)"));
mir_strcpy(fontid.prefix, "fntSecondSel");
fontid.deffontsettings.colour = sttShadeColor(GetSysColor(COLOR_HIGHLIGHTTEXT), GetSysColor(COLOR_HIGHLIGHT));
fontid.deffontsettings.style = 0;
- FontRegisterT(&fontid);
+ FontRegisterW(&fontid);
/////////////////////////////////////////////////////////////////////////////////////
- ColourIDT colourid = { sizeof(colourid) };
+ ColourIDW colourid = { sizeof(colourid) };
mir_wstrcpy(colourid.group, LPGENW("Favorite Contacts"));
mir_strcpy(colourid.dbSettingsGroup, "FavContacts");
mir_wstrcpy(colourid.name, LPGENW("Background"));
mir_strcpy(colourid.setting, "BackColour");
colourid.defcolour = GetSysColor(COLOR_MENU);
- ColourRegisterT(&colourid);
+ ColourRegisterW(&colourid);
mir_wstrcpy(colourid.name, LPGENW("Selected background"));
mir_strcpy(colourid.setting, "SelectedColour");
colourid.defcolour = GetSysColor(COLOR_HIGHLIGHT);
- ColourRegisterT(&colourid);
+ ColourRegisterW(&colourid);
HookEvent(ME_FONT_RELOAD, ProcessReloadFonts);
HookEvent(ME_COLOUR_RELOAD, ProcessReloadFonts);
diff --git a/plugins/FingerprintNG/src/fingerprint.cpp b/plugins/FingerprintNG/src/fingerprint.cpp
index 3d0f14b90c..0ec2887af0 100644
--- a/plugins/FingerprintNG/src/fingerprint.cpp
+++ b/plugins/FingerprintNG/src/fingerprint.cpp
@@ -79,7 +79,7 @@ void __fastcall Prepare(KN_FP_MASK* mask, bool bEnable)
return;
SKINICONDESC sid = { 0 };
- sid.flags = SIDF_ALL_TCHAR;
+ sid.flags = SIDF_ALL_UNICODE;
sid.section.w = SectName;
sid.pszName = mask->szIconName;
sid.description.w = mask->szClientDescription;
@@ -144,7 +144,7 @@ static void SetSrmmIcon(MCONTACT hContact, LPTSTR ptszMirver)
StatusIconData sid = { sizeof(sid) };
sid.szModule = MODULENAME;
sid.dwId = 1;
- sid.flags = MBF_TCHAR;
+ sid.flags = MBF_UNICODE;
sid.tszTooltip = ptszMirver;
if (mir_wstrlen(ptszMirver))
@@ -843,7 +843,7 @@ int OnExtraImageApply(WPARAM hContact, LPARAM)
ptrW tszMirver;
char *szProto = GetContactProto(hContact);
if (szProto != NULL)
- tszMirver = db_get_tsa(hContact, szProto, "MirVer");
+ tszMirver = db_get_wsa(hContact, szProto, "MirVer");
ApplyFingerprintImage(hContact, tszMirver);
return 0;
@@ -896,7 +896,7 @@ static int OnSrmmWindowEvent(WPARAM, LPARAM lParam)
ptrW ptszMirVer;
char *szProto = GetContactProto(event->hContact);
if (szProto != NULL)
- ptszMirVer = db_get_tsa(event->hContact, szProto, "MirVer");
+ ptszMirVer = db_get_wsa(event->hContact, szProto, "MirVer");
SetSrmmIcon(event->hContact, ptszMirVer);
arMonitoredWindows.insert((HANDLE)event->hContact);
}
@@ -923,7 +923,7 @@ int OnModulesLoaded(WPARAM, LPARAM)
HookEvent(ME_MC_DEFAULTTCHANGED, OnExtraImageApply);
- PathToAbsoluteT(DEFAULT_SKIN_FOLDER, g_szSkinLib);
+ PathToAbsoluteW(DEFAULT_SKIN_FOLDER, g_szSkinLib);
RegisterIcons();
diff --git a/plugins/FingerprintNG/src/options.cpp b/plugins/FingerprintNG/src/options.cpp
index 0aef494660..36bac46dab 100644
--- a/plugins/FingerprintNG/src/options.cpp
+++ b/plugins/FingerprintNG/src/options.cpp
@@ -121,7 +121,7 @@ int OnOptInitialise(WPARAM wParam, LPARAM)
odp.pszTemplate = MAKEINTRESOURCEA(IDD_DIALOG);
odp.pwszTitle = LPGENW("Fingerprint");
odp.pfnDlgProc = DlgProcOptions;
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/FloatingContacts/src/main.cpp b/plugins/FloatingContacts/src/main.cpp
index dbd018a81a..ca53b9415c 100644
--- a/plugins/FloatingContacts/src/main.cpp
+++ b/plugins/FloatingContacts/src/main.cpp
@@ -314,7 +314,7 @@ void SendMsgDialog(HWND hwnd, wchar_t *pText)
{
ThumbInfo *pThumb = thumbList.FindThumb(hwnd);
if (pThumb != NULL)
- CallService(MS_MSG_SENDMESSAGET, (WPARAM)pThumb->hContact, (LPARAM)pText);
+ CallService(MS_MSG_SENDMESSAGEW, (WPARAM)pThumb->hContact, (LPARAM)pText);
}
static void ShowContactMenu(HWND hwnd, POINT pt)
@@ -570,7 +570,7 @@ static void CreateBackgroundBrush()
}
if (db_get_b(NULL, MODULE, "BkUseBitmap", FLT_DEFAULT_BKGNDUSEBITMAP)) {
- ptrW tszBitmapName(db_get_tsa(NULL, MODULE, "BkBitmap"));
+ ptrW tszBitmapName(db_get_wsa(NULL, MODULE, "BkBitmap"));
if (tszBitmapName != NULL)
hBmpBackground = Bitmap_Load(tszBitmapName);
}
@@ -723,7 +723,7 @@ static void LoadMenus()
CreateServiceFunction(MODULE "/RemoveThumb", OnContactMenu_Remove);
SET_UID(mi,0xbab83df0, 0xe126, 0x4d9a, 0xbc, 0xc3, 0x2b, 0xea, 0x84, 0x90, 0x58, 0xc8);
mi.position = 0xFFFFF;
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
mi.hIcolibItem = LoadIcon(hInst, MAKEINTRESOURCE(IDI_HIDE));
mi.name.w = LPGENW("Remove thumb");
mi.pszService = MODULE "/RemoveThumb";
diff --git a/plugins/FloatingContacts/src/options.cpp b/plugins/FloatingContacts/src/options.cpp
index ecf1100007..f62b761fc4 100644
--- a/plugins/FloatingContacts/src/options.cpp
+++ b/plugins/FloatingContacts/src/options.cpp
@@ -180,7 +180,7 @@ static INT_PTR APIENTRY OptSknWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LP
SendMessage(hwndDlg, M_REFRESHBKGBOXES, 0, 0);
{
DBVARIANT dbv;
- if (!db_get_ts(NULL, MODULE, "BkBitmap", &dbv)) {
+ if (!db_get_ws(NULL, MODULE, "BkBitmap", &dbv)) {
SetDlgItemText(hwndDlg, IDC_FILENAME, dbv.ptszVal);
db_free(&dbv);
}
@@ -303,7 +303,7 @@ static INT_PTR APIENTRY OptSknWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LP
wchar_t str[MAX_PATH];
GetDlgItemText(hwndDlg, IDC_FILENAME, str, _countof(str));
- db_set_ts(NULL, MODULE, "BkBitmap", str);
+ db_set_ws(NULL, MODULE, "BkBitmap", str);
WORD flags = 0;
if (IsDlgButtonChecked(hwndDlg, IDC_STRETCHH))
diff --git a/plugins/Folders/src/dlg_handlers.cpp b/plugins/Folders/src/dlg_handlers.cpp
index cc22e06423..ec64c90581 100644
--- a/plugins/Folders/src/dlg_handlers.cpp
+++ b/plugins/Folders/src/dlg_handlers.cpp
@@ -38,8 +38,8 @@ static void LoadRegisteredFolderSections(HWND hWnd)
for (int i = 0; i < lstRegisteredFolders.getCount(); i++) {
CFolderItem &tmp = lstRegisteredFolders[i];
wchar_t *translated = mir_a2u(tmp.GetSection());
- if (!ContainsSection(hWnd, TranslateTS(translated))) {
- int idx = SendMessage(hwndList, LB_ADDSTRING, 0, (LPARAM)TranslateTS(translated));
+ if (!ContainsSection(hWnd, TranslateW(translated))) {
+ int idx = SendMessage(hwndList, LB_ADDSTRING, 0, (LPARAM)TranslateW(translated));
SendMessage(hwndList, LB_SETITEMDATA, idx, (LPARAM)tmp.GetSection());
}
@@ -61,7 +61,7 @@ static void LoadRegisteredFolderItems(HWND hWnd)
for (int i = 0; i < lstRegisteredFolders.getCount(); i++) {
CFolderItem &item = lstRegisteredFolders[i];
if (!mir_strcmp(szSection, item.GetSection())) {
- idx = SendMessage(hwndItems, LB_ADDSTRING, 0, (LPARAM)TranslateTS(item.GetUserName()));
+ idx = SendMessage(hwndItems, LB_ADDSTRING, 0, (LPARAM)TranslateW(item.GetUserName()));
SendMessage(hwndItems, LB_SETITEMDATA, idx, (LPARAM)&item);
}
}
diff --git a/plugins/Folders/src/folderItem.cpp b/plugins/Folders/src/folderItem.cpp
index 4a47eb5c7d..f277a27ec3 100644
--- a/plugins/Folders/src/folderItem.cpp
+++ b/plugins/Folders/src/folderItem.cpp
@@ -62,7 +62,7 @@ int CFolderItem::IsEqual(const char *section, const wchar_t *name)
int CFolderItem::IsEqualTranslated(const char *trSection, const wchar_t *trName)
{
- return !mir_wstrcmp(TranslateTS(m_tszUserName), trName) && !mir_strcmp(Translate(m_szSection), trSection);
+ return !mir_wstrcmp(TranslateW(m_tszUserName), trName) && !mir_strcmp(Translate(m_szSection), trSection);
}
int CFolderItem::operator ==(const CFolderItem *other)
@@ -70,7 +70,7 @@ int CFolderItem::operator ==(const CFolderItem *other)
return IsEqual(other);
}
-CMString CFolderItem::Expand()
+CMStringW CFolderItem::Expand()
{
return ExpandPath(m_tszFormat);
}
@@ -87,8 +87,8 @@ int CFolderItem::FolderCreateDirectory(int showFolder)
if (m_tszFormat == NULL)
return FOLDER_SUCCESS;
- CMString buffer(ExpandPath(m_tszFormat));
- CreateDirectoryTreeT(buffer);
+ CMStringW buffer(ExpandPath(m_tszFormat));
+ CreateDirectoryTreeW(buffer);
if (showFolder)
ShellExecute(NULL, L"explore", buffer, NULL, NULL, SW_SHOW);
@@ -103,7 +103,7 @@ int CFolderItem::FolderDeleteOldDirectory(int showFolder)
if (!mir_wstrcmp(m_tszFormat, m_tszOldFormat)) //format wasn't changed
return FOLDER_SUCCESS;
- CMString buffer(ExpandPath(m_tszOldFormat));
+ CMStringW buffer(ExpandPath(m_tszOldFormat));
RemoveDirectories(buffer);
int res = (DirectoryExists(buffer)) ? FOLDER_FAILURE : FOLDER_SUCCESS;
if ((res == FOLDER_FAILURE) && (showFolder))
@@ -117,7 +117,7 @@ void CFolderItem::GetDataFromDatabase(const wchar_t *szNotFound)
strcpy_s(szSettingName, _countof(szSettingName), m_szSection);
strcat_s(szSettingName, _countof(szSettingName), m_szName);
- ptrW tszValue(db_get_tsa(NULL, ModuleName, szSettingName));
+ ptrW tszValue(db_get_wsa(NULL, ModuleName, szSettingName));
SetFormat(tszValue != NULL ? tszValue : szNotFound);
}
@@ -128,5 +128,5 @@ void CFolderItem::WriteDataToDatabase()
strcat_s(szSettingName, sizeof(szSettingName), m_szName);
if (m_tszFormat)
- db_set_ts(NULL, ModuleName, szSettingName, m_tszFormat);
+ db_set_ws(NULL, ModuleName, szSettingName, m_tszFormat);
}
diff --git a/plugins/Folders/src/folderItem.h b/plugins/Folders/src/folderItem.h
index ad02db6d12..385037b0d2 100644
--- a/plugins/Folders/src/folderItem.h
+++ b/plugins/Folders/src/folderItem.h
@@ -43,7 +43,7 @@ public:
CFolderItem(const char *sectionName, const char *name, const wchar_t *format, const wchar_t *userName);
virtual ~CFolderItem();
- CMString Expand();
+ CMStringW Expand();
void Save();
int IsEqual(const CFolderItem *other);
diff --git a/plugins/Folders/src/services.cpp b/plugins/Folders/src/services.cpp
index c05f4ee007..619723ec1b 100644
--- a/plugins/Folders/src/services.cpp
+++ b/plugins/Folders/src/services.cpp
@@ -67,7 +67,7 @@ INT_PTR GetPathService(WPARAM wParam, LPARAM lParam)
if (data->cbSize != sizeof(FOLDERSGETDATA))
return 1;
- CMString buf(p->Expand());
+ CMStringW buf(p->Expand());
if (data->flags & FF_UNICODE)
wcsncpy_s(data->szPathT, data->nMaxPathSize, buf, _TRUNCATE);
else
@@ -79,8 +79,8 @@ INT_PTR GetPathService(WPARAM wParam, LPARAM lParam)
int InitServices()
{
- CallService(MS_DB_GETPROFILEPATHT, _countof(szCurrentProfilePath), (LPARAM)szCurrentProfilePath);
- CallService(MS_DB_GETPROFILENAMET, _countof(szCurrentProfile), (LPARAM)szCurrentProfile);
+ CallService(MS_DB_GETPROFILEPATHW, _countof(szCurrentProfilePath), (LPARAM)szCurrentProfilePath);
+ CallService(MS_DB_GETPROFILENAMEW, _countof(szCurrentProfile), (LPARAM)szCurrentProfile);
wchar_t *pos = wcsrchr(szCurrentProfile, '.'); if (pos) *pos = 0;
GetModuleFileName(GetModuleHandleA("mir_app.mir"), szMirandaPath, _countof(szMirandaPath));
diff --git a/plugins/Folders/src/utils.cpp b/plugins/Folders/src/utils.cpp
index f2fb0087af..61b445b5c6 100644
--- a/plugins/Folders/src/utils.cpp
+++ b/plugins/Folders/src/utils.cpp
@@ -20,14 +20,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "stdafx.h"
-CMString ExpandPath(const wchar_t *format)
+CMStringW ExpandPath(const wchar_t *format)
{
- CMString res;
+ CMStringW res;
if (ServiceExists(MS_VARS_FORMATSTRING))
- res = VARST(ptrW(variables_parse((wchar_t*)format, NULL, NULL)));
+ res = VARSW(ptrW(variables_parse((wchar_t*)format, NULL, NULL)));
else
- res = VARST(format);
+ res = VARSW(format);
res.Replace(PROFILE_PATHT, szCurrentProfilePath);
res.Replace(CURRENT_PROFILET, szCurrentProfile);
diff --git a/plugins/Folders/src/utils.h b/plugins/Folders/src/utils.h
index 4724635ce0..509546dcd6 100644
--- a/plugins/Folders/src/utils.h
+++ b/plugins/Folders/src/utils.h
@@ -21,7 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef M_FOLDERS_UTILS_H
#define M_FOLDERS_UTILS_H
-CMString ExpandPath(const wchar_t *format);
+CMStringW ExpandPath(const wchar_t *format);
void RemoveDirectories(const wchar_t *szPath);
bool DirectoryExists(const wchar_t *szPath);
diff --git a/plugins/HTTPServer/src/GuiElements.cpp b/plugins/HTTPServer/src/GuiElements.cpp
index ed36ad8ac2..b84e83de92 100644
--- a/plugins/HTTPServer/src/GuiElements.cpp
+++ b/plugins/HTTPServer/src/GuiElements.cpp
@@ -997,7 +997,7 @@ static INT_PTR CALLBACK DlgProcStatsticView(HWND hwndDlg, UINT msg, WPARAM wPara
void SendLinkToUser(WPARAM wParam, char *pszSrvPath)
{
string sLink = sCreateLink(pszSrvPath);
- CallService(MS_MSG_SENDMESSAGET, wParam, (LPARAM)sLink.c_str());
+ CallService(MS_MSG_SENDMESSAGEW, wParam, (LPARAM)sLink.c_str());
}
/////////////////////////////////////////////////////////////////////
@@ -1342,7 +1342,7 @@ int OptionsInitialize(WPARAM wParam, LPARAM /*lParam*/)
odp.position = 900000000;
odp.hInstance = hInstance;
odp.pszTemplate = MAKEINTRESOURCE(IDD_OPT_HTTP_SERVER);
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
odp.pwszTitle = LPGENW("HTTP Server");
odp.pwszGroup = LPGENW("Network");
odp.pfnDlgProc = OptionsDlgProc;
@@ -1484,7 +1484,7 @@ void InitGuiElements()
if (db_get_b(NULL, MODULE, "AddStatisticsMenuItem", 1) != 0) {
SET_UID(mi, 0x68db84c9, 0xe6b4, 0x4b4f, 0x93, 0x4b, 0xfd, 0x34, 0x2d, 0x83, 0x11, 0xe7);
mi.position = 1000085005;
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
mi.name.w = LPGENW("Show HTTP server statistics");
mi.pszService = MS_SHOW_STATISTICS_VIEW;
hShowStatisticsViewMenuItem = Menu_AddMainMenuItem(&mi);
diff --git a/plugins/HTTPServer/src/main.cpp b/plugins/HTTPServer/src/main.cpp
index e0f87a2171..3a1145bf72 100644
--- a/plugins/HTTPServer/src/main.cpp
+++ b/plugins/HTTPServer/src/main.cpp
@@ -924,7 +924,7 @@ extern "C" __declspec(dllexport) int Load()
if (db_get_b(NULL, MODULE, "AddAcceptConMenuItem", 1)) {
CMenuItem mi;
SET_UID(mi, 0xf0a68784, 0xc30e, 0x4245, 0xb6, 0x2b, 0xb8, 0x71, 0x7e, 0xe6, 0xe1, 0x73);
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
mi.hIcolibItem = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_SHARE_NEW_FILE));
mi.position = 1000085000;
mi.name.a = LPGEN("Enable HTTP server");
diff --git a/plugins/HistoryLinkListPlus/src/linklist.cpp b/plugins/HistoryLinkListPlus/src/linklist.cpp
index 0ad6c2cda1..5021b50f0f 100644
--- a/plugins/HistoryLinkListPlus/src/linklist.cpp
+++ b/plugins/HistoryLinkListPlus/src/linklist.cpp
@@ -62,7 +62,7 @@ extern "C" __declspec(dllexport) int Load(void)
CMenuItem mi;
SET_UID(mi, 0x2964dc6c, 0x9cf9, 0x4f20, 0x8f, 0x8a, 0xc6, 0xfe, 0xe2, 0x65, 0xac, 0xc9);
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
mi.hIcolibItem = LoadIcon(hInst, MAKEINTRESOURCE(IDI_LINKLISTICON));
mi.name.w = LPGENW("&Create Linklist");
mi.pszService = "Linklist/MenuCommand";
diff --git a/plugins/HistoryLinkListPlus/src/linklist_fct.cpp b/plugins/HistoryLinkListPlus/src/linklist_fct.cpp
index c267c1d03c..cd8fffbe8f 100644
--- a/plugins/HistoryLinkListPlus/src/linklist_fct.cpp
+++ b/plugins/HistoryLinkListPlus/src/linklist_fct.cpp
@@ -58,7 +58,7 @@ int ExtractURI(DBEVENTINFO *dbei, MEVENT hEvent, LISTELEMENT *listStart)
date[0] = 0;
time[0] = 0;
- msg = DbGetEventTextT(dbei, CP_ACP);
+ msg = DbGetEventTextW(dbei, CP_ACP);
if (msg == NULL)
return 0;
@@ -383,7 +383,7 @@ void WriteLinkList(HWND hDlg, BYTE params, LISTELEMENT *listStart, LPCTSTR searc
dbe.pBlob = (PBYTE)mir_alloc(dbe.cbBlob+1);
db_event_get(actualElement->hEvent, &dbe);
dbe.pBlob[dbe.cbBlob] = 0;
- LPTSTR msg = DbGetEventTextT(&dbe, CP_ACP);
+ LPTSTR msg = DbGetEventTextW(&dbe, CP_ACP);
if ( wcsstr(msg, searchString))
filter3 = 1;
@@ -617,7 +617,7 @@ void WriteMessage(HWND hDlg, LISTELEMENT *listStart, int actLinePos)
dbe.pBlob = (PBYTE)mir_alloc(dbe.cbBlob+1);
db_event_get(hEvent, &dbe);
dbe.pBlob[dbe.cbBlob] = 0;
- LPCTSTR msg = DbGetEventTextT(&dbe, CP_ACP);
+ LPCTSTR msg = DbGetEventTextW(&dbe, CP_ACP);
SetDlgItemText(hDlg, IDC_MESSAGE, NULL);
SendDlgItemMessage(hDlg, IDC_MESSAGE, EM_REPLACESEL, FALSE, (LPARAM)msg);
mir_free((void*)msg);
diff --git a/plugins/HistoryStats/src/bandctrlimpl.cpp b/plugins/HistoryStats/src/bandctrlimpl.cpp
index d3ed8a4f65..0bd72c9e5a 100644
--- a/plugins/HistoryStats/src/bandctrlimpl.cpp
+++ b/plugins/HistoryStats/src/bandctrlimpl.cpp
@@ -461,8 +461,8 @@ int BandCtrlImpl::onBCMAddButton(BCBUTTON *pButton)
id.bChecked = bool_(pButton->dwFlags & BCF_CHECKED);
id.bVisible = !(pButton->dwFlags & BCF_HIDDEN);
id.bDropDown = bool_(pButton->dwFlags & BCF_DROPDOWN);
- id.text = (pButton->dwFlags & BCF_TEXT) ? TranslateTS(pButton->m_szText) : L"";
- id.tooltip = (pButton->dwFlags & BCF_TOOLTIP) ? TranslateTS(pButton->m_szTooltip) : L"";
+ id.text = (pButton->dwFlags & BCF_TEXT) ? TranslateW(pButton->m_szText) : L"";
+ id.tooltip = (pButton->dwFlags & BCF_TOOLTIP) ? TranslateW(pButton->m_szTooltip) : L"";
id.uTTId = -1;
id.dwData = (pButton->dwFlags & BCF_DATA) ? pButton->dwData : 0;
id.bEnabled = !(pButton->dwFlags & BCF_DISABLED);
diff --git a/plugins/HistoryStats/src/canvas.cpp b/plugins/HistoryStats/src/canvas.cpp
index 118534209d..945b22351b 100644
--- a/plugins/HistoryStats/src/canvas.cpp
+++ b/plugins/HistoryStats/src/canvas.cpp
@@ -139,5 +139,5 @@ bool Canvas::writePNG(const wchar_t* szFileName)
img.hbm = m_hBmp;
img.fif = FIF_PNG;
img.tszName = (wchar_t*)szFileName;
- return CallService(MS_IMG_SAVE, (WPARAM)&img, IMGL_TCHAR) == 0;
+ return CallService(MS_IMG_SAVE, (WPARAM)&img, IMGL_WCHAR) == 0;
}
diff --git a/plugins/HistoryStats/src/column.h b/plugins/HistoryStats/src/column.h
index bb03bc1291..acd99f933e 100644
--- a/plugins/HistoryStats/src/column.h
+++ b/plugins/HistoryStats/src/column.h
@@ -155,7 +155,7 @@ public:
void setCustomTitle(const ext::string& customTitle) { m_CustomTitle = customTitle; }
const ext::string getCustomTitle() const { return m_CustomTitle; }
const ext::string getCustomTitle(const ext::string& strShort, const ext::string& strLong) const;
- ext::string getTitleForOptions() { return m_CustomTitle.empty() ? TranslateTS(getTitle()) : (m_CustomTitle + L" (" + TranslateTS(getTitle()) + L")"); }
+ ext::string getTitleForOptions() { return m_CustomTitle.empty() ? TranslateW(getTitle()) : (m_CustomTitle + L" (" + TranslateW(getTitle()) + L")"); }
void setHelpers(Statistic* pStatistic, Settings* pSettings, Settings::CharMapper* pCharMapper) { m_pStatistic = pStatistic; m_pSettings = pSettings; m_pCharMapper = pCharMapper; }
Statistic* getStatistic() const { return m_pStatistic; }
diff --git a/plugins/HistoryStats/src/column_chatduration.cpp b/plugins/HistoryStats/src/column_chatduration.cpp
index 762e750d1b..96af1bc4aa 100644
--- a/plugins/HistoryStats/src/column_chatduration.cpp
+++ b/plugins/HistoryStats/src/column_chatduration.cpp
@@ -88,7 +88,7 @@ void ColChatDuration::impl_outputRenderHeader(ext::ostream& tos, int row, int ro
if (row == 1)
{
- ext::string szLong = TranslateTS(szVisModeDesc[m_nVisMode]);
+ ext::string szLong = TranslateW(szVisModeDesc[m_nVisMode]);
writeRowspanTD(tos, getCustomTitle(TranslateT("Chat duration"), szLong) + (m_bGraph ? L"<div style=\"width: 70px;\"></div>" : L""), row, 1, rowSpan);
}
}
@@ -176,7 +176,7 @@ void ColChatDuration::impl_outputRenderRow(ext::ostream& tos, const Contact& con
{
if (i != m_nVisMode)
{
- strTooltip += ext::str(ext::kformat(TranslateTS(szPrefixes[i])) % L"#{amount}" * strAll[i]);
+ strTooltip += ext::str(ext::kformat(TranslateW(szPrefixes[i])) % L"#{amount}" * strAll[i]);
++nSegments;
if (nSegments < 3)
diff --git a/plugins/HistoryStats/src/column_events.cpp b/plugins/HistoryStats/src/column_events.cpp
index 1ecea2f2d5..bdee38136a 100644
--- a/plugins/HistoryStats/src/column_events.cpp
+++ b/plugins/HistoryStats/src/column_events.cpp
@@ -42,7 +42,7 @@ void ColEvents::impl_configToUI(OptionsCtrl& Opt, OptionsCtrl::Item hGroup)
array_each_(i, sourceTexts)
{
- Opt.addComboItem(m_hSource, TranslateTS(sourceTexts[i]));
+ Opt.addComboItem(m_hSource, TranslateW(sourceTexts[i]));
}
Opt.setComboSelected(m_hSource, m_nSource);
@@ -71,7 +71,7 @@ void ColEvents::impl_outputRenderHeader(ext::ostream& tos, int row, int rowSpan)
if (row == 1)
{
- writeRowspanTD(tos, getCustomTitle(TranslateTS(szShortDesc[m_nSource / 3]), TranslateTS(szSourceDesc[m_nSource])), row, 1, rowSpan);
+ writeRowspanTD(tos, getCustomTitle(TranslateW(szShortDesc[m_nSource / 3]), TranslateW(szSourceDesc[m_nSource])), row, 1, rowSpan);
}
}
diff --git a/plugins/HistoryStats/src/column_inout.cpp b/plugins/HistoryStats/src/column_inout.cpp
index 67a8d7d35f..d305783e91 100644
--- a/plugins/HistoryStats/src/column_inout.cpp
+++ b/plugins/HistoryStats/src/column_inout.cpp
@@ -60,7 +60,7 @@ void ColInOut::impl_configToUI(OptionsCtrl& Opt, OptionsCtrl::Item hGroup)
array_each_(i, sourceTexts)
{
- Opt.addComboItem(m_hSource, TranslateTS(sourceTexts[i]));
+ Opt.addComboItem(m_hSource, TranslateW(sourceTexts[i]));
}
Opt.setComboSelected(m_hSource , m_nSource );
@@ -107,16 +107,16 @@ void ColInOut::impl_outputRenderHeader(ext::ostream& tos, int row, int rowSpan)
if (m_bAbsolute)
{
- strTitle = TranslateTS(szSourceDesc[m_nSource]);
+ strTitle = TranslateW(szSourceDesc[m_nSource]);
}
else
{
strTitle = str(ext::kformat(TranslateT("#{data} per #{unit}"))
- % L"#{data}" * TranslateTS(szSourceDesc[m_nSource])
- % L"#{unit}" * TranslateTS(szUnitDesc[m_nAbsTime]));
+ % L"#{data}" * TranslateW(szSourceDesc[m_nSource])
+ % L"#{unit}" * TranslateW(szUnitDesc[m_nAbsTime]));
}
- writeRowspanTD(tos, getCustomTitle(TranslateTS(szShortDesc[m_nSource / 3]), strTitle), row, 1, rowSpan);
+ writeRowspanTD(tos, getCustomTitle(TranslateW(szShortDesc[m_nSource / 3]), strTitle), row, 1, rowSpan);
}
}
diff --git a/plugins/HistoryStats/src/column_inoutgraph.cpp b/plugins/HistoryStats/src/column_inoutgraph.cpp
index 288080c6fa..e448e40b73 100644
--- a/plugins/HistoryStats/src/column_inoutgraph.cpp
+++ b/plugins/HistoryStats/src/column_inoutgraph.cpp
@@ -150,16 +150,16 @@ void ColInOutGraph::impl_outputRenderHeader(ext::ostream& tos, int row, int rowS
if (m_bAbsolute)
{
- strTitle = TranslateTS(szSourceDesc[m_nSource]);
+ strTitle = TranslateW(szSourceDesc[m_nSource]);
}
else
{
strTitle = str(ext::kformat(TranslateT("#{data} per #{unit}"))
- % L"#{data}" * TranslateTS(szSourceDesc[m_nSource])
- % L"#{unit}" * TranslateTS(szSourceUnit[m_nAbsTime]));
+ % L"#{data}" * TranslateW(szSourceDesc[m_nSource])
+ % L"#{unit}" * TranslateW(szSourceUnit[m_nAbsTime]));
}
- writeRowspanTD(tos, getCustomTitle(TranslateTS(szSourceDesc[m_nSource]), strTitle) + L"<div style=\"width: 100px;\"></div>", 1, 2, rowSpan, 2);
+ writeRowspanTD(tos, getCustomTitle(TranslateW(szSourceDesc[m_nSource]), strTitle) + L"<div style=\"width: 100px;\"></div>", 1, 2, rowSpan, 2);
}
else if (row == 2)
{
diff --git a/plugins/HistoryStats/src/column_split.cpp b/plugins/HistoryStats/src/column_split.cpp
index c0b2ce3990..512875a3c0 100644
--- a/plugins/HistoryStats/src/column_split.cpp
+++ b/plugins/HistoryStats/src/column_split.cpp
@@ -87,7 +87,7 @@ void ColSplit::impl_configToUI(OptionsCtrl& Opt, OptionsCtrl::Item hGroup)
array_each_(i, sourceTexts)
{
- Opt.addComboItem(m_hSource, TranslateTS(sourceTexts[i]));
+ Opt.addComboItem(m_hSource, TranslateW(sourceTexts[i]));
}
static const wchar_t* unitTexts[] = {
@@ -98,7 +98,7 @@ void ColSplit::impl_configToUI(OptionsCtrl& Opt, OptionsCtrl::Item hGroup)
array_each_(i, unitTexts)
{
- Opt.addComboItem(m_hBlockUnit, TranslateTS(unitTexts[i]));
+ Opt.addComboItem(m_hBlockUnit, TranslateW(unitTexts[i]));
}
Opt.setComboSelected(m_hSource , 3 * m_nSource + m_nSourceType);
@@ -285,10 +285,10 @@ void ColSplit::impl_outputRenderHeader(ext::ostream& tos, int row, int rowSpan)
{
SplitParams params = getParams();
ext::string strTitle = str(ext::kformat(TranslateT("#{type} for #{data}"))
- % L"#{type}" * TranslateTS(szTypeDesc[params.effective_vis_mode])
- % L"#{data}" * TranslateTS(szSourceDesc[3 * m_nSource + m_nSourceType]));
+ % L"#{type}" * TranslateW(szTypeDesc[params.effective_vis_mode])
+ % L"#{data}" * TranslateW(szSourceDesc[3 * m_nSource + m_nSourceType]));
- writeRowspanTD(tos, getCustomTitle(TranslateTS(szTypeDesc[params.effective_vis_mode]), strTitle) + ext::str(ext::format(L"<div style=\"width: |px;\"></div>") % (5 * params.blocks_in_column - 1)), row, 1, rowSpan);
+ writeRowspanTD(tos, getCustomTitle(TranslateW(szTypeDesc[params.effective_vis_mode]), strTitle) + ext::str(ext::format(L"<div style=\"width: |px;\"></div>") % (5 * params.blocks_in_column - 1)), row, 1, rowSpan);
}
}
@@ -427,7 +427,7 @@ void ColSplit::impl_outputRenderRow(ext::ostream& tos, const Contact& contact, D
else if (params.effective_vis_mode == 1)
{
divTitle = ext::str(ext::kformat(TranslateT("[#{day}] #{amount}"))
- % L"#{day}" * utils::stripPrefix(L"wday3:", TranslateTS(szWDayName[j]))
+ % L"#{day}" * utils::stripPrefix(L"wday3:", TranslateW(szWDayName[j]))
% L"#{amount}" * utils::intToGrouped(part_top));
}
else
diff --git a/plugins/HistoryStats/src/column_splittimeline.cpp b/plugins/HistoryStats/src/column_splittimeline.cpp
index 55d8f791c3..a5b75c0918 100644
--- a/plugins/HistoryStats/src/column_splittimeline.cpp
+++ b/plugins/HistoryStats/src/column_splittimeline.cpp
@@ -107,7 +107,7 @@ void ColSplitTimeline::impl_configToUI(OptionsCtrl& Opt, OptionsCtrl::Item hGrou
array_each_(i, sourceTexts)
{
- Opt.addComboItem(m_hSource, TranslateTS(sourceTexts[i]));
+ Opt.addComboItem(m_hSource, TranslateW(sourceTexts[i]));
}
static const wchar_t* unitTexts[] = {
@@ -118,7 +118,7 @@ void ColSplitTimeline::impl_configToUI(OptionsCtrl& Opt, OptionsCtrl::Item hGrou
array_each_(i, unitTexts)
{
- Opt.addComboItem(m_hBlockUnit, TranslateTS(unitTexts[i]));
+ Opt.addComboItem(m_hBlockUnit, TranslateW(unitTexts[i]));
}
Opt.setComboSelected(m_hSource , 4 * m_nSource + m_nSourceType);
@@ -275,10 +275,10 @@ void ColSplitTimeline::impl_outputRenderHeader(ext::ostream& tos, int row, int r
{
SplitParams params = getParams();
ext::string strTitle = str(ext::kformat(TranslateT("#{type} for #{data}"))
- % L"#{type}" * TranslateTS(szTypeDesc[params.effective_vis_mode])
- % L"#{data}" * TranslateTS(szSourceDesc[4 * m_nSource + m_nSourceType]));
+ % L"#{type}" * TranslateW(szTypeDesc[params.effective_vis_mode])
+ % L"#{data}" * TranslateW(szSourceDesc[4 * m_nSource + m_nSourceType]));
- writeRowspanTD(tos, getCustomTitle(TranslateTS(szTypeDesc[params.effective_vis_mode]), strTitle) + L"<div style=\"width: " + utils::intToString(m_nTimelineWidth) + L"px;\"></div>", row, 1, rowSpan);
+ writeRowspanTD(tos, getCustomTitle(TranslateW(szTypeDesc[params.effective_vis_mode]), strTitle) + L"<div style=\"width: " + utils::intToString(m_nTimelineWidth) + L"px;\"></div>", row, 1, rowSpan);
}
}
diff --git a/plugins/HistoryStats/src/column_timeline.cpp b/plugins/HistoryStats/src/column_timeline.cpp
index 67e579ca0e..9c82240562 100644
--- a/plugins/HistoryStats/src/column_timeline.cpp
+++ b/plugins/HistoryStats/src/column_timeline.cpp
@@ -64,7 +64,7 @@ void ColTimeline::impl_configToUI(OptionsCtrl& Opt, OptionsCtrl::Item hGroup)
array_each_(i, sourceTexts)
{
- Opt.addComboItem(m_hSource, TranslateTS(sourceTexts[i]));
+ Opt.addComboItem(m_hSource, TranslateW(sourceTexts[i]));
}
Opt.setComboSelected(m_hSource , 4 * m_nSource + m_nSourceType);
@@ -208,7 +208,7 @@ void ColTimeline::impl_outputRenderHeader(ext::ostream& tos, int row, int rowSpa
if (row == 1)
{
ext::string strTitle = str(ext::kformat(TranslateT("Timeline for #{data}"))
- % L"#{data}" * TranslateTS(szSourceDesc[4 * m_nSource + m_nSourceType]));
+ % L"#{data}" * TranslateW(szSourceDesc[4 * m_nSource + m_nSourceType]));
writeRowspanTD(tos, getCustomTitle(TranslateT("Timeline"), strTitle) + L"<div style=\"width: " + utils::intToString(m_nTimelineWidth) + L"px;\"></div>", row, 1, rowSpan);
}
diff --git a/plugins/HistoryStats/src/column_wordcount.cpp b/plugins/HistoryStats/src/column_wordcount.cpp
index a83f27e652..65d59fe21d 100644
--- a/plugins/HistoryStats/src/column_wordcount.cpp
+++ b/plugins/HistoryStats/src/column_wordcount.cpp
@@ -125,10 +125,10 @@ void ColWordCount::impl_outputRenderHeader(ext::ostream& tos, int row, int rowSp
if (row == 1)
{
ext::string strTitle = str(ext::kformat(TranslateT("#{type} for #{data}"))
- % L"#{type}" * TranslateTS(szTypeDesc[m_nVisMode])
- % L"#{data}" * TranslateTS(szSourceDesc[m_nSource]));
+ % L"#{type}" * TranslateW(szTypeDesc[m_nVisMode])
+ % L"#{data}" * TranslateW(szSourceDesc[m_nSource]));
- writeRowspanTD(tos, getCustomTitle(TranslateTS(szTypeDesc[m_nVisMode]), strTitle), row, 1, rowSpan);
+ writeRowspanTD(tos, getCustomTitle(TranslateW(szTypeDesc[m_nVisMode]), strTitle), row, 1, rowSpan);
}
}
diff --git a/plugins/HistoryStats/src/column_words.cpp b/plugins/HistoryStats/src/column_words.cpp
index 7d79cb467f..b19b363913 100644
--- a/plugins/HistoryStats/src/column_words.cpp
+++ b/plugins/HistoryStats/src/column_words.cpp
@@ -231,10 +231,10 @@ void ColWords::impl_outputRenderHeader(ext::ostream& tos, int row, int rowSpan)
if (row == 1)
{
ext::string strTitle = str(ext::kformat(TranslateT("#{type} for #{data}"))
- % L"#{type}" * TranslateTS(szTypeDesc[m_nVisMode])
- % L"#{data}" * TranslateTS(szSourceDesc[m_nSource]));
+ % L"#{type}" * TranslateW(szTypeDesc[m_nVisMode])
+ % L"#{data}" * TranslateW(szSourceDesc[m_nSource]));
- writeRowspanTD(tos, getCustomTitle(TranslateTS(szTypeDesc[m_nVisMode]), strTitle), row, 1, rowSpan);
+ writeRowspanTD(tos, getCustomTitle(TranslateW(szTypeDesc[m_nVisMode]), strTitle), row, 1, rowSpan);
}
}
diff --git a/plugins/HistoryStats/src/dlgfilterwords.cpp b/plugins/HistoryStats/src/dlgfilterwords.cpp
index 9344e55f19..372b39d186 100644
--- a/plugins/HistoryStats/src/dlgfilterwords.cpp
+++ b/plugins/HistoryStats/src/dlgfilterwords.cpp
@@ -90,7 +90,7 @@ void DlgFilterWords::onWMInitDialog()
HICON hIcon = reinterpret_cast<HICON>(LoadImage(g_hInst, MAKEINTRESOURCE(columnBand[i].iconId), IMAGE_ICON, OS::smIconCX(), OS::smIconCY(), 0));
DWORD dwFlags = (columnBand[i].bDisabled ? BandCtrl::BCF_DISABLED : 0);
- m_hActionButtons[i] = m_Band.addButton(dwFlags, hIcon, i, TranslateTS(columnBand[i].szTooltip));
+ m_hActionButtons[i] = m_Band.addButton(dwFlags, hIcon, i, TranslateW(columnBand[i].szTooltip));
DestroyIcon(hIcon);
}
@@ -122,7 +122,7 @@ void DlgFilterWords::onWMInitDialog()
array_each_(i, szWordFilterModes)
{
- SendDlgItemMessage(m_hWnd, IDC_MODE, CB_ADDSTRING, 0, reinterpret_cast<LPARAM>(TranslateTS(szWordFilterModes[i])));
+ SendDlgItemMessage(m_hWnd, IDC_MODE, CB_ADDSTRING, 0, reinterpret_cast<LPARAM>(TranslateW(szWordFilterModes[i])));
}
SendDlgItemMessage(m_hWnd, IDC_MODE, CB_SETCURSEL, 0, 0);
diff --git a/plugins/HistoryStats/src/dlgoption_subcolumns.cpp b/plugins/HistoryStats/src/dlgoption_subcolumns.cpp
index f6c635bfa0..a2ff5e6ca8 100644
--- a/plugins/HistoryStats/src/dlgoption_subcolumns.cpp
+++ b/plugins/HistoryStats/src/dlgoption_subcolumns.cpp
@@ -23,7 +23,7 @@ INT_PTR CALLBACK DlgOption::SubColumns::staticAddProc(HWND hDlg, UINT msg, WPARA
upto_each_(i, Column::countColInfo())
{
- int nIndex = SendMessage(hWndList, LB_ADDSTRING, 0, reinterpret_cast<LPARAM>(TranslateTS(Column::getColInfo(i).m_Title)));
+ int nIndex = SendMessage(hWndList, LB_ADDSTRING, 0, reinterpret_cast<LPARAM>(TranslateW(Column::getColInfo(i).m_Title)));
SendMessage(hWndList, LB_SETITEMDATA, nIndex, i);
}
@@ -183,7 +183,7 @@ void DlgOption::SubColumns::onWMInitDialog()
(columnBand[i].bDropDown ? BandCtrl::BCF_DROPDOWN : 0) |
(columnBand[i].bDisabled ? BandCtrl::BCF_DISABLED : 0);
- m_hActionButtons[i] = m_Band.addButton(dwFlags, hIcon, i, TranslateTS(columnBand[i].szTooltip));
+ m_hActionButtons[i] = m_Band.addButton(dwFlags, hIcon, i, TranslateW(columnBand[i].szTooltip));
DestroyIcon(hIcon);
}
@@ -313,7 +313,7 @@ void DlgOption::SubColumns::toggleInfo()
HWND hInfo = GetDlgItem(getHWnd(), IDC_INFO);
const wchar_t* szInfoLabelText = m_bShowInfo ? LPGENW("Hide additional column info...") : LPGENW("Show additional column info...");
- SetDlgItemText(getHWnd(), IDC_INFOLABEL, TranslateTS(szInfoLabelText));
+ SetDlgItemText(getHWnd(), IDC_INFOLABEL, TranslateW(szInfoLabelText));
ShowWindow(hInfo, m_bShowInfo ? SW_SHOW : SW_HIDE);
EnableWindow(hInfo, BOOL_(m_bShowInfo));
@@ -327,7 +327,7 @@ void DlgOption::SubColumns::addCol(int nCol)
getParent()->getLocalSettings().addCol(pCol);
- OptionsCtrl::Check hColCheck = m_Columns.insertCheck(NULL, TranslateTS(pCol->getTitle()), 0, reinterpret_cast<INT_PTR>(pCol));
+ OptionsCtrl::Check hColCheck = m_Columns.insertCheck(NULL, TranslateW(pCol->getTitle()), 0, reinterpret_cast<INT_PTR>(pCol));
m_Columns.checkItem(hColCheck, pCol->isEnabled());
@@ -541,7 +541,7 @@ void DlgOption::SubColumns::onBandDropDown(HANDLE hButton, INT_PTR dwData)
upto_each_(i, Column::countColInfo())
{
- AppendMenu(hPopup, MF_STRING, i + 1, TranslateTS(Column::getColInfo(i).m_Title));
+ AppendMenu(hPopup, MF_STRING, i + 1, TranslateW(Column::getColInfo(i).m_Title));
}
int nCol = -1 + TrackPopupMenu(
@@ -674,7 +674,7 @@ bool DlgOption::SubColumns::configHasConflicts(HelpVec* pHelp)
if (pHelp) {
pHelp->push_back(HelpPair());
- pHelp->back().first = TranslateTS(pCol->getTitle());
+ pHelp->back().first = TranslateW(pCol->getTitle());
pHelp->back().first += L": ";
pHelp->back().first += TranslateT("HTML output unsupported.");
@@ -694,7 +694,7 @@ bool DlgOption::SubColumns::configHasConflicts(HelpVec* pHelp)
if (pHelp) {
pHelp->push_back(HelpPair());
- pHelp->back().first = TranslateTS(pCol->getTitle());
+ pHelp->back().first = TranslateW(pCol->getTitle());
pHelp->back().first += L": ";
if (nPNGMode == Settings::pmHTMLFallBack)
diff --git a/plugins/HistoryStats/src/dlgoption_subglobal.cpp b/plugins/HistoryStats/src/dlgoption_subglobal.cpp
index ec6c21ae94..51732bfa40 100644
--- a/plugins/HistoryStats/src/dlgoption_subglobal.cpp
+++ b/plugins/HistoryStats/src/dlgoption_subglobal.cpp
@@ -22,12 +22,12 @@ INT_PTR CALLBACK DlgOption::SubGlobal::staticInfoProc(HWND hDlg, UINT msg, WPARA
const SupportInfo& info = *reinterpret_cast<const SupportInfo*>(lParam);
SetDlgItemText(hDlg, IDC_PLUGIN, info.szPlugin);
- SetDlgItemText(hDlg, IDC_FEATURES, TranslateTS(info.szTeaser));
- SetDlgItemText(hDlg, IDC_DESCRIPTION, TranslateTS(info.szDescription));
+ SetDlgItemText(hDlg, IDC_FEATURES, TranslateW(info.szTeaser));
+ SetDlgItemText(hDlg, IDC_DESCRIPTION, TranslateW(info.szDescription));
static const WORD LinkIDs[] = { IDC_LINK2, IDC_LINK1 };
- ext::string linkTexts = TranslateTS(info.szLinkTexts);
+ ext::string linkTexts = TranslateW(info.szLinkTexts);
ext::string linkURLs = info.szLinkURLs;
int nCurLink = 0;
@@ -387,7 +387,7 @@ void DlgOption::SubGlobal::toggleInfo()
HWND hInfo = GetDlgItem(getHWnd(), IDC_INFO);
const wchar_t* szInfoLabelText = m_bShowInfo ? LPGENW("HistoryStats supports several plugins. Click to hide info...") : LPGENW("HistoryStats supports several plugins. Click to learn more...");
- SetDlgItemText(getHWnd(), IDC_INFOLABEL, TranslateTS(szInfoLabelText));
+ SetDlgItemText(getHWnd(), IDC_INFOLABEL, TranslateW(szInfoLabelText));
ShowWindow(hInfo, m_bShowInfo ? SW_SHOW : SW_HIDE);
EnableWindow(hInfo, BOOL_(m_bShowInfo));
diff --git a/plugins/HistoryStats/src/dlgoption_suboutput.cpp b/plugins/HistoryStats/src/dlgoption_suboutput.cpp
index 67c58f9910..97be76691a 100644
--- a/plugins/HistoryStats/src/dlgoption_suboutput.cpp
+++ b/plugins/HistoryStats/src/dlgoption_suboutput.cpp
@@ -188,7 +188,7 @@ void DlgOption::SubOutput::onWMInitDialog()
array_each_(i, sortLevels)
{
- m_hSortBy[i] = m_Options.insertCombo(m_hSort, TranslateTS(sortLevels[i]), (i == 0) ? 0 : OptionsCtrl::OCF_DISABLECHILDSONINDEX0);
+ m_hSortBy[i] = m_Options.insertCombo(m_hSort, TranslateW(sortLevels[i]), (i == 0) ? 0 : OptionsCtrl::OCF_DISABLECHILDSONINDEX0);
if (i != 0)
{
@@ -197,7 +197,7 @@ void DlgOption::SubOutput::onWMInitDialog()
array_each_(j, sortKeys)
{
- m_Options.addComboItem(m_hSortBy[i], TranslateTS(sortKeys[j].desc));
+ m_Options.addComboItem(m_hSortBy[i], TranslateW(sortKeys[j].desc));
}
m_hSortDir[i] = m_Options.insertRadio(m_hSortBy[i], NULL, TranslateT("Ascending"));
@@ -229,7 +229,7 @@ void DlgOption::SubOutput::onWMInitDialog()
array_each_(i, omitData)
{
- m_Options.addComboItem(m_hOmitByValueData, TranslateTS(omitData[i]));
+ m_Options.addComboItem(m_hOmitByValueData, TranslateW(omitData[i]));
}
m_Options.ensureVisible(NULL);
diff --git a/plugins/HistoryStats/src/iconlib.cpp b/plugins/HistoryStats/src/iconlib.cpp
index 7993c26a3b..d8a6dc5417 100644
--- a/plugins/HistoryStats/src/iconlib.cpp
+++ b/plugins/HistoryStats/src/iconlib.cpp
@@ -71,12 +71,12 @@ void IconLib::init()
if (m_IconInfo[i].szSection) {
strSection += L"/";
- strSection += TranslateTS(m_IconInfo[i].szSection);
+ strSection += TranslateW(m_IconInfo[i].szSection);
}
mu::icolib::addIcon(
strSection.c_str(),
- TranslateTS(m_IconInfo[i].szDescription),
+ TranslateW(m_IconInfo[i].szDescription),
(m_IconName + m_IconInfo[i].szIconName).c_str(),
szModule,
-m_IconInfo[i].wID);
diff --git a/plugins/HistoryStats/src/mirandasettings.cpp b/plugins/HistoryStats/src/mirandasettings.cpp
index e2b9bc9d49..9840e1ae0a 100644
--- a/plugins/HistoryStats/src/mirandasettings.cpp
+++ b/plugins/HistoryStats/src/mirandasettings.cpp
@@ -100,12 +100,12 @@ void MirandaSettings::writeDWord(const char* szSetting, int dwValue) const
void MirandaSettings::writeStr(const char* szSetting, const wchar_t* szValue) const
{
- db_set_ts(m_hContact, m_strModule.c_str(), szSetting, szValue);
+ db_set_ws(m_hContact, m_strModule.c_str(), szSetting, szValue);
}
void MirandaSettings::writeStrDirect(const char* szSetting, const wchar_t* szValue) const
{
- db_set_ts(m_hContact, m_strModule.c_str(), szSetting, szValue);
+ db_set_ws(m_hContact, m_strModule.c_str(), szSetting, szValue);
}
void MirandaSettings::writeTree(const char* szSetting, const SettingsTree& value) const
diff --git a/plugins/HistoryStats/src/mu_common.cpp b/plugins/HistoryStats/src/mu_common.cpp
index 7b1ee72f8d..ef5bfc66e2 100644
--- a/plugins/HistoryStats/src/mu_common.cpp
+++ b/plugins/HistoryStats/src/mu_common.cpp
@@ -20,7 +20,7 @@ namespace mu
// TODO: support for unicode-core with unicode-aware CList
CMenuItem mi;
mi.name.w = (wchar_t*)pszName;
- mi.flags = flags | CMIF_TCHAR;
+ mi.flags = flags | CMIF_UNICODE;
mi.position = position;
mi.hIcolibItem = hIcon;
mi.pszService = const_cast<char*>(pszService);
@@ -34,7 +34,7 @@ namespace mu
// TODO: support for unicode-core with unicode-aware CList
CMenuItem mi;
mi.name.w = (wchar_t*)pszName;
- mi.flags = flags | CMIF_TCHAR;
+ mi.flags = flags | CMIF_UNICODE;
mi.position = position;
mi.hIcolibItem = hIcon;
mi.pszService = const_cast<char*>(pszService);
@@ -51,12 +51,12 @@ namespace mu
{
int getProfilePath(int cbName, wchar_t* pszName)
{
- return CallService(MS_DB_GETPROFILEPATHT, cbName, reinterpret_cast<LPARAM>(pszName));
+ return CallService(MS_DB_GETPROFILEPATHW, cbName, reinterpret_cast<LPARAM>(pszName));
}
int getProfileName(int cbName, wchar_t* pszName)
{
- return CallService(MS_DB_GETPROFILENAMET, cbName, reinterpret_cast<LPARAM>(pszName));
+ return CallService(MS_DB_GETPROFILENAMEW, cbName, reinterpret_cast<LPARAM>(pszName));
}
void setSafetyMode(bool safetyMode)
@@ -103,7 +103,7 @@ namespace mu
sid.pszName = const_cast<char*>(szIconName);
sid.defaultFile.a = const_cast<char*>(szDefaultFile);
sid.iDefaultIndex = iDefaultIndex;
- sid.flags = SIDF_TCHAR;
+ sid.flags = SIDF_UNICODE;
IcoLib_AddIcon(&sid);
}
@@ -127,7 +127,7 @@ namespace mu
odp.pszTemplate = const_cast<char*>(pszTemplate);
odp.hInstance = hInstance;
odp.pwszGroup = const_cast<wchar_t*>(pszGroup);
- odp.flags = flags | ODPF_TCHAR;
+ odp.flags = flags | ODPF_UNICODE;
odp.pwszTab = const_cast<wchar_t*>(pszTab);
Options_AddPage(addInfo, &odp);
}
diff --git a/plugins/HistoryStats/src/statistic.cpp b/plugins/HistoryStats/src/statistic.cpp
index 0d9b1deea9..b064304cbf 100644
--- a/plugins/HistoryStats/src/statistic.cpp
+++ b/plugins/HistoryStats/src/statistic.cpp
@@ -1352,7 +1352,7 @@ bool Statistic::createStatisticsSteps()
array_each_(i, stepsInfo)
{
- setProgressLabel(false, TranslateTS(stepsInfo[i].stepMsg));
+ setProgressLabel(false, TranslateW(stepsInfo[i].stepMsg));
if (!(this->*stepsInfo[i].stepFn)())
return false;
diff --git a/plugins/HistoryStats/src/utils.cpp b/plugins/HistoryStats/src/utils.cpp
index b70ee4630e..bc1c1f272b 100644
--- a/plugins/HistoryStats/src/utils.cpp
+++ b/plugins/HistoryStats/src/utils.cpp
@@ -282,10 +282,10 @@ namespace utils
strSubst = intToPadded(timeTM->tm_mon + 1, 2);
}
else if (strVar == L"MMM") {
- strSubst = stripPrefix(L"month3:", TranslateTS(szMonthName[timeTM->tm_mon % 12][0]));
+ strSubst = stripPrefix(L"month3:", TranslateW(szMonthName[timeTM->tm_mon % 12][0]));
}
else if (strVar == L"MMMM") {
- strSubst = stripPrefix(L"monthF:", TranslateTS(szMonthName[timeTM->tm_mon % 12][1]));
+ strSubst = stripPrefix(L"monthF:", TranslateW(szMonthName[timeTM->tm_mon % 12][1]));
}
else if (strVar == L"d") {
strSubst = intToString(timeTM->tm_mday);
@@ -294,13 +294,13 @@ namespace utils
strSubst = intToPadded(timeTM->tm_mday, 2);
}
else if (strVar == L"ww") {
- strSubst = stripPrefix(L"wday2:", TranslateTS(szWDayName[(timeTM->tm_wday + 6) % 7][0]));
+ strSubst = stripPrefix(L"wday2:", TranslateW(szWDayName[(timeTM->tm_wday + 6) % 7][0]));
}
else if (strVar == L"www") {
- strSubst = stripPrefix(L"wday3:", TranslateTS(szWDayName[(timeTM->tm_wday + 6) % 7][1]));
+ strSubst = stripPrefix(L"wday3:", TranslateW(szWDayName[(timeTM->tm_wday + 6) % 7][1]));
}
else if (strVar == L"wwww") {
- strSubst = stripPrefix(L"wdayF:", TranslateTS(szWDayName[(timeTM->tm_wday + 6) % 7][2]));
+ strSubst = stripPrefix(L"wdayF:", TranslateW(szWDayName[(timeTM->tm_wday + 6) % 7][2]));
}
else if (strVar == L"miranda_path") {
strSubst = getMirandaPath();
@@ -895,7 +895,7 @@ namespace utils
if (strMirandaPath.empty()) {
wchar_t szPath[MAX_PATH] = { 0 };
- PathToAbsoluteT(L"x", szPath);
+ PathToAbsoluteW(L"x", szPath);
strMirandaPath = extractPath(szPath);
}
diff --git a/plugins/HwHotKeys/src/HwHotKeys_DllMain.cpp b/plugins/HwHotKeys/src/HwHotKeys_DllMain.cpp
index 30c64f0d74..28be0ee7cb 100644
--- a/plugins/HwHotKeys/src/HwHotKeys_DllMain.cpp
+++ b/plugins/HwHotKeys/src/HwHotKeys_DllMain.cpp
@@ -128,7 +128,7 @@ int initializeOptions(WPARAM wParam, LPARAM)
OPTIONSDIALOGPAGE OptDlgPg = { sizeof(OptDlgPg) };
OptDlgPg.position = 100000000;
OptDlgPg.hInstance = hInstance;
- OptDlgPg.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ OptDlgPg.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
OptDlgPg.pszTemplate = MAKEINTRESOURCEA(dlg_options);
OptDlgPg.pwszGroup = LPGENW("Customize");
OptDlgPg.pwszTitle = LPGENW("Hardware HotKeys");
diff --git a/plugins/IEHistory/src/IEHistory.cpp b/plugins/IEHistory/src/IEHistory.cpp
index 5a0460db92..057a3e639c 100644
--- a/plugins/IEHistory/src/IEHistory.cpp
+++ b/plugins/IEHistory/src/IEHistory.cpp
@@ -78,7 +78,7 @@ extern "C" int __declspec(dllexport) Load(void)
CMenuItem mi;
SET_UID(mi, 0x28848d7a, 0x6995, 0x4799, 0x82, 0xd7, 0x18, 0x40, 0x3d, 0xe3, 0x71, 0xc4);
mi.name.w = LPGENW("View &history");
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
mi.position = 1000090000;
mi.hIcolibItem = hIcon;
mi.pszService = MS_HISTORY_SHOWCONTACTHISTORY;
diff --git a/plugins/IEHistory/src/events.cpp b/plugins/IEHistory/src/events.cpp
index 67edd36a56..5d63eb25dd 100644
--- a/plugins/IEHistory/src/events.cpp
+++ b/plugins/IEHistory/src/events.cpp
@@ -43,7 +43,7 @@ int OnOptionsInitialize(WPARAM wParam, LPARAM)
odp.pfnDlgProc = OptionsDlgProc;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_HISTORY);
odp.hInstance = hInstance;
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/IEView/src/Options.cpp b/plugins/IEView/src/Options.cpp
index 5e055c1cac..33f7a40fc2 100644
--- a/plugins/IEView/src/Options.cpp
+++ b/plugins/IEView/src/Options.cpp
@@ -439,7 +439,7 @@ int IEViewOptInit(WPARAM wParam, LPARAM)
odp.hInstance = hInstance;
odp.pwszGroup = LPGENW("Message sessions");
odp.pwszTitle = LPGENW("IEView");
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
odp.pszTemplate = MAKEINTRESOURCEA(tabPages[0].dlgId);
odp.pfnDlgProc = tabPages[0].dlgProc;
odp.pwszTab = tabPages[0].tabName;
@@ -511,7 +511,7 @@ static INT_PTR CALLBACK IEViewGeneralOptDlgProc(HWND hwndDlg, UINT msg, WPARAM w
{
wchar_t* size[] = { L"320 x 205", L"480 x 385", L"560 x 349", L"640 x 390" };
for (int i = 0; i < _countof(size); ++i) {
- int item = SendDlgItemMessage(hwndDlg, IDC_EMBED_SIZE, CB_ADDSTRING, 0, (LPARAM)TranslateTS(size[i]));
+ int item = SendDlgItemMessage(hwndDlg, IDC_EMBED_SIZE, CB_ADDSTRING, 0, (LPARAM)TranslateW(size[i]));
SendDlgItemMessage(hwndDlg, IDC_EMBED_SIZE, CB_SETITEMDATA, item, 0);
}
SendDlgItemMessage(hwndDlg, IDC_EMBED_SIZE, CB_SETCURSEL, Options::getEmbedsize(), 0);
diff --git a/plugins/IEView/src/TemplateHTMLBuilder.cpp b/plugins/IEView/src/TemplateHTMLBuilder.cpp
index 438fa6f6ef..a1a7a3e565 100644
--- a/plugins/IEView/src/TemplateHTMLBuilder.cpp
+++ b/plugins/IEView/src/TemplateHTMLBuilder.cpp
@@ -52,14 +52,14 @@ char* TemplateHTMLBuilder::getAvatar(MCONTACT hContact, const char *szProto)
MultiByteToWideChar(CP_ACP, 0, (char*)ace->szFilename, -1, tmpPath, _countof(tmpPath));
}
}
- if (!db_get_ts(hContact, "ContactPhoto", "File", &dbv)) {
+ if (!db_get_ws(hContact, "ContactPhoto", "File", &dbv)) {
if (mir_wstrlen(dbv.ptszVal) > 0) {
//wchar_t *ext = wcsrchr(dbv.ptszVal, '.');
if (result == NULL) {
/* relative -> absolute */
mir_wstrcpy(tmpPath, dbv.ptszVal);
if (wcsncmp(tmpPath, L"http://", 7))
- PathToAbsoluteT(dbv.ptszVal, tmpPath);
+ PathToAbsoluteW(dbv.ptszVal, tmpPath);
result = tmpPath;
}
}
diff --git a/plugins/IEView/src/Utils.cpp b/plugins/IEView/src/Utils.cpp
index 56af00067a..009c01a19e 100644
--- a/plugins/IEView/src/Utils.cpp
+++ b/plugins/IEView/src/Utils.cpp
@@ -25,7 +25,7 @@ wchar_t Utils::base_dir[MAX_PATH];
const wchar_t *Utils::getBaseDir()
{
- PathToAbsoluteT(L"miranda32.exe", base_dir);
+ PathToAbsoluteW(L"miranda32.exe", base_dir);
return base_dir;
}
diff --git a/plugins/IgnoreState/src/options.cpp b/plugins/IgnoreState/src/options.cpp
index d6fac3275f..e34153b94f 100644
--- a/plugins/IgnoreState/src/options.cpp
+++ b/plugins/IgnoreState/src/options.cpp
@@ -47,7 +47,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
tvis.hInsertAfter = TVI_LAST;
tvis.item.mask = TVIF_PARAM | TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_STATE;
tvis.item.lParam = ii[i].type;
- tvis.item.pszText = TranslateTS(ii[i].name);
+ tvis.item.pszText = TranslateW(ii[i].name);
tvis.item.iImage = tvis.item.iSelectedImage = index;
HTREEITEM hti = TreeView_InsertItem(hTree, &tvis);
TreeView_SetCheckState(hTree, hti, checkState(ii[i].type));
diff --git a/plugins/Import/src/import.cpp b/plugins/Import/src/import.cpp
index 2db83b8a7c..b163428edb 100644
--- a/plugins/Import/src/import.cpp
+++ b/plugins/Import/src/import.cpp
@@ -77,7 +77,7 @@ void AddMessage(const wchar_t* fmt, ...)
va_list args;
wchar_t msgBuf[4096];
va_start(args, fmt);
- mir_vsnwprintf(msgBuf, _countof(msgBuf), TranslateTS(fmt), args);
+ mir_vsnwprintf(msgBuf, _countof(msgBuf), TranslateW(fmt), args);
SendMessage(hdlgProgress, PROGM_ADDMESSAGE, 0, (LPARAM)msgBuf);
}
@@ -113,7 +113,7 @@ static int myGetD(MCONTACT hContact, const char *szModule, const char *szSetting
static wchar_t* myGetWs(MCONTACT hContact, const char *szModule, const char *szSetting)
{
- DBVARIANT dbv = { DBVT_TCHAR };
+ DBVARIANT dbv = { DBVT_WCHAR };
return srcDb->GetContactSettingStr(hContact, szModule, szSetting, &dbv) ? NULL : dbv.ptszVal;
}
@@ -143,7 +143,7 @@ static MCONTACT HContactFromID(char *pszProtoName, char *pszSetting, wchar_t *pw
for (MCONTACT hContact = dstDb->FindFirstContact(); hContact; hContact = dstDb->FindNextContact(hContact)) {
char *szProto = GetContactProto(hContact);
if (!mir_strcmp(szProto, pszProtoName)) {
- ptrW id(db_get_tsa(hContact, pszProtoName, pszSetting));
+ ptrW id(db_get_wsa(hContact, pszProtoName, pszSetting));
if (!mir_wstrcmp(pwszID, id))
return hContact;
}
@@ -500,7 +500,7 @@ bool ImportAccounts(OBJLIST<char> &arSkippedModules)
if (p.tszSrcName == NULL) {
p.pa->tszAccountName = mir_a2u(p.pa->szModuleName);
itoa(800 + p.pa->iOrder, szSetting, 10);
- db_set_ts(NULL, "Protocols", szSetting, p.pa->tszAccountName);
+ db_set_ws(NULL, "Protocols", szSetting, p.pa->tszAccountName);
}
CopySettings(NULL, p.szSrcAcc, NULL, p.pa->szModuleName);
diff --git a/plugins/Import/src/miranda.cpp b/plugins/Import/src/miranda.cpp
index bed803d016..a177685952 100644
--- a/plugins/Import/src/miranda.cpp
+++ b/plugins/Import/src/miranda.cpp
@@ -71,10 +71,10 @@ INT_PTR CALLBACK MirandaPageProc(HWND hwndDlg, UINT message, WPARAM wParam, LPAR
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
{
- VARST pfd(L"%miranda_path%\\Profiles");
- VARST pfd1(L"%miranda_path%");
- VARST pfd2(L"%miranda_profilesdir%");
- VARST pfn(L"%miranda_profilename%");
+ VARSW pfd(L"%miranda_path%\\Profiles");
+ VARSW pfd1(L"%miranda_path%");
+ VARSW pfd2(L"%miranda_profilesdir%");
+ VARSW pfn(L"%miranda_profilename%");
SearchForLists(hwndDlg, pfd2, pfn);
SearchForLists(hwndDlg, pfd1, NULL);
diff --git a/plugins/Import/src/utils.cpp b/plugins/Import/src/utils.cpp
index 59adce72b9..b854ae9ab9 100644
--- a/plugins/Import/src/utils.cpp
+++ b/plugins/Import/src/utils.cpp
@@ -36,7 +36,7 @@ int CreateGroup(const wchar_t *group, MCONTACT hContact)
if (Clist_GroupExists(group)) {
if (hContact)
- db_set_ts(hContact, "CList", "Group", group);
+ db_set_ws(hContact, "CList", "Group", group);
else
AddMessage(LPGENW("Skipping duplicate group %s."), group);
return 0;
@@ -44,7 +44,7 @@ int CreateGroup(const wchar_t *group, MCONTACT hContact)
Clist_GroupCreate(NULL, group);
if (hContact)
- db_set_ts(hContact, "CList", "Group", group);
+ db_set_ws(hContact, "CList", "Group", group);
return 1;
}
diff --git a/plugins/KeyboardNotify/src/main.cpp b/plugins/KeyboardNotify/src/main.cpp
index 2ccf62e6f1..51eb50200b 100644
--- a/plugins/KeyboardNotify/src/main.cpp
+++ b/plugins/KeyboardNotify/src/main.cpp
@@ -521,7 +521,7 @@ void createProcessList(void)
ProcessList.szFileName = (wchar_t **)mir_alloc(count * sizeof(wchar_t *));
if (ProcessList.szFileName) {
for (int i = 0; i < count; i++)
- ProcessList.szFileName[i] = db_get_tsa(NULL, KEYBDMODULE, fmtDBSettingName("process%d", i));
+ ProcessList.szFileName[i] = db_get_wsa(NULL, KEYBDMODULE, fmtDBSettingName("process%d", i));
ProcessList.count = count;
}
diff --git a/plugins/KeyboardNotify/src/options.cpp b/plugins/KeyboardNotify/src/options.cpp
index 1fdc35eae0..8296b4ea27 100644
--- a/plugins/KeyboardNotify/src/options.cpp
+++ b/plugins/KeyboardNotify/src/options.cpp
@@ -67,10 +67,10 @@ void exportThemes(const wchar_t *filename)
fwprintf(fExport, TranslateT("\n; Automatically generated Keyboard Notify Theme file\n\n\n"));
wchar_t *szTheme;
- for (int i = 0; szTheme = db_get_tsa(NULL, KEYBDMODULE, fmtDBSettingName("theme%d", i)); i++) {
+ for (int i = 0; szTheme = db_get_wsa(NULL, KEYBDMODULE, fmtDBSettingName("theme%d", i)); i++) {
fwprintf(fExport, L"[%s]\n", szTheme);
mir_free(szTheme);
- if (szTheme = db_get_tsa(NULL, KEYBDMODULE, fmtDBSettingName("custom%d", i))) {
+ if (szTheme = db_get_wsa(NULL, KEYBDMODULE, fmtDBSettingName("custom%d", i))) {
fwprintf(fExport, L"%s\n\n", szTheme);
mir_free(szTheme);
}
@@ -340,11 +340,11 @@ static INT_PTR CALLBACK DlgProcXstatusList(HWND hwndDlg, UINT msg, WPARAM wParam
wchar_t szDefaultName[1024];
CUSTOM_STATUS xstatus = { 0 };
xstatus.cbSize = sizeof(CUSTOM_STATUS);
- xstatus.flags = CSSF_MASK_NAME | CSSF_DEFAULT_NAME | CSSF_TCHAR;
+ xstatus.flags = CSSF_MASK_NAME | CSSF_DEFAULT_NAME | CSSF_UNICODE;
xstatus.ptszName = szDefaultName;
xstatus.wParam = &j;
CallProtoService(ProtoList.protoInfo[i].szProto, PS_GETCUSTOMSTATUSEX, 0, (LPARAM)&xstatus);
- tvis.item.pszText = TranslateTS(szDefaultName);
+ tvis.item.pszText = TranslateW(szDefaultName);
}
tvis.item.lParam = (LPARAM)j;
tvis.item.iImage = tvis.item.iSelectedImage = j ? ImageList_AddIcon(hImageList, hIconAux = (HICON)CallProtoService(ProtoList.protoInfo[i].szProto, PS_GETCUSTOMSTATUSICON, (WPARAM)j, 0)) : 0;
@@ -807,7 +807,7 @@ static INT_PTR CALLBACK DlgProcBasicOptions(HWND hwndDlg, UINT msg, WPARAM wPara
int i = 0;
for (int j = 0; j < ProcessListAux.count; j++)
if (ProcessListAux.szFileName[j])
- db_set_ts(NULL, KEYBDMODULE, fmtDBSettingName("process%d", i++), ProcessListAux.szFileName[j]);
+ db_set_ws(NULL, KEYBDMODULE, fmtDBSettingName("process%d", i++), ProcessListAux.szFileName[j]);
db_set_w(NULL, KEYBDMODULE, "processcount", (WORD)i);
while (!db_unset(NULL, KEYBDMODULE, fmtDBSettingName("process%d", i++)));
@@ -855,7 +855,7 @@ static INT_PTR CALLBACK DlgProcEffectOptions(HWND hwndDlg, UINT msg, WPARAM wPar
CheckDlgButton(hwndDlg, IDC_INTURN, bFlashEffect == FLASH_INTURN ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_INSEQUENCE, bFlashEffect == FLASH_INSEQUENCE ? BST_CHECKED : BST_UNCHECKED);
for (int i = 0; i < 3; i++) {
- int index = SendDlgItemMessage(hwndDlg, IDC_SEQORDER, CB_INSERTSTRING, -1, (LPARAM)TranslateTS(OrderName[i]));
+ int index = SendDlgItemMessage(hwndDlg, IDC_SEQORDER, CB_INSERTSTRING, -1, (LPARAM)TranslateW(OrderName[i]));
if (index != CB_ERR && index != CB_ERRSPACE)
SendDlgItemMessage(hwndDlg, IDC_SEQORDER, CB_SETITEMDATA, (WPARAM)index, (LPARAM)i);
}
@@ -865,7 +865,7 @@ static INT_PTR CALLBACK DlgProcEffectOptions(HWND hwndDlg, UINT msg, WPARAM wPar
CheckDlgButton(hwndDlg, IDC_CUSTOM, bFlashEffect == FLASH_CUSTOM ? BST_CHECKED : BST_UNCHECKED);
wchar_t *szTheme;
- for (int i = 0; szTheme = db_get_tsa(NULL, KEYBDMODULE, fmtDBSettingName("theme%d", i)); i++) {
+ for (int i = 0; szTheme = db_get_wsa(NULL, KEYBDMODULE, fmtDBSettingName("theme%d", i)); i++) {
int index = SendDlgItemMessage(hwndDlg, IDC_SCUSTOM, CB_INSERTSTRING, (WPARAM)-1, (LPARAM)szTheme);
mir_free(szTheme);
if (index != CB_ERR && index != CB_ERRSPACE)
@@ -1001,11 +1001,11 @@ static INT_PTR CALLBACK DlgProcThemeOptions(HWND hwndDlg, UINT msg, WPARAM wPara
SendDlgItemMessage(hwndDlg, IDC_CUSTOMSTRING, EM_LIMITTEXT, MAX_PATH, 0);
wchar_t *szTheme;
- for (int i = 0; szTheme = db_get_tsa(NULL, KEYBDMODULE, fmtDBSettingName("theme%d", i)); i++) {
+ for (int i = 0; szTheme = db_get_wsa(NULL, KEYBDMODULE, fmtDBSettingName("theme%d", i)); i++) {
int index = SendDlgItemMessage(hwndDlg, IDC_THEME, CB_INSERTSTRING, (WPARAM)-1, (LPARAM)szTheme);
mir_free(szTheme);
if (index != CB_ERR && index != CB_ERRSPACE) {
- wchar_t *str = db_get_tsa(NULL, KEYBDMODULE, fmtDBSettingName("custom%d", i));
+ wchar_t *str = db_get_wsa(NULL, KEYBDMODULE, fmtDBSettingName("custom%d", i));
if (str)
SendDlgItemMessage(hwndDlg, IDC_THEME, CB_SETITEMDATA, (WPARAM)index, (LPARAM)str);
}
@@ -1226,7 +1226,7 @@ static INT_PTR CALLBACK DlgProcThemeOptions(HWND hwndDlg, UINT msg, WPARAM wPara
case 0:
switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
- if (szTheme = db_get_tsa(NULL, KEYBDMODULE, fmtDBSettingName("theme%d", wCustomTheme))) {
+ if (szTheme = db_get_wsa(NULL, KEYBDMODULE, fmtDBSettingName("theme%d", wCustomTheme))) {
mir_wstrcpy(theme, szTheme);
mir_free(szTheme);
}
@@ -1239,12 +1239,12 @@ static INT_PTR CALLBACK DlgProcThemeOptions(HWND hwndDlg, UINT msg, WPARAM wPara
count = SendDlgItemMessage(hwndDlg, IDC_THEME, CB_GETCOUNT, 0, 0);
for (int i = 0; i < count; i++) {
SendDlgItemMessage(hwndDlg, IDC_THEME, CB_GETLBTEXT, (WPARAM)i, (LPARAM)themeAux);
- db_set_ts(NULL, KEYBDMODULE, fmtDBSettingName("theme%d", i), themeAux);
+ db_set_ws(NULL, KEYBDMODULE, fmtDBSettingName("theme%d", i), themeAux);
wchar_t *str = (wchar_t *)SendDlgItemMessage(hwndDlg, IDC_THEME, CB_GETITEMDATA, (WPARAM)i, 0);
if (str)
- db_set_ts(NULL, KEYBDMODULE, fmtDBSettingName("custom%d", i), str);
+ db_set_ws(NULL, KEYBDMODULE, fmtDBSettingName("custom%d", i), str);
else
- db_set_ts(NULL, KEYBDMODULE, fmtDBSettingName("custom%d", i), L"");
+ db_set_ws(NULL, KEYBDMODULE, fmtDBSettingName("custom%d", i), L"");
if (!mir_wstrcmp(theme, themeAux))
wCustomTheme = i;
diff --git a/plugins/KeyboardNotify/src/utils.cpp b/plugins/KeyboardNotify/src/utils.cpp
index f7d8bc4ab8..1c4920c876 100644
--- a/plugins/KeyboardNotify/src/utils.cpp
+++ b/plugins/KeyboardNotify/src/utils.cpp
@@ -36,8 +36,8 @@ wchar_t *getAbsoluteProfileName(wchar_t *absoluteProfileName, size_t maxLen)
wchar_t profilePath[MAX_PATH+1], profileName[MAX_PATH+1];
profilePath[0] = profileName[0] = '\0';
- CallService(MS_DB_GETPROFILEPATHT, MAX_PATH, (LPARAM)profilePath);
- CallService(MS_DB_GETPROFILENAMET, MAX_PATH, (LPARAM)profileName);
+ CallService(MS_DB_GETPROFILEPATHW, MAX_PATH, (LPARAM)profilePath);
+ CallService(MS_DB_GETPROFILENAMEW, MAX_PATH, (LPARAM)profileName);
mir_snwprintf(absoluteProfileName, maxLen, L"%s\\%s", profilePath, profileName);
return absoluteProfileName;
diff --git a/plugins/ListeningTo/src/listeningto.cpp b/plugins/ListeningTo/src/listeningto.cpp
index 8f7dfe7465..7dcad9e830 100644
--- a/plugins/ListeningTo/src/listeningto.cpp
+++ b/plugins/ListeningTo/src/listeningto.cpp
@@ -194,7 +194,7 @@ void RebuildMenu()
mi.position = 500080000 + i;
mi.pszService = MS_LISTENINGTO_MAINMENU;
mi.name.w = text;
- mi.flags = CMIF_TCHAR | CMIF_UNMOVABLE
+ mi.flags = CMIF_UNICODE | CMIF_UNMOVABLE
| (ListeningToEnabled(info->proto, TRUE) ? CMIF_CHECKED : 0)
| (opts.enable_sending ? 0 : CMIF_GRAYED);
@@ -273,7 +273,7 @@ int ModulesLoaded(WPARAM, LPARAM)
char *proto = GetContactProto(hContact);
if (proto != NULL) {
DBVARIANT dbv;
- if (!db_get_ts(hContact, proto, "ListeningTo", &dbv)) {
+ if (!db_get_ws(hContact, proto, "ListeningTo", &dbv)) {
if (dbv.ptszVal != NULL && dbv.ptszVal[0] != 0)
SetExtraIcon(hContact, TRUE);
@@ -287,7 +287,7 @@ int ModulesLoaded(WPARAM, LPARAM)
SET_UID(mi, 0xe8e4e594, 0x255e, 0x434d, 0x83, 0x74, 0x79, 0x44, 0x1b, 0x4e, 0xe7, 0x16);
mi.position = 500080000;
mi.name.w = LPGENW("Listening to");
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
mi.hIcolibItem = iconList[0].hIcolib;
hMainMenuGroup = Menu_AddMainMenuItem(&mi);
@@ -299,7 +299,7 @@ int ModulesLoaded(WPARAM, LPARAM)
// Add all protos
SET_UID(mi, 0xc396a9dd, 0x9a00, 0x46af, 0x96, 0x2e, 0x5, 0x5a, 0xbc, 0x52, 0xfc, 0x9b);
mi.name.w = LPGENW("Send to all protocols");
- mi.flags = CMIF_TCHAR
+ mi.flags = CMIF_UNICODE
| (ListeningToEnabled(NULL, true) ? CMIF_CHECKED : 0)
| (opts.enable_sending ? 0 : CMIF_GRAYED);
proto_items.resize(1);
@@ -547,7 +547,7 @@ void SetListeningInfo(char *proto, LISTENINGTOINFO *lti = NULL)
Buffer<wchar_t> msg;
ReplaceTemplate(&msg, NULL, opts.xstatus_message, fr, _countof(fr));
- ics.flags = CSSF_TCHAR | CSSF_MASK_STATUS | CSSF_MASK_NAME | CSSF_MASK_MESSAGE;
+ ics.flags = CSSF_UNICODE | CSSF_MASK_STATUS | CSSF_MASK_NAME | CSSF_MASK_MESSAGE;
ics.ptszName = name.str;
ics.ptszMessage = msg.str;
@@ -563,7 +563,7 @@ void SetListeningInfo(char *proto, LISTENINGTOINFO *lti = NULL)
// Set to old text
ProtocolInfo *pi = GetProtoInfo(proto);
if (pi != NULL) {
- ics.flags = CSSF_TCHAR | CSSF_MASK_STATUS | CSSF_MASK_NAME | CSSF_MASK_MESSAGE;
+ ics.flags = CSSF_UNICODE | CSSF_MASK_STATUS | CSSF_MASK_NAME | CSSF_MASK_MESSAGE;
ics.status = &pi->old_xstatus;
ics.ptszName = pi->old_xstatus_name;
ics.ptszMessage = pi->old_xstatus_message;
@@ -600,7 +600,7 @@ void SetListeningInfo(char *proto, LISTENINGTOINFO *lti = NULL)
if (!CallProtoService(proto, PS_GETCUSTOMSTATUSEX, 0, (LPARAM)&ics) && status != XSTATUS_MUSIC) {
ProtocolInfo *pi = GetProtoInfo(proto);
if (pi != NULL) {
- ics.flags = CSSF_TCHAR | CSSF_MASK_STATUS | CSSF_MASK_NAME | CSSF_MASK_MESSAGE;
+ ics.flags = CSSF_UNICODE | CSSF_MASK_STATUS | CSSF_MASK_NAME | CSSF_MASK_MESSAGE;
ics.status = &pi->old_xstatus;
ics.ptszName = pi->old_xstatus_name;
ics.ptszMessage = pi->old_xstatus_message;
@@ -629,7 +629,7 @@ void SetListeningInfo(char *proto, LISTENINGTOINFO *lti = NULL)
ReplaceTemplate(&msg, NULL, opts.xstatus_message, fr, _countof(fr));
status = XSTATUS_MUSIC;
- ics.flags = CSSF_TCHAR | CSSF_MASK_STATUS | CSSF_MASK_NAME | CSSF_MASK_MESSAGE;
+ ics.flags = CSSF_UNICODE | CSSF_MASK_STATUS | CSSF_MASK_NAME | CSSF_MASK_MESSAGE;
ics.status = &status;
ics.ptszName = name.str;
ics.ptszMessage = msg.str;
diff --git a/plugins/LotusNotify/src/LotusNotify.cpp b/plugins/LotusNotify/src/LotusNotify.cpp
index 02a83da50d..9639f2f385 100644
--- a/plugins/LotusNotify/src/LotusNotify.cpp
+++ b/plugins/LotusNotify/src/LotusNotify.cpp
@@ -520,7 +520,7 @@ int check() {
int cnt;
for(cnt = 0; cnt <= 4; cnt++)
if(startuperror >> cnt & 1)
- ErMsgT(TranslateTS(startuperrors[cnt]));
+ ErMsgT(TranslateW(startuperrors[cnt]));
return 1;
}
@@ -985,15 +985,15 @@ static void LoadSettings()
db_free(&dbv);
}
- if (!db_get_ts(NULL, PLUGINNAME, "LNFilterSender", &dbv)) {
+ if (!db_get_ws(NULL, PLUGINNAME, "LNFilterSender", &dbv)) {
wcsncpy_s(settingFilterSender, dbv.ptszVal, _TRUNCATE);
db_free(&dbv);
}
- if (!db_get_ts(NULL, PLUGINNAME, "LNFilterSubject", &dbv)) {
+ if (!db_get_ws(NULL, PLUGINNAME, "LNFilterSubject", &dbv)) {
wcsncpy_s(settingFilterSubject, dbv.ptszVal, _TRUNCATE);
db_free(&dbv);
}
- if (!db_get_ts(NULL, PLUGINNAME, "LNFilterTo", &dbv)) {
+ if (!db_get_ws(NULL, PLUGINNAME, "LNFilterTo", &dbv)) {
wcsncpy_s(settingFilterTo, dbv.ptszVal, _TRUNCATE);
db_free(&dbv);
}
@@ -1056,7 +1056,7 @@ static void SaveSettings(HWND hwndDlg)
wcscat_s(settingFilterSender, _countof(settingFilterSender), text);
wcscat_s(settingFilterSender, _countof(settingFilterSender), TEXT(";"));
}
- db_set_ts(NULL, PLUGINNAME, "LNFilterSender", settingFilterSender);
+ db_set_ws(NULL, PLUGINNAME, "LNFilterSender", settingFilterSender);
settingFilterSubject[0] = 0;
for (int i = 0; i < SendDlgItemMessage(hwndDlg, IDC_FILTER_SUBJECT, CB_GETCOUNT, 0, 0); i++) {
@@ -1065,7 +1065,7 @@ static void SaveSettings(HWND hwndDlg)
wcscat_s(settingFilterSubject, _countof(settingFilterSubject), text);
wcscat_s(settingFilterSubject, _countof(settingFilterSubject), TEXT(";"));
}
- db_set_ts(NULL, PLUGINNAME, "LNFilterSubject", settingFilterSubject);
+ db_set_ws(NULL, PLUGINNAME, "LNFilterSubject", settingFilterSubject);
settingFilterTo[0] = 0;
for (int i = 0; i < SendDlgItemMessage(hwndDlg, IDC_FILTER_TO, CB_GETCOUNT, 0, 0); i++) {
@@ -1074,7 +1074,7 @@ static void SaveSettings(HWND hwndDlg)
wcscat_s(settingFilterTo, _countof(settingFilterTo), text);
wcscat_s(settingFilterTo, _countof(settingFilterTo), TEXT(";"));
}
- db_set_ts(NULL, PLUGINNAME, "LNFilterTo", settingFilterTo);
+ db_set_ws(NULL, PLUGINNAME, "LNFilterTo", settingFilterTo);
}
//callback function to speak with user interactions in options page
@@ -1457,7 +1457,7 @@ int LotusNotifyOptInit(WPARAM wParam, LPARAM)
odp.hInstance = hInst;
odp.pwszGroup = LPGENW("Plugins");
odp.pwszTitle = _A2W(__PLUGIN_NAME);
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
odp.pwszTab = LPGENW("Connection");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_LOTUS_CONECTION);
@@ -1531,7 +1531,7 @@ INT_PTR SetStatus(WPARAM wParam, LPARAM lParam)
int cnt;
for (cnt = 0; cnt <= 4; cnt++)
if (startuperror >> cnt & 1)
- ErMsgT(TranslateTS(startuperrors[cnt]));
+ ErMsgT(TranslateW(startuperrors[cnt]));
return 1;
}
@@ -1578,7 +1578,7 @@ void checkEnvPath(wchar_t *path)
if (found != NULL && (found[len] == ';' || found[len] == 0 || (found[len] == '\\' && (found[len + 1] == ';' || found[len + 1] == 0))))
return;
- _wputenv(CMString(FORMAT, L"PATH=%s;%s;", cur, path));
+ _wputenv(CMStringW(FORMAT, L"PATH=%s;%s;", cur, path));
}
//GetStatus
@@ -1642,7 +1642,7 @@ static int modulesloaded(WPARAM, LPARAM)
assert(startuperror == 0);
for (cnt = 0; cnt <= 4; cnt++) {
if (startuperror >> cnt & 1)
- ErMsgT(TranslateTS(startuperrors[cnt]));
+ ErMsgT(TranslateW(startuperrors[cnt]));
}
return 0;
@@ -1699,7 +1699,7 @@ extern "C" int __declspec(dllexport) Load(void)
CMenuItem mi;
SET_UID(mi, 0x4519458, 0xb55a, 0x4e22, 0xac, 0x95, 0x5e, 0xa4, 0x4d, 0x92, 0x65, 0x65);
mi.position = -0x7FFFFFFF; //on top menu position
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
mi.hIcolibItem = LoadIcon(hInst, MAKEINTRESOURCE(IDI_ICON1));
mi.name.w = LPGENW("&Check Lotus");
mi.pszService = "LotusNotify/MenuCommand"; //service name thet listning for menu call
@@ -1727,7 +1727,7 @@ extern "C" int __declspec(dllexport) Load(void)
LoadSettings(); //read from db to variables
- SkinAddNewSoundExT("LotusNotify", LPGENW("Lotus Notify"), LPGENW("New Lotus document detected"));
+ SkinAddNewSoundExW("LotusNotify", LPGENW("Lotus Notify"), LPGENW("New Lotus document detected"));
hOptInit = HookEvent(ME_OPT_INITIALISE, LotusNotifyOptInit); //register service to hook option call
assert(hOptInit);
diff --git a/plugins/LotusNotify/src/debug.cpp b/plugins/LotusNotify/src/debug.cpp
index 965538e7f4..8acf5c0a63 100644
--- a/plugins/LotusNotify/src/debug.cpp
+++ b/plugins/LotusNotify/src/debug.cpp
@@ -7,7 +7,7 @@ void logRegister(){
// Register netlib user for logging function
NETLIBUSER nlu = { 0 };
nlu.cbSize = sizeof(nlu);
- nlu.flags = NUF_TCHAR | NUF_NOOPTIONS;
+ nlu.flags = NUF_UNICODE | NUF_NOOPTIONS;
nlu.szSettingsModule = PLUGINNAME;
nlu.ptszDescriptiveName = mir_a2u(PLUGINNAME);
netlibHandle = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu);
diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp
index a71bac9998..73e72e3d88 100644
--- a/plugins/MenuItemEx/src/main.cpp
+++ b/plugins/MenuItemEx/src/main.cpp
@@ -331,7 +331,7 @@ BOOL MirVerExists(MCONTACT hContact)
if (!szProto)
return 0;
- ptrW msg(db_get_tsa(hContact, szProto, "MirVer"));
+ ptrW msg(db_get_wsa(hContact, szProto, "MirVer"));
return mir_wstrlen(msg) != 0;
}
@@ -354,7 +354,7 @@ LPTSTR getMirVer(MCONTACT hContact)
LPSTR szProto = GetContactProto(hContact);
if (!szProto) return NULL;
- LPTSTR msg = db_get_tsa(hContact, szProto, "MirVer");
+ LPTSTR msg = db_get_wsa(hContact, szProto, "MirVer");
if (msg) {
if (msg[0] != 0)
return msg;
@@ -624,11 +624,11 @@ INT_PTR onCopyStatusMsg(WPARAM wparam, LPARAM lparam)
else
strncpy(par, statusMsg[i].name, _countof(par) - 1);
- LPTSTR msg = db_get_tsa(hContact, (statusMsg[i].module) ? statusMsg[i].module : module, par);
+ LPTSTR msg = db_get_wsa(hContact, (statusMsg[i].module) ? statusMsg[i].module : module, par);
if (msg) {
if (wcslen(msg)) {
if (flags & VF_SMNAME) {
- mir_wstrncat(buffer, TranslateTS(statusMsg[i].fullName), (_countof(buffer) - wcslen(buffer) - 1));
+ mir_wstrncat(buffer, TranslateW(statusMsg[i].fullName), (_countof(buffer) - wcslen(buffer) - 1));
mir_wstrncat(buffer, L": ", (_countof(buffer) - wcslen(buffer) - 1));
}
mir_wstrncat(buffer, msg, (_countof(buffer) - wcslen(buffer) - 1));
diff --git a/plugins/MessageState/src/messagestate.cpp b/plugins/MessageState/src/messagestate.cpp
index 2082f67ec5..b9dee446e2 100644
--- a/plugins/MessageState/src/messagestate.cpp
+++ b/plugins/MessageState/src/messagestate.cpp
@@ -22,9 +22,9 @@ void SetSRMMIcon(MCONTACT hContact, SRMM_ICON_TYPE type, time_t time)
StatusIconData sid = { sizeof(sid) };
sid.szModule = MODULENAME;
sid.dwId = 1;
- sid.flags = MBF_TCHAR;
+ sid.flags = MBF_UNICODE;
- CMString tszTooltip;
+ CMStringW tszTooltip;
if (type != ICON_HIDDEN)
{
@@ -43,7 +43,7 @@ void SetSRMMIcon(MCONTACT hContact, SRMM_ICON_TYPE type, time_t time)
}
}
else
- tszTooltip = TranslateTS(Tooltips[type]);
+ tszTooltip = TranslateW(Tooltips[type]);
sid.tszTooltip = tszTooltip.GetBuffer();
}
diff --git a/plugins/MirFox/src/MirandaInterface.cpp b/plugins/MirFox/src/MirandaInterface.cpp
index 299a3635d6..75d379347d 100644
--- a/plugins/MirFox/src/MirandaInterface.cpp
+++ b/plugins/MirFox/src/MirandaInterface.cpp
@@ -111,7 +111,7 @@ static int onModulesLoaded(WPARAM, LPARAM)
puc.flags = PCF_TCHAR;
puc.pszName = "MirFox_Notify";
- puc.ptszDescription = TranslateT("MirFox/Notification");
+ puc.pwszDescription = TranslateT("MirFox/Notification");
puc.colorBack = RGB(173, 206, 247); //light blue
puc.colorText = GetSysColor(COLOR_WINDOWTEXT);
puc.iSeconds = 3;
@@ -119,7 +119,7 @@ static int onModulesLoaded(WPARAM, LPARAM)
hPopupNotify = Popup_RegisterClass(&puc);
puc.pszName = "MirFox_Error";
- puc.ptszDescription = TranslateT("MirFox/Error");
+ puc.pwszDescription = TranslateT("MirFox/Error");
puc.colorBack = RGB(255, 128, 128); //light red
puc.colorText = GetSysColor(COLOR_WINDOWTEXT);
puc.iSeconds = 20;
diff --git a/plugins/MirFox/src/MirandaOptions.cpp b/plugins/MirFox/src/MirandaOptions.cpp
index 7ea8ece4f5..20e1d42c30 100644
--- a/plugins/MirFox/src/MirandaOptions.cpp
+++ b/plugins/MirFox/src/MirandaOptions.cpp
@@ -145,7 +145,7 @@ INT_PTR CALLBACK DlgProcOpts_Tab1(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
MFLogger* logger = MFLogger::getInstance();
logger->log_p(L"Options. Save clientsProfilesFilterString: [%s]", mirfoxMiranda.getMirfoxData().getClientsProfilesFilterStringPtr()->c_str());
- db_set_ts(0, PLUGIN_DB_ID, "clientsProfilesFilterString", mirfoxMiranda.getMirfoxData().getClientsProfilesFilterStringPtr()->c_str());
+ db_set_ws(0, PLUGIN_DB_ID, "clientsProfilesFilterString", mirfoxMiranda.getMirfoxData().getClientsProfilesFilterStringPtr()->c_str());
//TODO fire actualization visableTo field at CSM record
diff --git a/plugins/MirFox/src/MirandaUtils.cpp b/plugins/MirFox/src/MirandaUtils.cpp
index a29245cff6..7a9a5e54b1 100644
--- a/plugins/MirFox/src/MirandaUtils.cpp
+++ b/plugins/MirFox/src/MirandaUtils.cpp
@@ -31,7 +31,7 @@ void MirandaUtils::netlibRegister(){
// Register netlib user for logging function
NETLIBUSER nlu = { 0 };
nlu.cbSize = sizeof(nlu);
- nlu.flags = NUF_TCHAR | NUF_NOOPTIONS;
+ nlu.flags = NUF_UNICODE | NUF_NOOPTIONS;
nlu.szSettingsModule = PLUGIN_DB_ID;
nlu.ptszDescriptiveName = TranslateT("MirFox log");
@@ -343,13 +343,13 @@ int MirandaUtils::on_hook_OpenMW(WPARAM wParam, LPARAM lParam)
if (param->msgBuffer != NULL){
wchar_t *msgBuffer = mir_wstrdup(param->msgBuffer->c_str());
- CallServiceSync(MS_MSG_SENDMESSAGET, (WPARAM)param->targetHandle, (LPARAM)msgBuffer);
+ CallServiceSync(MS_MSG_SENDMESSAGEW, (WPARAM)param->targetHandle, (LPARAM)msgBuffer);
mir_free(msgBuffer);
delete param->msgBuffer;
} else {
//only open window
- CallServiceSync(MS_MSG_SENDMESSAGET, (WPARAM)param->targetHandle, 0);
+ CallServiceSync(MS_MSG_SENDMESSAGEW, (WPARAM)param->targetHandle, 0);
}
// show and focus window
@@ -487,10 +487,10 @@ void MirandaUtils::translateOldDBNames() {
}
DBVARIANT opt2Dbv = {0};
- INT_PTR opt2Result = db_get_s(0, OLD_PLUGIN_DB_ID, "clientsProfilesFilterString", &opt2Dbv, DBVT_TCHAR);
+ INT_PTR opt2Result = db_get_s(0, OLD_PLUGIN_DB_ID, "clientsProfilesFilterString", &opt2Dbv, DBVT_WCHAR);
if (opt2Result == 0){ //success
std::wstring clientsProfilesFilterString = opt2Dbv.pwszVal;
- db_set_ts(0, PLUGIN_DB_ID, "clientsProfilesFilterString", clientsProfilesFilterString.c_str());
+ db_set_ws(0, PLUGIN_DB_ID, "clientsProfilesFilterString", clientsProfilesFilterString.c_str());
db_unset(0, OLD_PLUGIN_DB_ID, "clientsProfilesFilterString");
logger->log(L"TranslateOldDBNames: 'clientsProfilesFilterString' db entry found and moved");
db_free(&opt2Dbv);
diff --git a/plugins/MirFox/src/MirfoxData.cpp b/plugins/MirFox/src/MirfoxData.cpp
index c3369ac897..e6bcfb7c31 100644
--- a/plugins/MirFox/src/MirfoxData.cpp
+++ b/plugins/MirFox/src/MirfoxData.cpp
@@ -709,14 +709,14 @@ void MirfoxData::initializeOptions()
//clientsProfilesFilterString
DBVARIANT opt2Dbv = {0};
- INT_PTR opt2Result = db_get_s(0, PLUGIN_DB_ID, "clientsProfilesFilterString", &opt2Dbv, DBVT_TCHAR);
+ INT_PTR opt2Result = db_get_s(0, PLUGIN_DB_ID, "clientsProfilesFilterString", &opt2Dbv, DBVT_WCHAR);
if (opt2Result == 0){ //success
//option exists in DB, get value
(* getClientsProfilesFilterStringPtr()) = opt2Dbv.pwszVal;
} else {
//option not exists in DB, set default value
(* getClientsProfilesFilterStringPtr()) = L"";
- db_set_ts(0, PLUGIN_DB_ID, "clientsProfilesFilterString", getClientsProfilesFilterStringPtr()->c_str());
+ db_set_ws(0, PLUGIN_DB_ID, "clientsProfilesFilterString", getClientsProfilesFilterStringPtr()->c_str());
}
db_free(&opt2Dbv);
diff --git a/plugins/MirLua/Modules/m_popup/src/main.cpp b/plugins/MirLua/Modules/m_popup/src/main.cpp
index c169ba72e6..62d6bfb43b 100644
--- a/plugins/MirLua/Modules/m_popup/src/main.cpp
+++ b/plugins/MirLua/Modules/m_popup/src/main.cpp
@@ -56,8 +56,8 @@ static POPUPDATA2* MakePopupData2(lua_State *L)
ppd->flags = lua_tointeger(L, -1);
lua_pop(L, 1);
- if (!(ppd->flags & PU2_TCHAR))
- ppd->flags |= PU2_TCHAR;
+ if (!(ppd->flags & PU2_UNICODE))
+ ppd->flags |= PU2_UNICODE;
lua_getfield(L, -1, "Title");
ppd->lptzTitle = mir_utf8decodeW(lua_tostring(L, -1));
diff --git a/plugins/MirLua/src/m_core.cpp b/plugins/MirLua/src/m_core.cpp
index 07f3c9329e..fa4a769a74 100644
--- a/plugins/MirLua/src/m_core.cpp
+++ b/plugins/MirLua/src/m_core.cpp
@@ -289,7 +289,7 @@ static int core_Parse(lua_State *L)
char *what = (char*)luaL_checkstring(L, 1);
ptrW value(mir_utf8decodeW(what));
- lua_pushstring(L, T2Utf(VARST(value)));
+ lua_pushstring(L, T2Utf(VARSW(value)));
return 1;
}
diff --git a/plugins/MirLua/src/m_genmenu.cpp b/plugins/MirLua/src/m_genmenu.cpp
index e5b33d58a7..0eaafee37a 100644
--- a/plugins/MirLua/src/m_genmenu.cpp
+++ b/plugins/MirLua/src/m_genmenu.cpp
@@ -8,8 +8,8 @@ void MakeMenuItem(lua_State *L, CMenuItem &mi)
mi.flags = lua_tointeger(L, -1);
lua_pop(L, 1);
- if (!(mi.flags & CMIF_TCHAR))
- mi.flags |= CMIF_TCHAR;
+ if (!(mi.flags & CMIF_UNICODE))
+ mi.flags |= CMIF_UNICODE;
lua_getfield(L, -1, "Uid");
const char* uuid = lua_tostring(L, -1);
diff --git a/plugins/MirLua/src/m_hotkeys.cpp b/plugins/MirLua/src/m_hotkeys.cpp
index c99ef4290b..e3c71cf38c 100644
--- a/plugins/MirLua/src/m_hotkeys.cpp
+++ b/plugins/MirLua/src/m_hotkeys.cpp
@@ -8,19 +8,19 @@ void MakeHotkey(lua_State *L, HOTKEYDESC &hk)
hk.dwFlags = lua_tointeger(L, -1);
lua_pop(L, 1);
- if (!(hk.dwFlags & HKD_TCHAR))
- hk.dwFlags |= HKD_TCHAR;
+ if (!(hk.dwFlags & HKD_UNICODE))
+ hk.dwFlags |= HKD_UNICODE;
lua_getfield(L, -1, "Name");
hk.pszName = mir_utf8decodeA(luaL_checkstring(L, -1));
lua_pop(L, 1);
lua_getfield(L, -1, "Description");
- hk.ptszDescription = mir_utf8decodeW(lua_tostring(L, -1));
+ hk.pwszDescription = mir_utf8decodeW(lua_tostring(L, -1));
lua_pop(L, 1);
lua_getfield(L, -1, "Section");
- hk.ptszSection = mir_utf8decodeW(luaL_optstring(L, -1, MODULE));
+ hk.pwszSection = mir_utf8decodeW(luaL_optstring(L, -1, MODULE));
lua_pop(L, 1);
lua_getfield(L, -1, "Hotkey");
diff --git a/plugins/MirLua/src/m_icolib.cpp b/plugins/MirLua/src/m_icolib.cpp
index 018931ffb7..ef8ee4ff85 100644
--- a/plugins/MirLua/src/m_icolib.cpp
+++ b/plugins/MirLua/src/m_icolib.cpp
@@ -14,7 +14,7 @@ static int icolib_AddIcon(lua_State *L)
}
SKINICONDESC si = { 0 };
- si.flags = SIDF_ALL_TCHAR;
+ si.flags = SIDF_ALL_UNICODE;
si.pszName = mir_utf8decodeA(name);
si.description.w = description;
si.section.w = section;
diff --git a/plugins/MirLua/src/m_message.cpp b/plugins/MirLua/src/m_message.cpp
index 0a56c791e3..eb99205312 100644
--- a/plugins/MirLua/src/m_message.cpp
+++ b/plugins/MirLua/src/m_message.cpp
@@ -34,7 +34,7 @@ static int message_Send(lua_State *L)
const char *szProto = GetContactProto(hContact);
if (db_get_b(hContact, szProto, "ChatRoom", 0) == TRUE)
{
- ptrW tszChatRoom(db_get_tsa(hContact, szProto, "ChatRoomID"));
+ ptrW tszChatRoom(db_get_wsa(hContact, szProto, "ChatRoomID"));
GCDEST gcd = { szProto, tszChatRoom, GC_EVENT_SENDMESSAGE };
GCEVENT gce = { sizeof(gce), &gcd };
gce.bIsMe = TRUE;
diff --git a/plugins/MirLua/src/m_options.cpp b/plugins/MirLua/src/m_options.cpp
index 6bb25cbe26..f55af0f6d0 100644
--- a/plugins/MirLua/src/m_options.cpp
+++ b/plugins/MirLua/src/m_options.cpp
@@ -47,11 +47,11 @@ void MakeOptionDialogPage(lua_State *L, OPTIONSDIALOGPAGE &odp)
odp.hLangpack = CMLuaScript::GetScriptIdFromEnviroment(L);
lua_getfield(L, -1, "Flags");
- odp.flags = luaL_optinteger(L, -1, ODPF_BOLDGROUPS | ODPF_TCHAR | ODPF_DONTTRANSLATE);
+ odp.flags = luaL_optinteger(L, -1, ODPF_BOLDGROUPS | ODPF_UNICODE | ODPF_DONTTRANSLATE);
lua_pop(L, 1);
- if (!(odp.flags & ODPF_TCHAR))
- odp.flags |= ODPF_TCHAR;
+ if (!(odp.flags & ODPF_UNICODE))
+ odp.flags |= ODPF_UNICODE;
lua_getfield(L, -1, "Group");
odp.pwszGroup = mir_utf8decodeW(lua_tostring(L, -1));
diff --git a/plugins/MirLua/src/m_sounds.cpp b/plugins/MirLua/src/m_sounds.cpp
index 0291515ee7..ea7c2a5e6a 100644
--- a/plugins/MirLua/src/m_sounds.cpp
+++ b/plugins/MirLua/src/m_sounds.cpp
@@ -9,10 +9,10 @@ static int sounds_AddSound(lua_State *L)
SKINSOUNDDESCEX ssd = { sizeof(SKINSOUNDDESCEX) };
ssd.pszName = name;
- ssd.dwFlags = SSDF_TCHAR;
- ssd.ptszDescription = description;
- ssd.ptszSection = section;
- ssd.ptszDefaultFile = filePath;
+ ssd.dwFlags = SSDF_UNICODE;
+ ssd.pwszDescription = description;
+ ssd.pwszSection = section;
+ ssd.pwszDefaultFile = filePath;
int hScriptLangpack = CMLuaScript::GetScriptIdFromEnviroment(L);
diff --git a/plugins/MirLua/src/mlua.cpp b/plugins/MirLua/src/mlua.cpp
index b6c62101a6..156e957a02 100644
--- a/plugins/MirLua/src/mlua.cpp
+++ b/plugins/MirLua/src/mlua.cpp
@@ -27,11 +27,11 @@ void CMLua::SetPaths()
lua_getglobal(L, "package");
- FoldersGetCustomPathT(g_hCLibsFolder, path, _countof(path), VARST(MIRLUA_PATHT));
+ FoldersGetCustomPathT(g_hCLibsFolder, path, _countof(path), VARSW(MIRLUA_PATHT));
lua_pushfstring(L, "%s\\?.dll", ptrA(mir_utf8encodeW(path)));
lua_setfield(L, -2, "cpath");
- FoldersGetCustomPathT(g_hScriptsFolder, path, _countof(path), VARST(MIRLUA_PATHT));
+ FoldersGetCustomPathT(g_hScriptsFolder, path, _countof(path), VARSW(MIRLUA_PATHT));
lua_pushfstring(L, "%s\\?.lua", ptrA(mir_utf8encodeW(path)));
lua_setfield(L, -2, "path");
diff --git a/plugins/MirLua/src/mlua_options.cpp b/plugins/MirLua/src/mlua_options.cpp
index 524cd427bb..dca7c9f363 100644
--- a/plugins/MirLua/src/mlua_options.cpp
+++ b/plugins/MirLua/src/mlua_options.cpp
@@ -60,7 +60,7 @@ void CMLuaOptions::OnInitDialog()
ImageList_AddIcon(hImageList, GetIcon(IDI_RELOAD));
wchar_t scriptDir[MAX_PATH], relativeScriptDir[MAX_PATH], header[MAX_PATH + 100];
- FoldersGetCustomPathT(g_hScriptsFolder, scriptDir, _countof(scriptDir), VARST(MIRLUA_PATHT));
+ FoldersGetCustomPathT(g_hScriptsFolder, scriptDir, _countof(scriptDir), VARSW(MIRLUA_PATHT));
PathToRelativeT(scriptDir, relativeScriptDir, NULL);
mir_snwprintf(header, L"%s (%s)", TranslateT("Common scripts"), relativeScriptDir);
@@ -160,7 +160,7 @@ int CMLuaOptions::OnOptionsInit(WPARAM wParam, LPARAM)
{
OPTIONSDIALOGPAGE odp = { 0 };
odp.hInstance = g_hInstance;
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR | ODPF_DONTTRANSLATE;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE | ODPF_DONTTRANSLATE;
odp.pwszGroup = LPGENW("Services");
odp.pwszTitle = L"Lua";
odp.pwszTab = LPGENW("Scripts");
diff --git a/plugins/MirLua/src/mlua_script_loader.cpp b/plugins/MirLua/src/mlua_script_loader.cpp
index 3a3d88fbc7..758422b9f4 100644
--- a/plugins/MirLua/src/mlua_script_loader.cpp
+++ b/plugins/MirLua/src/mlua_script_loader.cpp
@@ -26,7 +26,7 @@ void CMLuaScriptLoader::LoadScript(const wchar_t *scriptDir, const wchar_t *file
void CMLuaScriptLoader::LoadScripts()
{
wchar_t scriptDir[MAX_PATH];
- FoldersGetCustomPathT(g_hScriptsFolder, scriptDir, _countof(scriptDir), VARST(MIRLUA_PATHT));
+ FoldersGetCustomPathT(g_hScriptsFolder, scriptDir, _countof(scriptDir), VARSW(MIRLUA_PATHT));
Log(L"Loading scripts from %s", scriptDir);
diff --git a/plugins/MirOTR/src/mirotrmenu.cpp b/plugins/MirOTR/src/mirotrmenu.cpp
index 2629202ed3..60ee2d96aa 100644
--- a/plugins/MirOTR/src/mirotrmenu.cpp
+++ b/plugins/MirOTR/src/mirotrmenu.cpp
@@ -167,36 +167,36 @@ void InitMirOTRMenu(void)
// menu items
CMenuItem mi;
- mi.flags = CMIF_DISABLED | CMIF_TCHAR;
+ mi.flags = CMIF_DISABLED | CMIF_UNICODE;
mi.name.w = LPGENW("OTR Status");
mi.position = 0;
hStatusInfoItem = AddMirOTRMenuItem(&mi, NULL);
- mi.flags = CMIF_TCHAR | CMIF_NOTPRIVATE | CMIF_NOTUNVERIFIED;
+ mi.flags = CMIF_UNICODE | CMIF_NOTPRIVATE | CMIF_NOTUNVERIFIED;
mi.name.w = LANG_MENU_START;
mi.position = 100001;
mi.hIcolibItem = IcoLib_GetIconHandle(ICON_UNVERIFIED);
AddMirOTRMenuItem(&mi, MS_OTR_MENUSTART);
- mi.flags = CMIF_TCHAR | CMIF_NOTNOTPRIVATE | CMIF_NOTFINISHED;
+ mi.flags = CMIF_UNICODE | CMIF_NOTNOTPRIVATE | CMIF_NOTFINISHED;
mi.name.w = LANG_MENU_REFRESH;
mi.position = 100002;
mi.hIcolibItem = IcoLib_GetIconHandle(ICON_FINISHED);
AddMirOTRMenuItem(&mi, MS_OTR_MENUREFRESH);
- mi.flags = CMIF_TCHAR | CMIF_NOTNOTPRIVATE;
+ mi.flags = CMIF_UNICODE | CMIF_NOTNOTPRIVATE;
mi.name.w = LANG_MENU_STOP;
mi.position = 100003;
mi.hIcolibItem = IcoLib_GetIconHandle(ICON_NOT_PRIVATE);
AddMirOTRMenuItem(&mi, MS_OTR_MENUSTOP);
- mi.flags = CMIF_TCHAR | CMIF_NOTNOTPRIVATE | CMIF_NOTFINISHED;
+ mi.flags = CMIF_UNICODE | CMIF_NOTNOTPRIVATE | CMIF_NOTFINISHED;
mi.name.w = LANG_MENU_VERIFY;
mi.position = 200001;
mi.hIcolibItem = IcoLib_GetIconHandle(ICON_PRIVATE);
AddMirOTRMenuItem(&mi, MS_OTR_MENUVERIFY);
- mi.flags = CMIF_TCHAR | CMIF_CHECKED;
+ mi.flags = CMIF_UNICODE | CMIF_CHECKED;
mi.name.w = LANG_MENU_TOGGLEHTML;
mi.position = 300001;
mi.hIcolibItem = 0;
diff --git a/plugins/MirOTR/src/options.cpp b/plugins/MirOTR/src/options.cpp
index 861dec4677..d11a3ecb29 100644
--- a/plugins/MirOTR/src/options.cpp
+++ b/plugins/MirOTR/src/options.cpp
@@ -19,7 +19,7 @@ void SetFilenames(const wchar_t *path)
{
if (!path || !path[0])
return;
- CreateDirectoryTreeT(path);
+ CreateDirectoryTreeW(path);
mir_snwprintf(g_private_key_filename, L"%s\\" _A2W(PRIVATE_KEY_FILENAME), path);
mir_snwprintf(g_fingerprint_store_filename, L"%s\\" _A2W(FINGERPRINT_STORE_FILENAME), path);
@@ -30,7 +30,7 @@ int FoldersChanged(WPARAM, LPARAM)
{
wchar_t path[MAX_PATH];
if ( FoldersGetCustomPathT(hPATH_MIROTR, path, _countof(path), L""))
- SetFilenames(VARST(DATA_DIRECTORY));
+ SetFilenames(VARSW(DATA_DIRECTORY));
else
SetFilenames(path);
@@ -47,7 +47,7 @@ void LoadFilenames()
FoldersChanged(0, 0);
}
else {
- SetFilenames( VARST(DATA_DIRECTORY));
+ SetFilenames( VARSW(DATA_DIRECTORY));
ReadPrivkeyFiles();
}
}
@@ -822,7 +822,7 @@ static int OpenOptions(WPARAM wParam, LPARAM)
odp.hInstance = hInst;
odp.pwszGroup = LPGENW("Services");
odp.pwszTitle = L"OTR";
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
odp.pwszTab = LANG_OPT_GENERAL;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_GENERAL);
diff --git a/plugins/MirOTR/src/svcs_menu.cpp b/plugins/MirOTR/src/svcs_menu.cpp
index c86d81ef4f..5b9d4703d7 100644
--- a/plugins/MirOTR/src/svcs_menu.cpp
+++ b/plugins/MirOTR/src/svcs_menu.cpp
@@ -30,7 +30,7 @@ int StartOTR(MCONTACT hContact) {
for(const wchar_t* c=MIROTR_PROTO_HELLO_MSG; *c && msgoff<msgend; *msgoff++=*c++);
LCID langid = Langpack_GetDefaultLocale();
if(langid != 0x0409/*US*/ && langid != 0x1009/*CA*/ && langid != 0x0809/*GB*/){ // non english
- const wchar_t* translated=TranslateTS(MIROTR_PROTO_HELLO_MSG);
+ const wchar_t* translated=TranslateW(MIROTR_PROTO_HELLO_MSG);
if(mir_wstrcmp(MIROTR_PROTO_HELLO_MSG,translated)){
*msgoff++ = '\n';
for(const wchar_t* c=nick; *c && msgoff<msgend; *msgoff++=*c++);
@@ -159,7 +159,7 @@ void InitMenu()
CreateServiceFunction(MS_OTR_MENUTOGGLEHTML, SVC_ToggleHTMLOTR);
CMenuItem mi;
- mi.flags = CMIF_NOTOFFLINE | CMIF_TCHAR;
+ mi.flags = CMIF_NOTOFFLINE | CMIF_UNICODE;
mi.position = -400000;
SET_UID(mi, 0xAB574FAD, 0x15D8, 0x49FF, 0xB7, 0x03, 0xDA, 0x2B, 0x45, 0x46, 0xC3, 0x56);
diff --git a/plugins/MirandaG15/src/CAppletManager.cpp b/plugins/MirandaG15/src/CAppletManager.cpp
index 436881080f..48d2c843c6 100644
--- a/plugins/MirandaG15/src/CAppletManager.cpp
+++ b/plugins/MirandaG15/src/CAppletManager.cpp
@@ -202,7 +202,7 @@ bool CAppletManager::Shutdown()
tstring CAppletManager::TranslateString(wchar_t *szString, ...)
{
wchar_t out[1024];
- wchar_t *szTranslatedString = TranslateTS(szString);
+ wchar_t *szTranslatedString = TranslateW(szString);
va_list body;
va_start(body, szString);
@@ -451,7 +451,7 @@ tstring CAppletManager::GetContactDisplayname(MCONTACT hContact, bool bShortened
tstring CAppletManager::GetContactGroup(MCONTACT hContact)
{
DBVARIANT dbv;
- int res = db_get_ts(hContact, "CList", "Group", &dbv);
+ int res = db_get_ws(hContact, "CList", "Group", &dbv);
tstring strGroup = L"";
if (!res)
@@ -758,7 +758,7 @@ MEVENT CAppletManager::SendMessageToContact(MCONTACT hContact, tstring strMessag
if (pIRCCon && db_get_b(hContact, szProto, "ChatRoom", 0) != 0) {
DBVARIANT dbv;
- if (db_get_ts(hContact, szProto, "Nick", &dbv))
+ if (db_get_ws(hContact, szProto, "Nick", &dbv))
return NULL;
GCDEST gcd = { szProto, 0, GC_EVENT_SENDMESSAGE };
@@ -1478,7 +1478,7 @@ int CAppletManager::HookStatusChanged(WPARAM wParam, LPARAM lParam)
Event.strDescription = TranslateString(L"Joined %s", strName.c_str());
DBVARIANT dbv;
- if (db_get_ts(Event.hContact, szProto, "Nick", &dbv))
+ if (db_get_ws(Event.hContact, szProto, "Nick", &dbv))
return 0;
CAppletManager::GetInstance()->CreateIRCHistory(Event.hContact, dbv.ptszVal);
db_free(&dbv);
@@ -1669,7 +1669,7 @@ int CAppletManager::HookSettingChanged(WPARAM hContact, LPARAM lParam)
DBVARIANT dbv = { 0 };
// if the protocol nick has changed, check if a custom handle is set
if (!strcmp(dbcws->szSetting, "Nick")) {
- if (!db_get_ts(Event.hContact, "CList", "MyHandle", &dbv)) {
+ if (!db_get_ws(Event.hContact, "CList", "MyHandle", &dbv)) {
// handle found, ignore this event
if (dbv.pszVal && mir_strlen(dbv.pszVal) > 0)
return 0;
@@ -1686,7 +1686,7 @@ int CAppletManager::HookSettingChanged(WPARAM hContact, LPARAM lParam)
}
else {
char *szProto = GetContactProto(Event.hContact);
- if (db_get_ts(Event.hContact, szProto, "Nick", &dbv))
+ if (db_get_ws(Event.hContact, szProto, "Nick", &dbv))
return 0;
Event.strValue = dbv.ptszVal;
db_free(&dbv);
@@ -1700,7 +1700,7 @@ int CAppletManager::HookSettingChanged(WPARAM hContact, LPARAM lParam)
else if (!strcmp(dbcws->szSetting, "Group")) {
Event.eType = EVENT_CONTACT_GROUP;
DBVARIANT dbv;
- int res = db_get_ts(hContact, "CList", "Group", &dbv);
+ int res = db_get_ws(hContact, "CList", "Group", &dbv);
if (!res)
Event.strValue = dbv.ptszVal;
db_free(&dbv);
diff --git a/plugins/MirandaG15/src/CConfig.cpp b/plugins/MirandaG15/src/CConfig.cpp
index 5903b8f2ca..e5c6f687ca 100644
--- a/plugins/MirandaG15/src/CConfig.cpp
+++ b/plugins/MirandaG15/src/CConfig.cpp
@@ -306,7 +306,7 @@ void CConfig::SaveFontSettings(int iFont)
// Name
mir_snprintf(szSetting, "Font%dName", iFont);
- db_set_ts(NULL, "MirandaG15", szSetting, m_logfont[iFont].lfFaceName);
+ db_set_ws(NULL, "MirandaG15", szSetting, m_logfont[iFont].lfFaceName);
UpdateFontSettings(iFont);
}
@@ -337,7 +337,7 @@ void CConfig::LoadFontSettings(int iFont)
// Name
mir_snprintf(szSetting, "Font%dName", iFont);
DBVARIANT dbv;
- if (db_get_ts(NULL, "MirandaG15", szSetting, &dbv))
+ if (db_get_ws(NULL, "MirandaG15", szSetting, &dbv))
mir_wstrcpy(m_logfont[iFont].lfFaceName, L"Small Fonts");
else {
mir_wstrcpy(m_logfont[iFont].lfFaceName, dbv.ptszVal);
diff --git a/plugins/MobileState/src/main.cpp b/plugins/MobileState/src/main.cpp
index b170f9d704..2b0cc8caf7 100644
--- a/plugins/MobileState/src/main.cpp
+++ b/plugins/MobileState/src/main.cpp
@@ -54,7 +54,7 @@ bool hasMobileClient(MCONTACT hContact, LPARAM)
{
char *proto = GetContactProto(hContact);
- ptrW client(db_get_tsa(hContact, proto, "MirVer"));
+ ptrW client(db_get_wsa(hContact, proto, "MirVer"));
if (client) {
// Make client lower-case
wcslwr(client);
diff --git a/plugins/ModernOpt/src/modernopt.cpp b/plugins/ModernOpt/src/modernopt.cpp
index 9f7716d456..4743e8394c 100644
--- a/plugins/ModernOpt/src/modernopt.cpp
+++ b/plugins/ModernOpt/src/modernopt.cpp
@@ -192,7 +192,7 @@ static INT_PTR CALLBACK ModernOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam,
if (g_ModernOptPages[i].bShow && g_ModernOptPages[i].bShowTab)
{
HICON hIcon = (HICON)LoadImage(hInst, MAKEINTRESOURCE(g_ModernOptPages[i].iIcon), IMAGE_ICON, 32, 32, LR_DEFAULTCOLOR);
- MIcoTab_AddItem(hwndCtrl, TranslateTS(g_ModernOptPages[i].lpzTitle), hIcon, i, FALSE);
+ MIcoTab_AddItem(hwndCtrl, TranslateW(g_ModernOptPages[i].lpzTitle), hIcon, i, FALSE);
DestroyIcon(hIcon);
}
@@ -428,7 +428,7 @@ static void ModernOptUI_SelectSection(HWND hwndDlg, struct ModernOptionsData *da
tvis.hParent = TVI_ROOT;
tvis.hInsertAfter = TVI_LAST;
tvis.item.mask = TVIF_IMAGE|TVIF_TEXT|TVIF_IMAGE|TVIF_SELECTEDIMAGE|TVIF_PARAM;
- tvis.item.pszText = TranslateTS(obj->optObject.lptzSubsection);
+ tvis.item.pszText = TranslateW(obj->optObject.lptzSubsection);
tvis.item.iImage = tvis.item.iSelectedImage = obj->iTreeImageIndex;
tvis.item.lParam = i;
TreeView_InsertItem(hwndTree, &tvis);
diff --git a/plugins/ModernOpt/src/mopt_home.cpp b/plugins/ModernOpt/src/mopt_home.cpp
index 53b1f3c919..17ec383e16 100644
--- a/plugins/ModernOpt/src/mopt_home.cpp
+++ b/plugins/ModernOpt/src/mopt_home.cpp
@@ -41,8 +41,8 @@ INT_PTR CALLBACK ModernOptHome_DlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L
if (g_ModernOptPages[i].bShow) {
HICON hIcon = (HICON)LoadImage(hInst, MAKEINTRESOURCE(g_ModernOptPages[i].iIcon), IMAGE_ICON, 32, 32, LR_DEFAULTCOLOR);
MDescButton_SetIcon(hwndCtrl, hIcon);
- MDescButton_SetTitle(hwndCtrl, TranslateTS(g_ModernOptPages[i].lpzTitle));
- MDescButton_SetDescription(hwndCtrl, TranslateTS(g_ModernOptPages[i].lpzDescription));
+ MDescButton_SetTitle(hwndCtrl, TranslateW(g_ModernOptPages[i].lpzTitle));
+ MDescButton_SetDescription(hwndCtrl, TranslateW(g_ModernOptPages[i].lpzDescription));
DestroyIcon(hIcon);
}
else ShowWindow(hwndCtrl, SW_HIDE);
diff --git a/plugins/ModernOpt/src/mopt_selector.cpp b/plugins/ModernOpt/src/mopt_selector.cpp
index 24c7ebb47c..6af988e4ae 100644
--- a/plugins/ModernOpt/src/mopt_selector.cpp
+++ b/plugins/ModernOpt/src/mopt_selector.cpp
@@ -46,7 +46,7 @@ static void sttPreviewSkin(MODERNOPTOBJECT *obj, wchar_t *fn, LPDRAWITEMSTRUCT l
return;
}
- HBITMAP hbmPreview = Bitmap_Load(CMString(fn) + L".png");
+ HBITMAP hbmPreview = Bitmap_Load(CMStringW(fn) + L".png");
if (!hbmPreview)
return;
diff --git a/plugins/MsgPopup/src/main.cpp b/plugins/MsgPopup/src/main.cpp
index 01f6807f53..0d9743112e 100644
--- a/plugins/MsgPopup/src/main.cpp
+++ b/plugins/MsgPopup/src/main.cpp
@@ -188,7 +188,7 @@ int HookedOptions(WPARAM wParam, LPARAM)
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS);
odp.pwszTitle = LPGENW("MessagePopup");
odp.pwszGroup = LPGENW("Popups");
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
odp.pfnDlgProc = OptionsDlgProc;
Options_AddPage(wParam, &odp);
}
diff --git a/plugins/MsgPopup/src/options.cpp b/plugins/MsgPopup/src/options.cpp
index 20ba22d8b5..0698089b72 100644
--- a/plugins/MsgPopup/src/options.cpp
+++ b/plugins/MsgPopup/src/options.cpp
@@ -54,10 +54,10 @@ INT_PTR CALLBACK OptionsDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM l
case WM_COMMAND:
if (LOWORD(wParam) == IDC_PREVIEW) {
- MessageBox(0, TranslateT("Message with question"), TranslateTS(_A2W(SERVICENAME) L" - demo"), MB_ICONQUESTION);
- MessageBox(0, TranslateT("Message with exclamation"), TranslateTS(_A2W(SERVICENAME) L" - demo"), MB_ICONEXCLAMATION);
- MessageBox(0, TranslateT("Message with error"), TranslateTS(_A2W(SERVICENAME) L" - demo"), MB_ICONSTOP);
- MessageBox(0, TranslateT("Message with asterisk"), TranslateTS(_A2W(SERVICENAME) L" - demo"), MB_ICONASTERISK);
+ MessageBox(0, TranslateT("Message with question"), TranslateW(_A2W(SERVICENAME) L" - demo"), MB_ICONQUESTION);
+ MessageBox(0, TranslateT("Message with exclamation"), TranslateW(_A2W(SERVICENAME) L" - demo"), MB_ICONEXCLAMATION);
+ MessageBox(0, TranslateT("Message with error"), TranslateW(_A2W(SERVICENAME) L" - demo"), MB_ICONSTOP);
+ MessageBox(0, TranslateT("Message with asterisk"), TranslateW(_A2W(SERVICENAME) L" - demo"), MB_ICONASTERISK);
return FALSE;
}
diff --git a/plugins/Msg_Export/src/FileViewer.cpp b/plugins/Msg_Export/src/FileViewer.cpp
index f8b48d7ece..a158317a01 100755
--- a/plugins/Msg_Export/src/FileViewer.cpp
+++ b/plugins/Msg_Export/src/FileViewer.cpp
@@ -1053,7 +1053,7 @@ static INT_PTR CALLBACK DlgProcFileViewer(HWND hwndDlg, UINT msg, WPARAM wParam,
db_set_dw(NULL, MODULE, szFileViewDB "TEffects", dwEffects);
db_set_dw(NULL, MODULE, szFileViewDB "THeight", cf.iPointSize * 2);
db_set_dw(NULL, MODULE, szFileViewDB "TColor", cf.rgbColors);
- db_set_ts(NULL, MODULE, szFileViewDB "TFace", lf.lfFaceName);
+ db_set_ws(NULL, MODULE, szFileViewDB "TFace", lf.lfFaceName);
SetRichEditFont(hRichEdit, bUseSyntaxHL);
}
return TRUE;
diff --git a/plugins/Msg_Export/src/options.cpp b/plugins/Msg_Export/src/options.cpp
index 0b3faed0f8..b09b5dae4d 100755
--- a/plugins/Msg_Export/src/options.cpp
+++ b/plugins/Msg_Export/src/options.cpp
@@ -366,7 +366,7 @@ BOOL bApplyChanges(HWND hwndDlg)
if (ListView_GetItem(hMapUser, &sItem)) {
MCONTACT hUser = (MCONTACT)sItem.lParam;
if (mir_wstrlen(szTemp) > 0)
- db_set_ts(hUser, MODULE, "FileName", szTemp);
+ db_set_ws(hUser, MODULE, "FileName", szTemp);
else
db_unset(hUser, MODULE, "FileName");
@@ -1226,7 +1226,7 @@ int OptionsInitialize(WPARAM wParam, LPARAM /*lParam*/)
odp.position = 100000000;
odp.hInstance = hInstance;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_MSGEXPORT);
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
odp.pwszTitle = LPGENW("Message export");
odp.pwszGroup = LPGENW("History");
odp.pwszTab = LPGENW("General");
diff --git a/plugins/Msg_Export/src/utils.cpp b/plugins/Msg_Export/src/utils.cpp
index 686b006ffb..74bc251e71 100755
--- a/plugins/Msg_Export/src/utils.cpp
+++ b/plugins/Msg_Export/src/utils.cpp
@@ -465,12 +465,12 @@ bool bReadMirandaDirAndPath()
{
wchar_t szDBPath[MAX_PATH], tmp[MAX_PATH];
mir_wstrcpy(szDBPath, pszDbPathError);
- PathToAbsoluteT(L"miranda32.exe", tmp);
+ PathToAbsoluteW(L"miranda32.exe", tmp);
sMirandaPath = tmp;
sMirandaPath.erase(sMirandaPath.find_last_of(L"\\"));
- CallService(MS_DB_GETPROFILEPATHT, (WPARAM)MAX_PATH - 1, (LPARAM)szDBPath);
+ CallService(MS_DB_GETPROFILEPATHW, (WPARAM)MAX_PATH - 1, (LPARAM)szDBPath);
sDBPath = szDBPath;
- CallService(MS_DB_GETPROFILENAMET, (WPARAM)MAX_PATH - 1, (LPARAM)szDBPath);
+ CallService(MS_DB_GETPROFILENAMEW, (WPARAM)MAX_PATH - 1, (LPARAM)szDBPath);
sDBPath.append(L"\\").append(szDBPath);
sDBPath.erase(sDBPath.size() - 4);
return true;
@@ -596,7 +596,7 @@ tstring GetFilePathFromUser(MCONTACT hContact)
}
// Store the Filename used so that we can check if it changes.
- db_set_ts(hContact, MODULE, "PrevFileName", sNoDBPath.c_str());
+ db_set_ws(hContact, MODULE, "PrevFileName", sNoDBPath.c_str());
}
return sFilePath;
@@ -812,7 +812,7 @@ void UpdateFileToColWidth()
void DisplayErrorDialog(const wchar_t *pszError, tstring& sFilePath, DBEVENTINFO * dbei)
{
- tstring sError = TranslateTS(pszError);
+ tstring sError = TranslateW(pszError);
sError += sFilePath;
sError += TranslateT("\nError: ");
sError += sGetErrorString();
@@ -1013,7 +1013,7 @@ void ExportDBEventInfo(MCONTACT hContact, DBEVENTINFO &dbei)
switch (dbei.eventType) {
case EVENTTYPE_MESSAGE:
{
- wchar_t *msg = DbGetEventTextT(&dbei, CP_ACP);
+ wchar_t *msg = DbGetEventTextW(&dbei, CP_ACP);
if (!bWriteIndentedToFile(hFile, nIndent, msg, bWriteUTF8Format)) {
DisplayErrorDialog(LPGENW("Failed to write message to the file :\n"), sFilePath, &dbei);
}
@@ -1109,7 +1109,7 @@ void ExportDBEventInfo(MCONTACT hContact, DBEVENTINFO &dbei)
for (int i = 0; i < nStringCount && pszCurBlobPos < pszEnd; i++) {
if (*pszCurBlobPos) {
if (!bWriteNewLine(hFile, nIndent) ||
- !bWriteTextToFile(hFile, TranslateTS(pszTypes[i]), bWriteUTF8Format) ||
+ !bWriteTextToFile(hFile, TranslateW(pszTypes[i]), bWriteUTF8Format) ||
!bWriteIndentedToFile(hFile, nIndent, pszCurBlobPos, bWriteUTF8Format)) {
break;
}
@@ -1414,11 +1414,11 @@ int nContactDeleted(WPARAM wparam, LPARAM /*lparam*/)
void SaveSettings()
{
db_set_w(NULL, MODULE, "MaxLineWidth", (WORD)nMaxLineWidth);
- db_set_ts(NULL, MODULE, "ExportDir", sExportDir.c_str());
- db_set_ts(NULL, MODULE, "DefaultFile", sDefaultFile.c_str());
- db_set_ts(NULL, MODULE, "TimeFormat", sTimeFormat.c_str());
+ db_set_ws(NULL, MODULE, "ExportDir", sExportDir.c_str());
+ db_set_ws(NULL, MODULE, "DefaultFile", sDefaultFile.c_str());
+ db_set_ws(NULL, MODULE, "TimeFormat", sTimeFormat.c_str());
- db_set_ts(NULL, MODULE, "FileViewerPrg", sFileViewerPrg.c_str());
+ db_set_ws(NULL, MODULE, "FileViewerPrg", sFileViewerPrg.c_str());
db_set_b(NULL, MODULE, "UseInternalViewer", bUseInternalViewer());
db_set_b(NULL, MODULE, "ReplaceHistory", bReplaceHistory);
db_set_b(NULL, MODULE, "AppendNewLine", bAppendNewLine);
diff --git a/plugins/MyDetails/src/data.cpp b/plugins/MyDetails/src/data.cpp
index 681c2d4f61..6005135cd8 100644
--- a/plugins/MyDetails/src/data.cpp
+++ b/plugins/MyDetails/src/data.cpp
@@ -113,7 +113,7 @@ int Protocol::GetStatus()
wchar_t tszXStatusName[256], tszXStatusMessage[1024];
if (ProtoServiceExists(name, PS_GETCUSTOMSTATUSEX)) {
// check if custom status is set
- css.flags = CSSF_TCHAR | CSSF_MASK_STATUS | CSSF_MASK_NAME | CSSF_MASK_MESSAGE | CSSF_DEFAULT_NAME;
+ css.flags = CSSF_UNICODE | CSSF_MASK_STATUS | CSSF_MASK_NAME | CSSF_MASK_MESSAGE | CSSF_DEFAULT_NAME;
css.status = &custom_status;
css.ptszName = tszXStatusName;
css.ptszMessage = tszXStatusMessage;
@@ -132,7 +132,7 @@ int Protocol::GetStatus()
lcopystr(status_name, tmp, _countof(status_name));
}
else {
- wchar_t *p = (tszXStatusName[0] != 0) ? TranslateTS(tszXStatusName) : TranslateT("<no status name>");
+ wchar_t *p = (tszXStatusName[0] != 0) ? TranslateW(tszXStatusName) : TranslateT("<no status name>");
if (tszXStatusMessage[0])
mir_snwprintf(status_name, L"%s: %s", p, tszXStatusMessage);
else
@@ -214,11 +214,11 @@ void Protocol::GetStatusMsg(int aStatus, wchar_t *msg, size_t msg_size)
if (!CanGetStatusMsg())
lcopystr(msg, L"", msg_size);
else if (aStatus == status && ProtoServiceExists(name, PS_GETMYAWAYMSG)) {
- ptrW tmp((wchar_t *)CallProtoService(name, PS_GETMYAWAYMSG, 0, SGMA_TCHAR));
+ ptrW tmp((wchar_t *)CallProtoService(name, PS_GETMYAWAYMSG, 0, SGMA_UNICODE));
lcopystr(msg, tmp == NULL ? L"" : tmp, msg_size);
}
- else if (ServiceExists(MS_AWAYMSG_GETSTATUSMSGT)) {
- ptrW tmp((wchar_t *)CallService(MS_AWAYMSG_GETSTATUSMSGT, (WPARAM)aStatus, (LPARAM)name));
+ else if (ServiceExists(MS_AWAYMSG_GETSTATUSMSGW)) {
+ ptrW tmp((wchar_t *)CallService(MS_AWAYMSG_GETSTATUSMSGW, (WPARAM)aStatus, (LPARAM)name));
lcopystr(msg, tmp == NULL ? L"" : tmp, msg_size);
}
}
@@ -306,7 +306,7 @@ void Protocol::SetNick(const wchar_t *nick)
return;
// Get it
- CallProtoService(name, PS_SETMYNICKNAME, SMNN_TCHAR, (LPARAM)nick);
+ CallProtoService(name, PS_SETMYNICKNAME, SMNN_UNICODE, (LPARAM)nick);
}
bool Protocol::CanSetAvatar()
@@ -343,7 +343,7 @@ wchar_t *Protocol::GetListeningTo()
}
DBVARIANT dbv = { 0 };
- if (db_get_ts(NULL, name, "ListeningTo", &dbv)) {
+ if (db_get_ws(NULL, name, "ListeningTo", &dbv)) {
lcopystr(listening_to, L"", _countof(listening_to));
return listening_to;
}
@@ -460,7 +460,7 @@ void ProtocolArray::SetNicks(const wchar_t *nick)
mir_wstrncpy(default_nick, nick, _countof(default_nick));
- db_set_ts(0, MODULE_NAME, SETTING_DEFAULT_NICK, nick);
+ db_set_ws(0, MODULE_NAME, SETTING_DEFAULT_NICK, nick);
for (int i = 0; i < buffer_len; i++)
buffer[i]->SetNick(default_nick);
@@ -480,11 +480,11 @@ void ProtocolArray::SetStatusMsgs(const wchar_t *message)
void ProtocolArray::SetStatusMsgs(int status, const wchar_t *message)
{
- db_set_ts(NULL, "SRAway", StatusModeToDbSetting(status, "Msg"), message);
+ db_set_ws(NULL, "SRAway", StatusModeToDbSetting(status, "Msg"), message);
// Save default also
if (!db_get_b(NULL, "SRAway", StatusModeToDbSetting(status, "UsePrev"), 0))
- db_set_ts(NULL, "SRAway", StatusModeToDbSetting(status, "Default"), message);
+ db_set_ws(NULL, "SRAway", StatusModeToDbSetting(status, "Default"), message);
for (int i = 0; i < buffer_len; i++)
if (buffer[i]->status == status)
@@ -493,7 +493,7 @@ void ProtocolArray::SetStatusMsgs(int status, const wchar_t *message)
void ProtocolArray::GetDefaultNick()
{
- ptrW tszNick(db_get_tsa(0, MODULE_NAME, SETTING_DEFAULT_NICK));
+ ptrW tszNick(db_get_wsa(0, MODULE_NAME, SETTING_DEFAULT_NICK));
if (tszNick)
mir_wstrncpy(default_nick, tszNick, _countof(default_nick));
else
@@ -502,7 +502,7 @@ void ProtocolArray::GetDefaultNick()
void ProtocolArray::GetDefaultAvatar()
{
- ptrW tszFile(db_get_tsa(0, "ContactPhoto", "File"));
+ ptrW tszFile(db_get_wsa(0, "ContactPhoto", "File"));
if (tszFile)
mir_wstrncpy(default_avatar_file, tszFile, _countof(default_avatar_file));
else
@@ -521,7 +521,7 @@ wchar_t *ProtocolArray::GetDefaultStatusMsg(int status)
if (status == ID_STATUS_CONNECTING)
status = ID_STATUS_OFFLINE;
- wchar_t *tmp = (wchar_t *)CallService(MS_AWAYMSG_GETSTATUSMSGT, (WPARAM)status, 0);
+ wchar_t *tmp = (wchar_t *)CallService(MS_AWAYMSG_GETSTATUSMSGW, (WPARAM)status, 0);
if (tmp != NULL) {
mir_wstrncpy(default_status_message, tmp, _countof(default_status_message));
mir_free(tmp);
diff --git a/plugins/MyDetails/src/frame.cpp b/plugins/MyDetails/src/frame.cpp
index b392bbc185..3ab2d647e4 100644
--- a/plugins/MyDetails/src/frame.cpp
+++ b/plugins/MyDetails/src/frame.cpp
@@ -62,7 +62,7 @@ HGENMENU hMenuShowHideFrame = 0;
#define FONT_LISTENING_TO 4
#define NUM_FONTS 5
-FontIDT font_id[NUM_FONTS];
+FontIDW font_id[NUM_FONTS];
HFONT hFont[NUM_FONTS];
COLORREF font_colour[NUM_FONTS];
@@ -198,7 +198,7 @@ int ReloadFont(WPARAM, LPARAM)
DeleteObject(hFont[i]);
LOGFONT log_font;
- font_colour[i] = CallService(MS_FONT_GETT, (WPARAM)&font_id[i], (LPARAM)&log_font);
+ font_colour[i] = CallService(MS_FONT_GETW, (WPARAM)&font_id[i], (LPARAM)&log_font);
hFont[i] = CreateFontIndirect(&log_font);
}
@@ -233,7 +233,7 @@ int CreateFrame()
for (int i = 0; i < NUM_FONTS; i++) {
memset(&font_id[i], 0, sizeof(font_id[i]));
- font_id[i].cbSize = sizeof(FontIDT);
+ font_id[i].cbSize = sizeof(FontIDW);
mir_wstrncpy(font_id[i].group, LPGENW("My details"), _countof(font_id[i].group));
mir_wstrncpy(font_id[i].name, font_names[i], _countof(font_id[i].name));
mir_strncpy(font_id[i].dbSettingsGroup, MODULE_NAME, _countof(font_id[i].dbSettingsGroup));
@@ -249,7 +249,7 @@ int CreateFrame()
mir_wstrncpy(font_id[i].deffontsettings.szFace, L"Tahoma", _countof(font_id[i].deffontsettings.szFace));
font_id[i].order = i;
font_id[i].flags = FIDF_DEFAULTVALID;
- FontRegisterT(&font_id[i]);
+ FontRegisterW(&font_id[i]);
}
ReleaseDC(NULL, hdc);
@@ -282,7 +282,7 @@ int CreateFrame()
Frame.hWnd = hwnd_frame;
Frame.align = alTop;
Frame.hIcon = Skin_LoadIcon(SKINICON_OTHER_FRAME);
- Frame.Flags = F_VISIBLE | F_SHOWTB | F_SHOWTBTIP | F_NOBORDER | F_SKINNED | F_TCHAR;
+ Frame.Flags = F_VISIBLE | F_SHOWTB | F_SHOWTBTIP | F_NOBORDER | F_SKINNED | F_UNICODE;
Frame.height = 100;
frame_id = CallService(MS_CLIST_FRAMES_ADDFRAME, (WPARAM)&Frame, 0);
@@ -332,7 +332,7 @@ int CreateFrame()
Menu_ConfigureItem(mi.root, MCI_OPT_UID, "8C1C981C-4F28-4C4C-9121-544156210CE9");
SET_UID(mi, 0x69a43f1d, 0x6ebd, 0x4e41, 0xa6, 0xbd, 0x18, 0xea, 0xc4, 0x3, 0x90, 0x35);
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
mi.position = 1;
mi.hIcolibItem = Skin_LoadIcon(SKINICON_OTHER_USERDETAILS);
mi.name.w = LPGENW("Show my details");
@@ -483,7 +483,7 @@ RECT GetRect(HDC hdc, RECT rc, const wchar_t *text, const wchar_t *def_text, Pro
const wchar_t *tmp;
if (text[0] == '\0')
- tmp = TranslateTS(def_text);
+ tmp = TranslateW(def_text);
else
tmp = text;
@@ -1025,7 +1025,7 @@ void DrawTextWithRect(HDC hdc, const wchar_t *text, const wchar_t *def_text, REC
{
const wchar_t *tmp;
if (text[0] == '\0')
- tmp = TranslateTS(def_text);
+ tmp = TranslateW(def_text);
else
tmp = text;
diff --git a/plugins/MyDetails/src/mydetails.cpp b/plugins/MyDetails/src/mydetails.cpp
index 7688d7c586..a0b2d82d32 100644
--- a/plugins/MyDetails/src/mydetails.cpp
+++ b/plugins/MyDetails/src/mydetails.cpp
@@ -90,12 +90,12 @@ static int MainInit(WPARAM, LPARAM)
CMenuItem mi;
SET_UID(mi, 0x73ff525d, 0x7b8, 0x49cc, 0xa2, 0xdf, 0xc5, 0xad, 0x13, 0xf3, 0x8e, 0x2d);
mi.position = 500050000;
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_USERDETAILS);
mi.name.w = LPGENW("My details");
HGENMENU hMenuRoot = Menu_AddMainMenuItem(&mi);
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
mi.root = hMenuRoot;
mi.hIcolibItem = NULL;
diff --git a/plugins/MyDetails/src/options.cpp b/plugins/MyDetails/src/options.cpp
index c9be969e5c..66ad5e529f 100644
--- a/plugins/MyDetails/src/options.cpp
+++ b/plugins/MyDetails/src/options.cpp
@@ -168,7 +168,7 @@ int InitOptionsCallback(WPARAM wParam, LPARAM)
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTS);
odp.pwszGroup = LPGENW("Contact list");
odp.pwszTitle = LPGENW("My details");
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/NewAwaySysMod/src/AwayOpt.cpp b/plugins/NewAwaySysMod/src/AwayOpt.cpp
index d6e0213ac0..70ef7a1389 100644
--- a/plugins/NewAwaySysMod/src/AwayOpt.cpp
+++ b/plugins/NewAwaySysMod/src/AwayOpt.cpp
@@ -140,13 +140,13 @@ static INT_PTR CALLBACK MessagesOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LP
// init image buttons
for (int i = 0; i < _countof(Dlg1Buttons); i++) {
HWND hButton = GetDlgItem(hwndDlg, Dlg1Buttons[i].DlgItem);
- SendMessage(hButton, BUTTONADDTOOLTIP, (WPARAM)TranslateTS(Dlg1Buttons[i].Text), BATF_TCHAR);
+ SendMessage(hButton, BUTTONADDTOOLTIP, (WPARAM)TranslateW(Dlg1Buttons[i].Text), BATF_UNICODE);
SendMessage(hButton, BUTTONSETASFLATBTN, TRUE, 0);
}
// now default status message buttons
for (int i = 0; i < _countof(Dlg1DefMsgDlgItems); i++) {
HWND hButton = GetDlgItem(hwndDlg, Dlg1DefMsgDlgItems[i].DlgItem);
- SendMessage(hButton, BUTTONADDTOOLTIP, (WPARAM)pcli->pfnGetStatusModeDescription(Dlg1DefMsgDlgItems[i].Status, 0), BATF_TCHAR);
+ SendMessage(hButton, BUTTONADDTOOLTIP, (WPARAM)pcli->pfnGetStatusModeDescription(Dlg1DefMsgDlgItems[i].Status, 0), BATF_UNICODE);
SendMessage(hButton, BUTTONSETASPUSHBTN, TRUE, 0);
SendMessage(hButton, BUTTONSETASFLATBTN, TRUE, 0);
g_OrigDefStatusButtonMsgProc = (WNDPROC)SetWindowLongPtr(hButton, GWLP_WNDPROC, (LONG_PTR)DefStatusButtonSubclassProc);
@@ -375,7 +375,7 @@ static INT_PTR CALLBACK MoreOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
SendDlgItemMessage(hwndDlg, IDC_MOREOPTDLG_UPDATEMSGSPERIOD_SPIN, UDM_SETRANGE32, 30, 99999);
for (int i = 0; i < _countof(Dlg2StatusButtons); i++) {
HWND hButton = GetDlgItem(hwndDlg, Dlg2StatusButtons[i].DlgItem);
- SendMessage(hButton, BUTTONADDTOOLTIP, (WPARAM)pcli->pfnGetStatusModeDescription(Dlg2StatusButtons[i].Status, 0), BATF_TCHAR);
+ SendMessage(hButton, BUTTONADDTOOLTIP, (WPARAM)pcli->pfnGetStatusModeDescription(Dlg2StatusButtons[i].Status, 0), BATF_UNICODE);
SendMessage(hButton, BUTTONSETASPUSHBTN, TRUE, 0);
SendMessage(hButton, BUTTONSETASFLATBTN, TRUE, 0);
}
@@ -524,16 +524,16 @@ INT_PTR CALLBACK AutoreplyOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
};
for (int i = 0; i < _countof(IdleComboValues); i++)
- SendMessage(hCombo, CB_SETITEMDATA, SendMessage(hCombo, CB_ADDSTRING, 0, (LPARAM)TranslateTS(IdleComboValues[i].Text)), IdleComboValues[i].Meaning);
+ SendMessage(hCombo, CB_SETITEMDATA, SendMessage(hCombo, CB_ADDSTRING, 0, (LPARAM)TranslateW(IdleComboValues[i].Text)), IdleComboValues[i].Meaning);
for (int i = 0; i < _countof(Dlg3StatusButtons); i++) {
HWND hButton = GetDlgItem(hwndDlg, Dlg3StatusButtons[i].DlgItem);
- SendMessage(hButton, BUTTONADDTOOLTIP, (WPARAM)pcli->pfnGetStatusModeDescription(Dlg3StatusButtons[i].Status, 0), BATF_TCHAR);
+ SendMessage(hButton, BUTTONADDTOOLTIP, (WPARAM)pcli->pfnGetStatusModeDescription(Dlg3StatusButtons[i].Status, 0), BATF_UNICODE);
SendMessage(hButton, BUTTONSETASPUSHBTN, TRUE, 0);
SendMessage(hButton, BUTTONSETASFLATBTN, TRUE, 0);
}
HWND hButton = GetDlgItem(hwndDlg, IDC_REPLYDLG_VARS);
- SendMessage(hButton, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Open Variables help dialog"), BATF_TCHAR);
+ SendMessage(hButton, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Open Variables help dialog"), BATF_UNICODE);
SendMessage(hButton, BUTTONSETASFLATBTN, TRUE, 0);
SendDlgItemMessage(hwndDlg, IDC_MOREOPTDLG_EVNTMSG, BUTTONSETASTHEMEDBTN, TRUE, 0);
@@ -559,7 +559,7 @@ INT_PTR CALLBACK AutoreplyOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
ti.hwnd = hwndDlg;
for (int i = 0; i < _countof(Tooltips); i++) {
ti.uId = (UINT_PTR)GetDlgItem(hwndDlg, Tooltips[i].m_dlgItemID);
- ti.lpszText = TranslateTS(Tooltips[i].Text);
+ ti.lpszText = TranslateW(Tooltips[i].Text);
SendMessage(hWndTooltips, TTM_ADDTOOL, 0, (LPARAM)&ti);
}
SendMessage(hWndTooltips, TTM_SETMAXTIPWIDTH, 0, 500);
@@ -695,13 +695,13 @@ INT_PTR CALLBACK MessagesModernOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
// init image buttons
for (int i = 0; i < _countof(Dlg4Buttons); i++) {
HWND hButton = GetDlgItem(hwndDlg, Dlg4Buttons[i].DlgItem);
- SendMessage(hButton, BUTTONADDTOOLTIP, (WPARAM)TranslateTS(Dlg4Buttons[i].Text), BATF_TCHAR);
+ SendMessage(hButton, BUTTONADDTOOLTIP, (WPARAM)TranslateW(Dlg4Buttons[i].Text), BATF_UNICODE);
SendMessage(hButton, BUTTONSETASFLATBTN, TRUE, 0);
}
// now default status message buttons
for (int i = 0; i < _countof(Dlg4DefMsgDlgItems); i++) {
HWND hButton = GetDlgItem(hwndDlg, Dlg4DefMsgDlgItems[i].DlgItem);
- SendMessage(hButton, BUTTONADDTOOLTIP, (WPARAM)pcli->pfnGetStatusModeDescription(Dlg4DefMsgDlgItems[i].Status, 0), BATF_TCHAR);
+ SendMessage(hButton, BUTTONADDTOOLTIP, (WPARAM)pcli->pfnGetStatusModeDescription(Dlg4DefMsgDlgItems[i].Status, 0), BATF_UNICODE);
SendMessage(hButton, BUTTONSETASPUSHBTN, TRUE, 0);
SendMessage(hButton, BUTTONSETASFLATBTN, TRUE, 0);
g_OrigDefStatusButtonMsgProc = (WNDPROC)SetWindowLongPtr(hButton, GWLP_WNDPROC, (LONG_PTR)DefStatusButtonSubclassProc);
diff --git a/plugins/NewAwaySysMod/src/AwaySys.cpp b/plugins/NewAwaySysMod/src/AwaySys.cpp
index e80fa4c2c7..ff3b446ee7 100644
--- a/plugins/NewAwaySysMod/src/AwaySys.cpp
+++ b/plugins/NewAwaySysMod/src/AwaySys.cpp
@@ -633,7 +633,7 @@ int MirandaLoaded(WPARAM, LPARAM)
CMenuItem mi;
SET_UID(mi, 0xa379c361, 0x9e3f, 0x468d, 0xb2, 0xac, 0xc4, 0x89, 0xbb, 0xfc, 0x81, 0x15);
mi.position = 1000020000;
- mi.flags = CMIF_TCHAR | CMIF_NOTOFFLINE;
+ mi.flags = CMIF_UNICODE | CMIF_NOTOFFLINE;
mi.hIcolibItem = iconList[SendOnEvent ? 1 : 0].hIcolib;
mi.name.w = SendOnEvent ? DISABLE_SOE_COMMAND : ENABLE_SOE_COMMAND;
mi.pszService = MS_AWAYSYS_AUTOREPLY_TOGGLE;
@@ -642,7 +642,7 @@ int MirandaLoaded(WPARAM, LPARAM)
memset(&mi, 0, sizeof(mi));
SET_UID(mi, 0xd3282acc, 0x9ff1, 0x4ede, 0x8a, 0x1e, 0x36, 0x72, 0x3f, 0x44, 0x4f, 0x84);
mi.position = -2000005000;
- mi.flags = CMIF_TCHAR | CMIF_NOTOFFLINE | CMIF_HIDDEN;
+ mi.flags = CMIF_UNICODE | CMIF_NOTOFFLINE | CMIF_HIDDEN;
mi.name.w = LPGENW("Read status message"); // never seen...
mi.pszService = MS_AWAYMSG_SHOWAWAYMSG;
g_hReadStatMenuItem = Menu_AddContactMenuItem(&mi);
@@ -650,7 +650,7 @@ int MirandaLoaded(WPARAM, LPARAM)
if (g_MoreOptPage.GetDBValueCopy(IDC_MOREOPTDLG_USEMENUITEM)) {
memset(&mi, 0, sizeof(mi));
SET_UID(mi, 0xc42a4fdb, 0x51b8, 0x4bbe, 0x83, 0xee, 0x2d, 0x32, 0x29, 0x5c, 0x2, 0xb3);
- mi.flags = CMIF_TCHAR | CMIF_HIDDEN;
+ mi.flags = CMIF_UNICODE | CMIF_HIDDEN;
mi.name.w = LPGENW("Set status message"); // will never be shown
mi.position = 1000020000;
mi.hIcolibItem = iconList[8].hIcolib;
@@ -659,14 +659,14 @@ int MirandaLoaded(WPARAM, LPARAM)
memset(&mi, 0, sizeof(mi));
SET_UID(mi, 0x47a3c631, 0x8ca9, 0x4b7e, 0x84, 0x6e, 0x29, 0xbf, 0x53, 0x30, 0x6f, 0x83);
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
mi.hIcolibItem = NULL;
mi.position = 1000020000;
mi.name.w = LPGENW("Autoreply");
g_hToggleSOEContactMenuItem = Menu_AddContactMenuItem(&mi);
UNSET_UID(mi);
- mi.flags = CMIF_TCHAR | CMIF_SYSTEM;
+ mi.flags = CMIF_UNICODE | CMIF_SYSTEM;
mi.root = g_hToggleSOEContactMenuItem;
mi.position = 1000020000;
@@ -728,11 +728,11 @@ extern "C" int __declspec(dllexport) Load(void)
if (db_get_b(NULL, MOD_NAME, DB_SETTINGSVER, 0) < 1) { // change all %nas_message% variables to %extratext% if it wasn't done before
TCString Str = db_get_s(NULL, MOD_NAME, "PopupsFormat", L"");
if (Str.GetLen())
- db_set_ts(NULL, MOD_NAME, "PopupsFormat", Str.Replace(L"nas_message", L"extratext"));
+ db_set_ws(NULL, MOD_NAME, "PopupsFormat", Str.Replace(L"nas_message", L"extratext"));
Str = db_get_s(NULL, MOD_NAME, "ReplyPrefix", L"");
if (Str.GetLen())
- db_set_ts(NULL, MOD_NAME, "ReplyPrefix", Str.Replace(L"nas_message", L"extratext"));
+ db_set_ws(NULL, MOD_NAME, "ReplyPrefix", Str.Replace(L"nas_message", L"extratext"));
}
if (db_get_b(NULL, MOD_NAME, DB_SETTINGSVER, 0) < 2) { // disable autoreply for not-on-list contacts, as such contact may be a spam bot
db_set_b(NULL, MOD_NAME, ContactStatusToDBSetting(0, DB_ENABLEREPLY, 0, INVALID_CONTACT_ID), 0);
diff --git a/plugins/NewAwaySysMod/src/CString.cpp b/plugins/NewAwaySysMod/src/CString.cpp
index 83c9717ee5..727ea9fb41 100644
--- a/plugins/NewAwaySysMod/src/CString.cpp
+++ b/plugins/NewAwaySysMod/src/CString.cpp
@@ -279,7 +279,7 @@ CString db_get_s(MCONTACT hContact, const char *szModule, const char *szSetting,
TCString db_get_s(MCONTACT hContact, const char *szModule, const char *szSetting, const wchar_t *szDefaultValue)
{
- ptrW p( db_get_tsa(hContact, szModule, szSetting));
+ ptrW p( db_get_wsa(hContact, szModule, szSetting));
return TCString(p == NULL ? szDefaultValue : p);
}
diff --git a/plugins/NewAwaySysMod/src/Client.cpp b/plugins/NewAwaySysMod/src/Client.cpp
index a571f7f2b1..5d0c349801 100644
--- a/plugins/NewAwaySysMod/src/Client.cpp
+++ b/plugins/NewAwaySysMod/src/Client.cpp
@@ -128,8 +128,8 @@ void ChangeProtoMessages(char* szProto, int iMode, const TCString &Msg)
for (int i = 0; i < _countof(StatusDbSettings); i++) {
if (iMode == StatusDbSettings[i].Status) {
- db_set_ts(NULL, "SRAway", CString(StatusDbSettings[i].Setting) + "Msg", CurMsg);
- db_set_ts(NULL, "SRAway", CString(StatusDbSettings[i].Setting) + "Default", CurMsg); // TODO: make it more accurate, and change not only here, but when changing status messages through UpdateMsgsTimerFunc too; and when changing messages through AutoAway() ?
+ db_set_ws(NULL, "SRAway", CString(StatusDbSettings[i].Setting) + "Msg", CurMsg);
+ db_set_ws(NULL, "SRAway", CString(StatusDbSettings[i].Setting) + "Default", CurMsg); // TODO: make it more accurate, and change not only here, but when changing status messages through UpdateMsgsTimerFunc too; and when changing messages through AutoAway() ?
break;
}
}
diff --git a/plugins/NewAwaySysMod/src/Options.cpp b/plugins/NewAwaySysMod/src/Options.cpp
index 62463ea611..0a81d2f701 100644
--- a/plugins/NewAwaySysMod/src/Options.cpp
+++ b/plugins/NewAwaySysMod/src/Options.cpp
@@ -151,7 +151,7 @@ TCString COptItem::GetStrDBVal(const CString &sModule, CString *sDBSettingPrefix
void COptItem::SetStrDBVal(const CString &sModule, TCString &Str, CString *sDBSettingPrefix)
{
if (sDBSetting != NULL && !m_bReadOnly) {
- db_set_ts(NULL, sModule, sDBSettingPrefix ? (*sDBSettingPrefix + sDBSetting) : sDBSetting, Str);
+ db_set_ws(NULL, sModule, sDBSettingPrefix ? (*sDBSettingPrefix + sDBSetting) : sDBSetting, Str);
}
}
@@ -331,7 +331,7 @@ void COptItem_TreeCtrl::MemToDB(const CString &sModule, CString *sDBSettingPrefi
CString StrID;
_itoa(m_value[i].ID, StrID.GetBuffer(64), 10);
StrID.ReleaseBuffer();
- db_set_ts(NULL, sModule, *sDBSettingPrefix + sDBSetting + TREEITEM_DBSTR_TITLE + StrID, m_value[i].Title);
+ db_set_ws(NULL, sModule, *sDBSettingPrefix + sDBSetting + TREEITEM_DBSTR_TITLE + StrID, m_value[i].Title);
if (!(TreeFlags & TREECTRL_FLAG_IS_SINGLE_LEVEL))
db_set_w(NULL, sModule, *sDBSettingPrefix + sDBSetting + TREEITEM_DBSTR_PARENT + StrID, m_value[i].ParentID);
@@ -340,7 +340,7 @@ void COptItem_TreeCtrl::MemToDB(const CString &sModule, CString *sDBSettingPrefi
db_set_b(NULL, sModule, *sDBSettingPrefix + sDBSetting + TREEITEM_DBSTR_FLAGS + StrID, m_value[i].Flags);
if (User_Str1_DBName != NULL && m_value[i].User_Str1 != NULL)
- db_set_ts(NULL, sModule, *sDBSettingPrefix + sDBSetting + User_Str1_DBName + StrID, m_value[i].User_Str1);
+ db_set_ws(NULL, sModule, *sDBSettingPrefix + sDBSetting + User_Str1_DBName + StrID, m_value[i].User_Str1);
}
COptItem::MemToDB(sModule, sDBSettingPrefix);
}
@@ -703,7 +703,7 @@ void COptItem_ListCtrl::MemToDB(const CString &sModule, CString *sDBSettingPrefi
CString StrID;
_itoa(i, StrID.GetBuffer(64), 10);
StrID.ReleaseBuffer();
- db_set_ts(NULL, sModule, *sDBSettingPrefix + sDBSetting + LISTITEM_DBSTR_TEXT + StrID, m_value[i].Text);
+ db_set_ws(NULL, sModule, *sDBSettingPrefix + sDBSetting + LISTITEM_DBSTR_TEXT + StrID, m_value[i].Text);
}
COptItem::MemToDB(sModule, sDBSettingPrefix);
}
diff --git a/plugins/NewAwaySysMod/src/Path.h b/plugins/NewAwaySysMod/src/Path.h
index 176f08bad7..a6356b2b6f 100644
--- a/plugins/NewAwaySysMod/src/Path.h
+++ b/plugins/NewAwaySysMod/src/Path.h
@@ -37,7 +37,7 @@ __inline TCString Path_ToAbsolute(TCString &Path)
{
TCString Str;
Str.GetBuffer(MAX_PATH);
- PathToAbsoluteT(Path, Str);
+ PathToAbsoluteW(Path, Str);
Str.ReleaseBuffer();
return Str;
}
diff --git a/plugins/NewAwaySysMod/src/Properties.cpp b/plugins/NewAwaySysMod/src/Properties.cpp
index 6e1914257c..6f1fbdef28 100644
--- a/plugins/NewAwaySysMod/src/Properties.cpp
+++ b/plugins/NewAwaySysMod/src/Properties.cpp
@@ -113,7 +113,7 @@ void CContactSettings::SetMsgFormat(int Flags, TCString Message)
ResetContactSettingsOnStatusChange(m_hContact);
if (Message != NULL)
- db_set_ts(m_hContact, MOD_NAME, DBSetting, Message);
+ db_set_ws(m_hContact, MOD_NAME, DBSetting, Message);
else
db_unset(m_hContact, MOD_NAME, DBSetting);
}
@@ -167,10 +167,10 @@ void CProtoSettings::SetMsgFormat(int Flags, TCString Message)
g_ProtoStates[szProto].TempMsg.Unset();
CString DBSetting(ProtoStatusToDBSetting(DB_STATUSMSG, IDC_MOREOPTDLG_PERSTATUSPROTOMSGS));
if (Message != NULL)
- db_set_ts(NULL, MOD_NAME, DBSetting, Message);
+ db_set_ws(NULL, MOD_NAME, DBSetting, Message);
else {
if (!szProto)
- db_set_ts(NULL, MOD_NAME, DBSetting, CProtoSettings(NULL, Status).GetMsgFormat(GMF_LASTORDEFAULT)); // global message can't be NULL; we can use an empty string instead if it's really necessary
+ db_set_ws(NULL, MOD_NAME, DBSetting, CProtoSettings(NULL, Status).GetMsgFormat(GMF_LASTORDEFAULT)); // global message can't be NULL; we can use an empty string instead if it's really necessary
else
db_unset(NULL, MOD_NAME, DBSetting);
}
diff --git a/plugins/NewAwaySysMod/src/ReadAwayMsg.cpp b/plugins/NewAwaySysMod/src/ReadAwayMsg.cpp
index 13cf39c03b..25ee3f12f7 100644
--- a/plugins/NewAwaySysMod/src/ReadAwayMsg.cpp
+++ b/plugins/NewAwaySysMod/src/ReadAwayMsg.cpp
@@ -93,7 +93,7 @@ static INT_PTR CALLBACK ReadAwayMsgDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam
ShowWindow(GetDlgItem(hwndDlg, IDC_READAWAYMSG_RETRIEVE), SW_HIDE);
ShowWindow(GetDlgItem(hwndDlg, IDC_READAWAYMSG_MSG), SW_SHOW);
SetDlgItemText(hwndDlg, IDOK, TranslateT("&Close"));
- db_set_ts(awayData->hContact, "CList", "StatusMsg", ptszStatusMsg);
+ db_set_ws(awayData->hContact, "CList", "StatusMsg", ptszStatusMsg);
}
break;
diff --git a/plugins/NewAwaySysMod/src/SetAwayMsg.cpp b/plugins/NewAwaySysMod/src/SetAwayMsg.cpp
index e2ec9e24a0..426e8c97b3 100644
--- a/plugins/NewAwaySysMod/src/SetAwayMsg.cpp
+++ b/plugins/NewAwaySysMod/src/SetAwayMsg.cpp
@@ -597,7 +597,7 @@ INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
// init image buttons
for (int i = 0; i < _countof(Buttons); i++) {
HWND hButton = GetDlgItem(hwndDlg, Buttons[i].DlgItem);
- SendMessage(hButton, BUTTONADDTOOLTIP, (WPARAM)TranslateTS(Buttons[i].Text), BATF_TCHAR);
+ SendMessage(hButton, BUTTONADDTOOLTIP, (WPARAM)TranslateW(Buttons[i].Text), BATF_UNICODE);
SendMessage(hButton, BUTTONSETASFLATBTN, TRUE, 0);
}
@@ -608,7 +608,7 @@ INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
ti.uFlags = TTF_IDISHWND | TTF_SUBCLASS;
for (int i = 0; i < _countof(Tooltips); i++) {
ti.uId = (UINT_PTR)GetDlgItem(hwndDlg, Tooltips[i].m_dlgItemID);
- ti.lpszText = TranslateTS(Tooltips[i].Text);
+ ti.lpszText = TranslateW(Tooltips[i].Text);
SendMessage(hWndTooltips, TTM_ADDTOOL, 0, (LPARAM)&ti);
}
SendMessage(hwndDlg, UM_ICONSCHANGED, 0, 0);
@@ -1016,7 +1016,7 @@ INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
switch (HIWORD(wParam)) {
case EN_CHANGE:
if (LOWORD(wParam) == IDC_SAWAYMSG_MSGDATA)
- SetDlgItemText(hwndDlg, IDC_OK, TranslateTS((GetSelContactsNum(CList) > 1) ? LPGENW("Apply") : LPGENW("OK")));
+ SetDlgItemText(hwndDlg, IDC_OK, TranslateW((GetSelContactsNum(CList) > 1) ? LPGENW("Apply") : LPGENW("OK")));
break;
case EN_KILLFOCUS:
diff --git a/plugins/NewEventNotify/src/popup.cpp b/plugins/NewEventNotify/src/popup.cpp
index 0e4cc47692..219a65bee2 100644
--- a/plugins/NewEventNotify/src/popup.cpp
+++ b/plugins/NewEventNotify/src/popup.cpp
@@ -373,7 +373,7 @@ static wchar_t* GetEventPreview(DBEVENTINFO *dbei)
DBEVENTTYPEDESCR *pei = (DBEVENTTYPEDESCR*)CallService(MS_DB_EVENT_GETTYPE, (WPARAM)dbei->szModule, (LPARAM)dbei->eventType);
// support for custom database event types
if (pei && dbei->pBlob) {
- DBEVENTGETTEXT svc = {dbei, DBVT_TCHAR, CP_ACP};
+ DBEVENTGETTEXT svc = {dbei, DBVT_WCHAR, CP_ACP};
wchar_t *pet = (wchar_t*)CallService(MS_DB_EVENT_GETTEXT, 0, (LPARAM)&svc);
if (pet) {
// we've got event text, move to our memory space
@@ -397,7 +397,7 @@ static wchar_t* GetEventPreview(DBEVENTINFO *dbei)
}
mir_free(comment1);
mir_free(comment2);
- return TranslateTS( mir_a2u(commentFix));
+ return TranslateW( mir_a2u(commentFix));
}
int PopupShow(PLUGIN_OPTIONS* pluginOptions, MCONTACT hContact, MEVENT hEvent, UINT eventType)
@@ -491,7 +491,7 @@ int PopupShow(PLUGIN_OPTIONS* pluginOptions, MCONTACT hContact, MEVENT hEvent, U
// if hContact is NULL, && hEvent is NULL then popup is only Test
if ((hContact == NULL) && (hEvent == NULL)) {
wcsncpy(pudw.lptzContactName, TranslateT("Plugin Test"), MAX_CONTACTNAME);
- wcsncpy(pudw.lptzText, TranslateTS(sampleEvent), MAX_SECONDLINE);
+ wcsncpy(pudw.lptzText, TranslateW(sampleEvent), MAX_SECONDLINE);
}
else { // get the needed event data
wcsncpy(pudw.lptzContactName, (wchar_t*)pcli->pfnGetContactDisplayName(hContact, 0), MAX_CONTACTNAME);
diff --git a/plugins/NewXstatusNotify/src/indsnd.cpp b/plugins/NewXstatusNotify/src/indsnd.cpp
index eeceb22253..504d63ddc3 100644
--- a/plugins/NewXstatusNotify/src/indsnd.cpp
+++ b/plugins/NewXstatusNotify/src/indsnd.cpp
@@ -33,14 +33,14 @@ void PreviewSound(HWND hList)
int hlpStatus = lvi.lParam;
ListView_GetItemText(hList, lvi.iItem, 1, buff, _countof(buff));
- if (!mir_wstrcmp(buff, TranslateTS(DEFAULT_SOUND))) {
+ if (!mir_wstrcmp(buff, TranslateW(DEFAULT_SOUND))) {
if (hlpStatus < ID_STATUS_MIN)
SkinPlaySound(StatusListEx[hlpStatus].lpzSkinSoundName);
else
SkinPlaySound(StatusList[Index(hlpStatus)].lpzSkinSoundName);
}
else {
- PathToAbsoluteT(buff, stzSoundPath);
+ PathToAbsoluteW(buff, stzSoundPath);
SkinPlaySoundFile(stzSoundPath);
}
}
@@ -51,7 +51,7 @@ BOOL RemoveSoundFromList(HWND hList)
if (iSel != -1) {
iSel = -1;
while ((iSel = ListView_GetNextItem(hList, iSel, LVNI_SELECTED)) != -1)
- ListView_SetItemText(hList, iSel, 1, TranslateTS(DEFAULT_SOUND));
+ ListView_SetItemText(hList, iSel, 1, TranslateW(DEFAULT_SOUND));
return TRUE;
}
@@ -64,7 +64,7 @@ wchar_t *SelectSound(HWND hwndDlg, wchar_t *buff, size_t bufflen)
HWND hList = GetDlgItem(hwndDlg, IDC_INDSNDLIST);
ListView_GetItemText(hList, ListView_GetNextItem(hList, -1, LVNI_SELECTED), 1, buff, (DWORD)bufflen);
- if (!mir_wstrcmp(buff, TranslateTS(DEFAULT_SOUND)))
+ if (!mir_wstrcmp(buff, TranslateW(DEFAULT_SOUND)))
buff = NULL;
ofn.lStructSize = sizeof(ofn);
@@ -146,14 +146,14 @@ INT_PTR CALLBACK DlgProcSoundUIPage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
lvi.iSubItem = 0;
lvi.iImage = Index(i);
lvi.lParam = (LPARAM)i;
- lvi.pszText = TranslateTS(StatusList[Index(i)].lpzSkinSoundDesc);
+ lvi.pszText = TranslateW(StatusList[Index(i)].lpzSkinSoundDesc);
lvi.iItem = ListView_InsertItem(hList, &lvi);
- if (!db_get_ts(hContact, MODULE, StatusList[Index(i)].lpzSkinSoundName, &dbv)) {
+ if (!db_get_ws(hContact, MODULE, StatusList[Index(i)].lpzSkinSoundName, &dbv)) {
mir_wstrcpy(buff, dbv.ptszVal);
db_free(&dbv);
}
- else mir_wstrcpy(buff, TranslateTS(DEFAULT_SOUND));
+ else mir_wstrcpy(buff, TranslateW(DEFAULT_SOUND));
ListView_SetItemText(hList, lvi.iItem, 1, buff);
}
@@ -166,14 +166,14 @@ INT_PTR CALLBACK DlgProcSoundUIPage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
lvi.iSubItem = 0;
lvi.iImage = Index(ID_STATUS_MAX) + 1; // additional icon
lvi.lParam = (LPARAM)i;
- lvi.pszText = TranslateTS(StatusListEx[i].lpzSkinSoundDesc);
+ lvi.pszText = TranslateW(StatusListEx[i].lpzSkinSoundDesc);
lvi.iItem = ListView_InsertItem(hList, &lvi);
- if (!db_get_ts(hContact, MODULE, StatusList[i].lpzSkinSoundName, &dbv)) {
+ if (!db_get_ws(hContact, MODULE, StatusList[i].lpzSkinSoundName, &dbv)) {
wcsncpy(buff, dbv.ptszVal, _countof(buff)-1);
db_free(&dbv);
}
- else wcsncpy(buff, TranslateTS(DEFAULT_SOUND), _countof(buff)-1);
+ else wcsncpy(buff, TranslateW(DEFAULT_SOUND), _countof(buff)-1);
ListView_SetItemText(hList, lvi.iItem, 1, buff);
}
@@ -236,7 +236,7 @@ INT_PTR CALLBACK DlgProcSoundUIPage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
ListView_GetItem(hList, &lvi);
ListView_GetItemText(hList, lvi.iItem, 1, buff, _countof(buff));
- if (!mir_wstrcmp(buff, TranslateTS(DEFAULT_SOUND))) {
+ if (!mir_wstrcmp(buff, TranslateW(DEFAULT_SOUND))) {
if (lvi.lParam < ID_STATUS_MIN)
db_unset(hContact, MODULE, StatusListEx[lvi.lParam].lpzSkinSoundName);
else
diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp
index bf7ef10106..337a197494 100644
--- a/plugins/NewXstatusNotify/src/main.cpp
+++ b/plugins/NewXstatusNotify/src/main.cpp
@@ -187,7 +187,7 @@ wchar_t* GetStr(STATUSMSGINFO *n, const wchar_t *tmplt)
if (n == NULL || tmplt == NULL || tmplt[0] == '\0')
return NULL;
- CMString res;
+ CMStringW res;
size_t len = mir_wstrlen(tmplt);
for (size_t i = 0; i < len; i++) {
@@ -304,7 +304,7 @@ void GetStatusText(MCONTACT hContact, WORD newStatus, WORD oldStatus, wchar_t *s
if (opt.ShowPreviousStatus) {
wchar_t buff[MAX_STATUSTEXT];
- mir_snwprintf(buff, TranslateTS(STRING_SHOWPREVIOUSSTATUS), StatusList[Index(oldStatus)].lpzStandardText);
+ mir_snwprintf(buff, TranslateW(STRING_SHOWPREVIOUSSTATUS), StatusList[Index(oldStatus)].lpzStandardText);
mir_wstrcat(mir_wstrcat(stzStatusText, L" "), buff);
}
}
@@ -326,7 +326,7 @@ void PlayChangeSound(MCONTACT hContact, const char *name)
if (opt.UseIndSnd) {
DBVARIANT dbv;
wchar_t stzSoundFile[MAX_PATH] = { 0 };
- if (!db_get_ts(hContact, MODULE, name, &dbv)) {
+ if (!db_get_ws(hContact, MODULE, name, &dbv)) {
wcsncpy(stzSoundFile, dbv.ptszVal, _countof(stzSoundFile)-1);
db_free(&dbv);
}
@@ -334,7 +334,7 @@ void PlayChangeSound(MCONTACT hContact, const char *name)
if (stzSoundFile[0]) {
//Now make path to IndSound absolute, as it isn't registered
wchar_t stzSoundPath[MAX_PATH];
- PathToAbsoluteT(stzSoundFile, stzSoundPath);
+ PathToAbsoluteW(stzSoundFile, stzSoundPath);
SkinPlaySoundFile(stzSoundPath);
return;
}
@@ -695,7 +695,7 @@ int ProcessStatusMessage(DBCONTACTWRITESETTING *cws, MCONTACT hContact)
char protoname[MAX_PATH];
mir_snprintf(protoname, "%s_TPopupSMsgRemoved", szProto);
DBVARIANT dbVar = { 0 };
- if (db_get_ts(NULL, MODULE, protoname, &dbVar)) {
+ if (db_get_ws(NULL, MODULE, protoname, &dbVar)) {
str = GetStr(&smi, DEFAULT_POPUP_SMSGREMOVED);
}
else {
@@ -707,7 +707,7 @@ int ProcessStatusMessage(DBCONTACTWRITESETTING *cws, MCONTACT hContact)
char protoname[MAX_PATH];
mir_snprintf(protoname, "%s_TPopupSMsgChanged", szProto);
DBVARIANT dbVar = { 0 };
- if (db_get_ts(NULL, MODULE, protoname, &dbVar)) {
+ if (db_get_ws(NULL, MODULE, protoname, &dbVar)) {
str = GetStr(&smi, DEFAULT_POPUP_SMSGCHANGED);
}
else {
@@ -1072,7 +1072,7 @@ void InitMainMenuItem()
{
CMenuItem mi;
SET_UID(mi, 0x22b7b4db, 0xa9a1, 0x4d43, 0x88, 0x80, 0x4c, 0x23, 0x20, 0x31, 0xc6, 0xa0);
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
if (ServiceExists(MS_POPUP_ADDPOPUPT))
mi.root = Menu_CreateRoot(MO_MAIN, LPGENW("Popups"), 0);
mi.pszService = MS_STATUSCHANGE_MENUCOMMAND;
@@ -1096,10 +1096,10 @@ void InitIcolib()
void InitSound()
{
for (int i = ID_STATUS_MIN; i <= ID_STATUS_MAX; i++)
- SkinAddNewSoundExT(StatusList[Index(i)].lpzSkinSoundName, LPGENW("Status Notify"), StatusList[Index(i)].lpzSkinSoundDesc);
+ SkinAddNewSoundExW(StatusList[Index(i)].lpzSkinSoundName, LPGENW("Status Notify"), StatusList[Index(i)].lpzSkinSoundDesc);
for (int i = 0; i <= ID_STATUSEX_MAX; i++)
- SkinAddNewSoundExT(StatusListEx[i].lpzSkinSoundName, LPGENW("Status Notify"), StatusListEx[i].lpzSkinSoundDesc);
+ SkinAddNewSoundExW(StatusListEx[i].lpzSkinSoundName, LPGENW("Status Notify"), StatusListEx[i].lpzSkinSoundDesc);
}
int InitTopToolbar(WPARAM, LPARAM)
diff --git a/plugins/NewXstatusNotify/src/options.cpp b/plugins/NewXstatusNotify/src/options.cpp
index 2e602a4586..3d2de9a971 100644
--- a/plugins/NewXstatusNotify/src/options.cpp
+++ b/plugins/NewXstatusNotify/src/options.cpp
@@ -112,20 +112,20 @@ void LoadOptions()
void SaveTemplates()
{
- db_set_ts(0, MODULE, "TPopupChanged", templates.PopupXstatusChanged);
- db_set_ts(0, MODULE, "TPopupRemoved", templates.PopupXstatusRemoved);
- db_set_ts(0, MODULE, "TPopupXMsgChanged", templates.PopupXMsgChanged);
- db_set_ts(0, MODULE, "TPopupXMsgRemoved", templates.PopupXMsgRemoved);
+ db_set_ws(0, MODULE, "TPopupChanged", templates.PopupXstatusChanged);
+ db_set_ws(0, MODULE, "TPopupRemoved", templates.PopupXstatusRemoved);
+ db_set_ws(0, MODULE, "TPopupXMsgChanged", templates.PopupXMsgChanged);
+ db_set_ws(0, MODULE, "TPopupXMsgRemoved", templates.PopupXMsgRemoved);
- db_set_ts(0, MODULE, "TLogXChanged", templates.LogXstatusChanged);
- db_set_ts(0, MODULE, "TLogXRemoved", templates.LogXstatusRemoved);
- db_set_ts(0, MODULE, "TLogXMsgChanged", templates.LogXMsgChanged);
- db_set_ts(0, MODULE, "TLogXMsgRemoved", templates.LogXMsgRemoved);
- db_set_ts(0, MODULE, "TLogXOpening", templates.LogXstatusOpening);
+ db_set_ws(0, MODULE, "TLogXChanged", templates.LogXstatusChanged);
+ db_set_ws(0, MODULE, "TLogXRemoved", templates.LogXstatusRemoved);
+ db_set_ws(0, MODULE, "TLogXMsgChanged", templates.LogXMsgChanged);
+ db_set_ws(0, MODULE, "TLogXMsgRemoved", templates.LogXMsgRemoved);
+ db_set_ws(0, MODULE, "TLogXOpening", templates.LogXstatusOpening);
- db_set_ts(0, MODULE, "TLogSMsgChanged", templates.LogSMsgChanged);
- db_set_ts(0, MODULE, "TLogSMsgRemoved", templates.LogSMsgRemoved);
- db_set_ts(0, MODULE, "TLogSMsgOpening", templates.LogSMsgOpening);
+ db_set_ws(0, MODULE, "TLogSMsgChanged", templates.LogSMsgChanged);
+ db_set_ws(0, MODULE, "TLogSMsgRemoved", templates.LogSMsgRemoved);
+ db_set_ws(0, MODULE, "TLogSMsgOpening", templates.LogSMsgOpening);
db_set_b(0, MODULE, "TPopupXFlags", templates.PopupXFlags);
db_set_b(0, MODULE, "TPopupSMsgFlags", templates.PopupSMsgFlags);
@@ -136,9 +136,9 @@ void SaveTemplates()
PROTOTEMPLATE *prototemplate = ProtoTemplates[i];
char str[MAX_PATH];
mir_snprintf(str, "%s_TPopupSMsgChanged", prototemplate->ProtoName);
- db_set_ts(0, MODULE, str, prototemplate->ProtoTemplateMsg);
+ db_set_ws(0, MODULE, str, prototemplate->ProtoTemplateMsg);
mir_snprintf(str, "%s_TPopupSMsgRemoved", prototemplate->ProtoName);
- db_set_ts(0, MODULE, str, prototemplate->ProtoTemplateRemoved);
+ db_set_ws(0, MODULE, str, prototemplate->ProtoTemplateRemoved);
}
}
@@ -337,8 +337,8 @@ INT_PTR CALLBACK DlgProcPopupOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
//Mouse actions
for (int i = 0; i < _countof(PopupActions); i++) {
- SendDlgItemMessage(hwndDlg, IDC_STATUS_LC, CB_SETITEMDATA, SendDlgItemMessage(hwndDlg, IDC_STATUS_LC, CB_ADDSTRING, 0, (LPARAM)TranslateTS(PopupActions[i].Text)), PopupActions[i].Action);
- SendDlgItemMessage(hwndDlg, IDC_STATUS_RC, CB_SETITEMDATA, SendDlgItemMessage(hwndDlg, IDC_STATUS_RC, CB_ADDSTRING, 0, (LPARAM)TranslateTS(PopupActions[i].Text)), PopupActions[i].Action);
+ SendDlgItemMessage(hwndDlg, IDC_STATUS_LC, CB_SETITEMDATA, SendDlgItemMessage(hwndDlg, IDC_STATUS_LC, CB_ADDSTRING, 0, (LPARAM)TranslateW(PopupActions[i].Text)), PopupActions[i].Action);
+ SendDlgItemMessage(hwndDlg, IDC_STATUS_RC, CB_SETITEMDATA, SendDlgItemMessage(hwndDlg, IDC_STATUS_RC, CB_ADDSTRING, 0, (LPARAM)TranslateW(PopupActions[i].Text)), PopupActions[i].Action);
}
SendDlgItemMessage(hwndDlg, IDC_STATUS_LC, CB_SETCURSEL, opt.LeftClickAction, 0);
@@ -391,7 +391,7 @@ INT_PTR CALLBACK DlgProcPopupOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
if (opt.ShowPreviousStatus) {
wchar_t buff[MAX_STATUSTEXT];
- mir_snwprintf(buff, TranslateTS(STRING_SHOWPREVIOUSSTATUS), StatusList[Index(i)].lpzStandardText);
+ mir_snwprintf(buff, TranslateW(STRING_SHOWPREVIOUSSTATUS), StatusList[Index(i)].lpzStandardText);
mir_wstrcat(str, L" ");
mir_wstrcat(str, buff);
}
@@ -557,12 +557,12 @@ INT_PTR CALLBACK DlgProcXPopupOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
EnableWindow(GetDlgItem(hwndDlg, IDC_ED_TREMOVEMSG), templates.PopupXFlags & NOTIFY_REMOVE_MESSAGE);
// Buttons
- SendDlgItemMessage(hwndDlg, IDC_BT_VARIABLES, BUTTONADDTOOLTIP, (WPARAM)LPGENW("Show available variables"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_BT_VARIABLES, BUTTONADDTOOLTIP, (WPARAM)LPGENW("Show available variables"), BATF_UNICODE);
HICON hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_VARIABLES));
SendDlgItemMessage(hwndDlg, IDC_BT_VARIABLES, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon);
DestroyIcon(hIcon);
- SendDlgItemMessage(hwndDlg, IDC_BT_RESET, BUTTONADDTOOLTIP, (WPARAM)LPGENW("Reset all templates to default"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_BT_RESET, BUTTONADDTOOLTIP, (WPARAM)LPGENW("Reset all templates to default"), BATF_UNICODE);
hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_RESET));
SendDlgItemMessage(hwndDlg, IDC_BT_RESET, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon);
DestroyIcon(hIcon);
@@ -691,12 +691,12 @@ INT_PTR CALLBACK DlgProcSMPopupOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
EnableWindow(GetDlgItem(hwndDlg, IDC_ED_TSMSGREMOVE), templates.PopupSMsgFlags & NOTIFY_REMOVE_MESSAGE);
// Buttons
- SendDlgItemMessage(hwndDlg, IDC_BT_VARIABLES, BUTTONADDTOOLTIP, (WPARAM)LPGENW("Show available variables"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_BT_VARIABLES, BUTTONADDTOOLTIP, (WPARAM)LPGENW("Show available variables"), BATF_UNICODE);
HICON hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_VARIABLES));
SendDlgItemMessage(hwndDlg, IDC_BT_VARIABLES, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon);
DestroyIcon(hIcon);
- SendDlgItemMessage(hwndDlg, IDC_BT_RESET, BUTTONADDTOOLTIP, (WPARAM)LPGENW("Reset all templates to default"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_BT_RESET, BUTTONADDTOOLTIP, (WPARAM)LPGENW("Reset all templates to default"), BATF_UNICODE);
hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_RESET));
SendDlgItemMessage(hwndDlg, IDC_BT_RESET, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon);
DestroyIcon(hIcon);
@@ -730,7 +730,7 @@ INT_PTR CALLBACK DlgProcSMPopupOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
DBVARIANT dbVar = { 0 };
char protoname[MAX_PATH] = { 0 };
mir_snprintf(protoname, "%s_TPopupSMsgChanged", protos[i]->szModuleName);
- if (db_get_ts(NULL, MODULE, protoname, &dbVar))
+ if (db_get_ws(NULL, MODULE, protoname, &dbVar))
wcsncpy(prototemplate->ProtoTemplateMsg, DEFAULT_POPUP_SMSGCHANGED, _countof(prototemplate->ProtoTemplateMsg));
else {
wcsncpy(prototemplate->ProtoTemplateMsg, dbVar.ptszVal, _countof(prototemplate->ProtoTemplateMsg));
@@ -738,7 +738,7 @@ INT_PTR CALLBACK DlgProcSMPopupOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
}
mir_snprintf(protoname, "%s_TPopupSMsgRemoved", protos[i]->szModuleName);
- if (db_get_ts(NULL, MODULE, protoname, &dbVar))
+ if (db_get_ws(NULL, MODULE, protoname, &dbVar))
wcsncpy(prototemplate->ProtoTemplateRemoved, DEFAULT_POPUP_SMSGREMOVED, _countof(prototemplate->ProtoTemplateRemoved));
else {
wcsncpy(prototemplate->ProtoTemplateRemoved, dbVar.ptszVal, _countof(prototemplate->ProtoTemplateRemoved));
@@ -915,12 +915,12 @@ INT_PTR CALLBACK DlgProcXLogOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
SetDlgItemText(hwndDlg, IDC_ED_TXSTATUSOPENING, templates.LogXstatusOpening);
// Buttons
- SendDlgItemMessage(hwndDlg, IDC_BT_VARIABLES, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Show available variables"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_BT_VARIABLES, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Show available variables"), BATF_UNICODE);
HICON hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_VARIABLES));
SendDlgItemMessage(hwndDlg, IDC_BT_VARIABLES, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon);
DestroyIcon(hIcon);
- SendDlgItemMessage(hwndDlg, IDC_BT_RESET, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Reset all templates to default"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_BT_RESET, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Reset all templates to default"), BATF_UNICODE);
hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_RESET));
SendDlgItemMessage(hwndDlg, IDC_BT_RESET, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon);
DestroyIcon(hIcon);
@@ -1082,12 +1082,12 @@ INT_PTR CALLBACK DlgProcLogOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
SetDlgItemText(hwndDlg, IDC_LOG_TSMSGOPENING, templates.LogSMsgOpening);
// Buttons
- SendDlgItemMessage(hwndDlg, IDC_BT_VARIABLES, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Show available variables"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_BT_VARIABLES, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Show available variables"), BATF_UNICODE);
HICON hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_VARIABLES));
SendDlgItemMessage(hwndDlg, IDC_BT_VARIABLES, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon);
DestroyIcon(hIcon);
- SendDlgItemMessage(hwndDlg, IDC_BT_RESET, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Reset all templates to default"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_BT_RESET, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Reset all templates to default"), BATF_UNICODE);
hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_RESET));
SendDlgItemMessage(hwndDlg, IDC_BT_RESET, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon);
DestroyIcon(hIcon);
diff --git a/plugins/NewXstatusNotify/src/popup.cpp b/plugins/NewXstatusNotify/src/popup.cpp
index 2f7e702036..fe70659bfa 100644
--- a/plugins/NewXstatusNotify/src/popup.cpp
+++ b/plugins/NewXstatusNotify/src/popup.cpp
@@ -26,11 +26,11 @@ void ShowChangePopup(MCONTACT hContact, HICON hIcon, WORD newStatus, const wchar
POPUPDATAT ppd = { 0 };
ppd.lchContact = hContact;
ppd.lchIcon = hIcon;
- CMString buf(pcli->pfnGetContactDisplayName(hContact, 0));
+ CMStringW buf(pcli->pfnGetContactDisplayName(hContact, 0));
// add group name to popup title
if (opt.ShowGroup) {
- ptrW tszGroup(db_get_tsa(hContact, "CList", "Group"));
+ ptrW tszGroup(db_get_wsa(hContact, "CList", "Group"));
if (tszGroup)
buf.AppendFormat(L" (%s)", tszGroup);
}
@@ -77,7 +77,7 @@ static int AwayMsgHook(WPARAM, LPARAM lParam, LPARAM pObj)
return 0;
MCONTACT hContact = PUGetContact(pdp->hWnd);
- ptrW pstzLast(db_get_tsa(hContact, MODULE, "LastPopupText"));
+ ptrW pstzLast(db_get_wsa(hContact, MODULE, "LastPopupText"));
wchar_t *tszStatus = (wchar_t *)ack->lParam;
if (tszStatus == NULL || *tszStatus == 0)
@@ -117,7 +117,7 @@ void PopupAction(HWND hWnd, BYTE action)
if (hContact && hContact != INVALID_CONTACT_ID) {
switch (action) {
case PCA_OPENMESSAGEWND:
- CallServiceSync(MS_MSG_SENDMESSAGET, hContact, 0);
+ CallServiceSync(MS_MSG_SENDMESSAGEW, hContact, 0);
break;
case PCA_OPENMENU:
diff --git a/plugins/NewXstatusNotify/src/utils.cpp b/plugins/NewXstatusNotify/src/utils.cpp
index f06b12914c..88a457b780 100644
--- a/plugins/NewXstatusNotify/src/utils.cpp
+++ b/plugins/NewXstatusNotify/src/utils.cpp
@@ -44,7 +44,7 @@ bool CheckMsgWnd(MCONTACT hContact)
int DBGetStringDefault(MCONTACT hContact, const char *szModule, const char *szSetting, wchar_t *setting, int size, const wchar_t *defaultValue)
{
DBVARIANT dbv;
- if (!db_get_ts(hContact, szModule, szSetting, &dbv)) {
+ if (!db_get_ws(hContact, szModule, szSetting, &dbv)) {
wcsncpy(setting, dbv.ptszVal, size);
db_free(&dbv);
return 0;
@@ -92,12 +92,12 @@ void LogToFile(wchar_t *stzText)
}
}
-void AddCR(CMString &str, const wchar_t *stzText)
+void AddCR(CMStringW &str, const wchar_t *stzText)
{
if (stzText == NULL)
return;
- CMString res(stzText);
+ CMStringW res(stzText);
res.Replace(L"\n", L"\r\n");
res.Replace(L"\r\r\n", L"\r\n");
str.Append(res);
diff --git a/plugins/NewXstatusNotify/src/utils.h b/plugins/NewXstatusNotify/src/utils.h
index bdc32806fb..03f2105a87 100644
--- a/plugins/NewXstatusNotify/src/utils.h
+++ b/plugins/NewXstatusNotify/src/utils.h
@@ -27,6 +27,6 @@ int DBGetStringDefault(MCONTACT hContact, const char *szModule, const char *szSe
void ShowLog(wchar_t *file);
BOOL StatusHasAwayMessage(char *szProto, int status);
void LogToFile(wchar_t *stzText);
-void AddCR(CMString &str, const wchar_t *statusmsg);
+void AddCR(CMStringW &str, const wchar_t *statusmsg);
#endif
diff --git a/plugins/NewXstatusNotify/src/xstatus.cpp b/plugins/NewXstatusNotify/src/xstatus.cpp
index ec650d1775..42a705852d 100644
--- a/plugins/NewXstatusNotify/src/xstatus.cpp
+++ b/plugins/NewXstatusNotify/src/xstatus.cpp
@@ -90,13 +90,13 @@ wchar_t* GetStatusTypeAsString(int type, wchar_t *buff)
}
}
-CMString ReplaceVars(XSTATUSCHANGE *xsc, const wchar_t *tmplt)
+CMStringW ReplaceVars(XSTATUSCHANGE *xsc, const wchar_t *tmplt)
{
if (xsc == NULL || tmplt == NULL || tmplt[0] == '\0')
- return CMString();
+ return CMStringW();
size_t len = mir_wstrlen(tmplt);
- CMString res;
+ CMStringW res;
for (size_t i = 0; i < len; i++) {
if (tmplt[i] == '%') {
@@ -288,7 +288,7 @@ void LogChangeToDB(XSTATUSCHANGE *xsc)
}
wchar_t stzLastLog[2 * MAX_TEXT_LEN];
- CMString stzLogText(ReplaceVars(xsc, Template));
+ CMStringW stzLogText(ReplaceVars(xsc, Template));
DBGetStringDefault(xsc->hContact, MODULE, DB_LASTLOG, stzLastLog, _countof(stzLastLog), L"");
if (opt.XLogToDB) {
@@ -416,11 +416,11 @@ wchar_t* GetDefaultXstatusName(int statusID, char *szProto, wchar_t *buff, int b
CUSTOM_STATUS xstatus = { 0 };
xstatus.cbSize = sizeof(CUSTOM_STATUS);
- xstatus.flags = CSSF_MASK_NAME | CSSF_DEFAULT_NAME | CSSF_TCHAR;
+ xstatus.flags = CSSF_MASK_NAME | CSSF_DEFAULT_NAME | CSSF_UNICODE;
xstatus.ptszName = nameBuff;
xstatus.wParam = (WPARAM*)&statusID;
if (!CallProtoService(szProto, PS_GETCUSTOMSTATUSEX, 0, (LPARAM)&xstatus))
- wcsncpy_s(buff, bufflen, TranslateTS(nameBuff), _TRUNCATE);
+ wcsncpy_s(buff, bufflen, TranslateW(nameBuff), _TRUNCATE);
return buff;
}
@@ -432,7 +432,7 @@ wchar_t* GetIcqXStatus(MCONTACT hContact, char *szProto, char *szValue, wchar_t
int statusID = db_get_b(hContact, szProto, "XStatusId", -1);
if (statusID != -1) {
- if (!db_get_ts(hContact, szProto, szValue, &dbv)) {
+ if (!db_get_ws(hContact, szProto, szValue, &dbv)) {
if ((mir_strcmp(szValue, "XStatusName") == 0) && dbv.ptszVal[0] == 0)
GetDefaultXstatusName(statusID, szProto, buff, bufflen);
else
@@ -453,7 +453,7 @@ wchar_t* GetJabberAdvStatusText(MCONTACT hContact, char *szProto, char *szSlot,
buff[0] = 0;
mir_snprintf(szSetting, "%s/%s/%s", szProto, szSlot, szValue);
- if (!db_get_ts(hContact, "AdvStatus", szSetting, &dbv)) {
+ if (!db_get_ws(hContact, "AdvStatus", szSetting, &dbv)) {
wcsncpy(buff, dbv.ptszVal, bufflen);
buff[bufflen - 1] = 0;
db_free(&dbv);
@@ -511,7 +511,7 @@ void AddSMsgEventThread(void *arg)
if (smi.proto == NULL)
return;
- smi.newstatusmsg = db_get_tsa(smi.hContact, "CList", "StatusMsg");
+ smi.newstatusmsg = db_get_wsa(smi.hContact, "CList", "StatusMsg");
LogSMsgToDB(&smi, templates.LogSMsgOpening);
mir_free(smi.newstatusmsg);
}
diff --git a/plugins/New_GPG/src/init.cpp b/plugins/New_GPG/src/init.cpp
index a2dee64295..e62d46c7f5 100644
--- a/plugins/New_GPG/src/init.cpp
+++ b/plugins/New_GPG/src/init.cpp
@@ -184,7 +184,7 @@ extern "C" int __declspec(dllexport) Load()
SET_UID(mi, 0xbd22e3f8, 0xc19c, 0x45a8, 0xb7, 0x37, 0x6b, 0x3b, 0x27, 0xf0, 0x8c, 0xbb);
mi.position = -0x7FFFFFFF;
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
mi.hIcolibItem = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
mi.name.w = LPGENW("Load GPG public key");
mi.pszService = "/LoadPubKey";
diff --git a/plugins/New_GPG/src/main.cpp b/plugins/New_GPG/src/main.cpp
index bc7c4764ac..a28f21294c 100755
--- a/plugins/New_GPG/src/main.cpp
+++ b/plugins/New_GPG/src/main.cpp
@@ -307,8 +307,8 @@ static INT_PTR CALLBACK DlgProcFirstRun(HWND hwndDlg, UINT uMsg, WPARAM wParam,
GetDlgItemTextA(hwndDlg, IDC_ACCOUNT, buf, _countof(buf));
if (!mir_strcmp(buf, Translate("Default"))) {
db_set_s(NULL, szGPGModuleName, "GPGPubKey", out.c_str());
- db_set_ts(NULL, szGPGModuleName, "KeyMainName", name);
- db_set_ts(NULL, szGPGModuleName, "KeyID", fp);
+ db_set_ws(NULL, szGPGModuleName, "KeyMainName", name);
+ db_set_ws(NULL, szGPGModuleName, "KeyID", fp);
}
else {
std::string acc_str = buf;
@@ -316,10 +316,10 @@ static INT_PTR CALLBACK DlgProcFirstRun(HWND hwndDlg, UINT uMsg, WPARAM wParam,
db_set_s(NULL, szGPGModuleName, acc_str.c_str(), out.c_str());
acc_str = buf;
acc_str += "_KeyMainName";
- db_set_ts(NULL, szGPGModuleName, acc_str.c_str(), name);
+ db_set_ws(NULL, szGPGModuleName, acc_str.c_str(), name);
acc_str = buf;
acc_str += "_KeyID";
- db_set_ts(NULL, szGPGModuleName, acc_str.c_str(), fp);
+ db_set_ws(NULL, szGPGModuleName, acc_str.c_str(), fp);
}
if (!mir_strcmp(buf, Translate("Default"))) {
wstring keyinfo = TranslateT("Default private key ID");
@@ -337,7 +337,7 @@ static INT_PTR CALLBACK DlgProcFirstRun(HWND hwndDlg, UINT uMsg, WPARAM wParam,
dbsetting += keyid;
mir_free(keyid);
dbsetting += "_Password";
- db_set_ts(NULL, szGPGModuleName, dbsetting.c_str(), passwd);
+ db_set_ws(NULL, szGPGModuleName, dbsetting.c_str(), passwd);
}
delete[] name;
}
@@ -592,7 +592,7 @@ static INT_PTR CALLBACK DlgProcFirstRun(HWND hwndDlg, UINT uMsg, WPARAM wParam,
GetDlgItemTextA(hwndDlg, IDC_ACCOUNT, buf, _countof(buf));
if (!mir_strcmp(buf, Translate("Default"))) {
db_set_s(NULL, szGPGModuleName, "GPGPubKey", out.c_str());
- db_set_ts(NULL, szGPGModuleName, "KeyID", fp);
+ db_set_ws(NULL, szGPGModuleName, "KeyID", fp);
}
else {
std::string acc_str = buf;
@@ -600,7 +600,7 @@ static INT_PTR CALLBACK DlgProcFirstRun(HWND hwndDlg, UINT uMsg, WPARAM wParam,
db_set_s(NULL, szGPGModuleName, acc_str.c_str(), out.c_str());
acc_str = buf;
acc_str += "_KeyID";
- db_set_ts(NULL, szGPGModuleName, acc_str.c_str(), fp);
+ db_set_ws(NULL, szGPGModuleName, acc_str.c_str(), fp);
}
}
extern HWND hwndCurKey_p;
@@ -825,7 +825,7 @@ static INT_PTR CALLBACK DlgProcGpgBinOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
SetDlgItemText(hwndDlg, IDC_BIN_PATH, tmp);
if (gpg_exists/* && lang_exists*/) {
- db_set_ts(NULL, szGPGModuleName, "szGpgBinPath", tmp);
+ db_set_ws(NULL, szGPGModuleName, "szGpgBinPath", tmp);
string out;
DWORD code;
std::vector<wstring> cmd;
@@ -938,7 +938,7 @@ static INT_PTR CALLBACK DlgProcGpgBinOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
}
{
bool bad_version = false;
- db_set_ts(NULL, szGPGModuleName, "szGpgBinPath", tmp);
+ db_set_ws(NULL, szGPGModuleName, "szGpgBinPath", tmp);
string out;
DWORD code;
std::vector<wstring> cmd;
@@ -965,7 +965,7 @@ static INT_PTR CALLBACK DlgProcGpgBinOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
if (bad_version)
MessageBox(0, TranslateT("Unsupported GnuPG version found, use at you own risk!\nIt is recommended that you use GnuPG v1.x.x with this plugin."), TranslateT("Warning"), MB_OK);
}
- db_set_ts(NULL, szGPGModuleName, "szGpgBinPath", tmp);
+ db_set_ws(NULL, szGPGModuleName, "szGpgBinPath", tmp);
GetDlgItemText(hwndDlg, IDC_HOME_DIR, tmp, _countof(tmp));
while (tmp[mir_wstrlen(tmp) - 1] == '\\')
tmp[mir_wstrlen(tmp) - 1] = '\0';
@@ -973,7 +973,7 @@ static INT_PTR CALLBACK DlgProcGpgBinOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
MessageBox(0, TranslateT("Please set keyring's home directory"), TranslateT("Warning"), MB_OK);
break;
}
- db_set_ts(NULL, szGPGModuleName, "szHomePath", tmp);
+ db_set_ws(NULL, szGPGModuleName, "szHomePath", tmp);
{
wchar_t *path = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", L"");
DWORD dwFileAttr = GetFileAttributes(path);
@@ -1009,7 +1009,7 @@ static INT_PTR CALLBACK DlgProcGpgBinOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
}
{
bool bad_version = false;
- db_set_ts(NULL, szGPGModuleName, "szGpgBinPath", tmp);
+ db_set_ws(NULL, szGPGModuleName, "szGpgBinPath", tmp);
string out;
DWORD code;
std::vector<wstring> cmd;
@@ -1036,7 +1036,7 @@ static INT_PTR CALLBACK DlgProcGpgBinOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
if (bad_version)
MessageBox(0, TranslateT("Unsupported GnuPG version found, use at you own risk!\nIt is recommended that you use GnuPG v1.x.x with this plugin."), TranslateT("Warning"), MB_OK);
}
- db_set_ts(NULL, szGPGModuleName, "szGpgBinPath", tmp);
+ db_set_ws(NULL, szGPGModuleName, "szGpgBinPath", tmp);
GetDlgItemText(hwndDlg, IDC_HOME_DIR, tmp, _countof(tmp));
while (tmp[mir_wstrlen(tmp) - 1] == '\\')
tmp[mir_wstrlen(tmp) - 1] = '\0';
@@ -1044,7 +1044,7 @@ static INT_PTR CALLBACK DlgProcGpgBinOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
MessageBox(0, TranslateT("Please set keyring's home directory"), TranslateT("Warning"), MB_OK);
break;
}
- db_set_ts(NULL, szGPGModuleName, "szHomePath", tmp);
+ db_set_ws(NULL, szGPGModuleName, "szHomePath", tmp);
{
wchar_t *path = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", L"");
DWORD dwFileAttr = GetFileAttributes(path);
@@ -1139,7 +1139,7 @@ static INT_PTR CALLBACK DlgProcGpgBinOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
out.erase(s, 1);
}
db_set_s(NULL, szGPGModuleName, "GPGPubKey", out.c_str());
- db_set_ts(NULL, szGPGModuleName, "KeyID", path.c_str());
+ db_set_ws(NULL, szGPGModuleName, "KeyID", path.c_str());
extern HWND hwndCurKey_p;
SetWindowText(hwndCurKey_p, path.c_str());
}
@@ -1876,9 +1876,9 @@ void InitCheck()
{
// parse gpg output
wchar_t *current_home = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", L"");
- db_set_ts(NULL, szGPGModuleName, "szHomePath", L""); //we do not need home for gpg binary validation
+ db_set_ws(NULL, szGPGModuleName, "szHomePath", L""); //we do not need home for gpg binary validation
gpg_valid = isGPGValid();
- db_set_ts(NULL, szGPGModuleName, "szHomePath", current_home); //return current home dir back
+ db_set_ws(NULL, szGPGModuleName, "szHomePath", current_home); //return current home dir back
mir_free(current_home);
bool home_dir_access = false, temp_access = false;
wchar_t *home_dir = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", L"");
@@ -2124,12 +2124,12 @@ void ImportKey()
for (int i = 0; i < count; i++) {
MCONTACT hcnt = db_mc_getSub(hContact, i);
if (hcnt)
- db_set_ts(hcnt, szGPGModuleName, "GPGPubKey", new_key.c_str());
+ db_set_ws(hcnt, szGPGModuleName, "GPGPubKey", new_key.c_str());
}
}
- else db_set_ts(metaGetMostOnline(hContact), szGPGModuleName, "GPGPubKey", new_key.c_str());
+ else db_set_ws(metaGetMostOnline(hContact), szGPGModuleName, "GPGPubKey", new_key.c_str());
}
- else db_set_ts(hContact, szGPGModuleName, "GPGPubKey", new_key.c_str());
+ else db_set_ws(hContact, szGPGModuleName, "GPGPubKey", new_key.c_str());
new_key.clear();
diff --git a/plugins/New_GPG/src/messages.cpp b/plugins/New_GPG/src/messages.cpp
index 89e77e782c..dc4f95277b 100755
--- a/plugins/New_GPG/src/messages.cpp
+++ b/plugins/New_GPG/src/messages.cpp
@@ -419,7 +419,7 @@ INT_PTR RecvMsgSvc(WPARAM w, LPARAM l)
if (bDebugLog)
debuglog << std::string(time_str() + ": info(autoexchange): found pubkey block:" + toUTF8(pcli->pfnGetContactDisplayName(ccs->hContact, 0)));
s2 += mir_wstrlen(L"-----END PGP PUBLIC KEY BLOCK-----");
- db_set_ts(ccs->hContact, szGPGModuleName, "GPGPubKey", str.substr(s1, s2 - s1).c_str());
+ db_set_ws(ccs->hContact, szGPGModuleName, "GPGPubKey", str.substr(s1, s2 - s1).c_str());
{ //gpg execute block
std::vector<wstring> cmd;
wchar_t tmp2[MAX_PATH] = { 0 };
@@ -1034,9 +1034,9 @@ static INT_PTR CALLBACK DlgProcKeyPassword(HWND hwndDlg, UINT msg, WPARAM wParam
string dbsetting = "szKey_";
dbsetting += inkeyid;
dbsetting += "_Password";
- db_set_ts(NULL, szGPGModuleName, dbsetting.c_str(), tmp);
+ db_set_ws(NULL, szGPGModuleName, dbsetting.c_str(), tmp);
}
- else db_set_ts(NULL, szGPGModuleName, "szKeyPassword", tmp);
+ else db_set_ws(NULL, szGPGModuleName, "szKeyPassword", tmp);
}
if (password)
mir_free(password);
diff --git a/plugins/New_GPG/src/options.cpp b/plugins/New_GPG/src/options.cpp
index 5a7592f833..4baaa264b1 100755
--- a/plugins/New_GPG/src/options.cpp
+++ b/plugins/New_GPG/src/options.cpp
@@ -46,7 +46,7 @@ int GpgOptInit(WPARAM wParam, LPARAM)
odp.pwszTitle = _T(szGPGModuleName);
odp.pwszGroup = LPGENW("Services");
odp.pwszTab = LPGENW("Main");
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
odp.pfnDlgProc = DlgProcGpgOpts;
Options_AddPage(wParam, &odp);
@@ -399,7 +399,7 @@ static INT_PTR CALLBACK DlgProcGpgOpts(HWND hwndDlg, UINT uMsg, WPARAM wParam, L
{
wchar_t tmp[512];
GetDlgItemText(hwndDlg, IDC_LOG_FILE_EDIT, tmp, _countof(tmp));
- db_set_ts(NULL, szGPGModuleName, "szLogFilePath", tmp);
+ db_set_ws(NULL, szGPGModuleName, "szLogFilePath", tmp);
}
return TRUE;
}
@@ -433,7 +433,7 @@ static INT_PTR CALLBACK DlgProcGpgBinOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
if (gpg_exists) {
bool bad_version = false;
wchar_t *tmp_path = UniGetContactSettingUtf(NULL, szGPGModuleName, "szGpgBinPath", L"");
- db_set_ts(NULL, szGPGModuleName, "szGpgBinPath", tmp);
+ db_set_ws(NULL, szGPGModuleName, "szGpgBinPath", tmp);
string out;
DWORD code;
std::vector<wstring> cmd;
@@ -447,7 +447,7 @@ static INT_PTR CALLBACK DlgProcGpgBinOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
gpg_valid = true;
gpg_launcher(params);
gpg_valid = old_gpg_state;
- db_set_ts(NULL, szGPGModuleName, "szGpgBinPath", tmp_path);
+ db_set_ws(NULL, szGPGModuleName, "szGpgBinPath", tmp_path);
mir_free(tmp_path);
string::size_type p1 = out.find("(GnuPG) ");
if (p1 != string::npos) {
@@ -505,11 +505,11 @@ static INT_PTR CALLBACK DlgProcGpgBinOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
case PSN_APPLY:
wchar_t tmp[512];
GetDlgItemText(hwndDlg, IDC_BIN_PATH, tmp, _countof(tmp));
- db_set_ts(NULL, szGPGModuleName, "szGpgBinPath", tmp);
+ db_set_ws(NULL, szGPGModuleName, "szGpgBinPath", tmp);
GetDlgItemText(hwndDlg, IDC_HOME_DIR, tmp, _countof(tmp));
while (tmp[mir_wstrlen(tmp) - 1] == '\\')
tmp[mir_wstrlen(tmp) - 1] = '\0';
- db_set_ts(NULL, szGPGModuleName, "szHomePath", tmp);
+ db_set_ws(NULL, szGPGModuleName, "szHomePath", tmp);
return TRUE;
}
break;
@@ -567,22 +567,22 @@ static INT_PTR CALLBACK DlgProcGpgMsgOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
{
wchar_t tmp[128];
GetDlgItemText(hwndDlg, IDC_IN_OPEN_TAG, tmp, _countof(tmp));
- db_set_ts(NULL, szGPGModuleName, "szInOpenTag", tmp);
+ db_set_ws(NULL, szGPGModuleName, "szInOpenTag", tmp);
mir_free(inopentag);
inopentag = (wchar_t*)mir_alloc(sizeof(wchar_t)* (mir_wstrlen(tmp) + 1));
mir_wstrcpy(inopentag, tmp);
GetDlgItemText(hwndDlg, IDC_IN_CLOSE_TAG, tmp, _countof(tmp));
- db_set_ts(NULL, szGPGModuleName, "szInCloseTag", tmp);
+ db_set_ws(NULL, szGPGModuleName, "szInCloseTag", tmp);
mir_free(inclosetag);
inclosetag = (wchar_t*)mir_alloc(sizeof(wchar_t)* (mir_wstrlen(tmp) + 1));
mir_wstrcpy(inclosetag, tmp);
GetDlgItemText(hwndDlg, IDC_OUT_OPEN_TAG, tmp, _countof(tmp));
- db_set_ts(NULL, szGPGModuleName, "szOutOpenTag", tmp);
+ db_set_ws(NULL, szGPGModuleName, "szOutOpenTag", tmp);
mir_free(outopentag);
outopentag = (wchar_t*)mir_alloc(sizeof(wchar_t)* (mir_wstrlen(tmp) + 1));
mir_wstrcpy(outopentag, tmp);
GetDlgItemText(hwndDlg, IDC_OUT_CLOSE_TAG, tmp, _countof(tmp));
- db_set_ts(NULL, szGPGModuleName, "szOutCloseTag", tmp);
+ db_set_ws(NULL, szGPGModuleName, "szOutCloseTag", tmp);
mir_free(outclosetag);
outclosetag = (wchar_t*)mir_alloc(sizeof(wchar_t)*(mir_wstrlen(tmp) + 1));
mir_wstrcpy(outclosetag, tmp);
@@ -783,12 +783,12 @@ static INT_PTR CALLBACK DlgProcLoadPublicKey(HWND hwndDlg, UINT uMsg, WPARAM wPa
for (int i = 0; i < count; i++) {
MCONTACT hcnt = db_mc_getSub(hContact, i);
if (hcnt)
- db_set_ts(hcnt, szGPGModuleName, "GPGPubKey", key_buf.substr(ws1, ws2 - ws1).c_str());
+ db_set_ws(hcnt, szGPGModuleName, "GPGPubKey", key_buf.substr(ws1, ws2 - ws1).c_str());
}
}
- else db_set_ts(metaGetMostOnline(hContact), szGPGModuleName, "GPGPubKey", key_buf.substr(ws1, ws2 - ws1).c_str());
+ else db_set_ws(metaGetMostOnline(hContact), szGPGModuleName, "GPGPubKey", key_buf.substr(ws1, ws2 - ws1).c_str());
}
- else db_set_ts(hContact, szGPGModuleName, "GPGPubKey", key_buf.substr(ws1, ws2 - ws1).c_str());
+ else db_set_ws(hContact, szGPGModuleName, "GPGPubKey", key_buf.substr(ws1, ws2 - ws1).c_str());
}
tmp = (wchar_t*)mir_alloc(sizeof(wchar_t) * (key_buf.length() + 1));
mir_wstrcpy(tmp, key_buf.substr(ws1, ws2 - ws1).c_str());
diff --git a/plugins/New_GPG/src/utilities.cpp b/plugins/New_GPG/src/utilities.cpp
index a0359340a9..466c7f6a14 100755
--- a/plugins/New_GPG/src/utilities.cpp
+++ b/plugins/New_GPG/src/utilities.cpp
@@ -28,7 +28,7 @@ wchar_t* __stdcall UniGetContactSettingUtf(MCONTACT hContact, const char *szModu
{
DBVARIANT dbv = { DBVT_DELETED };
wchar_t* szRes = NULL;
- if (db_get_ts(hContact, szModule, szSetting, &dbv))
+ if (db_get_ws(hContact, szModule, szSetting, &dbv))
return mir_wstrdup(szDef);
else if (dbv.pszVal)
szRes = mir_wstrdup(dbv.ptszVal);
@@ -77,7 +77,7 @@ void GetFilePath(wchar_t *WindowTittle, char *szSetting, wchar_t *szExt, wchar_t
ofn.nMaxFileTitle = MAX_PATH;
if (!GetOpenFileName(&ofn))
return;
- db_set_ts(0, szGPGModuleName, szSetting, str);
+ db_set_ws(0, szGPGModuleName, szSetting, str);
}
wchar_t *GetFilePath(wchar_t *WindowTittle, wchar_t *szExt, wchar_t *szExtDesc, bool save_file)
@@ -124,7 +124,7 @@ void GetFolderPath(wchar_t *WindowTittle, char*)
if (pidl != 0) {
wchar_t path[MAX_PATH];
if (SHGetPathFromIDList(pidl, path)) {
- db_set_ts(NULL, szGPGModuleName, "szHomePath", path);
+ db_set_ws(NULL, szGPGModuleName, "szHomePath", path);
}
IMalloc * imalloc = 0;
if (SUCCEEDED(SHGetMalloc(&imalloc))) {
@@ -1034,7 +1034,7 @@ bool isGPGValid()
}
if (gpg_exists) {
- db_set_ts(NULL, szGPGModuleName, "szGpgBinPath", tmp);
+ db_set_ws(NULL, szGPGModuleName, "szGpgBinPath", tmp);
mir_free(tmp);
tmp = NULL;
string out;
@@ -1705,7 +1705,7 @@ INT_PTR ImportGpGKeys(WPARAM, LPARAM)
}
}
db_set_b(hContact, szGPGModuleName, "GPGEncryption", 1);
- db_set_ts(hContact, szGPGModuleName, "GPGPubKey", toUTF16(key).c_str());
+ db_set_ws(hContact, szGPGModuleName, "GPGPubKey", toUTF16(key).c_str());
}
boost::filesystem::remove(path);
break;
diff --git a/plugins/NewsAggregator/Src/Authentication.cpp b/plugins/NewsAggregator/Src/Authentication.cpp
index 8b587f8779..62cd91361f 100644
--- a/plugins/NewsAggregator/Src/Authentication.cpp
+++ b/plugins/NewsAggregator/Src/Authentication.cpp
@@ -23,8 +23,8 @@ void CreateAuthString(char *auth, MCONTACT hContact, HWND hwndDlg)
{
wchar_t *tlogin = NULL, *tpass = NULL;
if (hContact && db_get_b(hContact, MODULE, "UseAuth", 0)) {
- tlogin = db_get_tsa(hContact, MODULE, "Login");
- tpass = db_get_tsa(hContact, MODULE, "Password");
+ tlogin = db_get_wsa(hContact, MODULE, "Login");
+ tpass = db_get_wsa(hContact, MODULE, "Password");
}
else if (hwndDlg && IsDlgButtonChecked(hwndDlg, IDC_USEAUTH)) {
wchar_t buf[MAX_PATH] = {0};
@@ -64,13 +64,13 @@ INT_PTR CALLBACK AuthenticationProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
}
}
else if (SelItem.hContact) {
- wchar_t *ptszNick = db_get_tsa(SelItem.hContact, MODULE, "Nick");
+ wchar_t *ptszNick = db_get_wsa(SelItem.hContact, MODULE, "Nick");
if (ptszNick) {
SetDlgItemText(hwndDlg, IDC_FEEDNAME, ptszNick);
mir_free(ptszNick);
}
else {
- wchar_t *ptszURL = db_get_tsa(SelItem.hContact, MODULE, "URL");
+ wchar_t *ptszURL = db_get_wsa(SelItem.hContact, MODULE, "URL");
if (ptszURL) {
SetDlgItemText(hwndDlg, IDC_FEEDNAME, ptszURL);
mir_free(ptszURL);
@@ -104,7 +104,7 @@ INT_PTR CALLBACK AuthenticationProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
}
else if (SelItem.hContact) {
db_set_b(SelItem.hContact, MODULE, "UseAuth", 1);
- db_set_ts(SelItem.hContact, MODULE, "Login", username);
+ db_set_ws(SelItem.hContact, MODULE, "Login", username);
db_set_s(SelItem.hContact, MODULE, "Password", passw);
}
EndDialog(hwndDlg, IDOK);
diff --git a/plugins/NewsAggregator/Src/CheckFeed.cpp b/plugins/NewsAggregator/Src/CheckFeed.cpp
index 8586d20477..96d80c6298 100644
--- a/plugins/NewsAggregator/Src/CheckFeed.cpp
+++ b/plugins/NewsAggregator/Src/CheckFeed.cpp
@@ -98,9 +98,9 @@ LPCTSTR CheckFeed(wchar_t *tszURL, HWND hwndDlg)
return NULL;
}
-static void XmlToMsg(MCONTACT hContact, CMString &title, CMString &link, CMString &descr, CMString &author, CMString &comments, CMString &guid, CMString &category, time_t stamp)
+static void XmlToMsg(MCONTACT hContact, CMStringW &title, CMStringW &link, CMStringW &descr, CMStringW &author, CMStringW &comments, CMStringW &guid, CMStringW &category, time_t stamp)
{
- CMString message = db_get_tsa(hContact, MODULE, "MsgFormat");
+ CMStringW message = db_get_wsa(hContact, MODULE, "MsgFormat");
if (!message)
message = TAGSDEFAULT;
@@ -183,7 +183,7 @@ void CheckCurrentFeed(MCONTACT hContact)
if (!db_get_b(hContact, MODULE, "CheckState", 1) != 0)
return;
- wchar_t *szURL = db_get_tsa(hContact, MODULE, "URL");
+ wchar_t *szURL = db_get_wsa(hContact, MODULE, "URL");
if (szURL == NULL)
return;
@@ -202,7 +202,7 @@ void CheckCurrentFeed(MCONTACT hContact)
mir_free(tszData);
mir_free(szData);
- CMString szValue;
+ CMStringW szValue;
if (hXml != NULL) {
LPCTSTR codepage = NULL;
int childcount = 0;
@@ -230,13 +230,13 @@ void CheckCurrentFeed(MCONTACT hContact)
if (!mir_wstrcmpi(szAttrName, L"version")) {
wchar_t ver[MAX_PATH];
mir_snwprintf(ver, L"RSS %s", xmlGetAttrValue(node, szAttrName));
- db_set_ts(hContact, MODULE, "MirVer", ver);
+ db_set_ws(hContact, MODULE, "MirVer", ver);
break;
}
}
}
else if (isAtom)
- db_set_ts(hContact, MODULE, "MirVer", L"RSS 1.0");
+ db_set_ws(hContact, MODULE, "MirVer", L"RSS 1.0");
HXML chan = xmlGetChild(node, 0);
for (int j = 0; j < xmlGetChildCount(chan); j++) {
@@ -252,7 +252,7 @@ void CheckCurrentFeed(MCONTACT hContact)
else
szChildText = xmlGetText(child);
if (szChildText)
- db_set_ts(hContact, MODULE, "FirstName", ClearText(szValue, szChildText));
+ db_set_ws(hContact, MODULE, "FirstName", ClearText(szValue, szChildText));
}
else if (!mir_wstrcmpi(childName, L"link")) {
LPCTSTR szChildText = NULL;
@@ -264,7 +264,7 @@ void CheckCurrentFeed(MCONTACT hContact)
else
szChildText = xmlGetText(child);
if (szChildText)
- db_set_ts(hContact, MODULE, "Homepage", ClearText(szValue, szChildText));
+ db_set_ws(hContact, MODULE, "Homepage", ClearText(szValue, szChildText));
}
else if (!mir_wstrcmpi(childName, L"description")) {
LPCTSTR szChildText = NULL;
@@ -277,8 +277,8 @@ void CheckCurrentFeed(MCONTACT hContact)
szChildText = xmlGetText(child);
if (szChildText) {
ClearText(szValue, szChildText);
- db_set_ts(hContact, MODULE, "About", szValue);
- db_set_ts(hContact, "CList", "StatusMsg", szValue);
+ db_set_ws(hContact, MODULE, "About", szValue);
+ db_set_ws(hContact, "CList", "StatusMsg", szValue);
}
}
else if (!mir_wstrcmpi(childName, L"language")) {
@@ -291,7 +291,7 @@ void CheckCurrentFeed(MCONTACT hContact)
else
szChildText = xmlGetText(child);
if (szChildText)
- db_set_ts(hContact, MODULE, "Language1", ClearText(szValue, szChildText));
+ db_set_ws(hContact, MODULE, "Language1", ClearText(szValue, szChildText));
}
else if (!mir_wstrcmpi(childName, L"managingEditor")) {
LPCTSTR szChildText = NULL;
@@ -303,7 +303,7 @@ void CheckCurrentFeed(MCONTACT hContact)
else
szChildText = xmlGetText(child);
if (szChildText)
- db_set_ts(hContact, MODULE, "e-mail", ClearText(szValue, szChildText));
+ db_set_ws(hContact, MODULE, "e-mail", ClearText(szValue, szChildText));
}
else if (!mir_wstrcmpi(childName, L"category")) {
LPCTSTR szChildText = NULL;
@@ -315,7 +315,7 @@ void CheckCurrentFeed(MCONTACT hContact)
else
szChildText = xmlGetText(child);
if (szChildText)
- db_set_ts(hContact, MODULE, "Interest0Text", ClearText(szValue, szChildText));
+ db_set_ws(hContact, MODULE, "Interest0Text", ClearText(szValue, szChildText));
}
else if (!mir_wstrcmpi(childName, L"copyright")) {
LPCTSTR szChildText = NULL;
@@ -334,22 +334,22 @@ void CheckCurrentFeed(MCONTACT hContact)
HXML imageval = xmlGetChild(child, x);
if (!mir_wstrcmpi(xmlGetName(imageval), L"url")) {
LPCTSTR url = xmlGetText(imageval);
- db_set_ts(hContact, MODULE, "ImageURL", url);
+ db_set_ws(hContact, MODULE, "ImageURL", url);
PROTO_AVATAR_INFORMATION ai = { 0 };
ai.hContact = hContact;
- wchar_t *szNick = db_get_tsa(hContact, MODULE, "Nick");
+ wchar_t *szNick = db_get_wsa(hContact, MODULE, "Nick");
if (szNick) {
wchar_t *ext = wcsrchr((wchar_t *)url, '.') + 1;
ai.format = ProtoGetAvatarFormat(url);
- CMString filename = szNick;
+ CMStringW filename = szNick;
filename.Replace(L"/", L"_");
mir_snwprintf(ai.filename, L"%s\\%s.%s", tszRoot, filename.c_str(), ext);
- CreateDirectoryTreeT(tszRoot);
+ CreateDirectoryTreeW(tszRoot);
if (DownloadFile(url, ai.filename)) {
- db_set_ts(hContact, MODULE, "ImagePath", ai.filename);
+ db_set_ws(hContact, MODULE, "ImagePath", ai.filename);
ProtoBroadcastAck(MODULE, hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, (HANDLE)&ai, NULL);
}
else ProtoBroadcastAck(MODULE, hContact, ACKTYPE_AVATAR, ACKRESULT_FAILED, (HANDLE)&ai, NULL);
@@ -380,7 +380,7 @@ void CheckCurrentFeed(MCONTACT hContact)
}
}
else if (!mir_wstrcmpi(childName, L"item")) {
- CMString title, link, descr, author, comments, guid, category;
+ CMStringW title, link, descr, author, comments, guid, category;
time_t stamp = 0;
for (int z = 0; z < xmlGetChildCount(child); z++) {
HXML itemval = xmlGetChild(child, z);
@@ -426,14 +426,14 @@ void CheckCurrentFeed(MCONTACT hContact)
}
}
else if (!mir_wstrcmpi(szNodeName, L"feed")) {
- db_set_ts(hContact, MODULE, "MirVer", L"Atom 3");
+ db_set_ws(hContact, MODULE, "MirVer", L"Atom 3");
for (int j = 0; j < xmlGetChildCount(node); j++) {
HXML child = xmlGetChild(node, j);
LPCTSTR szChildName = xmlGetName(child);
if (!mir_wstrcmpi(szChildName, L"title")) {
LPCTSTR szChildText = xmlGetText(child);
if (szChildText)
- db_set_ts(hContact, MODULE, "FirstName", ClearText(szValue, szChildText));
+ db_set_ws(hContact, MODULE, "FirstName", ClearText(szValue, szChildText));
}
else if (!mir_wstrcmpi(szChildName, L"link")) {
for (int x = 0; x < xmlGetAttrCount(child); x++) {
@@ -442,27 +442,27 @@ void CheckCurrentFeed(MCONTACT hContact)
break;
if (!mir_wstrcmpi(xmlGetAttrName(child, x), L"href"))
- db_set_ts(hContact, MODULE, "Homepage", xmlGetAttrValue(child, xmlGetAttrName(child, x)));
+ db_set_ws(hContact, MODULE, "Homepage", xmlGetAttrValue(child, xmlGetAttrName(child, x)));
}
}
else if (!mir_wstrcmpi(szChildName, L"subtitle")) {
LPCTSTR szChildText = xmlGetText(child);
if (szChildText) {
ClearText(szValue, szChildText);
- db_set_ts(hContact, MODULE, "About", szValue);
- db_set_ts(hContact, "CList", "StatusMsg", szValue);
+ db_set_ws(hContact, MODULE, "About", szValue);
+ db_set_ws(hContact, "CList", "StatusMsg", szValue);
}
}
else if (!mir_wstrcmpi(szChildName, L"language")) {
LPCTSTR szChildText = xmlGetText(child);
if (szChildText)
- db_set_ts(hContact, MODULE, "Language1", ClearText(szValue, szChildText));
+ db_set_ws(hContact, MODULE, "Language1", ClearText(szValue, szChildText));
}
else if (!mir_wstrcmpi(szChildName, L"author")) {
for (int x = 0; x < xmlGetChildCount(child); x++) {
HXML authorval = xmlGetChild(child, x);
if (!mir_wstrcmpi(xmlGetName(authorval), L"email")) {
- db_set_ts(hContact, MODULE, "e-mail", xmlGetText(authorval));
+ db_set_ws(hContact, MODULE, "e-mail", xmlGetText(authorval));
break;
}
}
@@ -470,16 +470,16 @@ void CheckCurrentFeed(MCONTACT hContact)
else if (!mir_wstrcmpi(szChildName, L"category")) {
LPCTSTR szChildText = xmlGetText(child);
if (szChildText)
- db_set_ts(hContact, MODULE, "Interest0Text", ClearText(szValue, szChildText));
+ db_set_ws(hContact, MODULE, "Interest0Text", ClearText(szValue, szChildText));
}
else if (!mir_wstrcmpi(szChildName, L"icon")) {
for (int x = 0; x < xmlGetChildCount(child); x++) {
HXML imageval = xmlGetChild(child, x);
if (!mir_wstrcmpi(xmlGetName(imageval), L"url")) {
LPCTSTR url = xmlGetText(imageval);
- db_set_ts(hContact, MODULE, "ImageURL", url);
+ db_set_ws(hContact, MODULE, "ImageURL", url);
- ptrW szNick(db_get_tsa(hContact, MODULE, "Nick"));
+ ptrW szNick(db_get_wsa(hContact, MODULE, "Nick"));
if (szNick) {
PROTO_AVATAR_INFORMATION ai = { 0 };
ai.hContact = hContact;
@@ -489,7 +489,7 @@ void CheckCurrentFeed(MCONTACT hContact)
wchar_t *filename = szNick;
mir_snwprintf(ai.filename, L"%s\\%s.%s", tszRoot, filename, ext);
if (DownloadFile(url, ai.filename)) {
- db_set_ts(hContact, MODULE, "ImagePath", ai.filename);
+ db_set_ws(hContact, MODULE, "ImagePath", ai.filename);
ProtoBroadcastAck(MODULE, hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, (HANDLE)&ai, NULL);
}
else ProtoBroadcastAck(MODULE, hContact, ACKTYPE_AVATAR, ACKRESULT_FAILED, (HANDLE)&ai, NULL);
@@ -513,7 +513,7 @@ void CheckCurrentFeed(MCONTACT hContact)
}
}
else if (!mir_wstrcmpi(szChildName, L"entry")) {
- CMString title, link, descr, author, comments, guid, category;
+ CMStringW title, link, descr, author, comments, guid, category;
time_t stamp = 0;
for (int z = 0; z < xmlGetChildCount(child); z++) {
HXML itemval = xmlGetChild(child, z);
@@ -587,7 +587,7 @@ void CheckCurrentFeedAvatar(MCONTACT hContact)
if (!db_get_b(hContact, MODULE, "CheckState", 1))
return;
- wchar_t *szURL = db_get_tsa(hContact, MODULE, "URL");
+ wchar_t *szURL = db_get_wsa(hContact, MODULE, "URL");
if (szURL == NULL)
return;
@@ -621,12 +621,12 @@ void CheckCurrentFeedAvatar(MCONTACT hContact)
HXML imageval = xmlGetChild(child, x);
if (!mir_wstrcmpi(xmlGetName(imageval), L"url")) {
LPCTSTR url = xmlGetText(imageval);
- db_set_ts(hContact, MODULE, "ImageURL", url);
+ db_set_ws(hContact, MODULE, "ImageURL", url);
PROTO_AVATAR_INFORMATION ai = { 0 };
ai.hContact = hContact;
- wchar_t *szNick = db_get_tsa(hContact, MODULE, "Nick");
+ wchar_t *szNick = db_get_wsa(hContact, MODULE, "Nick");
if (szNick) {
wchar_t *ext = wcsrchr((wchar_t *)url, '.') + 1;
ai.format = ProtoGetAvatarFormat(ext);
@@ -634,7 +634,7 @@ void CheckCurrentFeedAvatar(MCONTACT hContact)
wchar_t *filename = szNick;
mir_snwprintf(ai.filename, L"%s\\%s.%s", tszRoot, filename, ext);
if (DownloadFile(url, ai.filename)) {
- db_set_ts(hContact, MODULE, "ImagePath", ai.filename);
+ db_set_ws(hContact, MODULE, "ImagePath", ai.filename);
ProtoBroadcastAck(MODULE, hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, (HANDLE)&ai, NULL);
}
else ProtoBroadcastAck(MODULE, hContact, ACKTYPE_AVATAR, ACKRESULT_FAILED, (HANDLE)&ai, NULL);
@@ -654,9 +654,9 @@ void CheckCurrentFeedAvatar(MCONTACT hContact)
HXML imageval = xmlGetChild(child, x);
if (!mir_wstrcmpi(xmlGetName(imageval), L"url")) {
LPCTSTR url = xmlGetText(imageval);
- db_set_ts(hContact, MODULE, "ImageURL", url);
+ db_set_ws(hContact, MODULE, "ImageURL", url);
- ptrW szNick(db_get_tsa(hContact, MODULE, "Nick"));
+ ptrW szNick(db_get_wsa(hContact, MODULE, "Nick"));
if (szNick) {
PROTO_AVATAR_INFORMATION ai = { 0 };
ai.hContact = hContact;
@@ -667,7 +667,7 @@ void CheckCurrentFeedAvatar(MCONTACT hContact)
wchar_t *filename = szNick;
mir_snwprintf(ai.filename, L"%s\\%s.%s", tszRoot, filename, ext);
if (DownloadFile(url, ai.filename)) {
- db_set_ts(hContact, MODULE, "ImagePath", ai.filename);
+ db_set_ws(hContact, MODULE, "ImagePath", ai.filename);
ProtoBroadcastAck(MODULE, hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, (HANDLE)&ai, NULL);
}
else ProtoBroadcastAck(MODULE, hContact, ACKTYPE_AVATAR, ACKRESULT_FAILED, (HANDLE)&ai, NULL);
diff --git a/plugins/NewsAggregator/Src/ExportImport.cpp b/plugins/NewsAggregator/Src/ExportImport.cpp
index e1a5b18e85..03a553b9d9 100644
--- a/plugins/NewsAggregator/Src/ExportImport.cpp
+++ b/plugins/NewsAggregator/Src/ExportImport.cpp
@@ -151,15 +151,15 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
MCONTACT hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
Proto_AddToContact(hContact, MODULE);
- db_set_ts(hContact, MODULE, "Nick", text);
- db_set_ts(hContact, MODULE, "URL", url);
- db_set_ts(hContact, MODULE, "Homepage", siteurl);
+ db_set_ws(hContact, MODULE, "Nick", text);
+ db_set_ws(hContact, MODULE, "URL", url);
+ db_set_ws(hContact, MODULE, "Homepage", siteurl);
db_set_b(hContact, MODULE, "CheckState", 1);
db_set_dw(hContact, MODULE, "UpdateTime", DEFAULT_UPDATE_TIME);
- db_set_ts(hContact, MODULE, "MsgFormat", TAGSDEFAULT);
+ db_set_ws(hContact, MODULE, "MsgFormat", TAGSDEFAULT);
db_set_w(hContact, MODULE, "Status", CallProtoService(MODULE, PS_GETSTATUS, 0, 0));
if (ptszGroup) {
- db_set_ts(hContact, "CList", "Group", ptszGroup);
+ db_set_ws(hContact, "CList", "Group", ptszGroup);
Clist_GroupCreate(0, ptszGroup);
}
if (isGroupUTF)
@@ -209,7 +209,7 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
case IDC_BROWSEIMPORTFILE:
{
wchar_t FileName[MAX_PATH];
- VARST tszMirDir(L"%miranda_path%");
+ VARSW tszMirDir(L"%miranda_path%");
OPENFILENAME ofn = {0};
ofn.lStructSize = sizeof(ofn);
@@ -452,7 +452,7 @@ INT_PTR CALLBACK DlgProcExportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
TranslateDialogDefault(hwndDlg);
Utils_RestoreWindowPositionNoSize(hwndDlg, NULL, MODULE, "ExportDlg");
for (MCONTACT hContact = db_find_first(MODULE); hContact; hContact = db_find_next(hContact, MODULE)) {
- wchar_t *message = db_get_tsa(hContact, MODULE, "Nick");
+ wchar_t *message = db_get_wsa(hContact, MODULE, "Nick");
if (message != NULL) {
SendMessage(FeedsList, LB_ADDSTRING, 0, (LPARAM)message);
mir_free(message);
@@ -472,7 +472,7 @@ INT_PTR CALLBACK DlgProcExportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
case IDOK:
{
wchar_t FileName[MAX_PATH];
- VARST tszMirDir(L"%miranda_path%");
+ VARSW tszMirDir(L"%miranda_path%");
OPENFILENAME ofn = {0};
ofn.lStructSize = sizeof(ofn);
@@ -501,10 +501,10 @@ INT_PTR CALLBACK DlgProcExportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
SendMessage(FeedsExportList, LB_GETTEXT, (WPARAM)i, (LPARAM)item);
MCONTACT hContact = GetContactByNick(item);
wchar_t
- *title = db_get_tsa(hContact, MODULE, "Nick"),
- *url = db_get_tsa(hContact, MODULE, "URL"),
- *siteurl = db_get_tsa(hContact, MODULE, "Homepage"),
- *group = db_get_tsa(hContact, "CList", "Group");
+ *title = db_get_wsa(hContact, MODULE, "Nick"),
+ *url = db_get_wsa(hContact, MODULE, "URL"),
+ *siteurl = db_get_wsa(hContact, MODULE, "Homepage"),
+ *group = db_get_wsa(hContact, "CList", "Group");
HXML elem = header;
if (group)
diff --git a/plugins/NewsAggregator/Src/Menus.cpp b/plugins/NewsAggregator/Src/Menus.cpp
index 44aaf21532..76cb73248a 100644
--- a/plugins/NewsAggregator/Src/Menus.cpp
+++ b/plugins/NewsAggregator/Src/Menus.cpp
@@ -24,7 +24,7 @@ HGENMENU hService2[7];
void InitMenu()
{
CMenuItem mi;
- mi.flags = CMIF_TCHAR | CMIF_NOTOFFLINE;
+ mi.flags = CMIF_UNICODE | CMIF_NOTOFFLINE;
mi.root = Menu_CreateRoot(MO_MAIN, LPGENW("News Aggregator"), 500099000);
Menu_ConfigureItem(mi.root, MCI_OPT_UID, "D9733E4F-1946-4390-8EB3-591E8687222E");
diff --git a/plugins/NewsAggregator/Src/NewsAggregator.cpp b/plugins/NewsAggregator/Src/NewsAggregator.cpp
index 8d040fdcc0..329b921a95 100644
--- a/plugins/NewsAggregator/Src/NewsAggregator.cpp
+++ b/plugins/NewsAggregator/Src/NewsAggregator.cpp
@@ -90,10 +90,10 @@ extern "C" __declspec(dllexport) int Load(void)
CreateServiceFunction(MS_NEWSAGGREGATOR_ENABLED, EnableDisable);
HOTKEYDESC hkd = { sizeof(hkd) };
- hkd.dwFlags = HKD_TCHAR;
+ hkd.dwFlags = HKD_UNICODE;
hkd.pszName = "NewsAggregator/CheckAllFeeds";
- hkd.ptszDescription = LPGENW("Check All Feeds");
- hkd.ptszSection = LPGENW("News Aggregator");
+ hkd.pwszDescription = LPGENW("Check All Feeds");
+ hkd.pwszSection = LPGENW("News Aggregator");
hkd.pszService = MS_NEWSAGGREGATOR_CHECKALLFEEDS;
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL+HKCOMB_A, 'O') | HKF_MIRANDA_LOCAL;
Hotkey_Register(&hkd);
diff --git a/plugins/NewsAggregator/Src/Options.cpp b/plugins/NewsAggregator/Src/Options.cpp
index fb3deb5320..5079444792 100644
--- a/plugins/NewsAggregator/Src/Options.cpp
+++ b/plugins/NewsAggregator/Src/Options.cpp
@@ -56,20 +56,20 @@ INT_PTR CALLBACK DlgProcAddFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
MCONTACT hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
Proto_AddToContact(hContact, MODULE);
GetDlgItemText(hwndDlg, IDC_FEEDTITLE, str, _countof(str));
- db_set_ts(hContact, MODULE, "Nick", str);
+ db_set_ws(hContact, MODULE, "Nick", str);
HWND hwndList = (HWND)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
GetDlgItemText(hwndDlg, IDC_FEEDURL, str, _countof(str));
- db_set_ts(hContact, MODULE, "URL", str);
+ db_set_ws(hContact, MODULE, "URL", str);
db_set_b(hContact, MODULE, "CheckState", 1);
db_set_dw(hContact, MODULE, "UpdateTime", (DWORD)GetDlgItemInt(hwndDlg, IDC_CHECKTIME, NULL, false));
GetDlgItemText(hwndDlg, IDC_TAGSEDIT, str, _countof(str));
- db_set_ts(hContact, MODULE, "MsgFormat", str);
+ db_set_ws(hContact, MODULE, "MsgFormat", str);
db_set_w(hContact, MODULE, "Status", CallProtoService(MODULE, PS_GETSTATUS, 0, 0));
if (IsDlgButtonChecked(hwndDlg, IDC_USEAUTH)) {
db_set_b(hContact, MODULE, "UseAuth", 1);
GetDlgItemText(hwndDlg, IDC_LOGIN, str, _countof(str));
- db_set_ts(hContact, MODULE, "Login", str);
+ db_set_ws(hContact, MODULE, "Login", str);
GetDlgItemTextA(hwndDlg, IDC_PASSWORD, passw, _countof(passw));
db_set_s(hContact, MODULE, "Password", passw);
}
@@ -152,11 +152,11 @@ INT_PTR CALLBACK DlgProcChangeFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP
SendDlgItemMessage(hwndDlg, IDC_TIMEOUT_VALUE_SPIN, UDM_SETRANGE32, 0, 999);
for (MCONTACT hContact = db_find_first(MODULE); hContact; hContact = db_find_next(hContact, MODULE)) {
- ptrW dbNick(db_get_tsa(hContact, MODULE, "Nick"));
+ ptrW dbNick(db_get_wsa(hContact, MODULE, "Nick"));
if ((dbNick == NULL) || (mir_wstrcmp(dbNick, SelItem.nick) != 0))
continue;
- ptrW dbURL(db_get_tsa(hContact, MODULE, "URL"));
+ ptrW dbURL(db_get_wsa(hContact, MODULE, "URL"));
if ((dbURL == NULL) || (mir_wstrcmp(dbURL, SelItem.url) != 0))
continue;
@@ -167,7 +167,7 @@ INT_PTR CALLBACK DlgProcChangeFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP
SetDlgItemText(hwndDlg, IDC_FEEDTITLE, SelItem.nick);
SetDlgItemInt(hwndDlg, IDC_CHECKTIME, db_get_dw(hContact, MODULE, "UpdateTime", DEFAULT_UPDATE_TIME), TRUE);
- wchar_t *szMsgFormat = db_get_tsa(hContact, MODULE, "MsgFormat");
+ wchar_t *szMsgFormat = db_get_wsa(hContact, MODULE, "MsgFormat");
if (szMsgFormat) {
SetDlgItemText(hwndDlg, IDC_TAGSEDIT, szMsgFormat);
mir_free(szMsgFormat);
@@ -177,7 +177,7 @@ INT_PTR CALLBACK DlgProcChangeFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP
EnableWindow(GetDlgItem(hwndDlg, IDC_LOGIN), TRUE);
EnableWindow(GetDlgItem(hwndDlg, IDC_PASSWORD), TRUE);
- wchar_t *szLogin = db_get_tsa(hContact, MODULE, "Login");
+ wchar_t *szLogin = db_get_wsa(hContact, MODULE, "Login");
if (szLogin) {
SetDlgItemText(hwndDlg, IDC_LOGIN, szLogin);
mir_free(szLogin);
@@ -213,17 +213,17 @@ INT_PTR CALLBACK DlgProcChangeFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP
}
GetDlgItemText(hwndDlg, IDC_FEEDURL, str, _countof(str));
- db_set_ts(SelItem->hContact, MODULE, "URL", str);
+ db_set_ws(SelItem->hContact, MODULE, "URL", str);
GetDlgItemText(hwndDlg, IDC_FEEDTITLE, str, _countof(str));
- db_set_ts(SelItem->hContact, MODULE, "Nick", str);
+ db_set_ws(SelItem->hContact, MODULE, "Nick", str);
db_set_dw(SelItem->hContact, MODULE, "UpdateTime", (DWORD)GetDlgItemInt(hwndDlg, IDC_CHECKTIME, NULL, false));
GetDlgItemText(hwndDlg, IDC_TAGSEDIT, str, _countof(str));
- db_set_ts(SelItem->hContact, MODULE, "MsgFormat", str);
+ db_set_ws(SelItem->hContact, MODULE, "MsgFormat", str);
if (IsDlgButtonChecked(hwndDlg, IDC_USEAUTH)) {
db_set_b(SelItem->hContact, MODULE, "UseAuth", 1);
GetDlgItemText(hwndDlg, IDC_LOGIN, str, _countof(str));
- db_set_ts(SelItem->hContact, MODULE, "Login", str);
+ db_set_ws(SelItem->hContact, MODULE, "Login", str);
GetDlgItemTextA(hwndDlg, IDC_PASSWORD, passw, _countof(passw));
db_set_s(SelItem->hContact, MODULE, "Password", passw);
@@ -314,13 +314,13 @@ INT_PTR CALLBACK DlgProcChangeFeedMenu(HWND hwndDlg, UINT msg, WPARAM wParam, LP
WindowList_Add(hChangeFeedDlgList, hwndDlg, hContact);
Utils_RestoreWindowPositionNoSize(hwndDlg, hContact, MODULE, "ChangeDlg");
- wchar_t *ptszNick = db_get_tsa(hContact, MODULE, "Nick");
+ wchar_t *ptszNick = db_get_wsa(hContact, MODULE, "Nick");
if (ptszNick) {
SetDlgItemText(hwndDlg, IDC_FEEDTITLE, ptszNick);
mir_free(ptszNick);
}
- wchar_t *ptszURL = db_get_tsa(hContact, MODULE, "URL");
+ wchar_t *ptszURL = db_get_wsa(hContact, MODULE, "URL");
if (ptszNick) {
SetDlgItemText(hwndDlg, IDC_FEEDURL, ptszURL);
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)lParam);
@@ -329,7 +329,7 @@ INT_PTR CALLBACK DlgProcChangeFeedMenu(HWND hwndDlg, UINT msg, WPARAM wParam, LP
SetDlgItemInt(hwndDlg, IDC_CHECKTIME, db_get_dw(hContact, MODULE, "UpdateTime", DEFAULT_UPDATE_TIME), TRUE);
- wchar_t *ptszMsgFormat = db_get_tsa(hContact, MODULE, "MsgFormat");
+ wchar_t *ptszMsgFormat = db_get_wsa(hContact, MODULE, "MsgFormat");
if (ptszMsgFormat) {
SetDlgItemText(hwndDlg, IDC_TAGSEDIT, ptszMsgFormat);
mir_free(ptszMsgFormat);
@@ -339,7 +339,7 @@ INT_PTR CALLBACK DlgProcChangeFeedMenu(HWND hwndDlg, UINT msg, WPARAM wParam, LP
CheckDlgButton(hwndDlg, IDC_USEAUTH, BST_CHECKED);
EnableWindow(GetDlgItem(hwndDlg, IDC_LOGIN), TRUE);
EnableWindow(GetDlgItem(hwndDlg, IDC_PASSWORD), TRUE);
- wchar_t *ptszLogin = db_get_tsa(hContact, MODULE, "Login");
+ wchar_t *ptszLogin = db_get_wsa(hContact, MODULE, "Login");
if (ptszLogin) {
SetDlgItemText(hwndDlg, IDC_LOGIN, ptszLogin);
mir_free(ptszLogin);
@@ -371,17 +371,17 @@ INT_PTR CALLBACK DlgProcChangeFeedMenu(HWND hwndDlg, UINT msg, WPARAM wParam, LP
}
GetDlgItemText(hwndDlg, IDC_FEEDURL, str, _countof(str));
- db_set_ts(hContact, MODULE, "URL", str);
+ db_set_ws(hContact, MODULE, "URL", str);
GetDlgItemText(hwndDlg, IDC_FEEDTITLE, str, _countof(str));
- db_set_ts(hContact, MODULE, "Nick", str);
+ db_set_ws(hContact, MODULE, "Nick", str);
db_set_dw(hContact, MODULE, "UpdateTime", (DWORD)GetDlgItemInt(hwndDlg, IDC_CHECKTIME, NULL, false));
GetDlgItemText(hwndDlg, IDC_TAGSEDIT, str, _countof(str));
- db_set_ts(hContact, MODULE, "MsgFormat", str);
+ db_set_ws(hContact, MODULE, "MsgFormat", str);
if (IsDlgButtonChecked(hwndDlg, IDC_USEAUTH)) {
db_set_b(hContact, MODULE, "UseAuth", 1);
GetDlgItemText(hwndDlg, IDC_LOGIN, str, _countof(str));
- db_set_ts(hContact, MODULE, "Login", str);
+ db_set_ws(hContact, MODULE, "Login", str);
GetDlgItemTextA(hwndDlg, IDC_PASSWORD, passw, _countof(passw));
db_set_s(hContact, MODULE, "Password", passw);
@@ -498,13 +498,13 @@ INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
ListView_GetItemText(hwndList, sel, 1, url, _countof(url));
for (MCONTACT hContact = db_find_first(MODULE); hContact; hContact = db_find_next(hContact, MODULE)) {
- ptrW dbNick(db_get_tsa(hContact, MODULE, "Nick"));
+ ptrW dbNick(db_get_wsa(hContact, MODULE, "Nick"));
if (dbNick == NULL)
break;
if (mir_wstrcmp(dbNick, nick))
continue;
- ptrW dbURL(db_get_tsa(hContact, MODULE, "URL"));
+ ptrW dbURL(db_get_wsa(hContact, MODULE, "URL"));
if (dbURL == NULL)
break;
if (mir_wstrcmp(dbURL, url))
diff --git a/plugins/NewsAggregator/Src/Services.cpp b/plugins/NewsAggregator/Src/Services.cpp
index 6b613a231d..2ca891def2 100644
--- a/plugins/NewsAggregator/Src/Services.cpp
+++ b/plugins/NewsAggregator/Src/Services.cpp
@@ -40,7 +40,7 @@ int NewsAggrInit(WPARAM, LPARAM)
if (hNewsAggregatorFolder = FoldersRegisterCustomPathT(LPGEN("Avatars"), LPGEN("News Aggregator"), MIRANDA_USERDATAT L"\\Avatars\\" _A2W(DEFAULT_AVATARS_FOLDER)))
FoldersGetCustomPathT(hNewsAggregatorFolder, tszRoot, MAX_PATH, L"");
else
- mir_wstrncpy(tszRoot, VARST(L"%miranda_userdata%\\Avatars\\" _A2W(DEFAULT_AVATARS_FOLDER)), _countof(tszRoot));
+ mir_wstrncpy(tszRoot, VARSW(L"%miranda_userdata%\\Avatars\\" _A2W(DEFAULT_AVATARS_FOLDER)), _countof(tszRoot));
for (MCONTACT hContact = db_find_first(MODULE); hContact; hContact = db_find_next(hContact, MODULE)) {
if (!db_get_b(NULL, MODULE, "StartupRetrieve", 1))
@@ -211,7 +211,7 @@ INT_PTR NewsAggrGetAvatarInfo(WPARAM wParam, LPARAM lParam)
if (db_get_b(NULL, MODULE, "AutoUpdate", 1) != 0 && !ThreadRunning)
mir_forkthread(UpdateThreadProc, (void *)TRUE);
- wchar_t *ptszImageURL = db_get_tsa(pai->hContact, MODULE, "ImageURL");
+ wchar_t *ptszImageURL = db_get_wsa(pai->hContact, MODULE, "ImageURL");
if(ptszImageURL == NULL)
return GAIR_NOAVATAR;
diff --git a/plugins/NewsAggregator/Src/Utils.cpp b/plugins/NewsAggregator/Src/Utils.cpp
index 8c6ba7e73b..dc7302c2e3 100644
--- a/plugins/NewsAggregator/Src/Utils.cpp
+++ b/plugins/NewsAggregator/Src/Utils.cpp
@@ -31,7 +31,7 @@ bool IsMyContact(MCONTACT hContact)
void NetlibInit()
{
NETLIBUSER nlu = { sizeof(nlu) };
- nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_HTTPCONNS | NUF_TCHAR; // | NUF_HTTPGATEWAY;
+ nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_HTTPCONNS | NUF_UNICODE; // | NUF_HTTPGATEWAY;
nlu.ptszDescriptiveName = TranslateT("NewsAggregator HTTP connection");
nlu.szSettingsModule = MODULE;
hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu);
@@ -142,14 +142,14 @@ void UpdateList(HWND hwndList)
UpdateListFlag = TRUE;
lvI.mask = LVIF_TEXT;
lvI.iSubItem = 0;
- wchar_t *ptszNick = db_get_tsa(hContact, MODULE, "Nick");
+ wchar_t *ptszNick = db_get_wsa(hContact, MODULE, "Nick");
if (ptszNick) {
lvI.pszText = ptszNick;
lvI.iItem = i;
ListView_InsertItem(hwndList, &lvI);
lvI.iSubItem = 1;
- wchar_t *ptszURL = db_get_tsa(hContact, MODULE, "URL");
+ wchar_t *ptszURL = db_get_wsa(hContact, MODULE, "URL");
if (ptszURL) {
lvI.pszText = ptszURL;
ListView_SetItem(hwndList, &lvI);
@@ -451,7 +451,7 @@ HRESULT TestDocumentText(IHTMLDocument3 *pHtmlDoc, BSTR &message)
return hr;
}
-LPCTSTR ClearText(CMString &result, const wchar_t *message)
+LPCTSTR ClearText(CMStringW &result, const wchar_t *message)
{
BSTR bstrHtml = SysAllocString(message), bstrRes = SysAllocString(L"");
HRESULT hr = TestMarkupServices(bstrHtml, &TestDocumentText, bstrRes);
diff --git a/plugins/NewsAggregator/Src/stdafx.h b/plugins/NewsAggregator/Src/stdafx.h
index 6640bcb4ca..2636e380b0 100644
--- a/plugins/NewsAggregator/Src/stdafx.h
+++ b/plugins/NewsAggregator/Src/stdafx.h
@@ -135,7 +135,7 @@ void CheckCurrentFeedAvatar(MCONTACT hContact);
LPCTSTR CheckFeed(wchar_t* tszURL, HWND hwndDlg);
void UpdateMenu(bool State);
int ImportFeedsDialog();
-LPCTSTR ClearText(CMString &value, const wchar_t *message);
+LPCTSTR ClearText(CMStringW &value, const wchar_t *message);
bool DownloadFile(LPCTSTR tszURL, LPCTSTR tszLocal);
void CreateAuthString(char *auth, MCONTACT hContact, HWND hwndDlg);
INT_PTR CALLBACK AuthenticationProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
diff --git a/plugins/NoHistory/src/dllmain.cpp b/plugins/NoHistory/src/dllmain.cpp
index 20afcf6e2e..b5e4bbfe8d 100644
--- a/plugins/NoHistory/src/dllmain.cpp
+++ b/plugins/NoHistory/src/dllmain.cpp
@@ -246,7 +246,7 @@ int ModulesLoaded(WPARAM, LPARAM)
{
// create contact menu item
CMenuItem mi;
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
SET_UID(mi, 0xede12697, 0x3e9d, 0x47ca, 0x83, 0xe0, 0xc1, 0x40, 0x69, 0xbf, 0x2d, 0xab);
mi.position = -300010;
diff --git a/plugins/NoHistory/src/options.cpp b/plugins/NoHistory/src/options.cpp
index 11f2d04a00..4541ff8ce0 100644
--- a/plugins/NoHistory/src/options.cpp
+++ b/plugins/NoHistory/src/options.cpp
@@ -219,7 +219,7 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
int OptInit(WPARAM wParam, LPARAM)
{
OPTIONSDIALOGPAGE odp = { 0 };
- odp.flags = ODPF_BOLDGROUPS|ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS|ODPF_UNICODE;
odp.position = -790000000;
odp.hInstance = hInst;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT);
diff --git a/plugins/Non-IM Contact/src/contactinfo.cpp b/plugins/Non-IM Contact/src/contactinfo.cpp
index 530463def5..0dc717daef 100644
--- a/plugins/Non-IM Contact/src/contactinfo.cpp
+++ b/plugins/Non-IM Contact/src/contactinfo.cpp
@@ -120,12 +120,12 @@ INT_PTR CALLBACK DlgProcOtherStuff(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
/* link*/
DBVARIANT dbv;
- if (!db_get_ts(hContact, MODNAME, "ProgramString", &dbv)) {
+ if (!db_get_ws(hContact, MODNAME, "ProgramString", &dbv)) {
SetDlgItemText(hwnd, IDC_LINK, dbv.ptszVal);
db_free(&dbv);
}
- if (!db_get_ts(hContact, MODNAME, "ProgramParamsString", &dbv)) {
+ if (!db_get_ws(hContact, MODNAME, "ProgramParamsString", &dbv)) {
SetDlgItemText(hwnd, IDC_PARAMS, dbv.ptszVal);
db_free(&dbv);
}
@@ -135,7 +135,7 @@ INT_PTR CALLBACK DlgProcOtherStuff(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
for (int i = 1; (szGroup = Clist_GroupGetName(i, NULL)) != NULL; i++)
SendDlgItemMessage(hwnd, IDC_GROUP, CB_INSERTSTRING, 0, LPARAM(szGroup));
- if (!db_get_ts(hContact, "CList", "Group", &dbv)) {
+ if (!db_get_ws(hContact, "CList", "Group", &dbv)) {
SetDlgItemText(hwnd, IDC_GROUP, dbv.ptszVal);
db_free(&dbv);
}
@@ -237,7 +237,7 @@ INT_PTR CALLBACK DlgProcOtherStuff(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
wchar_t text[512];
GetDlgItemText(hwnd, IDC_GROUP, text, _countof(text));
Clist_GroupCreate(NULL, text);
- db_set_ts(hContact, "CList", "Group", text);
+ db_set_ws(hContact, "CList", "Group", text);
}
else db_unset(hContact, "CList", "Group");
diff --git a/plugins/Non-IM Contact/src/dialog.cpp b/plugins/Non-IM Contact/src/dialog.cpp
index 243bc3b761..8ead40caf2 100644
--- a/plugins/Non-IM Contact/src/dialog.cpp
+++ b/plugins/Non-IM Contact/src/dialog.cpp
@@ -306,7 +306,7 @@ INT_PTR addContact(WPARAM, LPARAM)
MCONTACT hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
Proto_AddToContact(hContact, MODNAME);
CallService(MS_IGNORE_IGNORE, hContact, IGNOREEVENT_USERONLINE);
- db_set_ts(hContact, MODNAME, "Nick", TranslateT("New Non-IM Contact"));
+ db_set_ws(hContact, MODNAME, "Nick", TranslateT("New Non-IM Contact"));
DoPropertySheet(hContact);
if (db_get_static(hContact, MODNAME, "Name", tmp, _countof(tmp)))
CallService(MS_DB_CONTACT_DELETE, hContact, 0);
diff --git a/plugins/Non-IM Contact/src/http.cpp b/plugins/Non-IM Contact/src/http.cpp
index 912f16eac3..9ffaf1383d 100644
--- a/plugins/Non-IM Contact/src/http.cpp
+++ b/plugins/Non-IM Contact/src/http.cpp
@@ -94,7 +94,7 @@ void NetlibInit()
{
NETLIBUSER nlu = { 0 };
nlu.cbSize = sizeof(nlu);
- nlu.flags = NUF_OUTGOING | NUF_HTTPCONNS | NUF_NOHTTPSOPTION | NUF_TCHAR;
+ nlu.flags = NUF_OUTGOING | NUF_HTTPCONNS | NUF_NOHTTPSOPTION | NUF_UNICODE;
nlu.szSettingsModule = MODNAME;
nlu.ptszDescriptiveName = TranslateT("Non-IM Contacts");
hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu);
diff --git a/plugins/NotesAndReminders/src/hotkeys.cpp b/plugins/NotesAndReminders/src/hotkeys.cpp
index 2e96dd1608..4084e6752b 100644
--- a/plugins/NotesAndReminders/src/hotkeys.cpp
+++ b/plugins/NotesAndReminders/src/hotkeys.cpp
@@ -15,32 +15,32 @@ void RegisterKeyBindings()
memset(&desc, 0, sizeof(desc));
desc.cbSize = sizeof(desc);
- desc.ptszSection = _A2W(SECTIONNAME);
- desc.dwFlags = HKD_TCHAR;
+ desc.pwszSection = _A2W(SECTIONNAME);
+ desc.dwFlags = HKD_UNICODE;
desc.pszName = MODULENAME"/NewNote";
- desc.ptszDescription = LPGENW("New Note");
+ desc.pwszDescription = LPGENW("New Note");
desc.lParam = KB_NEW_NOTE;
desc.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL|HOTKEYF_SHIFT, VK_INSERT);
desc.pszService = MODULENAME"/MenuCommandAddNew";
Hotkey_Register(&desc);
desc.pszName = MODULENAME"/ToggleNotesVis";
- desc.ptszDescription = LPGENW("Toggle Notes Visibility");
+ desc.pwszDescription = LPGENW("Toggle Notes Visibility");
desc.lParam = KB_TOGGLE_NOTES;
desc.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL|HOTKEYF_SHIFT, VK_ADD);
desc.pszService = MODULENAME"/MenuCommandShowHide";
Hotkey_Register(&desc);
desc.pszName = MODULENAME"/BringNotesFront";
- desc.ptszDescription = LPGENW("Bring All Notes to Front");
+ desc.pwszDescription = LPGENW("Bring All Notes to Front");
desc.lParam = KB_TOGGLE_NOTES;
desc.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL|HOTKEYF_SHIFT, VK_HOME);
desc.pszService = MODULENAME"/MenuCommandBringAllFront";
Hotkey_Register(&desc);
desc.pszName = MODULENAME"/NewReminder";
- desc.ptszDescription = LPGENW("New Reminder");
+ desc.pwszDescription = LPGENW("New Reminder");
desc.lParam = KB_NEW_REMINDER;
desc.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL|HOTKEYF_SHIFT, VK_SUBTRACT);
desc.pszService = MODULENAME"/MenuCommandNewReminder";
diff --git a/plugins/NotesAndReminders/src/main.cpp b/plugins/NotesAndReminders/src/main.cpp
index ca2511778d..487a632113 100644
--- a/plugins/NotesAndReminders/src/main.cpp
+++ b/plugins/NotesAndReminders/src/main.cpp
@@ -123,7 +123,7 @@ int OnOptInitialise(WPARAM w, LPARAM L)
odp.pszTitle = SECTIONNAME;
odp.pszGroup = LPGEN("Plugins");
odp.pfnDlgProc = DlgProcOptions;
- odp.flags = ODPF_TCHAR;
+ odp.flags = ODPF_UNICODE;
Options_AddPage(w, &odp);
return 0;
}
@@ -198,7 +198,7 @@ int OnModulesLoaded(WPARAM wparam, LPARAM lparam)
CMenuItem mi;
mi.root = Menu_CreateRoot(MO_MAIN, LPGENW("Notes && Reminders"), 1600000000);
Menu_ConfigureItem(mi.root, MCI_OPT_UID, "A5E140BC-D697-4689-B75B-8ECFB6FE5931");
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
mi.position = 1600000000;
mi.hIcolibItem = iconList[2].hIcolib;
diff --git a/plugins/NotesAndReminders/src/notes.cpp b/plugins/NotesAndReminders/src/notes.cpp
index dc506b5420..0708bbfcaf 100644
--- a/plugins/NotesAndReminders/src/notes.cpp
+++ b/plugins/NotesAndReminders/src/notes.cpp
@@ -1025,10 +1025,10 @@ static BOOL DoContextMenu(HWND AhWnd,WPARAM wParam,LPARAM lParam)
HMENU hFg = GetSubMenu(hSub, FindMenuItem(hSub, "Text Color"));
for (i=0; i<_countof(clrPresets); i++)
- InsertMenu(hBg, i, MF_BYPOSITION|MF_OWNERDRAW, IDM_COLORPRESET_BG+i, TranslateTS(clrPresets[i].szName));
+ InsertMenu(hBg, i, MF_BYPOSITION|MF_OWNERDRAW, IDM_COLORPRESET_BG+i, Translate(clrPresets[i].szName));
for (i=0; i<_countof(clrPresets); i++)
- InsertMenu(hFg, i, MF_BYPOSITION|MF_OWNERDRAW, IDM_COLORPRESET_FG+i, TranslateTS(clrPresets[i].szName));
+ InsertMenu(hFg, i, MF_BYPOSITION|MF_OWNERDRAW, IDM_COLORPRESET_FG+i, Translate(clrPresets[i].szName));
}
TranslateMenu(FhMenu);
@@ -1040,7 +1040,7 @@ static BOOL DoContextMenu(HWND AhWnd,WPARAM wParam,LPARAM lParam)
static void MeasureColorPresetMenuItem(HWND hdlg, LPMEASUREITEMSTRUCT lpMeasureItem, struct ColorPreset *clrPresets)
{
HDC hdc = GetDC(hdlg);
- LPSTR lpsz = TranslateTS(clrPresets->szName);
+ LPSTR lpsz = Translate(clrPresets->szName);
SIZE sz;
GetTextExtentPoint32(hdc, lpsz, (int)mir_strlen(lpsz), &sz);
ReleaseDC(hdlg, hdc);
diff --git a/plugins/NotesAndReminders/src/options.cpp b/plugins/NotesAndReminders/src/options.cpp
index 5095c216f2..fea1ee5f5c 100644
--- a/plugins/NotesAndReminders/src/options.cpp
+++ b/plugins/NotesAndReminders/src/options.cpp
@@ -228,7 +228,7 @@ void RegisterFontServiceFonts()
char szTemp[100];
FontID fontid = { 0 };
- fontid.cbSize = sizeof(FontIDT);
+ fontid.cbSize = sizeof(FontIDW);
strncpy(fontid.group, SECTIONNAME, _countof(fontid.group));
strncpy(fontid.backgroundGroup, SECTIONNAME, _countof(fontid.backgroundGroup));
@@ -254,11 +254,11 @@ void RegisterFontServiceFonts()
strncpy(fontid.deffontsettings.szFace, fontOptionsList[i].szDefFace, _countof(fontid.deffontsettings.szFace));
strncpy(fontid.backgroundName, fontOptionsList[i].szBkgName, _countof(fontid.backgroundName));
- FontRegisterT(&fontid);
+ FontRegister(&fontid);
}
- ColourIDT colorid = { 0 };
- colorid.cbSize = sizeof(ColourIDT);
+ ColourID colorid = { 0 };
+ colorid.cbSize = sizeof(ColourIDW);
strncpy(colorid.group, SECTIONNAME, _countof(colorid.group));
strncpy(colorid.dbSettingsGroup, MODULENAME, _countof(fontid.dbSettingsGroup));
@@ -270,7 +270,7 @@ void RegisterFontServiceFonts()
colorid.defcolour = colourOptionsList[i].defColour;
strncpy(colorid.setting, colourOptionsList[i].szSettingName, _countof(colorid.setting));
- ColourRegisterT(&colorid);
+ ColourRegister(&colorid);
}
hkFontChange = HookEvent(ME_FONT_RELOAD, FS_FontsChanged);
@@ -279,13 +279,13 @@ void RegisterFontServiceFonts()
void LoadNRFont(int i, LOGFONT *lf, COLORREF *colour)
{
- FontIDT fontid = { 0 };
+ FontID fontid = { 0 };
fontid.cbSize = sizeof(fontid);
strncpy(fontid.group, LPGEN(SECTIONNAME), _countof(fontid.group));
strncpy(fontid.name, fontOptionsList[i].szDescr, _countof(fontid.name));
- COLORREF col = CallService(MS_FONT_GETT, (WPARAM)&fontid, (LPARAM)lf);
+ COLORREF col = CallService(MS_FONT_GETW, (WPARAM)&fontid, (LPARAM)lf);
if (colour)
*colour = col;
}
diff --git a/plugins/NotifyAnything/src/main.cpp b/plugins/NotifyAnything/src/main.cpp
index 88e4b16fbf..3e72bf9f3d 100644
--- a/plugins/NotifyAnything/src/main.cpp
+++ b/plugins/NotifyAnything/src/main.cpp
@@ -145,11 +145,11 @@ void registerSound(const std::wstring &name)
SKINSOUNDDESCEX ssd = { 0 };
ssd.cbSize = sizeof(ssd);
- ssd.dwFlags = SSDF_TCHAR;
+ ssd.dwFlags = SSDF_UNICODE;
ssd.pszName = _T2A(id.c_str());
- ssd.ptszSection = LPGENW("Notify Anything");
- ssd.ptszDescription = desc.c_str();
- ssd.ptszDefaultFile = file.c_str();
+ ssd.pwszSection = LPGENW("Notify Anything");
+ ssd.pwszDescription = desc.c_str();
+ ssd.pwszDefaultFile = file.c_str();
Skin_AddSound(&ssd);
}
diff --git a/plugins/NotifyAnything/src/options.cpp b/plugins/NotifyAnything/src/options.cpp
index 0abd9cf948..377be8ac3a 100644
--- a/plugins/NotifyAnything/src/options.cpp
+++ b/plugins/NotifyAnything/src/options.cpp
@@ -66,7 +66,7 @@ INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara
ofn.lpstrFilter = TranslateT("Log (*.log)\0*.log\0Text (*.txt)\0*.txt\0All Files (*.*)\0*.*\0");
ofn.nFilterIndex = 1;
// Use profile directory as default, if path is not specified
- CallService(MS_DB_GETPROFILEPATHT, (WPARAM)MAX_PATH, (LPARAM)szProfileDir);
+ CallService(MS_DB_GETPROFILEPATHW, (WPARAM)MAX_PATH, (LPARAM)szProfileDir);
ofn.lpstrInitialDir = szProfileDir;
ofn.Flags = OFN_PATHMUSTEXIST | OFN_HIDEREADONLY;
ofn.lpstrDefExt = L"log";
@@ -141,8 +141,8 @@ void save_settings()
db_set_b(NULL, PlugName, "use_pcspeaker", g_settings.use_pcspeaker);
db_set_b(NULL, PlugName, "allow_execute", g_settings.allow_execute);
db_set_dw(NULL, PlugName, "port", g_settings.port);
- db_set_ts(NULL, PlugName, "password", g_settings.password.c_str());
- db_set_ts(NULL, PlugName, "log_filename", g_settings.log_filename.c_str());
+ db_set_ws(NULL, PlugName, "password", g_settings.password.c_str());
+ db_set_ws(NULL, PlugName, "log_filename", g_settings.log_filename.c_str());
}
void load_settings()
@@ -156,12 +156,12 @@ void load_settings()
g_settings.port = db_get_dw(NULL, PlugName, "port", 12001);
DBVARIANT dbv;
- if (!db_get_ts(NULL, PlugName, "password", &dbv)) {
+ if (!db_get_ws(NULL, PlugName, "password", &dbv)) {
g_settings.password = dbv.ptszVal;
db_free(&dbv);
}
- if (!db_get_ts(NULL, PlugName, "log_filename", &dbv)) {
+ if (!db_get_ws(NULL, PlugName, "log_filename", &dbv)) {
g_settings.log_filename = dbv.ptszVal;
db_free(&dbv);
}
diff --git a/plugins/Nudge/src/main.cpp b/plugins/Nudge/src/main.cpp
index d87d37e373..f429ba14c2 100644
--- a/plugins/Nudge/src/main.cpp
+++ b/plugins/Nudge/src/main.cpp
@@ -133,7 +133,7 @@ int NudgeReceived(WPARAM hContact, LPARAM lParam)
if (p.shakeClist)
ShakeClist(hContact, lParam);
if (p.openMessageWindow)
- CallService(MS_MSG_SENDMESSAGET, hContact, 0);
+ CallService(MS_MSG_SENDMESSAGEW, hContact, 0);
if (p.shakeChat)
ShakeChat(hContact, lParam);
if (p.autoResend)
@@ -176,7 +176,7 @@ int NudgeReceived(WPARAM hContact, LPARAM lParam)
if (DefaultNudge.shakeClist)
ShakeClist(hContact, lParam);
if (DefaultNudge.openMessageWindow)
- CallService(MS_MSG_SENDMESSAGET, hContact, 0);
+ CallService(MS_MSG_SENDMESSAGEW, hContact, 0);
if (DefaultNudge.shakeChat)
ShakeChat(hContact, lParam);
if (DefaultNudge.autoResend)
@@ -338,7 +338,7 @@ extern "C" int __declspec(dllexport) Load(void)
// Add contact menu entry
CMenuItem mi;
SET_UID(mi, 0xd617db26, 0x22ba, 0x4205, 0x9c, 0x3e, 0x53, 0x10, 0xbc, 0xcf, 0xce, 0x19);
- mi.flags = CMIF_NOTOFFLINE | CMIF_TCHAR;
+ mi.flags = CMIF_NOTOFFLINE | CMIF_UNICODE;
mi.position = -500050004;
mi.hIcolibItem = iconList[0].hIcolib;
mi.name.w = LPGENW("Send &Nudge");
@@ -368,7 +368,7 @@ LRESULT CALLBACK NudgePopupProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPara
{
switch (msg) {
case WM_COMMAND:
- CallService(MS_MSG_SENDMESSAGET, (WPARAM)PUGetContact(hWnd), 0);
+ CallService(MS_MSG_SENDMESSAGEW, (WPARAM)PUGetContact(hWnd), 0);
PUDeletePopup(hWnd);
break;
@@ -393,7 +393,7 @@ void LoadPopupClass()
POPUPCLASS ppc = { sizeof(ppc) };
ppc.flags = PCF_TCHAR;
ppc.pszName = "Nudge";
- ppc.ptszDescription = LPGENW("Show Nudge");
+ ppc.pwszDescription = LPGENW("Show Nudge");
ppc.hIcon = IcoLib_GetIconByHandle(iconList[0].hIcolib);
ppc.colorBack = NULL;
ppc.colorText = NULL;
@@ -418,7 +418,7 @@ int Preview()
if (p.shakeClist)
ShakeClist(0, 0);
if (p.openMessageWindow)
- CallService(MS_MSG_SENDMESSAGET, hContact, NULL);
+ CallService(MS_MSG_SENDMESSAGEW, hContact, NULL);
if (p.shakeChat)
ShakeChat(hContact, (LPARAM)time(NULL));
}
@@ -434,7 +434,7 @@ int Preview()
if (DefaultNudge.shakeClist)
ShakeClist(0, 0);
if (DefaultNudge.openMessageWindow)
- CallService(MS_MSG_SENDMESSAGET, hContact, NULL);
+ CallService(MS_MSG_SENDMESSAGEW, hContact, NULL);
if (DefaultNudge.shakeChat)
ShakeChat(hContact, (LPARAM)time(NULL));
}
@@ -524,7 +524,7 @@ void Nudge_AddAccount(PROTOACCOUNT *proto)
wchar_t soundDesc[MAXMODULELABELLENGTH + 10];
mir_snwprintf(soundDesc, LPGENW("Nudge for %s"), proto->tszAccountName);
- SkinAddNewSoundExT(p->NudgeSoundname, LPGENW("Nudge"), soundDesc);
+ SkinAddNewSoundExW(p->NudgeSoundname, LPGENW("Nudge"), soundDesc);
arNudges.insert(p);
}
diff --git a/plugins/Nudge/src/nudge.cpp b/plugins/Nudge/src/nudge.cpp
index 7c0ac3646b..9dc4476a54 100644
--- a/plugins/Nudge/src/nudge.cpp
+++ b/plugins/Nudge/src/nudge.cpp
@@ -50,9 +50,9 @@ void CNudgeElement::Save(void)
mir_snprintf(SectionName, "%s-statusFlags", ProtocolName);
db_set_dw(NULL, MODULENAME, SectionName, this->statusFlags);
mir_snprintf(SectionName, "%s-recText", ProtocolName);
- db_set_ts(NULL, MODULENAME, SectionName, this->recText);
+ db_set_ws(NULL, MODULENAME, SectionName, this->recText);
mir_snprintf(SectionName, "%s-senText", ProtocolName);
- db_set_ts(NULL, MODULENAME, SectionName, this->senText);
+ db_set_ws(NULL, MODULENAME, SectionName, this->senText);
}
void CNudgeElement::Load(void)
@@ -81,7 +81,7 @@ void CNudgeElement::Load(void)
this->statusFlags = db_get_dw(NULL, MODULENAME, SectionName, 967);
mir_snprintf(SectionName, "%s-recText", ProtocolName);
- if (!db_get_ts(NULL, MODULENAME, SectionName, &dbv)) {
+ if (!db_get_ws(NULL, MODULENAME, SectionName, &dbv)) {
wcsncpy(this->recText, dbv.ptszVal, TEXT_LEN);
if (wcslen(this->recText) < 1)
wcsncpy(this->recText, TranslateT("You received a nudge"), TEXT_LEN);
@@ -90,7 +90,7 @@ void CNudgeElement::Load(void)
else wcsncpy(this->recText, TranslateT("You received a nudge"), TEXT_LEN);
mir_snprintf(SectionName, "%s-senText", ProtocolName);
- if (!db_get_ts(NULL, MODULENAME, SectionName, &dbv)) {
+ if (!db_get_ws(NULL, MODULENAME, SectionName, &dbv)) {
wcsncpy(this->senText, dbv.ptszVal, TEXT_LEN);
if (wcslen(this->senText) < 1)
wcsncpy(this->senText, TranslateT("You sent a nudge"), TEXT_LEN);
diff --git a/plugins/OpenFolder/src/openFolder.cpp b/plugins/OpenFolder/src/openFolder.cpp
index 8c6e7e62ad..5c5e1c7328 100644
--- a/plugins/OpenFolder/src/openFolder.cpp
+++ b/plugins/OpenFolder/src/openFolder.cpp
@@ -89,10 +89,10 @@ extern "C" int __declspec(dllexport) Load()
// hotkeys service (0.8+)
HOTKEYDESC hotkey = { 0 };
hotkey.cbSize = sizeof(hotkey);
- hotkey.dwFlags = HKD_TCHAR;
+ hotkey.dwFlags = HKD_UNICODE;
hotkey.pszName = "Open Folder";
- hotkey.ptszDescription = LPGENW("Open Folder");
- hotkey.ptszSection = LPGENW("Main");
+ hotkey.pwszDescription = LPGENW("Open Folder");
+ hotkey.pwszSection = LPGENW("Main");
hotkey.pszService = MS_OPENFOLDER_OPEN;
hotkey.DefHotKey = MAKEWORD( 'O', HOTKEYF_SHIFT | HOTKEYF_ALT );
Hotkey_Register(&hotkey);
@@ -100,7 +100,7 @@ extern "C" int __declspec(dllexport) Load()
CMenuItem mi;
SET_UID(mi, 0xbba6ad01, 0x755a, 0x4d01, 0x94, 0xee, 0x57, 0x84, 0x18, 0x70, 0x77, 0x4f);
mi.position = 0x7FFFFFFF;
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
mi.hIcolibItem = icon.hIcolib;
mi.name.w = LPGENW("Open Folder");
mi.pszService = MS_OPENFOLDER_OPEN;
diff --git a/plugins/PackUpdater/Src/Events.cpp b/plugins/PackUpdater/Src/Events.cpp
index bc12d5359b..9a196d721e 100644
--- a/plugins/PackUpdater/Src/Events.cpp
+++ b/plugins/PackUpdater/Src/Events.cpp
@@ -27,10 +27,10 @@ int ModulesLoaded(WPARAM, LPARAM)
Silent = true;
HOTKEYDESC hkd = { 0 };
hkd.cbSize = sizeof(hkd);
- hkd.dwFlags = HKD_TCHAR;
+ hkd.dwFlags = HKD_UNICODE;
hkd.pszName = "Check for pack updates";
- hkd.ptszDescription = LPGENW("Check for pack updates");
- hkd.ptszSection = LPGENW("Pack Updater");
+ hkd.pwszDescription = LPGENW("Check for pack updates");
+ hkd.pwszSection = LPGENW("Pack Updater");
hkd.pszService = MODNAME"/CheckUpdates";
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, VK_F10) | HKF_MIRANDA_LOCAL;
hkd.lParam = FALSE;
diff --git a/plugins/PackUpdater/Src/Notifications.cpp b/plugins/PackUpdater/Src/Notifications.cpp
index 9670d9e905..98633872c8 100644
--- a/plugins/PackUpdater/Src/Notifications.cpp
+++ b/plugins/PackUpdater/Src/Notifications.cpp
@@ -311,7 +311,7 @@ INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam
EnableWindow(GetDlgItem(hDlg, IDC_INFO), TRUE);
else
EnableWindow(GetDlgItem(hDlg, IDC_INFO), FALSE);
- SetDlgItemText(hDlg, IDC_MESSAGE, TranslateTS(todo[lvI.iItem].tszMessage));
+ SetDlgItemText(hDlg, IDC_MESSAGE, TranslateW(todo[lvI.iItem].tszMessage));
}
}
break;
@@ -401,7 +401,7 @@ INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam
}
mir_wstrncpy(todo[i].tszCurVer, todo[i].tszNewVer, _countof(todo[i].tszCurVer));
mir_snprintf(szKey, "File_%d_CurrentVersion", todo[i].FileNum);
- db_set_ts(NULL, MODNAME, szKey, todo[i].tszCurVer);
+ db_set_ws(NULL, MODNAME, szKey, todo[i].tszCurVer);
arFileType.push_back(todo[i].FileType);
arFilePath.push_back(todo[i].File.tszDiskPath);
arFileName.push_back(tszFileName);
diff --git a/plugins/PackUpdater/Src/Options.cpp b/plugins/PackUpdater/Src/Options.cpp
index ef4e41fd39..2738ae2034 100644
--- a/plugins/PackUpdater/Src/Options.cpp
+++ b/plugins/PackUpdater/Src/Options.cpp
@@ -196,8 +196,8 @@ INT_PTR CALLBACK DlgPopupOpts(HWND hdlg, UINT msg, WPARAM wParam, LPARAM lParam)
SetDlgItemInt(hdlg, IDC_TIMEOUT_VALUE, MyOptions.Timeout, TRUE);
//Mouse actions
for (i = 0; i < _countof(PopupActions); i++) {
- SendDlgItemMessage(hdlg, IDC_LC, CB_SETITEMDATA, SendDlgItemMessage(hdlg, IDC_LC, CB_ADDSTRING, 0, (LPARAM)TranslateTS(PopupActions[i].Text)), PopupActions[i].Action);
- SendDlgItemMessage(hdlg, IDC_RC, CB_SETITEMDATA, SendDlgItemMessage(hdlg, IDC_RC, CB_ADDSTRING, 0, (LPARAM)TranslateTS(PopupActions[i].Text)), PopupActions[i].Action);
+ SendDlgItemMessage(hdlg, IDC_LC, CB_SETITEMDATA, SendDlgItemMessage(hdlg, IDC_LC, CB_ADDSTRING, 0, (LPARAM)TranslateW(PopupActions[i].Text)), PopupActions[i].Action);
+ SendDlgItemMessage(hdlg, IDC_RC, CB_SETITEMDATA, SendDlgItemMessage(hdlg, IDC_RC, CB_ADDSTRING, 0, (LPARAM)TranslateW(PopupActions[i].Text)), PopupActions[i].Action);
}
SendDlgItemMessage(hdlg, IDC_LC, CB_SETCURSEL, MyOptions.LeftClickAction, 0);
SendDlgItemMessage(hdlg, IDC_RC, CB_SETCURSEL, MyOptions.RightClickAction, 0);
@@ -388,7 +388,7 @@ int OptInit(WPARAM wParam, LPARAM)
OPTIONSDIALOGPAGE odp = { 0 };
odp.position = 100000000;
odp.hInstance = hInst;
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_UPDATENOTIFY);
odp.pwszGroup = LPGENW("Services");
odp.pwszTitle = LPGENW("Pack Updater");
diff --git a/plugins/PackUpdater/Src/PackUpdater.cpp b/plugins/PackUpdater/Src/PackUpdater.cpp
index d4df5c677f..3f8ee10e8d 100644
--- a/plugins/PackUpdater/Src/PackUpdater.cpp
+++ b/plugins/PackUpdater/Src/PackUpdater.cpp
@@ -73,7 +73,7 @@ extern "C" __declspec(dllexport) int Load(void)
CMenuItem mi;
SET_UID(mi, 0x326495e8, 0xab0a, 0x47d2, 0xb2, 0x22, 0x2a, 0x8e, 0xa8, 0xae, 0x53, 0x1a);
mi.position = -0x7FFFFFFF;
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
mi.hIcolibItem = IcoLib_GetIcon("check_update");
mi.name.w = LPGENW("Check for pack updates");
mi.pszService = MODNAME"/CheckUpdates";
@@ -83,7 +83,7 @@ extern "C" __declspec(dllexport) int Load(void)
memset(&mi, 0, sizeof(mi));
SET_UID(mi, 0xc3eea590, 0xaba3, 0x454f, 0x93, 0x93, 0xbc, 0x97, 0x15, 0x2c, 0x3b, 0x3d);
mi.position = -0x7FFFFFFF;
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
mi.hIcolibItem = IcoLib_GetIcon("empty_folder");
mi.name.w = LPGENW("Clear pack updates folder");
mi.pszService = MODNAME"/EmptyFolder";
diff --git a/plugins/PackUpdater/Src/Utils.cpp b/plugins/PackUpdater/Src/Utils.cpp
index b555e97d37..f041e4d91d 100644
--- a/plugins/PackUpdater/Src/Utils.cpp
+++ b/plugins/PackUpdater/Src/Utils.cpp
@@ -50,7 +50,7 @@ BOOL NetlibInit()
{
NETLIBUSER nlu = { 0 };
nlu.cbSize = sizeof(nlu);
- nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_HTTPCONNS | NUF_TCHAR; // | NUF_HTTPGATEWAY;
+ nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_HTTPCONNS | NUF_UNICODE; // | NUF_HTTPGATEWAY;
nlu.ptszDescriptiveName = TranslateT("Pack Updater HTTP connection");
nlu.szSettingsModule = MODNAME;
hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu);
@@ -190,7 +190,7 @@ static void CheckUpdates(void *)
FileCount = db_get_dw(NULL, MODNAME, "FileCount", DEFAULT_FILECOUNT);
// Load files info
- ptrW tszDownloadURL(db_get_tsa(NULL, MODNAME, "File_VersionURL"));
+ ptrW tszDownloadURL(db_get_wsa(NULL, MODNAME, "File_VersionURL"));
if (!tszDownloadURL) { // URL is not set
Title = TranslateT("Pack Updater");
Text = TranslateT("URL for checking updates not found.");
@@ -222,14 +222,14 @@ static void CheckUpdates(void *)
FILEINFO FileInfo = { L"", L"", L"", L"", L"", L"", L"", { L"", L"" } };
mir_snprintf(szKey, "File_%d_CurrentVersion", CurrentFile + 1);
- ptrW tszCurVer(db_get_tsa(NULL, MODNAME, szKey));
+ ptrW tszCurVer(db_get_wsa(NULL, MODNAME, szKey));
if (tszCurVer)
mir_wstrncpy(FileInfo.tszCurVer, tszCurVer, _countof(FileInfo.tszCurVer));
else
mir_wstrncpy(FileInfo.tszCurVer, L"", _countof(FileInfo.tszCurVer));
mir_snprintf(szKey, "File_%d_LastVersion", CurrentFile + 1);
- ptrW tszLastVer(db_get_tsa(NULL, MODNAME, szKey));
+ ptrW tszLastVer(db_get_wsa(NULL, MODNAME, szKey));
if (tszLastVer)
mir_wstrncpy(FileInfo.tszLastVer, tszLastVer, _countof(FileInfo.tszLastVer));
else
@@ -269,14 +269,14 @@ static void CheckUpdates(void *)
else
mir_snwprintf(tszBuff, L"Plugins\\%s\\%s", Files[CurrentFile].tszAdvFolder, Files[CurrentFile].File.tszDiskPath);
wchar_t pluginFolderName[MAX_PATH];
- PathToAbsoluteT(tszBuff, pluginFolderName);
+ PathToAbsoluteW(tszBuff, pluginFolderName);
if (!Files[CurrentFile].Force && (IsPluginDisabled(Files[CurrentFile].File.tszDiskPath) || !Exists(pluginFolderName))) //check if plugin disabled or not exists
continue;
}
// Compare versions
if (getVer(Files[CurrentFile].tszCurVer) < getVer(Files[CurrentFile].tszNewVer)) { // Yeah, we've got new version.
- VARST tszSysRoot(L"%SystemRoot%");
- VARST tszProgFiles(L"%ProgramFiles%");
+ VARSW tszSysRoot(L"%SystemRoot%");
+ VARSW tszProgFiles(L"%ProgramFiles%");
if (Files[CurrentFile].FileType != 1 && !IsUserAnAdmin() && (wcsstr(tszRoot, tszSysRoot) || wcsstr(tszRoot, tszProgFiles))) {
MessageBox(NULL, TranslateT("Update is not possible!\nYou have no Administrator's rights.\nPlease run Miranda NG with Administrator's rights."), Title, MB_ICONINFORMATION);
@@ -292,7 +292,7 @@ static void CheckUpdates(void *)
case 1:
break;
case 2: {
- VARST tszUtilRootPlug(L"%miranda_path%\\Plugins");
+ VARSW tszUtilRootPlug(L"%miranda_path%\\Plugins");
if (mir_wstrcmp(Files[CurrentFile].tszAdvFolder, L"") == 0)
mir_snwprintf(tszFilePathDest, L"%s\\%s", tszUtilRootPlug, Files[CurrentFile].File.tszDiskPath);
else
@@ -300,7 +300,7 @@ static void CheckUpdates(void *)
}
break;
case 3: {
- VARST tszUtilRootIco(L"%miranda_path%\\Icons");
+ VARSW tszUtilRootIco(L"%miranda_path%\\Icons");
if (mir_wstrcmp(Files[CurrentFile].tszAdvFolder, L"") == 0)
mir_snwprintf(tszFilePathDest, L"%s\\%s", tszUtilRootIco, Files[CurrentFile].File.tszDiskPath);
else
@@ -309,7 +309,7 @@ static void CheckUpdates(void *)
break;
case 4:
case 5: {
- wchar_t *tszUtilRoot = VARST(L"%miranda_path%");
+ wchar_t *tszUtilRoot = VARSW(L"%miranda_path%");
if (mir_wstrcmp(Files[CurrentFile].tszAdvFolder, L"") == 0)
mir_snwprintf(tszFilePathDest, L"%s\\%s", tszUtilRoot, Files[CurrentFile].File.tszDiskPath);
else
@@ -323,7 +323,7 @@ static void CheckUpdates(void *)
// Save last version
mir_wstrncpy(Files[CurrentFile].tszLastVer, Files[CurrentFile].tszNewVer, _countof(Files[CurrentFile].tszLastVer));
mir_snprintf(szKey, "File_%d_LastVersion", CurrentFile + 1);
- db_set_ts(NULL, MODNAME, szKey, Files[CurrentFile].tszLastVer);
+ db_set_ws(NULL, MODNAME, szKey, Files[CurrentFile].tszLastVer);
} // end compare versions
} //end checking all files in for ()
diff --git a/plugins/PasteIt/src/Options.cpp b/plugins/PasteIt/src/Options.cpp
index 8efd3d1174..60cec76e47 100644
--- a/plugins/PasteIt/src/Options.cpp
+++ b/plugins/PasteIt/src/Options.cpp
@@ -639,7 +639,7 @@ void Options::InitCodepageCB(HWND hwndCB, unsigned int codepage)
int cpCount = sizeof(cpTable) / sizeof(cpTable[0]);
int selCpIdx = -1;
for (int i = 0; i < cpCount; ++i) {
- ComboBox_AddString(hwndCB, TranslateTS(cpTable[i].cpName));
+ ComboBox_AddString(hwndCB, TranslateW(cpTable[i].cpName));
if (cpTable[i].cpId == codepage)
selCpIdx = i;
}
@@ -680,7 +680,7 @@ int Options::InitOptions(WPARAM wParam, LPARAM)
OPTIONSDIALOGPAGE odp = { 0 };
odp.position = 100000000;
odp.hInstance = hInst;
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
odp.pwszTitle = LPGENW("Paste It");
odp.pwszGroup = LPGENW("Services");
diff --git a/plugins/PasteIt/src/PasteIt.cpp b/plugins/PasteIt/src/PasteIt.cpp
index fe85a759c3..6ebee5236d 100644
--- a/plugins/PasteIt/src/PasteIt.cpp
+++ b/plugins/PasteIt/src/PasteIt.cpp
@@ -294,7 +294,7 @@ void InitMenuItems()
CMenuItem mi;
SET_UID(mi, 0x33ecc112, 0x6, 0x487d, 0xbb, 0x8b, 0x76, 0xb4, 0x17, 0x9b, 0xdb, 0xc5);
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
mi.hIcolibItem = icon.hIcolib;
mi.position = 3000090005;
mi.name.w = LPGENW("Paste It");
@@ -302,7 +302,7 @@ void InitMenuItems()
memset(&mi, 0, sizeof(mi));
SET_UID(mi, 0xedc0456d, 0x5aa8, 0x4a61, 0xbe, 0xfd, 0xed, 0x34, 0xb2, 0xcc, 0x6, 0x54);
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
mi.pszService = MS_PASTEIT_CONTACTMENU;
mi.root = hContactMenu;
mi.name.w = LPGENW("Paste from clipboard");
@@ -322,7 +322,7 @@ void InitMenuItems()
mi2.root = hDefWebMenu;
for (int i = 0; i < PasteToWeb::pages; ++i)
{
- mi2.flags = CMIF_TCHAR | CMIF_UNMOVABLE;
+ mi2.flags = CMIF_UNICODE | CMIF_UNMOVABLE;
if (Options::instance->defWeb == i)
mi2.flags |= CMIF_CHECKED;
mi2.name.w = pasteToWebs[i]->GetName();
@@ -404,7 +404,7 @@ extern "C" int __declspec(dllexport) Load(void)
NETLIBUSER nlu = { 0 };
nlu.cbSize = sizeof(nlu);
- nlu.flags = NUF_TCHAR | NUF_OUTGOING | NUF_HTTPCONNS;
+ nlu.flags = NUF_UNICODE | NUF_OUTGOING | NUF_HTTPCONNS;
nlu.szSettingsModule = MODULE;
nlu.ptszDescriptiveName = TranslateT("Paste It HTTP connections");
g_hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu);
diff --git a/plugins/Ping/src/log.cpp b/plugins/Ping/src/log.cpp
index c99af91c06..ef50c5cb0b 100644
--- a/plugins/Ping/src/log.cpp
+++ b/plugins/Ping/src/log.cpp
@@ -32,8 +32,8 @@ INT_PTR Log(WPARAM wParam, LPARAM) {
INT_PTR GetLogFilename(WPARAM wParam, LPARAM lParam) {
DBVARIANT dbv;
wchar_t *filename = (wchar_t *)lParam;
- if (db_get_ts(0, PLUG, "LogFilename", &dbv)) {
- CallService(MS_DB_GETPROFILEPATHT, wParam, (LPARAM)filename);
+ if (db_get_ws(0, PLUG, "LogFilename", &dbv)) {
+ CallService(MS_DB_GETPROFILEPATHW, wParam, (LPARAM)filename);
mir_wstrncat(filename, L"\\ping_log.txt", wParam - mir_wstrlen(filename));
}
else {
@@ -47,7 +47,7 @@ INT_PTR GetLogFilename(WPARAM wParam, LPARAM lParam) {
}
INT_PTR SetLogFilename(WPARAM, LPARAM lParam) {
- db_set_ts(0, PLUG, "LogFilename", (wchar_t *)lParam);
+ db_set_ws(0, PLUG, "LogFilename", (wchar_t *)lParam);
return 0;
}
diff --git a/plugins/Ping/src/menu.cpp b/plugins/Ping/src/menu.cpp
index 1fd1ce70dd..3f2a0bd198 100644
--- a/plugins/Ping/src/menu.cpp
+++ b/plugins/Ping/src/menu.cpp
@@ -7,7 +7,7 @@ void InitMenus()
{
// main menu
CMenuItem mi;
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
mi.root = Menu_CreateRoot(MO_MAIN, LPGENW("Ping"), 500099900);
Menu_ConfigureItem(mi.root, MCI_OPT_UID, "FF273885-6AEC-4C8A-B8BC-9247D920F223");
diff --git a/plugins/Ping/src/options.cpp b/plugins/Ping/src/options.cpp
index 1f77da46d2..0d763f466a 100644
--- a/plugins/Ping/src/options.cpp
+++ b/plugins/Ping/src/options.cpp
@@ -505,7 +505,7 @@ int PingOptInit(WPARAM wParam, LPARAM)
{
OPTIONSDIALOGPAGE odp = { 0 };
odp.hInstance = hInst;
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
odp.pwszGroup = LPGENW("Network");
odp.pwszTitle = LPGENW("Ping");
diff --git a/plugins/Ping/src/ping.cpp b/plugins/Ping/src/ping.cpp
index 9533ff3d83..2255dca874 100644
--- a/plugins/Ping/src/ping.cpp
+++ b/plugins/Ping/src/ping.cpp
@@ -86,7 +86,7 @@ int OnModulesLoaded(WPARAM, LPARAM)
NETLIBUSER nl_user = { 0 };
nl_user.cbSize = sizeof(nl_user);
nl_user.szSettingsModule = PLUG;
- nl_user.flags = NUF_OUTGOING | NUF_HTTPCONNS | NUF_TCHAR;
+ nl_user.flags = NUF_OUTGOING | NUF_HTTPCONNS | NUF_UNICODE;
nl_user.ptszDescriptiveName = TranslateT("Ping Plugin");
nl_user.szHttpGatewayHello = 0;
nl_user.szHttpGatewayUserAgent = 0;
diff --git a/plugins/Ping/src/pinglist.cpp b/plugins/Ping/src/pinglist.cpp
index 9ba42dad03..92e094e74b 100644
--- a/plugins/Ping/src/pinglist.cpp
+++ b/plugins/Ping/src/pinglist.cpp
@@ -63,17 +63,17 @@ void write_ping_address(PINGADDRESS &i)
}
db_set_dw(0, buff, "Id", i.item_id);
- db_set_ts(0, buff, "Address", i.pszName);
- db_set_ts(0, buff, "Label", i.pszLabel);
+ db_set_ws(0, buff, "Address", i.pszName);
+ db_set_ws(0, buff, "Label", i.pszLabel);
db_set_w(0, buff, "Status", i.status);
db_set_dw(0, buff, "Port", i.port);
db_set_s(0, buff, "Proto", i.pszProto);
if (mir_wstrlen(i.pszCommand))
- db_set_ts(0, buff, "Command", i.pszCommand);
+ db_set_ws(0, buff, "Command", i.pszCommand);
else
db_unset(0, buff, "Command");
if (mir_wstrlen(i.pszParams))
- db_set_ts(0, buff, "CommandParams", i.pszParams);
+ db_set_ws(0, buff, "CommandParams", i.pszParams);
else
db_unset(0, buff, "CommandParams");
db_set_w(0, buff, "SetStatus", i.set_status);
@@ -115,13 +115,13 @@ bool read_ping_address(PINGADDRESS &pa) {
if ((pa.item_id = db_get_dw(0, buff, "Id", 0)) == 0) return false;
DBVARIANT dbv;
- if (!db_get_ts(0, buff, "Address", &dbv)) {
+ if (!db_get_ws(0, buff, "Address", &dbv)) {
mir_wstrncpy(pa.pszName, dbv.ptszVal, _countof(pa.pszName));
db_free(&dbv);
}
else return false;
- if (!db_get_ts(0, buff, "Label", &dbv)) {
+ if (!db_get_ws(0, buff, "Label", &dbv)) {
mir_wstrncpy(pa.pszLabel, dbv.ptszVal, _countof(pa.pszLabel));
db_free(&dbv);
}
@@ -138,13 +138,13 @@ bool read_ping_address(PINGADDRESS &pa) {
}
else pa.pszProto[0] = '\0';
- if (!db_get_ts(0, buff, "Command", &dbv)) {
+ if (!db_get_ws(0, buff, "Command", &dbv)) {
mir_wstrncpy(pa.pszCommand, dbv.ptszVal, _countof(pa.pszCommand));
db_free(&dbv);
}
else
pa.pszCommand[0] = '\0';
- if (!db_get_ts(0, buff, "CommandParams", &dbv)) {
+ if (!db_get_ws(0, buff, "CommandParams", &dbv)) {
mir_wstrncpy(pa.pszParams, dbv.ptszVal, _countof(pa.pszParams));
db_free(&dbv);
}
diff --git a/plugins/Ping/src/pingthread.cpp b/plugins/Ping/src/pingthread.cpp
index 7e6ccdbfc4..b0df01d290 100644
--- a/plugins/Ping/src/pingthread.cpp
+++ b/plugins/Ping/src/pingthread.cpp
@@ -19,8 +19,8 @@ int frame_id = -1;
HBRUSH tbrush = 0;
-FontIDT font_id;
-ColourIDT bk_col_id;
+FontIDW font_id;
+ColourIDW bk_col_id;
HFONT hFont = 0;
COLORREF bk_col = RGB(255, 255, 255);
@@ -312,8 +312,8 @@ void CALLBACK TimerProc(HWND, UINT, UINT_PTR, DWORD)
else
mir_snwprintf(TBcapt, L"Ping");
- CallService(MS_CLIST_FRAMES_SETFRAMEOPTIONS, MAKEWPARAM(FO_TBNAME | FO_TCHAR, frame_id), (LPARAM)TBcapt);
- CallService(MS_CLIST_FRAMES_SETFRAMEOPTIONS, MAKEWPARAM(FO_TBTIPNAME | FO_TCHAR, frame_id), (LPARAM)TBcapt);
+ CallService(MS_CLIST_FRAMES_SETFRAMEOPTIONS, MAKEWPARAM(FO_TBNAME | FO_UNICODETEXT, frame_id), (LPARAM)TBcapt);
+ CallService(MS_CLIST_FRAMES_SETFRAMEOPTIONS, MAKEWPARAM(FO_TBTIPNAME | FO_UNICODETEXT, frame_id), (LPARAM)TBcapt);
CallService(MS_CLIST_FRAMES_UPDATEFRAME, frame_id, FU_TBREDRAW);
}
}
@@ -781,11 +781,11 @@ int ReloadFont(WPARAM, LPARAM)
if (hFont) DeleteObject(hFont);
LOGFONT log_font;
- CallService(MS_FONT_GETT, (WPARAM)&font_id, (LPARAM)&log_font);
+ CallService(MS_FONT_GETW, (WPARAM)&font_id, (LPARAM)&log_font);
hFont = CreateFontIndirect(&log_font);
SendMessage(list_hwnd, WM_SETFONT, (WPARAM)hFont, TRUE);
- bk_col = CallService(MS_COLOUR_GETT, (WPARAM)&bk_col_id, 0);
+ bk_col = CallService(MS_COLOUR_GETW, (WPARAM)&bk_col_id, 0);
RefreshWindow(0, 0);
return 0;
@@ -906,7 +906,7 @@ void InitList()
Menu_ConfigureItem(mi.root, MCI_OPT_UID, "7CFBF239-86B5-48B2-8D5B-39E09A7DB514");
SET_UID(mi, 0x4adbd753, 0x27d6, 0x457a, 0xa6, 0x6, 0xdf, 0x4f, 0x2c, 0xd8, 0xb9, 0x3b);
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
mi.position = 3000320001;
mi.name.w = LPGENW("Show/Hide &Ping Window");
mi.pszService = PLUG "/ShowWindow";
@@ -916,7 +916,7 @@ void InitList()
else ShowWindow(hpwnd, SW_SHOW);
}
- font_id.cbSize = sizeof(FontIDT);
+ font_id.cbSize = sizeof(FontIDW);
mir_wstrncpy(font_id.group, LPGENW("Ping"), _countof(font_id.group));
mir_wstrncpy(font_id.name, LPGENW("List"), _countof(font_id.name));
mir_strncpy(font_id.dbSettingsGroup, "PING", _countof(font_id.dbSettingsGroup));
@@ -931,15 +931,15 @@ void InitList()
font_id.deffontsettings.colour = RGB(255, 255, 255);
mir_wstrncpy(font_id.deffontsettings.szFace, L"Tahoma", _countof(font_id.deffontsettings.szFace));
- FontRegisterT(&font_id);
+ FontRegisterW(&font_id);
- bk_col_id.cbSize = sizeof(ColourIDT);
+ bk_col_id.cbSize = sizeof(ColourIDW);
mir_wstrncpy(bk_col_id.group, L"Ping", _countof(bk_col_id.group));
mir_wstrncpy(bk_col_id.name, L"Background", _countof(bk_col_id.name));
mir_strncpy(bk_col_id.dbSettingsGroup, "PING", _countof(bk_col_id.dbSettingsGroup));
mir_strncpy(bk_col_id.setting, "BgColor", _countof(bk_col_id.setting));
bk_col_id.defcolour = RGB(0, 0, 0);
- ColourRegisterT(&bk_col_id);
+ ColourRegisterW(&bk_col_id);
HookEvent(ME_FONT_RELOAD, ReloadFont);
diff --git a/plugins/Ping/src/utils.cpp b/plugins/Ping/src/utils.cpp
index 37c01d0d28..8eb2002532 100644
--- a/plugins/Ping/src/utils.cpp
+++ b/plugins/Ping/src/utils.cpp
@@ -221,7 +221,7 @@ void import_ping_address(int index, PINGADDRESS &pa) {
DBVARIANT dbv;
char buf[256];
mir_snprintf(buf, "Address%d", index);
- if (!db_get_ts(0, "PingPlug", buf, &dbv)) {
+ if (!db_get_ws(0, "PingPlug", buf, &dbv)) {
mir_wstrncpy(pa.pszName, dbv.ptszVal, _countof(pa.pszName));
db_free(&dbv);
}
@@ -229,7 +229,7 @@ void import_ping_address(int index, PINGADDRESS &pa) {
mir_wstrncpy(pa.pszName, TranslateT("Unknown Address"), _countof(pa.pszName));
mir_snprintf(buf, "Label%d", index);
- if (!db_get_ts(0, "PingPlug", buf, &dbv)) {
+ if (!db_get_ws(0, "PingPlug", buf, &dbv)) {
mir_wstrncpy(pa.pszLabel, dbv.ptszVal, _countof(pa.pszLabel));
db_free(&dbv);
}
@@ -314,7 +314,7 @@ void InitUtils()
test.flags = PCF_TCHAR;
test.hIcon = hIconResponding;
test.iSeconds = -1;
- test.ptszDescription = TranslateT("Ping");
+ test.pwszDescription = TranslateT("Ping");
test.pszName = "pingpopups";
test.PluginWindowProc = NullWindowProc;
if (hPopupClass = Popup_RegisterClass(&test))
diff --git a/plugins/PluginUpdater/src/DlgListNew.cpp b/plugins/PluginUpdater/src/DlgListNew.cpp
index 7f28faab29..5d30a3a4b3 100644
--- a/plugins/PluginUpdater/src/DlgListNew.cpp
+++ b/plugins/PluginUpdater/src/DlgListNew.cpp
@@ -61,7 +61,7 @@ static void ApplyDownloads(void *param)
mir_snwprintf(tszFileTemp, L"%s\\Temp", g_tszRoot);
SafeCreateDirectory(tszFileTemp);
- VARST tszMirandaPath(L"%miranda_path%");
+ VARSW tszMirandaPath(L"%miranda_path%");
HANDLE nlc = NULL;
for (int i=0; i < todo.getCount(); ++i) {
@@ -393,7 +393,7 @@ static void GetList(void *)
}
FILELIST *UpdateFiles = new FILELIST(20);
- VARST dirname(L"%miranda_path%");
+ VARSW dirname(L"%miranda_path%");
for (int i=0; i < hashes.getCount(); i++) {
ServListEntry &hash = hashes[i];
@@ -480,7 +480,7 @@ static INT_PTR ParseUriService(WPARAM, LPARAM lParam)
if (hash == NULL)
return 0;
- VARST dirName(L"%miranda_path%");
+ VARSW dirName(L"%miranda_path%");
wchar_t tszPath[MAX_PATH];
mir_snwprintf(tszPath, L"%s\\%s", dirName, hash->m_name);
FILEINFO *fileInfo = ServerEntryToFileInfo(*hash, baseUrl, tszPath);
diff --git a/plugins/PluginUpdater/src/DlgUpdate.cpp b/plugins/PluginUpdater/src/DlgUpdate.cpp
index 9f02de304d..06a9badcf1 100644
--- a/plugins/PluginUpdater/src/DlgUpdate.cpp
+++ b/plugins/PluginUpdater/src/DlgUpdate.cpp
@@ -96,7 +96,7 @@ static void ApplyUpdates(void *param)
Netlib_CloseHandle(nlc);
// 3) Unpack all zips
- VARST tszMirandaPath(L"%miranda_path%");
+ VARSW tszMirandaPath(L"%miranda_path%");
for (int i = 0; i < todo.getCount(); i++) {
FILEINFO& p = todo[i];
if (p.bEnabled) {
@@ -125,9 +125,9 @@ static void ApplyUpdates(void *param)
#if MIRANDA_VER < 0x0A00
// 4) Change title of clist
- ptrW title(db_get_tsa(NULL, "CList", "TitleText"));
+ ptrW title(db_get_wsa(NULL, "CList", "TitleText"));
if (!lstrcmpi(title, L"Miranda IM"))
- db_set_ts(NULL, "CList", "TitleText", L"Miranda NG");
+ db_set_ws(NULL, "CList", "TitleText", L"Miranda NG");
#endif
db_set_b(NULL, MODNAME, DB_SETTING_RESTART_COUNT, 5);
@@ -138,12 +138,12 @@ static void ApplyUpdates(void *param)
if (opts.bChangePlatform) {
wchar_t mirandaPath[MAX_PATH];
GetModuleFileName(NULL, mirandaPath, _countof(mirandaPath));
- db_set_ts(NULL, MODNAME, "OldBin2", mirandaPath);
+ db_set_ws(NULL, MODNAME, "OldBin2", mirandaPath);
db_unset(NULL, MODNAME, DB_SETTING_CHANGEPLATFORM);
}
else {
- ptrW oldbin(db_get_tsa(NULL, MODNAME, "OldBin2"));
+ ptrW oldbin(db_get_wsa(NULL, MODNAME, "OldBin2"));
if (oldbin) {
SafeDeleteFile(oldbin);
db_unset(NULL, MODNAME, "OldBin2");
@@ -446,7 +446,7 @@ static void DlgUpdateSilent(void *param)
}
// 3) Unpack all zips
- VARST tszMirandaPath(L"%miranda_path%");
+ VARSW tszMirandaPath(L"%miranda_path%");
for (int i = 0; i < UpdateFiles.getCount(); i++) {
FILEINFO& p = UpdateFiles[i];
if (p.bEnabled) {
@@ -477,9 +477,9 @@ static void DlgUpdateSilent(void *param)
#if MIRANDA_VER < 0x0A00
// 4) Change title of clist
- ptrW title = db_get_tsa(NULL, "CList", "TitleText");
+ ptrW title = db_get_wsa(NULL, "CList", "TitleText");
if (!wcsicmp(title, L"Miranda IM"))
- db_set_ts(NULL, "CList", "TitleText", L"Miranda NG");
+ db_set_ws(NULL, "CList", "TitleText", L"Miranda NG");
#endif
opts.bForceRedownload = false;
@@ -802,7 +802,7 @@ static void CheckUpdates(void *)
bool success = ParseHashes(updateUrl, baseUrl, hashes);
if (success) {
FILELIST *UpdateFiles = new FILELIST(20);
- VARST dirname(L"%miranda_path%");
+ VARSW dirname(L"%miranda_path%");
int count = ScanFolder(dirname, lstrlen(dirname) + 1, baseUrl, hashes, UpdateFiles);
// Show dialog
diff --git a/plugins/PluginUpdater/src/Events.cpp b/plugins/PluginUpdater/src/Events.cpp
index ea4c6e8ddf..f048d10a5a 100644
--- a/plugins/PluginUpdater/src/Events.cpp
+++ b/plugins/PluginUpdater/src/Events.cpp
@@ -50,7 +50,7 @@ int ModulesLoaded(WPARAM, LPARAM)
HookEvent(ME_FOLDERS_PATH_CHANGED, OnFoldersChanged);
OnFoldersChanged(0, 0);
}
- else lstrcpyn(g_tszRoot, VARST(L"%miranda_path%\\" DEFAULT_UPDATES_FOLDER), _countof(g_tszRoot));
+ else lstrcpyn(g_tszRoot, VARSW(L"%miranda_path%\\" DEFAULT_UPDATES_FOLDER), _countof(g_tszRoot));
#if MIRANDA_VER >= 0x0A00
if (ServiceExists(MS_ASSOCMGR_ADDNEWURLTYPE))
diff --git a/plugins/PluginUpdater/src/Options.cpp b/plugins/PluginUpdater/src/Options.cpp
index 38dd4d5802..9a01d64af8 100644
--- a/plugins/PluginUpdater/src/Options.cpp
+++ b/plugins/PluginUpdater/src/Options.cpp
@@ -33,7 +33,7 @@ static int GetUpdateMode()
// Check if there is url for custom mode
if (UpdateMode == UPDATE_MODE_CUSTOM) {
- ptrW url(db_get_tsa(NULL, MODNAME, DB_SETTING_UPDATE_URL));
+ ptrW url(db_get_wsa(NULL, MODNAME, DB_SETTING_UPDATE_URL));
if (url == NULL || !wcslen(url)) {
// No url for custom mode, reset that setting so it will be determined automatically
db_unset(NULL, MODNAME, DB_SETTING_UPDATE_MODE);
@@ -65,7 +65,7 @@ wchar_t* GetDefaultUrl()
mir_snwprintf(url, DEFAULT_UPDATE_URL_TRUNK_SYMBOLS, opts.bChangePlatform ? DEFAULT_OPP_BITS : DEFAULT_BITS);
return mir_wstrdup(url);
default:
- return db_get_tsa(NULL, MODNAME, DB_SETTING_UPDATE_URL);
+ return db_get_wsa(NULL, MODNAME, DB_SETTING_UPDATE_URL);
}
}
@@ -140,7 +140,7 @@ static INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wPar
EnableWindow(GetDlgItem(hwndDlg, IDC_CUSTOMURL), TRUE);
EnableWindow(GetDlgItem(hwndDlg, IDC_CHANGE_PLATFORM), FALSE);
- ptrW url(db_get_tsa(NULL, MODNAME, DB_SETTING_UPDATE_URL));
+ ptrW url(db_get_wsa(NULL, MODNAME, DB_SETTING_UPDATE_URL));
if (url == NULL)
url = GetDefaultUrl();
SetDlgItemText(hwndDlg, IDC_CUSTOMURL, url);
@@ -206,7 +206,7 @@ static INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wPar
EnableWindow(GetDlgItem(hwndDlg, IDC_CHANGE_PLATFORM), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_CUSTOMURL), TRUE);
{
- ptrW url(db_get_tsa(NULL, MODNAME, DB_SETTING_UPDATE_URL));
+ ptrW url(db_get_wsa(NULL, MODNAME, DB_SETTING_UPDATE_URL));
if (url == NULL)
url = GetDefaultUrl();
SetDlgItemText(hwndDlg, IDC_CUSTOMURL, url);
@@ -295,7 +295,7 @@ static INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wPar
else {
wchar_t tszUrl[100];
GetDlgItemText(hwndDlg, IDC_CUSTOMURL, tszUrl, _countof(tszUrl));
- db_set_ts(NULL, MODNAME, DB_SETTING_UPDATE_URL, tszUrl);
+ db_set_ws(NULL, MODNAME, DB_SETTING_UPDATE_URL, tszUrl);
db_set_b(NULL, MODNAME, DB_SETTING_UPDATE_MODE, UPDATE_MODE_CUSTOM);
opts.bForceRedownload = 0;
db_unset(NULL, MODNAME, DB_SETTING_REDOWNLOAD);
@@ -340,8 +340,8 @@ static INT_PTR CALLBACK DlgPopupOpts(HWND hdlg, UINT msg, WPARAM wParam, LPARAM
SetDlgItemInt(hdlg, IDC_TIMEOUT_VALUE, PopupOptions.Timeout, TRUE);
//Mouse actions
for (int i = 0; i < _countof(PopupActions); i++) {
- SendDlgItemMessage(hdlg, IDC_LC, CB_SETITEMDATA, SendDlgItemMessage(hdlg, IDC_LC, CB_ADDSTRING, 0, (LPARAM)TranslateTS(PopupActions[i].Text)), PopupActions[i].Action);
- SendDlgItemMessage(hdlg, IDC_RC, CB_SETITEMDATA, SendDlgItemMessage(hdlg, IDC_RC, CB_ADDSTRING, 0, (LPARAM)TranslateTS(PopupActions[i].Text)), PopupActions[i].Action);
+ SendDlgItemMessage(hdlg, IDC_LC, CB_SETITEMDATA, SendDlgItemMessage(hdlg, IDC_LC, CB_ADDSTRING, 0, (LPARAM)TranslateW(PopupActions[i].Text)), PopupActions[i].Action);
+ SendDlgItemMessage(hdlg, IDC_RC, CB_SETITEMDATA, SendDlgItemMessage(hdlg, IDC_RC, CB_ADDSTRING, 0, (LPARAM)TranslateW(PopupActions[i].Text)), PopupActions[i].Action);
}
SendDlgItemMessage(hdlg, IDC_LC, CB_SETCURSEL, PopupOptions.LeftClickAction, 0);
SendDlgItemMessage(hdlg, IDC_RC, CB_SETCURSEL, PopupOptions.RightClickAction, 0);
@@ -510,7 +510,7 @@ static int OptInit(WPARAM wParam, LPARAM)
OPTIONSDIALOGPAGE odp = { 0 };
odp.position = 100000000;
odp.hInstance = hInst;
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_UPDATENOTIFY);
odp.pwszGroup = LPGENW("Services");
odp.pwszTitle = LPGENW("Plugin Updater");
diff --git a/plugins/PluginUpdater/src/PluginUpdater.cpp b/plugins/PluginUpdater/src/PluginUpdater.cpp
index 3a2a2fdb1d..204f167cbf 100644
--- a/plugins/PluginUpdater/src/PluginUpdater.cpp
+++ b/plugins/PluginUpdater/src/PluginUpdater.cpp
@@ -132,7 +132,7 @@ extern "C" __declspec(dllexport) int Load(void)
#if MIRANDA_VER >= 0x0A00
// Upgrade old settings
if (-1 == db_get_b(0, MODNAME, DB_SETTING_UPDATE_MODE, -1)) {
- ptrW dbvUpdateURL(db_get_tsa(0, MODNAME, DB_SETTING_UPDATE_URL));
+ ptrW dbvUpdateURL(db_get_wsa(0, MODNAME, DB_SETTING_UPDATE_URL));
if (dbvUpdateURL) {
if (!wcscmp(dbvUpdateURL, _A2W(DEFAULT_UPDATE_URL_OLD))) {
db_set_b(0, MODNAME, DB_SETTING_UPDATE_MODE, UPDATE_MODE_STABLE);
diff --git a/plugins/PluginUpdater/src/Utils.cpp b/plugins/PluginUpdater/src/Utils.cpp
index 26b395a1c4..6e88d85783 100644
--- a/plugins/PluginUpdater/src/Utils.cpp
+++ b/plugins/PluginUpdater/src/Utils.cpp
@@ -58,7 +58,7 @@ void InitNetlib()
{
NETLIBUSER nlu = {0};
nlu.cbSize = sizeof(nlu);
- nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_HTTPCONNS | NUF_TCHAR; // | NUF_HTTPGATEWAY;
+ nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_HTTPCONNS | NUF_UNICODE; // | NUF_HTTPGATEWAY;
nlu.ptszDescriptiveName = TranslateT("Plugin Updater HTTP connections");
nlu.szSettingsModule = MODNAME;
hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu);
@@ -599,7 +599,7 @@ int SafeDeleteFile(const wchar_t *pFile)
int SafeCreateDirectory(const wchar_t *pFolder)
{
if (hPipe == NULL)
- return CreateDirectoryTreeT(pFolder);
+ return CreateDirectoryTreeW(pFolder);
return TransactPipe(4, pFolder, NULL);
}
@@ -607,7 +607,7 @@ int SafeCreateDirectory(const wchar_t *pFolder)
int SafeCreateFilePath(wchar_t *pFolder)
{
if (hPipe == NULL) {
- CreatePathToFileT(pFolder);
+ CreatePathToFileW(pFolder);
return 0;
}
diff --git a/plugins/Popup/src/actions.cpp b/plugins/Popup/src/actions.cpp
index 5a84d99d0e..d85a6269d4 100644
--- a/plugins/Popup/src/actions.cpp
+++ b/plugins/Popup/src/actions.cpp
@@ -237,7 +237,7 @@ INT_PTR CALLBACK DlgProcPopupActions(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
group.cbSize = sizeof(group);
group.mask = LVGF_HEADER | LVGF_GROUPID;
LPTSTR wszGroup = mir_a2u(szGroup);
- group.pszHeader = TranslateTS(wszGroup);
+ group.pszHeader = TranslateW(wszGroup);
group.cchHeader = (int)mir_wstrlen(wszGroup);
grpId = group.iGroupId = groups.getCount();
ListView_InsertGroup(hwndList, -1, &group);
@@ -249,7 +249,7 @@ INT_PTR CALLBACK DlgProcPopupActions(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
item.mask = LVIF_IMAGE | LVIF_PARAM | LVIF_TEXT | LVIF_STATE | LVIF_INDENT;
item.iItem = i;
ptrW tszName(mir_a2u(szName));
- item.pszText = TranslateTS(tszName);
+ item.pszText = TranslateW(tszName);
item.iImage = ImageList_AddIcon(hImgList, gActions[i]->lchIcon);
item.lParam = i;
item.mask |= LVIF_GROUPID;
diff --git a/plugins/Popup/src/bitmap_funcs.cpp b/plugins/Popup/src/bitmap_funcs.cpp
index 945be3e482..a652e68980 100644
--- a/plugins/Popup/src/bitmap_funcs.cpp
+++ b/plugins/Popup/src/bitmap_funcs.cpp
@@ -731,7 +731,7 @@ bool MyBitmap::loadFromFile(const wchar_t *fn)
return loadFromFile_gradient(fn);
SIZE sz;
- HBITMAP hBmpLoaded = (HBITMAP)CallService(MS_IMG_LOAD, (WPARAM)fn, IMGL_TCHAR);
+ HBITMAP hBmpLoaded = (HBITMAP)CallService(MS_IMG_LOAD, (WPARAM)fn, IMGL_WCHAR);
if (!hBmpLoaded)
return false;
diff --git a/plugins/Popup/src/common.h b/plugins/Popup/src/common.h
index 5fff5e0444..8ce683b65f 100644
--- a/plugins/Popup/src/common.h
+++ b/plugins/Popup/src/common.h
@@ -68,7 +68,7 @@ inline INT_PTR DBGetContactSettingStringX(MCONTACT hContact, const char *ModuleN
case DBVT_ASCIIZ:
ret = (INT_PTR)mir_strdup(result ? Default : dbv.pszVal);
break;
- case DBVT_TCHAR:
+ case DBVT_WCHAR:
if (!result)
ret = (INT_PTR)mir_wstrdup(dbv.ptszVal);
else
@@ -95,7 +95,7 @@ inline void AddTooltipTranslated(HWND hwndToolTip, HWND hwnd, int id, RECT rc, c
ti.hwnd = hwnd;
ti.uId = id;
ti.hinst = hInst;
- ti.lpszText = TranslateTS(wtext);
+ ti.lpszText = TranslateW(wtext);
ti.rect = rc;
SendMessage(hwndToolTip, TTM_ADDTOOL, 0, (LPARAM)&ti);
diff --git a/plugins/Popup/src/config.cpp b/plugins/Popup/src/config.cpp
index 233fcdf811..a9763b64fd 100644
--- a/plugins/Popup/src/config.cpp
+++ b/plugins/Popup/src/config.cpp
@@ -93,7 +93,7 @@ void PopupPreview()
wchar_t *lptzText1Eng = TranslateT("`Twas brillig, and the slithy toves\r\nDid gyre and gimble in the wabe:\r\nAll mimsy were the borogoves,\r\nAnd the mome raths outgrabe.\r\n\t[b][i]Lewis Carroll, 1855[/i][/b]");
wchar_t *lptzTitle2 = TranslateT("Test preview for the popup plugin settings. This is supposed to be long enough not to fit in one line...");
- wchar_t *lptzText2 = TranslateTS(
+ wchar_t *lptzText2 = TranslateW(
LPGENW("This is a special test preview for the popup plugin settings. The text and title are quite long so you can tweak your skin and plugin settings to best fit your needs :)")
);
@@ -101,7 +101,7 @@ void PopupPreview()
memset(&ppd, 0, sizeof(ppd));
ppd.cbSize = sizeof(ppd);
- ppd.flags = PU2_TCHAR;
+ ppd.flags = PU2_UNICODE;
ppd.lptzTitle = lptzTitle1Eng;
ppd.lptzText = lptzText1Eng;
@@ -111,7 +111,7 @@ void PopupPreview()
memset(&ppd, 0, sizeof(ppd));
ppd.cbSize = sizeof(ppd);
- ppd.flags = PU2_TCHAR;
+ ppd.flags = PU2_UNICODE;
ppd.lptzTitle = lptzTitle2;
ppd.lptzText = lptzText2;
ppd.lchIcon = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
diff --git a/plugins/Popup/src/font.cpp b/plugins/Popup/src/font.cpp
index 23a6156b55..5b43ddae96 100644
--- a/plugins/Popup/src/font.cpp
+++ b/plugins/Popup/src/font.cpp
@@ -28,8 +28,8 @@ PopupFonts fonts = { 0 };
void InitFonts()
{
// Fonts
- FontIDT fid = { 0 };
- fid.cbSize = sizeof(FontIDT);
+ FontIDW fid = { 0 };
+ fid.cbSize = sizeof(FontIDW);
mir_wstrncpy(fid.group, PU_FNT_AND_COLORW, _countof(fid.group));
mir_strncpy(fid.dbSettingsGroup, PU_FNT_AND_COLOR_DB, _countof(fid.dbSettingsGroup));
fid.flags = FIDF_DEFAULTVALID;
@@ -43,42 +43,42 @@ void InitFonts()
mir_snprintf(fid.prefix, PU_FNT_PREFIX, PU_FNT_NAME_TITLE);
fid.deffontsettings.style = DBFONTF_BOLD;
fid.deffontsettings.colour = RGB(0, 0, 0);
- FontRegisterT(&fid);
+ FontRegisterW(&fid);
mir_wstrncpy(fid.name, PU_FNT_NAME_CLOCK, _countof(fid.name));
mir_snprintf(fid.prefix, PU_FNT_PREFIX, PU_FNT_NAME_CLOCK);
- FontRegisterT(&fid);
+ FontRegisterW(&fid);
mir_wstrncpy(fid.name, PU_FNT_NAME_TEXT, _countof(fid.name));
mir_snprintf(fid.prefix, PU_FNT_PREFIX, PU_FNT_NAME_TEXT);
fid.deffontsettings.style = 0;
- FontRegisterT(&fid);
+ FontRegisterW(&fid);
mir_wstrncpy(fid.name, PU_FNT_NAME_ACTION, _countof(fid.name));
mir_snprintf(fid.prefix, PU_FNT_PREFIX, PU_FNT_NAME_ACTION);
fid.flags = FIDF_DEFAULTVALID | FIDF_ALLOWEFFECTS;
fid.deffontsettings.colour = RGB(0, 0, 255);
- FontRegisterT(&fid);
+ FontRegisterW(&fid);
mir_wstrncpy(fid.name, PU_FNT_NAME_HOVERED_ACTION, _countof(fid.name));
mir_snprintf(fid.prefix, PU_FNT_PREFIX, PU_FNT_NAME_HOVERED_ACTION);
fid.deffontsettings.style = DBFONTF_UNDERLINE;
- FontRegisterT(&fid);
+ FontRegisterW(&fid);
- ColourIDT cid = { 0 };
- cid.cbSize = sizeof(ColourIDT);
+ ColourIDW cid = { 0 };
+ cid.cbSize = sizeof(ColourIDW);
mir_wstrncpy(cid.group, PU_FNT_AND_COLORW, _countof(cid.group));
mir_strncpy(cid.dbSettingsGroup, PU_FNT_AND_COLOR_DB, _countof(cid.dbSettingsGroup));
mir_wstrncpy(cid.name, PU_COL_BACK_NAME, _countof(cid.name));
mir_strncpy(cid.setting, PU_COL_BACK_SETTING, _countof(cid.setting));
cid.defcolour = SETTING_BACKCOLOUR_DEFAULT;
- ColourRegisterT(&cid);
+ ColourRegisterW(&cid);
mir_wstrncpy(cid.name, PU_COL_AVAT_NAME, _countof(cid.name));
mir_strncpy(cid.setting, PU_COL_AVAT_SETTING, _countof(cid.setting));
cid.defcolour = SETTING_TEXTCOLOUR_DEFAULT;
- ColourRegisterT(&cid);
+ ColourRegisterW(&cid);
ReloadFonts();
}
@@ -93,39 +93,39 @@ void ReloadFonts()
if (fonts.actionHover) DeleteObject(fonts.actionHover);
LOGFONT lf = { 0 };
- FontIDT fid = { 0 };
- fid.cbSize = sizeof(FontIDT);
+ FontIDW fid = { 0 };
+ fid.cbSize = sizeof(FontIDW);
mir_wstrncpy(fid.group, PU_FNT_AND_COLORW, _countof(fid.name));
mir_wstrncpy(fid.name, PU_FNT_NAME_TITLE, _countof(fid.name));
- fonts.clTitle = (COLORREF)CallService(MS_FONT_GETT, (WPARAM)&fid, (LPARAM)&lf);
+ fonts.clTitle = (COLORREF)CallService(MS_FONT_GETW, (WPARAM)&fid, (LPARAM)&lf);
fonts.title = CreateFontIndirect(&lf);
mir_wstrncpy(fid.name, PU_FNT_NAME_CLOCK, _countof(fid.name));
- fonts.clClock = (COLORREF)CallService(MS_FONT_GETT, (WPARAM)&fid, (LPARAM)&lf);
+ fonts.clClock = (COLORREF)CallService(MS_FONT_GETW, (WPARAM)&fid, (LPARAM)&lf);
fonts.clock = CreateFontIndirect(&lf);
mir_wstrncpy(fid.name, PU_FNT_NAME_TEXT, _countof(fid.name));
- fonts.clText = (COLORREF)CallService(MS_FONT_GETT, (WPARAM)&fid, (LPARAM)&lf);
+ fonts.clText = (COLORREF)CallService(MS_FONT_GETW, (WPARAM)&fid, (LPARAM)&lf);
fonts.text = CreateFontIndirect(&lf);
mir_wstrncpy(fid.name, PU_FNT_NAME_ACTION, _countof(fid.name));
- fonts.clAction = (COLORREF)CallService(MS_FONT_GETT, (WPARAM)&fid, (LPARAM)&lf);
+ fonts.clAction = (COLORREF)CallService(MS_FONT_GETW, (WPARAM)&fid, (LPARAM)&lf);
fonts.action = CreateFontIndirect(&lf);
mir_wstrncpy(fid.name, PU_FNT_NAME_HOVERED_ACTION, _countof(fid.name));
- fonts.clActionHover = (COLORREF)CallService(MS_FONT_GETT, (WPARAM)&fid, (LPARAM)&lf);
+ fonts.clActionHover = (COLORREF)CallService(MS_FONT_GETW, (WPARAM)&fid, (LPARAM)&lf);
fonts.actionHover = CreateFontIndirect(&lf);
- ColourIDT cid = { 0 };
- cid.cbSize = sizeof(ColourIDT);
+ ColourIDW cid = { 0 };
+ cid.cbSize = sizeof(ColourIDW);
mir_wstrncpy(cid.group, PU_FNT_AND_COLORW, _countof(cid.group));
mir_wstrncpy(cid.name, PU_COL_BACK_NAME, _countof(cid.name));
- fonts.clBack = (COLORREF)CallService(MS_COLOUR_GETT, (WPARAM)&cid, (LPARAM)&lf);
+ fonts.clBack = (COLORREF)CallService(MS_COLOUR_GETW, (WPARAM)&cid, (LPARAM)&lf);
mir_wstrncpy(cid.group, PU_FNT_AND_COLORW, _countof(cid.group));
mir_wstrncpy(cid.name, PU_COL_AVAT_NAME, _countof(cid.name));
- fonts.clAvatarBorder = (COLORREF)CallService(MS_COLOUR_GETT, (WPARAM)&cid, (LPARAM)&lf);
+ fonts.clAvatarBorder = (COLORREF)CallService(MS_COLOUR_GETW, (WPARAM)&cid, (LPARAM)&lf);
// update class popupps(only temp at this point, must rework)
char setting[256];
diff --git a/plugins/Popup/src/font.h b/plugins/Popup/src/font.h
index c94739c13f..c7403af354 100644
--- a/plugins/Popup/src/font.h
+++ b/plugins/Popup/src/font.h
@@ -30,7 +30,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define PU_FNT_AND_COLOR_DB MODULNAME //use eg mir_strcpy(fid.dbSettingsGroup, PU_FNT_GROUP_DB);
#define PU_FNT_PREFIX "fnt%s" //use eg mir_snprintf(fid.prefix, _countof(fid.prefix), PU_FNT_PREFIX, PU_FNT_NAME_....);
-#define PU_FNT_NAME_TITLE LPGENW("Title") //use eg mir_wstrcpy(fid.name, _T(FNT_NAME_....)) for FontIDT
+#define PU_FNT_NAME_TITLE LPGENW("Title") //use eg mir_wstrcpy(fid.name, _T(FNT_NAME_....)) for FontIDW
#define PU_FNT_NAME_CLOCK LPGENW("Clock")
#define PU_FNT_NAME_TEXT LPGENW("Text")
#define PU_FNT_NAME_ACTION LPGENW("Action")
diff --git a/plugins/Popup/src/main.cpp b/plugins/Popup/src/main.cpp
index b572ae477c..8acce626f7 100644
--- a/plugins/Popup/src/main.cpp
+++ b/plugins/Popup/src/main.cpp
@@ -175,7 +175,7 @@ INT_PTR svcShowHistory(WPARAM, LPARAM)
void InitMenuItems(void)
{
CMenuItem mi;
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
HANDLE hIcon = GetIconHandle(PopupOptions.ModuleIsEnabled ? IDI_POPUP : IDI_NOPOPUP);
@@ -211,16 +211,16 @@ INT_PTR GetStatus(WPARAM, LPARAM)
void LoadHotkey()
{
HOTKEYDESC hk = { sizeof(hk) };
- hk.dwFlags = HKD_TCHAR;
+ hk.dwFlags = HKD_UNICODE;
hk.pszName = "Toggle Popups";
- hk.ptszDescription = LPGENW("Toggle Popups");
- hk.ptszSection = MODULNAME_PLUW;
+ hk.pwszDescription = LPGENW("Toggle Popups");
+ hk.pwszSection = MODULNAME_PLUW;
hk.pszService = MENUCOMMAND_SVC;
Hotkey_Register(&hk);
// 'Popup History' Hotkey
hk.pszName = "Popup History";
- hk.ptszDescription = LPGENW("Popup History");
+ hk.pwszDescription = LPGENW("Popup History");
hk.pszService = MENUCOMMAND_HISTORY;
Hotkey_Register(&hk);
}
diff --git a/plugins/Popup/src/opt_adv.cpp b/plugins/Popup/src/opt_adv.cpp
index b85db14921..1de7bcbb81 100644
--- a/plugins/Popup/src/opt_adv.cpp
+++ b/plugins/Popup/src/opt_adv.cpp
@@ -68,7 +68,7 @@ void LoadOption_AdvOpts()
// Effects
PopupOptions.UseAnimations = db_get_b(NULL, MODULNAME, "UseAnimations", TRUE);
PopupOptions.UseEffect = db_get_b(NULL, MODULNAME, "Fade", TRUE);
- PopupOptions.Effect = (LPTSTR)DBGetContactSettingStringX(NULL, MODULNAME, "Effect", "", DBVT_TCHAR);
+ PopupOptions.Effect = (LPTSTR)DBGetContactSettingStringX(NULL, MODULNAME, "Effect", "", DBVT_WCHAR);
PopupOptions.FadeIn = db_get_dw(NULL, MODULNAME, "FadeInTime", SETTING_FADEINTIME_DEFAULT);
PopupOptions.FadeOut = db_get_dw(NULL, MODULNAME, "FadeOutTime", SETTING_FADEOUTTIME_DEFAULT);
@@ -208,7 +208,7 @@ INT_PTR CALLBACK DlgProcPopupAdvOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateT("Fade in/out")), -1);
DWORD dwActiveItem = (DWORD)PopupOptions.UseEffect;
for (int i = 0; i < g_lstPopupVfx.getCount(); ++i) {
- DWORD dwItem = ComboBox_AddString(hCtrl, TranslateTS(g_lstPopupVfx[i]));
+ DWORD dwItem = ComboBox_AddString(hCtrl, TranslateW(g_lstPopupVfx[i]));
ComboBox_SetItemData(hCtrl, dwItem, i);
if (PopupOptions.UseEffect && !mir_wstrcmp(g_lstPopupVfx[i], PopupOptions.Effect))
dwActiveItem = dwItem;
@@ -512,7 +512,7 @@ INT_PTR CALLBACK DlgProcPopupAdvOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
// Effects
db_set_b(NULL, MODULNAME, "UseAnimations", PopupOptions.UseAnimations);
db_set_b(NULL, MODULNAME, "Fade", PopupOptions.UseEffect);
- db_set_ts(NULL, MODULNAME, "Effect", PopupOptions.Effect);
+ db_set_ws(NULL, MODULNAME, "Effect", PopupOptions.Effect);
db_set_dw(NULL, MODULNAME, "FadeInTime", PopupOptions.FadeIn);
db_set_dw(NULL, MODULNAME, "FadeOutTime", PopupOptions.FadeOut);
// other old stuff
diff --git a/plugins/Popup/src/opt_class.cpp b/plugins/Popup/src/opt_class.cpp
index 29b2702137..9110e4e58b 100644
--- a/plugins/Popup/src/opt_class.cpp
+++ b/plugins/Popup/src/opt_class.cpp
@@ -267,7 +267,7 @@ INT_PTR CALLBACK DlgProcOptsClasses(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
hCtrl = GetDlgItem(hwnd, IDC_LACTION);
for (i = 0; i < ptd->notification.actionCount; ++i) {
psztAction = mir_a2u(ptd->notification.lpActions[i].lpzTitle);
- ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateTS(psztAction)), ptd->notification.lpActions[i].lpzTitle);
+ ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateW(psztAction)), ptd->notification.lpActions[i].lpzTitle);
mir_free(psztAction); psztAction = NULL;
}
// combo right action (EXTRA)
@@ -275,7 +275,7 @@ INT_PTR CALLBACK DlgProcOptsClasses(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
psztAction = NULL;
for (i = 0; i < ptd->notification.actionCount; ++i) {
psztAction = mir_a2u(ptd->notification.lpActions[i].lpzTitle);
- ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateTS(psztAction)), ptd->notification.lpActions[i].lpzTitle);
+ ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateW(psztAction)), ptd->notification.lpActions[i].lpzTitle);
mir_free(psztAction); psztAction = NULL;
}
// enable all controls
@@ -342,7 +342,7 @@ INT_PTR CALLBACK DlgProcOptsClasses(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
{
POPUPDATA2 ppd = { 0 };
ppd.cbSize = sizeof(ppd);
- ppd.flags = PU2_TCHAR;
+ ppd.flags = PU2_UNICODE;
ppd.lptzTitle = ptd->pszDescription;
ppd.lptzText = TranslateT("Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn!");
ppd.iSeconds = ptd->timeoutValue;
diff --git a/plugins/Popup/src/opt_gen.cpp b/plugins/Popup/src/opt_gen.cpp
index b2b6fba0e7..8e7f31a8d2 100644
--- a/plugins/Popup/src/opt_gen.cpp
+++ b/plugins/Popup/src/opt_gen.cpp
@@ -181,7 +181,7 @@ INT_PTR CALLBACK DlgProcPopupGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
{
HWND hCtrl = GetDlgItem(hwnd, IDC_CUSTOMPOS);
SendMessage(hCtrl, BUTTONSETASFLATBTN, TRUE, 0);
- SendMessage(hCtrl, BUTTONADDTOOLTIP, (WPARAM)L"Popup area", BATF_TCHAR);
+ SendMessage(hCtrl, BUTTONADDTOOLTIP, (WPARAM)L"Popup area", BATF_UNICODE);
SendMessage(hCtrl, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadIconEx(IDI_RESIZE));
}
// Spreading combobox
@@ -626,11 +626,11 @@ INT_PTR CALLBACK PositionBoxDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
SendDlgItemMessage(hwndDlg, IDC_TITLE, WM_SETFONT, (WPARAM)hFontTitle, TRUE);
SendDlgItemMessage(hwndDlg, IDOK, BUTTONSETASFLATBTN, TRUE, 0);
- SendDlgItemMessage(hwndDlg, IDOK, BUTTONADDTOOLTIP, (WPARAM)L"OK", BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDOK, BUTTONADDTOOLTIP, (WPARAM)L"OK", BATF_UNICODE);
SendDlgItemMessage(hwndDlg, IDOK, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadIconEx(IDI_ACT_OK));
SendDlgItemMessage(hwndDlg, IDCANCEL, BUTTONSETASFLATBTN, TRUE, 0);
- SendDlgItemMessage(hwndDlg, IDCANCEL, BUTTONADDTOOLTIP, (WPARAM)L"Cancel", BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDCANCEL, BUTTONADDTOOLTIP, (WPARAM)L"Cancel", BATF_UNICODE);
SendDlgItemMessage(hwndDlg, IDCANCEL, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadIconEx(IDI_ACT_CLOSE));
SetDlgItemInt(hwndDlg, IDC_TXT_TOP, PopupOptions.gapTop, FALSE);
diff --git a/plugins/Popup/src/opt_skins.cpp b/plugins/Popup/src/opt_skins.cpp
index 2274390955..896f855a00 100644
--- a/plugins/Popup/src/opt_skins.cpp
+++ b/plugins/Popup/src/opt_skins.cpp
@@ -74,7 +74,7 @@ static void updatePreviewImage(HWND hwndBox)
POPUPDATA2 ppd;
memset(&ppd, 0, sizeof(ppd));
ppd.cbSize = sizeof(ppd);
- ppd.flags = PU2_TCHAR;
+ ppd.flags = PU2_UNICODE;
ppd.lchIcon = Skin_LoadIcon(SKINICON_STATUS_ONLINE);
ppd.lptzTitle = TranslateT("Skin preview");
ppd.lptzText = TranslateT("Just take a look at this skin... ;)");
@@ -293,7 +293,7 @@ bool SkinOptionList_Update(OPTTREE_OPTION* &options, int *OptionsCount, HWND hwn
void LoadOption_Skins() {
// skin pack
- PopupOptions.SkinPack = (LPTSTR)DBGetContactSettingStringX(NULL, MODULNAME, "SkinPack", "* Popup Classic", DBVT_TCHAR);
+ PopupOptions.SkinPack = (LPTSTR)DBGetContactSettingStringX(NULL, MODULNAME, "SkinPack", "* Popup Classic", DBVT_WCHAR);
// more Skin options
PopupOptions.DisplayTime = db_get_b(NULL, MODULNAME, "DisplayTime", TRUE);
PopupOptions.DropShadow = db_get_b(NULL, MODULNAME, "DropShadow", TRUE);
@@ -477,7 +477,7 @@ INT_PTR CALLBACK DlgProcPopSkinsOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
case PSN_APPLY:
{
// skin pack
- db_set_ts(NULL, MODULNAME, "SkinPack", PopupOptions.SkinPack);
+ db_set_ws(NULL, MODULNAME, "SkinPack", PopupOptions.SkinPack);
// skin options
const PopupSkin *skin = 0;
if (skin = skins.getSkin(PopupOptions.SkinPack))
diff --git a/plugins/Popup/src/opttree.cpp b/plugins/Popup/src/opttree.cpp
index cc2e48e141..a9abe4ca0e 100644
--- a/plugins/Popup/src/opttree.cpp
+++ b/plugins/Popup/src/opttree.cpp
@@ -35,7 +35,7 @@ static void OptTree_TranslateItem(HWND hwndTree, HTREEITEM hItem)
tvi.pszText = buf;
tvi.cchTextMax = _countof(buf);
SendMessage(hwndTree, TVM_GETITEMW, 0, (LPARAM)&tvi);
- tvi.pszText = TranslateTS(tvi.pszText);
+ tvi.pszText = TranslateW(tvi.pszText);
SendMessage(hwndTree, TVM_SETITEMW, 0, (LPARAM)&tvi);
}
diff --git a/plugins/Popup/src/popup_wnd2.cpp b/plugins/Popup/src/popup_wnd2.cpp
index a31ce9b23e..c4611f8ce7 100644
--- a/plugins/Popup/src/popup_wnd2.cpp
+++ b/plugins/Popup/src/popup_wnd2.cpp
@@ -977,7 +977,7 @@ LRESULT CALLBACK PopupWnd2::WindowProc(UINT message, WPARAM wParam, LPARAM lPara
case ACT_DEF_COPY:
if (m_lptzText || m_lptzTitle) {
- CMString tszText(FORMAT, L"%s\n\n%s",
+ CMStringW tszText(FORMAT, L"%s\n\n%s",
(m_lptzTitle) ? m_lptzTitle : L"",
(m_lptzText) ? m_lptzText : L"");
diff --git a/plugins/Popup/src/services.cpp b/plugins/Popup/src/services.cpp
index 23f5ac5026..c68f83d577 100644
--- a/plugins/Popup/src/services.cpp
+++ b/plugins/Popup/src/services.cpp
@@ -379,8 +379,8 @@ INT_PTR Popup_RegisterPopupClass(WPARAM, LPARAM lParam)
// we ignore pc->colorText and use fonts.text as default (if no setting found in DB)
mir_snprintf(setting, "%s/TextCol", ptd->pupClass.pszName);
ptd->pupClass.colorText = (COLORREF)db_get_dw(NULL, PU_MODULCLASS, setting, fonts.clText/*pc->colorText*/);
- FontIDT fid = { 0 };
- fid.cbSize = sizeof(FontIDT);
+ FontIDW fid = { 0 };
+ fid.cbSize = sizeof(FontIDW);
mir_snwprintf(fid.group, _A2W(PU_FNT_AND_COLOR) L"/%S", ptd->pupClass.pszName);
mir_strncpy(fid.dbSettingsGroup, PU_MODULCLASS, _countof(fid.dbSettingsGroup) - 1);
fid.flags = FIDF_DEFAULTVALID;
@@ -392,19 +392,19 @@ INT_PTR Popup_RegisterPopupClass(WPARAM, LPARAM lParam)
mir_snprintf(fid.prefix, "%s/Text", ptd->pupClass.pszName); // result is "%s/TextCol"
fid.deffontsettings.style = 0;
fid.deffontsettings.colour = fonts.clText;
- FontRegisterT(&fid);
+ FontRegisterW(&fid);
// we ignore pc->colorBack and use fonts.clBack as default (if no setting found in DB)
mir_snprintf(setting, "%s/BgCol", ptd->pupClass.pszName);
ptd->pupClass.colorBack = (COLORREF)db_get_dw(NULL, PU_MODULCLASS, setting, (DWORD)fonts.clBack/*pc->colorBack*/);
- ColourIDT cid = { 0 };
- cid.cbSize = sizeof(ColourIDT);
+ ColourIDW cid = { 0 };
+ cid.cbSize = sizeof(ColourIDW);
mir_snwprintf(cid.group, _A2W(PU_FNT_AND_COLOR) L"/%S", ptd->pupClass.pszName);
mir_strncpy(cid.dbSettingsGroup, PU_MODULCLASS, _countof(fid.dbSettingsGroup));
mir_wstrncpy(cid.name, PU_COL_BACK_NAME, _countof(cid.name));
mir_snprintf(cid.setting, "%s/BgCol", ptd->pupClass.pszName);
cid.defcolour = fonts.clBack;
- ColourRegisterT(&cid);
+ ColourRegisterW(&cid);
gTreeData.insert(ptd);
num_classes++;
diff --git a/plugins/Popup/src/skin.cpp b/plugins/Popup/src/skin.cpp
index 73756e4e51..9fb5e34439 100644
--- a/plugins/Popup/src/skin.cpp
+++ b/plugins/Popup/src/skin.cpp
@@ -62,7 +62,7 @@ SIZE PopupSkin::measureAction(HDC hdc, POPUPACTION *act) const
SIZE szText, szSpace;
LPTSTR wname = mir_a2u(name);
- wchar_t *str = TranslateTS(wname);
+ wchar_t *str = TranslateW(wname);
GetTextExtentPoint32(hdc, str, (int)mir_wstrlen(str), &szText);
mir_free(wname);
GetTextExtentPoint32(hdc, L" ", 1, &szSpace);
@@ -125,7 +125,7 @@ void PopupSkin::drawAction(MyBitmap *bmp, POPUPACTION *act, int x, int y, bool h
GetTextExtentPoint32(bmp->getDC(), L" ", 1, &szSpace);
LPTSTR wname = mir_a2u(name);
- wchar_t *str = TranslateTS(wname);
+ wchar_t *str = TranslateW(wname);
GetTextExtentPoint32(bmp->getDC(), str, (int)mir_wstrlen(str), &szText);
bmp->Draw_Text(str,
(PopupOptions.actions&ACT_LARGE) ? (x + szSpace.cx + 32) : (x + szSpace.cx + 16),
@@ -1098,7 +1098,7 @@ bool Skins::load()
return false;
}
else {
- mir_wstrncpy(dir, VARST(L"%miranda_path%\\skins\\popup"), _countof(dir));
+ mir_wstrncpy(dir, VARSW(L"%miranda_path%\\skins\\popup"), _countof(dir));
DWORD fa = GetFileAttributes(dir);
if ((fa == INVALID_FILE_ATTRIBUTES) || !(fa&FILE_ATTRIBUTE_DIRECTORY))
return false;
diff --git a/plugins/QuickContacts/src/options.cpp b/plugins/QuickContacts/src/options.cpp
index 21d23ef10f..ca5df48c19 100644
--- a/plugins/QuickContacts/src/options.cpp
+++ b/plugins/QuickContacts/src/options.cpp
@@ -55,7 +55,7 @@ int InitOptionsCallback(WPARAM wParam, LPARAM)
odp.pwszTitle = LPGENW("Quick Contacts");
odp.pfnDlgProc = OptionsDlgProc;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT);
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/QuickContacts/src/quickcontacts.cpp b/plugins/QuickContacts/src/quickcontacts.cpp
index 855c5df62d..5f10956175 100644
--- a/plugins/QuickContacts/src/quickcontacts.cpp
+++ b/plugins/QuickContacts/src/quickcontacts.cpp
@@ -124,10 +124,10 @@ int ModulesLoaded(WPARAM, LPARAM)
HOTKEYDESC hkd = {0};
hkd.cbSize = sizeof(hkd);
- hkd.dwFlags = HKD_TCHAR;
+ hkd.dwFlags = HKD_UNICODE;
hkd.pszName = "Quick Contacts/Open dialog";
- hkd.ptszDescription = LPGENW("Open dialog");
- hkd.ptszSection = LPGENW("Quick Contacts");
+ hkd.pwszDescription = LPGENW("Open dialog");
+ hkd.pwszSection = LPGENW("Quick Contacts");
hkd.pszService = MS_QC_SHOW_DIALOG;
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL|HOTKEYF_ALT, 'Q');
Hotkey_Register(&hkd);
@@ -137,37 +137,37 @@ int ModulesLoaded(WPARAM, LPARAM)
hkd.lParam = HOTKEY_FILE;
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, 'F');
hkd.pszName = "Quick Contacts/File";
- hkd.ptszDescription = LPGENW("Send file");
+ hkd.pwszDescription = LPGENW("Send file");
Hotkey_Register(&hkd);
hkd.lParam = HOTKEY_URL;
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, 'U');
hkd.pszName = "Quick Contacts/URL";
- hkd.ptszDescription = LPGENW("Send URL");
+ hkd.pwszDescription = LPGENW("Send URL");
Hotkey_Register(&hkd);
hkd.lParam = HOTKEY_INFO;
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, 'I');
hkd.pszName = "Quick Contacts/Info";
- hkd.ptszDescription = LPGENW("Open user info");
+ hkd.pwszDescription = LPGENW("Open user info");
Hotkey_Register(&hkd);
hkd.lParam = HOTKEY_HISTORY;
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, 'H');
hkd.pszName = "Quick Contacts/History";
- hkd.ptszDescription = LPGENW("Open history");
+ hkd.pwszDescription = LPGENW("Open history");
Hotkey_Register(&hkd);
hkd.lParam = HOTKEY_MENU;
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, 'M');
hkd.pszName = "Quick Contacts/Menu";
- hkd.ptszDescription = LPGENW("Open contact menu");
+ hkd.pwszDescription = LPGENW("Open contact menu");
Hotkey_Register(&hkd);
hkd.lParam = HOTKEY_ALL_CONTACTS;
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, 'A');
hkd.pszName = "Quick Contacts/All Contacts";
- hkd.ptszDescription = LPGENW("Show all contacts");
+ hkd.pwszDescription = LPGENW("Show all contacts");
Hotkey_Register(&hkd);
if (ServiceExists(MS_SKIN_ADDHOTKEY))
@@ -189,7 +189,7 @@ int ModulesLoaded(WPARAM, LPARAM)
CMenuItem mi;
SET_UID(mi, 0x3a3f768a, 0xcf47, 0x43d5, 0x92, 0x16, 0xe4, 0xeb, 0x93, 0xf6, 0x72, 0xfa);
mi.position = 500100001;
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
mi.name.w = LPGENW("Quick Contacts...");
mi.pszService = MS_QC_SHOW_DIALOG;
Menu_AddMainMenuItem(&mi);
@@ -400,7 +400,7 @@ void LoadContacts(HWND hwndDlg, BOOL show_all)
if (opts.group_append)
{
DBVARIANT dbv;
- if (db_get_ts(hMeta == NULL ? hContact : hMeta, "CList", "Group", &dbv) == 0)
+ if (db_get_ws(hMeta == NULL ? hContact : hMeta, "CList", "Group", &dbv) == 0)
{
if (dbv.ptszVal != NULL)
mir_wstrncpy(contact->szgroup, dbv.ptszVal, _countof(contact->szgroup));
@@ -714,12 +714,12 @@ static void FillButton(HWND hwndDlg, int dlgItem, wchar_t *name, wchar_t *key, H
wchar_t *full = tmp;
if (key == NULL)
- full = TranslateTS(name);
+ full = TranslateW(name);
else
- mir_snwprintf(tmp, L"%s (%s)", TranslateTS(name), key);
+ mir_snwprintf(tmp, L"%s (%s)", TranslateW(name), key);
SendDlgItemMessage(hwndDlg, dlgItem, BUTTONSETASFLATBTN, 0, 0);
- SendDlgItemMessage(hwndDlg, dlgItem, BUTTONADDTOOLTIP, (LPARAM)full, BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, dlgItem, BUTTONADDTOOLTIP, (LPARAM)full, BATF_UNICODE);
SendDlgItemMessage(hwndDlg, dlgItem, BM_SETIMAGE, IMAGE_ICON, (LPARAM)icon);
}
@@ -730,9 +730,9 @@ static void FillCheckbox(HWND hwndDlg, int dlgItem, wchar_t *name, wchar_t *key)
wchar_t *full = tmp;
if (key == NULL)
- full = TranslateTS(name);
+ full = TranslateW(name);
else
- mir_snwprintf(tmp, L"%s (%s)", TranslateTS(name), key);
+ mir_snwprintf(tmp, L"%s (%s)", TranslateW(name), key);
SetDlgItemText(hwndDlg, dlgItem, full);
}
@@ -825,7 +825,7 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
if (!IsWindowEnabled(GetDlgItem(hwndDlg, IDC_MESSAGE)))
break;
- CallService(MS_MSG_SENDMESSAGET, hContact, 0);
+ CallService(MS_MSG_SENDMESSAGEW, hContact, 0);
db_set_dw(NULL, MODULE_NAME, "LastSentTo", hContact);
SendMessage(hwndDlg, WM_CLOSE, 0, 0);
diff --git a/plugins/QuickMessages/src/Utils.cpp b/plugins/QuickMessages/src/Utils.cpp
index b5f1943aed..3b79669ca8 100644
--- a/plugins/QuickMessages/src/Utils.cpp
+++ b/plugins/QuickMessages/src/Utils.cpp
@@ -153,11 +153,11 @@ void SaveModuleSettings(int buttonnum, ButtonData* bd)
char szMEntry[256] = { '\0' };
mir_snprintf(szMEntry, "EntryName_%u_%u", buttonnum, bd->dwPos);
- db_set_ts(NULL, PLGNAME, szMEntry, bd->pszName);
+ db_set_ws(NULL, PLGNAME, szMEntry, bd->pszName);
mir_snprintf(szMEntry, "EntryValue_%u_%u", buttonnum, bd->dwPos);
if (bd->pszValue)
- db_set_ts(NULL, PLGNAME, szMEntry, bd->pszValue);
+ db_set_ws(NULL, PLGNAME, szMEntry, bd->pszValue);
else
db_unset(NULL, PLGNAME, szMEntry);
@@ -185,7 +185,7 @@ void CleanSettings(int buttonnum, int from)
}
mir_snprintf(szMEntry, "EntryName_%u_%u", buttonnum, from);
- while (!db_get_ts(NULL, PLGNAME, szMEntry, &dbv)) {
+ while (!db_get_ws(NULL, PLGNAME, szMEntry, &dbv)) {
db_unset(NULL, PLGNAME, szMEntry);
mir_snprintf(szMEntry, "EntryValue_%u_%u", buttonnum, from);
db_unset(NULL, PLGNAME, szMEntry);
@@ -228,7 +228,7 @@ static HANDLE AddIcon(char* szIcoName)
GetModuleFileName(hinstance, tszPath, _countof(tszPath));
SKINICONDESC sid = { 0 };
- sid.flags = SIDF_PATH_TCHAR;
+ sid.flags = SIDF_PATH_UNICODE;
sid.section.a = "Quick Messages";
sid.description.a = szIcoName;
sid.pszName = szIcoName;
@@ -355,7 +355,7 @@ wchar_t* getMenuEntry(int buttonnum, int entrynum, BYTE mode)
break;
}
- if (!db_get_ts(NULL, PLGNAME, szMEntry, &dbv)) {
+ if (!db_get_ws(NULL, PLGNAME, szMEntry, &dbv)) {
if (mir_wstrlen(dbv.ptszVal))
buffer = mir_wstrdup(dbv.ptszVal);
db_free(&dbv);
diff --git a/plugins/QuickMessages/src/options.cpp b/plugins/QuickMessages/src/options.cpp
index 297a6b0f9f..50e561c814 100644
--- a/plugins/QuickMessages/src/options.cpp
+++ b/plugins/QuickMessages/src/options.cpp
@@ -248,7 +248,7 @@ void SaveMenuTree()
if (ld->ptszQValue) {
mir_snprintf(szMEntry, "ButtonValue_%u", iBl);
- db_set_ts(NULL, PLGNAME, szMEntry, ld->ptszQValue);
+ db_set_ws(NULL, PLGNAME, szMEntry, ld->ptszQValue);
}
@@ -263,7 +263,7 @@ void SaveMenuTree()
mir_snprintf(szMEntry, "ButtonName_%u", iBl);
- db_set_ts(NULL, PLGNAME, szMEntry, ld->ptszButtonName);
+ db_set_ws(NULL, PLGNAME, szMEntry, ld->ptszButtonName);
ld->dwOPFlags = 0;
ld->dwPos = iBl;
diff --git a/plugins/QuickReplies/src/events.cpp b/plugins/QuickReplies/src/events.cpp
index 0c575930dd..f64b329dc5 100644
--- a/plugins/QuickReplies/src/events.cpp
+++ b/plugins/QuickReplies/src/events.cpp
@@ -76,7 +76,7 @@ int OnButtonPressed(WPARAM wParam, LPARAM lParam)
int count = 0;
HMENU hMenu = NULL;
char buttonName[32];
- CMString replies;
+ CMStringW replies;
LIST<wchar_t> replyList(1);
CustomButtonClickData *cbcd = (CustomButtonClickData *)lParam;
diff --git a/plugins/QuickReplies/src/options.cpp b/plugins/QuickReplies/src/options.cpp
index fb52965cb2..3356a012b0 100644
--- a/plugins/QuickReplies/src/options.cpp
+++ b/plugins/QuickReplies/src/options.cpp
@@ -63,7 +63,7 @@ INT_PTR CALLBACK DlgProcOptionsPage(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPAR
{
char key[64];
int count = 0;
- CMString replies;
+ CMStringW replies;
TranslateDialogDefault(hwndDlg);
variables_skin_helpbutton(hwndDlg, IDC_VARIABLES);
@@ -131,7 +131,7 @@ INT_PTR CALLBACK DlgProcOptionsPage(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPAR
GetDlgItemText(hwndDlg, IDC_REPLIES, tszReplies, length + 1);
tszReplies[length] = '\0';
{
- CMString replies = tszReplies;
+ CMStringW replies = tszReplies;
if (replies.Right(2) != L"\r\n")
replies.Append(L"\r\n");
diff --git a/plugins/Quotes/src/CommonOptionDlg.cpp b/plugins/Quotes/src/CommonOptionDlg.cpp
index e192f2f16a..d2edc48c16 100644
--- a/plugins/Quotes/src/CommonOptionDlg.cpp
+++ b/plugins/Quotes/src/CommonOptionDlg.cpp
@@ -205,13 +205,13 @@ void CommonOptionDlgProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp, CCommonDlgPr
db_set_w(NULL, QUOTES_MODULE_NAME, visitor.m_pszDbRefreshRateValue, nRefreshRate);
tstring s = get_window_text(::GetDlgItem(hWnd, IDC_EDIT_CONTACT_LIST_FORMAT));
- db_set_ts(NULL, QUOTES_MODULE_NAME, visitor.m_pszDbDisplayNameFormat, s.c_str());
+ db_set_ws(NULL, QUOTES_MODULE_NAME, visitor.m_pszDbDisplayNameFormat, s.c_str());
s = get_window_text(::GetDlgItem(hWnd, IDC_EDIT_STATUS_MESSAGE_FORMAT));
- db_set_ts(NULL, QUOTES_MODULE_NAME, visitor.m_pszDbStatusMsgFormat, s.c_str());
+ db_set_ws(NULL, QUOTES_MODULE_NAME, visitor.m_pszDbStatusMsgFormat, s.c_str());
s = get_window_text(::GetDlgItem(hWnd, IDC_EDIT_TENDENCY_FORMAT));
- db_set_ts(NULL, QUOTES_MODULE_NAME, visitor.m_pszDbTendencyFormat, s.c_str());
+ db_set_ws(NULL, QUOTES_MODULE_NAME, visitor.m_pszDbTendencyFormat, s.c_str());
CAdvProviderSettings* pAdvSet = get_adv_settings(rData.m_pQuotesProvider, false);
if (pAdvSet)
diff --git a/plugins/Quotes/src/CurrencyConverter.cpp b/plugins/Quotes/src/CurrencyConverter.cpp
index c86356aa27..faf1d09a3d 100644
--- a/plugins/Quotes/src/CurrencyConverter.cpp
+++ b/plugins/Quotes/src/CurrencyConverter.cpp
@@ -200,8 +200,8 @@ INT_PTR CALLBACK CurrencyConverterDlgProc(HWND hDlg, UINT msg, WPARAM wp, LPARAM
CQuotesProviderGoogle::CQuote from = rSection.GetQuote(nFrom);
CQuotesProviderGoogle::CQuote to = rSection.GetQuote(nTo);
- db_set_ts(NULL, QUOTES_MODULE_NAME, DB_STR_CC_QUOTE_FROM_ID, from.GetID().c_str());
- db_set_ts(NULL, QUOTES_MODULE_NAME, DB_STR_CC_QUOTE_TO_ID, to.GetID().c_str());
+ db_set_ws(NULL, QUOTES_MODULE_NAME, DB_STR_CC_QUOTE_FROM_ID, from.GetID().c_str());
+ db_set_ws(NULL, QUOTES_MODULE_NAME, DB_STR_CC_QUOTE_TO_ID, to.GetID().c_str());
const CQuotesProviderGoogle* pProvider = get_google_provider();
assert(pProvider);
diff --git a/plugins/Quotes/src/Forex.cpp b/plugins/Quotes/src/Forex.cpp
index 5ce786b6b5..6e353f15e6 100644
--- a/plugins/Quotes/src/Forex.cpp
+++ b/plugins/Quotes/src/Forex.cpp
@@ -77,7 +77,7 @@ INT_PTR QuotesMenu_EnableDisable(WPARAM, LPARAM)
void InitMenu()
{
CMenuItem mi;
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
mi.root = Menu_CreateRoot(MO_MAIN, LPGENW("Quotes"), 0, Quotes_GetIconHandle(IDI_ICON_MAIN));
Menu_ConfigureItem(mi.root, MCI_OPT_UID, "B474F556-22B6-42A1-A91E-22FE4F671388");
@@ -272,7 +272,7 @@ int QuotesEventFunc_OptInitialise(WPARAM wp, LPARAM/* lp*/)
odp.pwszTitle = _T(QUOTES_PROTOCOL_NAME);
odp.pwszGroup = LPGENW("Network");
odp.hIcon = Quotes_LoadIconEx(IDI_ICON_MAIN);
- odp.flags = ODPF_USERINFOTAB | ODPF_TCHAR;
+ odp.flags = ODPF_USERINFOTAB | ODPF_UNICODE;
std::for_each(rapProviders.begin(), rapProviders.end(), boost::bind(&IQuotesProvider::ShowPropertyPage, _1, wp, boost::ref(odp)));
return 0;
diff --git a/plugins/Quotes/src/HTTPSession.cpp b/plugins/Quotes/src/HTTPSession.cpp
index fb2ab0d62c..1d201389ca 100644
--- a/plugins/Quotes/src/HTTPSession.cpp
+++ b/plugins/Quotes/src/HTTPSession.cpp
@@ -34,7 +34,7 @@ public:
NETLIBUSER nlu = { 0 };
nlu.cbSize = sizeof(nlu);
- nlu.flags = NUF_OUTGOING | NUF_HTTPCONNS | NUF_NOHTTPSOPTION | NUF_TCHAR;
+ nlu.flags = NUF_OUTGOING | NUF_HTTPCONNS | NUF_NOHTTPSOPTION | NUF_UNICODE;
nlu.szSettingsModule = QUOTES_PROTOCOL_NAME;
nlu.ptszDescriptiveName = TranslateT("Quotes HTTP connections");
g_hNetLib = reinterpret_cast<HANDLE>(CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu));
diff --git a/plugins/Quotes/src/QuoteChart.cpp b/plugins/Quotes/src/QuoteChart.cpp
index 25aa422995..7075b0c5b6 100644
--- a/plugins/Quotes/src/QuoteChart.cpp
+++ b/plugins/Quotes/src/QuoteChart.cpp
@@ -209,7 +209,7 @@ INT_PTR CALLBACK ChartDlgProc(HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
static LPCTSTR szFilters[] = { LPGENW("All"), LPGENW("Last Day"), LPGENW("Last Week"), LPGENW("Last Month"), LPGENW("Last Year"), LPGENW("User-Defined") };
for (int i = 0; i < sizeof(szSources) / sizeof(szSources[0]); ++i) {
- LPCTSTR p = TranslateTS(szSources[i]);
+ LPCTSTR p = TranslateW(szSources[i]);
::SendDlgItemMessage(hDlg, IDC_COMBO_DATA_SOURCE, CB_INSERTSTRING, -1, reinterpret_cast<LPARAM>(p));
}
@@ -217,7 +217,7 @@ INT_PTR CALLBACK ChartDlgProc(HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
::SendDlgItemMessage(hDlg, IDC_COMBO_DATA_SOURCE, CB_SETCURSEL, nSel, 0);
for (int i = 0; i < sizeof(szFilters) / sizeof(szFilters[0]); ++i) {
- LPCTSTR p = TranslateTS(szSources[i]);
+ LPCTSTR p = TranslateW(szSources[i]);
::SendDlgItemMessage(hDlg, IDC_COMBO_FILTER, CB_INSERTSTRING, -1, reinterpret_cast<LPARAM>(szFilters[i]));
}
diff --git a/plugins/Quotes/src/QuotesProviderBase.cpp b/plugins/Quotes/src/QuotesProviderBase.cpp
index 7c058e6830..73937e2cf5 100644
--- a/plugins/Quotes/src/QuotesProviderBase.cpp
+++ b/plugins/Quotes/src/QuotesProviderBase.cpp
@@ -41,7 +41,7 @@ bool parse_quote(const IXMLNode::TXMLNodePtr& pTop, CQuotesProviderBase::CQuote&
}
}
- q = CQuotesProviderBase::CQuote(sID, TranslateTS(sSymbol.c_str()), TranslateTS(sDescription.c_str()));
+ q = CQuotesProviderBase::CQuote(sID, TranslateW(sSymbol.c_str()), TranslateW(sDescription.c_str()));
return true;
}
@@ -72,7 +72,7 @@ bool parse_section(const IXMLNode::TXMLNodePtr& pTop, CQuotesProviderBase::CQuot
}
}
- qs = CQuotesProviderBase::CQuoteSection(TranslateTS(sSectionName.c_str()), aSections, aQuotes);
+ qs = CQuotesProviderBase::CQuoteSection(TranslateW(sSectionName.c_str()), aSections, aQuotes);
return true;
}
@@ -224,7 +224,7 @@ void CQuotesProviderBase::SetContactStatus(MCONTACT hContact, int nNewStatus)
db_unset(hContact, LIST_MODULE_NAME, STATUS_MSG_NAME);
tstring sSymbol = Quotes_DBGetStringT(hContact, QUOTES_PROTOCOL_NAME, DB_STR_QUOTE_SYMBOL);
if (false == sSymbol.empty())
- db_set_ts(hContact, LIST_MODULE_NAME, CONTACT_LIST_NAME, sSymbol.c_str());
+ db_set_ws(hContact, LIST_MODULE_NAME, CONTACT_LIST_NAME, sSymbol.c_str());
SetContactExtraImage(hContact, eiEmpty);
}
@@ -550,7 +550,7 @@ void CQuotesProviderBase::WriteContactRate(MCONTACT hContact, double dRate, cons
time_t nTime = ::time(NULL);
if (false == rsSymbol.empty())
- db_set_ts(hContact, QUOTES_PROTOCOL_NAME, DB_STR_QUOTE_SYMBOL, rsSymbol.c_str());
+ db_set_ws(hContact, QUOTES_PROTOCOL_NAME, DB_STR_QUOTE_SYMBOL, rsSymbol.c_str());
double dPrev = 0.0;
bool bValidPrev = Quotes_DBReadDouble(hContact, QUOTES_PROTOCOL_NAME, DB_STR_QUOTE_CURR_VALUE, dPrev);
@@ -579,11 +579,11 @@ void CQuotesProviderBase::WriteContactRate(MCONTACT hContact, double dRate, cons
if (true == tendency.Parse(this, m_sTendencyFormat, hContact))
do_set_contact_extra_icon(hContact, tendency);
- db_set_ts(hContact, LIST_MODULE_NAME, CONTACT_LIST_NAME, oNick.str().c_str());
+ db_set_ws(hContact, LIST_MODULE_NAME, CONTACT_LIST_NAME, oNick.str().c_str());
tstring sStatusMsg = format_rate(this, hContact, m_sStatusMsgFormat);
if (false == sStatusMsg.empty())
- db_set_ts(hContact, LIST_MODULE_NAME, STATUS_MSG_NAME, sStatusMsg.c_str());
+ db_set_ws(hContact, LIST_MODULE_NAME, STATUS_MSG_NAME, sStatusMsg.c_str());
else
db_unset(hContact, LIST_MODULE_NAME, STATUS_MSG_NAME);
@@ -666,9 +666,9 @@ MCONTACT CQuotesProviderBase::CreateNewContact(const tstring& rsName)
if (hContact) {
if (0 == Proto_AddToContact(hContact, QUOTES_PROTOCOL_NAME)) {
tstring sProvName = GetInfo().m_sName;
- db_set_ts(hContact, QUOTES_PROTOCOL_NAME, DB_STR_QUOTE_PROVIDER, sProvName.c_str());
- db_set_ts(hContact, QUOTES_PROTOCOL_NAME, DB_STR_QUOTE_SYMBOL, rsName.c_str());
- db_set_ts(hContact, LIST_MODULE_NAME, CONTACT_LIST_NAME, rsName.c_str());
+ db_set_ws(hContact, QUOTES_PROTOCOL_NAME, DB_STR_QUOTE_PROVIDER, sProvName.c_str());
+ db_set_ws(hContact, QUOTES_PROTOCOL_NAME, DB_STR_QUOTE_SYMBOL, rsName.c_str());
+ db_set_ws(hContact, LIST_MODULE_NAME, CONTACT_LIST_NAME, rsName.c_str());
mir_cslock lck(m_cs);
m_aContacts.push_back(hContact);
diff --git a/plugins/Quotes/src/QuotesProviderDukasCopy.cpp b/plugins/Quotes/src/QuotesProviderDukasCopy.cpp
index 8ecfcf1498..8119521bd1 100644
--- a/plugins/Quotes/src/QuotesProviderDukasCopy.cpp
+++ b/plugins/Quotes/src/QuotesProviderDukasCopy.cpp
@@ -44,9 +44,9 @@ bool CQuotesProviderDukasCopy::WatchForQuote(const CQuote& rQuote, bool bWatch)
else if ((true == bWatch) && (i == m_aContacts.end())) {
MCONTACT hContact = CreateNewContact(rQuote.GetSymbol());
if (hContact) {
- db_set_ts(hContact, QUOTES_PROTOCOL_NAME, DB_STR_QUOTE_ID, sQuoteID.c_str());
+ db_set_ws(hContact, QUOTES_PROTOCOL_NAME, DB_STR_QUOTE_ID, sQuoteID.c_str());
if (false == rQuote.GetName().empty()) {
- db_set_ts(hContact, QUOTES_PROTOCOL_NAME, DB_STR_QUOTE_DESCRIPTION, rQuote.GetName().c_str());
+ db_set_ws(hContact, QUOTES_PROTOCOL_NAME, DB_STR_QUOTE_DESCRIPTION, rQuote.GetName().c_str());
}
return true;
diff --git a/plugins/Quotes/src/QuotesProviderFinance.cpp b/plugins/Quotes/src/QuotesProviderFinance.cpp
index 9f02e9e2b2..ada9936e77 100644
--- a/plugins/Quotes/src/QuotesProviderFinance.cpp
+++ b/plugins/Quotes/src/QuotesProviderFinance.cpp
@@ -44,9 +44,9 @@ bool CQuotesProviderFinance::WatchForQuote(const CQuote& rQuote, bool bWatch)
if (bWatch && i == m_aContacts.end()) {
MCONTACT hContact = CreateNewContact(rQuote.GetSymbol());
if (hContact) {
- db_set_ts(hContact, QUOTES_PROTOCOL_NAME, DB_STR_QUOTE_ID, sQuoteID.c_str());
+ db_set_ws(hContact, QUOTES_PROTOCOL_NAME, DB_STR_QUOTE_ID, sQuoteID.c_str());
if (false == rQuote.GetName().empty())
- db_set_ts(hContact, QUOTES_PROTOCOL_NAME, DB_STR_QUOTE_DESCRIPTION, rQuote.GetName().c_str());
+ db_set_ws(hContact, QUOTES_PROTOCOL_NAME, DB_STR_QUOTE_DESCRIPTION, rQuote.GetName().c_str());
return true;
}
diff --git a/plugins/Quotes/src/QuotesProviderGoogle.cpp b/plugins/Quotes/src/QuotesProviderGoogle.cpp
index a124a1b002..555081c72c 100644
--- a/plugins/Quotes/src/QuotesProviderGoogle.cpp
+++ b/plugins/Quotes/src/QuotesProviderGoogle.cpp
@@ -34,13 +34,13 @@ bool CQuotesProviderGoogle::WatchForRate(const CRateInfo& ri,
tstring sName = make_contact_name(ri.m_from.GetSymbol(), ri.m_to.GetSymbol());
MCONTACT hContact = CreateNewContact(sName);
if (hContact) {
- db_set_ts(hContact, QUOTES_PROTOCOL_NAME, DB_STR_FROM_ID, ri.m_from.GetID().c_str());
- db_set_ts(hContact, QUOTES_PROTOCOL_NAME, DB_STR_TO_ID, ri.m_to.GetID().c_str());
+ db_set_ws(hContact, QUOTES_PROTOCOL_NAME, DB_STR_FROM_ID, ri.m_from.GetID().c_str());
+ db_set_ws(hContact, QUOTES_PROTOCOL_NAME, DB_STR_TO_ID, ri.m_to.GetID().c_str());
if (false == ri.m_from.GetName().empty()) {
- db_set_ts(hContact, QUOTES_PROTOCOL_NAME, DB_STR_FROM_DESCRIPTION, ri.m_from.GetName().c_str());
+ db_set_ws(hContact, QUOTES_PROTOCOL_NAME, DB_STR_FROM_DESCRIPTION, ri.m_from.GetName().c_str());
}
if (false == ri.m_to.GetName().empty()) {
- db_set_ts(hContact, QUOTES_PROTOCOL_NAME, DB_STR_TO_DESCRIPTION, ri.m_to.GetName().c_str());
+ db_set_ws(hContact, QUOTES_PROTOCOL_NAME, DB_STR_TO_DESCRIPTION, ri.m_to.GetName().c_str());
}
return true;
diff --git a/plugins/Quotes/src/QuotesProviderGoogleFinance.cpp b/plugins/Quotes/src/QuotesProviderGoogleFinance.cpp
index 4b18bdf7ac..253fe16172 100644
--- a/plugins/Quotes/src/QuotesProviderGoogleFinance.cpp
+++ b/plugins/Quotes/src/QuotesProviderGoogleFinance.cpp
@@ -266,7 +266,7 @@ void CQuotesProviderGoogleFinance::RefreshQuotes(TContracts& anContacts)
Quotes_DBWriteDouble(hContact, QUOTES_MODULE_NAME, DB_STR_GOOGLE_FINANCE_PERCENT_CHANGE_TO_YERSTERDAY_CLOSE, Info.m_dPercentChangeToYersterdayClose);
}
if (false == Info.m_sCmpName.empty()) {
- db_set_ts(hContact, QUOTES_MODULE_NAME, DB_STR_QUOTE_DESCRIPTION, Info.m_sCmpName.c_str());
+ db_set_ws(hContact, QUOTES_MODULE_NAME, DB_STR_QUOTE_DESCRIPTION, Info.m_sCmpName.c_str());
}
WriteContactRate(hContact, Info.m_dRate);
diff --git a/plugins/Quotes/src/QuotesProviderYahoo.cpp b/plugins/Quotes/src/QuotesProviderYahoo.cpp
index cef09471c2..4950acd78c 100644
--- a/plugins/Quotes/src/QuotesProviderYahoo.cpp
+++ b/plugins/Quotes/src/QuotesProviderYahoo.cpp
@@ -43,7 +43,7 @@ bool get_double_from_parsed_line(MCONTACT hContact, const TStrings& rasParsedLin
return Quotes_DBWriteDouble(hContact, QUOTES_MODULE_NAME, pszDbName, d);
}
- db_set_ts(hContact, QUOTES_MODULE_NAME, pszDbName, L"");
+ db_set_ws(hContact, QUOTES_MODULE_NAME, pszDbName, L"");
return false;
}
@@ -121,7 +121,7 @@ void CQuotesProviderYahoo::RefreshQuotes(TContracts& anContacts)
MCONTACT hContact = it3->second;
double dRate = 0.0;
if (true == t2d(asStrings[indexLastTrade], dRate)) {
- db_set_ts(hContact, QUOTES_MODULE_NAME, DB_STR_QUOTE_DESCRIPTION, asStrings[indexName].c_str());
+ db_set_ws(hContact, QUOTES_MODULE_NAME, DB_STR_QUOTE_DESCRIPTION, asStrings[indexName].c_str());
get_double_from_parsed_line(hContact, asStrings, indexOpen, DB_STR_YAHOO_OPEN_VALUE);
get_double_from_parsed_line(hContact, asStrings, indexDayHigh, DB_STR_YAHOO_DAY_HIGH);
diff --git a/plugins/Quotes/src/SettingsDlg.cpp b/plugins/Quotes/src/SettingsDlg.cpp
index c11f038809..c0f877685d 100644
--- a/plugins/Quotes/src/SettingsDlg.cpp
+++ b/plugins/Quotes/src/SettingsDlg.cpp
@@ -87,7 +87,7 @@ std::vector<wchar_t> get_filter()
std::vector<wchar_t> aFilter;
LPCTSTR pszFilterParts[] = { LPGENW("Log Files (*.txt,*.log)"), L"*.txt;*.log", LPGENW("All files (*.*)"), L"*.*" };
for (int i = 0; i < sizeof(pszFilterParts) / sizeof(pszFilterParts[0]); ++i) {
- tstring sPart = TranslateTS(pszFilterParts[i]);
+ tstring sPart = TranslateW(pszFilterParts[i]);
std::copy(sPart.begin(), sPart.end(), std::back_inserter(aFilter));
aFilter.push_back('\0');
@@ -422,10 +422,10 @@ INT_PTR CALLBACK EditSettingsPerContactDlgProc(HWND hWnd, UINT msg, WPARAM wp, L
db_set_w(hContact, QUOTES_PROTOCOL_NAME, DB_STR_QUOTE_LOG_FILE_CONDITION, nIfChangedFile);
db_set_w(hContact, QUOTES_PROTOCOL_NAME, DB_STR_QUOTE_HISTORY_CONDITION, nIfChangedHistory);
db_set_b(hContact, QUOTES_PROTOCOL_NAME, DB_STR_QUOTE_POPUP_CONDITION, bIfChangedPopup);
- db_set_ts(hContact, QUOTES_PROTOCOL_NAME, DB_STR_QUOTE_LOG_FILE, sLogFile.c_str());
- db_set_ts(hContact, QUOTES_PROTOCOL_NAME, DB_STR_QUOTE_FORMAT_LOG_FILE, sLogFileFormat.c_str());
- db_set_ts(hContact, QUOTES_PROTOCOL_NAME, DB_STR_QUOTE_FORMAT_HISTORY, sHistoryFormat.c_str());
- db_set_ts(hContact, QUOTES_PROTOCOL_NAME, DB_STR_QUOTE_FORMAT_POPUP, sPopupFormat.c_str());
+ db_set_ws(hContact, QUOTES_PROTOCOL_NAME, DB_STR_QUOTE_LOG_FILE, sLogFile.c_str());
+ db_set_ws(hContact, QUOTES_PROTOCOL_NAME, DB_STR_QUOTE_FORMAT_LOG_FILE, sLogFileFormat.c_str());
+ db_set_ws(hContact, QUOTES_PROTOCOL_NAME, DB_STR_QUOTE_FORMAT_HISTORY, sHistoryFormat.c_str());
+ db_set_ws(hContact, QUOTES_PROTOCOL_NAME, DB_STR_QUOTE_FORMAT_POPUP, sPopupFormat.c_str());
if (pParam->m_pPopupSettings) {
pParam->m_pPopupSettings->SaveForContact(hContact);
@@ -704,12 +704,12 @@ void CAdvProviderSettings::SaveToDb()const
assert(visitor.m_pszDbPopupHistoryFlag);
db_set_w(NULL, QUOTES_PROTOCOL_NAME, visitor.m_pszDbLogMode, m_wLogMode);
- db_set_ts(NULL, QUOTES_PROTOCOL_NAME, visitor.m_pszDbHistoryFormat, m_sFormatHistory.c_str());
+ db_set_ws(NULL, QUOTES_PROTOCOL_NAME, visitor.m_pszDbHistoryFormat, m_sFormatHistory.c_str());
db_set_b(NULL, QUOTES_PROTOCOL_NAME, visitor.m_pszDbHistoryCondition, m_bIsOnlyChangedHistory);
- db_set_ts(NULL, QUOTES_PROTOCOL_NAME, visitor.m_pszDbLogFile, m_sLogFileName.c_str());
- db_set_ts(NULL, QUOTES_PROTOCOL_NAME, visitor.m_pszDbLogFormat, m_sFormatLogFile.c_str());
+ db_set_ws(NULL, QUOTES_PROTOCOL_NAME, visitor.m_pszDbLogFile, m_sLogFileName.c_str());
+ db_set_ws(NULL, QUOTES_PROTOCOL_NAME, visitor.m_pszDbLogFormat, m_sFormatLogFile.c_str());
db_set_b(NULL, QUOTES_PROTOCOL_NAME, visitor.m_pszDbLogCondition, m_bIsOnlyChangedLogFile);
- db_set_ts(NULL, QUOTES_PROTOCOL_NAME, visitor.m_pszDbPopupFormat, m_sPopupFormat.c_str());
+ db_set_ws(NULL, QUOTES_PROTOCOL_NAME, visitor.m_pszDbPopupFormat, m_sPopupFormat.c_str());
db_set_b(NULL, QUOTES_PROTOCOL_NAME, visitor.m_pszDbPopupCondition, m_bShowPopupIfValueChanged);
if (nullptr != m_pPopupSettings) {
diff --git a/plugins/SMS/src/SMS_svc.cpp b/plugins/SMS/src/SMS_svc.cpp
index 3ad9cc6b53..31ccea8fdf 100644
--- a/plugins/SMS/src/SMS_svc.cpp
+++ b/plugins/SMS/src/SMS_svc.cpp
@@ -34,7 +34,7 @@ int LoadModules(void)
mi.hIcolibItem = Skin_LoadIcon(SKINICON_OTHER_SMS);
mi.name.w = SMS_SEND_STR;
mi.pszService = szServiceFunction;
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
Menu_AddMainMenuItem(&mi);
SET_UID(mi, 0x736e4cff, 0x769e, 0x45dc, 0x8b, 0x78, 0x83, 0xf9, 0xe4, 0xbb, 0x81, 0x9e);
@@ -42,7 +42,7 @@ int LoadModules(void)
mi.hIcolibItem = Skin_LoadIcon(SKINICON_OTHER_SMS);
mi.name.w = SMS_SEND_CM_STR;
mi.pszService = szServiceFunction;
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
ssSMSSettings.hContactMenuItems[0] = Menu_AddContactMenuItem(&mi);
SkinAddNewSoundEx("RecvSMSMsg", PROTOCOL_NAMEA, LPGEN("Incoming SMS Message"));
diff --git a/plugins/Scriver/src/chat/options.cpp b/plugins/Scriver/src/chat/options.cpp
index 985077fde9..4063da39ae 100644
--- a/plugins/Scriver/src/chat/options.cpp
+++ b/plugins/Scriver/src/chat/options.cpp
@@ -113,7 +113,7 @@ static HTREEITEM InsertBranch(HWND hwndTree, wchar_t* pszDescr, BOOL bExpanded)
tvis.hParent = NULL;
tvis.hInsertAfter = TVI_LAST;
tvis.item.mask = TVIF_TEXT | TVIF_STATE;
- tvis.item.pszText = TranslateTS(pszDescr);
+ tvis.item.pszText = TranslateW(pszDescr);
tvis.item.stateMask = bExpanded ? TVIS_STATEIMAGEMASK | TVIS_EXPANDED : TVIS_STATEIMAGEMASK;
tvis.item.state = bExpanded ? INDEXTOSTATEIMAGEMASK(1) | TVIS_EXPANDED : INDEXTOSTATEIMAGEMASK(1);
return TreeView_InsertItem(hwndTree, &tvis);
@@ -128,7 +128,7 @@ static void FillBranch(HWND hwndTree, HTREEITEM hParent, struct branch_t *branch
tvis.hInsertAfter = TVI_LAST;
tvis.item.mask = TVIF_TEXT | TVIF_STATE;
for (int i = 0; i < nValues; i++) {
- tvis.item.pszText = TranslateTS(branch[i].szDescr);
+ tvis.item.pszText = TranslateW(branch[i].szDescr);
tvis.item.stateMask = TVIS_STATEIMAGEMASK;
if (branch[i].iMode)
iState = ((db_get_dw(NULL, CHAT_MODULE, branch[i].szDBName, defaultval)&branch[i].iMode)&branch[i].iMode) != 0 ? 2 : 1;
@@ -225,7 +225,7 @@ static INT CALLBACK BrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lp, LPARAM p
static void InitSetting(wchar_t **ppPointer, char *pszSetting, wchar_t *pszDefault)
{
DBVARIANT dbv;
- if ( !db_get_ts(NULL, CHAT_MODULE, pszSetting, &dbv )) {
+ if ( !db_get_ws(NULL, CHAT_MODULE, pszSetting, &dbv )) {
replaceStrW(*ppPointer, dbv.ptszVal);
db_free(&dbv);
}
@@ -529,7 +529,7 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lPa
*p2 = ' ';
p2 = wcschr(ptszText, (wchar_t)',');
}
- db_set_ts(NULL, CHAT_MODULE, "HighlightWords", ptszText);
+ db_set_ws(NULL, CHAT_MODULE, "HighlightWords", ptszText);
mir_free(ptszText);
}
}
@@ -539,7 +539,7 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lPa
if (iLen > 0) {
wchar_t *pszText1 = (wchar_t*)malloc(iLen*sizeof(wchar_t)+2);
GetDlgItemText(hwndDlg, IDC_CHAT_LOGDIRECTORY, pszText1, iLen + 1);
- db_set_ts(NULL, CHAT_MODULE, "LogDirectory", pszText1);
+ db_set_ws(NULL, CHAT_MODULE, "LogDirectory", pszText1);
free(pszText1);
}
else {
diff --git a/plugins/Scriver/src/chat/tools.cpp b/plugins/Scriver/src/chat/tools.cpp
index 3b9c78291c..7b002430ff 100644
--- a/plugins/Scriver/src/chat/tools.cpp
+++ b/plugins/Scriver/src/chat/tools.cpp
@@ -79,7 +79,7 @@ UINT CreateGCMenu(HWND hwnd, HMENU *hMenu, int iIndex, POINT pt, SESSION_INFO *s
AppendMenu(*hMenu, MF_SEPARATOR, 0, 0);
for (int i = 0; i < gcmi.nItems; i++) {
- wchar_t *ptszText = TranslateTS(gcmi.Item[i].pszDesc);
+ wchar_t *ptszText = TranslateW(gcmi.Item[i].pszDesc);
DWORD dwState = gcmi.Item[i].bDisabled ? MF_GRAYED : 0;
if (gcmi.Item[i].uType == MENU_NEWPOPUP) {
diff --git a/plugins/Scriver/src/chat/window.cpp b/plugins/Scriver/src/chat/window.cpp
index 0be7880de0..565a5f8111 100644
--- a/plugins/Scriver/src/chat/window.cpp
+++ b/plugins/Scriver/src/chat/window.cpp
@@ -1706,7 +1706,7 @@ LABEL_SHOWWINDOW:
// takes pszRtf to a queue, no leak here
si->cmdList = tcmdlist_append(si->cmdList, pszRtf, 20, FALSE);
- CMString ptszText(ptrW(mir_utf8decodeW(pszRtf)));
+ CMStringW ptszText(ptrW(mir_utf8decodeW(pszRtf)));
pci->DoRtfToTags(ptszText, mi->nColorCount, mi->crColors);
ptszText.Trim();
ptszText.Replace(L"%", L"%%");
@@ -1907,7 +1907,7 @@ LABEL_SHOWWINDOW:
mii.wID = i + 1;
mii.dwItemData = (ULONG_PTR)g_dat.hChatButtonIconList;
mii.hbmpItem = HBMMENU_CALLBACK;
- mii.dwTypeData = TranslateTS((toolbarButtons[i].name));
+ mii.dwTypeData = TranslateW((toolbarButtons[i].name));
InsertMenuItem(hToolbarMenu, i, TRUE, &mii);
}
diff --git a/plugins/Scriver/src/infobar.cpp b/plugins/Scriver/src/infobar.cpp
index 8ff69e1288..764bbdd844 100644
--- a/plugins/Scriver/src/infobar.cpp
+++ b/plugins/Scriver/src/infobar.cpp
@@ -79,16 +79,16 @@ void RefreshInfobar(InfobarWindowData* idat)
{
HWND hwnd = idat->hWnd;
SrmmWindowData *dat = idat->mwd;
- ptrW szContactStatusMsg(db_get_tsa(dat->hContact, "CList", "StatusMsg"));
- ptrW szXStatusName(db_get_tsa(idat->mwd->hContact, idat->mwd->szProto, "XStatusName"));
- ptrW szXStatusMsg(db_get_tsa(idat->mwd->hContact, idat->mwd->szProto, "XStatusMsg"));
+ ptrW szContactStatusMsg(db_get_wsa(dat->hContact, "CList", "StatusMsg"));
+ ptrW szXStatusName(db_get_wsa(idat->mwd->hContact, idat->mwd->szProto, "XStatusName"));
+ ptrW szXStatusMsg(db_get_wsa(idat->mwd->hContact, idat->mwd->szProto, "XStatusMsg"));
HICON hIcon = GetExtraStatusIcon(idat);
wchar_t szText[2048];
SETTEXTEX st;
if (szXStatusMsg && *szXStatusMsg)
- mir_snwprintf(szText, L"%s (%s)", TranslateTS(szXStatusName), szXStatusMsg);
+ mir_snwprintf(szText, L"%s (%s)", TranslateW(szXStatusName), szXStatusMsg);
else
- wcsncpy_s(szText, TranslateTS(szXStatusName), _TRUNCATE);
+ wcsncpy_s(szText, TranslateW(szXStatusName), _TRUNCATE);
st.flags = ST_DEFAULT;
st.codepage = 1200;
SendDlgItemMessage(hwnd, IDC_INFOBAR_NAME, EM_SETTEXTEX, (WPARAM)&st, (LPARAM)pcli->pfnGetContactDisplayName(dat->hContact, 0));
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp
index 5aab926147..e1ddf07e4e 100644
--- a/plugins/Scriver/src/msgdialog.cpp
+++ b/plugins/Scriver/src/msgdialog.cpp
@@ -759,7 +759,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
SetDlgItemTextA(hwndDlg, IDC_MESSAGE, newData->szInitialText);
}
else if (g_dat.flags & SMF_SAVEDRAFTS) {
- ptrW ptszSavedMsg(db_get_tsa(dat->hContact, "SRMM", "SavedMsg"));
+ ptrW ptszSavedMsg(db_get_wsa(dat->hContact, "SRMM", "SavedMsg"));
if (ptszSavedMsg)
len = SetRichText(GetDlgItem(hwndDlg, IDC_MESSAGE), ptszSavedMsg);
PostMessage(GetDlgItem(hwndDlg, IDC_MESSAGE), EM_SETSEL, len, len);
@@ -931,7 +931,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
mii.wID = i + 1;
mii.dwItemData = (ULONG_PTR)g_dat.hButtonIconList;
mii.hbmpItem = HBMMENU_CALLBACK;
- mii.dwTypeData = TranslateTS((toolbarButtons[i].name));
+ mii.dwTypeData = TranslateW((toolbarButtons[i].name));
InsertMenuItem(hToolbarMenu, i, TRUE, &mii);
}
{
@@ -1670,7 +1670,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
dbei.pBlob = (PBYTE)mir_alloc(dbei.cbBlob);
db_event_get(dat->hDbEventLast, &dbei);
if (DbEventIsMessageOrCustom(&dbei)) {
- buffer = DbGetEventTextT(&dbei, CP_ACP);
+ buffer = DbGetEventTextW(&dbei, CP_ACP);
if (buffer != NULL) {
wchar_t *quotedBuffer = GetQuotedTextW(buffer);
SendDlgItemMessage(hwndDlg, IDC_MESSAGE, EM_SETTEXTEX, (WPARAM)&st, (LPARAM)quotedBuffer);
diff --git a/plugins/Scriver/src/msglog.cpp b/plugins/Scriver/src/msglog.cpp
index f75057670b..b890d7f12b 100644
--- a/plugins/Scriver/src/msglog.cpp
+++ b/plugins/Scriver/src/msglog.cpp
@@ -156,7 +156,7 @@ EventData* getEventFromDB(SrmmWindowData *dat, MCONTACT hContact, MEVENT hDbEven
if (*descr != 0)
evt->pszText2T = DbGetEventStringT(&dbei, descr);
}
- else evt->pszTextT = DbGetEventTextT(&dbei, CP_UTF8);
+ else evt->pszTextT = DbGetEventTextW(&dbei, CP_UTF8);
if (!(dat->flags & SMF_RTL) && RTL_Detect(evt->pszTextT))
evt->dwFlags |= IEEDF_RTL;
diff --git a/plugins/Scriver/src/msgoptions.cpp b/plugins/Scriver/src/msgoptions.cpp
index 6685fdc099..98198af1a6 100644
--- a/plugins/Scriver/src/msgoptions.cpp
+++ b/plugins/Scriver/src/msgoptions.cpp
@@ -105,7 +105,7 @@ int FontServiceFontsChanged(WPARAM, LPARAM)
void RegisterFontServiceFonts()
{
- FontIDT fid = { sizeof(fid) };
+ FontIDW fid = { sizeof(fid) };
wcsncpy_s(fid.group, LPGENW("Messaging"), _TRUNCATE);
wcsncpy_s(fid.backgroundGroup, LPGENW("Messaging"), _TRUNCATE);
strncpy(fid.dbSettingsGroup, SRMMMOD, _countof(fid.dbSettingsGroup));
@@ -123,10 +123,10 @@ void RegisterFontServiceFonts()
fid.deffontsettings.charset = DEFAULT_CHARSET;
wcsncpy(fid.deffontsettings.szFace, fontOptionsList[i].szDefFace, _countof(fid.deffontsettings.szFace));
wcsncpy(fid.backgroundName, fontOptionsList[i].szBkgName, _countof(fid.backgroundName));
- FontRegisterT(&fid);
+ FontRegisterW(&fid);
}
- ColourIDT cid = { sizeof(cid) };
+ ColourIDW cid = { sizeof(cid) };
wcsncpy_s(cid.group, LPGENW("Messaging"), _TRUNCATE);
strncpy(cid.dbSettingsGroup, SRMMMOD, _countof(fid.dbSettingsGroup));
cid.flags = 0;
@@ -139,7 +139,7 @@ void RegisterFontServiceFonts()
cid.defcolour = colourOptionsList[i].defColour;
strncpy(cid.setting, colourOptionsList[i].szSettingName, _countof(cid.setting));
- ColourRegisterT(&cid);
+ ColourRegisterW(&cid);
}
}
@@ -188,7 +188,7 @@ void LoadMsgDlgFont(int i, LOGFONT *lf, COLORREF *colour)
lf->lfPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE;
mir_snprintf(str, "%s%d", "SRMFont", i);
- ptrW tszFace(db_get_tsa(NULL, SRMMMOD, str));
+ ptrW tszFace(db_get_wsa(NULL, SRMMMOD, str));
if (tszFace == NULL)
mir_wstrcpy(lf->lfFaceName, fontOptionsList[i].szDefFace);
else
@@ -227,7 +227,7 @@ static void FillCheckBoxTree(HWND hwndTree, const struct CheckBoxValues_t *value
tvis.item.mask = TVIF_PARAM | TVIF_TEXT | TVIF_STATE;
for (int i = 0; i < nValues; i++) {
tvis.item.lParam = values[i].style;
- tvis.item.pszText = TranslateTS(values[i].szDescr);
+ tvis.item.pszText = TranslateW(values[i].szDescr);
tvis.item.stateMask = TVIS_STATEIMAGEMASK;
tvis.item.state = INDEXTOSTATEIMAGEMASK((style & tvis.item.lParam) != 0 ? 2 : 1);
TreeView_InsertItem(hwndTree, &tvis);
diff --git a/plugins/Scriver/src/msgwindow.cpp b/plugins/Scriver/src/msgwindow.cpp
index 8744cb1b64..0443ba8534 100644
--- a/plugins/Scriver/src/msgwindow.cpp
+++ b/plugins/Scriver/src/msgwindow.cpp
@@ -40,12 +40,12 @@ wchar_t* GetWindowTitle(MCONTACT hContact, const char *szProto)
ptrW tmplt;
const wchar_t* tokens[4] = { 0 };
- CMString tszTemplate, tszStatus, tszTitle;
+ CMStringW tszTemplate, tszStatus, tszTitle;
if (hContact && szProto) {
tokens[0] = pcli->pfnGetContactDisplayName(hContact, 0);
tokens[1] = pcli->pfnGetStatusModeDescription(db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE), 0);
- tszStatus = ptrW(db_get_tsa(hContact, "CList", "StatusMsg"));
+ tszStatus = ptrW(db_get_wsa(hContact, "CList", "StatusMsg"));
tszStatus.Replace(L"\r\n", L" ");
tokens[2] = tszStatus;
@@ -56,7 +56,7 @@ wchar_t* GetWindowTitle(MCONTACT hContact, const char *szProto)
tokens[3] = mir_wstrdup(proto->tszAccountName);
}
- tmplt = db_get_tsa(NULL, SRMMMOD, SRMSGSET_WINDOWTITLE);
+ tmplt = db_get_wsa(NULL, SRMMMOD, SRMSGSET_WINDOWTITLE);
if (tmplt != NULL)
tszTemplate = tmplt;
else {
diff --git a/plugins/SeenPlugin/src/file.cpp b/plugins/SeenPlugin/src/file.cpp
index bd61b7a820..411d85a71e 100644
--- a/plugins/SeenPlugin/src/file.cpp
+++ b/plugins/SeenPlugin/src/file.cpp
@@ -30,17 +30,17 @@ static wchar_t *g_ptszFileStamp, *g_ptszFileName;
void InitFileOutput(void)
{
- ptrW tszFileName(db_get_tsa(NULL, S_MOD, "FileName"));
+ ptrW tszFileName(db_get_wsa(NULL, S_MOD, "FileName"));
if (tszFileName == NULL)
tszFileName = mir_wstrdup(DEFAULT_FILENAME);
- replaceStrW(g_ptszFileName, VARST(tszFileName));
+ replaceStrW(g_ptszFileName, VARSW(tszFileName));
wchar_t *tszPath = NEWWSTR_ALLOCA(g_ptszFileName);
wchar_t *p = wcsrchr(tszPath, '\\');
if (p) *p = 0;
- CreateDirectoryTreeT(tszPath);
+ CreateDirectoryTreeW(tszPath);
- ptrW tszFileStamp(db_get_tsa(NULL, S_MOD, "FileStamp"));
+ ptrW tszFileStamp(db_get_wsa(NULL, S_MOD, "FileStamp"));
replaceStrW(g_ptszFileStamp, (tszFileStamp == NULL) ? DEFAULT_FILESTAMP : tszFileStamp);
}
diff --git a/plugins/SeenPlugin/src/history.cpp b/plugins/SeenPlugin/src/history.cpp
index a89a7f2ce3..84639ea0a6 100644
--- a/plugins/SeenPlugin/src/history.cpp
+++ b/plugins/SeenPlugin/src/history.cpp
@@ -52,12 +52,12 @@ void HistoryWrite(MCONTACT hContact)
wchar_t *ptszString;
DBVARIANT dbv;
- if (!db_get_ts(NULL, S_MOD, "HistoryStamp", &dbv)) {
+ if (!db_get_ws(NULL, S_MOD, "HistoryStamp", &dbv)) {
ptszString = ParseString(dbv.ptszVal, hContact);
db_free(&dbv);
}
else ptszString = ParseString(DEFAULT_HISTORYSTAMP, hContact);
- db_set_ts(hContact, S_MOD, BuildSetting(historyLast), ptszString);
+ db_set_ws(hContact, S_MOD, BuildSetting(historyLast), ptszString);
historyLast = (historyLast + 1) % historyMax;
db_set_w(hContact, S_MOD, "HistoryLast", historyLast);
@@ -88,7 +88,7 @@ void LoadHistoryList(MCONTACT hContact, HWND hwnd, int nList)
i = (i - 1 + historyMax) % historyMax;
DBVARIANT dbv;
- if (!db_get_ts(hContact, S_MOD, BuildSetting(i), &dbv)) {
+ if (!db_get_ws(hContact, S_MOD, BuildSetting(i), &dbv)) {
SendDlgItemMessage(hwnd, nList, LB_ADDSTRING, 0, (LPARAM)dbv.ptszVal);
db_free(&dbv);
}
@@ -188,9 +188,9 @@ INT_PTR CALLBACK HistoryDlgProc(HWND hwndDlg, UINT Message, WPARAM wparam, LPARA
SendDlgItemMessage(hwndDlg, IDC_SENDMSG, BM_SETIMAGE, IMAGE_ICON, (WPARAM)Skin_LoadIcon(SKINICON_EVENT_MESSAGE));
//set-up tooltips
- SendDlgItemMessage(hwndDlg, IDC_DETAILS, BUTTONADDTOOLTIP, (WPARAM)TranslateT("View User's Details"), BATF_TCHAR);
- SendDlgItemMessage(hwndDlg, IDC_USERMENU, BUTTONADDTOOLTIP, (WPARAM)TranslateT("User Menu"), BATF_TCHAR);
- SendDlgItemMessage(hwndDlg, IDC_SENDMSG, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Send Instant Message"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_DETAILS, BUTTONADDTOOLTIP, (WPARAM)TranslateT("View User's Details"), BATF_UNICODE);
+ SendDlgItemMessage(hwndDlg, IDC_USERMENU, BUTTONADDTOOLTIP, (WPARAM)TranslateT("User Menu"), BATF_UNICODE);
+ SendDlgItemMessage(hwndDlg, IDC_SENDMSG, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Send Instant Message"), BATF_UNICODE);
Utils_RestoreWindowPositionNoMove(hwndDlg, NULL, S_MOD, "History_");
ShowWindow(hwndDlg, SW_SHOW);
diff --git a/plugins/SeenPlugin/src/main.cpp b/plugins/SeenPlugin/src/main.cpp
index cb98026c61..5ab4b3e6eb 100644
--- a/plugins/SeenPlugin/src/main.cpp
+++ b/plugins/SeenPlugin/src/main.cpp
@@ -104,10 +104,10 @@ extern "C" __declspec(dllexport) int Load(void)
LoadWatchedProtos();
- SkinAddNewSoundExT("LastSeenTrackedStatusChange", LPGENW("LastSeen"), LPGENW("User status change"));
- SkinAddNewSoundExT("LastSeenTrackedStatusOnline", LPGENW("LastSeen"), LPGENW("Changed to Online"));
- SkinAddNewSoundExT("LastSeenTrackedStatusOffline", LPGENW("LastSeen"), LPGENW("User Logged Off"));
- SkinAddNewSoundExT("LastSeenTrackedStatusFromOffline", LPGENW("LastSeen"), LPGENW("User Logged In"));
+ SkinAddNewSoundExW("LastSeenTrackedStatusChange", LPGENW("LastSeen"), LPGENW("User status change"));
+ SkinAddNewSoundExW("LastSeenTrackedStatusOnline", LPGENW("LastSeen"), LPGENW("Changed to Online"));
+ SkinAddNewSoundExW("LastSeenTrackedStatusOffline", LPGENW("LastSeen"), LPGENW("User Logged Off"));
+ SkinAddNewSoundExW("LastSeenTrackedStatusFromOffline", LPGENW("LastSeen"), LPGENW("User Logged In"));
return 0;
}
diff --git a/plugins/SeenPlugin/src/menu.cpp b/plugins/SeenPlugin/src/menu.cpp
index b2728560d2..c8e9777004 100644
--- a/plugins/SeenPlugin/src/menu.cpp
+++ b/plugins/SeenPlugin/src/menu.cpp
@@ -43,7 +43,7 @@ int BuildContactMenu(WPARAM hContact, LPARAM)
}
LPCTSTR ptszName;
- ptrW tszStamp(db_get_tsa(NULL, S_MOD, "MenuStamp"));
+ ptrW tszStamp(db_get_wsa(NULL, S_MOD, "MenuStamp"));
if (tszStamp != NULL)
ptszName = ParseString(tszStamp , hContact);
else
diff --git a/plugins/SeenPlugin/src/options.cpp b/plugins/SeenPlugin/src/options.cpp
index 178eaf301d..b2cbc80f12 100644
--- a/plugins/SeenPlugin/src/options.cpp
+++ b/plugins/SeenPlugin/src/options.cpp
@@ -58,13 +58,13 @@ INT_PTR CALLBACK OptsPopupsDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lp
EnableWindow(GetDlgItem(hdlg, i + 20), hasPopups);
}
- if (!db_get_ts(NULL, S_MOD, "PopupStamp", &dbv)) {
+ if (!db_get_ws(NULL, S_MOD, "PopupStamp", &dbv)) {
SetDlgItemText(hdlg, IDC_POPUPSTAMP, dbv.ptszVal);
db_free(&dbv);
}
else SetDlgItemText(hdlg, IDC_POPUPSTAMP, DEFAULT_POPUPSTAMP);
- if (!db_get_ts(NULL, S_MOD, "PopupStampText", &dbv)) {
+ if (!db_get_ws(NULL, S_MOD, "PopupStampText", &dbv)) {
SetDlgItemText(hdlg, IDC_POPUPSTAMPTEXT, dbv.ptszVal);
db_free(&dbv);
}
@@ -130,10 +130,10 @@ INT_PTR CALLBACK OptsPopupsDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lp
switch (((LPNMHDR)lparam)->code) {
case PSN_APPLY:
GetDlgItemText(hdlg, IDC_POPUPSTAMP, szstamp, _countof(szstamp));
- db_set_ts(NULL, S_MOD, "PopupStamp", szstamp);
+ db_set_ws(NULL, S_MOD, "PopupStamp", szstamp);
GetDlgItemText(hdlg, IDC_POPUPSTAMPTEXT, szstamp, _countof(szstamp));
- db_set_ts(NULL, S_MOD, "PopupStampText", szstamp);
+ db_set_ws(NULL, S_MOD, "PopupStampText", szstamp);
bchecked = (BYTE)IsDlgButtonChecked(hdlg, IDC_POPUPS);
if (db_get_b(NULL, S_MOD, "UsePopups", 0) != bchecked)
@@ -189,31 +189,31 @@ INT_PTR CALLBACK OptsSettingsDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM
EnableWindow(GetDlgItem(hdlg, IDC_HISTORYSTAMP), IsDlgButtonChecked(hdlg, IDC_HISTORY));
EnableWindow(GetDlgItem(hdlg, IDC_COUNT), IsDlgButtonChecked(hdlg, IDC_MISSEDONES));
- if (!db_get_ts(NULL, S_MOD, "MenuStamp", &dbv)) {
+ if (!db_get_ws(NULL, S_MOD, "MenuStamp", &dbv)) {
SetDlgItemText(hdlg, IDC_MENUSTAMP, dbv.ptszVal);
db_free(&dbv);
}
else SetDlgItemText(hdlg, IDC_MENUSTAMP, DEFAULT_MENUSTAMP);
- if (!db_get_ts(NULL, S_MOD, "UserStamp", &dbv)) {
+ if (!db_get_ws(NULL, S_MOD, "UserStamp", &dbv)) {
SetDlgItemText(hdlg, IDC_USERSTAMP, dbv.ptszVal);
db_free(&dbv);
}
else SetDlgItemText(hdlg, IDC_USERSTAMP, DEFAULT_USERSTAMP);
- if (!db_get_ts(NULL, S_MOD, "FileStamp", &dbv)) {
+ if (!db_get_ws(NULL, S_MOD, "FileStamp", &dbv)) {
SetDlgItemText(hdlg, IDC_FILESTAMP, dbv.ptszVal);
db_free(&dbv);
}
else SetDlgItemText(hdlg, IDC_FILESTAMP, DEFAULT_FILESTAMP);
- if (!db_get_ts(NULL, S_MOD, "FileName", &dbv)) {
+ if (!db_get_ws(NULL, S_MOD, "FileName", &dbv)) {
SetDlgItemText(hdlg, IDC_FILENAME, dbv.ptszVal);
db_free(&dbv);
}
else SetDlgItemText(hdlg, IDC_FILENAME, DEFAULT_FILENAME);
- if (!db_get_ts(NULL, S_MOD, "HistoryStamp", &dbv)) {
+ if (!db_get_ws(NULL, S_MOD, "HistoryStamp", &dbv)) {
SetDlgItemText(hdlg, IDC_HISTORYSTAMP, dbv.ptszVal);
db_free(&dbv);
}
@@ -287,19 +287,19 @@ INT_PTR CALLBACK OptsSettingsDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM
switch (((LPNMHDR)lparam)->code) {
case PSN_APPLY:
GetDlgItemText(hdlg, IDC_MENUSTAMP, szstamp, _countof(szstamp));
- db_set_ts(NULL, S_MOD, "MenuStamp", szstamp);
+ db_set_ws(NULL, S_MOD, "MenuStamp", szstamp);
GetDlgItemText(hdlg, IDC_USERSTAMP, szstamp, _countof(szstamp));
- db_set_ts(NULL, S_MOD, "UserStamp", szstamp);
+ db_set_ws(NULL, S_MOD, "UserStamp", szstamp);
GetDlgItemText(hdlg, IDC_FILESTAMP, szstamp, _countof(szstamp));
- db_set_ts(NULL, S_MOD, "FileStamp", szstamp);
+ db_set_ws(NULL, S_MOD, "FileStamp", szstamp);
GetDlgItemText(hdlg, IDC_FILENAME, szstamp, _countof(szstamp));
- db_set_ts(NULL, S_MOD, "FileName", szstamp);
+ db_set_ws(NULL, S_MOD, "FileName", szstamp);
GetDlgItemText(hdlg, IDC_HISTORYSTAMP, szstamp, _countof(szstamp));
- db_set_ts(NULL, S_MOD, "HistoryStamp", szstamp);
+ db_set_ws(NULL, S_MOD, "HistoryStamp", szstamp);
db_set_w(NULL, S_MOD, "HistoryMax", (WORD)(GetDlgItemInt(hdlg, IDC_HISTORYSIZE, NULL, FALSE) + 1));
@@ -432,7 +432,7 @@ int OptionsInit(WPARAM wparam, LPARAM)
OPTIONSDIALOGPAGE odp = { 0 };
odp.position = 100000000;
odp.hInstance = hInstance;
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_SETTINGS);
odp.pwszGroup = LPGENW("Contacts");
odp.pwszTitle = LPGENW("Last seen");
diff --git a/plugins/SeenPlugin/src/userinfo.cpp b/plugins/SeenPlugin/src/userinfo.cpp
index 4fb56ce9f7..881b69ae1e 100644
--- a/plugins/SeenPlugin/src/userinfo.cpp
+++ b/plugins/SeenPlugin/src/userinfo.cpp
@@ -41,7 +41,7 @@ INT_PTR CALLBACK UserinfoDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lpar
case WM_REFRESH_UI:
{
- ptrW szout(db_get_tsa(NULL, S_MOD, "UserStamp"));
+ ptrW szout(db_get_wsa(NULL, S_MOD, "UserStamp"));
wchar_t *str = ParseString((szout != NULL) ? szout : DEFAULT_USERSTAMP, wparam);
SetDlgItemText(hdlg, IDC_INFOTEXT, str);
diff --git a/plugins/SeenPlugin/src/utils.cpp b/plugins/SeenPlugin/src/utils.cpp
index 8ff36e51f0..3cb5dad4f2 100644
--- a/plugins/SeenPlugin/src/utils.cpp
+++ b/plugins/SeenPlugin/src/utils.cpp
@@ -207,7 +207,7 @@ wchar_t* ParseString(wchar_t *szstring, MCONTACT hcontact)
charPtr = wantempty ? L"" : TranslateT("<unknown>");
goto LBL_charPtr;
}
- charPtr = TranslateTS(weekdays[isetting]);
+ charPtr = TranslateW(weekdays[isetting]);
LBL_charPtr:
d += mir_snwprintf(d, MAXSIZE - (d - sztemp), L"%s", charPtr);
break;
@@ -215,17 +215,17 @@ wchar_t* ParseString(wchar_t *szstring, MCONTACT hcontact)
case 'w':
isetting = st.wDayOfWeek;
if (isetting == -1) goto LBL_noData;
- charPtr = TranslateTS(wdays_short[isetting]);
+ charPtr = TranslateW(wdays_short[isetting]);
goto LBL_charPtr;
case 'E':
if (!(isetting = st.wMonth)) goto LBL_noData;
- charPtr = TranslateTS(monthnames[isetting - 1]);
+ charPtr = TranslateW(monthnames[isetting - 1]);
goto LBL_charPtr;
case 'e':
if (!(isetting = st.wMonth)) goto LBL_noData;
- charPtr = TranslateTS(mnames_short[isetting - 1]);
+ charPtr = TranslateW(mnames_short[isetting - 1]);
goto LBL_charPtr;
case 'H':
@@ -263,7 +263,7 @@ wchar_t* ParseString(wchar_t *szstring, MCONTACT hcontact)
goto LBL_noData;
case 'G':
- if (!db_get_ts(hcontact, "CList", "Group", &dbv)) {
+ if (!db_get_ws(hcontact, "CList", "Group", &dbv)) {
wcsncpy(szdbsetting, dbv.ptszVal, _countof(szdbsetting));
db_free(&dbv);
charPtr = szdbsetting;
@@ -291,7 +291,7 @@ wchar_t* ParseString(wchar_t *szstring, MCONTACT hcontact)
goto LBL_noData;
case 'T':
- if (db_get_ts(hcontact, "CList", "StatusMsg", &dbv))
+ if (db_get_ws(hcontact, "CList", "StatusMsg", &dbv))
goto LBL_noData;
d += mir_snwprintf(d, MAXSIZE - (d - sztemp), L"%s", dbv.ptszVal);
@@ -313,7 +313,7 @@ wchar_t* ParseString(wchar_t *szstring, MCONTACT hcontact)
case 'i':
case 'r':
if (isJabber(szProto)) {
- if (info = db_get_tsa(hcontact, szProto, *p == 'i' ? "Resource" : "System")) {
+ if (info = db_get_wsa(hcontact, szProto, *p == 'i' ? "Resource" : "System")) {
charPtr = info;
goto LBL_charPtr;
}
@@ -340,7 +340,7 @@ wchar_t* ParseString(wchar_t *szstring, MCONTACT hcontact)
goto LBL_charPtr;
case 'C': // Get Client Info
- if (info = db_get_tsa(hcontact, szProto, "MirVer")) {
+ if (info = db_get_wsa(hcontact, szProto, "MirVer")) {
charPtr = info;
goto LBL_charPtr;
}
@@ -476,13 +476,13 @@ void ShowPopup(MCONTACT hcontact, const char * lpzProto, int newStatus)
ppd.lchContact = hcontact;
ppd.lchIcon = Skin_LoadProtoIcon(lpzProto, newStatus);
- if (!db_get_ts(NULL, S_MOD, "PopupStamp", &dbv)) {
+ if (!db_get_ws(NULL, S_MOD, "PopupStamp", &dbv)) {
wcsncpy(ppd.lptzContactName, ParseString(dbv.ptszVal, hcontact), MAX_CONTACTNAME);
db_free(&dbv);
}
else wcsncpy(ppd.lptzContactName, ParseString(DEFAULT_POPUPSTAMP, hcontact), MAX_CONTACTNAME);
- if (!db_get_ts(NULL, S_MOD, "PopupStampText", &dbv)) {
+ if (!db_get_ws(NULL, S_MOD, "PopupStampText", &dbv)) {
wcsncpy(ppd.lptzText, ParseString(dbv.ptszVal, hcontact), MAX_SECONDLINE);
db_free(&dbv);
}
diff --git a/plugins/SendScreenshotPlus/src/CSend.cpp b/plugins/SendScreenshotPlus/src/CSend.cpp
index ac1082df93..61e4be2080 100644
--- a/plugins/SendScreenshotPlus/src/CSend.cpp
+++ b/plugins/SendScreenshotPlus/src/CSend.cpp
@@ -124,16 +124,16 @@ INT_PTR CALLBACK CSend::ResultDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam,
case ID_btnCopy:
case ID_btnThumbCopy:
SendDlgItemMessage(hwndDlg, i, BM_SETIMAGE, IMAGE_ICON, (LPARAM)GetIconBtn(ICO_BTN_COPY));
- SendDlgItemMessage(hwndDlg, i, BUTTONADDTOOLTIP, (WPARAM)LPGENW("Copy"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, i, BUTTONADDTOOLTIP, (WPARAM)LPGENW("Copy"), BATF_UNICODE);
break;
case ID_btnBBC:
case ID_btnThumbBBC:
SendDlgItemMessage(hwndDlg, i, BM_SETIMAGE, IMAGE_ICON, (LPARAM)GetIconBtn(ICO_BTN_BBC));
- SendDlgItemMessage(hwndDlg, i, BUTTONADDTOOLTIP, (WPARAM)LPGENW("Copy BBCode"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, i, BUTTONADDTOOLTIP, (WPARAM)LPGENW("Copy BBCode"), BATF_UNICODE);
break;
default:
SendDlgItemMessage(hwndDlg, i, BM_SETIMAGE, IMAGE_ICON, (LPARAM)GetIconBtn(ICO_BTN_BBCLNK));
- SendDlgItemMessage(hwndDlg, i, BUTTONADDTOOLTIP, (WPARAM)LPGENW("Copy BBCode w/ link"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, i, BUTTONADDTOOLTIP, (WPARAM)LPGENW("Copy BBCode w/ link"), BATF_UNICODE);
}
}
}
@@ -404,7 +404,7 @@ void CSend::Error(LPCTSTR pszFormat, ...)
va_list vl;
va_start(vl, pszFormat);
- mir_vsnwprintf(tszMsg, _countof(tszMsg), TranslateTS(pszFormat), vl);
+ mir_vsnwprintf(tszMsg, _countof(tszMsg), TranslateW(pszFormat), vl);
va_end(vl);
mir_free(m_ErrorMsg), m_ErrorMsg = mir_wstrdup(tszMsg);
@@ -436,7 +436,7 @@ void CSend::Exit(unsigned int Result)
break;
case ACKRESULT_DENIED:
SkinPlaySound("FileDenied");
- Error(L"%s (%i):\nFile transfer denied.", TranslateTS(m_pszSendTyp), Result);
+ Error(L"%s (%i):\nFile transfer denied.", TranslateW(m_pszSendTyp), Result);
MsgBoxService(NULL, (LPARAM)&m_box);
err = false;
break;
diff --git a/plugins/SendScreenshotPlus/src/CSendDropbox.cpp b/plugins/SendScreenshotPlus/src/CSendDropbox.cpp
index 47b7f778e6..948dcbccc1 100644
--- a/plugins/SendScreenshotPlus/src/CSendDropbox.cpp
+++ b/plugins/SendScreenshotPlus/src/CSendDropbox.cpp
@@ -60,7 +60,7 @@ void CSendDropbox::SendThread()
if (CallService(MS_DROPBOX_UPLOAD, (WPARAM)&m_URL, (LPARAM)&ui))
{
- Error(LPGENW("%s (%i):\nCould not add a share to the Dropbox plugin."), TranslateTS(m_pszSendTyp), 0);
+ Error(LPGENW("%s (%i):\nCould not add a share to the Dropbox plugin."), TranslateW(m_pszSendTyp), 0);
Exit(ACKRESULT_FAILED); return;
}
diff --git a/plugins/SendScreenshotPlus/src/CSendFTPFile.cpp b/plugins/SendScreenshotPlus/src/CSendFTPFile.cpp
index 3267ecdd14..e742c7fe08 100644
--- a/plugins/SendScreenshotPlus/src/CSendFTPFile.cpp
+++ b/plugins/SendScreenshotPlus/src/CSendFTPFile.cpp
@@ -74,7 +74,7 @@ void CSendFTPFile::SendThread()
INT_PTR ret = FTPFileUploadA(m_hContact, FNUM_DEFAULT, FMODE_RAWFILE, &m_pszFileName, 1);
if (ret != 0) {
- Error(LPGENW("%s (%i):\nCould not add a share to the FTP File plugin."), TranslateTS(m_pszSendTyp), ret);
+ Error(LPGENW("%s (%i):\nCould not add a share to the FTP File plugin."), TranslateW(m_pszSendTyp), ret);
Exit(ret); return;
}
diff --git a/plugins/SendScreenshotPlus/src/CSendHTTPServer.cpp b/plugins/SendScreenshotPlus/src/CSendHTTPServer.cpp
index 636b49d1b3..f02707547b 100644
--- a/plugins/SendScreenshotPlus/src/CSendHTTPServer.cpp
+++ b/plugins/SendScreenshotPlus/src/CSendHTTPServer.cpp
@@ -102,7 +102,7 @@ void CSendHTTPServer::SendThread()
}
if (ret != 0) {
- Error(LPGENW("%s (%i):\nCould not add a share to the HTTP Server plugin."), TranslateTS(m_pszSendTyp), ret);
+ Error(LPGENW("%s (%i):\nCould not add a share to the HTTP Server plugin."), TranslateW(m_pszSendTyp), ret);
Exit(ret); return;
}
diff --git a/plugins/SendScreenshotPlus/src/Main.cpp b/plugins/SendScreenshotPlus/src/Main.cpp
index dd1e9f5111..045bcbff2c 100644
--- a/plugins/SendScreenshotPlus/src/Main.cpp
+++ b/plugins/SendScreenshotPlus/src/Main.cpp
@@ -81,7 +81,7 @@ wchar_t* GetCustomPath()
MessageBox(NULL, L"Can not retrieve screenshot path.", L"SendSS", MB_OK | MB_ICONERROR | MB_APPLMODAL);
return 0;
}
- int result = CreateDirectoryTreeT(pszPath);
+ int result = CreateDirectoryTreeW(pszPath);
if (result) {
wchar_t szError[MAX_PATH];
mir_snwprintf(szError, MAX_PATH, TranslateT("Could not create screenshot folder (error code: %d):\n%s\nDo you have write permissions?"), result, pszPath);
@@ -234,7 +234,7 @@ int hook_ModulesLoaded(WPARAM, LPARAM)
NETLIBUSER nlu = { sizeof(nlu) };
nlu.szSettingsModule = __PLUGIN_NAME;
nlu.ptszDescriptiveName = TranslateT("SendSS HTTP connections");
- nlu.flags = NUF_OUTGOING | NUF_HTTPCONNS | NUF_TCHAR; //|NUF_NOHTTPSOPTION;
+ nlu.flags = NUF_OUTGOING | NUF_HTTPCONNS | NUF_UNICODE; //|NUF_NOHTTPSOPTION;
g_hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu);
// load my button class / or use UInfoEx
CtrlButtonLoadModule();
@@ -285,7 +285,7 @@ DLL_EXPORT int Load(void)
// menu items
CMenuItem mi;
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
mi.hIcolibItem = GetIconHandle(ICO_MAINXS);
SET_UID(mi, 0xa559a22e, 0xd0f9, 0x4553, 0x8e, 0x68, 0x55, 0xb3, 0xae, 0xc4, 0x5d, 0x93);
@@ -309,12 +309,12 @@ DLL_EXPORT int Load(void)
/// hotkey's
HOTKEYDESC hkd = { sizeof(hkd) };
hkd.pszName = "Open SendSS+";
- hkd.ptszDescription = LPGENW("Open SendSS+");
- hkd.ptszSection = L"SendSS+";
+ hkd.pwszDescription = LPGENW("Open SendSS+");
+ hkd.pwszSection = L"SendSS+";
hkd.pszService = MS_SENDSS_OPENDIALOG;
//hkd.DefHotKey=HOTKEYCODE(HOTKEYF_CONTROL, VK_F10) | HKF_MIRANDA_LOCAL;
hkd.lParam = 0xFFFF;
- hkd.dwFlags = HKD_TCHAR;
+ hkd.dwFlags = HKD_UNICODE;
Hotkey_Register(&hkd);
/// register highlighter window class
HBRUSH brush = CreateSolidBrush(0x0000FF00);//owned by class
diff --git a/plugins/SendScreenshotPlus/src/UMainForm.cpp b/plugins/SendScreenshotPlus/src/UMainForm.cpp
index 9d7ac40e04..c572477943 100644
--- a/plugins/SendScreenshotPlus/src/UMainForm.cpp
+++ b/plugins/SendScreenshotPlus/src/UMainForm.cpp
@@ -177,7 +177,7 @@ void TfrmMain::wmInitdialog(WPARAM, LPARAM)
wchar_t *pt = mir_wstrdup(pcli->pfnGetContactDisplayName(m_hContact, 0));
if (pt && (m_hContact != 0)) {
- CMString string;
+ CMStringW string;
string.AppendFormat(TranslateT("Send screenshot to %s"), pt);
SetWindowText(m_hWnd, string);
}
@@ -988,7 +988,7 @@ INT_PTR TfrmMain::SaveScreenshot(FIBITMAP* dib)
GetDlgItemText(m_hwndTabPage, ID_edtCaption, winText, _countof(winText));
- CMString tszFileDesc;
+ CMStringW tszFileDesc;
if (m_opt_tabCapture)
tszFileDesc.Format(TranslateT("Screenshot of \"%s\""), winText);
diff --git a/plugins/SendScreenshotPlus/src/ctrl_button.cpp b/plugins/SendScreenshotPlus/src/ctrl_button.cpp
index d68cb3ed14..54d20d58ef 100644
--- a/plugins/SendScreenshotPlus/src/ctrl_button.cpp
+++ b/plugins/SendScreenshotPlus/src/ctrl_button.cpp
@@ -566,7 +566,7 @@ static LRESULT CALLBACK Button_WndProc(HWND hwndBtn, UINT uMsg, WPARAM wParam, L
case BUTTONTRANSLATE:
wchar_t szButton[MAX_PATH];
GetWindowText(bct->hwnd, szButton, _countof(szButton));
- SetWindowText(bct->hwnd, TranslateTS(szButton));
+ SetWindowText(bct->hwnd, TranslateW(szButton));
break;
case WM_SETFOCUS: // set keybord bFocus and redraw
diff --git a/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp b/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp
index 95b567af0f..8f5e9ed568 100644
--- a/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp
+++ b/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp
@@ -677,7 +677,7 @@ INT_PTR CALLBACK MsgBox(HWND hParent, UINT uType, LPCTSTR pszTitle, LPCTSTR pszI
va_list vl;
va_start(vl, pszFormat);
- mir_vsnwprintf(tszMsg, _countof(tszMsg), TranslateTS(pszFormat), vl);
+ mir_vsnwprintf(tszMsg, _countof(tszMsg), TranslateW(pszFormat), vl);
va_end(vl);
MSGBOX mb = { 0 };
@@ -685,8 +685,8 @@ INT_PTR CALLBACK MsgBox(HWND hParent, UINT uType, LPCTSTR pszTitle, LPCTSTR pszI
mb.hParent = hParent;
mb.hiLogo = IcoLib_GetIcon(ICO_COMMON_MAIN);
mb.hiMsg = NULL;
- mb.ptszTitle = TranslateTS(pszTitle);
- mb.ptszInfoText = TranslateTS(pszInfo);
+ mb.ptszTitle = TranslateW(pszTitle);
+ mb.ptszInfoText = TranslateW(pszInfo);
mb.ptszMsg = tszMsg;
mb.uType = uType;
return MsgBoxService(NULL, (LPARAM)&mb);
@@ -704,7 +704,7 @@ INT_PTR CALLBACK MsgErr(HWND hParent, LPCTSTR pszFormat, ...)
va_list vl;
va_start(vl, pszFormat);
- mir_vsnwprintf(tszMsg, TranslateTS(pszFormat), vl);
+ mir_vsnwprintf(tszMsg, TranslateW(pszFormat), vl);
va_end(vl);
MSGBOX mb = { 0 };
diff --git a/plugins/Sessions/Src/Main.cpp b/plugins/Sessions/Src/Main.cpp
index 6c11fafe4f..16cd20eff3 100644
--- a/plugins/Sessions/Src/Main.cpp
+++ b/plugins/Sessions/Src/Main.cpp
@@ -460,8 +460,8 @@ INT_PTR OpenSessionsManagerWindow(WPARAM, LPARAM)
}
ptrW
- tszSession(db_get_tsa(NULL, MODNAME, "SessionDate_0")),
- tszUserSession(db_get_tsa(NULL, MODNAME, "UserSessionDsc_0"));
+ tszSession(db_get_wsa(NULL, MODNAME, "SessionDate_0")),
+ tszUserSession(db_get_wsa(NULL, MODNAME, "UserSessionDsc_0"));
if (g_bIncompletedSave || tszSession || tszUserSession) {
g_hDlg = CreateDialog(g_hInst, MAKEINTRESOURCE(IDD_WLCMDIALOG), 0, LoadSessionDlgProc);
return 0;
@@ -489,9 +489,9 @@ int SaveSessionDate()
char szSetting[256];
mir_snprintf(szSetting, "%s_%d", "SessionDate", 0);
- wchar_t *ptszSaveSessionDate = db_get_tsa(NULL, MODNAME, szSetting);
+ wchar_t *ptszSaveSessionDate = db_get_wsa(NULL, MODNAME, szSetting);
- db_set_ts(NULL, MODNAME, szSetting, szSessionTime);
+ db_set_ws(NULL, MODNAME, szSetting, szSessionTime);
mir_free(szSessionTime);
if (ptszSaveSessionDate)
@@ -514,11 +514,11 @@ int SaveUserSessionName(wchar_t *szUSessionName)
char szSetting[256];
mir_snprintf(szSetting, "%s_%u", "UserSessionDsc", 0);
- wchar_t *ptszUserSessionName = db_get_tsa(NULL, MODNAME, szSetting);
+ wchar_t *ptszUserSessionName = db_get_wsa(NULL, MODNAME, szSetting);
if (ptszUserSessionName)
ResaveSettings("UserSessionDsc", 1, 255, ptszUserSessionName);
- db_set_ts(NULL, MODNAME, szSetting, szUSessionName);
+ db_set_ws(NULL, MODNAME, szSetting, szUSessionName);
return 0;
}
@@ -607,12 +607,12 @@ int DelUserDefSession(int ses_count)
for (int i = ses_count + 1;; i++) {
mir_snprintf(szSessionName, "%s_%u", "UserSessionDsc", i);
- ptrW szSessionNameBuf(db_get_tsa(NULL, MODNAME, szSessionName));
+ ptrW szSessionNameBuf(db_get_wsa(NULL, MODNAME, szSessionName));
mir_snprintf(szSessionName, "%s_%u", "UserSessionDsc", i - 1);
if (szSessionNameBuf) {
MarkUserDefSession(i - 1, IsMarkedUserDefSession(i));
- db_set_ts(NULL, MODNAME, szSessionName, szSessionNameBuf);
+ db_set_ws(NULL, MODNAME, szSessionName, szSessionNameBuf);
}
else {
db_unset(NULL, MODNAME, szSessionName);
@@ -640,11 +640,11 @@ int DeleteAutoSession(int ses_count)
for (int i = ses_count + 1;; i++) {
mir_snprintf(szSessionName, "%s_%u", "SessionDate", i);
- ptrW szSessionNameBuf(db_get_tsa(NULL, MODNAME, szSessionName));
+ ptrW szSessionNameBuf(db_get_wsa(NULL, MODNAME, szSessionName));
mir_snprintf(szSessionName, "%s_%u", "SessionDate", i - 1);
if (szSessionNameBuf)
- db_set_ts(NULL, MODNAME, szSessionName, szSessionNameBuf);
+ db_set_ws(NULL, MODNAME, szSessionName, szSessionNameBuf);
else {
db_unset(NULL, MODNAME, szSessionName);
break;
diff --git a/plugins/Sessions/Src/Utils.cpp b/plugins/Sessions/Src/Utils.cpp
index 5b0fe2e88a..c0f2e5ea90 100644
--- a/plugins/Sessions/Src/Utils.cpp
+++ b/plugins/Sessions/Src/Utils.cpp
@@ -231,8 +231,8 @@ BOOL ResaveSettings(char *szName, int iFirst, int iLimit, wchar_t *szBuffer)
char szNameBuf[256];
mir_snprintf(szNameBuf, "%s_%u", szName, i);
- wchar_t *ptszTemp = db_get_tsa(NULL, MODNAME, szNameBuf);
- db_set_ts(NULL, MODNAME, szNameBuf, szBuffer);
+ wchar_t *ptszTemp = db_get_wsa(NULL, MODNAME, szNameBuf);
+ db_set_ws(NULL, MODNAME, szNameBuf, szBuffer);
mir_free(szBuffer);
BYTE marked = IsMarkedUserDefSession(i);
@@ -298,7 +298,7 @@ int LoadSessionToCombobox(HWND hdlg, BOOL mode, int iLimit, char* pszSetting, in
for (int i = 0; i < iLimit; i++) {
mir_snprintf(szBuffer, "%s_%u", pszSetting, i);
- wchar_t *pszBuffer = db_get_tsa(NULL, MODNAME, szBuffer);
+ wchar_t *pszBuffer = db_get_wsa(NULL, MODNAME, szBuffer);
if (pszBuffer) {
if (!IsMarkedUserDefSession(i + iFirstNum) || mode == 1) {
index = SendDlgItemMessage(hdlg, IDC_LIST, CB_ADDSTRING, 0, (LPARAM)pszBuffer);
@@ -327,7 +327,7 @@ int FillFavoritesMenu(HMENU hMenu, int iLimit)
if (IsMarkedUserDefSession(i)) {
char szBuffer[256];
mir_snprintf(szBuffer, "%s_%u", "UserSessionDsc", i);
- wchar_t *pszBuffer = db_get_tsa(NULL, MODNAME, szBuffer);
+ wchar_t *pszBuffer = db_get_wsa(NULL, MODNAME, szBuffer);
if (pszBuffer) {
AppendMenu(hMenu, MF_STRING, i + 1, pszBuffer);
iItems++;
@@ -362,7 +362,7 @@ void RenameUserDefSession(int ses_count, wchar_t* ptszNewName)
{
char szSession[256];
mir_snprintf(szSession, "%s_%u", "UserSessionDsc", ses_count);
- db_set_ts(NULL, MODNAME, szSession, ptszNewName);
+ db_set_ws(NULL, MODNAME, szSession, ptszNewName);
}
int MarkUserDefSession(int ses_count, BYTE bCheck)
diff --git a/plugins/ShellExt/src/options.cpp b/plugins/ShellExt/src/options.cpp
index 9fe7d6aee2..2f978a70f1 100644
--- a/plugins/ShellExt/src/options.cpp
+++ b/plugins/ShellExt/src/options.cpp
@@ -31,8 +31,8 @@ static void InitControls(HWND hwndDlg)
wchar_t szBuf[MAX_PATH];
mir_snwprintf(szBuf, L"%s (%s)",
- TranslateTS(COM_OKSTR[(comReg & COMREG_OK) != 0]),
- TranslateTS(COM_APPROVEDSTR[(comReg & COMREG_APPROVED) != 0]));
+ TranslateW(COM_OKSTR[(comReg & COMREG_OK) != 0]),
+ TranslateW(COM_APPROVEDSTR[(comReg & COMREG_APPROVED) != 0]));
SetDlgItemText(hwndDlg, IDC_STATUS, szBuf);
// auto size the static windows to fit their text
diff --git a/plugins/SimpleAR/src/Main.cpp b/plugins/SimpleAR/src/Main.cpp
index a9b9200fd3..04583e3961 100644
--- a/plugins/SimpleAR/src/Main.cpp
+++ b/plugins/SimpleAR/src/Main.cpp
@@ -97,10 +97,10 @@ INT CheckDefaults(WPARAM, LPARAM)
{
interval = db_get_w(NULL, protocolname, KEY_REPEATINTERVAL, 300);
- wchar_t *ptszVal = db_get_tsa(NULL, protocolname, KEY_HEADING);
+ wchar_t *ptszVal = db_get_wsa(NULL, protocolname, KEY_HEADING);
if (ptszVal == 0)
// Heading not set
- db_set_ts(NULL, protocolname, KEY_HEADING, TranslateT("Dear %user%, the owner left the following message:"));
+ db_set_ws(NULL, protocolname, KEY_HEADING, TranslateT("Dear %user%, the owner left the following message:"));
else
mir_free(ptszVal);
@@ -110,7 +110,7 @@ INT CheckDefaults(WPARAM, LPARAM)
else {
char szStatus[6] = { 0 };
mir_snprintf(szStatus, "%d", c);
- ptszVal = db_get_tsa(NULL, protocolname, szStatus);
+ ptszVal = db_get_wsa(NULL, protocolname, szStatus);
if (ptszVal == 0) {
wchar_t *ptszDefault;
if (c < ID_STATUS_FREECHAT)
@@ -121,7 +121,7 @@ INT CheckDefaults(WPARAM, LPARAM)
else
ptszDefault = 0;
if (ptszDefault)
- db_set_ts(NULL, protocolname, szStatus, TranslateTS(ptszDefault));
+ db_set_ws(NULL, protocolname, szStatus, TranslateW(ptszDefault));
}
else
mir_free(ptszVal);
@@ -164,7 +164,7 @@ INT addEvent(WPARAM hContact, LPARAM hDBEvent)
if (!dbei.cbBlob) /// invalid size
return FALSE;
- wchar_t *ptszVal = db_get_tsa(hContact, "Protocol", "p");
+ wchar_t *ptszVal = db_get_wsa(hContact, "Protocol", "p");
if (ptszVal == NULL) // Contact with no protocol ?!!
return FALSE;
mir_free(ptszVal);
@@ -185,12 +185,12 @@ INT addEvent(WPARAM hContact, LPARAM hDBEvent)
char szStatus[6] = { 0 };
mir_snprintf(szStatus, "%d", status);
- ptszVal = db_get_tsa(NULL, protocolname, szStatus);
+ ptszVal = db_get_wsa(NULL, protocolname, szStatus);
if (ptszVal) {
if (*ptszVal) {
- CMString ptszTemp;
+ CMStringW ptszTemp;
- wchar_t *ptszNick = db_get_tsa(hContact, pszProto, "Nick");
+ wchar_t *ptszNick = db_get_wsa(hContact, pszProto, "Nick");
if (ptszNick == 0) {
mir_free(ptszVal);
return FALSE;
@@ -198,7 +198,7 @@ INT addEvent(WPARAM hContact, LPARAM hDBEvent)
msgLen += mir_wstrlen(ptszVal);
- wchar_t *ptszHead = db_get_tsa(NULL, protocolname, KEY_HEADING);
+ wchar_t *ptszHead = db_get_wsa(NULL, protocolname, KEY_HEADING);
if (ptszHead != NULL) {
ptszTemp = ptszHead;
ptszTemp.Replace(L"%user%", ptszNick);
diff --git a/plugins/SimpleAR/src/Options.cpp b/plugins/SimpleAR/src/Options.cpp
index 59dbbe5ad6..f603dcdebe 100644
--- a/plugins/SimpleAR/src/Options.cpp
+++ b/plugins/SimpleAR/src/Options.cpp
@@ -15,7 +15,7 @@ INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara
SetDlgItemInt(hwndDlg, IDC_INTERVAL, db_get_w(NULL, protocolname, KEY_REPEATINTERVAL, 300) / 60, FALSE);
DBVARIANT dbv;
- if (!db_get_ts(NULL, protocolname, KEY_HEADING, &dbv)) {
+ if (!db_get_ws(NULL, protocolname, KEY_HEADING, &dbv)) {
SetDlgItemText(hwndDlg, IDC_HEADING, dbv.ptszVal);
db_free(&dbv);
}
@@ -28,7 +28,7 @@ INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara
else {
SendDlgItemMessage(hwndDlg, IDC_STATUSMODE, CB_ADDSTRING, 0, (LPARAM)pszStatus);
- if (!db_get_ts(NULL, protocolname, tszStatus, &dbv)) {
+ if (!db_get_ws(NULL, protocolname, tszStatus, &dbv)) {
if (c < ID_STATUS_FREECHAT)
ptszMessage[c - ID_STATUS_ONLINE - 1] = wcsdup(dbv.ptszVal);
else if (c > ID_STATUS_INVISIBLE)
@@ -61,7 +61,7 @@ INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
case IDC_DEFAULT:
- SetDlgItemText(hwndDlg, IDC_MESSAGE, TranslateTS(ptszDefaultMsg[lastIndex]));
+ SetDlgItemText(hwndDlg, IDC_MESSAGE, TranslateW(ptszDefaultMsg[lastIndex]));
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
case IDC_INTERVAL:
@@ -88,7 +88,7 @@ INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara
Menu_ModifyItem(hEnableMenu, LPGENW("Enable Auto&reply"), iconList[1].hIcolib);
GetDlgItemText(hwndDlg, IDC_HEADING, ptszText, _countof(ptszText));
- db_set_ts(NULL, protocolname, KEY_HEADING, ptszText);
+ db_set_ws(NULL, protocolname, KEY_HEADING, ptszText);
INT size = GetDlgItemInt(hwndDlg, IDC_INTERVAL, &translated, FALSE);
if (translated)
@@ -106,9 +106,9 @@ INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara
mir_snprintf(szStatus, "%d", c);
if (c<ID_STATUS_FREECHAT && ptszMessage[c - ID_STATUS_ONLINE - 1])
- db_set_ts(NULL, protocolname, szStatus, ptszMessage[c - ID_STATUS_ONLINE - 1]);
+ db_set_ws(NULL, protocolname, szStatus, ptszMessage[c - ID_STATUS_ONLINE - 1]);
else if (c>ID_STATUS_INVISIBLE && ptszMessage[c - ID_STATUS_ONLINE - 3])
- db_set_ts(NULL, protocolname, szStatus, ptszMessage[c - ID_STATUS_ONLINE - 3]);
+ db_set_ws(NULL, protocolname, szStatus, ptszMessage[c - ID_STATUS_ONLINE - 3]);
else
db_unset(NULL, protocolname, szStatus);
}
diff --git a/plugins/SimpleStatusMsg/src/awaymsg.cpp b/plugins/SimpleStatusMsg/src/awaymsg.cpp
index 177282ccad..a36675e407 100644
--- a/plugins/SimpleStatusMsg/src/awaymsg.cpp
+++ b/plugins/SimpleStatusMsg/src/awaymsg.cpp
@@ -383,7 +383,7 @@ int LoadAwayMsgModule(void)
hWindowList2 = WindowList_Create();
CMenuItem mi;
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
SET_UID(mi, 0xd3282acc, 0x9ff1, 0x4ede, 0x8a, 0x1e, 0x36, 0x72, 0x3f, 0x44, 0x4f, 0x84);
CreateServiceFunction(MS_AWAYMSG_SHOWAWAYMSG, GetMessageCommand);
diff --git a/plugins/SimpleStatusMsg/src/main.cpp b/plugins/SimpleStatusMsg/src/main.cpp
index 13893bcc83..f3c15eb8ab 100644
--- a/plugins/SimpleStatusMsg/src/main.cpp
+++ b/plugins/SimpleStatusMsg/src/main.cpp
@@ -289,7 +289,7 @@ wchar_t* InsertBuiltinVarsIntoMsg(wchar_t *in, const char *szProto, int)
mir_snprintf(buff, "SMsg%d", k);
- wchar_t *tszStatusMsg = db_get_tsa(NULL, "SimpleStatusMsg", buff);
+ wchar_t *tszStatusMsg = db_get_wsa(NULL, "SimpleStatusMsg", buff);
if (tszStatusMsg == NULL)
continue;
@@ -334,7 +334,7 @@ wchar_t* InsertBuiltinVarsIntoMsg(wchar_t *in, const char *szProto, int)
mir_snprintf(buff, "DefMsg%d", k);
- wchar_t *tszStatusMsg = db_get_tsa(NULL, "SimpleStatusMsg", buff);
+ wchar_t *tszStatusMsg = db_get_wsa(NULL, "SimpleStatusMsg", buff);
if (tszStatusMsg == NULL)
continue;
@@ -413,7 +413,7 @@ static wchar_t *GetAwayMessageFormat(int iStatus, const char *szProto)
else
mir_snprintf(szSetting, "Msg");
- format = db_get_tsa(NULL, "SRAway", StatusModeToDbSetting(iStatus, szSetting));
+ format = db_get_wsa(NULL, "SRAway", StatusModeToDbSetting(iStatus, szSetting));
}
else if (flags & STATUS_LAST_MSG)
{
@@ -426,7 +426,7 @@ static wchar_t *GetAwayMessageFormat(int iStatus, const char *szProto)
if (szLastMsg == NULL)
return NULL; //mir_wstrdup(L"");
- format = db_get_tsa(NULL, "SimpleStatusMsg", szLastMsg);
+ format = db_get_wsa(NULL, "SimpleStatusMsg", szLastMsg);
mir_free(szLastMsg);
}
else if (flags & STATUS_THIS_MSG)
@@ -436,7 +436,7 @@ static wchar_t *GetAwayMessageFormat(int iStatus, const char *szProto)
else
mir_snprintf(szSetting, "Default");
- format = db_get_tsa(NULL, "SRAway", StatusModeToDbSetting(iStatus, szSetting));
+ format = db_get_wsa(NULL, "SRAway", StatusModeToDbSetting(iStatus, szSetting));
if (format == NULL)
format = mir_wstrdup(L"");
}
@@ -449,7 +449,7 @@ static wchar_t *GetAwayMessageFormat(int iStatus, const char *szProto)
void DBWriteMessage(char *szSetting, wchar_t *tszMsg)
{
if (tszMsg && mir_wstrlen(tszMsg))
- db_set_ts(NULL, "SimpleStatusMsg", szSetting, tszMsg);
+ db_set_ws(NULL, "SimpleStatusMsg", szSetting, tszMsg);
else
db_unset(NULL, "SimpleStatusMsg", szSetting);
}
@@ -512,7 +512,7 @@ static wchar_t *GetAwayMessage(int iStatus, const char *szProto, BOOL bInsertVar
if ((!iStatus || iStatus == ID_STATUS_CURRENT) && szProto)
{
mir_snprintf(szSetting, "FCur%sMsg", szProto);
- format = db_get_tsa(NULL, "SimpleStatusMsg", szSetting);
+ format = db_get_wsa(NULL, "SimpleStatusMsg", szSetting);
}
else
{
@@ -533,14 +533,14 @@ static wchar_t *GetAwayMessage(int iStatus, const char *szProto, BOOL bInsertVar
if (flags & PROTO_THIS_MSG)
{
mir_snprintf(szSetting, "Proto%sDefault", szProto);
- format = db_get_tsa(NULL, "SimpleStatusMsg", szSetting);
+ format = db_get_wsa(NULL, "SimpleStatusMsg", szSetting);
if (format == NULL)
format = mir_wstrdup(L"");
}
else if (flags & PROTO_NOCHANGE && szProto)
{
mir_snprintf(szSetting, "FCur%sMsg", szProto);
- format = db_get_tsa(NULL, "SimpleStatusMsg", szSetting);
+ format = db_get_wsa(NULL, "SimpleStatusMsg", szSetting);
}
else if (flags & PROTO_POPUPDLG)
format = GetAwayMessageFormat(iStatus, szProto);
@@ -627,7 +627,7 @@ int HasProtoStaticStatusMsg(const char *szProto, int iInitialStatus, int iStatus
else if (flags & PROTO_THIS_MSG)
{
mir_snprintf(szSetting, "Proto%sDefault", szProto);
- wchar_t *szSimpleStatusMsg = db_get_tsa(NULL, "SimpleStatusMsg", szSetting);
+ wchar_t *szSimpleStatusMsg = db_get_wsa(NULL, "SimpleStatusMsg", szSetting);
if (szSimpleStatusMsg != NULL)
{
SaveMessageToDB(szProto, szSimpleStatusMsg, TRUE);
@@ -1012,7 +1012,7 @@ int ChangeStatusMessage(WPARAM wParam, LPARAM lParam)
}
else if (iProtoFlags & PROTO_NOCHANGE && !bOnStartup) {
mir_snprintf(szSetting, "FCur%sMsg", szProto);
- wchar_t *msg = db_get_tsa(NULL, "SimpleStatusMsg", szSetting);
+ wchar_t *msg = db_get_wsa(NULL, "SimpleStatusMsg", szSetting);
#ifdef _DEBUG
log2file("ChangeStatusMessage(): Set %s status and \"%S\" status message for %s.", StatusModeToDbSetting(iStatus, ""), msg, szProto);
@@ -1076,7 +1076,7 @@ int ChangeStatusMessage(WPARAM wParam, LPARAM lParam)
wchar_t *msg;
if (iProtoFlags & PROTO_NOCHANGE) {
mir_snprintf(szSetting, "FCur%sMsg", accounts->pa[i]->szModuleName);
- msg = db_get_tsa(NULL, "SimpleStatusMsg", szSetting);
+ msg = db_get_wsa(NULL, "SimpleStatusMsg", szSetting);
}
else
msg = GetAwayMessageFormat(iStatus, NULL);
@@ -1159,7 +1159,7 @@ int SetStartupStatus(int i)
else if (flags & PROTO_NOCHANGE)
{
mir_snprintf(szSetting, "FCur%sMsg", accounts->pa[i]->szModuleName);
- fmsg = db_get_tsa(NULL, "SimpleStatusMsg", szSetting);
+ fmsg = db_get_wsa(NULL, "SimpleStatusMsg", szSetting);
}
else
fmsg = GetAwayMessageFormat(iStatus, accounts->pa[i]->szModuleName);
@@ -1296,7 +1296,7 @@ VOID CALLBACK UpdateMsgTimerProc(HWND, UINT, UINT_PTR, DWORD)
continue;
mir_snprintf(szBuffer, "FCur%sMsg", accounts->pa[i]->szModuleName);
- wchar_t *tszStatusMsg = db_get_tsa(NULL, "SimpleStatusMsg", szBuffer);
+ wchar_t *tszStatusMsg = db_get_wsa(NULL, "SimpleStatusMsg", szBuffer);
if (tszStatusMsg == NULL)
continue;
@@ -1305,7 +1305,7 @@ VOID CALLBACK UpdateMsgTimerProc(HWND, UINT, UINT_PTR, DWORD)
mir_snprintf(szBuffer, "Cur%sMsg", accounts->pa[i]->szModuleName);
- tszStatusMsg = db_get_tsa(NULL, "SimpleStatusMsg", szBuffer);
+ tszStatusMsg = db_get_wsa(NULL, "SimpleStatusMsg", szBuffer);
if ((tszMsg && tszStatusMsg && !mir_wstrcmp(tszMsg, tszStatusMsg)) || (!tszMsg && !tszStatusMsg))
{
mir_free(tszStatusMsg);
@@ -1346,10 +1346,10 @@ void RegisterHotkey(void)
HOTKEYDESC hkd = {0};
hkd.cbSize = sizeof(hkd);
- hkd.dwFlags = HKD_TCHAR;
+ hkd.dwFlags = HKD_UNICODE;
hkd.pszName = "SimpleStatusMsg_OpenDialog";
- hkd.ptszDescription = LPGENW("Open status message dialog");
- hkd.ptszSection = LPGENW("Status message");
+ hkd.pwszDescription = LPGENW("Open status message dialog");
+ hkd.pwszSection = LPGENW("Status message");
hkd.pszService = MS_SIMPLESTATUSMSG_SHOWDIALOGINT;
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, VK_OEM_3);
Hotkey_Register(&hkd);
@@ -1384,7 +1384,7 @@ static int ChangeStatusMsgPrebuild(WPARAM, LPARAM)
return 0;
CMenuItem mi;
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
if (!db_get_b(NULL, "SimpleStatusMsg", "ShowStatusMenuItem", 1))
mi.flags |= CMIF_HIDDEN;
mi.hIcolibItem = GetIconHandle(IDI_CSMSG);
@@ -1530,7 +1530,7 @@ static int CSStatusChange(WPARAM wParam, LPARAM)
for (int j = 1; j <= max_hist_msgs; j++)
{
mir_snprintf(buff, "SMsg%d", j);
- wchar_t *tszStatusMsg = db_get_tsa(NULL, "SimpleStatusMsg", buff);
+ wchar_t *tszStatusMsg = db_get_wsa(NULL, "SimpleStatusMsg", buff);
if (tszStatusMsg != NULL)
{
if (!mir_wstrcmp(tszStatusMsg, szMsgW))
@@ -1718,7 +1718,7 @@ static int OnModulesLoaded(WPARAM, LPARAM)
}
}
- g_ptszWinampSong = db_get_tsa(NULL, "SimpleStatusMsg", "AmpLastTitle");
+ g_ptszWinampSong = db_get_wsa(NULL, "SimpleStatusMsg", "AmpLastTitle");
if (g_ptszWinampSong == NULL)
g_ptszWinampSong = mir_wstrdup(L"SimpleStatusMsg");
diff --git a/plugins/SimpleStatusMsg/src/msgbox.cpp b/plugins/SimpleStatusMsg/src/msgbox.cpp
index 20bc2a0347..844ce83b41 100644
--- a/plugins/SimpleStatusMsg/src/msgbox.cpp
+++ b/plugins/SimpleStatusMsg/src/msgbox.cpp
@@ -238,7 +238,7 @@ HWND WINAPI CreateRecentComboBoxEx(HWND hwndDlg, struct MsgBoxData *data)
mir_snprintf(buff, "SMsg%d", j);
j--;
- wchar_t *tszStatusMsg = db_get_tsa(NULL, "SimpleStatusMsg", buff);
+ wchar_t *tszStatusMsg = db_get_wsa(NULL, "SimpleStatusMsg", buff);
if (tszStatusMsg != NULL) {
if (*tszStatusMsg != '\0') {
found = TRUE;
@@ -332,7 +332,7 @@ HWND WINAPI CreateRecentComboBoxEx(HWND hwndDlg, struct MsgBoxData *data)
for (int i = 1; i <= data->num_def_msgs; ++i) {
// predefined messages
mir_snprintf(buff, "DefMsg%d", i);
- wchar_t *tszStatusMsg = db_get_tsa(NULL, "SimpleStatusMsg", buff);
+ wchar_t *tszStatusMsg = db_get_wsa(NULL, "SimpleStatusMsg", buff);
if (tszStatusMsg != NULL) {
if (*tszStatusMsg != '\0') {
cbei.iItem = -1;
@@ -640,7 +640,7 @@ void ClearHistory(struct MsgBoxData *data, int cur_sel)
for (i = 1; i <= data->max_hist_msgs; i++) {
mir_snprintf(text, "SMsg%d", i);
- db_set_ts(NULL, "SimpleStatusMsg", text, L"");
+ db_set_ws(NULL, "SimpleStatusMsg", text, L"");
}
db_set_s(NULL, "SimpleStatusMsg", "LastMsg", "");
for (i = 0; i < accounts->count; i++) {
@@ -716,7 +716,7 @@ void SetEditControlText(struct MsgBoxData *data, HWND hwndDlg, int iStatus)
char *szSetting = db_get_sa(NULL, "SimpleStatusMsg", setting);
if (szSetting != NULL) {
if (*szSetting != '\0') {
- wchar_t *tszStatusMsg = db_get_tsa(NULL, "SimpleStatusMsg", szSetting);
+ wchar_t *tszStatusMsg = db_get_wsa(NULL, "SimpleStatusMsg", szSetting);
if (tszStatusMsg != NULL) {
if (*tszStatusMsg != '\0') {
SetDlgItemText(hwndDlg, IDC_EDIT1, tszStatusMsg);
@@ -745,7 +745,7 @@ void SetEditControlText(struct MsgBoxData *data, HWND hwndDlg, int iStatus)
else
mir_snprintf(setting, "Default");
- wchar_t *tszStatusMsg = db_get_tsa(NULL, "SRAway", StatusModeToDbSetting(iStatus, setting));
+ wchar_t *tszStatusMsg = db_get_wsa(NULL, "SRAway", StatusModeToDbSetting(iStatus, setting));
if (tszStatusMsg != NULL) {
SetDlgItemText(hwndDlg, IDC_EDIT1, tszStatusMsg);
fcursel = SendMessage(data->recent_cbex, CB_FINDSTRINGEXACT, num_start, (LPARAM)tszStatusMsg);
@@ -760,7 +760,7 @@ void SetEditControlText(struct MsgBoxData *data, HWND hwndDlg, int iStatus)
else
mir_snprintf(setting, "Msg");
- wchar_t *tszStatusMsg = db_get_tsa(NULL, "SRAway", StatusModeToDbSetting(iStatus, setting));
+ wchar_t *tszStatusMsg = db_get_wsa(NULL, "SRAway", StatusModeToDbSetting(iStatus, setting));
if (tszStatusMsg != NULL) {
SetDlgItemText(hwndDlg, IDC_EDIT1, tszStatusMsg);
fcursel = SendMessage(data->recent_cbex, CB_FINDSTRINGEXACT, num_start, (LPARAM)tszStatusMsg);
@@ -1131,7 +1131,7 @@ INT_PTR CALLBACK AwayMsgBoxDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
db_set_s(NULL, "SimpleStatusMsg", szSetting, "");
mir_snprintf(szSetting, "%sMsg", msgbox_data->m_szProto);
- db_set_ts(NULL, "SRAway", StatusModeToDbSetting(msgbox_data->m_iStatus, szSetting), L"");
+ db_set_ws(NULL, "SRAway", StatusModeToDbSetting(msgbox_data->m_iStatus, szSetting), L"");
}
else {
db_set_s(NULL, "SimpleStatusMsg", "LastMsg", "");
@@ -1153,10 +1153,10 @@ INT_PTR CALLBACK AwayMsgBoxDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
mir_snprintf(szSetting, "%sMsg", accounts->pa[j]->szModuleName);
iStatus = msgbox_data->m_bOnStartup ? GetStartupStatus(accounts->pa[j]->szModuleName) : GetCurrentStatus(accounts->pa[j]->szModuleName);
- db_set_ts(NULL, "SRAway", StatusModeToDbSetting(iStatus, szSetting), L"");
+ db_set_ws(NULL, "SRAway", StatusModeToDbSetting(iStatus, szSetting), L"");
}
- db_set_ts(NULL, "SRAway", StatusModeToDbSetting(msgbox_data->m_iStatus, "Msg"), L""); // for compatibility with some plugins
+ db_set_ws(NULL, "SRAway", StatusModeToDbSetting(msgbox_data->m_iStatus, "Msg"), L""); // for compatibility with some plugins
}
if (bCurrentStatus)
@@ -1172,7 +1172,7 @@ INT_PTR CALLBACK AwayMsgBoxDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
for (int i = 1; i <= msgbox_data->max_hist_msgs; i++) {
mir_snprintf(buff, "SMsg%d", i);
- wchar_t *tszStatusMsg = db_get_tsa(NULL, "SimpleStatusMsg", buff);
+ wchar_t *tszStatusMsg = db_get_wsa(NULL, "SimpleStatusMsg", buff);
if (tszStatusMsg != NULL) {
if (!mir_wstrcmp(tszStatusMsg, tszMsg)) {
found = true;
@@ -1181,7 +1181,7 @@ INT_PTR CALLBACK AwayMsgBoxDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
db_set_s(NULL, "SimpleStatusMsg", buff2, buff);
mir_snprintf(buff2, "%sMsg", msgbox_data->m_szProto);
- db_set_ts(NULL, "SRAway", StatusModeToDbSetting(msgbox_data->m_iStatus, buff2), tszMsg);
+ db_set_ws(NULL, "SRAway", StatusModeToDbSetting(msgbox_data->m_iStatus, buff2), tszMsg);
}
else {
db_set_s(NULL, "SimpleStatusMsg", "LastMsg", buff);
@@ -1203,7 +1203,7 @@ INT_PTR CALLBACK AwayMsgBoxDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
mir_snprintf(buff2, "%sMsg", accounts->pa[j]->szModuleName);
iStatus = msgbox_data->m_bOnStartup ? GetStartupStatus(accounts->pa[j]->szModuleName) : GetCurrentStatus(accounts->pa[j]->szModuleName);
- db_set_ts(NULL, "SRAway", StatusModeToDbSetting(iStatus, buff2), tszMsg);
+ db_set_ws(NULL, "SRAway", StatusModeToDbSetting(iStatus, buff2), tszMsg);
}
}
mir_free(tszStatusMsg);
@@ -1222,14 +1222,14 @@ INT_PTR CALLBACK AwayMsgBoxDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
last_modified_msg++;
mir_snprintf(buff, "SMsg%d", last_modified_msg);
- db_set_ts(NULL, "SimpleStatusMsg", buff, tszMsg);
+ db_set_ws(NULL, "SimpleStatusMsg", buff, tszMsg);
if (msgbox_data->m_szProto) {
mir_snprintf(buff2, "Last%sMsg", msgbox_data->m_szProto);
db_set_s(NULL, "SimpleStatusMsg", buff2, buff);
mir_snprintf(buff2, "%sMsg", msgbox_data->m_szProto);
- db_set_ts(NULL, "SRAway", StatusModeToDbSetting(msgbox_data->m_iStatus, buff2), tszMsg);
+ db_set_ws(NULL, "SRAway", StatusModeToDbSetting(msgbox_data->m_iStatus, buff2), tszMsg);
}
else {
db_set_s(NULL, "SimpleStatusMsg", "LastMsg", buff);
@@ -1251,14 +1251,14 @@ INT_PTR CALLBACK AwayMsgBoxDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
mir_snprintf(buff2, "%sMsg", accounts->pa[j]->szModuleName);
iStatus = msgbox_data->m_bOnStartup ? GetStartupStatus(accounts->pa[j]->szModuleName) : GetCurrentStatus(accounts->pa[j]->szModuleName);
- db_set_ts(NULL, "SRAway", StatusModeToDbSetting(iStatus, buff2), tszMsg);
+ db_set_ws(NULL, "SRAway", StatusModeToDbSetting(iStatus, buff2), tszMsg);
}
}
db_set_w(NULL, "SimpleStatusMsg", "LMMsg", (WORD)last_modified_msg);
}
if (!msgbox_data->m_szProto)
- db_set_ts(NULL, "SRAway", StatusModeToDbSetting(msgbox_data->m_iStatus, "Msg"), tszMsg); // for compatibility with some plugins
+ db_set_ws(NULL, "SRAway", StatusModeToDbSetting(msgbox_data->m_iStatus, "Msg"), tszMsg); // for compatibility with some plugins
if (bCurrentStatus)
SetStatusMessage(msgbox_data->m_szProto, msgbox_data->m_iInitialStatus, ID_STATUS_CURRENT, tszMsg, msgbox_data->m_bOnStartup);
@@ -1386,7 +1386,7 @@ INT_PTR CALLBACK AwayMsgBoxDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
if (LOWORD(histitem.lParam) == HISTORY_MSG) {
char szSetting[16];
mir_snprintf(szSetting, "SMsg%d", (int)HIWORD(histitem.lParam));
- db_set_ts(NULL, "SimpleStatusMsg", szSetting, L"");
+ db_set_ws(NULL, "SimpleStatusMsg", szSetting, L"");
SendMessage(msgbox_data->recent_cbex, CBEM_DELETEITEM, (WPARAM)msgbox_data->curr_sel_msg, 0);
}
if (LOWORD(histitem.lParam) == PREDEFINED_MSG) {
@@ -1504,7 +1504,7 @@ INT_PTR CALLBACK AwayMsgBoxDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
if (LOWORD(histitem.lParam) == HISTORY_MSG) {
mir_snprintf(buff, "SMsg%d", (int)HIWORD(histitem.lParam));
- db_set_ts(NULL, "SimpleStatusMsg", buff, L"");
+ db_set_ws(NULL, "SimpleStatusMsg", buff, L"");
}
else if (LOWORD(histitem.lParam) == PREDEFINED_MSG)
msgbox_data->m_bPredefChanged = TRUE;
@@ -1598,7 +1598,7 @@ INT_PTR CALLBACK AwayMsgBoxDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
mir_snprintf(buff, "DefMsg%d", i);
if (LOWORD(cbitem.lParam) == PREDEFINED_MSG) {
new_num_def_msgs++;
- db_set_ts(NULL, "SimpleStatusMsg", buff, text);
+ db_set_ws(NULL, "SimpleStatusMsg", buff, text);
}
else
db_unset(NULL, "SimpleStatusMsg", buff);
diff --git a/plugins/SimpleStatusMsg/src/options.cpp b/plugins/SimpleStatusMsg/src/options.cpp
index ebed7ada43..b6ddf1cc11 100644
--- a/plugins/SimpleStatusMsg/src/options.cpp
+++ b/plugins/SimpleStatusMsg/src/options.cpp
@@ -138,7 +138,7 @@ INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
val = db_get_b(NULL, "SimpleStatusMsg", (char *)StatusModeToDbSetting(i, "Flags"), STATUS_DEFAULT);
data->status_msg[0].flags[i - ID_STATUS_ONLINE] = val;
- ptrW text( db_get_tsa(NULL, "SRAway", StatusModeToDbSetting(i, "Default")));
+ ptrW text( db_get_wsa(NULL, "SRAway", StatusModeToDbSetting(i, "Default")));
mir_wstrncpy(data->status_msg[0].msg[i - ID_STATUS_ONLINE], (text == NULL) ? GetDefaultMessage(i) : text, 1024);
for (j = 0; j < accounts->count; j++)
@@ -150,7 +150,7 @@ INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
val = db_get_b(NULL, "SimpleStatusMsg", (char *)StatusModeToDbSetting(i, setting), STATUS_DEFAULT);
data->status_msg[j+1].flags[i-ID_STATUS_ONLINE] = val;
mir_snprintf(setting, "%sDefault", accounts->pa[j]->szModuleName);
- text = db_get_tsa(NULL, "SRAway", StatusModeToDbSetting(i, setting));
+ text = db_get_wsa(NULL, "SRAway", StatusModeToDbSetting(i, setting));
mir_wstrncpy(data->status_msg[j + 1].msg[i - ID_STATUS_ONLINE], (text == NULL) ? GetDefaultMessage(i) : text, 1024);
}
}
@@ -203,7 +203,7 @@ INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
if (index != CB_ERR && index != CB_ERRSPACE)
{
mir_snprintf(setting, "Proto%sDefault", accounts->pa[i]->szModuleName);
- data->proto_msg[i+1].msg = db_get_tsa(NULL, "SimpleStatusMsg", setting);
+ data->proto_msg[i+1].msg = db_get_wsa(NULL, "SimpleStatusMsg", setting);
mir_snprintf(setting, "Proto%sFlags", accounts->pa[i]->szModuleName);
val = db_get_b(NULL, "SimpleStatusMsg", setting, PROTO_DEFAULT);
@@ -451,7 +451,7 @@ INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
char *szSetting = db_get_sa(NULL, "SimpleStatusMsg", setting);
if (szSetting)
{
- wchar_t *tszStatusMsg = db_get_tsa(NULL, "SimpleStatusMsg", szSetting);
+ wchar_t *tszStatusMsg = db_get_wsa(NULL, "SimpleStatusMsg", szSetting);
if (tszStatusMsg && mir_wstrlen(tszStatusMsg))
{
if (tszStatusMsg && mir_wstrlen(tszStatusMsg))
@@ -489,7 +489,7 @@ INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
else
mir_snprintf(setting, "Msg");
- wchar_t *tszStatusMsg = db_get_tsa(NULL, "SRAway", StatusModeToDbSetting(j + ID_STATUS_ONLINE, setting));
+ wchar_t *tszStatusMsg = db_get_wsa(NULL, "SRAway", StatusModeToDbSetting(j + ID_STATUS_ONLINE, setting));
if (tszStatusMsg)
{
SetDlgItemText(hwndDlg, IDC_OPTEDIT1, tszStatusMsg);
@@ -602,7 +602,7 @@ INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
char *szSetting = db_get_sa(NULL, "SimpleStatusMsg", setting);
if (szSetting != NULL)
{
- wchar_t *tszStatusMsg = db_get_tsa(NULL, "SimpleStatusMsg", szSetting);
+ wchar_t *tszStatusMsg = db_get_wsa(NULL, "SimpleStatusMsg", szSetting);
if (tszStatusMsg)
{
if (tszStatusMsg[0])
@@ -639,7 +639,7 @@ INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
else
mir_snprintf(setting, "Msg");
- wchar_t *tszStatusMsg = db_get_tsa(NULL, "SRAway", StatusModeToDbSetting(j + ID_STATUS_ONLINE, setting));
+ wchar_t *tszStatusMsg = db_get_wsa(NULL, "SRAway", StatusModeToDbSetting(j + ID_STATUS_ONLINE, setting));
if (tszStatusMsg != NULL)
{
SetDlgItemText(hwndDlg, IDC_OPTEDIT1, tszStatusMsg);
@@ -697,7 +697,7 @@ INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
char *szSetting = db_get_sa(NULL, "SimpleStatusMsg", setting);
if (szSetting != NULL)
{
- wchar_t *tszStatusMsg = db_get_tsa(NULL, "SimpleStatusMsg", szSetting);
+ wchar_t *tszStatusMsg = db_get_wsa(NULL, "SimpleStatusMsg", szSetting);
if (tszStatusMsg)
{
if (tszStatusMsg[0])
@@ -726,7 +726,7 @@ INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
else
mir_snprintf(setting, "Msg");
- wchar_t *tszStatusMsg = db_get_tsa(NULL, "SRAway", StatusModeToDbSetting(j + ID_STATUS_ONLINE, setting));
+ wchar_t *tszStatusMsg = db_get_wsa(NULL, "SRAway", StatusModeToDbSetting(j + ID_STATUS_ONLINE, setting));
if (tszStatusMsg != NULL)
{
SetDlgItemText(hwndDlg, IDC_OPTEDIT1, tszStatusMsg);
@@ -807,7 +807,7 @@ INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
char *szSetting = db_get_sa(NULL, "SimpleStatusMsg", setting);
if (szSetting != NULL)
{
- wchar_t *tszStatusMsg = db_get_tsa(NULL, "SimpleStatusMsg", szSetting);
+ wchar_t *tszStatusMsg = db_get_wsa(NULL, "SimpleStatusMsg", szSetting);
if (tszStatusMsg)
{
if (tszStatusMsg[0])
@@ -837,7 +837,7 @@ INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
else
mir_snprintf(setting, "Msg");
- wchar_t *tszStatusMsg = db_get_tsa(NULL, "SRAway", StatusModeToDbSetting(i + ID_STATUS_ONLINE, setting));
+ wchar_t *tszStatusMsg = db_get_wsa(NULL, "SRAway", StatusModeToDbSetting(i + ID_STATUS_ONLINE, setting));
if (tszStatusMsg != NULL)
{
SetDlgItemText(hwndDlg, IDC_OPTEDIT1, tszStatusMsg);
@@ -999,7 +999,7 @@ INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
{
if (accounts->statusMsgFlags & Proto_Status2Flag(i))
{
- db_set_ts(NULL, "SRAway", StatusModeToDbSetting(i, "Default"), data->status_msg[0].msg[i - ID_STATUS_ONLINE]);
+ db_set_ws(NULL, "SRAway", StatusModeToDbSetting(i, "Default"), data->status_msg[0].msg[i - ID_STATUS_ONLINE]);
db_set_b(NULL, "SimpleStatusMsg", StatusModeToDbSetting(i, "Flags"), (BYTE)data->status_msg[0].flags[i - ID_STATUS_ONLINE]);
for (int j = 0; j < accounts->count; j++)
@@ -1013,7 +1013,7 @@ INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
if (CallProtoService(accounts->pa[j]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0) & Proto_Status2Flag(i))
{
mir_snprintf(szSetting, "%sDefault", accounts->pa[j]->szModuleName);
- db_set_ts(NULL, "SRAway", StatusModeToDbSetting(i, szSetting), data->status_msg[j + 1].msg[i - ID_STATUS_ONLINE]);
+ db_set_ws(NULL, "SRAway", StatusModeToDbSetting(i, szSetting), data->status_msg[j + 1].msg[i - ID_STATUS_ONLINE]);
mir_snprintf(szSetting, "%sFlags", accounts->pa[j]->szModuleName);
db_set_b(NULL, "SimpleStatusMsg", StatusModeToDbSetting(i, szSetting), (BYTE)data->status_msg[j + 1].flags[i - ID_STATUS_ONLINE]);
@@ -1041,7 +1041,7 @@ INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
mir_snprintf(szSetting, "Proto%sDefault", accounts->pa[i]->szModuleName);
if (data->proto_msg[i+1].msg && (data->proto_msg[i+1].flags & PROTO_THIS_MSG))
- db_set_ts(NULL, "SimpleStatusMsg", szSetting, data->proto_msg[i+1].msg);
+ db_set_ws(NULL, "SimpleStatusMsg", szSetting, data->proto_msg[i+1].msg);
// else
// db_unset(NULL, "SimpleStatusMsg", szSetting);
@@ -1181,7 +1181,7 @@ static bool IsHistoryMsgsFound(HWND, int histMax)
if (j < 1)
j = histMax;
mir_snprintf(szSetting, "SMsg%d", j);
- wchar_t *tszStatusMsg = db_get_tsa(NULL, "SimpleStatusMsg", szSetting);
+ wchar_t *tszStatusMsg = db_get_wsa(NULL, "SimpleStatusMsg", szSetting);
if (tszStatusMsg != NULL) {
if (*tszStatusMsg != '\0') {
mir_free(tszStatusMsg);
@@ -1330,7 +1330,7 @@ static INT_PTR CALLBACK DlgAdvancedOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM w
for (int i = 1; i <= max_hist_msgs; i++) {
char text[8];
mir_snprintf(text, "SMsg%d", i);
- db_set_ts(NULL, "SimpleStatusMsg", text, L"");
+ db_set_ws(NULL, "SimpleStatusMsg", text, L"");
}
db_set_s(NULL, "SimpleStatusMsg", "LastMsg", "");
diff --git a/plugins/SkypeStatusChange/src/main.cpp b/plugins/SkypeStatusChange/src/main.cpp
index a8329b8598..1b9c1d8e11 100644
--- a/plugins/SkypeStatusChange/src/main.cpp
+++ b/plugins/SkypeStatusChange/src/main.cpp
@@ -189,10 +189,10 @@ LRESULT APIENTRY SkypeAPI_WindowProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp)
if (g_Options.GetSyncStatusMsgFlag()) {
wchar_t* pszStatusMsg = NULL;
if (ProtoServiceExists(si.Module(), PS_GETMYAWAYMSG))
- pszStatusMsg = reinterpret_cast<wchar_t*>(CallProtoService(si.Module(), PS_GETMYAWAYMSG, (WPARAM)ms.m_nMirandaStatus, SGMA_TCHAR));
+ pszStatusMsg = reinterpret_cast<wchar_t*>(CallProtoService(si.Module(), PS_GETMYAWAYMSG, (WPARAM)ms.m_nMirandaStatus, SGMA_UNICODE));
if ((NULL == pszStatusMsg) || (CALLSERVICE_NOTFOUND == INT_PTR(pszStatusMsg)))
- pszStatusMsg = reinterpret_cast<wchar_t*>(CallService(MS_AWAYMSG_GETSTATUSMSGT, (WPARAM)ms.m_nMirandaStatus, 0));
+ pszStatusMsg = reinterpret_cast<wchar_t*>(CallService(MS_AWAYMSG_GETSTATUSMSGW, (WPARAM)ms.m_nMirandaStatus, 0));
if (pszStatusMsg && reinterpret_cast<LPARAM>(pszStatusMsg) != CALLSERVICE_NOTFOUND) {
T2Utf pMsg(pszStatusMsg);
diff --git a/plugins/SkypeStatusChange/src/options.cpp b/plugins/SkypeStatusChange/src/options.cpp
index cb789436a4..eb5d163de7 100644
--- a/plugins/SkypeStatusChange/src/options.cpp
+++ b/plugins/SkypeStatusChange/src/options.cpp
@@ -78,7 +78,7 @@ void InitProtocolTree(HWND hwndTreeCtrl)
else
nState = TCBS_UNCHECKED;
}
- tree_insert_item(hwndTreeCtrl,TranslateTS(g_aStatusCode[OFFLINE_STATUS_INDEX].m_ptszStatusName),hti,nState,pItemData);
+ tree_insert_item(hwndTreeCtrl,TranslateW(g_aStatusCode[OFFLINE_STATUS_INDEX].m_ptszStatusName),hti,nState,pItemData);
for(size_t k = 0; k < _countof(g_aStatusCode); ++k) {
const CMirandaStatus2SkypeStatus& m2s = g_aStatusCode[k];
unsigned long statusFlags = Proto_Status2Flag(m2s.m_nMirandaStatus);
@@ -101,7 +101,7 @@ void InitProtocolTree(HWND hwndTreeCtrl)
nState = TCBS_UNCHECKED;
}
- tree_insert_item(hwndTreeCtrl,TranslateTS(m2s.m_ptszStatusName),hti,nState,pItemData);
+ tree_insert_item(hwndTreeCtrl,TranslateW(m2s.m_ptszStatusName),hti,nState,pItemData);
}
}
diff --git a/plugins/SmileyAdd/src/customsmiley.cpp b/plugins/SmileyAdd/src/customsmiley.cpp
index 64fdd3d17e..5f9ff1b9fb 100644
--- a/plugins/SmileyAdd/src/customsmiley.cpp
+++ b/plugins/SmileyAdd/src/customsmiley.cpp
@@ -59,7 +59,7 @@ SmileyPackCType* SmileyPackCListType::GetSmileyPack(MCONTACT id)
}
-SmileyCType::SmileyCType(const CMString &fullpath, const wchar_t *filepath)
+SmileyCType::SmileyCType(const CMStringW &fullpath, const wchar_t *filepath)
{
LoadFromResource(fullpath, 0);
CreateTriggerText(_T2A(filepath));
@@ -95,7 +95,7 @@ bool SmileyCType::CreateTriggerText(char *text)
bool SmileyPackCType::LoadSmileyDir(wchar_t *dir)
{
- CMString dirs = dir;
+ CMStringW dirs = dir;
dirs += L"\\*.*";
_wfinddata_t c_file;
@@ -103,7 +103,7 @@ bool SmileyPackCType::LoadSmileyDir(wchar_t *dir)
if (hFile > -1L) {
do {
if (c_file.name[0] != '.') {
- CMString fullpath = dir;
+ CMStringW fullpath = dir;
fullpath = fullpath + L"\\" + c_file.name;
wchar_t *div = wcsrchr(c_file.name, '.');
if (div) {
@@ -125,11 +125,11 @@ bool SmileyPackCType::LoadSmileyDir(wchar_t *dir)
bool SmileyPackCType::LoadSmiley(wchar_t *path)
{
- CMString dirs = path;
+ CMStringW dirs = path;
int slash = dirs.ReverseFind('\\');
int dot = dirs.ReverseFind('.');
- CMString name = dirs.Mid(slash + 1, dot - slash - 1);
+ CMStringW name = dirs.Mid(slash + 1, dot - slash - 1);
for (int i = 0; i < m_SmileyList.getCount(); i++)
if (m_SmileyList[i].GetTriggerText() == name) {
@@ -139,7 +139,7 @@ bool SmileyPackCType::LoadSmiley(wchar_t *path)
m_SmileyList.insert(new SmileyCType(dirs, (wchar_t*)name.c_str()));
- CMString empty;
+ CMStringW empty;
m_SmileyLookup.insert(new SmileyLookup(
m_SmileyList[m_SmileyList.getCount() - 1].GetTriggerText(), false, m_SmileyList.getCount() - 1, empty));
@@ -148,7 +148,7 @@ bool SmileyPackCType::LoadSmiley(wchar_t *path)
void SmileyPackCType::AddTriggersToSmileyLookup(void)
{
- CMString empty;
+ CMStringW empty;
for (int dist = 0; dist < m_SmileyList.getCount(); dist++) {
SmileyLookup *dats = new SmileyLookup(m_SmileyList[dist].GetTriggerText(), false, dist, empty);
m_SmileyLookup.insert(dats);
diff --git a/plugins/SmileyAdd/src/customsmiley.h b/plugins/SmileyAdd/src/customsmiley.h
index b1366e83bc..bd76875796 100644
--- a/plugins/SmileyAdd/src/customsmiley.h
+++ b/plugins/SmileyAdd/src/customsmiley.h
@@ -22,7 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
class SmileyCType : public SmileyType
{
public:
- SmileyCType(const CMString &fullpath, const wchar_t *filepath);
+ SmileyCType(const CMStringW &fullpath, const wchar_t *filepath);
bool CreateTriggerText(char *text);
};
diff --git a/plugins/SmileyAdd/src/download.cpp b/plugins/SmileyAdd/src/download.cpp
index 8a46c4fc70..8e7fa9f86f 100644
--- a/plugins/SmileyAdd/src/download.cpp
+++ b/plugins/SmileyAdd/src/download.cpp
@@ -23,11 +23,11 @@ static HANDLE hFolder;
struct QueueElem
{
- CMString url;
- CMString fname;
+ CMStringW url;
+ CMStringW fname;
bool needext;
- QueueElem(CMString &purl, CMString &pfname, bool ne)
+ QueueElem(CMStringW &purl, CMStringW &pfname, bool ne)
: url(purl), fname(pfname), needext(ne)
{
}
@@ -135,7 +135,7 @@ void __cdecl SmileyDownloadThread(void*)
InternetDownloadFile(_T2A(dlQueue[0].url.c_str()), _T2A(dlQueue[0].fname.c_str()), hHttpDwnl);
WaitForSingleObject(g_hDlMutex, 3000);
- CMString fname(dlQueue[0].fname);
+ CMStringW fname(dlQueue[0].fname);
if (dlQueue[0].needext) { fname += GetImageExt(fname); needext = true; }
_wrename(dlQueue[0].fname.c_str(), fname.c_str());
}
@@ -156,14 +156,14 @@ void __cdecl SmileyDownloadThread(void*)
}
}
-bool GetSmileyFile(CMString &url, const CMString &packstr)
+bool GetSmileyFile(CMStringW &url, const CMStringW &packstr)
{
_TPattern *urlsplit = _TPattern::compile(L".*/(.*)");
_TMatcher *m0 = urlsplit->createTMatcher(url);
m0->findFirstMatch();
- CMString filename;
+ CMStringW filename;
filename.AppendFormat(L"%s\\%s\\", cachepath, packstr.c_str());
int pathpos = filename.GetLength();
filename += m0->getGroup(1);
@@ -213,13 +213,13 @@ void GetSmileyCacheFolder(void)
FoldersGetCustomPathT(hFolder, cachepath, MAX_PATH, L"");
HookEvent(ME_FOLDERS_PATH_CHANGED, FolderChanged);
}
- else mir_wstrncpy(cachepath, VARST(L"%miranda_userdata%\\SmileyCache"), MAX_PATH);
+ else mir_wstrncpy(cachepath, VARSW(L"%miranda_userdata%\\SmileyCache"), MAX_PATH);
}
void DownloadInit(void)
{
NETLIBUSER nlu = { sizeof(nlu) };
- nlu.flags = NUF_OUTGOING | NUF_HTTPCONNS | NUF_NOHTTPSOPTION | NUF_TCHAR;
+ nlu.flags = NUF_OUTGOING | NUF_HTTPCONNS | NUF_NOHTTPSOPTION | NUF_UNICODE;
nlu.szSettingsModule = "SmileyAdd";
nlu.ptszDescriptiveName = TranslateT("SmileyAdd HTTP connections");
hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu);
diff --git a/plugins/SmileyAdd/src/download.h b/plugins/SmileyAdd/src/download.h
index 0e1b50bf3f..87a9322a8b 100644
--- a/plugins/SmileyAdd/src/download.h
+++ b/plugins/SmileyAdd/src/download.h
@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef SMILEYADD_DOWNLOAD_H_
#define SMILEYADD_DOWNLOAD_H_
-bool GetSmileyFile(CMString &url, const CMString &packstr);
+bool GetSmileyFile(CMStringW &url, const CMStringW &packstr);
void DownloadInit(void);
void DownloadClose(void);
diff --git a/plugins/SmileyAdd/src/general.cpp b/plugins/SmileyAdd/src/general.cpp
index 4fda95dd92..3071b83494 100644
--- a/plugins/SmileyAdd/src/general.cpp
+++ b/plugins/SmileyAdd/src/general.cpp
@@ -59,7 +59,7 @@ HICON GetDefaultIcon(bool copy)
return resIco;
}
-const wchar_t* GetImageExt(CMString &fname)
+const wchar_t* GetImageExt(CMStringW &fname)
{
const wchar_t *ext = L"";
@@ -124,14 +124,14 @@ HICON ImageList_GetIconFixed(HIMAGELIST himl, INT i, UINT fStyle)
return hIcon;
}
-void pathToRelative(const CMString &pSrc, CMString &pOut)
+void pathToRelative(const CMStringW &pSrc, CMStringW &pOut)
{
wchar_t szOutPath[MAX_PATH];
PathToRelativeT(pSrc.c_str(), szOutPath);
pOut = szOutPath;
}
-void pathToAbsolute(const CMString &pSrc, CMString &pOut)
+void pathToAbsolute(const CMStringW &pSrc, CMStringW &pOut)
{
wchar_t szOutPath[MAX_PATH];
@@ -139,10 +139,10 @@ void pathToAbsolute(const CMString &pSrc, CMString &pOut)
if (szVarPath == (wchar_t*)CALLSERVICE_NOTFOUND || szVarPath == NULL) {
wchar_t szExpPath[MAX_PATH];
ExpandEnvironmentStrings(pSrc.c_str(), szExpPath, _countof(szExpPath));
- PathToAbsoluteT(szExpPath, szOutPath);
+ PathToAbsoluteW(szExpPath, szOutPath);
}
else {
- PathToAbsoluteT(szVarPath, szOutPath);
+ PathToAbsoluteW(szVarPath, szOutPath);
mir_free(szVarPath);
}
pOut = szOutPath;
diff --git a/plugins/SmileyAdd/src/imagecache.cpp b/plugins/SmileyAdd/src/imagecache.cpp
index 6960adff96..aa20f59a70 100644
--- a/plugins/SmileyAdd/src/imagecache.cpp
+++ b/plugins/SmileyAdd/src/imagecache.cpp
@@ -21,7 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
static HANDLE g_hMutexIm;
static OBJLIST<ImageBase> g_imagecache(25, ImageType::CompareImg);
-static CMString lastdllname;
+static CMStringW lastdllname;
static HMODULE lastmodule;
static time_t laststamp;
static UINT_PTR timerId;
@@ -58,7 +58,7 @@ static void CALLBACK sttMainThreadCallback(PVOID)
}
-static HMODULE LoadDll(const CMString &file)
+static HMODULE LoadDll(const CMStringW &file)
{
WaitForSingleObject(g_hMutexIm, 3000);
@@ -190,7 +190,7 @@ int ImageBase::SelectNextFrame(const int frame)
/////////////////////////////////////////////////////////////////////////////////////////
-IconType::IconType(const unsigned id, const CMString &file, const int index, const IcoTypeEnum type)
+IconType::IconType(const unsigned id, const CMStringW &file, const int index, const IcoTypeEnum type)
: ImageBase(id)
{
m_SmileyIcon = NULL;
@@ -279,7 +279,7 @@ void ImageListItemType::GetSize(SIZE &size)
ImageList_GetIconSize(m_hImList, (int*)&size.cx, (int*)&size.cy);
}
-ImageType::ImageType(const unsigned id, const CMString &file, IStream *pStream)
+ImageType::ImageType(const unsigned id, const CMStringW &file, IStream *pStream)
: ImageBase(id)
{
m_bmp = NULL;
@@ -310,7 +310,7 @@ ImageType::ImageType(const unsigned id, const CMString &file, IStream *pStream)
}
}
-ImageType::ImageType(const unsigned id, const CMString &file, const int index, const IcoTypeEnum type)
+ImageType::ImageType(const unsigned id, const CMStringW &file, const int index, const IcoTypeEnum type)
: ImageBase(id)
{
m_bmp = NULL;
@@ -415,17 +415,17 @@ ImageFType::ImageFType(const unsigned id)
m_bmp = NULL;
}
-ImageFType::ImageFType(const unsigned id, const CMString &file)
+ImageFType::ImageFType(const unsigned id, const CMStringW &file)
: ImageBase(id)
{
m_bmp = NULL;
- FREE_IMAGE_FORMAT fif = fei->FI_GetFileTypeT(file.c_str(), 0);
+ FREE_IMAGE_FORMAT fif = fei->FI_GetFileTypeU(file.c_str(), 0);
if (fif == FIF_UNKNOWN)
- fif = fei->FI_GetFIFFromFilenameT(file.c_str());
+ fif = fei->FI_GetFIFFromFilenameU(file.c_str());
if (fif == FIF_UNKNOWN) return;
- FIBITMAP *dib = fei->FI_LoadT(fif, file.c_str(), 0);
+ FIBITMAP *dib = fei->FI_LoadU(fif, file.c_str(), 0);
if (dib == NULL) return;
bool transp = fei->FI_IsTransparent(dib) != 0;
@@ -525,9 +525,9 @@ void DestroyImageCache(void)
CloseHandle(g_hMutexIm);
}
-ImageBase* AddCacheImage(const CMString &file, int index)
+ImageBase* AddCacheImage(const CMStringW &file, int index)
{
- CMString tmpfile(file); tmpfile.AppendFormat(L"#%d", index);
+ CMStringW tmpfile(file); tmpfile.AppendFormat(L"#%d", index);
unsigned id = mir_hash(tmpfile.c_str(), tmpfile.GetLength() * sizeof(wchar_t));
WaitForSingleObject(g_hMutexIm, 3000);
@@ -539,7 +539,7 @@ ImageBase* AddCacheImage(const CMString &file, int index)
if (ind == -1)
return NULL;
- CMString ext = file.Mid(ind + 1);
+ CMStringW ext = file.Mid(ind + 1);
ext.MakeLower();
if (ext == L"dll" || ext == L"exe")
img = opt.HQScaling ? (ImageBase*)new ImageType(id, file, index, icoDll) : (ImageBase*)new IconType(id, file, index, icoDll);
diff --git a/plugins/SmileyAdd/src/imagecache.h b/plugins/SmileyAdd/src/imagecache.h
index da019301a9..cc0ef2cf3b 100644
--- a/plugins/SmileyAdd/src/imagecache.h
+++ b/plugins/SmileyAdd/src/imagecache.h
@@ -66,7 +66,7 @@ private:
HICON m_SmileyIcon;
public:
- IconType(const unsigned id, const CMString &file, const int index, const IcoTypeEnum type);
+ IconType(const unsigned id, const CMStringW &file, const int index, const IcoTypeEnum type);
~IconType();
void DrawInternal(HDC dc, int x, int y, int sizeX, int sizeY);
@@ -101,8 +101,8 @@ private:
public:
- ImageType(const unsigned id, const CMString &file, IStream *pStream);
- ImageType(const unsigned id, const CMString &file, const int index, const IcoTypeEnum type);
+ ImageType(const unsigned id, const CMStringW &file, IStream *pStream);
+ ImageType(const unsigned id, const CMStringW &file, const int index, const IcoTypeEnum type);
~ImageType();
void SelectFrame(int frame);
@@ -123,7 +123,7 @@ protected:
public:
ImageFType(const unsigned id);
- ImageFType(const unsigned id, const CMString &file);
+ ImageFType(const unsigned id, const CMStringW &file);
~ImageFType();
void DrawInternal(HDC dc, int x, int y, int sizeX, int sizeY);
@@ -131,7 +131,7 @@ public:
void GetSize(SIZE &size);
};
-ImageBase* AddCacheImage(const CMString &file, int index);
+ImageBase* AddCacheImage(const CMStringW &file, int index);
void InitImageCache(void);
void DestroyImageCache(void);
diff --git a/plugins/SmileyAdd/src/options.cpp b/plugins/SmileyAdd/src/options.cpp
index eca94429b5..e477945e4b 100644
--- a/plugins/SmileyAdd/src/options.cpp
+++ b/plugins/SmileyAdd/src/options.cpp
@@ -206,7 +206,7 @@ void OptionsDialogType::AddCategory(void)
{
wchar_t cat[30];
GetDlgItemText(m_hwndDialog, IDC_NEWCATEGORY, cat, _countof(cat));
- CMString catd = cat;
+ CMStringW catd = cat;
if (!catd.IsEmpty()) {
tmpsmcat.AddCategory(cat, catd, smcCustom);
@@ -248,7 +248,7 @@ void OptionsDialogType::UpdateControls(bool force)
if (smc == NULL)
return;
- const CMString &smf = smc->GetFilename();
+ const CMStringW &smf = smc->GetFilename();
SetDlgItemText(m_hwndDialog, IDC_FILENAME, smf);
if (smPack.GetFilename() != smf || force)
@@ -259,7 +259,7 @@ void OptionsDialogType::UpdateControls(bool force)
SetDlgItemText(m_hwndDialog, IDC_LIBAUTHOR, smPack.GetAuthor().c_str());
SetDlgItemText(m_hwndDialog, IDC_LIBVERSION, smPack.GetVersion().c_str());
- SetDlgItemText(m_hwndDialog, IDC_LIBNAME, TranslateTS(smPack.GetName().c_str()));
+ SetDlgItemText(m_hwndDialog, IDC_LIBNAME, TranslateW(smPack.GetName().c_str()));
}
long OptionsDialogType::GetSelProto(HTREEITEM hItem)
@@ -286,17 +286,17 @@ void OptionsDialogType::UpdateVisibleSmPackList(void)
bool visible = useOne ? !smc[i].IsProto() : visiblecat;
if (!visible && smc[i].IsAcc() && !useOne) {
- CMString PhysProtoName = L"AllProto";
- CMString ProtoName = smc[i].GetName();
+ CMStringW PhysProtoName = L"AllProto";
+ CMStringW ProtoName = smc[i].GetName();
DBVARIANT dbv;
- if (db_get_ts(NULL, _T2A(ProtoName.GetBuffer()), "AM_BaseProto", &dbv) == 0) {
+ if (db_get_ws(NULL, _T2A(ProtoName.GetBuffer()), "AM_BaseProto", &dbv) == 0) {
ProtoName = dbv.ptszVal;
db_free(&dbv);
}
else
ProtoName.Empty();
- CMString FileName;
+ CMStringW FileName;
if (!ProtoName.IsEmpty()) {
PhysProtoName += ProtoName;
SmileyCategoryType *scm = tmpsmcat.GetSmileyCategory(PhysProtoName);
@@ -443,7 +443,7 @@ void OptionsDialogType::ApplyChanges(void)
opt.Save();
// Cleanup database
- CMString empty;
+ CMStringW empty;
SmileyCategoryListType::SmileyCategoryVectorType &smc = *g_SmileyCategories.GetSmileyCategoryList();
for (int i = 0; i < smc.getCount(); i++)
if (tmpsmcat.GetSmileyCategory(smc[i].GetName()) == NULL)
@@ -467,7 +467,7 @@ bool OptionsDialogType::BrowseForSmileyPacks(int item)
ofn.lpstrFile = filename;
ofn.nMaxFile = _countof(filename);
- CMString inidir;
+ CMStringW inidir;
SmileyCategoryType *smc = tmpsmcat.GetSmileyCategory(item);
if (smc->GetFilename().IsEmpty())
pathToAbsolute(L"Smileys", inidir);
@@ -499,7 +499,7 @@ bool OptionsDialogType::BrowseForSmileyPacks(int item)
ofn.lpstrDefExt = L"msl";
if (GetOpenFileName(&ofn)) {
- CMString relpath;
+ CMStringW relpath;
pathToRelative(filename, relpath);
smc->SetFilename(relpath);
@@ -516,7 +516,7 @@ void OptionsDialogType::FilenameChanged(void)
SmileyCategoryType *smc = tmpsmcat.GetSmileyCategory(GetSelProto());
if (smc->GetFilename() != str) {
- CMString temp(str);
+ CMStringW temp(str);
smc->SetFilename(temp);
UpdateControls();
}
@@ -588,48 +588,48 @@ void OptionsType::Load(void)
HorizontalSorting = db_get_b(NULL, "SmileyAdd", "HorizontalSorting", 1) != 0;
}
-void OptionsType::ReadPackFileName(CMString &filename, const CMString &name, const CMString &defaultFilename)
+void OptionsType::ReadPackFileName(CMStringW &filename, const CMStringW &name, const CMStringW &defaultFilename)
{
- CMString settingKey = name + L"-filename";
+ CMStringW settingKey = name + L"-filename";
- ptrW tszValue(db_get_tsa(NULL, "SmileyAdd", _T2A(settingKey.c_str())));
+ ptrW tszValue(db_get_wsa(NULL, "SmileyAdd", _T2A(settingKey.c_str())));
filename = (tszValue != NULL) ? (wchar_t*)tszValue : defaultFilename;
}
-void OptionsType::WritePackFileName(const CMString &filename, const CMString &name)
+void OptionsType::WritePackFileName(const CMStringW &filename, const CMStringW &name)
{
- CMString settingKey = name + L"-filename";
- db_set_ts(NULL, "SmileyAdd", _T2A(settingKey.c_str()), filename.c_str());
+ CMStringW settingKey = name + L"-filename";
+ db_set_ws(NULL, "SmileyAdd", _T2A(settingKey.c_str()), filename.c_str());
}
-void OptionsType::ReadCustomCategories(CMString &cats)
+void OptionsType::ReadCustomCategories(CMStringW &cats)
{
- ptrW tszValue(db_get_tsa(NULL, "SmileyAdd", "CustomCategories"));
+ ptrW tszValue(db_get_wsa(NULL, "SmileyAdd", "CustomCategories"));
if (tszValue != NULL)
cats = tszValue;
}
-void OptionsType::WriteCustomCategories(const CMString &cats)
+void OptionsType::WriteCustomCategories(const CMStringW &cats)
{
if (cats.IsEmpty())
db_unset(NULL, "SmileyAdd", "CustomCategories");
else
- db_set_ts(NULL, "SmileyAdd", "CustomCategories", cats.c_str());
+ db_set_ws(NULL, "SmileyAdd", "CustomCategories", cats.c_str());
}
-void OptionsType::ReadContactCategory(MCONTACT hContact, CMString &cats)
+void OptionsType::ReadContactCategory(MCONTACT hContact, CMStringW &cats)
{
- ptrW tszValue(db_get_tsa(hContact, "SmileyAdd", "CustomCategory"));
+ ptrW tszValue(db_get_wsa(hContact, "SmileyAdd", "CustomCategory"));
if (tszValue != NULL)
cats = tszValue;
}
-void OptionsType::WriteContactCategory(MCONTACT hContact, const CMString &cats)
+void OptionsType::WriteContactCategory(MCONTACT hContact, const CMStringW &cats)
{
if (cats.IsEmpty())
db_unset(hContact, "SmileyAdd", "CustomCategory");
else
- db_set_ts(hContact, "SmileyAdd", "CustomCategory", cats.c_str());
+ db_set_ws(hContact, "SmileyAdd", "CustomCategory", cats.c_str());
}
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/SmileyAdd/src/options.h b/plugins/SmileyAdd/src/options.h
index c4139f1131..adf6da53c8 100644
--- a/plugins/SmileyAdd/src/options.h
+++ b/plugins/SmileyAdd/src/options.h
@@ -48,12 +48,12 @@ public:
void Load(void);
void Save(void);
- static void ReadPackFileName(CMString &filename, const CMString &name, const CMString &defaultFilename);
- static void ReadCustomCategories(CMString &cats);
- static void ReadContactCategory(MCONTACT hContact, CMString &cats);
- static void WritePackFileName(const CMString &filename, const CMString &name);
- static void WriteCustomCategories(const CMString &cats);
- static void WriteContactCategory(MCONTACT hContact, const CMString &cats);
+ static void ReadPackFileName(CMStringW &filename, const CMStringW &name, const CMStringW &defaultFilename);
+ static void ReadCustomCategories(CMStringW &cats);
+ static void ReadContactCategory(MCONTACT hContact, CMStringW &cats);
+ static void WritePackFileName(const CMStringW &filename, const CMStringW &name);
+ static void WriteCustomCategories(const CMStringW &cats);
+ static void WriteContactCategory(MCONTACT hContact, const CMStringW &cats);
};
extern OptionsType opt;
diff --git a/plugins/SmileyAdd/src/regexp/WCMatcher.cpp b/plugins/SmileyAdd/src/regexp/WCMatcher.cpp
index 939e347afd..12c1c0d4bd 100644
--- a/plugins/SmileyAdd/src/regexp/WCMatcher.cpp
+++ b/plugins/SmileyAdd/src/regexp/WCMatcher.cpp
@@ -10,7 +10,7 @@ const int WCMatcher::MATCH_ENTIRE_STRING = 0x01;
@version 1.07.00
*/
-WCMatcher::WCMatcher(WCPattern *pattern, const CMString &text)
+WCMatcher::WCMatcher(WCPattern *pattern, const CMStringW &text)
{
pat = pattern;
str = &text;
@@ -48,11 +48,11 @@ void WCMatcher::clearGroups()
for (i = 1; i <= ncgc; ++i) groups[0 - i] = starts[0 - i] = ends[0 - i] = -1;
}
-CMString WCMatcher::replaceWithGroups(const CMString &pStr)
+CMStringW WCMatcher::replaceWithGroups(const CMStringW &pStr)
{
- CMString ret;
+ CMStringW ret;
- CMString t = pStr;
+ CMStringW t = pStr;
while (t.GetLength() > 0) {
if (t[0] == '\\') {
t.Delete(0);
@@ -86,7 +86,7 @@ unsigned long WCMatcher::getFlags() const
return flags;
}
-const CMString& WCMatcher::getText() const
+const CMStringW& WCMatcher::getText() const
{
return *str;
}
@@ -132,9 +132,9 @@ bool WCMatcher::findNextMatch()
return ends[0] >= 0;
}
-std::vector<CMString> WCMatcher::findAll()
+std::vector<CMStringW> WCMatcher::findAll()
{
- std::vector<CMString> ret;
+ std::vector<CMStringW> ret;
reset();
while (findNextMatch())
ret.push_back(getGroup());
@@ -163,16 +163,16 @@ int WCMatcher::getEndingIndex(const int groupNum) const
return ends[groupNum];
}
-CMString WCMatcher::getGroup(const int groupNum) const
+CMStringW WCMatcher::getGroup(const int groupNum) const
{
if (groupNum < 0 || groupNum >= gc) return L"";
if (starts[groupNum] < 0 || ends[groupNum] < 0) return L"";
return str->Mid(starts[groupNum], ends[groupNum] - starts[groupNum]);
}
-std::vector<CMString> WCMatcher::getGroups(const bool includeGroupZero) const
+std::vector<CMStringW> WCMatcher::getGroups(const bool includeGroupZero) const
{
- std::vector<CMString> ret;
+ std::vector<CMStringW> ret;
for (int i = (includeGroupZero ? 0 : 1); i < gc; ++i)
ret.push_back(getGroup(i));
diff --git a/plugins/SmileyAdd/src/regexp/WCMatcher.h b/plugins/SmileyAdd/src/regexp/WCMatcher.h
index 3c5df018d7..285a49c349 100644
--- a/plugins/SmileyAdd/src/regexp/WCMatcher.h
+++ b/plugins/SmileyAdd/src/regexp/WCMatcher.h
@@ -23,7 +23,7 @@
invocation looks like:
<pre>
wchar_t buf[10000];
- CMString str = "\\5 (user name \\1) uses \\7 for his/her shell and \\6 is their home directory";
+ CMStringW str = "\\5 (user name \\1) uses \\7 for his/her shell and \\6 is their home directory";
FILE * fp = fopen("/etc/passwd", "r");
WCPattern::registerWCPattern("entry", "[^:]+");
WCPattern * p = WCPattern::compile("^({entry}):({entry}):({entry}):({entry}):({entry}):({entry}):({entry})$",
@@ -92,24 +92,24 @@ class WCMatcher
@param pattern The pattern with which to search
@param text The text in which to search
*/
- WCMatcher(WCPattern * pattern, const CMString & text);
+ WCMatcher(WCPattern *pattern, const CMStringW & ext);
protected:
/// The pattern we use to match
- WCPattern * pat;
+ WCPattern *pat;
/// The string in which we are matching
- const CMString * str;
+ const CMStringW *str;
/// The starting point of our match
int start;
/// An array of the starting positions for each group
- int * starts;
+ int *starts;
/// An array of the ending positions for each group
- int * ends;
+ int *ends;
/// An array of private data used by NFAUNodes during matching
- int * groups;
+ int *groups;
/// An array of private data used by NFAUNodes during matching
- int * groupIndeces;
+ int *groupIndeces;
/// An array of private data used by NFAUNodes during matching
- int * groupPos;
+ int *groupPos;
/// The ending index of the last match
int lm;
/// The number of capturing groups we have
@@ -135,7 +135,7 @@ class WCMatcher
@param str The string in which to replace text
@return A string with all backreferences appropriately replaced
*/
- CMString replaceWithGroups(const CMString & str);
+ CMStringW replaceWithGroups(const CMStringW & str);
/**
The flags currently being used by the matcher.
@return Zero
@@ -145,7 +145,7 @@ class WCMatcher
The text being searched by the matcher.
@return the text being searched by the matcher.
*/
- const CMString& getText() const;
+ const CMStringW& getText() const;
/**
Scans the string from start to finish for a match. The entire string must
@@ -179,7 +179,7 @@ class WCMatcher
@return Every substring in order which matches the given pattern
*/
- std::vector<CMString> findAll();
+ std::vector<CMStringW> findAll();
/**
Resets the internal state of the matcher
*/
@@ -188,12 +188,12 @@ class WCMatcher
Same as getText. Left n for backwards compatibilty with old source code
@return Returns the string that is currently being used for matching
*/
- inline const CMString& getString() const { return *str; }
+ inline const CMStringW& getString() const { return *str; }
/**
Sets the string to scan
@param newStr The string to scan for subsequent matches
*/
- inline void setString(const CMString & newStr) { str = &newStr; reset(); }
+ inline void setString(const CMStringW & newStr) { str = &newStr; reset(); }
/**
Returns the starting index of the specified group.
@@ -217,14 +217,14 @@ class WCMatcher
@param groupNum The group to query
@return The text of the group
*/
- CMString getGroup(const int groupNum = 0) const;
+ CMStringW getGroup(const int groupNum = 0) const;
/**
Returns every capture group in a vector
@param includeGroupZero Whether or not include capture group zero
@return Every capture group
*/
- std::vector<CMString> getGroups(const bool includeGroupZero = 0) const;
+ std::vector<CMStringW> getGroups(const bool includeGroupZero = 0) const;
};
#endif
diff --git a/plugins/SmileyAdd/src/regexp/WCPattern.cpp b/plugins/SmileyAdd/src/regexp/WCPattern.cpp
index 22a7b78847..2ce1a1b301 100644
--- a/plugins/SmileyAdd/src/regexp/WCPattern.cpp
+++ b/plugins/SmileyAdd/src/regexp/WCPattern.cpp
@@ -25,8 +25,8 @@
#include "../stdafx.h"
-std::map<CMString, WCPattern *> WCPattern::compiledWCPatterns;
-std::map<CMString, std::pair<CMString, unsigned long> > WCPattern::registeredWCPatterns;
+std::map<CMStringW, WCPattern *> WCPattern::compiledWCPatterns;
+std::map<CMStringW, std::pair<CMStringW, unsigned long> > WCPattern::registeredWCPatterns;
const int WCPattern::MIN_QMATCH = 0x00000000;
const int WCPattern::MAX_QMATCH = 0x7FFFFFFF;
@@ -62,7 +62,7 @@ static inline int str_icmp(const wchar_t *a, const wchar_t *b)
#define str_icmp wcscasecmp
#endif
-WCPattern::WCPattern(const CMString &rhs)
+WCPattern::WCPattern(const CMStringW &rhs)
{
matcher = NULL;
pattern = rhs;
@@ -85,29 +85,29 @@ NFAUNode *WCPattern::registerNode(NFAUNode *node)
return node;
}
-CMString WCPattern::classUnion(CMString s1, CMString s2) const
+CMStringW WCPattern::classUnion(CMStringW s1, CMStringW s2) const
{
wchar_t *out = new wchar_t[66000];
std::sort((LPTSTR)s1.GetString(), (LPTSTR)s1.GetTail());
std::sort((LPTSTR)s2.GetString(), (LPTSTR)s2.GetTail());
wchar_t *p = std::set_union(s1.GetString(), s1.GetTail(), s2.GetString(), s2.GetTail(), out); *p = 0;
- CMString ret = out;
+ CMStringW ret = out;
delete[] out;
return ret;
}
-CMString WCPattern::classIntersect(CMString s1, CMString s2) const
+CMStringW WCPattern::classIntersect(CMStringW s1, CMStringW s2) const
{
wchar_t *out = new wchar_t[66000];
std::sort((LPTSTR)s1.GetString(), (LPTSTR)s1.GetTail());
std::sort((LPTSTR)s2.GetString(), (LPTSTR)s2.GetTail());
*std::set_intersection(s1.GetString(), s1.GetTail(), s2.GetString(), s2.GetTail(), out) = 0;
- CMString ret = out;
+ CMStringW ret = out;
delete[] out;
return ret;
}
-CMString WCPattern::classNegate(CMString s1) const
+CMStringW WCPattern::classNegate(CMStringW s1) const
{
wchar_t *out = new wchar_t[66000];
int i, ind = 0;
@@ -116,18 +116,18 @@ CMString WCPattern::classNegate(CMString s1) const
for (i = 0; i < s1.GetLength(); ++i) m[s1[i]] = 1;
for (i = 0xFF; i >= 0; --i) if (m.find((wchar_t)i) == m.end()) out[ind++] = (wchar_t)i;
out[ind] = 0;
- CMString ret(out, ind);
+ CMStringW ret(out, ind);
delete[] out;
return ret;
}
-CMString WCPattern::classCreateRange(wchar_t low, wchar_t hi) const
+CMStringW WCPattern::classCreateRange(wchar_t low, wchar_t hi) const
{
wchar_t out[300];
int ind = 0;
while (low != hi) out[ind++] = low++;
out[ind++] = low;
- return CMString(out, ind);
+ return CMStringW(out, ind);
}
int WCPattern::getInt(int start, int end)
@@ -266,9 +266,9 @@ NFAUNode* WCPattern::quantify(NFAUNode *newNode)
return newNode;
}
-CMString WCPattern::parseClass()
+CMStringW WCPattern::parseClass()
{
- CMString t, ret;
+ CMStringW t, ret;
wchar_t ch, c1, c2;
bool inv = 0, neg = 0, quo = 0;
@@ -364,9 +364,9 @@ CMString WCPattern::parseClass()
return ret;
}
-CMString WCPattern::parsePosix()
+CMStringW WCPattern::parsePosix()
{
- CMString s7 = pattern.Mid(curInd, 7);
+ CMStringW s7 = pattern.Mid(curInd, 7);
if (s7 == L"{Lower}") { curInd += 7; return L"abcdefghijklmnopqrstuvwxyz"; }
if (s7 == L"{Upper}") { curInd += 7; return L"ABCDEFGHIJKLMNOPQRSTUVWXYZ"; }
if (s7 == L"{Alpha}") { curInd += 7; return L"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; }
@@ -378,7 +378,7 @@ CMString WCPattern::parsePosix()
if (s7 == L"{Blank}") { curInd += 7; return L" \t"; }
if (s7 == L"{Space}") { curInd += 7; return L" \t\n\x0B\f\r"; }
if (s7 == L"{Cntrl}") {
- CMString s(' ', 32 + 1);
+ CMStringW s(' ', 32 + 1);
for (int i = 0; i <= 0x1F; ++i)
s.SetAt(i, i);
s.SetAt(0x20, 0x7F);
@@ -386,7 +386,7 @@ CMString WCPattern::parsePosix()
return s;
}
if (s7 == L"{ASCII}") {
- CMString s(' ', 0x80);
+ CMStringW s(' ', 0x80);
for (int i = 0; i <= 0x7f; ++i) s.SetAt(i, i);
curInd += 7;
return s;
@@ -422,7 +422,7 @@ NFAUNode* WCPattern::parseBackref()
#undef to_int
}
-CMString WCPattern::parseOctal()
+CMStringW WCPattern::parseOctal()
{
#define islowoc(x) ((x) >= '0' && (x) <= '3')
#define isoc(x) ((x) >= '0' && (x) <= '7')
@@ -431,7 +431,7 @@ CMString WCPattern::parseOctal()
wchar_t ch1 = (ci + 0 < pattern.GetLength()) ? pattern[ci + 0] : USHRT_MAX;
wchar_t ch2 = (ci + 1 < pattern.GetLength()) ? pattern[ci + 1] : USHRT_MAX;
wchar_t ch3 = (ci + 2 < pattern.GetLength()) ? pattern[ci + 2] : USHRT_MAX;
- CMString s = L" ";
+ CMStringW s = L" ";
if (islowoc(ch1) && isoc(ch2)) {
curInd += 2;
@@ -453,7 +453,7 @@ CMString WCPattern::parseOctal()
#undef fromoc
}
-CMString WCPattern::parseHex()
+CMStringW WCPattern::parseHex()
{
#define to_low(x) (((x) >= 'A' && (x) <= 'Z') ? ((x) - 'A' + 'a') : (x))
#define is_dig(x) ((x) >= '0' && (x) <= '9')
@@ -465,7 +465,7 @@ CMString WCPattern::parseHex()
wchar_t ch2 = (ci + 1 < pattern.GetLength()) ? pattern[ci + 1] : USHRT_MAX;
wchar_t ch3 = (ci + 2 < pattern.GetLength()) ? pattern[ci + 2] : USHRT_MAX;
wchar_t ch4 = (ci + 3 < pattern.GetLength()) ? pattern[ci + 3] : USHRT_MAX;
- CMString s = L" ";
+ CMStringW s = L" ";
if (is_hex(ch1) && is_hex(ch2) && is_hex(ch3) && is_hex(ch4)) {
curInd += 2;
@@ -484,10 +484,10 @@ CMString WCPattern::parseHex()
#undef to_int
}
-CMString WCPattern::parseEscape(bool &inv, bool &quo)
+CMStringW WCPattern::parseEscape(bool &inv, bool &quo)
{
wchar_t ch = pattern[curInd++];
- CMString classes;
+ CMStringW classes;
if (curInd > pattern.GetLength()) {
raiseError();
@@ -530,7 +530,7 @@ CMString WCPattern::parseEscape(bool &inv, bool &quo)
NFAUNode* WCPattern::parseRegisteredWCPattern(NFAUNode **end)
{
int i, j;
- CMString s;
+ CMStringW s;
NFAUNode *ret = NULL;
for (i = curInd; i < pattern.GetLength() && pattern[i] != '}'; ++i) {}
if (pattern[i] != '}') { raiseError(); return NULL; }
@@ -555,7 +555,7 @@ NFAUNode* WCPattern::parseRegisteredWCPattern(NFAUNode **end)
if (registeredWCPatterns.find(s) == registeredWCPatterns.end()) raiseError();
else {
unsigned long oflags = flags;
- CMString op = pattern;
+ CMStringW op = pattern;
int ci = i + 1;
pattern = registeredWCPatterns[s].first;
@@ -577,7 +577,7 @@ NFAUNode* WCPattern::parseRegisteredWCPattern(NFAUNode **end)
// pattern must have a concrete length
NFAUNode* WCPattern::parseBehind(const bool pos, NFAUNode **end)
{
- CMString t;
+ CMStringW t;
while (curInd < pattern.GetLength() && pattern[curInd] != ')') {
wchar_t ch = pattern[curInd++];
if (ch == '\\') {
@@ -597,7 +597,7 @@ NFAUNode* WCPattern::parseBehind(const bool pos, NFAUNode **end)
NFAUNode* WCPattern::parseQuote()
{
bool done = 0;
- CMString s;
+ CMStringW s;
while (!done) {
if (curInd >= pattern.GetLength()) {
@@ -621,7 +621,7 @@ NFAUNode* WCPattern::parseQuote()
NFAUNode* WCPattern::parse(const bool inParen, const bool inOr, NFAUNode **end)
{
NFAUNode *start, *cur, *next = NULL;
- CMString t;
+ CMStringW t;
int grc = groupCount++;
bool inv, quo;
bool ahead = 0, pos = 0, noncap = 0, indep = 0;
@@ -747,13 +747,13 @@ NFAUNode* WCPattern::parse(const bool inParen, const bool inOr, NFAUNode **end)
case '[':
if ((flags & WCPattern::CASE_INSENSITIVE) == 0) {
NFAClassUNode *clazz = new NFAClassUNode();
- CMString s = parseClass();
+ CMStringW s = parseClass();
for (int i = 0; i < (int)s.GetLength(); ++i) clazz->vals[s[i]] = 1;
next = registerNode(clazz);
}
else {
NFACIClassUNode *clazz = new NFACIClassUNode();
- CMString s = parseClass();
+ CMStringW s = parseClass();
for (int i = 0; i < s.GetLength(); ++i) clazz->vals[to_lower(s[i])] = 1;
next = registerNode(clazz);
}
@@ -845,7 +845,7 @@ NFAUNode* WCPattern::parse(const bool inParen, const bool inOr, NFAUNode **end)
return start;
}
-WCPattern* WCPattern::compile(const CMString &pattern, const unsigned long mode)
+WCPattern* WCPattern::compile(const CMStringW &pattern, const unsigned long mode)
{
WCPattern *p = new WCPattern(pattern);
NFAUNode *end;
@@ -879,10 +879,10 @@ WCPattern* WCPattern::compile(const CMString &pattern, const unsigned long mode)
return p;
}
-WCPattern* WCPattern::compileAndKeep(const CMString &pattern, const unsigned long mode)
+WCPattern* WCPattern::compileAndKeep(const CMStringW &pattern, const unsigned long mode)
{
WCPattern *ret = NULL;
- std::map<CMString, WCPattern*>::iterator it = compiledWCPatterns.find(pattern);
+ std::map<CMStringW, WCPattern*>::iterator it = compiledWCPatterns.find(pattern);
if (it != compiledWCPatterns.end())
ret = it->second;
else {
@@ -893,9 +893,9 @@ WCPattern* WCPattern::compileAndKeep(const CMString &pattern, const unsigned lon
return ret;
}
-CMString WCPattern::replace(const CMString &pattern, const CMString &str, const CMString &replacementText, const unsigned long mode)
+CMStringW WCPattern::replace(const CMStringW &pattern, const CMStringW &str, const CMStringW &replacementText, const unsigned long mode)
{
- CMString ret;
+ CMStringW ret;
WCPattern *p = WCPattern::compile(pattern, mode);
if (p) {
ret = p->replace(str, replacementText);
@@ -904,9 +904,9 @@ CMString WCPattern::replace(const CMString &pattern, const CMString &str, const
return ret;
}
-std::vector<CMString> WCPattern::split(const CMString &pattern, const CMString &str, const bool keepEmptys, const unsigned long limit, const unsigned long mode)
+std::vector<CMStringW> WCPattern::split(const CMStringW &pattern, const CMStringW &str, const bool keepEmptys, const unsigned long limit, const unsigned long mode)
{
- std::vector<CMString> ret;
+ std::vector<CMStringW> ret;
WCPattern *p = WCPattern::compile(pattern, mode);
if (p) {
ret = p->split(str, keepEmptys, limit);
@@ -915,9 +915,9 @@ std::vector<CMString> WCPattern::split(const CMString &pattern, const CMString &
return ret;
}
-std::vector<CMString> WCPattern::findAll(const CMString &pattern, const CMString &str, const unsigned long mode)
+std::vector<CMStringW> WCPattern::findAll(const CMStringW &pattern, const CMStringW &str, const unsigned long mode)
{
- std::vector<CMString> ret;
+ std::vector<CMStringW> ret;
WCPattern *p = WCPattern::compile(pattern, mode);
if (p) {
ret = p->findAll(str);
@@ -926,7 +926,7 @@ std::vector<CMString> WCPattern::findAll(const CMString &pattern, const CMString
return ret;
}
-bool WCPattern::matches(const CMString &pattern, const CMString &str, const unsigned long mode)
+bool WCPattern::matches(const CMStringW &pattern, const CMStringW &str, const unsigned long mode)
{
bool ret = 0;
WCPattern *p = compile(pattern, mode);
@@ -938,7 +938,7 @@ bool WCPattern::matches(const CMString &pattern, const CMString &str, const unsi
return ret;
}
-bool WCPattern::registerWCPattern(const CMString &name, const CMString &pattern, const unsigned long mode)
+bool WCPattern::registerWCPattern(const CMStringW &name, const CMStringW &pattern, const unsigned long mode)
{
WCPattern *p = WCPattern::compile(pattern, mode);
if (!p)
@@ -956,17 +956,17 @@ void WCPattern::unregisterWCPatterns()
void WCPattern::clearWCPatternCache()
{
- std::map<CMString, WCPattern*>::iterator it;
+ std::map<CMStringW, WCPattern*>::iterator it;
for (it = compiledWCPatterns.begin(); it != compiledWCPatterns.end(); ++it)
delete it->second;
compiledWCPatterns.clear();
}
-std::pair<CMString, int> WCPattern::findNthMatch(const CMString &pattern, const CMString &str,
+std::pair<CMStringW, int> WCPattern::findNthMatch(const CMStringW &pattern, const CMStringW &str,
const int matchNum, const unsigned long mode)
{
- std::pair<CMString, int> ret;
+ std::pair<CMStringW, int> ret;
WCPattern *p = WCPattern::compile(pattern, mode);
ret.second = -1;
@@ -991,10 +991,10 @@ WCPattern::~WCPattern()
delete it->first;
}
-CMString WCPattern::replace(const CMString &str, const CMString &replacementText)
+CMStringW WCPattern::replace(const CMStringW &str, const CMStringW &replacementText)
{
int li = 0;
- CMString ret;
+ CMStringW ret;
matcher->setString(str);
while (matcher->findNextMatch()) {
@@ -1007,11 +1007,11 @@ CMString WCPattern::replace(const CMString &str, const CMString &replacementText
return ret;
}
-std::vector<CMString> WCPattern::split(const CMString &str, const bool keepEmptys, const unsigned long limit)
+std::vector<CMStringW> WCPattern::split(const CMStringW &str, const bool keepEmptys, const unsigned long limit)
{
unsigned long lim = (limit == 0 ? MAX_QMATCH : limit);
int li = 0;
- std::vector<CMString> ret;
+ std::vector<CMStringW> ret;
matcher->setString(str);
@@ -1031,13 +1031,13 @@ std::vector<CMString> WCPattern::split(const CMString &str, const bool keepEmpty
return ret;
}
-std::vector<CMString> WCPattern::findAll(const CMString &str)
+std::vector<CMStringW> WCPattern::findAll(const CMStringW &str)
{
matcher->setString(str);
return matcher->findAll();
}
-bool WCPattern::matches(const CMString &str)
+bool WCPattern::matches(const CMStringW &str)
{
matcher->setString(str);
return matcher->matches();
@@ -1048,12 +1048,12 @@ unsigned long WCPattern::getFlags() const
return flags;
}
-CMString WCPattern::getWCPattern() const
+CMStringW WCPattern::getWCPattern() const
{
return pattern;
}
-WCMatcher *WCPattern::createWCMatcher(const CMString &str)
+WCMatcher *WCPattern::createWCMatcher(const CMStringW &str)
{
return new WCMatcher(this, str);
}
@@ -1072,7 +1072,7 @@ void NFAUNode::findAllNodes(std::map<NFAUNode*, bool> &soFar)
// NFACharUNode
NFACharUNode::NFACharUNode(const wchar_t c) { ch = c; }
-int NFACharUNode::match(const CMString &str, WCMatcher *matcher, const int curInd) const
+int NFACharUNode::match(const CMStringW &str, WCMatcher *matcher, const int curInd) const
{
if (curInd < str.GetLength() && str[curInd] == ch)
return next->match(str, matcher, curInd + 1);
@@ -1082,7 +1082,7 @@ int NFACharUNode::match(const CMString &str, WCMatcher *matcher, const int curIn
// NFACICharUNode
NFACICharUNode::NFACICharUNode(const wchar_t c) { ch = to_lower(c); }
-int NFACICharUNode::match(const CMString &str, WCMatcher *matcher, const int curInd) const
+int NFACICharUNode::match(const CMStringW &str, WCMatcher *matcher, const int curInd) const
{
if (curInd < str.GetLength() && to_lower(str[curInd]) == ch)
return next->match(str, matcher, curInd + 1);
@@ -1092,7 +1092,7 @@ int NFACICharUNode::match(const CMString &str, WCMatcher *matcher, const int cur
// NFAStartUNode
NFAStartUNode::NFAStartUNode() {}
-int NFAStartUNode::match(const CMString &str, WCMatcher *matcher, const int curInd) const
+int NFAStartUNode::match(const CMStringW &str, WCMatcher *matcher, const int curInd) const
{
int ret = -1, ci = curInd;
@@ -1118,7 +1118,7 @@ int NFAStartUNode::match(const CMString &str, WCMatcher *matcher, const int curI
// NFAEndUNode
NFAEndUNode::NFAEndUNode() {}
-int NFAEndUNode::match(const CMString &str, WCMatcher *matcher, const int curInd) const
+int NFAEndUNode::match(const CMStringW &str, WCMatcher *matcher, const int curInd) const
{
matcher->ends[0] = curInd;
if ((matcher->getFlags() & WCMatcher::MATCH_ENTIRE_STRING) != 0) {
@@ -1147,7 +1147,7 @@ NFAQuantifierUNode::NFAQuantifierUNode(WCPattern *pat, NFAUNode *internal, const
max = (maxMatch > WCPattern::MAX_QMATCH) ? WCPattern::MAX_QMATCH : maxMatch;
}
-int NFAQuantifierUNode::match(const CMString &str, WCMatcher *matcher, const int curInd) const
+int NFAQuantifierUNode::match(const CMStringW &str, WCMatcher *matcher, const int curInd) const
{
int i0, i1, i2 = 0;
@@ -1168,14 +1168,14 @@ NFAGreedyQuantifierUNode::NFAGreedyQuantifierUNode(WCPattern *pat, NFAUNode *int
{
}
-int NFAGreedyQuantifierUNode::match(const CMString &str, WCMatcher *matcher, const int curInd) const
+int NFAGreedyQuantifierUNode::match(const CMStringW &str, WCMatcher *matcher, const int curInd) const
{
int t = NFAQuantifierUNode::match(str, matcher, curInd);
if (t != -1) return matchInternal(str, matcher, t, min);
return t;
}
-int NFAGreedyQuantifierUNode::matchInternal(const CMString &str, WCMatcher *matcher, const int curInd, const int soFar) const
+int NFAGreedyQuantifierUNode::matchInternal(const CMStringW &str, WCMatcher *matcher, const int curInd, const int soFar) const
{
if (soFar >= max)
return next->match(str, matcher, curInd);
@@ -1196,7 +1196,7 @@ NFALazyQuantifierUNode::NFALazyQuantifierUNode(WCPattern *pat, NFAUNode *interna
{
}
-int NFALazyQuantifierUNode::match(const CMString &str, WCMatcher *matcher, const int curInd) const
+int NFALazyQuantifierUNode::match(const CMStringW &str, WCMatcher *matcher, const int curInd) const
{
int m = NFAQuantifierUNode::match(str, matcher, curInd);
if (m == -1)
@@ -1225,7 +1225,7 @@ NFAPossessiveQuantifierUNode::NFAPossessiveQuantifierUNode(WCPattern *pat, NFAUN
{
}
-int NFAPossessiveQuantifierUNode::match(const CMString &str, WCMatcher *matcher, const int curInd) const
+int NFAPossessiveQuantifierUNode::match(const CMStringW &str, WCMatcher *matcher, const int curInd) const
{
int m = NFAQuantifierUNode::match(str, matcher, curInd);
if (m == -1)
@@ -1246,7 +1246,7 @@ NFAAcceptUNode::NFAAcceptUNode()
{
}
-int NFAAcceptUNode::match(const CMString &str, WCMatcher *matcher, const int curInd) const
+int NFAAcceptUNode::match(const CMStringW &str, WCMatcher *matcher, const int curInd) const
{
if (!next) return curInd;
else return next->match(str, matcher, curInd);
@@ -1259,14 +1259,14 @@ NFAClassUNode::NFAClassUNode(const bool invert)
inv = invert;
}
-NFAClassUNode::NFAClassUNode(const CMString &clazz, const bool invert)
+NFAClassUNode::NFAClassUNode(const CMStringW &clazz, const bool invert)
{
inv = invert;
for (int i = 0; i < clazz.GetLength(); ++i)
vals[clazz[i]] = 1;
}
-int NFAClassUNode::match(const CMString &str, WCMatcher *matcher, const int curInd) const
+int NFAClassUNode::match(const CMStringW &str, WCMatcher *matcher, const int curInd) const
{
if (curInd < str.GetLength() && ((vals.find(str[curInd]) != vals.end()) ^ inv)) {
return next->match(str, matcher, curInd + 1);
@@ -1281,14 +1281,14 @@ NFACIClassUNode::NFACIClassUNode(const bool invert)
inv = invert;
}
-NFACIClassUNode::NFACIClassUNode(const CMString &clazz, const bool invert)
+NFACIClassUNode::NFACIClassUNode(const CMStringW &clazz, const bool invert)
{
inv = invert;
for (int i = 0; i < (int)clazz.GetLength(); ++i)
vals[to_lower(clazz[i])] = 1;
}
-int NFACIClassUNode::match(const CMString &str, WCMatcher *matcher, const int curInd) const
+int NFACIClassUNode::match(const CMStringW &str, WCMatcher *matcher, const int curInd) const
{
if (curInd < str.GetLength() && ((vals.find(to_lower(str[curInd])) != vals.end()) ^ inv))
return next->match(str, matcher, curInd + 1);
@@ -1302,7 +1302,7 @@ NFASubStartUNode::NFASubStartUNode()
{
}
-int NFASubStartUNode::match(const CMString &str, WCMatcher *matcher, const int curInd) const
+int NFASubStartUNode::match(const CMStringW &str, WCMatcher *matcher, const int curInd) const
{
return next->match(str, matcher, curInd);
}
@@ -1320,7 +1320,7 @@ void NFAOrUNode::findAllNodes(std::map<NFAUNode*, bool> &soFar)
if (two) two->findAllNodes(soFar);
NFAUNode::findAllNodes(soFar);
}
-int NFAOrUNode::match(const CMString &str, WCMatcher *matcher, const int curInd) const
+int NFAOrUNode::match(const CMStringW &str, WCMatcher *matcher, const int curInd) const
{
int ci = one->match(str, matcher, curInd);
@@ -1333,12 +1333,12 @@ int NFAOrUNode::match(const CMString &str, WCMatcher *matcher, const int curInd)
// NFAQuoteUNode
-NFAQuoteUNode::NFAQuoteUNode(const CMString &quoted) :
+NFAQuoteUNode::NFAQuoteUNode(const CMStringW &quoted) :
qStr(quoted)
{
}
-int NFAQuoteUNode::match(const CMString &str, WCMatcher *matcher, const int curInd) const
+int NFAQuoteUNode::match(const CMStringW &str, WCMatcher *matcher, const int curInd) const
{
if (curInd + qStr.GetLength() > str.GetLength()) return -1;
if (str.Mid(curInd, qStr.GetLength()) != qStr) return -1;
@@ -1347,12 +1347,12 @@ int NFAQuoteUNode::match(const CMString &str, WCMatcher *matcher, const int curI
// NFACIQuoteUNode
-NFACIQuoteUNode::NFACIQuoteUNode(const CMString &quoted) :
+NFACIQuoteUNode::NFACIQuoteUNode(const CMStringW &quoted) :
qStr(quoted)
{
}
-int NFACIQuoteUNode::match(const CMString &str, WCMatcher *matcher, const int curInd) const
+int NFACIQuoteUNode::match(const CMStringW &str, WCMatcher *matcher, const int curInd) const
{
if (curInd + qStr.GetLength() > str.GetLength()) return -1;
if (str_icmp(str.Mid(curInd, qStr.GetLength()).c_str(), qStr.c_str())) return -1;
@@ -1372,19 +1372,19 @@ void NFALookAheadUNode::findAllNodes(std::map<NFAUNode*, bool> &soFar)
NFAUNode::findAllNodes(soFar);
}
-int NFALookAheadUNode::match(const CMString &str, WCMatcher *matcher, const int curInd) const
+int NFALookAheadUNode::match(const CMStringW &str, WCMatcher *matcher, const int curInd) const
{
return ((inner->match(str, matcher, curInd) == -1) ^ pos) ? next->match(str, matcher, curInd) : -1;
}
// NFALookBehindUNode
-NFALookBehindUNode::NFALookBehindUNode(const CMString &str, const bool positive) :
+NFALookBehindUNode::NFALookBehindUNode(const CMStringW &str, const bool positive) :
pos(positive), mStr(str)
{
}
-int NFALookBehindUNode::match(const CMString &str, WCMatcher *matcher, const int curInd) const
+int NFALookBehindUNode::match(const CMStringW &str, WCMatcher *matcher, const int curInd) const
{
if (pos) {
if (curInd < mStr.GetLength())
@@ -1408,7 +1408,7 @@ NFAStartOfLineUNode::NFAStartOfLineUNode()
{
}
-int NFAStartOfLineUNode::match(const CMString &str, WCMatcher *matcher, const int curInd) const
+int NFAStartOfLineUNode::match(const CMStringW &str, WCMatcher *matcher, const int curInd) const
{
if (curInd == 0 || str[curInd - 1] == '\n' || str[curInd - 1] == '\r')
return next->match(str, matcher, curInd);
@@ -1422,7 +1422,7 @@ NFAEndOfLineUNode::NFAEndOfLineUNode()
{
}
-int NFAEndOfLineUNode::match(const CMString &str, WCMatcher *matcher, const int curInd) const
+int NFAEndOfLineUNode::match(const CMStringW &str, WCMatcher *matcher, const int curInd) const
{
if (curInd >= str.GetLength() || str[curInd] == '\n' || str[curInd] == '\r')
return next->match(str, matcher, curInd);
@@ -1437,7 +1437,7 @@ NFAReferenceUNode::NFAReferenceUNode(const int groupIndex) :
{
}
-int NFAReferenceUNode::match(const CMString &str, WCMatcher *matcher, const int curInd) const
+int NFAReferenceUNode::match(const CMStringW &str, WCMatcher *matcher, const int curInd) const
{
int len = matcher->ends[gi] - matcher->starts[gi];
int ni = -1;
@@ -1455,7 +1455,7 @@ NFAStartOfInputUNode::NFAStartOfInputUNode()
{
}
-int NFAStartOfInputUNode::match(const CMString &str, WCMatcher *matcher, const int curInd) const
+int NFAStartOfInputUNode::match(const CMStringW &str, WCMatcher *matcher, const int curInd) const
{
if (curInd == 0) return next->match(str, matcher, curInd);
return -1;
@@ -1468,7 +1468,7 @@ NFAEndOfInputUNode::NFAEndOfInputUNode(const bool lookForTerm) :
{
}
-int NFAEndOfInputUNode::match(const CMString &str, WCMatcher *matcher, const int curInd) const
+int NFAEndOfInputUNode::match(const CMStringW &str, WCMatcher *matcher, const int curInd) const
{
int len = str.GetLength();
if (curInd == len) return next->match(str, matcher, curInd);
@@ -1490,7 +1490,7 @@ NFAWordBoundaryUNode::NFAWordBoundaryUNode(const bool positive) :
{
}
-int NFAWordBoundaryUNode::match(const CMString &str, WCMatcher *matcher, const int curInd) const
+int NFAWordBoundaryUNode::match(const CMStringW &str, WCMatcher *matcher, const int curInd) const
{
int len = str.GetLength();
@@ -1509,7 +1509,7 @@ NFAEndOfMatchUNode::NFAEndOfMatchUNode()
{
}
-int NFAEndOfMatchUNode::match(const CMString &str, WCMatcher *matcher, const int curInd) const
+int NFAEndOfMatchUNode::match(const CMStringW &str, WCMatcher *matcher, const int curInd) const
{
if (curInd == matcher->lm) return next->match(str, matcher, curInd);
return -1;
@@ -1522,7 +1522,7 @@ NFAGroupHeadUNode::NFAGroupHeadUNode(const int groupIndex) :
{
}
-int NFAGroupHeadUNode::match(const CMString &str, WCMatcher *matcher, const int curInd) const
+int NFAGroupHeadUNode::match(const CMStringW &str, WCMatcher *matcher, const int curInd) const
{
int ret, o = matcher->starts[gi];
@@ -1540,7 +1540,7 @@ NFAGroupTailUNode::NFAGroupTailUNode(const int groupIndex) :
{
}
-int NFAGroupTailUNode::match(const CMString &str, WCMatcher *matcher, const int curInd) const
+int NFAGroupTailUNode::match(const CMStringW &str, WCMatcher *matcher, const int curInd) const
{
int ret, o = matcher->ends[gi];
@@ -1558,7 +1558,7 @@ NFAGroupLoopPrologueUNode::NFAGroupLoopPrologueUNode(const int groupIndex) :
{
}
-int NFAGroupLoopPrologueUNode::match(const CMString &str, WCMatcher *matcher, const int curInd) const
+int NFAGroupLoopPrologueUNode::match(const CMStringW &str, WCMatcher *matcher, const int curInd) const
{
int ret, o1 = matcher->groups[gi], o2 = matcher->groupPos[gi], o3 = matcher->groupIndeces[gi];
@@ -1593,7 +1593,7 @@ void NFAGroupLoopUNode::findAllNodes(std::map<NFAUNode*, bool> &soFar)
NFAUNode::findAllNodes(soFar);
}
-int NFAGroupLoopUNode::match(const CMString &str, WCMatcher *matcher, const int curInd) const
+int NFAGroupLoopUNode::match(const CMStringW &str, WCMatcher *matcher, const int curInd) const
{
bool b = (curInd > matcher->groupIndeces[gi]);
@@ -1621,7 +1621,7 @@ int NFAGroupLoopUNode::match(const CMString &str, WCMatcher *matcher, const int
return -1;
}
-int NFAGroupLoopUNode::matchGreedy(const CMString &str, WCMatcher *matcher, const int curInd) const
+int NFAGroupLoopUNode::matchGreedy(const CMStringW &str, WCMatcher *matcher, const int curInd) const
{
int o = matcher->groupIndeces[gi]; // save our info for backtracking
matcher->groupIndeces[gi] = curInd; // move along
@@ -1635,7 +1635,7 @@ int NFAGroupLoopUNode::matchGreedy(const CMString &str, WCMatcher *matcher, cons
return ret;
}
-int NFAGroupLoopUNode::matchLazy(const CMString &str, WCMatcher *matcher, const int curInd) const
+int NFAGroupLoopUNode::matchLazy(const CMStringW &str, WCMatcher *matcher, const int curInd) const
{
int ret = next->match(str, matcher, curInd); // be lazy, just go on
if (ret < 0) {
@@ -1652,7 +1652,7 @@ int NFAGroupLoopUNode::matchLazy(const CMString &str, WCMatcher *matcher, const
return ret;
}
-int NFAGroupLoopUNode::matchPossessive(const CMString &str, WCMatcher *matcher, const int curInd) const
+int NFAGroupLoopUNode::matchPossessive(const CMStringW &str, WCMatcher *matcher, const int curInd) const
{
int o = matcher->groupIndeces[gi]; // save info for backtracking
matcher->groupPos[gi] = matcher->groups[gi]; // set a flag stating we have matcher at least this much
diff --git a/plugins/SmileyAdd/src/regexp/WCPattern.h b/plugins/SmileyAdd/src/regexp/WCPattern.h
index e3455e8b31..d45f734645 100644
--- a/plugins/SmileyAdd/src/regexp/WCPattern.h
+++ b/plugins/SmileyAdd/src/regexp/WCPattern.h
@@ -974,19 +974,19 @@ private:
@param rhs The pattern to compile
@memo Creates a new pattern from the regular expression in <code>rhs</code>.
*/
- WCPattern(const CMString & rhs);
+ WCPattern(const CMStringW &rhs);
protected:
/**
This currently is not used, so don't try to do anything with it.
@memo Holds all the compiled patterns for quick access.
*/
- static std::map<CMString, WCPattern *> compiledWCPatterns;
+ static std::map<CMStringW, WCPattern*> compiledWCPatterns;
/**
Holds all of the registered patterns as strings. Due to certain problems
with compilation of patterns, especially with capturing groups, this seemed
to be the best way to do it.
*/
- static std::map<CMString, std::pair<CMString, unsigned long> > registeredWCPatterns;
+ static std::map<CMStringW, std::pair<CMStringW, unsigned long> > registeredWCPatterns;
protected:
/**
Holds all the NFA nodes used. This makes deletion of a pattern, as well as
@@ -1006,7 +1006,7 @@ protected:
/**
The actual regular expression we rerpesent
*/
- CMString pattern;
+ CMStringW pattern;
/**
Flag used during compilation. Once the pattern is successfully compiled,
<code>error</code> is no longer used.
@@ -1052,7 +1052,7 @@ protected:
must have appeared in one or both of <code>s1</code> and
<code>s2</code>.
*/
- CMString classUnion(CMString s1, CMString s2) const;
+ CMStringW classUnion(CMStringW s1, CMStringW s2) const;
/**
Calculates the intersection of two strings. This function will first sort
the strings and then use a simple selection algorithm to find the
@@ -1062,7 +1062,7 @@ protected:
@return A new string containing all unique characters. Each character
must have appeared both <code>s1</code> and <code>s2</code>.
*/
- CMString classIntersect(CMString s1, CMString s2) const;
+ CMStringW classIntersect(CMStringW s1, CMStringW s2) const;
/**
Calculates the negation of a string. The negation is the set of all
characters between <code>\x00</code> and <code>\xFF</code> not
@@ -1072,7 +1072,7 @@ protected:
@return A new string containing all unique characters. Each character
must have appeared both <code>s1</code> and <code>s2</code>.
*/
- CMString classNegate(CMString s1) const;
+ CMStringW classNegate(CMStringW s1) const;
/**
Creates a new "class" representing the range from <code>low</code> thru
<code>hi</code>. This function will wrap if <code>low</code> &gt;
@@ -1082,7 +1082,7 @@ protected:
@param hi The ending character
@return A new string containing all the characters from low thru hi.
*/
- CMString classCreateRange(wchar_t low, wchar_t hi) const;
+ CMStringW classCreateRange(wchar_t low, wchar_t hi) const;
/**
Extracts a decimal number from the substring of member-variable
@@ -1132,24 +1132,24 @@ protected:
@return A string of unique characters contained in the current class being
parsed
*/
- CMString parseClass();
+ CMStringW parseClass();
/**
Parses the current POSIX class being examined in
<code>{@link pattern pattern}</code>.
@return A string of unique characters representing the POSIX class being
parsed
*/
- CMString parsePosix();
+ CMStringW parsePosix();
/**
Returns a string containing the octal character being parsed
@return The string contained the octal value being parsed
*/
- CMString parseOctal();
+ CMStringW parseOctal();
/**
Returns a string containing the hex character being parsed
@return The string contained the hex value being parsed
*/
- CMString parseHex();
+ CMStringW parseHex();
/**
Returns a new node representing the back reference being parsed
@return The new node representing the back reference being parsed
@@ -1164,7 +1164,7 @@ protected:
quotation.
@return The characters represented by the class
*/
- CMString parseEscape(bool & inv, bool & quo);
+ CMStringW parseEscape(bool & inv, bool & quo);
/**
Parses a supposed registered pattern currently under compilation. If the
sequence of characters does point to a registered pattern, then the
@@ -1228,7 +1228,7 @@ public:
pointer. Upon failure, <code>compile</code> returns
<code>NULL</code>
*/
- static WCPattern * compile(const CMString & pattern,
+ static WCPattern * compile(const CMStringW & pattern,
const unsigned long mode = 0);
/**
Dont use this function. This function will compile a pattern, and cache
@@ -1243,7 +1243,7 @@ public:
<code>WCPattern</code> pointer. Upon failure, <code>compile</code>
returns <code>NULL</code>.
*/
- static WCPattern * compileAndKeep(const CMString & pattern,
+ static WCPattern * compileAndKeep(const CMStringW & pattern,
const unsigned long mode = 0);
/**
@@ -1265,9 +1265,9 @@ public:
during the replacement process
@return The text with the replacement string substituted where necessary
*/
- static CMString replace(const CMString & pattern,
- const CMString & str,
- const CMString & replacementText,
+ static CMStringW replace(const CMStringW & pattern,
+ const CMStringW & str,
+ const CMStringW & replacementText,
const unsigned long mode = 0);
/**
@@ -1276,12 +1276,12 @@ public:
configurable. A typical invocation looks like:
<p>
<code>
- CMString str(strSize, 0);<br>
+ CMStringW str(strSize, 0);<br>
FILE * fp = fopen(fileName, "r");<br>
fread((char*)str.data(), strSize * 2, 1, fp);<br>
fclose(fp);<br>
<br>
- std::vector&lt;CMString&gt; lines = WCPattern::split(L"[\r\n]+", str, true);<br>
+ std::vector&lt;CMStringW&gt; lines = WCPattern::split(L"[\r\n]+", str, true);<br>
<br>
</code>
@@ -1293,8 +1293,8 @@ public:
during the split process
@return All substrings of <code>str</code> split across <code>pattern</code>.
*/
- static std::vector<CMString> split(const CMString & pattern,
- const CMString & str,
+ static std::vector<CMStringW> split(const CMStringW & pattern,
+ const CMStringW & str,
const bool keepEmptys = 0,
const unsigned long limit = 0,
const unsigned long mode = 0);
@@ -1317,8 +1317,8 @@ public:
during the find process
@return All instances of <code>pattern</code> in <code>str</code>
*/
- static std::vector<CMString> findAll(const CMString & pattern,
- const CMString & str,
+ static std::vector<CMStringW> findAll(const CMStringW & pattern,
+ const CMStringW & str,
const unsigned long mode = 0);
/**
@@ -1330,8 +1330,8 @@ public:
during the replacement process
@return True if <code>str</code> is recognized by <code>pattern</code>
*/
- static bool matches(const CMString & pattern,
- const CMString & str,
+ static bool matches(const CMStringW & pattern,
+ const CMStringW & str,
const unsigned long mode = 0);
/**
@@ -1353,8 +1353,8 @@ public:
@return Success/Failure. Fails only if <code>pattern</code> has invalid
syntax
*/
- static bool registerWCPattern(const CMString & name,
- const CMString & pattern,
+ static bool registerWCPattern(const CMStringW & name,
+ const CMStringW & pattern,
const unsigned long mode = 0);
/**
@@ -1372,7 +1372,7 @@ public:
A typical invocation looks like this:
<p>
<code>
- std::pair&lt;CMString, int&gt; match = WCPattern::findNthMatch(L"\\d{1,3}", L"192.168.1.101:22", 1);<br>
+ std::pair&lt;CMStringW, int&gt; match = WCPattern::findNthMatch(L"\\d{1,3}", L"192.168.1.101:22", 1);<br>
wprintf(L"%s %i\n", match.first.c_str(), match.second);<br>
<br>
Output: 168 4<br>
@@ -1387,8 +1387,8 @@ public:
<code>str</code>. You can check for success/failure by making sure
that the integer returned is greater than or equal to zero.
*/
- static std::pair<CMString, int> findNthMatch(const CMString & pattern,
- const CMString & str,
+ static std::pair<CMStringW, int> findNthMatch(const CMStringW & pattern,
+ const CMStringW & str,
const int matchNum,
const unsigned long mode = 0);
public:
@@ -1397,12 +1397,12 @@ public:
*/
~WCPattern();
- CMString replace(const CMString & str,
- const CMString & replacementText);
- std::vector<CMString> split(const CMString & str, const bool keepEmptys = 0,
+ CMStringW replace(const CMStringW & str,
+ const CMStringW & replacementText);
+ std::vector<CMStringW> split(const CMStringW & str, const bool keepEmptys = 0,
const unsigned long limit = 0);
- std::vector<CMString> findAll(const CMString & str);
- bool matches(const CMString & str);
+ std::vector<CMStringW> findAll(const CMStringW & str);
+ bool matches(const CMStringW & str);
/**
Returns the flags used during compilation of this pattern
@return The flags used during compilation of this pattern
@@ -1412,14 +1412,14 @@ public:
Returns the regular expression this pattern represents
@return The regular expression this pattern represents
*/
- CMString getWCPattern() const;
+ CMStringW getWCPattern() const;
/**
Creates a matcher object using the specified string and this pattern.
@param str The string to match against
@return A new matcher using object using this pattern and the specified
string
*/
- WCMatcher * createWCMatcher(const CMString & str);
+ WCMatcher * createWCMatcher(const CMStringW & str);
};
class NFAUNode
@@ -1430,7 +1430,7 @@ public:
NFAUNode();
virtual ~NFAUNode();
virtual void findAllNodes(std::map<NFAUNode*, bool> & soFar);
- virtual int match(const CMString & str, WCMatcher * matcher, const int curInd = 0) const = 0;
+ virtual int match(const CMStringW & str, WCMatcher * matcher, const int curInd = 0) const = 0;
inline virtual bool isGroupHeadNode() const { return false; }
inline virtual bool isStartOfInputNode() const { return false; }
};
@@ -1440,7 +1440,7 @@ protected:
wchar_t ch;
public:
NFACharUNode(const wchar_t c);
- virtual int match(const CMString & str, WCMatcher * matcher, const int curInd = 0) const;
+ virtual int match(const CMStringW & str, WCMatcher * matcher, const int curInd = 0) const;
};
class NFACICharUNode : public NFAUNode
{
@@ -1448,19 +1448,19 @@ protected:
wchar_t ch;
public:
NFACICharUNode(const wchar_t c);
- virtual int match(const CMString & str, WCMatcher * matcher, const int curInd = 0) const;
+ virtual int match(const CMStringW & str, WCMatcher * matcher, const int curInd = 0) const;
};
class NFAStartUNode : public NFAUNode
{
public:
NFAStartUNode();
- virtual int match(const CMString & str, WCMatcher * matcher, const int curInd = 0) const;
+ virtual int match(const CMStringW & str, WCMatcher * matcher, const int curInd = 0) const;
};
class NFAEndUNode : public NFAUNode
{
public:
NFAEndUNode();
- virtual int match(const CMString & str, WCMatcher * matcher, const int curInd = 0) const;
+ virtual int match(const CMStringW & str, WCMatcher * matcher, const int curInd = 0) const;
};
class NFAQuantifierUNode : public NFAUNode
{
@@ -1471,7 +1471,7 @@ public:
NFAQuantifierUNode(WCPattern * pat, NFAUNode * internal,
const int minMatch = WCPattern::MIN_QMATCH,
const int maxMatch = WCPattern::MAX_QMATCH);
- virtual int match(const CMString & str, WCMatcher * matcher, const int curInd = 0) const;
+ virtual int match(const CMStringW & str, WCMatcher * matcher, const int curInd = 0) const;
};
class NFAGreedyQuantifierUNode : public NFAQuantifierUNode
{
@@ -1479,8 +1479,8 @@ public:
NFAGreedyQuantifierUNode(WCPattern * pat, NFAUNode * internal,
const int minMatch = WCPattern::MIN_QMATCH,
const int maxMatch = WCPattern::MAX_QMATCH);
- virtual int match(const CMString & str, WCMatcher * matcher, const int curInd = 0) const;
- virtual int matchInternal(const CMString & str, WCMatcher * matcher, const int curInd, const int soFar) const;
+ virtual int match(const CMStringW & str, WCMatcher * matcher, const int curInd = 0) const;
+ virtual int matchInternal(const CMStringW & str, WCMatcher * matcher, const int curInd, const int soFar) const;
};
class NFALazyQuantifierUNode : public NFAQuantifierUNode
{
@@ -1488,7 +1488,7 @@ public:
NFALazyQuantifierUNode(WCPattern * pat, NFAUNode * internal,
const int minMatch = WCPattern::MIN_QMATCH,
const int maxMatch = WCPattern::MAX_QMATCH);
- virtual int match(const CMString & str, WCMatcher * matcher, const int curInd = 0) const;
+ virtual int match(const CMStringW & str, WCMatcher * matcher, const int curInd = 0) const;
};
class NFAPossessiveQuantifierUNode : public NFAQuantifierUNode
{
@@ -1496,13 +1496,13 @@ public:
NFAPossessiveQuantifierUNode(WCPattern * pat, NFAUNode * internal,
const int minMatch = WCPattern::MIN_QMATCH,
const int maxMatch = WCPattern::MAX_QMATCH);
- virtual int match(const CMString & str, WCMatcher * matcher, const int curInd = 0) const;
+ virtual int match(const CMStringW & str, WCMatcher * matcher, const int curInd = 0) const;
};
class NFAAcceptUNode : public NFAUNode
{
public:
NFAAcceptUNode();
- virtual int match(const CMString & str, WCMatcher * matcher, const int curInd = 0) const;
+ virtual int match(const CMStringW & str, WCMatcher * matcher, const int curInd = 0) const;
};
class NFAClassUNode : public NFAUNode
{
@@ -1510,8 +1510,8 @@ public:
bool inv;
std::map<wchar_t, bool> vals;
NFAClassUNode(const bool invert = 0);
- NFAClassUNode(const CMString & clazz, const bool invert);
- virtual int match(const CMString & str, WCMatcher * matcher, const int curInd = 0) const;
+ NFAClassUNode(const CMStringW & clazz, const bool invert);
+ virtual int match(const CMStringW & str, WCMatcher * matcher, const int curInd = 0) const;
};
class NFACIClassUNode : public NFAUNode
{
@@ -1519,14 +1519,14 @@ public:
bool inv;
std::map<wchar_t, bool> vals;
NFACIClassUNode(const bool invert = 0);
- NFACIClassUNode(const CMString & clazz, const bool invert);
- virtual int match(const CMString & str, WCMatcher * matcher, const int curInd = 0) const;
+ NFACIClassUNode(const CMStringW & clazz, const bool invert);
+ virtual int match(const CMStringW & str, WCMatcher * matcher, const int curInd = 0) const;
};
class NFASubStartUNode : public NFAUNode
{
public:
NFASubStartUNode();
- virtual int match(const CMString & str, WCMatcher * matcher, const int curInd = 0) const;
+ virtual int match(const CMStringW & str, WCMatcher * matcher, const int curInd = 0) const;
};
class NFAOrUNode : public NFAUNode
{
@@ -1535,21 +1535,21 @@ public:
NFAUNode * two;
NFAOrUNode(NFAUNode * first, NFAUNode * second);
virtual void findAllNodes(std::map<NFAUNode*, bool> & soFar);
- virtual int match(const CMString & str, WCMatcher * matcher, const int curInd = 0) const;
+ virtual int match(const CMStringW & str, WCMatcher * matcher, const int curInd = 0) const;
};
class NFAQuoteUNode : public NFAUNode
{
public:
- CMString qStr;
- NFAQuoteUNode(const CMString & quoted);
- virtual int match(const CMString & str, WCMatcher * matcher, const int curInd = 0) const;
+ CMStringW qStr;
+ NFAQuoteUNode(const CMStringW & quoted);
+ virtual int match(const CMStringW & str, WCMatcher * matcher, const int curInd = 0) const;
};
class NFACIQuoteUNode : public NFAUNode
{
public:
- CMString qStr;
- NFACIQuoteUNode(const CMString & quoted);
- virtual int match(const CMString & str, WCMatcher * matcher, const int curInd = 0) const;
+ CMStringW qStr;
+ NFACIQuoteUNode(const CMStringW & quoted);
+ virtual int match(const CMStringW & str, WCMatcher * matcher, const int curInd = 0) const;
};
class NFALookAheadUNode : public NFAUNode
{
@@ -1558,40 +1558,40 @@ public:
NFAUNode * inner;
NFALookAheadUNode(NFAUNode * internal, const bool positive);
virtual void findAllNodes(std::map<NFAUNode*, bool> & soFar);
- virtual int match(const CMString & str, WCMatcher * matcher, const int curInd = 0) const;
+ virtual int match(const CMStringW & str, WCMatcher * matcher, const int curInd = 0) const;
};
class NFALookBehindUNode : public NFAUNode
{
public:
bool pos;
- CMString mStr;
- NFALookBehindUNode(const CMString & str, const bool positive);
- virtual int match(const CMString & str, WCMatcher * matcher, const int curInd = 0) const;
+ CMStringW mStr;
+ NFALookBehindUNode(const CMStringW & str, const bool positive);
+ virtual int match(const CMStringW & str, WCMatcher * matcher, const int curInd = 0) const;
};
class NFAStartOfLineUNode : public NFAUNode
{
public:
NFAStartOfLineUNode();
- virtual int match(const CMString & str, WCMatcher * matcher, const int curInd = 0) const;
+ virtual int match(const CMStringW & str, WCMatcher * matcher, const int curInd = 0) const;
};
class NFAEndOfLineUNode : public NFAUNode
{
public:
NFAEndOfLineUNode();
- virtual int match(const CMString & str, WCMatcher * matcher, const int curInd = 0) const;
+ virtual int match(const CMStringW & str, WCMatcher * matcher, const int curInd = 0) const;
};
class NFAReferenceUNode : public NFAUNode
{
public:
int gi;
NFAReferenceUNode(const int groupIndex);
- virtual int match(const CMString & str, WCMatcher * matcher, const int curInd = 0) const;
+ virtual int match(const CMStringW & str, WCMatcher * matcher, const int curInd = 0) const;
};
class NFAStartOfInputUNode : public NFAUNode
{
public:
NFAStartOfInputUNode();
- virtual int match(const CMString & str, WCMatcher * matcher, const int curInd = 0) const;
+ virtual int match(const CMStringW & str, WCMatcher * matcher, const int curInd = 0) const;
inline virtual bool isStartOfInputNode() const { return false; }
};
class NFAEndOfInputUNode : public NFAUNode
@@ -1599,27 +1599,27 @@ class NFAEndOfInputUNode : public NFAUNode
public:
bool term;
NFAEndOfInputUNode(const bool lookForTerm);
- virtual int match(const CMString & str, WCMatcher * matcher, const int curInd = 0) const;
+ virtual int match(const CMStringW & str, WCMatcher * matcher, const int curInd = 0) const;
};
class NFAWordBoundaryUNode : public NFAUNode
{
public:
bool pos;
NFAWordBoundaryUNode(const bool positive);
- virtual int match(const CMString & str, WCMatcher * matcher, const int curInd = 0) const;
+ virtual int match(const CMStringW & str, WCMatcher * matcher, const int curInd = 0) const;
};
class NFAEndOfMatchUNode : public NFAUNode
{
public:
NFAEndOfMatchUNode();
- virtual int match(const CMString & str, WCMatcher * matcher, const int curInd = 0) const;
+ virtual int match(const CMStringW & str, WCMatcher * matcher, const int curInd = 0) const;
};
class NFAGroupHeadUNode : public NFAUNode
{
public:
int gi;
NFAGroupHeadUNode(const int groupIndex);
- virtual int match(const CMString & str, WCMatcher * matcher, const int curInd = 0) const;
+ virtual int match(const CMStringW & str, WCMatcher * matcher, const int curInd = 0) const;
inline virtual bool isGroupHeadNode() const { return false; }
};
class NFAGroupTailUNode : public NFAUNode
@@ -1627,14 +1627,14 @@ class NFAGroupTailUNode : public NFAUNode
public:
int gi;
NFAGroupTailUNode(const int groupIndex);
- virtual int match(const CMString & str, WCMatcher * matcher, const int curInd = 0) const;
+ virtual int match(const CMStringW & str, WCMatcher * matcher, const int curInd = 0) const;
};
class NFAGroupLoopPrologueUNode : public NFAUNode
{
public:
int gi;
NFAGroupLoopPrologueUNode(const int groupIndex);
- virtual int match(const CMString & str, WCMatcher * matcher, const int curInd = 0) const;
+ virtual int match(const CMStringW & str, WCMatcher * matcher, const int curInd = 0) const;
};
class NFAGroupLoopUNode : public NFAUNode
{
@@ -1644,10 +1644,10 @@ public:
NFAGroupLoopUNode(NFAUNode * internal, const int minMatch,
const int maxMatch, const int groupIndex, const int matchType);
virtual void findAllNodes(std::map<NFAUNode*, bool> & soFar);
- virtual int match(const CMString & str, WCMatcher * matcher, const int curInd = 0) const;
- int matchGreedy(const CMString & str, WCMatcher * matcher, const int curInd = 0) const;
- int matchLazy(const CMString & str, WCMatcher * matcher, const int curInd = 0) const;
- int matchPossessive(const CMString & str, WCMatcher * matcher, const int curInd = 0) const;
+ virtual int match(const CMStringW & str, WCMatcher * matcher, const int curInd = 0) const;
+ int matchGreedy(const CMStringW & str, WCMatcher * matcher, const int curInd = 0) const;
+ int matchLazy(const CMStringW & str, WCMatcher * matcher, const int curInd = 0) const;
+ int matchPossessive(const CMStringW & str, WCMatcher * matcher, const int curInd = 0) const;
};
#endif
diff --git a/plugins/SmileyAdd/src/services.cpp b/plugins/SmileyAdd/src/services.cpp
index 1abad18364..84e0034737 100644
--- a/plugins/SmileyAdd/src/services.cpp
+++ b/plugins/SmileyAdd/src/services.cpp
@@ -33,7 +33,7 @@ SmileyPackType* GetSmileyPack(const char *proto, MCONTACT hContact, SmileyPackCT
if (proto != NULL && IsBadStringPtrA(proto, 10))
return NULL;
- CMString categoryName;
+ CMStringW categoryName;
if (hContact != NULL) {
opt.ReadContactCategory(hContact, categoryName);
if (categoryName == L"<None>") return NULL;
@@ -46,15 +46,15 @@ SmileyPackType* GetSmileyPack(const char *proto, MCONTACT hContact, SmileyPackCT
char *protonam = GetContactProto(hContact);
if (protonam != NULL) {
DBVARIANT dbv;
- if (db_get_ts(hContact, protonam, "Transport", &dbv) == 0) {
+ if (db_get_ws(hContact, protonam, "Transport", &dbv) == 0) {
categoryName = dbv.ptszVal;
db_free(&dbv);
}
- else if (opt.UsePhysProto && db_get_ts(NULL, protonam, "AM_BaseProto", &dbv) == 0) {
+ else if (opt.UsePhysProto && db_get_ws(NULL, protonam, "AM_BaseProto", &dbv) == 0) {
categoryName = L"AllProto";
categoryName += dbv.ptszVal;
db_free(&dbv);
- CMString categoryFileName = g_SmileyCategories.GetSmileyCategory(categoryName) ? g_SmileyCategories.GetSmileyCategory(categoryName)->GetFilename() : L"";
+ CMStringW categoryFileName = g_SmileyCategories.GetSmileyCategory(categoryName) ? g_SmileyCategories.GetSmileyCategory(categoryName)->GetFilename() : L"";
if (categoryFileName.IsEmpty())
categoryName = _A2T(protonam);
}
@@ -235,8 +235,8 @@ INT_PTR RegisterPack(WPARAM, LPARAM lParam)
if (IsBadStringPtrA(smre->name, 50) || IsBadStringPtrA(smre->dispname, 50)) return FALSE;
- CMString nmd(_A2T(smre->dispname));
- CMString nm(_A2T(smre->name));
+ CMStringW nmd(_A2T(smre->dispname));
+ CMStringW nm(_A2T(smre->name));
g_SmileyCategories.AddAndLoad(nm, nmd);
return TRUE;
@@ -249,7 +249,7 @@ INT_PTR CustomCatMenu(WPARAM hContact, LPARAM lParam)
if (smct != NULL)
opt.WriteContactCategory(hContact, smct->GetName());
else {
- CMString empty;
+ CMStringW empty;
if (lParam == 1) empty = L"<None>";
opt.WriteContactCategory(hContact, empty);
}
@@ -284,12 +284,12 @@ int RebuildContactMenu(WPARAM wParam, LPARAM)
menuHandleArray.destroy();
if (haveMenu) {
- CMString cat;
+ CMStringW cat;
opt.ReadContactCategory(wParam, cat);
CMenuItem mi;
mi.root = hContactMenuItem;
- mi.flags = CMIF_TCHAR | CMIF_SYSTEM;
+ mi.flags = CMIF_UNICODE | CMIF_SYSTEM;
mi.pszService = MS_SMILEYADD_CUSTOMCATMENU;
bool nonecheck = true;
@@ -340,7 +340,7 @@ int RebuildContactMenu(WPARAM wParam, LPARAM)
INT_PTR ReloadPack(WPARAM, LPARAM lParam)
{
if (lParam) {
- CMString categoryName = _A2T((char*)lParam);
+ CMStringW categoryName = _A2T((char*)lParam);
SmileyCategoryType *smc = g_SmileyCategories.GetSmileyCategory(categoryName);
if (smc != NULL)
smc->Load();
@@ -382,15 +382,15 @@ int AccountListChanged(WPARAM wParam, LPARAM lParam)
switch (wParam) {
case PRAC_ADDED:
if (acc != NULL) {
- CMString catname(L"Standard");
- const CMString &defaultFile = g_SmileyCategories.GetSmileyCategory(catname)->GetFilename();
+ CMStringW catname(L"Standard");
+ const CMStringW &defaultFile = g_SmileyCategories.GetSmileyCategory(catname)->GetFilename();
g_SmileyCategories.AddAccountAsCategory(acc, defaultFile);
}
break;
case PRAC_CHANGED:
if (acc != NULL && acc->szModuleName != NULL) {
- CMString name(_A2T(acc->szModuleName));
+ CMStringW name(_A2T(acc->szModuleName));
SmileyCategoryType *smc = g_SmileyCategories.GetSmileyCategory(name);
if (smc != NULL) {
if (acc->tszAccountName) name = acc->tszAccountName;
@@ -406,8 +406,8 @@ int AccountListChanged(WPARAM wParam, LPARAM lParam)
case PRAC_CHECKED:
if (acc != NULL) {
if (acc->bIsEnabled) {
- CMString catname(L"Standard");
- const CMString &defaultFile = g_SmileyCategories.GetSmileyCategory(catname)->GetFilename();
+ CMStringW catname(L"Standard");
+ const CMStringW &defaultFile = g_SmileyCategories.GetSmileyCategory(catname)->GetFilename();
g_SmileyCategories.AddAccountAsCategory(acc, defaultFile);
}
else g_SmileyCategories.DeleteAccountAsCategory(acc);
@@ -427,7 +427,7 @@ int DbSettingChanged(WPARAM hContact, LPARAM lParam)
return 0;
if (strcmp(cws->szSetting, "Transport") == 0) {
- CMString catname(L"Standard");
+ CMStringW catname(L"Standard");
SmileyCategoryType *smc = g_SmileyCategories.GetSmileyCategory(catname);
if (smc != NULL)
g_SmileyCategories.AddContactTransportAsCategory(hContact, smc->GetFilename());
diff --git a/plugins/SmileyAdd/src/smileyroutines.cpp b/plugins/SmileyAdd/src/smileyroutines.cpp
index e6d7dfd7ed..a56be87b9f 100644
--- a/plugins/SmileyAdd/src/smileyroutines.cpp
+++ b/plugins/SmileyAdd/src/smileyroutines.cpp
@@ -49,7 +49,7 @@ void LookupAllSmileys(SmileyPackType *smileyPack, SmileyPackCType *smileyCPack,
SmileyLookup::SmileyLocVecType *smileys = new SmileyLookup::SmileyLocVecType [smlsz];
// Find all possible smileys
- CMString tmpstr(lpstrText);
+ CMStringW tmpstr(lpstrText);
int i = 0;
if (sml)
diff --git a/plugins/SmileyAdd/src/smileys.cpp b/plugins/SmileyAdd/src/smileys.cpp
index 213e8307d0..e0bb7d8287 100644
--- a/plugins/SmileyAdd/src/smileys.cpp
+++ b/plugins/SmileyAdd/src/smileys.cpp
@@ -143,12 +143,12 @@ bool SmileyType::LoadFromImage(IStream *pStream)
if (m_xepimg)
m_xepimg->Release();
- CMString name;
+ CMStringW name;
m_xepimg = new ImageType(0, name, pStream);
return true;
}
-bool SmileyType::LoadFromResource(const CMString &file, const int index)
+bool SmileyType::LoadFromResource(const CMStringW &file, const int index)
{
m_index = index;
m_filepath = file;
@@ -226,9 +226,9 @@ void SmileyType::CallSmileyService(MCONTACT hContact)
_TMatcher *m0 = srvsplit->createTMatcher(GetTriggerText());
m0->findFirstMatch();
- CMString name = m0->getGroup(1);
- CMString par1 = m0->getGroup(2);
- CMString par2 = m0->getGroup(3);
+ CMStringW name = m0->getGroup(1);
+ CMStringW par1 = m0->getGroup(2);
+ CMStringW par2 = m0->getGroup(3);
delete m0;
delete srvsplit;
@@ -262,7 +262,7 @@ void SmileyPackType::AddTriggersToSmileyLookup(void)
{
_TPattern *p = _TPattern::compile(L"\\s+");
{
- CMString emptystr;
+ CMStringW emptystr;
m_SmileyLookup.insert(new SmileyLookup(urlRegEx, true, -1, emptystr));
m_SmileyLookup.insert(new SmileyLookup(pathRegEx, true, -1, emptystr));
m_SmileyLookup.insert(new SmileyLookup(timeRegEx, true, -1, emptystr));
@@ -285,7 +285,7 @@ void SmileyPackType::AddTriggersToSmileyLookup(void)
while (m0->findNextMatch()) {
int stind = m0->getStartingIndex();
if (li != stind) {
- CMString out;
+ CMStringW out;
ReplaceAllSpecials(m0->getString().Mid(li, stind - li), out);
SmileyLookup *dats = new SmileyLookup(out, false, dist, GetFilename());
if (dats->IsValid()) {
@@ -301,7 +301,7 @@ void SmileyPackType::AddTriggersToSmileyLookup(void)
int stind = (int)m0->getString().GetLength();
if (li < stind) {
- CMString out;
+ CMStringW out;
ReplaceAllSpecials(m0->getString().Mid(li, stind - li), out);
SmileyLookup *dats = new SmileyLookup(out, false, dist, GetFilename());
if (dats->IsValid()) {
@@ -320,7 +320,7 @@ void SmileyPackType::AddTriggersToSmileyLookup(void)
delete p;
}
-void SmileyPackType::ReplaceAllSpecials(const CMString &Input, CMString &Output)
+void SmileyPackType::ReplaceAllSpecials(const CMStringW &Input, CMStringW &Output)
{
Output = _TPattern::replace(L"%%_{1,2}%%", Input, L" ");
Output = _TPattern::replace(L"%%''%%", Output, L"\"");
@@ -341,7 +341,7 @@ void SmileyPackType::Clear(void)
errorFound = false;
}
-bool SmileyPackType::LoadSmileyFile(const CMString &filename, const CMString &packname, bool onlyInfo, bool noerr)
+bool SmileyPackType::LoadSmileyFile(const CMStringW &filename, const CMStringW &packname, bool onlyInfo, bool noerr)
{
Clear();
@@ -350,7 +350,7 @@ bool SmileyPackType::LoadSmileyFile(const CMString &filename, const CMString &pa
return false;
}
- CMString modpath;
+ CMStringW modpath;
pathToAbsolute(filename, modpath);
// Load xep file
@@ -359,7 +359,7 @@ bool SmileyPackType::LoadSmileyFile(const CMString &filename, const CMString &pa
if (!noerr) {
static const wchar_t errmsg[] = LPGENW("Smiley pack %s for category \"%s\" not found.\nSelect correct smiley pack in the Options -> Customize -> Smileys.");
wchar_t msgtxt[1024];
- mir_snwprintf(msgtxt, TranslateTS(errmsg), modpath.c_str(), packname);
+ mir_snwprintf(msgtxt, TranslateW(errmsg), modpath.c_str(), packname);
ReportError(msgtxt);
}
@@ -382,7 +382,7 @@ bool SmileyPackType::LoadSmileyFile(const CMString &filename, const CMString &pa
// Close file
_close(fh);
- CMString tbuf;
+ CMStringW tbuf;
if (len > 2 && *(wchar_t*)buf == 0xfeff)
tbuf = ((wchar_t*)buf + 1);
@@ -405,9 +405,9 @@ bool SmileyPackType::LoadSmileyFile(const CMString &filename, const CMString &pa
return res;
}
-bool SmileyPackType::LoadSmileyFileMSL(CMString &tbuf, bool onlyInfo, CMString &modpath)
+bool SmileyPackType::LoadSmileyFileMSL(CMStringW &tbuf, bool onlyInfo, CMStringW &modpath)
{
- CMString pathstr, packstr;
+ CMStringW pathstr, packstr;
{
_TPattern *pathsplit = _TPattern::compile(L"(.*\\\\)(.*)\\.|$");
_TMatcher *m0 = pathsplit->createTMatcher(modpath);
@@ -469,7 +469,7 @@ bool SmileyPackType::LoadSmileyFileMSL(CMString &tbuf, bool onlyInfo, CMString &
{
_TMatcher *m0 = smiley->createTMatcher(tbuf);
while (m0->findNextMatch()) {
- CMString resname = m0->getGroup(2);
+ CMStringW resname = m0->getGroup(2);
if (resname.Find(L"http://") != -1) {
if (GetSmileyFile(resname, packstr))
continue;
@@ -519,7 +519,7 @@ bool SmileyPackType::LoadSmileyFileMSL(CMString &tbuf, bool onlyInfo, CMString &
if (!noerr) {
static const wchar_t errmsg[] = LPGENW("Smiley #%u in file %s for smiley pack %s not found.");
wchar_t msgtxt[1024];
- mir_snwprintf(msgtxt, TranslateTS(errmsg), smnum, resname.c_str(), modpath.c_str());
+ mir_snwprintf(msgtxt, TranslateW(errmsg), smnum, resname.c_str(), modpath.c_str());
CallService(MS_NETLIB_LOG, (WPARAM)hNetlibUser, _T2A(msgtxt));
errorFound = true;
}
@@ -540,11 +540,11 @@ bool SmileyPackType::LoadSmileyFileMSL(CMString &tbuf, bool onlyInfo, CMString &
}
-static void DecodeHTML(CMString &str)
+static void DecodeHTML(CMStringW &str)
{
if (str.Find('&') != -1) {
- str = _TPattern::replace(CMString(L"&lt;"), str, CMString(L"<"));
- str = _TPattern::replace(CMString(L"&gt;"), str, CMString(L">"));
+ str = _TPattern::replace(CMStringW(L"&lt;"), str, CMStringW(L"<"));
+ str = _TPattern::replace(CMStringW(L"&gt;"), str, CMStringW(L">"));
}
}
@@ -571,7 +571,7 @@ static IStream* DecodeBase64Data(const char *pData)
}
-bool SmileyPackType::LoadSmileyFileXEP(CMString &tbuf, bool onlyInfo, CMString&)
+bool SmileyPackType::LoadSmileyFileXEP(CMStringW &tbuf, bool onlyInfo, CMStringW&)
{
_TMatcher *m0, *m1, *m2;
@@ -584,7 +584,7 @@ bool SmileyPackType::LoadSmileyFileXEP(CMString &tbuf, bool onlyInfo, CMString&)
m0 = settings_re->createTMatcher(tbuf);
if (m0->findFirstMatch()) {
- CMString settings = m0->getGroup(1);
+ CMStringW settings = m0->getGroup(1);
m1 = author_re->createTMatcher(settings);
if (m1->findFirstMatch()) {
@@ -622,7 +622,7 @@ bool SmileyPackType::LoadSmileyFileXEP(CMString &tbuf, bool onlyInfo, CMString&)
m0 = images_re->createTMatcher(tbuf);
if (m0->findFirstMatch()) {
- CMString images = m0->getGroup(1);
+ CMStringW images = m0->getGroup(1);
m1 = imagedt_re->createTMatcher(images);
if (m1->findFirstMatch()) {
@@ -646,7 +646,7 @@ bool SmileyPackType::LoadSmileyFileXEP(CMString &tbuf, bool onlyInfo, CMString&)
dat->m_ToolText = m0->getGroup(2);
DecodeHTML(dat->m_ToolText);
- CMString rec = m0->getGroup(3);
+ CMStringW rec = m0->getGroup(3);
m1 = expression_re->createTMatcher(rec);
if (m1->findFirstMatch()) {
@@ -665,7 +665,7 @@ bool SmileyPackType::LoadSmileyFileXEP(CMString &tbuf, bool onlyInfo, CMString&)
m1 = image_re->createTMatcher(rec);
if (m1->findFirstMatch()) {
- CMString images = m1->getGroup(1);
+ CMStringW images = m1->getGroup(1);
m2 = imagedt_re->createTMatcher(images);
if (m2->findFirstMatch()) {
@@ -709,7 +709,7 @@ bool SmileyPackType::LoadSmileyFileXEP(CMString &tbuf, bool onlyInfo, CMString&)
//
-bool SmileyPackListType::AddSmileyPack(CMString &filename, CMString &packname)
+bool SmileyPackListType::AddSmileyPack(CMStringW &filename, CMStringW &packname)
{
bool res = true;
if (GetSmileyPack(filename) == NULL) { //not exist yet, so add
@@ -725,13 +725,13 @@ bool SmileyPackListType::AddSmileyPack(CMString &filename, CMString &packname)
}
-SmileyPackType* SmileyPackListType::GetSmileyPack(CMString &filename)
+SmileyPackType* SmileyPackListType::GetSmileyPack(CMStringW &filename)
{
- CMString modpath;
+ CMStringW modpath;
pathToAbsolute(filename, modpath);
for (int i = 0; i < m_SmileyPacks.getCount(); i++) {
- CMString modpath1;
+ CMStringW modpath1;
pathToAbsolute(m_SmileyPacks[i].GetFilename(), modpath1);
if (mir_wstrcmpi(modpath.c_str(), modpath1.c_str()) == 0) return &m_SmileyPacks[i];
}
@@ -749,8 +749,8 @@ void SmileyPackListType::ClearAndFreeAll()
//
-SmileyCategoryType::SmileyCategoryType(SmileyPackListType *pSPS, const CMString &name,
- const CMString &displayName, const CMString &defaultFilename, SmcType typ)
+SmileyCategoryType::SmileyCategoryType(SmileyPackListType *pSPS, const CMStringW &name,
+ const CMStringW &displayName, const CMStringW &defaultFilename, SmcType typ)
{
m_pSmileyPackStore = pSPS;
type = typ;
@@ -800,7 +800,7 @@ void SmileyCategoryListType::ClearAndLoadAll(void)
}
-SmileyCategoryType* SmileyCategoryListType::GetSmileyCategory(const CMString &name)
+SmileyCategoryType* SmileyCategoryListType::GetSmileyCategory(const CMStringW &name)
{
for (int i = 0; i < m_SmileyCategories.getCount(); i++)
if (name.CompareNoCase(m_SmileyCategories[i].GetName()) == 0)
@@ -816,7 +816,7 @@ SmileyCategoryType* SmileyCategoryListType::GetSmileyCategory(unsigned index)
}
-SmileyPackType* SmileyCategoryListType::GetSmileyPack(CMString &categoryname)
+SmileyPackType* SmileyCategoryListType::GetSmileyPack(CMStringW &categoryname)
{
SmileyCategoryType *smc = GetSmileyCategory(categoryname);
return smc != NULL ? smc->GetSmileyPack() : NULL;
@@ -825,7 +825,7 @@ SmileyPackType* SmileyCategoryListType::GetSmileyPack(CMString &categoryname)
void SmileyCategoryListType::SaveSettings(void)
{
- CMString catstr;
+ CMStringW catstr;
for (int i = 0; i < m_SmileyCategories.getCount(); i++) {
m_SmileyCategories[i].SaveSettings();
if (m_SmileyCategories[i].IsCustom()) {
@@ -837,7 +837,7 @@ void SmileyCategoryListType::SaveSettings(void)
}
-void SmileyCategoryListType::AddAndLoad(const CMString &name, const CMString &displayName)
+void SmileyCategoryListType::AddAndLoad(const CMStringW &name, const CMStringW &displayName)
{
if (GetSmileyCategory(name) != NULL)
return;
@@ -849,7 +849,7 @@ void SmileyCategoryListType::AddAndLoad(const CMString &name, const CMString &di
}
-void SmileyCategoryListType::AddCategory(const CMString &name, const CMString &displayName, SmcType typ, const CMString &defaultFilename)
+void SmileyCategoryListType::AddCategory(const CMStringW &name, const CMStringW &displayName, SmcType typ, const CMStringW &defaultFilename)
{
if (GetSmileyCategory(name) == NULL)
m_SmileyCategories.insert(new SmileyCategoryType(m_pSmileyPackStore, name, displayName, defaultFilename, typ));
@@ -867,14 +867,14 @@ bool SmileyCategoryListType::DeleteCustomCategory(int index)
return false;
}
-void SmileyCategoryListType::AddAccountAsCategory(PROTOACCOUNT *acc, const CMString &defaultFile)
+void SmileyCategoryListType::AddAccountAsCategory(PROTOACCOUNT *acc, const CMStringW &defaultFile)
{
if (Proto_IsAccountEnabled(acc) && acc->szProtoName && IsSmileyProto(acc->szModuleName)) {
- CMString displayName(acc->tszAccountName ? acc->tszAccountName : _A2T(acc->szModuleName));
- CMString PhysProtoName, paths;
+ CMStringW displayName(acc->tszAccountName ? acc->tszAccountName : _A2T(acc->szModuleName));
+ CMStringW PhysProtoName, paths;
DBVARIANT dbv;
- if (db_get_ts(NULL, acc->szModuleName, "AM_BaseProto", &dbv) == 0) {
+ if (db_get_ws(NULL, acc->szModuleName, "AM_BaseProto", &dbv) == 0) {
PhysProtoName = L"AllProto";
PhysProtoName += dbv.ptszVal;
db_free(&dbv);
@@ -894,19 +894,19 @@ void SmileyCategoryListType::AddAccountAsCategory(PROTOACCOUNT *acc, const CMStr
mir_snprintf(path, "Smileys\\nova\\%s.msl", packnam);
paths = _A2T(path);
- CMString patha;
+ CMStringW patha;
pathToAbsolute(paths, patha);
if (_waccess(patha.c_str(), 0) != 0)
paths = defaultFile;
}
- CMString tname(_A2T(acc->szModuleName));
+ CMStringW tname(_A2T(acc->szModuleName));
AddCategory(tname, displayName, acc->bIsVirtual ? smcVirtualProto : smcProto, paths);
}
}
-void SmileyCategoryListType::AddProtoAsCategory(char *acc, const CMString &defaultFile)
+void SmileyCategoryListType::AddProtoAsCategory(char *acc, const CMStringW &defaultFile)
{
if (acc == NULL)
return;
@@ -920,21 +920,21 @@ void SmileyCategoryListType::AddProtoAsCategory(char *acc, const CMString &defau
char path[MAX_PATH];
mir_snprintf(path, "Smileys\\nova\\%s.msl", packnam);
- CMString paths = _A2T(path), patha;
+ CMStringW paths = _A2T(path), patha;
pathToAbsolute(paths, patha);
if (_waccess(patha.c_str(), 0) != 0)
paths = defaultFile;
- CMString dName(acc), displayName;
+ CMStringW dName(acc), displayName;
displayName.AppendFormat(TranslateT("%s global smiley pack"), dName.GetBuffer());
- CMString tname("AllProto");
+ CMStringW tname("AllProto");
tname += _A2T(acc);
AddCategory(tname, displayName, smcPhysProto, paths);
}
void SmileyCategoryListType::DeleteAccountAsCategory(PROTOACCOUNT *acc)
{
- CMString tname(_A2T(acc->szModuleName));
+ CMStringW tname(_A2T(acc->szModuleName));
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
char *proto = GetContactProto(hContact);
@@ -942,7 +942,7 @@ void SmileyCategoryListType::DeleteAccountAsCategory(PROTOACCOUNT *acc)
continue;
DBVARIANT dbv;
- if (!db_get_ts(hContact, proto, "Transport", &dbv)) {
+ if (!db_get_ws(hContact, proto, "Transport", &dbv)) {
bool found = (tname.CompareNoCase(dbv.ptszVal) == 0);
db_free(&dbv);
if (found)
@@ -958,14 +958,14 @@ void SmileyCategoryListType::DeleteAccountAsCategory(PROTOACCOUNT *acc)
}
}
-void SmileyCategoryListType::AddContactTransportAsCategory(MCONTACT hContact, const CMString &defaultFile)
+void SmileyCategoryListType::AddContactTransportAsCategory(MCONTACT hContact, const CMStringW &defaultFile)
{
char *proto = GetContactProto(hContact);
if (proto == NULL)
return;
DBVARIANT dbv;
- if (!db_get_ts(hContact, proto, "Transport", &dbv)) {
+ if (!db_get_ws(hContact, proto, "Transport", &dbv)) {
if (dbv.ptszVal[0] == '\0') {
db_free(&dbv);
return;
@@ -987,12 +987,12 @@ void SmileyCategoryListType::AddContactTransportAsCategory(MCONTACT hContact, co
mir_free(trsp);
- CMString displayName = dbv.ptszVal;
+ CMStringW displayName = dbv.ptszVal;
if (packname != NULL) {
char path[MAX_PATH];
mir_snprintf(path, "Smileys\\nova\\%s.msl", packname);
- CMString paths = _A2T(path), patha;
+ CMStringW paths = _A2T(path), patha;
pathToAbsolute(paths, patha);
if (_waccess(patha.c_str(), 0) != 0)
@@ -1008,11 +1008,11 @@ void SmileyCategoryListType::AddContactTransportAsCategory(MCONTACT hContact, co
void SmileyCategoryListType::AddAllProtocolsAsCategory(void)
{
- CMString displayName = TranslateT("Standard");
- CMString tname = L"Standard";
+ CMStringW displayName = TranslateT("Standard");
+ CMStringW tname = L"Standard";
AddCategory(tname, displayName, smcStd);
- const CMString &defaultFile = GetSmileyCategory(tname)->GetFilename();
+ const CMStringW &defaultFile = GetSmileyCategory(tname)->GetFilename();
PROTOCOLDESCRIPTOR **proto;
int protoCount = 0;
@@ -1032,7 +1032,7 @@ void SmileyCategoryListType::AddAllProtocolsAsCategory(void)
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
AddContactTransportAsCategory(hContact, defaultFile);
- CMString cats;
+ CMStringW cats;
opt.ReadCustomCategories(cats);
int cppv = 0;
@@ -1053,13 +1053,13 @@ void SmileyCategoryListType::AddAllProtocolsAsCategory(void)
}
-SmileyLookup::SmileyLookup(const CMString &str, const bool regexs, const int ind, const CMString &smpt)
+SmileyLookup::SmileyLookup(const CMStringW &str, const bool regexs, const int ind, const CMStringW &smpt)
{
wchar_t msgtxt[1024];
m_ind = ind;
if (regexs) {
- static const CMString testString(L"Test String");
+ static const CMStringW testString(L"Test String");
m_pattern = _TPattern::compile(str);
m_valid = m_pattern != NULL;
if (m_valid) {
@@ -1068,13 +1068,13 @@ SmileyLookup::SmileyLookup(const CMString &str, const bool regexs, const int ind
matcher->getStartingIndex() != matcher->getEndingIndex());
if (!m_valid) {
static const wchar_t errmsg[] = LPGENW("Regular expression \"%s\" in smiley pack \"%s\" could produce \"empty matches\".");
- mir_snwprintf(msgtxt, TranslateTS(errmsg), str.c_str(), smpt.c_str());
+ mir_snwprintf(msgtxt, TranslateW(errmsg), str.c_str(), smpt.c_str());
}
delete matcher;
}
else {
static const wchar_t errmsg[] = LPGENW("Regular expression \"%s\" in smiley pack \"%s\" malformed.");
- mir_snwprintf(msgtxt, TranslateTS(errmsg), str.c_str(), smpt.c_str());
+ mir_snwprintf(msgtxt, TranslateW(errmsg), str.c_str(), smpt.c_str());
}
if (!m_valid)
@@ -1094,7 +1094,7 @@ SmileyLookup::~SmileyLookup()
}
-void SmileyLookup::Find(const CMString &str, SmileyLocVecType &smlcur, bool firstOnly) const
+void SmileyLookup::Find(const CMStringW &str, SmileyLocVecType &smlcur, bool firstOnly) const
{
if (!m_valid) return;
diff --git a/plugins/SmileyAdd/src/smileys.h b/plugins/SmileyAdd/src/smileys.h
index cba4999442..c69d128618 100644
--- a/plugins/SmileyAdd/src/smileys.h
+++ b/plugins/SmileyAdd/src/smileys.h
@@ -42,7 +42,7 @@ protected:
HICON m_SmileyIcon;
ImageBase *m_xepimg;
- CMString m_filepath;
+ CMStringW m_filepath;
void SetFlagsBit(unsigned flag, bool set)
{
@@ -51,17 +51,17 @@ protected:
public:
- CMString m_TriggerText;
- CMString m_ToolText;
- CMString m_InsertText;
+ CMStringW m_TriggerText;
+ CMStringW m_ToolText;
+ CMStringW m_InsertText;
SmileyType();
~SmileyType();
- const CMString& GetTriggerText(void) const { return m_TriggerText; }
- const CMString& GetToolText(void) const { return m_ToolText; }
- const CMString& GetInsertText(void) const { return m_InsertText; }
- const CMString& GetFilePath(void) const { return m_filepath; }
+ const CMStringW& GetTriggerText(void) const { return m_TriggerText; }
+ const CMStringW& GetToolText(void) const { return m_ToolText; }
+ const CMStringW& GetInsertText(void) const { return m_InsertText; }
+ const CMStringW& GetFilePath(void) const { return m_filepath; }
bool IsHidden(void) const { return (m_flags & HiddenSmiley) != 0; }
bool IsRegEx(void) const { return (m_flags & RegExSmiley) != 0; }
@@ -96,7 +96,7 @@ public:
void SetImList(HIMAGELIST hImLst, long i);
- bool LoadFromResource(const CMString &file, const int index);
+ bool LoadFromResource(const CMStringW &file, const int index);
bool LoadFromImage(IStream *pStream);
};
@@ -133,7 +133,7 @@ private:
_TPattern *m_pattern;
int m_ind;
- CMString m_text;
+ CMStringW m_text;
bool m_valid;
public:
@@ -146,10 +146,10 @@ public:
typedef SMOBJLIST<SmileyLocType> SmileyLocVecType;
SmileyLookup() { m_ind = 0; m_valid = false; m_pattern = NULL; };
- SmileyLookup(const CMString &str, const bool regexs, const int ind, const CMString &smpt);
+ SmileyLookup(const CMStringW &str, const bool regexs, const int ind, const CMStringW &smpt);
~SmileyLookup();
- void Find(const CMString &str, SmileyLocVecType &smlcur, bool firstOnly) const;
+ void Find(const CMStringW &str, SmileyLocVecType &smlcur, bool firstOnly) const;
int GetIndex(void) const { return m_ind; }
bool IsValid(void) const { return m_valid; }
};
@@ -164,12 +164,12 @@ public:
POINT selec, win;
private:
- CMString m_Filename; //used as identification
- CMString m_Name;
- CMString m_Author;
- CMString m_Date;
- CMString m_Version;
- CMString m_ButtonSmiley;
+ CMStringW m_Filename; //used as identification
+ CMStringW m_Name;
+ CMStringW m_Author;
+ CMStringW m_Date;
+ CMStringW m_Version;
+ CMStringW m_ButtonSmiley;
HIMAGELIST m_hSmList;
@@ -181,9 +181,9 @@ private:
bool errorFound;
void AddTriggersToSmileyLookup(void);
- void ReplaceAllSpecials(const CMString &Input, CMString &Output);
- bool LoadSmileyFileMSL(CMString &tbuf, bool onlyInfo, CMString &modpath);
- bool LoadSmileyFileXEP(CMString &tbuf, bool onlyInfo, CMString &modpath);
+ void ReplaceAllSpecials(const CMStringW &Input, CMStringW &Output);
+ bool LoadSmileyFileMSL(CMStringW &tbuf, bool onlyInfo, CMStringW &modpath);
+ bool LoadSmileyFileXEP(CMStringW &tbuf, bool onlyInfo, CMStringW &modpath);
public:
SmileyPackType();
@@ -192,11 +192,11 @@ public:
SmileyVectorType& GetSmileyList(void) { return m_SmileyList; }
SmileyLookupType* GetSmileyLookup(void) { return &m_SmileyLookup; }
- const CMString& GetFilename(void) const { return m_Filename; }
- const CMString& GetName(void) const { return m_Name; }
- const CMString& GetAuthor(void) const { return m_Author; }
- const CMString& GetDate(void) const { return m_Date; }
- const CMString& GetVersion(void) const { return m_Version; }
+ const CMStringW& GetFilename(void) const { return m_Filename; }
+ const CMStringW& GetName(void) const { return m_Name; }
+ const CMStringW& GetAuthor(void) const { return m_Author; }
+ const CMStringW& GetDate(void) const { return m_Date; }
+ const CMStringW& GetVersion(void) const { return m_Version; }
int SmileyCount(void) const { return m_SmileyList.getCount(); }
int VisibleSmileyCount(void) const { return m_VisibleCount; }
@@ -205,7 +205,7 @@ public:
const wchar_t* GetButtonSmiley(void) const { return m_ButtonSmiley.c_str(); }
- bool LoadSmileyFile(const CMString &filename, const CMString &packname, bool onlyInfo, bool noerr = false);
+ bool LoadSmileyFile(const CMStringW &filename, const CMStringW &packname, bool onlyInfo, bool noerr = false);
void Clear(void);
};
@@ -222,9 +222,9 @@ private:
public:
int NumberOfSmileyPacks(void) { return m_SmileyPacks.getCount(); }
- bool AddSmileyPack(CMString &filename, CMString &packname);
+ bool AddSmileyPack(CMStringW &filename, CMStringW &packname);
void ClearAndFreeAll(void);
- SmileyPackType* GetSmileyPack(CMString& filename);
+ SmileyPackType* GetSmileyPack(CMStringW& filename);
};
@@ -244,9 +244,9 @@ typedef enum
class SmileyCategoryType
{
private:
- CMString m_Name;
- CMString m_DisplayName;
- CMString m_Filename; //functions as identification
+ CMStringW m_Name;
+ CMStringW m_DisplayName;
+ CMStringW m_Filename; //functions as identification
SmcType type;
@@ -256,11 +256,11 @@ private:
public:
SmileyCategoryType() { type = smcNone; m_pSmileyPackStore = NULL; visible = true; };
- SmileyCategoryType(SmileyPackListType *pSPS, const CMString &name, const CMString &displayName, const CMString &defaultFilename, SmcType typ);
+ SmileyCategoryType(SmileyPackListType *pSPS, const CMStringW &name, const CMStringW &displayName, const CMStringW &defaultFilename, SmcType typ);
- const CMString& GetDisplayName(void) const { return m_DisplayName; }
- const CMString& GetName(void) const { return m_Name; }
- const CMString& GetFilename(void) const { return m_Filename; }
+ const CMStringW& GetDisplayName(void) const { return m_DisplayName; }
+ const CMStringW& GetName(void) const { return m_Name; }
+ const CMStringW& GetFilename(void) const { return m_Filename; }
bool IsCustom(void) { return type == smcCustom; }
bool IsProto(void) { return type == smcProto || type == smcPhysProto || type == smcTransportProto || type == smcVirtualProto; }
@@ -275,8 +275,8 @@ public:
SmileyPackType* GetSmileyPack(void);
- void SetFilename(CMString& name) { m_Filename = name; }
- void SetDisplayName(CMString& name) { m_DisplayName = name; }
+ void SetFilename(CMStringW& name) { m_Filename = name; }
+ void SetDisplayName(CMStringW& name) { m_DisplayName = name; }
void SetVisible(bool vis) { visible = vis; }
void ClearFilename(void) { m_Filename.Empty(); }
@@ -298,20 +298,20 @@ private:
public:
void SetSmileyPackStore(SmileyPackListType *pSPS) { m_pSmileyPackStore = pSPS; }
- SmileyCategoryType* GetSmileyCategory(const CMString& name);
+ SmileyCategoryType* GetSmileyCategory(const CMStringW& name);
SmileyCategoryType* GetSmileyCategory(unsigned index);
- SmileyPackType* GetSmileyPack(CMString& name);
+ SmileyPackType* GetSmileyPack(CMStringW& name);
SmileyCategoryVectorType* GetSmileyCategoryList(void) { return &m_SmileyCategories; };
int NumberOfSmileyCategories(void) { return m_SmileyCategories.getCount(); }
- void AddCategory(const CMString& name, const CMString& displayName, SmcType typ,
- const CMString& defaultFilename = CMString(L"Smileys\\nova\\default.msl"));
- void AddAndLoad(const CMString& name, const CMString& displayName);
+ void AddCategory(const CMStringW& name, const CMStringW& displayName, SmcType typ,
+ const CMStringW& defaultFilename = CMStringW(L"Smileys\\nova\\default.msl"));
+ void AddAndLoad(const CMStringW& name, const CMStringW& displayName);
void AddAllProtocolsAsCategory(void);
- void AddAccountAsCategory(PROTOACCOUNT *acc, const CMString& defaultFile);
- void AddProtoAsCategory(char *acc, const CMString& defaultFile);
- void AddContactTransportAsCategory(MCONTACT hContact, const CMString& defaultFile);
+ void AddAccountAsCategory(PROTOACCOUNT *acc, const CMStringW& defaultFile);
+ void AddProtoAsCategory(char *acc, const CMStringW& defaultFile);
+ void AddContactTransportAsCategory(MCONTACT hContact, const CMStringW& defaultFile);
void ClearAndLoadAll(void);
void ClearAll(void)
diff --git a/plugins/SmileyAdd/src/smltool.cpp b/plugins/SmileyAdd/src/smltool.cpp
index 8db7726c1f..b2284343cd 100644
--- a/plugins/SmileyAdd/src/smltool.cpp
+++ b/plugins/SmileyAdd/src/smltool.cpp
@@ -196,7 +196,7 @@ void SmileyToolWindowType::InsertSmiley(void)
CallFunctionAsync(smileyServiceCallback, p);
}
else {
- CMString insertText;
+ CMStringW insertText;
if (opt.SurroundSmileyWithSpaces) insertText = ' ';
insertText += sml->GetInsertText();
@@ -235,7 +235,7 @@ void SmileyToolWindowType::SmileySel(int but)
ti.hwnd = m_hwndDialog;
ti.uId = (UINT_PTR)m_hwndDialog;
- const CMString &toolText = m_pSmileyPack->GetSmiley(m_CurrentHotTrack)->GetToolText();
+ const CMStringW &toolText = m_pSmileyPack->GetSmiley(m_CurrentHotTrack)->GetToolText();
ti.lpszText = const_cast<wchar_t*>(toolText.c_str());
SendMessage(m_hToolTip, TTM_UPDATETIPTEXT, 0, (LPARAM)&ti);
SendMessage(m_hToolTip, TTM_ACTIVATE, TRUE, 0);
diff --git a/plugins/SmileyAdd/src/stdafx.h b/plugins/SmileyAdd/src/stdafx.h
index 4599a5a6f3..bd91bfe5a5 100644
--- a/plugins/SmileyAdd/src/stdafx.h
+++ b/plugins/SmileyAdd/src/stdafx.h
@@ -120,15 +120,15 @@ int UpdateSrmmDlg(WPARAM wParam, LPARAM lParam);
//functions for general use (defined in general.cpp)
int CalculateTextHeight(HDC hdc, CHARFORMAT2 *chf);
-const wchar_t* GetImageExt(CMString &fname);
+const wchar_t* GetImageExt(CMStringW &fname);
MCONTACT DecodeMetaContact(MCONTACT hContact);
bool IsSmileyProto(char *proto);
HICON ImageList_GetIconFixed (HIMAGELIST himl, INT i, UINT fStyle);
-void pathToRelative(const CMString &pSrc, CMString &pOut);
-void pathToAbsolute(const CMString &pSrc, CMString &pOut);
+void pathToRelative(const CMStringW &pSrc, CMStringW &pOut);
+void pathToAbsolute(const CMStringW &pSrc, CMStringW &pOut);
bool InitGdiPlus(void);
void DestroyGdiPlus(void);
diff --git a/plugins/Spamotron/src/options.cpp b/plugins/Spamotron/src/options.cpp
index 6cdaf66110..59622de861 100644
--- a/plugins/Spamotron/src/options.cpp
+++ b/plugins/Spamotron/src/options.cpp
@@ -6,9 +6,9 @@ wchar_t* _getCOptS(wchar_t *buf, unsigned int buflen, MCONTACT hContact, const c
{
DBVARIANT dbv = {0};
wcsnset(buf, 0, buflen);
- if (db_get_ts(hContact, PLUGIN_NAME, option, &dbv) != 0)
+ if (db_get_ws(hContact, PLUGIN_NAME, option, &dbv) != 0)
wcsncpy(buf, def, min(buflen, mir_wstrlen(def)+1));
- else if (dbv.type == DBVT_TCHAR) {
+ else if (dbv.type == DBVT_WCHAR) {
wcsncpy(buf, dbv.ptszVal, min(buflen, mir_wstrlen(dbv.ptszVal)+1));
}
db_free(&dbv);
@@ -21,7 +21,7 @@ wchar_t* _getMOptS(wchar_t *buf, unsigned int buflen, const char* module, const
wcsnset(buf, 0, buflen);
if (db_get_s(NULL, module, option, &dbv) != 0)
wcsncpy(buf, def, min(buflen, mir_wstrlen(def)+1));
- else if (dbv.type == DBVT_TCHAR) {
+ else if (dbv.type == DBVT_WCHAR) {
wcsncpy(buf, dbv.ptszVal, min(buflen, mir_wstrlen(dbv.ptszVal)+1));
} else {
tmp = mir_a2u(dbv.pszVal);
diff --git a/plugins/Spamotron/src/stdafx.h b/plugins/Spamotron/src/stdafx.h
index 1be69abae9..0ec06bf479 100644
--- a/plugins/Spamotron/src/stdafx.h
+++ b/plugins/Spamotron/src/stdafx.h
@@ -42,7 +42,7 @@
wchar_t* _getCOptS(wchar_t *buf, unsigned int buflen, MCONTACT hContact, const char* option, const wchar_t *def);
#define _getOptS(a,b,c,d) _getCOptS(a, b, NULL, c, d)
-#define _setCOptTS(a,b,c) db_set_ts(a, PLUGIN_NAME, b, c)
+#define _setCOptTS(a,b,c) db_set_ws(a, PLUGIN_NAME, b, c)
#define _setCOptS(a,b,c) db_set_s(a, PLUGIN_NAME, b, c)
#define _setOptTS(a,b) _setCOptTS(NULL, a, b)
diff --git a/plugins/SpellChecker/src/autoreplace.cpp b/plugins/SpellChecker/src/autoreplace.cpp
index de4350eed3..5eb276939b 100644
--- a/plugins/SpellChecker/src/autoreplace.cpp
+++ b/plugins/SpellChecker/src/autoreplace.cpp
@@ -91,7 +91,7 @@ void AutoReplaceMap::writeAutoReplaceMap()
wchar_t *p = wcsrchr(m_filename, '\\');
if (p != NULL) {
*p = 0;
- CreateDirectoryTreeT(m_filename);
+ CreateDirectoryTreeW(m_filename);
*p = '\\';
}
diff --git a/plugins/SpellChecker/src/dictionary.cpp b/plugins/SpellChecker/src/dictionary.cpp
index 10f03b5c92..b5efcd4b29 100644
--- a/plugins/SpellChecker/src/dictionary.cpp
+++ b/plugins/SpellChecker/src/dictionary.cpp
@@ -390,7 +390,7 @@ protected:
void appendToCustomDict(const wchar_t *word)
{
- CreateDirectoryTreeT(userPath);
+ CreateDirectoryTreeW(userPath);
wchar_t filename[1024];
mir_snwprintf(filename, L"%s\\%s.cdic", userPath, language);
@@ -756,7 +756,7 @@ BOOL CALLBACK EnumLocalesProc(LPTSTR lpLocaleString)
else
mir_wstrncpy(localName, dict->english_name, _countof(localName));
- mir_wstrncpy(dict->localized_name, TranslateTS(localName), _countof(dict->localized_name));
+ mir_wstrncpy(dict->localized_name, TranslateW(localName), _countof(dict->localized_name));
}
if (dict->localized_name[0] != 0) {
@@ -783,7 +783,7 @@ void GetDictsInfo(LIST<Dictionary> &dicts)
char lang[128];
WideCharToMultiByte(CP_ACP, 0, dict->language, -1, lang, sizeof(lang), NULL, NULL);
- if (!db_get_ts(NULL, MODULE_NAME, lang, &dbv)) {
+ if (!db_get_ws(NULL, MODULE_NAME, lang, &dbv)) {
mir_wstrncpy(dict->localized_name, dbv.ptszVal, _countof(dict->localized_name));
db_free(&dbv);
}
@@ -791,7 +791,7 @@ void GetDictsInfo(LIST<Dictionary> &dicts)
if (dict->localized_name[0] == '\0') {
for (size_t j = 0; j < _countof(aditionalLanguages); j++) {
if (!mir_wstrcmp(aditionalLanguages[j].language, dict->language)) {
- mir_wstrncpy(dict->localized_name, TranslateTS(aditionalLanguages[j].localized_name), _countof(dict->localized_name));
+ mir_wstrncpy(dict->localized_name, TranslateW(aditionalLanguages[j].localized_name), _countof(dict->localized_name));
break;
}
}
diff --git a/plugins/SpellChecker/src/options.cpp b/plugins/SpellChecker/src/options.cpp
index 21309b391a..8f57cb2ed1 100644
--- a/plugins/SpellChecker/src/options.cpp
+++ b/plugins/SpellChecker/src/options.cpp
@@ -93,7 +93,7 @@ void LoadOptions()
}
DBVARIANT dbv;
- if (!db_get_ts(NULL, MODULE_NAME, "DefaultLanguage", &dbv)) {
+ if (!db_get_ws(NULL, MODULE_NAME, "DefaultLanguage", &dbv)) {
mir_wstrncpy(opts.default_language, dbv.ptszVal, _countof(opts.default_language));
db_free(&dbv);
}
@@ -212,7 +212,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
int sel = SendDlgItemMessage(hwndDlg, IDC_DEF_LANG, CB_GETCURSEL, 0, 0);
if (sel >= languages.getCount())
sel = 0;
- db_set_ts(NULL, MODULE_NAME, "DefaultLanguage",
+ db_set_ws(NULL, MODULE_NAME, "DefaultLanguage",
(wchar_t *)languages[sel]->language);
mir_wstrcpy(opts.default_language, languages[sel]->language);
}
diff --git a/plugins/SpellChecker/src/spellchecker.cpp b/plugins/SpellChecker/src/spellchecker.cpp
index f40a0a6ee3..48cc788d8f 100644
--- a/plugins/SpellChecker/src/spellchecker.cpp
+++ b/plugins/SpellChecker/src/spellchecker.cpp
@@ -74,7 +74,7 @@ static int IconsChanged(WPARAM, LPARAM)
StatusIconData sid = { sizeof(sid) };
sid.szModule = MODULE_NAME;
sid.hIconDisabled = IcoLib_GetIcon("spellchecker_disabled");
- sid.flags = MBF_HIDDEN | MBF_TCHAR;
+ sid.flags = MBF_HIDDEN | MBF_UNICODE;
for (int i = 0; i < languages.getCount(); i++) {
sid.dwId = i;
@@ -141,7 +141,7 @@ static int ModulesLoaded(WPARAM, LPARAM)
GetModuleFileName(hInst, path, MAX_PATH);
SKINICONDESC sid = { 0 };
- sid.flags = SIDF_ALL_TCHAR | SIDF_SORTED;
+ sid.flags = SIDF_ALL_UNICODE | SIDF_SORTED;
sid.section.w = LPGENW("Spell Checker") L"/" LPGENW("Flags");
// Get language flags
@@ -199,7 +199,7 @@ static int ModulesLoaded(WPARAM, LPARAM)
StatusIconData sid = { sizeof(sid) };
sid.szModule = MODULE_NAME;
sid.hIconDisabled = IcoLib_GetIcon("spellchecker_disabled");
- sid.flags = MBF_TCHAR | MBF_HIDDEN;
+ sid.flags = MBF_UNICODE | MBF_HIDDEN;
for (int i = 0; i < languages.getCount(); i++) {
sid.dwId = i;
diff --git a/plugins/SpellChecker/src/utils.cpp b/plugins/SpellChecker/src/utils.cpp
index a3cab0e333..3c5a4a65e8 100644
--- a/plugins/SpellChecker/src/utils.cpp
+++ b/plugins/SpellChecker/src/utils.cpp
@@ -717,7 +717,7 @@ int GetClosestLanguage(wchar_t *lang_name)
void GetUserProtoLanguageSetting(Dialog *dlg, MCONTACT hContact, char *group, char *setting, BOOL isProtocol = TRUE)
{
DBVARIANT dbv = { 0 };
- dbv.type = DBVT_TCHAR;
+ dbv.type = DBVT_WCHAR;
int caps = (isProtocol ? CallProtoService(group, PS_GETCAPS, PFLAGNUM_4, 0) : 0);
if (caps & PF4_INFOSETTINGSVC) {
@@ -729,11 +729,11 @@ void GetUserProtoLanguageSetting(Dialog *dlg, MCONTACT hContact, char *group, ch
return;
}
else {
- if (db_get_ts(hContact, group, setting, &dbv))
+ if (db_get_ws(hContact, group, setting, &dbv))
return;
}
- if (dbv.type == DBVT_TCHAR && dbv.ptszVal != NULL) {
+ if (dbv.type == DBVT_WCHAR && dbv.ptszVal != NULL) {
wchar_t *lang = dbv.ptszVal;
for (int i = 0; i < languages.getCount(); i++) {
@@ -781,18 +781,18 @@ void GetContactLanguage(Dialog *dlg)
dlg->lang_name[0] = '\0';
if (dlg->hContact == NULL) {
- if (!db_get_ts(NULL, MODULE_NAME, dlg->name, &dbv)) {
+ if (!db_get_ws(NULL, MODULE_NAME, dlg->name, &dbv)) {
mir_wstrncpy(dlg->lang_name, dbv.ptszVal, _countof(dlg->lang_name));
db_free(&dbv);
}
}
else {
- if (!db_get_ts(dlg->hContact, MODULE_NAME, "TalkLanguage", &dbv)) {
+ if (!db_get_ws(dlg->hContact, MODULE_NAME, "TalkLanguage", &dbv)) {
mir_wstrncpy(dlg->lang_name, dbv.ptszVal, _countof(dlg->lang_name));
db_free(&dbv);
}
- if (dlg->lang_name[0] == '\0' && !db_get_ts(dlg->hContact, "eSpeak", "TalkLanguage", &dbv)) {
+ if (dlg->lang_name[0] == '\0' && !db_get_ws(dlg->hContact, "eSpeak", "TalkLanguage", &dbv)) {
mir_wstrncpy(dlg->lang_name, dbv.ptszVal, _countof(dlg->lang_name));
db_free(&dbv);
}
@@ -801,12 +801,12 @@ void GetContactLanguage(Dialog *dlg)
if (dlg->lang_name[0] == '\0') {
MCONTACT hMetaContact = db_mc_getMeta(dlg->hContact);
if (hMetaContact != NULL) {
- if (!db_get_ts(hMetaContact, MODULE_NAME, "TalkLanguage", &dbv)) {
+ if (!db_get_ws(hMetaContact, MODULE_NAME, "TalkLanguage", &dbv)) {
mir_wstrncpy(dlg->lang_name, dbv.ptszVal, _countof(dlg->lang_name));
db_free(&dbv);
}
- if (dlg->lang_name[0] == '\0' && !db_get_ts(hMetaContact, "eSpeak", "TalkLanguage", &dbv)) {
+ if (dlg->lang_name[0] == '\0' && !db_get_ws(hMetaContact, "eSpeak", "TalkLanguage", &dbv)) {
mir_wstrncpy(dlg->lang_name, dbv.ptszVal, _countof(dlg->lang_name));
db_free(&dbv);
}
@@ -1216,10 +1216,10 @@ BOOL HandleMenuSelection(Dialog *dlg, unsigned selection)
SetNoUnderline(dlg);
if (dlg->hContact == NULL)
- db_set_ts(NULL, MODULE_NAME, dlg->name,
+ db_set_ws(NULL, MODULE_NAME, dlg->name,
languages[selection - LANGUAGE_MENU_ID_BASE]->language);
else
- db_set_ts(dlg->hContact, MODULE_NAME, "TalkLanguage",
+ db_set_ws(dlg->hContact, MODULE_NAME, "TalkLanguage",
languages[selection - LANGUAGE_MENU_ID_BASE]->language);
GetContactLanguage(dlg);
diff --git a/plugins/SplashScreen/src/bitmap_funcs.cpp b/plugins/SplashScreen/src/bitmap_funcs.cpp
index c0d1531c17..0c45210801 100644
--- a/plugins/SplashScreen/src/bitmap_funcs.cpp
+++ b/plugins/SplashScreen/src/bitmap_funcs.cpp
@@ -131,7 +131,7 @@ bool MyBitmap::loadFromFile(wchar_t *fn)
{
if (bits) free();
- HBITMAP hBmpLoaded = (HBITMAP)CallService(MS_IMG_LOAD, (WPARAM)fn, IMGL_TCHAR);
+ HBITMAP hBmpLoaded = (HBITMAP)CallService(MS_IMG_LOAD, (WPARAM)fn, IMGL_WCHAR);
if (!hBmpLoaded) {
#ifdef _DEBUG
logMessage(L"MyBitmap::loadFromFile", L"Bitmap load failed");
diff --git a/plugins/SplashScreen/src/main.cpp b/plugins/SplashScreen/src/main.cpp
index 9fa6d0263d..c5eb3608f9 100644
--- a/plugins/SplashScreen/src/main.cpp
+++ b/plugins/SplashScreen/src/main.cpp
@@ -83,14 +83,14 @@ void SplashMain()
if (bstartup & (options.active == 1)) {
DBVARIANT dbv = { 0 };
- if (!db_get_ts(NULL, MODNAME, "VersionPrefix", &dbv)) {
+ if (!db_get_ws(NULL, MODNAME, "VersionPrefix", &dbv)) {
mir_wstrcpy(szPrefix, dbv.ptszVal);
db_free(&dbv);
}
else
mir_wstrcpy(szPrefix, L"");
- if (!db_get_ts(NULL, MODNAME, "Path", &dbv)) {
+ if (!db_get_ws(NULL, MODNAME, "Path", &dbv)) {
mir_wstrcpy(inBuf, dbv.ptszVal);
db_free(&dbv);
}
@@ -107,7 +107,7 @@ void SplashMain()
else
mir_wstrcpy(szSplashFile, inBuf);
- if (!db_get_ts(NULL, MODNAME, "Sound", &dbv)) {
+ if (!db_get_ws(NULL, MODNAME, "Sound", &dbv)) {
mir_wstrcpy(inBuf, dbv.ptszVal);
db_free(&dbv);
}
diff --git a/plugins/SplashScreen/src/options.cpp b/plugins/SplashScreen/src/options.cpp
index dce6380576..49aed98c8e 100644
--- a/plugins/SplashScreen/src/options.cpp
+++ b/plugins/SplashScreen/src/options.cpp
@@ -68,7 +68,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
ReadDbConfig();
wchar_t inBuf[80];
DBVARIANT dbv = { 0 };
- if (!db_get_ts(NULL, MODNAME, "Path", &dbv)) {
+ if (!db_get_ws(NULL, MODNAME, "Path", &dbv)) {
mir_wstrcpy(inBuf, dbv.ptszVal);
db_free(&dbv);
}
@@ -76,7 +76,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
mir_wstrcpy(inBuf, L"splash\\splash.png");
SetDlgItemText(hwndDlg, IDC_SPLASHPATH, inBuf);
- if (!db_get_ts(NULL, MODNAME, "Sound", &dbv)) {
+ if (!db_get_ws(NULL, MODNAME, "Sound", &dbv)) {
mir_wstrcpy(inBuf, dbv.ptszVal);
db_free(&dbv);
}
@@ -84,7 +84,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
mir_wstrcpy(inBuf, L"sounds\\startup.wav");
SetDlgItemText(hwndDlg, IDC_SNDPATH, inBuf);
- if (!db_get_ts(NULL, MODNAME, "VersionPrefix", &dbv)) {
+ if (!db_get_ws(NULL, MODNAME, "VersionPrefix", &dbv)) {
mir_wstrcpy(inBuf, dbv.ptszVal);
db_free(&dbv);
}
@@ -288,13 +288,13 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
wchar_t tmp[MAX_PATH];
GetDlgItemText(hwndDlg, IDC_SPLASHPATH, tmp, _countof(tmp));
- db_set_ts(NULL, MODNAME, "Path", tmp);
+ db_set_ws(NULL, MODNAME, "Path", tmp);
GetDlgItemText(hwndDlg, IDC_SNDPATH, tmp, _countof(tmp));
- db_set_ts(NULL, MODNAME, "Sound", tmp);
+ db_set_ws(NULL, MODNAME, "Sound", tmp);
GetDlgItemText(hwndDlg, IDC_VERSIONPREFIX, tmp, _countof(tmp));
- db_set_ts(NULL, MODNAME, "VersionPrefix", tmp);
+ db_set_ws(NULL, MODNAME, "VersionPrefix", tmp);
mir_wstrcpy(szPrefix, tmp);
GetDlgItemText(hwndDlg, IDC_SHOWTIME, tmp, _countof(tmp));
diff --git a/plugins/StatusChange/src/main.cpp b/plugins/StatusChange/src/main.cpp
index e9d9b17458..55e7a1ae94 100644
--- a/plugins/StatusChange/src/main.cpp
+++ b/plugins/StatusChange/src/main.cpp
@@ -317,7 +317,7 @@ int StatusChangeOptInit(WPARAM wParam, LPARAM)
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS);
odp.pwszTitle = LPGENW("Status Change");
odp.pwszGroup = LPGENW("Status");
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
odp.pfnDlgProc = DlgProcStatusChangeOpts;
Options_AddPage(wParam, &odp);
return 0;
diff --git a/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp b/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp
index 1cb68c1f1d..021674ab22 100644
--- a/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp
+++ b/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp
@@ -241,7 +241,7 @@ static int changeState(TAAAProtoSetting &setting, STATES newState)
if (db_get_b(NULL, MODULENAME, StatusModeToDbSetting(setting.status, SETTING_MSGCUSTOM), FALSE)) {
DBVARIANT dbv;
- if (!db_get_ts(NULL, MODULENAME, StatusModeToDbSetting(setting.status, SETTING_STATUSMSG), &dbv)) {
+ if (!db_get_ws(NULL, MODULENAME, StatusModeToDbSetting(setting.status, SETTING_STATUSMSG), &dbv)) {
setting.szMsg = wcsdup(dbv.ptszVal);
db_free(&dbv);
}
diff --git a/plugins/StatusPlugins/AdvancedAutoAway/msgoptions.cpp b/plugins/StatusPlugins/AdvancedAutoAway/msgoptions.cpp
index 1941273470..9435d0db54 100644
--- a/plugins/StatusPlugins/AdvancedAutoAway/msgoptions.cpp
+++ b/plugins/StatusPlugins/AdvancedAutoAway/msgoptions.cpp
@@ -127,7 +127,7 @@ INT_PTR CALLBACK DlgProcAutoAwayMsgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
if (settings[i]->msg != NULL)
SetDlgItemTextA(hwndDlg, IDC_STATUSMSG, settings[i]->msg);
else {
- ptrW msg((wchar_t*)CallService(MS_AWAYMSG_GETSTATUSMSGT, settings[i]->status, 0));
+ ptrW msg((wchar_t*)CallService(MS_AWAYMSG_GETSTATUSMSGW, settings[i]->status, 0));
SetDlgItemText(hwndDlg, IDC_STATUSMSG, (msg != NULL) ? msg : L"");
}
diff --git a/plugins/StatusPlugins/AdvancedAutoAway/options.cpp b/plugins/StatusPlugins/AdvancedAutoAway/options.cpp
index 58e2dba951..02516f3e9e 100644
--- a/plugins/StatusPlugins/AdvancedAutoAway/options.cpp
+++ b/plugins/StatusPlugins/AdvancedAutoAway/options.cpp
@@ -212,7 +212,7 @@ static INT_PTR CALLBACK DlgProcAutoAwayRulesOpts(HWND hwndDlg, UINT msg, WPARAM
SendDlgItemMessage(hwndDlg, IDC_LV2STATUS, CB_SETITEMDATA, item, (LPARAM)statusModeList[i]);
if (statusModeList[i] == setting->lv1Status) {
SendDlgItemMessage(hwndDlg, IDC_LV1STATUS, CB_SETCURSEL, (WPARAM)item, 0);
- SetDlgItemText(hwndDlg, IDC_SETNASTR, CMString(FORMAT, TranslateT("minutes of %s mode"), statusMode));
+ SetDlgItemText(hwndDlg, IDC_SETNASTR, CMStringW(FORMAT, TranslateT("minutes of %s mode"), statusMode));
}
if (statusModeList[i] == setting->lv2Status)
SendDlgItemMessage(hwndDlg, IDC_LV2STATUS, CB_SETCURSEL, (WPARAM)item, 0);
@@ -227,7 +227,7 @@ static INT_PTR CALLBACK DlgProcAutoAwayRulesOpts(HWND hwndDlg, UINT msg, WPARAM
SendMessage(GetParent(hwndDlg),PSM_CHANGED,0,0);
setting->lv1Status = (int)SendDlgItemMessage(hwndDlg, IDC_LV1STATUS, CB_GETITEMDATA, SendDlgItemMessage(hwndDlg, IDC_LV1STATUS, CB_GETCURSEL, 0, 0), 0);
- SetDlgItemText(hwndDlg, IDC_SETNASTR, CMString(FORMAT, TranslateT("minutes of %s mode"), pcli->pfnGetStatusModeDescription(setting->lv1Status, 0)));
+ SetDlgItemText(hwndDlg, IDC_SETNASTR, CMStringW(FORMAT, TranslateT("minutes of %s mode"), pcli->pfnGetStatusModeDescription(setting->lv1Status, 0)));
break;
case IDC_LV2STATUS:
diff --git a/plugins/StatusPlugins/KeepStatus/options.cpp b/plugins/StatusPlugins/KeepStatus/options.cpp
index 147fcf0b5d..3a7328a2e3 100644
--- a/plugins/StatusPlugins/KeepStatus/options.cpp
+++ b/plugins/StatusPlugins/KeepStatus/options.cpp
@@ -570,7 +570,7 @@ int OptionsInit(WPARAM wparam, LPARAM)
odp.hInstance = hInst;
odp.pwszGroup = LPGENW("Status");
odp.pwszTitle = LPGENW("KeepStatus");
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_TABS);
odp.pfnDlgProc = DlgProcKsTabs;
Options_AddPage(wparam, &odp);
@@ -584,7 +584,7 @@ int OptionsInit(WPARAM wparam, LPARAM)
odp.pszTemplate = MAKEINTRESOURCEA(IDD_PUOPT_KEEPSTATUS);
odp.pwszTitle = LPGENW("KeepStatus");
odp.pfnDlgProc = PopupOptDlgProc;
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
Options_AddPage(wparam, &odp);
}
return 0;
diff --git a/plugins/StatusPlugins/StartupStatus/options.cpp b/plugins/StatusPlugins/StartupStatus/options.cpp
index 31d8324e22..c53573bbf4 100644
--- a/plugins/StatusPlugins/StartupStatus/options.cpp
+++ b/plugins/StatusPlugins/StartupStatus/options.cpp
@@ -133,7 +133,7 @@ static wchar_t* GetLinkDescription(TSettingsList& protoSettings)
if ( protoSettings.getCount() == 0 )
return NULL;
- CMString result(SHORTCUT_DESC);
+ CMStringW result(SHORTCUT_DESC);
for (int i=0; i < protoSettings.getCount(); i++) {
TSSSetting &p = protoSettings[i];
@@ -538,7 +538,7 @@ static INT_PTR CALLBACK StatusProfilesOptDlgProc(HWND hwndDlg,UINT msg,WPARAM wP
if ( ar[j].szMsg != NULL)
ar[j].szMsg = wcsdup( ar[j].szMsg );
- ppo->tszName = db_get_tsa(NULL, MODULENAME, OptName(i, SETTING_PROFILENAME));
+ ppo->tszName = db_get_wsa(NULL, MODULENAME, OptName(i, SETTING_PROFILENAME));
if (ppo->tszName == NULL) {
if (i == defProfile)
ppo->tszName = mir_wstrdup( TranslateT("default"));
@@ -825,13 +825,13 @@ static INT_PTR CALLBACK StatusProfilesOptDlgProc(HWND hwndDlg,UINT msg,WPARAM wP
db_set_b(NULL, MODULENAME, OptName(i, SETTING_INSUBMENU), po.inSubMenu);
db_set_b(NULL, MODULENAME, OptName(i, SETTING_REGHOTKEY), po.regHotkey);
db_set_w(NULL, MODULENAME, OptName(i, SETTING_HOTKEY), po.hotKey);
- db_set_ts(NULL, MODULENAME, OptName(i, SETTING_PROFILENAME), po.tszName);
+ db_set_ws(NULL, MODULENAME, OptName(i, SETTING_PROFILENAME), po.tszName);
TSettingsList& ar = *po.ps;
for (int j=0; j < ar.getCount(); j++) {
if ( ar[j].szMsg != NULL ) {
mir_snprintf(setting, "%s_%s", ar[j].szName, SETTING_PROFILE_STSMSG);
- db_set_ts(NULL, MODULENAME, OptName(i, setting), ar[j].szMsg);
+ db_set_ws(NULL, MODULENAME, OptName(i, setting), ar[j].szMsg);
}
db_set_w(NULL, MODULENAME, OptName(i, ar[j].szName), ar[j].status);
}
diff --git a/plugins/StatusPlugins/StartupStatus/profiles.cpp b/plugins/StatusPlugins/StartupStatus/profiles.cpp
index 6cb631e3cb..03687e5834 100644
--- a/plugins/StatusPlugins/StartupStatus/profiles.cpp
+++ b/plugins/StatusPlugins/StartupStatus/profiles.cpp
@@ -61,7 +61,7 @@ static int CreateMainMenuItems(WPARAM, LPARAM)
{
CMenuItem mi;
mi.position = 2000100000;
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
mcount = 0;
int count = GetProfileCount(0, 0);
for (int i = 0; i < count && mcount < MAX_MMITEMS; i++) {
@@ -109,7 +109,7 @@ INT_PTR GetProfileName(WPARAM wParam, LPARAM lParam)
DBVARIANT dbv;
char setting[80];
mir_snprintf(setting, "%d_%s", profile, SETTING_PROFILENAME);
- if (db_get_ts(NULL, MODULENAME, setting, &dbv))
+ if (db_get_ws(NULL, MODULENAME, setting, &dbv))
return -1;
wcsncpy(buf, dbv.ptszVal, 128 - 1); buf[127] = 0;
@@ -138,7 +138,7 @@ wchar_t *GetStatusMessage(int profile, char *szProto)
for (int i = 0; i < pceCount; i++) {
if ((pce[i].profile == profile) && (!mir_strcmp(pce[i].szProto, szProto))) {
mir_snprintf(dbSetting, "%d_%s_%s", profile, szProto, SETTING_PROFILE_STSMSG);
- if (!db_get_ts(NULL, MODULENAME, dbSetting, &dbv)) { // reload from db
+ if (!db_get_ws(NULL, MODULENAME, dbSetting, &dbv)) { // reload from db
pce[i].msg = (wchar_t*)realloc(pce[i].msg, sizeof(wchar_t)*(mir_wstrlen(dbv.ptszVal) + 1));
if (pce[i].msg != NULL) {
mir_wstrcpy(pce[i].msg, dbv.ptszVal);
@@ -162,7 +162,7 @@ wchar_t *GetStatusMessage(int profile, char *szProto)
pce[pceCount].szProto = _strdup(szProto);
pce[pceCount].msg = NULL;
mir_snprintf(dbSetting, "%d_%s_%s", profile, szProto, SETTING_PROFILE_STSMSG);
- if (!db_get_ts(NULL, MODULENAME, dbSetting, &dbv)) {
+ if (!db_get_ws(NULL, MODULENAME, dbSetting, &dbv)) {
pce[pceCount].msg = wcsdup(dbv.ptszVal);
db_free(&dbv);
}
diff --git a/plugins/StatusPlugins/StartupStatus/startupstatus.cpp b/plugins/StatusPlugins/StartupStatus/startupstatus.cpp
index 13d708f0de..959d0c71de 100644
--- a/plugins/StatusPlugins/StartupStatus/startupstatus.cpp
+++ b/plugins/StatusPlugins/StartupStatus/startupstatus.cpp
@@ -172,7 +172,7 @@ static void SetLastStatusMessages(TSettingsList &ps)
mir_snprintf(dbSetting, "%s%s", PREFIX_LASTMSG, ps[i].szName);
DBVARIANT dbv;
- if (ps[i].szMsg == NULL && !db_get_ts(NULL, MODULENAME, dbSetting, &dbv)) {
+ if (ps[i].szMsg == NULL && !db_get_ws(NULL, MODULENAME, dbSetting, &dbv)) {
ps[i].szMsg = wcsdup(dbv.ptszVal); // remember this won't be freed
db_free(&dbv);
}
@@ -325,7 +325,7 @@ static int OnOkToExit(WPARAM, LPARAM)
CallService(MS_NAS_GETSTATE, (WPARAM)&npi, 1);
}
if (npi.szMsg != NULL) {
- db_set_ts(NULL, MODULENAME, lastMsg, npi.tszMsg);
+ db_set_ws(NULL, MODULENAME, lastMsg, npi.tszMsg);
mir_free(npi.tszMsg);
}
}
diff --git a/plugins/StatusPlugins/commonstatus.cpp b/plugins/StatusPlugins/commonstatus.cpp
index c04f8ab085..621f5f372c 100644
--- a/plugins/StatusPlugins/commonstatus.cpp
+++ b/plugins/StatusPlugins/commonstatus.cpp
@@ -120,7 +120,7 @@ wchar_t* GetDefaultStatusMessage(PROTOCOLSETTINGEX *ps, int newstatus)
return mir_wstrdup(ps->szMsg);
}
- wchar_t *tMsg = (wchar_t*)CallService(MS_AWAYMSG_GETSTATUSMSGT, newstatus, (LPARAM)ps->szName);
+ wchar_t *tMsg = (wchar_t*)CallService(MS_AWAYMSG_GETSTATUSMSGW, newstatus, (LPARAM)ps->szName);
log_debugA("CommonStatus: Status message retrieved from general awaysys: %S", tMsg);
return tMsg;
}
diff --git a/plugins/StopSpamMod/src/options.cpp b/plugins/StopSpamMod/src/options.cpp
index 8cc6139b5c..145f3c9352 100755
--- a/plugins/StopSpamMod/src/options.cpp
+++ b/plugins/StopSpamMod/src/options.cpp
@@ -322,7 +322,7 @@ MIRANDA_HOOK_EVENT(ME_OPT_INITIALISE, w, l)
odp.pwszTitle = LPGENW("StopSpam");
odp.position = -1;
odp.hInstance = hInst;
- odp.flags = ODPF_TCHAR;
+ odp.flags = ODPF_UNICODE;
odp.pwszTab = LPGENW("General");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_MAIN);
diff --git a/plugins/StopSpamMod/src/utilities.cpp b/plugins/StopSpamMod/src/utilities.cpp
index bb2086b078..5f3a810b60 100755
--- a/plugins/StopSpamMod/src/utilities.cpp
+++ b/plugins/StopSpamMod/src/utilities.cpp
@@ -21,9 +21,9 @@ wstring DBGetContactSettingStringPAN(MCONTACT hContact, char const * szModule, c
{
DBVARIANT dbv;
//if(db_get(hContact, szModule, szSetting, &dbv))
- if (db_get_ts(hContact, szModule, szSetting, &dbv))
+ if (db_get_ws(hContact, szModule, szSetting, &dbv))
return errorValue;
- // if(DBVT_TCHAR == dbv.type )
+ // if(DBVT_WCHAR == dbv.type )
errorValue = dbv.ptszVal;
db_free(&dbv);
return errorValue;
@@ -206,7 +206,7 @@ void LogSpamToFile(MCONTACT hContact, wstring message)
if (hStopSpamLogDirH)
FoldersGetCustomPathT(hStopSpamLogDirH, pszName, MAX_PATH, L"");
else
- mir_wstrncpy(pszName, VARST(L"%miranda_logpath%"), _countof(pszName));
+ mir_wstrncpy(pszName, VARSW(L"%miranda_logpath%"), _countof(pszName));
wstring filename = pszName;
filename += L"\\stopspam_mod.log";
diff --git a/plugins/StopSpamPlus/src/services.cpp b/plugins/StopSpamPlus/src/services.cpp
index 3d022a2ba8..54c0019486 100644
--- a/plugins/StopSpamPlus/src/services.cpp
+++ b/plugins/StopSpamPlus/src/services.cpp
@@ -25,7 +25,7 @@ INT_PTR RemoveTempContacts(WPARAM, LPARAM lParam)
{
for (MCONTACT hContact = db_find_first(); hContact;) {
MCONTACT hNext = db_find_next(hContact);
- ptrW szGroup(db_get_tsa(hContact, "CList", "Group"));
+ ptrW szGroup(db_get_wsa(hContact, "CList", "Group"));
if (db_get_b(hContact, "CList", "NotOnList", 0) || (szGroup != NULL && (wcsstr(szGroup, L"Not In List") || wcsstr(szGroup, TranslateT("Not In List"))))) {
char *szProto = GetContactProto(hContact);
diff --git a/plugins/StopSpamPlus/src/settings.cpp b/plugins/StopSpamPlus/src/settings.cpp
index 8e6e3cbbc6..d8f6e85ecd 100644
--- a/plugins/StopSpamPlus/src/settings.cpp
+++ b/plugins/StopSpamPlus/src/settings.cpp
@@ -4,7 +4,7 @@
tstring db_usage::DBGetPluginSetting(std::string const &name, tstring const &defValue)
{
DBVARIANT dbv;
- if (db_get_ts(NULL, pluginName, name.c_str(), &dbv))
+ if (db_get_ws(NULL, pluginName, name.c_str(), &dbv))
return defValue;
tstring value = dbv.ptszVal;
db_free(&dbv);
@@ -36,7 +36,7 @@ DWORD db_usage::DBGetPluginSetting(std::string const &name, DWORD const &defValu
//writting to database--------------
void db_usage::DBSetPluginSetting(std::string const &name, tstring const &value)
{
- db_set_ts(NULL, pluginName, name.c_str(), value.c_str());
+ db_set_ws(NULL, pluginName, name.c_str(), value.c_str());
}
diff --git a/plugins/StopSpamPlus/src/settings.h b/plugins/StopSpamPlus/src/settings.h
index 22c005649e..8c364569b2 100644
--- a/plugins/StopSpamPlus/src/settings.h
+++ b/plugins/StopSpamPlus/src/settings.h
@@ -61,13 +61,13 @@ public:
db_setting<bool> RemTmpAll;
db_setting<bool> HistLog;
- Settings():Question("Question",TranslateTS(L"Spammers made me to install small anti-spam system you are now speaking with. "
+ Settings():Question("Question",TranslateW(L"Spammers made me to install small anti-spam system you are now speaking with. "
L"Please reply \"nospam\" without quotes and spaces if you want to contact me.\r\n"
L"Âíèìàíèå! Àíòèñïàì çàùèòà. Îòâåòüòå \"nospam\" áåç êàâû÷åê è ïðîáåëîâ, åñëè õîòèòå ñâÿçàòüñÿ ñî ìíîé."))
- ,AuthRepl("AuthReply",TranslateTS(L"StopSpam: send a message and reply to a anti-spam bot question.\r\n"
+ ,AuthRepl("AuthReply",TranslateW(L"StopSpam: send a message and reply to a anti-spam bot question.\r\n"
L"Àíòèñïàì: îòïðàâüòå ñîîáùåíèå è îòâåòüòå íà âîïðîñ àíòèñïàì ñèñòåìû."))
,Answer("Answer",L"nospam")
- ,Congratulation("Congratulation",TranslateTS(L"Congratulations! You just passed human/robot test. Now you can write me a message.\r\n"
+ ,Congratulation("Congratulation",TranslateW(L"Congratulations! You just passed human/robot test. Now you can write me a message.\r\n"
L"Ïîçäðàâëÿþ! Âû ïðîøëè àíòèñïàì ïðîâåðêó. Òåïåðü âû ìîæåòå ïèñàòü ìíå."))
,DisabledProtoList("DisabledProtoList","MetaContacts RSSNews")
,InfTalkProtection("InfTalkProtection", 1)
diff --git a/plugins/StopSpamPlus/src/stopspam.cpp b/plugins/StopSpamPlus/src/stopspam.cpp
index ccd407d3d5..d7c8a36953 100644
--- a/plugins/StopSpamPlus/src/stopspam.cpp
+++ b/plugins/StopSpamPlus/src/stopspam.cpp
@@ -52,7 +52,7 @@ extern "C" int __declspec(dllexport) Load(void)
CMenuItem mi;
SET_UID(mi, 0xf2164e17, 0xa4c1, 0x4b07, 0xae, 0x81, 0x9e, 0xae, 0x7f, 0xa2, 0x55, 0x13);
mi.position = -0x7FFFFFFF;
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
mi.hIcolibItem = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
mi.name.w = LPGENW("Remove Temporary Contacts");
mi.pszService = pluginName"/RemoveTempContacts";
diff --git a/plugins/TabSRMM/src/buttonsbar.cpp b/plugins/TabSRMM/src/buttonsbar.cpp
index b7116265d1..f85ad9bed1 100644
--- a/plugins/TabSRMM/src/buttonsbar.cpp
+++ b/plugins/TabSRMM/src/buttonsbar.cpp
@@ -233,7 +233,7 @@ static INT_PTR CB_SetButtonState(WPARAM wParam, LPARAM lParam)
if (bbdi->hIcon)
SendDlgItemMessage(hwndDlg, tempCID, BM_SETIMAGE, IMAGE_ICON, (LPARAM)IcoLib_GetIconByHandle(bbdi->hIcon));
if (bbdi->pszTooltip)
- SendDlgItemMessage(hwndDlg, tempCID, BUTTONADDTOOLTIP, (WPARAM)bbdi->ptszTooltip, (bbdi->bbbFlags & BBBF_ANSITOOLTIP) ? 0 : BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, tempCID, BUTTONADDTOOLTIP, (WPARAM)bbdi->ptszTooltip, (bbdi->bbbFlags & BBBF_ANSITOOLTIP) ? 0 : BATF_UNICODE);
if (bbdi->bbbFlags) {
Utils::showDlgControl(hwndDlg, tempCID, (bbdi->bbbFlags & BBSF_HIDDEN) ? SW_HIDE : SW_SHOW);
Utils::enableDlgControl(hwndDlg, tempCID, !(bbdi->bbbFlags & BBSF_DISABLED));
@@ -463,7 +463,7 @@ static int BuildMenuObjectsTree(HWND hToolBarTree)
tvis.item.iImage = tvis.item.iSelectedImage = 0;
}
else {
- tvis.item.pszText = TranslateTS(cbd->m_ptszTooltip);
+ tvis.item.pszText = TranslateW(cbd->m_ptszTooltip);
iImage = ImageList_AddIcon(himgl, IcoLib_GetIconByHandle(cbd->m_hIcon));
tvis.item.iImage = tvis.item.iSelectedImage = iImage;
}
@@ -491,7 +491,7 @@ static int BuildMenuObjectsTree(HWND hToolBarTree)
tvis.item.iImage = tvis.item.iSelectedImage = -1;
}
else {
- tvis.item.pszText = TranslateTS(cbd->m_ptszTooltip);
+ tvis.item.pszText = TranslateW(cbd->m_ptszTooltip);
iImage = ImageList_AddIcon(himgl, IcoLib_GetIconByHandle(cbd->m_hIcon));
tvis.item.iImage = tvis.item.iSelectedImage = iImage;
}
@@ -803,7 +803,7 @@ void CustomButtonData::Accustom(HWND hwndBtn, TWindowData *dat)
if (m_hIcon)
SendMessage(hwndBtn, BM_SETIMAGE, IMAGE_ICON, (LPARAM)IcoLib_GetIconByHandle(m_hIcon));
if (m_ptszTooltip)
- SendMessage(hwndBtn, BUTTONADDTOOLTIP, (WPARAM)TranslateTS(m_ptszTooltip), BATF_TCHAR);
+ SendMessage(hwndBtn, BUTTONADDTOOLTIP, (WPARAM)TranslateW(m_ptszTooltip), BATF_UNICODE);
SendMessage(hwndBtn, BUTTONSETCONTAINER, (LPARAM)dat->pContainer, 0);
SendMessage(hwndBtn, BUTTONSETASTOOLBARBUTTON, TRUE, 0);
@@ -1403,7 +1403,7 @@ void CB_ChangeButton(HWND hwndDlg, TWindowData *dat, CustomButtonData *cbd)
if (cbd->m_hIcon)
SendMessage(hwndBtn, BM_SETIMAGE, IMAGE_ICON, (LPARAM)IcoLib_GetIconByHandle(cbd->m_hIcon));
if (cbd->m_ptszTooltip)
- SendMessage(hwndBtn, BUTTONADDTOOLTIP, (WPARAM)cbd->m_ptszTooltip, BATF_TCHAR);
+ SendMessage(hwndBtn, BUTTONADDTOOLTIP, (WPARAM)cbd->m_ptszTooltip, BATF_UNICODE);
SendMessage(hwndBtn, BUTTONSETCONTAINER, (LPARAM)dat->pContainer, 0);
SetWindowTextA(hwndBtn, cbd->m_pszModuleName);
}
diff --git a/plugins/TabSRMM/src/chat/log.cpp b/plugins/TabSRMM/src/chat/log.cpp
index 3cec3e01bb..fc0a3a3169 100644
--- a/plugins/TabSRMM/src/chat/log.cpp
+++ b/plugins/TabSRMM/src/chat/log.cpp
@@ -795,7 +795,7 @@ static char* Log_CreateRTF(LOGSTREAMDATA *streamData)
if (g_Settings.bLogClassicIndicators)
str.Append(pszIndicator);
- CMString pszTemp(lin->bIsMe ? g_Settings.pszOutgoingNick : g_Settings.pszIncomingNick);
+ CMStringW pszTemp(lin->bIsMe ? g_Settings.pszOutgoingNick : g_Settings.pszIncomingNick);
pszTemp.Replace(L"%n", L"%s");
if (!lin->bIsMe) {
if (g_Settings.bClickableNicks)
diff --git a/plugins/TabSRMM/src/chat/muchighlight.cpp b/plugins/TabSRMM/src/chat/muchighlight.cpp
index e6a00d5784..441183f454 100644
--- a/plugins/TabSRMM/src/chat/muchighlight.cpp
+++ b/plugins/TabSRMM/src/chat/muchighlight.cpp
@@ -49,13 +49,13 @@ void CMUCHighlight::init()
m_fInitialized = true;
- if (0 == db_get_ts(0, CHAT_MODULE, "HighlightWords", &dbv)) {
+ if (0 == db_get_ws(0, CHAT_MODULE, "HighlightWords", &dbv)) {
m_TextPatternString = dbv.ptszVal;
_wsetlocale(LC_ALL, L"");
wcslwr(m_TextPatternString);
}
- if (0 == db_get_ts(0, CHAT_MODULE, "HighlightNames", &dbv))
+ if (0 == db_get_ws(0, CHAT_MODULE, "HighlightNames", &dbv))
m_NickPatternString = dbv.ptszVal;
m_dwFlags = M.GetByte(CHAT_MODULE, "HighlightEnabled", MATCH_TEXT);
@@ -188,12 +188,12 @@ INT_PTR CALLBACK CMUCHighlight::dlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L
TranslateDialogDefault(hwndDlg);
{
DBVARIANT dbv = { 0 };
- if (!db_get_ts(0, CHAT_MODULE, "HighlightWords", &dbv)) {
+ if (!db_get_ws(0, CHAT_MODULE, "HighlightWords", &dbv)) {
::SetDlgItemText(hwndDlg, IDC_HIGHLIGHTTEXTPATTERN, dbv.ptszVal);
::db_free(&dbv);
}
- if (!db_get_ts(0, CHAT_MODULE, "HighlightNames", &dbv)) {
+ if (!db_get_ws(0, CHAT_MODULE, "HighlightNames", &dbv)) {
::SetDlgItemText(hwndDlg, IDC_HIGHLIGHTNICKPATTERN, dbv.ptszVal);
::db_free(&dbv);
}
@@ -245,16 +245,16 @@ INT_PTR CALLBACK CMUCHighlight::dlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L
if (iLen) {
szBuf = reinterpret_cast<wchar_t *>(mir_alloc((iLen + 2) * sizeof(wchar_t)));
::GetDlgItemText(hwndDlg, IDC_HIGHLIGHTNICKPATTERN, szBuf, iLen + 1);
- db_set_ts(0, CHAT_MODULE, "HighlightNames", szBuf);
+ db_set_ws(0, CHAT_MODULE, "HighlightNames", szBuf);
}
iLen = ::GetWindowTextLength(::GetDlgItem(hwndDlg, IDC_HIGHLIGHTTEXTPATTERN));
if (iLen) {
szBuf = reinterpret_cast<wchar_t *>(mir_realloc(szBuf, sizeof(wchar_t) * (iLen + 2)));
::GetDlgItemText(hwndDlg, IDC_HIGHLIGHTTEXTPATTERN, szBuf, iLen + 1);
- db_set_ts(0, CHAT_MODULE, "HighlightWords", szBuf);
+ db_set_ws(0, CHAT_MODULE, "HighlightWords", szBuf);
}
- else db_set_ts(0, CHAT_MODULE, "HighlightWords", L"");
+ else db_set_ws(0, CHAT_MODULE, "HighlightWords", L"");
mir_free(szBuf);
BYTE dwFlags = (::IsDlgButtonChecked(hwndDlg, IDC_HIGHLIGHTNICKENABLE) ? MATCH_NICKNAME : 0) |
diff --git a/plugins/TabSRMM/src/chat/options.cpp b/plugins/TabSRMM/src/chat/options.cpp
index 65ee0a3dee..64825d1b4f 100644
--- a/plugins/TabSRMM/src/chat/options.cpp
+++ b/plugins/TabSRMM/src/chat/options.cpp
@@ -225,7 +225,7 @@ void LoadMsgDlgFont(int section, int i, LOGFONT *lf, COLORREF* colour, char *szM
wcsncpy_s(lf->lfFaceName, L"Webdings", _TRUNCATE);
}
else {
- ptrW tszDefFace(db_get_tsa(NULL, szMod, str));
+ ptrW tszDefFace(db_get_wsa(NULL, szMod, str));
if (tszDefFace == NULL)
wcsncpy_s(lf->lfFaceName, fol[j].szDefFace, _TRUNCATE);
else
@@ -240,7 +240,7 @@ static HTREEITEM InsertBranch(HWND hwndTree, wchar_t* pszDescr, BOOL bExpanded)
tvis.hParent = NULL;
tvis.hInsertAfter = TVI_LAST;
tvis.item.mask = TVIF_TEXT | TVIF_STATE | TVIF_IMAGE | TVIF_SELECTEDIMAGE;
- tvis.item.pszText = TranslateTS(pszDescr);
+ tvis.item.pszText = TranslateW(pszDescr);
tvis.item.stateMask = TVIS_EXPANDED | TVIS_BOLD;
tvis.item.state = (bExpanded ? TVIS_EXPANDED : 0) | TVIS_BOLD;
tvis.item.iImage = tvis.item.iSelectedImage = (bExpanded ? IMG_GRPOPEN : IMG_GRPCLOSED);
@@ -258,7 +258,7 @@ static void FillBranch(HWND hwndTree, HTREEITEM hParent, branch_t *branch, int n
tvis.hParent = hParent;
tvis.hInsertAfter = TVI_LAST;
tvis.item.mask = TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE;
- tvis.item.pszText = TranslateTS(branch[i].szDescr);
+ tvis.item.pszText = TranslateW(branch[i].szDescr);
if (branch[i].iMode)
tvis.item.iImage = tvis.item.iSelectedImage = ((((M.GetDword(CHAT_MODULE, branch[i].szDBName, defaultval) & branch[i].iMode) & branch[i].iMode) != 0) ? IMG_CHECK : IMG_NOCHECK);
else
@@ -356,7 +356,7 @@ HICON LoadIconEx(char *pszIcoLibName)
static void InitSetting(wchar_t* &ppPointer, const char *pszSetting, const wchar_t *pszDefault)
{
- ptrW val(db_get_tsa(NULL, CHAT_MODULE, pszSetting));
+ ptrW val(db_get_wsa(NULL, CHAT_MODULE, pszSetting));
replaceStrW(ppPointer, (val != NULL) ? val : pszDefault);
}
@@ -442,9 +442,9 @@ INT_PTR CALLBACK DlgProcOptions1(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
if (iLen > 0) {
pszText = (wchar_t*)mir_realloc(pszText, (iLen + 2) * sizeof(wchar_t));
GetDlgItemText(hwndDlg, IDC_GROUP, pszText, iLen + 1);
- db_set_ts(NULL, CHAT_MODULE, "AddToGroup", pszText);
+ db_set_ws(NULL, CHAT_MODULE, "AddToGroup", pszText);
}
- else db_set_ts(NULL, CHAT_MODULE, "AddToGroup", L"");
+ else db_set_ws(NULL, CHAT_MODULE, "AddToGroup", L"");
mir_free(pszText);
@@ -488,11 +488,11 @@ void RegisterFontServiceFonts()
{
char szTemp[100];
LOGFONT lf;
- FontIDT fid = { 0 };
- ColourIDT cid = { 0 };
+ FontIDW fid = { 0 };
+ ColourIDW cid = { 0 };
- fid.cbSize = sizeof(FontIDT);
- cid.cbSize = sizeof(ColourIDT);
+ fid.cbSize = sizeof(FontIDW);
+ cid.cbSize = sizeof(ColourIDW);
strncpy(fid.dbSettingsGroup, FONTMODULE, _countof(fid.dbSettingsGroup));
@@ -552,7 +552,7 @@ void RegisterFontServiceFonts()
wcsncpy(fid.backgroundName, LPGENW("Incoming background"), _countof(fid.backgroundName));
break;
}
- FontRegisterT(&fid);
+ FontRegisterW(&fid);
}
fontOptionsList = IP_fontOptionsList;
@@ -578,7 +578,7 @@ void RegisterFontServiceFonts()
wcsncpy(fid.backgroundName, L"", _countof(fid.backgroundName));
wcsncpy(fid.group, LPGENW("Message Sessions"), _countof(fid.group));
}
- FontRegisterT(&fid);
+ FontRegisterW(&fid);
}
wcsncpy(cid.group, LPGENW("Message Sessions") L"/" LPGENW("Group chats"), _countof(cid.group));
@@ -599,18 +599,18 @@ void RegisterFontServiceFonts()
cid.defcolour = RGB(0, 0, 0);
break;
}
- ColourRegisterT(&cid);
+ ColourRegisterW(&cid);
}
cid.order++;
wcsncpy_s(cid.name, LPGENW("Nick list background"), _TRUNCATE);
strncpy_s(cid.setting, "ColorNicklistBG", _TRUNCATE);
cid.defcolour = SRMSGDEFSET_BKGCOLOUR;
- ColourRegisterT(&cid);
+ ColourRegisterW(&cid);
cid.order++;
wcsncpy_s(cid.name, LPGENW("Group chat log background"), _TRUNCATE);
strncpy_s(cid.setting, "ColorLogBG", _TRUNCATE);
- ColourRegisterT(&cid);
+ ColourRegisterW(&cid);
// static colors (info panel, tool bar background etc...)
strncpy(fid.dbSettingsGroup, FONTMODULE, _countof(fid.dbSettingsGroup));
@@ -625,7 +625,7 @@ void RegisterFontServiceFonts()
cid.defcolour = GetSysColor(_clrs[i].def & 0x000000ff);
else
cid.defcolour = _clrs[i].def;
- ColourRegisterT(&cid);
+ ColourRegisterW(&cid);
}
strncpy(cid.dbSettingsGroup, SRMSGMOD_T, _countof(fid.dbSettingsGroup));
@@ -641,7 +641,7 @@ void RegisterFontServiceFonts()
else
cid.defcolour = _tabclrs[i].def;
- ColourRegisterT(&cid);
+ ColourRegisterW(&cid);
}
}
@@ -826,7 +826,7 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
if (iLen > 0) {
wchar_t *pszText1 = (wchar_t*)mir_alloc(iLen*sizeof(wchar_t) + 2);
GetDlgItemText(hwndDlg, IDC_LOGDIRECTORY, pszText1, iLen + 1);
- db_set_ts(NULL, CHAT_MODULE, "LogDirectory", pszText1);
+ db_set_ws(NULL, CHAT_MODULE, "LogDirectory", pszText1);
mir_free(pszText1);
g_Settings.bLoggingEnabled = IsDlgButtonChecked(hwndDlg, IDC_LOGGING) == BST_CHECKED;
db_set_b(0, CHAT_MODULE, "LoggingEnabled", g_Settings.bLoggingEnabled);
diff --git a/plugins/TabSRMM/src/chat/tools.cpp b/plugins/TabSRMM/src/chat/tools.cpp
index 63f7f8134a..abedaddfdf 100644
--- a/plugins/TabSRMM/src/chat/tools.cpp
+++ b/plugins/TabSRMM/src/chat/tools.cpp
@@ -114,7 +114,7 @@ int ShowPopup(MCONTACT hContact, SESSION_INFO *si, HICON hIcon, char* pszProtoNa
PROTOACCOUNT *pa = Proto_GetAccount(pszProtoName);
mir_snwprintf(pd.lptzContactName, L"%s - %s", (pa == NULL) ? _A2T(pszProtoName) : pa->tszAccountName, pcli->pfnGetContactDisplayName(hContact, 0));
- wcsncpy_s(pd.lptzText, TranslateTS(szBuf), _TRUNCATE);
+ wcsncpy_s(pd.lptzText, TranslateW(szBuf), _TRUNCATE);
pd.iSeconds = g_Settings.iPopupTimeout;
if (g_Settings.iPopupStyle == 2) {
@@ -557,7 +557,7 @@ UINT CreateGCMenu(HWND hwndDlg, HMENU *hMenu, int iIndex, POINT pt, SESSION_INFO
AppendMenu(*hMenu, MF_SEPARATOR, 0, 0);
for (int i = 0; i < gcmi.nItems; i++) {
- wchar_t *ptszText = TranslateTS(gcmi.Item[i].pszDesc);
+ wchar_t *ptszText = TranslateW(gcmi.Item[i].pszDesc);
DWORD dwState = gcmi.Item[i].bDisabled ? MF_GRAYED : 0;
if (gcmi.Item[i].uType == MENU_NEWPOPUP) {
diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp
index a38dfc6291..54c436ae8b 100644
--- a/plugins/TabSRMM/src/chat/window.cpp
+++ b/plugins/TabSRMM/src/chat/window.cpp
@@ -1819,7 +1819,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
SendDlgItemMessage(hwndDlg, IDC_CHAT_TOGGLESIDEBAR, BUTTONSETCONTAINER, (LPARAM)dat->pContainer, 0);
SendDlgItemMessage(hwndDlg, IDC_CHAT_TOGGLESIDEBAR, BUTTONSETASFLATBTN, FALSE, 0);
SendDlgItemMessage(hwndDlg, IDC_CHAT_TOGGLESIDEBAR, BUTTONSETASTOOLBARBUTTON, TRUE, 0);
- SendDlgItemMessage(hwndDlg, IDC_CHAT_TOGGLESIDEBAR, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Expand or collapse the side bar"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_CHAT_TOGGLESIDEBAR, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Expand or collapse the side bar"), BATF_UNICODE);
DM_InitTip(dat);
BB_InitDlgButtons(dat);
@@ -2564,14 +2564,14 @@ LABEL_SHOWWINDOW:
case ID_SEARCH_GOOGLE:
if (pszWord[0])
- Utils_OpenUrlT(CMString(FORMAT, L"http://www.google.com/search?q=%s", pszWord));
+ Utils_OpenUrlT(CMStringW(FORMAT, L"http://www.google.com/search?q=%s", pszWord));
PostMessage(hwndDlg, WM_MOUSEACTIVATE, 0, 0);
break;
case ID_SEARCH_WIKIPEDIA:
if (pszWord[0])
- Utils_OpenUrlT(CMString(FORMAT, L"http://en.wikipedia.org/wiki/%s", pszWord));
+ Utils_OpenUrlT(CMStringW(FORMAT, L"http://en.wikipedia.org/wiki/%s", pszWord));
PostMessage(hwndDlg, WM_MOUSEACTIVATE, 0, 0);
break;
@@ -2789,7 +2789,7 @@ LABEL_SHOWWINDOW:
if (g_Settings.bDoubleClick4Privat ? GetKeyState(VK_SHIFT) & 0x8000 : !(GetKeyState(VK_SHIFT) & 0x8000)) {
LRESULT lResult = (LRESULT)SendDlgItemMessage(hwndDlg, IDC_CHAT_MESSAGE, EM_GETSEL, 0, 0);
int start = LOWORD(lResult);
- CMString tszName;
+ CMStringW tszName;
if (start == 0)
tszName.Format(L"%s: ", ui->pszNick);
else
@@ -2824,7 +2824,7 @@ LABEL_SHOWWINDOW:
ptrA pszRtf(Message_GetFromStream(GetDlgItem(hwndDlg, IDC_CHAT_MESSAGE)));
pci->SM_AddCommand(si->ptszID, si->pszModule, pszRtf);
- CMString ptszText(ptrW(mir_utf8decodeW(pszRtf)));
+ CMStringW ptszText(ptrW(mir_utf8decodeW(pszRtf)));
if (ptszText.IsEmpty())
break;
@@ -3169,7 +3169,7 @@ LABEL_SHOWWINDOW:
char *szKey = "TAB_ContainersW";
mir_snprintf(szIndex, "%d", iSelection - IDM_CONTAINERMENU);
if (iSelection - IDM_CONTAINERMENU >= 0) {
- if (!db_get_ts(NULL, szKey, szIndex, &dbv)) {
+ if (!db_get_ws(NULL, szKey, szIndex, &dbv)) {
SendMessage(hwndDlg, DM_CONTAINERSELECTED, 0, (LPARAM)dbv.ptszVal);
db_free(&dbv);
}
@@ -3212,7 +3212,7 @@ LABEL_SHOWWINDOW:
if (pNewContainer == NULL)
if ((pNewContainer = CreateContainer(szNewName, FALSE, dat->hContact)) == NULL)
break;
- db_set_ts(dat->hContact, SRMSGMOD_T, "containerW", szNewName);
+ db_set_ws(dat->hContact, SRMSGMOD_T, "containerW", szNewName);
PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_DOCREATETAB_CHAT, (WPARAM)pNewContainer, (LPARAM)hwndDlg);
if (iOldItems > 1) // there were more than 1 tab, container is still valid
SendMessage(dat->pContainer->hwndActive, WM_SIZE, 0, 0);
diff --git a/plugins/TabSRMM/src/contactcache.cpp b/plugins/TabSRMM/src/contactcache.cpp
index e9923d78b2..3a9d346383 100644
--- a/plugins/TabSRMM/src/contactcache.cpp
+++ b/plugins/TabSRMM/src/contactcache.cpp
@@ -446,7 +446,7 @@ void CContactCache::updateStatusMsg(const char *szKey)
if (m_szStatusMsg)
mir_free(m_szStatusMsg);
m_szStatusMsg = 0;
- ptrW szStatus(db_get_tsa(hContact, "CList", "StatusMsg"));
+ ptrW szStatus(db_get_wsa(hContact, "CList", "StatusMsg"));
if (szStatus != 0)
m_szStatusMsg = (mir_wstrlen(szStatus) > 0 ? getNormalizedStatusMsg(szStatus) : 0);
}
@@ -454,7 +454,7 @@ void CContactCache::updateStatusMsg(const char *szKey)
if (m_ListeningInfo)
mir_free(m_ListeningInfo);
m_ListeningInfo = 0;
- ptrW szListeningTo(db_get_tsa(hContact, cc->szProto, "ListeningTo"));
+ ptrW szListeningTo(db_get_wsa(hContact, cc->szProto, "ListeningTo"));
if (szListeningTo != 0 && *szListeningTo)
m_ListeningInfo = szListeningTo.detach();
}
@@ -462,7 +462,7 @@ void CContactCache::updateStatusMsg(const char *szKey)
if (m_xStatusMsg)
mir_free(m_xStatusMsg);
m_xStatusMsg = 0;
- ptrW szXStatusMsg(db_get_tsa(hContact, cc->szProto, "XStatusMsg"));
+ ptrW szXStatusMsg(db_get_wsa(hContact, cc->szProto, "XStatusMsg"));
if (szXStatusMsg != 0 && *szXStatusMsg)
m_xStatusMsg = szXStatusMsg.detach();
}
@@ -526,7 +526,7 @@ wchar_t* CContactCache::getNormalizedStatusMsg(const wchar_t *src, bool fStripAl
if (src == 0 || mir_wstrlen(src) < 2)
return 0;
- CMString dest;
+ CMStringW dest;
for (int i = 0; src[i] != 0; i++) {
if (src[i] == 0x0d || src[i] == '\t')
diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp
index 06d188730a..7d15fcd56d 100644
--- a/plugins/TabSRMM/src/container.cpp
+++ b/plugins/TabSRMM/src/container.cpp
@@ -803,7 +803,7 @@ panel_found:
char szIndex[10];
itoa(iSelection - IDM_CONTAINERMENU, szIndex, 10);
if (iSelection - IDM_CONTAINERMENU >= 0) {
- ptrW tszName(db_get_tsa(NULL, CONTAINER_KEY, szIndex));
+ ptrW tszName(db_get_wsa(NULL, CONTAINER_KEY, szIndex));
if (tszName != NULL)
SendMessage((HWND)tci.lParam, DM_CONTAINERSELECTED, 0, tszName);
}
@@ -1037,7 +1037,7 @@ panel_found:
}
if (dat) {
SendMessage(hwndDlg, DM_SETICON, (WPARAM)dat, (LPARAM)(dat->hXStatusIcon ? dat->hXStatusIcon : dat->hTabStatusIcon));
- CMString szTitle;
+ CMStringW szTitle;
if (Utils::FormatTitleBar(dat, pContainer->settings->szTitleFormat, szTitle))
SetWindowText(hwndDlg, szTitle);
}
@@ -1317,21 +1317,21 @@ panel_found:
pContainer->szRelThemeFile[0] = pContainer->szAbsThemeFile[0] = 0;
mir_snprintf(szCname, "%s_theme", CONTAINER_PREFIX);
- if (!db_get_ts(pContainer->hContactFrom, SRMSGMOD_T, szCname, &dbv))
+ if (!db_get_ws(pContainer->hContactFrom, SRMSGMOD_T, szCname, &dbv))
szThemeName = dbv.ptszVal;
}
else {
Utils::ReadPrivateContainerSettings(pContainer);
if (szThemeName == NULL) {
mir_snprintf(szCname, "%s%d_theme", CONTAINER_PREFIX, pContainer->iContainerIndex);
- if (!db_get_ts(NULL, SRMSGMOD_T, szCname, &dbv))
+ if (!db_get_ws(NULL, SRMSGMOD_T, szCname, &dbv))
szThemeName = dbv.ptszVal;
}
}
Utils::SettingsToContainer(pContainer);
if (szThemeName != NULL) {
- PathToAbsoluteT(szThemeName, pContainer->szAbsThemeFile, M.getDataPath());
+ PathToAbsoluteW(szThemeName, pContainer->szAbsThemeFile, M.getDataPath());
wcsncpy_s(pContainer->szRelThemeFile, szThemeName, _TRUNCATE);
db_free(&dbv);
}
@@ -1722,7 +1722,7 @@ panel_found:
if (mir_wstrlen(pContainer->szRelThemeFile) > 1) {
if (pContainer->fPrivateThemeChanged == TRUE) {
PathToRelativeT(pContainer->szRelThemeFile, pContainer->szAbsThemeFile, M.getDataPath());
- db_set_ts(hContact, SRMSGMOD_T, szCName, pContainer->szRelThemeFile);
+ db_set_ws(hContact, SRMSGMOD_T, szCName, pContainer->szRelThemeFile);
pContainer->fPrivateThemeChanged = FALSE;
}
}
@@ -1768,7 +1768,7 @@ TContainerData* TSAPI CreateContainer(const wchar_t *name, int iTemp, MCONTACT h
do {
char szCounter[10];
itoa(i, szCounter, 10);
- ptrW tszName(db_get_tsa(NULL, CONTAINER_KEY, szCounter));
+ ptrW tszName(db_get_wsa(NULL, CONTAINER_KEY, szCounter));
if (tszName == NULL) {
if (iFirstFree != -1) {
pContainer->iContainerIndex = iFirstFree;
@@ -1776,7 +1776,7 @@ TContainerData* TSAPI CreateContainer(const wchar_t *name, int iTemp, MCONTACT h
}
else pContainer->iContainerIndex = i;
- db_set_ts(NULL, CONTAINER_KEY, szCounter, name);
+ db_set_ws(NULL, CONTAINER_KEY, szCounter, name);
BuildContainerMenu();
break;
}
@@ -2016,7 +2016,7 @@ int TSAPI GetContainerNameForContact(MCONTACT hContact, wchar_t *szName, int iNa
// use clist group names for containers...
if (M.GetByte("useclistgroups", 0)) {
- ptrW tszGroup(db_get_tsa(hContact, "CList", "Group"));
+ ptrW tszGroup(db_get_wsa(hContact, "CList", "Group"));
if (tszGroup == NULL) {
wcsncpy_s(szName, iNameLen, L"default", _TRUNCATE);
return 0;
@@ -2026,7 +2026,7 @@ int TSAPI GetContainerNameForContact(MCONTACT hContact, wchar_t *szName, int iNa
return 1;
}
- ptrW tszContainerName(db_get_tsa(hContact, SRMSGMOD_T, CONTAINER_SUBKEY));
+ ptrW tszContainerName(db_get_wsa(hContact, SRMSGMOD_T, CONTAINER_SUBKEY));
if (tszContainerName == NULL) {
wcsncpy_s(szName, iNameLen, L"default", _TRUNCATE);
return 0;
@@ -2040,14 +2040,14 @@ void TSAPI DeleteContainer(int iIndex)
{
char szIndex[10];
itoa(iIndex, szIndex, 10);
- ptrW tszContainerName(db_get_tsa(NULL, CONTAINER_KEY, szIndex));
+ ptrW tszContainerName(db_get_wsa(NULL, CONTAINER_KEY, szIndex));
if (tszContainerName == NULL)
return;
- db_set_ts(NULL, CONTAINER_KEY, szIndex, L"**mir_free**");
+ db_set_ws(NULL, CONTAINER_KEY, szIndex, L"**mir_free**");
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- ptrW tszValue(db_get_tsa(hContact, SRMSGMOD_T, CONTAINER_SUBKEY));
+ ptrW tszValue(db_get_wsa(hContact, SRMSGMOD_T, CONTAINER_SUBKEY));
if (!mir_wstrcmp(tszValue, tszContainerName))
db_unset(hContact, SRMSGMOD_T, CONTAINER_SUBKEY);
}
@@ -2074,16 +2074,16 @@ void TSAPI RenameContainer(int iIndex, const wchar_t *szNew)
char szIndex[10];
itoa(iIndex, szIndex, 10);
- ptrW tszContainerName(db_get_tsa(NULL, CONTAINER_KEY, szIndex));
+ ptrW tszContainerName(db_get_wsa(NULL, CONTAINER_KEY, szIndex));
if (tszContainerName == NULL)
return;
- db_set_ts(NULL, CONTAINER_KEY, szIndex, szNew);
+ db_set_ws(NULL, CONTAINER_KEY, szIndex, szNew);
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- ptrW tszValue(db_get_tsa(hContact, SRMSGMOD_T, CONTAINER_SUBKEY));
+ ptrW tszValue(db_get_wsa(hContact, SRMSGMOD_T, CONTAINER_SUBKEY));
if (!mir_wstrcmp(tszValue, tszContainerName))
- db_set_ts(hContact, SRMSGMOD_T, CONTAINER_SUBKEY, szNew);
+ db_set_ws(hContact, SRMSGMOD_T, CONTAINER_SUBKEY, szNew);
}
}
@@ -2105,7 +2105,7 @@ HMENU TSAPI BuildContainerMenu()
while (true) {
char szCounter[10];
itoa(i, szCounter, 10);
- ptrW tszName(db_get_tsa(NULL, CONTAINER_KEY, szCounter));
+ ptrW tszName(db_get_wsa(NULL, CONTAINER_KEY, szCounter));
if (tszName == NULL)
break;
diff --git a/plugins/TabSRMM/src/containeroptions.cpp b/plugins/TabSRMM/src/containeroptions.cpp
index 9dbc431c96..c3adeb98e6 100644
--- a/plugins/TabSRMM/src/containeroptions.cpp
+++ b/plugins/TabSRMM/src/containeroptions.cpp
@@ -123,9 +123,9 @@ static void ShowPage(HWND hwndDlg, int iPage, BOOL fShow)
Utils::showDlgControl(hwndDlg, o_pages[iPage].uIds[i], fShow ? SW_SHOW : SW_HIDE);
}
if (fShow) {
- SetDlgItemText(hwndDlg, IDC_TITLEBOX, TranslateTS(o_pages[iPage].szTitle));
+ SetDlgItemText(hwndDlg, IDC_TITLEBOX, TranslateW(o_pages[iPage].szTitle));
if (o_pages[iPage].szDesc != NULL)
- SetDlgItemText(hwndDlg, IDC_DESC, TranslateTS(o_pages[iPage].szDesc));
+ SetDlgItemText(hwndDlg, IDC_DESC, TranslateW(o_pages[iPage].szDesc));
else
SetDlgItemText(hwndDlg, IDC_DESC, L"");
}
@@ -173,7 +173,7 @@ INT_PTR CALLBACK DlgProcContainerOptions(HWND hwndDlg, UINT msg, WPARAM wParam,
SendDlgItemMessage(hwndDlg, IDC_OWNAVATARMODE, CB_INSERTSTRING, -1, (LPARAM)TranslateT("Don't show them"));
for (int i = 0; i < nr_layouts; i++)
- SendDlgItemMessage(hwndDlg, IDC_SBARLAYOUT, CB_INSERTSTRING, -1, (LPARAM)TranslateTS(sblayouts[i].szName));
+ SendDlgItemMessage(hwndDlg, IDC_SBARLAYOUT, CB_INSERTSTRING, -1, (LPARAM)TranslateW(sblayouts[i].szName));
/* bits 24 - 31 of dwFlagsEx hold the side bar layout id */
SendDlgItemMessage(hwndDlg, IDC_SBARLAYOUT, CB_SETCURSEL, (WPARAM)((pContainer->settings->dwFlagsEx & 0xff000000) >> 24), 0);
@@ -187,7 +187,7 @@ INT_PTR CALLBACK DlgProcContainerOptions(HWND hwndDlg, UINT msg, WPARAM wParam,
tvis.hParent = NULL;
tvis.hInsertAfter = TVI_LAST;
tvis.item.mask = TVIF_TEXT | TVIF_PARAM;
- tvis.item.pszText = TranslateTS(o_pages[i].szTitle);
+ tvis.item.pszText = TranslateW(o_pages[i].szTitle);
tvis.item.lParam = i;
HTREEITEM hItem = TreeView_InsertItem(hwndTree, &tvis);
if (i == 0)
@@ -336,7 +336,7 @@ INT_PTR CALLBACK DlgProcContainerOptions(HWND hwndDlg, UINT msg, WPARAM wParam,
GetDlgItemText(hwndDlg, IDC_THEME, szFilename, _countof(szFilename));
szFilename[MAX_PATH - 1] = 0;
- PathToAbsoluteT(szFilename, szFinalThemeFile, M.getDataPath());
+ PathToAbsoluteW(szFilename, szFinalThemeFile, M.getDataPath());
if (mir_wstrcmp(szFilename, pContainer->szRelThemeFile))
pContainer->fPrivateThemeChanged = TRUE;
diff --git a/plugins/TabSRMM/src/controls.cpp b/plugins/TabSRMM/src/controls.cpp
index 5d69e24d89..4507a01a21 100644
--- a/plugins/TabSRMM/src/controls.cpp
+++ b/plugins/TabSRMM/src/controls.cpp
@@ -1010,7 +1010,7 @@ LONG_PTR CALLBACK StatusBarSubclassProc(HWND hWnd, UINT msg, WPARAM wParam, LPAR
if (PtInRect(&rc, pt) && ((rc.right - rc.left) < size.cx)) {
if (dat->bType == SESSIONTYPE_CHAT) {
- ptrW tszTopic(db_get_tsa(dat->hContact, dat->szProto, "Topic"));
+ ptrW tszTopic(db_get_wsa(dat->hContact, dat->szProto, "Topic"));
if (tszTopic != NULL) {
tooltip_active = TRUE;
CallService("mToolTip/ShowTipW", tszTopic, (LPARAM)&ti);
diff --git a/plugins/TabSRMM/src/eventpopups.cpp b/plugins/TabSRMM/src/eventpopups.cpp
index 24f0fe2898..9c552aaaa9 100644
--- a/plugins/TabSRMM/src/eventpopups.cpp
+++ b/plugins/TabSRMM/src/eventpopups.cpp
@@ -421,7 +421,7 @@ static wchar_t* ShortenPreview(DBEVENTINFO* dbe)
if (iPreviewLimit > 500 || iPreviewLimit == 0)
iPreviewLimit = 500;
- wchar_t *buf = DbGetEventTextT(dbe, CP_ACP);
+ wchar_t *buf = DbGetEventTextW(dbe, CP_ACP);
if (mir_wstrlen(buf) > iPreviewLimit) {
fAddEllipsis = true;
size_t iIndex = iPreviewLimit;
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp
index 365fe0a812..ba3f54c5b9 100644
--- a/plugins/TabSRMM/src/generic_msghandlers.cpp
+++ b/plugins/TabSRMM/src/generic_msghandlers.cpp
@@ -51,7 +51,7 @@ void TSAPI DM_SaveLogAsRTF(const TWindowData *dat)
wchar_t szInitialDir[MAX_PATH + 2];
mir_snwprintf(szInitialDir, L"%s%s\\", M.getDataPath(), L"\\Saved message logs");
- CreateDirectoryTreeT(szInitialDir);
+ CreateDirectoryTreeW(szInitialDir);
OPENFILENAME ofn = { 0 };
ofn.lStructSize = sizeof(ofn);
@@ -527,7 +527,7 @@ LRESULT TSAPI DM_MsgWindowCmdHandler(HWND hwndDlg, TContainerData *m_pContainer,
DBVARIANT dbv = { 0 };
- if (0 == db_get_ts(dat->hContact, "UserInfo", "MyNotes", &dbv)) {
+ if (0 == db_get_ws(dat->hContact, "UserInfo", "MyNotes", &dbv)) {
SetDlgItemText(hwndDlg, IDC_MESSAGE, dbv.ptszVal);
mir_free(dbv.ptszVal);
}
@@ -537,7 +537,7 @@ LRESULT TSAPI DM_MsgWindowCmdHandler(HWND hwndDlg, TContainerData *m_pContainer,
wchar_t *buf = (wchar_t*)mir_alloc((iLen + 2) * sizeof(wchar_t));
GetDlgItemText(hwndDlg, IDC_MESSAGE, buf, iLen + 1);
- db_set_ts(dat->hContact, "UserInfo", "MyNotes", buf);
+ db_set_ws(dat->hContact, "UserInfo", "MyNotes", buf);
SetDlgItemText(hwndDlg, IDC_MESSAGE, L"");
if (!dat->bIsAutosizingInput) {
@@ -981,7 +981,7 @@ static void LoadKLThread(LPVOID _param)
Thread_SetName("TabSRMM: LoadKLThread");
DBVARIANT dbv;
- if (!db_get_ts((UINT_PTR)_param, SRMSGMOD_T, "locale", &dbv)) {
+ if (!db_get_ws((UINT_PTR)_param, SRMSGMOD_T, "locale", &dbv)) {
HKL hkl = LoadKeyboardLayout(dbv.ptszVal, 0);
PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_SETLOCALE, (WPARAM)_param, (LPARAM)hkl);
db_free(&dbv);
@@ -997,7 +997,7 @@ void TSAPI DM_LoadLocale(TWindowData *dat)
return;
DBVARIANT dbv;
- if (!db_get_ts(dat->hContact, SRMSGMOD_T, "locale", &dbv))
+ if (!db_get_ws(dat->hContact, SRMSGMOD_T, "locale", &dbv))
db_free(&dbv);
else {
wchar_t szKLName[KL_NAMELENGTH + 1];
@@ -1005,11 +1005,11 @@ void TSAPI DM_LoadLocale(TWindowData *dat)
wchar_t szBuf[20];
GetLocaleInfo(LOCALE_SYSTEM_DEFAULT, LOCALE_ILANGUAGE, szBuf, 20);
mir_snwprintf(szKLName, L"0000%s", szBuf);
- db_set_ts(dat->hContact, SRMSGMOD_T, "locale", szKLName);
+ db_set_ws(dat->hContact, SRMSGMOD_T, "locale", szKLName);
}
else {
GetKeyboardLayoutName(szKLName);
- db_set_ts(dat->hContact, SRMSGMOD_T, "locale", szKLName);
+ db_set_ws(dat->hContact, SRMSGMOD_T, "locale", szKLName);
}
}
@@ -1082,7 +1082,7 @@ void TSAPI DM_SaveLocale(TWindowData *dat, WPARAM, LPARAM lParam)
dat->hkl = (HKL)lParam;
ActivateKeyboardLayout(dat->hkl, 0);
GetKeyboardLayoutName(szKLName);
- db_set_ts(dat->hContact, SRMSGMOD_T, "locale", szKLName);
+ db_set_ws(dat->hContact, SRMSGMOD_T, "locale", szKLName);
GetLocaleID(dat, szKLName);
UpdateReadChars(dat);
}
@@ -1764,7 +1764,7 @@ void TSAPI DM_UpdateTitle(TWindowData *dat, WPARAM, LPARAM lParam)
TranslateT("UID: %s (SHIFT click -> copy to clipboard)\nClick for user's details\nClick dropdown to change this contact's favorite status."),
bHasName ? dat->cache->getUIN() : TranslateT("No UID"));
- SendDlgItemMessage(hwndDlg, IDC_NAME, BUTTONADDTOOLTIP, (WPARAM)fulluin, BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_NAME, BUTTONADDTOOLTIP, (WPARAM)fulluin, BATF_UNICODE);
}
}
else wcsncpy_s(newtitle, L"Message Session", _TRUNCATE);
diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp
index d901380ae2..c66f58eb3c 100644
--- a/plugins/TabSRMM/src/globals.cpp
+++ b/plugins/TabSRMM/src/globals.cpp
@@ -602,7 +602,7 @@ void CGlobals::logStatusChange(WPARAM wParam, const CContactCache *c)
if (szOldStatus == 0 || szNewStatus == 0)
return;
- CMString text;
+ CMStringW text;
if (wStatus == ID_STATUS_OFFLINE)
text = TranslateT("signed off.");
else if (wOldStatus == ID_STATUS_OFFLINE)
diff --git a/plugins/TabSRMM/src/hotkeyhandler.cpp b/plugins/TabSRMM/src/hotkeyhandler.cpp
index ca05fe22c8..eef1b2a6a1 100644
--- a/plugins/TabSRMM/src/hotkeyhandler.cpp
+++ b/plugins/TabSRMM/src/hotkeyhandler.cpp
@@ -440,7 +440,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
}
DBVARIANT dbv;
- if (0 == db_get_ts(hContact, SRMSGMOD_T, "locale", &dbv)) {
+ if (0 == db_get_ws(hContact, SRMSGMOD_T, "locale", &dbv)) {
GetLocaleID(dat, dbv.ptszVal);
db_free(&dbv);
UpdateReadChars(dat);
diff --git a/plugins/TabSRMM/src/infopanel.cpp b/plugins/TabSRMM/src/infopanel.cpp
index f2888d3f99..99ace42793 100644
--- a/plugins/TabSRMM/src/infopanel.cpp
+++ b/plugins/TabSRMM/src/infopanel.cpp
@@ -502,7 +502,7 @@ void CInfoPanel::RenderIPUIN(const HDC hdc, RECT& rcItem)
if (M.GetByte("ShowClientDescription", 1)) {
wchar_t temp[256];
- ptrW szVersion(db_get_tsa(m_dat->cache->getActiveContact(), m_dat->cache->getActiveProto(), "MirVer"));
+ ptrW szVersion(db_get_wsa(m_dat->cache->getActiveContact(), m_dat->cache->getActiveProto(), "MirVer"));
if (szVersion)
mir_snwprintf(temp, TranslateT(" Client: %s"), szVersion);
else
@@ -644,7 +644,7 @@ void CInfoPanel::Chat_RenderIPNickname(const HDC hdc, RECT& rcItem)
pTmp += 2;
if (si->ptszStatusbarText[0] == '[' && pTmp > si->ptszStatusbarText) {
- CMString tszTemp(si->ptszStatusbarText, pTmp - si->ptszStatusbarText);
+ CMStringW tszTemp(si->ptszStatusbarText, pTmp - si->ptszStatusbarText);
CSkin::RenderText(hdc, m_dat->hThemeIP, tszTemp, &rcItem, DT_SINGLELINE | DT_END_ELLIPSIS | DT_NOPREFIX | DT_VCENTER,
CSkin::m_glowSize, m_ipConfig.clrs[IPFONTID_STATUS]);
}
@@ -884,7 +884,7 @@ void CInfoPanel::showTip(UINT ctrlId, const LPARAM lParam)
if (m_hwndConfig)
return;
- CMString str(FORMAT, RTF_DEFAULT_HEADER, 0, 0, 0, 30 * 15);
+ CMStringW str(FORMAT, RTF_DEFAULT_HEADER, 0, 0, 0, 30 * 15);
str.AppendFormat(TranslateT("\\ul\\b Status message:\\ul0\\b0 \\par %s"),
m_dat->cache->getStatusMsg() ? m_dat->cache->getStatusMsg() : TranslateT("No status message"));
@@ -892,7 +892,7 @@ void CInfoPanel::showTip(UINT ctrlId, const LPARAM lParam)
DBVARIANT dbv = { 0 };
if (BYTE xStatus = m_dat->cache->getXStatusId()) {
wchar_t *tszXStatusName = 0;
- if (0 == db_get_ts(m_dat->cache->getContact(), m_dat->cache->getProto(), "XStatusName", &dbv))
+ if (0 == db_get_ws(m_dat->cache->getContact(), m_dat->cache->getProto(), "XStatusName", &dbv))
tszXStatusName = dbv.ptszVal;
else if (xStatus > 0 && xStatus <= 31)
tszXStatusName = xStatusDescr[xStatus - 1];
@@ -910,7 +910,7 @@ void CInfoPanel::showTip(UINT ctrlId, const LPARAM lParam)
if (m_dat->cache->getListeningInfo())
str.AppendFormat(TranslateT("\\par\\par\\ul\\b Listening to:\\ul0\\b0 \\par %s"), m_dat->cache->getListeningInfo());
- if (0 == db_get_ts(m_dat->cache->getActiveContact(), m_dat->cache->getActiveProto(), "MirVer", &dbv)) {
+ if (0 == db_get_ws(m_dat->cache->getActiveContact(), m_dat->cache->getActiveProto(), "MirVer", &dbv)) {
str.AppendFormat(TranslateT("\\par\\par\\ul\\b Client:\\ul0\\b0 %s"), dbv.ptszVal);
::db_free(&dbv);
}
diff --git a/plugins/TabSRMM/src/mim.cpp b/plugins/TabSRMM/src/mim.cpp
index 73d017a64c..000043e8b6 100644
--- a/plugins/TabSRMM/src/mim.cpp
+++ b/plugins/TabSRMM/src/mim.cpp
@@ -123,9 +123,9 @@ INT_PTR CMimAPI::foldersPathChanged()
Utils::ensureTralingBackslash(m_szChatLogsPath);
}
- CreateDirectoryTreeT(m_szProfilePath);
- CreateDirectoryTreeT(m_szSkinsPath);
- CreateDirectoryTreeT(m_szSavedAvatarsPath);
+ CreateDirectoryTreeW(m_szProfilePath);
+ CreateDirectoryTreeW(m_szSkinsPath);
+ CreateDirectoryTreeW(m_szSavedAvatarsPath);
Skin->extractSkinsAndLogo(true);
Skin->setupAeroSkins();
@@ -138,7 +138,7 @@ const wchar_t* CMimAPI::getUserDir()
if (ServiceExists(MS_FOLDERS_REGISTER_PATH))
wcsncpy_s(m_userDir, L"%miranda_userdata%", _TRUNCATE);
else
- wcsncpy_s(m_userDir, VARST(L"%miranda_userdata%"), _TRUNCATE);
+ wcsncpy_s(m_userDir, VARSW(L"%miranda_userdata%"), _TRUNCATE);
Utils::ensureTralingBackslash(m_userDir);
}
@@ -155,8 +155,8 @@ void CMimAPI::InitPaths()
wcsncpy_s(m_szSkinsPath, L"%miranda_path%\\Skins\\TabSRMM", _TRUNCATE);
}
else {
- wcsncpy_s(m_szChatLogsPath, VARST(L"%miranda_logpath%"), _TRUNCATE);
- wcsncpy_s(m_szSkinsPath, VARST(L"%miranda_path%\\Skins\\TabSRMM"), _TRUNCATE);
+ wcsncpy_s(m_szChatLogsPath, VARSW(L"%miranda_logpath%"), _TRUNCATE);
+ wcsncpy_s(m_szSkinsPath, VARSW(L"%miranda_path%\\Skins\\TabSRMM"), _TRUNCATE);
}
Utils::ensureTralingBackslash(m_szChatLogsPath);
diff --git a/plugins/TabSRMM/src/modplus.cpp b/plugins/TabSRMM/src/modplus.cpp
index 333da241f8..120906e8e0 100644
--- a/plugins/TabSRMM/src/modplus.cpp
+++ b/plugins/TabSRMM/src/modplus.cpp
@@ -44,7 +44,7 @@ static wchar_t* getMenuEntry(int i)
{
char MEntry[256];
mir_snprintf(MEntry, "MenuEntry_%u", i);
- return db_get_tsa(NULL, "tabmodplus", MEntry);
+ return db_get_wsa(NULL, "tabmodplus", MEntry);
}
static int RegisterCustomButton(WPARAM, LPARAM)
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp
index d43e5bb62e..e8ae781eda 100644
--- a/plugins/TabSRMM/src/msgdialog.cpp
+++ b/plugins/TabSRMM/src/msgdialog.cpp
@@ -1281,13 +1281,13 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
TABSRMM_FireEvent(dat->hContact, hwndDlg, MSG_WINDOW_EVT_OPENING, 0);
for (int i = 0; i < _countof(tooltips); i++)
- SendDlgItemMessage(hwndDlg, tooltips[i].id, BUTTONADDTOOLTIP, (WPARAM)TranslateTS(tooltips[i].text), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, tooltips[i].id, BUTTONADDTOOLTIP, (WPARAM)TranslateW(tooltips[i].text), BATF_UNICODE);
SetDlgItemText(hwndDlg, IDC_LOGFROZENTEXT, dat->bNotOnList ? TranslateT("Contact not on list. You may add it...") :
TranslateT("Auto scrolling is disabled (press F12 to enable it)"));
- SendDlgItemMessage(hwndDlg, IDC_SAVE, BUTTONADDTOOLTIP, (WPARAM)pszIDCSAVE_close, BATF_TCHAR);
- SendDlgItemMessage(hwndDlg, IDC_PROTOCOL, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Click for contact menu\nClick dropdown for window settings"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_SAVE, BUTTONADDTOOLTIP, (WPARAM)pszIDCSAVE_close, BATF_UNICODE);
+ SendDlgItemMessage(hwndDlg, IDC_PROTOCOL, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Click for contact menu\nClick dropdown for window settings"), BATF_UNICODE);
SetDlgItemText(hwndDlg, IDC_RETRY, TranslateT("Retry"));
{
@@ -1342,7 +1342,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
// restore saved msg if any...
if (dat->hContact) {
- ptrW tszSavedMsg(db_get_tsa(dat->hContact, SRMSGMOD, "SavedMsg"));
+ ptrW tszSavedMsg(db_get_wsa(dat->hContact, SRMSGMOD, "SavedMsg"));
if (tszSavedMsg != 0) {
SETTEXTEX stx = { ST_DEFAULT, 1200 };
SendDlgItemMessage(hwndDlg, IDC_MESSAGE, EM_SETTEXTEX, (WPARAM)&stx, tszSavedMsg);
@@ -2545,7 +2545,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
mir_snprintf(szIndex, "%d", iSelection - IDM_CONTAINERMENU);
if (iSelection - IDM_CONTAINERMENU >= 0) {
- ptrW val(db_get_tsa(NULL, szKey, szIndex));
+ ptrW val(db_get_wsa(NULL, szKey, szIndex));
if (val)
SendMessage(hwndDlg, DM_CONTAINERSELECTED, 0, (LPARAM)val);
}
@@ -2623,7 +2623,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
if (streamOut == NULL)
break;
- CMString decoded(ptrW(mir_utf8decodeW(streamOut)));
+ CMStringW decoded(ptrW(mir_utf8decodeW(streamOut)));
if (decoded.IsEmpty())
break;
@@ -2887,7 +2887,7 @@ quote_from_last:
if ((pNewContainer = CreateContainer(szNewName, FALSE, dat->hContact)) == NULL)
break;
- db_set_ts(dat->hContact, SRMSGMOD_T, "containerW", szNewName);
+ db_set_ws(dat->hContact, SRMSGMOD_T, "containerW", szNewName);
dat->fIsReattach = TRUE;
PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_DOCREATETAB, (WPARAM)pNewContainer, dat->hContact);
if (iOldItems > 1) // there were more than 1 tab, container is still valid
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp
index 06c130e036..4f647fdd79 100644
--- a/plugins/TabSRMM/src/msgdlgutils.cpp
+++ b/plugins/TabSRMM/src/msgdlgutils.cpp
@@ -187,7 +187,7 @@ static void SaveAvatarToFile(TWindowData *dat, HBITMAP hbm, int isOwnPic)
ii.hbm = hbm;
ii.dwMask = IMGI_HBITMAP;
ii.fif = FIF_UNKNOWN; // get the format from the filename extension. png is default.
- CallService(MS_IMG_SAVE, (WPARAM)&ii, IMGL_TCHAR);
+ CallService(MS_IMG_SAVE, (WPARAM)&ii, IMGL_WCHAR);
}
}
@@ -834,7 +834,7 @@ char* TSAPI Message_GetFromStream(HWND hwndRtf, DWORD dwPassedFlags)
static wchar_t tszRtfBreaks[] = L" \\\n\r";
-static void CreateColorMap(CMString &Text, int iCount, COLORREF *pSrc, int *pDst)
+static void CreateColorMap(CMStringW &Text, int iCount, COLORREF *pSrc, int *pDst)
{
const wchar_t *pszText = Text;
int iIndex = 1;
@@ -881,7 +881,7 @@ static int GetRtfIndex(int iCol, int iCount, int *pIndex)
// convert rich edit code to bbcode (if wanted). Otherwise, strip all RTF formatting
// tags and return plain text
-BOOL TSAPI DoRtfToTags(const TWindowData *dat, CMString &pszText, int iNumColors, COLORREF *pColors)
+BOOL TSAPI DoRtfToTags(const TWindowData *dat, CMStringW &pszText, int iNumColors, COLORREF *pColors)
{
if (pszText.IsEmpty())
return FALSE;
@@ -904,7 +904,7 @@ BOOL TSAPI DoRtfToTags(const TWindowData *dat, CMString &pszText, int iNumColors
else idx += 5;
bool bInsideColor = false, bInsideUl = false;
- CMString res;
+ CMStringW res;
// iterate through all characters, if rtf control character found then take action
for (const wchar_t *p = pszText.GetString() + idx; *p;) {
@@ -1726,7 +1726,7 @@ void TSAPI GetClientIcon(TWindowData *dat)
dat->hClientIcon = 0;
if (ServiceExists(MS_FP_GETCLIENTICONT)) {
- ptrW tszMirver(db_get_tsa(dat->cache->getActiveContact(), dat->cache->getActiveProto(), "MirVer"));
+ ptrW tszMirver(db_get_wsa(dat->cache->getActiveContact(), dat->cache->getActiveProto(), "MirVer"));
if (tszMirver)
dat->hClientIcon = Finger_GetClientIcon(tszMirver, 1);
}
@@ -1937,7 +1937,7 @@ void TSAPI SendHBitmapAsFile(const TWindowData *dat, HBITMAP hbmp)
ii.wszName = filename;
ii.dwMask = IMGI_HBITMAP;
ii.fif = FIF_JPEG;
- CallService(MS_IMG_SAVE, (WPARAM)&ii, IMGL_TCHAR);
+ CallService(MS_IMG_SAVE, (WPARAM)&ii, IMGL_WCHAR);
int totalCount = 0;
wchar_t **ppFiles = NULL;
diff --git a/plugins/TabSRMM/src/msgdlgutils.h b/plugins/TabSRMM/src/msgdlgutils.h
index 1d7610caca..be46393656 100644
--- a/plugins/TabSRMM/src/msgdlgutils.h
+++ b/plugins/TabSRMM/src/msgdlgutils.h
@@ -45,7 +45,7 @@ void TSAPI AdjustBottomAvatarDisplay(TWindowData *dat);
void TSAPI SetDialogToType(HWND hwndDlg);
void TSAPI FlashOnClist(HWND hwndDlg, TWindowData *dat, MEVENT hEvent, DBEVENTINFO *dbei);
char* TSAPI Message_GetFromStream(HWND hwndRtf, DWORD dwPassedFlags = 0);
-BOOL TSAPI DoRtfToTags(const TWindowData *dat, CMString &pszText, int iNumColors, COLORREF *pColors);
+BOOL TSAPI DoRtfToTags(const TWindowData *dat, CMStringW &pszText, int iNumColors, COLORREF *pColors);
void TSAPI GetMYUIN(TWindowData *dat);
void TSAPI SetMessageLog(TWindowData *dat);
void TSAPI SwitchMessageLog(TWindowData *dat, int iMode);
diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp
index 088a42847b..6f0a78a476 100644
--- a/plugins/TabSRMM/src/msglog.cpp
+++ b/plugins/TabSRMM/src/msglog.cpp
@@ -420,7 +420,7 @@ static char* Template_CreateRTFFromDbEvent(TWindowData *dat, MCONTACT hContact,
dat->cache->updateStats(TSessionStats::SET_LAST_RCV, mir_strlen((char *)dbei.pBlob));
wchar_t *formatted = NULL;
- wchar_t *msg = DbGetEventTextT(&dbei, CP_UTF8);
+ wchar_t *msg = DbGetEventTextW(&dbei, CP_UTF8);
if (!msg) {
mir_free(dbei.pBlob);
return NULL;
@@ -684,7 +684,7 @@ static char* Template_CreateRTFFromDbEvent(TWindowData *dat, MCONTACT hContact,
str.Append(GetRTFFont(iFontIDOffset + (isSent ? MSGFONTID_MYTIME : MSGFONTID_YOURTIME)));
str.AppendChar(' ');
}
- AppendUnicodeToBuffer(str, TranslateTS(months[event_time.tm_mon]), MAKELONG(isSent, dat->bIsHistory));
+ AppendUnicodeToBuffer(str, TranslateW(months[event_time.tm_mon]), MAKELONG(isSent, dat->bIsHistory));
}
else skipToNext = TRUE;
break;
@@ -704,7 +704,7 @@ static char* Template_CreateRTFFromDbEvent(TWindowData *dat, MCONTACT hContact,
str.Append(GetRTFFont(iFontIDOffset + (isSent ? MSGFONTID_MYTIME : MSGFONTID_YOURTIME)));
str.AppendChar(' ');
}
- AppendUnicodeToBuffer(str, TranslateTS(weekDays[event_time.tm_wday]), MAKELONG(isSent, dat->bIsHistory));
+ AppendUnicodeToBuffer(str, TranslateW(weekDays[event_time.tm_wday]), MAKELONG(isSent, dat->bIsHistory));
}
else skipToNext = TRUE;
break;
@@ -844,7 +844,7 @@ static char* Template_CreateRTFFromDbEvent(TWindowData *dat, MCONTACT hContact,
str.AppendChar(' ');
}
- ptrW tszText(DbGetEventTextT(&dbei, CP_ACP));
+ ptrW tszText(DbGetEventTextW(&dbei, CP_ACP));
AppendUnicodeToBuffer(str, tszText, 0);
}
break;
diff --git a/plugins/TabSRMM/src/msgoptions.cpp b/plugins/TabSRMM/src/msgoptions.cpp
index 0be5543c4d..ac5bf6b4ce 100644
--- a/plugins/TabSRMM/src/msgoptions.cpp
+++ b/plugins/TabSRMM/src/msgoptions.cpp
@@ -173,7 +173,7 @@ static int TSAPI RescanSkins(HWND hwndCombobox)
FindClose(h);
SendMessage(hwndCombobox, CB_SETCURSEL, 0, 0);
- if (0 == db_get_ts(0, SRMSGMOD_T, "ContainerSkin", &dbv)) {
+ if (0 == db_get_ws(0, SRMSGMOD_T, "ContainerSkin", &dbv)) {
LRESULT lr = SendMessage(hwndCombobox, CB_GETCOUNT, 0, 0);
for (int i = 1; i < lr; i++) {
wchar_t *idata = (wchar_t*)SendMessage(hwndCombobox, CB_GETITEMDATA, i, 0);
@@ -344,7 +344,7 @@ static INT_PTR CALLBACK DlgProcSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
if (lr != CB_ERR && lr > 0) {
wchar_t *tszRelPath = (wchar_t*)SendDlgItemMessage(hwndDlg, IDC_SKINNAME, CB_GETITEMDATA, lr, 0);
if (tszRelPath && tszRelPath != (wchar_t*)CB_ERR)
- db_set_ts(0, SRMSGMOD_T, "ContainerSkin", tszRelPath);
+ db_set_ws(0, SRMSGMOD_T, "ContainerSkin", tszRelPath);
SendMessage(hwndDlg, WM_COMMAND, IDC_RELOADSKIN, 0);
}
else if (lr == 0) { // selected the <no skin> entry
@@ -398,7 +398,7 @@ void TreeViewInit(HWND hwndTree, UINT id, DWORD dwFlags, BOOL bFromMem)
tvi.hParent = 0;
tvi.hInsertAfter = TVI_LAST;
tvi.item.mask = TVIF_TEXT | TVIF_STATE | TVIF_IMAGE | TVIF_SELECTEDIMAGE;
- tvi.item.pszText = TranslateTS(lvGroups[i].szName);
+ tvi.item.pszText = TranslateW(lvGroups[i].szName);
tvi.item.stateMask = TVIS_EXPANDED | TVIS_BOLD;
tvi.item.state = TVIS_EXPANDED | TVIS_BOLD;
tvi.item.iImage = tvi.item.iSelectedImage = IMG_GRPOPEN;
@@ -408,7 +408,7 @@ void TreeViewInit(HWND hwndTree, UINT id, DWORD dwFlags, BOOL bFromMem)
for (int i = 0; lvItems[i].szName != NULL; i++) {
tvi.hParent = (HTREEITEM)lvGroups[lvItems[i].uGroup].handle;
tvi.hInsertAfter = TVI_LAST;
- tvi.item.pszText = TranslateTS(lvItems[i].szName);
+ tvi.item.pszText = TranslateW(lvItems[i].szName);
tvi.item.mask = TVIF_TEXT | TVIF_PARAM | TVIF_IMAGE | TVIF_SELECTEDIMAGE;
tvi.item.lParam = i;
if (bFromMem == FALSE) {
@@ -1096,7 +1096,7 @@ static INT_PTR CALLBACK DlgProcContainerSettings(HWND hwndDlg, UINT msg, WPARAM
CheckDlgButton(hwndDlg, IDC_USEAERO, M.GetByte("useAero", 1) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_USEAEROPEEK, M.GetByte("useAeroPeek", 1) ? BST_CHECKED : BST_UNCHECKED);
for (int i = 0; i < CSkin::AERO_EFFECT_LAST; i++)
- SendDlgItemMessage(hwndDlg, IDC_AEROEFFECT, CB_INSERTSTRING, -1, (LPARAM)TranslateTS(CSkin::m_aeroEffects[i].tszName));
+ SendDlgItemMessage(hwndDlg, IDC_AEROEFFECT, CB_INSERTSTRING, -1, (LPARAM)TranslateW(CSkin::m_aeroEffects[i].tszName));
SendDlgItemMessage(hwndDlg, IDC_AEROEFFECT, CB_SETCURSEL, (WPARAM)CSkin::m_aeroEffect, 0);
Utils::enableDlgControl(hwndDlg, IDC_AEROEFFECT, PluginConfig.m_bIsVista);
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp
index 57be74dd2b..e88962717b 100644
--- a/plugins/TabSRMM/src/msgs.cpp
+++ b/plugins/TabSRMM/src/msgs.cpp
@@ -816,7 +816,7 @@ static int TSAPI SetupIconLibConfig()
SKINICONDESC sid = { 0 };
sid.defaultFile.w = szFilename;
- sid.flags = SIDF_PATH_TCHAR;
+ sid.flags = SIDF_PATH_UNICODE;
for (int n = 0; n < _countof(ICONBLOCKS); n++) {
sid.section.a = ICONBLOCKS[n].szSection;
diff --git a/plugins/TabSRMM/src/selectcontainer.cpp b/plugins/TabSRMM/src/selectcontainer.cpp
index 6529bfaabf..36386a79b9 100644
--- a/plugins/TabSRMM/src/selectcontainer.cpp
+++ b/plugins/TabSRMM/src/selectcontainer.cpp
@@ -179,7 +179,7 @@ INT_PTR CALLBACK SelectContainerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L
TContainerData *pContainer = 0;
do {
mir_snprintf(szValue, "%d", iCounter);
- if (db_get_ts(NULL, szKey, szValue, &dbv))
+ if (db_get_ws(NULL, szKey, szValue, &dbv))
break; // end of list
if (dbv.type == DBVT_ASCIIZ || dbv.type == DBVT_WCHAR) {
if (wcsncmp(dbv.ptszVal, L"**mir_free**", CONTAINER_NAMELEN)) {
diff --git a/plugins/TabSRMM/src/sendqueue.cpp b/plugins/TabSRMM/src/sendqueue.cpp
index aed683997e..99bab331e2 100644
--- a/plugins/TabSRMM/src/sendqueue.cpp
+++ b/plugins/TabSRMM/src/sendqueue.cpp
@@ -450,13 +450,13 @@ void SendQueue::UpdateSaveAndSendButton(TWindowData *dat)
if (len) { // looks complex but avoids flickering on the button while typing.
if (!(dat->dwFlags & MWF_SAVEBTN_SAV)) {
SendDlgItemMessage(hwndDlg, IDC_SAVE, BM_SETIMAGE, IMAGE_ICON, (LPARAM)PluginConfig.g_buttonBarIcons[ICON_BUTTON_SAVE]);
- SendDlgItemMessage(hwndDlg, IDC_SAVE, BUTTONADDTOOLTIP, (WPARAM)pszIDCSAVE_save, BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_SAVE, BUTTONADDTOOLTIP, (WPARAM)pszIDCSAVE_save, BATF_UNICODE);
dat->dwFlags |= MWF_SAVEBTN_SAV;
}
}
else {
SendDlgItemMessage(hwndDlg, IDC_SAVE, BM_SETIMAGE, IMAGE_ICON, (LPARAM)PluginConfig.g_buttonBarIcons[ICON_BUTTON_CANCEL]);
- SendDlgItemMessage(hwndDlg, IDC_SAVE, BUTTONADDTOOLTIP, (WPARAM)pszIDCSAVE_close, BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_SAVE, BUTTONADDTOOLTIP, (WPARAM)pszIDCSAVE_close, BATF_UNICODE);
dat->dwFlags &= ~MWF_SAVEBTN_SAV;
}
dat->textLen = len;
@@ -667,7 +667,7 @@ int SendQueue::doSendLater(int iJobIndex, TWindowData *dat, MCONTACT hContact, b
if (dat->pContainer->hwndActive == dat->hwnd)
UpdateReadChars(dat);
SendDlgItemMessage(dat->hwnd, IDC_SAVE, BM_SETIMAGE, IMAGE_ICON, (LPARAM)PluginConfig.g_buttonBarIcons[ICON_BUTTON_CANCEL]);
- SendDlgItemMessage(dat->hwnd, IDC_SAVE, BUTTONADDTOOLTIP, (WPARAM)pszIDCSAVE_close, BATF_TCHAR);
+ SendDlgItemMessage(dat->hwnd, IDC_SAVE, BUTTONADDTOOLTIP, (WPARAM)pszIDCSAVE_close, BATF_UNICODE);
dat->dwFlags &= ~MWF_SAVEBTN_SAV;
if (!fAvail)
diff --git a/plugins/TabSRMM/src/templates.cpp b/plugins/TabSRMM/src/templates.cpp
index 48c8168a55..abdb089cf8 100644
--- a/plugins/TabSRMM/src/templates.cpp
+++ b/plugins/TabSRMM/src/templates.cpp
@@ -81,7 +81,7 @@ static void LoadTemplatesFrom(TTemplateSet *tSet, MCONTACT hContact, int rtl)
{
for (int i = 0; i <= TMPL_ERRMSG; i++) {
DBVARIANT dbv = { 0 };
- if (db_get_ts(hContact, rtl ? RTLTEMPLATES_MODULE : TEMPLATES_MODULE, TemplateNames[i], &dbv))
+ if (db_get_ws(hContact, rtl ? RTLTEMPLATES_MODULE : TEMPLATES_MODULE, TemplateNames[i], &dbv))
continue;
if (dbv.type == DBVT_ASCIIZ || dbv.type == DBVT_WCHAR)
wcsncpy_s(tSet->szTemplates[i], dbv.ptszVal, _TRUNCATE);
@@ -96,12 +96,12 @@ void LoadDefaultTemplates()
if (M.GetByte(RTLTEMPLATES_MODULE, "setup", 0) < 2) {
for (int i = 0; i <= TMPL_ERRMSG; i++)
- db_set_ts(NULL, RTLTEMPLATES_MODULE, TemplateNames[i], RTL_Default.szTemplates[i]);
+ db_set_ws(NULL, RTLTEMPLATES_MODULE, TemplateNames[i], RTL_Default.szTemplates[i]);
db_set_b(0, RTLTEMPLATES_MODULE, "setup", 2);
}
if (M.GetByte(TEMPLATES_MODULE, "setup", 0) < 2) {
for (int i = 0; i <= TMPL_ERRMSG; i++)
- db_set_ts(NULL, TEMPLATES_MODULE, TemplateNames[i], LTR_Default.szTemplates[i]);
+ db_set_ws(NULL, TEMPLATES_MODULE, TemplateNames[i], LTR_Default.szTemplates[i]);
db_set_b(0, TEMPLATES_MODULE, "setup", 2);
}
LoadTemplatesFrom(&LTR_Active, 0, 0);
@@ -258,7 +258,7 @@ INT_PTR CALLBACK DlgProcTemplateEditor(HWND hwndDlg, UINT msg, WPARAM wParam, LP
Utils::enableDlgControl(hwndDlg, IDC_TEMPLATELIST, TRUE);
Utils::enableDlgControl(hwndDlg, IDC_REVERT, FALSE);
InvalidateRect(GetDlgItem(hwndDlg, IDC_TEMPLATELIST), NULL, FALSE);
- db_set_ts(teInfo->hContact, teInfo->rtl ? RTLTEMPLATES_MODULE : TEMPLATES_MODULE, TemplateNames[teInfo->inEdit], newTemplate);
+ db_set_ws(teInfo->hContact, teInfo->rtl ? RTLTEMPLATES_MODULE : TEMPLATES_MODULE, TemplateNames[teInfo->inEdit], newTemplate);
SendDlgItemMessage(hwndDlg, IDC_EDITTEMPLATE, EM_SETREADONLY, TRUE, 0);
}
break;
diff --git a/plugins/TabSRMM/src/themes.cpp b/plugins/TabSRMM/src/themes.cpp
index d2ba2c8e3c..f0ea77ee67 100644
--- a/plugins/TabSRMM/src/themes.cpp
+++ b/plugins/TabSRMM/src/themes.cpp
@@ -1002,7 +1002,7 @@ void CImageItem::Colorize(HBITMAP hBitmap, BYTE dr, BYTE dg, BYTE db, BYTE alpha
HBITMAP TSAPI CImageItem::LoadPNG(const wchar_t *szFilename)
{
HBITMAP hBitmap = 0;
- hBitmap = (HBITMAP)CallService(MS_IMG_LOAD, (WPARAM)szFilename, IMGL_TCHAR);
+ hBitmap = (HBITMAP)CallService(MS_IMG_LOAD, (WPARAM)szFilename, IMGL_WCHAR);
return hBitmap;
}
@@ -1015,8 +1015,8 @@ HBITMAP TSAPI CImageItem::LoadPNG(const wchar_t *szFilename)
void CSkin::setFileName()
{
DBVARIANT dbv;
- if (0 == db_get_ts(0, SRMSGMOD_T, "ContainerSkin", &dbv)) {
- PathToAbsoluteT(dbv.ptszVal, m_tszFileName, M.getSkinPath());
+ if (0 == db_get_ws(0, SRMSGMOD_T, "ContainerSkin", &dbv)) {
+ PathToAbsoluteW(dbv.ptszVal, m_tszFileName, M.getSkinPath());
db_free(&dbv);
}
else
@@ -1676,7 +1676,7 @@ void CSkin::setupAeroSkins()
mir_snwprintf(tszFilename, L"%scustom_unknown.png", tszBasePath);
if (!PathFileExists(tszFilename))
mir_snwprintf(tszFilename, L"%sunknown.png", tszBasePath);
- PluginConfig.g_hbmUnknown = (HBITMAP)CallService(MS_IMG_LOAD, (WPARAM)tszFilename, IMGL_TCHAR);
+ PluginConfig.g_hbmUnknown = (HBITMAP)CallService(MS_IMG_LOAD, (WPARAM)tszFilename, IMGL_WCHAR);
if (PluginConfig.g_hbmUnknown == 0) {
HDC dc = GetDC(0);
PluginConfig.g_hbmUnknown = CreateCompatibleBitmap(dc, 20, 20);
@@ -1733,7 +1733,7 @@ void CSkin::setupAeroSkins()
m_dwmColorRGB = RGB((BYTE)fr, (BYTE)fg, (BYTE)fb);
- FIBITMAP *fib = (FIBITMAP *)CallService(MS_IMG_LOAD, (WPARAM)tszFilename, IMGL_TCHAR | IMGL_RETURNDIB);
+ FIBITMAP *fib = (FIBITMAP *)CallService(MS_IMG_LOAD, (WPARAM)tszFilename, IMGL_WCHAR | IMGL_RETURNDIB);
HBITMAP hbm = FIF->FI_CreateHBITMAPFromDIB(fib);
@@ -1775,7 +1775,7 @@ void CSkin::setupAeroSkins()
if (!PathFileExists(tszFilename))
mir_snwprintf(tszFilename, L"%stabskin_aero_glow.png", tszBasePath);
- fib = (FIBITMAP *)CallService(MS_IMG_LOAD, (WPARAM)tszFilename, IMGL_TCHAR | IMGL_RETURNDIB);
+ fib = (FIBITMAP *)CallService(MS_IMG_LOAD, (WPARAM)tszFilename, IMGL_WCHAR | IMGL_RETURNDIB);
COLORREF glowColor = M.GetDword(FONTMODULE, "aeroGlow", RGB(40, 40, 255));
hbm = FIF->FI_CreateHBITMAPFromDIB(fib);
@@ -1808,7 +1808,7 @@ void CSkin::setupAeroSkins()
if (!PathFileExists(tszFilename))
mir_snwprintf(tszFilename, L"%stabskin_aero_button.png", tszBasePath);
- hbm = (HBITMAP)CallService(MS_IMG_LOAD, (WPARAM)tszFilename, IMGL_TCHAR);
+ hbm = (HBITMAP)CallService(MS_IMG_LOAD, (WPARAM)tszFilename, IMGL_WCHAR);
CImageItem::Colorize(hbm, GetRValue(m_dwmColorRGB),
GetGValue(m_dwmColorRGB),
@@ -2442,7 +2442,7 @@ void CSkin::extractSkinsAndLogo(bool fForceOverwrite) const
if (tszBasePath[mir_wstrlen(tszBasePath) - 1] != '\\')
mir_wstrcat(tszBasePath, L"\\");
- CreateDirectoryTreeT(tszBasePath);
+ CreateDirectoryTreeW(tszBasePath);
m_fAeroSkinsValid = true;
diff --git a/plugins/TabSRMM/src/typingnotify.cpp b/plugins/TabSRMM/src/typingnotify.cpp
index 0c05c1ba27..08dd764a9c 100644
--- a/plugins/TabSRMM/src/typingnotify.cpp
+++ b/plugins/TabSRMM/src/typingnotify.cpp
@@ -60,7 +60,7 @@ static LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPA
switch (message) {
case WM_COMMAND:
if (HIWORD(wParam) == STN_CLICKED) {
- CallService(MS_MSG_SENDMESSAGET, (WPARAM)PUGetContact(hWnd), 0);
+ CallService(MS_MSG_SENDMESSAGEW, (WPARAM)PUGetContact(hWnd), 0);
PUDeletePopup(hWnd);
return 1;
}
diff --git a/plugins/TabSRMM/src/utils.cpp b/plugins/TabSRMM/src/utils.cpp
index 5ce367b1a0..644134e6dd 100644
--- a/plugins/TabSRMM/src/utils.cpp
+++ b/plugins/TabSRMM/src/utils.cpp
@@ -241,7 +241,7 @@ static wchar_t* Trunc500(wchar_t *str)
return str;
}
-bool Utils::FormatTitleBar(const TWindowData *dat, const wchar_t *szFormat, CMString &dest)
+bool Utils::FormatTitleBar(const TWindowData *dat, const wchar_t *szFormat, CMStringW &dest)
{
if (dat == 0)
return false;
@@ -286,7 +286,7 @@ bool Utils::FormatTitleBar(const TWindowData *dat, const wchar_t *szFormat, CMSt
{
BYTE xStatus = dat->cache->getXStatusId();
if (dat->wStatus != ID_STATUS_OFFLINE && xStatus > 0 && xStatus <= 31) {
- ptrW szXStatus(db_get_tsa(dat->hContact, dat->szProto, "XStatusName"));
+ ptrW szXStatus(db_get_wsa(dat->hContact, dat->szProto, "XStatusName"));
dest.Append((szXStatus != NULL) ? Trunc500(szXStatus) : xStatusDescr[xStatus - 1]);
}
}
@@ -296,7 +296,7 @@ bool Utils::FormatTitleBar(const TWindowData *dat, const wchar_t *szFormat, CMSt
{
BYTE xStatus = dat->cache->getXStatusId();
if (dat->wStatus != ID_STATUS_OFFLINE && xStatus > 0 && xStatus <= 31) {
- ptrW szXStatus(db_get_tsa(dat->hContact, dat->szProto, "XStatusName"));
+ ptrW szXStatus(db_get_wsa(dat->hContact, dat->szProto, "XStatusName"));
dest.Append((szXStatus != NULL) ? Trunc500(szXStatus) : xStatusDescr[xStatus - 1]);
}
else dest.Append(dat->szStatus && dat->szStatus[0] ? dat->szStatus : L"(undef)");
@@ -317,7 +317,7 @@ bool Utils::FormatTitleBar(const TWindowData *dat, const wchar_t *szFormat, CMSt
case 'g':
{
- ptrW tszGroup(db_get_tsa(dat->hContact, "CList", "Group"));
+ ptrW tszGroup(db_get_wsa(dat->hContact, "CList", "Group"));
if (tszGroup != NULL)
dest.Append(tszGroup);
}
@@ -363,7 +363,7 @@ WCHAR* Utils::FilterEventMarkers(WCHAR *wszText)
void Utils::DoubleAmpersands(wchar_t *pszText, size_t len)
{
- CMString text(pszText);
+ CMStringW text(pszText);
text.Replace(L"&", L"&&");
mir_wstrncpy(pszText, text.c_str(), len);
}
@@ -573,7 +573,7 @@ void Utils::SaveContainerSettings(TContainerData *pContainer, const char *szSett
if (mir_wstrlen(pContainer->szRelThemeFile) > 1) {
if (pContainer->fPrivateThemeChanged == TRUE) {
PathToRelativeT(pContainer->szRelThemeFile, pContainer->szAbsThemeFile, M.getDataPath());
- db_set_ts(NULL, SRMSGMOD_T, szCName, pContainer->szAbsThemeFile);
+ db_set_ws(NULL, SRMSGMOD_T, szCName, pContainer->szAbsThemeFile);
pContainer->fPrivateThemeChanged = FALSE;
}
}
@@ -1084,14 +1084,14 @@ LRESULT CWarning::show(const int uId, DWORD dwFlags, const wchar_t* tszTxt)
else {
if (uId != -1) {
if (dwFlags & CWF_UNTRANSLATED)
- _s = TranslateTS(warnings[uId]);
+ _s = TranslateW(warnings[uId]);
else {
// revert to untranslated warning when the translated message
// is not well-formatted.
- _s = TranslateTS(warnings[uId]);
+ _s = TranslateW(warnings[uId]);
if (mir_wstrlen(_s) < 3 || 0 == wcschr(_s, '|'))
- _s = TranslateTS(warnings[uId]);
+ _s = TranslateW(warnings[uId]);
}
}
else
diff --git a/plugins/TabSRMM/src/utils.h b/plugins/TabSRMM/src/utils.h
index cd6ca460a8..ce3ef737b1 100644
--- a/plugins/TabSRMM/src/utils.h
+++ b/plugins/TabSRMM/src/utils.h
@@ -56,7 +56,7 @@ public:
static wchar_t* GetPreviewWithEllipsis(wchar_t *szText, size_t iMaxLen);
static wchar_t* FilterEventMarkers(wchar_t *wszText);
static LPCTSTR FormatRaw(TWindowData *dat, const wchar_t *msg, int flags, BOOL isSent);
- static bool FormatTitleBar(const TWindowData *dat, const wchar_t *szFormat, CMString &dest);
+ static bool FormatTitleBar(const TWindowData *dat, const wchar_t *szFormat, CMStringW &dest);
static char* FilterEventMarkers(char *szText);
static void DoubleAmpersands(wchar_t *pszText, size_t len);
static void RTF_CTableInit();
diff --git a/plugins/TipperYM/src/bitmap_func.cpp b/plugins/TipperYM/src/bitmap_func.cpp
index fe9ecfce84..dcaf7b776c 100644
--- a/plugins/TipperYM/src/bitmap_func.cpp
+++ b/plugins/TipperYM/src/bitmap_func.cpp
@@ -154,7 +154,7 @@ void CreateFromBitmaps(bool bServiceTip)
if (tszFileName && *tszFileName != 0) {
FIBITMAP *fib = NULL;
if (!skin.bCached) {
- FIBITMAP *fibLoad = (FIBITMAP *)CallService(MS_IMG_LOAD, (WPARAM)tszFileName, IMGL_TCHAR | IMGL_RETURNDIB);
+ FIBITMAP *fibLoad = (FIBITMAP *)CallService(MS_IMG_LOAD, (WPARAM)tszFileName, IMGL_WCHAR | IMGL_RETURNDIB);
if (!fibLoad) continue;
if (fii->FI_GetBPP(fibLoad) != 32)
diff --git a/plugins/TipperYM/src/message_pump.cpp b/plugins/TipperYM/src/message_pump.cpp
index 558faed14f..f0e86cabb9 100644
--- a/plugins/TipperYM/src/message_pump.cpp
+++ b/plugins/TipperYM/src/message_pump.cpp
@@ -161,7 +161,7 @@ unsigned int CALLBACK MessagePumpThread(void*)
}
if (swzMsg) {
- db_set_ts((DWORD_PTR)clcitex->hItem, MODULE, "TempStatusMsg", swzMsg);
+ db_set_ws((DWORD_PTR)clcitex->hItem, MODULE, "TempStatusMsg", swzMsg);
mir_free(swzMsg);
}
diff --git a/plugins/TipperYM/src/options.cpp b/plugins/TipperYM/src/options.cpp
index ae1b3e931b..157982366c 100644
--- a/plugins/TipperYM/src/options.cpp
+++ b/plugins/TipperYM/src/options.cpp
@@ -36,7 +36,7 @@ extern int IsTrayProto(const wchar_t *swzProto, BOOL bExtendedTip)
DBVARIANT dbv;
int result = 1;
- if (!db_get_ts(NULL, MODULE, szSetting, &dbv)) {
+ if (!db_get_ws(NULL, MODULE, szSetting, &dbv)) {
result = wcsstr(dbv.ptszVal, swzProto) ? 1 : 0;
db_free(&dbv);
}
@@ -77,7 +77,7 @@ void CreateDefaultItems()
}
DIListNode *di_node = (DIListNode *)mir_alloc(sizeof(DIListNode));
- wcsncpy(di_node->di.swzLabel, TranslateTS(item->swzLabel), LABEL_LEN);
+ wcsncpy(di_node->di.swzLabel, TranslateW(item->swzLabel), LABEL_LEN);
wcsncpy(di_node->di.swzValue, item->swzValue, VALUE_LEN);
di_node->di.bLineAbove = false;
di_node->di.bValueNewline = defaultItemList[i].bValueNewline;
@@ -97,7 +97,7 @@ bool LoadDS(DISPLAYSUBST *ds, int index)
mir_snprintf(setting, "Name%d", index);
ds->swzName[0] = 0;
- if (db_get_ts(0, MODULE_ITEMS, setting, &dbv))
+ if (db_get_ws(0, MODULE_ITEMS, setting, &dbv))
return false;
wcsncpy(ds->swzName, dbv.ptszVal, _countof(ds->swzName));
@@ -140,7 +140,7 @@ void SaveDS(DISPLAYSUBST *ds, int index)
char setting[512];
mir_snprintf(setting, "Name%d", index);
- db_set_ts(0, MODULE_ITEMS, setting, ds->swzName);
+ db_set_ws(0, MODULE_ITEMS, setting, ds->swzName);
mir_snprintf(setting, "Type%d", index);
db_set_b(0, MODULE_ITEMS, setting, (BYTE)ds->type);
mir_snprintf(setting, "Module%d", index);
@@ -158,7 +158,7 @@ bool LoadDI(DISPLAYITEM *di, int index)
mir_snprintf(setting, "DILabel%d", index);
di->swzLabel[0] = 0;
- if (db_get_ts(0, MODULE_ITEMS, setting, &dbv))
+ if (db_get_ws(0, MODULE_ITEMS, setting, &dbv))
return false;
wcsncpy(di->swzLabel, dbv.ptszVal, _countof(di->swzLabel));
@@ -167,7 +167,7 @@ bool LoadDI(DISPLAYITEM *di, int index)
mir_snprintf(setting, "DIValue%d", index);
di->swzValue[0] = 0;
- if (!db_get_ts(0, MODULE_ITEMS, setting, &dbv)) {
+ if (!db_get_ws(0, MODULE_ITEMS, setting, &dbv)) {
wcsncpy(di->swzValue, dbv.ptszVal, _countof(di->swzValue));
di->swzValue[_countof(di->swzValue) - 1] = 0;
db_free(&dbv);
@@ -192,14 +192,14 @@ void SaveDI(DISPLAYITEM *di, int index)
char setting[512];
mir_snprintf(setting, "DILabel%d", index);
- if (db_set_ts(0, MODULE_ITEMS, setting, di->swzLabel)) {
+ if (db_set_ws(0, MODULE_ITEMS, setting, di->swzLabel)) {
char buff[LABEL_LEN];
t2a(di->swzLabel, buff, LABEL_LEN);
db_set_s(0, MODULE_ITEMS, setting, buff);
}
mir_snprintf(setting, "DIValue%d", index);
- if (db_set_ts(0, MODULE_ITEMS, setting, di->swzValue)) {
+ if (db_set_ws(0, MODULE_ITEMS, setting, di->swzValue)) {
char buff[VALUE_LEN];
t2a(di->swzValue, buff, VALUE_LEN);
db_set_s(0, MODULE_ITEMS, setting, buff);
@@ -307,7 +307,7 @@ void LoadObsoleteSkinSetting()
mir_snprintf(setting, "SPaintMode%d", i);
opt.transfMode[i] = (TransformationMode)db_get_b(0, MODULE, setting, 0);
mir_snprintf(setting, "SImgFile%d", i);
- if (!db_get_ts(NULL, MODULE, setting, &dbv)) {
+ if (!db_get_ws(NULL, MODULE, setting, &dbv)) {
opt.szImgFile[i] = mir_wstrdup(dbv.ptszVal);
db_free(&dbv);
}
@@ -515,7 +515,7 @@ void LoadOptions()
LoadObsoleteSkinSetting();
}
else if (opt.skinMode == SM_IMAGE) {
- if (!db_get_ts(NULL, MODULE, "SkinName", &dbv)) {
+ if (!db_get_ws(NULL, MODULE, "SkinName", &dbv)) {
wcsncpy(opt.szSkinName, dbv.ptszVal, _countof(opt.szSkinName) - 1);
db_free(&dbv);
}
@@ -544,7 +544,7 @@ INT_PTR CALLBACK DlgProcAddItem(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
SetDlgItemText(hwndDlg, IDC_ED_VALUE, di->swzValue);
for (int i = 0; i < _countof(displayItemTypes); i++) {
- int index = SendDlgItemMessage(hwndDlg, IDC_CMB_TYPE, CB_ADDSTRING, (WPARAM)-1, (LPARAM)TranslateTS(displayItemTypes[i].title));
+ int index = SendDlgItemMessage(hwndDlg, IDC_CMB_TYPE, CB_ADDSTRING, (WPARAM)-1, (LPARAM)TranslateW(displayItemTypes[i].title));
SendDlgItemMessage(hwndDlg, IDC_CMB_TYPE, CB_SETITEMDATA, index, (LPARAM)displayItemTypes[i].type);
if (displayItemTypes[i].type == di->type)
SendDlgItemMessage(hwndDlg, IDC_CMB_TYPE, CB_SETCURSEL, index, 0);
@@ -555,7 +555,7 @@ INT_PTR CALLBACK DlgProcAddItem(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
CheckDlgButton(hwndDlg, IDC_CHK_PARSETIPPERFIRST, di->bParseTipperVarsFirst ? BST_CHECKED : BST_UNCHECKED);
for (int i = 0; presetItems[i].szID; i++)
- SendDlgItemMessage(hwndDlg, IDC_CMB_PRESETITEMS, CB_ADDSTRING, 0, (LPARAM)TranslateTS(presetItems[i].swzName));
+ SendDlgItemMessage(hwndDlg, IDC_CMB_PRESETITEMS, CB_ADDSTRING, 0, (LPARAM)TranslateW(presetItems[i].swzName));
variables_skin_helpbutton(hwndDlg, IDC_BTN_VARIABLE);
@@ -587,7 +587,7 @@ INT_PTR CALLBACK DlgProcAddItem(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
wchar_t buff[256];
SendDlgItemMessage(hwndDlg, IDC_CMB_PRESETITEMS, CB_GETLBTEXT, sel, (LPARAM)buff);
for (int i = 0; presetItems[i].szID; i++) {
- if (mir_wstrcmp(buff, TranslateTS(presetItems[i].swzName)) == 0) {
+ if (mir_wstrcmp(buff, TranslateW(presetItems[i].swzName)) == 0) {
if (presetItems[i].szNeededSubst[0])
EndDialog(hwndDlg, IDPRESETITEM + i);
else
@@ -623,8 +623,8 @@ INT_PTR CALLBACK DlgProcAddItem(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
wchar_t buff[256];
SendDlgItemMessage(hwndDlg, IDC_CMB_PRESETITEMS, CB_GETLBTEXT, sel, (LPARAM)buff);
for (int i = 0; presetItems[i].szID; i++) {
- if (mir_wstrcmp(buff, TranslateTS(presetItems[i].swzName)) == 0) {
- SetDlgItemText(hwndDlg, IDC_ED_LABEL, TranslateTS(presetItems[i].swzLabel));
+ if (mir_wstrcmp(buff, TranslateW(presetItems[i].swzName)) == 0) {
+ SetDlgItemText(hwndDlg, IDC_ED_LABEL, TranslateW(presetItems[i].swzLabel));
SetDlgItemText(hwndDlg, IDC_ED_VALUE, presetItems[i].swzValue);
break;
}
@@ -664,7 +664,7 @@ INT_PTR CALLBACK DlgProcAddSubst(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
}
for (int i = 0; i < iTransFuncsCount; i++) {
- int index = SendDlgItemMessage(hwndDlg, IDC_CMB_TRANSLATE, CB_ADDSTRING, (WPARAM)-1, (LPARAM)TranslateTS(translations[i].swzName));
+ int index = SendDlgItemMessage(hwndDlg, IDC_CMB_TRANSLATE, CB_ADDSTRING, (WPARAM)-1, (LPARAM)TranslateW(translations[i].swzName));
SendDlgItemMessage(hwndDlg, IDC_CMB_TRANSLATE, CB_SETITEMDATA, index, (LPARAM)translations[i].id);
}
@@ -769,7 +769,7 @@ INT_PTR CALLBACK DlgProcOptsContent(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
for (int i = 0; i < _countof(btns); i++) {
SendDlgItemMessage(hwndDlg, btns[i].id, BUTTONSETASFLATBTN, TRUE, 0);
- SendDlgItemMessage(hwndDlg, btns[i].id, BUTTONADDTOOLTIP, (WPARAM)TranslateTS(btns[i].swzTooltip), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, btns[i].id, BUTTONADDTOOLTIP, (WPARAM)TranslateW(btns[i].swzTooltip), BATF_UNICODE);
if (btns[i].uintCoreIconId)
SendDlgItemMessage(hwndDlg, btns[i].id, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_LoadIcon(btns[i].uintCoreIconId));
else {
@@ -1463,7 +1463,7 @@ INT_PTR CALLBACK DlgProcOptsExtra(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
tvi.item.stateMask = TVIS_STATEIMAGEMASK;
for (int i = 0; i < _countof(extraIconName); i++) {
tvi.item.lParam = (LPARAM)&exIcons[i];
- tvi.item.pszText = TranslateTS(extraIconName[exIcons[i].order]);
+ tvi.item.pszText = TranslateW(extraIconName[exIcons[i].order]);
tvi.item.state = INDEXTOSTATEIMAGEMASK(exIcons[i].vis ? 2 : 1);
TreeView_InsertItem(GetDlgItem(hwndDlg, IDC_TREE_EXTRAICONS), &tvi);
}
@@ -1703,19 +1703,19 @@ INT_PTR CALLBACK DlgProcOptsSkin(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
iLastSel = RefreshSkinList(hwndDlg);
SendDlgItemMessage(hwndDlg, IDC_BTN_RELOADLIST, BUTTONSETASFLATBTN, TRUE, 0);
- SendDlgItemMessage(hwndDlg, IDC_BTN_RELOADLIST, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Reload skin list"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_BTN_RELOADLIST, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Reload skin list"), BATF_UNICODE);
HICON hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_RELOAD));
SendDlgItemMessage(hwndDlg, IDC_BTN_RELOADLIST, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon);
DestroyIcon(hIcon);
SendDlgItemMessage(hwndDlg, IDC_BTN_APPLYSKIN, BUTTONSETASFLATBTN, TRUE, 0);
- SendDlgItemMessage(hwndDlg, IDC_BTN_APPLYSKIN, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Apply skin"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_BTN_APPLYSKIN, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Apply skin"), BATF_UNICODE);
hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_APPLY));
SendDlgItemMessage(hwndDlg, IDC_BTN_APPLYSKIN, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon);
DestroyIcon(hIcon);
SendDlgItemMessage(hwndDlg, IDC_BTN_GETSKINS, BUTTONSETASFLATBTN, TRUE, 0);
- SendDlgItemMessage(hwndDlg, IDC_BTN_GETSKINS, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Get more skins"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_BTN_GETSKINS, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Get more skins"), BATF_UNICODE);
SendDlgItemMessage(hwndDlg, IDC_BTN_GETSKINS, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_LoadIcon(SKINICON_EVENT_URL));
@@ -1751,7 +1751,7 @@ INT_PTR CALLBACK DlgProcOptsSkin(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
if (opt.szPreviewFile[0]) {
HDC hdcMem = CreateCompatibleDC(dis->hDC);
- HBITMAP hbmpPreview = (HBITMAP)CallService(MS_IMG_LOAD, (WPARAM)opt.szPreviewFile, IMGL_TCHAR);
+ HBITMAP hbmpPreview = (HBITMAP)CallService(MS_IMG_LOAD, (WPARAM)opt.szPreviewFile, IMGL_WCHAR);
if (hbmpPreview) {
int iWidth = dis->rcItem.right - dis->rcItem.left;
int iHeight = dis->rcItem.bottom - dis->rcItem.top;
@@ -1828,7 +1828,7 @@ INT_PTR CALLBACK DlgProcOptsSkin(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
}
db_set_b(0, MODULE, "SkinEngine", opt.skinMode);
- db_set_ts(0, MODULE, "SkinName", opt.szSkinName);
+ db_set_ws(0, MODULE, "SkinName", opt.szSkinName);
DestroySkinBitmap();
SetDlgItemInt(hwndDlg, IDC_ED_TRANS, opt.iOpacity, FALSE);
@@ -1976,7 +1976,7 @@ INT_PTR CALLBACK DlgProcOptsTraytip(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
}
for (i = 0; i < _countof(trayTipItems); i++) {
- tvi.item.pszText = TranslateTS(trayTipItems[i]);
+ tvi.item.pszText = TranslateW(trayTipItems[i]);
tvi.item.state = INDEXTOSTATEIMAGEMASK(opt.iFirstItems & (1 << i) ? 2 : 1);
TreeView_InsertItem(GetDlgItem(hwndDlg, IDC_TREE_FIRST_ITEMS), &tvi);
tvi.item.state = INDEXTOSTATEIMAGEMASK(opt.iSecondItems & (1 << i) ? 2 : 1);
@@ -2045,7 +2045,7 @@ INT_PTR CALLBACK DlgProcOptsTraytip(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
item.hItem = TreeView_GetNextSibling(GetDlgItem(hwndDlg, IDC_TREE_FIRST_PROTOS), item.hItem);
}
- db_set_ts(0, MODULE, "TrayProtocols", swzProtos);
+ db_set_ws(0, MODULE, "TrayProtocols", swzProtos);
swzProtos[0] = 0;
item.hItem = TreeView_GetRoot(GetDlgItem(hwndDlg, IDC_TREE_SECOND_PROTOS));
@@ -2060,7 +2060,7 @@ INT_PTR CALLBACK DlgProcOptsTraytip(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
item.hItem = TreeView_GetNextSibling(GetDlgItem(hwndDlg, IDC_TREE_SECOND_PROTOS), item.hItem);
}
- db_set_ts(0, MODULE, "TrayProtocolsEx", swzProtos);
+ db_set_ws(0, MODULE, "TrayProtocolsEx", swzProtos);
int count = 0;
opt.iFirstItems = 0;
diff --git a/plugins/TipperYM/src/popwin.cpp b/plugins/TipperYM/src/popwin.cpp
index 117758d058..f10def056c 100644
--- a/plugins/TipperYM/src/popwin.cpp
+++ b/plugins/TipperYM/src/popwin.cpp
@@ -382,7 +382,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa
if (pwd->bIsIconVisible[5]) {
for (i = 0; opt.exIconsOrder[i] != 5; i++);
if (ServiceExists(MS_FP_GETCLIENTICONT)) {
- ptrW tszVersion(db_get_tsa(pwd->hContact, szProto, "MirVer"));
+ ptrW tszVersion(db_get_wsa(pwd->hContact, szProto, "MirVer"));
if (tszVersion != NULL) {
pwd->extraIcons[i].hIcon = Finger_GetClientIcon(tszVersion, 0);
pwd->extraIcons[i].bDestroy = true;
@@ -965,7 +965,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa
case PUM_SETSTATUSTEXT:
if (pwd && wParam == pwd->hContact) {
- db_set_ts(pwd->hContact, MODULE, "TempStatusMsg", (wchar_t *)lParam);
+ db_set_ws(pwd->hContact, MODULE, "TempStatusMsg", (wchar_t *)lParam);
pwd->bIsPainted = false;
pwd->bNeedRefresh = true;
SendMessage(hwnd, PUM_REFRESH_VALUES, TRUE, 0);
diff --git a/plugins/TipperYM/src/skin_parser.cpp b/plugins/TipperYM/src/skin_parser.cpp
index c115fd6643..8aa9c4869c 100644
--- a/plugins/TipperYM/src/skin_parser.cpp
+++ b/plugins/TipperYM/src/skin_parser.cpp
@@ -209,7 +209,7 @@ void ParseFontPart(FILE *fp, wchar_t *buff)
if (mir_wstrlen(pch) > 32)
pch[32] = 0;
- db_set_ts(0, MODULE, szSetting, pch);
+ db_set_ws(0, MODULE, szSetting, pch);
}
}
else if (wcsstr(buff, L"color"))
diff --git a/plugins/TipperYM/src/subst.cpp b/plugins/TipperYM/src/subst.cpp
index bbcce4b4e7..a68dae28fa 100644
--- a/plugins/TipperYM/src/subst.cpp
+++ b/plugins/TipperYM/src/subst.cpp
@@ -173,7 +173,7 @@ wchar_t* GetLastMessageText(MCONTACT hContact, bool received)
if (dbei.cbBlob == 0 || dbei.pBlob == 0)
return 0;
- wchar_t *buff = DbGetEventTextT( &dbei, CP_ACP );
+ wchar_t *buff = DbGetEventTextW( &dbei, CP_ACP );
wchar_t *swzMsg = mir_wstrdup(buff);
mir_free(buff);
@@ -220,7 +220,7 @@ wchar_t* GetStatusMessageText(MCONTACT hContact)
if (wStatus == ID_STATUS_OFFLINE)
return NULL;
- if (!db_get_ts(hContact, MODULE, "TempStatusMsg", &dbv)) {
+ if (!db_get_ws(hContact, MODULE, "TempStatusMsg", &dbv)) {
if (mir_wstrlen(dbv.ptszVal) != 0)
swzMsg = mir_wstrdup(dbv.ptszVal);
db_free(&dbv);
@@ -232,7 +232,7 @@ wchar_t* GetStatusMessageText(MCONTACT hContact)
if (ProtoChainSend(hContact, PSS_GETAWAYMSG, 0, 0))
return NULL;
- if (!db_get_ts(hContact, "CList", "StatusMsg", &dbv)) {
+ if (!db_get_ws(hContact, "CList", "StatusMsg", &dbv)) {
if (mir_wstrlen(dbv.ptszVal) != 0)
swzMsg = mir_wstrdup(dbv.ptszVal);
db_free(&dbv);
@@ -694,9 +694,9 @@ wchar_t* GetProtoStatusMessage(char *szProto, WORD wStatus)
if (!(flags & Proto_Status2Flag(wStatus)))
return NULL;
- wchar_t *ptszText = (wchar_t *)CallProtoService(szProto, PS_GETMYAWAYMSG, 0, SGMA_TCHAR);
+ wchar_t *ptszText = (wchar_t *)CallProtoService(szProto, PS_GETMYAWAYMSG, 0, SGMA_UNICODE);
if ((INT_PTR)ptszText == CALLSERVICE_NOTFOUND)
- ptszText = (wchar_t *)CallService(MS_AWAYMSG_GETSTATUSMSGT, wStatus, (LPARAM)szProto);
+ ptszText = (wchar_t *)CallService(MS_AWAYMSG_GETSTATUSMSGW, wStatus, (LPARAM)szProto);
else if (ptszText == NULL) {
// try to use service without SGMA_TCHAR
@@ -724,7 +724,7 @@ wchar_t* GetProtoExtraStatusTitle(char *szProto)
if (!szProto)
return NULL;
- wchar_t *ptszText = db_get_tsa(0, szProto, "XStatusName");
+ wchar_t *ptszText = db_get_wsa(0, szProto, "XStatusName");
if (!ptszText) {
wchar_t buff[256];
if (EmptyXStatusToDefaultName(0, szProto, 0, buff, 256))
@@ -742,7 +742,7 @@ wchar_t* GetProtoExtraStatusMessage(char *szProto)
if (!szProto)
return NULL;
- wchar_t *ptszText = db_get_tsa(0, szProto, "XStatusMsg");
+ wchar_t *ptszText = db_get_wsa(0, szProto, "XStatusMsg");
if (ptszText == NULL)
return NULL;
@@ -778,7 +778,7 @@ wchar_t* GetListeningTo(char *szProto)
if (!szProto)
return NULL;
- wchar_t *ptszText = db_get_tsa(0, szProto, "ListeningTo");
+ wchar_t *ptszText = db_get_wsa(0, szProto, "ListeningTo");
if (opt.bLimitMsg)
TruncateString(ptszText);
@@ -792,7 +792,7 @@ wchar_t* GetJabberAdvStatusText(char *szProto, const char *szSlot, const char *s
char szSetting[128];
mir_snprintf(szSetting, "%s/%s/%s", szProto, szSlot, szValue);
- wchar_t *ptszText = db_get_tsa(0, "AdvStatus", szSetting);
+ wchar_t *ptszText = db_get_wsa(0, "AdvStatus", szSetting);
if (opt.bLimitMsg)
TruncateString(ptszText);
diff --git a/plugins/TipperYM/src/tipper.cpp b/plugins/TipperYM/src/tipper.cpp
index 4442d56285..6fc17f394d 100644
--- a/plugins/TipperYM/src/tipper.cpp
+++ b/plugins/TipperYM/src/tipper.cpp
@@ -22,8 +22,8 @@ Boston, MA 02111-1307, USA.
HMODULE hInst;
-FontIDT fontTitle, fontLabels, fontValues, fontTrayTitle;
-ColourIDT colourBg, colourBorder, colourAvatarBorder, colourDivider, colourSidebar;
+FontIDW fontTitle, fontLabels, fontValues, fontTrayTitle;
+ColourIDW colourBg, colourBorder, colourAvatarBorder, colourDivider, colourSidebar;
HFONT hFontTitle, hFontLabels, hFontValues, hFontTrayTitle;
// hooked here so it's in the main thread
@@ -69,23 +69,23 @@ int ReloadFont(WPARAM, LPARAM)
{
LOGFONT logFont;
if (hFontTitle) DeleteObject(hFontTitle);
- opt.colTitle = CallService(MS_FONT_GETT, (WPARAM)&fontTitle, (LPARAM)&logFont);
+ opt.colTitle = CallService(MS_FONT_GETW, (WPARAM)&fontTitle, (LPARAM)&logFont);
hFontTitle = CreateFontIndirect(&logFont);
if (hFontLabels) DeleteObject(hFontLabels);
- opt.colLabel = CallService(MS_FONT_GETT, (WPARAM)&fontLabels, (LPARAM)&logFont);
+ opt.colLabel = CallService(MS_FONT_GETW, (WPARAM)&fontLabels, (LPARAM)&logFont);
hFontLabels = CreateFontIndirect(&logFont);
if (hFontValues) DeleteObject(hFontValues);
- opt.colValue = CallService(MS_FONT_GETT, (WPARAM)&fontValues, (LPARAM)&logFont);
+ opt.colValue = CallService(MS_FONT_GETW, (WPARAM)&fontValues, (LPARAM)&logFont);
hFontValues = CreateFontIndirect(&logFont);
if (hFontTrayTitle) DeleteObject(hFontTrayTitle);
- opt.colTrayTitle = CallService(MS_FONT_GETT, (WPARAM)&fontTrayTitle, (LPARAM)&logFont);
+ opt.colTrayTitle = CallService(MS_FONT_GETW, (WPARAM)&fontTrayTitle, (LPARAM)&logFont);
hFontTrayTitle = CreateFontIndirect(&logFont);
- opt.colBg = CallService(MS_COLOUR_GETT, (WPARAM)&colourBg, 0);
- opt.colBorder = CallService(MS_COLOUR_GETT, (WPARAM)&colourBorder, 0);
- opt.colAvatarBorder = CallService(MS_COLOUR_GETT, (WPARAM)&colourAvatarBorder, 0);
- opt.colSidebar = CallService(MS_COLOUR_GETT, (WPARAM)&colourSidebar, 0);
- opt.colDivider = CallService(MS_COLOUR_GETT, (WPARAM)&colourDivider, 0);
+ opt.colBg = CallService(MS_COLOUR_GETW, (WPARAM)&colourBg, 0);
+ opt.colBorder = CallService(MS_COLOUR_GETW, (WPARAM)&colourBorder, 0);
+ opt.colAvatarBorder = CallService(MS_COLOUR_GETW, (WPARAM)&colourAvatarBorder, 0);
+ opt.colSidebar = CallService(MS_COLOUR_GETW, (WPARAM)&colourSidebar, 0);
+ opt.colDivider = CallService(MS_COLOUR_GETW, (WPARAM)&colourDivider, 0);
return 0;
}
@@ -123,52 +123,52 @@ int ReloadSkinFolder(WPARAM, LPARAM)
void InitFonts()
{
- colourBg.cbSize = sizeof(ColourIDT);
+ colourBg.cbSize = sizeof(ColourIDW);
mir_wstrcpy(colourBg.group, LPGENW("Tooltips"));
mir_wstrcpy(colourBg.name, LPGENW("Background"));
mir_strcpy(colourBg.dbSettingsGroup, MODULE);
mir_strcpy(colourBg.setting, "ColourBg");
colourBg.defcolour = RGB(219, 219, 219);
colourBg.order = 0;
- ColourRegisterT(&colourBg);
+ ColourRegisterW(&colourBg);
- colourBorder.cbSize = sizeof(ColourIDT);
+ colourBorder.cbSize = sizeof(ColourIDW);
mir_wstrcpy(colourBorder.group, LPGENW("Tooltips"));
mir_wstrcpy(colourBorder.name, LPGENW("Border"));
mir_strcpy(colourBorder.dbSettingsGroup, MODULE);
mir_strcpy(colourBorder.setting, "BorderCol");
colourBorder.defcolour = 0;
colourBorder.order = 0;
- ColourRegisterT(&colourBorder);
+ ColourRegisterW(&colourBorder);
- colourAvatarBorder.cbSize = sizeof(ColourIDT);
+ colourAvatarBorder.cbSize = sizeof(ColourIDW);
mir_wstrcpy(colourAvatarBorder.group, LPGENW("Tooltips"));
mir_wstrcpy(colourAvatarBorder.name, LPGENW("Avatar border"));
mir_strcpy(colourAvatarBorder.dbSettingsGroup, MODULE);
mir_strcpy(colourAvatarBorder.setting, "AvBorderCol");
colourAvatarBorder.defcolour = 0;
colourAvatarBorder.order = 0;
- ColourRegisterT(&colourAvatarBorder);
+ ColourRegisterW(&colourAvatarBorder);
- colourDivider.cbSize = sizeof(ColourIDT);
+ colourDivider.cbSize = sizeof(ColourIDW);
mir_wstrcpy(colourDivider.group, LPGENW("Tooltips"));
mir_wstrcpy(colourDivider.name, LPGENW("Dividers"));
mir_strcpy(colourDivider.dbSettingsGroup, MODULE);
mir_strcpy(colourDivider.setting, "DividerCol");
colourDivider.defcolour = 0;
colourDivider.order = 0;
- ColourRegisterT(&colourDivider);
+ ColourRegisterW(&colourDivider);
- colourSidebar.cbSize = sizeof(ColourIDT);
+ colourSidebar.cbSize = sizeof(ColourIDW);
mir_wstrcpy(colourSidebar.group, LPGENW("Tooltips"));
mir_wstrcpy(colourSidebar.name, LPGENW("Sidebar"));
mir_strcpy(colourSidebar.dbSettingsGroup, MODULE);
mir_strcpy(colourSidebar.setting, "SidebarCol");
colourSidebar.defcolour = RGB(192, 192, 192);
colourSidebar.order = 0;
- ColourRegisterT(&colourSidebar);
+ ColourRegisterW(&colourSidebar);
- fontTitle.cbSize = sizeof(FontIDT);
+ fontTitle.cbSize = sizeof(FontIDW);
fontTitle.flags = FIDF_ALLOWEFFECTS;
mir_wstrcpy(fontTitle.group, LPGENW("Tooltips"));
mir_wstrcpy(fontTitle.name, LPGENW("Title"));
@@ -184,7 +184,7 @@ void InitFonts()
fontTitle.deffontsettings.colour = RGB(255, 0, 0);
fontTitle.flags |= FIDF_DEFAULTVALID;
- fontLabels.cbSize = sizeof(FontIDT);
+ fontLabels.cbSize = sizeof(FontIDW);
fontLabels.flags = FIDF_ALLOWEFFECTS;
mir_wstrcpy(fontLabels.group, LPGENW("Tooltips"));
mir_wstrcpy(fontLabels.name, LPGENW("Labels"));
@@ -200,7 +200,7 @@ void InitFonts()
fontLabels.deffontsettings.colour = RGB(128, 128, 128);
fontLabels.flags |= FIDF_DEFAULTVALID;
- fontValues.cbSize = sizeof(FontIDT);
+ fontValues.cbSize = sizeof(FontIDW);
fontValues.flags = FIDF_ALLOWEFFECTS;
mir_wstrcpy(fontValues.group, LPGENW("Tooltips"));
mir_wstrcpy(fontValues.name, LPGENW("Values"));
@@ -216,7 +216,7 @@ void InitFonts()
fontValues.deffontsettings.colour = RGB(0, 0, 0);
fontValues.flags |= FIDF_DEFAULTVALID;
- fontTrayTitle.cbSize = sizeof(FontIDT);
+ fontTrayTitle.cbSize = sizeof(FontIDW);
fontTrayTitle.flags = FIDF_ALLOWEFFECTS;
mir_wstrcpy(fontTrayTitle.group, LPGENW("Tooltips"));
mir_wstrcpy(fontTrayTitle.name, LPGENW("Tray title"));
@@ -232,10 +232,10 @@ void InitFonts()
fontTrayTitle.deffontsettings.colour = RGB(0, 0, 0);
fontTrayTitle.flags |= FIDF_DEFAULTVALID;
- FontRegisterT(&fontTitle);
- FontRegisterT(&fontLabels);
- FontRegisterT(&fontValues);
- FontRegisterT(&fontTrayTitle);
+ FontRegisterW(&fontTitle);
+ FontRegisterW(&fontLabels);
+ FontRegisterW(&fontValues);
+ FontRegisterW(&fontTrayTitle);
hReloadFonts = HookEvent(ME_FONT_RELOAD, ReloadFont);
}
@@ -304,7 +304,7 @@ static INT_PTR ReloadSkin(WPARAM wParam, LPARAM lParam)
SaveOptions();
db_set_b(0, MODULE, "SkinEngine", opt.skinMode);
- db_set_ts(0, MODULE, "SkinName", opt.szSkinName);
+ db_set_ws(0, MODULE, "SkinName", opt.szSkinName);
DestroySkinBitmap();
diff --git a/plugins/TipperYM/src/translations.cpp b/plugins/TipperYM/src/translations.cpp
index 879f100f5d..c981322f81 100644
--- a/plugins/TipperYM/src/translations.cpp
+++ b/plugins/TipperYM/src/translations.cpp
@@ -567,9 +567,9 @@ wchar_t *EmptyXStatusToDefaultName(MCONTACT hContact, const char *szModuleName,
// translate jabber mood
if (ProtoServiceExists(szModuleName, "/SendXML")) // jabber protocol?
{
- if (!db_get_ts(hContact, szModuleName, szSettingName, &dbv))
+ if (!db_get_ws(hContact, szModuleName, szSettingName, &dbv))
{
- wcsncpy(buff, TranslateTS(dbv.ptszVal), bufflen);
+ wcsncpy(buff, TranslateW(dbv.ptszVal), bufflen);
buff[bufflen - 1] = 0;
return buff;
}
@@ -584,13 +584,13 @@ wchar_t *EmptyXStatusToDefaultName(MCONTACT hContact, const char *szModuleName,
if (ProtoServiceExists(szModuleName, PS_GETCUSTOMSTATUSEX))
{
xstatus.cbSize = sizeof(CUSTOM_STATUS);
- xstatus.flags = CSSF_MASK_NAME | CSSF_DEFAULT_NAME | CSSF_TCHAR;
+ xstatus.flags = CSSF_MASK_NAME | CSSF_DEFAULT_NAME | CSSF_UNICODE;
xstatus.ptszName = szDefaultName;
xstatus.wParam = (WPARAM *)&status;
if (CallProtoService(szModuleName, PS_GETCUSTOMSTATUSEX, 0, (LPARAM)&xstatus))
return 0;
- wcsncpy(buff, TranslateTS(szDefaultName), bufflen);
+ wcsncpy(buff, TranslateW(szDefaultName), bufflen);
buff[bufflen - 1] = 0;
return buff;
}
diff --git a/plugins/Toaster/src/main.cpp b/plugins/Toaster/src/main.cpp
index 3aa449ad98..d97bd34b37 100644
--- a/plugins/Toaster/src/main.cpp
+++ b/plugins/Toaster/src/main.cpp
@@ -50,7 +50,7 @@ extern "C" int __declspec(dllexport) Load(void)
DWORD dwAttributes = GetFileAttributes(wszTempDir);
if (dwAttributes == 0xffffffff || (dwAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0)
- CreateDirectoryTreeT(wszTempDir);
+ CreateDirectoryTreeW(wszTempDir);
}
else
{
diff --git a/plugins/Toaster/src/options.cpp b/plugins/Toaster/src/options.cpp
index 0dcfe12f64..4fb6b54868 100644
--- a/plugins/Toaster/src/options.cpp
+++ b/plugins/Toaster/src/options.cpp
@@ -47,7 +47,7 @@ int OnOptionsInitialized(WPARAM wParam, LPARAM)
{
OPTIONSDIALOGPAGE odp = { 0 };
odp.pwszTitle = L"Popups"; //_T(MODULE);
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
odp.position = -790000000;
odp.pwszTab = _T(MODULE);
odp.pDialog = new COptions();
diff --git a/plugins/Toaster/src/toast_notification.cpp b/plugins/Toaster/src/toast_notification.cpp
index 0ade7ce217..b815fd9e68 100644
--- a/plugins/Toaster/src/toast_notification.cpp
+++ b/plugins/Toaster/src/toast_notification.cpp
@@ -52,7 +52,7 @@ HRESULT ToastNotification::CreateXml(_Outptr_ ABI::Windows::Data::Xml::Dom::IXml
{
HXML xmlImageNode = xmlAddChild(xmlBindingNode, L"image", NULL);
xmlAddAttr(xmlImageNode, L"id", L"1");
- xmlAddAttr(xmlImageNode, L"src", CMString(FORMAT, L"file:///%s", _imagePath));
+ xmlAddAttr(xmlImageNode, L"src", CMStringW(FORMAT, L"file:///%s", _imagePath));
}
HXML xmlTitleNode = xmlAddChild(xmlBindingNode, L"text", _caption != NULL ? _caption : L"Miranda NG");
diff --git a/plugins/Toaster/src/utils.h b/plugins/Toaster/src/utils.h
index fe9e5998bd..2aa4802b8c 100644
--- a/plugins/Toaster/src/utils.h
+++ b/plugins/Toaster/src/utils.h
@@ -11,7 +11,7 @@ class ToasterImage
ptrW tszId;
public:
- __inline explicit ToasterImage(HICON hIcon) : _hBitmap(NULL), tszId(CMString(FORMAT, L"%p", hIcon).Detach())
+ __inline explicit ToasterImage(HICON hIcon) : _hBitmap(NULL), tszId(CMStringW(FORMAT, L"%p", hIcon).Detach())
{
ICONINFO icon = { 0 };
if (GetIconInfo(hIcon, &icon))
@@ -21,7 +21,7 @@ public:
}
}
- __inline explicit ToasterImage(HBITMAP bmp) : _hBitmap(bmp), tszId(CMString(FORMAT, L"%p", bmp).Detach())
+ __inline explicit ToasterImage(HBITMAP bmp) : _hBitmap(bmp), tszId(CMStringW(FORMAT, L"%p", bmp).Detach())
{
}
diff --git a/plugins/TooltipNotify/src/TooltipNotify.cpp b/plugins/TooltipNotify/src/TooltipNotify.cpp
index 2d7988e339..bea0343104 100644
--- a/plugins/TooltipNotify/src/TooltipNotify.cpp
+++ b/plugins/TooltipNotify/src/TooltipNotify.cpp
@@ -72,7 +72,7 @@ CTooltipNotify::~CTooltipNotify()
void CTooltipNotify::RegisterFonts()
{
- FontIDT fontId = { sizeof(fontId) };
+ FontIDW fontId = { sizeof(fontId) };
wcsncpy(fontId.group, FONTSERV_GROUP, _countof(fontId.group) - 1);
strncpy(fontId.dbSettingsGroup, MODULENAME, _countof(fontId.dbSettingsGroup) - 1);
fontId.flags = FIDF_DEFAULTVALID;
@@ -84,7 +84,7 @@ void CTooltipNotify::RegisterFonts()
fontId.order = 0;
wcsncpy(fontId.backgroundGroup, FONTSERV_GROUP, _countof(fontId.backgroundGroup) - 1);
- ColourIDT colorId = { sizeof(colorId) };
+ ColourIDW colorId = { sizeof(colorId) };
wcsncpy(colorId.group, FONTSERV_GROUP, _countof(colorId.group) - 1);
strncpy(colorId.dbSettingsGroup, MODULENAME, _countof(colorId.dbSettingsGroup) - 1);
colorId.flags = 0;
@@ -95,11 +95,11 @@ void CTooltipNotify::RegisterFonts()
wcsncpy(fontId.name, s_fontTable[i].name, _countof(fontId.name) - 1);
strncpy(fontId.prefix, s_fontTable[i].fontPrefix, _countof(fontId.prefix) - 1);
wcsncpy(fontId.backgroundName, s_fontTable[i].name, _countof(fontId.backgroundName) - 1);
- ::FontRegisterT(&fontId);
+ ::FontRegisterW(&fontId);
wcsncpy(colorId.name, s_fontTable[i].name, _countof(colorId.name) - 1);
strncpy(colorId.setting, s_fontTable[i].clrPrefix, _countof(colorId.setting) - 1);
- ::ColourRegisterT(&colorId);
+ ::ColourRegisterW(&colorId);
}
}
@@ -116,12 +116,12 @@ void CTooltipNotify::GetFont(int iStatus, LOGFONT* lf, COLORREF* text, COLORREF*
}
// name and group only
- FontIDT fontId = { sizeof(fontId), FONTSERV_GROUP, 0 };
+ FontIDW fontId = { sizeof(fontId), FONTSERV_GROUP, 0 };
wcsncpy(fontId.name, fontName, _countof(fontId.name) - 1);
- *text = (COLORREF)::CallService(MS_FONT_GETT, (WPARAM)&fontId, (LPARAM)lf);
- ColourIDT colorId = { sizeof(colorId), FONTSERV_GROUP, 0 };
+ *text = (COLORREF)::CallService(MS_FONT_GETW, (WPARAM)&fontId, (LPARAM)lf);
+ ColourIDW colorId = { sizeof(colorId), FONTSERV_GROUP, 0 };
wcsncpy(colorId.name, fontName, _countof(colorId.name) - 1);
- *bg = (COLORREF)::CallService(MS_COLOUR_GETT, (WPARAM)&colorId, 0);
+ *bg = (COLORREF)::CallService(MS_COLOUR_GETW, (WPARAM)&colorId, 0);
}
int CTooltipNotify::ModulesLoaded(WPARAM, LPARAM)
diff --git a/plugins/TopToolBar/src/toolbar.cpp b/plugins/TopToolBar/src/toolbar.cpp
index d02ab8240a..a8c037a7ac 100644
--- a/plugins/TopToolBar/src/toolbar.cpp
+++ b/plugins/TopToolBar/src/toolbar.cpp
@@ -440,7 +440,7 @@ INT_PTR TTBSetOptions(WPARAM wParam, LPARAM lParam)
if (lParam == 0)
return -1;
- replaceStrW(b->ptszTooltip, TranslateTS(_A2T((LPCSTR)lParam)));
+ replaceStrW(b->ptszTooltip, TranslateW(_A2T((LPCSTR)lParam)));
SendMessage(b->hwnd, BUTTONADDTOOLTIP, (WPARAM)b->ptszTooltip, BATF_UNICODE);
return 1;
diff --git a/plugins/TopToolBar/src/toolbarwnd.cpp b/plugins/TopToolBar/src/toolbarwnd.cpp
index 90f3199b24..8962a36af0 100644
--- a/plugins/TopToolBar/src/toolbarwnd.cpp
+++ b/plugins/TopToolBar/src/toolbarwnd.cpp
@@ -276,7 +276,7 @@ INT_PTR OnEventFire(WPARAM wParam, LPARAM)
Frame.tname = L"Toolbar";
Frame.hWnd = g_ctrl->hWnd;
Frame.align = alTop;
- Frame.Flags = F_VISIBLE | F_NOBORDER | F_LOCKED | F_TCHAR;
+ Frame.Flags = F_VISIBLE | F_NOBORDER | F_LOCKED | F_UNICODE;
Frame.height = g_ctrl->nLastHeight;
Frame.hIcon = Skin_LoadIcon(SKINICON_OTHER_FRAME);
g_ctrl->hFrame = (HANDLE)CallService(MS_CLIST_FRAMES_ADDFRAME, (WPARAM)&Frame, 0);
@@ -299,7 +299,7 @@ int LoadBackgroundOptions()
}
if (db_get_b(NULL, TTB_OPTDIR, "UseBitmap", TTBDEFAULT_USEBITMAP)) {
- ptrW tszBitmapName(db_get_tsa(NULL, TTB_OPTDIR, "BkBitmap"));
+ ptrW tszBitmapName(db_get_wsa(NULL, TTB_OPTDIR, "BkBitmap"));
if (tszBitmapName != NULL)
hBmpBackground = Bitmap_Load(tszBitmapName);
}
diff --git a/plugins/TopToolBar/src/topbutton.cpp b/plugins/TopToolBar/src/topbutton.cpp
index 4be939ba8b..75a39c03a4 100644
--- a/plugins/TopToolBar/src/topbutton.cpp
+++ b/plugins/TopToolBar/src/topbutton.cpp
@@ -35,7 +35,7 @@ DWORD TopButtonInt::CheckFlags(DWORD Flags)
}
if (BitChanged(TTBBF_SHOWTOOLTIP)) {
dwFlags ^= TTBBF_SHOWTOOLTIP;
- SendMessage(hwnd, BUTTONADDTOOLTIP, (WPARAM)((dwFlags & TTBBF_SHOWTOOLTIP) ? ptszTooltip : L""), BATF_TCHAR);
+ SendMessage(hwnd, BUTTONADDTOOLTIP, (WPARAM)((dwFlags & TTBBF_SHOWTOOLTIP) ? ptszTooltip : L""), BATF_UNICODE);
}
// next settings changing visual side, requires additional actions
if (BitChanged(TTBBF_VISIBLE)) {
@@ -98,7 +98,7 @@ void TopButtonInt::LoadSettings()
pszName = db_get_sa(0, TTB_OPTDIR, AS(buf, buf2, "_name"));
mir_free(ptszProgram);
- ptszProgram = db_get_tsa(0, TTB_OPTDIR, AS(buf, buf2, "_lpath"));
+ ptszProgram = db_get_wsa(0, TTB_OPTDIR, AS(buf, buf2, "_lpath"));
arrangedpos = db_get_b(0, TTB_OPTDIR, AS(buf, buf2, "_Position"), Buttons.getCount());
if (db_get_b(0, TTB_OPTDIR, AS(buf, buf2, "_Visible"), oldv) > 0)
@@ -134,7 +134,7 @@ void TopButtonInt::SaveSettings(int *SepCnt, int *LaunchCnt)
AS(buf2, "Launch", buf1);
db_set_s(0, TTB_OPTDIR, AS(buf, buf2, "_name"), pszName);
- db_set_ts(0, TTB_OPTDIR, AS(buf, buf2, "_lpath"), ptszProgram);
+ db_set_ws(0, TTB_OPTDIR, AS(buf, buf2, "_lpath"), ptszProgram);
db_set_b(0, TTB_OPTDIR, AS(buf, buf2, "_Position"), arrangedpos);
db_set_b(0, TTB_OPTDIR, AS(buf, buf2, "_Visible"), isVisible());
}
@@ -172,6 +172,6 @@ void TopButtonInt::SetBitmap()
pTooltip = ptszTooltipUp;
}
if (pTooltip)
- SendMessage(hwnd, BUTTONADDTOOLTIP, (WPARAM)TranslateTH(hLangpack, pTooltip), BATF_TCHAR);
+ SendMessage(hwnd, BUTTONADDTOOLTIP, (WPARAM)TranslateW_LP(pTooltip, hLangpack), BATF_UNICODE);
}
}
diff --git a/plugins/TopToolBar/src/ttbopt.cpp b/plugins/TopToolBar/src/ttbopt.cpp
index e4a2edd8e5..0b65ba0bfd 100644
--- a/plugins/TopToolBar/src/ttbopt.cpp
+++ b/plugins/TopToolBar/src/ttbopt.cpp
@@ -34,7 +34,7 @@ static HTREEITEM AddLine(HWND hTree,TopButtonInt *b, HTREEITEM hItem, HIMAGELIST
else index = ImageList_AddIcon(il, b->hIconUp);
tmp = mir_a2u( b->pszName );
- tvis.item.pszText = TranslateTS(tmp);
+ tvis.item.pszText = TranslateW(tmp);
}
tvis.item.iImage = tvis.item.iSelectedImage = index;
diff --git a/plugins/TrafficCounter/src/TrafficCounter.cpp b/plugins/TrafficCounter/src/TrafficCounter.cpp
index 2366819516..04058633e6 100644
--- a/plugins/TrafficCounter/src/TrafficCounter.cpp
+++ b/plugins/TrafficCounter/src/TrafficCounter.cpp
@@ -84,8 +84,8 @@ BYTE online_count = 0;
//font service support
/*-------------------------------------------------------------------------------------------------------------------*/
int TrafficFontHeight = 0;
-FontIDT TrafficFontID;
-ColourIDT TrafficBackgroundColorID;
+FontIDW TrafficFontID;
+ColourIDW TrafficBackgroundColorID;
//---------------------------------------------------------------------------------------------
// Äëÿ ToolTip
@@ -215,7 +215,7 @@ int TrafficCounterModulesLoaded(WPARAM, LPARAM)
Traffic_PopupTimeoutValue = db_get_b(NULL, TRAFFIC_SETTINGS_GROUP, SETTINGS_POPUP_TIMEOUT_VALUE, 5);
// Ôîðìàò ñ÷¸ò÷èêà äëÿ êàæäîãî àêòèâíîãî ïðîòîêîëà
- if (db_get_ts(NULL, TRAFFIC_SETTINGS_GROUP, SETTINGS_COUNTER_FORMAT, &dbv) == 0) {
+ if (db_get_ws(NULL, TRAFFIC_SETTINGS_GROUP, SETTINGS_COUNTER_FORMAT, &dbv) == 0) {
if (mir_wstrlen(dbv.ptszVal) > 0)
mir_wstrncpy(Traffic_CounterFormat, dbv.ptszVal, _countof(Traffic_CounterFormat));
//
@@ -227,7 +227,7 @@ int TrafficCounterModulesLoaded(WPARAM, LPARAM)
}
// Ôîðìàò âñïëûâàþùèõ ïîäñêàçîê
- if (db_get_ts(NULL, TRAFFIC_SETTINGS_GROUP, SETTINGS_TOOLTIP_FORMAT, &dbv) == 0) {
+ if (db_get_ws(NULL, TRAFFIC_SETTINGS_GROUP, SETTINGS_TOOLTIP_FORMAT, &dbv) == 0) {
if (mir_wstrlen(dbv.ptszVal) > 0)
mir_wstrncpy(Traffic_TooltipFormat, dbv.ptszVal, _countof(Traffic_TooltipFormat));
//
@@ -244,7 +244,7 @@ int TrafficCounterModulesLoaded(WPARAM, LPARAM)
OverallInfo.Total.Timer = db_get_dw(NULL, TRAFFIC_SETTINGS_GROUP, SETTINGS_TOTAL_ONLINE_TIME, 0);
//register traffic font
- TrafficFontID.cbSize = sizeof(FontIDT);
+ TrafficFontID.cbSize = sizeof(FontIDW);
mir_wstrcpy(TrafficFontID.group, LPGENW("Traffic counter"));
mir_wstrcpy(TrafficFontID.name, LPGENW("Font"));
mir_strcpy(TrafficFontID.dbSettingsGroup, TRAFFIC_SETTINGS_GROUP);
@@ -256,16 +256,16 @@ int TrafficCounterModulesLoaded(WPARAM, LPARAM)
TrafficFontID.deffontsettings.style = 0;
mir_wstrcpy(TrafficFontID.deffontsettings.szFace, L"Arial");
TrafficFontID.order = 0;
- FontRegisterT(&TrafficFontID);
+ FontRegisterW(&TrafficFontID);
// Ðåãèñòðèðóåì öâåò ôîíà
- TrafficBackgroundColorID.cbSize = sizeof(ColourIDT);
+ TrafficBackgroundColorID.cbSize = sizeof(ColourIDW);
mir_wstrcpy(TrafficBackgroundColorID.group, LPGENW("Traffic counter"));
mir_wstrcpy(TrafficBackgroundColorID.name, LPGENW("Font"));
mir_strcpy(TrafficBackgroundColorID.dbSettingsGroup, TRAFFIC_SETTINGS_GROUP);
mir_strcpy(TrafficBackgroundColorID.setting, "FontBkColor");
TrafficBackgroundColorID.defcolour = GetSysColor(COLOR_BTNFACE);
- ColourRegisterT(&TrafficBackgroundColorID);
+ ColourRegisterW(&TrafficBackgroundColorID);
HookEvent(ME_FONT_RELOAD, UpdateFonts);
@@ -333,9 +333,9 @@ void SaveSettings(BYTE OnlyCnt)
db_set_b(NULL, TRAFFIC_SETTINGS_GROUP, SETTINGS_POPUP_TIMEOUT_VALUE, Traffic_PopupTimeoutValue);
//
// Ôîðìàò ñ÷¸ò÷èêîâ
- db_set_ts(NULL, TRAFFIC_SETTINGS_GROUP, SETTINGS_COUNTER_FORMAT, Traffic_CounterFormat);
+ db_set_ws(NULL, TRAFFIC_SETTINGS_GROUP, SETTINGS_COUNTER_FORMAT, Traffic_CounterFormat);
- db_set_ts(NULL, TRAFFIC_SETTINGS_GROUP, SETTINGS_TOOLTIP_FORMAT, Traffic_TooltipFormat);
+ db_set_ws(NULL, TRAFFIC_SETTINGS_GROUP, SETTINGS_TOOLTIP_FORMAT, Traffic_TooltipFormat);
db_set_b(NULL, TRAFFIC_SETTINGS_GROUP, SETTINGS_ADDITION_SPACE, Traffic_AdditionSpace);
// Ñîõðàíÿåì ôëàãè
@@ -1163,14 +1163,14 @@ int UpdateFonts(WPARAM, LPARAM)
{
LOGFONT logfont;
//if no font service
- if (!ServiceExists(MS_FONT_GETT)) return 0;
+ if (!ServiceExists(MS_FONT_GETW)) return 0;
//update traffic font
if (Traffic_h_font) DeleteObject(Traffic_h_font);
- Traffic_FontColor = CallService(MS_FONT_GETT, (WPARAM)&TrafficFontID, (LPARAM)&logfont);
+ Traffic_FontColor = CallService(MS_FONT_GETW, (WPARAM)&TrafficFontID, (LPARAM)&logfont);
Traffic_h_font = CreateFontIndirect(&logfont);
//
TrafficFontHeight = abs(logfont.lfHeight) + 1;
- Traffic_BkColor = CallService(MS_COLOUR_GETT, (WPARAM)&TrafficBackgroundColorID, 0);
+ Traffic_BkColor = CallService(MS_COLOUR_GETW, (WPARAM)&TrafficBackgroundColorID, 0);
// Êëþ÷åâîé öâåò
UseKeyColor = db_get_b(NULL, "ModernSettings", "UseKeyColor", 1);
diff --git a/plugins/TrafficCounter/src/opttree.cpp b/plugins/TrafficCounter/src/opttree.cpp
index b75de3cca5..1fb69b220e 100644
--- a/plugins/TrafficCounter/src/opttree.cpp
+++ b/plugins/TrafficCounter/src/opttree.cpp
@@ -38,7 +38,7 @@ static void OptTree_TranslateItem(HWND hwndTree, HTREEITEM hItem)
SendMessage(hwndTree, TVM_GETITEM, 0, (LPARAM)&tvi);
// Ïðîâåðèì, íàäî ëè ïåðåâîäèòü.
if ((tvi.lParam != -1) && (pOptions[tvi.lParam].dwFlag & OPTTREE_NOTRANSLATE)) return;
- tvi.pszText = TranslateTS(tvi.pszText);
+ tvi.pszText = TranslateW(tvi.pszText);
SendMessage(hwndTree, TVM_SETITEM, 0, (LPARAM)&tvi);
}
diff --git a/plugins/TrafficCounter/src/statistics.cpp b/plugins/TrafficCounter/src/statistics.cpp
index 1815f8544c..85a6ac1281 100644
--- a/plugins/TrafficCounter/src/statistics.cpp
+++ b/plugins/TrafficCounter/src/statistics.cpp
@@ -301,7 +301,7 @@ void Stat_ReadFile(BYTE n)
SYSTEMTIME stNow;
pszPath = Utils_ReplaceVarsT(L"%miranda_userdata%\\statistics");
- CreateDirectoryTreeT(pszPath);
+ CreateDirectoryTreeW(pszPath);
mir_snwprintf(FileName, L"%s\\%S.stat", pszPath, ProtoList[n].name);
mir_free(pszPath);
GetLocalTime(&stNow);
diff --git a/plugins/TranslitSwitcher/src/Layoutproc.cpp b/plugins/TranslitSwitcher/src/Layoutproc.cpp
index 0f75d9f64b..043ccf20b4 100644
--- a/plugins/TranslitSwitcher/src/Layoutproc.cpp
+++ b/plugins/TranslitSwitcher/src/Layoutproc.cpp
@@ -705,7 +705,7 @@ int OnButtonPressed(WPARAM, LPARAM lParam)
}
}
- ptrW tszSymbol(db_get_tsa(NULL, "TranslitSwitcher", "ResendSymbol"));
+ ptrW tszSymbol(db_get_wsa(NULL, "TranslitSwitcher", "ResendSymbol"));
if (!tszSymbol && sel) {
SetWindowText(hEdit, sel);
SendMessage(hEdit, EM_SETSEL, 0, (LPARAM)slen);
@@ -717,7 +717,7 @@ int OnButtonPressed(WPARAM, LPARAM lParam)
SendMessage(cbcd->hwndFrom, WM_COMMAND, IDOK, 0);
}
else if (sel) {
- CMString tszFinal(FORMAT, L"%s %s", tszSymbol, sel);
+ CMStringW tszFinal(FORMAT, L"%s %s", tszSymbol, sel);
SetWindowText(hEdit, tszFinal.GetString());
SendMessage(hEdit, EM_SETSEL, 0, tszFinal.GetLength());
SendMessage(cbcd->hwndFrom, WM_COMMAND, IDOK, 0);
diff --git a/plugins/TranslitSwitcher/src/TranslitSwitcher.cpp b/plugins/TranslitSwitcher/src/TranslitSwitcher.cpp
index 046d982675..196ea89d6a 100644
--- a/plugins/TranslitSwitcher/src/TranslitSwitcher.cpp
+++ b/plugins/TranslitSwitcher/src/TranslitSwitcher.cpp
@@ -154,42 +154,42 @@ extern "C" __declspec(dllexport) int Load(void)
HookEvent(ME_SYSTEM_PRESHUTDOWN, OnPreShutdown);
HOTKEYDESC hkd = { sizeof(hkd) };
- hkd.dwFlags = HKD_TCHAR;
+ hkd.dwFlags = HKD_UNICODE;
hkd.pszName = "TranslitSwitcher/ConvertAllOrSelected";
- hkd.ptszDescription = LPGENW("Convert All / Selected");
- hkd.ptszSection = L"TranslitSwitcher";
+ hkd.pwszDescription = LPGENW("Convert All / Selected");
+ hkd.pwszSection = L"TranslitSwitcher";
hkd.pszService = MS_TS_SWITCHLAYOUT;
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL + HKCOMB_A, 'R') | HKF_MIRANDA_LOCAL;
Hotkey_Register(&hkd);
hkd.pszName = "TranslitSwitcher/ConvertLastOrSelected";
- hkd.ptszDescription = LPGENW("Convert Last / Selected");
+ hkd.pwszDescription = LPGENW("Convert Last / Selected");
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_ALT + HKCOMB_A, 'R') | HKF_MIRANDA_LOCAL;
hkd.lParam = true;
Hotkey_Register(&hkd);
hkd.pszName = "TranslitSwitcher/TranslitAllOrSelected";
- hkd.ptszDescription = LPGENW("Translit All / Selected");
+ hkd.pwszDescription = LPGENW("Translit All / Selected");
hkd.pszService = MS_TS_TRANSLITLAYOUT;
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL + HKCOMB_A, 'T') | HKF_MIRANDA_LOCAL;
hkd.lParam = false;
Hotkey_Register(&hkd);
hkd.pszName = "TranslitSwitcher/TranslitLastOrSelected";
- hkd.ptszDescription = LPGENW("Translit Last / Selected");
+ hkd.pwszDescription = LPGENW("Translit Last / Selected");
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_ALT + HKCOMB_A, 'T') | HKF_MIRANDA_LOCAL;
hkd.lParam = true;
Hotkey_Register(&hkd);
hkd.pszName = "TranslitSwitcher/InvertCaseAllOrSelected";
- hkd.ptszDescription = LPGENW("Invert Case All / Selected");
+ hkd.pwszDescription = LPGENW("Invert Case All / Selected");
hkd.pszService = MS_TS_INVERTCASE;
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL + HKCOMB_A, 'Y') | HKF_MIRANDA_LOCAL;
hkd.lParam = false;
Hotkey_Register(&hkd);
hkd.pszName = "TranslitSwitcher/InvertCaseLastOrSelected";
- hkd.ptszDescription = LPGENW("Invert Case Last / Selected");
+ hkd.pwszDescription = LPGENW("Invert Case Last / Selected");
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_ALT + HKCOMB_A, 'Y') | HKF_MIRANDA_LOCAL;
hkd.lParam = true;
Hotkey_Register(&hkd);
diff --git a/plugins/UserGuide/src/main.cpp b/plugins/UserGuide/src/main.cpp
index 3f37ede40b..a07c3eca60 100644
--- a/plugins/UserGuide/src/main.cpp
+++ b/plugins/UserGuide/src/main.cpp
@@ -24,7 +24,7 @@ static INT_PTR ShowGuideFile(WPARAM, LPARAM)
LPTSTR pszDirName = (LPTSTR)mir_alloc(250*sizeof(wchar_t));
LPTSTR pszFileName = (LPTSTR)mir_alloc(250*sizeof(wchar_t));
- wchar_t *ptszHelpFile = db_get_tsa(NULL, "UserGuide", "PathToHelpFile");
+ wchar_t *ptszHelpFile = db_get_wsa(NULL, "UserGuide", "PathToHelpFile");
if (ptszHelpFile==0)
{
@@ -85,7 +85,7 @@ extern "C" __declspec(dllexport) int Load(void)
CMenuItem mi;
SET_UID(mi, 0x6787c12d, 0xdc85, 0x409d, 0xaa, 0x6c, 0x1f, 0xfe, 0x5f, 0xe8, 0xc1, 0x18);
mi.position = 500000;
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
mi.hIcolibItem = Skin_LoadIcon(SKINICON_OTHER_HELP);
mi.name.w = LPGENW("User Guide");
mi.pszService = "UserGuide/ShowGuide";
diff --git a/plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp b/plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp
index 2eb24aff20..056bb048c4 100644
--- a/plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp
+++ b/plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp
@@ -344,7 +344,7 @@ void InitIcons()
SKINICONDESC sid = { 0 };
sid.section.w = LPGENW("Country flags");
sid.pszName = szId; // name to refer to icon when playing and in db
- sid.flags = SIDF_SORTED | SIDF_TCHAR;
+ sid.flags = SIDF_SORTED | SIDF_UNICODE;
for (int i=0; i < nCountriesCount; i++) {
sid.description.w = mir_a2u(LPGEN(countries[i].szName));
diff --git a/plugins/UserInfoEx/src/classMAnnivDate.cpp b/plugins/UserInfoEx/src/classMAnnivDate.cpp
index b4f9ed84fd..c907d10ad7 100644
--- a/plugins/UserInfoEx/src/classMAnnivDate.cpp
+++ b/plugins/UserInfoEx/src/classMAnnivDate.cpp
@@ -664,7 +664,7 @@ int MAnnivDate::DBWriteAnniversaryDate(MCONTACT hContact, WORD wIndex)
if (!DBWriteDateStamp(hContact, USERINFO, pszSetting)) {
// write description
mir_snprintf(pszSetting, "Anniv%dDesc", wIndex);
- db_set_ts(hContact, USERINFO, pszSetting, (LPTSTR)Description());
+ db_set_ws(hContact, USERINFO, pszSetting, (LPTSTR)Description());
return 0;
}
// delete date if written incompletely
diff --git a/plugins/UserInfoEx/src/classPsTree.cpp b/plugins/UserInfoEx/src/classPsTree.cpp
index 8108f38d2d..2f16ba1797 100644
--- a/plugins/UserInfoEx/src/classPsTree.cpp
+++ b/plugins/UserInfoEx/src/classPsTree.cpp
@@ -129,7 +129,7 @@ int CPsTree::AddDummyItem(LPCSTR pszGroup)
OPTIONSDIALOGPAGE odp = { 0 };
odp.hInstance = ghInst;
- odp.flags = ODPF_TCHAR;
+ odp.flags = ODPF_UNICODE;
odp.pwszTitle = mir_utf8decodeW(pszGroup);
INT_PTR rc = UserInfo_AddPage((WPARAM)&psh, &odp);
diff --git a/plugins/UserInfoEx/src/classPsTreeItem.cpp b/plugins/UserInfoEx/src/classPsTreeItem.cpp
index 22d6872017..f31c4fada9 100644
--- a/plugins/UserInfoEx/src/classPsTreeItem.cpp
+++ b/plugins/UserInfoEx/src/classPsTreeItem.cpp
@@ -255,7 +255,7 @@ int CPsTreeItem::ItemLabel(const BYTE bReadDBValue)
LPTSTR ptszLabel = mir_utf8decodeW(pszName);
if (ptszLabel) {
- _ptszLabel = mir_wstrdup(TranslateTS(ptszLabel));
+ _ptszLabel = mir_wstrdup(TranslateW(ptszLabel));
mir_free(ptszLabel);
}
}
@@ -316,7 +316,7 @@ int CPsTreeItem::Icon(HIMAGELIST hIml, OPTIONSDIALOGPAGE *odp, BYTE bInitIconsOn
bool bNeedFree = false;
SKINICONDESC sid = { 0 };
- sid.flags = SIDF_ALL_TCHAR;
+ sid.flags = SIDF_ALL_UNICODE;
sid.pszName = (LPSTR)pszIconName;
sid.description.w = _ptszLabel;
sid.section.w = _A2W(SECT_TREE);
@@ -482,7 +482,7 @@ WORD CPsTreeItem::DBSaveItemState(LPCSTR pszGroup, int iItemPosition, UINT iStat
// save label
if ((dwFlags & PSTVF_LABEL_CHANGED) && (_dwFlags & PSTVF_LABEL_CHANGED))
- numErrors += db_set_ts(NULL, MODNAME, GlobalPropertyKey(SET_ITEM_LABEL), Label());
+ numErrors += db_set_ws(NULL, MODNAME, GlobalPropertyKey(SET_ITEM_LABEL), Label());
// save position
if ((dwFlags & PSTVF_POS_CHANGED) && !(dwFlags & PSTVF_SORTTREE))
diff --git a/plugins/UserInfoEx/src/ctrl_annivedit.cpp b/plugins/UserInfoEx/src/ctrl_annivedit.cpp
index 3755643b45..05828dfc61 100644
--- a/plugins/UserInfoEx/src/ctrl_annivedit.cpp
+++ b/plugins/UserInfoEx/src/ctrl_annivedit.cpp
@@ -590,7 +590,7 @@ void CAnnivEditCtrl::SetZodiacAndAge(MAnnivDate *mt)
if (zod.pszName != NULL)
{
ShowWindow(GetDlgItem(_hwndDlg, TEXT_ZODIAC), SW_SHOW);
- SetDlgItemText(_hwndDlg, TEXT_ZODIAC, TranslateTS(zod.pszName));
+ SetDlgItemText(_hwndDlg, TEXT_ZODIAC, TranslateW(zod.pszName));
SendDlgItemMessage(_hwndDlg, IDC_ZODIAC, STM_SETIMAGE, IMAGE_ICON, (LPARAM)zod.hIcon);
}
else
diff --git a/plugins/UserInfoEx/src/ctrl_button.cpp b/plugins/UserInfoEx/src/ctrl_button.cpp
index 59ccb0a1ee..38b8ef5fc3 100644
--- a/plugins/UserInfoEx/src/ctrl_button.cpp
+++ b/plugins/UserInfoEx/src/ctrl_button.cpp
@@ -544,7 +544,7 @@ static LRESULT CALLBACK Button_WndProc(HWND hwndBtn, UINT uMsg, WPARAM wParam, L
{
wchar_t szButton[MAX_PATH];
GetWindowText(bct->hwnd, szButton, _countof(szButton));
- SetWindowText(bct->hwnd, TranslateTS(szButton));
+ SetWindowText(bct->hwnd, TranslateW(szButton));
}
break;
case WM_SETFOCUS: // set keybord bFocus and redraw
diff --git a/plugins/UserInfoEx/src/ctrl_combo.cpp b/plugins/UserInfoEx/src/ctrl_combo.cpp
index 4677b94a8c..8480e0f969 100644
--- a/plugins/UserInfoEx/src/ctrl_combo.cpp
+++ b/plugins/UserInfoEx/src/ctrl_combo.cpp
@@ -157,8 +157,8 @@ BOOL CCombo::OnInfoChanged(MCONTACT hContact, LPCSTR pszProto)
case DBVT_BYTE: iVal = Find((int)dbv.bVal); break;
case DBVT_WORD: iVal = Find((int)dbv.wVal); break;
case DBVT_DWORD: iVal = Find((int)dbv.dVal); break;
- case DBVT_TCHAR:
- iVal = Find(TranslateTS(dbv.ptszVal));
+ case DBVT_WCHAR:
+ iVal = Find(TranslateW(dbv.ptszVal));
if (iVal == CB_ERR) {
// other
iVal = Find(_pList[_nList - 1].nID);
diff --git a/plugins/UserInfoEx/src/ctrl_contact.cpp b/plugins/UserInfoEx/src/ctrl_contact.cpp
index 1e882cdfa9..f86c9be82c 100644
--- a/plugins/UserInfoEx/src/ctrl_contact.cpp
+++ b/plugins/UserInfoEx/src/ctrl_contact.cpp
@@ -172,11 +172,11 @@ static INT_PTR CALLBACK DlgProc_EMail(HWND hDlg, UINT msg, WPARAM wParam, LPARAM
wchar_t szButton[MAX_PATH];
HWND hBtn = GetDlgItem(hDlg, IDOK);
GetWindowText(hBtn, szButton, _countof(szButton));
- SetWindowText(hBtn, TranslateTS(szButton));
+ SetWindowText(hBtn, TranslateW(szButton));
hBtn = GetDlgItem(hDlg, IDCANCEL);
GetWindowText(hBtn, szButton, _countof(szButton));
- SetWindowText(hBtn, TranslateTS(szButton));
+ SetWindowText(hBtn, TranslateW(szButton));
}
return TRUE;
@@ -256,10 +256,10 @@ INT_PTR CALLBACK DlgProc_Phone(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam
hBtn = GetDlgItem(hDlg, IDOK);
GetWindowText(hBtn, szButton, _countof(szButton));
- SetWindowText(hBtn, TranslateTS(szButton));
+ SetWindowText(hBtn, TranslateW(szButton));
hBtn = GetDlgItem(hDlg, IDCANCEL);
GetWindowText(hBtn, szButton, _countof(szButton));
- SetWindowText(hBtn, TranslateTS(szButton));
+ SetWindowText(hBtn, TranslateW(szButton));
}
if (*cbi->pszVal) SetWindowText(hDlg, LPGENW("Edit phone number"));
if (cbi->wFlags & CBEXIF_SMS) CheckDlgButton(hDlg, CHECK_SMS, BST_CHECKED);
@@ -1430,7 +1430,7 @@ int CtrlContactWriteItemToDB(
if (cbi.wFlags & CBEXIF_SMS)
mir_wstrncat(szVal, L" SMS", _countof(szVal) - mir_wstrlen(szVal));
- if (db_set_ts(hContact, pszModule, pszSetting, szVal)) return 1;
+ if (db_set_ws(hContact, pszModule, pszSetting, szVal)) return 1;
}
cbi.wFlags &= ~CTRLF_CHANGED;
cbi.wMask = CBEXIM_FLAGS;
@@ -1482,12 +1482,12 @@ int CtrlContactWriteMyItemsToDB(
}
mir_snprintf(pszSetting, szFormatCat, i);
if (*szCat && wcsncmp(szCat, pszOther, ccOther)) {
- if (db_set_ts(hContact, pszModule, pszSetting, szCat)) return 1;
+ if (db_set_ws(hContact, pszModule, pszSetting, szCat)) return 1;
}
else
db_unset(hContact, pszModule, pszSetting);
mir_snprintf(pszSetting, szFormatVal, i);
- if (db_set_ts(hContact, pszModule, pszSetting, szVal)) return 1;
+ if (db_set_ws(hContact, pszModule, pszSetting, szVal)) return 1;
cbi.wFlags &= ~CTRLF_CHANGED;
cbi.wMask = CBEXIM_FLAGS;
CtrlContactWndProc(hCtrl, CBEXM_SETITEM, NULL, (LPARAM)&cbi);
diff --git a/plugins/UserInfoEx/src/ctrl_edit.cpp b/plugins/UserInfoEx/src/ctrl_edit.cpp
index 874b6846dd..39d1be391b 100644
--- a/plugins/UserInfoEx/src/ctrl_edit.cpp
+++ b/plugins/UserInfoEx/src/ctrl_edit.cpp
@@ -136,7 +136,7 @@ BOOL CEditCtrl::OnInfoChanged(MCONTACT hContact, LPCSTR pszProto)
_pszValue = mir_wstrdup(szText);
break;
- case DBVT_TCHAR:
+ case DBVT_WCHAR:
if (dbv.ptszVal) {
SetWindowText(_hwnd, dbv.ptszVal);
_pszValue = dbv.ptszVal;
@@ -190,7 +190,7 @@ void CEditCtrl::OnApply(MCONTACT hContact, LPCSTR pszProto)
dbv.dVal = (DWORD)wcstol(val, NULL, 10);
break;
- case DBVT_TCHAR:
+ case DBVT_WCHAR:
dbv.ptszVal = val;
break;
diff --git a/plugins/UserInfoEx/src/dlg_anniversarylist.cpp b/plugins/UserInfoEx/src/dlg_anniversarylist.cpp
index 73e8018d72..8eab08d56b 100644
--- a/plugins/UserInfoEx/src/dlg_anniversarylist.cpp
+++ b/plugins/UserInfoEx/src/dlg_anniversarylist.cpp
@@ -601,7 +601,7 @@ class CAnnivList
lvc.cx = db_get_w(NULL, MODNAME, pszSetting, defaultWidth);
lvc.mask = LVCF_WIDTH | LVCF_TEXT;
lvc.iSubItem = iSubItem;
- lvc.pszText = TranslateTS(pszText);
+ lvc.pszText = TranslateW(pszText);
return ListView_InsertColumn(_hList, lvc.iSubItem++, &lvc) == -1;
}
diff --git a/plugins/UserInfoEx/src/dlg_msgbox.cpp b/plugins/UserInfoEx/src/dlg_msgbox.cpp
index 68aacb64fa..29ac9cd0df 100644
--- a/plugins/UserInfoEx/src/dlg_msgbox.cpp
+++ b/plugins/UserInfoEx/src/dlg_msgbox.cpp
@@ -664,7 +664,7 @@ INT_PTR CALLBACK MsgBox(HWND hParent, UINT uType, LPCTSTR pszTitle, LPCTSTR pszI
va_list vl;
va_start(vl, pszFormat);
- mir_vsnwprintf(tszMsg, _countof(tszMsg), TranslateTS(pszFormat), vl);
+ mir_vsnwprintf(tszMsg, _countof(tszMsg), TranslateW(pszFormat), vl);
va_end(vl);
MSGBOX mb = { 0 };
@@ -672,8 +672,8 @@ INT_PTR CALLBACK MsgBox(HWND hParent, UINT uType, LPCTSTR pszTitle, LPCTSTR pszI
mb.hParent = hParent;
mb.hiLogo = IcoLib_GetIcon(ICO_COMMON_MAIN);
mb.hiMsg = NULL;
- mb.ptszTitle = TranslateTS(pszTitle);
- mb.ptszInfoText = TranslateTS(pszInfo);
+ mb.ptszTitle = TranslateW(pszTitle);
+ mb.ptszInfoText = TranslateW(pszInfo);
mb.ptszMsg = tszMsg;
mb.uType = uType;
return MsgBoxService(NULL, (LPARAM)&mb);
@@ -691,7 +691,7 @@ INT_PTR CALLBACK MsgErr(HWND hParent, LPCTSTR pszFormat, ...)
va_list vl;
va_start(vl, pszFormat);
- mir_vsnwprintf(tszMsg, TranslateTS(pszFormat), vl);
+ mir_vsnwprintf(tszMsg, TranslateW(pszFormat), vl);
va_end(vl);
MSGBOX mb = {0};
diff --git a/plugins/UserInfoEx/src/dlg_propsheet.cpp b/plugins/UserInfoEx/src/dlg_propsheet.cpp
index 71f4fef8d7..e1c7a28f75 100644
--- a/plugins/UserInfoEx/src/dlg_propsheet.cpp
+++ b/plugins/UserInfoEx/src/dlg_propsheet.cpp
@@ -124,7 +124,7 @@ private:
// check if icq is online
if (!IsProtoOnline((*_pPd)->szModuleName))
MsgBox(_pPs->hDlg, MB_ICON_WARNING, TranslateT("Upload details"),
- CMString(FORMAT, TranslateT("Protocol '%s' is offline"), _A2T((*_pPd)->szModuleName)),
+ CMStringW(FORMAT, TranslateT("Protocol '%s' is offline"), _A2T((*_pPd)->szModuleName)),
TranslateT("You are not currently connected to the ICQ network.\nYou must be online in order to update your information on the server.\n\nYour changes will be saved to database only."));
// start uploading process
@@ -507,7 +507,7 @@ static int InitDetails(WPARAM wParam, LPARAM lParam)
if (lParam || bChangeDetailsEnabled) {
OPTIONSDIALOGPAGE odp = { 0 };
odp.hInstance = ghInst;
- odp.flags = ODPF_ICON | ODPF_TCHAR;
+ odp.flags = ODPF_ICON | ODPF_UNICODE;
odp.pwszGroup = IcoLib_GetDefaultIconFileName();
if (lParam) {
@@ -1094,14 +1094,14 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
LPCTSTR pszName;
if (!pPs->hContact)
pszName = TranslateT("Owner");
- else if (pdbcws && pdbcws->value.type == DBVT_TCHAR)
+ else if (pdbcws && pdbcws->value.type == DBVT_WCHAR)
pszName = pdbcws->value.ptszVal;
else
pszName = DB::Contact::DisplayName(pPs->hContact);
HWND hName = GetDlgItem(hDlg, TXT_NAME);
SetWindowText(hName, pszName);
- SetWindowText(hDlg, CMString(FORMAT, L"%s - %s", pszName, TranslateT("edit contact information")));
+ SetWindowText(hDlg, CMStringW(FORMAT, L"%s - %s", pszName, TranslateT("edit contact information")));
SetDlgItemText(hDlg, IDC_HEADERBAR, TranslateT("View personal user details and more"));
// redraw the name control
diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp
index 74f2a84c49..b8d878b188 100644
--- a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp
+++ b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp
@@ -257,7 +257,7 @@ MCONTACT CExImContactBase::toDB()
// add group
if (_pszGroup) {
ptrW ptszGroup(mir_utf8decodeW(_pszGroup));
- db_set_ts(_hContact, MOD_CLIST, "Group", ptszGroup);
+ db_set_ws(_hContact, MOD_CLIST, "Group", ptszGroup);
Clist_GroupCreate(NULL, ptszGroup);
}
}
diff --git a/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.cpp b/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.cpp
index ea71cc0d20..aaf300bc55 100644
--- a/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.cpp
+++ b/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.cpp
@@ -191,7 +191,7 @@ BYTE CProgress::UpdateContact(LPCTSTR pszFormat, ...)
va_list vl;
va_start(vl, pszFormat);
- mir_vsnwprintf(buf, _countof(buf), TranslateTS(pszFormat), vl);
+ mir_vsnwprintf(buf, _countof(buf), TranslateW(pszFormat), vl);
va_end(vl);
SetDlgItemText(_hDlg, TXT_CONTACT, buf);
}
@@ -218,7 +218,7 @@ BYTE CProgress::UpdateSetting(LPCTSTR pszFormat, ...)
va_list vl;
va_start(vl, pszFormat);
- mir_vsnwprintf(buf, _countof(buf), TranslateTS(pszFormat), vl);
+ mir_vsnwprintf(buf, _countof(buf), TranslateW(pszFormat), vl);
va_end(vl);
GetDlgItemText(_hDlg, TXT_SETTING, tmp, _countof(tmp));
if (mir_wstrcmpi(tmp,buf))
diff --git a/plugins/UserInfoEx/src/mir_icolib.cpp b/plugins/UserInfoEx/src/mir_icolib.cpp
index 33c1a84934..e836756b0d 100644
--- a/plugins/UserInfoEx/src/mir_icolib.cpp
+++ b/plugins/UserInfoEx/src/mir_icolib.cpp
@@ -135,7 +135,7 @@ LPTSTR IcoLib_GetDefaultIconFileName()
wchar_t absolute[MAX_PATH];
for (int i = 0; i < _countof(path); i++) {
- PathToAbsoluteT(path[i], absolute);
+ PathToAbsoluteW(path[i], absolute);
if (PathFileExists(absolute))
return path[i];
}
@@ -157,7 +157,7 @@ static void IcoLib_CheckIconPackVersion(LPTSTR szIconPack)
if (db_get_b(NULL, MODNAME, SET_ICONS_CHECKFILEVERSION, TRUE)) {
if (szIconPack) {
wchar_t szAbsolutePath[MAX_PATH];
- PathToAbsoluteT(szIconPack, szAbsolutePath);
+ PathToAbsoluteW(szIconPack, szAbsolutePath);
HMODULE hIconDll = LoadLibrary(szAbsolutePath);
if (hIconDll) {
@@ -227,7 +227,7 @@ static HANDLE IcoLib_RegisterIconHandleEx(LPSTR szIconID, LPSTR szDescription, L
if (szIconID && szDescription && szSection) {
SKINICONDESC sid = { 0 };
- sid.flags = SIDF_ALL_TCHAR;
+ sid.flags = SIDF_ALL_UNICODE;
sid.pszName = szIconID;
sid.description.w = mir_a2u(szDescription);
sid.section.w = mir_a2u(szSection);
diff --git a/plugins/UserInfoEx/src/psp_about.cpp b/plugins/UserInfoEx/src/psp_about.cpp
index d19175763e..760dabe314 100644
--- a/plugins/UserInfoEx/src/psp_about.cpp
+++ b/plugins/UserInfoEx/src/psp_about.cpp
@@ -49,7 +49,7 @@ INT_PTR CALLBACK PSPProcEdit(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam,
TranslateDialogDefault(hDlg);
- pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_ABOUT, pszSetting, DBVT_TCHAR));
+ pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_ABOUT, pszSetting, DBVT_WCHAR));
// remove static edge in aero mode
if (IsAeroMode())
diff --git a/plugins/UserInfoEx/src/psp_company.cpp b/plugins/UserInfoEx/src/psp_company.cpp
index 48797d60bd..496ff3f60f 100644
--- a/plugins/UserInfoEx/src/psp_company.cpp
+++ b/plugins/UserInfoEx/src/psp_company.cpp
@@ -46,12 +46,12 @@ INT_PTR CALLBACK PSPProcCompany(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
TranslateDialogDefault(hDlg);
- pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_COMPANY, SET_CONTACT_COMPANY, DBVT_TCHAR));
- pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_DEPARTMENT, SET_CONTACT_COMPANY_DEPARTMENT, DBVT_TCHAR));
- pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_OFFICE, SET_CONTACT_COMPANY_OFFICE, DBVT_TCHAR));
- pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_POSITION, SET_CONTACT_COMPANY_POSITION, DBVT_TCHAR));
- pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_SUPERIOR, SET_CONTACT_COMPANY_SUPERIOR, DBVT_TCHAR));
- pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_ASSISTENT, SET_CONTACT_COMPANY_ASSISTENT, DBVT_TCHAR));
+ pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_COMPANY, SET_CONTACT_COMPANY, DBVT_WCHAR));
+ pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_DEPARTMENT, SET_CONTACT_COMPANY_DEPARTMENT, DBVT_WCHAR));
+ pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_OFFICE, SET_CONTACT_COMPANY_OFFICE, DBVT_WCHAR));
+ pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_POSITION, SET_CONTACT_COMPANY_POSITION, DBVT_WCHAR));
+ pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_SUPERIOR, SET_CONTACT_COMPANY_SUPERIOR, DBVT_WCHAR));
+ pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_ASSISTENT, SET_CONTACT_COMPANY_ASSISTENT, DBVT_WCHAR));
GetOccupationList(&nList, &pList);
pCtrlList->insert(CCombo::CreateObj(hDlg, EDIT_OCCUPATION, SET_CONTACT_COMPANY_OCCUPATION, DBVT_WORD, pList, nList));
diff --git a/plugins/UserInfoEx/src/psp_contact.cpp b/plugins/UserInfoEx/src/psp_contact.cpp
index afb2061c38..47c9afaade 100644
--- a/plugins/UserInfoEx/src/psp_contact.cpp
+++ b/plugins/UserInfoEx/src/psp_contact.cpp
@@ -51,11 +51,11 @@ INT_PTR CALLBACK PSPProcContactHome(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM
SendDlgItemMessage(hDlg, BTN_GOTO, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Open in browser"), MBBF_TCHAR);
TranslateDialogDefault(hDlg);
- pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_STREET, SET_CONTACT_STREET, DBVT_TCHAR));
- pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_CITY, SET_CONTACT_CITY, DBVT_TCHAR));
- pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_ZIP, SET_CONTACT_ZIP, DBVT_TCHAR));
- pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_STATE, SET_CONTACT_STATE, DBVT_TCHAR));
- pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_HOMEPAGE, SET_CONTACT_HOMEPAGE, DBVT_TCHAR));
+ pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_STREET, SET_CONTACT_STREET, DBVT_WCHAR));
+ pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_CITY, SET_CONTACT_CITY, DBVT_WCHAR));
+ pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_ZIP, SET_CONTACT_ZIP, DBVT_WCHAR));
+ pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_STATE, SET_CONTACT_STATE, DBVT_WCHAR));
+ pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_HOMEPAGE, SET_CONTACT_HOMEPAGE, DBVT_WCHAR));
GetCountryList(&nList, &pList);
pCtrlList->insert(CCombo::CreateObj(hDlg, EDIT_COUNTRY, SET_CONTACT_COUNTRY, DBVT_WORD, pList, nList));
@@ -197,11 +197,11 @@ INT_PTR CALLBACK PSPProcContactWork(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM
SendDlgItemMessage(hDlg, BTN_GOTO, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Open in browser"), MBBF_TCHAR);
TranslateDialogDefault(hDlg);
- pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_STREET, SET_CONTACT_COMPANY_STREET, DBVT_TCHAR));
- pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_CITY, SET_CONTACT_COMPANY_CITY, DBVT_TCHAR));
- pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_ZIP, SET_CONTACT_COMPANY_ZIP, DBVT_TCHAR));
- pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_STATE, SET_CONTACT_COMPANY_STATE, DBVT_TCHAR));
- pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_HOMEPAGE, SET_CONTACT_COMPANY_HOMEPAGE, DBVT_TCHAR));
+ pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_STREET, SET_CONTACT_COMPANY_STREET, DBVT_WCHAR));
+ pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_CITY, SET_CONTACT_COMPANY_CITY, DBVT_WCHAR));
+ pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_ZIP, SET_CONTACT_COMPANY_ZIP, DBVT_WCHAR));
+ pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_STATE, SET_CONTACT_COMPANY_STATE, DBVT_WCHAR));
+ pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_HOMEPAGE, SET_CONTACT_COMPANY_HOMEPAGE, DBVT_WCHAR));
GetCountryList(&nList, &pList);
pCtrlList->insert(CCombo::CreateObj(hDlg, EDIT_COUNTRY, SET_CONTACT_COMPANY_COUNTRY, DBVT_WORD, pList, nList));
diff --git a/plugins/UserInfoEx/src/psp_general.cpp b/plugins/UserInfoEx/src/psp_general.cpp
index e0e5e349b0..5d402909fc 100644
--- a/plugins/UserInfoEx/src/psp_general.cpp
+++ b/plugins/UserInfoEx/src/psp_general.cpp
@@ -46,13 +46,13 @@ INT_PTR CALLBACK PSPProcGeneral(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
SendDlgItemMessage(hDlg, IDC_PAGETITLE, WM_SETFONT, (WPARAM)hBoldFont, 0);
TranslateDialogDefault(hDlg);
- pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_TITLE, SET_CONTACT_TITLE, DBVT_TCHAR));
- pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_FIRSTNAME, SET_CONTACT_FIRSTNAME, DBVT_TCHAR));
- pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_SECONDNAME, SET_CONTACT_SECONDNAME, DBVT_TCHAR));
- pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_LASTNAME, SET_CONTACT_LASTNAME, DBVT_TCHAR));
- pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_NICK, SET_CONTACT_NICK, DBVT_TCHAR));
- pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_DISPLAYNAME, "CList", SET_CONTACT_MYHANDLE, DBVT_TCHAR));
- pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_PARTNER, SET_CONTACT_PARTNER, DBVT_TCHAR));
+ pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_TITLE, SET_CONTACT_TITLE, DBVT_WCHAR));
+ pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_FIRSTNAME, SET_CONTACT_FIRSTNAME, DBVT_WCHAR));
+ pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_SECONDNAME, SET_CONTACT_SECONDNAME, DBVT_WCHAR));
+ pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_LASTNAME, SET_CONTACT_LASTNAME, DBVT_WCHAR));
+ pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_NICK, SET_CONTACT_NICK, DBVT_WCHAR));
+ pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_DISPLAYNAME, "CList", SET_CONTACT_MYHANDLE, DBVT_WCHAR));
+ pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_PARTNER, SET_CONTACT_PARTNER, DBVT_WCHAR));
GetNamePrefixList(&nList, &pList);
pCtrlList->insert(CCombo::CreateObj(hDlg, EDIT_PREFIX, SET_CONTACT_PREFIX, DBVT_BYTE, pList, nList));
@@ -62,9 +62,9 @@ INT_PTR CALLBACK PSPProcGeneral(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
pCtrlList->insert(CCombo::CreateObj(hDlg, EDIT_MARITAL, SET_CONTACT_MARITAL, DBVT_BYTE, pList, nList));
GetLanguageList(&nList, &pList);
- pCtrlList->insert(CCombo::CreateObj(hDlg, EDIT_LANG1, SET_CONTACT_LANG1, DBVT_TCHAR, pList, nList));
- pCtrlList->insert(CCombo::CreateObj(hDlg, EDIT_LANG2, SET_CONTACT_LANG2, DBVT_TCHAR, pList, nList));
- pCtrlList->insert(CCombo::CreateObj(hDlg, EDIT_LANG3, SET_CONTACT_LANG3, DBVT_TCHAR, pList, nList));
+ pCtrlList->insert(CCombo::CreateObj(hDlg, EDIT_LANG1, SET_CONTACT_LANG1, DBVT_WCHAR, pList, nList));
+ pCtrlList->insert(CCombo::CreateObj(hDlg, EDIT_LANG2, SET_CONTACT_LANG2, DBVT_WCHAR, pList, nList));
+ pCtrlList->insert(CCombo::CreateObj(hDlg, EDIT_LANG3, SET_CONTACT_LANG3, DBVT_WCHAR, pList, nList));
}
}
break;
diff --git a/plugins/UserInfoEx/src/psp_options.cpp b/plugins/UserInfoEx/src/psp_options.cpp
index 1c93297951..bdb41d321a 100644
--- a/plugins/UserInfoEx/src/psp_options.cpp
+++ b/plugins/UserInfoEx/src/psp_options.cpp
@@ -67,7 +67,7 @@ static void FORCEINLINE ComboBox_SetCurSelByItemDataPtr(HWND hCombo, LPARAM pDat
static void FORCEINLINE ComboBox_AddItemWithData(HWND hCombo, LPTSTR ptszText, LPARAM pData)
{
- ComboBox_SetItemData(hCombo, ComboBox_AddString(hCombo, TranslateTS(ptszText)), pData);
+ ComboBox_SetItemData(hCombo, ComboBox_AddString(hCombo, TranslateW(ptszText)), pData);
}
/**
diff --git a/plugins/UserInfoEx/src/psp_origin.cpp b/plugins/UserInfoEx/src/psp_origin.cpp
index b9d50cec7f..5c696c90b4 100644
--- a/plugins/UserInfoEx/src/psp_origin.cpp
+++ b/plugins/UserInfoEx/src/psp_origin.cpp
@@ -48,10 +48,10 @@ INT_PTR CALLBACK PSPProcOrigin(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
TranslateDialogDefault(hDlg);
SetTimer(hDlg, 1, 5000, NULL);
- pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_STREET, SET_CONTACT_ORIGIN_STREET, DBVT_TCHAR));
- pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_ZIP, SET_CONTACT_ORIGIN_ZIP, DBVT_TCHAR));
- pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_CITY, SET_CONTACT_ORIGIN_CITY, DBVT_TCHAR));
- pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_STATE, SET_CONTACT_ORIGIN_STATE, DBVT_TCHAR));
+ pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_STREET, SET_CONTACT_ORIGIN_STREET, DBVT_WCHAR));
+ pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_ZIP, SET_CONTACT_ORIGIN_ZIP, DBVT_WCHAR));
+ pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_CITY, SET_CONTACT_ORIGIN_CITY, DBVT_WCHAR));
+ pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_STATE, SET_CONTACT_ORIGIN_STATE, DBVT_WCHAR));
GetCountryList(&nList, &pList);
pCtrlList->insert(CCombo::CreateObj(hDlg, EDIT_COUNTRY, SET_CONTACT_ORIGIN_COUNTRY, DBVT_WORD, pList, nList));
diff --git a/plugins/UserInfoEx/src/psp_profile.cpp b/plugins/UserInfoEx/src/psp_profile.cpp
index 651054eb5c..85a0c98b08 100644
--- a/plugins/UserInfoEx/src/psp_profile.cpp
+++ b/plugins/UserInfoEx/src/psp_profile.cpp
@@ -490,7 +490,7 @@ static int ProfileList_AddItemlistFromDB(
mir_snprintf(pszSetting, szValFormat, i);
if (DB::Setting::GetTString(hContact, pszModule, pszSetting, &dbvVal))
break;
- if (dbvVal.type != DBVT_TCHAR)
+ if (dbvVal.type != DBVT_WCHAR)
continue;
mir_snprintf(pszSetting, szCatFormat, i);
DB::Setting::GetAString(hContact, pszModule, pszSetting, &dbvCat);
@@ -1219,13 +1219,13 @@ INT_PTR CALLBACK PSPProcContactProfile(HWND hDlg, UINT uMsg, WPARAM wParam, LPAR
continue;
if (!(pItem->wFlags & (CTRLF_HASPROTO|CTRLF_HASMETA))) {
mir_snprintf(pszSetting, pFmt[iFmt].szValFmt, iItem);
- db_set_ts(hContact, pszModule, pszSetting, pItem->pszText[1]);
+ db_set_ws(hContact, pszModule, pszSetting, pItem->pszText[1]);
// save category
mir_snprintf(pszSetting, pFmt[iFmt].szCatFmt, iItem);
if (pItem->idstrList && pItem->iListItem > 0 && pItem->iListItem < pItem->idstrListCount)
db_set_s(hContact, pszModule, pszSetting, (LPSTR)pItem->idstrList[pItem->iListItem].pszText);
else if (pItem->pszText[0] && *pItem->pszText[0])
- db_set_ts(hContact, pszModule, pszSetting, (LPTSTR)pItem->pszText[0]);
+ db_set_ws(hContact, pszModule, pszSetting, (LPTSTR)pItem->pszText[0]);
else
db_unset(hContact, pszModule, pszSetting);
// redraw the item if required
@@ -1339,7 +1339,7 @@ INT_PTR CALLBACK PSPProcContactProfile(HWND hDlg, UINT uMsg, WPARAM wParam, LPAR
SetTextColor(cd->nmcd.hdc, GetSysColor(COLOR_3DSHADOW));
ProfileList_GetItemText(cd->nmcd.hdr.hwndFrom, cd->nmcd.dwItemSpec, 0, szText, MAX_PATH);
rc.left += 6;
- DrawText(cd->nmcd.hdc, TranslateTS(szText), -1, &rc, DT_NOCLIP | DT_NOPREFIX | DT_SINGLELINE | DT_VCENTER);
+ DrawText(cd->nmcd.hdc, TranslateW(szText), -1, &rc, DT_NOCLIP | DT_NOPREFIX | DT_SINGLELINE | DT_VCENTER);
rc.bottom -= 2;
rc.top = rc.bottom - 1;
diff --git a/plugins/UserInfoEx/src/svc_reminder.cpp b/plugins/UserInfoEx/src/svc_reminder.cpp
index 63e077a06f..94e317b8e6 100644
--- a/plugins/UserInfoEx/src/svc_reminder.cpp
+++ b/plugins/UserInfoEx/src/svc_reminder.cpp
@@ -255,7 +255,7 @@ static int NotifyWithPopup(MCONTACT hContact, CEvent::EType eventType, int DaysT
if (hContact) {
ppd.lchContact = hContact;
- mir_snwprintf(ppd.lptzContactName, L"%s - %s", TranslateTS(pszDesc), DB::Contact::DisplayName(hContact));
+ mir_snwprintf(ppd.lptzContactName, L"%s - %s", TranslateW(pszDesc), DB::Contact::DisplayName(hContact));
}
else mir_wstrncpy(ppd.lptzContactName, TranslateT("Reminder"), _countof(ppd.lptzContactName));
@@ -372,7 +372,7 @@ static BYTE CheckAnniversaries(MCONTACT hContact, MTime &Now, CEvent &evt, BYTE
int numAnniversaries = 0;
int Diff = 0;
MAnnivDate mta;
- CMString tszMsg;
+ CMStringW tszMsg;
if (gRemindOpts.RemindState == REMIND_ANNIV || gRemindOpts.RemindState == REMIND_ALL) {
for (int i = 0; i < ANID_LAST && !mta.DBGetAnniversaryDate(hContact, i); i++) {
diff --git a/plugins/UserInfoEx/src/svc_timezone_old.cpp b/plugins/UserInfoEx/src/svc_timezone_old.cpp
index dfb93928ba..759a8a321a 100644
--- a/plugins/UserInfoEx/src/svc_timezone_old.cpp
+++ b/plugins/UserInfoEx/src/svc_timezone_old.cpp
@@ -440,7 +440,7 @@ WORD GetContactTimeZoneCtrl(MCONTACT hContact, LPCSTR pszProto, CTimeZone** pTim
CTimeZone* pTz = NULL;
// try to read windows' timezone name from database
- flags = DB::Setting::GetCtrl(hContact, USERINFO, USERINFO, pszProto, SET_CONTACT_TIMEZONENAME, &dbv, DBVT_TCHAR);
+ flags = DB::Setting::GetCtrl(hContact, USERINFO, USERINFO, pszProto, SET_CONTACT_TIMEZONENAME, &dbv, DBVT_WCHAR);
if (flags == 0 || FAILED(TzMgr.find(&pTz, dbv.ptszVal))) {
db_free(&dbv);
diff --git a/plugins/Variables/src/contact.cpp b/plugins/Variables/src/contact.cpp
index b0a46021ee..471502da27 100644
--- a/plugins/Variables/src/contact.cpp
+++ b/plugins/Variables/src/contact.cpp
@@ -150,14 +150,14 @@ wchar_t* getContactInfoT(BYTE type, MCONTACT hContact)
return NULL;
case CCNF_GROUP:
- if ((res = db_get_tsa(hContact, "CList", "Group")) != NULL)
+ if ((res = db_get_wsa(hContact, "CList", "Group")) != NULL)
return res;
break;
case CNF_UNIQUEID:
//UID for ChatRoom
if (db_get_b(hContact, szProto, "ChatRoom", 0) == 1)
- if ((res = db_get_tsa(hContact, szProto, "ChatRoomID")) != NULL)
+ if ((res = db_get_wsa(hContact, szProto, "ChatRoomID")) != NULL)
return res;
//UID for other contact
@@ -192,7 +192,7 @@ MCONTACT getContactFromString(const wchar_t *tszContact, DWORD dwFlags, int nMat
}
// contact was not in cache, do a search
- CMString tmp;
+ CMStringW tmp;
int count = 0;
MCONTACT hContact;
LIST<void> arResults(1);
diff --git a/plugins/Variables/src/dbhelpers.h b/plugins/Variables/src/dbhelpers.h
index 4531bf397f..b942337774 100644
--- a/plugins/Variables/src/dbhelpers.h
+++ b/plugins/Variables/src/dbhelpers.h
@@ -104,7 +104,7 @@ static int __inline DBDeleteIthSetting(DWORD i, MCONTACT hContact,const char *sz
#define db_gets(a,b) db_get(NULL, MODULENAME, a, b)
#define db_setb(a,b) db_set_b(NULL, MODULENAME, a, (BYTE)(b))
#define db_sets(a,b) db_set_s(NULL, MODULENAME, a, b)
-#define db_setts(a,b) db_set_ts(NULL, MODULENAME, a, b)
+#define db_setts(a,b) db_set_ws(NULL, MODULENAME, a, b)
#define db_setw(a,b) db_set_w(NULL, MODULENAME, a, (WORD)(b))
#define db_setd(a,b) db_set_dw(NULL, MODULENAME, a, (DWORD)(b))
#define db_del(a) db_unset(NULL, MODULENAME, a);
diff --git a/plugins/Variables/src/help.cpp b/plugins/Variables/src/help.cpp
index 7d663d4aae..c32efb2dcb 100644
--- a/plugins/Variables/src/help.cpp
+++ b/plugins/Variables/src/help.cpp
@@ -129,7 +129,7 @@ static INT_PTR CALLBACK clistDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM
MCONTACT hItem, hContact = wParam;
log_debugA("VARM_SETSUBJECT: %u", hContact);
if (hContact == INVALID_CONTACT_ID) {
- wchar_t *tszContact = db_get_tsa(NULL, MODULENAME, SETTING_SUBJECT);
+ wchar_t *tszContact = db_get_wsa(NULL, MODULENAME, SETTING_SUBJECT);
log_debugA("VARM_SETSUBJECT: %s", tszContact);
if (tszContact != NULL) {
hContact = getContactFromString(tszContact, CI_PROTOID);
@@ -204,7 +204,7 @@ static INT_PTR CALLBACK clistDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM
if (hContact != NULL) {
wchar_t *tszContact = encodeContactToString(hContact);
if (tszContact != NULL) {
- db_set_ts(NULL, MODULENAME, SETTING_SUBJECT, tszContact);
+ db_set_ws(NULL, MODULENAME, SETTING_SUBJECT, tszContact);
mir_free(tszContact);
} }
break;
@@ -403,7 +403,7 @@ static BOOL CALLBACK processTokenListMessage(HWND hwndDlg, UINT msg, WPARAM, LPA
tszHelpDesc = mir_wstrdup(L"unknown");
lvItem.iSubItem = 1;
- lvItem.pszText = TranslateTS(tszHelpDesc);
+ lvItem.pszText = TranslateW(tszHelpDesc);
ListView_SetItem(hList, &lvItem);
mir_free(tszHelpDesc);
}
@@ -422,7 +422,7 @@ static BOOL CALLBACK processTokenListMessage(HWND hwndDlg, UINT msg, WPARAM, LPA
cat = getTokenCategory((TOKENREGISTEREX *)lvItem.lParam);
if (cat != NULL) {
- text = mir_wstrdup(TranslateTS(cat));
+ text = mir_wstrdup(TranslateW(cat));
mir_free(cat);
}
else text = NULL;
diff --git a/plugins/Variables/src/options.cpp b/plugins/Variables/src/options.cpp
index d07ad89999..8be86a9349 100644
--- a/plugins/Variables/src/options.cpp
+++ b/plugins/Variables/src/options.cpp
@@ -26,7 +26,7 @@ static INT_PTR CALLBACK SetOptsDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARA
TranslateDialogDefault(hwndDlg);
{
DBVARIANT dbv;
- if (!db_get_ts( NULL, MODULENAME, SETTING_STARTUPTEXT, &dbv )) {
+ if (!db_get_ws( NULL, MODULENAME, SETTING_STARTUPTEXT, &dbv )) {
SetDlgItemText(hwndDlg, IDC_FORMATTEXT, dbv.ptszVal);
db_free(&dbv);
}
@@ -90,7 +90,7 @@ static INT_PTR CALLBACK SetOptsDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARA
break;
if (GetDlgItemText(hwndDlg, IDC_FORMATTEXT, szFormatText, len+1) != 0)
- db_set_ts(NULL, MODULENAME, SETTING_STARTUPTEXT, szFormatText);
+ db_set_ws(NULL, MODULENAME, SETTING_STARTUPTEXT, szFormatText);
mir_free(szFormatText);
}
diff --git a/plugins/Variables/src/parse_metacontacts.cpp b/plugins/Variables/src/parse_metacontacts.cpp
index b8d2e9e324..9fc394c6f9 100644
--- a/plugins/Variables/src/parse_metacontacts.cpp
+++ b/plugins/Variables/src/parse_metacontacts.cpp
@@ -44,7 +44,7 @@ static wchar_t *parseGetParent(ARGUMENTSINFO *ai)
szUniqueID = mir_wstrdup(tszID);
}
- return CMString(FORMAT, L"<%S:%s>", szProto, szUniqueID).Detach();
+ return CMStringW(FORMAT, L"<%S:%s>", szProto, szUniqueID).Detach();
}
static wchar_t *parseGetDefault(ARGUMENTSINFO *ai)
@@ -72,7 +72,7 @@ static wchar_t *parseGetDefault(ARGUMENTSINFO *ai)
szUniqueID = mir_wstrdup(tszID);
}
- return CMString(FORMAT, L"<%S:%s>", szProto, szUniqueID).Detach();
+ return CMStringW(FORMAT, L"<%S:%s>", szProto, szUniqueID).Detach();
}
static wchar_t *parseGetMostOnline(ARGUMENTSINFO *ai)
@@ -100,7 +100,7 @@ static wchar_t *parseGetMostOnline(ARGUMENTSINFO *ai)
szUniqueID = mir_wstrdup(tszID);
}
- return CMString(FORMAT, L"<%S:%s>", szProto, szUniqueID).Detach();
+ return CMStringW(FORMAT, L"<%S:%s>", szProto, szUniqueID).Detach();
}
void registerMetaContactsTokens()
diff --git a/plugins/Variables/src/parse_miranda.cpp b/plugins/Variables/src/parse_miranda.cpp
index 11eb8d0181..72493df3da 100644
--- a/plugins/Variables/src/parse_miranda.cpp
+++ b/plugins/Variables/src/parse_miranda.cpp
@@ -126,7 +126,7 @@ static wchar_t* parseDBProfileName(ARGUMENTSINFO *ai)
return NULL;
wchar_t name[MAX_PATH];
- if (CallService(MS_DB_GETPROFILENAMET, _countof(name), (LPARAM)name))
+ if (CallService(MS_DB_GETPROFILENAMEW, _countof(name), (LPARAM)name))
return NULL;
return mir_wstrdup(name);
@@ -138,7 +138,7 @@ static wchar_t* parseDBProfilePath(ARGUMENTSINFO *ai)
return NULL;
wchar_t path[MAX_PATH];
- if (CallService(MS_DB_GETPROFILEPATHT, _countof(path), (LPARAM)path))
+ if (CallService(MS_DB_GETPROFILEPATHW, _countof(path), (LPARAM)path))
return NULL;
return mir_wstrdup(path);
@@ -395,7 +395,7 @@ static wchar_t* parseSpecialContact(ARGUMENTSINFO *ai)
if (szUniqueID == NULL)
return NULL;
- return CMString(FORMAT, L"<%S:%s>", szProto, szUniqueID).Detach();
+ return CMStringW(FORMAT, L"<%S:%s>", szProto, szUniqueID).Detach();
}
static BOOL isValidDbEvent(DBEVENTINFO *dbe, int flags)
@@ -579,7 +579,7 @@ static wchar_t* parseDbEvent(ARGUMENTSINFO *ai)
return NULL;
}
- wchar_t *res = DbGetEventTextT(&dbe, CP_ACP);
+ wchar_t *res = DbGetEventTextW(&dbe, CP_ACP);
mir_free(dbe.pBlob);
return res;
}
@@ -589,7 +589,7 @@ static wchar_t* parseTranslate(ARGUMENTSINFO *ai)
if (ai->argc != 2)
return NULL;
- wchar_t *res = TranslateTS(ai->targv[1]);
+ wchar_t *res = TranslateW(ai->targv[1]);
return (res == NULL) ? NULL : mir_wstrdup(res);
}
diff --git a/plugins/Variables/src/variables.cpp b/plugins/Variables/src/variables.cpp
index ace282aac9..a6db523926 100644
--- a/plugins/Variables/src/variables.cpp
+++ b/plugins/Variables/src/variables.cpp
@@ -455,7 +455,7 @@ int LoadVarModule()
if (db_get_b(NULL, MODULENAME, SETTING_PARSEATSTARTUP, 0)) {
FORMATINFO fi = { 0 };
fi.cbSize = sizeof(fi);
- fi.tszFormat = db_get_tsa(NULL, MODULENAME, SETTING_STARTUPTEXT);
+ fi.tszFormat = db_get_wsa(NULL, MODULENAME, SETTING_STARTUPTEXT);
if (fi.tszFormat != NULL) {
mir_free(formatString(&fi));
mir_free(fi.tszFormat);
diff --git a/plugins/Watrack_MPD/src/init.cpp b/plugins/Watrack_MPD/src/init.cpp
index d5328df19b..eedf62bd0c 100755
--- a/plugins/Watrack_MPD/src/init.cpp
+++ b/plugins/Watrack_MPD/src/init.cpp
@@ -59,7 +59,7 @@ static int OnModulesLoaded(WPARAM, LPARAM)
{
NETLIBUSER nlu = {0};
nlu.cbSize = sizeof(nlu);
- nlu.flags = NUF_OUTGOING | NUF_HTTPCONNS | NUF_TCHAR;
+ nlu.flags = NUF_OUTGOING | NUF_HTTPCONNS | NUF_UNICODE;
nlu.ptszDescriptiveName = TranslateT("Watrack MPD connection");
nlu.szSettingsModule = __PLUGIN_NAME;
ghNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu);
diff --git a/plugins/Watrack_MPD/src/options.cpp b/plugins/Watrack_MPD/src/options.cpp
index 3178947f61..1944953c62 100755
--- a/plugins/Watrack_MPD/src/options.cpp
+++ b/plugins/Watrack_MPD/src/options.cpp
@@ -51,10 +51,10 @@ static INT_PTR CALLBACK DlgProcWaMpdOpts(HWND hwndDlg, UINT msg, WPARAM, LPARAM
db_set_w(NULL, szModuleName, "Port", (WORD)GetDlgItemInt(hwndDlg, IDC_PORT, NULL, FALSE));
gbPort = (WORD)GetDlgItemInt(hwndDlg, IDC_PORT, NULL, FALSE);
GetDlgItemText(hwndDlg, IDC_SERVER, szText, _countof(szText));
- db_set_ts(NULL, szModuleName, "Server", szText);
+ db_set_ws(NULL, szModuleName, "Server", szText);
mir_wstrcpy(gbHost, szText);
GetDlgItemText(hwndDlg, IDC_PASSWORD, szText, _countof(szText));
- db_set_ts(NULL, szModuleName, "Password", szText);
+ db_set_ws(NULL, szModuleName, "Password", szText);
mir_wstrcpy(gbPassword, szText);
return TRUE;
}
@@ -74,7 +74,7 @@ int WaMpdOptInit(WPARAM wParam,LPARAM)
odp.pwszTitle = LPGENW("Winamp Track");
odp.pwszGroup = LPGENW("Plugins");
odp.pwszTab = LPGENW("Watrack MPD");
- odp.flags=ODPF_BOLDGROUPS|ODPF_TCHAR;
+ odp.flags=ODPF_BOLDGROUPS|ODPF_UNICODE;
odp.pfnDlgProc = DlgProcWaMpdOpts;
Options_AddPage(wParam, &odp);
return 0;
diff --git a/plugins/Watrack_MPD/src/utilities.cpp b/plugins/Watrack_MPD/src/utilities.cpp
index c3e9e40cc8..1a833a8126 100755
--- a/plugins/Watrack_MPD/src/utilities.cpp
+++ b/plugins/Watrack_MPD/src/utilities.cpp
@@ -19,6 +19,6 @@
wchar_t* __stdcall UniGetContactSettingUtf(MCONTACT hContact, const char *szModule,const char* szSetting, wchar_t* szDef)
{
- wchar_t *szRes = db_get_tsa(hContact, szModule, szSetting);
+ wchar_t *szRes = db_get_wsa(hContact, szModule, szSetting);
return szRes ? szRes : mir_wstrdup(szDef);
}
diff --git a/plugins/Weather/src/weather.cpp b/plugins/Weather/src/weather.cpp
index c1c2f26f67..b3190f0b78 100644
--- a/plugins/Weather/src/weather.cpp
+++ b/plugins/Weather/src/weather.cpp
@@ -226,8 +226,8 @@ extern "C" int __declspec(dllexport) Load(void)
InitServices();
// add sound event
- SkinAddNewSoundExT("weatherupdated", _A2W(WEATHERPROTONAME), LPGENW("Weather Condition Changed"));
- SkinAddNewSoundExT("weatheralert", _A2W(WEATHERPROTONAME), LPGENW("Weather Alert Issued"));
+ SkinAddNewSoundExW("weatherupdated", _A2W(WEATHERPROTONAME), LPGENW("Weather Condition Changed"));
+ SkinAddNewSoundExW("weatheralert", _A2W(WEATHERPROTONAME), LPGENW("Weather Alert Issued"));
// window needed for popup commands
wchar_t SvcFunc[100];
diff --git a/plugins/Weather/src/weather_addstn.cpp b/plugins/Weather/src/weather_addstn.cpp
index c9a276a484..8cdd7c98ed 100644
--- a/plugins/Weather/src/weather_addstn.cpp
+++ b/plugins/Weather/src/weather_addstn.cpp
@@ -44,7 +44,7 @@ INT_PTR WeatherAddToList(WPARAM, LPARAM lParam)
if (IsMyContact(hContact)) {
DBVARIANT dbv;
// check ID to see if the contact already exist in the database
- if (!db_get_ts(hContact, WEATHERPROTONAME, "ID", &dbv)) {
+ if (!db_get_ws(hContact, WEATHERPROTONAME, "ID", &dbv)) {
if (!mir_wstrcmpi(psr->email.w, dbv.ptszVal)) {
// remove the flag for not on list and hidden, thus make the contact visible
// and add them on the list
@@ -75,7 +75,7 @@ INT_PTR WeatherAddToList(WPARAM, LPARAM lParam)
// set settings by obtaining the default for the service
if (psr->lastName.w[0] != 0) {
WIDATA *sData = GetWIData(svc);
- db_set_ts(hContact, WEATHERPROTONAME, "MapURL", sData->DefaultMap);
+ db_set_ws(hContact, WEATHERPROTONAME, "MapURL", sData->DefaultMap);
db_set_s(hContact, WEATHERPROTONAME, "InfoURL", sData->DefaultURL);
}
else { // if no valid service is found, create empty strings for MapURL and InfoURL
@@ -83,15 +83,15 @@ INT_PTR WeatherAddToList(WPARAM, LPARAM lParam)
db_set_s(hContact, WEATHERPROTONAME, "InfoURL", "");
}
// write the other info and settings to the database
- db_set_ts(hContact, WEATHERPROTONAME, "ID", psr->email.w);
- db_set_ts(hContact, WEATHERPROTONAME, "Nick", psr->nick.w);
+ db_set_ws(hContact, WEATHERPROTONAME, "ID", psr->email.w);
+ db_set_ws(hContact, WEATHERPROTONAME, "Nick", psr->nick.w);
db_set_w(hContact, WEATHERPROTONAME, "Status", ID_STATUS_OFFLINE);
AvatarDownloaded(hContact);
wchar_t str[256];
mir_snwprintf(str, TranslateT("Current weather information for %s."), psr->nick.w);
- db_set_ts(hContact, WEATHERPROTONAME, "About", str);
+ db_set_ws(hContact, WEATHERPROTONAME, "About", str);
// make the last update tags to something invalid
db_set_s(hContact, WEATHERPROTONAME, "LastLog", "never");
@@ -107,13 +107,13 @@ INT_PTR WeatherAddToList(WPARAM, LPARAM lParam)
GetStationID(hContact, opt.Default, _countof(opt.Default));
opt.DefStn = hContact;
- if (!db_get_ts(hContact, WEATHERPROTONAME, "Nick", &dbv)) {
+ if (!db_get_ws(hContact, WEATHERPROTONAME, "Nick", &dbv)) {
// notification message box
mir_snwprintf(str, TranslateT("%s is now the default weather station"), dbv.ptszVal);
db_free(&dbv);
MessageBox(NULL, str, TranslateT("Weather Protocol"), MB_OK | MB_ICONINFORMATION);
}
- db_set_ts(NULL, WEATHERPROTONAME, "Default", opt.Default);
+ db_set_ws(NULL, WEATHERPROTONAME, "Default", opt.Default);
}
// display the Edit Settings dialog box
EditSettings(hContact, 0);
@@ -255,7 +255,7 @@ int IDSearchProc(wchar_t *sID, const int searchId, WIIDSEARCH *sData, wchar_t *s
// set the search result and broadcast it
PROTOSEARCHRESULT psr = { sizeof(psr) };
- psr.flags = PSR_TCHAR;
+ psr.flags = PSR_UNICODE;
psr.nick.w = str;
psr.firstName.w = L" ";
psr.lastName.w = svcname;
@@ -286,7 +286,7 @@ int IDSearch(wchar_t *sID, const int searchId)
else {
// return an empty contact on "#"
PROTOSEARCHRESULT psr = { sizeof(psr) };
- psr.flags = PSR_TCHAR;
+ psr.flags = PSR_UNICODE;
psr.nick.w = TranslateT("<Enter station name here>"); // to be entered
psr.firstName.w = L" ";
psr.lastName.w = L"";
@@ -348,7 +348,7 @@ int NameSearchProc(wchar_t *name, const int searchId, WINAMESEARCH *sData, wchar
// set the data and broadcast it
PROTOSEARCHRESULT psr = { sizeof(psr) };
- psr.flags = PSR_TCHAR;
+ psr.flags = PSR_UNICODE;
psr.nick.w = Name;
psr.firstName.w = L" ";
psr.lastName.w = svcname;
@@ -386,7 +386,7 @@ int NameSearchProc(wchar_t *name, const int searchId, WINAMESEARCH *sData, wchar
wcsncpy(Name, name, _countof(Name));
PROTOSEARCHRESULT psr = { sizeof(psr) };
- psr.flags = PSR_TCHAR;
+ psr.flags = PSR_UNICODE;
psr.nick.w = Name;
psr.firstName.w = L"";
psr.lastName.w = svcname;
diff --git a/plugins/Weather/src/weather_contacts.cpp b/plugins/Weather/src/weather_contacts.cpp
index 80e7d5f970..9903cbf010 100644
--- a/plugins/Weather/src/weather_contacts.cpp
+++ b/plugins/Weather/src/weather_contacts.cpp
@@ -41,7 +41,7 @@ INT_PTR ViewLog(WPARAM wParam, LPARAM lParam)
{
// see if the log path is set
DBVARIANT dbv;
- if (!db_get_ts(wParam, WEATHERPROTONAME, "Log", &dbv)) {
+ if (!db_get_ws(wParam, WEATHERPROTONAME, "Log", &dbv)) {
if (dbv.pszVal[0] != 0)
ShellExecute((HWND)lParam, L"open", dbv.ptszVal, L"", L"", SW_SHOW);
db_free(&dbv);
@@ -60,7 +60,7 @@ INT_PTR LoadForecast(WPARAM wParam, LPARAM)
GetStationID(wParam, id, _countof(id));
if (id[0] != 0) {
// check if the complte forecast URL is set. If it is not, display warning and quit
- if (db_get_tstatic(wParam, WEATHERPROTONAME, "InfoURL", loc2, _countof(loc2)) || loc2[0] == 0) {
+ if (db_get_wstatic(wParam, WEATHERPROTONAME, "InfoURL", loc2, _countof(loc2)) || loc2[0] == 0) {
MessageBox(NULL, NO_FORECAST_URL, TranslateT("Weather Protocol"), MB_ICONINFORMATION);
return 1;
}
@@ -78,7 +78,7 @@ INT_PTR WeatherMap(WPARAM wParam, LPARAM)
GetStationID(wParam, id, _countof(id));
if (id[0] != 0) {
// check if the weather map URL is set. If it is not, display warning and quit
- if (db_get_tstatic(wParam, WEATHERPROTONAME, "MapURL", loc2, _countof(loc2)) || loc2[0] == 0) {
+ if (db_get_wstatic(wParam, WEATHERPROTONAME, "MapURL", loc2, _countof(loc2)) || loc2[0] == 0) {
MessageBox(NULL, NO_MAP_URL, TranslateT("Weather Protocol"), MB_ICONINFORMATION);
return 1;
}
@@ -145,30 +145,30 @@ static INT_PTR CALLBACK DlgProcChange(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
SendDlgItemMessage(hwndDlg, IDC_RESET2, BUTTONSETASFLATBTN, TRUE, 0);
// set tooltip for the buttons
- SendDlgItemMessage(hwndDlg, IDC_GETNAME, BUTTONADDTOOLTIP, (WPARAM)LPGENW("Get city name from ID"), BATF_TCHAR);
- SendDlgItemMessage(hwndDlg, IDC_SVCINFO, BUTTONADDTOOLTIP, (WPARAM)LPGENW("Weather INI information"), BATF_TCHAR);
- SendDlgItemMessage(hwndDlg, IDC_BROWSE, BUTTONADDTOOLTIP, (WPARAM)LPGENW("Browse"), BATF_TCHAR);
- SendDlgItemMessage(hwndDlg, IDC_VIEW1, BUTTONADDTOOLTIP, (WPARAM)LPGENW("View webpage"), BATF_TCHAR);
- SendDlgItemMessage(hwndDlg, IDC_RESET1, BUTTONADDTOOLTIP, (WPARAM)LPGENW("Reset to default"), BATF_TCHAR);
- SendDlgItemMessage(hwndDlg, IDC_VIEW2, BUTTONADDTOOLTIP, (WPARAM)LPGENW("View webpage"), BATF_TCHAR);
- SendDlgItemMessage(hwndDlg, IDC_RESET2, BUTTONADDTOOLTIP, (WPARAM)LPGENW("Reset to default"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_GETNAME, BUTTONADDTOOLTIP, (WPARAM)LPGENW("Get city name from ID"), BATF_UNICODE);
+ SendDlgItemMessage(hwndDlg, IDC_SVCINFO, BUTTONADDTOOLTIP, (WPARAM)LPGENW("Weather INI information"), BATF_UNICODE);
+ SendDlgItemMessage(hwndDlg, IDC_BROWSE, BUTTONADDTOOLTIP, (WPARAM)LPGENW("Browse"), BATF_UNICODE);
+ SendDlgItemMessage(hwndDlg, IDC_VIEW1, BUTTONADDTOOLTIP, (WPARAM)LPGENW("View webpage"), BATF_UNICODE);
+ SendDlgItemMessage(hwndDlg, IDC_RESET1, BUTTONADDTOOLTIP, (WPARAM)LPGENW("Reset to default"), BATF_UNICODE);
+ SendDlgItemMessage(hwndDlg, IDC_VIEW2, BUTTONADDTOOLTIP, (WPARAM)LPGENW("View webpage"), BATF_UNICODE);
+ SendDlgItemMessage(hwndDlg, IDC_RESET2, BUTTONADDTOOLTIP, (WPARAM)LPGENW("Reset to default"), BATF_UNICODE);
// save the handle for the contact
WindowList_Add(hWindowList, hwndDlg, hContact);
// start to get the settings
// if the setting not exist, leave the dialog box blank
- if (!db_get_ts(hContact, WEATHERPROTONAME, "ID", &dbv)) {
+ if (!db_get_ws(hContact, WEATHERPROTONAME, "ID", &dbv)) {
SetDlgItemText(hwndDlg, IDC_ID, dbv.ptszVal);
// check if the station is a default station
CheckDlgButton(hwndDlg, IDC_DEFA, mir_wstrcmp(dbv.ptszVal, opt.Default) != 0 ? BST_CHECKED : BST_UNCHECKED);
db_free(&dbv);
}
- if (!db_get_ts(hContact, WEATHERPROTONAME, "Nick", &dbv)) {
+ if (!db_get_ws(hContact, WEATHERPROTONAME, "Nick", &dbv)) {
SetDlgItemText(hwndDlg, IDC_NAME, dbv.ptszVal);
db_free(&dbv);
}
- if (!db_get_ts(hContact, WEATHERPROTONAME, "Log", &dbv)) {
+ if (!db_get_ws(hContact, WEATHERPROTONAME, "Log", &dbv)) {
SetDlgItemText(hwndDlg, IDC_LOG, dbv.ptszVal);
// if the log path is not empty, check the checkbox for external log
if (dbv.ptszVal[0]) CheckDlgButton(hwndDlg, IDC_External, BST_CHECKED);
@@ -182,11 +182,11 @@ static INT_PTR CALLBACK DlgProcChange(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
CheckDlgButton(hwndDlg, IDC_DAutoUpdate, db_get_b(hContact, WEATHERPROTONAME, "DAutoUpdate", FALSE) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_Internal, db_get_b(hContact, WEATHERPROTONAME, "History", 0) ? BST_CHECKED : BST_UNCHECKED);
- if (!db_get_ts(hContact, WEATHERPROTONAME, "InfoURL", &dbv)) {
+ if (!db_get_ws(hContact, WEATHERPROTONAME, "InfoURL", &dbv)) {
SetDlgItemText(hwndDlg, IDC_IURL, dbv.ptszVal);
db_free(&dbv);
}
- if (!db_get_ts(hContact, WEATHERPROTONAME, "MapURL", &dbv)) {
+ if (!db_get_ws(hContact, WEATHERPROTONAME, "MapURL", &dbv)) {
SetDlgItemText(hwndDlg, IDC_MURL, dbv.ptszVal);
db_free(&dbv);
}
@@ -341,30 +341,30 @@ static INT_PTR CALLBACK DlgProcChange(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
// temporary disable the protocol while applying the change
// start writing the new settings to database
GetDlgItemText(hwndDlg, IDC_ID, str, _countof(str));
- db_set_ts(hContact, WEATHERPROTONAME, "ID", str);
+ db_set_ws(hContact, WEATHERPROTONAME, "ID", str);
if ((BYTE)IsDlgButtonChecked(hwndDlg, IDC_DEFA)) { // if default station is set
mir_wstrcpy(opt.Default, str);
opt.DefStn = hContact;
- db_set_ts(NULL, WEATHERPROTONAME, "Default", opt.Default);
+ db_set_ws(NULL, WEATHERPROTONAME, "Default", opt.Default);
}
GetDlgItemText(hwndDlg, IDC_NAME, city, _countof(city));
- db_set_ts(hContact, WEATHERPROTONAME, "Nick", city);
+ db_set_ws(hContact, WEATHERPROTONAME, "Nick", city);
mir_snwprintf(str2, TranslateT("Current weather information for %s."), city);
if ((BYTE)IsDlgButtonChecked(hwndDlg, IDC_External)) {
GetDlgItemText(hwndDlg, IDC_LOG, str, _countof(str));
- db_set_ts(hContact, WEATHERPROTONAME, "Log", str);
+ db_set_ws(hContact, WEATHERPROTONAME, "Log", str);
}
else db_unset(hContact, WEATHERPROTONAME, "Log");
GetDlgItemText(hwndDlg, IDC_IURL, str, _countof(str));
- db_set_ts(hContact, WEATHERPROTONAME, "InfoURL", str);
+ db_set_ws(hContact, WEATHERPROTONAME, "InfoURL", str);
GetDlgItemText(hwndDlg, IDC_MURL, str, _countof(str));
- db_set_ts(hContact, WEATHERPROTONAME, "MapURL", str);
+ db_set_ws(hContact, WEATHERPROTONAME, "MapURL", str);
db_set_w(hContact, WEATHERPROTONAME, "Status", ID_STATUS_OFFLINE);
db_set_w(hContact, WEATHERPROTONAME, "StatusIcon", ID_STATUS_OFFLINE);
AvatarDownloaded(hContact);
- db_set_ts(hContact, WEATHERPROTONAME, "About", str2);
+ db_set_ws(hContact, WEATHERPROTONAME, "About", str2);
db_set_b(hContact, WEATHERPROTONAME, "History", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_Internal));
db_set_b(hContact, WEATHERPROTONAME, "Overwrite", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_Overwrite));
db_set_b(hContact, WEATHERPROTONAME, "File", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_External));
@@ -436,7 +436,7 @@ int ContactDeleted(WPARAM wParam, LPARAM)
removeWindow(wParam);
// exit this function if it is not default station
- ptrW tszID(db_get_tsa(wParam, WEATHERPROTONAME, "ID"));
+ ptrW tszID(db_get_wsa(wParam, WEATHERPROTONAME, "ID"));
if (tszID != NULL)
if (mir_wstrcmp(tszID, opt.Default))
return 0;
@@ -445,7 +445,7 @@ int ContactDeleted(WPARAM wParam, LPARAM)
// start looking for other weather stations
for (MCONTACT hContact = db_find_first(WEATHERPROTONAME); hContact; hContact = db_find_next(hContact, WEATHERPROTONAME)) {
- tszID = db_get_tsa(hContact, WEATHERPROTONAME, "ID");
+ tszID = db_get_wsa(hContact, WEATHERPROTONAME, "ID");
if (tszID == NULL)
continue;
@@ -454,13 +454,13 @@ int ContactDeleted(WPARAM wParam, LPARAM)
if (mir_wstrcmp(opt.Default, tszID)) {
wcsncpy_s(opt.Default, tszID, _TRUNCATE);
opt.DefStn = hContact;
- ptrW tszNick(db_get_tsa(hContact, WEATHERPROTONAME, "Nick"));
+ ptrW tszNick(db_get_wsa(hContact, WEATHERPROTONAME, "Nick"));
if (tszNick != NULL) {
wchar_t str[255];
mir_snwprintf(str, TranslateT("%s is now the default weather station"), (wchar_t*)tszNick);
MessageBox(NULL, str, TranslateT("Weather Protocol"), MB_OK | MB_ICONINFORMATION);
}
- db_set_ts(NULL, WEATHERPROTONAME, "Default", opt.Default);
+ db_set_ws(NULL, WEATHERPROTONAME, "Default", opt.Default);
return 0; // exit this function quickly
}
}
@@ -468,7 +468,7 @@ int ContactDeleted(WPARAM wParam, LPARAM)
// got here if no more weather station left
opt.Default[0] = 0; // no default station
opt.DefStn = NULL;
- db_set_ts(NULL, WEATHERPROTONAME, "Default", opt.Default);
+ db_set_ws(NULL, WEATHERPROTONAME, "Default", opt.Default);
return 0;
}
diff --git a/plugins/Weather/src/weather_conv.cpp b/plugins/Weather/src/weather_conv.cpp
index 168fd77d09..15428e3839 100644
--- a/plugins/Weather/src/weather_conv.cpp
+++ b/plugins/Weather/src/weather_conv.cpp
@@ -391,12 +391,12 @@ WORD GetIcon(const wchar_t* cond, WIDATA *Data)
j++;
// using the format _T("# Weather <condition name> <counter> #"
mir_snwprintf(LangPackStr, L"# Weather %s %i #", statusStr[i], j);
- wcsncpy_s(LangPackStr1, TranslateTS(LangPackStr), _TRUNCATE);
+ wcsncpy_s(LangPackStr1, TranslateW(LangPackStr), _TRUNCATE);
CharLowerBuff(LangPackStr1, (DWORD)mir_wstrlen(LangPackStr1));
if (wcsstr(cond, LangPackStr1) != NULL)
return statusValue[i];
// loop until the translation string exists (ie, the translated string is differ from original)
- } while (mir_wstrcmp(TranslateTS(LangPackStr), LangPackStr));
+ } while (mir_wstrcmp(TranslateW(LangPackStr), LangPackStr));
}
return NA;
@@ -548,8 +548,8 @@ wchar_t* GetDisplay(WEATHERINFO *w, const wchar_t *dis, wchar_t* str)
mir_strcat(name, temp);
}
// access the database to get its value
- if (!db_get_ts(w->hContact, WEATHERCONDITION, name, &dbv)) {
- if (dbv.ptszVal != TranslateTS(NODATA) && dbv.ptszVal != TranslateT("<Error>"))
+ if (!db_get_ws(w->hContact, WEATHERCONDITION, name, &dbv)) {
+ if (dbv.ptszVal != TranslateW(NODATA) && dbv.ptszVal != TranslateT("<Error>"))
mir_wstrcat(str, dbv.ptszVal);
db_free(&dbv);
}
diff --git a/plugins/Weather/src/weather_data.cpp b/plugins/Weather/src/weather_data.cpp
index f8df3f7f18..eea3edf81b 100644
--- a/plugins/Weather/src/weather_data.cpp
+++ b/plugins/Weather/src/weather_data.cpp
@@ -33,7 +33,7 @@ saving individual weather data for a weather contact.
void GetStationID(MCONTACT hContact, wchar_t* id, int idlen)
{
// accessing the database
- if (db_get_tstatic(hContact, WEATHERPROTONAME, "ID", id, idlen))
+ if (db_get_wstatic(hContact, WEATHERPROTONAME, "ID", id, idlen))
id[0] = 0;
}
@@ -49,35 +49,35 @@ WEATHERINFO LoadWeatherInfo(MCONTACT hContact)
winfo.hContact = hContact;
GetStationID(hContact, winfo.id, _countof(winfo.id));
- if (db_get_tstatic(hContact, WEATHERPROTONAME, "Nick", winfo.city, _countof(winfo.city)))
+ if (db_get_wstatic(hContact, WEATHERPROTONAME, "Nick", winfo.city, _countof(winfo.city)))
wcsncpy(winfo.city, NODATA, _countof(winfo.city) - 1);
- if (db_get_tstatic(hContact, WEATHERCONDITION, "Update", winfo.update, _countof(winfo.update)))
+ if (db_get_wstatic(hContact, WEATHERCONDITION, "Update", winfo.update, _countof(winfo.update)))
wcsncpy(winfo.update, NODATA, _countof(winfo.update) - 1);
- if (db_get_tstatic(hContact, WEATHERCONDITION, "Condition", winfo.cond, _countof(winfo.cond)))
+ if (db_get_wstatic(hContact, WEATHERCONDITION, "Condition", winfo.cond, _countof(winfo.cond)))
wcsncpy(winfo.cond, NODATA, _countof(winfo.cond) - 1);
- if (db_get_tstatic(hContact, WEATHERCONDITION, "Temperature", winfo.temp, _countof(winfo.temp)))
+ if (db_get_wstatic(hContact, WEATHERCONDITION, "Temperature", winfo.temp, _countof(winfo.temp)))
wcsncpy(winfo.temp, NODATA, _countof(winfo.temp) - 1);
- if (db_get_tstatic(hContact, WEATHERCONDITION, "High", winfo.high, _countof(winfo.high)))
+ if (db_get_wstatic(hContact, WEATHERCONDITION, "High", winfo.high, _countof(winfo.high)))
wcsncpy(winfo.high, NODATA, _countof(winfo.high) - 1);
- if (db_get_tstatic(hContact, WEATHERCONDITION, "Low", winfo.low, _countof(winfo.low)))
+ if (db_get_wstatic(hContact, WEATHERCONDITION, "Low", winfo.low, _countof(winfo.low)))
wcsncpy(winfo.low, NODATA, _countof(winfo.low) - 1);
- if (db_get_tstatic(hContact, WEATHERCONDITION, "Sunset", winfo.sunset, _countof(winfo.sunset)))
+ if (db_get_wstatic(hContact, WEATHERCONDITION, "Sunset", winfo.sunset, _countof(winfo.sunset)))
wcsncpy(winfo.sunset, NODATA, _countof(winfo.sunset) - 1);
- if (db_get_tstatic(hContact, WEATHERCONDITION, "Sunrise", winfo.sunrise, _countof(winfo.sunrise)))
+ if (db_get_wstatic(hContact, WEATHERCONDITION, "Sunrise", winfo.sunrise, _countof(winfo.sunrise)))
wcsncpy(winfo.sunrise, NODATA, _countof(winfo.sunrise) - 1);
- if (db_get_tstatic(hContact, WEATHERCONDITION, "Wind Speed", winfo.wind, _countof(winfo.wind)))
+ if (db_get_wstatic(hContact, WEATHERCONDITION, "Wind Speed", winfo.wind, _countof(winfo.wind)))
wcsncpy(winfo.wind, NODATA, _countof(winfo.wind) - 1);
- if (db_get_tstatic(hContact, WEATHERCONDITION, "Wind Direction", winfo.winddir, _countof(winfo.winddir)))
+ if (db_get_wstatic(hContact, WEATHERCONDITION, "Wind Direction", winfo.winddir, _countof(winfo.winddir)))
wcsncpy(winfo.winddir, NODATA, _countof(winfo.winddir) - 1);
- if (db_get_tstatic(hContact, WEATHERCONDITION, "Dewpoint", winfo.dewpoint, _countof(winfo.dewpoint)))
+ if (db_get_wstatic(hContact, WEATHERCONDITION, "Dewpoint", winfo.dewpoint, _countof(winfo.dewpoint)))
wcsncpy(winfo.dewpoint, NODATA, _countof(winfo.dewpoint) - 1);
- if (db_get_tstatic(hContact, WEATHERCONDITION, "Pressure", winfo.pressure, _countof(winfo.pressure)))
+ if (db_get_wstatic(hContact, WEATHERCONDITION, "Pressure", winfo.pressure, _countof(winfo.pressure)))
wcsncpy(winfo.pressure, NODATA, _countof(winfo.pressure) - 1);
- if (db_get_tstatic(hContact, WEATHERCONDITION, "Visibility", winfo.vis, _countof(winfo.vis)))
+ if (db_get_wstatic(hContact, WEATHERCONDITION, "Visibility", winfo.vis, _countof(winfo.vis)))
wcsncpy(winfo.vis, NODATA, _countof(winfo.vis) - 1);
- if (db_get_tstatic(hContact, WEATHERCONDITION, "Humidity", winfo.humid, _countof(winfo.humid)))
+ if (db_get_wstatic(hContact, WEATHERCONDITION, "Humidity", winfo.humid, _countof(winfo.humid)))
wcsncpy(winfo.humid, NODATA, _countof(winfo.humid) - 1);
- if (db_get_tstatic(hContact, WEATHERCONDITION, "Feel", winfo.feel, _countof(winfo.feel)))
+ if (db_get_wstatic(hContact, WEATHERCONDITION, "Feel", winfo.feel, _countof(winfo.feel)))
wcsncpy(winfo.feel, NODATA, _countof(winfo.feel) - 1);
winfo.status = (WORD)db_get_w(hContact, WEATHERPROTONAME, "StatusIcon", ID_STATUS_OFFLINE);
@@ -88,13 +88,13 @@ WEATHERINFO LoadWeatherInfo(MCONTACT hContact)
// return 0 on success
int DBGetData(MCONTACT hContact, char *setting, DBVARIANT *dbv)
{
- if (db_get_ts(hContact, WEATHERCONDITION, setting, dbv)) {
+ if (db_get_ws(hContact, WEATHERCONDITION, setting, dbv)) {
size_t len = mir_strlen(setting) + 1;
char *set = (char*)alloca(len + 1);
*set = '#';
memcpy(set + 1, setting, len);
- if (db_get_ts(hContact, WEATHERCONDITION, set, dbv))
+ if (db_get_ws(hContact, WEATHERCONDITION, set, dbv))
return 1;
}
return 0;
@@ -117,8 +117,8 @@ void EraseAllInfo()
db_set_w(hContact, WEATHERPROTONAME, "StatusIcon", ID_STATUS_OFFLINE);
db_unset(hContact, "CList", "MyHandle");
// clear all data
- if (db_get_ts(hContact, WEATHERPROTONAME, "Nick", &dbv)) {
- db_set_ts(hContact, WEATHERPROTONAME, "Nick", TranslateT("<Enter city name here>"));
+ if (db_get_ws(hContact, WEATHERPROTONAME, "Nick", &dbv)) {
+ db_set_ws(hContact, WEATHERPROTONAME, "Nick", TranslateT("<Enter city name here>"));
db_set_s(hContact, WEATHERPROTONAME, "LastLog", "never");
db_set_s(hContact, WEATHERPROTONAME, "LastCondition", "None");
db_set_s(hContact, WEATHERPROTONAME, "LastTemperature", "None");
@@ -130,7 +130,7 @@ void EraseAllInfo()
// reset update tag
db_set_b(hContact, WEATHERPROTONAME, "IsUpdated", FALSE);
// reset logging settings
- if (!db_get_ts(hContact, WEATHERPROTONAME, "Log", &dbv)) {
+ if (!db_get_ws(hContact, WEATHERPROTONAME, "Log", &dbv)) {
db_set_b(hContact, WEATHERPROTONAME, "File", (BYTE)(dbv.ptszVal[0] != 0));
db_free(&dbv);
}
@@ -141,7 +141,7 @@ void EraseAllInfo()
GetStationID(hContact, opt.Default, _countof(opt.Default));
opt.DefStn = hContact;
- if (!db_get_ts(hContact, WEATHERPROTONAME, "Nick", &dbv)) {
+ if (!db_get_ws(hContact, WEATHERPROTONAME, "Nick", &dbv)) {
mir_snwprintf(str, TranslateT("%s is now the default weather station"), dbv.ptszVal);
db_free(&dbv);
MessageBox(NULL, str, TranslateT("Weather Protocol"), MB_OK | MB_ICONINFORMATION);
@@ -149,7 +149,7 @@ void EraseAllInfo()
}
// get the handle of the default station
if (opt.DefStn == NULL) {
- if (!db_get_ts(hContact, WEATHERPROTONAME, "ID", &dbv)) {
+ if (!db_get_ws(hContact, WEATHERPROTONAME, "ID", &dbv)) {
if (!mir_wstrcmp(dbv.ptszVal, opt.Default))
opt.DefStn = hContact;
db_free(&dbv);
@@ -163,19 +163,19 @@ void EraseAllInfo()
// if (ContactCount != 0) status = ONLINE;
// in case where the default station is missing
if (opt.DefStn == NULL && ContactCount != 0) {
- if (!db_get_ts(LastContact, WEATHERPROTONAME, "ID", &dbv)) {
+ if (!db_get_ws(LastContact, WEATHERPROTONAME, "ID", &dbv)) {
wcsncpy(opt.Default, dbv.ptszVal, _countof(opt.Default) - 1);
db_free(&dbv);
}
opt.DefStn = LastContact;
- if (!db_get_ts(LastContact, WEATHERPROTONAME, "Nick", &dbv)) {
+ if (!db_get_ws(LastContact, WEATHERPROTONAME, "Nick", &dbv)) {
mir_snwprintf(str, TranslateT("%s is now the default weather station"), dbv.ptszVal);
db_free(&dbv);
MessageBox(NULL, str, TranslateT("Weather Protocol"), MB_OK | MB_ICONINFORMATION);
}
}
// save option in case of default station changed
- db_set_ts(NULL, WEATHERPROTONAME, "Default", opt.Default);
+ db_set_ws(NULL, WEATHERPROTONAME, "Default", opt.Default);
}
void ConvertDataValue(WIDATAITEM *UpdateData, wchar_t *Data)
@@ -183,7 +183,7 @@ void ConvertDataValue(WIDATAITEM *UpdateData, wchar_t *Data)
wchar_t str[MAX_DATA_LEN];
// convert the unit
- if (mir_wstrcmp(Data, TranslateT("<Error>")) && mir_wstrcmp(Data, NODATA) && mir_wstrcmp(Data, TranslateTS(NODATA))) {
+ if (mir_wstrcmp(Data, TranslateT("<Error>")) && mir_wstrcmp(Data, NODATA) && mir_wstrcmp(Data, TranslateW(NODATA))) {
// temperature
if (!mir_wstrcmp(UpdateData->Name, L"Temperature") || !mir_wstrcmp(UpdateData->Name, L"High") ||
!mir_wstrcmp(UpdateData->Name, L"Low") || !mir_wstrcmp(UpdateData->Name, L"Feel") ||
@@ -417,7 +417,7 @@ void DBDataManage(MCONTACT hContact, WORD Mode, WPARAM wParam, LPARAM)
char *szSetting = arSettings[i];
DBVARIANT dbv;
- if (!db_get_ts(hContact, WEATHERCONDITION, szSetting, &dbv)) {
+ if (!db_get_ws(hContact, WEATHERCONDITION, szSetting, &dbv)) {
switch (Mode) {
case WDBM_REMOVE:
db_unset(hContact, WEATHERCONDITION, szSetting);
@@ -432,7 +432,7 @@ void DBDataManage(MCONTACT hContact, WORD Mode, WPARAM wParam, LPARAM)
LV_ITEM lvi = { 0 };
lvi.mask = LVIF_TEXT | LVIF_PARAM;
lvi.lParam = i;
- lvi.pszText = TranslateTS(_A2T(szSetting));
+ lvi.pszText = TranslateW(_A2T(szSetting));
lvi.iItem = ListView_InsertItem(hList, &lvi);
lvi.pszText = dbv.ptszVal;
ListView_SetItemText(hList, lvi.iItem, 1, dbv.ptszVal);
diff --git a/plugins/Weather/src/weather_http.cpp b/plugins/Weather/src/weather_http.cpp
index 7b48509a4d..82b9707d80 100644
--- a/plugins/Weather/src/weather_http.cpp
+++ b/plugins/Weather/src/weather_http.cpp
@@ -154,7 +154,7 @@ void NetlibInit(void)
{
NETLIBUSER nlu = { 0 };
nlu.cbSize = sizeof(nlu);
- nlu.flags = NUF_OUTGOING | NUF_HTTPCONNS | NUF_NOHTTPSOPTION | NUF_TCHAR;
+ nlu.flags = NUF_OUTGOING | NUF_HTTPCONNS | NUF_NOHTTPSOPTION | NUF_UNICODE;
nlu.szSettingsModule = WEATHERPROTONAME;
nlu.ptszDescriptiveName = TranslateT("Weather HTTP connections");
hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu);
diff --git a/plugins/Weather/src/weather_info.cpp b/plugins/Weather/src/weather_info.cpp
index e6ed5291e9..d78be15988 100644
--- a/plugins/Weather/src/weather_info.cpp
+++ b/plugins/Weather/src/weather_info.cpp
@@ -114,7 +114,7 @@ INT_PTR CALLBACK DlgProcINIPage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM)
lvc.fmt = LVCFMT_LEFT;
for (int i = 0; i < 7; ++i) {
lvc.iSubItem = i;
- lvc.pszText = TranslateTS(columns[i].name);
+ lvc.pszText = TranslateW(columns[i].name);
lvc.cx = columns[i].size;
ListView_InsertColumn(hIniList, i, &lvc);
}
diff --git a/plugins/Weather/src/weather_mwin.cpp b/plugins/Weather/src/weather_mwin.cpp
index aa47bb3580..6d414a8f7e 100644
--- a/plugins/Weather/src/weather_mwin.cpp
+++ b/plugins/Weather/src/weather_mwin.cpp
@@ -157,16 +157,16 @@ static LRESULT CALLBACK wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara
clr = db_get_dw(NULL, WEATHERPROTONAME, "ColorMwinFrame", GetSysColor(COLOR_3DFACE));
{
- FontIDT fntid = { 0 };
+ FontIDW fntid = { 0 };
mir_wstrcpy(fntid.group, _A2W(WEATHERPROTONAME));
mir_wstrcpy(fntid.name, LPGENW("Frame Font"));
- fntc = CallService(MS_FONT_GETT, (WPARAM)&fntid, (LPARAM)&lfnt);
+ fntc = CallService(MS_FONT_GETW, (WPARAM)&fntid, (LPARAM)&lfnt);
mir_wstrcpy(fntid.name, LPGENW("Frame Title Font"));
- fntc1 = CallService(MS_FONT_GETT, (WPARAM)&fntid, (LPARAM)&lfnt1);
+ fntc1 = CallService(MS_FONT_GETW, (WPARAM)&fntid, (LPARAM)&lfnt1);
}
- ptrW tszInfo(db_get_tsa(data->hContact, WEATHERCONDITION, "WeatherInfo"));
+ ptrW tszInfo(db_get_wsa(data->hContact, WEATHERCONDITION, "WeatherInfo"));
GetClientRect(hwnd, &rc);
@@ -238,7 +238,7 @@ static LRESULT CALLBACK wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara
static void addWindow(MCONTACT hContact)
{
DBVARIANT dbv;
- if (db_get_ts(hContact, WEATHERPROTONAME, "Nick", &dbv))
+ if (db_get_ws(hContact, WEATHERPROTONAME, "Nick", &dbv))
return;
wchar_t winname[512];
@@ -255,7 +255,7 @@ static void addWindow(MCONTACT hContact)
Frame.cbSize = sizeof(Frame);
Frame.hWnd = hWnd;
Frame.align = alBottom;
- Frame.Flags = F_VISIBLE | F_NOBORDER | F_TCHAR;
+ Frame.Flags = F_VISIBLE | F_NOBORDER | F_UNICODE;
Frame.height = 32;
DWORD frameID = CallService(MS_CLIST_FRAMES_ADDFRAME, (WPARAM)&Frame, 0);
@@ -324,17 +324,17 @@ void InitMwin(void)
wndclass.lpszClassName = L"WeatherFrame";
RegisterClass(&wndclass);
- ColourIDT colourid = { 0 };
- colourid.cbSize = sizeof(ColourIDT);
+ ColourIDW colourid = { 0 };
+ colourid.cbSize = sizeof(ColourIDW);
mir_strcpy(colourid.dbSettingsGroup, WEATHERPROTONAME);
mir_strcpy(colourid.setting, "ColorMwinFrame");
mir_wstrcpy(colourid.name, LPGENW("Frame Background"));
mir_wstrcpy(colourid.group, _A2W(WEATHERPROTONAME));
colourid.defcolour = GetSysColor(COLOR_3DFACE);
- ColourRegisterT(&colourid);
+ ColourRegisterW(&colourid);
- FontIDT fontid = { 0 };
- fontid.cbSize = sizeof(FontIDT);
+ FontIDW fontid = { 0 };
+ fontid.cbSize = sizeof(FontIDW);
fontid.flags = FIDF_ALLOWREREGISTER | FIDF_DEFAULTVALID;
mir_strcpy(fontid.dbSettingsGroup, WEATHERPROTONAME);
mir_wstrcpy(fontid.group, _A2W(WEATHERPROTONAME));
@@ -349,12 +349,12 @@ void InitMwin(void)
mir_wstrcpy(fontid.deffontsettings.szFace, L"Verdana");
mir_wstrcpy(fontid.backgroundGroup, _A2W(WEATHERPROTONAME));
mir_wstrcpy(fontid.backgroundName, LPGENW("Frame Background"));
- FontRegisterT(&fontid);
+ FontRegisterW(&fontid);
fontid.deffontsettings.style = DBFONTF_BOLD;
mir_wstrcpy(fontid.name, LPGENW("Frame Title Font"));
mir_strcpy(fontid.prefix, "fnt1");
- FontRegisterT(&fontid);
+ FontRegisterW(&fontid);
for (MCONTACT hContact = db_find_first(WEATHERPROTONAME); hContact; hContact = db_find_next(hContact, WEATHERPROTONAME))
if (db_get_dw(hContact, WEATHERPROTONAME, "mwin", 0))
diff --git a/plugins/Weather/src/weather_opt.cpp b/plugins/Weather/src/weather_opt.cpp
index c971ef7857..6e9374dea6 100644
--- a/plugins/Weather/src/weather_opt.cpp
+++ b/plugins/Weather/src/weather_opt.cpp
@@ -114,50 +114,50 @@ void LoadOptions(void)
opt.dUnit = db_get_w(NULL, WEATHERPROTONAME, "dUnit", 1);
opt.eUnit = db_get_w(NULL, WEATHERPROTONAME, "eUnit", 2);
- ptrW szValue(db_get_tsa(NULL, WEATHERPROTONAME, "DegreeSign"));
+ ptrW szValue(db_get_wsa(NULL, WEATHERPROTONAME, "DegreeSign"));
wcsncpy_s(opt.DegreeSign, (szValue == NULL) ? L"" : szValue, _TRUNCATE);
opt.DoNotAppendUnit = db_get_b(NULL, WEATHERPROTONAME, "DoNotAppendUnit", 0);
opt.NoFrac = db_get_b(NULL, WEATHERPROTONAME, "NoFractions", 0);
// texts
- if (szValue = db_get_tsa(NULL, WEATHERPROTONAME, "DisplayText"))
- wSetData(&opt.cText, TranslateTS(szValue));
+ if (szValue = db_get_wsa(NULL, WEATHERPROTONAME, "DisplayText"))
+ wSetData(&opt.cText, TranslateW(szValue));
else
SetTextDefault("C");
- if (szValue = db_get_tsa(NULL, WEATHERPROTONAME, "BriefTextTitle"))
- wSetData(&opt.bTitle, TranslateTS(szValue));
+ if (szValue = db_get_wsa(NULL, WEATHERPROTONAME, "BriefTextTitle"))
+ wSetData(&opt.bTitle, TranslateW(szValue));
else
SetTextDefault("b");
- if (szValue = db_get_tsa(NULL, WEATHERPROTONAME, "BriefText"))
- wSetData(&opt.bText, TranslateTS(szValue));
+ if (szValue = db_get_wsa(NULL, WEATHERPROTONAME, "BriefText"))
+ wSetData(&opt.bText, TranslateW(szValue));
else
SetTextDefault("B");
- if (szValue = db_get_tsa(NULL, WEATHERPROTONAME, "NoteText"))
- wSetData(&opt.nText, TranslateTS(szValue));
+ if (szValue = db_get_wsa(NULL, WEATHERPROTONAME, "NoteText"))
+ wSetData(&opt.nText, TranslateW(szValue));
else
SetTextDefault("N");
- if (szValue = db_get_tsa(NULL, WEATHERPROTONAME, "ExtText"))
- wSetData(&opt.eText, TranslateTS(szValue));
+ if (szValue = db_get_wsa(NULL, WEATHERPROTONAME, "ExtText"))
+ wSetData(&opt.eText, TranslateW(szValue));
else
SetTextDefault("E");
- if (szValue = db_get_tsa(NULL, WEATHERPROTONAME, "HistoryText"))
- wSetData(&opt.hText, TranslateTS(szValue));
+ if (szValue = db_get_wsa(NULL, WEATHERPROTONAME, "HistoryText"))
+ wSetData(&opt.hText, TranslateW(szValue));
else
SetTextDefault("H");
- if (szValue = db_get_tsa(NULL, WEATHERPROTONAME, "ExtraText"))
- wSetData(&opt.xText, TranslateTS(szValue));
+ if (szValue = db_get_wsa(NULL, WEATHERPROTONAME, "ExtraText"))
+ wSetData(&opt.xText, TranslateW(szValue));
else
SetTextDefault("X");
- if (szValue = db_get_tsa(NULL, WEATHERPROTONAME, "StatusText"))
- wSetData(&opt.sText, TranslateTS(szValue));
+ if (szValue = db_get_wsa(NULL, WEATHERPROTONAME, "StatusText"))
+ wSetData(&opt.sText, TranslateW(szValue));
else
SetTextDefault("S");
@@ -179,18 +179,18 @@ void LoadOptions(void)
// popup delay
opt.pDelay = db_get_dw(NULL, WEATHERPROTONAME, "PopupDelay", 0);
// popup texts
- if (szValue = db_get_tsa(NULL, WEATHERPROTONAME, "PopupTitle"))
+ if (szValue = db_get_wsa(NULL, WEATHERPROTONAME, "PopupTitle"))
wSetData(&opt.pTitle, szValue);
else
SetTextDefault("P");
- if (szValue = db_get_tsa(NULL, WEATHERPROTONAME, "PopupText"))
+ if (szValue = db_get_wsa(NULL, WEATHERPROTONAME, "PopupText"))
wSetData(&opt.pText, szValue);
else
SetTextDefault("p");
// misc
- if (szValue = db_get_tsa(NULL, WEATHERPROTONAME, "Default"))
+ if (szValue = db_get_wsa(NULL, WEATHERPROTONAME, "Default"))
wcsncpy_s(opt.Default, szValue, _TRUNCATE);
else
opt.Default[0] = 0;
@@ -215,18 +215,18 @@ void SaveOptions(void)
db_set_w(NULL, WEATHERPROTONAME, "pUnit", opt.pUnit);
db_set_w(NULL, WEATHERPROTONAME, "dUnit", opt.dUnit);
db_set_w(NULL, WEATHERPROTONAME, "eUnit", opt.eUnit);
- db_set_ts(NULL, WEATHERPROTONAME, "DegreeSign", opt.DegreeSign);
+ db_set_ws(NULL, WEATHERPROTONAME, "DegreeSign", opt.DegreeSign);
db_set_b(NULL, WEATHERPROTONAME, "DoNotAppendUnit", (BYTE)opt.DoNotAppendUnit);
db_set_b(NULL, WEATHERPROTONAME, "NoFractions", (BYTE)opt.NoFrac);
// texts
- db_set_ts(NULL, WEATHERPROTONAME, "DisplayText", opt.cText);
- db_set_ts(NULL, WEATHERPROTONAME, "BriefTextTitle", opt.bTitle);
- db_set_ts(NULL, WEATHERPROTONAME, "BriefText", opt.bText);
- db_set_ts(NULL, WEATHERPROTONAME, "NoteText", opt.nText);
- db_set_ts(NULL, WEATHERPROTONAME, "ExtText", opt.eText);
- db_set_ts(NULL, WEATHERPROTONAME, "HistoryText", opt.hText);
- db_set_ts(NULL, WEATHERPROTONAME, "ExtraText", opt.xText);
- db_set_ts(NULL, WEATHERPROTONAME, "StatusText", opt.sText);
+ db_set_ws(NULL, WEATHERPROTONAME, "DisplayText", opt.cText);
+ db_set_ws(NULL, WEATHERPROTONAME, "BriefTextTitle", opt.bTitle);
+ db_set_ws(NULL, WEATHERPROTONAME, "BriefText", opt.bText);
+ db_set_ws(NULL, WEATHERPROTONAME, "NoteText", opt.nText);
+ db_set_ws(NULL, WEATHERPROTONAME, "ExtText", opt.eText);
+ db_set_ws(NULL, WEATHERPROTONAME, "HistoryText", opt.hText);
+ db_set_ws(NULL, WEATHERPROTONAME, "ExtraText", opt.xText);
+ db_set_ws(NULL, WEATHERPROTONAME, "StatusText", opt.sText);
// advanced
db_set_b(NULL, WEATHERPROTONAME, "DisableConditionIcon", (BYTE)opt.DisCondIcon);
// popup options
@@ -245,10 +245,10 @@ void SaveOptions(void)
// popup delay
db_set_dw(NULL, WEATHERPROTONAME, "PopupDelay", opt.pDelay);
// popup texts
- db_set_ts(NULL, WEATHERPROTONAME, "PopupTitle", opt.pTitle);
- db_set_ts(NULL, WEATHERPROTONAME, "PopupText", opt.pText);
+ db_set_ws(NULL, WEATHERPROTONAME, "PopupTitle", opt.pTitle);
+ db_set_ws(NULL, WEATHERPROTONAME, "PopupText", opt.pText);
// misc stuff
- db_set_ts(NULL, WEATHERPROTONAME, "Default", opt.Default);
+ db_set_ws(NULL, WEATHERPROTONAME, "Default", opt.Default);
}
//============ MAIN OPTIONS ============
diff --git a/plugins/Weather/src/weather_popup.cpp b/plugins/Weather/src/weather_popup.cpp
index 6e1ddba4ea..c94e12a7ea 100644
--- a/plugins/Weather/src/weather_popup.cpp
+++ b/plugins/Weather/src/weather_popup.cpp
@@ -259,9 +259,9 @@ INT_PTR CALLBACK DlgPopupOpts(HWND hdlg, UINT msg, WPARAM wParam, LPARAM lParam)
hMenu = LoadMenu(hInst, MAKEINTRESOURCE(IDR_PMENU));
hMenu1 = GetSubMenu(hMenu, 0);
GetMenuString(hMenu1, opt.LeftClickAction, str, _countof(str), MF_BYCOMMAND);
- SetDlgItemText(hdlg, IDC_LeftClick, TranslateTS(str));
+ SetDlgItemText(hdlg, IDC_LeftClick, TranslateW(str));
GetMenuString(hMenu1, opt.RightClickAction, str, _countof(str), MF_BYCOMMAND);
- SetDlgItemText(hdlg, IDC_RightClick, TranslateTS(str));
+ SetDlgItemText(hdlg, IDC_RightClick, TranslateW(str));
DestroyMenu(hMenu);
// other options
@@ -342,7 +342,7 @@ INT_PTR CALLBACK DlgPopupOpts(HWND hdlg, UINT msg, WPARAM wParam, LPARAM lParam)
hMenu = LoadMenu(hInst, MAKEINTRESOURCE(IDR_PMENU));
hMenu1 = GetSubMenu(hMenu, 0);
GetMenuString(hMenu1, opt.RightClickAction, str, _countof(str), MF_BYCOMMAND);
- SetDlgItemText(hdlg, IDC_RightClick, TranslateTS(str));
+ SetDlgItemText(hdlg, IDC_RightClick, TranslateW(str));
DestroyMenu(hMenu);
break;
@@ -362,7 +362,7 @@ INT_PTR CALLBACK DlgPopupOpts(HWND hdlg, UINT msg, WPARAM wParam, LPARAM lParam)
hMenu = LoadMenu(hInst, MAKEINTRESOURCE(IDR_PMENU));
hMenu1 = GetSubMenu(hMenu, 0);
GetMenuString(hMenu1, opt.LeftClickAction, str, _countof(str), MF_BYCOMMAND);
- SetDlgItemText(hdlg, IDC_LeftClick, TranslateTS(str));
+ SetDlgItemText(hdlg, IDC_LeftClick, TranslateW(str));
DestroyMenu(hMenu);
break;
diff --git a/plugins/Weather/src/weather_svcs.cpp b/plugins/Weather/src/weather_svcs.cpp
index e301a0302d..705288a25f 100644
--- a/plugins/Weather/src/weather_svcs.cpp
+++ b/plugins/Weather/src/weather_svcs.cpp
@@ -178,7 +178,7 @@ static void __cdecl WeatherGetAwayMsgThread(void *arg)
MCONTACT hContact = (DWORD_PTR)arg;
DBVARIANT dbv;
- if (!db_get_ts(hContact, "CList", "StatusMsg", &dbv)) {
+ if (!db_get_ws(hContact, "CList", "StatusMsg", &dbv)) {
ProtoBroadcastAck(WEATHERPROTONAME, hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)dbv.ptszVal);
db_free(&dbv);
}
diff --git a/plugins/Weather/src/weather_update.cpp b/plugins/Weather/src/weather_update.cpp
index c6159a10a3..148f53ba65 100644
--- a/plugins/Weather/src/weather_update.cpp
+++ b/plugins/Weather/src/weather_update.cpp
@@ -45,7 +45,7 @@ int UpdateWeather(MCONTACT hContact)
// log to netlib log for debug purpose
Netlib_LogfT(hNetlibUser, L"************************************************************************");
- int dbres = db_get_ts(hContact, WEATHERPROTONAME, "Nick", &dbv);
+ int dbres = db_get_ws(hContact, WEATHERPROTONAME, "Nick", &dbv);
Netlib_LogfT(hNetlibUser, L"<-- Start update for station -->");
@@ -76,23 +76,23 @@ int UpdateWeather(MCONTACT hContact)
WEATHERINFO winfo = LoadWeatherInfo(hContact);
// translate weather condition
- mir_wstrcpy(winfo.cond, TranslateTS(winfo.cond));
+ mir_wstrcpy(winfo.cond, TranslateW(winfo.cond));
// compare the old condition and determine if the weather had changed
if (opt.UpdateOnlyConditionChanged) { // consider condition change
- if (!db_get_ts(hContact, WEATHERPROTONAME, "LastCondition", &dbv)) {
+ if (!db_get_ws(hContact, WEATHERPROTONAME, "LastCondition", &dbv)) {
if (mir_wstrcmpi(winfo.cond, dbv.ptszVal)) Ch = TRUE; // the weather condition is changed
db_free(&dbv);
}
else Ch = TRUE;
- if (!db_get_ts(hContact, WEATHERPROTONAME, "LastTemperature", &dbv)) {
+ if (!db_get_ws(hContact, WEATHERPROTONAME, "LastTemperature", &dbv)) {
if (mir_wstrcmpi(winfo.temp, dbv.ptszVal)) Ch = TRUE; // the temperature is changed
db_free(&dbv);
}
else Ch = TRUE;
}
else { // consider update time change
- if (!db_get_ts(hContact, WEATHERPROTONAME, "LastUpdate", &dbv)) {
+ if (!db_get_ws(hContact, WEATHERPROTONAME, "LastUpdate", &dbv)) {
if (mir_wstrcmpi(winfo.update, dbv.ptszVal)) Ch = TRUE; // the update time is changed
db_free(&dbv);
}
@@ -100,7 +100,7 @@ int UpdateWeather(MCONTACT hContact)
}
// have weather alert issued?
- dbres = db_get_ts(hContact, WEATHERCONDITION, "Alert", &dbv);
+ dbres = db_get_ws(hContact, WEATHERCONDITION, "Alert", &dbv);
if (!dbres && dbv.ptszVal[0] != 0) {
if (opt.AlertPopup && !db_get_b(hContact, WEATHERPROTONAME, "DPopUp", 0) && Ch) {
// display alert popup
@@ -117,10 +117,10 @@ int UpdateWeather(MCONTACT hContact)
if (!dbres) db_free(&dbv);
// backup current condition for checking if the weather is changed or not
- db_set_ts(hContact, WEATHERPROTONAME, "LastLog", winfo.update);
- db_set_ts(hContact, WEATHERPROTONAME, "LastCondition", winfo.cond);
- db_set_ts(hContact, WEATHERPROTONAME, "LastTemperature", winfo.temp);
- db_set_ts(hContact, WEATHERPROTONAME, "LastUpdate", winfo.update);
+ db_set_ws(hContact, WEATHERPROTONAME, "LastLog", winfo.update);
+ db_set_ws(hContact, WEATHERPROTONAME, "LastCondition", winfo.cond);
+ db_set_ws(hContact, WEATHERPROTONAME, "LastTemperature", winfo.temp);
+ db_set_ws(hContact, WEATHERPROTONAME, "LastUpdate", winfo.update);
// display condition on contact list
if (opt.DisCondIcon && winfo.status != ID_STATUS_OFFLINE)
@@ -130,11 +130,11 @@ int UpdateWeather(MCONTACT hContact)
AvatarDownloaded(hContact);
GetDisplay(&winfo, opt.cText, str2);
- db_set_ts(hContact, "CList", "MyHandle", str2);
+ db_set_ws(hContact, "CList", "MyHandle", str2);
GetDisplay(&winfo, opt.sText, str2);
if (str2[0])
- db_set_ts(hContact, "CList", "StatusMsg", str2);
+ db_set_ws(hContact, "CList", "StatusMsg", str2);
else
db_unset(hContact, "CList", "StatusMsg");
@@ -142,9 +142,9 @@ int UpdateWeather(MCONTACT hContact)
// save descriptions in MyNotes
GetDisplay(&winfo, opt.nText, str2);
- db_set_ts(hContact, "UserInfo", "MyNotes", str2);
+ db_set_ws(hContact, "UserInfo", "MyNotes", str2);
GetDisplay(&winfo, opt.xText, str2);
- db_set_ts(hContact, WEATHERCONDITION, "WeatherInfo", str2);
+ db_set_ws(hContact, WEATHERCONDITION, "WeatherInfo", str2);
// set the update tag
db_set_b(hContact, WEATHERPROTONAME, "IsUpdated", TRUE);
@@ -166,7 +166,7 @@ int UpdateWeather(MCONTACT hContact)
if (db_get_b(hContact, WEATHERPROTONAME, "File", 0)) {
// external log
- if (!db_get_ts(hContact, WEATHERPROTONAME, "Log", &dbv)) {
+ if (!db_get_ws(hContact, WEATHERPROTONAME, "Log", &dbv)) {
// for the option for overwriting the file, delete old file first
if (db_get_b(hContact, WEATHERPROTONAME, "Overwrite", 0))
DeleteFile(dbv.ptszVal);
@@ -459,7 +459,7 @@ int GetWeatherData(MCONTACT hContact)
// to get a data value.
GetDataValue(&Item->Item, DataValue, &szInfo);
if (mir_wstrcmp(Item->Item.Name, L"Condition") && mir_wstrcmpi(Item->Item.Unit, L"Cond"))
- wcsncpy(DataValue, TranslateTS(DataValue), MAX_DATA_LEN - 1);
+ wcsncpy(DataValue, TranslateW(DataValue), MAX_DATA_LEN - 1);
break;
case WID_SET:
@@ -495,7 +495,7 @@ int GetWeatherData(MCONTACT hContact)
break;
case'\"': // constant, add it to the result string
- mir_wstrncat(DataValue, TranslateTS(str2), _countof(DataValue) - mir_wstrlen(DataValue));
+ mir_wstrncat(DataValue, TranslateW(str2), _countof(DataValue) - mir_wstrlen(DataValue));
DataValue[_countof(DataValue) - 1] = 0;
break;
}
@@ -536,40 +536,40 @@ int GetWeatherData(MCONTACT hContact)
// write the 2 strings created from the break operation
if (Item->Item.End[0])
- db_set_ts(hContact, WEATHERCONDITION, _T2A(Item->Item.End), end);
+ db_set_ws(hContact, WEATHERCONDITION, _T2A(Item->Item.End), end);
break;
}
}
// don't store data if it is not available
if ((DataValue[0] != 0 && mir_wstrcmp(DataValue, NODATA) &&
- mir_wstrcmp(DataValue, TranslateTS(NODATA)) && mir_wstrcmp(Item->Item.Name, L"Ignore")) ||
+ mir_wstrcmp(DataValue, TranslateW(NODATA)) && mir_wstrcmp(Item->Item.Name, L"Ignore")) ||
(!mir_wstrcmp(Item->Item.Name, L"Alert") && i == 0)) {
// temporary workaround for mToolTip to show feel-like temperature
if (!mir_wstrcmp(Item->Item.Name, L"Feel"))
- db_set_ts(hContact, WEATHERCONDITION, "Heat Index", DataValue);
+ db_set_ws(hContact, WEATHERCONDITION, "Heat Index", DataValue);
GetStationID(hContact, Svc, _countof(Svc));
if (!mir_wstrcmp(Svc, opt.Default))
- db_set_ts(NULL, DEFCURRENTWEATHER, _T2A(Item->Item.Name), DataValue);
+ db_set_ws(NULL, DEFCURRENTWEATHER, _T2A(Item->Item.Name), DataValue);
if (!mir_wstrcmp(Item->Item.Name, L"Condition")) {
wchar_t buf[128], *cbuf;
mir_snwprintf(buf, L"#%s Weather", DataValue);
- cbuf = TranslateTS(buf);
+ cbuf = TranslateW(buf);
if (cbuf[0] == '#')
- cbuf = TranslateTS(DataValue);
- db_set_ts(hContact, WEATHERCONDITION, _T2A(Item->Item.Name), cbuf);
+ cbuf = TranslateW(DataValue);
+ db_set_ws(hContact, WEATHERCONDITION, _T2A(Item->Item.Name), cbuf);
CharLowerBuff(DataValue, (DWORD)mir_wstrlen(DataValue));
cond = GetIcon(DataValue, Data);
}
else if (mir_wstrcmpi(Item->Item.Unit, L"Cond") == 0) {
wchar_t buf[128], *cbuf;
mir_snwprintf(buf, L"#%s Weather", DataValue);
- cbuf = TranslateTS(buf);
+ cbuf = TranslateW(buf);
if (cbuf[0] == '#')
- cbuf = TranslateTS(DataValue);
- db_set_ts(hContact, WEATHERCONDITION, _T2A(Item->Item.Name), cbuf);
+ cbuf = TranslateW(DataValue);
+ db_set_ws(hContact, WEATHERCONDITION, _T2A(Item->Item.Name), cbuf);
}
- else db_set_ts(hContact, WEATHERCONDITION, _T2A(Item->Item.Name), DataValue);
+ else db_set_ws(hContact, WEATHERCONDITION, _T2A(Item->Item.Name), DataValue);
}
Item = Item->Next;
}
@@ -578,7 +578,7 @@ int GetWeatherData(MCONTACT hContact)
// assign condition icon
db_set_w(hContact, WEATHERPROTONAME, "StatusIcon", cond);
- db_set_ts(hContact, WEATHERPROTONAME, "MirVer", Data->DisplayName);
+ db_set_ws(hContact, WEATHERPROTONAME, "MirVer", Data->DisplayName);
return 0;
}
diff --git a/plugins/WebView/src/main.cpp b/plugins/WebView/src/main.cpp
index a47782293c..e3beb4f848 100644
--- a/plugins/WebView/src/main.cpp
+++ b/plugins/WebView/src/main.cpp
@@ -164,13 +164,13 @@ extern "C" int __declspec(dllexport) Load()
InitServices();
//add sound event to options
- SkinAddNewSoundExT("webviewalert", MODULENAMEW, LPGENW("Alert event"));
+ SkinAddNewSoundExW("webviewalert", MODULENAMEW, LPGENW("Alert event"));
//value is 1 if menu is disabled
db_set_b(NULL, MODULENAME, MENU_IS_DISABLED_KEY, 1);
CMenuItem mi;
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
if ( db_get_b(NULL, MODULENAME, MENU_OFF, 0)) {
//value is 0 if menu is enabled
db_set_b(NULL, MODULENAME, MENU_IS_DISABLED_KEY, 0);
@@ -230,7 +230,7 @@ extern "C" int __declspec(dllexport) Load()
}
// contact menu
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
SET_UID(mi, 0xadc6a9a4, 0xdf7, 0x4f63, 0x89, 0x11, 0x8e, 0x42, 0x1d, 0xd6, 0x29, 0x31);
CreateServiceFunction("Open web page", WebsiteMenuCommand);
diff --git a/plugins/WebView/src/webview.cpp b/plugins/WebView/src/webview.cpp
index 39cbf6dfc7..4cfc3f1d0d 100644
--- a/plugins/WebView/src/webview.cpp
+++ b/plugins/WebView/src/webview.cpp
@@ -173,7 +173,7 @@ int Doubleclick(WPARAM wParam, LPARAM)
int action = db_get_b(hContact, MODULENAME, DBLE_WIN_KEY, 1);
if (action == 0) {
- ptrW url(db_get_tsa(hContact, MODULENAME, "URL"));
+ ptrW url(db_get_wsa(hContact, MODULENAME, "URL"));
Utils_OpenUrlT(url);
db_set_w(hContact, MODULENAME, "Status", ID_STATUS_ONLINE);
@@ -240,7 +240,7 @@ int SendToRichEdit(HWND hWindow, char *truncated, COLORREF rgbText, COLORREF rgb
cfFM.dwEffects = bold | italic | underline;
- if (!db_get_ts(NULL, MODULENAME, FONT_FACE_KEY, &dbv)) {
+ if (!db_get_ws(NULL, MODULENAME, FONT_FACE_KEY, &dbv)) {
mir_wstrcpy(cfFM.szFaceName, dbv.ptszVal);
db_free(&dbv);
}
@@ -443,7 +443,7 @@ int OnTopMenuCommand(WPARAM, LPARAM, MCONTACT singlecontact)
INT_PTR WebsiteMenuCommand(WPARAM wParam, LPARAM)
{
MCONTACT hContact = wParam;
- ptrW url(db_get_tsa(hContact, MODULENAME, "URL"));
+ ptrW url(db_get_wsa(hContact, MODULENAME, "URL"));
if (url)
Utils_OpenUrlT(url);
diff --git a/plugins/WebView/src/webview_alerts.cpp b/plugins/WebView/src/webview_alerts.cpp
index eee757a5e8..f5e40cb45d 100644
--- a/plugins/WebView/src/webview_alerts.cpp
+++ b/plugins/WebView/src/webview_alerts.cpp
@@ -30,7 +30,7 @@ int CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
case WM_COMMAND:
case WM_CONTEXTMENU:
MCONTACT hContact = PUGetContact(hWnd);
- ptrW url( db_get_tsa(hContact, MODULENAME, URL_KEY));
+ ptrW url( db_get_wsa(hContact, MODULENAME, URL_KEY));
if (message == WM_COMMAND) { // left click
if(hContact != NULL) {
@@ -115,7 +115,7 @@ int PopupAlert(WPARAM wParam, LPARAM lParam)
if( ((HANDLE)wParam) != NULL) {
DBVARIANT dbv;
- db_get_ts(wParam, MODULENAME, PRESERVE_NAME_KEY, &dbv);
+ db_get_ws(wParam, MODULENAME, PRESERVE_NAME_KEY, &dbv);
mir_wstrncpy(ppd.lptzContactName, dbv.ptszVal, _countof(ppd.lptzContactName));
db_free(&dbv);
}
@@ -192,7 +192,7 @@ int ErrorMsgs(WPARAM wParam, LPARAM lParam)
PUShowMessageT(newdisplaytext, SM_WARNING);
}
else if ( ServiceExists("OSD/Announce") && db_get_b(NULL, MODULENAME, ERROR_POPUP_KEY, 0)) {
- mir_snwprintf(newdisplaytext, L"%s: %s", ptszContactName, TranslateTS(displaytext));
+ mir_snwprintf(newdisplaytext, L"%s: %s", ptszContactName, TranslateW(displaytext));
CallService("OSD/Announce", (WPARAM)newdisplaytext, 0);
}
else if (ServiceExists(MS_CLIST_SYSTRAY_NOTIFY)) {
@@ -200,7 +200,7 @@ int ErrorMsgs(WPARAM wParam, LPARAM lParam)
webview_tip.cbSize = sizeof(MIRANDASYSTRAYNOTIFY);
webview_tip.szProto = NULL;
webview_tip.tszInfoTitle = ptszContactName;
- webview_tip.tszInfo = TranslateTS(displaytext);
+ webview_tip.tszInfo = TranslateW(displaytext);
webview_tip.dwInfoFlags = NIIF_ERROR | NIIF_INTERN_UNICODE;
webview_tip.uTimeout = 15000;
CallService(MS_CLIST_SYSTRAY_NOTIFY, 0, (LPARAM) &webview_tip);
@@ -445,7 +445,7 @@ int ProcessAlerts(MCONTACT hContact, char *truncated, char *tstr, char *contactn
else {
fwrite(tempraw, mir_strlen(tempraw), 1, pcachefile); //smaller cache
fclose(pcachefile);
- db_set_ts(hContact, MODULENAME, CACHE_FILE_KEY, newcachepath);
+ db_set_ws(hContact, MODULENAME, CACHE_FILE_KEY, newcachepath);
}
// end write to cache
@@ -656,7 +656,7 @@ int ProcessAlerts(MCONTACT hContact, char *truncated, char *tstr, char *contactn
WErrorPopup((UINT_PTR)contactname, TranslateT("Cannot write to file 2"));
else {
fwrite(raw, mir_strlen(raw), 1, pcachefile); //smaller cache
- db_set_ts(hContact, MODULENAME, CACHE_FILE_KEY, newcachepath);
+ db_set_ws(hContact, MODULENAME, CACHE_FILE_KEY, newcachepath);
fclose(pcachefile);
}
// end write to cache
diff --git a/plugins/WebView/src/webview_datawnd.cpp b/plugins/WebView/src/webview_datawnd.cpp
index a45f188ac1..462b903628 100644
--- a/plugins/WebView/src/webview_datawnd.cpp
+++ b/plugins/WebView/src/webview_datawnd.cpp
@@ -129,8 +129,8 @@ static MCONTACT FindContactByUrl(HWND hwndDlg)
GetWindowText(hwndDlg, titlebartxt, _countof(titlebartxt));
for (MCONTACT hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME)) {
- ptrW db1( db_get_tsa(hContact, MODULENAME, URL_KEY));
- ptrW db2( db_get_tsa(hContact, MODULENAME, PRESERVE_NAME_KEY));
+ ptrW db1( db_get_wsa(hContact, MODULENAME, URL_KEY));
+ ptrW db2( db_get_wsa(hContact, MODULENAME, PRESERVE_NAME_KEY));
if (!mir_wstrcmp(urltext, db1) && !mir_wstrcmp(titlebartxt, db2)) {
contactcount++;
@@ -161,7 +161,7 @@ INT_PTR CALLBACK DlgProcDisplayData(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
WindowList_Add(hWindowList, hwndDlg, hContact2);
url[0] = '\0';
- if (!db_get_ts(hContact2, MODULENAME, URL_KEY, &dbv)) {
+ if (!db_get_ws(hContact2, MODULENAME, URL_KEY, &dbv)) {
wcsncpy_s(url, dbv.ptszVal, _TRUNCATE);
db_free(&dbv);
}
@@ -183,29 +183,29 @@ INT_PTR CALLBACK DlgProcDisplayData(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
SendDlgItemMessage(hwndDlg, IDC_DATA, EM_SETBKGNDCOLOR, 0, colour);
SendDlgItemMessage(hwndDlg, IDC_UPDATE_BUTTON, BM_SETIMAGE, IMAGE_ICON, (LPARAM) LoadImage(hInst, MAKEINTRESOURCE(IDI_UPDATE), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0));
- SendDlgItemMessage(hwndDlg, IDC_UPDATE_BUTTON, BUTTONADDTOOLTIP, (WPARAM) TranslateT("Update data"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_UPDATE_BUTTON, BUTTONADDTOOLTIP, (WPARAM) TranslateT("Update data"), BATF_UNICODE);
SendDlgItemMessage(hwndDlg, IDC_FIND_BUTTON, BM_SETIMAGE, IMAGE_ICON, (LPARAM) LoadImage(hInst, MAKEINTRESOURCE(IDI_FIND), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0));
- SendDlgItemMessage(hwndDlg, IDC_FIND_BUTTON, BUTTONADDTOOLTIP, (WPARAM) TranslateT("Find"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_FIND_BUTTON, BUTTONADDTOOLTIP, (WPARAM) TranslateT("Find"), BATF_UNICODE);
SendDlgItemMessage(hwndDlg, IDC_OPTIONS_BUTTON, BM_SETIMAGE, IMAGE_ICON, (LPARAM) LoadImage(hInst, MAKEINTRESOURCE(IDI_OPTIONS), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0));
- SendDlgItemMessage(hwndDlg, IDC_OPTIONS_BUTTON, BUTTONADDTOOLTIP, (WPARAM) TranslateT("Contact options"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_OPTIONS_BUTTON, BUTTONADDTOOLTIP, (WPARAM) TranslateT("Contact options"), BATF_UNICODE);
SendDlgItemMessage(hwndDlg, IDC_ALERT_BUTTON, BM_SETIMAGE, IMAGE_ICON, (LPARAM) LoadImage(hInst, MAKEINTRESOURCE(IDI_ALERT), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0));
- SendDlgItemMessage(hwndDlg, IDC_ALERT_BUTTON, BUTTONADDTOOLTIP, (WPARAM) TranslateT("Alert options"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_ALERT_BUTTON, BUTTONADDTOOLTIP, (WPARAM) TranslateT("Alert options"), BATF_UNICODE);
SendDlgItemMessage(hwndDlg, IDC_STOP, BM_SETIMAGE, IMAGE_ICON, (LPARAM) LoadImage(hInst, MAKEINTRESOURCE(IDI_STOP), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0));
- SendDlgItemMessage(hwndDlg, IDC_STOP, BUTTONADDTOOLTIP, (WPARAM) TranslateT("Stop processing"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_STOP, BUTTONADDTOOLTIP, (WPARAM) TranslateT("Stop processing"), BATF_UNICODE);
- SendDlgItemMessage(hwndDlg, IDC_OPEN_URL, BUTTONADDTOOLTIP, (WPARAM) TranslateT("Click here to open this URL in a browser window."), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_OPEN_URL, BUTTONADDTOOLTIP, (WPARAM) TranslateT("Click here to open this URL in a browser window."), BATF_UNICODE);
if (!db_get_b(hContact2, MODULENAME, ON_TOP_KEY, 0)) {
SendDlgItemMessage(hwndDlg, IDC_STICK_BUTTON, BM_SETIMAGE, IMAGE_ICON, (LPARAM) LoadImage(hInst, MAKEINTRESOURCE(IDI_UNSTICK), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0));
- SendDlgItemMessage(hwndDlg, IDC_STICK_BUTTON, BUTTONADDTOOLTIP, (WPARAM) TranslateT("Stick to the front"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_STICK_BUTTON, BUTTONADDTOOLTIP, (WPARAM) TranslateT("Stick to the front"), BATF_UNICODE);
}
else {
SendDlgItemMessage(hwndDlg, IDC_STICK_BUTTON, BM_SETIMAGE, IMAGE_ICON, (LPARAM) LoadImage(hInst, MAKEINTRESOURCE(IDI_STICK), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0));
- SendDlgItemMessage(hwndDlg, IDC_STICK_BUTTON, BUTTONADDTOOLTIP, (WPARAM) TranslateT("Disable stick to the front"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_STICK_BUTTON, BUTTONADDTOOLTIP, (WPARAM) TranslateT("Disable stick to the front"), BATF_UNICODE);
}
SendDlgItemMessage(hwndDlg, IDC_DATA, WM_SETFONT, (WPARAM) h_font, 1);
@@ -369,7 +369,7 @@ INT_PTR CALLBACK DlgProcDisplayData(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
ptszToolTip = TranslateT("Disable stick to the front");
}
SendDlgItemMessage(hwndDlg, IDC_STICK_BUTTON, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadImage(hInst, MAKEINTRESOURCE(IDI_UNSTICK), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0));
- SendDlgItemMessage(hwndDlg, IDC_STICK_BUTTON, BUTTONADDTOOLTIP, (WPARAM)ptszToolTip, BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_STICK_BUTTON, BUTTONADDTOOLTIP, (WPARAM)ptszToolTip, BATF_UNICODE);
SetWindowPos(hwndDlg, hTopmost, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);
}
break;
diff --git a/plugins/WebView/src/webview_getdata.cpp b/plugins/WebView/src/webview_getdata.cpp
index 55299017a5..75fca2a20f 100644
--- a/plugins/WebView/src/webview_getdata.cpp
+++ b/plugins/WebView/src/webview_getdata.cpp
@@ -131,7 +131,7 @@ void GetData(void *param)
EnableWindow(GetDlgItem(hwndDlg, IDC_UPDATE_BUTTON), 1);
SetDlgItemText(hwndDlg, IDC_STATUSBAR, TranslateT("Download in progress, please wait..."));
- db_set_ts(hContact, "CList", "StatusMsg", TranslateT("Updating..."));
+ db_set_ws(hContact, "CList", "StatusMsg", TranslateT("Updating..."));
db_set_w(hContact, MODULENAME, "Status", ID_STATUS_DND); // download
NETLIBHTTPREQUEST *nlhrReply = (NETLIBHTTPREQUEST *) CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM) hNetlibUser, (LPARAM) & nlhr);
@@ -142,7 +142,7 @@ void GetData(void *param)
wchar_t *statusText = TranslateT("The server replied with a failure code");
SetDlgItemText(hwndDlg, IDC_STATUSBAR, statusText);
WErrorPopup(hContact, statusText);
- db_set_ts(hContact, "CList", "StatusMsg", statusText);
+ db_set_ws(hContact, "CList", "StatusMsg", statusText);
}
if (nlhrReply->dataLength) {
trunccount = 0;
@@ -158,7 +158,7 @@ void GetData(void *param)
wchar_t *statusText = TranslateT("The server is down or lagging.");
SetDlgItemText(hwndDlg, IDC_STATUSBAR, statusText);
WErrorPopup(hContact, statusText);
- db_set_ts(hContact, "CList", "StatusMsg", statusText);
+ db_set_ws(hContact, "CList", "StatusMsg", statusText);
}
if (!(nlhrReply))
@@ -248,7 +248,7 @@ void GetData(void *param)
if (db_get_b(hContact, MODULENAME, U_ALLSITE_KEY, 0) == 0) {
wchar_t *statusText = TranslateT("Both search strings not found or strings not set.");
WErrorPopup(hContact, statusText);
- db_set_ts(hContact, "CList", "StatusMsg", statusText);
+ db_set_ws(hContact, "CList", "StatusMsg", statusText);
DownloadSuccess = 0;
SetDlgItemText(hwndDlg, IDC_STATUSBAR, statusText);
@@ -286,7 +286,7 @@ void GetData(void *param)
db_free(&dbv);
}
else {
- db_get_ts(hContact, "CList", "MyHandle", &dbv);
+ db_get_ws(hContact, "CList", "MyHandle", &dbv);
memset(&temptime, 0, sizeof(temptime));
memset(&tstr, 0, sizeof(tstr));
ftime = time(NULL);
@@ -298,7 +298,7 @@ void GetData(void *param)
if (db_get_b(hContact, MODULENAME, USE_24_HOUR_KEY, 0) == 1)
strftime(temptime, 128, "(%b %d,%H:%M:%S)", nTime);
- db_set_ts(hContact, MODULENAME, PRESERVE_NAME_KEY, dbv.ptszVal);
+ db_set_ws(hContact, MODULENAME, PRESERVE_NAME_KEY, dbv.ptszVal);
if (db_get_b(hContact, MODULENAME, CONTACT_PREFIX_KEY, 1) == 1)
mir_snprintf(tstr, "%s %s", temptime, dbv.pszVal);
if (db_get_b(hContact, MODULENAME, CONTACT_PREFIX_KEY, 1) == 0)
@@ -359,7 +359,7 @@ LBL_Stop: wchar_t *statusText = TranslateT("Processing data stopped by user.")
SetDlgItemText(hwndDlg, IDC_STATUSBAR, statusText);
db_set_b(hContact, MODULENAME, STOP_KEY, 0);
db_set_w(hContact, MODULENAME, "Status", ID_STATUS_ONLINE);
- db_set_ts(hContact, "CList", "StatusMsg", statusText);
+ db_set_ws(hContact, "CList", "StatusMsg", statusText);
AlreadyDownloading = 0;
return;
}
@@ -444,11 +444,11 @@ LBL_Stop: wchar_t *statusText = TranslateT("Processing data stopped by user.")
if (TherewasAlert) {
db_set_w(hContact, MODULENAME, "Status", ID_STATUS_OCCUPIED);
- db_set_ts(hContact, "CList", "StatusMsg", TranslateT("Alert!"));
+ db_set_ws(hContact, "CList", "StatusMsg", TranslateT("Alert!"));
}
else {
db_set_w(hContact, MODULENAME, "Status", ID_STATUS_ONLINE);
- db_set_ts(hContact, "CList", "StatusMsg", TranslateT("Online"));
+ db_set_ws(hContact, "CList", "StatusMsg", TranslateT("Online"));
}
}
diff --git a/plugins/WebView/src/webview_opts.cpp b/plugins/WebView/src/webview_opts.cpp
index 69d878fbd6..393388ea34 100644
--- a/plugins/WebView/src/webview_opts.cpp
+++ b/plugins/WebView/src/webview_opts.cpp
@@ -283,15 +283,15 @@ INT_PTR CALLBACK DlgProcAlertOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
EnableWindow(GetDlgItem(hwndDlg, IDC_ALERT_APPLY), 0);
- if (!db_get_ts(hContact, MODULENAME, ALERT_STRING_KEY, &dbv)) {
+ if (!db_get_ws(hContact, MODULENAME, ALERT_STRING_KEY, &dbv)) {
SetDlgItemText(hwndDlg, IDC_ALERT_STRING, dbv.ptszVal);
db_free(&dbv);
}
- if (!db_get_ts(hContact, MODULENAME, ALRT_S_STRING_KEY, &dbv)) {
+ if (!db_get_ws(hContact, MODULENAME, ALRT_S_STRING_KEY, &dbv)) {
SetDlgItemText(hwndDlg, IDC_START2, dbv.ptszVal);
db_free(&dbv);
}
- if (!db_get_ts(hContact, MODULENAME, ALRT_E_STRING_KEY, &dbv)) {
+ if (!db_get_ws(hContact, MODULENAME, ALRT_E_STRING_KEY, &dbv)) {
SetDlgItemText(hwndDlg, IDC_END2, dbv.ptszVal);
db_free(&dbv);
}
@@ -300,14 +300,14 @@ INT_PTR CALLBACK DlgProcAlertOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
CheckDlgButton(hwndDlg, IDC_24_HOUR, db_get_b(hContact, MODULENAME, USE_24_HOUR_KEY, 0) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_ALWAYS_LOG, db_get_b(hContact, MODULENAME, ALWAYS_LOG_KEY, 0) ? BST_CHECKED : BST_UNCHECKED);
- SetDlgItemText(hwndDlg, IDC_ALERT_TYPE, TranslateTS(AlertTypes[db_get_b(hContact, MODULENAME, ALRT_INDEX_KEY, 0)]));
- SetDlgItemText(hwndDlg, IDC_EVENT_TYPE, TranslateTS(EventTypes[db_get_b(hContact, MODULENAME, EVNT_INDEX_KEY, 0)]));
+ SetDlgItemText(hwndDlg, IDC_ALERT_TYPE, TranslateW(AlertTypes[db_get_b(hContact, MODULENAME, ALRT_INDEX_KEY, 0)]));
+ SetDlgItemText(hwndDlg, IDC_EVENT_TYPE, TranslateW(EventTypes[db_get_b(hContact, MODULENAME, EVNT_INDEX_KEY, 0)]));
for (i = 0; i < _countof(AlertTypes); i++)
- SendDlgItemMessage(hwndDlg, IDC_ALERT_TYPE, CB_ADDSTRING, 0, (LPARAM)TranslateTS(AlertTypes[i]));
+ SendDlgItemMessage(hwndDlg, IDC_ALERT_TYPE, CB_ADDSTRING, 0, (LPARAM)TranslateW(AlertTypes[i]));
for (i = 0; i < _countof(EventTypes); i++)
- SendDlgItemMessage(hwndDlg, IDC_EVENT_TYPE, CB_ADDSTRING, 0, (LPARAM)TranslateTS(EventTypes[i]));
+ SendDlgItemMessage(hwndDlg, IDC_EVENT_TYPE, CB_ADDSTRING, 0, (LPARAM)TranslateW(EventTypes[i]));
if (db_get_b(hContact, MODULENAME, ENABLE_ALERTS_KEY, 0)) {
CheckDlgButton(hwndDlg, IDC_ENABLE_ALERTS, BST_UNCHECKED);
@@ -412,7 +412,7 @@ INT_PTR CALLBACK DlgProcAlertOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
}
}
- if (!db_get_ts(hContact, MODULENAME, FILE_KEY, &dbv)) {
+ if (!db_get_ws(hContact, MODULENAME, FILE_KEY, &dbv)) {
SetDlgItemText(hwndDlg, IDC_FILENAME, dbv.ptszVal);
db_free(&dbv);
}
@@ -746,19 +746,19 @@ INT_PTR CALLBACK DlgProcAlertOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
}
GetDlgItemText(hwndDlg, IDC_FILENAME, buf, _countof(buf));
- db_set_ts(hContact, MODULENAME, FILE_KEY, buf);
+ db_set_ws(hContact, MODULENAME, FILE_KEY, buf);
db_set_b(hContact, MODULENAME, APPEND_KEY, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_APPEND));
db_set_b(hContact, MODULENAME, SAVE_AS_RAW_KEY, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SAVE_AS_RAW));
GetDlgItemText(hwndDlg, IDC_ALERT_STRING, buf, _countof(buf));
- db_set_ts(hContact, MODULENAME, ALERT_STRING_KEY, buf);
+ db_set_ws(hContact, MODULENAME, ALERT_STRING_KEY, buf);
GetDlgItemText(hwndDlg, IDC_START2, buf, _countof(buf));
- db_set_ts(hContact, MODULENAME, ALRT_S_STRING_KEY, buf);
+ db_set_ws(hContact, MODULENAME, ALRT_S_STRING_KEY, buf);
GetDlgItemText(hwndDlg, IDC_END2, buf, _countof(buf));
- db_set_ts(hContact, MODULENAME, ALRT_E_STRING_KEY, buf);
+ db_set_ws(hContact, MODULENAME, ALRT_E_STRING_KEY, buf);
db_set_b(hContact, MODULENAME, CONTACT_PREFIX_KEY, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_PREFIX));
@@ -823,25 +823,25 @@ INT_PTR CALLBACK DlgProcContactOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
EnableWindow(GetDlgItem(hwndDlg, IDC_OPT_APPLY), 0);
- if (!db_get_ts(hContact, MODULENAME, URL_KEY, &dbv)) {
+ if (!db_get_ws(hContact, MODULENAME, URL_KEY, &dbv)) {
SetDlgItemText(hwndDlg, IDC_URL, dbv.ptszVal);
db_free(&dbv);
}
- if (!db_get_ts(hContact, MODULENAME, START_STRING_KEY, &dbv)) {
+ if (!db_get_ws(hContact, MODULENAME, START_STRING_KEY, &dbv)) {
SetDlgItemText(hwndDlg, IDC_START, dbv.ptszVal);
db_free(&dbv);
}
- if (!db_get_ts(hContact, MODULENAME, END_STRING_KEY, &dbv)) {
+ if (!db_get_ws(hContact, MODULENAME, END_STRING_KEY, &dbv)) {
SetDlgItemText(hwndDlg, IDC_END, dbv.ptszVal);
db_free(&dbv);
}
- if (db_get_ts(hContact, MODULENAME, PRESERVE_NAME_KEY, &dbv)) {
+ if (db_get_ws(hContact, MODULENAME, PRESERVE_NAME_KEY, &dbv)) {
db_free(&dbv);
- db_get_ts(hContact, "CList", "MyHandle", &dbv);
- db_set_ts(hContact, MODULENAME, PRESERVE_NAME_KEY, dbv.ptszVal);
+ db_get_ws(hContact, "CList", "MyHandle", &dbv);
+ db_set_ws(hContact, MODULENAME, PRESERVE_NAME_KEY, dbv.ptszVal);
db_free(&dbv);
}
- if (!db_get_ts(hContact, MODULENAME, PRESERVE_NAME_KEY, &dbv)) {
+ if (!db_get_ws(hContact, MODULENAME, PRESERVE_NAME_KEY, &dbv)) {
SetDlgItemText(hwndDlg, IDC_SITE_NAME, dbv.ptszVal);
db_free(&dbv);
}
@@ -850,7 +850,7 @@ INT_PTR CALLBACK DlgProcContactOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
SendDlgItemMessage(hwndDlg, IDC_RWSPACE, TBM_SETRANGE, FALSE, MAKELONG(0, 4));
SendDlgItemMessage(hwndDlg, IDC_RWSPACE, TBM_SETPOS, TRUE, db_get_b(hContact, MODULENAME, RWSPACE_KEY, 0));
- SetDlgItemText(hwndDlg, IDC_RWSPC_TEXT, TranslateTS(szTrackerBarDescr[SendDlgItemMessage(hwndDlg, IDC_RWSPACE, TBM_GETPOS, 0, 0)]));
+ SetDlgItemText(hwndDlg, IDC_RWSPC_TEXT, TranslateW(szTrackerBarDescr[SendDlgItemMessage(hwndDlg, IDC_RWSPACE, TBM_GETPOS, 0, 0)]));
EnableWindow(GetDlgItem(hwndDlg, IDC_RWSPACE), (IsDlgButtonChecked(hwndDlg, IDC_CLEAN)));
EnableWindow(GetDlgItem(hwndDlg, IDC_RWSPC_TEXT), (IsDlgButtonChecked(hwndDlg, IDC_CLEAN)));
@@ -876,7 +876,7 @@ INT_PTR CALLBACK DlgProcContactOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
break;
case WM_HSCROLL:
- SetDlgItemText(hwndDlg, IDC_RWSPC_TEXT, TranslateTS(szTrackerBarDescr[SendDlgItemMessage(hwndDlg, IDC_RWSPACE, TBM_GETPOS, 0, 0)]));
+ SetDlgItemText(hwndDlg, IDC_RWSPC_TEXT, TranslateW(szTrackerBarDescr[SendDlgItemMessage(hwndDlg, IDC_RWSPACE, TBM_GETPOS, 0, 0)]));
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
EnableWindow(GetDlgItem(hwndDlg, IDC_OPT_APPLY), 1);
break;
@@ -918,10 +918,10 @@ INT_PTR CALLBACK DlgProcContactOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
hContact = (MCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
GetDlgItemText(hwndDlg, IDC_START, string, _countof(string));
- db_set_ts(hContact, MODULENAME, ALRT_S_STRING_KEY, string);
+ db_set_ws(hContact, MODULENAME, ALRT_S_STRING_KEY, string);
GetDlgItemText(hwndDlg, IDC_END, string, _countof(string));
- db_set_ts(hContact, MODULENAME, ALRT_E_STRING_KEY, string);
+ db_set_ws(hContact, MODULENAME, ALRT_E_STRING_KEY, string);
db_set_w(hContact, MODULENAME, EVNT_INDEX_KEY, 2);
}
@@ -1013,17 +1013,17 @@ INT_PTR CALLBACK DlgProcContactOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
hContact = (MCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
GetDlgItemText(hwndDlg, IDC_URL, url, _countof(url));
- db_set_ts(hContact, MODULENAME, URL_KEY, url);
- db_set_ts(hContact, MODULENAME, "Homepage", url);
+ db_set_ws(hContact, MODULENAME, URL_KEY, url);
+ db_set_ws(hContact, MODULENAME, "Homepage", url);
GetDlgItemText(hwndDlg, IDC_START, str, _countof(str));
- db_set_ts(hContact, MODULENAME, START_STRING_KEY, str);
+ db_set_ws(hContact, MODULENAME, START_STRING_KEY, str);
GetDlgItemText(hwndDlg, IDC_END, str, _countof(str));
- db_set_ts(hContact, MODULENAME, END_STRING_KEY, str);
+ db_set_ws(hContact, MODULENAME, END_STRING_KEY, str);
GetDlgItemText(hwndDlg, IDC_SITE_NAME, str, _countof(str));
- db_set_ts(hContact, "CList", "MyHandle", str);
+ db_set_ws(hContact, "CList", "MyHandle", str);
db_set_b(hContact, MODULENAME, DBLE_WIN_KEY, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_DBLE_WIN));
db_set_b(hContact, MODULENAME, U_ALLSITE_KEY, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_U_ALLSITE));
@@ -1103,7 +1103,7 @@ INT_PTR CALLBACK DlgProcOpt(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
CheckDlgButton(hwndDlg, IDC_NO_PROTECT, db_get_b(NULL, MODULENAME, NO_PROTECT_KEY, 0) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_DATAPOPUP, db_get_b(NULL, MODULENAME, DATA_POPUP_KEY, 0) ? BST_CHECKED : BST_UNCHECKED);
- if (!db_get_ts(NULL, MODULENAME, FONT_FACE_KEY, &dbv)) {
+ if (!db_get_ws(NULL, MODULENAME, FONT_FACE_KEY, &dbv)) {
SetDlgItemText(hwndDlg, IDC_TYPEFACE, dbv.ptszVal);
db_free(&dbv);
}
@@ -1269,7 +1269,7 @@ INT_PTR CALLBACK DlgProcOpt(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
wchar_t str[100];
GetDlgItemText(hwndDlg, IDC_TYPEFACE, str, _countof(str));
- db_set_ts(NULL, MODULENAME, FONT_FACE_KEY, str);
+ db_set_ws(NULL, MODULENAME, FONT_FACE_KEY, str);
db_set_b(NULL, MODULENAME, FONT_SIZE_KEY, (GetDlgItemInt(hwndDlg, IDC_FONTSIZE, NULL, FALSE)));
db_set_b(NULL, MODULENAME, FONT_SCRIPT_KEY, ((BYTE)SendDlgItemMessage(hwndDlg, IDC_SCRIPT, CB_GETITEMDATA, SendDlgItemMessage(hwndDlg, IDC_SCRIPT, CB_GETCURSEL, 0, 0), 0)));
diff --git a/plugins/WebView/src/webview_services.cpp b/plugins/WebView/src/webview_services.cpp
index b3d8a70504..9958e98629 100644
--- a/plugins/WebView/src/webview_services.cpp
+++ b/plugins/WebView/src/webview_services.cpp
@@ -46,12 +46,12 @@ int DBSettingChanged(WPARAM wParam, LPARAM lParam)
// A contact is renamed
if (!strcmp(cws->szSetting, "MyHandle")) {
- ptrW oldName( db_get_tsa(hContact, MODULENAME, PRESERVE_NAME_KEY));
+ ptrW oldName( db_get_wsa(hContact, MODULENAME, PRESERVE_NAME_KEY));
if (oldName == NULL)
return 0;
wchar_t nick[100];
- ptrW oldnick( db_get_tsa(hContact, "CList", "MyHandle"));
+ ptrW oldnick( db_get_wsa(hContact, "CList", "MyHandle"));
if (oldnick != NULL)
wcsncpy_s(nick, oldnick, _TRUNCATE);
else
@@ -74,9 +74,9 @@ int DBSettingChanged(WPARAM wParam, LPARAM lParam)
}
if ( wcschr(nick, '(') == 0) {
- db_set_ts(hContact, MODULENAME, PRESERVE_NAME_KEY, nick);
- db_set_ts(hContact, MODULENAME, "Nick", nick);
- db_set_ts(hContact, "CList", "MyHandle", nick);
+ db_set_ws(hContact, MODULENAME, PRESERVE_NAME_KEY, nick);
+ db_set_ws(hContact, MODULENAME, "Nick", nick);
+ db_set_ws(hContact, "CList", "MyHandle", nick);
}
// TEST GET NAME FOR CACHE
@@ -99,7 +99,7 @@ int DBSettingChanged(WPARAM wParam, LPARAM lParam)
fclose(pcachefile);
if (mir_wstrcmp(newcachepath, renamedcachepath)) {
MoveFile(newcachepath, renamedcachepath);
- db_set_ts(hContact, MODULENAME, CACHE_FILE_KEY, renamedcachepath);
+ db_set_ws(hContact, MODULENAME, CACHE_FILE_KEY, renamedcachepath);
}
}
}
@@ -115,7 +115,7 @@ int SiteDeleted(WPARAM wParam, LPARAM)
if (mir_strcmp(GetContactProto(hContact), MODULENAME))
return 0;
- ptrW contactName( db_get_tsa(hContact, MODULENAME, PRESERVE_NAME_KEY));
+ ptrW contactName( db_get_wsa(hContact, MODULENAME, PRESERVE_NAME_KEY));
// TEST GET NAME FOR CACHE
wchar_t cachepath[MAX_PATH], cachedirectorypath[MAX_PATH], newcachepath[MAX_PATH + 50];
@@ -167,7 +167,7 @@ INT_PTR PingWebsiteMenuCommand(WPARAM wParam, LPARAM)
return 0;
}
- ptrW url( db_get_tsa(wParam, MODULENAME, "URL"));
+ ptrW url( db_get_wsa(wParam, MODULENAME, "URL"));
if (url == NULL)
return 0;
@@ -353,7 +353,7 @@ INT_PTR AddToList(WPARAM, LPARAM lParam)
// search for existing contact
for (hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME)) {
// check ID to see if the contact already exist in the database
- if (db_get_ts(hContact, MODULENAME, "URL", &dbv))
+ if (db_get_ws(hContact, MODULENAME, "URL", &dbv))
continue;
if (!mir_wstrcmpi(psr->nick.w, dbv.ptszVal)) {
// remove the flag for not on list and hidden, thus make the
@@ -405,7 +405,7 @@ INT_PTR AddToList(WPARAM, LPARAM lParam)
if (Nend) *Nend = '\0';
for (MCONTACT hContact2 = db_find_first(MODULENAME); hContact2 != NULL; hContact2 = db_find_next(hContact2, MODULENAME)) {
- if (!db_get_ts(hContact2, MODULENAME, PRESERVE_NAME_KEY, &dbv)) {
+ if (!db_get_ws(hContact2, MODULENAME, PRESERVE_NAME_KEY, &dbv)) {
if (!mir_wstrcmpi(Newnick, dbv.ptszVal)) {
// remove the flag for not on list and hidden, thus make the
// contact visible
@@ -431,13 +431,13 @@ INT_PTR AddToList(WPARAM, LPARAM lParam)
}
//end convert
- db_set_ts(hContact, "CList", "MyHandle", Newnick);
- db_set_ts(hContact, MODULENAME, PRESERVE_NAME_KEY, Newnick);
- db_set_ts(hContact, MODULENAME, "Nick", Newnick);
+ db_set_ws(hContact, "CList", "MyHandle", Newnick);
+ db_set_ws(hContact, MODULENAME, PRESERVE_NAME_KEY, Newnick);
+ db_set_ws(hContact, MODULENAME, "Nick", Newnick);
db_set_b(hContact, MODULENAME, CLEAR_DISPLAY_KEY, 1);
db_set_s(hContact, MODULENAME, START_STRING_KEY, "");
- db_set_ts(hContact, MODULENAME, URL_KEY, psr->nick.w);
- db_set_ts(hContact, MODULENAME, "Homepage", psr->nick.w);
+ db_set_ws(hContact, MODULENAME, URL_KEY, psr->nick.w);
+ db_set_ws(hContact, MODULENAME, "Homepage", psr->nick.w);
db_set_b(hContact, MODULENAME, U_ALLSITE_KEY, 1);
db_set_w(hContact, MODULENAME, "Status", ID_STATUS_ONLINE);
diff --git a/plugins/WhenWasIt/src/WhenWasIt.cpp b/plugins/WhenWasIt/src/WhenWasIt.cpp
index cb5da2f666..0fbf8a0cb0 100644
--- a/plugins/WhenWasIt/src/WhenWasIt.cpp
+++ b/plugins/WhenWasIt/src/WhenWasIt.cpp
@@ -131,8 +131,8 @@ extern "C" int __declspec(dllexport) Load(void)
hotkey.pszService = MS_WWI_CHECK_BIRTHDAYS;
Hotkey_Register(&hotkey);
- SkinAddNewSoundExT(BIRTHDAY_NEAR_SOUND, LPGENW("WhenWasIt"), LPGENW("Birthday near"));
- SkinAddNewSoundExT(BIRTHDAY_TODAY_SOUND, LPGENW("WhenWasIt"), LPGENW("Birthday today"));
+ SkinAddNewSoundExW(BIRTHDAY_NEAR_SOUND, LPGENW("WhenWasIt"), LPGENW("Birthday near"));
+ SkinAddNewSoundExW(BIRTHDAY_TODAY_SOUND, LPGENW("WhenWasIt"), LPGENW("Birthday today"));
Log("%s", "Leaving function " __FUNCTION__);
return 0;
diff --git a/plugins/WhenWasIt/src/dlg_handlers.cpp b/plugins/WhenWasIt/src/dlg_handlers.cpp
index 24af71cc3d..984fc1b5b2 100644
--- a/plugins/WhenWasIt/src/dlg_handlers.cpp
+++ b/plugins/WhenWasIt/src/dlg_handlers.cpp
@@ -99,18 +99,18 @@ int AddInfoToComboBoxes(HWND hWnd)
int i;
for (i = 0; i < cShowAgeMode; i++)
- SendDlgItemMessage(hWnd, IDC_AGE_COMBOBOX, CB_ADDSTRING, 0, (LPARAM)TranslateTS(szShowAgeMode[i]));
+ SendDlgItemMessage(hWnd, IDC_AGE_COMBOBOX, CB_ADDSTRING, 0, (LPARAM)TranslateW(szShowAgeMode[i]));
for (i = 0; i < cSaveModule; i++)
- SendDlgItemMessage(hWnd, IDC_DEFAULT_MODULE, CB_ADDSTRING, 0, (LPARAM)TranslateTS(szSaveModule[i]));
+ SendDlgItemMessage(hWnd, IDC_DEFAULT_MODULE, CB_ADDSTRING, 0, (LPARAM)TranslateW(szSaveModule[i]));
for (i = 0; i < cPopupClick; i++) {
- SendDlgItemMessage(hWnd, IDC_LEFT_CLICK, CB_ADDSTRING, 0, (LPARAM)TranslateTS(szPopupClick[i]));
- SendDlgItemMessage(hWnd, IDC_RIGHT_CLICK, CB_ADDSTRING, 0, (LPARAM)TranslateTS(szPopupClick[i]));
+ SendDlgItemMessage(hWnd, IDC_LEFT_CLICK, CB_ADDSTRING, 0, (LPARAM)TranslateW(szPopupClick[i]));
+ SendDlgItemMessage(hWnd, IDC_RIGHT_CLICK, CB_ADDSTRING, 0, (LPARAM)TranslateW(szPopupClick[i]));
}
for (i = 0; i < cNotifyFor; i++)
- SendDlgItemMessage(hWnd, IDC_NOTIFYFOR, CB_ADDSTRING, 0, (LPARAM)TranslateTS(szNotifyFor[i]));
+ SendDlgItemMessage(hWnd, IDC_NOTIFYFOR, CB_ADDSTRING, 0, (LPARAM)TranslateW(szNotifyFor[i]));
return i;
}
@@ -406,7 +406,7 @@ INT_PTR CALLBACK DlgProcAddBirthday(HWND hWnd, UINT msg, WPARAM wParam, LPARAM l
Window_SetIcon_IcoLib(hWnd, hAddBirthdayContact);
for (int i = 0; i < cSaveModule; i++)
- SendDlgItemMessage(hWnd, IDC_COMPATIBILITY, CB_ADDSTRING, 0, (LPARAM)TranslateTS(szSaveModule[i]));
+ SendDlgItemMessage(hWnd, IDC_COMPATIBILITY, CB_ADDSTRING, 0, (LPARAM)TranslateW(szSaveModule[i]));
SendDlgItemMessage(hWnd, IDC_COMPATIBILITY, CB_SETCURSEL, commonData.cDefaultModule, 0);
break;
diff --git a/plugins/WhenWasIt/src/hooked_events.cpp b/plugins/WhenWasIt/src/hooked_events.cpp
index d263f72196..f2e6619413 100644
--- a/plugins/WhenWasIt/src/hooked_events.cpp
+++ b/plugins/WhenWasIt/src/hooked_events.cpp
@@ -49,7 +49,7 @@ static int OnOptionsInitialise(WPARAM wParam, LPARAM)
odp.pwszTitle = LPGENW("Birthdays");
odp.pwszGroup = LPGENW("Contacts");
odp.groupPosition = 910000000;
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
odp.pfnDlgProc = DlgProcOptions;
Options_AddPage(wParam, &odp);
return 0;
diff --git a/plugins/WhenWasIt/src/icons.cpp b/plugins/WhenWasIt/src/icons.cpp
index 5526639a3e..dbe48f467b 100644
--- a/plugins/WhenWasIt/src/icons.cpp
+++ b/plugins/WhenWasIt/src/icons.cpp
@@ -32,7 +32,7 @@ HANDLE hWWIExtraIcons = (HANDLE)-1;
static HANDLE AddIcon(char *name, char *description, wchar_t *tszPath, int iDefaultIdx)
{
SKINICONDESC sid = { 0 };
- sid.flags = SIDF_PATH_TCHAR;
+ sid.flags = SIDF_PATH_UNICODE;
sid.section.a = LPGEN("WhenWasIt");
sid.description.a = description;
sid.pszName = name;
diff --git a/plugins/WhenWasIt/src/services.cpp b/plugins/WhenWasIt/src/services.cpp
index 7ac4d016a5..90585fe508 100644
--- a/plugins/WhenWasIt/src/services.cpp
+++ b/plugins/WhenWasIt/src/services.cpp
@@ -299,7 +299,7 @@ int DoImport(wchar_t *fileName)
SaveBirthday(hContact, year, month, day, mode);
}
else {
- CMString msg(FORMAT, TranslateT("Could not find UID '%s [%S]' in current database, skipping"), szHandle, szProto);
+ CMStringW msg(FORMAT, TranslateT("Could not find UID '%s [%S]' in current database, skipping"), szHandle, szProto);
ShowPopupMessage(TranslateT("Warning"), msg, hImportBirthdays);
}
}
diff --git a/plugins/WhoUsesMyFiles/src/wumfplug.cpp b/plugins/WhoUsesMyFiles/src/wumfplug.cpp
index fc2ff253db..acf8f278b7 100644
--- a/plugins/WhoUsesMyFiles/src/wumfplug.cpp
+++ b/plugins/WhoUsesMyFiles/src/wumfplug.cpp
@@ -24,9 +24,9 @@ static PLUGININFOEX pluginInfo =
void LoadOptions()
{
DBVARIANT dbv = { 0 };
- dbv.type = DBVT_TCHAR;
+ dbv.type = DBVT_WCHAR;
memset(&WumfOptions, 0, sizeof(WumfOptions));
- if (db_get_ts(NULL, MODULENAME, OPT_FILE, &dbv) == 0)
+ if (db_get_ws(NULL, MODULENAME, OPT_FILE, &dbv) == 0)
{
wcsncpy(WumfOptions.LogFile, dbv.ptszVal, 255);
db_free(&dbv);
@@ -447,7 +447,7 @@ INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg,UINT msg,WPARAM wparam,LPARAM lpara
db_set_b(NULL, MODULENAME, LOG_COMP, (BYTE)WumfOptions.LogComp);
db_set_b(NULL, MODULENAME, ALERT_COMP, (BYTE)WumfOptions.AlertComp);
GetDlgItemText(hwndDlg, IDC_FILE, WumfOptions.LogFile, _countof(WumfOptions.LogFile));
- db_set_ts(NULL, MODULENAME, OPT_FILE, WumfOptions.LogFile);
+ db_set_ws(NULL, MODULENAME, OPT_FILE, WumfOptions.LogFile);
}
}
break;
diff --git a/plugins/WinterSpeak/src/ConfigDatabase.cpp b/plugins/WinterSpeak/src/ConfigDatabase.cpp
index ed7ff2db52..a67506ad8e 100644
--- a/plugins/WinterSpeak/src/ConfigDatabase.cpp
+++ b/plugins/WinterSpeak/src/ConfigDatabase.cpp
@@ -105,15 +105,15 @@ void ConfigDatabase::load()
//------------------------------------------------------------------------------
void ConfigDatabase::save()
{
- db_set_ts(NULL, SPEAK, ENGINE, m_voice_desc.engine.c_str());
- db_set_ts(NULL, SPEAK, VOICE, m_voice_desc.voice.c_str());
+ db_set_ws(NULL, SPEAK, ENGINE, m_voice_desc.engine.c_str());
+ db_set_ws(NULL, SPEAK, VOICE, m_voice_desc.voice.c_str());
db_set_dw(NULL, SPEAK, VOLUME, m_voice_desc.volume);
db_set_dw(NULL, SPEAK, PITCH, m_voice_desc.pitch);
db_set_dw(NULL, SPEAK, RATE, m_voice_desc.rate);
db_set_dw(NULL, SPEAK, ACTIVE_FLAGS, m_active_flags);
- db_set_ts(NULL, SPEAK, WELCOME_MSG, m_welcome_msg.c_str());
+ db_set_ws(NULL, SPEAK, WELCOME_MSG, m_welcome_msg.c_str());
for (ActiveUsersMap::iterator i = m_active_users.begin(); i != m_active_users.end(); ++i)
{
@@ -133,7 +133,7 @@ std::wstring ConfigDatabase::DBGetContactSettingString(const char *szModule, con
std::wstring ret = def;
DBVARIANT dbv;
- if (!db_get_ts(NULL, szModule, szSetting, &dbv))
+ if (!db_get_ws(NULL, szModule, szSetting, &dbv))
{
ret = dbv.pwszVal;
}
diff --git a/plugins/WinterSpeak/src/main.cpp b/plugins/WinterSpeak/src/main.cpp
index d01560d6f4..d19d290d42 100644
--- a/plugins/WinterSpeak/src/main.cpp
+++ b/plugins/WinterSpeak/src/main.cpp
@@ -72,7 +72,7 @@ int dialogOptionsInitialise(WPARAM wParam, LPARAM)
OPTIONSDIALOGPAGE odp = { 0 };
odp.hInstance = g_hInst;
odp.pwszGroup = LPGENW("Speak");
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
if (g_speak_config)
{
diff --git a/plugins/XSoundNotify/src/dialog.cpp b/plugins/XSoundNotify/src/dialog.cpp
index ca68cabc9f..7529110f34 100644
--- a/plugins/XSoundNotify/src/dialog.cpp
+++ b/plugins/XSoundNotify/src/dialog.cpp
@@ -52,7 +52,7 @@ static INT_PTR CALLBACK DlgProcContactsOptions(HWND hwndDlg, UINT msg, WPARAM wP
}
EnableWindow(GetDlgItem(hwndDlg, IDC_CONT_BUTTON_CHOOSE_SOUND), TRUE);
DBVARIANT dbv = { 0 };
- if (!db_get_ts(hContact, SETTINGSNAME, SETTINGSKEY, &dbv)) {
+ if (!db_get_ws(hContact, SETTINGSNAME, SETTINGSKEY, &dbv)) {
EnableWindow(GetDlgItem(hwndDlg, IDC_CONT_BUTTON_TEST_PLAY), TRUE);
EnableWindow(GetDlgItem(hwndDlg, IDC_CONT_BUTTON_RESET_SOUND), TRUE);
SetDlgItemText(hwndDlg, IDC_CONT_LABEL_SOUND, PathFindFileName(dbv.ptszVal));
@@ -67,7 +67,7 @@ static INT_PTR CALLBACK DlgProcContactsOptions(HWND hwndDlg, UINT msg, WPARAM wP
CheckDlgButton(hwndDlg, IDC_CONT_IGNORE_SOUND, db_get_b(hContact, SETTINGSNAME, SETTINGSIGNOREKEY, 0) ? BST_CHECKED : BST_UNCHECKED);
p = XSN_Users.find((XSN_Data *)&hContact);
if (p == NULL) {
- ptrW name(db_get_tsa(hContact, SETTINGSNAME, SETTINGSKEY));
+ ptrW name(db_get_wsa(hContact, SETTINGSNAME, SETTINGSKEY));
if (name != NULL)
XSN_Users.insert(new XSN_Data(hContact, name, IsDlgButtonChecked(hwndDlg, IDC_CONT_IGNORE_SOUND) ? 1 : 0));
}
@@ -82,7 +82,7 @@ static INT_PTR CALLBACK DlgProcContactsOptions(HWND hwndDlg, UINT msg, WPARAM wP
if (mir_wstrcmpi(p->path, L"")) {
wchar_t shortpath[MAX_PATH];
PathToRelativeT(p->path, shortpath);
- db_set_ts(hContact, SETTINGSNAME, SETTINGSKEY, shortpath);
+ db_set_ws(hContact, SETTINGSNAME, SETTINGSKEY, shortpath);
}
db_set_b(hContact, SETTINGSNAME, SETTINGSIGNOREKEY, p->ignore);
}
@@ -134,16 +134,16 @@ static INT_PTR CALLBACK DlgProcContactsOptions(HWND hwndDlg, UINT msg, WPARAM wP
isIgnoreSound = 0;
if (p == NULL) {
DBVARIANT dbv;
- if (!db_get_ts(hContact, SETTINGSNAME, SETTINGSKEY, &dbv)) {
+ if (!db_get_ws(hContact, SETTINGSNAME, SETTINGSKEY, &dbv)) {
wchar_t longpath[MAX_PATH] = { 0 };
- PathToAbsoluteT(dbv.ptszVal, longpath);
+ PathToAbsoluteW(dbv.ptszVal, longpath);
SkinPlaySoundFile(longpath);
db_free(&dbv);
}
}
else {
wchar_t longpath[MAX_PATH] = { 0 };
- PathToAbsoluteT(p->path, longpath);
+ PathToAbsoluteW(p->path, longpath);
SkinPlaySoundFile(longpath);
}
break;
@@ -167,9 +167,9 @@ static INT_PTR CALLBACK DlgProcContactsOptions(HWND hwndDlg, UINT msg, WPARAM wP
p = XSN_Users.find((XSN_Data *)&hContact);
if (p == NULL) {
DBVARIANT dbv;
- if (!db_get_ts(hContact, SETTINGSNAME, SETTINGSKEY, &dbv)) {
+ if (!db_get_ws(hContact, SETTINGSNAME, SETTINGSKEY, &dbv)) {
wchar_t longpath[MAX_PATH];
- PathToAbsoluteT(dbv.ptszVal, longpath);
+ PathToAbsoluteW(dbv.ptszVal, longpath);
XSN_Users.insert(new XSN_Data(hContact, longpath, IsDlgButtonChecked(hwndDlg, IDC_CONT_IGNORE_SOUND) ? 1 : 0));
db_free(&dbv);
}
diff --git a/plugins/XSoundNotify/src/options.cpp b/plugins/XSoundNotify/src/options.cpp
index 61a846a53e..1fab9fedf2 100644
--- a/plugins/XSoundNotify/src/options.cpp
+++ b/plugins/XSoundNotify/src/options.cpp
@@ -96,7 +96,7 @@ static INT_PTR CALLBACK OptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
MCONTACT hContact = (MCONTACT)SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_USERS, CB_GETITEMDATA, cursel, 0);
EnableWindow(GetDlgItem(hwndDlg, IDC_OPT_BUTTON_CHOOSE_SOUND), TRUE);
DBVARIANT dbv = { 0 };
- if (!db_get_ts(hContact, SETTINGSNAME, SETTINGSKEY, &dbv))
+ if (!db_get_ws(hContact, SETTINGSNAME, SETTINGSKEY, &dbv))
{
EnableWindow(GetDlgItem(hwndDlg, IDC_OPT_BUTTON_TEST_PLAY), TRUE);
EnableWindow(GetDlgItem(hwndDlg, IDC_OPT_BUTTON_RESET_SOUND), TRUE);
@@ -163,16 +163,16 @@ static INT_PTR CALLBACK OptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
isIgnoreSound = 0;
if (p == NULL) {
DBVARIANT dbv;
- if (!db_get_ts(hContact, SETTINGSNAME, SETTINGSKEY, &dbv)) {
+ if (!db_get_ws(hContact, SETTINGSNAME, SETTINGSKEY, &dbv)) {
wchar_t longpath[MAX_PATH];
- PathToAbsoluteT(dbv.ptszVal, longpath);
+ PathToAbsoluteW(dbv.ptszVal, longpath);
SkinPlaySoundFile(longpath);
db_free(&dbv);
}
}
else {
wchar_t longpath[MAX_PATH] = { 0 };
- PathToAbsoluteT(p->path, longpath);
+ PathToAbsoluteW(p->path, longpath);
SkinPlaySoundFile(longpath);
}
}
@@ -204,9 +204,9 @@ static INT_PTR CALLBACK OptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
XSN_Data *p = XSN_Users.find((XSN_Data *)&hContact);
if (p == NULL) {
DBVARIANT dbv;
- if (!db_get_ts(hContact, SETTINGSNAME, SETTINGSKEY, &dbv)) {
+ if (!db_get_ws(hContact, SETTINGSNAME, SETTINGSKEY, &dbv)) {
wchar_t longpath[MAX_PATH];
- PathToAbsoluteT(dbv.ptszVal, longpath);
+ PathToAbsoluteW(dbv.ptszVal, longpath);
XSN_Users.insert(new XSN_Data(hContact, longpath, IsDlgButtonChecked(hwndDlg, IDC_OPT_IGNORE_SOUND) ? 1 : 0));
db_free(&dbv);
}
@@ -227,7 +227,7 @@ static INT_PTR CALLBACK OptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
if (mir_wstrcmpi(XSN_Users[i]->path, L"")) {
wchar_t shortpath[MAX_PATH];
PathToRelativeT(XSN_Users[i]->path, shortpath);
- db_set_ts(XSN_Users[i]->hContact, SETTINGSNAME, SETTINGSKEY, shortpath);
+ db_set_ws(XSN_Users[i]->hContact, SETTINGSNAME, SETTINGSKEY, shortpath);
}
db_set_b(XSN_Users[i]->hContact, SETTINGSNAME, SETTINGSIGNOREKEY, XSN_Users[i]->ignore);
}
@@ -242,7 +242,7 @@ INT OptInit(WPARAM wParam, LPARAM)
OPTIONSDIALOGPAGE odp = { 0 };
odp.position = 100000000;
odp.hInstance = hInst;
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS);
odp.pwszGroup = LPGENW("Sounds");
odp.pwszTitle = LPGENW("XSound Notify");
diff --git a/plugins/XSoundNotify/src/xsn_main.cpp b/plugins/XSoundNotify/src/xsn_main.cpp
index 02ea729792..af0d731e50 100644
--- a/plugins/XSoundNotify/src/xsn_main.cpp
+++ b/plugins/XSoundNotify/src/xsn_main.cpp
@@ -78,7 +78,7 @@ void InitSelfSounds()
wchar_t infobuf[256];
mir_snwprintf(infobuf, L"%s [%s]", TranslateT("Self status"), protos[i]->tszAccountName);
- SkinAddNewSoundExT(namebuf, infobuf, pcli->pfnGetStatusModeDescription(selfSounds[j].iStatus, 0));
+ SkinAddNewSoundExW(namebuf, infobuf, pcli->pfnGetStatusModeDescription(selfSounds[j].iStatus, 0));
}
}
}
@@ -117,9 +117,9 @@ static int ProcessEvent(WPARAM hContact, LPARAM lParam)
isIgnoreSound = db_get_b(hContact, SETTINGSNAME, SETTINGSIGNOREKEY, 0);
DBVARIANT dbv;
- if (!isIgnoreSound && !db_get_ts(hContact, SETTINGSNAME, SETTINGSKEY, &dbv)) {
+ if (!isIgnoreSound && !db_get_ws(hContact, SETTINGSNAME, SETTINGSKEY, &dbv)) {
wchar_t PlaySoundPath[MAX_PATH] = { 0 };
- PathToAbsoluteT(dbv.ptszVal, PlaySoundPath);
+ PathToAbsoluteW(dbv.ptszVal, PlaySoundPath);
isOwnSound = 0;
SkinPlaySoundFile(PlaySoundPath);
db_free(&dbv);
@@ -141,15 +141,15 @@ static int ProcessChatEvent(WPARAM, LPARAM lParam)
MCONTACT hContact = pci->FindRoom(gcd->pszModule, gcd->ptszID);
if (hContact != 0) {
- ptrW nick(db_get_tsa(hContact, gcd->pszModule, "MyNick"));
+ ptrW nick(db_get_wsa(hContact, gcd->pszModule, "MyNick"));
if (nick == NULL || gce->ptszText == NULL)
return 0;
if (wcsstr(gce->ptszText, nick)) {
isIgnoreSound = db_get_b(hContact, SETTINGSNAME, SETTINGSIGNOREKEY, 0);
DBVARIANT dbv;
- if (!isIgnoreSound && !db_get_ts(hContact, SETTINGSNAME, SETTINGSKEY, &dbv)) {
+ if (!isIgnoreSound && !db_get_ws(hContact, SETTINGSNAME, SETTINGSKEY, &dbv)) {
wchar_t PlaySoundPath[MAX_PATH] = { 0 };
- PathToAbsoluteT(dbv.ptszVal, PlaySoundPath);
+ PathToAbsoluteW(dbv.ptszVal, PlaySoundPath);
isOwnSound = 0;
SkinPlaySoundFile(PlaySoundPath);
db_free(&dbv);
@@ -180,7 +180,7 @@ static int OnLoadInit(WPARAM, LPARAM)
CMenuItem mi;
SET_UID(mi, 0x5d72ca1f, 0xc52, 0x436d, 0x81, 0x47, 0x29, 0xf6, 0xc3, 0x28, 0xb5, 0xd1);
mi.position = -0x7FFFFFFF;
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
mi.hIcolibItem = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
mi.name.w = LPGENW("Custom contact sound");
mi.pszService = "XSoundNotify/ContactMenuCommand";
diff --git a/plugins/YAMN/src/browser/mailbrowser.cpp b/plugins/YAMN/src/browser/mailbrowser.cpp
index 2dae05544b..606622e27f 100644
--- a/plugins/YAMN/src/browser/mailbrowser.cpp
+++ b/plugins/YAMN/src/browser/mailbrowser.cpp
@@ -647,10 +647,10 @@ void DoMailActions(HWND hDlg, HACCOUNT ActualAccount, struct CMailNumbers *MN, D
evt.ptszTooltip = tszMsg;
pcli->pfnAddEvent(&evt);
}
- db_set_ts(ActualAccount->hContact, "CList", "StatusMsg", tszMsg);
+ db_set_ws(ActualAccount->hContact, "CList", "StatusMsg", tszMsg);
if (nflags & YAMN_ACC_CONTNICK)
- db_set_ts(ActualAccount->hContact, YAMN_DBMODULE, "Nick", tszMsg);
+ db_set_ws(ActualAccount->hContact, YAMN_DBMODULE, "Nick", tszMsg);
}
if ((nflags & YAMN_ACC_POP) &&
diff --git a/plugins/YAMN/src/main.cpp b/plugins/YAMN/src/main.cpp
index 73e21c95af..aca078ca62 100644
--- a/plugins/YAMN/src/main.cpp
+++ b/plugins/YAMN/src/main.cpp
@@ -62,10 +62,10 @@ static void GetProfileDirectory(wchar_t *szPath, int cbPath)
//This is copied from Miranda's sources. In 0.2.1.0 it is needed, in newer vesions of Miranda use MS_DB_GETPROFILEPATH service
{
wchar_t tszOldPath[MAX_PATH];
- CallService(MS_DB_GETPROFILEPATHT, _countof(tszOldPath), (LPARAM)tszOldPath);
+ CallService(MS_DB_GETPROFILEPATHW, _countof(tszOldPath), (LPARAM)tszOldPath);
mir_wstrcat(tszOldPath, L"\\*.book");
- VARST ptszNewPath( L"%miranda_userdata%");
+ VARSW ptszNewPath( L"%miranda_userdata%");
SHFILEOPSTRUCT file_op = {
NULL,
@@ -265,10 +265,10 @@ extern "C" int __declspec(dllexport) Load(void)
YAMN_STATUS = ID_STATUS_OFFLINE;
// we get the Miranda Root Path
- PathToAbsoluteT( L".", szMirandaDir);
+ PathToAbsoluteW( L".", szMirandaDir);
// retrieve the current profile name
- CallService(MS_DB_GETPROFILENAMET, (WPARAM)_countof(ProfileName), (LPARAM)ProfileName); //not to pass entire array to fcn
+ CallService(MS_DB_GETPROFILENAMEW, (WPARAM)_countof(ProfileName), (LPARAM)ProfileName); //not to pass entire array to fcn
wchar_t *fc = wcsrchr(ProfileName, '.');
if ( fc != NULL ) *fc = 0;
diff --git a/plugins/YAMN/src/proto/pop3/pop3comm.cpp b/plugins/YAMN/src/proto/pop3/pop3comm.cpp
index 9b2d0da53e..edf298d3e6 100644
--- a/plugins/YAMN/src/proto/pop3/pop3comm.cpp
+++ b/plugins/YAMN/src/proto/pop3/pop3comm.cpp
@@ -1544,12 +1544,12 @@ wchar_t* WINAPI GetErrorString(DWORD Code)
mir_snwprintf(ErrorString, ERRORSTR_MAXLEN, TranslateT("Error %d-%d-%d-%d:"), ErrorCode->AppError, ErrorCode->POP3Error, ErrorCode->NetError, ErrorCode->SystemError);
if (ErrorCode->POP3Error)
- mir_snwprintf(ErrorString, ERRORSTR_MAXLEN, L"%s\n%s", ErrorString, TranslateTS(POP3Errors[ErrorCode->POP3Error - 1]));
+ mir_snwprintf(ErrorString, ERRORSTR_MAXLEN, L"%s\n%s", ErrorString, TranslateW(POP3Errors[ErrorCode->POP3Error - 1]));
if (ErrorCode->NetError) {
if (ErrorCode->SSL)
- mir_snwprintf(ErrorString, ERRORSTR_MAXLEN, L"%s\n%s", ErrorString, TranslateTS(SSLErrors[ErrorCode->NetError - 1]));
+ mir_snwprintf(ErrorString, ERRORSTR_MAXLEN, L"%s\n%s", ErrorString, TranslateW(SSLErrors[ErrorCode->NetError - 1]));
else
- mir_snwprintf(ErrorString, ERRORSTR_MAXLEN, L"%s\n%s", ErrorString, TranslateTS(NetlibErrors[ErrorCode->NetError - 4]));
+ mir_snwprintf(ErrorString, ERRORSTR_MAXLEN, L"%s\n%s", ErrorString, TranslateW(NetlibErrors[ErrorCode->NetError - 4]));
}
return ErrorString;
diff --git a/plugins/YAPP/src/yapp.cpp b/plugins/YAPP/src/yapp.cpp
index 79f787dbc7..20e7d3d5c9 100644
--- a/plugins/YAPP/src/yapp.cpp
+++ b/plugins/YAPP/src/yapp.cpp
@@ -11,8 +11,8 @@ MNOTIFYLINK *notifyLink = 0;
// used to work around a bug in neweventnotify and others with the address passed in the GetPluginData function
bool ignore_gpd_passed_addy = false;
-FontIDT font_id_firstline = {0}, font_id_secondline = {0}, font_id_time = {0};
-ColourIDT colour_id_bg = {0}, colour_id_border = {0}, colour_id_sidebar = {0}, colour_id_titleunderline = {0};
+FontIDW font_id_firstline = {0}, font_id_secondline = {0}, font_id_time = {0};
+ColourIDW colour_id_bg = {0}, colour_id_border = {0}, colour_id_sidebar = {0}, colour_id_titleunderline = {0};
COLORREF colBg = GetSysColor(COLOR_3DSHADOW);
HFONT hFontFirstLine = 0, hFontSecondLine = 0, hFontTime = 0;
@@ -57,19 +57,19 @@ int ReloadFont(WPARAM, LPARAM)
{
LOGFONT log_font;
if (hFontFirstLine) DeleteObject(hFontFirstLine);
- colFirstLine = CallService(MS_FONT_GETT, (WPARAM)&font_id_firstline, (LPARAM)&log_font);
+ colFirstLine = CallService(MS_FONT_GETW, (WPARAM)&font_id_firstline, (LPARAM)&log_font);
hFontFirstLine = CreateFontIndirect(&log_font);
if (hFontSecondLine) DeleteObject(hFontSecondLine);
- colSecondLine = CallService(MS_FONT_GETT, (WPARAM)&font_id_secondline, (LPARAM)&log_font);
+ colSecondLine = CallService(MS_FONT_GETW, (WPARAM)&font_id_secondline, (LPARAM)&log_font);
hFontSecondLine = CreateFontIndirect(&log_font);
if (hFontTime) DeleteObject(hFontTime);
- colTime = CallService(MS_FONT_GETT, (WPARAM)&font_id_time, (LPARAM)&log_font);
+ colTime = CallService(MS_FONT_GETW, (WPARAM)&font_id_time, (LPARAM)&log_font);
hFontTime = CreateFontIndirect(&log_font);
- colBg = CallService(MS_COLOUR_GETT, (WPARAM)&colour_id_bg, 0);
- colBorder = CallService(MS_COLOUR_GETT, (WPARAM)&colour_id_border, 0);
- colSidebar = CallService(MS_COLOUR_GETT, (WPARAM)&colour_id_sidebar, 0);
- colTitleUnderline = CallService(MS_COLOUR_GETT, (WPARAM)&colour_id_titleunderline, 0);
+ colBg = CallService(MS_COLOUR_GETW, (WPARAM)&colour_id_bg, 0);
+ colBorder = CallService(MS_COLOUR_GETW, (WPARAM)&colour_id_border, 0);
+ colSidebar = CallService(MS_COLOUR_GETW, (WPARAM)&colour_id_sidebar, 0);
+ colTitleUnderline = CallService(MS_COLOUR_GETW, (WPARAM)&colour_id_titleunderline, 0);
return 0;
}
@@ -92,7 +92,7 @@ int TTBLoaded(WPARAM, LPARAM)
static void InitFonts()
{
- font_id_firstline.cbSize = sizeof(FontIDT);
+ font_id_firstline.cbSize = sizeof(FontIDW);
font_id_firstline.flags = FIDF_ALLOWEFFECTS;
mir_wstrcpy(font_id_firstline.group, LPGENW("Popups"));
mir_wstrcpy(font_id_firstline.name, LPGENW("First line"));
@@ -101,9 +101,9 @@ static void InitFonts()
mir_wstrcpy(font_id_firstline.backgroundGroup, L"Popups");
mir_wstrcpy(font_id_firstline.backgroundName, L"Background");
font_id_firstline.order = 0;
- FontRegisterT(&font_id_firstline);
+ FontRegisterW(&font_id_firstline);
- font_id_secondline.cbSize = sizeof(FontIDT);
+ font_id_secondline.cbSize = sizeof(FontIDW);
font_id_secondline.flags = FIDF_ALLOWEFFECTS;
mir_wstrcpy(font_id_secondline.group, LPGENW("Popups"));
mir_wstrcpy(font_id_secondline.name, LPGENW("Second line"));
@@ -112,9 +112,9 @@ static void InitFonts()
mir_wstrcpy(font_id_secondline.backgroundGroup, L"Popups");
mir_wstrcpy(font_id_secondline.backgroundName, L"Background");
font_id_secondline.order = 1;
- FontRegisterT(&font_id_secondline);
+ FontRegisterW(&font_id_secondline);
- font_id_time.cbSize = sizeof(FontIDT);
+ font_id_time.cbSize = sizeof(FontIDW);
font_id_time.flags = FIDF_ALLOWEFFECTS;
mir_wstrcpy(font_id_time.group, LPGENW("Popups"));
mir_wstrcpy(font_id_time.name, LPGENW("Time"));
@@ -123,43 +123,43 @@ static void InitFonts()
mir_wstrcpy(font_id_time.backgroundGroup, L"Popups");
mir_wstrcpy(font_id_time.backgroundName, L"Background");
font_id_time.order = 2;
- FontRegisterT(&font_id_time);
+ FontRegisterW(&font_id_time);
- colour_id_bg.cbSize = sizeof(ColourIDT);
+ colour_id_bg.cbSize = sizeof(ColourIDW);
mir_wstrcpy(colour_id_bg.group, LPGENW("Popups"));
mir_wstrcpy(colour_id_bg.name, LPGENW("Background"));
mir_strcpy(colour_id_bg.dbSettingsGroup, MODULE);
mir_strcpy(colour_id_bg.setting, "ColourBg");
colour_id_bg.defcolour = GetSysColor(COLOR_3DSHADOW);
colour_id_bg.order = 0;
- ColourRegisterT(&colour_id_bg);
+ ColourRegisterW(&colour_id_bg);
- colour_id_border.cbSize = sizeof(ColourIDT);
+ colour_id_border.cbSize = sizeof(ColourIDW);
mir_wstrcpy(colour_id_border.group, LPGENW("Popups"));
mir_wstrcpy(colour_id_border.name, LPGENW("Border"));
mir_strcpy(colour_id_border.dbSettingsGroup, MODULE);
mir_strcpy(colour_id_border.setting, "ColourBorder");
colour_id_border.defcolour = RGB(0, 0, 0);
colour_id_border.order = 1;
- ColourRegisterT(&colour_id_border);
+ ColourRegisterW(&colour_id_border);
- colour_id_sidebar.cbSize = sizeof(ColourIDT);
+ colour_id_sidebar.cbSize = sizeof(ColourIDW);
mir_wstrcpy(colour_id_sidebar.group, LPGENW("Popups"));
mir_wstrcpy(colour_id_sidebar.name, LPGENW("Sidebar"));
mir_strcpy(colour_id_sidebar.dbSettingsGroup, MODULE);
mir_strcpy(colour_id_sidebar.setting, "ColourSidebar");
colour_id_sidebar.defcolour = RGB(128, 128, 128);
colour_id_sidebar.order = 2;
- ColourRegisterT(&colour_id_sidebar);
+ ColourRegisterW(&colour_id_sidebar);
- colour_id_titleunderline.cbSize = sizeof(ColourIDT);
+ colour_id_titleunderline.cbSize = sizeof(ColourIDW);
mir_wstrcpy(colour_id_titleunderline.group, LPGENW("Popups"));
mir_wstrcpy(colour_id_titleunderline.name, LPGENW("Title underline"));
mir_strcpy(colour_id_titleunderline.dbSettingsGroup, MODULE);
mir_strcpy(colour_id_titleunderline.setting, "ColourTitleUnderline");
colour_id_titleunderline.defcolour = GetSysColor(COLOR_3DSHADOW);
colour_id_titleunderline.order = 3;
- ColourRegisterT(&colour_id_titleunderline);
+ ColourRegisterW(&colour_id_titleunderline);
ReloadFont(0, 0);
}
@@ -172,7 +172,7 @@ void InitMenuItems(void)
Menu_ConfigureItem(hMenuRoot, MCI_OPT_UID, "043A641A-2767-4C57-AA57-9233D6F9DC54");
CMenuItem mi;
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
mi.root = hMenuRoot;
SET_UID(mi, 0x92c386ae, 0x6e81, 0x452d, 0xb5, 0x71, 0x87, 0x46, 0xe9, 0x2, 0x66, 0xe9);
diff --git a/plugins/YAPP/src/yapp_history_dlg.cpp b/plugins/YAPP/src/yapp_history_dlg.cpp
index c3b7a08e35..cd8d2f7720 100644
--- a/plugins/YAPP/src/yapp_history_dlg.cpp
+++ b/plugins/YAPP/src/yapp_history_dlg.cpp
@@ -566,7 +566,7 @@ void LoadHistoryColumns(HWND hHistoryList)
for (i = 0; i < cHistoryColumns; i++)
{
- col.pszText = TranslateTS(szHistoryColumns[i]);
+ col.pszText = TranslateW(szHistoryColumns[i]);
col.cx = cxHistoryColumns[i];
ListView_InsertColumn(hHistoryList, i, &col);
}
diff --git a/plugins/YARelay/src/main.cpp b/plugins/YARelay/src/main.cpp
index 3e2112eb27..c3d9ae62d6 100644
--- a/plugins/YARelay/src/main.cpp
+++ b/plugins/YARelay/src/main.cpp
@@ -230,7 +230,7 @@ extern "C" int __declspec(dllexport) Load()
iForwardOnStatus = db_get_dw(NULL, "yaRelay", "ForwardOnStatus", STATUS_OFFLINE | STATUS_AWAY | STATUS_NA);
- wchar_t *szForwardTemplate = db_get_tsa(NULL, "yaRelay", "ForwardTemplate");
+ wchar_t *szForwardTemplate = db_get_wsa(NULL, "yaRelay", "ForwardTemplate");
if (szForwardTemplate){
wcsncpy(tszForwardTemplate, szForwardTemplate, _countof(tszForwardTemplate));
mir_free(szForwardTemplate);
diff --git a/plugins/YARelay/src/options.cpp b/plugins/YARelay/src/options.cpp
index 66a00bbe04..a0222e0bef 100644
--- a/plugins/YARelay/src/options.cpp
+++ b/plugins/YARelay/src/options.cpp
@@ -172,7 +172,7 @@ static INT_PTR CALLBACK OptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wParam,
db_set_dw(NULL, "yaRelay", "ForwardFrom", (DWORD)hForwardFrom);
db_set_dw(NULL, "yaRelay", "ForwardTo", (DWORD)hForwardTo);
db_set_dw(NULL, "yaRelay", "ForwardOnStatus", iForwardOnStatus);
- db_set_ts(NULL, "yaRelay", "ForwardTemplate", tszForwardTemplate);
+ db_set_ws(NULL, "yaRelay", "ForwardTemplate", tszForwardTemplate);
db_set_dw(NULL, "yaRelay", "Split", iSplit);
db_set_dw(NULL, "yaRelay", "SplitMaxSize", iSplitMaxSize);
db_set_dw(NULL, "yaRelay", "SendParts", iSendParts);
diff --git a/plugins/YahooGroups/src/hooked_events.cpp b/plugins/YahooGroups/src/hooked_events.cpp
index 774537e696..722075e1f6 100644
--- a/plugins/YahooGroups/src/hooked_events.cpp
+++ b/plugins/YahooGroups/src/hooked_events.cpp
@@ -58,7 +58,7 @@ int OnOptionsInitialise(WPARAM wParam, LPARAM)
odp.pwszTitle = LPGENW("Yahoo Groups");
odp.pwszGroup = LPGENW("Plugins");
odp.groupPosition = 810000000;
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
odp.pfnDlgProc = DlgProcOptions;
Options_AddPage(wParam, &odp);
return 0;
diff --git a/plugins/ZeroNotification/src/main.cpp b/plugins/ZeroNotification/src/main.cpp
index c2e11e5c54..4f0f58d421 100644
--- a/plugins/ZeroNotification/src/main.cpp
+++ b/plugins/ZeroNotification/src/main.cpp
@@ -70,7 +70,7 @@ static void FillCheckBoxTree(HWND hwndTree, const struct CheckBoxValues_t *value
tvis.item.mask = TVIF_PARAM | TVIF_TEXT | TVIF_STATE;
for (i = 0; i < nValues; i++) {
tvis.item.lParam = values[i].style;
- tvis.item.pszText = TranslateTS(values[i].szDescr);
+ tvis.item.pszText = TranslateW(values[i].szDescr);
tvis.item.stateMask = TVIS_STATEIMAGEMASK;
tvis.item.state = INDEXTOSTATEIMAGEMASK((style&tvis.item.lParam) != 0 ? 2 : 1);
TreeView_InsertItem(hwndTree, &tvis);
@@ -206,7 +206,7 @@ static int OptionsInitialize(WPARAM wParam, LPARAM)
OPTIONSDIALOGPAGE odp = { 0 };
odp.position = 100000000;
odp.hInstance = hInst;
- odp.flags = ODPF_TCHAR;
+ odp.flags = ODPF_UNICODE;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_NOSOUND);
odp.pwszTitle = LPGENW("Zero Notifications");
odp.pwszGroup = LPGENW("Plugins");
@@ -236,7 +236,7 @@ extern "C" __declspec(dllexport) int Load(void)
CMenuItem mi;
mi.position = -0x7FFFFFFF;
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
UpdateMenuItem();
SET_UID(mi, 0x6bd635eb, 0xc4bb, 0x413b, 0xb9, 0x3, 0x81, 0x6d, 0x8f, 0xf1, 0x9b, 0xb0);
diff --git a/plugins/wbOSD/src/events.cpp b/plugins/wbOSD/src/events.cpp
index e2207bd059..2aba79e1dd 100644
--- a/plugins/wbOSD/src/events.cpp
+++ b/plugins/wbOSD/src/events.cpp
@@ -20,7 +20,7 @@ void showmsgwnd(unsigned int param)
{
logmsg("showmsgwnd");
if (db_get_b(NULL,THIS_MODULE, "showMessageWindow", DEFAULT_SHOWMSGWIN))
- CallService(MS_MSG_SENDMESSAGET, (WPARAM)param, 0);
+ CallService(MS_MSG_SENDMESSAGEW, (WPARAM)param, 0);
}
LRESULT ShowOSD(wchar_t *str, int timeout, COLORREF color, MCONTACT user)
@@ -154,7 +154,7 @@ int HookedNewEvent(WPARAM wParam, LPARAM hDBEvent)
wcsncpy(buf, DEFAULT_MESSAGEFORMAT,_countof(buf));
DBVARIANT dbv;
- if(!db_get_ts(NULL,THIS_MODULE,"message_format",&dbv)) {
+ if(!db_get_ws(NULL,THIS_MODULE,"message_format",&dbv)) {
mir_wstrcpy(buf, dbv.ptszVal);
db_free(&dbv);
}
@@ -185,12 +185,12 @@ int HookedNewEvent(WPARAM wParam, LPARAM hDBEvent)
if ( i1 == 1 )
c1 = mir_wstrdup(pcli->pfnGetContactDisplayName(wParam, 0));
else if ( i1 == 2 )
- c1 = DbGetEventTextT( &dbe, 0 );
+ c1 = DbGetEventTextW( &dbe, 0 );
if ( i2 == 1 )
c2 = mir_wstrdup(pcli->pfnGetContactDisplayName(wParam, 0));
else if ( i2 == 2 )
- c2 = DbGetEventTextT( &dbe, 0 );
+ c2 = DbGetEventTextW( &dbe, 0 );
wchar_t buffer[512];
mir_snwprintf(buffer, buf, c1, c2);
diff --git a/plugins/wbOSD/src/options.cpp b/plugins/wbOSD/src/options.cpp
index 3749330a0f..f0d278b074 100644
--- a/plugins/wbOSD/src/options.cpp
+++ b/plugins/wbOSD/src/options.cpp
@@ -127,7 +127,7 @@ void loadDBSettings(plgsettings *ps)
ps->showWhen = db_get_dw(NULL, THIS_MODULE, "showWhen", DEFAULT_SHOWWHEN);
DBVARIANT dbv;
- if (!db_get_ts(NULL, THIS_MODULE, "message_format", &dbv)) {
+ if (!db_get_ws(NULL, THIS_MODULE, "message_format", &dbv)) {
mir_wstrcpy(ps->msgformat, dbv.ptszVal);
db_free(&dbv);
}
@@ -149,7 +149,7 @@ void loadDBSettings(plgsettings *ps)
ps->lf.lfQuality = db_get_b(NULL, THIS_MODULE, "fntQuality", DEFAULT_FNT_QUALITY);
ps->lf.lfPitchAndFamily = db_get_b(NULL, THIS_MODULE, "fntPitchAndFamily", DEFAULT_FNT_PITCHANDFAM);
- if (!db_get_ts(NULL, THIS_MODULE, "fntFaceName", &dbv)) {
+ if (!db_get_ws(NULL, THIS_MODULE, "fntFaceName", &dbv)) {
mir_wstrcpy(ps->lf.lfFaceName, dbv.ptszVal);
db_free(&dbv);
}
@@ -176,7 +176,7 @@ void saveDBSettings(plgsettings *ps)
db_set_b(NULL, THIS_MODULE, "transparent", ps->transparent);
db_set_b(NULL, THIS_MODULE, "messages", ps->messages);
db_set_b(NULL, THIS_MODULE, "a_user", ps->a_user);
- db_set_ts(NULL, THIS_MODULE, "message_format", ps->msgformat);
+ db_set_ws(NULL, THIS_MODULE, "message_format", ps->msgformat);
db_set_b(NULL, THIS_MODULE, "align", ps->align);
db_set_b(NULL, THIS_MODULE, "salign", ps->salign);
@@ -201,7 +201,7 @@ void saveDBSettings(plgsettings *ps)
db_set_b(NULL, THIS_MODULE, "fntClipPrecision", ps->lf.lfClipPrecision);
db_set_b(NULL, THIS_MODULE, "fntQuality", ps->lf.lfQuality);
db_set_b(NULL, THIS_MODULE, "fntPitchAndFamily", ps->lf.lfPitchAndFamily);
- db_set_ts(NULL, THIS_MODULE, "fntFaceName", ps->lf.lfFaceName);
+ db_set_ws(NULL, THIS_MODULE, "fntFaceName", ps->lf.lfFaceName);
db_set_dw(NULL, THIS_MODULE, "announce", ps->announce);
@@ -417,7 +417,7 @@ int OptionsInit(WPARAM wparam, LPARAM)
odp.pwszGroup = LPGENW("Plugins");
odp.pwszTitle = LPGENW("OSD");
odp.pfnDlgProc = OptDlgProc;
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
Options_AddPage(wparam, &odp);
return 0;
}