summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/AVS/avs.vcxproj1
-rw-r--r--plugins/AVS/avs.vcxproj.filters3
-rw-r--r--plugins/AVS/src/acc.cpp2
-rw-r--r--plugins/AVS/src/cache.cpp2
-rw-r--r--plugins/AVS/src/contact_ava.cpp2
-rw-r--r--plugins/AVS/src/main.cpp4
-rw-r--r--plugins/AVS/src/options.cpp2
-rw-r--r--plugins/AVS/src/poll.cpp2
-rw-r--r--plugins/AVS/src/poll.h2
-rw-r--r--plugins/AVS/src/services.cpp2
-rw-r--r--plugins/AVS/src/stdafx.cxx2
-rw-r--r--plugins/AVS/src/stdafx.h2
-rw-r--r--plugins/AVS/src/userInfo.cpp2
-rw-r--r--plugins/AVS/src/utils.cpp2
-rw-r--r--plugins/AVS/src/version.h2
-rw-r--r--plugins/AddContactPlus/src/addcontact.cpp2
-rw-r--r--plugins/AddContactPlus/src/main.cpp2
-rw-r--r--plugins/AddContactPlus/src/stdafx.cxx2
-rw-r--r--plugins/AddContactPlus/src/stdafx.h2
-rw-r--r--plugins/AddContactPlus/src/version.h2
-rw-r--r--plugins/Alarms/src/stdafx.cxx2
-rw-r--r--plugins/AsSingleWindow/src/stdafx.cxx2
-rw-r--r--plugins/AsSingleWindow/src/version.h2
-rw-r--r--plugins/AssocMgr/src/stdafx.cxx2
-rw-r--r--plugins/AuthState/src/stdafx.cxx2
-rw-r--r--plugins/AutoRun/src/stdafx.cxx2
-rw-r--r--plugins/AutoShutdown/res/resource.rc2
-rw-r--r--plugins/AutoShutdown/src/options.cpp12
-rw-r--r--plugins/AutoShutdown/src/resource.h1
-rw-r--r--plugins/AutoShutdown/src/stdafx.cxx2
-rw-r--r--plugins/AutoShutdown/src/stdafx.h1
-rw-r--r--plugins/AutoShutdown/src/watcher.cpp15
-rw-r--r--plugins/AvatarHistory/src/AvatarDlg.cpp2
-rw-r--r--plugins/AvatarHistory/src/AvatarHistory.cpp2
-rw-r--r--plugins/AvatarHistory/src/stdafx.cxx2
-rw-r--r--plugins/BASS_interface/src/stdafx.cxx2
-rw-r--r--plugins/BasicHistory/src/BinaryExport.cpp6
-rw-r--r--plugins/BasicHistory/src/DatExport.cpp4
-rw-r--r--plugins/BasicHistory/src/EventList.cpp10
-rw-r--r--plugins/BasicHistory/src/Scheduler.cpp2
-rw-r--r--plugins/BasicHistory/src/stdafx.cxx2
-rw-r--r--plugins/Boltun/src/actionQueue.cpp2
-rw-r--r--plugins/Boltun/src/stdafx.cxx2
-rw-r--r--plugins/BossKeyPlus/src/BossKeyIdle.cpp2
-rw-r--r--plugins/BossKeyPlus/src/stdafx.cxx2
-rw-r--r--plugins/BuddyExpectator/src/BuddyExpectator.cpp2
-rw-r--r--plugins/BuddyExpectator/src/stdafx.cxx2
-rw-r--r--plugins/BuddyPounce/src/main.cpp2
-rw-r--r--plugins/BuddyPounce/src/options.cpp2
-rw-r--r--plugins/BuddyPounce/src/stdafx.cxx2
-rw-r--r--plugins/CSList/src/stdafx.cxx2
-rw-r--r--plugins/CSList/src/version.h2
-rw-r--r--plugins/ChangeKeyboardLayout/src/stdafx.cxx2
-rw-r--r--plugins/ClientChangeNotify/src/OptDlg.cpp2
-rw-r--r--plugins/ClientChangeNotify/src/stdafx.cxx2
-rw-r--r--plugins/Clist_blind/src/clc.cpp2
-rw-r--r--plugins/Clist_blind/src/clc.h2
-rw-r--r--plugins/Clist_blind/src/clcopts.cpp2
-rw-r--r--plugins/Clist_blind/src/clistmenus.cpp2
-rw-r--r--plugins/Clist_blind/src/clistopts.cpp28
-rw-r--r--plugins/Clist_blind/src/cluiopts.cpp50
-rw-r--r--plugins/Clist_blind/src/contact.cpp2
-rw-r--r--plugins/Clist_blind/src/init.cpp10
-rw-r--r--plugins/Clist_blind/src/stdafx.cxx2
-rw-r--r--plugins/Clist_blind/src/stdafx.h4
-rw-r--r--plugins/Clist_blind/src/utils.cpp2
-rw-r--r--plugins/Clist_blind/src/version.h2
-rw-r--r--plugins/Clist_modern/clist_modern.vcxproj1
-rw-r--r--plugins/Clist_modern/clist_modern.vcxproj.filters3
-rw-r--r--plugins/Clist_modern/res/resource.rc2
-rw-r--r--plugins/Clist_modern/src/cluiframes.cpp50
-rw-r--r--plugins/Clist_modern/src/groupmenu.cpp2
-rw-r--r--plugins/Clist_modern/src/init.cpp3
-rw-r--r--plugins/Clist_modern/src/modern_aniavatars.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_awaymsg.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_awaymsg.h2
-rw-r--r--plugins/Clist_modern/src/modern_cache_funcs.h2
-rw-r--r--plugins/Clist_modern/src/modern_cachefuncs.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_clc.cpp32
-rw-r--r--plugins/Clist_modern/src/modern_clc.h14
-rw-r--r--plugins/Clist_modern/src/modern_clcidents.cpp5
-rw-r--r--plugins/Clist_modern/src/modern_clcitems.cpp8
-rw-r--r--plugins/Clist_modern/src/modern_clcmsgs.cpp17
-rw-r--r--plugins/Clist_modern/src/modern_clcopts.cpp179
-rw-r--r--plugins/Clist_modern/src/modern_clcpaint.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_clcutils.cpp6
-rw-r--r--plugins/Clist_modern/src/modern_clist.h2
-rw-r--r--plugins/Clist_modern/src/modern_clistevents.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_clistmenus.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_clistmod.cpp27
-rw-r--r--plugins/Clist_modern/src/modern_clistopts.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_clistsettings.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_clisttray.cpp26
-rw-r--r--plugins/Clist_modern/src/modern_clui.cpp106
-rw-r--r--plugins/Clist_modern/src/modern_clui.h2
-rw-r--r--plugins/Clist_modern/src/modern_cluiservices.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_commonprototypes.h5
-rw-r--r--plugins/Clist_modern/src/modern_contact.cpp8
-rw-r--r--plugins/Clist_modern/src/modern_defsettings.h15
-rw-r--r--plugins/Clist_modern/src/modern_docking.cpp337
-rw-r--r--plugins/Clist_modern/src/modern_global.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_global_structure.h1
-rw-r--r--plugins/Clist_modern/src/modern_image_array.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_image_array.h2
-rw-r--r--plugins/Clist_modern/src/modern_keyboard.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_rowheight_funcs.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_rowheight_funcs.h2
-rw-r--r--plugins/Clist_modern/src/modern_skinbutton.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_skinengine.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_skinopt.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_skinselector.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_skinselector.h2
-rw-r--r--plugins/Clist_modern/src/modern_static_clui.h4
-rw-r--r--plugins/Clist_modern/src/modern_statusbar_options.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_toolbar.cpp6
-rw-r--r--plugins/Clist_modern/src/modern_utils.cpp24
-rw-r--r--plugins/Clist_modern/src/modern_viewmodebar.cpp8
-rw-r--r--plugins/Clist_modern/src/resource.h2
-rw-r--r--plugins/Clist_modern/src/stdafx.h2
-rw-r--r--plugins/Clist_nicer/clist_nicer.vcxproj1
-rw-r--r--plugins/Clist_nicer/clist_nicer.vcxproj.filters3
-rw-r--r--plugins/Clist_nicer/res/resource.rc1
-rw-r--r--plugins/Clist_nicer/src/CLCButton.cpp4
-rw-r--r--plugins/Clist_nicer/src/Docking.cpp294
-rw-r--r--plugins/Clist_nicer/src/alphablend.cpp2
-rw-r--r--plugins/Clist_nicer/src/alphablend.h2
-rw-r--r--plugins/Clist_nicer/src/clc.cpp12
-rw-r--r--plugins/Clist_nicer/src/clc.h16
-rw-r--r--plugins/Clist_nicer/src/clcitems.cpp2
-rw-r--r--plugins/Clist_nicer/src/clcmsgs.cpp2
-rw-r--r--plugins/Clist_nicer/src/clcopts.cpp2
-rw-r--r--plugins/Clist_nicer/src/clcpaint.cpp4
-rw-r--r--plugins/Clist_nicer/src/clcutils.cpp2
-rw-r--r--plugins/Clist_nicer/src/clist.h2
-rw-r--r--plugins/Clist_nicer/src/clistevents.cpp2
-rw-r--r--plugins/Clist_nicer/src/clistmenus.cpp2
-rw-r--r--plugins/Clist_nicer/src/clistmod.cpp6
-rw-r--r--plugins/Clist_nicer/src/clistopts.cpp59
-rw-r--r--plugins/Clist_nicer/src/clistsettings.cpp2
-rw-r--r--plugins/Clist_nicer/src/clisttray.cpp2
-rw-r--r--plugins/Clist_nicer/src/clui.cpp47
-rw-r--r--plugins/Clist_nicer/src/cluiframes.cpp9
-rw-r--r--plugins/Clist_nicer/src/cluiopts.cpp4
-rw-r--r--plugins/Clist_nicer/src/cluiservices.cpp2
-rw-r--r--plugins/Clist_nicer/src/config.cpp2
-rw-r--r--plugins/Clist_nicer/src/config.h2
-rw-r--r--plugins/Clist_nicer/src/contact.cpp14
-rw-r--r--plugins/Clist_nicer/src/extBackg.cpp2
-rw-r--r--plugins/Clist_nicer/src/extBackg.h2
-rw-r--r--plugins/Clist_nicer/src/groupmenu.cpp2
-rw-r--r--plugins/Clist_nicer/src/init.cpp10
-rw-r--r--plugins/Clist_nicer/src/resource.h1
-rw-r--r--plugins/Clist_nicer/src/rowheight_funcs.cpp2
-rw-r--r--plugins/Clist_nicer/src/statusbar.cpp2
-rw-r--r--plugins/Clist_nicer/src/stdafx.cxx2
-rw-r--r--plugins/Clist_nicer/src/stdafx.h2
-rw-r--r--plugins/Clist_nicer/src/viewmodes.cpp4
-rw-r--r--plugins/Clist_nicer/src/wallpaper.cpp2
-rw-r--r--plugins/Cln_skinedit/src/main.cpp2
-rw-r--r--plugins/Cln_skinedit/src/stdafx.cxx2
-rw-r--r--plugins/Cln_skinedit/src/stdafx.h2
-rw-r--r--plugins/CmdLine/src/mimcmd_handlers.cpp4
-rw-r--r--plugins/CmdLine/src/stdafx.cxx2
-rw-r--r--plugins/Console/src/Console.cpp2
-rw-r--r--plugins/Console/src/init.cpp2
-rw-r--r--plugins/Console/src/stdafx.cxx2
-rw-r--r--plugins/Console/src/stdafx.h2
-rw-r--r--plugins/ContactsPlus/src/send.cpp4
-rw-r--r--plugins/ContactsPlus/src/stdafx.cxx2
-rw-r--r--plugins/CountryFlags/src/stdafx.cxx2
-rw-r--r--plugins/CrashDumper/src/dumper.cpp11
-rw-r--r--plugins/CrashDumper/src/stdafx.cxx2
-rw-r--r--plugins/CrashDumper/src/version.h2
-rw-r--r--plugins/CryptoPP/src/stdafx.cpp2
-rw-r--r--plugins/CyrTranslit/src/stdafx.cxx2
-rw-r--r--plugins/Db3x_mmap/src/database.cpp2
-rw-r--r--plugins/Db3x_mmap/src/database.h2
-rw-r--r--plugins/Db3x_mmap/src/dbcache.cpp2
-rw-r--r--plugins/Db3x_mmap/src/dbcontacts.cpp2
-rw-r--r--plugins/Db3x_mmap/src/dbcrypt.cpp2
-rw-r--r--plugins/Db3x_mmap/src/dbevents.cpp8
-rw-r--r--plugins/Db3x_mmap/src/dbheaders.cpp2
-rw-r--r--plugins/Db3x_mmap/src/dbintf.cpp2
-rw-r--r--plugins/Db3x_mmap/src/dbintf.h2
-rw-r--r--plugins/Db3x_mmap/src/dbmodulechain.cpp2
-rw-r--r--plugins/Db3x_mmap/src/dbsettings.cpp2
-rw-r--r--plugins/Db3x_mmap/src/init.cpp2
-rw-r--r--plugins/Db3x_mmap/src/stdafx.cxx2
-rw-r--r--plugins/Db3x_mmap/src/stdafx.h2
-rw-r--r--plugins/Db3x_mmap/src/version.h2
-rw-r--r--plugins/DbChecker/src/worker.cpp2
-rw-r--r--plugins/DbEditorPP/src/stdafx.cxx2
-rw-r--r--plugins/DbEditorPP/src/utils.cpp2
-rw-r--r--plugins/DbEditorPP/src/version.h2
-rw-r--r--plugins/Db_autobackups/src/options.h2
-rw-r--r--plugins/Db_autobackups/src/stdafx.cxx2
-rw-r--r--plugins/Db_autobackups/src/version.h2
-rw-r--r--plugins/Dbx_mdbx/src/dbcheck.cpp2
-rw-r--r--plugins/Dbx_mdbx/src/dbcontacts.cpp2
-rw-r--r--plugins/Dbx_mdbx/src/dbcrypt.cpp2
-rw-r--r--plugins/Dbx_mdbx/src/dbevents.cpp12
-rw-r--r--plugins/Dbx_mdbx/src/dbintf.cpp2
-rw-r--r--plugins/Dbx_mdbx/src/dbintf.h2
-rw-r--r--plugins/Dbx_mdbx/src/dbmodulechain.cpp2
-rw-r--r--plugins/Dbx_mdbx/src/dbsettings.cpp2
-rw-r--r--plugins/Dbx_mdbx/src/dbutils.cpp2
-rw-r--r--plugins/Dbx_mdbx/src/init.cpp2
-rw-r--r--plugins/Dbx_mdbx/src/stdafx.cxx2
-rw-r--r--plugins/Dbx_mdbx/src/stdafx.h2
-rw-r--r--plugins/Dbx_mdbx/src/version.h2
-rw-r--r--plugins/Dbx_sqlite/src/dbcheck.cpp18
-rw-r--r--plugins/Dbx_sqlite/src/dbevents.cpp74
-rw-r--r--plugins/Dbx_sqlite/src/dbintf.cpp7
-rw-r--r--plugins/Dbx_sqlite/src/dbintf.h4
-rw-r--r--plugins/Dbx_sqlite/src/version.h2
-rw-r--r--plugins/Exchange/src/stdafx.cxx2
-rw-r--r--plugins/ExternalAPI/delphi/m_folders.inc127
-rw-r--r--plugins/ExternalAPI/m_assocmgr.h2
-rw-r--r--plugins/ExternalAPI/m_dbeditorpp.h2
-rw-r--r--plugins/ExternalAPI/m_folders.h10
-rw-r--r--plugins/ExternalAPI/m_proto_listeningto.h2
-rw-r--r--plugins/ExternalAPI/m_shutdown.h2
-rw-r--r--plugins/ExternalAPI/m_skin_eng.h2
-rw-r--r--plugins/ExternalAPI/m_userinfoex.h2
-rw-r--r--plugins/ExternalAPI/m_weather.h132
-rw-r--r--plugins/FTPFileYM/src/job_upload.cpp2
-rw-r--r--plugins/FTPFileYM/src/stdafx.cxx2
-rw-r--r--plugins/FavContacts/src/contact_cache.cpp4
-rw-r--r--plugins/FavContacts/src/stdafx.cxx2
-rw-r--r--plugins/FileAsMessage/res/resources.rc2
-rw-r--r--plugins/FileAsMessage/src/dialog.cpp31
-rw-r--r--plugins/FileAsMessage/src/dialog.h28
-rw-r--r--plugins/FileAsMessage/src/main.cpp90
-rw-r--r--plugins/FileAsMessage/src/resource.h2
-rw-r--r--plugins/FileAsMessage/src/stdafx.h18
-rw-r--r--plugins/FileAsMessage/src/version.h2
-rw-r--r--plugins/FingerprintNG/iconpacks/res/Others/Discord.icobin4150 -> 1150 bytes
-rw-r--r--plugins/FingerprintNG/iconpacks/res/Others/Skype.icobin1150 -> 0 bytes
-rw-r--r--plugins/FingerprintNG/iconpacks/res/Others/Teams.icobin0 -> 1150 bytes
-rw-r--r--plugins/FingerprintNG/iconpacks/res/Overlays/overlay_proto_ICQ.icobin1150 -> 0 bytes
-rw-r--r--plugins/FingerprintNG/iconpacks/res/Overlays/overlay_proto_Skype.icobin1150 -> 0 bytes
-rw-r--r--plugins/FingerprintNG/iconpacks/res/Weather/AccuWeather.icobin1150 -> 0 bytes
-rw-r--r--plugins/FingerprintNG/iconpacks/res/Weather/gismeteo.icobin1150 -> 0 bytes
-rw-r--r--plugins/FingerprintNG/iconpacks/res/Weather/intelli.icobin1150 -> 0 bytes
-rw-r--r--plugins/FingerprintNG/iconpacks/res/Weather/meteogid.icobin1150 -> 0 bytes
-rw-r--r--plugins/FingerprintNG/iconpacks/res/Weather/meteonovosti.icobin1150 -> 0 bytes
-rw-r--r--plugins/FingerprintNG/iconpacks/res/Weather/noaa.icobin1150 -> 0 bytes
-rw-r--r--plugins/FingerprintNG/iconpacks/res/Weather/realmeteo.icobin1150 -> 0 bytes
-rw-r--r--plugins/FingerprintNG/iconpacks/res/Weather/underground.icobin1150 -> 0 bytes
-rw-r--r--plugins/FingerprintNG/iconpacks/res/Weather/weather.icobin1150 -> 0 bytes
-rw-r--r--plugins/FingerprintNG/iconpacks/res/Weather/weather_cn.icobin1150 -> 0 bytes
-rw-r--r--plugins/FingerprintNG/iconpacks/res/Weather/weatherxml.icobin1150 -> 0 bytes
-rw-r--r--plugins/FingerprintNG/iconpacks/res/Weather/wetter.icobin1150 -> 0 bytes
-rw-r--r--plugins/FingerprintNG/iconpacks/res/Weather/yweather.icobin1150 -> 0 bytes
-rw-r--r--plugins/FingerprintNG/iconpacks/res/fp_icons.rc16
-rw-r--r--plugins/FingerprintNG/src/fingerprint.cpp2
-rw-r--r--plugins/FingerprintNG/src/main.cpp2
-rw-r--r--plugins/FingerprintNG/src/masks.cpp23
-rw-r--r--plugins/FingerprintNG/src/options.cpp2
-rw-r--r--plugins/FingerprintNG/src/prepare.cpp2
-rw-r--r--plugins/FingerprintNG/src/resource.h18
-rw-r--r--plugins/FingerprintNG/src/stdafx.cxx2
-rw-r--r--plugins/FingerprintNG/src/stdafx.h2
-rw-r--r--plugins/FingerprintNG/src/version.h4
-rw-r--r--plugins/FloatingContacts/src/stdafx.cxx2
-rw-r--r--plugins/Folders/folders.vcxproj1
-rw-r--r--plugins/Folders/folders.vcxproj.filters3
-rw-r--r--plugins/Folders/src/dlg_handlers.cpp27
-rw-r--r--plugins/Folders/src/folderItem.cpp21
-rw-r--r--plugins/Folders/src/folderItem.h21
-rw-r--r--plugins/Folders/src/services.cpp9
-rw-r--r--plugins/Folders/src/stdafx.cxx2
-rw-r--r--plugins/Folders/src/stdafx.h2
-rw-r--r--plugins/Folders/src/version.h6
-rw-r--r--plugins/HTTPServer/src/stdafx.cpp2
-rw-r--r--plugins/HistoryLinkListPlus/src/linklist_fct.cpp2
-rw-r--r--plugins/HistoryLinkListPlus/src/stdafx.cxx2
-rw-r--r--plugins/HistoryPlusPlus/hpp_events.pas8
-rw-r--r--plugins/HistoryPlusPlus/hpp_global.pas11
-rw-r--r--plugins/HistoryPlusPlus/hpp_sessionsthread.pas2
-rw-r--r--plugins/HistoryStats/src/mirandacontact.cpp26
-rw-r--r--plugins/HistoryStats/src/statistic.cpp2
-rw-r--r--plugins/HistoryStats/src/stdafx.cxx2
-rw-r--r--plugins/HistorySweeperLight/src/historysweeperlight.cpp4
-rw-r--r--plugins/HistorySweeperLight/src/stdafx.cxx2
-rw-r--r--plugins/HwHotKeys/src/stdafx.cxx2
-rw-r--r--plugins/HwHotKeys/src/version.h2
-rw-r--r--plugins/IEHistory/src/dlgHandlers.cpp2
-rw-r--r--plugins/IEHistory/src/utils.cpp5
-rw-r--r--plugins/IEHistory/src/version.h2
-rw-r--r--plugins/IEView/src/HTMLBuilder.cpp6
-rw-r--r--plugins/IEView/src/stdafx.cxx2
-rw-r--r--plugins/IgnoreState/src/stdafx.cxx2
-rw-r--r--plugins/Import/src/dbrw/dbcontacts.cpp2
-rw-r--r--plugins/Import/src/dbrw/dbevents.cpp4
-rw-r--r--plugins/Import/src/dbrw/dbintf.cpp2
-rw-r--r--plugins/Import/src/dbrw/dbintf.h2
-rw-r--r--plugins/Import/src/dbrw/dbrw.cpp2
-rw-r--r--plugins/Import/src/dbrw/dbrw.h2
-rw-r--r--plugins/Import/src/dbrw/dbsettings.cpp2
-rw-r--r--plugins/Import/src/dbrw/dbsql.cpp2
-rw-r--r--plugins/Import/src/import.cpp12
-rw-r--r--plugins/Import/src/main.cpp2
-rw-r--r--plugins/Import/src/mcontacts.cpp6
-rw-r--r--plugins/Import/src/miranda.cpp2
-rw-r--r--plugins/Import/src/patterns.cpp8
-rw-r--r--plugins/Import/src/progress.cpp2
-rw-r--r--plugins/Import/src/stdafx.cxx2
-rw-r--r--plugins/Import/src/stdafx.h2
-rw-r--r--plugins/Import/src/textjson.cpp20
-rw-r--r--plugins/Import/src/ui.cpp2
-rw-r--r--plugins/Import/src/utils.cpp2
-rw-r--r--plugins/Import/src/version.h2
-rw-r--r--plugins/Import/src/wizard.cpp2
-rw-r--r--plugins/Jingle/src/account.cpp4
-rw-r--r--plugins/Jingle/src/options.cpp2
-rw-r--r--plugins/Jingle/src/stdafx.cxx2
-rw-r--r--plugins/Jingle/src/version.h2
-rw-r--r--plugins/KeyboardNotify/src/main.cpp4
-rw-r--r--plugins/KeyboardNotify/src/stdafx.cxx2
-rw-r--r--plugins/ListeningTo/src/stdafx.cxx2
-rw-r--r--plugins/MagneticWindows/src/Version.h2
-rw-r--r--plugins/MagneticWindows/src/stdafx.cxx2
-rw-r--r--plugins/MenuItemEx/src/stdafx.cxx2
-rw-r--r--plugins/MessageState/src/messagestate.cpp2
-rw-r--r--plugins/MessageState/src/stdafx.cxx2
-rw-r--r--plugins/MessageState/src/version.h2
-rw-r--r--plugins/MimCmd/src/stdafx.cxx2
-rw-r--r--plugins/MirFox/src/MirandaUtils.cpp2
-rw-r--r--plugins/MirFox/src/version.h2
-rw-r--r--plugins/MirLua/MirLua.vcxproj1
-rw-r--r--plugins/MirLua/MirLua.vcxproj.filters3
-rw-r--r--plugins/MirLua/src/Modules/m_clist.cpp17
-rw-r--r--plugins/MirLua/src/Modules/m_database.cpp8
-rw-r--r--plugins/MirLua/src/Modules/m_message.cpp2
-rw-r--r--plugins/MirLua/src/options.cpp352
-rw-r--r--plugins/MirLua/src/options.h47
-rw-r--r--plugins/MirLua/src/plugin.cpp22
-rw-r--r--plugins/MirLua/src/stdafx.h1
-rw-r--r--plugins/MirLua/src/version.h2
-rw-r--r--plugins/MirOTR/src/mirotrmenu.cpp18
-rw-r--r--plugins/MirOTR/src/utils.cpp4
-rw-r--r--plugins/MirandaG15/src/CAppletManager.cpp4
-rw-r--r--plugins/MirandaG15/src/stdafx.cxx2
-rw-r--r--plugins/MobileState/src/clients.h2
-rw-r--r--plugins/MobileState/src/main.cpp2
-rw-r--r--plugins/MobileState/src/stdafx.cxx2
-rw-r--r--plugins/MobileState/src/stdafx.h2
-rw-r--r--plugins/MobileState/src/version.h2
-rw-r--r--plugins/MsgPopup/src/stdafx.cxx2
-rw-r--r--plugins/Msg_Export/src/export.cpp259
-rw-r--r--plugins/Msg_Export/src/main.cpp1
-rw-r--r--plugins/Msg_Export/src/stdafx.cxx2
-rw-r--r--plugins/Msg_Export/src/utils.cpp47
-rw-r--r--plugins/Msg_Export/src/utils.h6
-rw-r--r--plugins/Msg_Export/src/version.h6
-rw-r--r--plugins/MyDetails/src/stdafx.cxx2
-rw-r--r--plugins/NewAwaySysMod/src/MsgEventAdded.cpp8
-rw-r--r--plugins/NewAwaySysMod/src/stdafx.cxx2
-rw-r--r--plugins/NewEventNotify/src/main.cpp4
-rw-r--r--plugins/NewEventNotify/src/popup.cpp2
-rw-r--r--plugins/NewEventNotify/src/stdafx.cxx2
-rw-r--r--plugins/NewStory/src/calendartool.cpp2
-rw-r--r--plugins/NewStory/src/fonts.cpp3
-rw-r--r--plugins/NewStory/src/history.h3
-rw-r--r--plugins/NewStory/src/history_array.cpp34
-rw-r--r--plugins/NewStory/src/history_control.cpp158
-rw-r--r--plugins/NewStory/src/history_control.h6
-rw-r--r--plugins/NewStory/src/history_dlg.cpp126
-rw-r--r--plugins/NewStory/src/history_log.cpp15
-rw-r--r--plugins/NewStory/src/history_menus.cpp7
-rw-r--r--plugins/NewStory/src/history_svc.cpp2
-rw-r--r--plugins/NewStory/src/main.cpp6
-rw-r--r--plugins/NewStory/src/options.cpp5
-rw-r--r--plugins/NewStory/src/stdafx.cxx2
-rw-r--r--plugins/NewStory/src/stdafx.h2
-rw-r--r--plugins/NewStory/src/templates.cpp116
-rw-r--r--plugins/NewStory/src/templates.h2
-rw-r--r--plugins/NewStory/src/utils.cpp31
-rw-r--r--plugins/NewStory/src/utils.h2
-rw-r--r--plugins/NewStory/src/version.h2
-rw-r--r--plugins/NewStory/src/webpage.cpp22
-rw-r--r--plugins/NewXstatusNotify/src/main.cpp4
-rw-r--r--plugins/NewXstatusNotify/src/stdafx.cxx2
-rw-r--r--plugins/NewXstatusNotify/src/xstatus.cpp2
-rw-r--r--plugins/New_GPG/src/globals.h2
-rw-r--r--plugins/New_GPG/src/gpg_wrapper.cpp2
-rw-r--r--plugins/New_GPG/src/gpg_wrapper.h2
-rw-r--r--plugins/New_GPG/src/icons.cpp2
-rw-r--r--plugins/New_GPG/src/init.cpp2
-rw-r--r--plugins/New_GPG/src/jabber_account.h2
-rw-r--r--plugins/New_GPG/src/log.cpp2
-rw-r--r--plugins/New_GPG/src/log.h2
-rw-r--r--plugins/New_GPG/src/main.cpp2
-rw-r--r--plugins/New_GPG/src/messages.cpp4
-rw-r--r--plugins/New_GPG/src/metacontacts.cpp2
-rw-r--r--plugins/New_GPG/src/metacontacts.h2
-rw-r--r--plugins/New_GPG/src/options.cpp2
-rw-r--r--plugins/New_GPG/src/options.h2
-rw-r--r--plugins/New_GPG/src/srmm.cpp2
-rw-r--r--plugins/New_GPG/src/stdafx.cxx2
-rw-r--r--plugins/New_GPG/src/stdafx.h2
-rw-r--r--plugins/New_GPG/src/ui.cpp2
-rw-r--r--plugins/New_GPG/src/ui.h2
-rw-r--r--plugins/New_GPG/src/utilities.cpp4
-rw-r--r--plugins/New_GPG/src/utilities.h2
-rw-r--r--plugins/New_GPG/src/version.h2
-rw-r--r--plugins/NoHistory/src/stdafx.cxx2
-rw-r--r--plugins/NoHistory/src/version.h2
-rw-r--r--plugins/NotesAndReminders/res/resource.rc2
-rw-r--r--plugins/NotesAndReminders/src/options.cpp5
-rw-r--r--plugins/NotesAndReminders/src/reminders.cpp145
-rw-r--r--plugins/NotesAndReminders/src/resource.h1
-rw-r--r--plugins/NotesAndReminders/src/stdafx.cxx2
-rw-r--r--plugins/NotifyAnything/src/stdafx.cxx2
-rw-r--r--plugins/Nudge/src/main.cpp4
-rw-r--r--plugins/Nudge/src/stdafx.cxx2
-rw-r--r--plugins/OpenFolder/src/stdafx.cxx2
-rw-r--r--plugins/PackUpdater/Src/Events.cpp2
-rw-r--r--plugins/PackUpdater/Src/Notifications.cpp2
-rw-r--r--plugins/PackUpdater/Src/Notifications.h2
-rw-r--r--plugins/PackUpdater/Src/Options.cpp2
-rw-r--r--plugins/PackUpdater/Src/PackUpdater.cpp2
-rw-r--r--plugins/PackUpdater/Src/Utils.cpp2
-rw-r--r--plugins/PackUpdater/Src/stdafx.cxx2
-rw-r--r--plugins/PackUpdater/Src/stdafx.h2
-rw-r--r--plugins/PackUpdater/Src/version.h2
-rw-r--r--plugins/PasteIt/src/PasteIt.cpp2
-rw-r--r--plugins/PasteIt/src/stdafx.cxx2
-rw-r--r--plugins/Ping/src/pingthread.cpp20
-rw-r--r--plugins/Ping/src/stdafx.cxx2
-rw-r--r--plugins/PluginUpdater/pu_stub/src/stdafx.cxx2
-rw-r--r--plugins/PluginUpdater/src/DlgListNew.cpp27
-rw-r--r--plugins/PluginUpdater/src/DlgUpdate.cpp174
-rw-r--r--plugins/PluginUpdater/src/Utils.cpp26
-rw-r--r--plugins/PluginUpdater/src/stdafx.cxx2
-rw-r--r--plugins/PluginUpdater/src/stdafx.h30
-rw-r--r--plugins/PluginUpdater/src/unzipfile.cpp27
-rw-r--r--plugins/PluginUpdater/src/version.h4
-rw-r--r--plugins/Popup/src/opt_adv.cpp2
-rw-r--r--plugins/Popup/src/popup_wnd2.cpp2
-rw-r--r--plugins/Popup/src/stdafx.cxx2
-rw-r--r--plugins/ProfileManager/src/stdafx.cxx2
-rw-r--r--plugins/ProxySwitch/src/stdafx.cxx2
-rw-r--r--plugins/ProxySwitch/src/version.h2
-rw-r--r--plugins/QuickContacts/src/dialog.cpp2
-rw-r--r--plugins/QuickContacts/src/stdafx.cxx2
-rw-r--r--plugins/QuickMessages/src/stdafx.cxx2
-rw-r--r--plugins/QuickReplies/src/stdafx.cxx2
-rw-r--r--plugins/QuickSearch/src/main.cpp2
-rw-r--r--plugins/QuickSearch/src/options.cpp2
-rw-r--r--plugins/QuickSearch/src/stdafx.cxx2
-rw-r--r--plugins/QuickSearch/src/utils.cpp2
-rw-r--r--plugins/QuickSearch/src/version.h2
-rw-r--r--plugins/QuickSearch/src/window.cpp2
-rw-r--r--plugins/QuickSearch/src/window_misc.cpp2
-rw-r--r--plugins/QuickSearch/src/window_row.cpp6
-rw-r--r--plugins/RecentContacts/src/RecentContacts.cpp4
-rw-r--r--plugins/RecentContacts/src/stdafx.cxx2
-rw-r--r--plugins/RemovePersonalSettings/src/rps.cpp2
-rw-r--r--plugins/RemovePersonalSettings/src/stdafx.cxx2
-rw-r--r--plugins/Restart/src/stdafx.cxx2
-rw-r--r--plugins/Scriver/src/chat_manager.cpp3
-rw-r--r--plugins/Scriver/src/globals.cpp2
-rw-r--r--plugins/Scriver/src/input.cpp15
-rw-r--r--plugins/Scriver/src/msgdialog.cpp25
-rw-r--r--plugins/Scriver/src/msglog.cpp44
-rw-r--r--plugins/Scriver/src/msgoptions.cpp2
-rw-r--r--plugins/Scriver/src/msgs.cpp16
-rw-r--r--plugins/Scriver/src/msgs.h2
-rw-r--r--plugins/Scriver/src/msgutils.cpp12
-rw-r--r--plugins/Scriver/src/sendqueue.cpp40
-rw-r--r--plugins/Scriver/src/stdafx.cxx2
-rw-r--r--plugins/Scriver/src/version.h2
-rw-r--r--plugins/SecureIM/src/dbevent.cpp2
-rw-r--r--plugins/SecureIM/src/stdafx.cpp2
-rw-r--r--plugins/SeenPlugin/src/stdafx.cxx2
-rw-r--r--plugins/SendScreenshotPlus/SendSS.vcxproj1
-rw-r--r--plugins/SendScreenshotPlus/SendSS.vcxproj.filters3
-rw-r--r--plugins/SendScreenshotPlus/src/CSend.cpp57
-rw-r--r--plugins/SendScreenshotPlus/src/CSend.h2
-rw-r--r--plugins/SendScreenshotPlus/src/CSendCloduFile.h2
-rw-r--r--plugins/SendScreenshotPlus/src/CSendCloudFile.cpp12
-rw-r--r--plugins/SendScreenshotPlus/src/CSendEmail.cpp12
-rw-r--r--plugins/SendScreenshotPlus/src/CSendEmail.h2
-rw-r--r--plugins/SendScreenshotPlus/src/CSendFTPFile.cpp14
-rw-r--r--plugins/SendScreenshotPlus/src/CSendFTPFile.h2
-rw-r--r--plugins/SendScreenshotPlus/src/CSendFile.cpp6
-rw-r--r--plugins/SendScreenshotPlus/src/CSendFile.h2
-rw-r--r--plugins/SendScreenshotPlus/src/CSendHTTPServer.cpp12
-rw-r--r--plugins/SendScreenshotPlus/src/CSendHTTPServer.h2
-rw-r--r--plugins/SendScreenshotPlus/src/CSendHost_ImageShack.cpp34
-rw-r--r--plugins/SendScreenshotPlus/src/CSendHost_ImageShack.h2
-rw-r--r--plugins/SendScreenshotPlus/src/CSendHost_imgur.cpp12
-rw-r--r--plugins/SendScreenshotPlus/src/CSendHost_imgur.h2
-rw-r--r--plugins/SendScreenshotPlus/src/CSendHost_uploadpie.cpp34
-rw-r--r--plugins/SendScreenshotPlus/src/CSendHost_uploadpie.h2
-rw-r--r--plugins/SendScreenshotPlus/src/DevKey.h3
-rw-r--r--plugins/SendScreenshotPlus/src/Main.cpp6
-rw-r--r--plugins/SendScreenshotPlus/src/UMainForm.cpp42
-rw-r--r--plugins/SendScreenshotPlus/src/UMainForm.h2
-rw-r--r--plugins/SendScreenshotPlus/src/Utils.cpp68
-rw-r--r--plugins/SendScreenshotPlus/src/Utils.h2
-rw-r--r--plugins/SendScreenshotPlus/src/ctrl_button.cpp28
-rw-r--r--plugins/SendScreenshotPlus/src/ctrl_button.h2
-rw-r--r--plugins/SendScreenshotPlus/src/dlg_msgbox.cpp6
-rw-r--r--plugins/SendScreenshotPlus/src/dlg_msgbox.h2
-rw-r--r--plugins/SendScreenshotPlus/src/stdafx.cxx2
-rw-r--r--plugins/SendScreenshotPlus/src/stdafx.h4
-rw-r--r--plugins/SendScreenshotPlus/src/version.h2
-rw-r--r--plugins/Sessions/Src/Import.cpp2
-rw-r--r--plugins/Sessions/Src/LoadSessions.cpp2
-rw-r--r--plugins/Sessions/Src/SaveSessions.cpp2
-rw-r--r--plugins/Sessions/Src/stdafx.cxx2
-rw-r--r--plugins/ShellExt/src/shlcom.cpp4
-rw-r--r--plugins/ShellExt/src/stdafx.cxx2
-rw-r--r--plugins/SimpleAR/src/Main.cpp2
-rw-r--r--plugins/SimpleAR/src/stdafx.cxx2
-rw-r--r--plugins/SimpleStatusMsg/src/awaymsg.cpp2
-rw-r--r--plugins/SimpleStatusMsg/src/stdafx.cxx2
-rw-r--r--plugins/SkypeStatusChange/SkypeStatusChange.vcxproj42
-rw-r--r--plugins/SkypeStatusChange/SkypeStatusChange.vcxproj.filters34
-rw-r--r--plugins/SkypeStatusChange/res/SkypeStatusChange.rc120
-rw-r--r--plugins/SkypeStatusChange/res/Version.rc9
-rw-r--r--plugins/SkypeStatusChange/src/main.cpp311
-rw-r--r--plugins/SkypeStatusChange/src/options.cpp161
-rw-r--r--plugins/SkypeStatusChange/src/resource.h21
-rw-r--r--plugins/SkypeStatusChange/src/stdafx.cxx18
-rw-r--r--plugins/SkypeStatusChange/src/stdafx.h132
-rw-r--r--plugins/SkypeStatusChange/src/version.h13
-rw-r--r--plugins/SmileyAdd/src/options.cpp2
-rw-r--r--plugins/SmileyAdd/src/options.h2
-rw-r--r--plugins/SmileyAdd/src/services.cpp2
-rw-r--r--plugins/SmileyAdd/src/smileys.cpp2
-rw-r--r--plugins/SmileyAdd/src/smileys.h2
-rw-r--r--plugins/SmileyAdd/src/stdafx.cxx2
-rw-r--r--plugins/SmileyAdd/src/version.h2
-rw-r--r--plugins/SpellChecker/src/stdafx.cxx2
-rw-r--r--plugins/SplashScreen/src/stdafx.cxx2
-rw-r--r--plugins/StartPosition/src/main.cpp2
-rw-r--r--plugins/StartPosition/src/options.h2
-rw-r--r--plugins/StartPosition/src/startposition.h2
-rw-r--r--plugins/StartPosition/src/stdafx.cxx2
-rw-r--r--plugins/StartPosition/src/stdafx.h2
-rw-r--r--plugins/StartPosition/src/version.h2
-rw-r--r--plugins/StartupSilence/src/main.cpp2
-rw-r--r--plugins/StartupSilence/src/stdafx.cxx2
-rw-r--r--plugins/StartupSilence/src/version.h2
-rw-r--r--plugins/StatusChange/src/stdafx.cxx2
-rw-r--r--plugins/StatusManager/StatusManager.vcxproj5
-rw-r--r--plugins/StatusManager/StatusManager.vcxproj.filters3
-rw-r--r--plugins/StatusManager/res/resource.rc26
-rw-r--r--plugins/StatusManager/src/aaa_main.cpp2
-rw-r--r--plugins/StatusManager/src/aaa_options.cpp4
-rw-r--r--plugins/StatusManager/src/commonstatus.cpp22
-rw-r--r--plugins/StatusManager/src/commonstatus.h1
-rw-r--r--plugins/StatusManager/src/confirmdialog.cpp4
-rw-r--r--plugins/StatusManager/src/ks_main.cpp29
-rw-r--r--plugins/StatusManager/src/resource.h2
-rw-r--r--plugins/StatusManager/src/ss_main.cpp45
-rw-r--r--plugins/StatusManager/src/ss_options.cpp58
-rw-r--r--plugins/StatusManager/src/startupstatus.h7
-rw-r--r--plugins/StatusManager/src/stdafx.cxx2
-rw-r--r--plugins/StatusManager/src/version.h4
-rw-r--r--plugins/StopSpamMod/src/stdafx.cxx2
-rw-r--r--plugins/StopSpamMod/src/utilities.cpp4
-rw-r--r--plugins/StopSpamMod/src/version.h2
-rw-r--r--plugins/StopSpamPlus/res/stopspam.rc31
-rw-r--r--plugins/StopSpamPlus/src/events.cpp55
-rw-r--r--plugins/StopSpamPlus/src/options.cpp21
-rw-r--r--plugins/StopSpamPlus/src/resource.h10
-rw-r--r--plugins/StopSpamPlus/src/stdafx.cxx2
-rw-r--r--plugins/StopSpamPlus/src/stdafx.h31
-rw-r--r--plugins/StopSpamPlus/src/stopspam.cpp20
-rw-r--r--plugins/TabSRMM/TabSRMM_icons/res/version.h2
-rw-r--r--plugins/TabSRMM/res/chat.rc4
-rw-r--r--plugins/TabSRMM/src/ImageDataObject.cpp2
-rw-r--r--plugins/TabSRMM/src/TSButton.cpp2
-rw-r--r--plugins/TabSRMM/src/buttonsbar.cpp18
-rw-r--r--plugins/TabSRMM/src/chat.h2
-rw-r--r--plugins/TabSRMM/src/chat_log.cpp2
-rw-r--r--plugins/TabSRMM/src/chat_main.cpp2
-rw-r--r--plugins/TabSRMM/src/chat_manager.cpp2
-rw-r--r--plugins/TabSRMM/src/chat_options.cpp2
-rw-r--r--plugins/TabSRMM/src/chat_tools.cpp5
-rw-r--r--plugins/TabSRMM/src/contactcache.cpp19
-rw-r--r--plugins/TabSRMM/src/contactcache.h3
-rw-r--r--plugins/TabSRMM/src/container.cpp9
-rw-r--r--plugins/TabSRMM/src/containeroptions.cpp2
-rw-r--r--plugins/TabSRMM/src/controls.cpp2
-rw-r--r--plugins/TabSRMM/src/controls.h2
-rw-r--r--plugins/TabSRMM/src/eventpopups.cpp2
-rw-r--r--plugins/TabSRMM/src/functions.h2
-rw-r--r--plugins/TabSRMM/src/generic_msghandlers.cpp6
-rw-r--r--plugins/TabSRMM/src/globals.cpp12
-rw-r--r--plugins/TabSRMM/src/globals.h2
-rw-r--r--plugins/TabSRMM/src/hotkeyhandler.cpp4
-rw-r--r--plugins/TabSRMM/src/infopanel.cpp2
-rw-r--r--plugins/TabSRMM/src/infopanel.h2
-rw-r--r--plugins/TabSRMM/src/mim.cpp6
-rw-r--r--plugins/TabSRMM/src/mim.h2
-rw-r--r--plugins/TabSRMM/src/msgdialog.cpp43
-rw-r--r--plugins/TabSRMM/src/msgdlgother.cpp70
-rw-r--r--plugins/TabSRMM/src/msgdlgutils.cpp2
-rw-r--r--plugins/TabSRMM/src/msgdlgutils.h2
-rw-r--r--plugins/TabSRMM/src/msglog.cpp32
-rw-r--r--plugins/TabSRMM/src/msgoptions.cpp5
-rw-r--r--plugins/TabSRMM/src/msgs.cpp10
-rw-r--r--plugins/TabSRMM/src/msgs.h6
-rw-r--r--plugins/TabSRMM/src/muchighlight.cpp2
-rw-r--r--plugins/TabSRMM/src/muchighlight.h2
-rw-r--r--plugins/TabSRMM/src/nen.h2
-rw-r--r--plugins/TabSRMM/src/selectcontainer.cpp2
-rw-r--r--plugins/TabSRMM/src/sendlater.cpp4
-rw-r--r--plugins/TabSRMM/src/sendlater.h2
-rw-r--r--plugins/TabSRMM/src/sendqueue.cpp8
-rw-r--r--plugins/TabSRMM/src/sendqueue.h2
-rw-r--r--plugins/TabSRMM/src/sidebar.cpp2
-rw-r--r--plugins/TabSRMM/src/sidebar.h2
-rw-r--r--plugins/TabSRMM/src/srmm.cpp3
-rw-r--r--plugins/TabSRMM/src/stdafx.cxx2
-rw-r--r--plugins/TabSRMM/src/stdafx.h2
-rw-r--r--plugins/TabSRMM/src/tabctrl.cpp2
-rw-r--r--plugins/TabSRMM/src/taskbar.cpp2
-rw-r--r--plugins/TabSRMM/src/taskbar.h2
-rw-r--r--plugins/TabSRMM/src/templates.cpp2
-rw-r--r--plugins/TabSRMM/src/themeio.cpp2
-rw-r--r--plugins/TabSRMM/src/themes.cpp2
-rw-r--r--plugins/TabSRMM/src/themes.h2
-rw-r--r--plugins/TabSRMM/src/userprefs.cpp2
-rw-r--r--plugins/TabSRMM/src/utils.cpp2
-rw-r--r--plugins/TabSRMM/src/utils.h2
-rw-r--r--plugins/TabSRMM/src/version.h2
-rw-r--r--plugins/TabSRMM/src/warning.cpp2
-rw-r--r--plugins/TipperYM/src/options.cpp2
-rw-r--r--plugins/TipperYM/src/stdafx.cxx2
-rw-r--r--plugins/TipperYM/src/stdafx.h1
-rw-r--r--plugins/TipperYM/src/subst.cpp12
-rw-r--r--plugins/Toaster/src/version.h2
-rw-r--r--plugins/TooltipNotify/src/TooltipNotify.cpp2
-rw-r--r--plugins/TooltipNotify/src/stdafx.cxx2
-rw-r--r--plugins/TopToolBar/src/InternalButtons.cpp4
-rw-r--r--plugins/TopToolBar/src/stdafx.cxx2
-rw-r--r--plugins/TopToolBar/src/toolbarwnd.cpp2
-rw-r--r--plugins/TrafficCounter/src/TrafficCounter.cpp2
-rw-r--r--plugins/TrafficCounter/src/stdafx.cxx2
-rw-r--r--plugins/TranslitSwitcher/src/stdafx.cxx2
-rw-r--r--plugins/TranslitSwitcher/src/version.h2
-rw-r--r--plugins/UserGuide/src/stdafx.cxx2
-rw-r--r--plugins/UserInfoEx/src/dlg_msgbox.cpp2
-rw-r--r--plugins/UserInfoEx/src/dlg_msgbox.h2
-rw-r--r--plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp6
-rw-r--r--plugins/UserInfoEx/src/mir_db.cpp12
-rw-r--r--plugins/UserInfoEx/src/stdafx.cxx2
-rw-r--r--plugins/UserInfoEx/src/svc_reminder.cpp76
-rw-r--r--plugins/Variables/src/help.cpp2
-rw-r--r--plugins/Variables/src/parse_miranda.cpp20
-rw-r--r--plugins/Variables/src/stdafx.cxx2
-rw-r--r--plugins/VoiceService/res/resource.rc2
-rw-r--r--plugins/VoiceService/src/VoiceCall.cpp1
-rw-r--r--plugins/VoiceService/src/stdafx.cxx2
-rw-r--r--plugins/VoiceService/src/version.h2
-rw-r--r--plugins/Watrack_MPD/src/stdafx.cxx2
-rw-r--r--plugins/WhenWasIt/src/dlg_handlers.cpp2
-rw-r--r--plugins/WhenWasIt/src/stdafx.cxx2
-rw-r--r--plugins/WhoUsesMyFiles/src/options.cpp2
-rw-r--r--plugins/WhoUsesMyFiles/src/stdafx.cxx2
-rw-r--r--plugins/WinterSpeak/src/stdafx.cxx2
-rw-r--r--plugins/XSoundNotify/src/stdafx.cxx2
-rw-r--r--plugins/YARelay/src/main.cpp4
-rw-r--r--plugins/YARelay/src/stdafx.cxx2
-rw-r--r--plugins/ZeroNotification/src/options.cpp2
-rw-r--r--plugins/ZeroNotification/src/stdafx.cxx2
-rw-r--r--plugins/ZeroSwitch/src/stdafx.cxx2
-rw-r--r--plugins/helpers/commonheaders.h2
-rw-r--r--plugins/wbOSD/src/stdafx.cxx2
676 files changed, 2681 insertions, 4539 deletions
diff --git a/plugins/AVS/avs.vcxproj b/plugins/AVS/avs.vcxproj
index 86e399c534..b7f200cddd 100644
--- a/plugins/AVS/avs.vcxproj
+++ b/plugins/AVS/avs.vcxproj
@@ -39,6 +39,7 @@
<ClCompile Include="src\utils.cpp" />
<ClCompile Include="src\userInfo.cpp" />
<ClCompile Include="src\contact_ava.cpp" />
+ <ClInclude Include="..\..\include\m_avatars.h" />
<ClInclude Include="src\acc.h" />
<ClInclude Include="src\image_utils.h" />
<ClInclude Include="src\poll.h" />
diff --git a/plugins/AVS/avs.vcxproj.filters b/plugins/AVS/avs.vcxproj.filters
index 715fd8e0bf..3ecc4dbdc1 100644
--- a/plugins/AVS/avs.vcxproj.filters
+++ b/plugins/AVS/avs.vcxproj.filters
@@ -55,6 +55,9 @@
<ClInclude Include="src\version.h">
<Filter>Header Files</Filter>
</ClInclude>
+ <ClInclude Include="..\..\include\m_avatars.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="res\avs.rc">
diff --git a/plugins/AVS/src/acc.cpp b/plugins/AVS/src/acc.cpp
index 880605d062..6f6e225d6e 100644
--- a/plugins/AVS/src/acc.cpp
+++ b/plugins/AVS/src/acc.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-04 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/AVS/src/cache.cpp b/plugins/AVS/src/cache.cpp
index 1f12c24e75..f4a406e3a9 100644
--- a/plugins/AVS/src/cache.cpp
+++ b/plugins/AVS/src/cache.cpp
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (C) 2006 Ricardo Pescuma Domenecci, Nightwish
This is free software; you can redistribute it and/or
diff --git a/plugins/AVS/src/contact_ava.cpp b/plugins/AVS/src/contact_ava.cpp
index 016b4d6920..4771263372 100644
--- a/plugins/AVS/src/contact_ava.cpp
+++ b/plugins/AVS/src/contact_ava.cpp
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/AVS/src/main.cpp b/plugins/AVS/src/main.cpp
index e4ded938e3..030447d9a6 100644
--- a/plugins/AVS/src/main.cpp
+++ b/plugins/AVS/src/main.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-04 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -352,7 +352,7 @@ static IconItem iconList[] =
int CMPlugin::Load()
{
- registerIcon(LPGEN("AVS"), iconList);
+ registerIcon(LPGEN("AVS"), iconList, "av");
LoadACC();
diff --git a/plugins/AVS/src/options.cpp b/plugins/AVS/src/options.cpp
index dcf978b134..21d0c3c195 100644
--- a/plugins/AVS/src/options.cpp
+++ b/plugins/AVS/src/options.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-04 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/AVS/src/poll.cpp b/plugins/AVS/src/poll.cpp
index c4fb6ac2bd..61b87c1d76 100644
--- a/plugins/AVS/src/poll.cpp
+++ b/plugins/AVS/src/poll.cpp
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (C) 2006 Ricardo Pescuma Domenecci, Nightwish
This is free software; you can redistribute it and/or
diff --git a/plugins/AVS/src/poll.h b/plugins/AVS/src/poll.h
index 9fd57349ce..711169bba7 100644
--- a/plugins/AVS/src/poll.h
+++ b/plugins/AVS/src/poll.h
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (C) 2006 Ricardo Pescuma Domenecci, Nightwish
This is free software; you can redistribute it and/or
diff --git a/plugins/AVS/src/services.cpp b/plugins/AVS/src/services.cpp
index 50be9e70cb..c973c6c404 100644
--- a/plugins/AVS/src/services.cpp
+++ b/plugins/AVS/src/services.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-04 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/AVS/src/stdafx.cxx b/plugins/AVS/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/AVS/src/stdafx.cxx
+++ b/plugins/AVS/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/AVS/src/stdafx.h b/plugins/AVS/src/stdafx.h
index c0370b4d97..5e2244fbfa 100644
--- a/plugins/AVS/src/stdafx.h
+++ b/plugins/AVS/src/stdafx.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-04 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/AVS/src/userInfo.cpp b/plugins/AVS/src/userInfo.cpp
index a77064079c..4ed5d0d374 100644
--- a/plugins/AVS/src/userInfo.cpp
+++ b/plugins/AVS/src/userInfo.cpp
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/AVS/src/utils.cpp b/plugins/AVS/src/utils.cpp
index 6c27f50af3..00f102e448 100644
--- a/plugins/AVS/src/utils.cpp
+++ b/plugins/AVS/src/utils.cpp
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (C) 2006 Ricardo Pescuma Domenecci, Nightwish
This is free software; you can redistribute it and/or
diff --git a/plugins/AVS/src/version.h b/plugins/AVS/src/version.h
index 5206625f2b..67f9107efc 100644
--- a/plugins/AVS/src/version.h
+++ b/plugins/AVS/src/version.h
@@ -10,4 +10,4 @@
#define __DESCRIPTION "Loads and manages contact pictures for other plugins."
#define __AUTHOR "Nightwish, Pescuma"
#define __AUTHORWEB "https://miranda-ng.org/p/AVS"
-#define __COPYRIGHT "© 2000-2012 Miranda-IM project, 2012-24 Miranda NG team"
+#define __COPYRIGHT "© 2000-2012 Miranda-IM project, 2012-25 Miranda NG team"
diff --git a/plugins/AddContactPlus/src/addcontact.cpp b/plugins/AddContactPlus/src/addcontact.cpp
index 96c5001780..5463093d31 100644
--- a/plugins/AddContactPlus/src/addcontact.cpp
+++ b/plugins/AddContactPlus/src/addcontact.cpp
@@ -2,7 +2,7 @@
AddContact+ plugin for Miranda NG
Copyright (C) 2007-11 Bartosz 'Dezeath' Białek
-Copyright (C) 2012-24 Miranda NG team
+Copyright (C) 2012-25 Miranda NG team
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/plugins/AddContactPlus/src/main.cpp b/plugins/AddContactPlus/src/main.cpp
index aee0b71ae5..9d17542c42 100644
--- a/plugins/AddContactPlus/src/main.cpp
+++ b/plugins/AddContactPlus/src/main.cpp
@@ -2,7 +2,7 @@
AddContact+ plugin for Miranda NG
Copyright (C) 2007-11 Bartosz 'Dezeath' Białek
-Copyright (C) 2012-24 Miranda NG team
+Copyright (C) 2012-25 Miranda NG team
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/plugins/AddContactPlus/src/stdafx.cxx b/plugins/AddContactPlus/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/AddContactPlus/src/stdafx.cxx
+++ b/plugins/AddContactPlus/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/AddContactPlus/src/stdafx.h b/plugins/AddContactPlus/src/stdafx.h
index 8d0685a26d..80c0a143fc 100644
--- a/plugins/AddContactPlus/src/stdafx.h
+++ b/plugins/AddContactPlus/src/stdafx.h
@@ -2,7 +2,7 @@
AddContact+ plugin for Miranda NG
Copyright (C) 2007-11 Bartosz 'Dezeath' Białek
-Copyright (C) 2012-24 Miranda NG team
+Copyright (C) 2012-25 Miranda NG team
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/plugins/AddContactPlus/src/version.h b/plugins/AddContactPlus/src/version.h
index a8dec4f665..c79935f489 100644
--- a/plugins/AddContactPlus/src/version.h
+++ b/plugins/AddContactPlus/src/version.h
@@ -10,4 +10,4 @@
#define __DESCRIPTION "Provides the ability to quickly add new contacts."
#define __AUTHOR "Bartosz 'Dezeath' Białek"
#define __AUTHORWEB "https://miranda-ng.org/p/AddContactPlus"
-#define __COPYRIGHT "© 2007-24 Bartosz 'Dezeath' Białek, Miranda NG team"
+#define __COPYRIGHT "© 2007-25 Bartosz 'Dezeath' Białek, Miranda NG team"
diff --git a/plugins/Alarms/src/stdafx.cxx b/plugins/Alarms/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/Alarms/src/stdafx.cxx
+++ b/plugins/Alarms/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/AsSingleWindow/src/stdafx.cxx b/plugins/AsSingleWindow/src/stdafx.cxx
index 87b7477097..72e87c2758 100644
--- a/plugins/AsSingleWindow/src/stdafx.cxx
+++ b/plugins/AsSingleWindow/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/AsSingleWindow/src/version.h b/plugins/AsSingleWindow/src/version.h
index 49bef7b130..4da9da466e 100644
--- a/plugins/AsSingleWindow/src/version.h
+++ b/plugins/AsSingleWindow/src/version.h
@@ -10,4 +10,4 @@
#define __DESCRIPTION "Allows you to move, minimize and activate Miranda's windows as if it were a single window."
#define __AUTHOR "Aleksey Smyrnov aka Soar"
#define __AUTHORWEB "https://miranda-ng.org/p/AsSingleWindow"
-#define __COPYRIGHT "© 2010-2011 Soar, 2017-24 Miranda NG team"
+#define __COPYRIGHT "© 2010-2011 Soar, 2017-25 Miranda NG team"
diff --git a/plugins/AssocMgr/src/stdafx.cxx b/plugins/AssocMgr/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/AssocMgr/src/stdafx.cxx
+++ b/plugins/AssocMgr/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/AuthState/src/stdafx.cxx b/plugins/AuthState/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/AuthState/src/stdafx.cxx
+++ b/plugins/AuthState/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/AutoRun/src/stdafx.cxx b/plugins/AutoRun/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/AutoRun/src/stdafx.cxx
+++ b/plugins/AutoRun/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/AutoShutdown/res/resource.rc b/plugins/AutoShutdown/res/resource.rc
index 83daf0e6bc..d13b7e5fae 100644
--- a/plugins/AutoShutdown/res/resource.rc
+++ b/plugins/AutoShutdown/res/resource.rc
@@ -69,8 +69,6 @@ BEGIN
"Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,12,88,273,19
GROUPBOX "Critical shutdown events",IDC_STATIC,3,116,289,62
LTEXT "Automatically shutdown the computer and turn the power off when one of the following occurs:",IDC_STATIC,12,128,273,18,SS_NOPREFIX
- CONTROL "&Thunderstorm warning is issued (Weather)",IDC_CHECK_WEATHER,
- "Button",BS_AUTOCHECKBOX | BS_TOP | WS_DISABLED | WS_TABSTOP,12,150,273,11
END
IDD_SETTINGS DIALOGEX 0, 0, 239, 286
diff --git a/plugins/AutoShutdown/src/options.cpp b/plugins/AutoShutdown/src/options.cpp
index 4dcf972a56..a005589ffd 100644
--- a/plugins/AutoShutdown/src/options.cpp
+++ b/plugins/AutoShutdown/src/options.cpp
@@ -42,15 +42,7 @@ static INT_PTR CALLBACK ShutdownOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam
CheckDlgButton(hwndDlg, IDC_CHECK_SMARTOFFLINECHECK, g_plugin.getByte("SmartOfflineCheck", SETTING_SMARTOFFLINECHECK_DEFAULT) != 0 ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_CHECK_REMEMBERONRESTART, g_plugin.getByte("RememberOnRestart", SETTING_REMEMBERONRESTART_DEFAULT) != 0 ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_CHECK_SHOWCONFIRMDLG, g_plugin.getByte("ShowConfirmDlg", SETTING_SHOWCONFIRMDLG_DEFAULT) != 0 ? BST_CHECKED : BST_UNCHECKED);
- {
- BOOL enabled = ServiceIsTypeEnabled(SDSDT_SHUTDOWN, 0);
- if (enabled) {
- if (ServiceExists(MS_WEATHER_UPDATE)) {
- EnableWindow(GetDlgItem(hwndDlg, IDC_CHECK_WEATHER), TRUE);
- CheckDlgButton(hwndDlg, IDC_CHECK_WEATHER, g_plugin.getByte("WeatherShutdown", SETTING_WEATHERSHUTDOWN_DEFAULT) != 0 ? BST_CHECKED : BST_UNCHECKED);
- }
- }
- }
+
SendMessage(hwndDlg, M_ENABLE_SUBCTLS, 0, 0);
return TRUE; /* default focus */
@@ -89,8 +81,6 @@ static INT_PTR CALLBACK ShutdownOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam
g_plugin.setWord("ConfirmDlgCountdown", (uint16_t)GetDlgItemInt(hwndDlg, IDC_EDIT_CONFIRMDLGCOUNTDOWN, nullptr, FALSE));
g_plugin.setByte("RememberOnRestart", (uint8_t)(IsDlgButtonChecked(hwndDlg, IDC_CHECK_REMEMBERONRESTART) != 0));
g_plugin.setByte("SmartOfflineCheck", (uint8_t)(IsDlgButtonChecked(hwndDlg, IDC_CHECK_SMARTOFFLINECHECK) != 0));
- if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_CHECK_WEATHER)))
- g_plugin.setByte("WeatherShutdown", (uint8_t)(IsDlgButtonChecked(hwndDlg, IDC_CHECK_WEATHER) != 0));
return TRUE;
}
break;
diff --git a/plugins/AutoShutdown/src/resource.h b/plugins/AutoShutdown/src/resource.h
index 78a764d908..7a9f7d1baf 100644
--- a/plugins/AutoShutdown/src/resource.h
+++ b/plugins/AutoShutdown/src/resource.h
@@ -42,7 +42,6 @@
#define IDC_SPIN_CONFIRMDLGCOUNTDOWN 1032
#define IDC_CHECK_REMEMBERONRESTART 1033
#define IDC_CHECK_SMARTOFFLINECHECK 1034
-#define IDC_CHECK_WEATHER 1035
// Next default values for new objects
//
diff --git a/plugins/AutoShutdown/src/stdafx.cxx b/plugins/AutoShutdown/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/AutoShutdown/src/stdafx.cxx
+++ b/plugins/AutoShutdown/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/AutoShutdown/src/stdafx.h b/plugins/AutoShutdown/src/stdafx.h
index 3ee6fd516b..88e6f526fe 100644
--- a/plugins/AutoShutdown/src/stdafx.h
+++ b/plugins/AutoShutdown/src/stdafx.h
@@ -58,7 +58,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_icolib.h>
#include <m_hotkeys.h>
-#include <m_weather.h>
#include <m_toptoolbar.h>
#include <m_shutdown.h>
diff --git a/plugins/AutoShutdown/src/watcher.cpp b/plugins/AutoShutdown/src/watcher.cpp
index 57ee51f9f4..e91433c632 100644
--- a/plugins/AutoShutdown/src/watcher.cpp
+++ b/plugins/AutoShutdown/src/watcher.cpp
@@ -200,17 +200,6 @@ static BOOL CALLBACK CpuUsageWatcherProc(uint8_t nCpuUsage, LPARAM lParam)
return TRUE;
}
-/************************* Weather Shutdown ***************************/
-
-static int WeatherUpdated(WPARAM wParam, LPARAM lParam)
-{
- char *pszProto = Proto_GetBaseAccountName(wParam);
- if ((BOOL)lParam && pszProto != nullptr && Proto_GetStatus(pszProto) == ID_STATUS_INVISIBLE)
- if (g_plugin.getByte("WeatherShutdown", SETTING_WEATHERSHUTDOWN_DEFAULT))
- ServiceShutdown(SDSDT_SHUTDOWN, TRUE);
- return 0;
-}
-
/************************* Services ***********************************/
INT_PTR ServiceStartWatcher(WPARAM, LPARAM lParam)
@@ -282,10 +271,6 @@ INT_PTR ServiceIsWatcherEnabled(WPARAM, LPARAM)
void WatcherModulesLoaded(void)
{
- /* Weather Shutdown */
- if (ServiceExists(MS_WEATHER_UPDATE))
- hHookWeatherUpdated = HookEvent(ME_WEATHER_UPDATED, WeatherUpdated);
-
/* restore watcher if it was running on last exit */
if (g_plugin.getByte("RememberOnRestart", 0) == SDROR_RUNNING) {
g_plugin.setByte("RememberOnRestart", 1);
diff --git a/plugins/AvatarHistory/src/AvatarDlg.cpp b/plugins/AvatarHistory/src/AvatarDlg.cpp
index ef3548e0d0..6e8d42eed3 100644
--- a/plugins/AvatarHistory/src/AvatarDlg.cpp
+++ b/plugins/AvatarHistory/src/AvatarDlg.cpp
@@ -420,7 +420,7 @@ int FillAvatarListFromDB(HWND list, MCONTACT hContact)
// Get time
wchar_t date[64];
- TimeZone_ToStringW(dbei.timestamp, L"d s", date, _countof(date));
+ TimeZone_ToStringW(dbei.getUnixtime(), L"d s", date, _countof(date));
// Get file in disk
wchar_t path[MAX_PATH];
diff --git a/plugins/AvatarHistory/src/AvatarHistory.cpp b/plugins/AvatarHistory/src/AvatarHistory.cpp
index ce2257fa7d..ac7993578b 100644
--- a/plugins/AvatarHistory/src/AvatarHistory.cpp
+++ b/plugins/AvatarHistory/src/AvatarHistory.cpp
@@ -205,7 +205,7 @@ static int AvatarChanged(WPARAM hContact, LPARAM lParam)
DBEVENTINFO dbei = {};
dbei.szModule = Proto_GetBaseAccountName(hContact);
dbei.flags = DBEF_READ | DBEF_UTF;
- dbei.timestamp = (uint32_t)time(0);
+ dbei.iTimestamp = time(0);
dbei.eventType = EVENTTYPE_AVATAR_CHANGE;
dbei.cbBlob = (uint32_t)mir_strlen(blob) + 1;
dbei.pBlob = blob;
diff --git a/plugins/AvatarHistory/src/stdafx.cxx b/plugins/AvatarHistory/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/AvatarHistory/src/stdafx.cxx
+++ b/plugins/AvatarHistory/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/BASS_interface/src/stdafx.cxx b/plugins/BASS_interface/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/BASS_interface/src/stdafx.cxx
+++ b/plugins/BASS_interface/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/BasicHistory/src/BinaryExport.cpp b/plugins/BasicHistory/src/BinaryExport.cpp
index 1eadefd459..8d716c7868 100644
--- a/plugins/BasicHistory/src/BinaryExport.cpp
+++ b/plugins/BasicHistory/src/BinaryExport.cpp
@@ -132,14 +132,14 @@ void BinaryExport::WriteGroup(bool, const std::wstring&, const std::wstring&, co
void BinaryExport::WriteMessage(bool, const std::wstring&, const std::wstring&, const std::wstring&, const std::wstring &message, const DBEVENTINFO& dbei)
{
- if (dbei.timestamp >= lTime) {
+ if (dbei.getUnixtime() >= lTime) {
BinaryFileMessageHeader header;
header.eventType = dbei.eventType;
header.flags = dbei.flags & (~(0x800));
- header.timestamp = dbei.timestamp;
+ header.timestamp = dbei.getUnixtime();
EXP_FILE.write((char*)&header, sizeof(BinaryFileMessageHeader));
WriteString(message);
- lTime = dbei.timestamp;
+ lTime = dbei.getUnixtime();
}
}
diff --git a/plugins/BasicHistory/src/DatExport.cpp b/plugins/BasicHistory/src/DatExport.cpp
index 9d11a75860..6ef9f857b9 100644
--- a/plugins/BasicHistory/src/DatExport.cpp
+++ b/plugins/BasicHistory/src/DatExport.cpp
@@ -97,7 +97,7 @@ void DatExport::WriteMessage(bool, const std::wstring&, const std::wstring&, con
header.cbSize = sizeof(DBEVENTINFO86);
header.eventType = dbei.eventType;
header.flags = dbei.flags & (~(0x800));
- header.timestamp = dbei.timestamp;
+ header.timestamp = dbei.getUnixtime();
header.szModule = 0;
header.pBlob = 0;
if (dbei.flags & 0x800) {
@@ -179,7 +179,7 @@ bool DatExport::GetEventList(std::vector<IImport::ExternalMessage>& eventList)
info.eventType = messageHeader.eventType;
info.flags = messageHeader.flags;
- info.timestamp = messageHeader.timestamp;
+ info.iTimestamp = messageHeader.timestamp;
info.cbBlob = messageHeader.cbBlob;
info.pBlob = (char *)memBuf.c_str();
HistoryEventList::GetObjectDescription(&info, _str, MAXSELECTSTR);
diff --git a/plugins/BasicHistory/src/EventList.cpp b/plugins/BasicHistory/src/EventList.cpp
index 7a5ba2f3b0..e4cf87a0ba 100644
--- a/plugins/BasicHistory/src/EventList.cpp
+++ b/plugins/BasicHistory/src/EventList.cpp
@@ -63,11 +63,11 @@ bool HistoryEventList::CanShowHistory(DBEVENTINFO* dbei)
{
if (m_deltaTime != 0) {
if (m_deltaTime > 0) {
- if (m_now - m_deltaTime < dbei->timestamp)
+ if (m_now - m_deltaTime < dbei->getUnixtime())
return false;
}
else {
- if (m_now + m_deltaTime > dbei->timestamp)
+ if (m_now + m_deltaTime > dbei->getUnixtime())
return false;
}
}
@@ -501,7 +501,7 @@ void HistoryEventList::MargeMessages(const std::vector<IImport::ExternalMessage>
if (it->isExternal) {
IImport::ExternalMessage& msg = m_importedMessages[it->exIdx];
dbei.flags |= DBEF_READ;
- dbei.timestamp = msg.timestamp;
+ dbei.iTimestamp = msg.timestamp;
// For now I do not convert event data from string to blob, and event type must be message to handle it properly
dbei.eventType = EVENTTYPE_MESSAGE;
UINT cp = dbei.flags & DBEF_UTF ? CP_UTF8 : CP_ACP;
@@ -532,7 +532,7 @@ bool HistoryEventList::GetEventData(const EventIndex& ev, EventData& data)
if (db_event_get(ev.hEvent, &m_dbei) == 0) {
data.isMe = (m_dbei.flags & DBEF_SENT) != 0;
data.eventType = m_dbei.eventType;
- data.timestamp = m_dbei.timestamp;
+ data.timestamp = m_dbei.getUnixtime();
return true;
}
}
@@ -552,7 +552,7 @@ void HistoryEventList::GetExtEventDBei(const EventIndex& ev)
IImport::ExternalMessage& em = m_importedMessages[ev.exIdx];
m_dbei.flags = em.flags | 0x800;
m_dbei.eventType = em.eventType;
- m_dbei.timestamp = em.timestamp;
+ m_dbei.iTimestamp = em.timestamp;
}
HICON HistoryEventList::GetEventCoreIcon(const EventIndex& ev)
diff --git a/plugins/BasicHistory/src/Scheduler.cpp b/plugins/BasicHistory/src/Scheduler.cpp
index 98202c2382..e778f152a4 100644
--- a/plugins/BasicHistory/src/Scheduler.cpp
+++ b/plugins/BasicHistory/src/Scheduler.cpp
@@ -1278,7 +1278,7 @@ void DoError(const TaskOptions& to, const std::wstring _error)
DBEVENTINFO dbei = {};
dbei.szModule = MODULENAME;
dbei.flags = DBEF_UTF | DBEF_READ;
- dbei.timestamp = time(0);
+ dbei.iTimestamp = time(0);
// For now I do not convert event data from string to blob, and event type must be message to handle it properly
dbei.eventType = EVENTTYPE_MESSAGE;
int len = (int)error.length() + 1;
diff --git a/plugins/BasicHistory/src/stdafx.cxx b/plugins/BasicHistory/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/BasicHistory/src/stdafx.cxx
+++ b/plugins/BasicHistory/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/Boltun/src/actionQueue.cpp b/plugins/Boltun/src/actionQueue.cpp
index edc37f2194..41235cbe5a 100644
--- a/plugins/Boltun/src/actionQueue.cpp
+++ b/plugins/Boltun/src/actionQueue.cpp
@@ -92,7 +92,7 @@ static void TimerAnswer(MCONTACT hContact, const TalkBot::MessageInfo* info)
dbei.eventType = EVENTTYPE_MESSAGE;
dbei.flags = DBEF_SENT | DBEF_UTF;
dbei.szModule = BOLTUN_NAME;
- dbei.timestamp = (uint32_t)time(0);
+ dbei.iTimestamp = (uint32_t)time(0);
db_event_add(hContact, &dbei);
bot->AnswerGiven(hContact, *info);
diff --git a/plugins/Boltun/src/stdafx.cxx b/plugins/Boltun/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/Boltun/src/stdafx.cxx
+++ b/plugins/Boltun/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/BossKeyPlus/src/BossKeyIdle.cpp b/plugins/BossKeyPlus/src/BossKeyIdle.cpp
index a7188a4945..9d6aa41ce0 100644
--- a/plugins/BossKeyPlus/src/BossKeyIdle.cpp
+++ b/plugins/BossKeyPlus/src/BossKeyIdle.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-05 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/BossKeyPlus/src/stdafx.cxx b/plugins/BossKeyPlus/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/BossKeyPlus/src/stdafx.cxx
+++ b/plugins/BossKeyPlus/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/BuddyExpectator/src/BuddyExpectator.cpp b/plugins/BuddyExpectator/src/BuddyExpectator.cpp
index 641af4fbaf..ca43b1bfd3 100644
--- a/plugins/BuddyExpectator/src/BuddyExpectator.cpp
+++ b/plugins/BuddyExpectator/src/BuddyExpectator.cpp
@@ -85,7 +85,7 @@ time_t getLastInputMsg(MCONTACT hContact)
DBEVENTINFO dbei = {};
db_event_get(hDbEvent, &dbei);
if (dbei.eventType == EVENTTYPE_MESSAGE && !(dbei.flags & DBEF_SENT))
- return dbei.timestamp;
+ return dbei.getUnixtime();
}
return -1;
}
diff --git a/plugins/BuddyExpectator/src/stdafx.cxx b/plugins/BuddyExpectator/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/BuddyExpectator/src/stdafx.cxx
+++ b/plugins/BuddyExpectator/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/BuddyPounce/src/main.cpp b/plugins/BuddyPounce/src/main.cpp
index f6a8ea1c9c..8c5828171d 100644
--- a/plugins/BuddyPounce/src/main.cpp
+++ b/plugins/BuddyPounce/src/main.cpp
@@ -49,7 +49,7 @@ int MsgAck(WPARAM, LPARAM lParam)
dbei.eventType = EVENTTYPE_MESSAGE;
dbei.flags = DBEF_UTF | DBEF_SENT;
dbei.szModule = (char*)ack->szModule;
- dbei.timestamp = time(0);
+ dbei.iTimestamp = time(0);
dbei.cbBlob = (int)mir_strlen(pszUtf) + 1;
dbei.pBlob = pszUtf;
db_event_add(ack->hContact, &dbei);
diff --git a/plugins/BuddyPounce/src/options.cpp b/plugins/BuddyPounce/src/options.cpp
index 64448d8084..6706547af7 100644
--- a/plugins/BuddyPounce/src/options.cpp
+++ b/plugins/BuddyPounce/src/options.cpp
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/BuddyPounce/src/stdafx.cxx b/plugins/BuddyPounce/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/BuddyPounce/src/stdafx.cxx
+++ b/plugins/BuddyPounce/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/CSList/src/stdafx.cxx b/plugins/CSList/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/CSList/src/stdafx.cxx
+++ b/plugins/CSList/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/CSList/src/version.h b/plugins/CSList/src/version.h
index eae98c55bc..5be285aa7b 100644
--- a/plugins/CSList/src/version.h
+++ b/plugins/CSList/src/version.h
@@ -10,4 +10,4 @@
#define __DESCRIPTION "This plugin offers simple management functions to keep your extra statuses on one place."
#define __AUTHOR "Mataes, jarvis"
#define __AUTHORWEB "https://miranda-ng.org/p/CSList"
-#define __COPYRIGHT "© 2010-24 Mataes, 2007-09 jarvis"
+#define __COPYRIGHT "© 2010-25 Mataes, 2007-09 jarvis"
diff --git a/plugins/ChangeKeyboardLayout/src/stdafx.cxx b/plugins/ChangeKeyboardLayout/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/ChangeKeyboardLayout/src/stdafx.cxx
+++ b/plugins/ChangeKeyboardLayout/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/ClientChangeNotify/src/OptDlg.cpp b/plugins/ClientChangeNotify/src/OptDlg.cpp
index 15e7879c32..62a01e4aed 100644
--- a/plugins/ClientChangeNotify/src/OptDlg.cpp
+++ b/plugins/ClientChangeNotify/src/OptDlg.cpp
@@ -194,6 +194,6 @@ void InitOptions()
g_PopupOptPage.Items.AddElem(new COptItem_Generic(IDC_POPUPOPTDLG_STATIC_DEFAULT, IDC_POPUPOPTDLG_POPUPNOTIFY));
g_PopupOptPage.Items.AddElem(new COptItem_Generic(IDC_POPUPOPTDLG_STATIC_INFINITE, IDC_POPUPOPTDLG_POPUPNOTIFY));
g_PopupOptPage.Items.AddElem(new COptItem_Generic(IDC_POPUPOPTDLG_STATIC_IGNORESTRINGS, IDC_POPUPOPTDLG_POPUPNOTIFY));
- g_PopupOptPage.Items.AddElem(new COptItem_Edit(IDC_POPUPOPTDLG_IGNORESTRINGS, DB_IGNORESUBSTRINGS, IGNORESTRINGS_MAX_LEN, L"gmail;skype;/Miranda[0-9A-F]{8}/", IDC_POPUPOPTDLG_POPUPNOTIFY));
+ g_PopupOptPage.Items.AddElem(new COptItem_Edit(IDC_POPUPOPTDLG_IGNORESTRINGS, DB_IGNORESUBSTRINGS, IGNORESTRINGS_MAX_LEN, L"gmail;teams;/Miranda[0-9A-F]{8}/", IDC_POPUPOPTDLG_POPUPNOTIFY));
g_PopupOptPage.Items.AddElem(new COptItem_Generic(IDC_POPUPOPTDLG_STATIC_REGEXP, IDC_POPUPOPTDLG_POPUPNOTIFY));
}
diff --git a/plugins/ClientChangeNotify/src/stdafx.cxx b/plugins/ClientChangeNotify/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/ClientChangeNotify/src/stdafx.cxx
+++ b/plugins/ClientChangeNotify/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/Clist_blind/src/clc.cpp b/plugins/Clist_blind/src/clc.cpp
index d8e912baf8..4f0aaea77a 100644
--- a/plugins/Clist_blind/src/clc.cpp
+++ b/plugins/Clist_blind/src/clc.cpp
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/Clist_blind/src/clc.h b/plugins/Clist_blind/src/clc.h
index ef23f549c7..4c602c1b73 100644
--- a/plugins/Clist_blind/src/clc.h
+++ b/plugins/Clist_blind/src/clc.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-03 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_blind/src/clcopts.cpp b/plugins/Clist_blind/src/clcopts.cpp
index a247ebd3c6..084ecfe5fa 100644
--- a/plugins/Clist_blind/src/clcopts.cpp
+++ b/plugins/Clist_blind/src/clcopts.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-03 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_blind/src/clistmenus.cpp b/plugins/Clist_blind/src/clistmenus.cpp
index b68861f9b1..b3dc80a798 100644
--- a/plugins/Clist_blind/src/clistmenus.cpp
+++ b/plugins/Clist_blind/src/clistmenus.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-03 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_blind/src/clistopts.cpp b/plugins/Clist_blind/src/clistopts.cpp
index a0596851d0..b45521f4e5 100644
--- a/plugins/Clist_blind/src/clistopts.cpp
+++ b/plugins/Clist_blind/src/clistopts.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-03 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -21,6 +21,7 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
#include "stdafx.h"
class CGenOptsDlg : public CDlgBase
@@ -39,18 +40,17 @@ public:
bool OnInitDialog() override
{
- CheckDlgButton(m_hwnd, IDC_SORTBYNAME, !g_plugin.getByte("SortByStatus", SETTING_SORTBYSTATUS_DEFAULT) && !g_plugin.getByte("SortByProto", SETTING_SORTBYPROTO_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(m_hwnd, IDC_SORTBYSTATUS, g_plugin.getByte("SortByStatus", SETTING_SORTBYSTATUS_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(m_hwnd, IDC_SORTBYPROTO, g_plugin.getByte("SortByProto", SETTING_SORTBYPROTO_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(m_hwnd, IDC_SORTBYNAME, !g_plugin.bSortByStatus && !g_plugin.bSortByProto ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(m_hwnd, IDC_SORTBYSTATUS, g_plugin.bSortByStatus ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(m_hwnd, IDC_SORTBYPROTO, g_plugin.bSortByProto ? BST_CHECKED : BST_UNCHECKED);
- int iTrayIcon = g_plugin.getByte("TrayIcon", SETTING_TRAYICON_DEFAULT);
- chkCycle.SetState(iTrayIcon == SETTING_TRAYICON_CYCLE);
- chkDontCycle.SetState(iTrayIcon == SETTING_TRAYICON_SINGLE);
+ chkCycle.SetState(Clist::iTrayIcon == SETTING_TRAYICON_CYCLE);
+ chkDontCycle.SetState(Clist::iTrayIcon == SETTING_TRAYICON_SINGLE);
- CheckDlgButton(m_hwnd, IDC_ALWAYSMULTI, !g_plugin.getByte("AlwaysMulti", SETTING_ALWAYSMULTI_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(m_hwnd, IDC_ALWAYSMULTI, !Clist::bAlwaysMulti ? BST_CHECKED : BST_UNCHECKED);
SendDlgItemMessage(m_hwnd, IDC_CYCLETIMESPIN, UDM_SETRANGE, 0, MAKELONG(120, 1));
- SendDlgItemMessage(m_hwnd, IDC_CYCLETIMESPIN, UDM_SETPOS, 0, MAKELONG(g_plugin.getWord("CycleTime", SETTING_CYCLETIME_DEFAULT), 0));
+ SendDlgItemMessage(m_hwnd, IDC_CYCLETIMESPIN, UDM_SETPOS, 0, MAKELONG(Clist::iCycleTime, 0));
ptrA szPrimaryStatus(g_plugin.getStringA("PrimaryStatus"));
@@ -76,11 +76,11 @@ public:
{
int iTrayIcon = chkDontCycle.IsChecked() ? SETTING_TRAYICON_SINGLE : (chkCycle.IsChecked() ? SETTING_TRAYICON_CYCLE : SETTING_TRAYICON_MULTI);
- g_plugin.setByte("SortByStatus", (uint8_t)(g_bSortByStatus = IsDlgButtonChecked(m_hwnd, IDC_SORTBYSTATUS)));
- g_plugin.setByte("SortByProto", (uint8_t)(g_bSortByProto = IsDlgButtonChecked(m_hwnd, IDC_SORTBYPROTO)));
- g_plugin.setByte("AlwaysMulti", (uint8_t)!IsDlgButtonChecked(m_hwnd, IDC_ALWAYSMULTI));
- g_plugin.setByte("TrayIcon", iTrayIcon);
- g_plugin.setWord("CycleTime", (uint16_t)SendDlgItemMessage(m_hwnd, IDC_CYCLETIMESPIN, UDM_GETPOS, 0, 0));
+ g_plugin.bSortByStatus = g_bSortByStatus = IsDlgButtonChecked(m_hwnd, IDC_SORTBYSTATUS);
+ g_plugin.bSortByProto = g_bSortByProto = IsDlgButtonChecked(m_hwnd, IDC_SORTBYPROTO);
+ Clist::bAlwaysMulti = !IsDlgButtonChecked(m_hwnd, IDC_ALWAYSMULTI);
+ Clist::iTrayIcon = iTrayIcon;
+ Clist::iCycleTime = SendDlgItemMessage(m_hwnd, IDC_CYCLETIMESPIN, UDM_GETPOS, 0, 0);
int cur = SendDlgItemMessage(m_hwnd, IDC_PRIMARYSTATUS, CB_GETCURSEL, 0, 0);
PROTOACCOUNT *pa = (PROTOACCOUNT *)SendDlgItemMessage(m_hwnd, IDC_PRIMARYSTATUS, CB_GETITEMDATA, cur, 0);
diff --git a/plugins/Clist_blind/src/cluiopts.cpp b/plugins/Clist_blind/src/cluiopts.cpp
index 3a7e6b6da0..3be421c2e7 100644
--- a/plugins/Clist_blind/src/cluiopts.cpp
+++ b/plugins/Clist_blind/src/cluiopts.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-03 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -31,6 +31,7 @@ class CCluiOptsDlg : public CDlgBase
{
CCtrlSpin spinMaxSize, spinHideTime;
CCtrlCheck chkAutoHide, chkAutoSize, chkCaption, chkToolWnd, chkTransparent;
+ CCtrlCheck chkShowMainMenu, chkClientDrag, chkOnTop, chkMin2tray, chkBringToFront;
CCtrlSlider m_active, m_inactive;
public:
@@ -38,14 +39,29 @@ public:
CDlgBase(g_plugin, IDD_OPT_CLUI),
m_active(this, IDC_TRANSACTIVE, 255, 1),
m_inactive(this, IDC_TRANSINACTIVE, 255, 1),
+ chkOnTop(this, IDC_ONTOP),
chkCaption(this, IDC_SHOWCAPTION),
chkToolWnd(this, IDC_TOOLWND),
chkAutoHide(this, IDC_AUTOHIDE),
chkAutoSize(this, IDC_AUTOSIZE),
+ chkMin2tray(this, IDC_MIN2TRAY),
+ chkClientDrag(this, IDC_CLIENTDRAG),
chkTransparent(this, IDC_TRANSPARENT),
+ chkBringToFront(this, IDC_BRINGTOFRONT),
+ chkShowMainMenu(this, IDC_SHOWMAINMENU),
spinMaxSize(this, IDC_MAXSIZESPIN, 100),
spinHideTime(this, IDC_HIDETIMESPIN, 900, 1)
{
+ CreateLink(chkOnTop, Clist::bOnTop);
+ CreateLink(chkCaption, Clist::bShowCaption);
+ CreateLink(chkToolWnd, Clist::bToolWindow);
+ CreateLink(chkAutoHide, Clist::bAutoHide);
+ CreateLink(chkMin2tray, Clist::bMinimizeToTray);
+ CreateLink(chkClientDrag, Clist::bClientAreaDrag);
+ CreateLink(chkTransparent, Clist::bTransparent);
+ CreateLink(chkBringToFront, Clist::bBringToFront);
+ CreateLink(chkShowMainMenu, Clist::bShowMainMenu);
+
m_active.OnChange = m_inactive.OnChange = Callback(this, &CCluiOptsDlg::onChange_Slider);
chkCaption.OnChange = Callback(this, &CCluiOptsDlg::onChange_Caption);
@@ -57,24 +73,15 @@ public:
bool OnInitDialog() override
{
- CheckDlgButton(m_hwnd, IDC_BRINGTOFRONT, g_plugin.getByte("BringToFront", SETTING_BRINGTOFRONT_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(m_hwnd, IDC_ONTOP, g_plugin.getByte("OnTop", SETTING_ONTOP_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(m_hwnd, IDC_TOOLWND, g_plugin.getByte("ToolWindow", SETTING_TOOLWINDOW_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(m_hwnd, IDC_MIN2TRAY, g_plugin.getByte("Min2Tray", SETTING_MIN2TRAY_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(m_hwnd, IDC_SHOWMAINMENU, db_get_b(0, "CLUI", "ShowMainMenu", SETTING_SHOWMAINMENU_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(m_hwnd, IDC_CLIENTDRAG, db_get_b(0, "CLUI", "ClientAreaDrag", SETTING_CLIENTDRAG_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(m_hwnd, IDC_FADEINOUT, db_get_b(0, "CLUI", "FadeInOut", 0) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(m_hwnd, IDC_DROPSHADOW, g_plugin.getByte("WindowShadow", 0) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(m_hwnd, IDC_ONDESKTOP, g_plugin.getByte("OnDesktop", 0) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(m_hwnd, IDC_AUTOSIZEUPWARD, db_get_b(0, "CLUI", "AutoSizeUpward", 0) ? BST_CHECKED : BST_UNCHECKED);
spinMaxSize.SetPosition(db_get_b(0, "CLUI", "MaxSizeHeight", 75));
- spinHideTime.SetPosition(g_plugin.getWord("HideTime", SETTING_HIDETIME_DEFAULT));
+ spinHideTime.SetPosition(Clist::iHideTime);
- chkCaption.SetState(db_get_b(0, "CLUI", "ShowCaption", SETTING_SHOWCAPTION_DEFAULT));
chkAutoSize.SetState(db_get_b(0, "CLUI", "AutoSize", 0));
- chkAutoHide.SetState(g_plugin.getByte("AutoHide", SETTING_AUTOHIDE_DEFAULT));
- chkTransparent.SetState(g_plugin.getByte("Transparent", SETTING_TRANSPARENT_DEFAULT));
ptrW wszTitle(g_plugin.getWStringA("TitleText"));
if (wszTitle)
@@ -82,34 +89,25 @@ public:
else
SetDlgItemTextA(m_hwnd, IDC_TITLETEXT, MIRANDANAME);
- m_active.SetPosition(g_plugin.getByte("Alpha", SETTING_ALPHA_DEFAULT));
- m_inactive.SetPosition(g_plugin.getByte("AutoAlpha", SETTING_AUTOALPHA_DEFAULT));
+ m_active.SetPosition(Clist::iAlpha);
+ m_inactive.SetPosition(Clist::iAutoAlpha);
return true;
}
bool OnApply() override
{
- g_plugin.setByte("OnTop", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_ONTOP));
- g_plugin.setByte("ToolWindow", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_TOOLWND));
- g_plugin.setByte("BringToFront", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_BRINGTOFRONT));
db_set_b(0, "CLUI", "FadeInOut", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_FADEINOUT));
db_set_b(0, "CLUI", "AutoSizeUpward", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_AUTOSIZEUPWARD));
g_plugin.setByte("WindowShadow", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_DROPSHADOW));
g_plugin.setByte("OnDesktop", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_ONDESKTOP));
- db_set_b(0, "CLUI", "ShowCaption", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_SHOWCAPTION));
- db_set_b(0, "CLUI", "ShowMainMenu", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_SHOWMAINMENU));
- db_set_b(0, "CLUI", "ClientAreaDrag", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_CLIENTDRAG));
- g_plugin.setByte("Min2Tray", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_MIN2TRAY));
- g_plugin.setWord("HideTime", spinHideTime.GetPosition());
+ Clist::iHideTime = spinHideTime.GetPosition();
db_set_b(0, "CLUI", "MaxSizeHeight", spinMaxSize.GetPosition());
db_set_b(0, "CLUI", "AutoSize", chkAutoSize.GetState());
- g_plugin.setByte("AutoHide", chkAutoHide.GetState());
- g_plugin.setByte("Transparent", chkTransparent.GetState());
- g_plugin.setByte("Alpha", m_active.GetPosition());
- g_plugin.setByte("AutoAlpha", m_inactive.GetPosition());
+ Clist::iAlpha = m_active.GetPosition();
+ Clist::iAutoAlpha = m_inactive.GetPosition();
wchar_t title[256];
GetDlgItemText(m_hwnd, IDC_TITLETEXT, title, _countof(title));
@@ -157,7 +155,7 @@ public:
ShowWindow(g_clistApi.hwndContactList, IsDlgButtonChecked(m_hwnd, IDC_MIN2TRAY) ? SW_HIDE : SW_SHOW);
if (IsDlgButtonChecked(m_hwnd, IDC_TRANSPARENT)) {
SetWindowLongPtr(g_clistApi.hwndContactList, GWL_EXSTYLE, GetWindowLongPtr(g_clistApi.hwndContactList, GWL_EXSTYLE) | WS_EX_LAYERED);
- SetLayeredWindowAttributes(g_clistApi.hwndContactList, RGB(0, 0, 0), (uint8_t)g_plugin.getByte("AutoAlpha", SETTING_AUTOALPHA_DEFAULT), LWA_ALPHA);
+ SetLayeredWindowAttributes(g_clistApi.hwndContactList, RGB(0, 0, 0), Clist::iAutoAlpha, LWA_ALPHA);
}
else SetWindowLongPtr(g_clistApi.hwndContactList, GWL_EXSTYLE, GetWindowLongPtr(g_clistApi.hwndContactList, GWL_EXSTYLE) & ~WS_EX_LAYERED);
diff --git a/plugins/Clist_blind/src/contact.cpp b/plugins/Clist_blind/src/contact.cpp
index a6b983e732..c25cdf3540 100644
--- a/plugins/Clist_blind/src/contact.cpp
+++ b/plugins/Clist_blind/src/contact.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-12 Miranda IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_blind/src/init.cpp b/plugins/Clist_blind/src/init.cpp
index 88c3189b24..59a30677e0 100644
--- a/plugins/Clist_blind/src/init.cpp
+++ b/plugins/Clist_blind/src/init.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-05 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -56,7 +56,9 @@ PLUGININFOEX pluginInfoEx = {
};
CMPlugin::CMPlugin() :
- PLUGIN<CMPlugin>("CList", pluginInfoEx)
+ PLUGIN<CMPlugin>("CList", pluginInfoEx),
+ bSortByProto(m_szModuleName, "SortByProto", false),
+ bSortByStatus(m_szModuleName, "SortByStatus", false)
{
}
@@ -107,8 +109,8 @@ static INT_PTR GetStatusMode(WPARAM, LPARAM)
int CMPlugin::Load()
{
- g_bSortByStatus = g_plugin.getByte("SortByStatus", SETTING_SORTBYSTATUS_DEFAULT);
- g_bSortByProto = g_plugin.getByte("SortByProto", SETTING_SORTBYPROTO_DEFAULT);
+ g_bSortByStatus = bSortByStatus;
+ g_bSortByProto = bSortByProto;
InitClc();
CreateServiceFunction(MS_CLIST_GETSTATUSMODE, GetStatusMode);
diff --git a/plugins/Clist_blind/src/stdafx.cxx b/plugins/Clist_blind/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/Clist_blind/src/stdafx.cxx
+++ b/plugins/Clist_blind/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/Clist_blind/src/stdafx.h b/plugins/Clist_blind/src/stdafx.h
index b8162564f8..5bd713b3db 100644
--- a/plugins/Clist_blind/src/stdafx.h
+++ b/plugins/Clist_blind/src/stdafx.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-05 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -43,6 +43,8 @@ struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+ CMOption<bool> bSortByStatus, bSortByProto;
+
int Load() override;
};
diff --git a/plugins/Clist_blind/src/utils.cpp b/plugins/Clist_blind/src/utils.cpp
index bb17148c78..3fb289ef69 100644
--- a/plugins/Clist_blind/src/utils.cpp
+++ b/plugins/Clist_blind/src/utils.cpp
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/Clist_blind/src/version.h b/plugins/Clist_blind/src/version.h
index 0c31269d54..7c0ba2a6da 100644
--- a/plugins/Clist_blind/src/version.h
+++ b/plugins/Clist_blind/src/version.h
@@ -10,4 +10,4 @@
#define __DESCRIPTION "A contact list for blind folks."
#define __AUTHOR "Ricardo Pescuma Domenecci, based on previous work from Miranda IM project"
#define __AUTHORWEB "https://miranda-ng.org/p/Clist_blind"
-#define __COPYRIGHT "© 2000-2009 Miranda IM project, Ricardo Pescuma Domenecci, 2013-24 Miranda NG team"
+#define __COPYRIGHT "© 2000-2009 Miranda IM project, Ricardo Pescuma Domenecci, 2013-25 Miranda NG team"
diff --git a/plugins/Clist_modern/clist_modern.vcxproj b/plugins/Clist_modern/clist_modern.vcxproj
index e6025e0e85..7490406f15 100644
--- a/plugins/Clist_modern/clist_modern.vcxproj
+++ b/plugins/Clist_modern/clist_modern.vcxproj
@@ -48,7 +48,6 @@
<ClCompile Include="src\modern_clui.cpp" />
<ClCompile Include="src\modern_cluiservices.cpp" />
<ClCompile Include="src\modern_contact.cpp" />
- <ClCompile Include="src\modern_docking.cpp" />
<ClCompile Include="src\modern_gdiplus.cpp" />
<ClCompile Include="src\modern_global.cpp" />
<ClCompile Include="src\modern_image_array.cpp" />
diff --git a/plugins/Clist_modern/clist_modern.vcxproj.filters b/plugins/Clist_modern/clist_modern.vcxproj.filters
index e16c49886b..305bf19814 100644
--- a/plugins/Clist_modern/clist_modern.vcxproj.filters
+++ b/plugins/Clist_modern/clist_modern.vcxproj.filters
@@ -68,9 +68,6 @@
<ClCompile Include="src\modern_contact.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="src\modern_docking.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
<ClCompile Include="src\modern_gdiplus.cpp">
<Filter>Source Files</Filter>
</ClCompile>
diff --git a/plugins/Clist_modern/res/resource.rc b/plugins/Clist_modern/res/resource.rc
index fca73ca0c9..113270c02a 100644
--- a/plugins/Clist_modern/res/resource.rc
+++ b/plugins/Clist_modern/res/resource.rc
@@ -332,7 +332,6 @@ BEGIN
CONTROL "Disabled",IDC_EVENTAREA_NONE,"Button",BS_AUTORADIOBUTTON,148,174,115,8
CONTROL "Show automatically",IDC_EVENTAREA,"Button",BS_AUTORADIOBUTTON,148,186,115,8
CONTROL "Always visible",IDC_EVENTAREA_ALWAYS,"Button",BS_AUTORADIOBUTTON,148,198,115,8
- CONTROL "Dock to sides",IDC_DOCKTOSIDES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,206,118,8
LTEXT "and minimum",IDC_STATIC24,105,128,50,8
EDITTEXT IDC_MINSIZEHEIGHT,160,126,31,12,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER
CONTROL "",IDC_MINSIZESPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_HOTTRACK,192,125,9,14
@@ -451,7 +450,6 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
GROUPBOX "Appearance",IDC_STWINDOWGROUP,4,11,115,37
CONTROL "Always on top",IDC_ONTOP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,21,102,8
- CONTROL "Pin to desktop",IDC_ONDESKTOP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,33,102,8
GROUPBOX "Client area margins",IDC_FRAME_META2,124,64,179,45
EDITTEXT IDC_LEFTMARGIN,152,82,33,12,ES_NUMBER
CONTROL "",IDC_LEFTMARGINSPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,174,83,11,12
diff --git a/plugins/Clist_modern/src/cluiframes.cpp b/plugins/Clist_modern/src/cluiframes.cpp
index 4413554500..b980f7b9cf 100644
--- a/plugins/Clist_modern/src/cluiframes.cpp
+++ b/plugins/Clist_modern/src/cluiframes.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -138,17 +138,10 @@ int SetAlpha(uint8_t Alpha)
HWND hwnd = F.OwnerWindow;
long l = GetWindowLongPtr(hwnd, GWL_EXSTYLE);
if (!(l & WS_EX_LAYERED)) {
- HWND parent = nullptr;
- if (g_CluiData.fOnDesktop) {
- HWND hProgMan = FindWindow(L"Progman", nullptr);
- if (IsWindow(hProgMan))
- parent = hProgMan;
- }
-
CLUI_ShowWindowMod(hwnd, SW_HIDE);
SetParent(hwnd, nullptr);
SetWindowLongPtr(hwnd, GWL_EXSTYLE, l | WS_EX_LAYERED);
- SetParent(hwnd, parent);
+ SetParent(hwnd, nullptr);
if (l&WS_VISIBLE) CLUI_ShowWindowMod(hwnd, SW_SHOW);
}
SetLayeredWindowAttributes(hwnd, g_CluiData.dwKeyColor, Alpha, LWA_ALPHA | LWA_COLORKEY);
@@ -174,21 +167,14 @@ int CLUIFrames_ActivateSubContainers(BOOL active)
{
for (int i = 0; i < g_nFramesCount; i++) {
FRAMEWND &F = g_pfwFrames[i];
- if (active && !F.floating && F.OwnerWindow != (HWND)nullptr && F.OwnerWindow != (HWND)-2 && F.visible && !F.needhide) {
- if (g_plugin.getByte("OnDesktop", SETTING_ONDESKTOP_DEFAULT)) {
- SetWindowPos(F.OwnerWindow, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
- SetWindowPos(F.OwnerWindow, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
- }
- else SetWindowPos(F.OwnerWindow, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOMOVE);
- }
+ if (active && !F.floating && F.OwnerWindow != (HWND)nullptr && F.OwnerWindow != (HWND)-2 && F.visible && !F.needhide)
+ SetWindowPos(F.OwnerWindow, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOMOVE);
}
return 0;
}
int CLUIFrames_SetParentForContainers(HWND parent)
{
- g_CluiData.fOnDesktop = (parent && parent != g_clistApi.hwndContactList);
-
for (int i = 0; i < g_nFramesCount; i++) {
FRAMEWND &F = g_pfwFrames[i];
if (!F.floating && F.OwnerWindow != (HWND)nullptr && F.OwnerWindow != (HWND)-2 && F.visible && !F.needhide) {
@@ -218,11 +204,7 @@ int CLUIFrames_OnShowHide(int mode)
if (mode != SW_HIDE) {
SetWindowPos(F.OwnerWindow, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
- if (g_plugin.getByte("OnDesktop", SETTING_ONDESKTOP_DEFAULT)) {
- SetWindowPos(F.OwnerWindow, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
- SetWindowPos(F.OwnerWindow, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
- }
- else SetWindowPos(F.OwnerWindow, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOMOVE);
+ SetWindowPos(F.OwnerWindow, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOMOVE);
}
}
@@ -1348,9 +1330,6 @@ static int _us_DoCollapseFrame(WPARAM wParam, LPARAM lParam)
if (FrameId >= 0 && FrameId < g_nFramesCount) {
// do not collapse/uncollapse client/locked/invisible frames
if (g_pfwFrames[FrameId].align == alClient && !(g_pfwFrames[FrameId].Locked || (!g_pfwFrames[FrameId].visible) || g_pfwFrames[FrameId].floating)) {
- if (Clist_IsDocked())
- return 0;
-
if (g_CluiData.fDocked || !g_CluiData.fAutoSize) {
RECT rc;
GetWindowRect(g_clistApi.hwndContactList, &rc);
@@ -2620,8 +2599,8 @@ static LRESULT CALLBACK CLUIFrameTitleBarProc(HWND hwnd, UINT msg, WPARAM wParam
//ScreenToClient(Frames[framepos].ContainerWnd,&Frames[framepos].TitleBar.oldpos);
- if ((!(wParam&MK_CONTROL)) && g_pfwFrames[framepos].Locked && (!(g_pfwFrames[framepos].floating))) {
- if (db_get_b(0, "CLUI", "ClientAreaDrag", SETTING_CLIENTDRAG_DEFAULT)) {
+ if ((!(wParam & MK_CONTROL)) && g_pfwFrames[framepos].Locked && (!(g_pfwFrames[framepos].floating))) {
+ if (Clist::bClientAreaDrag) {
POINT pt;
int res;
//pt = nm->pt;
@@ -2939,12 +2918,11 @@ static LRESULT CALLBACK CLUIFrameSubContainerProc(HWND hwnd, UINT msg, WPARAM wP
switch (msg) {
case WM_ACTIVATE:
if (g_bTransparentFlag) {
- uint8_t alpha;
if ((wParam != WA_INACTIVE || ((HWND)lParam == hwnd) || GetParent((HWND)lParam) == hwnd)) {
HWND hw = lParam ? GetParent((HWND)lParam) : nullptr;
- alpha = g_plugin.getByte("Alpha", SETTING_ALPHA_DEFAULT);
- if (hw) SetWindowPos(hw, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE);
- CLUI_SmoothAlphaTransition(hwnd, alpha, 1);
+ if (hw)
+ SetWindowPos(hw, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE);
+ CLUI_SmoothAlphaTransition(hwnd, Clist::iAlpha, 1);
}
}
@@ -2989,12 +2967,6 @@ static HWND CreateSubContainerWindow(HWND parent, int x, int y, int width, int h
{
HWND hwnd = CreateWindowEx(WS_EX_LAYERED, CLUIFrameSubContainerClassName, L"SubContainerWindow", WS_POPUP | (!g_CluiData.fLayered ? WS_BORDER : 0), x, y, width, height, parent, nullptr, g_plugin.getInst(), nullptr);
SetWindowLongPtr(hwnd, GWL_STYLE, GetWindowLongPtr(hwnd, GWL_STYLE) & ~(WS_CAPTION | WS_BORDER));
- if (g_CluiData.fOnDesktop) {
- HWND hProgMan = FindWindow(L"Progman", nullptr);
- if (IsWindow(hProgMan))
- SetParent(hwnd, hProgMan);
- }
-
return hwnd;
}
@@ -3121,7 +3093,7 @@ static LRESULT CALLBACK CLUIFrameContainerWndProc(HWND hwnd, UINT msg, WPARAM wP
return 0;
case WM_LBUTTONDOWN:
- if (db_get_b(0, "CLUI", "ClientAreaDrag", SETTING_CLIENTDRAG_DEFAULT)) {
+ if (Clist::bClientAreaDrag) {
POINT pt;
GetCursorPos(&pt);
return SendMessage(hwnd, WM_SYSCOMMAND, SC_MOVE | HTCAPTION, MAKELPARAM(pt.x, pt.y));
diff --git a/plugins/Clist_modern/src/groupmenu.cpp b/plugins/Clist_modern/src/groupmenu.cpp
index 282c7c6f3e..b7421d955e 100644
--- a/plugins/Clist_modern/src/groupmenu.cpp
+++ b/plugins/Clist_modern/src/groupmenu.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_modern/src/init.cpp b/plugins/Clist_modern/src/init.cpp
index ac9a10af72..16ee18c048 100644
--- a/plugins/Clist_modern/src/init.cpp
+++ b/plugins/Clist_modern/src/init.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -207,7 +207,6 @@ static HRESULT SubclassClistInterface()
g_clistApi.pfnProcessExternalMessages = cli_ProcessExternalMessages;
g_clistApi.pfnAddEvent = cli_AddEvent;
g_clistApi.pfnFreeEvent = cli_RemoveEvent;
- g_clistApi.pfnDocking_ProcessWindowMessage = Docking_ProcessWindowMessage;
return S_OK;
}
diff --git a/plugins/Clist_modern/src/modern_aniavatars.cpp b/plugins/Clist_modern/src/modern_aniavatars.cpp
index 4531793dd3..f6c72bfa52 100644
--- a/plugins/Clist_modern/src/modern_aniavatars.cpp
+++ b/plugins/Clist_modern/src/modern_aniavatars.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_modern/src/modern_awaymsg.cpp b/plugins/Clist_modern/src/modern_awaymsg.cpp
index ca9d6c7c54..c4f77a5c1a 100644
--- a/plugins/Clist_modern/src/modern_awaymsg.cpp
+++ b/plugins/Clist_modern/src/modern_awaymsg.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_modern/src/modern_awaymsg.h b/plugins/Clist_modern/src/modern_awaymsg.h
index c456151d5b..265bb314bc 100644
--- a/plugins/Clist_modern/src/modern_awaymsg.h
+++ b/plugins/Clist_modern/src/modern_awaymsg.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_modern/src/modern_cache_funcs.h b/plugins/Clist_modern/src/modern_cache_funcs.h
index 9067a99cc9..c1ff953a75 100644
--- a/plugins/Clist_modern/src/modern_cache_funcs.h
+++ b/plugins/Clist_modern/src/modern_cache_funcs.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_modern/src/modern_cachefuncs.cpp b/plugins/Clist_modern/src/modern_cachefuncs.cpp
index b7a06e969b..957fc38634 100644
--- a/plugins/Clist_modern/src/modern_cachefuncs.cpp
+++ b/plugins/Clist_modern/src/modern_cachefuncs.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp
index 7c5a866e33..fdf0aead83 100644
--- a/plugins/Clist_modern/src/modern_clc.cpp
+++ b/plugins/Clist_modern/src/modern_clc.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -159,11 +159,11 @@ static int clcHookDbEventAdded(WPARAM hContact, LPARAM hDbEvent)
if (hContact && hDbEvent) {
DBEVENTINFO dbei = {};
db_event_get(hDbEvent, &dbei);
- if ((dbei.eventType == EVENTTYPE_MESSAGE || dbei.eventType == EVENTTYPE_FILE) && !(dbei.flags & DBEF_SENT)) {
- g_plugin.setDword(hContact, "mf_lastmsg", dbei.timestamp);
+ if ((dbei.eventType == EVENTTYPE_MESSAGE || dbei.eventType == EVENTTYPE_FILE) && !dbei.bSent) {
+ g_plugin.setDword(hContact, "mf_lastmsg", dbei.getUnixtime());
ClcCacheEntry *pdnce = Clist_GetCacheEntry(hContact);
if (pdnce) {
- pdnce->dwLastMsgTime = dbei.timestamp;
+ pdnce->dwLastMsgTime = dbei.getUnixtime();
if (g_CluiData.hasSort(SORTBY_LASTMSG))
Clist_Broadcast(CLM_AUTOREBUILD, hContact, 0);
}
@@ -240,7 +240,7 @@ static int clcSearchNextContact(HWND hwnd, ClcData *dat, int index, const wchar_
int foundindex;
for (; group; group = group->parent)
Clist_SetGroupExpand(hwnd, dat, group, 1);
- foundindex = g_clistApi.pfnGetRowsPriorTo(&dat->list, contactGroup, contactScanIndex);
+ foundindex = g_clistApi.pfnGetRowsPriorTo(dat, contactGroup, contactScanIndex);
if (fReturnAsFound)
return foundindex;
else if (nLastFound != -1 && fSearchUp && foundindex == index)
@@ -508,7 +508,7 @@ static LRESULT clcOnKeyDown(ClcData *dat, HWND hwnd, UINT, WPARAM wParam, LPARAM
}
else if (!contact->iSubNumber && contact->iSubAllocated > 0) {
if (changeGroupExpand == 1 && !contact->bSubExpanded) {
- dat->selection = cliGetRowsPriorTo(&dat->list, group, -1);
+ dat->selection = cliGetRowsPriorTo(dat, group, -1);
selMoved = 1;
}
else if (changeGroupExpand == 1 && contact->bSubExpanded) {
@@ -540,7 +540,7 @@ static LRESULT clcOnKeyDown(ClcData *dat, HWND hwnd, UINT, WPARAM wParam, LPARAM
ClcContact *contact2;
ClcGroup *group2;
if (Clist_FindItem(hwnd, dat, contact->hContact, &contact2, &group2)) {
- int i = cliGetRowsPriorTo(&dat->list, group2, group2->cl.indexOf(contact2));
+ int i = cliGetRowsPriorTo(dat, group2, group2->cl.indexOf(contact2));
Clist_EnsureVisible(hwnd, dat, i + contact->iSubAllocated, 0);
}
}
@@ -551,7 +551,7 @@ static LRESULT clcOnKeyDown(ClcData *dat, HWND hwnd, UINT, WPARAM wParam, LPARAM
else {
if (changeGroupExpand == 1 && contact->type == CLCIT_CONTACT) {
if (group == &dat->list) { SetCapture(hwnd); return 0; }
- dat->selection = cliGetRowsPriorTo(&dat->list, group, -1);
+ dat->selection = cliGetRowsPriorTo(dat, group, -1);
selMoved = 1;
}
else if (contact->type == CLCIT_GROUP) {
@@ -635,7 +635,7 @@ static LRESULT clcOnTimer(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, LPAR
ClcContact *contact;
ClcGroup *group;
if (Clist_FindItem(hwnd, dat, hitcontact->hContact, &contact, &group)) {
- int i = cliGetRowsPriorTo(&dat->list, group, group->cl.indexOf(contact));
+ int i = cliGetRowsPriorTo(dat, group, group->cl.indexOf(contact));
Clist_EnsureVisible(hwnd, dat, i + hitcontact->iSubAllocated, 0);
}
}
@@ -662,7 +662,7 @@ static LRESULT clcOnTimer(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, LPAR
static LRESULT clcOnActivate(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
- TRACE("clcOnActivate\n");
+ // TRACE("clcOnActivate\n");
if (dat->bCompactMode) {
cliRecalcScrollBar(hwnd, dat);
if (dat->hwndRenameEdit == nullptr)
@@ -757,9 +757,9 @@ static LRESULT clcOnLButtonDown(ClcData *dat, HWND hwnd, UINT, WPARAM, LPARAM lP
dat->selection = cliGetRowByIndex(dat, dat->selection, &selcontact, &selgroup);
Clist_SetGroupExpand(hwnd, dat, contact->group, -1);
if (dat->selection != -1) {
- dat->selection = cliGetRowsPriorTo(&dat->list, selgroup, selgroup->cl.indexOf(selcontact));
+ dat->selection = cliGetRowsPriorTo(dat, selgroup, selgroup->cl.indexOf(selcontact));
if (dat->selection == -1)
- dat->selection = cliGetRowsPriorTo(&dat->list, contact->group, -1);
+ dat->selection = cliGetRowsPriorTo(dat, contact->group, -1);
}
if (dat->bCompactMode)
@@ -1401,7 +1401,7 @@ static LRESULT clcOnIntmIconChanged(ClcData *dat, HWND hwnd, UINT, WPARAM wParam
if (hSelItem) {
ClcGroup *selgroup;
if (Clist_FindItem(hwnd, dat, hSelItem, &selcontact, &selgroup))
- dat->selection = g_clistApi.pfnGetRowsPriorTo(&dat->list, selgroup, selgroup->cl.indexOf(selcontact));
+ dat->selection = g_clistApi.pfnGetRowsPriorTo(dat, selgroup, selgroup->cl.indexOf(selcontact));
else
dat->selection = -1;
}
@@ -1645,11 +1645,11 @@ HRESULT ClcLoadModule()
int ClcUnloadModule()
{
if (g_CluiData.bOldUseGroups != -1)
- Clist::UseGroups = g_CluiData.bOldUseGroups;
+ Clist::bUseGroups = g_CluiData.bOldUseGroups;
if (g_CluiData.bOldHideOffline != -1)
- Clist::HideOffline = g_CluiData.bOldHideOffline;
+ Clist::bHideOffline = g_CluiData.bOldHideOffline;
if (g_CluiData.bOldHideEmptyGroups != -1)
- Clist::HideEmptyGroups = g_CluiData.bOldHideEmptyGroups;
+ Clist::bHideEmptyGroups = g_CluiData.bOldHideEmptyGroups;
return 0;
}
diff --git a/plugins/Clist_modern/src/modern_clc.h b/plugins/Clist_modern/src/modern_clc.h
index acd00b27d2..40c17311c3 100644
--- a/plugins/Clist_modern/src/modern_clc.h
+++ b/plugins/Clist_modern/src/modern_clc.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -37,12 +37,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define NIIF_INTERN_UNICODE 0x00000100
-#define SETTING_STATE_HIDDEN 0
-#define SETTING_STATE_MINIMIZED 1
-#define SETTING_STATE_NORMAL 2
-
-#define SETTING_BRINGTOFRONT_DEFAULT 0
-
#define SETTING_AVATAR_OVERLAY_TYPE_NORMAL 0
#define SETTING_AVATAR_OVERLAY_TYPE_PROTOCOL 1
#define SETTING_AVATAR_OVERLAY_TYPE_CONTACT 2
@@ -93,11 +87,6 @@ void clcSetDelayTimer(UINT_PTR uIDEvent, HWND hwnd, int nDelay = -1);
#define DROPTARGET_ONMETACONTACT 6
#define DROPTARGET_ONSUBCONTACT 7
-#define CONTACTF_ONLINE 1
-#define CONTACTF_NOTONLIST 8
-#define CONTACTF_CHECKED 16
-#define CONTACTF_IDLE 32
-
#define AVATAR_POS_DONT_HAVE -1
#define AVATAR_POS_ANIMATED -2
@@ -327,7 +316,6 @@ typedef struct tagOVERLAYICONINFO
void ClcOptionsChanged(void);
// clcidents.c
-int cliGetRowsPriorTo(ClcGroup *group, ClcGroup *subgroup, int contactIndex);
int cliGetRowByIndex(ClcData *dat, int testindex, ClcContact **contact, ClcGroup **subgroup);
// clcitems.c
diff --git a/plugins/Clist_modern/src/modern_clcidents.cpp b/plugins/Clist_modern/src/modern_clcidents.cpp
index 2268bf627b..71b1051653 100644
--- a/plugins/Clist_modern/src/modern_clcidents.cpp
+++ b/plugins/Clist_modern/src/modern_clcidents.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -24,8 +24,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "stdafx.h"
-int cliGetRowsPriorTo(ClcGroup *group, ClcGroup *subgroup, int contactIndex)
+int cliGetRowsPriorTo(ClcData *dat, ClcGroup *subgroup, int contactIndex)
{
+ auto *group = &dat->list;
int count = 0;
int subcontactscount = 0;
bool bMetaExpanding = db_get_b(0, "CLC", "MetaExpanding", SETTING_METAEXPANDING_DEFAULT) != 0;
diff --git a/plugins/Clist_modern/src/modern_clcitems.cpp b/plugins/Clist_modern/src/modern_clcitems.cpp
index 35ac94c13e..13c04b8ea9 100644
--- a/plugins/Clist_modern/src/modern_clcitems.cpp
+++ b/plugins/Clist_modern/src/modern_clcitems.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -40,7 +40,7 @@ void AddSubcontacts(ClcData *dat, ClcContact *cont, BOOL showOfflineHereGroup)
cont->subcontacts = (ClcContact *)mir_calloc(sizeof(ClcContact) * subcount);
cont->iSubAllocated = subcount;
int i = 0;
- int bHideOffline = Clist::HideOffline;
+ int bHideOffline = Clist::bHideOffline;
for (int j = 0; j < subcount; j++) {
MCONTACT hsub = db_mc_getSub(cont->hContact, j);
if (!hsub)
@@ -202,9 +202,9 @@ int RestoreSelection(ClcData *dat, MCONTACT hSelected)
}
if (!selcontact->iSubNumber)
- dat->selection = g_clistApi.pfnGetRowsPriorTo(&dat->list, selgroup, selgroup->cl.indexOf(selcontact));
+ dat->selection = g_clistApi.pfnGetRowsPriorTo(dat, selgroup, selgroup->cl.indexOf(selcontact));
else {
- dat->selection = g_clistApi.pfnGetRowsPriorTo(&dat->list, selgroup, selgroup->cl.indexOf(selcontact->subcontacts));
+ dat->selection = g_clistApi.pfnGetRowsPriorTo(dat, selgroup, selgroup->cl.indexOf(selcontact->subcontacts));
if (dat->selection != -1)
dat->selection += selcontact->iSubNumber;
}
diff --git a/plugins/Clist_modern/src/modern_clcmsgs.cpp b/plugins/Clist_modern/src/modern_clcmsgs.cpp
index 9c0a0715ea..8885269a05 100644
--- a/plugins/Clist_modern/src/modern_clcmsgs.cpp
+++ b/plugins/Clist_modern/src/modern_clcmsgs.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -59,19 +59,6 @@ LRESULT cli_ProcessExternalMessages(HWND hwnd, ClcData *dat, UINT msg, WPARAM wP
cliInvalidateRect(hwnd, nullptr, FALSE);
return 0;
- case CLM_SETHIDEEMPTYGROUPS:
- {
- BOOL old = ((GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_HIDEEMPTYGROUPS) != 0);
- if (wParam)
- SetWindowLongPtr(hwnd, GWL_STYLE, GetWindowLongPtr(hwnd, GWL_STYLE) | CLS_HIDEEMPTYGROUPS);
- else
- SetWindowLongPtr(hwnd, GWL_STYLE, GetWindowLongPtr(hwnd, GWL_STYLE) &~CLS_HIDEEMPTYGROUPS);
- BOOL newval = ((GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_HIDEEMPTYGROUPS) != 0);
- if (newval != old)
- Clist_InitAutoRebuild(hwnd);
- }
- return 0;
-
case CLM_SETTEXTCOLOR:
if (wParam > FONTID_MODERN_MAX) break;
@@ -209,7 +196,7 @@ LRESULT cli_ProcessExternalMessages(HWND hwnd, ClcData *dat, UINT msg, WPARAM wP
}
}
- dat->selection = g_clistApi.pfnGetRowsPriorTo(&dat->list, group, index);
+ dat->selection = g_clistApi.pfnGetRowsPriorTo(dat, group, index);
Clist_EnsureVisible(hwnd, dat, dat->selection, 0);
}
return 0;
diff --git a/plugins/Clist_modern/src/modern_clcopts.cpp b/plugins/Clist_modern/src/modern_clcopts.cpp
index a556d00ce9..d1a596982b 100644
--- a/plugins/Clist_modern/src/modern_clcopts.cpp
+++ b/plugins/Clist_modern/src/modern_clcopts.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -303,13 +303,13 @@ static INT_PTR CALLBACK DlgProcClistAdditionalOpts(HWND hwndDlg, UINT msg, WPARA
switch (msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- CheckDlgButton(hwndDlg, IDC_META, db_get_b(0, "CLC", "Meta", SETTING_USEMETAICON_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); /// by FYR
- CheckDlgButton(hwndDlg, IDC_METADBLCLK, db_get_b(0, "CLC", "MetaDoubleClick", SETTING_METAAVOIDDBLCLICK_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); /// by FYR
- CheckDlgButton(hwndDlg, IDC_METASUBEXTRA, db_get_b(0, "CLC", "MetaHideExtra", SETTING_METAHIDEEXTRA_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); /// by FYR
- CheckDlgButton(hwndDlg, IDC_METASUBEXTRA_IGN, db_get_b(0, "CLC", "MetaIgnoreEmptyExtra", SETTING_METAAVOIDDBLCLICK_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); /// by FYR
- CheckDlgButton(hwndDlg, IDC_METAEXPAND, db_get_b(0, "CLC", "MetaExpanding", SETTING_METAEXPANDING_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); /// by FYR
- CheckDlgButton(hwndDlg, IDC_DISCOVER_AWAYMSG, db_get_b(0, "ModernData", "InternalAwayMsgDiscovery", SETTING_INTERNALAWAYMSGREQUEST_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); /// by FYR
- CheckDlgButton(hwndDlg, IDC_REMOVE_OFFLINE_AWAYMSG, db_get_b(0, "ModernData", "RemoveAwayMessageForOffline", SETTING_REMOVEAWAYMSGFOROFFLINE_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); /// by FYR
+ CheckDlgButton(hwndDlg, IDC_META, db_get_b(0, "CLC", "Meta", SETTING_USEMETAICON_DEFAULT)); /// by FYR
+ CheckDlgButton(hwndDlg, IDC_METADBLCLK, db_get_b(0, "CLC", "MetaDoubleClick", SETTING_METAAVOIDDBLCLICK_DEFAULT)); /// by FYR
+ CheckDlgButton(hwndDlg, IDC_METASUBEXTRA, db_get_b(0, "CLC", "MetaHideExtra", SETTING_METAHIDEEXTRA_DEFAULT)); /// by FYR
+ CheckDlgButton(hwndDlg, IDC_METASUBEXTRA_IGN, db_get_b(0, "CLC", "MetaIgnoreEmptyExtra", SETTING_METAAVOIDDBLCLICK_DEFAULT)); /// by FYR
+ CheckDlgButton(hwndDlg, IDC_METAEXPAND, db_get_b(0, "CLC", "MetaExpanding", SETTING_METAEXPANDING_DEFAULT)); /// by FYR
+ CheckDlgButton(hwndDlg, IDC_DISCOVER_AWAYMSG, db_get_b(0, "ModernData", "InternalAwayMsgDiscovery", SETTING_INTERNALAWAYMSGREQUEST_DEFAULT)); /// by FYR
+ CheckDlgButton(hwndDlg, IDC_REMOVE_OFFLINE_AWAYMSG, db_get_b(0, "ModernData", "RemoveAwayMessageForOffline", SETTING_REMOVEAWAYMSGFOROFFLINE_DEFAULT)); /// by FYR
SendDlgItemMessage(hwndDlg, IDC_SUBINDENTSPIN, UDM_SETBUDDY, (WPARAM)GetDlgItem(hwndDlg, IDC_SUBINDENT), 0);
SendDlgItemMessage(hwndDlg, IDC_SUBINDENTSPIN, UDM_SETRANGE, 0, MAKELONG(50, 0));
@@ -362,23 +362,23 @@ static INT_PTR CALLBACK DlgProcClistListOpts(HWND hwndDlg, UINT msg, WPARAM wPar
{
uint32_t exStyle = db_get_dw(0, "CLC", "ExStyle", GetDefaultExStyle());
for (auto &it : checkBoxToStyleEx)
- CheckDlgButton(hwndDlg, it.id, (exStyle & it.flag) ^ (it.flag * it.neg) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, it.id, (exStyle & it.flag) ^ (it.flag * it.neg));
UDACCEL accel[2] = { { 0, 10 }, { 2, 50 } };
SendDlgItemMessage(hwndDlg, IDC_SMOOTHTIMESPIN, UDM_SETRANGE, 0, MAKELONG(999, 0));
SendDlgItemMessage(hwndDlg, IDC_SMOOTHTIMESPIN, UDM_SETACCEL, _countof(accel), (LPARAM)&accel);
SendDlgItemMessage(hwndDlg, IDC_SMOOTHTIMESPIN, UDM_SETPOS, 0, MAKELONG(db_get_w(0, "CLC", "ScrollTime", CLCDEFAULT_SCROLLTIME), 0));
}
- CheckDlgButton(hwndDlg, IDC_IDLE, db_get_b(0, "CLC", "ShowIdle", CLCDEFAULT_SHOWIDLE) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_IDLE, db_get_b(0, "CLC", "ShowIdle", CLCDEFAULT_SHOWIDLE));
SendDlgItemMessage(hwndDlg, IDC_GROUPINDENTSPIN, UDM_SETRANGE, 0, MAKELONG(50, 0));
SendDlgItemMessage(hwndDlg, IDC_GROUPINDENTSPIN, UDM_SETPOS, 0, MAKELONG(db_get_b(0, "CLC", "GroupIndent", CLCDEFAULT_GROUPINDENT), 0));
- CheckDlgButton(hwndDlg, IDC_GREYOUT, db_get_dw(0, "CLC", "GreyoutFlags", CLCDEFAULT_GREYOUTFLAGS) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_GREYOUT, db_get_dw(0, "CLC", "GreyoutFlags", CLCDEFAULT_GREYOUTFLAGS));
EnableWindow(GetDlgItem(hwndDlg, IDC_SMOOTHTIME), IsDlgButtonChecked(hwndDlg, IDC_NOTNOSMOOTHSCROLLING));
EnableWindow(GetDlgItem(hwndDlg, IDC_GREYOUTOPTS), IsDlgButtonChecked(hwndDlg, IDC_GREYOUT));
FillCheckBoxTree(GetDlgItem(hwndDlg, IDC_GREYOUTOPTS), greyoutValues, _countof(greyoutValues), db_get_dw(0, "CLC", "FullGreyoutFlags", CLCDEFAULT_FULLGREYOUTFLAGS));
- CheckDlgButton(hwndDlg, IDC_NOSCROLLBAR, db_get_b(0, "CLC", "NoVScrollBar", CLCDEFAULT_NOVSCROLL) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_NOSCROLLBAR, db_get_b(0, "CLC", "NoVScrollBar", CLCDEFAULT_NOVSCROLL));
return TRUE;
case WM_VSCROLL:
@@ -464,7 +464,7 @@ static wchar_t* sortby[] =
LPGENW("Name (use locale settings)"),
LPGENW("Status"),
LPGENW("Last message time"),
- LPGENW("Account name"),
+ LPGENW("Account order"),
LPGENW("Rate"),
LPGENW("Last online"),
LPGENW("-Nothing-")
@@ -478,11 +478,11 @@ static INT_PTR CALLBACK DlgProcClistOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- CheckDlgButton(hwndDlg, IDC_GAMMACORRECT, db_get_b(0, "CLC", "GammaCorrect", CLCDEFAULT_GAMMACORRECT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_HILIGHTMODE4, db_get_b(0, "CLC", "HiLightMode", SETTING_HILIGHTMODE_DEFAULT) == 0 ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_HILIGHTMODE1, db_get_b(0, "CLC", "HiLightMode", SETTING_HILIGHTMODE_DEFAULT) == 1 ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_HILIGHTMODE2, db_get_b(0, "CLC", "HiLightMode", SETTING_HILIGHTMODE_DEFAULT) == 2 ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_HILIGHTMODE3, db_get_b(0, "CLC", "HiLightMode", SETTING_HILIGHTMODE_DEFAULT) == 3 ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_GAMMACORRECT, db_get_b(0, "CLC", "GammaCorrect", CLCDEFAULT_GAMMACORRECT));
+ CheckDlgButton(hwndDlg, IDC_HILIGHTMODE4, db_get_b(0, "CLC", "HiLightMode", SETTING_HILIGHTMODE_DEFAULT) == 0);
+ CheckDlgButton(hwndDlg, IDC_HILIGHTMODE1, db_get_b(0, "CLC", "HiLightMode", SETTING_HILIGHTMODE_DEFAULT) == 1);
+ CheckDlgButton(hwndDlg, IDC_HILIGHTMODE2, db_get_b(0, "CLC", "HiLightMode", SETTING_HILIGHTMODE_DEFAULT) == 2);
+ CheckDlgButton(hwndDlg, IDC_HILIGHTMODE3, db_get_b(0, "CLC", "HiLightMode", SETTING_HILIGHTMODE_DEFAULT) == 3);
{
for (auto &it : sortby) {
int item = SendDlgItemMessage(hwndDlg, IDC_CLSORT1, CB_ADDSTRING, 0, (LPARAM)TranslateW(it));
@@ -506,8 +506,8 @@ static INT_PTR CALLBACK DlgProcClistOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
SendDlgItemMessage(hwndDlg, IDC_CLSORT3, CB_SETCURSEL, i, 0);
}
- CheckDlgButton(hwndDlg, IDC_OFFLINEMOVE, g_plugin.getByte("OfflineBottom", SETTING_OFFLINEBOTTOM_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_OFFLINETOROOT, g_plugin.getByte("PlaceOfflineToRoot", SETTING_PLACEOFFLINETOROOT_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_OFFLINEMOVE, g_plugin.getByte("OfflineBottom", SETTING_OFFLINEBOTTOM_DEFAULT));
+ CheckDlgButton(hwndDlg, IDC_OFFLINETOROOT, g_plugin.getByte("PlaceOfflineToRoot", SETTING_PLACEOFFLINETOROOT_DEFAULT));
}
return TRUE;
@@ -562,12 +562,12 @@ static INT_PTR CALLBACK DlgProcTrayOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- CheckDlgButton(hwndDlg, IDC_OFFLINETOROOT, g_plugin.getByte("PlaceOfflineToRoot", SETTING_PLACEOFFLINETOROOT_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_OFFLINETOROOT, g_plugin.getByte("PlaceOfflineToRoot", SETTING_PLACEOFFLINETOROOT_DEFAULT));
{
uint8_t trayOption = db_get_b(0, "CLUI", "XStatusTray", SETTING_TRAYOPTION_DEFAULT);
- CheckDlgButton(hwndDlg, IDC_SHOWXSTATUS, (trayOption & 3) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SHOWNORMAL, (trayOption & 2) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_TRANSPARENTOVERLAY, (trayOption & 4) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_SHOWXSTATUS, (trayOption & 3));
+ CheckDlgButton(hwndDlg, IDC_SHOWNORMAL, (trayOption & 2));
+ CheckDlgButton(hwndDlg, IDC_TRANSPARENTOVERLAY, (trayOption & 4));
EnableWindow(GetDlgItem(hwndDlg, IDC_SHOWNORMAL), IsDlgButtonChecked(hwndDlg, IDC_SHOWXSTATUS));
EnableWindow(GetDlgItem(hwndDlg, IDC_TRANSPARENTOVERLAY), IsDlgButtonChecked(hwndDlg, IDC_SHOWXSTATUS) && IsDlgButtonChecked(hwndDlg, IDC_SHOWNORMAL));
@@ -602,7 +602,7 @@ static INT_PTR CALLBACK DlgProcTrayOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
// setting icon cycling period
SendDlgItemMessage(hwndDlg, IDC_CYCLETIMESPIN, UDM_SETRANGE, 0, MAKELONG(120, 1));
- SendDlgItemMessage(hwndDlg, IDC_CYCLETIMESPIN, UDM_SETPOS, 0, MAKELONG(g_plugin.getWord("CycleTime", SETTING_CYCLETIME_DEFAULT), 0));
+ SendDlgItemMessage(hwndDlg, IDC_CYCLETIMESPIN, UDM_SETPOS, 0, MAKELONG(Clist::iCycleTime, 0));
// setting icon mode
switch (g_plugin.getByte("tiModeS", TRAY_ICON_MODE_GLOBAL)) {
@@ -691,7 +691,7 @@ static INT_PTR CALLBACK DlgProcTrayOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
}
// icon cycling timeout.
- g_plugin.setWord("CycleTime", (uint16_t)SendDlgItemMessage(hwndDlg, IDC_CYCLETIMESPIN, UDM_GETPOS, 0, 0));
+ Clist::iCycleTime = SendDlgItemMessage(hwndDlg, IDC_CYCLETIMESPIN, UDM_GETPOS, 0, 0);
// icon modes
g_plugin.setByte("tiModeS",
@@ -734,27 +734,26 @@ static INT_PTR CALLBACK DlgProcClistBehaviourOpts(HWND hwndDlg, UINT msg, WPARAM
switch (msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- CheckDlgButton(hwndDlg, IDC_CLIENTDRAG, db_get_b(0, "CLUI", "ClientAreaDrag", SETTING_CLIENTDRAG_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_DRAGTOSCROLL, (db_get_b(0, "CLUI", "DragToScroll", SETTING_DRAGTOSCROLL_DEFAULT) && !db_get_b(0, "CLUI", "ClientAreaDrag", SETTING_CLIENTDRAG_DEFAULT)) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_AUTOSIZE, g_CluiData.fAutoSize ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_LOCKSIZING, db_get_b(0, "CLUI", "LockSize", SETTING_LOCKSIZE_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_BRINGTOFRONT, g_plugin.getByte("BringToFront", SETTING_BRINGTOFRONT_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_CLIENTDRAG, Clist::bClientAreaDrag);
+ CheckDlgButton(hwndDlg, IDC_DRAGTOSCROLL, (db_get_b(0, "CLUI", "DragToScroll", SETTING_DRAGTOSCROLL_DEFAULT) && !Clist::bClientAreaDrag));
+ CheckDlgButton(hwndDlg, IDC_AUTOSIZE, g_CluiData.fAutoSize);
+ CheckDlgButton(hwndDlg, IDC_LOCKSIZING, db_get_b(0, "CLUI", "LockSize", SETTING_LOCKSIZE_DEFAULT));
+ CheckDlgButton(hwndDlg, IDC_BRINGTOFRONT, Clist::bBringToFront);
SendDlgItemMessage(hwndDlg, IDC_MAXSIZESPIN, UDM_SETRANGE, 0, MAKELONG(100, 0));
SendDlgItemMessage(hwndDlg, IDC_MAXSIZESPIN, UDM_SETPOS, 0, db_get_b(0, "CLUI", "MaxSizeHeight", SETTING_MAXSIZEHEIGHT_DEFAULT));
SendDlgItemMessage(hwndDlg, IDC_MINSIZESPIN, UDM_SETRANGE, 0, MAKELONG(100, 0));
SendDlgItemMessage(hwndDlg, IDC_MINSIZESPIN, UDM_SETPOS, 0, db_get_b(0, "CLUI", "MinSizeHeight", SETTING_MINSIZEHEIGHT_DEFAULT));
- CheckDlgButton(hwndDlg, IDC_AUTOSIZEUPWARD, db_get_b(0, "CLUI", "AutoSizeUpward", SETTING_AUTOSIZEUPWARD_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SNAPTOEDGES, db_get_b(0, "CLUI", "SnapToEdges", SETTING_SNAPTOEDGES_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_DOCKTOSIDES, db_get_b(0, "CLUI", "DockToSides", SETTING_DOCKTOSIDES_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_AUTOSIZEUPWARD, db_get_b(0, "CLUI", "AutoSizeUpward", SETTING_AUTOSIZEUPWARD_DEFAULT));
+ CheckDlgButton(hwndDlg, IDC_SNAPTOEDGES, db_get_b(0, "CLUI", "SnapToEdges", SETTING_SNAPTOEDGES_DEFAULT));
- CheckDlgButton(hwndDlg, IDC_EVENTAREA_NONE, db_get_b(0, "CLUI", "EventArea", SETTING_EVENTAREAMODE_DEFAULT) == 0 ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_EVENTAREA, db_get_b(0, "CLUI", "EventArea", SETTING_EVENTAREAMODE_DEFAULT) == 1 ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_EVENTAREA_ALWAYS, db_get_b(0, "CLUI", "EventArea", SETTING_EVENTAREAMODE_DEFAULT) == 2 ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_EVENTAREA_NONE, db_get_b(0, "CLUI", "EventArea", SETTING_EVENTAREAMODE_DEFAULT) == 0);
+ CheckDlgButton(hwndDlg, IDC_EVENTAREA, db_get_b(0, "CLUI", "EventArea", SETTING_EVENTAREAMODE_DEFAULT) == 1);
+ CheckDlgButton(hwndDlg, IDC_EVENTAREA_ALWAYS, db_get_b(0, "CLUI", "EventArea", SETTING_EVENTAREAMODE_DEFAULT) == 2);
- CheckDlgButton(hwndDlg, IDC_AUTOHIDE, g_plugin.getByte("AutoHide", SETTING_AUTOHIDE_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_AUTOHIDE, Clist::bAutoHide);
SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN, UDM_SETRANGE, 0, MAKELONG(900, 1));
- SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN, UDM_SETPOS, 0, MAKELONG(g_plugin.getWord("HideTime", SETTING_HIDETIME_DEFAULT), 0));
+ SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN, UDM_SETPOS, 0, MAKELONG(Clist::iHideTime, 0));
EnableWindow(GetDlgItem(hwndDlg, IDC_HIDETIME), IsDlgButtonChecked(hwndDlg, IDC_AUTOHIDE));
EnableWindow(GetDlgItem(hwndDlg, IDC_HIDETIMESPIN), IsDlgButtonChecked(hwndDlg, IDC_AUTOHIDE));
EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC01), IsDlgButtonChecked(hwndDlg, IDC_AUTOHIDE));
@@ -855,9 +854,9 @@ static INT_PTR CALLBACK DlgProcClistBehaviourOpts(HWND hwndDlg, UINT msg, WPARAM
db_set_w(0, "ModernData", "HideBehindBorderSize", (uint16_t)SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN4, UDM_GETPOS, 0, 0));
db_set_b(0, "CLUI", "DragToScroll", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_DRAGTOSCROLL));
- g_plugin.setByte("BringToFront", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_BRINGTOFRONT));
+ Clist::bBringToFront = IsDlgButtonChecked(hwndDlg, IDC_BRINGTOFRONT);
g_bChangingMode = true;
- db_set_b(0, "CLUI", "ClientAreaDrag", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_CLIENTDRAG));
+ Clist::bClientAreaDrag = IsDlgButtonChecked(hwndDlg, IDC_CLIENTDRAG);
db_set_b(0, "CLUI", "AutoSize", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_AUTOSIZE));
db_set_b(0, "CLUI", "LockSize", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_LOCKSIZING));
db_set_b(0, "CLUI", "MaxSizeHeight", (uint8_t)GetDlgItemInt(hwndDlg, IDC_MAXSIZEHEIGHT, nullptr, FALSE));
@@ -865,13 +864,11 @@ static INT_PTR CALLBACK DlgProcClistBehaviourOpts(HWND hwndDlg, UINT msg, WPARAM
db_set_b(0, "CLUI", "AutoSizeUpward", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_AUTOSIZEUPWARD));
db_set_b(0, "CLUI", "SnapToEdges", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_SNAPTOEDGES));
- db_set_b(0, "CLUI", "DockToSides", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_DOCKTOSIDES));
-
db_set_b(0, "CLUI", "EventArea",
(uint8_t)(IsDlgButtonChecked(hwndDlg, IDC_EVENTAREA_ALWAYS) ? 2 : (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_EVENTAREA) ? 1 : 0));
- g_plugin.setByte("AutoHide", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_AUTOHIDE));
- g_plugin.setWord("HideTime", (uint16_t)SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN, UDM_GETPOS, 0, 0));
+ Clist::bAutoHide = IsDlgButtonChecked(hwndDlg, IDC_AUTOHIDE);
+ Clist::iHideTime = SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN, UDM_GETPOS, 0, 0);
CLUI_ChangeWindowMode();
SendMessage(g_clistApi.hwndContactTree, WM_SIZE, 0, 0); //forces it to send a cln_listsizechanged
CLUI_ReloadCLUIOptions();
@@ -894,7 +891,7 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
g_hCLUIOptionsWnd = hwndDlg;
- CheckDlgButton(hwndDlg, IDC_ONTOP, g_plugin.getByte("OnTop", SETTING_ONTOP_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_ONTOP, Clist::bOnTop);
{
//====== Activate/Deactivate Non-Layered items =======
fEnabled = !g_CluiData.fLayered || g_CluiData.fDisableSkinEngine;
@@ -912,14 +909,14 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP
}
{
//====== Non-Layered Mode =====
- CheckDlgButton(hwndDlg, IDC_TOOLWND, g_plugin.getByte("ToolWindow", SETTING_TOOLWINDOW_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_MIN2TRAY, g_plugin.getByte("Min2Tray", SETTING_MIN2TRAY_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_BORDER, g_plugin.getByte("ThinBorder", SETTING_THINBORDER_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_NOBORDERWND, g_plugin.getByte("NoBorder", SETTING_NOBORDER_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_TOOLWND, Clist::bToolWindow);
+ CheckDlgButton(hwndDlg, IDC_MIN2TRAY, Clist::bMinimizeToTray);
+ CheckDlgButton(hwndDlg, IDC_BORDER, g_plugin.getByte("ThinBorder", SETTING_THINBORDER_DEFAULT));
+ CheckDlgButton(hwndDlg, IDC_NOBORDERWND, g_plugin.getByte("NoBorder", SETTING_NOBORDER_DEFAULT));
if (IsDlgButtonChecked(hwndDlg, IDC_TOOLWND))
EnableWindow(GetDlgItem(hwndDlg, IDC_MIN2TRAY), FALSE);
- CheckDlgButton(hwndDlg, IDC_SHOWCAPTION, db_get_b(0, "CLUI", "ShowCaption", SETTING_SHOWCAPTION_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SHOWMAINMENU, db_get_b(0, "CLUI", "ShowMainMenu", SETTING_SHOWMAINMENU_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_SHOWCAPTION, Clist::bShowCaption);
+ CheckDlgButton(hwndDlg, IDC_SHOWMAINMENU, Clist::bShowMainMenu);
if (BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_SHOWCAPTION)) {
EnableWindow(GetDlgItem(hwndDlg, IDC_MIN2TRAY), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_TOOLWND), FALSE);
@@ -931,12 +928,12 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP
EnableWindow(GetDlgItem(hwndDlg, IDC_TITLETEXT), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_SHOWCAPTION), FALSE);
}
- CheckDlgButton(hwndDlg, IDC_DROPSHADOW, g_plugin.getByte("WindowShadow", SETTING_WINDOWSHADOW_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_ROUNDCORNERS, db_get_b(0, "CLC", "RoundCorners", SETTING_ROUNDCORNERS_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_DROPSHADOW, g_plugin.getByte("WindowShadow", SETTING_WINDOWSHADOW_DEFAULT));
+ CheckDlgButton(hwndDlg, IDC_ROUNDCORNERS, db_get_b(0, "CLC", "RoundCorners", SETTING_ROUNDCORNERS_DEFAULT));
} //====== End of Non-Layered Mode =====
- CheckDlgButton(hwndDlg, IDC_FADEINOUT, db_get_b(0, "CLUI", "FadeInOut", SETTING_FADEIN_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_ONDESKTOP, g_plugin.getByte("OnDesktop", SETTING_ONDESKTOP_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_FADEINOUT, db_get_b(0, "CLUI", "FadeInOut", SETTING_FADEIN_DEFAULT));
+
SendDlgItemMessage(hwndDlg, IDC_FRAMESSPIN, UDM_SETRANGE, 0, MAKELONG(50, 0));
SendDlgItemMessage(hwndDlg, IDC_CAPTIONSSPIN, UDM_SETRANGE, 0, MAKELONG(50, 0));
SendDlgItemMessage(hwndDlg, IDC_FRAMESSPIN, UDM_SETPOS, 0, db_get_dw(0, "CLUIFrames", "GapBetweenFrames", SETTING_GAPFRAMES_DEFAULT));
@@ -950,8 +947,8 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP
SendDlgItemMessage(hwndDlg, IDC_TOPMARGINSPIN, UDM_SETPOS, 0, db_get_b(0, "CLUI", "TopClientMargin", SETTING_TOPCLIENTMARIGN_DEFAULT));
SendDlgItemMessage(hwndDlg, IDC_BOTTOMMARGINSPIN, UDM_SETPOS, 0, db_get_b(0, "CLUI", "BottomClientMargin", SETTING_BOTTOMCLIENTMARIGN_DEFAULT));
- CheckDlgButton(hwndDlg, IDC_DISABLEENGINE, db_get_b(0, "ModernData", "DisableEngine", SETTING_DISABLESKIN_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_AEROGLASS, db_get_b(0, "ModernData", "AeroGlass", SETTING_AEROGLASS_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_DISABLEENGINE, db_get_b(0, "ModernData", "DisableEngine", SETTING_DISABLESKIN_DEFAULT));
+ CheckDlgButton(hwndDlg, IDC_AEROGLASS, db_get_b(0, "ModernData", "AeroGlass", SETTING_AEROGLASS_DEFAULT));
EnableWindow(GetDlgItem(hwndDlg, IDC_LAYERENGINE), !db_get_b(0, "ModernData", "DisableEngine", SETTING_DISABLESKIN_DEFAULT) ? TRUE : FALSE);
CheckDlgButton(hwndDlg, IDC_LAYERENGINE, (db_get_b(0, "ModernData", "EnableLayering", SETTING_ENABLELAYERING_DEFAULT) && !db_get_b(0, "ModernData", "DisableEngine", SETTING_DISABLESKIN_DEFAULT)) ? BST_UNCHECKED : BST_CHECKED);
@@ -968,7 +965,7 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP
SendDlgItemMessage(hwndDlg, IDC_TITLETEXT, CB_ADDSTRING, 0, (LPARAM)MIRANDANAME);
}
- CheckDlgButton(hwndDlg, IDC_TRANSPARENT, g_plugin.getByte("Transparent", SETTING_TRANSPARENT_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_TRANSPARENT, Clist::bTransparent);
if (BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_TRANSPARENT)) {
EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC11), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC12), FALSE);
@@ -979,8 +976,8 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP
}
SendDlgItemMessage(hwndDlg, IDC_TRANSACTIVE, TBM_SETRANGE, FALSE, MAKELONG(1, 255));
SendDlgItemMessage(hwndDlg, IDC_TRANSINACTIVE, TBM_SETRANGE, FALSE, MAKELONG(1, 255));
- SendDlgItemMessage(hwndDlg, IDC_TRANSACTIVE, TBM_SETPOS, TRUE, g_plugin.getByte("Alpha", SETTING_ALPHA_DEFAULT));
- SendDlgItemMessage(hwndDlg, IDC_TRANSINACTIVE, TBM_SETPOS, TRUE, g_plugin.getByte("AutoAlpha", SETTING_AUTOALPHA_DEFAULT));
+ SendDlgItemMessage(hwndDlg, IDC_TRANSACTIVE, TBM_SETPOS, TRUE, Clist::iAlpha);
+ SendDlgItemMessage(hwndDlg, IDC_TRANSINACTIVE, TBM_SETPOS, TRUE, Clist::iAutoAlpha);
SendMessage(hwndDlg, WM_HSCROLL, 0x12345678, 0);
return TRUE;
@@ -1013,12 +1010,6 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP
CheckDlgButton(hwndDlg, IDC_LAYERENGINE, BST_CHECKED);
}
}
- else if (LOWORD(wParam) == IDC_ONDESKTOP && IsDlgButtonChecked(hwndDlg, IDC_ONDESKTOP)) {
- CheckDlgButton(hwndDlg, IDC_ONTOP, BST_UNCHECKED);
- }
- else if (LOWORD(wParam) == IDC_ONTOP && IsDlgButtonChecked(hwndDlg, IDC_ONTOP)) {
- CheckDlgButton(hwndDlg, IDC_ONDESKTOP, BST_UNCHECKED);
- }
else if (LOWORD(wParam) == IDC_TOOLWND) {
EnableWindow(GetDlgItem(hwndDlg, IDC_MIN2TRAY), BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_TOOLWND));
}
@@ -1072,15 +1063,14 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP
db_unset(0, "ModernData", "EnableLayering");
}
g_CluiData.dwKeyColor = db_get_dw(0, "ModernSettings", "KeyColor", (uint32_t)SETTING_KEYCOLOR_DEFAULT);
- g_plugin.setByte("OnDesktop", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_ONDESKTOP));
- g_plugin.setByte("OnTop", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_ONTOP));
+ Clist::bOnTop = IsDlgButtonChecked(hwndDlg, IDC_ONTOP);
SetWindowPos(g_clistApi.hwndContactList, IsDlgButtonChecked(hwndDlg, IDC_ONTOP) ? HWND_TOPMOST : HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
db_set_b(0, "CLUI", "DragToScroll", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_DRAGTOSCROLL));
//====== Non-Layered Mode ======
- g_plugin.setByte("ToolWindow", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_TOOLWND));
- db_set_b(0, "CLUI", "ShowCaption", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_SHOWCAPTION));
- db_set_b(0, "CLUI", "ShowMainMenu", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_SHOWMAINMENU));
+ Clist::bToolWindow = IsDlgButtonChecked(hwndDlg, IDC_TOOLWND);
+ Clist::bShowCaption = IsDlgButtonChecked(hwndDlg, IDC_SHOWCAPTION);
+ Clist::bShowMainMenu = IsDlgButtonChecked(hwndDlg, IDC_SHOWMAINMENU);
g_plugin.setByte("ThinBorder", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_BORDER));
g_plugin.setByte("NoBorder", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_NOBORDERWND));
{
@@ -1088,28 +1078,18 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP
GetDlgItemText(hwndDlg, IDC_TITLETEXT, title, _countof(title));
g_plugin.setWString("TitleText", title);
}
- g_plugin.setByte("Min2Tray", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_MIN2TRAY));
+ Clist::bMinimizeToTray = IsDlgButtonChecked(hwndDlg, IDC_MIN2TRAY);
g_plugin.setByte("WindowShadow", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_DROPSHADOW));
db_set_b(0, "CLC", "RoundCorners", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_ROUNDCORNERS));
//====== End of Non-Layered Mode ======
g_bChangingMode = true;
- if (IsDlgButtonChecked(hwndDlg, IDC_ONDESKTOP)) {
- HWND hProgMan = FindWindow(L"Progman", nullptr);
- if (IsWindow(hProgMan)) {
- SetParent(g_clistApi.hwndContactList, hProgMan);
- Sync(CLUIFrames_SetParentForContainers, (HWND)hProgMan);
- g_CluiData.fOnDesktop = true;
- }
- }
- else {
- if (GetParent(g_clistApi.hwndContactList)) {
- SetParent(g_clistApi.hwndContactList, nullptr);
- Sync(CLUIFrames_SetParentForContainers, (HWND)nullptr);
- }
- g_CluiData.fOnDesktop = false;
+ if (GetParent(g_clistApi.hwndContactList)) {
+ SetParent(g_clistApi.hwndContactList, nullptr);
+ Sync(CLUIFrames_SetParentForContainers, (HWND)nullptr);
}
+
AniAva_UpdateParent();
db_set_b(0, "CLUI", "FadeInOut", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_FADEINOUT));
g_CluiData.fSmoothAnimation = IsDlgButtonChecked(hwndDlg, IDC_FADEINOUT) != 0;
@@ -1121,10 +1101,9 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP
db_set_dw(0, "CLUIFrames", "GapBetweenTitleBar", (uint32_t)i2);
Sync(CLUIFramesOnClistResize, (WPARAM)g_clistApi.hwndContactList, 0);
}
- g_plugin.setByte("Transparent", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_TRANSPARENT));
- g_plugin.setByte("Alpha", (uint8_t)SendDlgItemMessage(hwndDlg, IDC_TRANSACTIVE, TBM_GETPOS, 0, 0));
- g_plugin.setByte("AutoAlpha", (uint8_t)SendDlgItemMessage(hwndDlg, IDC_TRANSINACTIVE, TBM_GETPOS, 0, 0));
- g_plugin.setByte("OnDesktop", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_ONDESKTOP));
+ Clist::bTransparent = IsDlgButtonChecked(hwndDlg, IDC_TRANSPARENT);
+ Clist::iAlpha = SendDlgItemMessage(hwndDlg, IDC_TRANSACTIVE, TBM_GETPOS, 0, 0);
+ Clist::iAutoAlpha = SendDlgItemMessage(hwndDlg, IDC_TRANSINACTIVE, TBM_GETPOS, 0, 0);
ske_LoadSkinFromDB();
CLUI_UpdateLayeredMode();
@@ -1276,8 +1255,8 @@ static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
int flags = dat->item[indx].flags;
indx = SendDlgItemMessage(hwndDlg, IDC_BKGRLIST, CB_GETITEMDATA, indx, 0);
- CheckDlgButton(hwndDlg, IDC_BITMAP, dat->item[indx].useBitmap ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_USEWINCOL, dat->item[indx].useWinColours ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_BITMAP, dat->item[indx].useBitmap);
+ CheckDlgButton(hwndDlg, IDC_USEWINCOL, dat->item[indx].useWinColours);
EnableWindow(GetDlgItem(hwndDlg, IDC_BKGCOLOUR), !dat->item[indx].useWinColours);
EnableWindow(GetDlgItem(hwndDlg, IDC_SELCOLOUR), !dat->item[indx].useWinColours);
@@ -1288,13 +1267,13 @@ static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
SendDlgItemMessage(hwndDlg, IDC_SELCOLOUR, CPM_SETCOLOUR, 0, dat->item[indx].selColor);
SetDlgItemTextA(hwndDlg, IDC_FILENAME, dat->item[indx].filename);
- CheckDlgButton(hwndDlg, IDC_STRETCHH, flags&CLB_STRETCHH ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_STRETCHV, flags&CLB_STRETCHV ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_TILEH, flags&CLBF_TILEH ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_TILEV, flags&CLBF_TILEV ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SCROLL, flags&CLBF_SCROLL ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_PROPORTIONAL, flags&CLBF_PROPORTIONAL ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_TILEVROWH, flags&CLBF_TILEVTOROWHEIGHT ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_STRETCHH, flags&CLB_STRETCHH);
+ CheckDlgButton(hwndDlg, IDC_STRETCHV, flags&CLB_STRETCHV);
+ CheckDlgButton(hwndDlg, IDC_TILEH, flags&CLBF_TILEH);
+ CheckDlgButton(hwndDlg, IDC_TILEV, flags&CLBF_TILEV);
+ CheckDlgButton(hwndDlg, IDC_SCROLL, flags&CLBF_SCROLL);
+ CheckDlgButton(hwndDlg, IDC_PROPORTIONAL, flags&CLBF_PROPORTIONAL);
+ CheckDlgButton(hwndDlg, IDC_TILEVROWH, flags&CLBF_TILEVTOROWHEIGHT);
SendMessage(hwndDlg, M_BKGR_UPDATE, 0, 0);
}
diff --git a/plugins/Clist_modern/src/modern_clcpaint.cpp b/plugins/Clist_modern/src/modern_clcpaint.cpp
index 7bcd57bc33..260974ea3a 100644
--- a/plugins/Clist_modern/src/modern_clcpaint.cpp
+++ b/plugins/Clist_modern/src/modern_clcpaint.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_modern/src/modern_clcutils.cpp b/plugins/Clist_modern/src/modern_clcutils.cpp
index 5bcc28e9b1..f248821d45 100644
--- a/plugins/Clist_modern/src/modern_clcutils.cpp
+++ b/plugins/Clist_modern/src/modern_clcutils.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -649,7 +649,7 @@ int cliFindRowByText(HWND hwnd, ClcData *dat, const wchar_t *text, int prefixOk)
int ccScanIndex = group->scanIndex;
for (; group; group = group->parent)
Clist_SetGroupExpand(hwnd, dat, group, 1);
- return g_clistApi.pfnGetRowsPriorTo(&dat->list, ccGroup, ccScanIndex + SubCount);
+ return g_clistApi.pfnGetRowsPriorTo(dat, ccGroup, ccScanIndex + SubCount);
}
if (cc->type == CLCIT_GROUP) {
@@ -682,7 +682,7 @@ int cliFindRowByText(HWND hwnd, ClcData *dat, const wchar_t *text, int prefixOk)
Clist_SetGroupExpand(hwnd, dat, group, 1);
if (!cc->bSubExpanded)
ExpandMetaContact(hwnd, cc, dat);
- return g_clistApi.pfnGetRowsPriorTo(&dat->list, ccGroup, ccScanIndex + SubCount + i + 1);
+ return g_clistApi.pfnGetRowsPriorTo(dat, ccGroup, ccScanIndex + SubCount + i + 1);
}
}
}
diff --git a/plugins/Clist_modern/src/modern_clist.h b/plugins/Clist_modern/src/modern_clist.h
index e67208047c..6cb09d990b 100644
--- a/plugins/Clist_modern/src/modern_clist.h
+++ b/plugins/Clist_modern/src/modern_clist.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_modern/src/modern_clistevents.cpp b/plugins/Clist_modern/src/modern_clistevents.cpp
index 01c014273e..90b223b819 100644
--- a/plugins/Clist_modern/src/modern_clistevents.cpp
+++ b/plugins/Clist_modern/src/modern_clistevents.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-03 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_modern/src/modern_clistmenus.cpp b/plugins/Clist_modern/src/modern_clistmenus.cpp
index cd0eaeb9fb..ad6bb41778 100644
--- a/plugins/Clist_modern/src/modern_clistmenus.cpp
+++ b/plugins/Clist_modern/src/modern_clistmenus.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_modern/src/modern_clistmod.cpp b/plugins/Clist_modern/src/modern_clistmod.cpp
index eb6deb64e7..cba1eb9792 100644
--- a/plugins/Clist_modern/src/modern_clistmod.cpp
+++ b/plugins/Clist_modern/src/modern_clistmod.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -127,7 +127,6 @@ int CListMod_ContactListShutdownProc(WPARAM, LPARAM)
HRESULT PreLoadContactListModule()
{
/* Global data initialization */
- g_CluiData.fOnDesktop = false;
g_CluiData.dwKeyColor = RGB(255, 0, 255);
g_CluiData.bCurrentAlpha = 255;
@@ -180,7 +179,7 @@ int GetWindowVisibleState(HWND hWnd, int iStepX, int iStepY)
if (IsIconic(hWnd) || !IsWindowVisible(hWnd))
return GWVS_HIDDEN;
- if (g_plugin.getByte("OnDesktop", SETTING_ONDESKTOP_DEFAULT) || !g_plugin.getByte("BringToFront", SETTING_BRINGTOFRONT_DEFAULT))
+ if (!Clist::bBringToFront)
return GWVS_VISIBLE;
HWND hwndFocused = GetFocus();
@@ -220,7 +219,7 @@ int GetWindowVisibleState(HWND hWnd, int iStepX, int iStepY)
GetWindowRect(hWnd, &rc);
RECT rcMonitor = { 0 };
- Docking_GetMonitorRectFromWindow(hWnd, &rcMonitor);
+ GetMonitorRectFromWindow(hWnd, &rcMonitor);
rc.top = rc.top < rcMonitor.top ? rcMonitor.top : rc.top;
rc.left = rc.left < rcMonitor.left ? rcMonitor.left : rc.left;
@@ -336,19 +335,13 @@ int cliShowHide(bool bAlwaysShow)
Sync(CLUIFrames_ActivateSubContainers, TRUE);
CLUI_ShowWindowMod(g_clistApi.hwndContactList, SW_RESTORE);
- if (!g_plugin.getByte("OnDesktop", SETTING_ONDESKTOP_DEFAULT)) {
- Sync(CLUIFrames_OnShowHide, 1); //TO BE PROXIED
- SetWindowPos(g_clistApi.hwndContactList, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
- g_bCalledFromShowHide = 1;
- if (!g_plugin.getByte("OnTop", SETTING_ONTOP_DEFAULT))
- SetWindowPos(g_clistApi.hwndContactList, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);
- g_bCalledFromShowHide = 0;
- }
- else {
+ Sync(CLUIFrames_OnShowHide, 1); //TO BE PROXIED
+ SetWindowPos(g_clistApi.hwndContactList, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
+ g_bCalledFromShowHide = 1;
+ if (!Clist::bOnTop)
SetWindowPos(g_clistApi.hwndContactList, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);
- Sync(CLUIFrames_OnShowHide, 1);
- SetForegroundWindow(g_clistApi.hwndContactList);
- }
+ g_bCalledFromShowHide = 0;
+
g_plugin.setByte("State", SETTING_STATE_NORMAL);
RECT rcWindow;
@@ -362,7 +355,7 @@ int cliShowHide(bool bAlwaysShow)
CListMod_HideWindow();
g_plugin.setByte("State", SETTING_STATE_HIDDEN);
}
- else if (g_plugin.getByte("Min2Tray", SETTING_MIN2TRAY_DEFAULT)) {
+ else if (Clist::bMinimizeToTray) {
CLUI_ShowWindowMod(g_clistApi.hwndContactList, SW_HIDE);
g_plugin.setByte("State", SETTING_STATE_HIDDEN);
}
diff --git a/plugins/Clist_modern/src/modern_clistopts.cpp b/plugins/Clist_modern/src/modern_clistopts.cpp
index 3650e5f77c..9a05f7cb61 100644
--- a/plugins/Clist_modern/src/modern_clistopts.cpp
+++ b/plugins/Clist_modern/src/modern_clistopts.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_modern/src/modern_clistsettings.cpp b/plugins/Clist_modern/src/modern_clistsettings.cpp
index de38d49fc9..0d7e639a00 100644
--- a/plugins/Clist_modern/src/modern_clistsettings.cpp
+++ b/plugins/Clist_modern/src/modern_clistsettings.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_modern/src/modern_clisttray.cpp b/plugins/Clist_modern/src/modern_clisttray.cpp
index 5a7b2f9245..40bd10acfc 100644
--- a/plugins/Clist_modern/src/modern_clisttray.cpp
+++ b/plugins/Clist_modern/src/modern_clisttray.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -77,12 +77,11 @@ static VOID CALLBACK TrayIconAutoHideTimer(HWND hwnd, UINT, UINT_PTR idEvent, DW
int cliTrayIconPauseAutoHide(WPARAM, LPARAM)
{
- if (g_plugin.getByte("AutoHide", SETTING_AUTOHIDE_DEFAULT)) {
+ if (Clist::bAutoHide)
if (GetActiveWindow() != g_clistApi.hwndContactList && GetWindow(GetParent(GetActiveWindow()), GW_OWNER) != g_clistApi.hwndContactList) {
KillTimer(nullptr, autoHideTimerId);
- autoHideTimerId = CLUI_SafeSetTimer(nullptr, 0, 1000 * g_plugin.getWord("HideTime", SETTING_HIDETIME_DEFAULT), TrayIconAutoHideTimer);
+ autoHideTimerId = CLUI_SafeSetTimer(nullptr, 0, 1000 * Clist::iHideTime, TrayIconAutoHideTimer);
}
- }
return 0;
}
@@ -100,7 +99,7 @@ INT_PTR cli_TrayIconProcessMessage(WPARAM wParam, LPARAM lParam)
break;
case TIM_CALLBACK:
- if ((GetAsyncKeyState(VK_CONTROL) & 0x8000) && msg->lParam == WM_LBUTTONDOWN && !Clist::Tray1Click) {
+ if ((GetAsyncKeyState(VK_CONTROL) & 0x8000) && msg->lParam == WM_LBUTTONDOWN && !Clist::bTray1Click) {
POINT pt;
HMENU hMenu = Menu_GetStatusMenu();
g_bOnTrayRightClick= true;
@@ -126,9 +125,9 @@ INT_PTR cli_TrayIconProcessMessage(WPARAM wParam, LPARAM lParam)
{
HWND h1 = (HWND)msg->lParam;
HWND h2 = h1 ? GetParent(h1) : nullptr;
- if (g_plugin.getByte("AutoHide", SETTING_AUTOHIDE_DEFAULT)) {
+ if (Clist::bAutoHide) {
if (LOWORD(msg->wParam) == WA_INACTIVE && h2 != g_clistApi.hwndContactList)
- autoHideTimerId = CLUI_SafeSetTimer(nullptr, 0, 1000 * g_plugin.getWord("HideTime", SETTING_HIDETIME_DEFAULT), TrayIconAutoHideTimer);
+ autoHideTimerId = CLUI_SafeSetTimer(nullptr, 0, 1000 * Clist::iHideTime, TrayIconAutoHideTimer);
else {
KillTimer(nullptr, autoHideTimerId);
autoHideTimerId = 0;
@@ -173,9 +172,8 @@ VOID CALLBACK cliTrayCycleTimerProc(HWND, UINT, UINT_PTR, DWORD)
void SettingsMigrate(void)
{
- uint8_t TrayIcon = g_plugin.getByte("TrayIcon");
uint8_t AlwaysPrimary = g_plugin.getByte("AlwaysPrimary");
- uint8_t AlwaysMulti = g_plugin.getByte("AlwaysMulti");
+ uint8_t AlwaysMulti = Clist::bAlwaysMulti;
ptrA PrimaryStatus(g_plugin.getStringA("PrimaryStatus"));
// these strings must always be set
@@ -188,8 +186,8 @@ void SettingsMigrate(void)
g_plugin.setString("tiAccV", "");
}
- switch (TrayIcon) {
- case 0: // global or single acc
+ switch (Clist::iTrayIcon) {
+ case SETTING_TRAYICON_SINGLE:
if (AlwaysPrimary) {
if (!PrimaryStatus) { // global always
g_plugin.setByte("tiModeS", TRAY_ICON_MODE_GLOBAL);
@@ -206,12 +204,12 @@ void SettingsMigrate(void)
}
break;
- case 1: // cycle
+ case SETTING_TRAYICON_CYCLE:
g_plugin.setByte("tiModeS", TRAY_ICON_MODE_CYCLE);
g_plugin.setByte("tiModeV", TRAY_ICON_MODE_CYCLE);
break;
- case 2: // multiple
+ case SETTING_TRAYICON_MULTI:
g_plugin.setByte("tiModeS", (AlwaysMulti) ? TRAY_ICON_MODE_ALL : TRAY_ICON_MODE_GLOBAL);
g_plugin.setByte("tiModeV", TRAY_ICON_MODE_ALL);
break;
@@ -313,7 +311,7 @@ int cliTrayIconInit(HWND hwnd)
cliTrayCycleTimerProc(nullptr, 0, 0, 0); // force icon update
// Не сохраняем ID таймера в pcli, чтобы fnTrayIconUpdateBase не убивала его.
- TimerID = CLUI_SafeSetTimer(nullptr, 0, g_plugin.getWord("CycleTime", SETTING_CYCLETIME_DEFAULT) * 1000, cliTrayCycleTimerProc);
+ TimerID = CLUI_SafeSetTimer(nullptr, 0, Clist::iCycleTime * 1000, cliTrayCycleTimerProc);
break;
case TRAY_ICON_MODE_ALL:
diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp
index c93412404d..ec29f6c318 100644
--- a/plugins/Clist_modern/src/modern_clui.cpp
+++ b/plugins/Clist_modern/src/modern_clui.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -303,13 +303,13 @@ CLUI::CLUI() :
LoadCLUIFramesModule();
g_CluiData.bOldHideEmptyGroups = -1;
- bOldHideEmptyGroups = Clist::HideEmptyGroups;
+ bOldHideEmptyGroups = Clist::bHideEmptyGroups;
g_CluiData.bOldHideOffline = -1;
- bOldHideOffline = Clist::HideOffline;
+ bOldHideOffline = Clist::bHideOffline;
g_CluiData.bOldUseGroups = -1;
- bOldUseGroups = Clist::UseGroups;
+ bOldUseGroups = Clist::bUseGroups;
g_CluiData.bOldFoldGroups = -1;
}
@@ -375,7 +375,7 @@ HRESULT CLUI::RegisterAvatarMenu()
HRESULT CLUI::CreateCLCWindow(const HWND hwndClui)
{
g_clistApi.hwndContactTree = CreateWindow(CLISTCONTROL_CLASSW, L"",
- WS_CHILD | WS_CLIPCHILDREN | CLS_CONTACTLIST | (Clist::UseGroups ? CLS_USEGROUPS : 0) | (Clist::HideOffline ? CLS_HIDEOFFLINE : 0) | (Clist::HideEmptyGroups ? CLS_HIDEEMPTYGROUPS : 0 | CLS_MULTICOLUMN),
+ WS_CHILD | WS_CLIPCHILDREN | CLS_CONTACTLIST | (Clist::bUseGroups ? CLS_USEGROUPS : 0) | (Clist::bHideOffline ? CLS_HIDEOFFLINE : 0) | (Clist::bHideEmptyGroups ? CLS_HIDEEMPTYGROUPS : 0 | CLS_MULTICOLUMN),
0, 0, 0, 0, hwndClui, nullptr, g_plugin.getInst(), nullptr);
return S_OK;
@@ -635,7 +635,7 @@ void CLUI_ChangeWindowMode()
if (!g_clistApi.hwndContactList) return;
g_bChangingMode = true;
- g_bTransparentFlag = g_plugin.getByte("Transparent", SETTING_TRANSPARENT_DEFAULT);
+ g_bTransparentFlag = Clist::bTransparent;
g_CluiData.fSmoothAnimation = db_get_b(0, "CLUI", "FadeInOut", SETTING_FADEIN_DEFAULT) != 0;
if (g_bTransparentFlag == 0 && g_CluiData.bCurrentAlpha != 0)
g_CluiData.bCurrentAlpha = 255;
@@ -649,12 +649,12 @@ void CLUI_ChangeWindowMode()
styleEx = WS_EX_TOOLWINDOW;
styleMaskEx |= WS_EX_APPWINDOW;
}
- else if (db_get_b(0, "CLUI", "ShowCaption", SETTING_SHOWCAPTION_DEFAULT) && g_plugin.getByte("ToolWindow", SETTING_TOOLWINDOW_DEFAULT)) {
+ else if (Clist::bShowCaption && Clist::bToolWindow) {
styleEx = WS_EX_TOOLWINDOW/*|WS_EX_WINDOWEDGE*/;
style = WS_CAPTION | WS_POPUPWINDOW | WS_CLIPCHILDREN | WS_THICKFRAME;
styleMaskEx |= WS_EX_APPWINDOW;
}
- else if (db_get_b(0, "CLUI", "ShowCaption", SETTING_SHOWCAPTION_DEFAULT))
+ else if (Clist::bShowCaption)
style = WS_CAPTION | WS_SYSMENU | WS_POPUPWINDOW | WS_CLIPCHILDREN | WS_THICKFRAME | WS_MINIMIZEBOX;
else {
style = WS_POPUPWINDOW | WS_CLIPCHILDREN | WS_THICKFRAME;
@@ -683,15 +683,6 @@ void CLUI_ChangeWindowMode()
}
SetWindowText(g_clistApi.hwndContactList, titleText);
- // < ->
- // 1 - If visible store it and hide
- if (g_CluiData.fLayered && (g_plugin.getByte("OnDesktop", SETTING_ONDESKTOP_DEFAULT))) {
- SetParent(g_clistApi.hwndContactList, nullptr);
- Sync(CLUIFrames_SetParentForContainers, (HWND)nullptr);
- UpdateWindow(g_clistApi.hwndContactList);
- g_CluiData.fOnDesktop = false;
- }
-
// 5 - TODO Apply Style
oldStyleEx = curStyleEx = GetWindowLongPtr(g_clistApi.hwndContactList, GWL_EXSTYLE);
oldStyle = curStyle = GetWindowLongPtr(g_clistApi.hwndContactList, GWL_STYLE);
@@ -711,28 +702,14 @@ void CLUI_ChangeWindowMode()
CLUI_UpdateAeroGlass();
- if (g_CluiData.fLayered || !db_get_b(0, "CLUI", "ShowMainMenu", SETTING_SHOWMAINMENU_DEFAULT))
+ if (g_CluiData.fLayered || !Clist::bShowMainMenu)
SetMenu(g_clistApi.hwndContactList, nullptr);
else
SetMenu(g_clistApi.hwndContactList, g_clistApi.hMenuMain);
- if (g_CluiData.fLayered && (g_plugin.getByte("OnDesktop", SETTING_ONDESKTOP_DEFAULT)))
- ske_UpdateWindowImage();
-
// 6 - Pin to desktop mode
- if (g_plugin.getByte("OnDesktop", SETTING_ONDESKTOP_DEFAULT)) {
- HWND hProgMan = FindWindow(L"Progman", nullptr);
- if (IsWindow(hProgMan)) {
- SetParent(g_clistApi.hwndContactList, hProgMan);
- Sync(CLUIFrames_SetParentForContainers, (HWND)hProgMan);
- g_CluiData.fOnDesktop = true;
- }
- }
- else {
- SetParent(g_clistApi.hwndContactList, nullptr);
- Sync(CLUIFrames_SetParentForContainers, (HWND)nullptr);
- g_CluiData.fOnDesktop = false;
- }
+ SetParent(g_clistApi.hwndContactList, nullptr);
+ Sync(CLUIFrames_SetParentForContainers, (HWND)nullptr);
// 7 - if it was visible - show
if (storedVisMode) {
@@ -751,7 +728,7 @@ void CLUI_ChangeWindowMode()
int v = (r.bottom - r.top) > (w * 2) ? w : (r.bottom - r.top);
h = (h < v) ? h : v;
HRGN hRgn1 = CreateRoundRectRgn(0, 0, (r.right - r.left + 1), (r.bottom - r.top + 1), h, h);
- if (db_get_b(0, "CLC", "RoundCorners", SETTING_ROUNDCORNERS_DEFAULT) && !Clist_IsDocked())
+ if (db_get_b(0, "CLC", "RoundCorners", SETTING_ROUNDCORNERS_DEFAULT))
SetWindowRgn(g_clistApi.hwndContactList, hRgn1, 1);
else {
DeleteObject(hRgn1);
@@ -808,7 +785,7 @@ int CLUI_HideBehindEdge()
//Need to be moved out of screen
bShowEventStarted = 0;
//1. get work area rectangle
- Docking_GetMonitorRectFromWindow(g_clistApi.hwndContactList, &rcScreen);
+ GetMonitorRectFromWindow(g_clistApi.hwndContactList, &rcScreen);
//SystemParametersInfo(SPI_GETWORKAREA, 0, &rcScreen,FALSE);
//2. move out
int bordersize = wBehindEdgeBorderSize;
@@ -848,7 +825,7 @@ int CLUI_ShowFromBehindEdge()
// Need to be moved out of screen
// 1. get work area rectangle
RECT rcScreen;
- Docking_GetMonitorRectFromWindow(g_clistApi.hwndContactList, &rcScreen);
+ GetMonitorRectFromWindow(g_clistApi.hwndContactList, &rcScreen);
// 2. move out
RECT rcWindow;
@@ -1270,7 +1247,7 @@ int CLUI_TestCursorOnBorders()
if (CLUI_CheckOwnedByClui(hAux)) {
if (g_bTransparentFlag) {
if (!bTransparentFocus && gf != hwnd) {
- CLUI_SmoothAlphaTransition(hwnd, g_plugin.getByte("Alpha", SETTING_ALPHA_DEFAULT), 1);
+ CLUI_SmoothAlphaTransition(hwnd, Clist::iAlpha, 1);
bTransparentFocus = 1;
CLUI_SafeSetTimer(hwnd, TM_AUTOALPHA, 250, nullptr);
}
@@ -1693,12 +1670,10 @@ LRESULT CLUI::OnSizingMoving(UINT msg, WPARAM wParam, LPARAM lParam)
CheckFramesPos(&rc);
Sync(CLUIFrames_OnMoving, m_hWnd, &rc);
if (!IsIconic(m_hWnd)) {
- if (!Clist_IsDocked()) { // if g_CluiData.fDocked, dont remember pos (except for width)
- g_plugin.setDword("Height", (uint32_t)(rc.bottom - rc.top));
- g_plugin.setDword("x", (uint32_t)rc.left);
- g_plugin.setDword("y", (uint32_t)rc.top);
- }
+ g_plugin.setDword("Height", (uint32_t)(rc.bottom - rc.top));
g_plugin.setDword("Width", (uint32_t)(rc.right - rc.left));
+ g_plugin.setDword("x", (uint32_t)rc.left);
+ g_plugin.setDword("y", (uint32_t)rc.top);
}
}
return TRUE;
@@ -1730,14 +1705,11 @@ LRESULT CLUI::OnSizingMoving(UINT msg, WPARAM wParam, LPARAM lParam)
}
// if g_CluiData.fDocked, dont remember pos (except for width)
- if (!Clist_IsDocked()) {
- g_plugin.setDword("Height", (uint32_t)(rc.bottom - rc.top));
- g_plugin.setDword("x", (uint32_t)rc.left);
- g_plugin.setDword("y", (uint32_t)rc.top);
- }
- else SetWindowRgn(m_hWnd, nullptr, 0);
+ g_plugin.setDword("Height", (uint32_t)(rc.bottom - rc.top));
g_plugin.setDword("Width", (uint32_t)(rc.right - rc.left));
-
+ g_plugin.setDword("x", (uint32_t)rc.left);
+ g_plugin.setDword("y", (uint32_t)rc.top);
+
if (!g_CluiData.fLayered) {
HRGN hRgn1;
RECT r;
@@ -1747,7 +1719,7 @@ LRESULT CLUI::OnSizingMoving(UINT msg, WPARAM wParam, LPARAM lParam)
int v = (r.bottom - r.top) > (w * 2) ? w : (r.bottom - r.top);
h = (h < v) ? h : v;
hRgn1 = CreateRoundRectRgn(0, 0, (r.right - r.left + 1), (r.bottom - r.top + 1), h, h);
- if (db_get_b(0, "CLC", "RoundCorners", SETTING_ROUNDCORNERS_DEFAULT) && !Clist_IsDocked())
+ if (db_get_b(0, "CLC", "RoundCorners", SETTING_ROUNDCORNERS_DEFAULT))
SetWindowRgn(m_hWnd, hRgn1, FALSE);
else {
DeleteObject(hRgn1);
@@ -1757,7 +1729,7 @@ LRESULT CLUI::OnSizingMoving(UINT msg, WPARAM wParam, LPARAM lParam)
}
}
else {
- if (g_plugin.getByte("Min2Tray", SETTING_MIN2TRAY_DEFAULT)) {
+ if (Clist::bMinimizeToTray) {
CLUI_ShowWindowMod(m_hWnd, SW_HIDE);
g_plugin.setByte("State", SETTING_STATE_HIDDEN);
}
@@ -1801,7 +1773,7 @@ LRESULT CLUI::OnInitMenu(UINT /*msg*/, WPARAM /*wParam*/, LPARAM /*lParam*/)
LRESULT CLUI::OnNcPaint(UINT msg, WPARAM wParam, LPARAM lParam)
{
int lRes = DefWindowProc(m_hWnd, msg, wParam, lParam);
- if (!g_CluiData.fLayered && db_get_b(0, "CLUI", "ShowMainMenu", SETTING_SHOWMAINMENU_DEFAULT)) {
+ if (!g_CluiData.fLayered && Clist::bShowMainMenu) {
HDC hdc = nullptr;
if (msg == WM_PRINT) hdc = (HDC)wParam;
if (!hdc) hdc = GetWindowDC(m_hWnd);
@@ -2008,9 +1980,9 @@ LRESULT CLUI::OnAutoAlphaTimer(UINT, WPARAM, LPARAM)
// change
bTransparentFocus = inwnd;
if (bTransparentFocus)
- CLUI_SmoothAlphaTransition(m_hWnd, (uint8_t)g_plugin.getByte("Alpha", SETTING_ALPHA_DEFAULT), 1);
+ CLUI_SmoothAlphaTransition(m_hWnd, Clist::iAlpha, 1);
else
- CLUI_SmoothAlphaTransition(m_hWnd, (uint8_t)(g_bTransparentFlag ? g_plugin.getByte("AutoAlpha", SETTING_AUTOALPHA_DEFAULT) : 255), 1);
+ CLUI_SmoothAlphaTransition(m_hWnd, (uint8_t)(g_bTransparentFlag ? Clist::iAutoAlpha : 255), 1);
}
if (!bTransparentFocus)
KillTimer(m_hWnd, TM_AUTOALPHA);
@@ -2119,11 +2091,11 @@ LRESULT CLUI::OnActivate(UINT msg, WPARAM wParam, LPARAM lParam)
CLUI_SafeSetTimer(m_hWnd, TM_AUTOALPHA, 250, nullptr);
}
else {
- if (!g_plugin.getByte("OnTop", SETTING_ONTOP_DEFAULT))
+ if (!Clist::bOnTop)
Sync(CLUIFrames_ActivateSubContainers, TRUE);
if (g_bTransparentFlag) {
KillTimer(m_hWnd, TM_AUTOALPHA);
- CLUI_SmoothAlphaTransition(m_hWnd, g_plugin.getByte("Alpha", SETTING_ALPHA_DEFAULT), 1);
+ CLUI_SmoothAlphaTransition(m_hWnd, Clist::iAlpha, 1);
bTransparentFocus = 1;
}
}
@@ -2131,9 +2103,9 @@ LRESULT CLUI::OnActivate(UINT msg, WPARAM wParam, LPARAM lParam)
if (g_bTransparentFlag) {
uint8_t alpha;
if (wParam != WA_INACTIVE || CLUI_CheckOwnedByClui((HWND)lParam) || ((HWND)lParam == m_hWnd) || GetParent((HWND)lParam) == m_hWnd)
- alpha = g_plugin.getByte("Alpha", SETTING_ALPHA_DEFAULT);
+ alpha = Clist::iAlpha;
else
- alpha = g_bTransparentFlag ? g_plugin.getByte("AutoAlpha", SETTING_AUTOALPHA_DEFAULT) : 255;
+ alpha = g_bTransparentFlag ? Clist::iAutoAlpha : 255;
CLUI_SmoothAlphaTransition(m_hWnd, alpha, 1);
return 1;
}
@@ -2146,7 +2118,7 @@ LRESULT CLUI::OnSetCursor(UINT, WPARAM, LPARAM)
if (g_CluiData.nBehindEdgeState >= 0) CLUI_UpdateTimer();
if (g_bTransparentFlag) {
if (!bTransparentFocus && gf != m_hWnd) {
- CLUI_SmoothAlphaTransition(m_hWnd, g_plugin.getByte("Alpha", SETTING_ALPHA_DEFAULT), 1);
+ CLUI_SmoothAlphaTransition(m_hWnd, Clist::iAlpha, 1);
bTransparentFocus = 1;
CLUI_SafeSetTimer(m_hWnd, TM_AUTOALPHA, 250, nullptr);
}
@@ -2198,14 +2170,14 @@ LRESULT CLUI::OnNcHitTest(UINT, WPARAM wParam, LPARAM lParam)
if (result == HTMENU) {
POINT pt = UNPACK_POINT(lParam);
int t = MenuItemFromPoint(m_hWnd, g_clistApi.hMenuMain, pt);
- if (t == -1 && (db_get_b(0, "CLUI", "ClientAreaDrag", SETTING_CLIENTDRAG_DEFAULT)))
+ if (t == -1 && Clist::bClientAreaDrag)
return HTCAPTION;
}
if (result == HTCLIENT) {
POINT pt = UNPACK_POINT(lParam);
int k = CLUI_SizingOnBorder(pt, 0);
- if (!k && (db_get_b(0, "CLUI", "ClientAreaDrag", SETTING_CLIENTDRAG_DEFAULT)))
+ if (!k && Clist::bClientAreaDrag)
return HTCAPTION;
else return k + 9;
}
@@ -2217,7 +2189,7 @@ LRESULT CLUI::OnShowWindow(UINT, WPARAM wParam, LPARAM lParam)
if (lParam) return 0;
if (mutex_bShowHideCalledFromAnimation) return 1;
- uint8_t gAlpha = (!wParam) ? 0 : (g_plugin.getByte("Transparent", SETTING_TRANSPARENT_DEFAULT) ? g_plugin.getByte("Alpha", SETTING_ALPHA_DEFAULT) : 255);
+ uint8_t gAlpha = (!wParam) ? 0 : Clist::bTransparent ? Clist::iAlpha : 255;
if (wParam) {
g_CluiData.bCurrentAlpha = 0;
Sync(CLUIFrames_OnShowHide, 1);
@@ -2239,8 +2211,6 @@ LRESULT CLUI::OnSysCommand(UINT msg, WPARAM wParam, LPARAM lParam)
}
DefWindowProc(m_hWnd, msg, wParam, lParam);
- if (g_plugin.getByte("OnDesktop", SETTING_ONDESKTOP_DEFAULT))
- Sync(CLUIFrames_ActivateSubContainers, TRUE);
return FALSE;
}
@@ -2282,7 +2252,7 @@ LRESULT CLUI::OnListSizeChangeNotify(NMCLISTCONTROL *pnmc)
rcWindow = rcSizingRect;
else
GetWindowRect(m_hWnd, &rcWindow);
- if (!g_CluiData.fAutoSize || g_clistApi.hwndContactTree == nullptr || Clist_IsDocked())
+ if (!g_CluiData.fAutoSize || g_clistApi.hwndContactTree == nullptr)
return FALSE;
maxHeight = db_get_b(0, "CLUI", "MaxSizeHeight", SETTING_MAXSIZEHEIGHT_DEFAULT);
@@ -2364,7 +2334,7 @@ LRESULT CLUI::OnClickNotify(NMCLISTCONTROL *pnmc)
if ((hitFlags & (CLCHT_NOWHERE | CLCHT_INLEFTMARGIN | CLCHT_BELOWITEMS)) == 0)
return DefCluiWndProc(WM_NOTIFY, 0, (LPARAM)pnmc);
- if (db_get_b(0, "CLUI", "ClientAreaDrag", SETTING_CLIENTDRAG_DEFAULT)) {
+ if (Clist::bClientAreaDrag) {
POINT pt;
int res;
pt = pnmc->pt;
@@ -2373,7 +2343,7 @@ LRESULT CLUI::OnClickNotify(NMCLISTCONTROL *pnmc)
return res;
}
- if (db_get_b(0, "CLUI", "DragToScroll", SETTING_DRAGTOSCROLL_DEFAULT) && !db_get_b(0, "CLUI", "ClientAreaDrag", SETTING_CLIENTDRAG_DEFAULT))
+ if (db_get_b(0, "CLUI", "DragToScroll", SETTING_DRAGTOSCROLL_DEFAULT) && !Clist::bClientAreaDrag)
return ClcEnterDragToScroll(g_clistApi.hwndContactTree, pnmc->pt.y);
return 0;
diff --git a/plugins/Clist_modern/src/modern_clui.h b/plugins/Clist_modern/src/modern_clui.h
index b32f677d5d..b67eec05b5 100644
--- a/plugins/Clist_modern/src/modern_clui.h
+++ b/plugins/Clist_modern/src/modern_clui.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_modern/src/modern_cluiservices.cpp b/plugins/Clist_modern/src/modern_cluiservices.cpp
index 79441cd62f..3c7ee4e638 100644
--- a/plugins/Clist_modern/src/modern_cluiservices.cpp
+++ b/plugins/Clist_modern/src/modern_cluiservices.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_modern/src/modern_commonprototypes.h b/plugins/Clist_modern/src/modern_commonprototypes.h
index d84b89c2a3..3569a6c74e 100644
--- a/plugins/Clist_modern/src/modern_commonprototypes.h
+++ b/plugins/Clist_modern/src/modern_commonprototypes.h
@@ -152,7 +152,6 @@ int SetAlpha(uint8_t Alpha);
/* others TODO: move above */
-int Docking_ProcessWindowMessage(WPARAM wParam, LPARAM lParam);
void DrawBackGround(HWND hwnd, HDC mhdc, HBITMAP hBmpBackground, COLORREF bkColour, uint32_t backgroundBmpUse);
HRESULT BackgroundsLoadModule();
int BackgroundsUnloadModule();
@@ -181,7 +180,7 @@ INT_PTR ToggleHideOffline(WPARAM wParam, LPARAM lParam);
INT_PTR SetUseGroups(WPARAM wParam, LPARAM lParam); //contact.c
INT_PTR ToggleSounds(WPARAM wParam, LPARAM lParam); //contact.c
void ClcOptionsChanged(); //clc.c
-void Docking_GetMonitorRectFromWindow(HWND hWnd, RECT *rc); //Docking.c
+void GetMonitorRectFromWindow(HWND hWnd, RECT *rc); //Docking.c
void DrawAvatarImageWithGDIp(HDC hDestDC, int x, int y, uint32_t width, uint32_t height, HBITMAP hbmp, int x1, int y1, uint32_t width1, uint32_t height1, uint32_t flag, uint8_t alpha); //gdiplus.cpp
void InitGdiPlus(); //gdiplus.cpp
void ShutdownGdiPlus(); //gdiplus.cpp
@@ -214,7 +213,7 @@ void cliRebuildEntireList(HWND hwnd, ClcData *dat);
void cliRecalcScrollBar(HWND hwnd, ClcData *dat);
int cliGetGroupContentsCount(ClcGroup *group, int visibleOnly);
int cliFindRowByText(HWND hwnd, ClcData *dat, const wchar_t *text, int prefixOk);
-int cliGetRowsPriorTo(ClcGroup *group, ClcGroup *subgroup, int contactIndex);
+int cliGetRowsPriorTo(ClcData *dat, ClcGroup *subgroup, int contactIndex);
int cli_IconFromStatusMode(const char *szProto, int nStatus, MCONTACT hContact);
int cli_RemoveEvent(CListEvent *cle);
void cli_FreeContact(ClcContact*);
diff --git a/plugins/Clist_modern/src/modern_contact.cpp b/plugins/Clist_modern/src/modern_contact.cpp
index abce4af1c8..0f40996ef8 100644
--- a/plugins/Clist_modern/src/modern_contact.cpp
+++ b/plugins/Clist_modern/src/modern_contact.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -66,8 +66,8 @@ uint32_t CompareContacts2_getLMTime(MCONTACT hContact)
while (MEVENT hDbEvent = pCursor.FetchNext()) {
DBEVENTINFO dbei = {};
db_event_get(hDbEvent, &dbei);
- if ((dbei.eventType == EVENTTYPE_MESSAGE || dbei.eventType == EVENTTYPE_FILE) && !(dbei.flags & DBEF_SENT))
- return dbei.timestamp;
+ if ((dbei.eventType == EVENTTYPE_MESSAGE || dbei.eventType == EVENTTYPE_FILE) && !dbei.bSent)
+ return dbei.getUnixtime();
}
return 0;
}
@@ -169,7 +169,7 @@ INT_PTR SetUseGroups(WPARAM wParam, LPARAM)
if (!newVal == (int)wParam) return 0;
newVal = wParam;
}
- Clist::UseGroups = newVal;
+ Clist::bUseGroups = newVal;
SendMessage(g_clistApi.hwndContactTree, CLM_SETUSEGROUPS, newVal, 0);
return 0;
}
diff --git a/plugins/Clist_modern/src/modern_defsettings.h b/plugins/Clist_modern/src/modern_defsettings.h
index 18f29f537f..868484cf14 100644
--- a/plugins/Clist_modern/src/modern_defsettings.h
+++ b/plugins/Clist_modern/src/modern_defsettings.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 Miranda ICQ/IM project,
Copyright 2007 Artem Shpynov
@@ -30,20 +30,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#pragma once
-#define SETTING_TOOLWINDOW_DEFAULT 1
-#define SETTING_ONTOP_DEFAULT 1
#define SETTING_MIN2TRAY_DEFAULT 1
#define SETTING_PLACEOFFLINETOROOT_DEFAULT 0
#define SETTING_THINBORDER_DEFAULT 0
#define SETTING_NOBORDER_DEFAULT 0
#define SETTING_WINDOWSHADOW_DEFAULT 0
-#define SETTING_ONDESKTOP_DEFAULT 0
#define SETTING_DISABLEWORKINGSET_DEFAULT 1
#define SETTING_ALWAYSVISICON_DEFAULT 0
-#define SETTING_SHOWMAINMENU_DEFAULT 1
-#define SETTING_SHOWCAPTION_DEFAULT 1
-#define SETTING_CLIENTDRAG_DEFAULT 1
#define SETTING_SHOWSBAR_DEFAULT 1
#define SETTING_SBARPERPROTO_DEFAULT 0
#define SETTING_USECONNECTINGICON_DEFAULT 1
@@ -188,13 +182,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define SETTING_THIRDLINE_STATUSIFNOAWAY_DEFAULT 0
#define SETTING_THIRDLINE_LISTENINGIFNOAWAY_DEFAULT 0
-#define SETTING_TRANSPARENT_DEFAULT 0
-#define SETTING_AUTOALPHA_DEFAULT 150
-#define SETTING_AUTOHIDE_DEFAULT 0
-#define SETTING_HIDETIME_DEFAULT 30
-#define SETTING_CYCLETIME_DEFAULT 4
-#define SETTING_TRAYICON_DEFAULT SETTING_TRAYICON_SINGLE
-
#define SETTING_BLENDINACTIVESTATE_DEFAULT 0
#define CLCDEFAULT_MODERN_SELTEXTCOLOUR (g_CluiData.fDisableSkinEngine?GetSysColor(COLOR_HIGHLIGHTTEXT):RGB(0,0,128))
diff --git a/plugins/Clist_modern/src/modern_docking.cpp b/plugins/Clist_modern/src/modern_docking.cpp
deleted file mode 100644
index 810d262f19..0000000000
--- a/plugins/Clist_modern/src/modern_docking.cpp
+++ /dev/null
@@ -1,337 +0,0 @@
-/*
-
-Miranda NG: the free IM client for Microsoft* Windows*
-
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
-Copyright (c) 2000-08 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#include "stdafx.h"
-#include "modern_sync.h"
-
-#define WM_DOCKCALLBACK (WM_USER+121)
-#define WM_CREATEDOCKED (WM_USER+122)
-#define EDGESENSITIVITY 3
-
-#define DOCKED_NONE 0
-#define DOCKED_LEFT 1
-#define DOCKED_RIGHT 2
-
-BOOL LockSubframeMoving = 0;
-static int TempDock = 0;
-static int dock_drag_dx = 0;
-static int dock_drag_dy = 0;
-
-static void Docking_GetMonitorRectFromPoint(POINT pt, RECT *rc)
-{
- MONITORINFO monitorInfo;
- HMONITOR hMonitor = MonitorFromPoint(pt, MONITOR_DEFAULTTONEAREST); // always returns a valid value
- monitorInfo.cbSize = sizeof(MONITORINFO);
-
- if (GetMonitorInfo(hMonitor, &monitorInfo))
- {
- memcpy(rc, &monitorInfo.rcMonitor, sizeof(RECT));
- return;
- }
-
- // "generic" win95/NT support, also serves as failsafe
- rc->left = 0;
- rc->top = 0;
- rc->bottom = GetSystemMetrics(SM_CYSCREEN);
- rc->right = GetSystemMetrics(SM_CXSCREEN);
-}
-
-void Docking_GetMonitorRectFromWindow(HWND hWnd, RECT *rc)
-{
- POINT ptWindow;
- GetWindowRect(hWnd, rc);
- ptWindow.x = rc->left;
- ptWindow.y = rc->top;
- Docking_GetMonitorRectFromPoint(ptWindow, rc);
-}
-
-static void Docking_AdjustPosition(HWND hwnd, RECT *rcDisplay, RECT *rc)
-{
- APPBARDATA abd;
-
- memset(&abd, 0, sizeof(abd));
- abd.cbSize = sizeof(abd);
- abd.hWnd = hwnd;
- abd.uEdge = g_CluiData.fDocked == DOCKED_LEFT ? ABE_LEFT : ABE_RIGHT;
- abd.rc = *rc;
- abd.rc.top = rcDisplay->top;
- abd.rc.bottom = rcDisplay->bottom;
- if (g_CluiData.fDocked == DOCKED_LEFT) {
- abd.rc.right = rcDisplay->left + abd.rc.right - abd.rc.left;
- abd.rc.left = rcDisplay->left;
- }
- else {
- abd.rc.left = rcDisplay->right - (abd.rc.right - abd.rc.left);
- abd.rc.right = rcDisplay->right;
-
- }
- SHAppBarMessage(ABM_SETPOS, &abd);
- *rc = abd.rc;
-}
-
-int Docking_IsDocked(WPARAM, LPARAM)
-{
- return g_CluiData.fDocked;
-}
-
-int Docking_ProcessWindowMessage(WPARAM wParam, LPARAM lParam)
-{
- APPBARDATA abd;
- static int draggingTitle;
- MSG *msg = (MSG*)wParam;
-
- if (msg->message == WM_DESTROY)
- g_plugin.setByte("Docked", (uint8_t)g_CluiData.fDocked);
-
- if (!g_CluiData.fDocked && msg->message != WM_CREATE && msg->message != WM_MOVING && msg->message != WM_CREATEDOCKED && msg->message != WM_MOVE && msg->message != WM_SIZE) return 0;
- switch (msg->message) {
- case WM_CREATE:
- //if (GetSystemMetrics(SM_CMONITORS)>1) return 0;
- if (g_plugin.getByte("Docked", 0) && db_get_b(0, "CLUI", "DockToSides", SETTING_DOCKTOSIDES_DEFAULT))
- {
- PostMessage(msg->hwnd, WM_CREATEDOCKED, 0, 0);
- }
- draggingTitle = 0;
- return 0;
-
- case WM_CREATEDOCKED:
- //we need to post a message just after creation to let main message function do some work
- g_CluiData.fDocked = (BOOL)g_plugin.getByte("Docked", 0);
- if (IsWindowVisible(msg->hwnd) && !IsIconic(msg->hwnd)) {
- RECT rc, rcMonitor;
- memset(&abd, 0, sizeof(abd));
- abd.cbSize = sizeof(abd);
- abd.hWnd = msg->hwnd;
- abd.lParam = 0;
- abd.uCallbackMessage = WM_DOCKCALLBACK;
- SHAppBarMessage(ABM_NEW, &abd);
- GetWindowRect(msg->hwnd, &rc);
- Docking_GetMonitorRectFromWindow(msg->hwnd, &rcMonitor);
- Docking_AdjustPosition(msg->hwnd, &rcMonitor, &rc);
- MoveWindow(msg->hwnd, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, TRUE);
- g_CluiData.mutexPreventDockMoving = 0;
- Sync(CLUIFrames_OnMoving, msg->hwnd, &rc);
- g_CluiData.mutexPreventDockMoving = 1;
- ModernSkinButton_ReposButtons(msg->hwnd, SBRF_DO_NOT_DRAW, nullptr);
- }
- break;
- case WM_CAPTURECHANGED:
- ModernSkinButton_ReposButtons(msg->hwnd, SBRF_DO_NOT_DRAW, nullptr);
- return 0;
- case WM_ACTIVATE:
- memset(&abd, 0, sizeof(abd));
- abd.cbSize = sizeof(abd);
- abd.hWnd = msg->hwnd;
- SHAppBarMessage(ABM_ACTIVATE, &abd);
- return 0;
- case WM_SIZE:
- ModernSkinButton_ReposButtons(msg->hwnd, SBRF_DO_REDRAW_ALL, nullptr);
- return 0;
-
- case WM_WINDOWPOSCHANGED:
- {
- if (g_CluiData.fDocked)
- ModernSkinButton_ReposButtons(msg->hwnd, SBRF_DO_NOT_DRAW, nullptr);
- return 0;
- }
- case WM_MOVING:
- {
- RECT rcMonitor;
- RECT rcWindow;
- RECT *rc;
- int dx = 0;
- POINT ptCursor;
- if (g_CluiData.fDocked) return 0;
-
- // GetMessagePos() is no good, position is always unsigned
- GetCursorPos(&ptCursor);
- GetWindowRect(msg->hwnd, &rcWindow);
- dock_drag_dx = rcWindow.left - ptCursor.x;
- dock_drag_dy = rcWindow.top - ptCursor.y;
- Docking_GetMonitorRectFromPoint(ptCursor, &rcMonitor);
-
- if (((ptCursor.x < rcMonitor.left + EDGESENSITIVITY)
- || (ptCursor.x >= rcMonitor.right - EDGESENSITIVITY))
- && db_get_b(0, "CLUI", "DockToSides", SETTING_DOCKTOSIDES_DEFAULT))
- {
- memset(&abd, 0, sizeof(abd));
- abd.cbSize = sizeof(abd);
- abd.hWnd = msg->hwnd;
- abd.lParam = 0;
- abd.uCallbackMessage = WM_DOCKCALLBACK;
- SHAppBarMessage(ABM_NEW, &abd);
- if (ptCursor.x < rcMonitor.left + EDGESENSITIVITY) g_CluiData.fDocked = DOCKED_LEFT;
- else g_CluiData.fDocked = DOCKED_RIGHT;
- // TempDock = 1;
- GetWindowRect(msg->hwnd, (LPRECT)msg->lParam);
- rc = (RECT*)msg->lParam;
- if (g_CluiData.fDocked == DOCKED_RIGHT)
- dx = (rc->right > rcMonitor.right) ? rc->right - rcMonitor.right : 0;
- else
- dx = (rc->left < rcMonitor.left) ? rc->left - rcMonitor.left : 0;
- OffsetRect(rc, -dx, 0);
- Docking_AdjustPosition(msg->hwnd, (LPRECT)&rcMonitor, (LPRECT)msg->lParam);
- SendMessage(msg->hwnd, WM_SIZE, 0, 0);
- g_CluiData.mutexPreventDockMoving = 0;
- Sync(CLUIFrames_OnMoving, msg->hwnd, (LPRECT)msg->lParam);
- g_CluiData.mutexPreventDockMoving = 1;
- mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
- g_plugin.setByte("Docked", (uint8_t)g_CluiData.fDocked);
- ModernSkinButton_ReposButtons(msg->hwnd, SBRF_DO_NOT_DRAW, nullptr);
- return TRUE;
- }
- return 0;
- }
- case WM_EXITSIZEMOVE:
- {
- RECT rcMonitor;
- RECT rcWindow;
- if (TempDock) TempDock = 0;
- GetWindowRect(msg->hwnd, &rcWindow);
- Docking_GetMonitorRectFromWindow(msg->hwnd, &rcMonitor);
- Docking_AdjustPosition(msg->hwnd, &rcMonitor, &rcWindow);
- *((LRESULT*)lParam) = TRUE;
- g_CluiData.mutexPreventDockMoving = 0;
- SetWindowPos(msg->hwnd, nullptr, rcWindow.left, rcWindow.top, 0, 0, SWP_NOSIZE | SWP_NOZORDER | SWP_NOREDRAW | SWP_NOSENDCHANGING);
- Sync(CLUIFrames_OnMoving, msg->hwnd, &rcWindow);
- ModernSkinButton_ReposButtons(msg->hwnd, SBRF_DO_NOT_DRAW, nullptr);// -= -= -=
- g_CluiData.mutexPreventDockMoving = 1;
- return 1;
- }
-
- case WM_MOVE:
- {
- ModernSkinButton_ReposButtons(msg->hwnd, SBRF_DO_ALT_DRAW, nullptr);
- return 0;
- }
- case WM_SIZING:
- {
- if (g_CluiData.fDocked) ModernSkinButton_ReposButtons(msg->hwnd, SBRF_DO_NOT_DRAW, nullptr);
- return FALSE;
- }
- case WM_SHOWWINDOW:
- {
- if (msg->lParam)
- return 0;
- if ((msg->wParam && g_CluiData.fDocked < 0) || (!msg->wParam && g_CluiData.fDocked>0))
- g_CluiData.fDocked = -g_CluiData.fDocked;
- memset(&abd, 0, sizeof(abd));
- abd.cbSize = sizeof(abd);
- abd.hWnd = msg->hwnd;
- if (msg->wParam) {
- RECT rc, rcMonitor;
- Docking_GetMonitorRectFromWindow(msg->hwnd, &rcMonitor);
- abd.lParam = 0;
- abd.uCallbackMessage = WM_DOCKCALLBACK;
- SHAppBarMessage(ABM_NEW, &abd);
- GetWindowRect(msg->hwnd, &rc);
- Docking_AdjustPosition(msg->hwnd, &rcMonitor, &rc);
- MoveWindow(msg->hwnd, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, FALSE);
- Sync(CLUIFrames_OnMoving, msg->hwnd, &rc);
- ModernSkinButton_ReposButtons(msg->hwnd, SBRF_DO_NOT_DRAW, nullptr);// -= -= -=
- }
- else {
- SHAppBarMessage(ABM_REMOVE, &abd);
- }
- }
- return 0;
- case WM_NCHITTEST:
- { LONG result;
- result = DefWindowProc(msg->hwnd, WM_NCHITTEST, msg->wParam, msg->lParam);
- if (result == HTSIZE || result == HTTOP || result == HTTOPLEFT || result == HTTOPRIGHT ||
- result == HTBOTTOM || result == HTBOTTOMRIGHT || result == HTBOTTOMLEFT) {
- *((LRESULT*)lParam) = HTCLIENT; return TRUE;
- }
- if (g_CluiData.fDocked == DOCKED_LEFT && result == HTLEFT) { *((LRESULT*)lParam) = HTCLIENT; return TRUE; }
- if (g_CluiData.fDocked == DOCKED_RIGHT && result == HTRIGHT) { *((LRESULT*)lParam) = HTCLIENT; return TRUE; }
-
-
- return 0;
- }
- case WM_SYSCOMMAND:
- if ((msg->wParam & 0xFFF0) != SC_MOVE) return 0;
- SetActiveWindow(msg->hwnd);
- SetCapture(msg->hwnd);
- draggingTitle = 1;
- *((LRESULT*)lParam) = 0;
- return TRUE;
- case WM_MOUSEMOVE:
-
- if (!draggingTitle) return 0;
- { RECT rc;
- POINT pt;
- GetClientRect(msg->hwnd, &rc);
- if (((g_CluiData.fDocked == DOCKED_LEFT || g_CluiData.fDocked == -DOCKED_LEFT) && (short)LOWORD(msg->lParam) > rc.right) ||
- ((g_CluiData.fDocked == DOCKED_RIGHT || g_CluiData.fDocked == -DOCKED_RIGHT) && (short)LOWORD(msg->lParam) < 0)) {
- ReleaseCapture();
- draggingTitle = 0;
- memset(&abd, 0, sizeof(abd));
- abd.cbSize = sizeof(abd);
- abd.hWnd = msg->hwnd;
- SHAppBarMessage(ABM_REMOVE, &abd);
- g_CluiData.fDocked = 0;
- GetCursorPos(&pt);
- PostMessage(msg->hwnd, WM_NCLBUTTONDOWN, HTCAPTION, MAKELPARAM(pt.x, pt.y));
- SetWindowPos(msg->hwnd, nullptr, pt.x - rc.right / 2, pt.y - GetSystemMetrics(SM_CYFRAME) - GetSystemMetrics(SM_CYSMCAPTION) / 2, g_plugin.getDword("Width", 0), g_plugin.getDword("Height", 0), SWP_NOZORDER);
- g_plugin.setByte("Docked", (uint8_t)g_CluiData.fDocked);
- // ModernSkinButton_ReposButtons(msg->hwnd, SBRF_DO_NOT_DRAW, nullptr);
- }
- return 1;
- }
- case WM_LBUTTONUP:
- if (draggingTitle) {
- ReleaseCapture();
- draggingTitle = 0;
- }
- return 0;
- case WM_DOCKCALLBACK:
- switch (msg->wParam) {
- case ABN_WINDOWARRANGE:
- CLUI_ShowWindowMod(msg->hwnd, msg->lParam ? SW_HIDE : SW_SHOW);
- {
-
- RECT rc, rcMonitor;
- Docking_GetMonitorRectFromWindow(msg->hwnd, &rcMonitor);
- GetWindowRect(msg->hwnd, &rc);
- Docking_AdjustPosition(msg->hwnd, &rcMonitor, &rc);
- Sync(CLUIFrames_OnMoving, msg->hwnd, &rc); // -= -= -=
- ModernSkinButton_ReposButtons(msg->hwnd, SBRF_DO_NOT_DRAW, nullptr);
-
- g_CluiData.mutexPreventDockMoving = 1;
- }
- break;
- }
- return TRUE;
- case WM_DESTROY:
- if (g_CluiData.fDocked > 0) {
- memset(&abd, 0, sizeof(abd));
- abd.cbSize = sizeof(abd);
- abd.hWnd = msg->hwnd;
- SHAppBarMessage(ABM_REMOVE, &abd);
- ModernSkinButton_ReposButtons(msg->hwnd, SBRF_DO_NOT_DRAW, nullptr);
- }
- return 0;
- }
- return 0;
-}
diff --git a/plugins/Clist_modern/src/modern_global.cpp b/plugins/Clist_modern/src/modern_global.cpp
index aeeff9d86e..b70a506e9d 100644
--- a/plugins/Clist_modern/src/modern_global.cpp
+++ b/plugins/Clist_modern/src/modern_global.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_modern/src/modern_global_structure.h b/plugins/Clist_modern/src/modern_global_structure.h
index 689d06b7de..28cd3507a8 100644
--- a/plugins/Clist_modern/src/modern_global_structure.h
+++ b/plugins/Clist_modern/src/modern_global_structure.h
@@ -44,7 +44,6 @@ struct CLUIDATA
bool bEventAreaEnabled;
bool bNotifyActive;
bool fDisableSkinEngine;
- bool fOnDesktop;
bool fSmoothAnimation;
bool fLayered;
bool fSortOfflineBottom;
diff --git a/plugins/Clist_modern/src/modern_image_array.cpp b/plugins/Clist_modern/src/modern_image_array.cpp
index 3af166cdac..8a5b3eb4e2 100644
--- a/plugins/Clist_modern/src/modern_image_array.cpp
+++ b/plugins/Clist_modern/src/modern_image_array.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_modern/src/modern_image_array.h b/plugins/Clist_modern/src/modern_image_array.h
index a62ce2bfb1..6bb459c1c9 100644
--- a/plugins/Clist_modern/src/modern_image_array.h
+++ b/plugins/Clist_modern/src/modern_image_array.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_modern/src/modern_keyboard.cpp b/plugins/Clist_modern/src/modern_keyboard.cpp
index 12765c2754..3ed1698f8b 100644
--- a/plugins/Clist_modern/src/modern_keyboard.cpp
+++ b/plugins/Clist_modern/src/modern_keyboard.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_modern/src/modern_rowheight_funcs.cpp b/plugins/Clist_modern/src/modern_rowheight_funcs.cpp
index 8ef47bdf1e..adf3b32a4a 100644
--- a/plugins/Clist_modern/src/modern_rowheight_funcs.cpp
+++ b/plugins/Clist_modern/src/modern_rowheight_funcs.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_modern/src/modern_rowheight_funcs.h b/plugins/Clist_modern/src/modern_rowheight_funcs.h
index 7318c45008..72341d5724 100644
--- a/plugins/Clist_modern/src/modern_rowheight_funcs.h
+++ b/plugins/Clist_modern/src/modern_rowheight_funcs.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_modern/src/modern_skinbutton.cpp b/plugins/Clist_modern/src/modern_skinbutton.cpp
index 61772baee1..44f2b3fc81 100644
--- a/plugins/Clist_modern/src/modern_skinbutton.cpp
+++ b/plugins/Clist_modern/src/modern_skinbutton.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_modern/src/modern_skinengine.cpp b/plugins/Clist_modern/src/modern_skinengine.cpp
index 651896d422..3246fd5776 100644
--- a/plugins/Clist_modern/src/modern_skinengine.cpp
+++ b/plugins/Clist_modern/src/modern_skinengine.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_modern/src/modern_skinopt.cpp b/plugins/Clist_modern/src/modern_skinopt.cpp
index 160429b338..33b5cc17b0 100644
--- a/plugins/Clist_modern/src/modern_skinopt.cpp
+++ b/plugins/Clist_modern/src/modern_skinopt.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_modern/src/modern_skinselector.cpp b/plugins/Clist_modern/src/modern_skinselector.cpp
index f4ca98a19a..d6e2a9bd1b 100644
--- a/plugins/Clist_modern/src/modern_skinselector.cpp
+++ b/plugins/Clist_modern/src/modern_skinselector.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_modern/src/modern_skinselector.h b/plugins/Clist_modern/src/modern_skinselector.h
index 842fed0578..033a555d32 100644
--- a/plugins/Clist_modern/src/modern_skinselector.h
+++ b/plugins/Clist_modern/src/modern_skinselector.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_modern/src/modern_static_clui.h b/plugins/Clist_modern/src/modern_static_clui.h
index 3777e3b6e7..475d389997 100644
--- a/plugins/Clist_modern/src/modern_static_clui.h
+++ b/plugins/Clist_modern/src/modern_static_clui.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -62,7 +62,7 @@ int CListMod_HideWindow(HWND hwndContactList, int mode);
int CLUIServices_LoadModule(void);
INT_PTR CLUIServices_SortList(WPARAM wParam, LPARAM lParam);
-void Docking_GetMonitorRectFromWindow(HWND hWnd, RECT *rc);
+void GetMonitorRectFromWindow(HWND hWnd, RECT *rc);
int EventArea_Create(HWND hCluiWnd);
diff --git a/plugins/Clist_modern/src/modern_statusbar_options.cpp b/plugins/Clist_modern/src/modern_statusbar_options.cpp
index 1ab7247a93..3c0c50613c 100644
--- a/plugins/Clist_modern/src/modern_statusbar_options.cpp
+++ b/plugins/Clist_modern/src/modern_statusbar_options.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_modern/src/modern_toolbar.cpp b/plugins/Clist_modern/src/modern_toolbar.cpp
index 73575ff49c..d891cbaa90 100644
--- a/plugins/Clist_modern/src/modern_toolbar.cpp
+++ b/plugins/Clist_modern/src/modern_toolbar.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 Miranda ICQ/IM project,
Copyright 2007 Artem Shpynov
@@ -85,8 +85,8 @@ void Modern_InitButtons()
it.hButton = g_plugin.addTTB(&tbb);
}
- SetButtonPressed(3, Clist::HideOffline);
- SetButtonPressed(6, Clist::UseGroups);
+ SetButtonPressed(3, Clist::bHideOffline);
+ SetButtonPressed(6, Clist::bUseGroups);
SetButtonPressed(7, db_get_b(0, "Skin", "UseSound", SETTING_ENABLESOUNDS_DEFAULT));
}
diff --git a/plugins/Clist_modern/src/modern_utils.cpp b/plugins/Clist_modern/src/modern_utils.cpp
index 2cea1b9a1a..2210a2c3ab 100644
--- a/plugins/Clist_modern/src/modern_utils.cpp
+++ b/plugins/Clist_modern/src/modern_utils.cpp
@@ -62,3 +62,27 @@ BOOL DestroyIcon_protect(HICON icon)
if (icon) return DestroyIcon(icon);
return FALSE;
}
+
+void GetMonitorRectFromWindow(HWND hWnd, RECT *rc)
+{
+ POINT pt;
+ GetWindowRect(hWnd, rc);
+ pt.x = rc->left;
+ pt.y = rc->top;
+
+ MONITORINFO monitorInfo;
+ HMONITOR hMonitor = MonitorFromPoint(pt, MONITOR_DEFAULTTONEAREST); // always returns a valid value
+ monitorInfo.cbSize = sizeof(MONITORINFO);
+
+ if (GetMonitorInfoW(hMonitor, &monitorInfo)) {
+ memcpy(rc, &monitorInfo.rcMonitor, sizeof(RECT));
+ return;
+ }
+
+ // "generic" win95/NT support, also serves as failsafe
+ rc->left = 0;
+ rc->top = 0;
+ rc->bottom = GetSystemMetrics(SM_CYSCREEN);
+ rc->right = GetSystemMetrics(SM_CXSCREEN);
+
+}
diff --git a/plugins/Clist_modern/src/modern_viewmodebar.cpp b/plugins/Clist_modern/src/modern_viewmodebar.cpp
index 6557e5dc8e..78b428ac52 100644
--- a/plugins/Clist_modern/src/modern_viewmodebar.cpp
+++ b/plugins/Clist_modern/src/modern_viewmodebar.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-03 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -1340,7 +1340,7 @@ void ApplyViewMode(const char *szName)
if (g_CluiData.bFilterEffective & CLVM_FILTER_STATUS) {
if (g_CluiData.bOldHideOffline == -1)
- g_CluiData.bOldHideOffline = Clist::HideOffline;
+ g_CluiData.bOldHideOffline = Clist::bHideOffline;
g_clistApi.pfnSetHideOffline(false);
}
@@ -1352,7 +1352,7 @@ void ApplyViewMode(const char *szName)
int iValue = (g_CluiData.filterFlags & CLVM_USEGROUPS) ? 1 : ((g_CluiData.filterFlags & CLVM_DONOTUSEGROUPS) ? 0 : -1);
if (iValue != -1) {
if (g_CluiData.bOldUseGroups == -1)
- g_CluiData.bOldUseGroups = Clist::UseGroups;
+ g_CluiData.bOldUseGroups = Clist::bUseGroups;
CallService(MS_CLIST_SETUSEGROUPS, iValue, 0);
}
@@ -1364,7 +1364,7 @@ void ApplyViewMode(const char *szName)
iValue = (g_CluiData.filterFlags & CLVM_HIDEEMPTYGROUPS) ? 1 : ((g_CluiData.filterFlags & CLVM_SHOWEMPTYGROUPS) ? 0 : -1);
if (iValue != -1) {
if (g_CluiData.bOldHideEmptyGroups == -1)
- g_CluiData.bOldHideEmptyGroups = Clist::HideEmptyGroups;
+ g_CluiData.bOldHideEmptyGroups = Clist::bHideEmptyGroups;
SendMessage(g_clistApi.hwndContactTree, CLM_SETHIDEEMPTYGROUPS, iValue, 0);
}
diff --git a/plugins/Clist_modern/src/resource.h b/plugins/Clist_modern/src/resource.h
index 8e46e99484..a82aa3812b 100644
--- a/plugins/Clist_modern/src/resource.h
+++ b/plugins/Clist_modern/src/resource.h
@@ -250,7 +250,6 @@
#define IDC_HILIGHTMODE2 1659
#define IDC_HILIGHTMODE1 1660
#define IDC_HILIGHTMODE3 1661
-#define IDC_ONDESKTOP 1662
#define IDC_HILIGHTMODE4 1663
#define IDC_USECONNECTINGICON 1761
#define IDC_AVATAR_CUSTOM_CORNER_SIZE_CHECK 1761
@@ -302,7 +301,6 @@
#define IDC_AVATAR_SIZE_PIXELS3 1806
#define IDC_LAYERENGINE 1807
#define IDC_SNAPTOEDGES 1808
-#define IDC_DOCKTOSIDES 1809
#define IDC_AVATAR_OVERLAY_ICON_NORMAL 1811
#define IDC_EVENTAREA_NONE 1811
#define IDC_AVATAR_OVERLAY_ICON_PROTOCOL 1812
diff --git a/plugins/Clist_modern/src/stdafx.h b/plugins/Clist_modern/src/stdafx.h
index 7a1bb97db5..9af21c4a65 100644
--- a/plugins/Clist_modern/src/stdafx.h
+++ b/plugins/Clist_modern/src/stdafx.h
@@ -5,7 +5,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_nicer/clist_nicer.vcxproj b/plugins/Clist_nicer/clist_nicer.vcxproj
index ddd953463b..4aaf9f33d3 100644
--- a/plugins/Clist_nicer/clist_nicer.vcxproj
+++ b/plugins/Clist_nicer/clist_nicer.vcxproj
@@ -97,7 +97,6 @@
<ClCompile Include="src\contact.cpp" />
<ClCompile Include="src\coolsblib.cpp" />
<ClCompile Include="src\coolscroll.cpp" />
- <ClCompile Include="src\Docking.cpp" />
<ClCompile Include="src\extBackg.cpp" />
<ClCompile Include="src\groupmenu.cpp" />
<ClCompile Include="src\init.cpp" />
diff --git a/plugins/Clist_nicer/clist_nicer.vcxproj.filters b/plugins/Clist_nicer/clist_nicer.vcxproj.filters
index 1dcfb14ca5..cfbf35fa34 100644
--- a/plugins/Clist_nicer/clist_nicer.vcxproj.filters
+++ b/plugins/Clist_nicer/clist_nicer.vcxproj.filters
@@ -68,9 +68,6 @@
<ClCompile Include="src\coolscroll.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="src\Docking.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
<ClCompile Include="src\extBackg.cpp">
<Filter>Source Files</Filter>
</ClCompile>
diff --git a/plugins/Clist_nicer/res/resource.rc b/plugins/Clist_nicer/res/resource.rc
index 7311258a93..5a8bc95314 100644
--- a/plugins/Clist_nicer/res/resource.rc
+++ b/plugins/Clist_nicer/res/resource.rc
@@ -209,7 +209,6 @@ BEGIN
COMBOBOX IDC_BORDERSTYLE,62,60,64,56,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
LTEXT "Title bar text:",IDC_STATIC,11,80,51,8
EDITTEXT IDC_TITLETEXT,62,79,64,12,ES_AUTOHSCROLL
- CONTROL "Pin to desktop",IDC_ONDESKTOP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,96,128,10
CONTROL "Show drop shadow (restart required)",IDC_DROPSHADOW,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,108,138,10
CONTROL "Hide contact list after it has been idle for",IDC_AUTOHIDE,
diff --git a/plugins/Clist_nicer/src/CLCButton.cpp b/plugins/Clist_nicer/src/CLCButton.cpp
index c5888edc88..fdde53ffce 100644
--- a/plugins/Clist_nicer/src/CLCButton.cpp
+++ b/plugins/Clist_nicer/src/CLCButton.cpp
@@ -65,8 +65,8 @@ static void InitDefaultButtons()
}
g_pButton = nullptr;
- ClcSetButtonState(IDC_TBHIDEOFFLINE, Clist::HideOffline);
- ClcSetButtonState(IDC_TBHIDEGROUPS, Clist::UseGroups);
+ ClcSetButtonState(IDC_TBHIDEOFFLINE, Clist::bHideOffline);
+ ClcSetButtonState(IDC_TBHIDEGROUPS, Clist::bUseGroups);
ClcSetButtonState(IDC_TBSOUND, db_get_b(0, "Skin", "UseSound", 1) ? BST_UNCHECKED : BST_CHECKED);
}
diff --git a/plugins/Clist_nicer/src/Docking.cpp b/plugins/Clist_nicer/src/Docking.cpp
deleted file mode 100644
index 1cec317662..0000000000
--- a/plugins/Clist_nicer/src/Docking.cpp
+++ /dev/null
@@ -1,294 +0,0 @@
-/*
-
-Miranda NG: the free IM client for Microsoft* Windows*
-
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
-Copyright (c) 2000-03 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#include "stdafx.h"
-
-#define WM_DOCKCALLBACK (WM_USER+121)
-#define WM_CREATEDOCKED (WM_USER+122)
-#define EDGESENSITIVITY 3
-
-#define DOCKED_NONE 0
-#define DOCKED_LEFT 1
-#define DOCKED_RIGHT 2
-static int docked;
-
-extern RECT cluiPos;
-
-static void Docking_GetMonitorRectFromPoint(POINT pt, RECT *rc)
-{
- MONITORINFO monitorInfo;
- HMONITOR hMonitor = MonitorFromPoint(pt, MONITOR_DEFAULTTONEAREST); // always returns a valid value
- monitorInfo.cbSize = sizeof(MONITORINFO);
-
- if (GetMonitorInfo(hMonitor, &monitorInfo)) {
- memcpy(rc, &monitorInfo.rcMonitor, sizeof(RECT));
- return;
- }
-
- // "generic" win95/NT support, also serves as failsafe
- rc->left = 0;
- rc->top = 0;
- rc->bottom = GetSystemMetrics(SM_CYSCREEN);
- rc->right = GetSystemMetrics(SM_CXSCREEN);
-}
-
-static void Docking_GetMonitorRectFromWindow(HWND hWnd, RECT *rc)
-{
- POINT ptWindow;
- GetWindowRect(hWnd, rc);
- ptWindow.x = rc->left;
- ptWindow.y = rc->top;
- Docking_GetMonitorRectFromPoint(ptWindow, rc);
-}
-
-static void Docking_AdjustPosition(HWND hwnd, RECT *rcDisplay, RECT *rc)
-{
- APPBARDATA abd;
-
- memset(&abd, 0, sizeof(abd));
- abd.cbSize = sizeof(abd);
- abd.hWnd = hwnd;
- abd.uEdge = docked == DOCKED_LEFT ? ABE_LEFT : ABE_RIGHT;
- abd.rc = *rc;
- abd.rc.top = rcDisplay->top;
- abd.rc.bottom = rcDisplay->bottom;
- if (docked == DOCKED_LEFT) {
- abd.rc.right = rcDisplay->left + (abd.rc.right - abd.rc.left) - cfg::dat.bClipBorder;
- abd.rc.left = rcDisplay->left - cfg::dat.bClipBorder;
- }
- else {
- abd.rc.left = rcDisplay->right - (abd.rc.right - abd.rc.left) + cfg::dat.bClipBorder;
- abd.rc.right = rcDisplay->right + cfg::dat.bClipBorder;
- }
- SHAppBarMessage(ABM_SETPOS, &abd);
- *rc = abd.rc;
-}
-
-int Docking_IsDocked(WPARAM, LPARAM)
-{
- return docked;
-}
-
-int Docking_ProcessWindowMessage(WPARAM wParam, LPARAM lParam)
-{
- APPBARDATA abd;
- static int draggingTitle;
- MSG *msg = (MSG *)wParam;
-
- if (msg->message == WM_DESTROY)
- g_plugin.setByte("Docked", (uint8_t)docked);
- if (!docked && msg->message != WM_CREATE && msg->message != WM_MOVING && msg->message != WM_CREATEDOCKED && msg->message != WM_MOVE)
- return 0;
-
- switch (msg->message) {
- case WM_CREATE:
- //if (GetSystemMetrics(SM_CMONITORS)>1) return 0;
- if (g_plugin.getByte("Docked", 0))
- PostMessage(msg->hwnd, WM_CREATEDOCKED, 0, 0);
- draggingTitle = 0;
- return 0;
-
- case WM_CREATEDOCKED:
- //we need to post a message just after creation to let main message function do some work
- docked = (int)(char)g_plugin.getByte("Docked", 0);
- if (IsWindowVisible(msg->hwnd) && !IsIconic(msg->hwnd)) {
- RECT rc, rcMonitor;
- memset(&abd, 0, sizeof(abd));
- abd.cbSize = sizeof(abd);
- abd.hWnd = msg->hwnd;
- abd.lParam = 0;
- abd.uCallbackMessage = WM_DOCKCALLBACK;
- SHAppBarMessage(ABM_NEW, &abd);
- GetWindowRect(msg->hwnd, &rc);
- Docking_GetMonitorRectFromWindow(msg->hwnd, &rcMonitor);
- Docking_AdjustPosition(msg->hwnd, &rcMonitor, &rc);
- MoveWindow(msg->hwnd, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, TRUE);
- }
- break;
-
- case WM_ACTIVATE:
- memset(&abd, 0, sizeof(abd));
- abd.cbSize = sizeof(abd);
- abd.hWnd = msg->hwnd;
- SHAppBarMessage(ABM_ACTIVATE, &abd);
- return 0;
-
- case WM_WINDOWPOSCHANGED:
- memset(&abd, 0, sizeof(abd));
- abd.cbSize = sizeof(abd);
- abd.hWnd = msg->hwnd;
- SHAppBarMessage(ABM_WINDOWPOSCHANGED, &abd);
- return 0;
-
- case WM_MOVING:
- {
- RECT rcMonitor;
- POINT ptCursor;
-
- // stop early
- if (GetAsyncKeyState(VK_CONTROL) & 0x8000)
- return 0;
-
- // GetMessagePos() is no good, position is always unsigned
- GetCursorPos(&ptCursor);
- Docking_GetMonitorRectFromPoint(ptCursor, &rcMonitor);
-
- if ((ptCursor.x < rcMonitor.left + EDGESENSITIVITY) || (ptCursor.x >= rcMonitor.right - EDGESENSITIVITY)) {
- if (!(GetWindowLongPtr(msg->hwnd, GWL_EXSTYLE) & WS_EX_TOOLWINDOW)) {
- SendMessage(msg->hwnd, CLUIINTM_REDRAW, 0, 0);
- MessageBox(nullptr, TranslateT("The contact list cannot be docked when using the default title bar and border. Use a toolwindow or borderless style instead."),
- TranslateT("Contact list docking"), MB_OK);
- return 0;
- }
- memset(&abd, 0, sizeof(abd));
- abd.cbSize = sizeof(abd);
- abd.hWnd = msg->hwnd;
- abd.lParam = 0;
- abd.uCallbackMessage = WM_DOCKCALLBACK;
- SHAppBarMessage(ABM_NEW, &abd);
- if (ptCursor.x < rcMonitor.left + EDGESENSITIVITY)
- docked = DOCKED_LEFT;
- else
- docked = DOCKED_RIGHT;
- SendMessage(msg->hwnd, WM_LBUTTONUP, 0, MAKELPARAM(ptCursor.x, ptCursor.y));
- GetWindowRect(msg->hwnd, (LPRECT)msg->lParam);
- Docking_AdjustPosition(msg->hwnd, (LPRECT)&rcMonitor, (LPRECT)msg->lParam);
- PostMessage(msg->hwnd, CLUIINTM_REDRAW, 0, 0);
- return TRUE;
- }
- }
- return 0;
-
- case WM_MOVE:
- if (docked) {
- RECT rc, rcMonitor;
- Docking_GetMonitorRectFromWindow(msg->hwnd, &rcMonitor);
- GetWindowRect(msg->hwnd, &rc);
- Docking_AdjustPosition(msg->hwnd, &rcMonitor, &rc);
- MoveWindow(msg->hwnd, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, TRUE);
- return 1;
- }
- return 0;
-
- case WM_SIZING:
- {
- RECT rcMonitor;
- Docking_GetMonitorRectFromWindow(msg->hwnd, &rcMonitor);
- Docking_AdjustPosition(msg->hwnd, &rcMonitor, (LPRECT)msg->lParam);
- *((LRESULT *)lParam) = TRUE;
- }
- return TRUE;
-
- case WM_SHOWWINDOW:
- if (msg->lParam)
- return 0;
- if ((msg->wParam && docked < 0) || (!msg->wParam && docked > 0))
- docked = -docked;
- memset(&abd, 0, sizeof(abd));
- abd.cbSize = sizeof(abd);
- abd.hWnd = msg->hwnd;
- if (msg->wParam) {
- RECT rc, rcMonitor;
- Docking_GetMonitorRectFromWindow(msg->hwnd, &rcMonitor);
- abd.lParam = 0;
- abd.uCallbackMessage = WM_DOCKCALLBACK;
- SHAppBarMessage(ABM_NEW, &abd);
- GetWindowRect(msg->hwnd, &rc);
- Docking_AdjustPosition(msg->hwnd, &rcMonitor, &rc);
- MoveWindow(msg->hwnd, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, FALSE);
- }
- else SHAppBarMessage(ABM_REMOVE, &abd);
- return 0;
-
- case WM_NCHITTEST:
- {
- LONG result = DefWindowProc(msg->hwnd, WM_NCHITTEST, msg->wParam, msg->lParam);
- if (result == HTSIZE || result == HTTOP || result == HTTOPLEFT || result == HTTOPRIGHT || result == HTBOTTOM || result == HTBOTTOMRIGHT || result == HTBOTTOMLEFT) {
- *((LRESULT *)lParam) = HTCLIENT; return TRUE;
- }
- if (docked == DOCKED_LEFT && result == HTLEFT) {
- *((LRESULT *)lParam) = HTCLIENT; return TRUE;
- }
- if (docked == DOCKED_RIGHT && result == HTRIGHT) {
- *((LRESULT *)lParam) = HTCLIENT; return TRUE;
- }
- }
- return 0;
-
- case WM_SYSCOMMAND:
- if ((msg->wParam & 0xFFF0) != SC_MOVE)
- return 0;
- SetActiveWindow(msg->hwnd);
- SetCapture(msg->hwnd);
- draggingTitle = 1;
- *((LRESULT *)lParam) = 0;
- return TRUE;
-
- case WM_MOUSEMOVE:
- if (!draggingTitle)
- return 0; {
- RECT rc;
- POINT pt;
- GetClientRect(msg->hwnd, &rc);
- if (((docked == DOCKED_LEFT || docked == -DOCKED_LEFT) && (short)LOWORD(msg->lParam) > rc.right) || ((docked == DOCKED_RIGHT || docked == -DOCKED_RIGHT) && (short)LOWORD(msg->lParam) < 0)) {
- ReleaseCapture();
- draggingTitle = 0;
- memset(&abd, 0, sizeof(abd));
- abd.cbSize = sizeof(abd);
- abd.hWnd = msg->hwnd;
- SHAppBarMessage(ABM_REMOVE, &abd);
- docked = 0;
- GetCursorPos(&pt);
- PostMessage(msg->hwnd, WM_NCLBUTTONDOWN, HTCAPTION, MAKELPARAM(pt.x, pt.y));
- SetWindowPos(msg->hwnd, nullptr, pt.x - rc.right / 2, pt.y - GetSystemMetrics(SM_CYFRAME) - GetSystemMetrics(SM_CYSMCAPTION) / 2, cluiPos.right, cluiPos.bottom, SWP_NOZORDER);
- }
- }
- return 1;
-
- case WM_LBUTTONUP:
- if (draggingTitle) {
- ReleaseCapture();
- draggingTitle = 0;
- }
- return 0;
-
- case WM_DOCKCALLBACK:
- switch (msg->wParam) {
- case ABN_WINDOWARRANGE:
- ShowWindow(msg->hwnd, msg->lParam ? SW_HIDE : SW_SHOW);
- break;
- }
- return TRUE;
-
- case WM_DESTROY:
- if (docked > 0) {
- memset(&abd, 0, sizeof(abd));
- abd.cbSize = sizeof(abd);
- abd.hWnd = msg->hwnd;
- SHAppBarMessage(ABM_REMOVE, &abd);
- }
- return 0;
- }
- return 0;
-}
diff --git a/plugins/Clist_nicer/src/alphablend.cpp b/plugins/Clist_nicer/src/alphablend.cpp
index 353441efe3..6961ba2c29 100644
--- a/plugins/Clist_nicer/src/alphablend.cpp
+++ b/plugins/Clist_nicer/src/alphablend.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-03 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_nicer/src/alphablend.h b/plugins/Clist_nicer/src/alphablend.h
index 56c1abed09..5b9e88c8a2 100644
--- a/plugins/Clist_nicer/src/alphablend.h
+++ b/plugins/Clist_nicer/src/alphablend.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-03 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_nicer/src/clc.cpp b/plugins/Clist_nicer/src/clc.cpp
index 2a790d5ffd..d580f9b270 100644
--- a/plugins/Clist_nicer/src/clc.cpp
+++ b/plugins/Clist_nicer/src/clc.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-03 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -72,17 +72,17 @@ static int ClcEventAdded(WPARAM hContact, LPARAM lParam)
if (hContact && lParam) {
DBEVENTINFO dbei = {};
db_event_get(lParam, &dbei);
- if (dbei.eventType == EVENTTYPE_MESSAGE && !(dbei.flags & DBEF_SENT)) {
+ if (dbei.eventType == EVENTTYPE_MESSAGE && !dbei.bSent) {
uint32_t firstTime = g_plugin.getDword(hContact, "mf_firstEvent");
uint32_t count = g_plugin.getDword(hContact, "mf_count");
count++;
- new_freq = count ? (dbei.timestamp - firstTime) / count : 0x7fffffff;
+ new_freq = count ? (dbei.getUnixtime() - firstTime) / count : 0x7fffffff;
g_plugin.setDword(hContact, "mf_freq", new_freq);
g_plugin.setDword(hContact, "mf_count", count);
TExtraCache *p = cfg::getCache(hContact, nullptr);
if (p) {
- p->dwLastMsgTime = dbei.timestamp;
+ p->dwLastMsgTime = dbei.getUnixtime();
if (new_freq)
p->msgFrequency = new_freq;
Clist_Broadcast(INTM_FORCESORT, 0, 1);
@@ -133,7 +133,7 @@ static int ClcSettingChanged(WPARAM hContact, LPARAM lParam)
if (!__strcmp(cws->szSetting, "Status")) {
if (!Contact::IsHidden(hContact))
if (cws->value.wVal == ID_STATUS_OFFLINE)
- if (Clist::HideOffline)
+ if (Clist::bHideOffline)
return 0;
SendMessage(g_clistApi.hwndContactTree, INTM_STATUSCHANGED, hContact, lParam);
@@ -358,7 +358,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L
if (hSelItem) {
ClcGroup *selgroup;
if (Clist_FindItem(hwnd, dat, hSelItem, &selcontact, &selgroup))
- dat->selection = g_clistApi.pfnGetRowsPriorTo(&dat->list, selgroup, selgroup->cl.indexOf(selcontact));
+ dat->selection = g_clistApi.pfnGetRowsPriorTo(dat, selgroup, selgroup->cl.indexOf(selcontact));
else
dat->selection = -1;
}
diff --git a/plugins/Clist_nicer/src/clc.h b/plugins/Clist_nicer/src/clc.h
index 52c2d6b47d..38bceff19f 100644
--- a/plugins/Clist_nicer/src/clc.h
+++ b/plugins/Clist_nicer/src/clc.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-03 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -422,10 +422,6 @@ void CluiProtocolStatusChanged(int, const char*);
void LoadSkinItemToCache(struct TExtraCache *cEntry);
-// Docking.c
-
-int Docking_IsDocked(WPARAM wParam, LPARAM lParam);
-
// Buttons
#define BUTTONSETIMLICON (WM_USER+20)
@@ -442,16 +438,6 @@ int CoolSB_SetupScrollBar();
#define SETTING_WINDOWSTYLE_DEFAULT 0
-#define SETTING_TRAYICON_SINGLE 0
-#define SETTING_TRAYICON_CYCLE 1
-#define SETTING_TRAYICON_MULTI 2
-
-#define SETTING_STATE_HIDDEN 0
-#define SETTING_STATE_MINIMIZED 1
-#define SETTING_STATE_NORMAL 2
-
-#define SETTING_BRINGTOFRONT_DEFAULT 0
-
#define SETTING_WINDOWSTYLE_TOOLWINDOW 1
#define SETTING_WINDOWSTYLE_THINBORDER 2
#define SETTING_WINDOWSTYLE_NOBORDER 3
diff --git a/plugins/Clist_nicer/src/clcitems.cpp b/plugins/Clist_nicer/src/clcitems.cpp
index fbbd276b02..d356ac8328 100644
--- a/plugins/Clist_nicer/src/clcitems.cpp
+++ b/plugins/Clist_nicer/src/clcitems.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-03 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_nicer/src/clcmsgs.cpp b/plugins/Clist_nicer/src/clcmsgs.cpp
index 223718a145..73a1d41764 100644
--- a/plugins/Clist_nicer/src/clcmsgs.cpp
+++ b/plugins/Clist_nicer/src/clcmsgs.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-03 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_nicer/src/clcopts.cpp b/plugins/Clist_nicer/src/clcopts.cpp
index 3a55b85c1c..0d3d9cf7c3 100644
--- a/plugins/Clist_nicer/src/clcopts.cpp
+++ b/plugins/Clist_nicer/src/clcopts.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-03 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_nicer/src/clcpaint.cpp b/plugins/Clist_nicer/src/clcpaint.cpp
index 802a786e74..e0d9f9e403 100644
--- a/plugins/Clist_nicer/src/clcpaint.cpp
+++ b/plugins/Clist_nicer/src/clcpaint.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-03 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -787,7 +787,7 @@ bgskipped:
pi_avatar = !dat->bisEmbedded && type == CLCIT_CONTACT && (contact->cFlags & ECF_AVATAR) && contact->ace != nullptr && !(contact->ace->dwFlags & AVS_HIDEONCLIST);
- //checkboxes
+ // checkboxes
if (checkboxWidth) {
HANDLE hTheme = nullptr;
if (IS_THEMED)
diff --git a/plugins/Clist_nicer/src/clcutils.cpp b/plugins/Clist_nicer/src/clcutils.cpp
index a8e5ce621f..a2b86479ce 100644
--- a/plugins/Clist_nicer/src/clcutils.cpp
+++ b/plugins/Clist_nicer/src/clcutils.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-03 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_nicer/src/clist.h b/plugins/Clist_nicer/src/clist.h
index 4445e74993..2c85d45a7d 100644
--- a/plugins/Clist_nicer/src/clist.h
+++ b/plugins/Clist_nicer/src/clist.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-03 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_nicer/src/clistevents.cpp b/plugins/Clist_nicer/src/clistevents.cpp
index c93071d2d5..6adb358cc2 100644
--- a/plugins/Clist_nicer/src/clistevents.cpp
+++ b/plugins/Clist_nicer/src/clistevents.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-03 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_nicer/src/clistmenus.cpp b/plugins/Clist_nicer/src/clistmenus.cpp
index d4b7bbfac0..86f66b8881 100644
--- a/plugins/Clist_nicer/src/clistmenus.cpp
+++ b/plugins/Clist_nicer/src/clistmenus.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-03 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_nicer/src/clistmod.cpp b/plugins/Clist_nicer/src/clistmod.cpp
index 0848972031..1379980b14 100644
--- a/plugins/Clist_nicer/src/clistmod.cpp
+++ b/plugins/Clist_nicer/src/clistmod.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-10 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -168,7 +168,7 @@ int ShowHide()
switch (iVisibleState) {
case GWVS_PARTIALLY_COVERED:
//If we don't want to bring it to top, we can use a simple break. This goes against readability ;-) but the comment explains it.
- if (!g_plugin.getByte("BringToFront", SETTING_BRINGTOFRONT_DEFAULT))
+ if (!Clist::bBringToFront)
break;
case GWVS_COVERED: //Fall through (and we're already falling)
case GWVS_HIDDEN:
@@ -186,7 +186,7 @@ int ShowHide()
RECT rcWindow;
SetWindowPos(g_clistApi.hwndContactList, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOREDRAW | SWP_NOSENDCHANGING | SWP_NOCOPYBITS);
- if (!g_plugin.getByte("OnTop", SETTING_ONTOP_DEFAULT))
+ if (!Clist::bOnTop)
SetWindowPos(g_clistApi.hwndContactList, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOREDRAW | SWP_NOSENDCHANGING | SWP_NOCOPYBITS);
SetForegroundWindow(g_clistApi.hwndContactList);
//SetActiveWindow(g_clistApi.hwndContactList);
diff --git a/plugins/Clist_nicer/src/clistopts.cpp b/plugins/Clist_nicer/src/clistopts.cpp
index 8e72d54e64..fdc192cd6b 100644
--- a/plugins/Clist_nicer/src/clistopts.cpp
+++ b/plugins/Clist_nicer/src/clistopts.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-03 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -53,14 +53,14 @@ public:
CheckDlgButton(m_hwnd, IDC_CLISTSUNKEN, cfg::dat.dwFlags & CLUI_FRAME_CLISTSUNKEN ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(m_hwnd, IDC_EVENTAREAAUTOHIDE, cfg::dat.dwFlags & CLUI_FRAME_AUTOHIDENOTIFY ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(m_hwnd, IDC_EVENTAREASUNKEN, (cfg::dat.dwFlags & CLUI_FRAME_EVENTAREASUNKEN) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(m_hwnd, IDC_ALWAYSMULTI, !g_plugin.getByte("AlwaysMulti", SETTING_ALWAYSMULTI_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(m_hwnd, IDC_ALWAYSMULTI, !Clist::bAlwaysMulti ? BST_CHECKED : BST_UNCHECKED);
- chkCycle.SetState(g_plugin.getByte("TrayIcon", SETTING_TRAYICON_DEFAULT) == SETTING_TRAYICON_CYCLE);
- chkMulti.SetState(g_plugin.getByte("TrayIcon", SETTING_TRAYICON_DEFAULT) == SETTING_TRAYICON_MULTI);
- chkDontCycle.SetState(g_plugin.getByte("TrayIcon", SETTING_TRAYICON_DEFAULT) == SETTING_TRAYICON_SINGLE);
+ chkCycle.SetState(Clist::iTrayIcon == SETTING_TRAYICON_CYCLE);
+ chkMulti.SetState(Clist::iTrayIcon == SETTING_TRAYICON_MULTI);
+ chkDontCycle.SetState(Clist::iTrayIcon == SETTING_TRAYICON_SINGLE);
SendDlgItemMessage(m_hwnd, IDC_CYCLETIMESPIN, UDM_SETRANGE, 0, MAKELONG(120, 1));
- SendDlgItemMessage(m_hwnd, IDC_CYCLETIMESPIN, UDM_SETPOS, 0, MAKELONG(g_plugin.getWord("CycleTime", SETTING_CYCLETIME_DEFAULT), 0));
+ SendDlgItemMessage(m_hwnd, IDC_CYCLETIMESPIN, UDM_SETPOS, 0, MAKELONG(Clist::iCycleTime, 0));
{
ptrA szPrimaryStatus(g_plugin.getStringA("PrimaryStatus"));
@@ -87,9 +87,9 @@ public:
bool OnApply() override
{
- g_plugin.setByte("AlwaysMulti", (uint8_t)BST_UNCHECKED == IsDlgButtonChecked(m_hwnd, IDC_ALWAYSMULTI));
- g_plugin.setByte("TrayIcon", (uint8_t)(chkDontCycle.GetState() ? SETTING_TRAYICON_SINGLE : (chkCycle.GetState() ? SETTING_TRAYICON_CYCLE : SETTING_TRAYICON_MULTI)));
- g_plugin.setWord("CycleTime", (uint16_t)SendDlgItemMessage(m_hwnd, IDC_CYCLETIMESPIN, UDM_GETPOS, 0, 0));
+ Clist::bAlwaysMulti = !IsDlgButtonChecked(m_hwnd, IDC_ALWAYSMULTI);
+ Clist::iTrayIcon = chkDontCycle.GetState() ? SETTING_TRAYICON_SINGLE : (chkCycle.GetState() ? SETTING_TRAYICON_CYCLE : SETTING_TRAYICON_MULTI);
+ Clist::iCycleTime = SendDlgItemMessage(m_hwnd, IDC_CYCLETIMESPIN, UDM_GETPOS, 0, 0);
g_plugin.setByte("AutoApplyLastViewMode", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_APPLYLASTVIEWMODE));
cfgSetFlag(m_hwnd, CLUI_FRAME_EVENTAREASUNKEN, IDC_EVENTAREASUNKEN);
@@ -276,15 +276,25 @@ public:
class COptWindowDlg : public CRowItemsBaseDlg
{
- CCtrlCheck chkAutoHide, chkAutoSize, chkTransparent;
+ CCtrlCheck chkAutoHide, chkAutoSize, chkTransparent, chkAreaDrag, chkShowMainMenu, chkOnTop, chkBringToFront;
public:
COptWindowDlg() :
CRowItemsBaseDlg(IDD_OPT_CLUI),
+ chkOnTop(this, IDC_ONTOP),
chkAutoHide(this, IDC_AUTOHIDE),
chkAutoSize(this, IDC_AUTOSIZE),
- chkTransparent(this, IDC_TRANSPARENT)
+ chkAreaDrag(this, IDC_CLIENTDRAG),
+ chkTransparent(this, IDC_TRANSPARENT),
+ chkBringToFront(this, IDC_BRINGTOFRONT),
+ chkShowMainMenu(this, IDC_SHOWMAINMENU)
{
+ CreateLink(chkOnTop, Clist::bOnTop);
+ CreateLink(chkAreaDrag, Clist::bClientAreaDrag);
+ CreateLink(chkAutoHide, Clist::bAutoHide);
+ CreateLink(chkBringToFront, Clist::bBringToFront);
+ CreateLink(chkShowMainMenu, Clist::bShowMainMenu);
+
chkAutoHide.OnChange = Callback(this, &COptWindowDlg::onChange_AutoHide);
chkAutoSize.OnChange = Callback(this, &COptWindowDlg::onChange_AutoSize);
chkTransparent.OnChange = Callback(this, &COptWindowDlg::onChange_Transparent);
@@ -292,14 +302,9 @@ public:
bool OnInitDialog() override
{
- CheckDlgButton(m_hwnd, IDC_BRINGTOFRONT, g_plugin.getByte("BringToFront", SETTING_BRINGTOFRONT_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(m_hwnd, IDC_ALWAYSHIDEONTASKBAR, g_plugin.getByte("AlwaysHideOnTB", 1) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(m_hwnd, IDC_ONTOP, g_plugin.getByte("OnTop", SETTING_ONTOP_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(m_hwnd, IDC_SHOWMAINMENU, db_get_b(0, "CLUI", "ShowMainMenu", SETTING_SHOWMAINMENU_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(m_hwnd, IDC_CLIENTDRAG, db_get_b(0, "CLUI", "ClientAreaDrag", SETTING_CLIENTDRAG_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(m_hwnd, IDC_FADEINOUT, cfg::dat.fadeinout ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(m_hwnd, IDC_DROPSHADOW, g_plugin.getByte("WindowShadow", 0) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(m_hwnd, IDC_ONDESKTOP, g_plugin.getByte("OnDesktop", 0) ? BST_CHECKED : BST_UNCHECKED);
chkAutoSize.SetState(cfg::dat.autosize);
@@ -328,9 +333,7 @@ public:
CheckDlgButton(m_hwnd, IDC_AUTOSIZEUPWARD, db_get_b(0, "CLUI", "AutoSizeUpward", 0) ? BST_CHECKED : BST_UNCHECKED);
SendDlgItemMessage(m_hwnd, IDC_HIDETIMESPIN, UDM_SETRANGE, 0, MAKELONG(900, 1));
- SendDlgItemMessage(m_hwnd, IDC_HIDETIMESPIN, UDM_SETPOS, 0, MAKELONG(g_plugin.getWord("HideTime", SETTING_HIDETIME_DEFAULT), 0));
-
- chkAutoHide.SetState(g_plugin.getByte("AutoHide", SETTING_AUTOHIDE_DEFAULT));
+ SendDlgItemMessage(m_hwnd, IDC_HIDETIMESPIN, UDM_SETPOS, 0, MAKELONG(Clist::iHideTime, 0));
ptrW tszTitle(g_plugin.getWStringA("TitleText"));
if (tszTitle != NULL)
@@ -368,8 +371,7 @@ public:
cfg::dat.gapBetweenFrames = GetDlgItemInt(m_hwnd, IDC_FRAMEGAP, &translated, FALSE);
db_set_dw(0, "CLUIFrames", "GapBetweenFrames", cfg::dat.gapBetweenFrames);
- g_plugin.setByte("OnTop", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_ONTOP));
- SetWindowPos(g_clistApi.hwndContactList, IsDlgButtonChecked(m_hwnd, IDC_ONTOP) ? HWND_TOPMOST : HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
+ SetWindowPos(g_clistApi.hwndContactList, Clist::bOnTop ? HWND_TOPMOST : HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
cfg::dat.bCLeft = (uint8_t)SendDlgItemMessage(m_hwnd, IDC_CLEFTSPIN, UDM_GETPOS, 0, 0);
cfg::dat.bCRight = (uint8_t)SendDlgItemMessage(m_hwnd, IDC_CRIGHTSPIN, UDM_GETPOS, 0, 0);
@@ -379,7 +381,6 @@ public:
db_set_dw(0, "CLUI", "clmargins", MAKELONG(MAKEWORD(cfg::dat.bCLeft, cfg::dat.bCRight), MAKEWORD(cfg::dat.bCTop, cfg::dat.bCBottom)));
SendMessage(g_clistApi.hwndContactList, WM_SIZE, 0, 0);
- g_plugin.setByte("BringToFront", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_BRINGTOFRONT));
g_plugin.setByte("AlwaysHideOnTB", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_ALWAYSHIDEONTASKBAR));
if (windowStyle != SETTING_WINDOWSTYLE_DEFAULT) {
@@ -416,9 +417,6 @@ public:
db_set_dw(0, "CLUI", "Frameflags", cfg::dat.dwFlags);
db_set_b(0, "CLUI", "clipborder", cfg::dat.bClipBorder);
- db_set_b(0, "CLUI", "ShowMainMenu", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_SHOWMAINMENU));
- db_set_b(0, "CLUI", "ClientAreaDrag", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_CLIENTDRAG));
-
ApplyCLUIBorderStyle();
if (BST_UNCHECKED == IsDlgButtonChecked(m_hwnd, IDC_SHOWMAINMENU))
@@ -441,14 +439,13 @@ public:
db_set_b(0, "CLUI", "MaxSizeHeight", (uint8_t)GetDlgItemInt(m_hwnd, IDC_MAXSIZEHEIGHT, nullptr, FALSE));
db_set_b(0, "CLUI", "AutoSizeUpward", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_AUTOSIZEUPWARD));
- g_plugin.setByte("AutoHide", chkAutoHide.GetState());
- g_plugin.setWord("HideTime", (uint16_t)SendDlgItemMessage(m_hwnd, IDC_HIDETIMESPIN, UDM_GETPOS, 0, 0));
+ Clist::iHideTime = SendDlgItemMessage(m_hwnd, IDC_HIDETIMESPIN, UDM_GETPOS, 0, 0);
- g_plugin.setByte("Transparent", cfg::dat.isTransparent = chkTransparent.GetState());
- g_plugin.setByte("Alpha", cfg::dat.alpha = (uint8_t)SendDlgItemMessage(m_hwnd, IDC_TRANSACTIVE, TBM_GETPOS, 0, 0));
- g_plugin.setByte("AutoAlpha", cfg::dat.autoalpha = (uint8_t)SendDlgItemMessage(m_hwnd, IDC_TRANSINACTIVE, TBM_GETPOS, 0, 0));
+ Clist::bTransparent = cfg::dat.isTransparent = chkTransparent.GetState();
+ Clist::iAlpha = cfg::dat.alpha = SendDlgItemMessage(m_hwnd, IDC_TRANSACTIVE, TBM_GETPOS, 0, 0);
+ Clist::iAutoAlpha = cfg::dat.autoalpha = SendDlgItemMessage(m_hwnd, IDC_TRANSINACTIVE, TBM_GETPOS, 0, 0);
g_plugin.setByte("WindowShadow", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_DROPSHADOW));
- g_plugin.setByte("OnDesktop", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_ONDESKTOP));
+
db_set_dw(0, "CLUI", "Frameflags", cfg::dat.dwFlags);
cfg::dat.bFullTransparent = IsDlgButtonChecked(m_hwnd, IDC_FULLTRANSPARENT) ? 1 : 0;
db_set_b(0, "CLUI", "fulltransparent", (uint8_t)cfg::dat.bFullTransparent);
diff --git a/plugins/Clist_nicer/src/clistsettings.cpp b/plugins/Clist_nicer/src/clistsettings.cpp
index ef54619c6f..d001c0fd49 100644
--- a/plugins/Clist_nicer/src/clistsettings.cpp
+++ b/plugins/Clist_nicer/src/clistsettings.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-03 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_nicer/src/clisttray.cpp b/plugins/Clist_nicer/src/clisttray.cpp
index f8421f2536..06a9dfe8fd 100644
--- a/plugins/Clist_nicer/src/clisttray.cpp
+++ b/plugins/Clist_nicer/src/clisttray.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-03 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp
index 96d118cd16..e662e6ba63 100644
--- a/plugins/Clist_nicer/src/clui.cpp
+++ b/plugins/Clist_nicer/src/clui.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-03 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -160,7 +160,7 @@ static int FS_FontsChanged(WPARAM, LPARAM)
static HWND PreCreateCLC(HWND parent)
{
g_clistApi.hwndContactTree = CreateWindow(CLISTCONTROL_CLASSW, L"",
- WS_CHILD | CLS_CONTACTLIST | (Clist::UseGroups ? CLS_USEGROUPS : 0) | (Clist::HideOffline ? CLS_HIDEOFFLINE : 0) | (Clist::HideEmptyGroups ? CLS_HIDEEMPTYGROUPS : 0) | CLS_MULTICOLUMN,
+ WS_CHILD | CLS_CONTACTLIST | (Clist::bUseGroups ? CLS_USEGROUPS : 0) | (Clist::bHideOffline ? CLS_HIDEOFFLINE : 0) | (Clist::bHideEmptyGroups ? CLS_HIDEEMPTYGROUPS : 0) | CLS_MULTICOLUMN,
0, 0, 0, 0, parent, nullptr, g_plugin.getInst(), (LPVOID)0xff00ff00);
cfg::clcdat = (struct ClcData *)GetWindowLongPtr(g_clistApi.hwndContactTree, 0);
@@ -446,10 +446,10 @@ void SetButtonStates()
SendMessage(buttonItem->hWnd, BM_SETCHECK, cfg::dat.soundsOff ? BST_CHECKED : BST_UNCHECKED, 0);
break;
case IDC_STBHIDEOFFLINE:
- SendMessage(buttonItem->hWnd, BM_SETCHECK, Clist::HideOffline, 0);
+ SendMessage(buttonItem->hWnd, BM_SETCHECK, Clist::bHideOffline, 0);
break;
case IDC_STBHIDEGROUPS:
- SendMessage(buttonItem->hWnd, BM_SETCHECK, Clist::UseGroups, 0);
+ SendMessage(buttonItem->hWnd, BM_SETCHECK, Clist::bUseGroups, 0);
break;
}
}
@@ -576,8 +576,6 @@ static void sttProcessResize(HWND hwnd, NMCLISTCONTROL *nmc)
if (!db_get_b(0, "CLUI", "AutoSize", 0))
return;
- if (Docking_IsDocked(0, 0))
- return;
if (hFrameContactTree == 0)
return;
@@ -726,7 +724,7 @@ static int ServiceParamsOK(ButtonItem *item, WPARAM *wParam, LPARAM *lParam, MCO
static void ShowCLUI(HWND hwnd)
{
int state = old_cliststate;
- int onTop = g_plugin.getByte("OnTop", SETTING_ONTOP_DEFAULT);
+ int onTop = Clist::bOnTop;
SendMessage(hwnd, WM_SETREDRAW, FALSE, FALSE);
@@ -948,15 +946,14 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
}
if (cfg::dat.bClipBorder != 0 || cfg::dat.dwFlags & CLUI_FRAME_ROUNDEDFRAME) {
- int docked = Clist_IsDocked();
int clip = cfg::dat.bClipBorder;
if (!g_CLUISkinnedBkColor)
FillRect(hdc, &rcClient, cfg::dat.hBrushColorKey);
if (cfg::dat.dwFlags & CLUI_FRAME_ROUNDEDFRAME)
- rgn = CreateRoundRectRgn(clip, docked ? 0 : clip, rcClient.right - clip + 1, rcClient.bottom - (docked ? 0 : clip - 1), 8 + clip, 8 + clip);
+ rgn = CreateRoundRectRgn(clip, clip, rcClient.right - clip + 1, rcClient.bottom - (clip - 1), 8 + clip, 8 + clip);
else
- rgn = CreateRectRgn(clip, docked ? 0 : clip, rcClient.right - clip, rcClient.bottom - (docked ? 0 : clip));
+ rgn = CreateRectRgn(clip, clip, rcClient.right - clip, rcClient.bottom - clip);
SelectClipRgn(hdc, rgn);
}
@@ -1034,9 +1031,6 @@ skipbg:
break;
case WM_WINDOWPOSCHANGED:
- if (Docking_IsDocked(0, 0))
- break;
-
case WM_WINDOWPOSCHANGING:
if (g_clistApi.hwndContactList != nullptr) {
WINDOWPOS *wp = (WINDOWPOS *)lParam;
@@ -1077,8 +1071,7 @@ skipbg:
return 0;
case WM_SIZE:
- if ((wParam == 0 && lParam == 0) || Docking_IsDocked(0, 0)) {
-
+ if (wParam == 0 && lParam == 0) {
if (IsZoomed(hwnd))
ShowWindow(hwnd, SW_SHOWNORMAL);
@@ -1099,22 +1092,18 @@ skipbg:
case WM_MOVE:
if (!IsIconic(hwnd)) {
GetWindowRect(hwnd, &rc);
-
- if (!Docking_IsDocked(0, 0)) {
- cluiPos.bottom = (uint32_t)(rc.bottom - rc.top);
- cluiPos.left = rc.left;
- cluiPos.top = rc.top;
- }
+ cluiPos.bottom = (uint32_t)(rc.bottom - rc.top);
+ cluiPos.left = rc.left;
+ cluiPos.top = rc.top;
cluiPos.right = rc.right - rc.left;
+
if (cfg::dat.realTimeSaving) {
GetWindowRect(hwnd, &rc);
// if docked, dont remember pos (except for width)
- if (!Clist_IsDocked()) {
- g_plugin.setDword("Height", (uint32_t)(rc.bottom - rc.top));
- g_plugin.setDword("x", (uint32_t)rc.left);
- g_plugin.setDword("y", (uint32_t)rc.top);
- }
+ g_plugin.setDword("Height", (uint32_t)(rc.bottom - rc.top));
+ g_plugin.setDword("x", (uint32_t)rc.left);
+ g_plugin.setDword("y", (uint32_t)rc.top);
g_plugin.setDword("Width", (uint32_t)(rc.right - rc.left));
}
}
@@ -1148,7 +1137,7 @@ skipbg:
SetLayeredWindowAttributes(hwnd, cfg::dat.bFullTransparent ? cfg::dat.colorkey : RGB(0, 0, 0), cfg::dat.alpha, LWA_ALPHA | (cfg::dat.bFullTransparent ? LWA_COLORKEY : 0));
transparentFocus = 1;
}
- SetWindowPos(g_clistApi.hwndContactList, g_plugin.getByte("OnTop", SETTING_ONTOP_DEFAULT) ? HWND_TOPMOST : HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOREDRAW | SWP_NOSENDCHANGING);
+ SetWindowPos(g_clistApi.hwndContactList, Clist::bOnTop ? HWND_TOPMOST : HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOREDRAW | SWP_NOSENDCHANGING);
}
PostMessage(hwnd, CLUIINTM_REMOVEFROMTASKBAR, 0, 0);
return DefWindowProc(hwnd, msg, wParam, lParam);
@@ -1558,7 +1547,7 @@ buttons_done:
if ((hitFlags & (CLCHT_NOWHERE | CLCHT_INLEFTMARGIN | CLCHT_BELOWITEMS)) == 0)
break;
- if (db_get_b(0, "CLUI", "ClientAreaDrag", SETTING_CLIENTDRAG_DEFAULT)) {
+ if (Clist::bClientAreaDrag) {
POINT pt;
pt = nm->pt;
ClientToScreen(g_clistApi.hwndContactTree, &pt);
@@ -1771,7 +1760,7 @@ void LoadCLUIModule(void)
wndclass.lpszClassName = L"EventAreaClass";
RegisterClass(&wndclass);
- oldhideoffline = Clist::HideOffline;
+ oldhideoffline = Clist::bHideOffline;
cluiPos.left = g_plugin.getDword("x", 600);
cluiPos.top = g_plugin.getDword("y", 200);
cluiPos.right = g_plugin.getDword("Width", 150);
diff --git a/plugins/Clist_nicer/src/cluiframes.cpp b/plugins/Clist_nicer/src/cluiframes.cpp
index 732b9a5351..9c09cec1f6 100644
--- a/plugins/Clist_nicer/src/cluiframes.cpp
+++ b/plugins/Clist_nicer/src/cluiframes.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-03 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -1206,13 +1206,10 @@ INT_PTR CLUIFramesCollapseUnCollapseFrame(WPARAM wParam, LPARAM)
// do not collapse/uncollapse client/locked/invisible frames
if (Frames[FrameId].align == alClient && !(Frames[FrameId].Locked || (!Frames[FrameId].visible) || Frames[FrameId].floating)) {
- RECT rc;
- if (Clist_IsDocked())
- return 0;
-
if (db_get_b(0, "CLUI", "AutoSize", 0))
return 0;
+ RECT rc;
GetWindowRect(g_clistApi.hwndContactList, &rc);
if (Frames[FrameId].collapsed == TRUE) {
@@ -2362,7 +2359,7 @@ LRESULT CALLBACK CLUIFrameTitleBarProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA
}
if ((!(wParam&MK_CONTROL)) && Frames[framepos].Locked && (!(Frames[framepos].floating))) {
- if (db_get_b(0, "CLUI", "ClientAreaDrag", 0)) {
+ if (Clist::bClientAreaDrag) {
POINT pt;
GetCursorPos(&pt);
return SendMessage(GetParent(hwnd), WM_SYSCOMMAND, SC_MOVE | HTCAPTION, MAKELPARAM(pt.x, pt.y));
diff --git a/plugins/Clist_nicer/src/cluiopts.cpp b/plugins/Clist_nicer/src/cluiopts.cpp
index eed692edcd..90276ffe7b 100644
--- a/plugins/Clist_nicer/src/cluiopts.cpp
+++ b/plugins/Clist_nicer/src/cluiopts.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-03 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -66,5 +66,5 @@ void ApplyCLUIBorderStyle()
p.showCmd = SW_HIDE;
SetWindowPlacement(g_clistApi.hwndContactList, &p);
- g_plugin.setByte("Min2Tray", minToTray);
+ Clist::bMinimizeToTray = minToTray;
}
diff --git a/plugins/Clist_nicer/src/cluiservices.cpp b/plugins/Clist_nicer/src/cluiservices.cpp
index a5ad8593ab..e13fbdbaf7 100644
--- a/plugins/Clist_nicer/src/cluiservices.cpp
+++ b/plugins/Clist_nicer/src/cluiservices.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-03 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_nicer/src/config.cpp b/plugins/Clist_nicer/src/config.cpp
index 9e0c0c419a..165ad75afc 100644
--- a/plugins/Clist_nicer/src/config.cpp
+++ b/plugins/Clist_nicer/src/config.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-03 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_nicer/src/config.h b/plugins/Clist_nicer/src/config.h
index 5defe5ae31..b50bcdcbd3 100644
--- a/plugins/Clist_nicer/src/config.h
+++ b/plugins/Clist_nicer/src/config.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-03 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_nicer/src/contact.cpp b/plugins/Clist_nicer/src/contact.cpp
index b6ebacd79e..f1ed1e3131 100644
--- a/plugins/Clist_nicer/src/contact.cpp
+++ b/plugins/Clist_nicer/src/contact.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-03 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -73,10 +73,10 @@ static void MF_CalcFrequency(MCONTACT hContact, uint32_t dwCutoffDays, int doSle
db_event_get(hEvent, &dbei);
// record time of last event
- if (dbei.eventType == EVENTTYPE_MESSAGE && !(dbei.flags & DBEF_SENT))
+ if (dbei.eventType == EVENTTYPE_MESSAGE && !dbei.bSent)
eventCount++;
- if (eventCount >= 100 || dbei.timestamp < curTime - (dwCutoffDays * 86400))
+ if (eventCount >= 100 || dbei.getUnixtime() < curTime - (dwCutoffDays * 86400))
break;
if (doSleep && mf_updatethread_running == FALSE)
@@ -90,8 +90,8 @@ static void MF_CalcFrequency(MCONTACT hContact, uint32_t dwCutoffDays, int doSle
g_plugin.setDword(hContact, "mf_firstEvent", curTime - (dwCutoffDays * 86400));
}
else {
- frequency = (curTime - dbei.timestamp) / eventCount;
- g_plugin.setDword(hContact, "mf_firstEvent", dbei.timestamp);
+ frequency = (curTime - dbei.getUnixtime()) / eventCount;
+ g_plugin.setDword(hContact, "mf_firstEvent", dbei.getUnixtime());
}
g_plugin.setDword(hContact, "mf_freq", frequency);
@@ -139,8 +139,8 @@ uint32_t INTSORT_GetLastMsgTime(MCONTACT hContact)
while (MEVENT hDbEvent = cursor.FetchNext()) {
DBEVENTINFO dbei = {};
db_event_get(hDbEvent, &dbei);
- if (dbei.eventType == EVENTTYPE_MESSAGE && !(dbei.flags & DBEF_SENT))
- return dbei.timestamp;
+ if (dbei.eventType == EVENTTYPE_MESSAGE && !dbei.bSent)
+ return dbei.getUnixtime();
}
return 0;
}
diff --git a/plugins/Clist_nicer/src/extBackg.cpp b/plugins/Clist_nicer/src/extBackg.cpp
index 70f3d2d8ac..6bbc5ab77f 100644
--- a/plugins/Clist_nicer/src/extBackg.cpp
+++ b/plugins/Clist_nicer/src/extBackg.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-03 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_nicer/src/extBackg.h b/plugins/Clist_nicer/src/extBackg.h
index f48f19e011..1059eb18ed 100644
--- a/plugins/Clist_nicer/src/extBackg.h
+++ b/plugins/Clist_nicer/src/extBackg.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-03 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_nicer/src/groupmenu.cpp b/plugins/Clist_nicer/src/groupmenu.cpp
index 55d93f74e0..80c210491c 100644
--- a/plugins/Clist_nicer/src/groupmenu.cpp
+++ b/plugins/Clist_nicer/src/groupmenu.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_nicer/src/init.cpp b/plugins/Clist_nicer/src/init.cpp
index 2992b94f53..2012338e90 100644
--- a/plugins/Clist_nicer/src/init.cpp
+++ b/plugins/Clist_nicer/src/init.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-03 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -34,7 +34,6 @@ CLIST_INTERFACE coreCli;
extern HICON overlayicons[10];
-int Docking_ProcessWindowMessage(WPARAM wParam, LPARAM lParam);
int SetHideOffline(int iValue);
ClcContact *CreateClcContact(void);
@@ -131,9 +130,9 @@ int CMPlugin::Load()
cfg::dat.avatarSize = g_plugin.getWord("AvatarSize", 24);
cfg::dat.dualRowMode = db_get_b(0, "CLC", "DualRowMode", 0);
cfg::dat.avatarPadding = g_plugin.getByte("AvatarPadding", 0);
- cfg::dat.isTransparent = g_plugin.getByte("Transparent", 0);
- cfg::dat.alpha = g_plugin.getByte("Alpha", SETTING_ALPHA_DEFAULT);
- cfg::dat.autoalpha = g_plugin.getByte("AutoAlpha", SETTING_ALPHA_DEFAULT);
+ cfg::dat.isTransparent = Clist::bTransparent;
+ cfg::dat.alpha = Clist::iAlpha;
+ cfg::dat.autoalpha = Clist::iAutoAlpha;
cfg::dat.fadeinout = db_get_b(0, "CLUI", "FadeInOut", 0);
cfg::dat.autosize = db_get_b(0, "CLUI", "AutoSize", 0);
cfg::dat.bNoOfflineAvatars = g_plugin.getByte("NoOfflineAV", 1);
@@ -176,7 +175,6 @@ int CMPlugin::Load()
g_clistApi.pfnCluiProtocolStatusChanged = CluiProtocolStatusChanged;
g_clistApi.pfnCompareContacts = CompareContacts;
g_clistApi.pfnCreateClcContact = CreateClcContact;
- g_clistApi.pfnDocking_ProcessWindowMessage = Docking_ProcessWindowMessage;
g_clistApi.pfnGetContactHiddenStatus = CLVM_GetContactHiddenStatus;
g_clistApi.pfnGetDefaultFontSetting = GetDefaultFontSetting;
g_clistApi.pfnGetRowBottomY = RowHeight::getItemBottomY;
diff --git a/plugins/Clist_nicer/src/resource.h b/plugins/Clist_nicer/src/resource.h
index c67d6c1ceb..259646b7fc 100644
--- a/plugins/Clist_nicer/src/resource.h
+++ b/plugins/Clist_nicer/src/resource.h
@@ -193,7 +193,6 @@
#define IDC_RELOAD 1635
#define IDC_IGN_ADDPERMANENTLY 1635
#define IDC_DSP_LOADDEFAULT 1636
-#define IDC_ONDESKTOP 1657
#define IDC_WINCOLOUR 1659
#define IDC_APPLYLASTVIEWMODE 1661
#define IDC_IGNORESELFORGROUPS 1722
diff --git a/plugins/Clist_nicer/src/rowheight_funcs.cpp b/plugins/Clist_nicer/src/rowheight_funcs.cpp
index 1c4d44d05b..707c2bebf8 100644
--- a/plugins/Clist_nicer/src/rowheight_funcs.cpp
+++ b/plugins/Clist_nicer/src/rowheight_funcs.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-03 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_nicer/src/statusbar.cpp b/plugins/Clist_nicer/src/statusbar.cpp
index 175e13bb7f..be53bf8dce 100644
--- a/plugins/Clist_nicer/src/statusbar.cpp
+++ b/plugins/Clist_nicer/src/statusbar.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-03 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_nicer/src/stdafx.cxx b/plugins/Clist_nicer/src/stdafx.cxx
index 87b7477097..72e87c2758 100644
--- a/plugins/Clist_nicer/src/stdafx.cxx
+++ b/plugins/Clist_nicer/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/Clist_nicer/src/stdafx.h b/plugins/Clist_nicer/src/stdafx.h
index d79ce27541..758b9d9ff1 100644
--- a/plugins/Clist_nicer/src/stdafx.h
+++ b/plugins/Clist_nicer/src/stdafx.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-03 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_nicer/src/viewmodes.cpp b/plugins/Clist_nicer/src/viewmodes.cpp
index 3ea03a4438..2242019ba8 100644
--- a/plugins/Clist_nicer/src/viewmodes.cpp
+++ b/plugins/Clist_nicer/src/viewmodes.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-03 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -1100,7 +1100,7 @@ void ApplyViewMode(const char *name)
cfg::dat.bFilterEffective |= CLVM_STICKY_CONTACTS;
if (cfg::dat.boldHideOffline == (uint8_t)-1)
- cfg::dat.boldHideOffline = Clist::HideOffline;
+ cfg::dat.boldHideOffline = Clist::bHideOffline;
g_clistApi.pfnSetHideOffline(false);
if (name == nullptr) {
diff --git a/plugins/Clist_nicer/src/wallpaper.cpp b/plugins/Clist_nicer/src/wallpaper.cpp
index 1d9b71749f..11c42fac37 100644
--- a/plugins/Clist_nicer/src/wallpaper.cpp
+++ b/plugins/Clist_nicer/src/wallpaper.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-03 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Cln_skinedit/src/main.cpp b/plugins/Cln_skinedit/src/main.cpp
index ec9209f8fd..e073ea60ac 100644
--- a/plugins/Cln_skinedit/src/main.cpp
+++ b/plugins/Cln_skinedit/src/main.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-04 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Cln_skinedit/src/stdafx.cxx b/plugins/Cln_skinedit/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/Cln_skinedit/src/stdafx.cxx
+++ b/plugins/Cln_skinedit/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/Cln_skinedit/src/stdafx.h b/plugins/Cln_skinedit/src/stdafx.h
index cb7ce6ab17..698ed3336a 100644
--- a/plugins/Cln_skinedit/src/stdafx.h
+++ b/plugins/Cln_skinedit/src/stdafx.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-04 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/CmdLine/src/mimcmd_handlers.cpp b/plugins/CmdLine/src/mimcmd_handlers.cpp
index 4259f9226b..d7cdb6a9e4 100644
--- a/plugins/CmdLine/src/mimcmd_handlers.cpp
+++ b/plugins/CmdLine/src/mimcmd_handlers.cpp
@@ -708,7 +708,7 @@ void HandleMessageCommand(PCommand command, TArgument *argv, int argc, PReply re
dbei.pBlob = szMessage.get();
dbei.cbBlob = (uint32_t)mir_strlen(szMessage) + 1;
dbei.szModule = ack->szModule;
- dbei.timestamp = (uint32_t)time(0);
+ dbei.iTimestamp = (uint32_t)time(0);
db_event_add(ack->hContact, &dbei);
}
else szReply.AppendFormat(TranslateT("Message to '%s' was marked as sent but the account seems to be offline"), contact);
@@ -1220,7 +1220,7 @@ void HandleContactsCommand(PCommand command, TArgument *argv, int argc, PReply r
void AddHistoryEvent(DBEVENTINFO *dbEvent, wchar_t *contact, PReply reply)
{
char timestamp[256];
- TimeZone_ToString(dbEvent->timestamp, "D, s", timestamp, _countof(timestamp));
+ TimeZone_ToString(dbEvent->getUnixtime(), "D, s", timestamp, _countof(timestamp));
wchar_t *sender = (dbEvent->flags & DBEF_SENT) ? TranslateT("[me]") : contact;
wchar_t *message = DbEvent_GetText(dbEvent);
diff --git a/plugins/CmdLine/src/stdafx.cxx b/plugins/CmdLine/src/stdafx.cxx
index 87b7477097..72e87c2758 100644
--- a/plugins/CmdLine/src/stdafx.cxx
+++ b/plugins/CmdLine/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/Console/src/Console.cpp b/plugins/Console/src/Console.cpp
index f463739e9f..8f092de373 100644
--- a/plugins/Console/src/Console.cpp
+++ b/plugins/Console/src/Console.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Console/src/init.cpp b/plugins/Console/src/init.cpp
index 4d10a46c64..68ff2d7c66 100644
--- a/plugins/Console/src/init.cpp
+++ b/plugins/Console/src/init.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Console/src/stdafx.cxx b/plugins/Console/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/Console/src/stdafx.cxx
+++ b/plugins/Console/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/Console/src/stdafx.h b/plugins/Console/src/stdafx.h
index b26d4037a9..e77a7e827b 100644
--- a/plugins/Console/src/stdafx.h
+++ b/plugins/Console/src/stdafx.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/ContactsPlus/src/send.cpp b/plugins/ContactsPlus/src/send.cpp
index f1efc7edb4..b617780031 100644
--- a/plugins/ContactsPlus/src/send.cpp
+++ b/plugins/ContactsPlus/src/send.cpp
@@ -200,7 +200,7 @@ static void SetAllContactChecks(HWND hwndList, MCONTACT hReceiver) // doubtful n
if (szProto == nullptr)
return;
- SendMessage(hwndList, CLM_SETHIDEEMPTYGROUPS, Clist::HideEmptyGroups, 0);
+ SendMessage(hwndList, CLM_SETHIDEEMPTYGROUPS, Clist::bHideEmptyGroups, 0);
MCONTACT hItem, hContact = FindFirstClistContact(hwndList, &hItem);
while (hContact) {
@@ -399,7 +399,7 @@ INT_PTR CALLBACK SendDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara
dbei.szModule = Proto_GetBaseAccountName(ackData->hContact);
dbei.eventType = EVENTTYPE_CONTACTS;
dbei.flags = DBEF_SENT | DBEF_UTF;
- dbei.timestamp = time(0);
+ dbei.iTimestamp = time(0);
//make blob
TCTSend* maSend = (TCTSend*)_alloca(ackData->nContacts*sizeof(TCTSend));
memset(maSend, 0, (ackData->nContacts * sizeof(TCTSend)));
diff --git a/plugins/ContactsPlus/src/stdafx.cxx b/plugins/ContactsPlus/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/ContactsPlus/src/stdafx.cxx
+++ b/plugins/ContactsPlus/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/CountryFlags/src/stdafx.cxx b/plugins/CountryFlags/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/CountryFlags/src/stdafx.cxx
+++ b/plugins/CountryFlags/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/CrashDumper/src/dumper.cpp b/plugins/CrashDumper/src/dumper.cpp
index cd11487007..80897d6f46 100644
--- a/plugins/CrashDumper/src/dumper.cpp
+++ b/plugins/CrashDumper/src/dumper.cpp
@@ -138,10 +138,15 @@ static void GetPluginsString(CMStringW &buffer, unsigned &flags)
{
buffer.AppendFormat(L"Service Mode: %s\r\n", g_plugin.bServiceMode ? L"Yes" : L"No");
- if (auto *pLogClass = Srmm_GetWindowClass(0))
- buffer.AppendFormat(L"SRMM Log Viewer: %s\r\n", _A2T(pLogClass->szShortName).get());
+ if (auto *pLogClass = Srmm_GetWindowClass(false))
+ buffer.AppendFormat(L"SRMM Log Viewer: %S\r\n", pLogClass->szShortName.get());
else
- buffer.AppendFormat(L"SRMM Log Viewer: %s\r\n", L"missing");
+ buffer.AppendFormat(L"SRMM Log Viewer: %S\r\n", "missing");
+
+ if (auto *pLogClass = Srmm_GetWindowClass(true))
+ buffer.AppendFormat(L"SRMM Groupchat Log Viewer: %S\r\n", pLogClass->szShortName.get());
+ else
+ buffer.AppendFormat(L"SRMM Groupchat Log Viewer: %S\r\n", "missing");
wchar_t path[MAX_PATH];
GetModuleFileName(nullptr, path, MAX_PATH);
diff --git a/plugins/CrashDumper/src/stdafx.cxx b/plugins/CrashDumper/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/CrashDumper/src/stdafx.cxx
+++ b/plugins/CrashDumper/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/CrashDumper/src/version.h b/plugins/CrashDumper/src/version.h
index 45ef0aabb7..9105b1b548 100644
--- a/plugins/CrashDumper/src/version.h
+++ b/plugins/CrashDumper/src/version.h
@@ -10,4 +10,4 @@
#define __DESCRIPTION "Crash Dumper and Version Information for Miranda NG."
#define __AUTHOR "borkra"
#define __AUTHORWEB "https://miranda-ng.org/p/CrashDumper"
-#define __COPYRIGHT "© 2008-12 Boris Krasnovskiy, 2012-24 Miranda NG team"
+#define __COPYRIGHT "© 2008-12 Boris Krasnovskiy, 2012-25 Miranda NG team"
diff --git a/plugins/CryptoPP/src/stdafx.cpp b/plugins/CryptoPP/src/stdafx.cpp
index e8bd82005e..550e5547f1 100644
--- a/plugins/CryptoPP/src/stdafx.cpp
+++ b/plugins/CryptoPP/src/stdafx.cpp
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/CyrTranslit/src/stdafx.cxx b/plugins/CyrTranslit/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/CyrTranslit/src/stdafx.cxx
+++ b/plugins/CyrTranslit/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/Db3x_mmap/src/database.cpp b/plugins/Db3x_mmap/src/database.cpp
index cf4fc5876f..96b4c3dfab 100644
--- a/plugins/Db3x_mmap/src/database.cpp
+++ b/plugins/Db3x_mmap/src/database.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Db3x_mmap/src/database.h b/plugins/Db3x_mmap/src/database.h
index 28104cde71..45788db87d 100644
--- a/plugins/Db3x_mmap/src/database.h
+++ b/plugins/Db3x_mmap/src/database.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Db3x_mmap/src/dbcache.cpp b/plugins/Db3x_mmap/src/dbcache.cpp
index 31af86205e..18c580672f 100644
--- a/plugins/Db3x_mmap/src/dbcache.cpp
+++ b/plugins/Db3x_mmap/src/dbcache.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Db3x_mmap/src/dbcontacts.cpp b/plugins/Db3x_mmap/src/dbcontacts.cpp
index 17cb2a7973..b22ff68f22 100644
--- a/plugins/Db3x_mmap/src/dbcontacts.cpp
+++ b/plugins/Db3x_mmap/src/dbcontacts.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Db3x_mmap/src/dbcrypt.cpp b/plugins/Db3x_mmap/src/dbcrypt.cpp
index c70aac252c..968fa598ed 100644
--- a/plugins/Db3x_mmap/src/dbcrypt.cpp
+++ b/plugins/Db3x_mmap/src/dbcrypt.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Db3x_mmap/src/dbevents.cpp b/plugins/Db3x_mmap/src/dbevents.cpp
index 476a79900e..9a41a5ace2 100644
--- a/plugins/Db3x_mmap/src/dbevents.cpp
+++ b/plugins/Db3x_mmap/src/dbevents.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -33,7 +33,7 @@ int CDb3Mmap::GetEventCount(MCONTACT contactID)
MEVENT CDb3Mmap::AddEvent(MCONTACT contactID, const DBEVENTINFO *dbei)
{
if (dbei == nullptr) return 0;
- if (dbei->timestamp == 0) return 0;
+ if (dbei->getUnixtime() == 0) return 0;
DBEvent dbe;
dbe.signature = DBEVENT_SIGNATURE;
@@ -60,7 +60,7 @@ MEVENT CDb3Mmap::AddEvent(MCONTACT contactID, const DBEVENTINFO *dbei)
if (NotifyEventHooks(g_hevEventFiltered, contactNotifyID, (LPARAM)dbei))
return 0;
- dbe.timestamp = dbei->timestamp;
+ dbe.timestamp = dbei->getUnixtime();
dbe.flags = dbei->flags;
dbe.wEventType = dbei->eventType;
dbe.cbBlob = dbei->cbBlob;
@@ -289,7 +289,7 @@ BOOL CDb3Mmap::GetEvent(MEVENT hDbEvent, DBEVENTINFO *dbei)
return 1;
dbei->szModule = GetModuleNameByOfs(dbe->ofsModuleName);
- dbei->timestamp = dbe->timestamp;
+ dbei->iTimestamp = dbe->timestamp;
dbei->flags = dbe->flags;
dbei->eventType = dbe->wEventType;
diff --git a/plugins/Db3x_mmap/src/dbheaders.cpp b/plugins/Db3x_mmap/src/dbheaders.cpp
index 1437d59e0b..b618681824 100644
--- a/plugins/Db3x_mmap/src/dbheaders.cpp
+++ b/plugins/Db3x_mmap/src/dbheaders.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Db3x_mmap/src/dbintf.cpp b/plugins/Db3x_mmap/src/dbintf.cpp
index 03bc92fde7..c2dee6565a 100644
--- a/plugins/Db3x_mmap/src/dbintf.cpp
+++ b/plugins/Db3x_mmap/src/dbintf.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Db3x_mmap/src/dbintf.h b/plugins/Db3x_mmap/src/dbintf.h
index 1c92d716e5..4a7e3dd751 100644
--- a/plugins/Db3x_mmap/src/dbintf.h
+++ b/plugins/Db3x_mmap/src/dbintf.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Db3x_mmap/src/dbmodulechain.cpp b/plugins/Db3x_mmap/src/dbmodulechain.cpp
index 8c89316e03..fb7a8bbd48 100644
--- a/plugins/Db3x_mmap/src/dbmodulechain.cpp
+++ b/plugins/Db3x_mmap/src/dbmodulechain.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Db3x_mmap/src/dbsettings.cpp b/plugins/Db3x_mmap/src/dbsettings.cpp
index 0ad1093c18..b87450ce63 100644
--- a/plugins/Db3x_mmap/src/dbsettings.cpp
+++ b/plugins/Db3x_mmap/src/dbsettings.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Db3x_mmap/src/init.cpp b/plugins/Db3x_mmap/src/init.cpp
index 17545c6582..53aabee0c5 100644
--- a/plugins/Db3x_mmap/src/init.cpp
+++ b/plugins/Db3x_mmap/src/init.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Db3x_mmap/src/stdafx.cxx b/plugins/Db3x_mmap/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/Db3x_mmap/src/stdafx.cxx
+++ b/plugins/Db3x_mmap/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/Db3x_mmap/src/stdafx.h b/plugins/Db3x_mmap/src/stdafx.h
index 1607e02d29..94665785cd 100644
--- a/plugins/Db3x_mmap/src/stdafx.h
+++ b/plugins/Db3x_mmap/src/stdafx.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Db3x_mmap/src/version.h b/plugins/Db3x_mmap/src/version.h
index c91e23b05b..ada57d5fe0 100644
--- a/plugins/Db3x_mmap/src/version.h
+++ b/plugins/Db3x_mmap/src/version.h
@@ -10,4 +10,4 @@
#define __DESCRIPTION "Provides Miranda database support: global settings, contacts, history, settings per contact."
#define __AUTHOR "Miranda-NG project"
#define __AUTHORWEB "https://miranda-ng.org/p/Dbx_mmap"
-#define __COPYRIGHT "© 2012-24 Miranda NG team"
+#define __COPYRIGHT "© 2012-25 Miranda NG team"
diff --git a/plugins/DbChecker/src/worker.cpp b/plugins/DbChecker/src/worker.cpp
index 7aab01c392..3b69e8f76b 100644
--- a/plugins/DbChecker/src/worker.cpp
+++ b/plugins/DbChecker/src/worker.cpp
@@ -151,7 +151,7 @@ void __cdecl WorkerThread(DbToolOptions *opts)
if (!dbei)
continue;
- if (opts->bMarkRead && !dbei.markedRead()) {
+ if (opts->bMarkRead && !dbei.bRead) {
db_event_markRead(cc, hEvent);
nCount++;
}
diff --git a/plugins/DbEditorPP/src/stdafx.cxx b/plugins/DbEditorPP/src/stdafx.cxx
index 87b7477097..72e87c2758 100644
--- a/plugins/DbEditorPP/src/stdafx.cxx
+++ b/plugins/DbEditorPP/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/DbEditorPP/src/utils.cpp b/plugins/DbEditorPP/src/utils.cpp
index 9f7fade368..6a31614d25 100644
--- a/plugins/DbEditorPP/src/utils.cpp
+++ b/plugins/DbEditorPP/src/utils.cpp
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/DbEditorPP/src/version.h b/plugins/DbEditorPP/src/version.h
index 584327214b..8eb3b26d41 100644
--- a/plugins/DbEditorPP/src/version.h
+++ b/plugins/DbEditorPP/src/version.h
@@ -10,4 +10,4 @@
#define __DESCRIPTION "Advanced Database Editor."
#define __AUTHOR "Bio, Jonathan Gordon"
#define __AUTHORWEB "https://miranda-ng.org/p/DbEditorPP"
-#define __COPYRIGHT "© 2003-24 Bio, Jonathan Gordon, Miranda NG team"
+#define __COPYRIGHT "© 2003-25 Bio, Jonathan Gordon, Miranda NG team"
diff --git a/plugins/Db_autobackups/src/options.h b/plugins/Db_autobackups/src/options.h
index 8503a1c759..42113a3902 100644
--- a/plugins/Db_autobackups/src/options.h
+++ b/plugins/Db_autobackups/src/options.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-03 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Db_autobackups/src/stdafx.cxx b/plugins/Db_autobackups/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/Db_autobackups/src/stdafx.cxx
+++ b/plugins/Db_autobackups/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/Db_autobackups/src/version.h b/plugins/Db_autobackups/src/version.h
index f9721ea040..a8037d3b18 100644
--- a/plugins/Db_autobackups/src/version.h
+++ b/plugins/Db_autobackups/src/version.h
@@ -10,4 +10,4 @@
#define __DESCRIPTION "Database autobackuper plugin."
#define __AUTHOR "chaos.persei, sje, Kildor, Billy_Bons"
#define __AUTHORWEB "https://miranda-ng.org/p/Db_autobackups"
-#define __COPYRIGHT "© 2005-24 chaos.persei, sje, Kildor, Billy_Bons, Vasilich, Miranda NG team"
+#define __COPYRIGHT "© 2005-25 chaos.persei, sje, Kildor, Billy_Bons, Vasilich, Miranda NG team"
diff --git a/plugins/Dbx_mdbx/src/dbcheck.cpp b/plugins/Dbx_mdbx/src/dbcheck.cpp
index 7ba1d63a25..64ded60bf4 100644
--- a/plugins/Dbx_mdbx/src/dbcheck.cpp
+++ b/plugins/Dbx_mdbx/src/dbcheck.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Dbx_mdbx/src/dbcontacts.cpp b/plugins/Dbx_mdbx/src/dbcontacts.cpp
index b169f31c18..2bf8101b90 100644
--- a/plugins/Dbx_mdbx/src/dbcontacts.cpp
+++ b/plugins/Dbx_mdbx/src/dbcontacts.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Dbx_mdbx/src/dbcrypt.cpp b/plugins/Dbx_mdbx/src/dbcrypt.cpp
index 551845c162..074dd55c02 100644
--- a/plugins/Dbx_mdbx/src/dbcrypt.cpp
+++ b/plugins/Dbx_mdbx/src/dbcrypt.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Dbx_mdbx/src/dbevents.cpp b/plugins/Dbx_mdbx/src/dbevents.cpp
index c16266d5a7..e844e034c2 100644
--- a/plugins/Dbx_mdbx/src/dbevents.cpp
+++ b/plugins/Dbx_mdbx/src/dbevents.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -37,7 +37,7 @@ int CDbxMDBX::GetEventCount(MCONTACT contactID)
MEVENT CDbxMDBX::AddEvent(MCONTACT contactID, const DBEVENTINFO *dbei)
{
if (dbei == nullptr) return 0;
- if (dbei->timestamp == 0) return 0;
+ if (dbei->iTimestamp == 0) return 0;
MEVENT dwEventId = InterlockedIncrement(&m_dwMaxEventId);
if (!EditEvent(contactID, dwEventId, dbei, true))
@@ -140,7 +140,7 @@ BOOL CDbxMDBX::DeleteEvent(MEVENT hDbEvent)
BOOL CDbxMDBX::EditEvent(MEVENT hDbEvent, const DBEVENTINFO *dbei)
{
if (dbei == nullptr) return 1;
- if (dbei->timestamp == 0) return 1;
+ if (dbei->iTimestamp == 0) return 1;
DBEVENTINFO tmp = *dbei;
@@ -149,7 +149,7 @@ BOOL CDbxMDBX::EditEvent(MEVENT hDbEvent, const DBEVENTINFO *dbei)
return 1;
DBEvent *dbe = (DBEvent*)data.iov_base;
- tmp.timestamp = dbe->timestamp;
+ tmp.iTimestamp = dbe->timestamp;
return !EditEvent(dbe->dwContactID, hDbEvent, &tmp, false);
}
@@ -184,7 +184,7 @@ bool CDbxMDBX::EditEvent(MCONTACT hContact, MEVENT hDbEvent, const DBEVENTINFO *
if (NotifyEventHooks(g_hevEventFiltered, contactNotifyID, (LPARAM)dbei))
return false;
- dbe.timestamp = dbei->timestamp;
+ dbe.timestamp = dbei->getUnixtime();
dbe.flags = dbei->flags;
dbe.wEventType = dbei->eventType;
dbe.cbBlob = dbei->cbBlob;
@@ -306,7 +306,7 @@ BOOL CDbxMDBX::GetEvent(MEVENT hDbEvent, DBEVENTINFO *dbei)
}
dbei->szModule = GetModuleName(dbe->iModuleId);
- dbei->timestamp = dbe->timestamp;
+ dbei->iTimestamp = dbe->timestamp;
dbei->flags = dbe->flags;
dbei->eventType = dbe->wEventType;
diff --git a/plugins/Dbx_mdbx/src/dbintf.cpp b/plugins/Dbx_mdbx/src/dbintf.cpp
index cf744f7c6b..b3edcbda99 100644
--- a/plugins/Dbx_mdbx/src/dbintf.cpp
+++ b/plugins/Dbx_mdbx/src/dbintf.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Dbx_mdbx/src/dbintf.h b/plugins/Dbx_mdbx/src/dbintf.h
index 3bff1deb71..69045dabde 100644
--- a/plugins/Dbx_mdbx/src/dbintf.h
+++ b/plugins/Dbx_mdbx/src/dbintf.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Dbx_mdbx/src/dbmodulechain.cpp b/plugins/Dbx_mdbx/src/dbmodulechain.cpp
index 407ffc6142..9352acec0f 100644
--- a/plugins/Dbx_mdbx/src/dbmodulechain.cpp
+++ b/plugins/Dbx_mdbx/src/dbmodulechain.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Dbx_mdbx/src/dbsettings.cpp b/plugins/Dbx_mdbx/src/dbsettings.cpp
index 7900215265..f1e5796dae 100644
--- a/plugins/Dbx_mdbx/src/dbsettings.cpp
+++ b/plugins/Dbx_mdbx/src/dbsettings.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Dbx_mdbx/src/dbutils.cpp b/plugins/Dbx_mdbx/src/dbutils.cpp
index 577e232e08..26cdd48b26 100644
--- a/plugins/Dbx_mdbx/src/dbutils.cpp
+++ b/plugins/Dbx_mdbx/src/dbutils.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Dbx_mdbx/src/init.cpp b/plugins/Dbx_mdbx/src/init.cpp
index e925c7a0a1..e7cb411c01 100644
--- a/plugins/Dbx_mdbx/src/init.cpp
+++ b/plugins/Dbx_mdbx/src/init.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Dbx_mdbx/src/stdafx.cxx b/plugins/Dbx_mdbx/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/Dbx_mdbx/src/stdafx.cxx
+++ b/plugins/Dbx_mdbx/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/Dbx_mdbx/src/stdafx.h b/plugins/Dbx_mdbx/src/stdafx.h
index 6b939e00ac..66a2204886 100644
--- a/plugins/Dbx_mdbx/src/stdafx.h
+++ b/plugins/Dbx_mdbx/src/stdafx.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Dbx_mdbx/src/version.h b/plugins/Dbx_mdbx/src/version.h
index ca9cc38330..e14254a7b5 100644
--- a/plugins/Dbx_mdbx/src/version.h
+++ b/plugins/Dbx_mdbx/src/version.h
@@ -10,4 +10,4 @@
#define __DESCRIPTION "Provides Miranda database support: global settings, contacts, history, settings per contact."
#define __AUTHOR "Miranda-NG project"
#define __AUTHORWEB "https://miranda-ng.org/p/Dbx_mdbx"
-#define __COPYRIGHT "© 2015-24 Miranda NG team"
+#define __COPYRIGHT "© 2015-25 Miranda NG team"
diff --git a/plugins/Dbx_sqlite/src/dbcheck.cpp b/plugins/Dbx_sqlite/src/dbcheck.cpp
index 661b87f1ff..d6cad456c4 100644
--- a/plugins/Dbx_sqlite/src/dbcheck.cpp
+++ b/plugins/Dbx_sqlite/src/dbcheck.cpp
@@ -93,6 +93,23 @@ int CDbxSQLite::CheckPhase4()
return 0;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+// update unsynced flags & is_read field
+
+int CDbxSQLite::CheckPhase5()
+{
+ sqlite3_stmt *pQuery;
+ int rc = sqlite3_prepare_v2(m_db, "UPDATE events SET flags = flags | 4 WHERE is_read = 1", -1, &pQuery, nullptr);
+ logError(rc, __FILE__, __LINE__);
+ if (rc)
+ return rc;
+
+ rc = sqlite3_step(pQuery);
+ logError(rc, __FILE__, __LINE__);
+ sqlite3_finalize(pQuery);
+ return 0;
+}
+
///////////////////////////////////////////////////////////////////////////////
// MIDatabaseChecker
@@ -103,6 +120,7 @@ int CDbxSQLite::CheckDb(int phase)
case 1: return CheckPhase2();
case 2: return CheckPhase3();
case 3: return CheckPhase4();
+ case 4: return CheckPhase5();
}
DBFlush(true);
diff --git a/plugins/Dbx_sqlite/src/dbevents.cpp b/plugins/Dbx_sqlite/src/dbevents.cpp
index a376f9e8ca..e3f027afa3 100644
--- a/plugins/Dbx_sqlite/src/dbevents.cpp
+++ b/plugins/Dbx_sqlite/src/dbevents.cpp
@@ -71,7 +71,8 @@ int CDbxSQLite::AddEventSrt(MEVENT hDbEvent, MCONTACT hContact, int64_t ts)
sqlite3_bind_int64(stmt, 2, hContact);
sqlite3_bind_int64(stmt, 3, ts);
rc = sqlite3_step(stmt);
- logError(rc, __FILE__, __LINE__);
+ if (rc != SQLITE_CONSTRAINT)
+ logError(rc, __FILE__, __LINE__);
sqlite3_reset(stmt);
ts++;
@@ -85,7 +86,7 @@ MEVENT CDbxSQLite::AddEvent(MCONTACT hContact, const DBEVENTINFO *dbei)
if (dbei == nullptr)
return 0;
- if (dbei->timestamp == 0)
+ if (dbei->iTimestamp == 0)
return 0;
MCONTACT hNotifyContact = hContact;
@@ -100,7 +101,7 @@ MEVENT CDbxSQLite::AddEvent(MCONTACT hContact, const DBEVENTINFO *dbei)
return 0;
// set default sub to the event's source
- if (!(dbei->flags & DBEF_SENT))
+ if (!dbei->bSent)
db_mc_setDefault(cc->contactID, hContact, false);
if (db_mc_isEnabled())
hNotifyContact = cc->contactID; // and add an event to a metahistory
@@ -134,19 +135,22 @@ MEVENT CDbxSQLite::AddEvent(MCONTACT hContact, const DBEVENTINFO *dbei)
}
}
+ if (tmp.bSent)
+ tmp.bRead = true;
+
mir_cslockfull lock(m_csDbAccess);
sqlite3_stmt *stmt = InitQuery(
"INSERT INTO events(contact_id, module, timestamp, type, flags, data, server_id, user_id, is_read, reply_id) "
"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?);", qEvAdd);
sqlite3_bind_int64(stmt, 1, hContact);
sqlite3_bind_text(stmt, 2, tmp.szModule, (int)mir_strlen(tmp.szModule), nullptr);
- sqlite3_bind_int64(stmt, 3, tmp.timestamp);
+ sqlite3_bind_int64(stmt, 3, tmp.iTimestamp);
sqlite3_bind_int(stmt, 4, tmp.eventType);
sqlite3_bind_int64(stmt, 5, tmp.flags);
sqlite3_bind_blob(stmt, 6, tmp.pBlob, tmp.cbBlob, nullptr);
sqlite3_bind_text(stmt, 7, tmp.szId, (int)mir_strlen(tmp.szId), nullptr);
sqlite3_bind_text(stmt, 8, tmp.szUserId, (int)mir_strlen(tmp.szUserId), nullptr);
- sqlite3_bind_int(stmt, 9, tmp.markedRead());
+ sqlite3_bind_int(stmt, 9, tmp.bRead);
sqlite3_bind_text(stmt, 10, tmp.szReplyId, (int)mir_strlen(tmp.szReplyId), nullptr);
int rc = sqlite3_step(stmt);
logError(rc, __FILE__, __LINE__);
@@ -154,7 +158,7 @@ MEVENT CDbxSQLite::AddEvent(MCONTACT hContact, const DBEVENTINFO *dbei)
MEVENT hDbEvent = sqlite3_last_insert_rowid(m_db);
- int64_t tsSort = (int64_t)tmp.timestamp * 1000;
+ int64_t tsSort = tmp.bMsec ? tmp.iTimestamp : tmp.iTimestamp * 1000;
AddEventSrt(hDbEvent, cc->contactID, tsSort);
cc->m_count++;
@@ -261,7 +265,7 @@ BOOL CDbxSQLite::EditEvent(MEVENT hDbEvent, const DBEVENTINFO *dbei)
if (dbei == nullptr)
return 1;
- if (dbei->timestamp == 0)
+ if (dbei->iTimestamp == 0)
return 1;
DBEVENTINFO tmp = *dbei;
@@ -279,6 +283,9 @@ BOOL CDbxSQLite::EditEvent(MEVENT hDbEvent, const DBEVENTINFO *dbei)
else tmp.flags |= DBEF_ENCRYPTED;
}
+ if (tmp.bSent)
+ tmp.bRead = true;
+
mir_cslockfull lock(m_csDbAccess);
sqlite3_stmt *stmt;
if (tmp.pBlob)
@@ -288,12 +295,12 @@ BOOL CDbxSQLite::EditEvent(MEVENT hDbEvent, const DBEVENTINFO *dbei)
int i = 1;
sqlite3_bind_text(stmt, i++, tmp.szModule, (int)mir_strlen(tmp.szModule), nullptr);
- sqlite3_bind_int64(stmt, i++, tmp.timestamp);
+ sqlite3_bind_int64(stmt, i++, tmp.iTimestamp);
sqlite3_bind_int(stmt, i++, tmp.eventType);
sqlite3_bind_int64(stmt, i++, tmp.flags);
if (tmp.pBlob)
sqlite3_bind_blob(stmt, i++, tmp.pBlob, tmp.cbBlob, nullptr);
- sqlite3_bind_int(stmt, i++, tmp.markedRead());
+ sqlite3_bind_int(stmt, i++, tmp.bRead);
sqlite3_bind_text(stmt, i++, tmp.szId, (int)mir_strlen(tmp.szId), nullptr);
sqlite3_bind_text(stmt, i++, tmp.szUserId, (int)mir_strlen(tmp.szUserId), nullptr);
sqlite3_bind_text(stmt, i++, tmp.szReplyId, (int)mir_strlen(tmp.szReplyId), nullptr);
@@ -323,6 +330,51 @@ BOOL CDbxSQLite::EditEvent(MEVENT hDbEvent, const DBEVENTINFO *dbei)
/////////////////////////////////////////////////////////////////////////////////////////
+int CDbxSQLite::SetEventJson(MEVENT hDbEvent, const char *pBlob)
+{
+ size_t cbBlob = mir_strlen(pBlob);
+ int flags = DBEF_JSON;
+
+ mir_ptr<char> pCryptBlob;
+ if (m_bEncrypted) {
+ if (pBlob) {
+ size_t len;
+ char *pResult = (char *)m_crypto->encodeBuffer(pBlob, cbBlob, &len);
+ if (pResult != nullptr) {
+ pBlob = pCryptBlob = pResult;
+ cbBlob = len;
+ flags |= DBEF_ENCRYPTED;
+ }
+ }
+ else flags |= DBEF_ENCRYPTED;
+ }
+
+ {
+ mir_cslock lock(m_csDbAccess);
+ sqlite3_stmt *stmt = InitQuery("UPDATE events SET data=?, flags=flags | ? WHERE id = ?;", qEvSetJson2);
+ sqlite3_bind_text(stmt, 1, pBlob, (int)cbBlob, nullptr);
+ sqlite3_bind_int64(stmt, 2, flags);
+ sqlite3_bind_int64(stmt, 3, hDbEvent);
+ int rc = sqlite3_step(stmt);
+ logError(rc, __FILE__, __LINE__);
+ sqlite3_reset(stmt);
+ }
+
+ DBFlush();
+
+ if (m_safetyMode) {
+ MCONTACT hContact = GetEventContact(hDbEvent);
+ if (auto *cc = m_cache->GetCachedContact(hContact))
+ if (cc->IsSub())
+ hContact = cc->parentID;
+
+ NotifyEventHooks(g_hevEventSetJson, hContact, hDbEvent);
+ }
+ return 0;
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
static void str2json(CMStringA &str)
{
str.Replace("\\", "\\\\");
@@ -330,7 +382,7 @@ static void str2json(CMStringA &str)
int CDbxSQLite::SetEventJson(MEVENT hDbEvent, const char *szSetting, DBVARIANT *dbv)
{
- if (hDbEvent == 0)
+ if (!hDbEvent || !dbv)
return 1;
CMStringA tmp(FORMAT, "$.%s", szSetting);
@@ -436,7 +488,7 @@ BOOL CDbxSQLite::GetEvent(MEVENT hDbEvent, DBEVENTINFO *dbei)
if (dbei->szModule == nullptr)
return 1;
- dbei->timestamp = sqlite3_column_int64(stmt, 1);
+ dbei->iTimestamp = sqlite3_column_int64(stmt, 1);
dbei->eventType = sqlite3_column_int(stmt, 2);
dbei->flags = sqlite3_column_int64(stmt, 3);
dbei->hContact = sqlite3_column_int(stmt, 9);
diff --git a/plugins/Dbx_sqlite/src/dbintf.cpp b/plugins/Dbx_sqlite/src/dbintf.cpp
index 048fab793c..6d557f3dce 100644
--- a/plugins/Dbx_sqlite/src/dbintf.cpp
+++ b/plugins/Dbx_sqlite/src/dbintf.cpp
@@ -29,7 +29,7 @@ CDbxSQLite::~CDbxSQLite()
/////////////////////////////////////////////////////////////////////////////////////////
-#define CURRVER 8
+#define CURRVER 9
int CDbxSQLite::Create()
{
@@ -211,6 +211,11 @@ void CDbxSQLite::CheckConversion()
logError(rc, __FILE__, __LINE__);
}
+ if (dbv.bVal < 9) {
+ int rc = sqlite3_exec(m_db, "DELETE FROM events WHERE length(data) > 1000000 AND type=1002;", 0, 0, 0);
+ logError(rc, __FILE__, __LINE__);
+ }
+
dbv.bVal = CURRVER;
WriteContactSetting(0, "Compatibility", "Sqlite", &dbv);
diff --git a/plugins/Dbx_sqlite/src/dbintf.h b/plugins/Dbx_sqlite/src/dbintf.h
index ab45361bdf..15644ab959 100644
--- a/plugins/Dbx_sqlite/src/dbintf.h
+++ b/plugins/Dbx_sqlite/src/dbintf.h
@@ -82,7 +82,7 @@ class CDbxSQLite : public MDatabaseCommon, public MIDatabaseChecker, public MZer
void UninitEvents();
CQuery qEvAdd, qEvDel, qEvEdit1, qEvEdit2, qEvBlobSize, qEvGet, qEvGetFlags, qEvSetFlags, qEvGetContact, qEvGetContact2;
CQuery qEvFindFirst, qEvFindNext, qEvFindLast, qEvFindPrev, qEvFindUnread, qEvAddSrt, qEvDelSrt, qEvDelSrt2, qEvMetaSplit, qEvMetaMerge;
- CQuery qEvGetById, qEvUpdateId, qEvSetJson;
+ CQuery qEvGetById, qEvUpdateId, qEvSetJson, qEvSetJson2;
int AddEventSrt(MEVENT, MCONTACT, int64_t ts);
int DeleteEventMain(MEVENT);
int DeleteEventSrt(MCONTACT, int64_t ts);
@@ -119,6 +119,7 @@ public:
STDMETHODIMP_(BOOL) DeleteEvent(MEVENT hDbEvent) override;
STDMETHODIMP_(BOOL) EditEvent(MEVENT hDbEvent, const DBEVENTINFO *dbe) override;
STDMETHODIMP_(int) SetEventJson(MEVENT hDbEvent, const char *szSetting, DBVARIANT *dbv) override;
+ STDMETHODIMP_(int) SetEventJson(MEVENT hDbEvent, const char *pBlob) override;
STDMETHODIMP_(int) GetBlobSize(MEVENT hDbEvent) override;
STDMETHODIMP_(BOOL) GetEvent(MEVENT hDbEvent, DBEVENTINFO *dbe) override;
STDMETHODIMP_(BOOL) MarkEventRead(MCONTACT contactID, MEVENT hDbEvent) override;
@@ -182,4 +183,5 @@ protected:
int CheckPhase2(void);
int CheckPhase3(void);
int CheckPhase4(void);
+ int CheckPhase5(void);
};
diff --git a/plugins/Dbx_sqlite/src/version.h b/plugins/Dbx_sqlite/src/version.h
index 77a3172b6f..14f8fc4da3 100644
--- a/plugins/Dbx_sqlite/src/version.h
+++ b/plugins/Dbx_sqlite/src/version.h
@@ -10,4 +10,4 @@
#define __DESCRIPTION "Provides Miranda database support: global settings, contacts, history, settings per contact."
#define __AUTHOR "Miranda-NG project"
#define __AUTHORWEB "https://miranda-ng.org/p/Dbx_sqlite"
-#define __COPYRIGHT "© 2018-24 Miranda NG team"
+#define __COPYRIGHT "© 2018-25 Miranda NG team"
diff --git a/plugins/Exchange/src/stdafx.cxx b/plugins/Exchange/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/Exchange/src/stdafx.cxx
+++ b/plugins/Exchange/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/ExternalAPI/delphi/m_folders.inc b/plugins/ExternalAPI/delphi/m_folders.inc
deleted file mode 100644
index a20a70e857..0000000000
--- a/plugins/ExternalAPI/delphi/m_folders.inc
+++ /dev/null
@@ -1,127 +0,0 @@
-{
-Custom profile folders plugin for Miranda IM
-
-Copyright 2005 Cristian Libotean
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_FOLDERS}
-{$DEFINE M_FOLDERS}
-
-const
- FOLDERS_API = 501; //dunno why it's here but it is :)
-
- PROFILE_PATH = '%profile_path%';
- CURRENT_PROFILE = '%current_profile%';
- MIRANDA_PATH = '%miranda_path%';
- PLUGINS_PATH = '%miranda_path%\plugins';
- MIRANDA_USERDATA = '%miranda_userdata%';
-
- PROFILE_PATHW = '%profile_path%';
- CURRENT_PROFILEW = '%current_profile%';
- MIRANDA_PATHW = '%miranda_path%';
- MIRANDA_USERDATAW = '%miranda_userdata%';
- PLUGINS_PATHW = '%miranda_path%\plugins';
-
- FOLDER_AVATARS = PROFILE_PATH+'\'+CURRENT_PROFILE+'\avatars';
- FOLDER_VCARDS = PROFILE_PATH+'\'+CURRENT_PROFILE+'\vcards';
- FOLDER_LOGS = PROFILE_PATH+'\'+CURRENT_PROFILE+'\logs';
- FOLDER_RECEIVED_FILES = PROFILE_PATH+'\'+CURRENT_PROFILE+'\received files';
- FOLDER_DOCS = MIRANDA_PATH+'\'+'docs';
-
- FOLDER_CONFIG = PLUGINS_PATH+'\config';
- FOLDER_SCRIPTS = MIRANDA_PATH+'\scripts';
- FOLDER_UPDATES = MIRANDA_PATH+'\updates';
-
- FOLDER_CUSTOMIZE = MIRANDA_PATH+'\customize';
- FOLDER_CUSTOMIZE_SOUNDS = FOLDER_CUSTOMIZE+'\sounds';
- FOLDER_CUSTOMIZE_ICONS = FOLDER_CUSTOMIZE+'\icons';
- FOLDER_CUSTOMIZE_SMILEYS = FOLDER_CUSTOMIZE+'\smileys';
- FOLDER_CUSTOMIZE_SKINS = FOLDER_CUSTOMIZE+'\skins';
- FOLDER_CUSTOMIZE_THEMES = FOLDER_CUSTOMIZE+'\themes';
-
- FOLDERS_NAME_MAX_SIZE = 64; //maximum name and section size
-
- FF_UNICODE = $00000001;
-
-type
- TFOLDERSDATA = record
- cbSize :integer; // size of struct
- szSection :PAnsiChar; // section name, if it doesn't exist it will be created
- // otherwise it will just add this entry to it
- szName :PAnsiChar; // entry name - will be shown in options
- szFormat :TCHAR; // default string format. Fallback string in case
- // there's no entry in the database for this
- // folder. This should be the initial value for
- // the path, users will be able to change it later.
- flags :dword; // FF_* flags
- // V2.0
- szUserName:TChar; // for display purposes. if NULL, plugins gets it as the
- // translated szName String is dup()'d so you can free it
- // later. If you set the unicode string don't forget to set
- // the flag accordingly.
- end;
-
-const
-{
- Folders/Register/Path service
- wParam - not used, must be 0
- lParam - (LPARAM) (const FOLDERDATA *) - Data structure filled with
- the necessary information.
- Returns a handle to the registered path or 0 on error.
- You need to use this to call the other services.
-}
- MS_FOLDERS_REGISTER_PATH:PAnsiChar = 'Folders/Register/Path';
-
-{
- Folders/Get/PathSize service
- wParam - (WPARAM) (int) - handle to registered path
- lParam - (LPARAM) (int *) - pointer to the variable that receives the size of the path
- string (not including the null character). Depending on the flags set when creating the path
- it will either call mir_strlen() or mir_wstrlen() to get the length of the string.
- Returns the size of the buffer.
-}
- MS_FOLDERS_GET_SIZE:PAnsiChar = 'Folders/Get/PathSize';
-
-type
- TFOLDERSGETDATA = record
- cbSize:integer;
- nMaxPathSize:integer; // maximum size of buffer. This represents the number
- // of characters that can be copied to it (so for
- // unicode strings you don't send the number of
- // bytes but the length of the string).
- szPath:TChar; // pointer to the buffer that receives the path without the last "\\"
- Flags: dword; // FF_* flags
- end;
-
-const
-{
- Folders/Get/Path service
- wParam - (WPARAM) (int) - handle to registered path
- lParam - (LPARAM) (FOLDERSGETDATA *) pointer to a FOLDERSGETDATA that has all the relevant fields filled.
- Should return 0 on success, or nonzero otherwise.
-}
- MS_FOLDERS_GET_PATH:PAnsiChar = 'Folders/Get/Path';
-
-{
- Folders/On/Path/Changed
- wParam - (WPARAM) 0
- lParam - (LPARAM) 0
- Triggered when the folders change, you should reget the paths you registered.
-}
- ME_FOLDERS_PATH_CHANGED:PAnsiChar = 'Folders/On/Path/Changed';
-
-{$ENDIF}
diff --git a/plugins/ExternalAPI/m_assocmgr.h b/plugins/ExternalAPI/m_assocmgr.h
index d10df20b7f..52f4a1911c 100644
--- a/plugins/ExternalAPI/m_assocmgr.h
+++ b/plugins/ExternalAPI/m_assocmgr.h
@@ -3,7 +3,7 @@
'File Association Manager'-Plugin for
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (C) 2005-2007 H. Herkenrath
This program is free software; you can redistribute it and/or
diff --git a/plugins/ExternalAPI/m_dbeditorpp.h b/plugins/ExternalAPI/m_dbeditorpp.h
index c305231e9d..ce2f25185d 100644
--- a/plugins/ExternalAPI/m_dbeditorpp.h
+++ b/plugins/ExternalAPI/m_dbeditorpp.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2003-11 Bio, Jonathan Gordon
This program is free software; you can redistribute it and/or
diff --git a/plugins/ExternalAPI/m_folders.h b/plugins/ExternalAPI/m_folders.h
index 1f49cec9c8..765472c6c0 100644
--- a/plugins/ExternalAPI/m_folders.h
+++ b/plugins/ExternalAPI/m_folders.h
@@ -57,15 +57,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct FOLDERSDATA
{
- int cbSize; // size of struct
DWORD flags; // FF_* flags
+ HPLUGIN plugin; // plugin which owns a folder
LPCSTR szSection; // section name, if it doesn't exist it will be created otherwise it will just add this entry to it
LPCSTR szName; // entry name - will be shown in options
MAllCStrings szFormat; // default string format. Fallback string in case there's no entry in the database for this folder.
// This should be the initial value for the path, users will be able to change it later.
// String is dup()'d so you can free it later. If you set the unicode string don't forget to set the flag accordingly.
- MAllCStrings szUserName; // for display purposes. if NULL, plugins gets it as the translated szName
- // String is dup()'d so you can free it later. If you set the unicode string don't forget to set the flag accordingly.
};
/*Folders/Register/Path service
@@ -88,7 +86,6 @@ struct FOLDERSDATA
struct FOLDERSGETDATA
{
- int cbSize;
int nMaxPathSize; // maximum size of buffer. This represents the number of characters that can be copied to it (so for unicode strings you don't send the number of bytes but the length of the string).
MAllStrings szPath; // pointer to the buffer that receives the path without the last "\\"
DWORD flags; // FF_* flags
@@ -114,6 +111,7 @@ __inline static HANDLE FoldersRegisterCustomPath(const char *section, const char
return nullptr;
FOLDERSDATA fd = { sizeof(fd) };
+ fd.plugin = (HPLUGIN)&g_plugin;
fd.szSection = section;
fd.szName = name;
fd.szFormat.a = defaultPath;
@@ -121,16 +119,16 @@ __inline static HANDLE FoldersRegisterCustomPath(const char *section, const char
}
#ifdef _UNICODE
-__inline static HANDLE FoldersRegisterCustomPathW(const char *section, const char *name, const wchar_t *defaultPathW, const wchar_t *userNameW = nullptr)
+__inline static HANDLE FoldersRegisterCustomPathW(const char *section, const char *name, const wchar_t *defaultPathW)
{
if (!ServiceExists(MS_FOLDERS_REGISTER_PATH))
return nullptr;
FOLDERSDATA fd = { sizeof(fd) };
+ fd.plugin = (HPLUGIN)&g_plugin;
fd.szSection = section;
fd.szName = name;
fd.szFormat.w = defaultPathW;
- fd.szUserName.w = userNameW;
fd.flags = FF_UNICODE;
return (HANDLE)CallService(MS_FOLDERS_REGISTER_PATH, 0, (LPARAM)&fd);
}
diff --git a/plugins/ExternalAPI/m_proto_listeningto.h b/plugins/ExternalAPI/m_proto_listeningto.h
index ef6996db3a..c530342060 100644
--- a/plugins/ExternalAPI/m_proto_listeningto.h
+++ b/plugins/ExternalAPI/m_proto_listeningto.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-06 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/ExternalAPI/m_shutdown.h b/plugins/ExternalAPI/m_shutdown.h
index 9240ab14f4..6ec2a5deb6 100644
--- a/plugins/ExternalAPI/m_shutdown.h
+++ b/plugins/ExternalAPI/m_shutdown.h
@@ -3,7 +3,7 @@
'AutoShutdown'-Plugin for
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (C) 2004-2007 H. Herkenrath
This program is free software; you can redistribute it and/or
diff --git a/plugins/ExternalAPI/m_skin_eng.h b/plugins/ExternalAPI/m_skin_eng.h
index dad4ab9fff..d7d2dfc9ff 100644
--- a/plugins/ExternalAPI/m_skin_eng.h
+++ b/plugins/ExternalAPI/m_skin_eng.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/ExternalAPI/m_userinfoex.h b/plugins/ExternalAPI/m_userinfoex.h
index 73882a3031..a0faf471bf 100644
--- a/plugins/ExternalAPI/m_userinfoex.h
+++ b/plugins/ExternalAPI/m_userinfoex.h
@@ -1,7 +1,7 @@
/*
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-09 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/ExternalAPI/m_weather.h b/plugins/ExternalAPI/m_weather.h
deleted file mode 100644
index eb9e89f84d..0000000000
--- a/plugins/ExternalAPI/m_weather.h
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
-Weather Protocol plugin for Miranda IM
-Copyright (C) 2005-2009 Boris Krasnovskiy All Rights Reserved
-Copyright (C) 2002-2005 Calvin Che
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; version 2
-of the License.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef M_WEATHER_H__
-#define M_WEATHER_H__ 1
-
-//============ WEATHER CONDITION STRUCT ============
-
-// weather conditions (added in v0.1.2.0)
-struct WEATHERINFO
-{
- MCONTACT hContact;
- TCHAR id[128];
- TCHAR city[128];
- TCHAR update[64];
- TCHAR cond[128];
- TCHAR temp[16];
- TCHAR low[16];
- TCHAR high[16];
- TCHAR feel[16];
- TCHAR wind[16];
- TCHAR winddir[64];
- TCHAR dewpoint[16];
- TCHAR pressure[16];
- TCHAR humid[16];
- TCHAR vis[16];
- TCHAR sunrise[32];
- TCHAR sunset[32];
-};
-
-// =============== WEATHER SERVICES ================
-
-// Enable or disable weather protocol.
-// WPARAM = FALSE to toggle, TRUE to use the LPARAM
-// LPARAM = TRUE to enable, FALSE to disable
-#define MS_WEATHER_ENABLED "Weather/EnableDisable"
-
-// Update all weather info
-// WPARAM = LPARAM = NULL
-#define MS_WEATHER_UPDATEALL "Weather/UpdateAll"
-
-// Update all weather info + erase the old ones
-// WPARAM = LPARAM = NULL
-#define MS_WEATHER_REFRESHALL "Weather/RefreshAll"
-
-// Below are the service functions for weather contacts
-// The plugin does NOT verify that they are used in weather contact,
-// so bad call on these function may cause crashes.
-
-// Update a single station
-// WPARAM = (HANDLE)hContact
-// LPARAM = NULL
-#define MS_WEATHER_UPDATE "Weather/Update"
-
-// Update a single station + delete old settings
-// WPARAM = (HANDLE)hContact
-// LPARAM = NULL
-#define MS_WEATHER_REFRESH "Weather/Refresh"
-
-// View the brief info of a contact
-// WPARAM = (HANDLE)hContact
-// LPARAM = NULL
-#define MS_WEATHER_BRIEF "Weather/Brief"
-
-// Use default browser to open the complete forecast on web
-// WPARAM = (HANDLE)hContact
-// LPARAM = NULL
-#define MS_WEATHER_COMPLETE "Weather/CompleteForecast"
-
-// Use default browser to open the weather map defined for the contact
-// WPARAM = (HANDLE)hContact
-// LPARAM = NULL
-#define MS_WEATHER_MAP "Weather/Map"
-
-// Open the external log of the weather contact
-// WPARAM = (HANDLE)hContact
-// LPARAM = NULL
-#define MS_WEATHER_LOG "Weather/Log"
-
-// Edit weather contact setting
-// WPARAM = (HANDLE)hContact
-// LPARAM = NULL
-#define MS_WEATHER_EDIT "Weather/Edit"
-
-// parse the string to turn it to weather display
-// WPARAM = (WEATHERINFO*)hContact
-// LPARAM = (char*)display_str
-#define MS_WEATHER_GETDISPLAY "Weather/GetDisplay"
-
-// =============== WEATHER EVENTS ================
-
-/*
-HANDLE hContact = (HANDLE)wParam;
-BOOL Condition_Changed = (BOOL)lParam;
-
-hContact is the handle of updated contact
-If the weather condition is differ from the last update (either temperature/condition,
-or the last update time, depend what the user choose in the options), then
-Condition_Changed is true; otherwise is false.
-*/
-#define ME_WEATHER_UPDATED "Miranda/Weather/Updated"
-
-/*
-Shows a warning message for Weather Popup.
-wParam = (char*) lpzMessage
-lParam = Type
-Type can either be SM_WARNING, SM_NOTIFY, or SM_WEATHERALERT
-
-This event is used to avoid the error popup to occurs within a thread, so the "Use
-multiply thread" fuction don't have to be enabled for weather popups to work.
-*/
-#define SM_WEATHERALERT 16
-#define ME_WEATHER_ERROR "Miranda/Weather/Error"
-
-
-#endif //M_WEATHER_H__
diff --git a/plugins/FTPFileYM/src/job_upload.cpp b/plugins/FTPFileYM/src/job_upload.cpp
index 6e4fbc29b3..9d71c41312 100644
--- a/plugins/FTPFileYM/src/job_upload.cpp
+++ b/plugins/FTPFileYM/src/job_upload.cpp
@@ -88,7 +88,7 @@ void UploadJob::autoSend()
dbei.eventType = EVENTTYPE_MESSAGE;
dbei.flags = DBEF_SENT;
dbei.szModule = szProto;
- dbei.timestamp = (uint32_t)time(0);
+ dbei.iTimestamp = (uint32_t)time(0);
dbei.cbBlob = (uint32_t)mir_strlen(m_szFileLink) + 1;
dbei.pBlob = m_szFileLink;
db_event_add(m_hContact, &dbei);
diff --git a/plugins/FTPFileYM/src/stdafx.cxx b/plugins/FTPFileYM/src/stdafx.cxx
index 87b7477097..72e87c2758 100644
--- a/plugins/FTPFileYM/src/stdafx.cxx
+++ b/plugins/FTPFileYM/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/FavContacts/src/contact_cache.cpp b/plugins/FavContacts/src/contact_cache.cpp
index 12dabbb2d0..161b3f2d8f 100644
--- a/plugins/FavContacts/src/contact_cache.cpp
+++ b/plugins/FavContacts/src/contact_cache.cpp
@@ -30,7 +30,7 @@ int __cdecl CContactCache::OnDbEventAdded(WPARAM hContact, LPARAM hEvent)
if (dbei.eventType != EVENTTYPE_MESSAGE)
return 0;
- float weight = GetEventWeight(time(0) - dbei.timestamp);
+ float weight = GetEventWeight(time(0) - dbei.getUnixtime());
float q = GetTimeWeight(time(0) - m_lastUpdate);
m_lastUpdate = time(0);
if (!weight)
@@ -88,7 +88,7 @@ void CContactCache::Rebuild()
while (MEVENT hEvent = cursor.FetchNext()) {
DBEVENTINFO dbei = {};
if (!db_event_get(hEvent, &dbei)) {
- if (float weight = GetEventWeight(timestamp - dbei.timestamp)) {
+ if (float weight = GetEventWeight(timestamp - dbei.getUnixtime())) {
if (dbei.eventType == EVENTTYPE_MESSAGE)
info->rate += weight;
}
diff --git a/plugins/FavContacts/src/stdafx.cxx b/plugins/FavContacts/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/FavContacts/src/stdafx.cxx
+++ b/plugins/FavContacts/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/FileAsMessage/res/resources.rc b/plugins/FileAsMessage/res/resources.rc
index df35c53f00..dc1d331e45 100644
--- a/plugins/FileAsMessage/res/resources.rc
+++ b/plugins/FileAsMessage/res/resources.rc
@@ -134,7 +134,7 @@ END
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
-IDI_SMALLICON ICON "file.ico"
+IDI_MAIN ICON "file.ico"
IDI_STOP ICON "abort.ico"
IDI_PAUSE ICON "pause.ico"
IDI_PLAY ICON "play.ico"
diff --git a/plugins/FileAsMessage/src/dialog.cpp b/plugins/FileAsMessage/src/dialog.cpp
index 60670e4e8c..6c0873a29f 100644
--- a/plugins/FileAsMessage/src/dialog.cpp
+++ b/plugins/FileAsMessage/src/dialog.cpp
@@ -98,7 +98,7 @@ void MakePopupMsg(HWND hDlg, MCONTACT hContact, wchar_t *msg)
POPUPDATAW ppd;
ppd.lchContact = hContact;
- ppd.lchIcon = LoadIcon(g_plugin.getInst(), MAKEINTRESOURCE(IDI_SMALLICON));
+ ppd.lchIcon = LoadIcon(g_plugin.getInst(), MAKEINTRESOURCE(IDI_MAIN));
mir_wstrcpy(ppd.lpwzContactName, Clist_GetContactDisplayName(hContact));
mir_wstrcpy(ppd.lpwzText, msg);
ppd.colorBack = GetSysColor(COLOR_INFOBK);
@@ -165,10 +165,10 @@ void FILEECHO::setState(uint32_t state)
EnableWindow(GetDlgItem(hDlg, IDC_BROWSE), (iState & (STATE_PRERECV | STATE_FINISHED)));
if (state & (STATE_IDLE | STATE_FINISHED | STATE_CANCELLED | STATE_PRERECV))
- kind = ICON_PLAY;
+ kind = IDI_PLAY;
else
- kind = ICON_REFRESH;
- SendDlgItemMessage(hDlg, IDC_PLAY, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcons[kind]);
+ kind = IDI_REFRESH;
+ SendDlgItemMessage(hDlg, IDC_PLAY, BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(kind));
SendDlgItemMessage(hDlg, IDC_PLAY, BUTTONADDTOOLTIP, (WPARAM)Translate(hint_controls[kind]), 0);
}
else {
@@ -181,12 +181,12 @@ void FILEECHO::setState(uint32_t state)
case STATE_IDLE:
case STATE_PAUSED:
EnableWindow(GetDlgItem(hDlg, IDC_PLAY), TRUE);
- SendDlgItemMessage(hDlg, IDC_PLAY, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcons[ICON_PLAY]);
- SendDlgItemMessage(hDlg, IDC_PLAY, BUTTONADDTOOLTIP, (WPARAM)Translate(hint_controls[ICON_PLAY]), 0);
+ SendDlgItemMessage(hDlg, IDC_PLAY, BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(IDI_PLAY));
+ SendDlgItemMessage(hDlg, IDC_PLAY, BUTTONADDTOOLTIP, (WPARAM)Translate(hint_controls[IDI_PLAY]), 0);
break;
case STATE_OPERATE:
- SendDlgItemMessage(hDlg, IDC_PLAY, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcons[ICON_PAUSE]);
- SendDlgItemMessage(hDlg, IDC_PLAY, BUTTONADDTOOLTIP, (WPARAM)Translate(hint_controls[ICON_PAUSE]), 0);
+ SendDlgItemMessage(hDlg, IDC_PLAY, BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(IDI_PAUSE));
+ SendDlgItemMessage(hDlg, IDC_PLAY, BUTTONADDTOOLTIP, (WPARAM)Translate(hint_controls[IDI_PAUSE]), 0);
break;
}
}
@@ -404,7 +404,7 @@ void FILEECHO::incomeRequest(char *param)
if (!IsWindowVisible(hDlg) && !AutoMin) {
CLISTEVENT cle = {};
cle.hContact = hContact;
- cle.hIcon = LoadIcon(g_plugin.getInst(), MAKEINTRESOURCE(IDI_SMALLICON));
+ cle.hIcon = LoadIcon(g_plugin.getInst(), MAKEINTRESOURCE(IDI_MAIN));
cle.flags = CLEF_URGENT;
cle.hDbEvent = 0;
cle.pszService = MODULENAME "/FERecvFile";
@@ -851,15 +851,15 @@ INT_PTR CALLBACK DialogProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
hwndStatus = CreateStatusWindow(WS_CHILD | WS_VISIBLE, L"", hDlg, IDC_STATUS);
SetWindowLongPtr(hDlg, GWLP_USERDATA, (LONG_PTR)dat);
WindowList_Add(hFileList, hDlg, dat->hContact);
- Window_SetIcon_IcoLib(hDlg, iconList[ICON_MAIN].hIcolib);
- SendDlgItemMessage(hDlg, IDC_STOP, BUTTONADDTOOLTIP, (WPARAM)Translate(hint_controls[ICON_STOP]), 0);
+ Window_SetIcon_IcoLib(hDlg, g_plugin.getIconHandle(IDI_MAIN));
+ SendDlgItemMessage(hDlg, IDC_STOP, BUTTONADDTOOLTIP, (WPARAM)Translate(hint_controls[IDI_STOP]), 0);
mir_subclassWindow(GetDlgItem(hDlg, IDC_PROGRESS), ProgressWndProc);
SendDlgItemMessage(hDlg, IDC_PLAY, BUTTONSETASFLATBTN, 0, 0);
- SendDlgItemMessage(hDlg, IDC_PLAY, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcons[ICON_PLAY]);
+ SendDlgItemMessage(hDlg, IDC_PLAY, BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(IDI_PLAY));
SendDlgItemMessage(hDlg, IDC_STOP, BUTTONSETASFLATBTN, 0, 0);
- SendDlgItemMessage(hDlg, IDC_STOP, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcons[ICON_STOP]);
+ SendDlgItemMessage(hDlg, IDC_STOP, BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(IDI_STOP));
dat->setState(STATE_IDLE);
if (dat->inSend)
@@ -872,10 +872,9 @@ INT_PTR CALLBACK DialogProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
return TRUE;
case WM_FE_SKINCHANGE:
- Window_SetIcon_IcoLib(hDlg, iconList[ICON_MAIN].hIcolib);
+ Window_SetIcon_IcoLib(hDlg, g_plugin.getIconHandle(IDI_MAIN));
dat->setState(dat->iState);
- SendDlgItemMessage(hDlg, IDC_STOP, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcons[ICON_STOP]);
-
+ SendDlgItemMessage(hDlg, IDC_STOP, BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(IDI_STOP));
break;
case WM_FE_STATUSCHANGE:
diff --git a/plugins/FileAsMessage/src/dialog.h b/plugins/FileAsMessage/src/dialog.h
index 1fffdf96d8..e7e2ce5877 100644
--- a/plugins/FileAsMessage/src/dialog.h
+++ b/plugins/FileAsMessage/src/dialog.h
@@ -32,24 +32,18 @@ enum
extern char cFECmd[CMD_COUNT];
-#define STATE_IDLE 0x100 // idle, no operation
-#define STATE_REQSENT 0x02 // request sent, awaiting of response
-#define STATE_PRERECV 0x04 // incoming request, awaiting of user
-#define STATE_OPERATE 0x08 // operating mode
-#define STATE_ACKREQ 0x10 // ACK-request scheduled
+#define STATE_IDLE 0x100 // idle, no operation
+#define STATE_REQSENT 0x02 // request sent, awaiting of response
+#define STATE_PRERECV 0x04 // incoming request, awaiting of user
+#define STATE_OPERATE 0x08 // operating mode
+#define STATE_ACKREQ 0x10 // ACK-request scheduled
#define STATE_CANCELLED 0x20 // operation aborted
-#define STATE_FINISHED 0x40 // ... finished successfully
-#define STATE_PAUSED 0x80 // ... paused
-
-#define CHUNK_UNSENT 0x00
-#define CHUNK_SENT 0x01
-#define CHUNK_ACK 0x02
-
-#define ICON_PLAY 0
-#define ICON_PAUSE 1
-#define ICON_REFRESH 2
-#define ICON_STOP 3
-#define ICON_MAIN 4
+#define STATE_FINISHED 0x40 // ... finished successfully
+#define STATE_PAUSED 0x80 // ... paused
+
+#define CHUNK_UNSENT 0x00
+#define CHUNK_SENT 0x01
+#define CHUNK_ACK 0x02
struct FILEECHO : public MZeroedObject
{
diff --git a/plugins/FileAsMessage/src/main.cpp b/plugins/FileAsMessage/src/main.cpp
index d19e7c2b37..88557eb18f 100644
--- a/plugins/FileAsMessage/src/main.cpp
+++ b/plugins/FileAsMessage/src/main.cpp
@@ -8,19 +8,6 @@ char *szServiceTitle = SERVICE_TITLE;
char *szServicePrefix = SERVICE_PREFIX;
HANDLE hHookDbSettingChange, hHookContactAdded, hHookSkinIconsChanged;
-HICON hIcons[5];
-
-IconItem iconList[] =
-{
- { LPGEN("Play"), "FePlay", IDI_PLAY },
- { LPGEN("Pause"), "FePause", IDI_PAUSE },
- { LPGEN("Revive"), "FeRefresh", IDI_REFRESH },
- { LPGEN("Stop"), "FeStop", IDI_STOP },
- { LPGEN("Main"), "FeMain", IDI_SMALLICON },
-};
-
-int iIconId[5] = { 3, 2, 4, 1, 0 };
-
/////////////////////////////////////////////////////////////////////////////////////////
PLUGININFOEX pluginInfoEx =
@@ -47,9 +34,6 @@ CMPlugin::CMPlugin() :
int OnSkinIconsChanged(WPARAM, LPARAM)
{
- for (int indx = 0; indx < _countof(hIcons); indx++)
- hIcons[indx] = IcoLib_GetIconByHandle(iconList[indx].hIcolib);
-
WindowList_Broadcast(hFileList, WM_FE_SKINCHANGE, 0, 0);
return 0;
}
@@ -58,8 +42,7 @@ int OnSettingChanged(WPARAM hContact, LPARAM lParam)
{
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam;
- if (hContact && !strcmp(cws->szSetting, "Status"))
- {
+ if (hContact && !strcmp(cws->szSetting, "Status")) {
HWND hwnd = WindowList_Find(hFileList, hContact);
PostMessage(hwnd, WM_FE_STATUSCHANGE, 0, 0);
}
@@ -68,54 +51,35 @@ int OnSettingChanged(WPARAM hContact, LPARAM lParam)
INT_PTR OnRecvFile(WPARAM, LPARAM lParam)
{
- CLISTEVENT *clev = (CLISTEVENT*)lParam;
+ auto *clev = (CLISTEVENT *)lParam;
HWND hwnd = WindowList_Find(hFileList, clev->hContact);
- if (IsWindow(hwnd))
- {
+ if (IsWindow(hwnd)) {
ShowWindow(hwnd, SW_SHOWNORMAL);
SetForegroundWindow(hwnd);
SetFocus(hwnd);
}
- /*
- else
- {
- if(hwnd != 0) WindowList_Remove(hFileList, hwnd);
- FILEECHO *fe = new FILEECHO((HANDLE)clev->hContact);
- fe->inSend = FALSE;
- hwnd = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_MAIN), NULL, DialogProc, (LPARAM)fe);
- if(hwnd == NULL)
- {
- delete fe;
- return 0;
- }
- //SendMessage(hwnd, WM_FE_SERVICE, 0, TRUE);
- ShowWindow(hwnd, SW_SHOWNORMAL);
- }
- */
+
return 1;
}
INT_PTR OnSendFile(WPARAM wParam, LPARAM)
{
HWND hwnd = WindowList_Find(hFileList, wParam);
- if (IsWindow(hwnd))
- {
+ if (IsWindow(hwnd)) {
SetForegroundWindow(hwnd);
SetFocus(hwnd);
}
- else
- {
+ else {
if (hwnd != nullptr) WindowList_Remove(hFileList, hwnd);
FILEECHO *fe = new FILEECHO(wParam);
fe->inSend = TRUE;
hwnd = CreateDialogParam(g_plugin.getInst(), MAKEINTRESOURCE(IDD_MAIN), nullptr, DialogProc, (LPARAM)fe);
- if (hwnd == nullptr)
- {
+ if (hwnd == nullptr) {
delete fe;
return 0;
}
- //SendMessage(hwnd, WM_FE_SERVICE, 0, TRUE);
+
ShowWindow(hwnd, SW_SHOWNORMAL);
}
return 1;
@@ -124,48 +88,62 @@ INT_PTR OnSendFile(WPARAM wParam, LPARAM)
INT_PTR OnRecvMessage(WPARAM wParam, LPARAM lParam)
{
CCSDATA *ccs = (CCSDATA *)lParam;
- auto *dbei = (DB::EventInfo*)ccs->lParam;
+ auto *dbei = (DB::EventInfo *)ccs->lParam;
if (strncmp(dbei->pBlob, szServicePrefix, mir_strlen(szServicePrefix)))
return Proto_ChainRecv(wParam, ccs);
HWND hwnd = WindowList_Find(hFileList, ccs->hContact);
- if (!IsWindow(hwnd))
- {
+ if (!IsWindow(hwnd)) {
if (hwnd != nullptr) WindowList_Remove(hFileList, hwnd);
- FILEECHO *fe = new FILEECHO(ccs->hContact);
+ auto *fe = new FILEECHO(ccs->hContact);
fe->inSend = FALSE;
hwnd = CreateDialogParam(g_plugin.getInst(), MAKEINTRESOURCE(IDD_MAIN), nullptr, DialogProc, (LPARAM)fe);
- if (hwnd == nullptr)
- {
+ if (hwnd == nullptr) {
delete fe;
return 0;
}
}
+
char *msg = mir_strdup(dbei->pBlob + mir_strlen(szServicePrefix));
PostMessage(hwnd, WM_FE_MESSAGE, (WPARAM)ccs->hContact, (LPARAM)msg);
-
return 0;
}
/////////////////////////////////////////////////////////////////////////////////////////
// Startup initializing
-static int OnModulesLoaded(WPARAM, LPARAM)
+static IconItem iconList[] =
{
- for (int indx = 0; indx < _countof(hIcons); indx++)
- hIcons[indx] = IcoLib_GetIconByHandle(iconList[indx].hIcolib);
+ { LPGEN("Play"), "FePlay", IDI_PLAY },
+ { LPGEN("Pause"), "FePause", IDI_PAUSE },
+ { LPGEN("Revive"), "FeRefresh", IDI_REFRESH },
+ { LPGEN("Stop"), "FeStop", IDI_STOP },
+ { LPGEN("Main"), "FeMain", IDI_MAIN },
+};
+static int OnModulesLoaded(WPARAM, LPARAM)
+{
hHookSkinIconsChanged = HookEvent(ME_SKIN_ICONSCHANGED, OnSkinIconsChanged);
+ // main menu item
CMenuItem mi(&g_plugin);
SET_UID(mi, 0xe4a98d2a, 0xa54a, 0x4db1, 0x8d, 0x29, 0xd, 0x5c, 0xf1, 0x10, 0x69, 0x35);
mi.position = 200011;
- mi.hIcolibItem = iconList[ICON_MAIN].hIcolib;
+ mi.hIcolibItem = g_plugin.getIconHandle(IDI_MAIN);
mi.name.a = LPGEN("File As Message...");
mi.pszService = MODULENAME "/FESendFile";
mi.flags = CMIF_NOTOFFLINE;
Menu_AddContactMenuItem(&mi);
+
+ // toolbar button
+ BBButton bbd = {};
+ bbd.pszModuleName = MODULENAME;
+ bbd.dwDefPos = 1500;
+ bbd.pwszTooltip = LPGENW("File As Message...");
+ bbd.bbbFlags = BBBF_ISRSIDEBUTTON | BBBF_CANBEHIDDEN | BBBF_HIDDEN;
+ bbd.hIcon = mi.hIcolibItem;
+ g_plugin.addButton(&bbd);
return 0;
}
@@ -173,7 +151,7 @@ int CMPlugin::Load()
{
InitCRC32();
- g_plugin.registerIcon("fileAsMessage", iconList);
+ g_plugin.registerIcon(MODULENAME, iconList);
hFileList = WindowList_Create();
diff --git a/plugins/FileAsMessage/src/resource.h b/plugins/FileAsMessage/src/resource.h
index 952fba4a65..26a4f2ecc1 100644
--- a/plugins/FileAsMessage/src/resource.h
+++ b/plugins/FileAsMessage/src/resource.h
@@ -4,7 +4,7 @@
//
#define IDC_PLAY 1
#define IDD_MAIN 101
-#define IDI_SMALLICON 102
+#define IDI_MAIN 102
#define IDD_OPTIONS 103
#define IDI_STOP 104
#define IDI_PAUSE 105
diff --git a/plugins/FileAsMessage/src/stdafx.h b/plugins/FileAsMessage/src/stdafx.h
index 85e2ddf980..99a4703f55 100644
--- a/plugins/FileAsMessage/src/stdafx.h
+++ b/plugins/FileAsMessage/src/stdafx.h
@@ -8,18 +8,19 @@
#include <commctrl.h>
#include <newpluginapi.h>
+#include <m_button.h>
+#include <m_clistint.h>
#include <m_contacts.h>
#include <m_database.h>
-#include <m_protosvc.h>
+#include <m_file.h>
+#include <m_icolib.h>
#include <m_langpack.h>
-#include <m_clistint.h>
+#include <m_message.h>
+#include <m_netlib.h>
#include <m_options.h>
-#include <m_skin.h>
#include <m_popup.h>
-#include <m_icolib.h>
-#include <m_button.h>
-#include <m_netlib.h>
-#include <m_file.h>
+#include <m_protosvc.h>
+#include <m_skin.h>
#include "dialog.h"
#include "resource.h"
@@ -52,8 +53,5 @@ extern const ulong INITCRC;
extern MWindowList hFileList;
extern HANDLE hEventNewFile;
-extern HICON hIcons[5];
-extern IconItem iconList[];
-
ulong memcrc32(uchar *ptr, int size, ulong crc);
int OnOptInitialise(WPARAM wParam, LPARAM);
diff --git a/plugins/FileAsMessage/src/version.h b/plugins/FileAsMessage/src/version.h
index 6983f2321e..ac9ee338fe 100644
--- a/plugins/FileAsMessage/src/version.h
+++ b/plugins/FileAsMessage/src/version.h
@@ -1,7 +1,7 @@
#define __MAJOR_VERSION 0
#define __MINOR_VERSION 1
#define __RELEASE_NUM 0
-#define __BUILD_NUM 2
+#define __BUILD_NUM 3
#include <stdver.h>
diff --git a/plugins/FingerprintNG/iconpacks/res/Others/Discord.ico b/plugins/FingerprintNG/iconpacks/res/Others/Discord.ico
index c2830ed132..b9ce86cd14 100644
--- a/plugins/FingerprintNG/iconpacks/res/Others/Discord.ico
+++ b/plugins/FingerprintNG/iconpacks/res/Others/Discord.ico
Binary files differ
diff --git a/plugins/FingerprintNG/iconpacks/res/Others/Skype.ico b/plugins/FingerprintNG/iconpacks/res/Others/Skype.ico
deleted file mode 100644
index 031d8afb97..0000000000
--- a/plugins/FingerprintNG/iconpacks/res/Others/Skype.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/FingerprintNG/iconpacks/res/Others/Teams.ico b/plugins/FingerprintNG/iconpacks/res/Others/Teams.ico
new file mode 100644
index 0000000000..76e8549214
--- /dev/null
+++ b/plugins/FingerprintNG/iconpacks/res/Others/Teams.ico
Binary files differ
diff --git a/plugins/FingerprintNG/iconpacks/res/Overlays/overlay_proto_ICQ.ico b/plugins/FingerprintNG/iconpacks/res/Overlays/overlay_proto_ICQ.ico
deleted file mode 100644
index b010d62498..0000000000
--- a/plugins/FingerprintNG/iconpacks/res/Overlays/overlay_proto_ICQ.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/FingerprintNG/iconpacks/res/Overlays/overlay_proto_Skype.ico b/plugins/FingerprintNG/iconpacks/res/Overlays/overlay_proto_Skype.ico
deleted file mode 100644
index 4b27b56496..0000000000
--- a/plugins/FingerprintNG/iconpacks/res/Overlays/overlay_proto_Skype.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/FingerprintNG/iconpacks/res/Weather/AccuWeather.ico b/plugins/FingerprintNG/iconpacks/res/Weather/AccuWeather.ico
deleted file mode 100644
index 91e92daf27..0000000000
--- a/plugins/FingerprintNG/iconpacks/res/Weather/AccuWeather.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/FingerprintNG/iconpacks/res/Weather/gismeteo.ico b/plugins/FingerprintNG/iconpacks/res/Weather/gismeteo.ico
deleted file mode 100644
index 67fdc78d1a..0000000000
--- a/plugins/FingerprintNG/iconpacks/res/Weather/gismeteo.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/FingerprintNG/iconpacks/res/Weather/intelli.ico b/plugins/FingerprintNG/iconpacks/res/Weather/intelli.ico
deleted file mode 100644
index e6370e0538..0000000000
--- a/plugins/FingerprintNG/iconpacks/res/Weather/intelli.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/FingerprintNG/iconpacks/res/Weather/meteogid.ico b/plugins/FingerprintNG/iconpacks/res/Weather/meteogid.ico
deleted file mode 100644
index 3df898e1ca..0000000000
--- a/plugins/FingerprintNG/iconpacks/res/Weather/meteogid.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/FingerprintNG/iconpacks/res/Weather/meteonovosti.ico b/plugins/FingerprintNG/iconpacks/res/Weather/meteonovosti.ico
deleted file mode 100644
index a76db3d69d..0000000000
--- a/plugins/FingerprintNG/iconpacks/res/Weather/meteonovosti.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/FingerprintNG/iconpacks/res/Weather/noaa.ico b/plugins/FingerprintNG/iconpacks/res/Weather/noaa.ico
deleted file mode 100644
index ab9a9e2f93..0000000000
--- a/plugins/FingerprintNG/iconpacks/res/Weather/noaa.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/FingerprintNG/iconpacks/res/Weather/realmeteo.ico b/plugins/FingerprintNG/iconpacks/res/Weather/realmeteo.ico
deleted file mode 100644
index 55dd25d89e..0000000000
--- a/plugins/FingerprintNG/iconpacks/res/Weather/realmeteo.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/FingerprintNG/iconpacks/res/Weather/underground.ico b/plugins/FingerprintNG/iconpacks/res/Weather/underground.ico
deleted file mode 100644
index 1b3df3d9b7..0000000000
--- a/plugins/FingerprintNG/iconpacks/res/Weather/underground.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/FingerprintNG/iconpacks/res/Weather/weather.ico b/plugins/FingerprintNG/iconpacks/res/Weather/weather.ico
deleted file mode 100644
index 74045b66b3..0000000000
--- a/plugins/FingerprintNG/iconpacks/res/Weather/weather.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/FingerprintNG/iconpacks/res/Weather/weather_cn.ico b/plugins/FingerprintNG/iconpacks/res/Weather/weather_cn.ico
deleted file mode 100644
index 94f6a415b8..0000000000
--- a/plugins/FingerprintNG/iconpacks/res/Weather/weather_cn.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/FingerprintNG/iconpacks/res/Weather/weatherxml.ico b/plugins/FingerprintNG/iconpacks/res/Weather/weatherxml.ico
deleted file mode 100644
index a43f6daa0a..0000000000
--- a/plugins/FingerprintNG/iconpacks/res/Weather/weatherxml.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/FingerprintNG/iconpacks/res/Weather/wetter.ico b/plugins/FingerprintNG/iconpacks/res/Weather/wetter.ico
deleted file mode 100644
index 7faf7da728..0000000000
--- a/plugins/FingerprintNG/iconpacks/res/Weather/wetter.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/FingerprintNG/iconpacks/res/Weather/yweather.ico b/plugins/FingerprintNG/iconpacks/res/Weather/yweather.ico
deleted file mode 100644
index 08a05f0c2b..0000000000
--- a/plugins/FingerprintNG/iconpacks/res/Weather/yweather.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/FingerprintNG/iconpacks/res/fp_icons.rc b/plugins/FingerprintNG/iconpacks/res/fp_icons.rc
index f9925a8e84..473b1721af 100644
--- a/plugins/FingerprintNG/iconpacks/res/fp_icons.rc
+++ b/plugins/FingerprintNG/iconpacks/res/fp_icons.rc
@@ -447,19 +447,6 @@ IDI_GG8_OVERLAY ICON "GG\\overlay_GG_v8.ico"
IDI_GG9_OVERLAY ICON "GG\\overlay_GG_v9.ico"
IDI_GG10_OVERLAY ICON "GG\\overlay_GG_v10.ico"
IDI_GG11_OVERLAY ICON "GG\\overlay_GG_v11.ico"
-IDI_ACCU ICON "Weather\\AccuWeather.ico"
-IDI_GISMETEO ICON "Weather\\gismeteo.ico"
-IDI_INTELLI ICON "Weather\\intelli.ico"
-IDI_METEOGID ICON "Weather\\meteogid.ico"
-IDI_METEONOVOSTI ICON "Weather\\meteonovosti.ico"
-IDI_NOAA ICON "Weather\\noaa.ico"
-IDI_REALMETEO ICON "Weather\\realmeteo.ico"
-IDI_UNDERGROUND ICON "Weather\\underground.ico"
-IDI_WEATHER ICON "Weather\\weather.ico"
-IDI_WEATHER_CN ICON "Weather\\weather_cn.ico"
-IDI_WEATHERXML ICON "Weather\\weatherxml.ico"
-IDI_WETTER ICON "Weather\\wetter.ico"
-IDI_YWEATHER ICON "Weather\\yweather.ico"
IDI_FACEBOOK ICON "Facebook\\Facebook.ico"
IDI_FACEBOOK_APP ICON "Facebook\\facebook_app.ico"
IDI_FACEBOOK_MESSENGER ICON "Facebook\\facebook_messenger.ico"
@@ -470,7 +457,7 @@ IDI_VK_MESSENGER ICON "VKontakte\\vkmessenger.ico"
IDI_VK_PHOENIX_FULL ICON "VKontakte\\phoenix_full.ico"
IDI_VK_PHOENIX_LITE ICON "VKontakte\\phoenix_lite.ico"
IDI_DISCORD ICON "others\\Discord.ico"
-IDI_SKYPE ICON "others\\Skype.ico"
+IDI_TEAMS ICON "others\\Teams.ico"
IDI_TWITTER ICON "others\\Twitter.ico"
IDI_HANGOUTS ICON "others\\Google+ Hangouts.ico"
IDI_STEAM ICON "others\\Steam.ico"
@@ -479,7 +466,6 @@ IDI_IRC_OVERLAY ICON "overlays\\overlay_proto_IRC.ico
IDI_JABBER_OVERLAY ICON "overlays\\overlay_proto_Jabber.ico"
IDI_JGTALK_OVERLAY ICON "overlays\\overlay_proto_JGTalk.ico"
IDI_VK_OVERLAY ICON "overlays\\overlay_proto_VK.ico"
-IDI_SKYPE_OVERLAY ICON "overlays\\overlay_proto_skype.ico"
IDI_DEBUG_OVERLAY ICON "overlays\\overlay_resource_debug.ico"
IDI_HOME_OVERLAY ICON "overlays\\overlay_resource_home.ico"
IDI_MOBILE_OVERLAY ICON "overlays\\overlay_resource_mobile.ico"
diff --git a/plugins/FingerprintNG/src/fingerprint.cpp b/plugins/FingerprintNG/src/fingerprint.cpp
index 71b7f7ba98..72cf74b4f4 100644
--- a/plugins/FingerprintNG/src/fingerprint.cpp
+++ b/plugins/FingerprintNG/src/fingerprint.cpp
@@ -1,6 +1,6 @@
/*
Fingerprint NG (client version) icons module for Miranda NG
-Copyright © 2006-24 ghazan, mataes, HierOS, FYR, Bio, nullbie, faith_healer and all respective contributors.
+Copyright © 2006-25 ghazan, mataes, HierOS, FYR, Bio, nullbie, faith_healer and all respective contributors.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/FingerprintNG/src/main.cpp b/plugins/FingerprintNG/src/main.cpp
index 7b8231e3b0..336612f3f3 100644
--- a/plugins/FingerprintNG/src/main.cpp
+++ b/plugins/FingerprintNG/src/main.cpp
@@ -1,6 +1,6 @@
/*
Fingerprint NG (client version) icons module for Miranda NG
-Copyright © 2006-24 FYR, Bio, nullbie, ghazan, mataes, HierOS, faith_healer and all respective contributors.
+Copyright © 2006-25 FYR, Bio, nullbie, ghazan, mataes, HierOS, faith_healer and all respective contributors.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/FingerprintNG/src/masks.cpp b/plugins/FingerprintNG/src/masks.cpp
index 0f70b1a9fe..c672e00d53 100644
--- a/plugins/FingerprintNG/src/masks.cpp
+++ b/plugins/FingerprintNG/src/masks.cpp
@@ -1,6 +1,6 @@
/*
Fingerprint NG (client version) icons module for Miranda NG
-Copyright © 2006-24 ghazan, mataes, HierOS, FYR, Bio, nullbie, faith_healer and all respective contributors.
+Copyright © 2006-25 ghazan, mataes, HierOS, FYR, Bio, nullbie, faith_healer and all respective contributors.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -468,19 +468,7 @@ static KN_FP_MASK def_kn_fp_mask[] =
/////////////////////////////////////////////////////////////////////////////////////////
// WEATHER
- { "client_accu", L"*accuweather*", L"AccuWeather", IDI_ACCU, WEATHER_CASE, TRUE },
- { "client_gismeteo", L"*gismeteo*", L"GisMeteo", IDI_GISMETEO, WEATHER_CASE, TRUE },
- { "client_intelli", L"*intellicast*", L"Intellicast", IDI_INTELLI, WEATHER_CASE, TRUE },
- { "client_meteogid", L"|*meteo-gid*|*meteogid*", L"Meteo-Gid", IDI_METEOGID, WEATHER_CASE, TRUE },
- { "client_meteonovosti", L"*meteonovosti*", L"Meteonovosti", IDI_METEONOVOSTI, WEATHER_CASE, TRUE },
- { "client_noaa", L"*noaa*", L"NOAA Weather", IDI_NOAA, WEATHER_CASE, TRUE },
- { "client_real", L"*realmeteo*", L"RealMeteo", IDI_REALMETEO, WEATHER_CASE, TRUE },
- { "client_under", L"Weather Underground*", L"Weather Underground", IDI_UNDERGROUND, WEATHER_CASE, TRUE },
- { "client_weatherxml", L"*WeatherXML*", L"WeatherXML", IDI_WEATHERXML, WEATHER_CASE, TRUE },
- { "client_wetter", L"*wetter*", L"Wetter", IDI_WETTER, WEATHER_CASE, TRUE },
- { "client_yweather", L"*Yahoo Weather*", L"Yahoo Weather", IDI_YWEATHER, WEATHER_CASE, TRUE },
- { "client_weather_cn", L"*weather.com.cn*", L"Weather CN", IDI_WEATHER_CN, WEATHER_CASE, TRUE },
- { "client_weather", L"*weather*", L"Weather", IDI_WEATHER, WEATHER_CASE, TRUE },
+ // { "client_gismeteo", L"*gismeteo*", L"GisMeteo", IDI_GISMETEO, WEATHER_CASE, TRUE },
/////////////////////////////////////////////////////////////////////////////////////////
// RSS
@@ -526,15 +514,15 @@ static KN_FP_MASK def_kn_fp_mask[] =
{ "client_XMPP", L"|*XMPP*|Mrim*|*DRQZ00fz5WPn1gH+*", LPGENW("XMPP client"), IDI_XMPP, JABBER_CASE },
+ { "client_Discord", L"*Discord*", L"Discord", IDI_DISCORD, OTHER_PROTOS_CASE },
+
{ "client_Hangouts", L"messaging-*", L"Google+ Hangouts", IDI_HANGOUTS, OTHER_PROTOS_CASE, TRUE },
{ "client_Twitter", L"*Twitter*", L"Twitter", IDI_TWITTER, OTHER_PROTOS_CASE, TRUE },
- { "client_Skype", L"*Skype**", L"Skype", IDI_SKYPE, OTHER_PROTOS_CASE },
-
{ "client_Steam", L"*Steam*", L"Steam", IDI_STEAM, OTHER_PROTOS_CASE },
- { "client_Discord", L"*Discord*", L"Discord", IDI_DISCORD, OTHER_PROTOS_CASE },
+ { "client_Teams", L"*Teams**", L"Teams", IDI_TEAMS, OTHER_PROTOS_CASE },
/////////////////////////////////////////////////////////////////////////////////////////
// UNDEFINED CLIENTS
@@ -601,7 +589,6 @@ static KN_FP_MASK def_kn_fp_overlays_mask[] =
{ "client_JGTalk_overlay", L"*JGTalk*", LPGENW("JGTalk overlay"), IDI_JGTALK_OVERLAY, OVERLAYS_PROTO_CASE },
{ "client_Jabber_overlay", L"|^jabber*|Miranda*Jabber*|py*jabb*", LPGENW("Jabber overlay"), IDI_JABBER_OVERLAY, OVERLAYS_PROTO_CASE },
{ "client_VK_overlay", L"|Miranda*VKontakte*", LPGENW("VK overlay"), IDI_VK_OVERLAY, OVERLAYS_PROTO_CASE },
- { "client_Skype_overlay", L"|Miranda*Skype*", LPGENW("Skype overlay"), IDI_SKYPE_OVERLAY, OVERLAYS_PROTO_CASE },
/////////////////////////////////////////////////////////////////////////////////////////
// CLIENT VERSION OVERLAYS
diff --git a/plugins/FingerprintNG/src/options.cpp b/plugins/FingerprintNG/src/options.cpp
index 3ab27cce1c..98082b0d39 100644
--- a/plugins/FingerprintNG/src/options.cpp
+++ b/plugins/FingerprintNG/src/options.cpp
@@ -1,7 +1,7 @@
/*
Fingerprint NG (client version) icons module for Miranda NG
-Copyright © 2006-24 ghazan, mataes, HierOS, FYR, Bio, nullbie, faith_healer and all respective contributors.
+Copyright © 2006-25 ghazan, mataes, HierOS, FYR, Bio, nullbie, faith_healer and all respective contributors.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/FingerprintNG/src/prepare.cpp b/plugins/FingerprintNG/src/prepare.cpp
index 23b096fccb..ec73d1531d 100644
--- a/plugins/FingerprintNG/src/prepare.cpp
+++ b/plugins/FingerprintNG/src/prepare.cpp
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/FingerprintNG/src/resource.h b/plugins/FingerprintNG/src/resource.h
index 109a505d73..bce8cfc0e7 100644
--- a/plugins/FingerprintNG/src/resource.h
+++ b/plugins/FingerprintNG/src/resource.h
@@ -59,7 +59,6 @@
#define IDI_JABBER_OVERLAY 83
#define IDI_JGTALK_OVERLAY 84
#define IDI_VK_OVERLAY 90
-#define IDI_SKYPE_OVERLAY 91
#define IDI_SECUREIM_OVERLAY 95
#define IDI_NEWGPG_OVERLAY 96
#define IDI_MIROTR_OVERLAY 97
@@ -380,19 +379,6 @@
#define IDI_RSS09 763
#define IDI_RSS1 764
#define IDI_RSS2 765
-#define IDI_ACCU 801
-#define IDI_GISMETEO 802
-#define IDI_INTELLI 803
-#define IDI_REALMETEO 804
-#define IDI_WETTER 805
-#define IDI_UNDERGROUND 806
-#define IDI_WEATHER 807
-#define IDI_WEATHER_CN 808
-#define IDI_WEATHERXML 809
-#define IDI_METEOGID 810
-#define IDI_YWEATHER 811
-#define IDI_METEONOVOSTI 812
-#define IDI_NOAA 813
#define IDI_ADIUM 1000
#define IDI_AGILE 1001
#define IDI_APPOLO 1002
@@ -488,9 +474,11 @@
#define IDI_FACEBOOK_APP 2002
#define IDI_FACEBOOK_MESSENGER 2003
#define IDI_FACEBOOK_OTHER 2004
+
#define IDC_STATUSBAR 7001
-#define IDI_SKYPE 9002
+
#define IDI_TWITTER 9003
+#define IDI_TEAMS 9004
#define IDI_HANGOUTS 9005
#define IDI_VK 9006
#define IDI_DISCORD 9007
diff --git a/plugins/FingerprintNG/src/stdafx.cxx b/plugins/FingerprintNG/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/FingerprintNG/src/stdafx.cxx
+++ b/plugins/FingerprintNG/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/FingerprintNG/src/stdafx.h b/plugins/FingerprintNG/src/stdafx.h
index 879a74ee0a..9748fc01a2 100644
--- a/plugins/FingerprintNG/src/stdafx.h
+++ b/plugins/FingerprintNG/src/stdafx.h
@@ -1,7 +1,7 @@
/*
Fingerprint NG (client version) icons module for Miranda NG
-Copyright © 2006-24 ghazan, mataes, HierOS, FYR, Bio, nullbie, faith_healer and all respective contributors.
+Copyright © 2006-25 ghazan, mataes, HierOS, FYR, Bio, nullbie, faith_healer and all respective contributors.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/FingerprintNG/src/version.h b/plugins/FingerprintNG/src/version.h
index ed898d2592..a7c747362f 100644
--- a/plugins/FingerprintNG/src/version.h
+++ b/plugins/FingerprintNG/src/version.h
@@ -1,6 +1,6 @@
/*
Fingerprint NG (client version) icons module for Miranda NG
-Copyright © 2006-24 ghazan, Mataes, HierOS, FYR, Bio, nullbie, faith_healer and all respective contributors.
+Copyright © 2006-25 ghazan, Mataes, HierOS, FYR, Bio, nullbie, faith_healer and all respective contributors.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -29,4 +29,4 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define __DESCRIPTION "Fingerprint NG (client version) icons module for Miranda NG."
#define __AUTHOR "faith_healer, ghazan, Mataes"
#define __AUTHORWEB "https://miranda-ng.org/p/Fingerprint"
-#define __COPYRIGHT "© 2006-24 ghazan, Mataes, HierOS, FYR, Bio, nullbie, faith_healer and all respective contributors."
+#define __COPYRIGHT "© 2006-25 ghazan, Mataes, HierOS, FYR, Bio, nullbie, faith_healer and all respective contributors."
diff --git a/plugins/FloatingContacts/src/stdafx.cxx b/plugins/FloatingContacts/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/FloatingContacts/src/stdafx.cxx
+++ b/plugins/FloatingContacts/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/Folders/folders.vcxproj b/plugins/Folders/folders.vcxproj
index e95ce180f6..b02c0b8685 100644
--- a/plugins/Folders/folders.vcxproj
+++ b/plugins/Folders/folders.vcxproj
@@ -35,6 +35,7 @@
<PrecompiledHeader>Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="src\utils.cpp" />
+ <ClInclude Include="..\ExternalAPI\m_folders.h" />
<ClInclude Include="src\events.h" />
<ClInclude Include="src\folderItem.h" />
<ClInclude Include="src\resource.h" />
diff --git a/plugins/Folders/folders.vcxproj.filters b/plugins/Folders/folders.vcxproj.filters
index fcdb537888..88a5ae7745 100644
--- a/plugins/Folders/folders.vcxproj.filters
+++ b/plugins/Folders/folders.vcxproj.filters
@@ -46,6 +46,9 @@
<ClInclude Include="src\version.h">
<Filter>Header Files</Filter>
</ClInclude>
+ <ClInclude Include="..\ExternalAPI\m_folders.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="res\folders.rc">
diff --git a/plugins/Folders/src/dlg_handlers.cpp b/plugins/Folders/src/dlg_handlers.cpp
index d71d9dd874..79ef80b6b7 100644
--- a/plugins/Folders/src/dlg_handlers.cpp
+++ b/plugins/Folders/src/dlg_handlers.cpp
@@ -1,6 +1,6 @@
#include "stdafx.h"
-PFolderItem lastItem = nullptr;
+CFolderItem *lastItem = nullptr;
CDlgBase *pHelpDialog = nullptr;
@@ -70,13 +70,13 @@ class COptDialog : public CDlgBase
CCtrlEdit m_edtPreview, m_edtEdit;
CCtrlButton m_btnRefresh, m_btnHelp;
- PFolderItem GetSelectedItem()
+ CFolderItem* GetSelectedItem()
{
int index = m_lbItems.GetCurSel();
if (index == LB_ERR)
return nullptr;
- return (PFolderItem)m_lbItems.GetItemData(index);
+ return (CFolderItem *)m_lbItems.GetItemData(index);
}
int ContainsSection(const wchar_t *section)
@@ -88,12 +88,12 @@ class COptDialog : public CDlgBase
void LoadRegisteredFolderSections()
{
for (auto &it : lstRegisteredFolders) {
- wchar_t *translated = mir_a2u(it->GetSection());
- if (!ContainsSection(TranslateW(translated))) {
- int idx = m_lbSections.AddString(TranslateW(translated), 0);
+ _A2T pszSection(it->GetSection());
+ auto *pwszSection = TranslateW_LP(pszSection, it->GetPlugin());
+ if (!ContainsSection(pwszSection)) {
+ int idx = m_lbSections.AddString(pwszSection, 0);
m_lbSections.SetItemData(idx, (LPARAM)it->GetSection());
}
- mir_free(translated);
}
}
@@ -108,7 +108,8 @@ class COptDialog : public CDlgBase
m_lbItems.ResetContent();
for (auto &it : lstRegisteredFolders) {
if (!mir_strcmp(szSection, it->GetSection())) {
- idx = m_lbItems.AddString(TranslateW(it->GetUserName()), 0);
+ _A2T pszName(it->GetName());
+ idx = m_lbItems.AddString(TranslateW_LP(pszName, it->GetPlugin()), 0);
m_lbItems.SetItemData(idx, (LPARAM)it);
}
}
@@ -123,7 +124,7 @@ class COptDialog : public CDlgBase
m_edtPreview.SetText(ExpandPath(tmp));
}
- void LoadItem(PFolderItem item)
+ void LoadItem(CFolderItem *item)
{
if (!item)
return;
@@ -132,7 +133,7 @@ class COptDialog : public CDlgBase
RefreshPreview();
}
- void SaveItem(PFolderItem item, int bEnableApply)
+ void SaveItem(CFolderItem *item, int bEnableApply)
{
if (!item)
return;
@@ -145,7 +146,7 @@ class COptDialog : public CDlgBase
NotifyChange();
}
- int ChangesNotSaved(PFolderItem item)
+ int ChangesNotSaved(CFolderItem *item)
{
if (!item)
return 0;
@@ -216,7 +217,7 @@ public:
void OnItemsSelChange(CCtrlBase*)
{
- PFolderItem item = GetSelectedItem();
+ CFolderItem *item = GetSelectedItem();
if (item != nullptr) {
CheckForChanges();
LoadItem(item);
@@ -226,7 +227,7 @@ public:
bool OnApply() override
{
- PFolderItem item = GetSelectedItem();
+ CFolderItem *item = GetSelectedItem();
if (item) {
SaveItem(item, FALSE);
LoadItem(item);
diff --git a/plugins/Folders/src/folderItem.cpp b/plugins/Folders/src/folderItem.cpp
index f6b96f153f..3d4c658e17 100644
--- a/plugins/Folders/src/folderItem.cpp
+++ b/plugins/Folders/src/folderItem.cpp
@@ -20,14 +20,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "stdafx.h"
-CFolderItem::CFolderItem(const char *sectionName, const char *name, const wchar_t *format, const wchar_t *userName)
+CFolderItem::CFolderItem(HPLUGIN hPlugin, const char *sectionName, const char *name, const wchar_t *format) :
+ m_hPlugin(hPlugin)
{
m_szSection = mir_strdup(sectionName);
m_szName = mir_strdup(name);
- if (userName)
- m_tszUserName = mir_wstrdup(userName);
- else
- m_tszUserName = mir_a2u(name);
m_tszFormat = nullptr;
m_tszOldFormat = nullptr;
GetDataFromDatabase(format);
@@ -40,7 +37,6 @@ CFolderItem::~CFolderItem()
mir_free(m_szName);
mir_free(m_tszFormat);
mir_free(m_tszOldFormat);
- mir_free(m_tszUserName);
}
void CFolderItem::SetFormat(const wchar_t *newFormat)
@@ -50,19 +46,14 @@ void CFolderItem::SetFormat(const wchar_t *newFormat)
m_tszFormat = mir_wstrdup(*newFormat ? newFormat : MIRANDA_PATHW);
}
-int CFolderItem::IsEqual(const CFolderItem *other)
+bool CFolderItem::IsEqual(const CFolderItem *other)
{
- return (IsEqual(other->GetSection(), other->GetUserName()));
+ return IsEqual(other->GetSection(), other->GetName());
}
-int CFolderItem::IsEqual(const char *section, const wchar_t *name)
+bool CFolderItem::IsEqual(const char *section, const char *name)
{
- return !mir_wstrcmp(m_tszUserName, name) && !mir_strcmp(m_szSection, section);
-}
-
-int CFolderItem::IsEqualTranslated(const char *trSection, const wchar_t *trName)
-{
- return !mir_wstrcmp(TranslateW(m_tszUserName), trName) && !mir_strcmp(Translate(m_szSection), trSection);
+ return !mir_strcmp(m_szName, name) && !mir_strcmp(m_szSection, section);
}
int CFolderItem::operator ==(const CFolderItem *other)
diff --git a/plugins/Folders/src/folderItem.h b/plugins/Folders/src/folderItem.h
index cd35c36637..4f6b92654d 100644
--- a/plugins/Folders/src/folderItem.h
+++ b/plugins/Folders/src/folderItem.h
@@ -31,33 +31,32 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
class CFolderItem
{
+ HPLUGIN m_hPlugin;
char *m_szSection, *m_szName;
- wchar_t *m_tszFormat, *m_tszOldFormat, *m_tszUserName;
+ wchar_t *m_tszFormat, *m_tszOldFormat;
void GetDataFromDatabase(const wchar_t *szNotFound);
void WriteDataToDatabase();
int FolderCreateDirectory(int showFolder = 0);
int FolderDeleteOldDirectory(int showFolder = 0);
+
public:
- CFolderItem(const char *sectionName, const char *name, const wchar_t *format, const wchar_t *userName);
+ CFolderItem(HPLUGIN, const char *sectionName, const char *name, const wchar_t *format);
virtual ~CFolderItem();
CMStringW Expand();
void Save();
- int IsEqual(const CFolderItem *other);
- int IsEqual(const char *section, const wchar_t *name);
- int IsEqualTranslated(const char *trSection, const wchar_t *trName);
+ bool IsEqual(const CFolderItem *other);
+ bool IsEqual(const char *section, const char *name);
int operator ==(const CFolderItem *other);
- __inline const char* GetSection() const { return m_szSection; }
- __inline const char* GetName() const { return m_szName; }
- __inline const wchar_t* GetUserName() const { return m_tszUserName; }
+ __inline HPLUGIN GetPlugin() const { return m_hPlugin; }
+ __inline const char* GetSection() const { return m_szSection; }
+ __inline const char* GetName() const { return m_szName; }
__inline const wchar_t* GetFormat() const { return m_tszFormat; }
void SetFormat(const wchar_t *newFormat);
};
-typedef CFolderItem *PFolderItem;
-
-#endif //M_FOLDERS_FOLDER_ITEM_H \ No newline at end of file
+#endif //M_FOLDERS_FOLDER_ITEM_H
diff --git a/plugins/Folders/src/services.cpp b/plugins/Folders/src/services.cpp
index 3fb2ab07fb..61e598694a 100644
--- a/plugins/Folders/src/services.cpp
+++ b/plugins/Folders/src/services.cpp
@@ -33,14 +33,11 @@ INT_PTR RegisterPathService(WPARAM, LPARAM lParam)
if (data == nullptr)
return NULL;
- if (data->cbSize != sizeof(FOLDERSDATA))
- return NULL;
-
CFolderItem *pNew;
if (data->flags & FF_UNICODE)
- pNew = new CFolderItem(data->szSection, data->szName, data->szFormat.w, data->szUserName.w);
+ pNew = new CFolderItem(data->plugin, data->szSection, data->szName, data->szFormat.w);
else
- pNew = new CFolderItem(data->szSection, data->szName, _A2T(data->szFormat.a), _A2T(data->szUserName.a));
+ pNew = new CFolderItem(data->plugin, data->szSection, data->szName, _A2T(data->szFormat.a));
lstRegisteredFolders.insert(pNew);
return (INT_PTR)pNew;
@@ -64,8 +61,6 @@ INT_PTR GetPathService(WPARAM wParam, LPARAM lParam)
return 1;
FOLDERSGETDATA* data = (FOLDERSGETDATA*)lParam;
- if (data->cbSize != sizeof(FOLDERSGETDATA))
- return 1;
CMStringW buf(p->Expand());
if (data->flags & FF_UNICODE)
diff --git a/plugins/Folders/src/stdafx.cxx b/plugins/Folders/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/Folders/src/stdafx.cxx
+++ b/plugins/Folders/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/Folders/src/stdafx.h b/plugins/Folders/src/stdafx.h
index 1c56ec4f1d..8136929058 100644
--- a/plugins/Folders/src/stdafx.h
+++ b/plugins/Folders/src/stdafx.h
@@ -42,11 +42,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_langpack.h>
#include "version.h"
+#include "folderItem.h"
#include "utils.h"
#include "resource.h"
#include "services.h"
#include "events.h"
-#include "folderItem.h"
#ifndef MS_DB_GETPROFILEPATH_BASIC //db3xSA
#define MS_DB_GETPROFILEPATH_BASIC "DB/GetProfilePathBasic"
diff --git a/plugins/Folders/src/version.h b/plugins/Folders/src/version.h
index 3870428697..9bbb93dc7c 100644
--- a/plugins/Folders/src/version.h
+++ b/plugins/Folders/src/version.h
@@ -1,7 +1,7 @@
#define __MAJOR_VERSION 0
-#define __MINOR_VERSION 2
+#define __MINOR_VERSION 3
#define __RELEASE_NUM 0
-#define __BUILD_NUM 2
+#define __BUILD_NUM 1
#include <stdver.h>
@@ -10,4 +10,4 @@
#define __DESCRIPTION "Allows plugins to save their data to user selected folders; supports variables."
#define __AUTHOR "Cristian Libotean, Miranda NG team"
#define __AUTHORWEB "https://miranda-ng.org/p/Folders"
-#define __COPYRIGHT "© 2005-2012 Cristian Libotean, 2012-24 Miranda NG team"
+#define __COPYRIGHT "© 2005-2012 Cristian Libotean, 2012-25 Miranda NG team"
diff --git a/plugins/HTTPServer/src/stdafx.cpp b/plugins/HTTPServer/src/stdafx.cpp
index b7fd3b3fcd..8e4f5ed22e 100644
--- a/plugins/HTTPServer/src/stdafx.cpp
+++ b/plugins/HTTPServer/src/stdafx.cpp
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/HistoryLinkListPlus/src/linklist_fct.cpp b/plugins/HistoryLinkListPlus/src/linklist_fct.cpp
index e413ea1fe3..7b29de550a 100644
--- a/plugins/HistoryLinkListPlus/src/linklist_fct.cpp
+++ b/plugins/HistoryLinkListPlus/src/linklist_fct.cpp
@@ -147,7 +147,7 @@ int ExtractURI(DBEVENTINFO *dbei, MEVENT hEvent, LISTELEMENT *listStart)
wcsncpy_s(link, word, LINK_MAX);
}
- TimeZone_ToStringW(dbei->timestamp, L"d-t", dbdate, _countof(dbdate));
+ TimeZone_ToStringW(dbei->getUnixtime(), L"d-t", dbdate, _countof(dbdate));
date_ptr = wcstok_s(dbdate, L"-", &tok_ctx);
time_ptr = wcstok_s(nullptr, L"-", &tok_ctx);
wcsncpy_s(date, date_ptr, _TRUNCATE);
diff --git a/plugins/HistoryLinkListPlus/src/stdafx.cxx b/plugins/HistoryLinkListPlus/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/HistoryLinkListPlus/src/stdafx.cxx
+++ b/plugins/HistoryLinkListPlus/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/HistoryPlusPlus/hpp_events.pas b/plugins/HistoryPlusPlus/hpp_events.pas
index f1ca2ddf0b..2436cff13a 100644
--- a/plugins/HistoryPlusPlus/hpp_events.pas
+++ b/plugins/HistoryPlusPlus/hpp_events.pas
@@ -209,7 +209,7 @@ begin
begin
ZeroMemory(@RecentEventInfo, SizeOf(RecentEventInfo));
RecentEventInfo.cbBlob := 0;
- db_event_get(hDBEvent, @RecentEventInfo);
+ my_event_get(hDBEvent, @RecentEventInfo);
RecentEvent := hDBEvent;
end;
Result := RecentEventInfo.timestamp;
@@ -223,7 +223,7 @@ begin
begin
ZeroMemory(@RecentEventInfo, SizeOf(RecentEventInfo));
RecentEventInfo.cbBlob := 0;
- db_event_get(hDBEvent, @RecentEventInfo);
+ my_event_get(hDBEvent, @RecentEventInfo);
RecentEvent := hDBEvent;
end;
Result := GetMessageType(RecentEventInfo,EventIndex);
@@ -393,7 +393,7 @@ begin
BlobSize := 0;
Result.cbBlob := BlobSize;
- if db_event_get(hDBEvent, @Result) = 0 then
+ if my_event_get(hDBEvent, @Result) = 0 then
begin
Result.cbBlob := BlobSize;
if BlobSize > 0 then
@@ -423,7 +423,7 @@ begin
dbei.cbBlob := BlobSize;
dbei.pBlob := Result.pBlob;
- if db_event_get(hDBEvent, @dbei) = 0 then
+ if my_event_get(hDBEvent, @dbei) = 0 then
begin
Result.cbBlob := BlobSize;
if BlobSize > 0 then
diff --git a/plugins/HistoryPlusPlus/hpp_global.pas b/plugins/HistoryPlusPlus/hpp_global.pas
index 6af8367813..018e233b3f 100644
--- a/plugins/HistoryPlusPlus/hpp_global.pas
+++ b/plugins/HistoryPlusPlus/hpp_global.pas
@@ -293,6 +293,8 @@ procedure OpenUrl(const URLText: String; NewWindow: Boolean);
function HppMessageBox(Handle: THandle; const Text: String; const Caption: String; Flags: Integer): Integer;
+function my_event_get(hDbEvent:TMEVENT; dbei:PDBEVENTINFO):int;
+
function MakeTextXMLedA(const Text: AnsiString): AnsiString;
function MakeTextXMLedW(const Text: WideString): WideString;
function FormatCString(const Text: WideString): WideString;
@@ -708,6 +710,15 @@ begin
or (Pos(RTF_BEGIN_2, Value) = 1);
end;
+function my_event_get(hDbEvent:TMEVENT; dbei:PDBEVENTINFO):int;
+begin
+ Result := db_event_get(hDbEvent, dbei);
+ if Result = 0 then begin
+ if (dbei.flags and DBEF_MSEC) <> 0 then
+ dbei.Timestamp := Trunc(dbei.Timestamp / 1000);
+ end;
+end;
+
function _WideCharType(WC: WideChar; dwInfoType: Cardinal): Word;
begin
Win32Check(GetStringTypeExW(GetThreadLocale, dwInfoType, PWideChar(@WC), 1, Result))
diff --git a/plugins/HistoryPlusPlus/hpp_sessionsthread.pas b/plugins/HistoryPlusPlus/hpp_sessionsthread.pas
index 5a57ca9cb4..9a1f4924db 100644
--- a/plugins/HistoryPlusPlus/hpp_sessionsthread.pas
+++ b/plugins/HistoryPlusPlus/hpp_sessionsthread.pas
@@ -180,7 +180,7 @@ begin
begin
ZeroMemory(@Event, SizeOf(Event));
Event.cbBlob := 0;
- db_event_get(hDBEvent, @Event);
+ my_event_get(hDBEvent, @Event);
CurTime := Event.Timestamp;
if PrevTime = 0 then
begin
diff --git a/plugins/HistoryStats/src/mirandacontact.cpp b/plugins/HistoryStats/src/mirandacontact.cpp
index f0e20dcc76..cd666d9419 100644
--- a/plugins/HistoryStats/src/mirandacontact.cpp
+++ b/plugins/HistoryStats/src/mirandacontact.cpp
@@ -162,14 +162,14 @@ void MirandaContactTolerantMerge::fillQueue()
// assume that items with +/- 30 seconds may be equal
static const int timestampTol = 30;
- while (!m_CIs.empty() && (m_EIs.size() < 2 || (m_EIs.back().dbe.timestamp - m_EIs.front().dbe.timestamp) <= timestampTol)) {
+ while (!m_CIs.empty() && (m_EIs.size() < 2 || (m_EIs.back().dbe.getUnixtime() - m_EIs.front().dbe.getUnixtime()) <= timestampTol)) {
// find oldest next event in chains
int nNext = 0;
- uint32_t timestampFirst = m_CIs.front().ei.dbe.timestamp;
+ uint32_t timestampFirst = m_CIs.front().ei.dbe.getUnixtime();
for (int i = 1; i < m_CIs.size(); ++i) {
- if (m_CIs[i].ei.dbe.timestamp < timestampFirst) {
- timestampFirst = m_CIs[i].ei.dbe.timestamp;
+ if (m_CIs[i].ei.dbe.getUnixtime() < timestampFirst) {
+ timestampFirst = m_CIs[i].ei.dbe.getUnixtime();
nNext = i;
}
}
@@ -183,7 +183,7 @@ void MirandaContactTolerantMerge::fillQueue()
iter_each_(std::list<EventInfo>, j, m_EIs)
{
EventInfo& j_ei = *j;
- int timestampDelta = j_ei.dbe.timestamp - ci.ei.dbe.timestamp;
+ int timestampDelta = j_ei.dbe.getUnixtime() - ci.ei.dbe.getUnixtime();
if (timestampDelta > 0) {
insPos = j;
@@ -227,14 +227,14 @@ void MirandaContactStrictMerge::fillQueue()
// assume that items with +/- 30 seconds may be equal
static const int timestampTol = 0;
- while (!m_CIs.empty() && (m_EIs.size() < 2 || (m_EIs.back().dbe.timestamp - m_EIs.front().dbe.timestamp) <= timestampTol)) {
+ while (!m_CIs.empty() && (m_EIs.size() < 2 || (m_EIs.back().dbe.getUnixtime() - m_EIs.front().dbe.getUnixtime()) <= timestampTol)) {
// find oldest next event in chains
int nNext = 0;
- uint32_t timestampFirst = m_CIs.front().ei.dbe.timestamp;
+ uint32_t timestampFirst = m_CIs.front().ei.dbe.getUnixtime();
for (int i = 1; i < m_CIs.size(); ++i) {
- if (m_CIs[i].ei.dbe.timestamp < timestampFirst) {
- timestampFirst = m_CIs[i].ei.dbe.timestamp;
+ if (m_CIs[i].ei.dbe.getUnixtime() < timestampFirst) {
+ timestampFirst = m_CIs[i].ei.dbe.getUnixtime();
nNext = i;
}
}
@@ -248,7 +248,7 @@ void MirandaContactStrictMerge::fillQueue()
iter_each_(std::list<EventInfo>, j, m_EIs)
{
EventInfo& j_ei = *j;
- int timestampDelta = j_ei.dbe.timestamp - ci.ei.dbe.timestamp;
+ int timestampDelta = j_ei.dbe.getUnixtime() - ci.ei.dbe.getUnixtime();
if (timestampDelta > 0)
insPos = j;
@@ -291,11 +291,11 @@ void MirandaContactNoMerge::fillQueue()
while (!m_CIs.empty() && m_EIs.size() < 1) {
// find oldest next event in chains
int nNext = 0;
- uint32_t timestampFirst = m_CIs.front().ei.dbe.timestamp;
+ uint32_t timestampFirst = m_CIs.front().ei.dbe.getUnixtime();
for (int i = 1; i < m_CIs.size(); ++i) {
- if (m_CIs[i].ei.dbe.timestamp < timestampFirst) {
- timestampFirst = m_CIs[i].ei.dbe.timestamp;
+ if (m_CIs[i].ei.dbe.getUnixtime() < timestampFirst) {
+ timestampFirst = m_CIs[i].ei.dbe.getUnixtime();
nNext = i;
}
}
diff --git a/plugins/HistoryStats/src/statistic.cpp b/plugins/HistoryStats/src/statistic.cpp
index 37da089c20..f3cbb0a4d9 100644
--- a/plugins/HistoryStats/src/statistic.cpp
+++ b/plugins/HistoryStats/src/statistic.cpp
@@ -407,7 +407,7 @@ bool Statistic::stepReadDB()
// filter logged status messages from tabSRMM
if (dbei.eventType == etMessage) {
// convert to local time (everything in this plugin is done in local time)
- uint32_t localTimestamp = TimeZone_ToLocal(dbei.timestamp);
+ uint32_t localTimestamp = TimeZone_ToLocal(dbei.getUnixtime());
if (localTimestamp >= m_TimeMin && localTimestamp <= m_TimeMax) {
if (dbei.flags & DBEF_UTF) {
diff --git a/plugins/HistoryStats/src/stdafx.cxx b/plugins/HistoryStats/src/stdafx.cxx
index 87b7477097..72e87c2758 100644
--- a/plugins/HistoryStats/src/stdafx.cxx
+++ b/plugins/HistoryStats/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/HistorySweeperLight/src/historysweeperlight.cpp b/plugins/HistorySweeperLight/src/historysweeperlight.cpp
index 5ed98ea385..e9fedbc0e2 100644
--- a/plugins/HistorySweeperLight/src/historysweeperlight.cpp
+++ b/plugins/HistorySweeperLight/src/historysweeperlight.cpp
@@ -160,7 +160,7 @@ void SweepHistoryFromContact(MCONTACT hContact, CriteriaStruct Criteria, BOOL ke
// should we stop processing?
// lPolicy == 1 - for time criterion, lPolicy == 2 - keep N last events, lPolicy == 3 - delete all events
- if ((lPolicy == 1 && (unsigned)Criteria.time < dbei.timestamp) || (lPolicy == 2 && Criteria.keep > --eventsCnt)) break;
+ if ((lPolicy == 1 && (unsigned)Criteria.time < dbei.getUnixtime()) || (lPolicy == 2 && Criteria.keep > --eventsCnt)) break;
bool doDelete = true;
if (!(dbei.flags & (DBEF_SENT | DBEF_READ)) && keepUnread)
@@ -169,7 +169,7 @@ void SweepHistoryFromContact(MCONTACT hContact, CriteriaStruct Criteria, BOOL ke
if (bookcnt != 0) { // keep bookmarks
ev.hDBEvent = hDBEvent;
item = (BEventData*)bsearch(&ev, books, bookcnt, sizeof(BEventData), CompareBookmarks);
- if (item != nullptr && item->Timestamp == dbei.timestamp) {
+ if (item != nullptr && item->Timestamp == dbei.getUnixtime()) {
doDelete = FALSE;
btshift = (--bookcnt - (item - books)) * sizeof(BEventData);
if (btshift)
diff --git a/plugins/HistorySweeperLight/src/stdafx.cxx b/plugins/HistorySweeperLight/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/HistorySweeperLight/src/stdafx.cxx
+++ b/plugins/HistorySweeperLight/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/HwHotKeys/src/stdafx.cxx b/plugins/HwHotKeys/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/HwHotKeys/src/stdafx.cxx
+++ b/plugins/HwHotKeys/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/HwHotKeys/src/version.h b/plugins/HwHotKeys/src/version.h
index b94e7098b8..3ad56d2adc 100644
--- a/plugins/HwHotKeys/src/version.h
+++ b/plugins/HwHotKeys/src/version.h
@@ -33,5 +33,5 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 - 1307, USA.
#define __DESCRIPTION "Allows you to assign expanded multimedia keys (only for PS/2 keyboards)." // описание плагина в миранде (локализуемое)
#define __AUTHOR "Eugene f2065" // описание плагина в миранде
#define __AUTHORWEB "http://f2065.narod.ru/" // описание плагина в dll-fileinfo "CompanyName", описание плагина в миранде
-#define __COPYRIGHT "© 2010-24 Eugene f2065" // описание плагина в dll-fileinfo "LegalCopyright", описание плагина в миранде
+#define __COPYRIGHT "© 2010-25 Eugene f2065" // описание плагина в dll-fileinfo "LegalCopyright", описание плагина в миранде
diff --git a/plugins/IEHistory/src/dlgHandlers.cpp b/plugins/IEHistory/src/dlgHandlers.cpp
index 967444332f..72c6436484 100644
--- a/plugins/IEHistory/src/dlgHandlers.cpp
+++ b/plugins/IEHistory/src/dlgHandlers.cpp
@@ -131,7 +131,7 @@ void FillIEViewInfo(IEVIEWEVENTDATA *fillData, DBEVENTINFO dbInfo, uint8_t *blob
fillData->szNick.a = "<nick here>";
fillData->bIsMe = (dbInfo.flags & DBEF_SENT);
fillData->dwFlags = (dbInfo.flags & DBEF_SENT) ? IEEDF_SENT : 0;
- fillData->time = dbInfo.timestamp;
+ fillData->time = dbInfo.getUnixtime();
int len = (int)mir_strlen((char *)blob) + 1;
uint8_t *pos;
diff --git a/plugins/IEHistory/src/utils.cpp b/plugins/IEHistory/src/utils.cpp
index 8508918230..2463286b49 100644
--- a/plugins/IEHistory/src/utils.cpp
+++ b/plugins/IEHistory/src/utils.cpp
@@ -142,8 +142,7 @@ SearchResult SearchHistory(MCONTACT contact, MEVENT hFirstEvent, void *searchDat
case SEARCH_TEXT:
{
ptrW data(DbEvent_GetText(&dbEvent));
- wchar_t *tmp = wcsstr(data, (wchar_t *)searchData);
- if (tmp)
+ if (data && wcsstr(data, (wchar_t *)searchData))
found = true;
}
break;
@@ -152,7 +151,7 @@ SearchResult SearchHistory(MCONTACT contact, MEVENT hFirstEvent, void *searchDat
{
SYSTEMTIME time;
TimeSearchData *data = (TimeSearchData *)searchData;
- UnixTimeToSystemTime((time_t)dbEvent.timestamp, &time);
+ UnixTimeToSystemTime(dbEvent.getUnixtime(), &time);
found = ((data->flags & TSDF_DATE_SET) || (data->flags & TSDF_TIME_SET)) ? true : false;
if (data->flags & TSDF_DATE_SET)
found = ((time.wYear == data->time.wYear) && (time.wMonth == data->time.wMonth) && (time.wDay == data->time.wDay));
diff --git a/plugins/IEHistory/src/version.h b/plugins/IEHistory/src/version.h
index fa5404fded..9e5c9a541c 100644
--- a/plugins/IEHistory/src/version.h
+++ b/plugins/IEHistory/src/version.h
@@ -32,7 +32,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define __PLUGIN_NAME "IE History"
#define __FILENAME "IEHistory.dll"
#define __AUTHOR "Cristian Libotean, Miranda NG team"
-#define __COPYRIGHT "© 2006 Cristian Libotean, 2014-24 Miranda NG team"
+#define __COPYRIGHT "© 2006 Cristian Libotean, 2014-25 Miranda NG team"
#define __AUTHORWEB "https://miranda-ng.org/p/IEHistory"
#define __PLUGIN_DISPLAY_NAME "IEView history viewer"
diff --git a/plugins/IEView/src/HTMLBuilder.cpp b/plugins/IEView/src/HTMLBuilder.cpp
index 802998a5cb..30882781f7 100644
--- a/plugins/IEView/src/HTMLBuilder.cpp
+++ b/plugins/IEView/src/HTMLBuilder.cpp
@@ -214,13 +214,13 @@ void HTMLBuilder::appendEventOld(IEView *view, IEVIEWEVENT *event)
IEVIEWEVENTDATA *eventData = new IEVIEWEVENTDATA;
eventData->dwFlags = IEEDF_UNICODE_TEXT | IEEDF_UNICODE_NICK |
- (dbei.flags & DBEF_READ ? IEEDF_READ : 0) | (dbei.flags & DBEF_SENT ? IEEDF_SENT : 0) | (dbei.flags & DBEF_RTL ? IEEDF_RTL : 0);
+ (dbei.bRead ? IEEDF_READ : 0) | (dbei.bSent ? IEEDF_SENT : 0) | (dbei.bRtl ? IEEDF_RTL : 0);
if (event->dwFlags & IEEF_RTL)
eventData->dwFlags |= IEEDF_RTL;
- eventData->time = dbei.timestamp;
+ eventData->time = dbei.getUnixtime();
eventData->szNick.a = eventData->szText.a = nullptr;
- if (dbei.flags & DBEF_SENT) {
+ if (dbei.bSent) {
eventData->szNick.w = getContactName(NULL, szProto);
eventData->bIsMe = TRUE;
}
diff --git a/plugins/IEView/src/stdafx.cxx b/plugins/IEView/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/IEView/src/stdafx.cxx
+++ b/plugins/IEView/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/IgnoreState/src/stdafx.cxx b/plugins/IgnoreState/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/IgnoreState/src/stdafx.cxx
+++ b/plugins/IgnoreState/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/Import/src/dbrw/dbcontacts.cpp b/plugins/Import/src/dbrw/dbcontacts.cpp
index 5be8a12f7a..e4533253ff 100644
--- a/plugins/Import/src/dbrw/dbcontacts.cpp
+++ b/plugins/Import/src/dbrw/dbcontacts.cpp
@@ -2,7 +2,7 @@
Import plugin for Miranda NG
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/Import/src/dbrw/dbevents.cpp b/plugins/Import/src/dbrw/dbevents.cpp
index 1d486bd21b..86eccc1712 100644
--- a/plugins/Import/src/dbrw/dbevents.cpp
+++ b/plugins/Import/src/dbrw/dbevents.cpp
@@ -2,7 +2,7 @@
Import plugin for Miranda NG
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -80,7 +80,7 @@ STDMETHODIMP_(BOOL) CDbxSQLite::GetEvent(MEVENT hDbEvent, DBEVENTINFO *dbei)
if (sql_step(stmt) == SQLITE_ROW) {
const void *blob = sqlite3_column_blob(stmt, 4);
- dbei->timestamp = (uint32_t)sqlite3_column_int(stmt, 1);
+ dbei->iTimestamp = sqlite3_column_int64(stmt, 1);
dbei->flags = (uint32_t)sqlite3_column_int(stmt, 2);
dbei->eventType = (uint16_t)sqlite3_column_int(stmt, 3);
dbei->szModule = mir_strdup((char*)sqlite3_column_text(stmt, 7));
diff --git a/plugins/Import/src/dbrw/dbintf.cpp b/plugins/Import/src/dbrw/dbintf.cpp
index e132186e11..c95d18a3ce 100644
--- a/plugins/Import/src/dbrw/dbintf.cpp
+++ b/plugins/Import/src/dbrw/dbintf.cpp
@@ -2,7 +2,7 @@
Import plugin for Miranda NG
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/Import/src/dbrw/dbintf.h b/plugins/Import/src/dbrw/dbintf.h
index bffeed578e..687f1fc13b 100644
--- a/plugins/Import/src/dbrw/dbintf.h
+++ b/plugins/Import/src/dbrw/dbintf.h
@@ -2,7 +2,7 @@
Import plugin for Miranda NG
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/Import/src/dbrw/dbrw.cpp b/plugins/Import/src/dbrw/dbrw.cpp
index 78a9f5697c..f3d2289c15 100644
--- a/plugins/Import/src/dbrw/dbrw.cpp
+++ b/plugins/Import/src/dbrw/dbrw.cpp
@@ -2,7 +2,7 @@
Import plugin for Miranda NG
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/Import/src/dbrw/dbrw.h b/plugins/Import/src/dbrw/dbrw.h
index 37c5fe09fa..4890f1e907 100644
--- a/plugins/Import/src/dbrw/dbrw.h
+++ b/plugins/Import/src/dbrw/dbrw.h
@@ -2,7 +2,7 @@
Import plugin for Miranda NG
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/Import/src/dbrw/dbsettings.cpp b/plugins/Import/src/dbrw/dbsettings.cpp
index 1e16db23d9..7e94dc66d2 100644
--- a/plugins/Import/src/dbrw/dbsettings.cpp
+++ b/plugins/Import/src/dbrw/dbsettings.cpp
@@ -2,7 +2,7 @@
Import plugin for Miranda NG
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/Import/src/dbrw/dbsql.cpp b/plugins/Import/src/dbrw/dbsql.cpp
index 03d569cbcb..9aa028d933 100644
--- a/plugins/Import/src/dbrw/dbsql.cpp
+++ b/plugins/Import/src/dbrw/dbsql.cpp
@@ -2,7 +2,7 @@
Import plugin for Miranda NG
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/Import/src/import.cpp b/plugins/Import/src/import.cpp
index e40546ba57..3ab25a43f6 100644
--- a/plugins/Import/src/import.cpp
+++ b/plugins/Import/src/import.cpp
@@ -2,7 +2,7 @@
Import plugin for Miranda NG
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -867,9 +867,7 @@ void CImportBatch::ImportHistory(MCONTACT hContact, PROTOACCOUNT **protocol, int
// custom filtering
if (!bSkipThis) {
- bool bIsSent = (dbei.flags & DBEF_SENT) != 0;
-
- if (dbei.timestamp < (uint32_t)m_dwSinceDate)
+ if (dbei.getUnixtime() < (uint32_t)m_dwSinceDate)
bSkipThis = true;
if (!bSkipThis) {
@@ -877,15 +875,15 @@ void CImportBatch::ImportHistory(MCONTACT hContact, PROTOACCOUNT **protocol, int
bSkipThis = 1;
switch (dbei.eventType) {
case EVENTTYPE_MESSAGE:
- if ((bIsSent ? IOPT_MSGSENT : IOPT_MSGRECV) & m_iOptions)
+ if ((dbei.bSent ? IOPT_MSGSENT : IOPT_MSGRECV) & m_iOptions)
bSkipThis = false;
break;
case EVENTTYPE_FILE:
- if ((bIsSent ? IOPT_FILESENT : IOPT_FILERECV) & m_iOptions)
+ if ((dbei.bSent ? IOPT_FILESENT : IOPT_FILERECV) & m_iOptions)
bSkipThis = false;
break;
default:
- if ((bIsSent ? IOPT_OTHERSENT : IOPT_OTHERRECV) & m_iOptions)
+ if ((dbei.bSent ? IOPT_OTHERSENT : IOPT_OTHERRECV) & m_iOptions)
bSkipThis = false;
break;
}
diff --git a/plugins/Import/src/main.cpp b/plugins/Import/src/main.cpp
index 8426b289ff..99dd624686 100644
--- a/plugins/Import/src/main.cpp
+++ b/plugins/Import/src/main.cpp
@@ -2,7 +2,7 @@
Import plugin for Miranda NG
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/Import/src/mcontacts.cpp b/plugins/Import/src/mcontacts.cpp
index 8f09c0feb0..db0a673f67 100644
--- a/plugins/Import/src/mcontacts.cpp
+++ b/plugins/Import/src/mcontacts.cpp
@@ -2,7 +2,7 @@
Import plugin for Miranda NG
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -212,7 +212,7 @@ public:
dbei->eventType = hdr.eventType;
cbLen = hdr.cbBlob;
dbei->flags = hdr.flags;
- dbei->timestamp = hdr.timestamp;
+ dbei->iTimestamp = hdr.timestamp;
}
else if (dwSize == sizeof(MC_MsgHeader64)) {
MC_MsgHeader64 hdr;
@@ -223,7 +223,7 @@ public:
dbei->eventType = hdr.eventType;
cbLen = hdr.cbBlob;
dbei->flags = hdr.flags;
- dbei->timestamp = hdr.timestamp;
+ dbei->iTimestamp = hdr.timestamp;
}
else return 1;
diff --git a/plugins/Import/src/miranda.cpp b/plugins/Import/src/miranda.cpp
index 2faf0e03a7..7f054f8510 100644
--- a/plugins/Import/src/miranda.cpp
+++ b/plugins/Import/src/miranda.cpp
@@ -2,7 +2,7 @@
Import plugin for Miranda NG
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/Import/src/patterns.cpp b/plugins/Import/src/patterns.cpp
index 11008bd03e..c64cbad570 100644
--- a/plugins/Import/src/patterns.cpp
+++ b/plugins/Import/src/patterns.cpp
@@ -2,7 +2,7 @@
Import plugin for Miranda NG
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -564,8 +564,8 @@ public:
dbei->flags = DBEF_READ | DBEF_UTF;
if (pMsg[0x1A] != 0)
dbei->flags |= DBEF_SENT;
- dbei->timestamp = RLInteger(&pMsg[0x12]);
- dbei->timestamp -= TimeZone_ToLocal(dbei->timestamp) - dbei->timestamp; // deduct time zone offset from timestamp
+ dbei->iTimestamp = RLInteger(&pMsg[0x12]);
+ dbei->iTimestamp -= TimeZone_ToLocal(dbei->getUnixtime()) - dbei->getUnixtime(); // deduct time zone offset from timestamp
dbei->cbBlob = RLWord(&pMsg[m_iMsgHeaderSize - 2]);
dbei->pBlob = (char *)mir_alloc(dbei->cbBlob + 1);
memcpy(dbei->pBlob, pMsg + m_iMsgHeaderSize, dbei->cbBlob);
@@ -631,7 +631,7 @@ public:
st.tm_hour = str2int(substrings[pPattern->iHours]);
st.tm_min = str2int(substrings[pPattern->iMinutes]);
st.tm_sec = (pPattern->iSeconds) ? str2int(substrings[pPattern->iSeconds]) : 0;
- dbei->timestamp = mktime(&st);
+ dbei->iTimestamp = mktime(&st);
if (pPattern->iDirection)
if (pPattern->wszOutgoing == substrings[pPattern->iDirection])
diff --git a/plugins/Import/src/progress.cpp b/plugins/Import/src/progress.cpp
index eabdf13594..c62e091cbf 100644
--- a/plugins/Import/src/progress.cpp
+++ b/plugins/Import/src/progress.cpp
@@ -2,7 +2,7 @@
Import plugin for Miranda NG
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/Import/src/stdafx.cxx b/plugins/Import/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/Import/src/stdafx.cxx
+++ b/plugins/Import/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/Import/src/stdafx.h b/plugins/Import/src/stdafx.h
index 97571a11ac..932a2c2331 100644
--- a/plugins/Import/src/stdafx.h
+++ b/plugins/Import/src/stdafx.h
@@ -2,7 +2,7 @@
Import plugin for Miranda NG
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/Import/src/textjson.cpp b/plugins/Import/src/textjson.cpp
index 19e2d3aee7..c78e031099 100644
--- a/plugins/Import/src/textjson.cpp
+++ b/plugins/Import/src/textjson.cpp
@@ -2,7 +2,7 @@
Import plugin for Miranda NG
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -112,7 +112,7 @@ public:
auto &node = *pNode;
dbei->eventType = node["type"].as_int();
- dbei->timestamp = 0;
+ dbei->iTimestamp = 0;
std::string szTime = node["time"].as_string();
if (!szTime.empty()) {
char c;
@@ -123,7 +123,7 @@ public:
st.tm_year -= 1900;
time_t tm = mktime(&st);
if (tm != -1)
- dbei->timestamp = tm;
+ dbei->iTimestamp = tm;
}
}
else {
@@ -136,13 +136,13 @@ public:
st.tm_year -= 1900;
time_t tm = _mkgmtime(&st);
if (tm != -1)
- dbei->timestamp = tm;
+ dbei->iTimestamp = tm;
}
}
}
- if (dbei->timestamp == 0)
- dbei->timestamp = node["timeStamp"].as_int();
+ if (dbei->iTimestamp == 0)
+ dbei->iTimestamp = node["timeStamp"].as_int();
dbei->flags = 0;
std::string szFlags = node["flags"].as_string();
@@ -343,16 +343,16 @@ public:
if (mir_strcmp(dbei.szModule, szProto))
pRoot.push_back(JSONNode("module", dbei.szModule));
- pRoot.push_back(JSONNode("timestamp", dbei.timestamp));
+ pRoot.push_back(JSONNode("timestamp", dbei.getUnixtime()));
wchar_t szTemp[500];
- TimeZone_PrintTimeStamp(UTC_TIME_HANDLE, dbei.timestamp, L"I", szTemp, _countof(szTemp), 0);
+ TimeZone_PrintTimeStamp(UTC_TIME_HANDLE, dbei.getUnixtime(), L"I", szTemp, _countof(szTemp), 0);
pRoot.push_back(JSONNode("isotime", T2Utf(szTemp).get()));
std::string flags;
- if (dbei.flags & DBEF_SENT)
+ if (dbei.bSent)
flags += "m";
- if (dbei.flags & DBEF_READ)
+ if (dbei.bRead)
flags += "r";
pRoot.push_back(JSONNode("flags", flags));
diff --git a/plugins/Import/src/ui.cpp b/plugins/Import/src/ui.cpp
index 393dcd12a9..52a000adf5 100644
--- a/plugins/Import/src/ui.cpp
+++ b/plugins/Import/src/ui.cpp
@@ -2,7 +2,7 @@
Import plugin for Miranda NG
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/Import/src/utils.cpp b/plugins/Import/src/utils.cpp
index 6714bc65f5..43ed526c30 100644
--- a/plugins/Import/src/utils.cpp
+++ b/plugins/Import/src/utils.cpp
@@ -2,7 +2,7 @@
Import plugin for Miranda NG
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/Import/src/version.h b/plugins/Import/src/version.h
index c273ebfc34..242917ca2f 100644
--- a/plugins/Import/src/version.h
+++ b/plugins/Import/src/version.h
@@ -10,4 +10,4 @@
#define __DESCRIPTION "Imports contacts and messages from another Miranda profile or from an external program."
#define __AUTHOR "Miranda team"
#define __AUTHORWEB "https://miranda-ng.org/p/Import"
-#define __COPYRIGHT "© 2012-24 George Hazan"
+#define __COPYRIGHT "© 2012-25 George Hazan"
diff --git a/plugins/Import/src/wizard.cpp b/plugins/Import/src/wizard.cpp
index ec165d952a..2379dfdebc 100644
--- a/plugins/Import/src/wizard.cpp
+++ b/plugins/Import/src/wizard.cpp
@@ -2,7 +2,7 @@
Import plugin for Miranda NG
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/Jingle/src/account.cpp b/plugins/Jingle/src/account.cpp
index ecdfb01152..7a3ac68481 100644
--- a/plugins/Jingle/src/account.cpp
+++ b/plugins/Jingle/src/account.cpp
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -130,7 +130,7 @@ static BOOL OnProcessJingle(struct IJabberInterface *api, const TiXmlElement *no
// Save this event to history
DB::EventInfo dbei;
- dbei.timestamp = (uint32_t)time(0);
+ dbei.iTimestamp = (uint32_t)time(0);
dbei.pBlob = "** A call while we were busy **";
ProtoChainRecvMsg(api->ContactFromJID(from), dbei);
reason = "busy";
diff --git a/plugins/Jingle/src/options.cpp b/plugins/Jingle/src/options.cpp
index 36c68d1035..ccf84e64d5 100644
--- a/plugins/Jingle/src/options.cpp
+++ b/plugins/Jingle/src/options.cpp
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/Jingle/src/stdafx.cxx b/plugins/Jingle/src/stdafx.cxx
index a94797924a..4a1e1f0e70 100644
--- a/plugins/Jingle/src/stdafx.cxx
+++ b/plugins/Jingle/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/Jingle/src/version.h b/plugins/Jingle/src/version.h
index 50692568fa..76913e1c19 100644
--- a/plugins/Jingle/src/version.h
+++ b/plugins/Jingle/src/version.h
@@ -10,4 +10,4 @@
#define __DESCRIPTION "Jingle support for Jabber protocol."
#define __AUTHOR "George Hazan"
#define __AUTHORWEB "https://miranda-ng.org/p/Jingle"
-#define __COPYRIGHT "© 2023-24 George Hazan"
+#define __COPYRIGHT "© 2023-25 George Hazan"
diff --git a/plugins/KeyboardNotify/src/main.cpp b/plugins/KeyboardNotify/src/main.cpp
index f4c1ac3e61..ff8cf7c196 100644
--- a/plugins/KeyboardNotify/src/main.cpp
+++ b/plugins/KeyboardNotify/src/main.cpp
@@ -334,7 +334,7 @@ BOOL checkMsgTimestamp(MCONTACT hContact, MEVENT hEventCurrent, uint32_t timesta
for (MEVENT hEvent = db_event_prev(hContact, hEventCurrent); hEvent; hEvent = db_event_prev(hContact, hEvent)) {
DBEVENTINFO einfo = {};
if (!db_event_get(hEvent, &einfo)) {
- if ((einfo.timestamp + wSecondsOlder) <= timestampCurrent)
+ if ((einfo.getUnixtime() + wSecondsOlder) <= timestampCurrent)
return TRUE;
if (einfo.eventType == EVENTTYPE_MESSAGE)
return FALSE;
@@ -396,7 +396,7 @@ static int PluginMessageEventHook(WPARAM hContact, LPARAM hEvent)
//get DBEVENTINFO without pBlob
DBEVENTINFO einfo = {};
if (!db_event_get(hEvent, &einfo) && !(einfo.flags & DBEF_SENT))
- if ((einfo.eventType == EVENTTYPE_MESSAGE && bFlashOnMsg && checkOpenWindow(hContact) && checkMsgTimestamp(hContact, hEvent, einfo.timestamp)) ||
+ if ((einfo.eventType == EVENTTYPE_MESSAGE && bFlashOnMsg && checkOpenWindow(hContact) && checkMsgTimestamp(hContact, hEvent, einfo.getUnixtime())) ||
(einfo.eventType == EVENTTYPE_FILE && bFlashOnFile) ||
(einfo.eventType != EVENTTYPE_MESSAGE && einfo.eventType != EVENTTYPE_FILE && bFlashOnOther)) {
diff --git a/plugins/KeyboardNotify/src/stdafx.cxx b/plugins/KeyboardNotify/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/KeyboardNotify/src/stdafx.cxx
+++ b/plugins/KeyboardNotify/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/ListeningTo/src/stdafx.cxx b/plugins/ListeningTo/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/ListeningTo/src/stdafx.cxx
+++ b/plugins/ListeningTo/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/MagneticWindows/src/Version.h b/plugins/MagneticWindows/src/Version.h
index 00452aa099..77b11eb616 100644
--- a/plugins/MagneticWindows/src/Version.h
+++ b/plugins/MagneticWindows/src/Version.h
@@ -10,4 +10,4 @@
#define __DESCRIPTION "Makes the contact list and the chat windows snapping to the desktop border and to each other."
#define __AUTHOR "Michael Kunz"
#define __AUTHORWEB "https://miranda-ng.org/p/MagneticWindows"
-#define __COPYRIGHT " 2006 Michael Kunz, 2018-24 Miranda NG team"
+#define __COPYRIGHT " 2006 Michael Kunz, 2018-25 Miranda NG team"
diff --git a/plugins/MagneticWindows/src/stdafx.cxx b/plugins/MagneticWindows/src/stdafx.cxx
index 15bb8b0fa5..03c2c07476 100644
--- a/plugins/MagneticWindows/src/stdafx.cxx
+++ b/plugins/MagneticWindows/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG project (http://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG project (http://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/MenuItemEx/src/stdafx.cxx b/plugins/MenuItemEx/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/MenuItemEx/src/stdafx.cxx
+++ b/plugins/MenuItemEx/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/MessageState/src/messagestate.cpp b/plugins/MessageState/src/messagestate.cpp
index 2dbe670043..40d1d867ad 100644
--- a/plugins/MessageState/src/messagestate.cpp
+++ b/plugins/MessageState/src/messagestate.cpp
@@ -86,7 +86,7 @@ static int OnEventDelivered(WPARAM hContact, LPARAM)
static int OnEventFilterAdd(WPARAM hContact, LPARAM lParam)
{
DBEVENTINFO *dbei = (DBEVENTINFO *)lParam;
- if ((dbei->flags & DBEF_SENT) && CheckProtoSupport(dbei->szModule)) {
+ if (dbei->bSent && CheckProtoSupport(dbei->szModule)) {
time_t dwTime = time(0);
FindContact(hContact)->setSent(dwTime);
if (db_mc_isSub(hContact))
diff --git a/plugins/MessageState/src/stdafx.cxx b/plugins/MessageState/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/MessageState/src/stdafx.cxx
+++ b/plugins/MessageState/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/MessageState/src/version.h b/plugins/MessageState/src/version.h
index ba2ed74e1f..d0cd14a0dc 100644
--- a/plugins/MessageState/src/version.h
+++ b/plugins/MessageState/src/version.h
@@ -10,4 +10,4 @@
#define __DESCRIPTION "Displays icons in message window showing whether your last outgoing message was read / is still unread."
#define __AUTHOR "MikalaiR"
#define __AUTHORWEB "https://miranda-ng.org/p/MessageState"
-#define __COPYRIGHT "© 2015-24 Miranda NG team"
+#define __COPYRIGHT "© 2015-25 Miranda NG team"
diff --git a/plugins/MimCmd/src/stdafx.cxx b/plugins/MimCmd/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/MimCmd/src/stdafx.cxx
+++ b/plugins/MimCmd/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/MirFox/src/MirandaUtils.cpp b/plugins/MirFox/src/MirandaUtils.cpp
index 83db70a709..12ae993190 100644
--- a/plugins/MirFox/src/MirandaUtils.cpp
+++ b/plugins/MirFox/src/MirandaUtils.cpp
@@ -295,7 +295,7 @@ void MirandaUtils::addMessageToDB(MCONTACT hContact, char* msgBuffer, std::size_
dbei.eventType = EVENTTYPE_MESSAGE;
dbei.flags = DBEF_SENT | DBEF_UTF;
dbei.szModule = targetHandleSzProto;
- dbei.timestamp = (uint32_t)time(0);
+ dbei.iTimestamp = (uint32_t)time(0);
dbei.cbBlob = (uint32_t)bufSize;
dbei.pBlob = msgBuffer;
db_event_add(hContact, &dbei);
diff --git a/plugins/MirFox/src/version.h b/plugins/MirFox/src/version.h
index c57046bc38..22747ed792 100644
--- a/plugins/MirFox/src/version.h
+++ b/plugins/MirFox/src/version.h
@@ -10,4 +10,4 @@
#define __DESCRIPTION "MirFox (Miranda NG) - part of Miranda-Firefox integration - http://wsx22.3.xpdev-hosted.com"
#define __AUTHOR "Szymon Tokarz"
#define __AUTHORWEB "https://miranda-ng.org/p/MirFox"
-#define __COPYRIGHT "© 2013-24 Szymon Tokarz"
+#define __COPYRIGHT "© 2013-25 Szymon Tokarz"
diff --git a/plugins/MirLua/MirLua.vcxproj b/plugins/MirLua/MirLua.vcxproj
index 1be3ea14b9..457c1b5cb1 100644
--- a/plugins/MirLua/MirLua.vcxproj
+++ b/plugins/MirLua/MirLua.vcxproj
@@ -89,7 +89,6 @@
<ClCompile Include="src\variables_loader.cpp" />
<ClInclude Include="include\mirlua.h" />
<ClInclude Include="src\module_loader.h" />
- <ClInclude Include="src\options.h" />
<ClInclude Include="src\plugin.h" />
<ClInclude Include="src\resource.h" />
<ClInclude Include="src\script.h" />
diff --git a/plugins/MirLua/MirLua.vcxproj.filters b/plugins/MirLua/MirLua.vcxproj.filters
index 4e30b4279f..05e8c4ad04 100644
--- a/plugins/MirLua/MirLua.vcxproj.filters
+++ b/plugins/MirLua/MirLua.vcxproj.filters
@@ -95,9 +95,6 @@
<ClInclude Include="src\module_loader.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="src\options.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="src\plugin.h">
<Filter>Header Files</Filter>
</ClInclude>
diff --git a/plugins/MirLua/src/Modules/m_clist.cpp b/plugins/MirLua/src/Modules/m_clist.cpp
index 6de506cfd0..005a21fc1b 100644
--- a/plugins/MirLua/src/Modules/m_clist.cpp
+++ b/plugins/MirLua/src/Modules/m_clist.cpp
@@ -117,6 +117,22 @@ static int clist_AddTrayMenuItem(lua_State *L)
return 1;
}
+static int clist_AddGroupMenuItem(lua_State *L)
+{
+ luaL_checktype(L, 1, LUA_TTABLE);
+
+ CMenuItem mi(&g_plugin);
+ MakeMenuItem(L, mi);
+
+ HGENMENU res = Menu_AddGroupMenuItem(&mi);
+ if (res != nullptr)
+ lua_pushlightuserdata(L, res);
+ else
+ lua_pushnil(L);
+
+ return 1;
+}
+
static luaL_Reg clistApi[] =
{
{ "AddMainMenuRoot", clist_AddMainMenuRoot },
@@ -126,6 +142,7 @@ static luaL_Reg clistApi[] =
{ "AddContactMenuItem", clist_AddContactMenuItem },
{ "AddTrayMenuItem", clist_AddTrayMenuItem },
+ { "AddGroupMenuItem", clist_AddGroupMenuItem },
{ nullptr, nullptr }
};
diff --git a/plugins/MirLua/src/Modules/m_database.cpp b/plugins/MirLua/src/Modules/m_database.cpp
index e3f4922643..030b749bd7 100644
--- a/plugins/MirLua/src/Modules/m_database.cpp
+++ b/plugins/MirLua/src/Modules/m_database.cpp
@@ -294,7 +294,7 @@ void MakeDbEvent(lua_State *L, DBEVENTINFO &dbei)
lua_pop(L, 1);
lua_getfield(L, -1, "Timestamp");
- dbei.timestamp = lua_tonumber(L, -1);
+ dbei.iTimestamp = lua_tonumber(L, -1);
lua_pop(L, 1);
lua_getfield(L, -1, "Flags");
@@ -692,9 +692,11 @@ LUAMOD_API int luaopen_m_database(lua_State *L)
MT<DBEVENTINFO>(L, MT_DBEVENTINFO)
.Field(&DBEVENTINFO::szModule, "Module", LUA_TSTRINGA)
- .Field(&DBEVENTINFO::timestamp, "Timestamp", LUA_TINTEGER)
+ .Field(&DBEVENTINFO::iTimestamp, "Timestamp", LUA_TINTEGER)
.Field(&DBEVENTINFO::eventType, "Type", LUA_TINTEGER)
- .Field(&DBEVENTINFO::flags, "Flags", LUA_TINTEGER);
+ .Field(&DBEVENTINFO::flags, "Flags", LUA_TINTEGER)
+ .Field(&DBEVENTINFO::cbBlob, "BlobSize", LUA_TINTEGER)
+ .Field(&DBEVENTINFO::pBlob, "Message", LUA_TSTRING);
return 1;
}
diff --git a/plugins/MirLua/src/Modules/m_message.cpp b/plugins/MirLua/src/Modules/m_message.cpp
index 1425771a14..be10f333ab 100644
--- a/plugins/MirLua/src/Modules/m_message.cpp
+++ b/plugins/MirLua/src/Modules/m_message.cpp
@@ -36,7 +36,7 @@ static int message_Send(lua_State *L)
else if ((res = ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)message)) != ACKRESULT_FAILED) {
DBEVENTINFO dbei = {};
dbei.szModule = MODULENAME;
- dbei.timestamp = time(0);
+ dbei.iTimestamp = time(0);
dbei.eventType = EVENTTYPE_MESSAGE;
dbei.cbBlob = (uint32_t)mir_strlen(message);
dbei.pBlob = mir_strdup(message);
diff --git a/plugins/MirLua/src/options.cpp b/plugins/MirLua/src/options.cpp
index 0da9f34357..b73d923360 100644
--- a/plugins/MirLua/src/options.cpp
+++ b/plugins/MirLua/src/options.cpp
@@ -1,19 +1,5 @@
#include "stdafx.h"
-CMLuaOptionsMain::CMLuaOptionsMain() :
- CDlgBase(g_plugin, IDD_OPTIONSMAIN),
- m_popupOnError(this, IDC_POPUPONERROR),
- m_popupOnObsolete(this, IDC_POPUPONOBSOLETE),
- m_scriptsList(this, IDC_SCRIPTS),
- m_reload(this, IDC_RELOAD)
-{
- CreateLink(m_popupOnError, "PopupOnError", DBVT_BYTE, 1);
- CreateLink(m_popupOnObsolete, "PopupOnObsolete", DBVT_BYTE, 1);
-
- m_scriptsList.OnClick = Callback(this, &CMLuaOptionsMain::OnScriptListClick);
- m_reload.OnClick = Callback(this, &CMLuaOptionsMain::OnReload);
-}
-
static int ScriptStatusToIcon(ScriptStatus status)
{
switch (status) {
@@ -28,174 +14,240 @@ static int ScriptStatusToIcon(ScriptStatus status)
return 0;
}
-void CMLuaOptionsMain::LoadScripts()
+/////////////////////////////////////////////////////////////////////////////////////////
+// main options page
+
+class CMLuaOptionsMain : public CDlgBase
{
- for (auto &script : g_plugin.m_scripts) {
- int iIcon = ScriptStatusToIcon(script->GetStatus());
- int iItem = m_scriptsList.AddItem(script->GetName(), iIcon, (LPARAM)script);
- m_scriptsList.SetCheckState(iItem, script->IsEnabled());
- m_scriptsList.SetItem(iItem, 1, TranslateT("Open"), 2);
- m_scriptsList.SetItem(iItem, 2, TranslateT("Reload"), 3);
- if (!script->IsBinary())
- m_scriptsList.SetItem(iItem, 3, TranslateT("Compile"), 4);
+ CCtrlCheck m_popupOnError;
+ CCtrlCheck m_popupOnObsolete;
+
+ CCtrlListView m_scriptsList;
+ CCtrlButton m_reload;
+
+ void LoadScripts()
+ {
+ for (auto &script : g_plugin.m_scripts) {
+ int iIcon = ScriptStatusToIcon(script->GetStatus());
+ int iItem = m_scriptsList.AddItem(script->GetName(), iIcon, (LPARAM)script);
+ m_scriptsList.SetCheckState(iItem, script->IsEnabled());
+ m_scriptsList.SetItem(iItem, 1, TranslateT("Open"), 2);
+ m_scriptsList.SetItem(iItem, 2, TranslateT("Reload"), 3);
+ if (!script->IsBinary())
+ m_scriptsList.SetItem(iItem, 3, TranslateT("Compile"), 4);
+ }
}
-}
-bool CMLuaOptionsMain::OnInitDialog()
-{
- CDlgBase::OnInitDialog();
+public:
+ CMLuaOptionsMain() :
+ CDlgBase(g_plugin, IDD_OPTIONSMAIN),
+ m_popupOnError(this, IDC_POPUPONERROR),
+ m_popupOnObsolete(this, IDC_POPUPONOBSOLETE),
+ m_scriptsList(this, IDC_SCRIPTS),
+ m_reload(this, IDC_RELOAD)
+ {
+ CreateLink(m_popupOnError, "PopupOnError", DBVT_BYTE, 1);
+ CreateLink(m_popupOnObsolete, "PopupOnObsolete", DBVT_BYTE, 1);
+
+ m_scriptsList.OnClick = Callback(this, &CMLuaOptionsMain::onClick_List);
+ m_scriptsList.OnDoubleClick = Callback(this, &CMLuaOptionsMain::onDblClick_List);
+
+ m_reload.OnClick = Callback(this, &CMLuaOptionsMain::OnReload);
+ }
- m_scriptsList.SetExtendedListViewStyle(LVS_EX_SUBITEMIMAGES | LVS_EX_FULLROWSELECT | LVS_EX_CHECKBOXES | LVS_EX_INFOTIP);
+ bool OnInitDialog() override
+ {
+ CDlgBase::OnInitDialog();
- HIMAGELIST hImageList = m_scriptsList.CreateImageList(LVSIL_SMALL);
- ImageList_AddIcon(hImageList, g_plugin.getIcon(IDI_LOADED));
- ImageList_AddIcon(hImageList, g_plugin.getIcon(IDI_FAILED));
- ImageList_AddIcon(hImageList, g_plugin.getIcon(IDI_OPEN));
- ImageList_AddIcon(hImageList, g_plugin.getIcon(IDI_RELOAD));
- ImageList_AddIcon(hImageList, g_plugin.getIcon(IDI_COMPILE));
+ m_scriptsList.SetExtendedListViewStyle(LVS_EX_SUBITEMIMAGES | LVS_EX_FULLROWSELECT | LVS_EX_CHECKBOXES | LVS_EX_INFOTIP);
- wchar_t scriptDir[MAX_PATH];
- FoldersGetCustomPathW(g_hScriptsFolder, scriptDir, _countof(scriptDir), VARSW(MIRLUA_PATHT));
+ HIMAGELIST hImageList = m_scriptsList.CreateImageList(LVSIL_SMALL);
+ ImageList_AddIcon(hImageList, g_plugin.getIcon(IDI_LOADED));
+ ImageList_AddIcon(hImageList, g_plugin.getIcon(IDI_FAILED));
+ ImageList_AddIcon(hImageList, g_plugin.getIcon(IDI_OPEN));
+ ImageList_AddIcon(hImageList, g_plugin.getIcon(IDI_RELOAD));
+ ImageList_AddIcon(hImageList, g_plugin.getIcon(IDI_COMPILE));
- wchar_t relativeScriptDir[MAX_PATH];
- PathToRelativeW(scriptDir, relativeScriptDir, nullptr);
+ wchar_t scriptDir[MAX_PATH];
+ FoldersGetCustomPathW(g_hScriptsFolder, scriptDir, _countof(scriptDir), VARSW(MIRLUA_PATHT));
- wchar_t header[MAX_PATH + 100];
- mir_snwprintf(header, L"%s (%s)", TranslateT("Common scripts"), relativeScriptDir);
+ wchar_t relativeScriptDir[MAX_PATH];
+ PathToRelativeW(scriptDir, relativeScriptDir, nullptr);
- m_scriptsList.AddColumn(0, TranslateT("Script"), 346);
- m_scriptsList.AddColumn(1, nullptr, 34 - GetSystemMetrics(SM_CXVSCROLL));
- m_scriptsList.AddColumn(2, nullptr, 36 - GetSystemMetrics(SM_CXVSCROLL));
- m_scriptsList.AddColumn(3, nullptr, 36 - GetSystemMetrics(SM_CXVSCROLL));
+ wchar_t header[MAX_PATH + 100];
+ mir_snwprintf(header, L"%s (%s)", TranslateT("Common scripts"), relativeScriptDir);
- LoadScripts();
- return true;
-}
+ m_scriptsList.AddColumn(0, TranslateT("Script"), 346);
+ m_scriptsList.AddColumn(1, nullptr, 34 - GetSystemMetrics(SM_CXVSCROLL));
+ m_scriptsList.AddColumn(2, nullptr, 36 - GetSystemMetrics(SM_CXVSCROLL));
+ m_scriptsList.AddColumn(3, nullptr, 36 - GetSystemMetrics(SM_CXVSCROLL));
-bool CMLuaOptionsMain::OnApply()
-{
- int count = m_scriptsList.GetItemCount();
- for (int iItem = 0; iItem < count; iItem++) {
- CMLuaScript *script = (CMLuaScript*)m_scriptsList.GetItemData(iItem);
- if (!m_scriptsList.GetCheckState(iItem))
- script->Disable();
- else
- script->Enable();
+ LoadScripts();
+ return true;
}
- return true;
-}
-void CMLuaOptionsMain::OnScriptListClick(CCtrlListView::TEventInfo *evt)
-{
- LVITEM lvi = {};
- lvi.iItem = evt->nmlvia->iItem;
- if (lvi.iItem == -1)
- return;
+ bool OnApply() override
+ {
+ int count = m_scriptsList.GetItemCount();
+ for (int iItem = 0; iItem < count; iItem++) {
+ CMLuaScript *script = (CMLuaScript *)m_scriptsList.GetItemData(iItem);
+ if (!m_scriptsList.GetCheckState(iItem))
+ script->Disable();
+ else
+ script->Enable();
+ }
+ return true;
+ }
- lvi.pszText = (LPTSTR)mir_calloc(MAX_PATH * sizeof(wchar_t));
- lvi.cchTextMax = MAX_PATH;
- lvi.mask = LVIF_GROUPID | LVIF_TEXT | LVIF_PARAM;
- m_scriptsList.GetItem(&lvi);
- lvi.iSubItem = evt->nmlvia->iSubItem;
+ void onClick_List(CCtrlListView::TEventInfo *evt)
+ {
+ LVITEM lvi = {};
+ lvi.iItem = evt->nmlvia->iItem;
+ if (lvi.iItem == -1)
+ return;
- CMLuaScript *script = (CMLuaScript*)lvi.lParam;
+ lvi.mask = LVIF_PARAM;
+ m_scriptsList.GetItem(&lvi);
+ auto *script = (CMLuaScript *)lvi.lParam;
- switch (lvi.iSubItem) {
- case 1:
- ShellExecute(m_hwnd, L"open", script->GetFilePath(), nullptr, nullptr, SW_SHOWNORMAL);
- break;
-
- case 2:
- script->Reload();
- lvi.mask = LVIF_IMAGE;
- lvi.iSubItem = 0;
- lvi.iImage = ScriptStatusToIcon(script->GetStatus());
- m_scriptsList.SetItem(&lvi);
- m_scriptsList.Update(lvi.iItem);
- break;
-
- case 3:
- if (script->IsBinary())
+ switch (evt->nmlvia->iSubItem) {
+ case 1:
+ ShellExecute(m_hwnd, L"open", script->GetFilePath(), nullptr, nullptr, SW_SHOWNORMAL);
break;
- script->Compile();
- lvi.mask = LVIF_IMAGE;
- lvi.iSubItem = 0;
- lvi.iImage = ScriptStatusToIcon(script->GetStatus());
- m_scriptsList.SetItem(&lvi);
- m_scriptsList.Update(lvi.iItem);
- break;
+
+ case 2:
+ script->Reload();
+ lvi.mask = LVIF_IMAGE;
+ lvi.iSubItem = 0;
+ lvi.iImage = ScriptStatusToIcon(script->GetStatus());
+ m_scriptsList.SetItem(&lvi);
+ m_scriptsList.Update(lvi.iItem);
+ break;
+
+ case 3:
+ if (script->IsBinary())
+ break;
+ script->Compile();
+ lvi.mask = LVIF_IMAGE;
+ lvi.iSubItem = 0;
+ lvi.iImage = ScriptStatusToIcon(script->GetStatus());
+ m_scriptsList.SetItem(&lvi);
+ m_scriptsList.Update(lvi.iItem);
+ break;
+ }
}
- mir_free(lvi.pszText);
-}
+ void onDblClick_List(CCtrlListView::TEventInfo *evt)
+ {
+ int iItem = evt->nmlv->iItem;
+ if (iItem == -1)
+ return;
-void CMLuaOptionsMain::OnReload(CCtrlBase*)
-{
- m_scriptsList.SetSilent(true);
- m_scriptsList.DeleteAllItems();
- g_plugin.ReloadLuaScripts();
- LoadScripts();
- m_scriptsList.SetSilent(false);
-}
+ auto *script = (CMLuaScript *)m_scriptsList.GetItemData(iItem);
+ ShellExecute(m_hwnd, L"open", script->GetFilePath(), nullptr, nullptr, SW_SHOWNORMAL);
+ }
+
+ void OnReload(CCtrlBase *)
+ {
+ m_scriptsList.SetSilent(true);
+ m_scriptsList.DeleteAllItems();
+ g_plugin.ReloadLuaScripts();
+ LoadScripts();
+ m_scriptsList.SetSilent(false);
+ }
+};
-/***********************************************/
+/////////////////////////////////////////////////////////////////////////////////////////
+// evaluate options page
-CMLuaEvaluateOptions::CMLuaEvaluateOptions() :
- CDlgBase(g_plugin, IDD_OPTIONSEVALUATE),
- m_script(this, IDC_SCRIPTTEXT),
- m_result(this, IDC_SCRIPTRESULT),
- m_autoEval(this, IDC_AUTOEVAL),
- m_evaluate(this, IDC_EVALUATE)
+class CMLuaEvaluateOptions : public CDlgBase
{
- this->L = lua_newthread(g_plugin.L);
- threadRef = luaL_ref(L, LUA_REGISTRYINDEX);
+ lua_State *L = nullptr;
+ int threadRef = 0;
+
+ CCtrlEdit m_script;
+ CCtrlEdit m_result;
+
+ CCtrlCheck m_autoEval;
+ CCtrlButton m_evaluate;
+
+ void OnAutoEvalChange(CCtrlBase *)
+ {
+ if (m_autoEval.IsChecked()) {
+ m_script.OnChange = Callback(this, &CMLuaEvaluateOptions::OnEvaluate);
+ m_evaluate.Click();
+ }
+ else m_script.OnChange = CCallback<CCtrlBase>();
+ }
- CreateLink(m_autoEval, "AutoEval", DBVT_BYTE, 0);
+ void OnEvaluate(CCtrlBase *)
+ {
+ ptrW script(m_script.GetText());
- m_autoEval.OnChange = Callback(this, &CMLuaEvaluateOptions::OnAutoEvalChange);
- m_evaluate.OnClick = Callback(this, &CMLuaEvaluateOptions::OnEvaluate);
-}
+ CMLuaEnvironment env(L);
+ env.Eval(script);
+ m_result.SetText(ptrW(mir_utf8decodeW(lua_tostring(L, -1))));
+ lua_pop(L, 1);
+ env.Unload();
+ }
-CMLuaEvaluateOptions::~CMLuaEvaluateOptions()
-{
- luaL_unref(L, LUA_REGISTRYINDEX, threadRef);
- threadRef = 0;
-}
+public:
+ CMLuaEvaluateOptions() :
+ CDlgBase(g_plugin, IDD_OPTIONSEVALUATE),
+ m_script(this, IDC_SCRIPTTEXT),
+ m_result(this, IDC_SCRIPTRESULT),
+ m_autoEval(this, IDC_AUTOEVAL),
+ m_evaluate(this, IDC_EVALUATE)
+ {
+ this->L = lua_newthread(g_plugin.L);
+ threadRef = luaL_ref(L, LUA_REGISTRYINDEX);
+
+ CreateLink(m_autoEval, "AutoEval", DBVT_BYTE, 0);
+
+ m_autoEval.OnChange = Callback(this, &CMLuaEvaluateOptions::OnAutoEvalChange);
+ m_evaluate.OnClick = Callback(this, &CMLuaEvaluateOptions::OnEvaluate);
+ }
-bool CMLuaEvaluateOptions::OnInitDialog()
-{
- m_script.SetText(m_pPlugin.getMStringW("Script"));
- if (m_autoEval.IsChecked()) {
- m_script.OnChange = Callback(this, &CMLuaEvaluateOptions::OnEvaluate);
- m_evaluate.Click();
+ ~CMLuaEvaluateOptions()
+ {
+ luaL_unref(L, LUA_REGISTRYINDEX, threadRef);
+ threadRef = 0;
}
- return true;
-}
-bool CMLuaEvaluateOptions::OnApply()
-{
- m_pPlugin.setWString("Script", m_script.GetText());
- return true;
-}
+ bool OnInitDialog() override
+ {
+ m_script.SetText(m_pPlugin.getMStringW("Script"));
+ if (m_autoEval.IsChecked()) {
+ m_script.OnChange = Callback(this, &CMLuaEvaluateOptions::OnEvaluate);
+ m_evaluate.Click();
+ }
+ return true;
+ }
-void CMLuaEvaluateOptions::OnAutoEvalChange(CCtrlBase*)
-{
- if (m_autoEval.IsChecked()) {
- m_script.OnChange = Callback(this, &CMLuaEvaluateOptions::OnEvaluate);
- m_evaluate.Click();
+ bool OnApply() override
+ {
+ m_pPlugin.setWString("Script", m_script.GetText());
+ return true;
}
- else m_script.OnChange = CCallback<CCtrlBase>();
-}
+};
-void CMLuaEvaluateOptions::OnEvaluate(CCtrlBase*)
+/////////////////////////////////////////////////////////////////////////////////////////
+// module entry point
+
+int CMPlugin::OnOptionsInit(WPARAM wParam, LPARAM)
{
- ptrW script(m_script.GetText());
+ OPTIONSDIALOGPAGE odp = {};
+ odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE | ODPF_DONTTRANSLATE;
+ odp.szGroup.w = LPGENW("Services");
+ odp.szTitle.w = L"Lua";
- CMLuaEnvironment env(L);
- env.Eval(script);
- m_result.SetText(ptrW(mir_utf8decodeW(lua_tostring(L, -1))));
- lua_pop(L, 1);
- env.Unload();
-}
+ odp.szTab.w = LPGENW("Scripts");
+ odp.pDialog = new CMLuaOptionsMain();
+ g_plugin.addOptions(wParam, &odp);
+
+ odp.szTab.w = LPGENW("Evaluate");
+ odp.pDialog = new CMLuaEvaluateOptions();
+ g_plugin.addOptions(wParam, &odp);
-/***********************************************/
+ return 0;
+}
diff --git a/plugins/MirLua/src/options.h b/plugins/MirLua/src/options.h
deleted file mode 100644
index 3e942e73a2..0000000000
--- a/plugins/MirLua/src/options.h
+++ /dev/null
@@ -1,47 +0,0 @@
-#pragma once
-
-class CMLuaOptionsMain : public CDlgBase
-{
- CCtrlCheck m_popupOnError;
- CCtrlCheck m_popupOnObsolete;
-
- CCtrlListView m_scriptsList;
- CCtrlButton m_reload;
-
- void LoadScripts();
-
-protected:
- bool OnInitDialog() override;
- bool OnApply() override;
-
- void OnScriptListClick(CCtrlListView::TEventInfo *evt);
- void OnReload(CCtrlBase*);
-
-public:
- CMLuaOptionsMain();
-};
-
-/***********************************************/
-
-class CMLuaEvaluateOptions : public CDlgBase
-{
- lua_State *L = nullptr;
- int threadRef = 0;
-
- CCtrlEdit m_script;
- CCtrlEdit m_result;
-
- CCtrlCheck m_autoEval;
- CCtrlButton m_evaluate;
-
-protected:
- bool OnInitDialog() override;
- bool OnApply() override;
-
- void OnAutoEvalChange(CCtrlBase*);
- void OnEvaluate(CCtrlBase*);
-
-public:
- CMLuaEvaluateOptions();
- ~CMLuaEvaluateOptions();
-};
diff --git a/plugins/MirLua/src/plugin.cpp b/plugins/MirLua/src/plugin.cpp
index b6dba83f2e..463851669f 100644
--- a/plugins/MirLua/src/plugin.cpp
+++ b/plugins/MirLua/src/plugin.cpp
@@ -86,28 +86,10 @@ void CMPlugin::ReloadLuaScripts()
/***********************************************/
-int CMPlugin::OnOptionsInit(WPARAM wParam, LPARAM)
-{
- OPTIONSDIALOGPAGE odp = {};
- odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE | ODPF_DONTTRANSLATE;
- odp.szGroup.w = LPGENW("Services");
- odp.szTitle.w = L"Lua";
-
- odp.szTab.w = LPGENW("Scripts");
- odp.pDialog = new CMLuaOptionsMain();
- g_plugin.addOptions(wParam, &odp);
-
- odp.szTab.w = LPGENW("Evaluate");
- odp.pDialog = new CMLuaEvaluateOptions();
- g_plugin.addOptions(wParam, &odp);
-
- return 0;
-}
-
int CMPlugin::OnModulesLoaded(WPARAM, LPARAM)
{
- g_hCLibsFolder = FoldersRegisterCustomPathW(MODULENAME, "CLibsFolder", MIRLUA_PATHT, TranslateT("C libs folder"));
- g_hScriptsFolder = FoldersRegisterCustomPathW(MODULENAME, "ScriptsFolder", MIRLUA_PATHT, TranslateT("Scripts folder"));
+ g_hCLibsFolder = FoldersRegisterCustomPathW(MODULENAME, LPGEN("C Libs Folder"), MIRLUA_PATHT);
+ g_hScriptsFolder = FoldersRegisterCustomPathW(MODULENAME, LPGEN("Scripts folder"), MIRLUA_PATHT);
LoadLuaScripts();
diff --git a/plugins/MirLua/src/stdafx.h b/plugins/MirLua/src/stdafx.h
index 7f768fe342..1f56a586d1 100644
--- a/plugins/MirLua/src/stdafx.h
+++ b/plugins/MirLua/src/stdafx.h
@@ -49,7 +49,6 @@ class CMLuaScript;
#include "module_loader.h"
#include "script_loader.h"
#include "variables_loader.h"
-#include "options.h"
#include "metatable.h"
#define MODULENAME LPGEN("MirLua")
diff --git a/plugins/MirLua/src/version.h b/plugins/MirLua/src/version.h
index 795ccc9df6..b5cfded620 100644
--- a/plugins/MirLua/src/version.h
+++ b/plugins/MirLua/src/version.h
@@ -10,4 +10,4 @@
#define __DESCRIPTION "Extends Miranda NG functionality with Lua scripts."
#define __AUTHOR "Miranda NG team"
#define __AUTHORWEB "https://miranda-ng.org/p/MirLua"
-#define __COPYRIGHT "© 2015-24 Miranda NG team"
+#define __COPYRIGHT "© 2015-25 Miranda NG team"
diff --git a/plugins/MirOTR/src/mirotrmenu.cpp b/plugins/MirOTR/src/mirotrmenu.cpp
index 22bdb8deaf..6e56bbde66 100644
--- a/plugins/MirOTR/src/mirotrmenu.cpp
+++ b/plugins/MirOTR/src/mirotrmenu.cpp
@@ -101,22 +101,6 @@ INT_PTR FreeOwnerDataMirOTRMenu(WPARAM, LPARAM lParam)
return 0;
}
-INT_PTR OnAddMenuItemMirOTRMenu(WPARAM wParam, LPARAM lParam)
-{
- MENUITEMINFO *mii = (MENUITEMINFO*)wParam;
- if (!mii || mii->cbSize != sizeof(MENUITEMINFO))
- return 0;
-
- TMO_MenuItem mi;
- if (Menu_GetItemInfo((HGENMENU)lParam, mi) == 0) {
- if (mi.flags & CMIF_DISABLED) {
- mii->fMask |= MIIM_STATE;
- mii->fState |= MF_DISABLED;
- }
- }
- return 1;
-}
-
LRESULT CALLBACK PopupMenuWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message) {
@@ -159,11 +143,9 @@ void InitMirOTRMenu(void)
// menu object
CreateServiceFunction("MIROTRMENUS/FreeOwnerDataMirOTRMenu", FreeOwnerDataMirOTRMenu);
- CreateServiceFunction("MIROTRMENUS/OnAddMenuItemMirOTRMenu", OnAddMenuItemMirOTRMenu);
hMirOTRMenuObject = Menu_AddObject("MirOTRMenu", LPGEN("MirOTR menu"), "MirOTRMenuCheckService", "MirOTRMenuExecService");
Menu_ConfigureObject(hMirOTRMenuObject, MCO_OPT_FREE_SERVICE, "MIROTRMENUS/FreeOwnerDataMirOTRMenu");
- Menu_ConfigureObject(hMirOTRMenuObject, MCO_OPT_ONADD_SERVICE, "MIROTRMENUS/OnAddMenuItemMirOTRMenu");
// menu items
CMenuItem mi(&g_plugin);
diff --git a/plugins/MirOTR/src/utils.cpp b/plugins/MirOTR/src/utils.cpp
index af6c8eb928..fd118f41d6 100644
--- a/plugins/MirOTR/src/utils.cpp
+++ b/plugins/MirOTR/src/utils.cpp
@@ -216,7 +216,7 @@ void ShowMessageInline(const MCONTACT hContact, const wchar_t *msg)
T2Utf utf(buff);
DB::EventInfo dbei;
- dbei.timestamp = time(0);
+ dbei.iTimestamp = time(0);
dbei.pBlob = utf;
dbei.flags = PREF_BYPASS_OTR;
ProtoChainRecvMsg(hContact, dbei);
@@ -228,7 +228,7 @@ void ShowMessageInlineUtf(const MCONTACT hContact, const char *msg)
mir_snprintf(buff, "%s%s", LANG_INLINE_PREFIX, msg);
DB::EventInfo dbei;
- dbei.timestamp = time(0);
+ dbei.iTimestamp = time(0);
dbei.pBlob = buff;
dbei.flags = PREF_BYPASS_OTR;
ProtoChainRecvMsg(hContact, dbei);
diff --git a/plugins/MirandaG15/src/CAppletManager.cpp b/plugins/MirandaG15/src/CAppletManager.cpp
index 3ef8bca1c4..4ecd78fe06 100644
--- a/plugins/MirandaG15/src/CAppletManager.cpp
+++ b/plugins/MirandaG15/src/CAppletManager.cpp
@@ -649,7 +649,7 @@ void CAppletManager::FinishMessageJob(SMessageJob *pJob)
dbei.eventType = EVENTTYPE_MESSAGE;
dbei.flags = DBEF_SENT | DBEF_UTF;
dbei.szModule = szProto;
- dbei.timestamp = time(0);
+ dbei.iTimestamp = time(0);
// Check if protocoll is valid
if (dbei.szModule == nullptr)
return;
@@ -795,7 +795,7 @@ bool CAppletManager::TranslateDBEvent(CEvent *pEvent, WPARAM hContact, LPARAM hd
pEvent->hContact = hContact;
pEvent->hValue = hdbevent;
- time_t timestamp = (time_t)dbei.timestamp;
+ time_t timestamp = (time_t)dbei.getUnixtime();
localtime_s(&pEvent->Time, &timestamp);
pEvent->bTime = true;
diff --git a/plugins/MirandaG15/src/stdafx.cxx b/plugins/MirandaG15/src/stdafx.cxx
index 49a49156f3..f0bb31ea1f 100644
--- a/plugins/MirandaG15/src/stdafx.cxx
+++ b/plugins/MirandaG15/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/MobileState/src/clients.h b/plugins/MobileState/src/clients.h
index b7b425f913..7d1ff3429e 100644
--- a/plugins/MobileState/src/clients.h
+++ b/plugins/MobileState/src/clients.h
@@ -1,6 +1,6 @@
/*
Mobile State plugin for Miranda NG (www.miranda-ng.org)
- (c) 2012-17 Robert Pösel, 2017-24 Miranda NG team
+ (c) 2012-17 Robert Pösel, 2017-25 Miranda NG team
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/plugins/MobileState/src/main.cpp b/plugins/MobileState/src/main.cpp
index 49945eb3a0..0e0dd2dea0 100644
--- a/plugins/MobileState/src/main.cpp
+++ b/plugins/MobileState/src/main.cpp
@@ -1,6 +1,6 @@
/*
Mobile State plugin for Miranda NG (www.miranda-ng.org)
- (c) 2012-17 by Robert Pösel, 2017-24 Miranda NG team
+ (c) 2012-17 by Robert Pösel, 2017-25 Miranda NG team
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/plugins/MobileState/src/stdafx.cxx b/plugins/MobileState/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/MobileState/src/stdafx.cxx
+++ b/plugins/MobileState/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/MobileState/src/stdafx.h b/plugins/MobileState/src/stdafx.h
index ef5e73ad37..634b19f750 100644
--- a/plugins/MobileState/src/stdafx.h
+++ b/plugins/MobileState/src/stdafx.h
@@ -1,6 +1,6 @@
/*
Mobile State plugin for Miranda NG (www.miranda-ng.org)
- (c) 2012-17 by Robert Pösel, 2017-24 Miranda NG team
+ (c) 2012-17 by Robert Pösel, 2017-25 Miranda NG team
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/plugins/MobileState/src/version.h b/plugins/MobileState/src/version.h
index 68787e2655..daf3d5590a 100644
--- a/plugins/MobileState/src/version.h
+++ b/plugins/MobileState/src/version.h
@@ -10,4 +10,4 @@
#define __DESCRIPTION "Plugin shows mobile icon in contact list next to contacts which are using mobile client."
#define __AUTHOR "Robert Pösel"
#define __AUTHORWEB "https://miranda-ng.org/p/MobileState"
-#define __COPYRIGHT "© 2012-17 Robert Pösel, 2017-24 Miranda NG team"
+#define __COPYRIGHT "© 2012-17 Robert Pösel, 2017-25 Miranda NG team"
diff --git a/plugins/MsgPopup/src/stdafx.cxx b/plugins/MsgPopup/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/MsgPopup/src/stdafx.cxx
+++ b/plugins/MsgPopup/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/Msg_Export/src/export.cpp b/plugins/Msg_Export/src/export.cpp
index 6615db1315..76bc9c3e5e 100644
--- a/plugins/Msg_Export/src/export.cpp
+++ b/plugins/Msg_Export/src/export.cpp
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -23,13 +23,7 @@ bool bIsUtf8Header(uint8_t *pucByteOrder)
return memcmp(pucByteOrder, szUtf8ByteOrderHeader, 3) == 0;
}
-/////////////////////////////////////////////////////////////////////
-// Member Function : bWriteToFile
-// Type : Global
-// Parameters : hFile - ?
-// pszSrc - in UTF8 or ANSII
-// nLen - ?
-// Returns : Returns true if all the data was written to the file
+/////////////////////////////////////////////////////////////////////////////////////////
static bool bWriteToFile(HANDLE hFile, const char *pszSrc, int nLen = -1)
{
@@ -40,14 +34,7 @@ static bool bWriteToFile(HANDLE hFile, const char *pszSrc, int nLen = -1)
return WriteFile(hFile, pszSrc, nLen, &dwBytesWritten, nullptr) && (dwBytesWritten == (uint32_t)nLen);
}
-
-/////////////////////////////////////////////////////////////////////
-// Member Function : bWriteTextToFile
-// Type : Global
-// Parameters : hFile - ?
-// pszSrc - ?
-// bUtf8File - ?
-// Returns : Returns true if
+/////////////////////////////////////////////////////////////////////////////////////////
static bool bWriteTextToFile(HANDLE hFile, const wchar_t *pszSrc, bool bUtf8File, int nLen = -1)
{
@@ -66,12 +53,7 @@ static bool bWriteTextToFile(HANDLE hFile, const wchar_t *pszSrc, bool bUtf8File
return bWriteToFile(hFile, T2Utf(pszSrc), -1);
}
-/////////////////////////////////////////////////////////////////////
-// Member Function : bWriteNewLine
-// Type : Global
-// Parameters : hFile - ?
-// nIndent - ?
-// Returns : Returns true if all the data was written to the file
+/////////////////////////////////////////////////////////////////////////////////////////
const wchar_t wszNewLineIndent[] = L"\r\n ";
void bWriteNewLine(CMStringW &str, int dwIndent)
@@ -82,12 +64,7 @@ void bWriteNewLine(CMStringW &str, int dwIndent)
str.Append(wszNewLineIndent, dwIndent + 2);
}
-/////////////////////////////////////////////////////////////////////
-// Member Function : bWriteHexToFile
-// Type : Global
-// Parameters : hFile - ?
-// - ?
-// nSize - ?
+/////////////////////////////////////////////////////////////////////////////////////////
bool bWriteHexToFile(HANDLE hFile, void *pData, int nSize)
{
@@ -101,13 +78,7 @@ bool bWriteHexToFile(HANDLE hFile, void *pData, int nSize)
return true;
}
-/////////////////////////////////////////////////////////////////////
-// Member Function : bWriteIndentedToFile
-// Type : Global
-// Parameters : hFile - ?
-// nIndent - ?
-// pszSrc -
-// Returns : Returns true if
+/////////////////////////////////////////////////////////////////////////////////////////
static bool bWriteIndentedToFile(CMStringW &str, int nIndent, const wchar_t *pszSrc)
{
@@ -177,14 +148,7 @@ SuperBreak:
return bOk;
}
-/////////////////////////////////////////////////////////////////////
-// Member Function : ExportDBEventInfo
-// Type : Global
-// Parameters : hContact - handle to contact
-// hFile - handle to file
-// sFilePath - path to file
-// dbei - Event to export
-// Returns : false on serious error, when file should be closed to not lost/overwrite any data
+/////////////////////////////////////////////////////////////////////////////////////////
const char *pSettings[] =
{
@@ -201,11 +165,77 @@ const char *pSettings[] =
LPGEN("About")
};
-static bool ExportDBEventInfo(MCONTACT hContact, HANDLE hFile, const wstring &sFilePath, DB::EventInfo &dbei, bool bAppendOnly)
+static bool bPrepareHeader(MCONTACT hContact, HANDLE hFile, bool &bWriteUTF8Format, const wstring &sRemoteUser)
{
- wstring sLocalUser;
- wstring sRemoteUser;
- string::size_type nFirstColumnWidth;
+ const char *szProto = Proto_GetBaseAccountName(hContact);
+
+ DWORD dwHighSize = 0;
+ DWORD dwLowSize = GetFileSize(hFile, &dwHighSize);
+ if (dwLowSize == INVALID_FILE_SIZE || dwLowSize != 0 || dwHighSize != 0) {
+ DWORD dwDataRead = 0;
+ uint8_t ucByteOrder[3];
+ if (ReadFile(hFile, ucByteOrder, 3, &dwDataRead, nullptr))
+ bWriteUTF8Format = bIsUtf8Header(ucByteOrder);
+
+ DWORD dwPtr = SetFilePointer(hFile, 0, nullptr, FILE_END);
+ if (dwPtr == INVALID_SET_FILE_POINTER)
+ return false;
+ }
+ else {
+ bWriteUTF8Format = g_plugin.bUseUtf8InNewFiles;
+ if (bWriteUTF8Format)
+ if (!bWriteToFile(hFile, szUtf8ByteOrderHeader, sizeof(szUtf8ByteOrderHeader) - 1))
+ return false;
+
+ CMStringW output = L"------------------------------------------------\r\n";
+ output.AppendFormat(L"%s\r\n", TranslateT(" History for"));
+
+ // This is written this way because I expect this will become a string the user may set
+ // in the options dialog.
+ output.AppendFormat(L"%-10s: %s\r\n", TranslateT("User"), sRemoteUser.c_str());
+ output.AppendFormat(L"%-10s: %S\r\n", TranslateT("Account"), szProto);
+
+ ptrW id(Contact::GetInfo(CNF_UNIQUEID, hContact, szProto));
+ if (id != NULL)
+ output.AppendFormat(L"%-10s: %s\r\n", TranslateT("User ID"), id.get());
+
+ int c = db_get_b(hContact, szProto, "Gender", 0);
+ if (c)
+ output.AppendFormat(L"%-10s: %c\r\n", TranslateT("Gender"), c);
+
+ int age = db_get_w(hContact, szProto, "Age", 0);
+ if (age != 0)
+ output.AppendFormat(L"%-10s: %d\r\n", TranslateT("Age"), age);
+
+ for (auto &it : pSettings) {
+ wstring szValue = _DBGetStringW(hContact, szProto, it, L"");
+ if (!szValue.empty())
+ output.AppendFormat(L"%-10s: %s\r\n", TranslateW(_A2T(it)), szValue.c_str());
+ }
+
+ output += L"------------------------------------------------\r\n";
+
+ if (!bWriteTextToFile(hFile, output, bWriteUTF8Format, output.GetLength()))
+ return false;
+ }
+
+ return true;
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
+bool bExportEvent(MCONTACT hContact, MEVENT hDbEvent, HANDLE hFile, const wstring &sFilePath, bool bAppendOnly)
+{
+ DB::EventInfo dbei(hDbEvent);
+ if (!dbei)
+ return true;
+
+ if (db_mc_isMeta(hContact))
+ hContact = dbei.hContact;
+
+ // Write the event
+ wstring sLocalUser, sRemoteUser;
+ size_t nFirstColumnWidth;
auto *pJson = (MDatabaseExport *)hFile;
const char *szProto = Proto_GetBaseAccountName(hContact);
@@ -238,57 +268,8 @@ static bool ExportDBEventInfo(MCONTACT hContact, HANDLE hFile, const wstring &sF
if (!pJson->BeginExport())
pJson->ExportContact(hContact);
}
- else {
- DWORD dwHighSize = 0;
- DWORD dwLowSize = GetFileSize(hFile, &dwHighSize);
- if (dwLowSize == INVALID_FILE_SIZE || dwLowSize != 0 || dwHighSize != 0) {
- DWORD dwDataRead = 0;
- uint8_t ucByteOrder[3];
- if (ReadFile(hFile, ucByteOrder, 3, &dwDataRead, nullptr))
- bWriteUTF8Format = bIsUtf8Header(ucByteOrder);
-
- DWORD dwPtr = SetFilePointer(hFile, 0, nullptr, FILE_END);
- if (dwPtr == INVALID_SET_FILE_POINTER)
- return false;
- }
- else {
- bWriteUTF8Format = g_plugin.bUseUtf8InNewFiles;
- if (bWriteUTF8Format)
- if (!bWriteToFile(hFile, szUtf8ByteOrderHeader, sizeof(szUtf8ByteOrderHeader) - 1))
- return false;
-
- CMStringW output = L"------------------------------------------------\r\n";
- output.AppendFormat(L"%s\r\n", TranslateT(" History for"));
-
- // This is written this way because I expect this will become a string the user may set
- // in the options dialog.
- output.AppendFormat(L"%-10s: %s\r\n", TranslateT("User"), sRemoteUser.c_str());
- output.AppendFormat(L"%-10s: %S\r\n", TranslateT("Account"), szProto);
-
- ptrW id(Contact::GetInfo(CNF_UNIQUEID, hContact, szProto));
- if (id != NULL)
- output.AppendFormat(L"%-10s: %s\r\n", TranslateT("User ID"), id.get());
-
- int c = db_get_b(hContact, szProto, "Gender", 0);
- if (c)
- output.AppendFormat(L"%-10s: %c\r\n", TranslateT("Gender"), c);
-
- int age = db_get_w(hContact, szProto, "Age", 0);
- if (age != 0)
- output.AppendFormat(L"%-10s: %d\r\n", TranslateT("Age"), age);
-
- for (auto &it : pSettings) {
- wstring szValue = _DBGetStringW(hContact, szProto, it, L"");
- if (!szValue.empty())
- output.AppendFormat(L"%-10s: %s\r\n", TranslateW(_A2T(it)), szValue.c_str());
- }
-
- output += L"------------------------------------------------\r\n";
-
- if (!bWriteTextToFile(hFile, output, bWriteUTF8Format, output.GetLength()))
- return false;
- }
- }
+ else if (!bPrepareHeader(hContact, hFile, bWriteUTF8Format, sRemoteUser))
+ return false;
}
if (g_bUseJson) {
@@ -308,10 +289,10 @@ static bool ExportDBEventInfo(MCONTACT hContact, HANDLE hFile, const wstring &sF
// Get time stamp
CMStringW output;
- output.AppendFormat(L"%-*s", (int)nFirstColumnWidth, dbei.flags & DBEF_SENT ? sLocalUser.c_str() : sRemoteUser.c_str());
+ output.AppendFormat(L"%-*s", (int)nFirstColumnWidth, dbei.bSent ? sLocalUser.c_str() : sRemoteUser.c_str());
{
wchar_t buf[100];
- TimeZone_ToStringW(dbei.timestamp, g_sTimeFormat.c_str(), buf, _countof(buf));
+ TimeZone_ToStringW(dbei.getUnixtime(), g_sTimeFormat.c_str(), buf, _countof(buf));
output.Append(buf);
}
@@ -323,7 +304,7 @@ static bool ExportDBEventInfo(MCONTACT hContact, HANDLE hFile, const wstring &sF
switch (dbei.eventType) {
case EVENTTYPE_MESSAGE:
- output += ptrW(dbei.getText());
+ bWriteIndentedToFile(output, nIndent, ptrW(dbei.getText()));
break;
case EVENTTYPE_FILE:
@@ -429,20 +410,76 @@ static bool ExportDBEventInfo(MCONTACT hContact, HANDLE hFile, const wstring &sF
}
/////////////////////////////////////////////////////////////////////////////////////////
-// Module entry point
-bool bExportEvent(MCONTACT hContact, MEVENT hDbEvent, HANDLE hFile, const wstring &sFilePath, bool bAppendOnly)
+bool bExportReaction(const DB::EventInfo &dbei, const DBEventReaction &p, HANDLE hFile, const wstring &sFilePath)
{
- bool result = true;
+ // Write the event
+ wstring sLocalUser, sRemoteUser;
+ size_t nFirstColumnWidth;
+ auto *pJson = (MDatabaseExport *)hFile;
- DB::EventInfo dbei(hDbEvent);
- if (dbei) {
- if (db_mc_isMeta(hContact))
- hContact = dbei.hContact;
+ const char *szProto = Proto_GetBaseAccountName(p.hContact);
+ if (szProto == nullptr) {
+ Netlib_Logf(0, MODULENAME ": cannot write message for a contact %d without protocol", p.hContact);
+ return false;
+ }
+
+ if (g_plugin.bUseAngleBrackets) {
+ sLocalUser = L"<<";
+ sRemoteUser = L">>";
+ nFirstColumnWidth = 4;
+ }
+ else {
+ sLocalUser = ptrW(GetMyOwnNick(p.hContact));
+ sRemoteUser = Clist_GetContactDisplayName(p.hContact);
+
+ nFirstColumnWidth = max(sRemoteUser.size(), clFileTo1ColWidth[sFilePath]);
+ nFirstColumnWidth = max(sLocalUser.size(), nFirstColumnWidth);
+ nFirstColumnWidth += 2;
+ }
+
+ bool bWriteUTF8Format = false;
+
+ if (g_bUseJson) {
+ if (!pJson->BeginExport())
+ pJson->ExportContact(p.hContact);
- // Write the event
- result = ExportDBEventInfo(hContact, hFile, sFilePath, dbei, bAppendOnly);
+ pJson->ExportEvent(dbei);
+ return true;
}
- return result;
+ if (!bPrepareHeader(p.hContact, hFile, bWriteUTF8Format, sRemoteUser))
+ return false;
+
+ // Get time stamp
+ CMStringW output;
+ output.AppendFormat(L"%-*s", (int)nFirstColumnWidth, dbei.bSent ? sLocalUser.c_str() : sRemoteUser.c_str());
+
+ wchar_t buf[100];
+ TimeZone_ToStringW(time(0), g_sTimeFormat.c_str(), buf, _countof(buf));
+ output.Append(buf);
+
+ output.AppendChar(' ');
+ int nIndent = output.GetLength();
+
+ ptrW wszMessageText(dbei.getText());
+ if (mir_wstrlen(wszMessageText) > 30)
+ mir_wstrcpy(wszMessageText.get() + 27, L"...");
+
+ Utf2T wszReaction(p.pszReaction);
+
+ TimeZone_ToStringW(dbei.getUnixtime(), g_sTimeFormat.c_str(), buf, _countof(buf));
+ CMStringW wszText;
+ if (p.bAdded)
+ wszText.Format(TranslateT("%s reacted with %s to message \"%s\" from %s"), sRemoteUser.c_str(), wszReaction.get(), wszMessageText.get(), buf);
+ else
+ wszText.Format(TranslateT("%s remove reaction %s to message \"%s\" from %s"), sRemoteUser.c_str(), wszReaction.get(), wszMessageText.get(), buf);
+ bWriteIndentedToFile(output, nIndent, wszText);
+
+ output.Append(g_plugin.bAppendNewLine ? L"\r\n\r\n" : L"\r\n");
+ if (!bWriteTextToFile(hFile, output, bWriteUTF8Format, output.GetLength()))
+ return false;
+
+ UpdateFileViews(sFilePath.c_str());
+ return true;
}
diff --git a/plugins/Msg_Export/src/main.cpp b/plugins/Msg_Export/src/main.cpp
index 5b43b06505..638db5a903 100644
--- a/plugins/Msg_Export/src/main.cpp
+++ b/plugins/Msg_Export/src/main.cpp
@@ -127,6 +127,7 @@ int CMPlugin::Load()
HookEvent(ME_DB_EVENT_ADDED, nExportEvent);
HookEvent(ME_DB_EVENT_EDITED, nExportEvent);
+ HookEvent(ME_DB_EVENT_REACTION, nExportReaction);
HookEvent(ME_DB_CONTACT_DELETED, nContactDeleted);
HookEvent(ME_OPT_INITIALISE, OptionsInitialize);
HookEvent(ME_SYSTEM_MODULESLOADED, MainInit);
diff --git a/plugins/Msg_Export/src/stdafx.cxx b/plugins/Msg_Export/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/Msg_Export/src/stdafx.cxx
+++ b/plugins/Msg_Export/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/Msg_Export/src/utils.cpp b/plugins/Msg_Export/src/utils.cpp
index 8544154802..b56e401369 100644
--- a/plugins/Msg_Export/src/utils.cpp
+++ b/plugins/Msg_Export/src/utils.cpp
@@ -554,3 +554,50 @@ int nExportEvent(WPARAM hContact, LPARAM hDbEvent)
return 0;
}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
+int nExportReaction(WPARAM wParam, LPARAM lParam)
+{
+ auto *dbei = (DB::EventInfo *)wParam;
+ auto *p = (DBEventReaction *)lParam;
+ if (!p || !dbei)
+ return 0;
+
+ if (!bIsExportEnabled(p->hContact))
+ return 0;
+
+ // Open/create file for writing
+ wstring sFilePath = GetFilePathFromUser(p->hContact);
+ MDatabaseExport *pJson = nullptr;
+ HANDLE hFile;
+
+ if (g_bUseJson) {
+ pJson = g_pDriver->Export(sFilePath.c_str());
+ if (pJson == nullptr) {
+ DisplayErrorDialog(LPGENW("Failed to open or create file:\n"), sFilePath);
+ return 0;
+ }
+
+ hFile = pJson;
+ }
+ else {
+ hFile = openCreateFile(sFilePath);
+ if (hFile == INVALID_HANDLE_VALUE) {
+ DisplayErrorDialog(LPGENW("Failed to open or create file:\n"), sFilePath);
+ return 0;
+ }
+ }
+
+ // Write the event
+ bExportReaction(*dbei, *p, hFile, sFilePath);
+
+ // Close the file
+ if (pJson) {
+ pJson->EndExport();
+ delete pJson;
+ }
+ else CloseHandle(hFile);
+
+ return 0;
+}
diff --git a/plugins/Msg_Export/src/utils.h b/plugins/Msg_Export/src/utils.h
index c39b0770ae..12323d13be 100644
--- a/plugins/Msg_Export/src/utils.h
+++ b/plugins/Msg_Export/src/utils.h
@@ -45,9 +45,13 @@ void DisplayErrorDialog(const wchar_t *pszError, wstring &sFilePath);
bool bIsExportEnabled(MCONTACT hContact);
HANDLE openCreateFile(const wstring &sFilePath);
-bool bExportEvent(MCONTACT hContact, MEVENT hDbEvent, HANDLE hFile, const wstring &sFilePath, bool bAppendOnly);
+bool bExportEvent(MCONTACT hContact, MEVENT hDbEvent, HANDLE hFile, const wstring &sFilePath, bool bAppendOnly);
int nExportEvent(WPARAM wparam, LPARAM lparam);
+
+bool bExportReaction(const DB::EventInfo &dbei, const DBEventReaction &p, HANDLE, const wstring &sFilePath);
+int nExportReaction(WPARAM wparam, LPARAM lparam);
+
int nContactDeleted(WPARAM wparam, LPARAM lparam);
wchar_t* GetMyOwnNick(MCONTACT hContact);
diff --git a/plugins/Msg_Export/src/version.h b/plugins/Msg_Export/src/version.h
index 2755bd63b5..63e1cdcbde 100644
--- a/plugins/Msg_Export/src/version.h
+++ b/plugins/Msg_Export/src/version.h
@@ -1,7 +1,7 @@
#define __MAJOR_VERSION 3
#define __MINOR_VERSION 1
-#define __RELEASE_NUM 2
-#define __BUILD_NUM 10
+#define __RELEASE_NUM 3
+#define __BUILD_NUM 1
#include <stdver.h>
@@ -10,4 +10,4 @@
#define __DESCRIPTION "Exports every message, URL or file you receive to a text file."
#define __AUTHOR "Kennet Nielsen, mod by ring0"
#define __AUTHORWEB "https://miranda-ng.org/p/Msg_Export"
-#define __COPYRIGHT "© 2002 Kennet Nielsen, 2012-24 Miranda NG team"
+#define __COPYRIGHT "© 2002 Kennet Nielsen, 2012-25 Miranda NG team"
diff --git a/plugins/MyDetails/src/stdafx.cxx b/plugins/MyDetails/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/MyDetails/src/stdafx.cxx
+++ b/plugins/MyDetails/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/NewAwaySysMod/src/MsgEventAdded.cpp b/plugins/NewAwaySysMod/src/MsgEventAdded.cpp
index 8262b848bc..11809f5d3c 100644
--- a/plugins/NewAwaySysMod/src/MsgEventAdded.cpp
+++ b/plugins/NewAwaySysMod/src/MsgEventAdded.cpp
@@ -70,7 +70,7 @@ void __cdecl AutoreplyDelayThread(CAutoreplyData *ad)
dbei.eventType = EVENTTYPE_MESSAGE;
dbei.flags = DBEF_SENT | DBEF_UTF;
dbei.szModule = szProto;
- dbei.timestamp = time(0);
+ dbei.iTimestamp = time(0);
dbei.cbBlob = ReplyLen;
dbei.pBlob = pszReply;
db_event_add(ad->hContact, &dbei);
@@ -112,7 +112,7 @@ int MsgEventAdded(WPARAM hContact, LPARAM lParam)
if (dbei->flags & DBEF_SENT || (dbei->eventType != EVENTTYPE_MESSAGE && dbei->eventType != EVENTTYPE_FILE))
return 0;
- if (time(0) - dbei->timestamp > MAX_REPLY_TIMEDIFF) // don't reply to offline messages
+ if (time(0) - dbei->getUnixtime() > MAX_REPLY_TIMEDIFF) // don't reply to offline messages
return 0;
char *szProto = Proto_GetBaseAccountName(hContact);
@@ -139,7 +139,7 @@ int MsgEventAdded(WPARAM hContact, LPARAM lParam)
// we compare only event timestamps, and do not look at the message itself. it's unlikely that there'll be two events from a contact at the same second, so it's a trade-off between speed and reliability
for (i = MetacontactEvents.GetSize() - 1; i >= 0; i--) {
- if (MetacontactEvents[i].timestamp == dbei->timestamp && MetacontactEvents[i].hMetaContact == hMetaContact) {
+ if (MetacontactEvents[i].timestamp == dbei->getUnixtime() && MetacontactEvents[i].hMetaContact == hMetaContact) {
bMsgWindowIsOpen = MetacontactEvents[i].bMsgWindowIsOpen;
break;
}
@@ -159,7 +159,7 @@ int MsgEventAdded(WPARAM hContact, LPARAM lParam)
MetacontactEvents.RemoveElem(i);
// add the new event and wait for a subcontact's event
- MetacontactEvents.AddElem(CMetacontactEvent(hContact, dbei->timestamp, IsSRMsgWindowOpen(hContact)));
+ MetacontactEvents.AddElem(CMetacontactEvent(hContact, dbei->getUnixtime(), IsSRMsgWindowOpen(hContact)));
return 0;
}
diff --git a/plugins/NewAwaySysMod/src/stdafx.cxx b/plugins/NewAwaySysMod/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/NewAwaySysMod/src/stdafx.cxx
+++ b/plugins/NewAwaySysMod/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/NewEventNotify/src/main.cpp b/plugins/NewEventNotify/src/main.cpp
index ad633f4da5..5333916d84 100644
--- a/plugins/NewEventNotify/src/main.cpp
+++ b/plugins/NewEventNotify/src/main.cpp
@@ -80,11 +80,11 @@ int HookedNewEvent(WPARAM hContact, LPARAM hDbEvent)
return 0;
// if event was allready read don't show it
- if (g_plugin.bReadCheck && (dbei.flags & DBEF_READ))
+ if (g_plugin.bReadCheck && dbei.bRead)
return 0;
// is it an event sent by the user? -> don't show
- if (dbei.flags & DBEF_SENT) {
+ if (dbei.bSent) {
// JK, only message event, do not influence others
auto *pdata = PU_GetByContact(hContact, dbei.eventType);
if (g_plugin.bHideSend && pdata)
diff --git a/plugins/NewEventNotify/src/popup.cpp b/plugins/NewEventNotify/src/popup.cpp
index a33b7f5f4c..dc8e7d0502 100644
--- a/plugins/NewEventNotify/src/popup.cpp
+++ b/plugins/NewEventNotify/src/popup.cpp
@@ -444,7 +444,7 @@ int PopupUpdate(PLUGIN_DATA &pdata, MEVENT hEvent)
wszFormat.Append(L"%H:%M");
if (!wszFormat.IsEmpty()) {
wchar_t timestamp[MAX_DATASIZE];
- time_t localTime = dbe.timestamp;
+ time_t localTime = dbe.getUnixtime();
wcsftime(timestamp, _countof(timestamp), wszFormat, localtime(&localTime));
wszText.AppendFormat(L"[b][i]%s[/i][/b]\n", timestamp);
}
diff --git a/plugins/NewEventNotify/src/stdafx.cxx b/plugins/NewEventNotify/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/NewEventNotify/src/stdafx.cxx
+++ b/plugins/NewEventNotify/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/NewStory/src/calendartool.cpp b/plugins/NewStory/src/calendartool.cpp
index d7c3a4bb27..a03d05057f 100644
--- a/plugins/NewStory/src/calendartool.cpp
+++ b/plugins/NewStory/src/calendartool.cpp
@@ -1,6 +1,6 @@
/*
Copyright (c) 2005 Victor Pavlychko (nullbyte@sotline.net.ua)
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/NewStory/src/fonts.cpp b/plugins/NewStory/src/fonts.cpp
index 72bf329028..09720e3406 100644
--- a/plugins/NewStory/src/fonts.cpp
+++ b/plugins/NewStory/src/fonts.cpp
@@ -1,6 +1,6 @@
/*
Copyright (c) 2005 Victor Pavlychko (nullbyte@sotline.net.ua)
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -77,6 +77,7 @@ int evtFontsChanged(WPARAM, LPARAM)
}
WindowList_Broadcast(g_hNewstoryLogs, UM_REDRAW_LIST, 0, 0);
+ WindowList_Broadcast(g_hNewstoryHistLogs, UM_REDRAW_LIST, 0, 0);
return 0;
}
diff --git a/plugins/NewStory/src/history.h b/plugins/NewStory/src/history.h
index 0b3bebe5d9..e83b8c69ec 100644
--- a/plugins/NewStory/src/history.h
+++ b/plugins/NewStory/src/history.h
@@ -30,9 +30,10 @@ enum
UM_BOOKMARKS = WM_USER + 0x661,
UM_LOCATETIME = WM_USER + 0x662,
+ UM_UPDATE_WINDOW = WM_USER + 0x663,
};
-extern MWindowList g_hNewstoryWindows, g_hNewstoryLogs;
+extern MWindowList g_hNewstoryWindows, g_hNewstoryLogs, g_hNewstoryHistLogs;
void InitMenus();
void InitHotkeys();
diff --git a/plugins/NewStory/src/history_array.cpp b/plugins/NewStory/src/history_array.cpp
index bcf1120a9b..6b57f8ca67 100644
--- a/plugins/NewStory/src/history_array.cpp
+++ b/plugins/NewStory/src/history_array.cpp
@@ -1,6 +1,6 @@
/*
Copyright (c) 2005 Victor Pavlychko (nullbyte@sotline.net.ua)
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -25,7 +25,7 @@ bool Filter::check(ItemData *item) const
{
if (!item) return false;
if (!(flags & EVENTONLY)) {
- if (item->dbe.flags & DBEF_SENT) {
+ if (item->dbe.bSent) {
if (!(flags & OUTGOING))
return false;
}
@@ -92,9 +92,9 @@ static bool isEqual(const ItemData *p1, const ItemData *p2)
return false;
if (p1->dbe.eventType != p2->dbe.eventType)
return false;
- if ((p1->dbe.flags & DBEF_SENT) != (p2->dbe.flags & DBEF_SENT))
+ if (p1->dbe.bSent != p2->dbe.bSent)
return false;
- if (p1->dbe.timestamp / 86400 != p2->dbe.timestamp / 86400)
+ if (p1->dbe.getUnixtime() / 86400 != p2->dbe.getUnixtime() / 86400)
return false;
return true;
}
@@ -165,7 +165,7 @@ static bool isEqualGC(const ItemData *p1, const ItemData *p2)
if (wcscmp(p1->wszNick, p2->wszNick))
return false;
- if (p1->dbe.timestamp / 86400 != p2->dbe.timestamp / 86400)
+ if (p1->dbe.getUnixtime() / 86400 != p2->dbe.getUnixtime() / 86400)
return false;
return true;
}
@@ -216,6 +216,8 @@ int ItemData::calcHeight(int width)
cx -= xPos;
if (m_bOfflineDownloaded != 0 || m_bDelivered || m_bRemoteRead) // Download completed icon
cx -= 18;
+ if (dbe.bEdited)
+ cx -= 18;
}
leftOffset = xPos;
@@ -316,13 +318,13 @@ void ItemData::getFontColor(int &fontId, int &colorId) const
{
switch (dbe.eventType) {
case EVENTTYPE_MESSAGE:
- fontId = !(dbe.flags & DBEF_SENT) ? FONT_INMSG : FONT_OUTMSG;
- colorId = !(dbe.flags & DBEF_SENT) ? COLOR_INMSG : COLOR_OUTMSG;
+ fontId = !dbe.bSent ? FONT_INMSG : FONT_OUTMSG;
+ colorId = !dbe.bSent ? COLOR_INMSG : COLOR_OUTMSG;
break;
case EVENTTYPE_FILE:
- fontId = !(dbe.flags & DBEF_SENT) ? FONT_INFILE : FONT_OUTFILE;
- colorId = !(dbe.flags & DBEF_SENT) ? COLOR_INFILE : COLOR_OUTFILE;
+ fontId = !dbe.bSent ? FONT_INFILE : FONT_OUTFILE;
+ colorId = !dbe.bSent ? COLOR_INFILE : COLOR_OUTFILE;
break;
case EVENTTYPE_STATUSCHANGE:
@@ -341,13 +343,13 @@ void ItemData::getFontColor(int &fontId, int &colorId) const
break;
case EVENTTYPE_JABBER_PRESENCE:
- fontId = !(dbe.flags & DBEF_SENT) ? FONT_INOTHER : FONT_OUTOTHER;
- colorId = !(dbe.flags & DBEF_SENT) ? COLOR_INOTHER : COLOR_OUTOTHER;
+ fontId = !dbe.bSent ? FONT_INOTHER : FONT_OUTOTHER;
+ colorId = !dbe.bSent ? COLOR_INOTHER : COLOR_OUTOTHER;
break;
default:
- fontId = !(dbe.flags & DBEF_SENT) ? FONT_INOTHER : FONT_OUTOTHER;
- colorId = !(dbe.flags & DBEF_SENT) ? COLOR_INOTHER : COLOR_OUTOTHER;
+ fontId = !dbe.bSent ? FONT_INOTHER : FONT_OUTOTHER;
+ colorId = !dbe.bSent ? COLOR_INOTHER : COLOR_OUTOTHER;
break;
}
}
@@ -444,11 +446,11 @@ void ItemData::load(bool bLoadAlways)
CMStringW str, wszNick;
wchar_t wszTime[100];
- TimeZone_PrintTimeStamp(0, dbei.timestamp, L"D t", wszTime, _countof(wszTime), 0);
+ TimeZone_PrintTimeStamp(0, dbei.getUnixtime(), L"D t", wszTime, _countof(wszTime), 0);
if (Contact::IsGroupChat(dbe.hContact) && dbei.szUserId)
wszNick = Utf2T(dbei.szUserId);
- else if (dbei.flags & DBEF_SENT) {
+ else if (dbei.bSent) {
if (char *szProto = Proto_GetBaseAccountName(dbe.hContact))
wszNick = ptrW(Contact::GetInfo(CNF_DISPLAY, 0, szProto));
else
@@ -523,7 +525,7 @@ void HistoryArray::addChatEvent(NewstoryListData *pOwner, SESSION_INFO *si, cons
p.wtext = wszText.Detach();
p.m_bLoaded = true;
p.m_bHighlighted = lin->bIsHighlighted;
- p.dbe.timestamp = lin->time;
+ p.dbe.iTimestamp = lin->time;
if (lin->bIsMe)
p.dbe.flags |= DBEF_SENT;
diff --git a/plugins/NewStory/src/history_control.cpp b/plugins/NewStory/src/history_control.cpp
index f7797fc912..a25760ae87 100644
--- a/plugins/NewStory/src/history_control.cpp
+++ b/plugins/NewStory/src/history_control.cpp
@@ -1,6 +1,6 @@
/*
Copyright (c) 2005 Victor Pavlychko (nullbyte@sotline.net.ua)
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -186,10 +186,7 @@ bool NewstoryListData::AtTop(void) const
if (scrollTopItem < 0)
return true;
- if (scrollTopItem == 0 && scrollTopPixel == 0)
- return true;
-
- return false;
+ return (scrollTopItem == 0 && scrollTopPixel == 0);
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -270,7 +267,7 @@ void NewstoryListData::BeginEditItem()
mir_subclassWindow(hwndEditBox, HistoryEditWndProc);
SendMessage(hwndEditBox, WM_SETFONT, (WPARAM)g_fontTable[fontid].hfnt, 0);
SendMessage(hwndEditBox, EM_SETMARGINS, EC_RIGHTMARGIN, 100);
- if (item->dbe.eventType != EVENTTYPE_MESSAGE || !(item->dbe.flags & DBEF_SENT))
+ if (item->dbe.eventType != EVENTTYPE_MESSAGE || !item->dbe.bSent)
SendMessage(hwndEditBox, EM_SETREADONLY, TRUE, 0);
ShowWindow(hwndEditBox, SW_SHOW);
@@ -411,7 +408,7 @@ void NewstoryListData::DeleteItems(void)
for (int i = totalCount - 1; i >= 0; i--) {
auto *pItem = GetItem(i);
if (pItem->m_bSelected) {
- if ((pItem->dbe.flags & DBEF_SENT) == 0)
+ if (!pItem->dbe.bSent)
bIncoming = true;
nSelected++;
}
@@ -419,6 +416,7 @@ void NewstoryListData::DeleteItems(void)
CDeleteEventsDlg dlg(m_hContact, nSelected, bIncoming);
if (IDOK == dlg.DoModal()) {
+ int iSaveCount = totalCount;
g_plugin.bDisableDelete = true;
int firstSel = -1, flags = 0;
@@ -440,6 +438,8 @@ void NewstoryListData::DeleteItems(void)
}
g_plugin.bDisableDelete = false;
+ if (iSaveCount != totalCount)
+ PostMessage(GetParent(m_hwnd), UM_UPDATE_WINDOW, 0, 0);
if (firstSel != -1) {
SetCaret(firstSel, false);
@@ -459,7 +459,7 @@ void NewstoryListData::DeliverEvent(MCONTACT hContact, MEVENT hEvent)
for (int i = totalCount - 1; i >= 0; i--) {
auto *pItem = GetItem(i);
- if (pItem->dbe.hContact != hContact || !(pItem->dbe.flags & DBEF_SENT))
+ if (pItem->dbe.hContact != hContact || !pItem->dbe.bSent)
continue;
if (pItem->dbe.getEvent() == hEvent)
@@ -499,11 +499,12 @@ void NewstoryListData::EndEditItem(bool bAccept)
pItem->wtext[iTextLen] = 0;
if (pItem->dbe.hContact && pItem->dbe.getEvent()) {
- DBEVENTINFO dbei = pItem->dbe;
+ DB::EventInfo dbei(pItem->dbe.getEvent());
ptrA szUtf(mir_utf8encodeW(pItem->wtext));
dbei.cbBlob = (int)mir_strlen(szUtf) + 1;
- dbei.pBlob = szUtf.get();
+ dbei.pBlob = szUtf.detach();
+ dbei.bEdited = true;
db_event_edit(pItem->dbe.getEvent(), &dbei);
}
@@ -729,6 +730,18 @@ void NewstoryListData::OpenFolder()
/////////////////////////////////////////////////////////////////////////////////////////
// Painting
+static void recursive_set_color(element::ptr el, const web_color &fore, const background &back)
+{
+ el->css_w().set_bg(back);
+ el->css_w().set_color(fore);
+
+ for (auto &it : el->children()) {
+ if (it->tag() == _a_ || (it->tag() == _font_ && mir_strcmp(it->get_attr("class"), "body")))
+ continue;
+ recursive_set_color(it, fore, back);
+ }
+}
+
void NewstoryListData::Paint(simpledib::dib &dib)
{
int top = 0;
@@ -780,7 +793,8 @@ void NewstoryListData::Paint(simpledib::dib &dib)
SetBkMode(dib, TRANSPARENT);
// left offset of icons & text
- int xPos = 2, yPos = top + 2, xRight = 0, yOffset = 0;
+ bool bDrawProgress = false;
+ int xPos = 2, yPos = top + 2, xRight = 0;
if (!bReadOnly) {
HICON hIcon;
@@ -804,7 +818,7 @@ void NewstoryListData::Paint(simpledib::dib &dib)
if (g_plugin.bShowType) {
switch (pItem->dbe.eventType) {
case EVENTTYPE_MESSAGE:
- hIcon = g_plugin.getIcon(IDI_SENDMSG);
+ hIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
break;
case EVENTTYPE_FILE:
hIcon = Skin_LoadIcon(SKINICON_EVENT_FILE);
@@ -818,20 +832,22 @@ void NewstoryListData::Paint(simpledib::dib &dib)
}
DrawIconEx(dib, xPos, yPos, hIcon, 16, 16, 0, 0, DI_NORMAL);
xPos += 18;
+ IcoLib_ReleaseIcon(hIcon);
}
// Direction icon
if (g_plugin.bShowDirection) {
- if (pItem->dbe.flags & DBEF_SENT)
+ if (pItem->dbe.bSent)
hIcon = g_plugin.getIcon(IDI_MSGOUT);
else
hIcon = g_plugin.getIcon(IDI_MSGIN);
DrawIconEx(dib, xPos, yPos, hIcon, 16, 16, 0, 0, DI_NORMAL);
xPos += 18;
+ IcoLib_ReleaseIcon(hIcon);
}
// Bookmark icon
- if (pItem->dbe.flags & DBEF_BOOKMARK) {
+ if (pItem->dbe.isBookmark) {
DrawIconEx(dib, xPos, yPos, g_plugin.getIcon(IDI_BOOKMARK), 16, 16, 0, 0, DI_NORMAL);
xPos += 18;
}
@@ -839,37 +855,48 @@ void NewstoryListData::Paint(simpledib::dib &dib)
// Finished icon
if (pItem->m_bOfflineDownloaded != 0) {
if (pItem->completed())
- DrawIconEx(dib, cachedWindowWidth - (xRight = 20), yPos, g_plugin.getIcon(IDI_OK), 16, 16, 0, 0, DI_NORMAL);
- else {
- HPEN hpn = (HPEN)SelectObject(dib, CreatePen(PS_SOLID, 4, g_colorTable[COLOR_PROGRESS].cl));
- MoveToEx(dib, rc.left, rc.bottom - 4, 0);
- LineTo(dib, rc.left + (rc.right - rc.left) * int(pItem->m_bOfflineDownloaded) / 100, rc.bottom - 4);
- DeleteObject(SelectObject(dib, hpn));
- yOffset = 4;
- }
+ DrawIconEx(dib, cachedWindowWidth - (xRight = 18), yPos, g_plugin.getIcon(IDI_OK), 16, 16, 0, 0, DI_NORMAL);
+ else
+ bDrawProgress = true;
}
// Delivered & remote read icons
if (pItem->m_bRemoteRead)
- DrawIconEx(dib, cachedWindowWidth - (xRight = 20), yPos, g_plugin.getIcon(IDI_REMOTEREAD), 16, 16, 0, 0, DI_NORMAL);
+ DrawIconEx(dib, cachedWindowWidth - (xRight = 18), yPos, g_plugin.getIcon(IDI_REMOTEREAD), 16, 16, 0, 0, DI_NORMAL);
else if (pItem->m_bDelivered)
- DrawIconEx(dib, cachedWindowWidth - (xRight = 20), yPos, g_plugin.getIcon(IDI_DELIVERED), 16, 16, 0, 0, DI_NORMAL);
+ DrawIconEx(dib, cachedWindowWidth - (xRight = 18), yPos, g_plugin.getIcon(IDI_DELIVERED), 16, 16, 0, 0, DI_NORMAL);
+
+ // Edited icon
+ if (pItem->dbe.bEdited) {
+ xRight += 18;
+ DrawIconEx(dib, cachedWindowWidth - xRight, yPos, g_plugin.getIcon(IDI_SENDMSG), 16, 16, 0, 0, DI_NORMAL);
+ }
}
// draw html itself
- litehtml::position clip(xPos, yPos, cachedWindowWidth - xPos - xRight, iItemHeigth - yOffset);
+ litehtml::position clip(xPos, yPos, cachedWindowWidth - xPos - xRight, iItemHeigth);
if (auto &pDoc = pItem->m_doc) {
if (auto pBody = pDoc->root()->select_one("body")) {
- litehtml::background back = pBody->css().get_bg();
- back.m_color = litehtml::web_color(GetRValue(clBack), GetGValue(clBack), GetBValue(clBack));
- pBody->css_w().set_bg(back);
+ if (auto pBbody = pBody->select_one("[id=bbody]")) {
+ litehtml::background back = pBbody->css().get_bg();
+ back.m_color = litehtml::web_color(GetRValue(clBack), GetGValue(clBack), GetBValue(clBack));
- pBody->css_w().set_color(litehtml::web_color(GetRValue(clText), GetGValue(clText), GetBValue(clText)));
+ litehtml::web_color fore(GetRValue(clText), GetGValue(clText), GetBValue(clText));
+ recursive_set_color(pBbody, fore, back);
+ }
}
pDoc->draw((UINT_PTR)dib.hdc(), xPos, yPos + iOffsetY, &clip);
}
+ // draw progress
+ if (bDrawProgress) {
+ HPEN hpn = (HPEN)SelectObject(dib, CreatePen(PS_SOLID, 4, g_colorTable[COLOR_PROGRESS].cl));
+ MoveToEx(dib, rc.left, rc.bottom - 4, 0);
+ LineTo(dib, rc.left + (rc.right - rc.left) * int(pItem->m_bOfflineDownloaded) / 100, rc.bottom - 4);
+ DeleteObject(SelectObject(dib, hpn));
+ }
+
// draw border
HPEN hpn = (HPEN)SelectObject(dib, CreatePen(PS_SOLID, 1, clLine));
MoveToEx(dib, rc.left, rc.bottom - 1, 0);
@@ -964,7 +991,7 @@ void NewstoryListData::RemoteRead(MCONTACT hContact, MEVENT hEvent)
if (!pItem->m_bLoaded)
pItem->fetch();
- if (pItem->dbe.hContact != hContact || !(pItem->dbe.flags & DBEF_SENT))
+ if (pItem->dbe.hContact != hContact || !pItem->dbe.bSent)
continue;
if (pItem->dbe.getEvent() == hEvent)
@@ -1010,19 +1037,6 @@ void NewstoryListData::SetCaret(int idx, bool bEnsureVisible)
}
}
-void NewstoryListData::SetContact(MCONTACT hContact)
-{
- m_hContact = hContact;
-
- WindowList_Add(g_hNewstoryLogs, m_hwnd, hContact);
-}
-
-void NewstoryListData::SetDialog(CSrmmBaseDialog *pDlg)
-{
- if (pMsgDlg = pDlg)
- SetContact(pDlg->m_hContact);
-}
-
void NewstoryListData::SetPos(int pos)
{
SetSelection((selStart == -1) ? pos : selStart, pos);
@@ -1128,7 +1142,7 @@ void NewstoryListData::TryUp(int iCount)
for (int j = 0; j < i + 1; j++)
if (auto *pItem = GetItem(j)) {
pItem->fetch();
- if (pItem->dbe.flags & DBEF_SENT)
+ if (pItem->dbe.bSent)
pItem->m_bRemoteRead = hasRead;
pPrev = pItem->checkNext(pPrev);
}
@@ -1323,7 +1337,7 @@ LRESULT CALLBACK NewstoryListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
int eventCount = data->totalCount;
for (int i = 0; i < eventCount; i++) {
auto *p = data->GetItem(i);
- if (p->dbe.timestamp >= wParam) {
+ if (p->dbe.getUnixtime() >= wParam) {
data->SetSelection(i, i);
data->SetCaret(i);
break;
@@ -1470,57 +1484,62 @@ LRESULT CALLBACK NewstoryListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
if (msg == WM_KEYUP)
break;
+ int oldCaret = data->caret;
switch (wParam) {
case VK_UP:
- if (g_plugin.bHppCompat)
+ if (g_plugin.bHppCompat) {
data->EventUp();
- else
- data->LineUp();
- if (isShift)
- data->SetSelection(data->scrollTopItem, data->caret);
+ if (isShift)
+ data->AddSelection(data->caret, oldCaret);
+ }
+ else data->LineUp();
break;
case VK_DOWN:
- if (g_plugin.bHppCompat)
+ if (g_plugin.bHppCompat) {
data->EventDown();
- else
- data->LineDown();
- if (isShift)
- data->SetSelection(data->scrollTopItem, data->caret);
+ if (isShift)
+ data->AddSelection(oldCaret, data->caret);
+ }
+ else data->LineDown();
break;
case VK_PRIOR:
if (isCtrl)
data->ScrollTop();
- else if (g_plugin.bHppCompat)
- data->EventPageUp();
- else
- data->PageUp();
- if (isShift)
- data->SetSelection(data->scrollTopItem, data->caret);
+ else {
+ if (g_plugin.bHppCompat) {
+ data->EventPageUp();
+ if (isShift)
+ data->AddSelection(data->caret, oldCaret);
+ }
+ else data->PageUp();
+ }
break;
case VK_NEXT:
if (isCtrl)
data->ScrollBottom();
- else if (g_plugin.bHppCompat)
- data->EventPageDown();
- else
- data->PageDown();
- if (isShift)
- data->SetSelection(data->scrollTopItem, data->caret);
+ else {
+ if (g_plugin.bHppCompat) {
+ data->EventPageDown();
+ if (isShift)
+ data->AddSelection(oldCaret, data->caret);
+ }
+ else data->PageDown();
+ }
break;
case VK_HOME:
data->ScrollTop();
if (isShift)
- data->SetSelection(0, data->caret);
+ data->AddSelection(0, data->caret);
break;
case VK_END:
data->ScrollBottom();
if (isShift)
- data->SetSelection(data->caret, data->totalCount);
+ data->AddSelection(data->caret, data->totalCount);
break;
case VK_F2:
@@ -1715,7 +1734,6 @@ LRESULT CALLBACK NewstoryListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
break;
case WM_DESTROY:
- WindowList_Remove(g_hNewstoryLogs, hwnd);
delete data;
SetWindowLongPtr(hwnd, 0, 0);
break;
diff --git a/plugins/NewStory/src/history_control.h b/plugins/NewStory/src/history_control.h
index 5c26afb970..4fcc518096 100644
--- a/plugins/NewStory/src/history_control.h
+++ b/plugins/NewStory/src/history_control.h
@@ -21,7 +21,7 @@ class NSWebPage : public document_container
std::string resolve_color(const string &color) const;
uint_ptr get_image(LPCWSTR url_or_path, bool redraw_on_ready);
- void get_client_rect(position &client) const override;
+ void get_viewport(litehtml::position &) const override;
void import_css(string &text, const string &url, string &baseurl) override;
void on_anchor_click(const char *url, const element::ptr &el) override;
void set_base_url(const char *base_url) override;
@@ -32,7 +32,7 @@ class NSWebPage : public document_container
void get_img_size(uint_ptr img, size &sz);
// document_container members
- uint_ptr create_font(const char *faceName, int size, int weight, font_style italic, unsigned int decoration, font_metrics *fm) override;
+ uint_ptr create_font(const font_description &descr, const document *doc, font_metrics *fm) override;
void delete_font(uint_ptr hFont) override;
const char* get_default_font_name() const override;
int get_default_font_size() const override;
@@ -174,8 +174,6 @@ struct NewstoryListData : public MZeroedObject
void ScrollTop();
void ScrollUp(int deltaY);
void SetCaret(int idx, bool bEnsureVisible = true);
- void SetContact(MCONTACT hContact);
- void SetDialog(CSrmmBaseDialog *pDialog);
void SetPos(int pos);
void SetSelection(int iFirst, int iLast);
void ToggleBookmark();
diff --git a/plugins/NewStory/src/history_dlg.cpp b/plugins/NewStory/src/history_dlg.cpp
index eb239d100e..85dcd9ea5d 100644
--- a/plugins/NewStory/src/history_dlg.cpp
+++ b/plugins/NewStory/src/history_dlg.cpp
@@ -1,6 +1,6 @@
/*
Copyright (c) 2005 Victor Pavlychko (nullbyte@sotline.net.ua)
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -165,7 +165,7 @@ class CHistoryDlg : public CDlgBase
CharLowerW(pwszText);
if (wcsstr(pwszText, pwszPattern))
- m_arResults.insert(new SearchResult(hContact, hDbEvent, dbei.timestamp));
+ m_arResults.insert(new SearchResult(hContact, hDbEvent, dbei.getUnixtime()));
}
}
@@ -295,25 +295,25 @@ class CHistoryDlg : public CDlgBase
auto &pArray = m_histCtrl->items;
int numItems = pArray.getCount();
- int CurYear = 0, CurMonth = 0, CurDay = 0, PrevYear = -1, PrevMonth = -1, PrevDay = -1;
+ int PrevYear = -1, PrevMonth = -1, PrevDay = -1;
HTREEITEM hCurYear = 0, hCurMonth = 0, hCurDay = 0;
for (int i = 0; i < numItems; i++) {
auto *pItem = pArray.get(i, false);
if (!pItem->fetch())
continue;
- if (pItem->dbe.timestamp == 0)
+ if (pItem->dbe.iTimestamp == 0)
continue;
struct tm ts = { 0 };
- time_t timestamp = pItem->dbe.timestamp;
+ time_t timestamp = pItem->dbe.getUnixtime();
errno_t err = localtime_s(&ts, &timestamp); /* statically alloced, local time correction */
if (err != 0)
return;
- CurYear = ts.tm_year + 1900;
- CurMonth = ts.tm_mon + 1;
- CurDay = ts.tm_mday;
+ int CurYear = ts.tm_year + 1900;
+ int CurMonth = ts.tm_mon + 1;
+ int CurDay = ts.tm_mday;
wchar_t buf[50];
TVINSERTSTRUCT tvi;
tvi.hParent = nullptr;
@@ -321,14 +321,14 @@ class CHistoryDlg : public CDlgBase
if (CurYear != PrevYear) {
_itow(CurYear, buf, 10);
tvi.item.pszText = buf;
- tvi.item.lParam = CurYear;
+ tvi.item.lParam = CurYear * 100 * 100;
hCurYear = TreeView_InsertItem(m_timeTree.GetHwnd(), &tvi);
PrevYear = CurYear;
}
if (CurMonth != PrevMonth) {
tvi.hParent = hCurYear;
tvi.item.pszText = TranslateW(months[CurMonth - 1]);
- tvi.item.lParam = CurMonth;
+ tvi.item.lParam = (CurYear * 100 + CurMonth) * 100;
hCurMonth = TreeView_InsertItem(m_timeTree.GetHwnd(), &tvi);
PrevMonth = CurMonth;
}
@@ -336,11 +336,12 @@ class CHistoryDlg : public CDlgBase
_itow(CurDay, buf, 10);
tvi.hParent = hCurMonth;
tvi.item.pszText = buf;
- tvi.item.lParam = CurDay;
+ tvi.item.lParam = (CurYear * 100 + CurMonth) * 100 + CurDay;
hCurDay = TreeView_InsertItem(m_timeTree.GetHwnd(), &tvi);
PrevDay = CurDay;
}
}
+
disableTimeTreeChange = true;
HTREEITEM root = m_timeTree.GetRoot();
m_timeTree.SelectItem(root);
@@ -349,9 +350,6 @@ class CHistoryDlg : public CDlgBase
HTREEITEM FindSibling(HTREEITEM root, int value)
{
if (root) {
- if (value < 1000)
- root = m_timeTree.GetChild(root);
-
for (HTREEITEM hti = root; hti; hti = m_timeTree.GetNextSibling(hti)) {
TVITEMEX tvi;
tvi.mask = TVIF_PARAM;
@@ -372,9 +370,13 @@ class CHistoryDlg : public CDlgBase
if (err != 0)
return;
- HTREEITEM hti = FindSibling(m_timeTree.GetRoot(), ts.tm_year + 1900);
- hti = FindSibling(hti, ts.tm_mon + 1);
- hti = FindSibling(hti, ts.tm_mday);
+ int iValue = (ts.tm_year + 1900) * 100 * 100;
+ HTREEITEM hti = FindSibling(m_timeTree.GetRoot(), iValue);
+
+ iValue += (ts.tm_mon + 1) * 100;
+ hti = FindSibling(m_timeTree.GetChild(hti), iValue);
+
+ hti = FindSibling(m_timeTree.GetChild(hti), iValue + ts.tm_mday);
if (hti) {
disableTimeTreeChange = true;
m_timeTree.SelectItem(hti);
@@ -433,7 +435,7 @@ public:
m_toolbar.push_back(Button(btnTimeTree));
m_toolbar.push_back(Button(btnBookmarks));
m_toolbar.push_back(Button(btnSearch));
- m_toolbar.push_back(Button(btnFilter));
+ // m_toolbar.push_back(Button(btnFilter));
m_toolbar.push_back(Button(btnCalendar, Button::SPACED));
m_toolbar.push_back(Button(btnCopy));
m_toolbar.push_back(Button(btnDelete));
@@ -489,6 +491,7 @@ public:
// filterbar
btnFilter.MakePush();
+ btnFilter.Hide();
btnTimeTree.MakePush();
if (m_dwOptions & WND_OPT_TIMETREE)
@@ -568,8 +571,6 @@ public:
// Ask for layout
PostMessage(m_hwnd, WM_SIZE, 0, 0);
- WindowList_Add(g_hNewstoryWindows, m_hwnd, m_hContact);
-
ShowHideControls();
UpdateTitle();
@@ -584,6 +585,11 @@ public:
if (m_hContact != INVALID_CONTACT_ID) {
Utils_RestoreWindowPosition(m_hwnd, m_hContact, MODULENAME, "wnd_");
+ WindowList_Add(g_hNewstoryWindows, m_hwnd, m_hContact);
+
+ m_histCtrl->m_hContact = m_hContact;
+ WindowList_Add(g_hNewstoryHistLogs, m_histCtrl->m_hwnd, m_hContact);
+
m_histCtrl->AddEvent(m_hContact, 0, -1);
BuildTimeTree();
@@ -594,7 +600,6 @@ public:
OnResize();
BuildBookmarksList();
- m_histCtrl->SetContact(m_hContact);
m_histCtrl->ScrollBottom();
Window_SetIcon_IcoLib(m_hwnd, g_plugin.getIconHandle(IDI_NEWSTORY));
@@ -798,6 +803,7 @@ public:
Window_FreeIcon_IcoLib(m_hwnd);
WindowList_Remove(g_hNewstoryWindows, m_hwnd);
+ WindowList_Remove(g_hNewstoryHistLogs, m_histCtrl->m_hwnd);
if (m_hwndStatus != nullptr) {
DestroyWindow(m_hwndStatus);
@@ -1153,7 +1159,12 @@ public:
case UM_LOCATETIME:
if (m_dwOptions & WND_OPT_TIMETREE)
if (auto *pItem = m_histCtrl->GetItem(wParam))
- LocateDateTime(pItem->dbe.timestamp);
+ LocateDateTime(pItem->dbe.getUnixtime());
+ break;
+
+ case UM_UPDATE_WINDOW:
+ UpdateTitle();
+ BuildTimeTree();
break;
}
@@ -1180,62 +1191,25 @@ public:
void onSelChanged_TimeTree(CCtrlTreeView::TEventInfo *)
{
- wchar_t *val1, *val2, *val3;
- int yearsel = 0, monthsel = 0, daysel = 1;
- bool monthfound = false;
- if (disableTimeTreeChange)
+ if (disableTimeTreeChange) {
disableTimeTreeChange = false;
- else {
- HTREEITEM hti1 = m_timeTree.GetSelection();
- TVITEMEX tvi = { 0 };
- tvi.hItem = hti1;
- tvi.mask = TVIF_HANDLE | TVIF_TEXT | TVIF_PARAM;
- tvi.cchTextMax = MAX_PATH;
- tvi.lParam = 0;
- tvi.pszText = (wchar_t *)_alloca(MAX_PATH * sizeof(wchar_t));
-
- m_timeTree.GetItem(&tvi);
- val1 = tvi.pszText;
- if (tvi.lParam) {
- monthsel = tvi.lParam;
- monthfound = true;
- }
- HTREEITEM hti2 = m_timeTree.GetParent(hti1);
- if ((!monthfound) && (!hti2))
- yearsel = _wtoi(val1);
- if ((!monthfound) && (hti2))
- daysel = _wtoi(val1);
- if (hti2) {
- tvi.hItem = hti2;
- tvi.lParam = 0;
- m_timeTree.GetItem(&tvi);
- val2 = tvi.pszText;
- if (tvi.lParam) {
- monthsel = tvi.lParam;
- monthfound = true;
- }
- else
- yearsel = _wtoi(val2);
- HTREEITEM hti3 = m_timeTree.GetParent(hti2);
- if (hti3) {
- tvi.hItem = hti3;
- tvi.lParam = 0;
- m_timeTree.GetItem(&tvi);
- val3 = tvi.pszText;
- yearsel = _wtoi(val3);
- }
- }
- struct tm tm_sel;
- tm_sel.tm_hour = tm_sel.tm_min = tm_sel.tm_sec = 0;
- tm_sel.tm_isdst = 1;
- tm_sel.tm_mday = daysel;
- if (monthsel)
- tm_sel.tm_mon = monthsel - 1;
- else
- tm_sel.tm_mon = 0;
- tm_sel.tm_year = yearsel - 1900;
- PostMessage(m_hwnd, WM_USER + 0x600, mktime(&tm_sel), 0);
+ return;
}
+
+ HTREEITEM hti1 = m_timeTree.GetSelection();
+ TVITEMEX tvi = {};
+ tvi.hItem = hti1;
+ tvi.mask = TVIF_HANDLE | TVIF_PARAM;
+ m_timeTree.GetItem(&tvi);
+
+ struct tm tm_sel = {};
+ tm_sel.tm_isdst = 1;
+ tm_sel.tm_mday = tvi.lParam % 100; tvi.lParam /= 100;
+ tm_sel.tm_mon = tvi.lParam % 100;
+ if (tm_sel.tm_mon)
+ tm_sel.tm_mon--;
+ tm_sel.tm_year = tvi.lParam / 100 - 1900;
+ PostMessage(m_hwnd, WM_USER + 0x600, mktime(&tm_sel), 0);
}
};
diff --git a/plugins/NewStory/src/history_log.cpp b/plugins/NewStory/src/history_log.cpp
index 4221a1a56e..a49b53eaff 100644
--- a/plugins/NewStory/src/history_log.cpp
+++ b/plugins/NewStory/src/history_log.cpp
@@ -1,6 +1,6 @@
/*
Copyright (c) 2005 Victor Pavlychko (nullbyte@sotline.net.ua)
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -37,12 +37,21 @@ public:
0, 0, rc.left - rc.right, rc.bottom - rc.top, m_pDlg.GetHwnd(), 0, m_pDlg.GetInst(), 0);
m_histCtrl = (NewstoryListData *)GetWindowLongPtr(m_hwnd, 0);
- m_histCtrl->SetDialog(&m_pDlg);
+ m_histCtrl->pMsgDlg = &m_pDlg;
+ m_histCtrl->m_hContact = m_pDlg.m_hContact;
+ WindowList_Add(g_hNewstoryLogs, m_hwnd, m_histCtrl->m_hContact);
+
+ DB::ECPTR pCursor(DB::Events(m_pDlg.m_hContact, db_event_firstUnread(m_pDlg.m_hContact)));
+ while (MEVENT hDbEvent = pCursor.FetchNext()) {
+ DB::EventInfo dbei(hDbEvent, false);
+ if (dbei && !dbei.bRead)
+ m_pDlg.MarkEventRead(dbei);
+ }
}
void Detach() override
{
- WindowList_Remove(g_hNewstoryLogs, m_pDlg.GetHwnd());
+ WindowList_Remove(g_hNewstoryLogs, m_hwnd);
::DestroyWindow(m_hwnd);
}
diff --git a/plugins/NewStory/src/history_menus.cpp b/plugins/NewStory/src/history_menus.cpp
index d8db517b34..74e3f3c525 100644
--- a/plugins/NewStory/src/history_menus.cpp
+++ b/plugins/NewStory/src/history_menus.cpp
@@ -1,6 +1,6 @@
/*
Copyright (c) 2005 Victor Pavlychko (nullbyte@sotline.net.ua)
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -61,7 +61,7 @@ HMENU NSMenu_Build(NewstoryListData *data, ItemData *item)
else if (mir_strlen(item->getUrl()))
Menu_ShowItem(hmiCopyUrl, true);
- bEditable = (item->dbe.flags & DBEF_SENT) != 0;
+ bEditable = item->dbe.bSent;
bShowEventActions = item->dbe.getEvent() != 0;
DB::EventInfo dbei(item->dbe.getEvent());
@@ -242,8 +242,7 @@ void InitMenus()
hMenuObject = Menu_AddObject("NSMenu", "NewStory item menu", nullptr, "NSMenu/ExecService");
Menu_ConfigureObject(hMenuObject, MCO_OPT_USERDEFINEDITEMS, INT_PTR(FALSE));
- Menu_ConfigureObject(hMenuObject, MCO_OPT_FREE_SERVICE, INT_PTR("NSMenu/FreeOwnerData"));
- Menu_ConfigureObject(hMenuObject, MCO_OPT_ONADD_SERVICE, INT_PTR("NSMenu/OnAddService"));
+ Menu_ConfigureObject(hMenuObject, MCO_OPT_FREE_SERVICE, "NSMenu/FreeOwnerData");
CMenuItem mi(&g_plugin);
mi.pszService = "NSMenu/Helper";
diff --git a/plugins/NewStory/src/history_svc.cpp b/plugins/NewStory/src/history_svc.cpp
index fa8771bb7f..2fd39daeca 100644
--- a/plugins/NewStory/src/history_svc.cpp
+++ b/plugins/NewStory/src/history_svc.cpp
@@ -1,6 +1,6 @@
/*
Copyright (c) 2005 Victor Pavlychko (nullbyte@sotline.net.ua)
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/NewStory/src/main.cpp b/plugins/NewStory/src/main.cpp
index f271bf1f40..cb03cebe7d 100644
--- a/plugins/NewStory/src/main.cpp
+++ b/plugins/NewStory/src/main.cpp
@@ -1,6 +1,6 @@
/*
Copyright (c) 2005 Victor Pavlychko (nullbyte@sotline.net.ua)
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -38,7 +38,7 @@ CMOption<uint32_t> g_clCustom4(MODULENAME, "CustomColor4", -1);
CMOption<int> g_iPreviewHeight(MODULENAME, "PreviewHeight", 300);
-MWindowList g_hNewstoryWindows = 0, g_hNewstoryLogs = 0;
+MWindowList g_hNewstoryWindows = 0, g_hNewstoryLogs = 0, g_hNewstoryHistLogs = 0;
/////////////////////////////////////////////////////////////////////////////////////////
@@ -188,6 +188,7 @@ int CMPlugin::Load()
g_hNewstoryLogs = WindowList_Create();
g_hNewstoryWindows = WindowList_Create();
+ g_hNewstoryHistLogs = WindowList_Create();
HookEvent(ME_DB_EVENT_ADDED, evtEventAdded);
HookEvent(ME_DB_EVENT_DELETED, evtEventDeleted);
@@ -208,6 +209,7 @@ int CMPlugin::Unload()
{
WindowList_Destroy(g_hNewstoryLogs);
WindowList_Destroy(g_hNewstoryWindows);
+ WindowList_Destroy(g_hNewstoryHistLogs);
GdiplusShutdown(m_gdiplusToken);
diff --git a/plugins/NewStory/src/options.cpp b/plugins/NewStory/src/options.cpp
index 7098909ecd..5c2b4c1238 100644
--- a/plugins/NewStory/src/options.cpp
+++ b/plugins/NewStory/src/options.cpp
@@ -1,6 +1,6 @@
/*
Copyright (c) 2005 Victor Pavlychko (nullbyte@sotline.net.ua)
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -33,6 +33,7 @@ protected:
void OnFinish(void *)
{
WindowList_BroadcastAsync(g_hNewstoryLogs, NSM_SET_OPTIONS, 0, 0);
+ WindowList_BroadcastAsync(g_hNewstoryHistLogs, NSM_SET_OPTIONS, 0, 0);
}
};
@@ -147,7 +148,7 @@ public:
m_tempItem->dbe.flags = DBEF_TEMPORARY | DBEF_BOOKMARK;
m_tempItem->dbe.szModule = MODULENAME;
m_tempItem->dbe.eventType = EVENTTYPE_MESSAGE;
- m_tempItem->dbe.timestamp = time(0);
+ m_tempItem->dbe.iTimestamp = time(0);
m_histCtrl->totalCount++;
HTREEITEM hGroup = 0, hFirst = 0;
diff --git a/plugins/NewStory/src/stdafx.cxx b/plugins/NewStory/src/stdafx.cxx
index d714e70110..aa565d1100 100644
--- a/plugins/NewStory/src/stdafx.cxx
+++ b/plugins/NewStory/src/stdafx.cxx
@@ -1,6 +1,6 @@
/*
Copyright (c) 2005 Victor Pavlychko (nullbyte@sotline.net.ua)
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/NewStory/src/stdafx.h b/plugins/NewStory/src/stdafx.h
index a0edec01c5..729d79369e 100644
--- a/plugins/NewStory/src/stdafx.h
+++ b/plugins/NewStory/src/stdafx.h
@@ -1,6 +1,6 @@
/*
Copyright (c) 2005 Victor Pavlychko (nullbyte@sotline.net.ua)
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/NewStory/src/templates.cpp b/plugins/NewStory/src/templates.cpp
index 9d3a9cf633..ad7510baaa 100644
--- a/plugins/NewStory/src/templates.cpp
+++ b/plugins/NewStory/src/templates.cpp
@@ -1,6 +1,6 @@
/*
Copyright (c) 2005 Victor Pavlychko (nullbyte@sotline.net.ua)
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -29,13 +29,57 @@ wchar_t *months[12] =
};
///////////////////////////////////////////////////////////////////////////////
-// HTML generator
+// color table
+
+struct
+{
+ const wchar_t *pwszName;
+ uint32_t iValue;
+}
+static builtinColors[] = {
+ { L"black", RGB(0, 0, 0) },
+ { L"navy", RGB(0, 0, 128) },
+ { L"blue", RGB(0, 0, 255) },
+ { L"green", RGB(0, 128, 0) },
+ { L"lime", RGB(0, 255, 0) },
+ { L"red", RGB(255, 0, 0) },
+ { L"maroon", RGB(128, 0, 0) },
+ { L"purple", RGB(128, 0, 128) },
+ { L"pink", RGB(255, 0, 255) },
+ { L"olive", RGB(128, 128, 0) },
+ { L"yellow", RGB(255, 255, 0) },
+ { L"cyan", RGB(0, 128, 128) },
+ { L"aqua", RGB(0, 255, 255) },
+ { L"gray", RGB(128, 128, 128) },
+ { L"white", RGB(255, 255, 255) },
+ { L"silver", RGB(192, 192, 192) },
+};
static uint32_t color2html(COLORREF clr)
{
return (((clr & 0xFF) << 16) | (clr & 0xFF00) | ((clr & 0xFF0000) >> 16));
}
+static int str2color(const CMStringW &str)
+{
+ for (auto &it : builtinColors)
+ if (str == it.pwszName)
+ return it.iValue;
+
+ // 6 hex digits in the RGB format
+ if (str.GetLength() != 6)
+ return -1;
+
+ for (int i = 0; i < 6; i++)
+ if (!is_hex_digit(str[i]))
+ return -1;
+
+ return color2html(wcstoul(str, 0, 16));
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// HTML generator
+
static wchar_t* font2html(LOGFONTA &lf, wchar_t *dest)
{
mir_snwprintf(dest, 100, L"font-family: %S; font-size: %dpt; font-weight: %s %s",
@@ -175,7 +219,9 @@ static void AppendString(CMStringW &buf, const wchar_t *p, ItemData *pItem)
if (auto *p2 = wcsstr(p1, L"[/url]")) {
CMStringW wszDescr(p1, int(p2 - p1));
- buf.AppendFormat(L"<a class=\"link\" href=\"%s\">%s</a>", wszUrl.c_str(), wszDescr.c_str());
+ buf.AppendFormat(L"<a class=\"link\" href=\"%s\">", wszUrl.c_str());
+ AppendString(buf, wszDescr, pItem);
+ buf.Append(L"</a>");
p = p2 + 5;
}
}
@@ -195,14 +241,17 @@ static void AppendString(CMStringW &buf, const wchar_t *p, ItemData *pItem)
p += 6;
if (auto *p1 = wcschr(p, ']')) {
- CMStringW wszColor(p, int(p1 - p));
- buf.AppendFormat(L"<font color=#%06X>", color2html(wcstoul(wszColor, 0, 16)));
+ int iColor = str2color(CMStringW(p, int(p1 - p)));
+ if (iColor != -1)
+ buf.AppendFormat(L"<font color=#%06X>", color2html(iColor));
+ else
+ buf.Append(L"<font class=\"body\">");
p = p1;
}
else p--;
}
- else if (!wcsncmp(p, L"/color]", 7)) {
- p += 6;
+ else if (*pEnd && !wcsncmp(p, L"color]", 6)) {
+ p += 5;
buf.AppendFormat(L"</font>");
}
else if (!wcsncmp(p, L"code]", 5)) {
@@ -235,8 +284,8 @@ CMStringW ItemData::formatHtml(const wchar_t *pwszStr)
auto &F = g_fontTable[fontID];
wchar_t szFont[100];
- str.AppendFormat(L"body {margin: 0px; text-align: left; %s; color: NSText; overflow: auto;}\n", font2html(F.lf, szFont));
- str.AppendFormat(L".nick {color: #%06X }\n", color2html(g_colorTable[(dbe.flags & DBEF_SENT) ? COLOR_OUTNICK : COLOR_INNICK].cl));
+ str.AppendFormat(L"body {margin: 0px; text-align: left; %s; overflow: auto;}\n", font2html(F.lf, szFont));
+ str.AppendFormat(L".nick {color: #%06X }\n", color2html(g_colorTable[dbe.bSent ? COLOR_OUTNICK : COLOR_INNICK].cl));
str.AppendFormat(L".link {color: #%06X }\n", color2html(g_colorTable[COLOR_LINK].cl));
str.AppendFormat(L".quote {border-left: 4px solid #%06X; padding-left: 8px; }\n", color2html(g_colorTable[COLOR_QUOTE].cl));
@@ -270,7 +319,11 @@ CMStringW ItemData::formatHtml(const wchar_t *pwszStr)
CMStringW szBody(wszOrigText);
UrlAutodetect(szBody);
+
+ str.Append(L"<div id=\"bbody\">");
AppendString(str, szBody, this);
+ str.Append(L"</div>");
+
if (spRes) {
int iOffset = 0;
for (int i = 0; i < (int)sp.numSmileys; i++) {
@@ -409,7 +462,7 @@ CMStringA NewstoryListData::GatherSelectedRtf()
buf.AppendFormat("{\\uc1\\pard \\cb%d\\cf%d\\f%d\\b0\\i0\\fs%d ", COLOR_BACK + 7, colorID+COLOR_COUNT+7, fontID, GetFontHeight(g_fontTable[fontID].lf));
CMStringW wszText(p->formatString());
wszText.Replace(L"[c0]", CMStringW(FORMAT, L"[c%d]", colorID + COLOR_COUNT + 7));
- wszText.Replace(L"[c1]", CMStringW(FORMAT, L"[c%d]", 7 + ((p->dbe.flags & DBEF_SENT) ? COLOR_OUTNICK : COLOR_INNICK)));
+ wszText.Replace(L"[c1]", CMStringW(FORMAT, L"[c%d]", 7 + (p->dbe.bSent ? COLOR_OUTNICK : COLOR_INNICK)));
AppendUnicodeToBuffer(buf, wszText);
buf.Append("\\par }");
}
@@ -427,18 +480,15 @@ CMStringW TplFormatString(int tpl, MCONTACT hContact, ItemData *item)
return CMStringW();
auto &T = templates[tpl];
- if (T.value == nullptr)
- T.value = mir_wstrdup(T.defvalue);
+ wchar_t *pValue = TranslateW((T.value) ? T.value : T.defvalue);
TemplateVars vars;
-
for (auto &it : T.vf)
if (it)
it(&vars, hContact, item);
CMStringW buf;
-
- for (wchar_t *p = T.value; *p; p++) {
+ for (wchar_t *p = pValue; *p; p++) {
if (*p == '%') {
wchar_t *var = vars.GetVar((p[1] & 0xff));
if (var)
@@ -512,11 +562,11 @@ void vfGlobal(TemplateVars *vars, MCONTACT hContact, ItemData *)
vars->SetVar('S', nick, true);
}
-void vfContact(TemplateVars *vars, MCONTACT hContact, ItemData *)
+void vfContact(TemplateVars *vars, MCONTACT hContact, ItemData *pItem)
{
// %N: buddy's nick (not for messages)
wchar_t *nick = (hContact == 0) ? TranslateT("System history") : Clist_GetContactDisplayName(hContact, 0);
- vars->SetNick(nick);
+ vars->SetNick(nick, pItem);
wchar_t buf[20];
// %c: event count
@@ -524,10 +574,10 @@ void vfContact(TemplateVars *vars, MCONTACT hContact, ItemData *)
vars->SetVar('c', buf, true);
}
-void vfSystem(TemplateVars *vars, MCONTACT hContact, ItemData *)
+void vfSystem(TemplateVars *vars, MCONTACT hContact, ItemData *pItem)
{
// %N: buddy's nick (not for messages)
- vars->SetNick(TranslateT("System event"));
+ vars->SetNick(TranslateT("System event"), pItem);
// %c: event count
wchar_t buf[20];
@@ -535,33 +585,33 @@ void vfSystem(TemplateVars *vars, MCONTACT hContact, ItemData *)
vars->SetVar('c', buf, true);
}
-void vfEvent(TemplateVars *vars, MCONTACT, ItemData *item)
+void vfEvent(TemplateVars *vars, MCONTACT, ItemData *pItem)
{
wchar_t buf[100];
// %N: Nickname
- if (!item->m_bIsResult && (item->dbe.flags & DBEF_SENT)) {
- if (!item->wszNick) {
- char *proto = Proto_GetBaseAccountName(item->dbe.hContact);
+ if (!pItem->m_bIsResult && pItem->dbe.bSent) {
+ if (!pItem->wszNick) {
+ char *proto = Proto_GetBaseAccountName(pItem->dbe.hContact);
ptrW nick(Contact::GetInfo(CNF_DISPLAY, 0, proto));
- vars->SetNick(nick);
+ vars->SetNick(nick, pItem);
}
- else vars->SetNick(item->wszNick);
+ else vars->SetNick(pItem->wszNick, pItem);
}
else {
- wchar_t *nick = (item->wszNick) ? item->wszNick : Clist_GetContactDisplayName(item->dbe.hContact, 0);
- vars->SetNick(nick);
+ wchar_t *nick = (pItem->wszNick) ? pItem->wszNick : Clist_GetContactDisplayName(pItem->dbe.hContact, 0);
+ vars->SetNick(nick, pItem);
}
// %D: direction symbol
- if (item->dbe.flags & DBEF_SENT)
+ if (pItem->dbe.bSent)
vars->SetVar('D', L"<<", false);
else
vars->SetVar('D', L">>", false);
// %t: timestamp
SYSTEMTIME st;
- if (!TimeZone_GetSystemTime(nullptr, item->dbe.timestamp, &st, 0)) {
+ if (!TimeZone_GetSystemTime(nullptr, pItem->dbe.getUnixtime(), &st, 0)) {
int iLocale = Langpack_GetDefaultLocale();
GetDateFormatW(iLocale, 0, &st, L"dd.MM.yyyy, ", buf, _countof(buf));
@@ -653,9 +703,13 @@ void vfOther(TemplateVars *vars, MCONTACT, ItemData *item)
/////////////////////////////////////////////////////////////////////////////////////////
-void TemplateVars::SetNick(wchar_t *v)
+void TemplateVars::SetNick(wchar_t *v, ItemData *pItem)
{
- CMStringW wszNick(FORMAT, L"[c1]%s[c0]", v);
+ CMStringW wszNick;
+ if (pItem)
+ wszNick.Format(L"[c1]%s[c0]", v);
+ else
+ wszNick = v;
auto &V = vars['N'];
if (V.del)
diff --git a/plugins/NewStory/src/templates.h b/plugins/NewStory/src/templates.h
index ad16b646ef..2a460d1cc9 100644
--- a/plugins/NewStory/src/templates.h
+++ b/plugins/NewStory/src/templates.h
@@ -16,7 +16,7 @@ struct TemplateVars
return vars[id].val;
}
- void SetNick(wchar_t *v);
+ void SetNick(wchar_t *v, ItemData *item);
void SetVar(uint8_t id, wchar_t *v, bool d);
};
diff --git a/plugins/NewStory/src/utils.cpp b/plugins/NewStory/src/utils.cpp
index f6aca92604..b8b5369451 100644
--- a/plugins/NewStory/src/utils.cpp
+++ b/plugins/NewStory/src/utils.cpp
@@ -1,6 +1,6 @@
/*
Copyright (c) 2005 Victor Pavlychko (nullbyte@sotline.net.ua)
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -49,19 +49,29 @@ Bitmap* LoadImageFromResource(HINSTANCE hInst, int resourceId, const wchar_t *pw
/////////////////////////////////////////////////////////////////////////////////////////
-int SmartSendEvent(int iEventType, MCONTACT hContact, LPARAM hEvent)
+static void SmartSendEventWorker(MWindowList wndList, int iEventType, MCONTACT cc1, MCONTACT cc2, MEVENT hEvent)
{
- if (HWND hwnd = WindowList_Find(g_hNewstoryLogs, hContact))
- SendMessage(hwnd, iEventType, hContact, hEvent);
+ if (HWND hwnd = WindowList_Find(wndList, cc1))
+ PostMessage(hwnd, iEventType, cc1, hEvent);
- if (db_mc_isMeta(hContact)) {
- // Send a message to a real contact too
+ if (cc2 != INVALID_CONTACT_ID)
+ if (HWND hwnd = WindowList_Find(wndList, cc2))
+ PostMessage(hwnd, iEventType, cc2, hEvent);
+}
+
+int SmartSendEvent(int iEventType, MCONTACT cc1, MEVENT hEvent)
+{
+ MCONTACT cc2 = INVALID_CONTACT_ID;
+
+ // Send a message to a real contact too
+ if (db_mc_isMeta(cc1)) {
MCONTACT cc = db_event_getContact(hEvent);
- if (cc != hContact)
- if (HWND hwnd = WindowList_Find(g_hNewstoryLogs, cc))
- SendMessage(hwnd, iEventType, cc, hEvent);
+ if (cc != cc1)
+ cc2 = cc;
}
+ SmartSendEventWorker(g_hNewstoryLogs, iEventType, cc1, cc2, hEvent);
+ SmartSendEventWorker(g_hNewstoryHistLogs, iEventType, cc1, cc2, hEvent);
return 0;
}
@@ -194,6 +204,9 @@ static int DetectUrl(const wchar_t *text)
void UrlAutodetect(CMStringW &str)
{
+ if (str.IsEmpty())
+ return;
+
int level = 0;
for (auto *p = str.c_str(); *p; p++) {
diff --git a/plugins/NewStory/src/utils.h b/plugins/NewStory/src/utils.h
index 1858c34d9c..7ebc0a4980 100644
--- a/plugins/NewStory/src/utils.h
+++ b/plugins/NewStory/src/utils.h
@@ -14,4 +14,4 @@ void RemoveBbcodes(CMStringW &pwszText);
Bitmap* LoadImageFromResource(HINSTANCE, int, const wchar_t *);
-int SmartSendEvent(int iEvent, MCONTACT hContact, LPARAM lParam);
+int SmartSendEvent(int iEvent, MCONTACT hContact, MEVENT lParam);
diff --git a/plugins/NewStory/src/version.h b/plugins/NewStory/src/version.h
index deec274fc5..36c1c6656e 100644
--- a/plugins/NewStory/src/version.h
+++ b/plugins/NewStory/src/version.h
@@ -10,4 +10,4 @@
#define __DESCRIPTION "History viewer for Miranda NG."
#define __AUTHOR "nullbie"
#define __AUTHORWEB "https://miranda-ng.org/p/NewStory"
-#define __COPYRIGHT "© 2005 Victor Pavlychko, 2012-24 Miranda NG team"
+#define __COPYRIGHT "© 2005 Victor Pavlychko, 2012-25 Miranda NG team"
diff --git a/plugins/NewStory/src/webpage.cpp b/plugins/NewStory/src/webpage.cpp
index e0453db41b..955e45d368 100644
--- a/plugins/NewStory/src/webpage.cpp
+++ b/plugins/NewStory/src/webpage.cpp
@@ -1,6 +1,6 @@
/*
Copyright (c) 2005 Victor Pavlychko (nullbyte@sotline.net.ua)
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -186,11 +186,11 @@ static void trim_quotes(std::string &str)
str.erase(str.length() - 1, 1);
}
-uint_ptr NSWebPage::create_font(const char *font_list, int size, int weight, font_style italic, unsigned int decoration, font_metrics *fm)
+uint_ptr NSWebPage::create_font(const font_description &descr, const document *, font_metrics *fm)
{
std::wstring font_name;
string_vector fonts;
- split_string(font_list, fonts, ",");
+ split_string(descr.family, fonts, ",");
bool found = false;
for (auto &name : fonts) {
trim(name);
@@ -208,15 +208,15 @@ uint_ptr NSWebPage::create_font(const char *font_list, int size, int weight, fon
LOGFONT lf = {};
wcscpy_s(lf.lfFaceName, LF_FACESIZE, font_name.c_str());
- lf.lfHeight = -size;
- lf.lfWeight = weight;
- lf.lfItalic = (italic == font_style_italic) ? TRUE : FALSE;
+ lf.lfHeight = -descr.size;
+ lf.lfWeight = descr.weight;
+ lf.lfItalic = (descr.style == font_style_italic) ? TRUE : FALSE;
lf.lfCharSet = DEFAULT_CHARSET;
lf.lfOutPrecision = OUT_DEFAULT_PRECIS;
lf.lfClipPrecision = CLIP_DEFAULT_PRECIS;
lf.lfQuality = DEFAULT_QUALITY;
- lf.lfStrikeOut = (decoration & font_decoration_linethrough) ? TRUE : FALSE;
- lf.lfUnderline = (decoration & font_decoration_underline) ? TRUE : FALSE;
+ lf.lfStrikeOut = (descr.decoration_line & text_decoration_line_line_through) ? TRUE : FALSE;
+ lf.lfUnderline = (descr.decoration_line & text_decoration_line_underline) ? TRUE : FALSE;
HFONT hFont = CreateFontIndirect(&lf);
if (fm) {
@@ -227,7 +227,7 @@ uint_ptr NSWebPage::create_font(const char *font_list, int size, int weight, fon
fm->descent = tm.tmDescent;
fm->height = tm.tmHeight;
fm->x_height = tm.tmHeight / 2; // this is an estimate; call GetGlyphOutline to get the real value
- fm->draw_spaces = italic || decoration;
+ fm->draw_spaces = lf.lfItalic || descr.decoration_line;
}
return (uint_ptr)hFont;
@@ -449,7 +449,7 @@ element::ptr NSWebPage::create_element(const char *, const string_map &, const d
void NSWebPage::get_media_features(media_features &media) const
{
position client;
- get_client_rect(client);
+ get_viewport(client);
media.type = media_type_screen;
media.width = client.width;
@@ -718,7 +718,7 @@ uint_ptr NSWebPage::get_image(LPCWSTR url_or_path, bool)
return (uint_ptr)pImage;
}
-void NSWebPage::get_client_rect(position &pos) const
+void NSWebPage::get_viewport(position &pos) const
{
pos = size(ctrl.cachedWindowWidth, ctrl.cachedWindowHeight);
}
diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp
index 5b947b20a8..43dc3e60cd 100644
--- a/plugins/NewXstatusNotify/src/main.cpp
+++ b/plugins/NewXstatusNotify/src/main.cpp
@@ -275,7 +275,7 @@ void LogSMsgToDB(STATUSMSGINFO *smi, const wchar_t *tmplt)
dbei.pBlob = blob;
dbei.eventType = EVENTTYPE_STATUSCHANGE;
dbei.flags = DBEF_READ | DBEF_UTF;
- dbei.timestamp = (uint32_t)time(0);
+ dbei.iTimestamp = (uint32_t)time(0);
dbei.szModule = MODULENAME;
MEVENT hDBEvent = db_event_add(smi->hContact, &dbei);
@@ -358,7 +358,7 @@ int ContactStatusChanged(MCONTACT hContact, uint16_t oldStatus, uint16_t newStat
dbei.pBlob = blob;
dbei.eventType = EVENTTYPE_STATUSCHANGE;
dbei.flags = DBEF_READ | DBEF_UTF;
- dbei.timestamp = (uint32_t)time(0);
+ dbei.iTimestamp = (uint32_t)time(0);
dbei.szModule = MODULENAME;
MEVENT hDBEvent = db_event_add(hContact, &dbei);
diff --git a/plugins/NewXstatusNotify/src/stdafx.cxx b/plugins/NewXstatusNotify/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/NewXstatusNotify/src/stdafx.cxx
+++ b/plugins/NewXstatusNotify/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/NewXstatusNotify/src/xstatus.cpp b/plugins/NewXstatusNotify/src/xstatus.cpp
index 8000ad64fe..f5e5e97b86 100644
--- a/plugins/NewXstatusNotify/src/xstatus.cpp
+++ b/plugins/NewXstatusNotify/src/xstatus.cpp
@@ -283,7 +283,7 @@ void LogChangeToDB(XSTATUSCHANGE *xsc)
dbei.pBlob = blob;
dbei.eventType = EVENTTYPE_STATUSCHANGE;
dbei.flags = DBEF_READ | DBEF_UTF;
- dbei.timestamp = (uint32_t)time(0);
+ dbei.iTimestamp = (uint32_t)time(0);
dbei.szModule = MODULENAME;
MEVENT hDBEvent = db_event_add(xsc->hContact, &dbei);
diff --git a/plugins/New_GPG/src/globals.h b/plugins/New_GPG/src/globals.h
index f044476986..03fdf6fdf9 100644
--- a/plugins/New_GPG/src/globals.h
+++ b/plugins/New_GPG/src/globals.h
@@ -1,4 +1,4 @@
-// Copyright © 2010-24 sss
+// Copyright © 2010-25 sss
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
diff --git a/plugins/New_GPG/src/gpg_wrapper.cpp b/plugins/New_GPG/src/gpg_wrapper.cpp
index c82a17f09d..826ae513c5 100644
--- a/plugins/New_GPG/src/gpg_wrapper.cpp
+++ b/plugins/New_GPG/src/gpg_wrapper.cpp
@@ -1,4 +1,4 @@
-// Copyright © 2010-24 sss
+// Copyright © 2010-25 sss
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
diff --git a/plugins/New_GPG/src/gpg_wrapper.h b/plugins/New_GPG/src/gpg_wrapper.h
index ddc2d52dc0..4375f727c5 100644
--- a/plugins/New_GPG/src/gpg_wrapper.h
+++ b/plugins/New_GPG/src/gpg_wrapper.h
@@ -1,4 +1,4 @@
-// Copyright © 2010-24 sss
+// Copyright © 2010-25 sss
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
diff --git a/plugins/New_GPG/src/icons.cpp b/plugins/New_GPG/src/icons.cpp
index 7abfd3226b..40b97391a5 100644
--- a/plugins/New_GPG/src/icons.cpp
+++ b/plugins/New_GPG/src/icons.cpp
@@ -1,4 +1,4 @@
-// Copyright © 2010-24 SecureIM developers (baloo and others), sss
+// Copyright © 2010-25 SecureIM developers (baloo and others), sss
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
diff --git a/plugins/New_GPG/src/init.cpp b/plugins/New_GPG/src/init.cpp
index 5b704c0e21..ef2e0130e1 100644
--- a/plugins/New_GPG/src/init.cpp
+++ b/plugins/New_GPG/src/init.cpp
@@ -1,4 +1,4 @@
-// Copyright © 2010-24 sss
+// Copyright © 2010-25 sss
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
diff --git a/plugins/New_GPG/src/jabber_account.h b/plugins/New_GPG/src/jabber_account.h
index 915070c904..df220bd526 100644
--- a/plugins/New_GPG/src/jabber_account.h
+++ b/plugins/New_GPG/src/jabber_account.h
@@ -1,4 +1,4 @@
-// Copyright © 2010-24 sss
+// Copyright © 2010-25 sss
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
diff --git a/plugins/New_GPG/src/log.cpp b/plugins/New_GPG/src/log.cpp
index 0de85622bc..7b75d8e230 100644
--- a/plugins/New_GPG/src/log.cpp
+++ b/plugins/New_GPG/src/log.cpp
@@ -1,4 +1,4 @@
-// Copyright © 2010-24 sss
+// Copyright © 2010-25 sss
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
diff --git a/plugins/New_GPG/src/log.h b/plugins/New_GPG/src/log.h
index 0080cec5d7..0b5bc8c0a7 100644
--- a/plugins/New_GPG/src/log.h
+++ b/plugins/New_GPG/src/log.h
@@ -1,4 +1,4 @@
-// Copyright © 2010-24 sss
+// Copyright © 2010-25 sss
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
diff --git a/plugins/New_GPG/src/main.cpp b/plugins/New_GPG/src/main.cpp
index 5a3cb524ca..1d36b0e12f 100644
--- a/plugins/New_GPG/src/main.cpp
+++ b/plugins/New_GPG/src/main.cpp
@@ -1,4 +1,4 @@
-// Copyright © 2010-24 sss
+// Copyright © 2010-25 sss
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
diff --git a/plugins/New_GPG/src/messages.cpp b/plugins/New_GPG/src/messages.cpp
index b3bd5e286c..3fad7df8d1 100644
--- a/plugins/New_GPG/src/messages.cpp
+++ b/plugins/New_GPG/src/messages.cpp
@@ -1,4 +1,4 @@
-// Copyright © 2010-24 sss
+// Copyright © 2010-25 sss
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
@@ -497,7 +497,7 @@ INT_PTR RecvMsgSvc(WPARAM w, LPARAM l)
if (!strstr(msg, "-----BEGIN PGP MESSAGE-----"))
return Proto_ChainRecv(w, ccs);
- mir_forkThread<RecvParams>(RecvMsgSvc_func, new RecvParams(ccs->hContact, str, msg, dbei->timestamp));
+ mir_forkThread<RecvParams>(RecvMsgSvc_func, new RecvParams(ccs->hContact, str, msg, dbei->getUnixtime()));
return 0;
}
diff --git a/plugins/New_GPG/src/metacontacts.cpp b/plugins/New_GPG/src/metacontacts.cpp
index 48bd07804c..7c1af2c338 100644
--- a/plugins/New_GPG/src/metacontacts.cpp
+++ b/plugins/New_GPG/src/metacontacts.cpp
@@ -1,4 +1,4 @@
-// Copyright © 2010-24 SecureIM developers (baloo and others), sss
+// Copyright © 2010-25 SecureIM developers (baloo and others), sss
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
diff --git a/plugins/New_GPG/src/metacontacts.h b/plugins/New_GPG/src/metacontacts.h
index 3ce0ac78b9..9006d5bfd0 100644
--- a/plugins/New_GPG/src/metacontacts.h
+++ b/plugins/New_GPG/src/metacontacts.h
@@ -1,4 +1,4 @@
-// Copyright © 2010-24 sss
+// Copyright © 2010-25 sss
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
diff --git a/plugins/New_GPG/src/options.cpp b/plugins/New_GPG/src/options.cpp
index 53a690aef4..052eea1561 100644
--- a/plugins/New_GPG/src/options.cpp
+++ b/plugins/New_GPG/src/options.cpp
@@ -1,4 +1,4 @@
-// Copyright © 2010-24 sss
+// Copyright © 2010-25 sss
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
diff --git a/plugins/New_GPG/src/options.h b/plugins/New_GPG/src/options.h
index 77c1d27aa1..a98532fd07 100644
--- a/plugins/New_GPG/src/options.h
+++ b/plugins/New_GPG/src/options.h
@@ -1,4 +1,4 @@
-// Copyright © 2017-24 sss
+// Copyright © 2017-25 sss
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
diff --git a/plugins/New_GPG/src/srmm.cpp b/plugins/New_GPG/src/srmm.cpp
index 81a67a6146..449c27ab9d 100644
--- a/plugins/New_GPG/src/srmm.cpp
+++ b/plugins/New_GPG/src/srmm.cpp
@@ -1,4 +1,4 @@
-// Copyright © 2010-24 SecureIM developers (baloo and others), sss
+// Copyright © 2010-25 SecureIM developers (baloo and others), sss
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
diff --git a/plugins/New_GPG/src/stdafx.cxx b/plugins/New_GPG/src/stdafx.cxx
index 87b7477097..72e87c2758 100644
--- a/plugins/New_GPG/src/stdafx.cxx
+++ b/plugins/New_GPG/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/New_GPG/src/stdafx.h b/plugins/New_GPG/src/stdafx.h
index 6a628c7960..efd28696b7 100644
--- a/plugins/New_GPG/src/stdafx.h
+++ b/plugins/New_GPG/src/stdafx.h
@@ -1,4 +1,4 @@
-// Copyright © 2010-24 sss
+// Copyright © 2010-25 sss
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
diff --git a/plugins/New_GPG/src/ui.cpp b/plugins/New_GPG/src/ui.cpp
index 766978e7e1..590bc207ff 100644
--- a/plugins/New_GPG/src/ui.cpp
+++ b/plugins/New_GPG/src/ui.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2017-24 sss
+// Copyright 2017-25 sss
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
diff --git a/plugins/New_GPG/src/ui.h b/plugins/New_GPG/src/ui.h
index 6b1c135be6..76a41aebad 100644
--- a/plugins/New_GPG/src/ui.h
+++ b/plugins/New_GPG/src/ui.h
@@ -1,4 +1,4 @@
-// Copyright © 2017-24 sss
+// Copyright © 2017-25 sss
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
diff --git a/plugins/New_GPG/src/utilities.cpp b/plugins/New_GPG/src/utilities.cpp
index 100221b89f..60c7139104 100644
--- a/plugins/New_GPG/src/utilities.cpp
+++ b/plugins/New_GPG/src/utilities.cpp
@@ -1,4 +1,4 @@
-// Copyright © 2010-24 sss
+// Copyright © 2010-25 sss
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
@@ -474,7 +474,7 @@ void HistoryLog(MCONTACT hContact, const char *msg, uint32_t _time, uint32_t fla
DBEVENTINFO dbei = {};
dbei.szModule = MODULENAME;
dbei.flags = DBEF_UTF | flags;
- dbei.timestamp = (_time) ? _time : (uint32_t)time(0);
+ dbei.iTimestamp = (_time) ? _time : (uint32_t)time(0);
dbei.cbBlob = (uint32_t)mir_strlen(msg) + 1;
dbei.pBlob = (char *)msg;
db_event_add(hContact, &dbei);
diff --git a/plugins/New_GPG/src/utilities.h b/plugins/New_GPG/src/utilities.h
index 661df90a70..319ba61dfd 100644
--- a/plugins/New_GPG/src/utilities.h
+++ b/plugins/New_GPG/src/utilities.h
@@ -1,4 +1,4 @@
-// Copyright © 2010-24 sss
+// Copyright © 2010-25 sss
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
diff --git a/plugins/New_GPG/src/version.h b/plugins/New_GPG/src/version.h
index 6dce5bcb37..4fe5ac78e3 100644
--- a/plugins/New_GPG/src/version.h
+++ b/plugins/New_GPG/src/version.h
@@ -10,4 +10,4 @@
#define __DESCRIPTION "New GPG encryption support plugin, based on code from old GPG plugin and SecureIM."
#define __AUTHOR "sss, Miranda NG Team"
#define __AUTHORWEB "https://miranda-ng.org/p/New_GPG"
-#define __COPYRIGHT "© 2010-24 sss, Miranda NG Team"
+#define __COPYRIGHT "© 2010-25 sss, Miranda NG Team"
diff --git a/plugins/NoHistory/src/stdafx.cxx b/plugins/NoHistory/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/NoHistory/src/stdafx.cxx
+++ b/plugins/NoHistory/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/NoHistory/src/version.h b/plugins/NoHistory/src/version.h
index c726ec4157..d1e82797e7 100644
--- a/plugins/NoHistory/src/version.h
+++ b/plugins/NoHistory/src/version.h
@@ -10,4 +10,4 @@
#define __DESCRIPTION "Prevent Miranda from storing any history."
#define __AUTHOR "Scott Ellis, NightFox"
#define __AUTHORWEB "https://miranda-ng.org/p/NoHistory"
-#define __COPYRIGHT "© 2005 Scott Ellis, 2010-17 NightFox, 2017-24 Miranda NG team"
+#define __COPYRIGHT "© 2005 Scott Ellis, 2010-17 NightFox, 2017-25 Miranda NG team"
diff --git a/plugins/NotesAndReminders/res/resource.rc b/plugins/NotesAndReminders/res/resource.rc
index 994629c5be..da8ba04b57 100644
--- a/plugins/NotesAndReminders/res/resource.rc
+++ b/plugins/NotesAndReminders/res/resource.rc
@@ -104,7 +104,7 @@ BEGIN
LTEXT "Use Sound",IDC_STATIC,31,185,90,8,0,WS_EX_RIGHT
COMBOBOX IDC_COMBO_SOUND,126,182,90,81,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "",IDC_BTN_PLAYSOUND,220,183,13,12,BS_ICON
- DEFPUSHBUTTON "&Add Reminder",IDC_ADDREMINDER,158,6,76,14
+ DEFPUSHBUTTON "&Add Reminder",IDOK,158,6,76,14
PUSHBUTTON "&Close",IDCANCEL,158,23,76,14
PUSHBUTTON "&View Reminders",IDC_VIEWREMINDERS,158,40,76,14
END
diff --git a/plugins/NotesAndReminders/src/options.cpp b/plugins/NotesAndReminders/src/options.cpp
index 3142a15eb9..a085181e33 100644
--- a/plugins/NotesAndReminders/src/options.cpp
+++ b/plugins/NotesAndReminders/src/options.cpp
@@ -299,13 +299,14 @@ public:
void onClick_Browse(CCtrlButton*)
{
- wchar_t s[MAX_PATH];
+ wchar_t s[MAX_PATH], wszFilter[MAX_PATH];
GetDlgItemText(m_hwnd, IDC_EDIT_ALTBROWSER, s, _countof(s));
+ mir_snwprintf(wszFilter, L"%s%c*.exe%c%s%c*.*%c", TranslateT("Executable Files"), 0, 0, TranslateT("All Files"), 0, 0);
OPENFILENAME ofn = {0};
ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400;
ofn.hwndOwner = m_hwnd;
- ofn.lpstrFilter = TranslateT("Executable Files\0*.exe\0All Files\0*.*\0\0");
+ ofn.lpstrFilter = wszFilter;
ofn.lpstrFile = s;
ofn.nMaxFile = _countof(s);
ofn.lpstrTitle = TranslateT("Select Executable");
diff --git a/plugins/NotesAndReminders/src/reminders.cpp b/plugins/NotesAndReminders/src/reminders.cpp
index a4853349ea..14837e440f 100644
--- a/plugins/NotesAndReminders/src/reminders.cpp
+++ b/plugins/NotesAndReminders/src/reminders.cpp
@@ -15,6 +15,11 @@
/////////////////////////////////////////////////////////////////////////////////////////
+static int date2int(const SYSTEMTIME &t)
+{
+ return (t.wYear * 1000 + t.wMonth) * 100 + t.wDay;
+}
+
static void RemoveReminderSystemEvent(struct REMINDERDATA *p);
enum REPEAT
@@ -122,7 +127,7 @@ static void RemoveReminderSystemEvent(REMINDERDATA *p)
if (!pev)
break;
- if ((ULONG)pev->lParam == p->uid && !pev->hContact && pev->pszService && !mir_strcmp(pev->pszService, MODULENAME"/OpenTriggeredReminder")) {
+ if ((ULONG)pev->lParam == p->uid && !pev->hContact && !mir_strcmp(pev->pszService, MODULENAME"/OpenTriggeredReminder")) {
if (!Clist_RemoveEvent(pev->hContact, pev->hDbEvent)) {
p->bSystemEventQueued = false;
if (QueuedReminderCount)
@@ -237,7 +242,7 @@ static bool LoadReminder(char *Value)
break;
case DATATAG_REPEAT:
- TempRem->RepeatMode = strtol(TVal, nullptr, 10) != 0;
+ TempRem->RepeatMode = strtol(TVal, nullptr, 10);
break;
}
}
@@ -704,31 +709,37 @@ protected:
FileTimeToSystemTime((FILETIME*)&savedLi, &pDate);
}
- return true;
}
+ else {
+ // user entered a custom value
+ wchar_t buf[32];
+ cmbTime.GetText(buf, _countof(buf));
- // user entered a custom value
- wchar_t buf[32];
- cmbTime.GetText(buf, _countof(buf));
+ int h, m;
+ if (!ParseTime(buf, &h, &m, FALSE, m_bRelativeCombo)) {
+ MessageBoxW(m_hwnd, TranslateT("The specified time is invalid."), _A2W(SECTIONNAME), MB_OK | MB_ICONWARNING);
+ return false;
+ }
- int h, m;
- if (!ParseTime(buf, &h, &m, FALSE, m_bRelativeCombo)) {
- MessageBox(cmbTime.GetParent()->GetHwnd(), TranslateT("The specified time is invalid."), _A2W(SECTIONNAME), MB_OK | MB_ICONWARNING);
- return false;
- }
+ // absolute time (on pDate)
+ if (ReformatTimeInput(savedLi, h, m, &pDate, nullptr))
+ return false;
- // absolute time (on pDate)
- if (ReformatTimeInput(savedLi, h, m, &pDate, nullptr))
- return false;
+ SYSTEMTIME tm;
+ GetSystemTime(&tm);
+ bool bTomorrow = date2int(tm) >= date2int(pDate) && (h * 60 + m) < (pDate.wHour * 60 + pDate.wMinute);
- pDate.wHour = h;
- pDate.wMinute = m;
- pDate.wSecond = 0;
- pDate.wMilliseconds = 0;
+ pDate.wHour = h;
+ pDate.wMinute = m;
+ pDate.wSecond = 0;
+ pDate.wMilliseconds = 0;
- ULONGLONG li;
- TzLocalSTToFileTime(&pDate, (FILETIME*)&li);
- FileTimeToSystemTime((FILETIME*)&li, &pDate);
+ ULONGLONG li;
+ TzLocalSTToFileTime(&pDate, (FILETIME *)&li);
+ if (bTomorrow)
+ li += (ULONGLONG)(24 * 3600) * FILETIME_TICKS_PER_SEC;
+ FileTimeToSystemTime((FILETIME *)&li, &pDate);
+ }
return true;
}
@@ -751,6 +762,14 @@ protected:
mir_subclassWindow(m_date.GetHwnd(), DatePickerWndProc);
}
+ void PopulateRepeatCombo(CCtrlCombo &ctrl)
+ {
+ ctrl.AddString(TranslateT("Don't repeat"), REPEAT::NONE);
+ ctrl.AddString(TranslateT("Repeat daily"), REPEAT::DAILY);
+ ctrl.AddString(TranslateT("Repeat weekly"), REPEAT::WEEKLY);
+ ctrl.AddString(TranslateT("Repeat monthly"), REPEAT::MONTHLY);
+ }
+
///////////////////////////////////////////////////////////////////////////////////////
// NOTE: may seem like a bit excessive time converstion and handling, but this is
// done in order to gracefully handle crossing daylight saving boundaries
@@ -840,8 +859,6 @@ protected:
// add from +1 to +23.5 (in half hour steps) if crossing daylight saving boundary it may be 22.5 or 24.5 hours
for (int i = 0; i < 50; i++) {
- UINT dt;
-
FileTimeToTzLocalST((FILETIME *)&li, &tm2);
if (i > 40) {
@@ -858,11 +875,8 @@ protected:
// icq-style display 1.0, 1.5 etc. hours even though that isn't accurate due to rounding
//mir_snwprintf(s, L"%02d:%02d (%d.%d %s)", (UINT)tm2.wHour, (UINT)tm2.wMinute, 1+(i>>1), (i&1) ? 5 : 0, lpszHours);
// display delta time more accurately to match reformatting (that icq doesn't do)
- dt = (UINT)((li / MinutesToFileTime) - (ref / MinutesToFileTime));
- if (dt < 60)
- mir_snwprintf(s, L"%02d:%02d (%d %s)", (UINT)tm2.wHour, (UINT)tm2.wMinute, dt, TranslateT("Minutes"));
- else
- mir_snwprintf(s, L"%02d:%02d (%d.%d %s)", (UINT)tm2.wHour, (UINT)tm2.wMinute, dt / 60, ((dt % 60) * 10) / 60, TranslateT("Hours"));
+ unsigned dt = (UINT)((li / MinutesToFileTime) - (ref / MinutesToFileTime));
+ mir_snwprintf(s, L"%02d:%02d", (UINT)tm2.wHour, (UINT)tm2.wMinute);
cmbTime.AddString(s, dt * 60);
li += 30ll * MinutesToFileTime;
@@ -878,6 +892,8 @@ protected:
int ReformatTimeInput(ULONGLONG savedLi, int h, int m, const SYSTEMTIME *pDateLocal, ULONGLONG *triggerRelUtcOut = nullptr)
{
+ wchar_t buf[64];
+
if (h < 0) {
// time value is an offset ('m' holds the offset in minutes)
if (m_bRelativeCombo) {
@@ -898,14 +914,8 @@ protected:
if (triggerRelUtcOut)
*triggerRelUtcOut = li;
- wchar_t buf[64];
- UINT dt = (UINT)((li / MinutesToFileTime) - (ref / MinutesToFileTime));
- if (dt < 60)
- mir_snwprintf(buf, L"%02d:%02d (%d %s)", h, m, dt, TranslateT("Minutes"));
- else
- mir_snwprintf(buf, L"%02d:%02d (%d.%d %s)", h, m, dt / 60, ((dt % 60) * 10) / 60, TranslateT("Hours"));
-
// search for preset
+ mir_snwprintf(buf, L"%02d:%02d", h, m);
int n = cmbTime.FindString(buf);
if (n != -1) {
cmbTime.SetCurSel(n);
@@ -921,7 +931,6 @@ protected:
}
// search for preset first
- wchar_t buf[64];
mir_snwprintf(buf, L"%02d:%02d", h, m);
int n = cmbTime.FindString(buf);
if (n != -1) {
@@ -983,7 +992,7 @@ protected:
// due to ending up at an undesired time (this way the user immediately notices something was wrong)
cmbTime.SetCurSel(0);
invalid_dst:
- MessageBox(cmbTime.GetParent()->GetHwnd(),
+ MessageBoxW(m_hwnd,
TranslateT("The specified time is invalid due to begin of daylight saving (summer time)."),
_A2W(SECTIONNAME), MB_OK | MB_ICONWARNING);
return 1;
@@ -993,11 +1002,7 @@ output_result:
if (triggerRelUtcOut)
*triggerRelUtcOut = li;
- UINT dt = (UINT)((li / MinutesToFileTime) - (ref / MinutesToFileTime));
- if (dt < 60)
- mir_snwprintf(buf, L"%02d:%02d (%d %s)", h, m, dt, TranslateT("Minutes"));
- else
- mir_snwprintf(buf, L"%02d:%02d (%d.%d %s)", h, m, dt / 60, ((dt % 60) * 10) / 60, TranslateT("Hours"));
+ mir_snwprintf(buf, L"%02d:%02d", h, m);
}
else {
// absolute time (00:00 to 23:59), clean up time to make sure it's not inside "missing" hour (will be rounded downward)
@@ -1115,17 +1120,21 @@ public:
BringWindowToTop(m_hwnd);
- PopulateTimeOffsetCombo();
-
- cmbRemindAgainIn.SetCurSel(0);
- chkAfter.SetState(true);
- chkOnDate.SetState(false);
-
if (m_pReminder->RepeatMode) {
chkOnDate.Hide();
chkAfter.Disable();
cmbRemindAgainIn.Disable();
+
+ PopulateRepeatCombo(cmbRemindAgainIn);
+ cmbRemindAgainIn.SetCurSel(m_pReminder->RepeatMode);
}
+ else {
+ PopulateTimeOffsetCombo();
+
+ cmbRemindAgainIn.SetCurSel(0);
+ chkOnDate.SetState(false);
+ }
+ chkAfter.SetState(true);
edtText.SendMsg(EM_LIMITTEXT, MAX_REMINDER_LEN, 0);
@@ -1317,13 +1326,12 @@ class CReminderFormDlg : public CReminderBaseDlg
CCtrlEdit edtText;
CCtrlCombo cmbMode, cmbSound, cmbRepeatSnd;
- CCtrlButton btnAdd, btnView, btnPlaySound;
+ CCtrlButton btnView, btnPlaySound;
public:
CReminderFormDlg(REMINDERDATA *pReminder = nullptr) :
CSuper(IDD_ADDREMINDER),
m_pReminder(pReminder),
- btnAdd(this, IDC_ADDREMINDER),
btnView(this, IDC_VIEWREMINDERS),
btnPlaySound(this, IDC_BTN_PLAYSOUND),
edtText(this, IDC_REMINDER),
@@ -1331,7 +1339,6 @@ public:
cmbSound(this, IDC_COMBO_SOUND),
cmbRepeatSnd(this, IDC_COMBO_REPEATSND)
{
- btnAdd.OnClick = Callback(this, &CReminderFormDlg::onClick_Add);
btnView.OnClick = Callback(this, &CReminderFormDlg::onClick_View);
btnPlaySound.OnClick = Callback(this, &CReminderFormDlg::onClick_PlaySound);
@@ -1341,16 +1348,13 @@ public:
bool OnInitDialog() override
{
// populate repeat mode combo
- cmbMode.AddString(TranslateT("Don't repeat"), REPEAT::NONE);
- cmbMode.AddString(TranslateT("Repeat daily"), REPEAT::DAILY);
- cmbMode.AddString(TranslateT("Repeat weekly"), REPEAT::WEEKLY);
- cmbMode.AddString(TranslateT("Repeat monthly"), REPEAT::MONTHLY);
+ PopulateRepeatCombo(cmbMode);
SYSTEMTIME tm;
// opening the edit reminder dialog (uses same dialog resource as add reminder)
if (m_pReminder) {
SetWindowText(m_hwnd, TranslateT("Reminder"));
- SetDlgItemText(m_hwnd, IDC_ADDREMINDER, TranslateT("&Update Reminder"));
+ SetDlgItemText(m_hwnd, IDOK, TranslateT("&Update Reminder"));
btnView.Hide();
cmbMode.SetCurSel(m_pReminder->RepeatMode);
@@ -1440,25 +1444,18 @@ public:
}
if (m_pReminder)
- SetFocus(GetDlgItem(m_hwnd, IDC_ADDREMINDER));
+ SetFocus(GetDlgItem(m_hwnd, IDOK));
else
SetFocus(edtText.GetHwnd());
return true;
}
- void OnDestroy() override
- {
- bNewReminderVisible = false;
- if (m_pReminder)
- m_pReminder->bVisible = false;
- }
-
- void onClick_Add(CCtrlButton*)
+ bool OnApply() override
{
SYSTEMTIME Date;
m_date.GetTime(&Date);
if (!GetTriggerTime(m_savedLi, Date))
- return;
+ return false;
int RepeatSound = cmbRepeatSnd.GetCurData();
if (RepeatSound == -1)
@@ -1496,8 +1493,14 @@ public:
edtText.SetTextA("");
JustSaveReminders();
NotifyList();
- if (bClose)
- Close();
+ return bClose;
+ }
+
+ void OnDestroy() override
+ {
+ bNewReminderVisible = false;
+ if (m_pReminder)
+ m_pReminder->bVisible = false;
}
void onClick_View(CCtrlButton*)
@@ -1790,7 +1793,7 @@ public:
break;
case ID_CONTEXTMENUREMINDER_DELETEALL:
- if (arReminders.getCount() && IDOK == MessageBox(m_hwnd, TranslateT("Are you sure you want to delete all reminders?"), _A2W(SECTIONNAME), MB_OKCANCEL)) {
+ if (arReminders.getCount() && IDOK == MessageBoxW(m_hwnd, TranslateT("Are you sure you want to delete all reminders?"), _A2W(SECTIONNAME), MB_OKCANCEL)) {
SetDlgItemTextA(m_hwnd, IDC_REMINDERDATA, "");
DeleteReminders();
RefreshList();
@@ -1799,7 +1802,7 @@ public:
case ID_CONTEXTMENUREMINDER_DELETE:
idx = m_list.GetSelectionMark();
- if (idx != -1 && IDOK == MessageBox(m_hwnd, TranslateT("Are you sure you want to delete this reminder?"), _A2W(SECTIONNAME), MB_OKCANCEL)) {
+ if (idx != -1 && IDOK == MessageBoxW(m_hwnd, TranslateT("Are you sure you want to delete this reminder?"), _A2W(SECTIONNAME), MB_OKCANCEL)) {
SetDlgItemTextA(m_hwnd, IDC_REMINDERDATA, "");
DeleteReminder(getData(idx));
JustSaveReminders();
@@ -1917,7 +1920,7 @@ INT_PTR PluginMenuCommandViewReminders(WPARAM, LPARAM)
INT_PTR PluginMenuCommandDeleteReminders(WPARAM, LPARAM)
{
if (arReminders.getCount())
- if (IDOK == MessageBox(nullptr, TranslateT("Are you sure you want to delete all reminders?"), TranslateT(SECTIONNAME), MB_OKCANCEL))
+ if (IDOK == MessageBoxW(nullptr, TranslateT("Are you sure you want to delete all reminders?"), TranslateT(SECTIONNAME), MB_OKCANCEL))
DeleteReminders();
return 0;
}
diff --git a/plugins/NotesAndReminders/src/resource.h b/plugins/NotesAndReminders/src/resource.h
index a0ef9bd712..d3fbe4161c 100644
--- a/plugins/NotesAndReminders/src/resource.h
+++ b/plugins/NotesAndReminders/src/resource.h
@@ -24,7 +24,6 @@
#define IDC_DISMISS 1001
#define IDC_REMINDERDATA 1001
#define IDC_REMINDAGAIN 1002
-#define IDC_ADDREMINDER 1002
#define IDC_ADDNEWREMINDER 1002
#define IDC_REMINDAGAININ 1003
#define IDC_AFTER 1004
diff --git a/plugins/NotesAndReminders/src/stdafx.cxx b/plugins/NotesAndReminders/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/NotesAndReminders/src/stdafx.cxx
+++ b/plugins/NotesAndReminders/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/NotifyAnything/src/stdafx.cxx b/plugins/NotifyAnything/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/NotifyAnything/src/stdafx.cxx
+++ b/plugins/NotifyAnything/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/Nudge/src/main.cpp b/plugins/Nudge/src/main.cpp
index 3ca4812eaf..f2cdd3aafc 100644
--- a/plugins/Nudge/src/main.cpp
+++ b/plugins/Nudge/src/main.cpp
@@ -285,7 +285,7 @@ void Nudge_SentStatus(CNudgeElement *n, MCONTACT hContact)
DBEVENTINFO dbei = {};
dbei.szModule = MODULENAME;
dbei.flags = DBEF_SENT | DBEF_UTF;
- dbei.timestamp = (uint32_t)time(0);
+ dbei.iTimestamp = (uint32_t)time(0);
dbei.eventType = 1;
dbei.cbBlob = (uint32_t)mir_strlen(buff) + 1;
dbei.pBlob = buff;
@@ -300,7 +300,7 @@ void Nudge_ShowStatus(CNudgeElement *n, MCONTACT hContact, uint32_t timestamp)
dbei.szModule = MODULENAME;
dbei.eventType = 1;
dbei.flags = DBEF_UTF;
- dbei.timestamp = timestamp;
+ dbei.iTimestamp = timestamp;
dbei.cbBlob = (uint32_t)mir_strlen(buff) + 1;
dbei.pBlob = buff;
db_event_add(hContact, &dbei);
diff --git a/plugins/Nudge/src/stdafx.cxx b/plugins/Nudge/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/Nudge/src/stdafx.cxx
+++ b/plugins/Nudge/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/OpenFolder/src/stdafx.cxx b/plugins/OpenFolder/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/OpenFolder/src/stdafx.cxx
+++ b/plugins/OpenFolder/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/PackUpdater/Src/Events.cpp b/plugins/PackUpdater/Src/Events.cpp
index c36a8b4b66..cf69ea00c5 100644
--- a/plugins/PackUpdater/Src/Events.cpp
+++ b/plugins/PackUpdater/Src/Events.cpp
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2011-24 Mataes
+Copyright (C) 2011-25 Mataes
This is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
diff --git a/plugins/PackUpdater/Src/Notifications.cpp b/plugins/PackUpdater/Src/Notifications.cpp
index 659b4dc8cd..438a4f6683 100644
--- a/plugins/PackUpdater/Src/Notifications.cpp
+++ b/plugins/PackUpdater/Src/Notifications.cpp
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2011-24 Mataes
+Copyright (C) 2011-25 Mataes
This is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
diff --git a/plugins/PackUpdater/Src/Notifications.h b/plugins/PackUpdater/Src/Notifications.h
index 633e133f56..e90d954d20 100644
--- a/plugins/PackUpdater/Src/Notifications.h
+++ b/plugins/PackUpdater/Src/Notifications.h
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2011-24 Mataes
+Copyright (C) 2011-25 Mataes
This is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
diff --git a/plugins/PackUpdater/Src/Options.cpp b/plugins/PackUpdater/Src/Options.cpp
index 4005b2efbd..db6b2ee955 100644
--- a/plugins/PackUpdater/Src/Options.cpp
+++ b/plugins/PackUpdater/Src/Options.cpp
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2011-24 Mataes
+Copyright (C) 2011-25 Mataes
This is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
diff --git a/plugins/PackUpdater/Src/PackUpdater.cpp b/plugins/PackUpdater/Src/PackUpdater.cpp
index e82a72b1db..2b5ea2cce1 100644
--- a/plugins/PackUpdater/Src/PackUpdater.cpp
+++ b/plugins/PackUpdater/Src/PackUpdater.cpp
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2011-24 Mataes
+Copyright (C) 2011-25 Mataes
This is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
diff --git a/plugins/PackUpdater/Src/Utils.cpp b/plugins/PackUpdater/Src/Utils.cpp
index 17b9f100f1..ca1a81a7df 100644
--- a/plugins/PackUpdater/Src/Utils.cpp
+++ b/plugins/PackUpdater/Src/Utils.cpp
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2011-24 Mataes
+Copyright (C) 2011-25 Mataes
This is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
diff --git a/plugins/PackUpdater/Src/stdafx.cxx b/plugins/PackUpdater/Src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/PackUpdater/Src/stdafx.cxx
+++ b/plugins/PackUpdater/Src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/PackUpdater/Src/stdafx.h b/plugins/PackUpdater/Src/stdafx.h
index 5eb8258738..ef2027ea2b 100644
--- a/plugins/PackUpdater/Src/stdafx.h
+++ b/plugins/PackUpdater/Src/stdafx.h
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2011-24 Mataes
+Copyright (C) 2011-25 Mataes
This is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
diff --git a/plugins/PackUpdater/Src/version.h b/plugins/PackUpdater/Src/version.h
index a2ad16fb60..abc8e236d6 100644
--- a/plugins/PackUpdater/Src/version.h
+++ b/plugins/PackUpdater/Src/version.h
@@ -10,4 +10,4 @@
#define __DESCRIPTION "Simple updater for Miranda NG premodified packs."
#define __AUTHOR "Mataes, ZERO_BiT"
#define __AUTHORWEB "https://miranda-ng.org/p/PackUpdater"
-#define __COPYRIGHT "© 2011-24 Mataes, 2007 ZERO_BiT"
+#define __COPYRIGHT "© 2011-25 Mataes, 2007 ZERO_BiT"
diff --git a/plugins/PasteIt/src/PasteIt.cpp b/plugins/PasteIt/src/PasteIt.cpp
index 2ae89ff3f9..2b398222ec 100644
--- a/plugins/PasteIt/src/PasteIt.cpp
+++ b/plugins/PasteIt/src/PasteIt.cpp
@@ -116,7 +116,7 @@ static void PasteIt(MCONTACT hContact, int mode)
dbei.eventType = EVENTTYPE_MESSAGE;
dbei.flags = DBEF_SENT;
dbei.szModule = szProto;
- dbei.timestamp = (uint32_t)time(0);
+ dbei.iTimestamp = (uint32_t)time(0);
dbei.cbBlob = (uint32_t)mir_strlen(pasteToWeb->szFileLink) + 1;
dbei.pBlob = pasteToWeb->szFileLink;
db_event_add(hContact, &dbei);
diff --git a/plugins/PasteIt/src/stdafx.cxx b/plugins/PasteIt/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/PasteIt/src/stdafx.cxx
+++ b/plugins/PasteIt/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/Ping/src/pingthread.cpp b/plugins/Ping/src/pingthread.cpp
index f8ad707c81..f2682f0715 100644
--- a/plugins/Ping/src/pingthread.cpp
+++ b/plugins/Ping/src/pingthread.cpp
@@ -465,7 +465,7 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar
}
else {
SetWindowLongPtr(hwnd, GWL_EXSTYLE, GetWindowLongPtr(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED);
- SetLayeredWindowAttributes(hwnd, RGB(0, 0, 0), (uint8_t)db_get_b(0, "CList", "Alpha", SETTING_ALPHA_DEFAULT), LWA_ALPHA);
+ SetLayeredWindowAttributes(hwnd, RGB(0, 0, 0), Clist::iAlpha, LWA_ALPHA);
}
}
@@ -479,23 +479,23 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar
case WM_ACTIVATE:
if (wParam == WA_INACTIVE) {
if ((HWND)wParam != hwnd)
- if (db_get_b(0, "CList", "Transparent", SETTING_TRANSPARENT_DEFAULT))
+ if (Clist::bTransparent)
if (transparentFocus)
SetTimer(hwnd, TM_AUTOALPHA, 250, nullptr);
}
else {
- if (db_get_b(0, "CList", "Transparent", SETTING_TRANSPARENT_DEFAULT)) {
+ if (Clist::bTransparent) {
KillTimer(hwnd, TM_AUTOALPHA);
- SetLayeredWindowAttributes(hwnd, RGB(0, 0, 0), (uint8_t)db_get_b(0, "CList", "Alpha", SETTING_ALPHA_DEFAULT), LWA_ALPHA);
+ SetLayeredWindowAttributes(hwnd, RGB(0, 0, 0), Clist::iAlpha, LWA_ALPHA);
transparentFocus = 1;
}
}
return DefWindowProc(hwnd, msg, wParam, lParam);
case WM_SETCURSOR:
- if (db_get_b(0, "CList", "Transparent", SETTING_TRANSPARENT_DEFAULT)) {
+ if (Clist::bTransparent) {
if (!transparentFocus && GetForegroundWindow() != hwnd) {
- SetLayeredWindowAttributes(hwnd, RGB(0, 0, 0), (uint8_t)db_get_b(0, "CList", "Alpha", SETTING_ALPHA_DEFAULT), LWA_ALPHA);
+ SetLayeredWindowAttributes(hwnd, RGB(0, 0, 0), Clist::iAlpha, LWA_ALPHA);
transparentFocus = 1;
SetTimer(hwnd, TM_AUTOALPHA, 250, nullptr);
}
@@ -521,9 +521,9 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar
if (inwnd != transparentFocus) { //change
transparentFocus = inwnd;
if (transparentFocus)
- SetLayeredWindowAttributes(hwnd, RGB(0, 0, 0), (uint8_t)db_get_b(0, "CList", "Alpha", SETTING_ALPHA_DEFAULT), LWA_ALPHA);
+ SetLayeredWindowAttributes(hwnd, RGB(0, 0, 0), Clist::iAlpha, LWA_ALPHA);
else
- SetLayeredWindowAttributes(hwnd, RGB(0, 0, 0), (uint8_t)db_get_b(0, "CList", "AutoAlpha", SETTING_AUTOALPHA_DEFAULT), LWA_ALPHA);
+ SetLayeredWindowAttributes(hwnd, RGB(0, 0, 0), Clist::iAutoAlpha, LWA_ALPHA);
}
if (!transparentFocus) KillTimer(hwnd, TM_AUTOALPHA);
return TRUE;
@@ -543,14 +543,14 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar
int sourceAlpha, destAlpha;
if (wParam) {
sourceAlpha = 0;
- destAlpha = (uint8_t)db_get_b(0, "CList", "Alpha", SETTING_AUTOALPHA_DEFAULT);
+ destAlpha = Clist::iAlpha;
SetLayeredWindowAttributes(hwnd, RGB(0, 0, 0), 0, LWA_ALPHA);
noRecurse = 1;
ShowWindow(hwnd, SW_SHOW);
noRecurse = 0;
}
else {
- sourceAlpha = (uint8_t)db_get_b(0, "CList", "Alpha", SETTING_AUTOALPHA_DEFAULT);
+ sourceAlpha = Clist::iAlpha;
destAlpha = 0;
}
for (startTick = GetTickCount();;) {
diff --git a/plugins/Ping/src/stdafx.cxx b/plugins/Ping/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/Ping/src/stdafx.cxx
+++ b/plugins/Ping/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/PluginUpdater/pu_stub/src/stdafx.cxx b/plugins/PluginUpdater/pu_stub/src/stdafx.cxx
index 87b7477097..72e87c2758 100644
--- a/plugins/PluginUpdater/pu_stub/src/stdafx.cxx
+++ b/plugins/PluginUpdater/pu_stub/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/PluginUpdater/src/DlgListNew.cpp b/plugins/PluginUpdater/src/DlgListNew.cpp
index 2ac37ce98d..7a15dd5a34 100644
--- a/plugins/PluginUpdater/src/DlgListNew.cpp
+++ b/plugins/PluginUpdater/src/DlgListNew.cpp
@@ -294,6 +294,17 @@ public:
FillList();
}
+ bool DownloadUpdate(FILEINFO *p, HNETLIBCONN nlc, TFileName wszBackupFolder)
+ {
+ if (DownloadFile(&p->File, nlc) != ERROR_SUCCESS)
+ return false;
+
+ if (!unzip(p->File.wszDiskPath, g_mirandaPath, wszBackupFolder, false))
+ PU::SafeDeleteFile(p->File.wszDiskPath); // remove .zip after successful update
+ db_unset(0, DB_MODULE_NEW_FILES, _T2A(p->wszOldName));
+ return true;
+ }
+
void Unpack()
{
// create needed folders after escalating priviledges. Folders creates when we actually install updates
@@ -303,21 +314,21 @@ public:
HNETLIBCONN nlc = nullptr;
int i = 0;
for (auto &p : *todo) {
- if (p->IsFiltered(m_wszFilter))
+ if (p->IsFiltered(m_wszFilter)) {
+ // this update is hidden from screen, so we do not update anything
+ if (p->bEnabled)
+ DownloadUpdate(p, nlc, wszBackupFolder);
continue;
+ }
m_list.EnsureVisible(i, FALSE);
if (p->bEnabled) {
// download update
m_list.SetItemText(i, 1, TranslateT("Downloading..."));
-
- if (DownloadFile(&p->File, nlc) == ERROR_SUCCESS) {
+ if (DownloadUpdate(p, nlc, wszBackupFolder))
m_list.SetItemText(i, 1, TranslateT("Succeeded."));
- if (!unzip(p->File.wszDiskPath, g_mirandaPath, wszBackupFolder, false))
- PU::SafeDeleteFile(p->File.wszDiskPath); // remove .zip after successful update
- db_unset(0, DB_MODULE_NEW_FILES, _T2A(p->wszOldName));
- }
- else m_list.SetItemText(i, 1, TranslateT("Failed!"));
+ else
+ m_list.SetItemText(i, 1, TranslateT("Failed!"));
}
else m_list.SetItemText(i, 1, TranslateT("Skipped."));
i++;
diff --git a/plugins/PluginUpdater/src/DlgUpdate.cpp b/plugins/PluginUpdater/src/DlgUpdate.cpp
index cd3d9a2402..e04c3561e2 100644
--- a/plugins/PluginUpdater/src/DlgUpdate.cpp
+++ b/plugins/PluginUpdater/src/DlgUpdate.cpp
@@ -85,37 +85,38 @@ class CUpdateDLg : public CDlgBase
uint32_t dwErrorCode;
for (auto &it : todo) {
- if (it->bEnabled) {
- if (it->bDeleteOnly) {
- // we need only to backup the old file
- TFileName wszBackFile;
- mir_snwprintf(wszBackFile, L"%s\\%s", wszBackupFolder, it->wszNewName + wcslen(g_mirandaPath) + 1);
- if (dwErrorCode = BackupFile(it->wszNewName, wszBackFile)) {
+ if (!it->bEnabled)
+ continue;
+
+ if (it->bDeleteOnly) {
+ // we need only to backup the old file
+ TFileName wszBackFile;
+ mir_snwprintf(wszBackFile, L"%s\\%s", wszBackupFolder, it->wszNewName + wcslen(g_mirandaPath) + 1);
+ if (dwErrorCode = BackupFile(it->wszNewName, wszBackFile)) {
LBL_Error:
- RollbackChanges(wszBackupFolder);
- Skin_PlaySound("updatefailed");
- CMStringW wszError(FORMAT, TranslateT("Unpack operation failed with error code=%d, update terminated"), dwErrorCode);
- MessageBox(pDlg->GetHwnd(), wszError, TranslateT("Plugin Updater"), MB_OK | MB_ICONERROR);
- pDlg->Close();
- return;
- }
+ RollbackChanges(wszBackupFolder);
+ Skin_PlaySound("updatefailed");
+ CMStringW wszError(FORMAT, TranslateT("Unpack operation failed with error code=%d, update terminated"), dwErrorCode);
+ MessageBox(pDlg->GetHwnd(), wszError, TranslateT("Plugin Updater"), MB_OK | MB_ICONERROR);
+ pDlg->Close();
+ return;
}
- else {
- // if file name differs, we also need to backup the old file here
- // otherwise it would be replaced by unzip
- if (_wcsicmp(it->wszOldName, it->wszNewName)) {
- TFileName wszSrcPath, wszBackFile;
- mir_snwprintf(wszSrcPath, L"%s\\%s", g_mirandaPath.get(), it->wszOldName);
- mir_snwprintf(wszBackFile, L"%s\\%s", wszBackupFolder, it->wszOldName);
- if (dwErrorCode = BackupFile(wszSrcPath, wszBackFile))
- goto LBL_Error;
- }
-
- if (dwErrorCode = unzip(it->File.wszDiskPath, g_mirandaPath, wszBackupFolder, true))
+ }
+ else {
+ // if file name differs, we also need to backup the old file here
+ // otherwise it would be replaced by unzip
+ if (_wcsicmp(it->wszOldName, it->wszNewName)) {
+ TFileName wszSrcPath, wszBackFile;
+ mir_snwprintf(wszSrcPath, L"%s\\%s", g_mirandaPath.get(), it->wszOldName);
+ mir_snwprintf(wszBackFile, L"%s\\%s", wszBackupFolder, it->wszOldName);
+ if (dwErrorCode = BackupFile(wszSrcPath, wszBackFile))
goto LBL_Error;
-
- PU::SafeDeleteFile(it->File.wszDiskPath); // remove .zip after successful update
}
+
+ if (dwErrorCode = unzip(it->File.wszDiskPath, g_mirandaPath, wszBackupFolder, true))
+ goto LBL_Error;
+
+ PU::SafeDeleteFile(it->File.wszDiskPath); // remove .zip after successful update
}
}
@@ -465,112 +466,7 @@ LBL_Error:
/////////////////////////////////////////////////////////////////////////////////////////
// building file list in the separate thread
-struct
-{
- wchar_t *oldName, *newName;
-}
-static renameTable[] =
-{
- { L"svc_dbepp.dll", L"Plugins\\dbeditorpp.dll" },
- { L"svc_crshdmp.dll", L"Plugins\\crashdumper.dll" },
- { L"crashdmp.dll", L"Plugins\\crashdumper.dll" },
- { L"crashrpt.dll", L"Plugins\\crashdumper.dll" },
- { L"attache.dll", L"Plugins\\crashdumper.dll" },
- { L"svc_vi.dll", L"Plugins\\crashdumper.dll" },
- { L"crashrpt.dll", L"Plugins\\crashdumper.dll" },
- { L"versioninfo.dll", L"Plugins\\crashdumper.dll" },
- { L"advsplashscreen.dll", L"Plugins\\splashscreen.dll" },
- { L"import_sa.dll", L"Plugins\\import.dll" },
- { L"newnr.dll", L"Plugins\\notesreminders.dll" },
- { L"dbtool.exe", nullptr },
- { L"dbtool_sa.exe", nullptr },
- { L"dbchecker.bat", nullptr },
- { L"fixme.cmd", nullptr },
- { L"mdbx_chk.exe", nullptr },
- { L"mdbx_dump.exe", nullptr },
- { L"mdbx_load.exe", nullptr },
- { L"clist_mw.dll", L"Plugins\\clist_nicer.dll" },
- { L"bclist.dll", L"Plugins\\clist_blind.dll" },
- { L"otr.dll", L"Plugins\\mirotr.dll" },
- { L"ttnotify.dll", L"Plugins\\tooltipnotify.dll" },
- { L"newstatusnotify.dll", L"Plugins\\newxstatusnotify.dll" },
- { L"rss.dll", L"Plugins\\newsaggregator.dll" },
- { L"dbx_3x.dll", L"Plugins\\dbx_mmap.dll" },
- { L"actman30.dll", L"Plugins\\actman.dll" },
- { L"skype.dll", L"Plugins\\skypeweb.dll" },
- { L"skypeclassic.dll", L"Plugins\\skypeweb.dll" },
- { L"historysweeper.dll", L"Plugins\\historysweeperlight.dll" },
- { L"advancedautoaway.dll", L"Plugins\\statusmanager.dll" },
- { L"keepstatus.dll", L"Plugins\\statusmanager.dll" },
- { L"startupstatus.dll", L"Plugins\\statusmanager.dll" },
- { L"dropbox.dll", L"Plugins\\cloudfile.dll" },
- { L"popup.dll", L"Plugins\\popupplus.dll" },
- { L"libaxolotl.mir", L"Libs\\libsignal.mir" },
-
- { L"dbx_mmap_sa.dll", L"Plugins\\dbx_mmap.dll" },
- { L"dbx_tree.dll", L"Plugins\\dbx_mmap.dll" },
- { L"rc4.dll", nullptr },
- { L"athena.dll", nullptr },
- { L"skypekit.exe", nullptr },
- { L"mir_app.dll", nullptr },
- { L"mir_core.dll", nullptr },
- { L"zlib.dll", nullptr },
-
- { L"quotes.dll", L"Plugins\\currencyrates.dll" },
- { L"proto_quotes.dll", L"Icons\\proto_currencyrates.dll" },
-
- { L"proto_newsaggr.dll", L"Icons\\proto_newsaggregator.dll" },
- { L"clienticons_*.dll", L"Icons\\fp_icons.dll" },
- { L"fp_*.dll", L"Icons\\fp_icons.dll" },
- { L"xstatus_icq.dll", nullptr },
-
- { L"langpack_*.txt", L"Languages\\*" },
-
- { L"pcre16.dll", nullptr },
- { L"clist_classic.dll", nullptr },
- { L"chat.dll", nullptr },
- { L"srmm.dll", nullptr },
- { L"stdchat.dll", nullptr },
- { L"stdurl.dll", nullptr },
- { L"stdidle.dll", nullptr },
- { L"stdfile.dll", nullptr },
- { L"stdhelp.dll", nullptr },
- { L"stdauth.dll", nullptr },
- { L"stdssl.dll", nullptr },
-
- { L"advaimg.dll", nullptr },
- { L"aim.dll", nullptr },
- { L"extraicons.dll", nullptr },
- { L"firstrun.dll", nullptr },
- { L"flashavatars.dll", nullptr },
- { L"gender.dll", nullptr },
- { L"gtalkext.dll", nullptr },
- { L"icq.dll", nullptr },
- { L"importtxt.dll", nullptr },
- { L"langman.dll", nullptr },
- { L"libcrypto-1_1.mir", nullptr },
- { L"libssl-1_1.mir", nullptr },
- { L"libtox.dll", nullptr },
- { L"lua53.dll", nullptr },
- { L"metacontacts.dll", nullptr },
- { L"mra.dll", nullptr },
- { L"modernopt.dll", nullptr },
- { L"msn.dll", nullptr },
- { L"msvcp100.dll", nullptr },
- { L"msvcr100.dll", nullptr },
- { L"mtextcontrol.dll", nullptr },
- { L"omegle.dll", nullptr },
- { L"openssl.dll", nullptr },
- { L"rate.dll", nullptr },
- { L"spamotron.dll", nullptr },
- { L"sms.dll", nullptr },
- { L"tlen.dll", nullptr },
- { L"xfire.dll", nullptr },
- { L"yahoo.dll", nullptr },
- { L"yahoogroups.dll", nullptr },
- { L"yapp.dll", nullptr },
- { L"WART-*.exe", nullptr },
-};
+RENAMETABLE g_arRename(50);
// Checks if file needs to be renamed and copies it in pNewName
// Returns true if smth. was copied
@@ -579,13 +475,13 @@ static bool CheckFileRename(const wchar_t *pwszFolder, const wchar_t *pwszOldNam
MFilePath fullOldPath;
fullOldPath.Format(L"%s\\%s", pwszFolder, pwszOldName);
- for (auto &it : renameTable) {
- if (wildcmpiw(pwszOldName, it.oldName)) {
- if (it.newName == nullptr)
+ for (auto &it : g_arRename) {
+ if (wildcmpiw(pwszOldName, it->wszSearch)) {
+ if (it->wszReplace == nullptr)
*pNewName = 0;
else {
- wcsncpy_s(pNewName, MAX_PATH, it.newName, _TRUNCATE);
- size_t cbLen = wcslen(it.newName) - 1;
+ wcsncpy_s(pNewName, MAX_PATH, it->wszReplace, _TRUNCATE);
+ size_t cbLen = wcslen(it->wszReplace) - 1;
if (pNewName[cbLen] == '*')
wcsncpy_s(pNewName + cbLen, MAX_PATH - cbLen, pwszOldName, _TRUNCATE);
@@ -786,7 +682,7 @@ static void CheckUpdates(void *)
ptrW updateUrl(GetDefaultUrl()), baseUrl;
SERVLIST hashes(50, CompareHashes);
- bool success = ParseHashes(updateUrl, baseUrl, hashes);
+ bool success = ParseHashes(updateUrl, baseUrl, hashes, &g_arRename);
if (success) {
if (hashes.getCount()) {
FILELIST *UpdateFiles = new FILELIST(20);
diff --git a/plugins/PluginUpdater/src/Utils.cpp b/plugins/PluginUpdater/src/Utils.cpp
index bfc68c97df..ecab59c7a0 100644
--- a/plugins/PluginUpdater/src/Utils.cpp
+++ b/plugins/PluginUpdater/src/Utils.cpp
@@ -29,7 +29,7 @@ int CompareHashes(const ServListEntry *p1, const ServListEntry *p2)
return _wcsicmp(p1->m_name, p2->m_name);
}
-bool ParseHashes(const wchar_t *pwszUrl, ptrW &baseUrl, SERVLIST &arHashes)
+bool ParseHashes(const wchar_t *pwszUrl, ptrW &baseUrl, SERVLIST &arHashes, RENAMETABLE *arRename)
{
REPLACEVARSARRAY vars[2];
vars[0].key.w = L"platform";
@@ -42,6 +42,9 @@ bool ParseHashes(const wchar_t *pwszUrl, ptrW &baseUrl, SERVLIST &arHashes)
baseUrl = Utils_ReplaceVarsW(pwszUrl, 0, vars);
+ if (arRename)
+ arRename->destroy();
+
// Download version info
FILEURL pFileUrl;
mir_snwprintf(pFileUrl.wszDownloadURL, L"%s/hashes.zip", baseUrl.get());
@@ -113,6 +116,21 @@ bool ParseHashes(const wchar_t *pwszUrl, ptrW &baseUrl, SERVLIST &arHashes)
fclose(fp);
DeleteFileW(wszTmpIni);
+ // building table of rules
+ mir_snwprintf(wszTmpIni, L"%s\\rules.txt", g_wszTempPath);
+ if (arRename) {
+ JSONNode root;
+ if (file2json(wszTmpIni, root))
+ for (auto &it : root["rules"]) {
+ Utf2T wszName(it.name());
+ if (it.isnull())
+ arRename->insert(new RenameTableItem(wszName, nullptr));
+ else
+ arRename->insert(new RenameTableItem(wszName, it.as_mstring()));
+ }
+ }
+ DeleteFileW(wszTmpIni);
+
if (bDoNotSwitchToStable) {
g_plugin.setByte(DB_SETTING_DONT_SWITCH_TO_STABLE, 1);
// Reset setting if needed
@@ -304,7 +322,11 @@ int BackupFile(wchar_t *pwszSrcFileName, wchar_t *pwszBackFileName)
PU::SafeCreateFilePath(pwszBackFileName);
- return PU::SafeMoveFile(pwszSrcFileName, pwszBackFileName);
+ if (int err = PU::SafeMoveFile(pwszSrcFileName, pwszBackFileName)) {
+ Netlib_LogfW(g_hNetlibUser, L"Error moving file %s to %s: %d", pwszSrcFileName, pwszBackFileName, err);
+ return err;
+ }
+ return 0;
}
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/PluginUpdater/src/stdafx.cxx b/plugins/PluginUpdater/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/PluginUpdater/src/stdafx.cxx
+++ b/plugins/PluginUpdater/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/PluginUpdater/src/stdafx.h b/plugins/PluginUpdater/src/stdafx.h
index 7053769c59..ca76ba0763 100644
--- a/plugins/PluginUpdater/src/stdafx.h
+++ b/plugins/PluginUpdater/src/stdafx.h
@@ -30,17 +30,17 @@ Boston, MA 02111-1307, USA.
// Miranda header files
#include <newpluginapi.h>
+#include <m_assocmgr.h>
#include <m_clist.h>
-#include <m_skin.h>
+#include <m_icolib.h>
+#include <m_gui.h>
+#include <m_hotkeys.h>
+#include <m_json.h>
#include <m_langpack.h>
+#include <m_netlib.h>
#include <m_options.h>
-#include <m_system.h>
#include <m_popup.h>
-#include <m_hotkeys.h>
-#include <m_netlib.h>
-#include <m_icolib.h>
-#include <m_assocmgr.h>
-#include <m_gui.h>
+#include <m_skin.h>
#include <m_folders.h>
@@ -233,6 +233,20 @@ typedef OBJLIST<ServListEntry> SERVLIST;
///////////////////////////////////////////////////////////////////////////////
+struct RenameTableItem
+{
+ RenameTableItem(const wchar_t *_1, const wchar_t *_2) :
+ wszSearch(mir_wstrdup(_1)),
+ wszReplace(mir_wstrdup(_2))
+ {}
+
+ ptrW wszSearch, wszReplace;
+};
+
+typedef OBJLIST<RenameTableItem> RENAMETABLE;
+
+///////////////////////////////////////////////////////////////////////////////
+
void InitPopupList();
void InitEvents();
@@ -249,7 +263,7 @@ void CALLBACK CheckUpdateOnStartup(void);
int BackupFile(wchar_t *pwszSrcFileName, wchar_t *pwszBackFileName);
-bool ParseHashes(const wchar_t *pwszUrl, ptrW &baseUrl, SERVLIST &arHashes);
+bool ParseHashes(const wchar_t *pwszUrl, ptrW &baseUrl, SERVLIST &arHashes, RENAMETABLE *arRename = nullptr);
int CompareHashes(const ServListEntry *p1, const ServListEntry *p2);
wchar_t* GetDefaultUrl();
diff --git a/plugins/PluginUpdater/src/unzipfile.cpp b/plugins/PluginUpdater/src/unzipfile.cpp
index 56457b07ee..2c661758fb 100644
--- a/plugins/PluginUpdater/src/unzipfile.cpp
+++ b/plugins/PluginUpdater/src/unzipfile.cpp
@@ -70,8 +70,10 @@ int extractCurrentFile(unzFile uf, wchar_t *pwszDestPath, wchar_t *pwszBackPath,
mir_ptr<char> buf((char *)mir_alloc(DATA_BUF_SIZE+1));
int err = unzGetCurrentFileInfo64(uf, &file_info, filename, sizeof(filename), buf, DATA_BUF_SIZE, nullptr, 0);
- if (err != UNZ_OK)
+ if (err != UNZ_OK) {
+ Netlib_LogfW(g_hNetlibUser, L"Error retrieving file info %S: %d", filename, err);
return err;
+ }
for (char *p = strchr(filename, '/'); p; p = strchr(p + 1, '/'))
*p = '\\';
@@ -88,8 +90,10 @@ int extractCurrentFile(unzFile uf, wchar_t *pwszDestPath, wchar_t *pwszBackPath,
if (!(file_info.external_fa & FILE_ATTRIBUTE_DIRECTORY)) {
err = unzOpenCurrentFile(uf);
- if (err != UNZ_OK)
+ if (err != UNZ_OK) {
+ Netlib_LogfW(g_hNetlibUser, L"Error opening file %s: %d", pwszNewName.get(), err);
return err;
+ }
if (pwszBackPath != nullptr) {
PrepareFileName(wszDestFile, _countof(wszDestFile), pwszDestPath, pwszNewName);
@@ -111,18 +115,25 @@ int extractCurrentFile(unzFile uf, wchar_t *pwszDestPath, wchar_t *pwszBackPath,
pwszFile2unzip = wszBackFile;
}
- HANDLE hFile = CreateFile(pwszFile2unzip, GENERIC_WRITE, FILE_SHARE_WRITE, nullptr, CREATE_ALWAYS, file_info.external_fa, nullptr);
- if (hFile == INVALID_HANDLE_VALUE)
- return GetLastError();
+ HANDLE hFile = CreateFileW(pwszFile2unzip, GENERIC_WRITE, FILE_SHARE_WRITE, nullptr, CREATE_ALWAYS, file_info.external_fa, nullptr);
+ if (hFile == INVALID_HANDLE_VALUE) {
+ err = GetLastError();
+ Netlib_LogfW(g_hNetlibUser, L"Error creating file %s: %d", pwszFile2unzip, err);
+ return err;
+ }
while (true) {
err = unzReadCurrentFile(uf, buf, DATA_BUF_SIZE);
- if (err <= 0)
+ if (err <= 0) {
+ if (err)
+ Netlib_LogfW(g_hNetlibUser, L"Error reading zipped file %s: %d", pwszFile2unzip, err);
break;
+ }
DWORD bytes;
if (!WriteFile(hFile, buf, err, &bytes, FALSE)) {
err = GetLastError();
+ Netlib_LogfW(g_hNetlibUser, L"Error writing file %s: %d", pwszFile2unzip, err);
break;
}
}
@@ -152,8 +163,10 @@ int unzip(const wchar_t *pwszZipFile, wchar_t *pwszDestPath, wchar_t *pwszBackPa
unzFile uf = unzOpen2_64(pwszZipFile, &ffunc);
if (uf) {
do {
- if (int err = extractCurrentFile(uf, pwszDestPath, pwszBackPath, ch))
+ if (int err = extractCurrentFile(uf, pwszDestPath, pwszBackPath, ch)) {
+ Netlib_LogfW(g_hNetlibUser, L"Error unzipping file %s: %d", pwszZipFile, err);
iErrorCode = err;
+ }
}
while (unzGoToNextFile(uf) == UNZ_OK);
unzClose(uf);
diff --git a/plugins/PluginUpdater/src/version.h b/plugins/PluginUpdater/src/version.h
index dfb62e414c..dde05d4a1f 100644
--- a/plugins/PluginUpdater/src/version.h
+++ b/plugins/PluginUpdater/src/version.h
@@ -1,7 +1,7 @@
#define __MAJOR_VERSION 0
#define __MINOR_VERSION 2
#define __RELEASE_NUM 1
-#define __BUILD_NUM 7
+#define __BUILD_NUM 8
#include <stdver.h>
@@ -10,4 +10,4 @@
#define __DESCRIPTION "Installs and updates plugins and other Miranda NG components."
#define __AUTHOR "Mataes, George Hazan"
#define __AUTHORWEB "https://miranda-ng.org/p/PluginUpdater"
-#define __COPYRIGHT "© 2012-24 Mataes, George Hazan"
+#define __COPYRIGHT "© 2012-25 Mataes, George Hazan"
diff --git a/plugins/Popup/src/opt_adv.cpp b/plugins/Popup/src/opt_adv.cpp
index 776fa2b6b2..2b97bbe5a0 100644
--- a/plugins/Popup/src/opt_adv.cpp
+++ b/plugins/Popup/src/opt_adv.cpp
@@ -62,7 +62,7 @@ void LoadOption_AdvOpts()
// Transparency
PopupOptions.bUseTransparency = g_plugin.getBool("UseTransparency", true);
- PopupOptions.Alpha = g_plugin.getByte("Alpha", SETTING_ALPHA_DEFAULT);
+ PopupOptions.Alpha = Clist::iAlpha;
PopupOptions.bOpaqueOnHover = g_plugin.getBool("OpaqueOnHover", true);
// Effects
diff --git a/plugins/Popup/src/popup_wnd2.cpp b/plugins/Popup/src/popup_wnd2.cpp
index e02ab97999..3511e67e2f 100644
--- a/plugins/Popup/src/popup_wnd2.cpp
+++ b/plugins/Popup/src/popup_wnd2.cpp
@@ -796,7 +796,7 @@ void AddMessageToDB(MCONTACT hContact, char *msg)
dbei.eventType = EVENTTYPE_MESSAGE;
dbei.flags = DBEF_SENT | DBEF_UTF;
dbei.szModule = Proto_GetBaseAccountName(hContact);
- dbei.timestamp = time(0);
+ dbei.iTimestamp = time(0);
dbei.cbBlob = (int)mir_strlen(msg) + 1;
dbei.pBlob = msg;
db_event_add(hContact, &dbei);
diff --git a/plugins/Popup/src/stdafx.cxx b/plugins/Popup/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/Popup/src/stdafx.cxx
+++ b/plugins/Popup/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/ProfileManager/src/stdafx.cxx b/plugins/ProfileManager/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/ProfileManager/src/stdafx.cxx
+++ b/plugins/ProfileManager/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/ProxySwitch/src/stdafx.cxx b/plugins/ProxySwitch/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/ProxySwitch/src/stdafx.cxx
+++ b/plugins/ProxySwitch/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/ProxySwitch/src/version.h b/plugins/ProxySwitch/src/version.h
index 4a660c43ec..44da54d6dc 100644
--- a/plugins/ProxySwitch/src/version.h
+++ b/plugins/ProxySwitch/src/version.h
@@ -10,4 +10,4 @@
#define __DESCRIPTION "Watches IP address changes, displays popups, and adjusts the proxy settings of Miranda, Internet Explorer and Firefox."
#define __AUTHOR "Petr Smejkal"
#define __AUTHORWEB "https://miranda-ng.org/p/ProxySwitch"
-#define __COPYRIGHT "© 2005 Petr Smejkal, 2018-24 Miranda NG team"
+#define __COPYRIGHT "© 2005 Petr Smejkal, 2018-25 Miranda NG team"
diff --git a/plugins/QuickContacts/src/dialog.cpp b/plugins/QuickContacts/src/dialog.cpp
index 56af002a8b..4ac1bb0c08 100644
--- a/plugins/QuickContacts/src/dialog.cpp
+++ b/plugins/QuickContacts/src/dialog.cpp
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/QuickContacts/src/stdafx.cxx b/plugins/QuickContacts/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/QuickContacts/src/stdafx.cxx
+++ b/plugins/QuickContacts/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/QuickMessages/src/stdafx.cxx b/plugins/QuickMessages/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/QuickMessages/src/stdafx.cxx
+++ b/plugins/QuickMessages/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/QuickReplies/src/stdafx.cxx b/plugins/QuickReplies/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/QuickReplies/src/stdafx.cxx
+++ b/plugins/QuickReplies/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/QuickSearch/src/main.cpp b/plugins/QuickSearch/src/main.cpp
index 71b68afecd..c25966e74f 100644
--- a/plugins/QuickSearch/src/main.cpp
+++ b/plugins/QuickSearch/src/main.cpp
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/QuickSearch/src/options.cpp b/plugins/QuickSearch/src/options.cpp
index 8b945f1fa4..41edd2ffea 100644
--- a/plugins/QuickSearch/src/options.cpp
+++ b/plugins/QuickSearch/src/options.cpp
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/QuickSearch/src/stdafx.cxx b/plugins/QuickSearch/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/QuickSearch/src/stdafx.cxx
+++ b/plugins/QuickSearch/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/QuickSearch/src/utils.cpp b/plugins/QuickSearch/src/utils.cpp
index 29fb4a4c2e..b2c25e1dee 100644
--- a/plugins/QuickSearch/src/utils.cpp
+++ b/plugins/QuickSearch/src/utils.cpp
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/QuickSearch/src/version.h b/plugins/QuickSearch/src/version.h
index 5c48b47527..f7c99f342a 100644
--- a/plugins/QuickSearch/src/version.h
+++ b/plugins/QuickSearch/src/version.h
@@ -10,4 +10,4 @@
#define __DESCRIPTION "This plugin allows you to quick search for nickname, firstname, lastname, email, uin in your contact list."
#define __AUTHOR "Bethoven, Awkward"
#define __AUTHORWEB "https://miranda-ng.org/p/QuickSearch"
-#define __COPYRIGHT "© 2004-05 Bethoven; 2006-13 Awkward; 2014-24 Miranda NG team"
+#define __COPYRIGHT "© 2004-05 Bethoven; 2006-13 Awkward; 2014-25 Miranda NG team"
diff --git a/plugins/QuickSearch/src/window.cpp b/plugins/QuickSearch/src/window.cpp
index a39f2761a6..efd1970d57 100644
--- a/plugins/QuickSearch/src/window.cpp
+++ b/plugins/QuickSearch/src/window.cpp
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it &/|
modify it under the terms of the GNU General Public License
diff --git a/plugins/QuickSearch/src/window_misc.cpp b/plugins/QuickSearch/src/window_misc.cpp
index c856533e51..add5897cf7 100644
--- a/plugins/QuickSearch/src/window_misc.cpp
+++ b/plugins/QuickSearch/src/window_misc.cpp
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it &/|
modify it under the terms of the GNU General Public License
diff --git a/plugins/QuickSearch/src/window_row.cpp b/plugins/QuickSearch/src/window_row.cpp
index ec040e1e29..26466253e6 100644
--- a/plugins/QuickSearch/src/window_row.cpp
+++ b/plugins/QuickSearch/src/window_row.cpp
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -39,7 +39,7 @@ CRowItem::CRowItem(MCONTACT _1, QSMainDlg *pDlg) :
if (bAccDel || bAccOff)
status = ID_STATUS_OFFLINE;
else
- status = Contact::GetStatus(hContact);
+ status = Contact::GetStatus(hContact, szProto);
if (int nCount = g_plugin.m_columns.getCount()) {
pValues = new Val[nCount];
@@ -156,7 +156,7 @@ void CRowItem::Val::LoadOneItem(MCONTACT hContact, const ColumnItem &pCol, QSMai
if (MEVENT hDbEvent = db_event_last(hContact)) {
DBEVENTINFO dbei = {};
db_event_get(hDbEvent, &dbei);
- data = dbei.timestamp;
+ data = dbei.getUnixtime();
text = TimeToStrW(data);
}
else text = 0;
diff --git a/plugins/RecentContacts/src/RecentContacts.cpp b/plugins/RecentContacts/src/RecentContacts.cpp
index 656434f9c2..80004c646d 100644
--- a/plugins/RecentContacts/src/RecentContacts.cpp
+++ b/plugins/RecentContacts/src/RecentContacts.cpp
@@ -386,8 +386,8 @@ INT_PTR OnMenuCommandShowList(WPARAM, LPARAM)
break;
}
if (curEvent != NULL)
- if (curTime == -1 || (__time64_t)dbe.timestamp > curTime)
- curTime = (__time64_t)dbe.timestamp;
+ if (curTime == -1 || (__time64_t)dbe.getUnixtime() > curTime)
+ curTime = (__time64_t)dbe.getUnixtime();
}
if (curTime != -1)
diff --git a/plugins/RecentContacts/src/stdafx.cxx b/plugins/RecentContacts/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/RecentContacts/src/stdafx.cxx
+++ b/plugins/RecentContacts/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/RemovePersonalSettings/src/rps.cpp b/plugins/RemovePersonalSettings/src/rps.cpp
index 08fc78ed2c..2d4c9b28f5 100644
--- a/plugins/RemovePersonalSettings/src/rps.cpp
+++ b/plugins/RemovePersonalSettings/src/rps.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (c) 2000-05 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/RemovePersonalSettings/src/stdafx.cxx b/plugins/RemovePersonalSettings/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/RemovePersonalSettings/src/stdafx.cxx
+++ b/plugins/RemovePersonalSettings/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/Restart/src/stdafx.cxx b/plugins/Restart/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/Restart/src/stdafx.cxx
+++ b/plugins/Restart/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/Scriver/src/chat_manager.cpp b/plugins/Scriver/src/chat_manager.cpp
index c4f3efa815..d56955d196 100644
--- a/plugins/Scriver/src/chat_manager.cpp
+++ b/plugins/Scriver/src/chat_manager.cpp
@@ -50,8 +50,7 @@ char SM_GetStatusIndicator(SESSION_INFO *si, USERINFO *ui)
if (!ui || !si)
return '\0';
- STATUSINFO *ti = g_chatApi.TM_FindStatus(si->pStatuses, g_chatApi.TM_WordToString(si->pStatuses, ui->Status));
- if (ti) {
+ if (auto *ti = Chat_GetStatus(si, ui)) {
switch (si->iStatusCount - ti->iIconIndex - 1) {
case 0: return '\0';
case 1: return '+';
diff --git a/plugins/Scriver/src/globals.cpp b/plugins/Scriver/src/globals.cpp
index 33d1f88998..1055ecf6fb 100644
--- a/plugins/Scriver/src/globals.cpp
+++ b/plugins/Scriver/src/globals.cpp
@@ -129,7 +129,7 @@ static int ackevent(WPARAM, LPARAM lParam)
dbei.eventType = EVENTTYPE_MESSAGE;
dbei.flags = DBEF_UTF | DBEF_SENT | (item->flags & DBEF_RTL);
dbei.szModule = Proto_GetBaseAccountName(hContact);
- dbei.timestamp = time(0);
+ dbei.iTimestamp = time(0);
dbei.cbBlob = (int)mir_strlen(item->sendBuffer) + 1;
dbei.pBlob = item->sendBuffer;
dbei.szId = (char *)pAck->lParam;
diff --git a/plugins/Scriver/src/input.cpp b/plugins/Scriver/src/input.cpp
index 6c95b288bf..6e39cfb461 100644
--- a/plugins/Scriver/src/input.cpp
+++ b/plugins/Scriver/src/input.cpp
@@ -47,11 +47,12 @@ void InputAreaContextMenu(HWND hwnd, WPARAM, LPARAM lParam, MCONTACT hContact)
if (!SendMessage(hwnd, EM_CANREDO, 0, 0))
EnableMenuItem(hSubMenu, IDM_REDO, MF_BYCOMMAND | MF_GRAYED);
- if (!SendMessage(hwnd, EM_CANPASTE, 0, 0)) {
- EnableMenuItem(hSubMenu, IDM_PASTESEND, MF_BYCOMMAND | MF_GRAYED);
- if (!IsClipboardFormatAvailable(CF_HDROP) && !IsClipboardFormatAvailable(CF_BITMAP))
+ if (!SendMessage(hwnd, EM_CANPASTE, 0, 0))
+ if (!IsClipboardFormatAvailable(CF_HDROP) && !IsClipboardFormatAvailable(CF_BITMAP)) {
EnableMenuItem(hSubMenu, IDM_PASTE, MF_BYCOMMAND | MF_GRAYED);
- }
+ EnableMenuItem(hSubMenu, IDM_PASTESEND, MF_BYCOMMAND | MF_GRAYED);
+ }
+
if (lParam == 0xFFFFFFFF) {
SendMessage(hwnd, EM_POSFROMCHAR, (WPARAM)&pt, (LPARAM)sel.cpMax);
ClientToScreen(hwnd, &pt);
@@ -167,10 +168,8 @@ int CMsgDialog::InputAreaShortcuts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
PostMessage(m_hwnd, WM_COMMAND, IDC_QUOTE, 0);
return FALSE;
case KB_PASTESEND:
- if (SendMessage(hwnd, EM_CANPASTE, 0, 0)) {
- SendMessage(hwnd, EM_PASTESPECIAL, CF_UNICODETEXT, 0);
- PostMessage(m_hwnd, WM_COMMAND, IDOK, 0);
- }
+ SendMessage(hwnd, EM_PASTESPECIAL, CF_UNICODETEXT, 0);
+ PostMessage(m_hwnd, WM_COMMAND, IDOK, 0);
return FALSE;
}
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp
index 8e2132d2c3..8a21ea8ecd 100644
--- a/plugins/Scriver/src/msgdialog.cpp
+++ b/plugins/Scriver/src/msgdialog.cpp
@@ -75,7 +75,6 @@ CMsgDialog::CMsgDialog(MCONTACT hContact, bool bIncoming) :
m_btnQuote.OnClick = Callback(this, &CMsgDialog::onClick_Quote);
if (isChat()) {
- m_btnFilter.OnClick = Callback(this, &CMsgDialog::onClick_Filter);
m_btnNickList.OnClick = Callback(this, &CMsgDialog::onClick_ShowList);
m_splitterX.OnChange = Callback(this, &CMsgDialog::onChange_SplitterX);
@@ -187,8 +186,8 @@ bool CMsgDialog::OnInitDialog()
while (MEVENT hdbEvent = pCursor.FetchNext()) {
DBEVENTINFO dbei = {};
db_event_get(hdbEvent, &dbei);
- if (dbei.eventType == EVENTTYPE_MESSAGE && !(dbei.flags & DBEF_SENT)) {
- m_lastMessage = dbei.timestamp;
+ if (dbei.eventType == EVENTTYPE_MESSAGE && !dbei.bSent) {
+ m_lastMessage = dbei.getUnixtime();
break;
}
}
@@ -424,24 +423,6 @@ void CMsgDialog::onClick_ShowList(CCtrlButton *pButton)
Resize();
}
-void CMsgDialog::onClick_Filter(CCtrlButton *pButton)
-{
- if (!pButton->Enabled())
- return;
-
- m_bFilterEnabled = !m_bFilterEnabled;
- UpdateFilterButton();
-
- if (m_bFilterEnabled && !g_chatApi.bRightClickFilter)
- ShowFilterMenu();
- else {
- if (m_hwndFilter)
- SendMessage(m_hwndFilter, WM_CLOSE, 0, 0);
-
- RedrawLog();
- }
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
void CMsgDialog::onChange_SplitterX(CSplitter *pSplitter)
@@ -783,7 +764,7 @@ INT_PTR CMsgDialog::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
m_hDbUnreadEventFirst = 0;
while (hDbEvent != 0) {
DB::EventInfo dbei(hDbEvent, false);
- if (!(dbei.flags & DBEF_SENT) && dbei.isSrmm())
+ if (!dbei.bSent && dbei.isSrmm())
Clist_RemoveEvent(-1, hDbEvent);
hDbEvent = db_event_next(m_hContact, hDbEvent);
}
diff --git a/plugins/Scriver/src/msglog.cpp b/plugins/Scriver/src/msglog.cpp
index 9cfc82d963..16b9533dd5 100644
--- a/plugins/Scriver/src/msglog.cpp
+++ b/plugins/Scriver/src/msglog.cpp
@@ -44,7 +44,7 @@ bool DbEventIsShown(const DB::EventInfo &dbei)
switch (dbei.eventType) {
case EVENTTYPE_JABBER_CHATSTATES:
case EVENTTYPE_JABBER_PRESENCE:
- return 0;
+ return false;
}
return dbei.isSrmm();
@@ -384,7 +384,7 @@ public:
if ((gdat->flags.bGroupMessages) && dbei.flags == LOWORD(m_lastEventType) &&
dbei.eventType == EVENTTYPE_MESSAGE && HIWORD(m_lastEventType) == EVENTTYPE_MESSAGE &&
- (isSameDate(dbei.timestamp, m_lastEventTime)) && ((((int)dbei.timestamp < m_startTime) == (m_lastEventTime < m_startTime)) || !(dbei.flags & DBEF_READ))) {
+ (isSameDate(dbei.getUnixtime(), m_lastEventTime)) && ((((int)dbei.getUnixtime() < m_startTime) == (m_lastEventTime < m_startTime)) || !dbei.bRead)) {
isGroupBreak = FALSE;
}
@@ -393,7 +393,7 @@ public:
// test contact
if (streamData->dbei == 0) {
- if (dbei.flags & DBEF_SENT)
+ if (dbei.bSent)
wszNick = Contact::GetInfo(CNF_DISPLAY, 0, m_pDlg.m_szProto);
else
wszNick = mir_wstrdup(Clist_GetContactDisplayName(m_pDlg.m_hContact));
@@ -401,7 +401,7 @@ public:
if (!m_pDlg.m_bUseRtl && Utils_IsRtl(wszText))
bIsRtl = true;
}
- else wszNick = mir_wstrdup((dbei.flags & DBEF_SENT) ? TranslateT("Me") : TranslateT("My contact"));
+ else wszNick = mir_wstrdup(dbei.bSent ? TranslateT("Me") : TranslateT("My contact"));
if (!streamData->isFirst && !m_isMixed) {
if (isGroupBreak || gdat->flags.bMarkFollowups)
@@ -419,7 +419,7 @@ public:
buf.Append(bIsRtl ? "\\rtlpar" : "\\ltrpar");
if (dbei.eventType == EVENTTYPE_MESSAGE)
- highlight = fontOptionsListSize + 2 + ((dbei.flags & DBEF_SENT) ? 1 : 0);
+ highlight = fontOptionsListSize + 2 + (dbei.bSent ? 1 : 0);
else
highlight = fontOptionsListSize + 1;
@@ -444,7 +444,7 @@ public:
case EVENTTYPE_MESSAGE:
if (dbei.flags & (DBEF_SECURE | DBEF_STRONG))
i = (dbei.flags & DBEF_SECURE) ? LOGICON_MSG_SECURE : LOGICON_MSG_STRONG;
- else if (dbei.flags & DBEF_SENT)
+ else if (dbei.bSent)
i = LOGICON_MSG_OUT;
else
i = LOGICON_MSG_IN;
@@ -466,29 +466,29 @@ public:
if (gdat->flags.bGroupMessages && dbei.eventType == EVENTTYPE_MESSAGE) {
if (isGroupBreak) {
if (!gdat->flags.bMarkFollowups)
- timestampString = TimestampToString(gdat->flags, dbei.timestamp, 0);
+ timestampString = TimestampToString(gdat->flags, dbei.getUnixtime(), 0);
else if (gdat->flags.bShowDate)
- timestampString = TimestampToString(gdat->flags, dbei.timestamp, 1);
+ timestampString = TimestampToString(gdat->flags, dbei.getUnixtime(), 1);
}
else if (gdat->flags.bMarkFollowups)
- timestampString = TimestampToString(gdat->flags, dbei.timestamp, 2);
+ timestampString = TimestampToString(gdat->flags, dbei.getUnixtime(), 2);
}
- else timestampString = TimestampToString(gdat->flags, dbei.timestamp, 0);
+ else timestampString = TimestampToString(gdat->flags, dbei.getUnixtime(), 0);
if (timestampString != nullptr) {
- buf.AppendFormat("%s ", SetToStyle(dbei.flags & DBEF_SENT ? MSGFONTID_MYTIME : MSGFONTID_YOURTIME));
+ buf.AppendFormat("%s ", SetToStyle(dbei.bSent ? MSGFONTID_MYTIME : MSGFONTID_YOURTIME));
AppendUnicodeToBuffer(buf, timestampString);
}
if (dbei.eventType != EVENTTYPE_MESSAGE)
- buf.AppendFormat("%s: ", SetToStyle(dbei.flags & DBEF_SENT ? MSGFONTID_MYCOLON : MSGFONTID_YOURCOLON));
+ buf.AppendFormat("%s: ", SetToStyle(dbei.bSent ? MSGFONTID_MYCOLON : MSGFONTID_YOURCOLON));
showColon = 1;
}
if ((!(gdat->flags.bHideNames) && dbei.eventType == EVENTTYPE_MESSAGE && isGroupBreak) || dbei.eventType == EVENTTYPE_JABBER_CHATSTATES || dbei.eventType == EVENTTYPE_JABBER_PRESENCE) {
if (dbei.eventType == EVENTTYPE_MESSAGE) {
if (showColon)
- buf.AppendFormat(" %s ", SetToStyle(dbei.flags & DBEF_SENT ? MSGFONTID_MYNAME : MSGFONTID_YOURNAME));
+ buf.AppendFormat(" %s ", SetToStyle(dbei.bSent ? MSGFONTID_MYNAME : MSGFONTID_YOURNAME));
else
- buf.AppendFormat("%s ", SetToStyle(dbei.flags & DBEF_SENT ? MSGFONTID_MYNAME : MSGFONTID_YOURNAME));
+ buf.AppendFormat("%s ", SetToStyle(dbei.bSent ? MSGFONTID_MYNAME : MSGFONTID_YOURNAME));
}
else buf.AppendFormat("%s ", SetToStyle(MSGFONTID_NOTICE));
@@ -505,15 +505,15 @@ public:
}
if (gdat->flags.bShowTime && gdat->flags.bGroupMessages && gdat->flags.bMarkFollowups && dbei.eventType == EVENTTYPE_MESSAGE && isGroupBreak) {
- buf.AppendFormat(" %s ", SetToStyle(dbei.flags & DBEF_SENT ? MSGFONTID_MYTIME : MSGFONTID_YOURTIME));
- AppendUnicodeToBuffer(buf, TimestampToString(gdat->flags, dbei.timestamp, 2));
+ buf.AppendFormat(" %s ", SetToStyle(dbei.bSent ? MSGFONTID_MYTIME : MSGFONTID_YOURTIME));
+ AppendUnicodeToBuffer(buf, TimestampToString(gdat->flags, dbei.getUnixtime(), 2));
showColon = 1;
}
if (showColon && dbei.eventType == EVENTTYPE_MESSAGE) {
if (bIsRtl)
- buf.AppendFormat("\\~%s: ", SetToStyle(dbei.flags & DBEF_SENT ? MSGFONTID_MYCOLON : MSGFONTID_YOURCOLON));
+ buf.AppendFormat("\\~%s: ", SetToStyle(dbei.bSent ? MSGFONTID_MYCOLON : MSGFONTID_YOURCOLON));
else
- buf.AppendFormat("%s: ", SetToStyle(dbei.flags & DBEF_SENT ? MSGFONTID_MYCOLON : MSGFONTID_YOURCOLON));
+ buf.AppendFormat("%s: ", SetToStyle(dbei.bSent ? MSGFONTID_MYCOLON : MSGFONTID_YOURCOLON));
}
switch (dbei.eventType) {
case EVENTTYPE_JABBER_CHATSTATES:
@@ -528,7 +528,7 @@ public:
break;
}
- if (dbei.flags & DBEF_SENT)
+ if (dbei.bSent)
AppendUnicodeToBuffer(buf, TranslateT("File sent"));
else
AppendUnicodeToBuffer(buf, TranslateT("File received"));
@@ -544,7 +544,7 @@ public:
if (gdat->flags.bMsgOnNewline && showColon)
buf.Append("\\line");
- style = dbei.flags & DBEF_SENT ? MSGFONTID_MYMSG : MSGFONTID_YOURMSG;
+ style = dbei.bSent ? MSGFONTID_MYMSG : MSGFONTID_YOURMSG;
AppendWithCustomLinks(dbei, style, buf);
break;
}
@@ -552,7 +552,7 @@ public:
if (m_isMixed)
buf.Append("\\par");
- m_lastEventTime = dbei.timestamp;
+ m_lastEventTime = dbei.getUnixtime();
m_lastEventType = MAKELONG(dbei.flags, dbei.eventType);
return true;
}
@@ -810,7 +810,7 @@ void StreamInTestEvents(CDlgBase *pDlg, GlobalMessageData *gdat)
DB::EventInfo dbei;
dbei.flags = DBEF_UTF;
dbei.eventType = EVENTTYPE_MESSAGE;
- dbei.timestamp = time(0);
+ dbei.iTimestamp = time(0);
dbei.szModule = SRMM_MODULE;
auto *pLog = new CLogWindow(*(CMsgDialog*)pDlg);
diff --git a/plugins/Scriver/src/msgoptions.cpp b/plugins/Scriver/src/msgoptions.cpp
index 3be675019a..0f510eb963 100644
--- a/plugins/Scriver/src/msgoptions.cpp
+++ b/plugins/Scriver/src/msgoptions.cpp
@@ -777,7 +777,7 @@ public:
void onResetClist(CCtrlClc *)
{
- m_list.SetUseGroups(Clist::UseGroups);
+ m_list.SetUseGroups(Clist::bUseGroups);
m_list.SetHideEmptyGroups(true);
}
};
diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp
index 505e3170db..298fe9c5b7 100644
--- a/plugins/Scriver/src/msgs.cpp
+++ b/plugins/Scriver/src/msgs.cpp
@@ -121,10 +121,10 @@ static int MessageEventAdded(WPARAM hContact, LPARAM hDbEvent)
if (!dbei)
return 0;
- if (dbei.eventType == EVENTTYPE_MESSAGE && (dbei.flags & DBEF_READ))
+ if (dbei.eventType == EVENTTYPE_MESSAGE && dbei.bRead)
return 0;
- if (dbei.flags & DBEF_SENT || !dbei.isSrmm())
+ if (dbei.bSent || !dbei.isSrmm())
return 0;
Utils_InvokeAsync(new CAutoPpopup(hContact, hDbEvent));
@@ -249,7 +249,7 @@ struct MSavedEvent
static void RestoreUnreadMessageAlerts(void)
{
- OBJLIST<MSavedEvent> arEvents(10, NumericKeySortT);
+ OBJLIST<MSavedEvent> events(10, NumericKeySortT);
for (auto &hContact : Contacts()) {
if (Contact::IsGroupChat(hContact) || !Proto_GetBaseAccountName(hContact))
@@ -259,7 +259,7 @@ static void RestoreUnreadMessageAlerts(void)
DB::EventInfo dbei(hDbEvent, false);
if (!dbei)
continue;
- if (dbei.markedRead() || !dbei.isSrmm() || !Proto_GetBaseAccountName(hContact))
+ if (dbei.bRead || !dbei.isSrmm() || !Proto_GetBaseAccountName(hContact))
continue;
int windowAlreadyExists = Srmm_FindWindow(hContact) != nullptr;
@@ -269,11 +269,11 @@ static void RestoreUnreadMessageAlerts(void)
if (IsAutoPopup(hContact) && !windowAlreadyExists)
(new CMsgDialog(hContact, true))->Show();
else
- arEvents.insert(new MSavedEvent(hContact, hDbEvent));
+ events.insert(new MSavedEvent(hContact, hDbEvent));
}
}
- for (auto &e : arEvents)
+ for (auto &e : events)
Srmm_AddEvent(e->hContact, e->hEvent);
}
@@ -428,14 +428,14 @@ int RegisterToolbarIcons(WPARAM, LPARAM)
bbd.dwDefPos = 30;
bbd.hIcon = g_plugin.getIconHandle(IDI_COLOR);
bbd.pwszText = LPGENW("&Color");
- bbd.pwszTooltip = LPGENW("Select a foreground color for the text");
+ bbd.pwszTooltip = LPGENW("Select text color");
g_plugin.addButton(&bbd);
bbd.dwButtonID = IDC_SRMM_BKGCOLOR;
bbd.dwDefPos = 35;
bbd.hIcon = g_plugin.getIconHandle(IDI_BKGCOLOR);
bbd.pwszText = LPGENW("&Background color");
- bbd.pwszTooltip = LPGENW("Select a background color for the text");
+ bbd.pwszTooltip = LPGENW("Select background color");
g_plugin.addButton(&bbd);
// chat buttons
diff --git a/plugins/Scriver/src/msgs.h b/plugins/Scriver/src/msgs.h
index 1b6e3572d9..caf2a9bffa 100644
--- a/plugins/Scriver/src/msgs.h
+++ b/plugins/Scriver/src/msgs.h
@@ -111,7 +111,6 @@ public:
void onClick_Ok(CCtrlButton *);
void onClick_Add(CCtrlButton *);
- void onClick_Filter(CCtrlButton *);
void onClick_Details(CCtrlButton *);
void onClick_Quote(CCtrlButton *);
void onClick_UserMenu(CCtrlButton *);
@@ -166,7 +165,6 @@ public:
}
wchar_t *m_wszInitialText;
- MWindow m_hwndFilter;
void Reattach(HWND hwndContainer);
};
diff --git a/plugins/Scriver/src/msgutils.cpp b/plugins/Scriver/src/msgutils.cpp
index 05159ea6ba..89a5b817d2 100644
--- a/plugins/Scriver/src/msgutils.cpp
+++ b/plugins/Scriver/src/msgutils.cpp
@@ -84,7 +84,7 @@ void CMsgDialog::EventAdded(MEVENT hDbEvent, const DB::EventInfo &dbei)
/* store the event when the container is hidden so that clist notifications can be removed */
if (!IsWindowVisible(m_hwndParent) && m_hDbUnreadEventFirst == 0)
m_hDbUnreadEventFirst = hDbEvent;
- m_lastMessage = dbei.timestamp;
+ m_lastMessage = dbei.getUnixtime();
UpdateStatusBar();
if (bIsActive)
Skin_PlaySound("RecvMsgActive");
@@ -101,7 +101,7 @@ void CMsgDialog::EventAdded(MEVENT hDbEvent, const DB::EventInfo &dbei)
else
RemakeLog();
- if (!(dbei.flags & DBEF_SENT) && !dbei.isCustom(DETF_MSGWINDOW)) {
+ if (!dbei.bSent && !dbei.isCustom(DETF_MSGWINDOW)) {
if (!bIsActive) {
m_iShowUnread = 1;
UpdateIcon();
@@ -122,7 +122,7 @@ bool CMsgDialog::GetFirstEvent()
m_hDbEventFirst = db_event_firstUnread(m_hContact);
if (m_hDbEventFirst != 0) {
DB::EventInfo dbei(m_hDbEventFirst, false);
- if (dbei.isSrmm() && !(dbei.flags & DBEF_READ) && !(dbei.flags & DBEF_SENT))
+ if (dbei.isSrmm() && !dbei.bRead && !dbei.bSent)
notifyUnread = true;
}
@@ -147,11 +147,11 @@ bool CMsgDialog::GetFirstEvent()
case LOADHISTORY_TIME:
if (m_hDbEventFirst == 0)
- dbei.timestamp = time(0);
+ dbei.iTimestamp = time(0);
else
db_event_get(m_hDbEventFirst, &dbei);
- uint32_t firstTime = dbei.timestamp - 60 * g_plugin.iLoadTime;
+ uint32_t firstTime = dbei.getUnixtime() - 60 * g_plugin.iLoadTime;
for (;;) {
hPrevEvent = pCursor.FetchNext();
if (hPrevEvent == 0)
@@ -159,7 +159,7 @@ bool CMsgDialog::GetFirstEvent()
dbei.cbBlob = 0;
db_event_get(hPrevEvent, &dbei);
- if (dbei.timestamp < firstTime)
+ if (dbei.getUnixtime() < firstTime)
break;
if (DbEventIsShown(dbei))
m_hDbEventFirst = hPrevEvent;
diff --git a/plugins/Scriver/src/sendqueue.cpp b/plugins/Scriver/src/sendqueue.cpp
index a450e2f280..54c663bdb4 100644
--- a/plugins/Scriver/src/sendqueue.cpp
+++ b/plugins/Scriver/src/sendqueue.cpp
@@ -25,23 +25,23 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
using namespace SendQueue;
-static OBJLIST<Item> arQueue(1, PtrKeySortT);
-static mir_cs queueMutex;
+static OBJLIST<Item> g_arQueue(1, PtrKeySortT);
+static mir_cs g_csQueue;
Item* SendQueue::CreateItem(CMsgDialog *pDlg)
{
Item *item = new Item();
item->pDlg = pDlg;
- mir_cslock lck(queueMutex);
- arQueue.insert(item);
+ mir_cslock lck(g_csQueue);
+ g_arQueue.insert(item);
return item;
}
Item* SendQueue::FindOldestPendingItem(CMsgDialog *pDlg, MCONTACT hContact)
{
- mir_cslock lck(queueMutex);
- for (auto &it : arQueue)
+ mir_cslock lck(g_csQueue);
+ for (auto &it : g_arQueue)
if (it->pDlg == pDlg && it->hContact == hContact && it->hwndErrorDlg == nullptr)
return it;
@@ -50,8 +50,8 @@ Item* SendQueue::FindOldestPendingItem(CMsgDialog *pDlg, MCONTACT hContact)
Item* SendQueue::FindItem(MCONTACT hContact, HANDLE hSendId)
{
- mir_cslock lock(queueMutex);
- for (auto &it : arQueue)
+ mir_cslock lock(g_csQueue);
+ for (auto &it : g_arQueue)
if (it->hContact == hContact && HANDLE(it->hSendId) == hSendId)
return it;
@@ -62,11 +62,11 @@ bool SendQueue::RemoveItem(Item *item)
{
auto *pDlg = item->pDlg;
{
- mir_cslock lock(queueMutex);
- arQueue.remove(item);
+ mir_cslock lock(g_csQueue);
+ g_arQueue.remove(item);
}
- for (auto &it : arQueue)
+ for (auto &it : g_arQueue)
if (it->pDlg == pDlg)
return false;
@@ -77,9 +77,9 @@ void SendQueue::ReportTimeouts(CMsgDialog *pDlg)
{
int timeout = g_plugin.iMsgTimeout * 1000;
- mir_cslock lock(queueMutex);
+ mir_cslock lock(g_csQueue);
- for (auto &it : arQueue.rev_iter()) {
+ for (auto &it : g_arQueue.rev_iter()) {
if (it->timeout >= timeout)
continue;
@@ -91,15 +91,15 @@ void SendQueue::ReportTimeouts(CMsgDialog *pDlg)
pDlg->StopMessageSending();
pDlg->ShowError(TranslateT("The message send timed out."), it);
}
- else arQueue.removeItem(&it);
+ else g_arQueue.removeItem(&it);
}
}
void SendQueue::ReleaseItems(CMsgDialog *pDlg)
{
- mir_cslock lock(queueMutex);
+ mir_cslock lock(g_csQueue);
- for (auto &it : arQueue) {
+ for (auto &it : g_arQueue) {
if (it->pDlg != pDlg)
continue;
@@ -115,9 +115,9 @@ int SendQueue::ReattachItems(CMsgDialog *pDlg, MCONTACT hContact)
{
int count = 0;
- mir_cslock lock(queueMutex);
+ mir_cslock lock(g_csQueue);
- for (auto &it : arQueue) {
+ for (auto &it : g_arQueue) {
if (it->hContact == hContact && it->pDlg == nullptr) {
it->pDlg = pDlg;
it->timeout = 0;
@@ -129,8 +129,8 @@ int SendQueue::ReattachItems(CMsgDialog *pDlg, MCONTACT hContact)
void SendQueue::RemoveAllItems()
{
- mir_cslock lock(queueMutex);
- arQueue.destroy();
+ mir_cslock lock(g_csQueue);
+ g_arQueue.destroy();
}
void SendQueue::SendItem(Item *item)
diff --git a/plugins/Scriver/src/stdafx.cxx b/plugins/Scriver/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/Scriver/src/stdafx.cxx
+++ b/plugins/Scriver/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/Scriver/src/version.h b/plugins/Scriver/src/version.h
index c3a1fab64e..96926ea2ba 100644
--- a/plugins/Scriver/src/version.h
+++ b/plugins/Scriver/src/version.h
@@ -10,4 +10,4 @@
#define __DESCRIPTION "Scriver - send and receive instant messages."
#define __AUTHOR "Miranda NG team"
#define __AUTHORWEB "https://miranda-ng.org/p/Scriver"
-#define __COPYRIGHT "© 2000-2012 Miranda IM project, 2012-24 Miranda NG team"
+#define __COPYRIGHT "© 2000-2012 Miranda IM project, 2012-25 Miranda NG team"
diff --git a/plugins/SecureIM/src/dbevent.cpp b/plugins/SecureIM/src/dbevent.cpp
index 66921acadc..8e6bce3f02 100644
--- a/plugins/SecureIM/src/dbevent.cpp
+++ b/plugins/SecureIM/src/dbevent.cpp
@@ -5,7 +5,7 @@ void HistoryLog(MCONTACT hContact, LPCSTR szText)
DBEVENTINFO dbei = {};
dbei.szModule = Proto_GetBaseAccountName(hContact);
dbei.flags = DBEF_SENT | DBEF_READ;
- dbei.timestamp = time(0);
+ dbei.iTimestamp = time(0);
dbei.eventType = EVENTTYPE_MESSAGE;
dbei.cbBlob = (int)mir_strlen(szText) + 1;
dbei.pBlob = (char *)szText;
diff --git a/plugins/SecureIM/src/stdafx.cpp b/plugins/SecureIM/src/stdafx.cpp
index e8bd82005e..550e5547f1 100644
--- a/plugins/SecureIM/src/stdafx.cpp
+++ b/plugins/SecureIM/src/stdafx.cpp
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/SeenPlugin/src/stdafx.cxx b/plugins/SeenPlugin/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/SeenPlugin/src/stdafx.cxx
+++ b/plugins/SeenPlugin/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/SendScreenshotPlus/SendSS.vcxproj b/plugins/SendScreenshotPlus/SendSS.vcxproj
index 4a3f9d8034..be8d2fbdf4 100644
--- a/plugins/SendScreenshotPlus/SendSS.vcxproj
+++ b/plugins/SendScreenshotPlus/SendSS.vcxproj
@@ -53,7 +53,6 @@
<ClInclude Include="src\CSendHost_uploadpie.h" />
<ClInclude Include="src\CSendHTTPServer.h" />
<ClInclude Include="src\ctrl_button.h" />
- <ClInclude Include="src\DevKey.h" />
<ClInclude Include="src\dlg_msgbox.h" />
<ClInclude Include="src\resource.h" />
<ClInclude Include="src\stdafx.h" />
diff --git a/plugins/SendScreenshotPlus/SendSS.vcxproj.filters b/plugins/SendScreenshotPlus/SendSS.vcxproj.filters
index bad88bfb50..b25700be00 100644
--- a/plugins/SendScreenshotPlus/SendSS.vcxproj.filters
+++ b/plugins/SendScreenshotPlus/SendSS.vcxproj.filters
@@ -79,9 +79,6 @@
<ClInclude Include="src\ctrl_button.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="src\DevKey.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="src\dlg_msgbox.h">
<Filter>Header Files</Filter>
</ClInclude>
diff --git a/plugins/SendScreenshotPlus/src/CSend.cpp b/plugins/SendScreenshotPlus/src/CSend.cpp
index 4d5fa2d064..5916a7cd0e 100644
--- a/plugins/SendScreenshotPlus/src/CSend.cpp
+++ b/plugins/SendScreenshotPlus/src/CSend.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-09 Miranda ICQ/IM project,
This file is part of Send Screenshot Plus, a Miranda IM plugin.
@@ -79,7 +79,7 @@ INT_PTR CALLBACK CSend::ResultDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam,
TranslateDialogDefault(hwndDlg);
Window_SetIcon_IcoLib(hwndDlg, GetIconHandle(ICO_MAIN));
{
- CSend *self = (CSend*)lParam;
+ CSend *self = (CSend *)lParam;
SetDlgItemText(hwndDlg, IDC_HEADERBAR, CMStringW(TranslateT("Resulting URL from\n")) + self->m_pszSendTyp);
SendDlgItemMessage(hwndDlg, IDC_HEADERBAR, WM_SETICON, ICON_BIG, (LPARAM)GetIconBtn(ICO_BTN_ARROWR));
@@ -165,7 +165,7 @@ INT_PTR CALLBACK CSend::ResultDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam,
else len = GetDlgItemText(hwndDlg, edtID, tmp, _countof(tmp));
Utils_ClipboardCopy(MClipUnicode(CMStringW(tmp, (int)len + 1)));
-
+
if (LOWORD(wParam) == IDOK)
DestroyWindow(hwndDlg);
return TRUE;
@@ -174,13 +174,13 @@ INT_PTR CALLBACK CSend::ResultDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam,
return FALSE;
}
-void CSend::svcSendMsgExit(const char* szMessage)
+void CSend::svcSendMsgExit(const char *szMessage)
{
if (m_bSilent) {
Exit(ACKRESULT_SUCCESS);
return;
}
-
+
if (!m_hContact) {
if (!m_pszFileDesc)
m_pszFileDesc = mir_a2u(szMessage);
@@ -213,7 +213,7 @@ void CSend::svcSendMsgExit(const char* szMessage)
// start PSS_MESSAGE service
m_hSend = (HANDLE)ProtoChainSend(m_hContact, PSS_MESSAGE, NULL, ptrA(mir_utf8encode(m_szEventMsg)));
-
+
// check we actually got an ft handle back from the protocol
if (!m_hSend) {
Unhook();
@@ -230,19 +230,19 @@ void CSend::svcSendFileExit()
if (m_bSilent) {
Exit(ACKRESULT_SUCCESS); return;
}
-
+
if (!m_hContact) {
Error(LPGENW("%s requires a valid contact!"), m_pszSendTyp);
Exit(ACKRESULT_FAILED); return;
}
-
+
m_szEventMsg = _T2A(m_pszFile);
if (m_pszFileDesc && m_pszFileDesc[0] != NULL) {
m_szEventMsg.AppendChar(0);
m_szEventMsg.Append(_T2A(m_pszFileDesc));
}
-
+
m_cbEventMsg = m_szEventMsg.GetLength() + 1;
// Сreate a HookEventObj on ME_PROTO_ACK
@@ -251,8 +251,8 @@ void CSend::svcSendFileExit()
}
// Start miranda PSS_FILE based on mir ver (T)
- wchar_t* ppFile[2] = { nullptr, nullptr };
- wchar_t* pDesc = mir_wstrdup(m_pszFileDesc);
+ wchar_t *ppFile[2] = { nullptr, nullptr };
+ wchar_t *pDesc = mir_wstrdup(m_pszFileDesc);
ppFile[0] = mir_wstrdup(m_pszFile);
ppFile[1] = nullptr;
m_hSend = (HANDLE)ProtoChainSend(m_hContact, PSS_FILE, (WPARAM)pDesc, (LPARAM)ppFile);
@@ -271,8 +271,8 @@ void CSend::svcSendFileExit()
int CSend::OnSend(void *obj, WPARAM, LPARAM lParam)
{
- CSend* self = (CSend*)obj;
- ACKDATA *ack = (ACKDATA*)lParam;
+ CSend *self = (CSend *)obj;
+ ACKDATA *ack = (ACKDATA *)lParam;
if (ack->hProcess != self->m_hSend)
return 0;
@@ -323,7 +323,7 @@ void CSend::DB_EventAdd(uint16_t EventType)
dbei.szModule = m_pszProto;
dbei.eventType = EventType;
dbei.flags = DBEF_SENT;
- dbei.timestamp = time(0);
+ dbei.iTimestamp = time(0);
dbei.flags |= DBEF_UTF;
dbei.cbBlob = m_cbEventMsg;
dbei.pBlob = m_szEventMsg.GetBuffer();
@@ -397,7 +397,7 @@ void CSend::Exit(unsigned int Result)
else MsgErr(nullptr, LPGENW("An unknown error has occurred."));
}
}
- if (m_pszFile && *m_pszFile && m_bDeleteAfterSend && m_EnableItem&SS_DLG_DELETEAFTERSSEND) {
+ if (m_pszFile && *m_pszFile && m_bDeleteAfterSend && m_EnableItem & SS_DLG_DELETEAFTERSSEND) {
DeleteFile(m_pszFile), m_pszFile = nullptr;
}
if (m_bAsync)
@@ -409,20 +409,20 @@ void CSend::Exit(unsigned int Result)
#define snprintf _snprintf
-const char* CSend::GetHTMLContent(char* str, const char* startTag, const char* endTag)
+const char *CSend::GetHTMLContent(char *str, const char *startTag, const char *endTag)
{
- char* begin = strstr(str, startTag);
+ char *begin = strstr(str, startTag);
if (!begin) return nullptr;
begin += mir_strlen(startTag) - 1;
for (; *begin != '>' && *begin; ++begin);
if (*begin) {
- char* end = strstr(++begin, endTag);
+ char *end = strstr(++begin, endTag);
if (end) *end = 0;
}
return begin;
}
-int CSend::HTTPFormCreate(MHttpRequest* nlhr, const char* url, HTTPFormData* frm, size_t frmNum)
+int CSend::HTTPFormCreate(MHttpRequest *nlhr, const char *url, HTTPFormData *frm, size_t frmNum)
{
char boundary[16];
strcpy(boundary, "--M461C/");
@@ -447,7 +447,7 @@ int CSend::HTTPFormCreate(MHttpRequest* nlhr, const char* url, HTTPFormData* frm
nlhr->AddHeader("Content-Type", CMStringA("multipart/form-data; boundary=") + boundary);
nlhr->AddHeader("User-Agent", __USER_AGENT_STRING);
nlhr->AddHeader("Accept-Language", "en-us,en;q=0.8");
- for (HTTPFormData* iter = frm, *end = frm + frmNum; iter != end; ++iter) {
+ for (HTTPFormData *iter = frm, *end = frm + frmNum; iter != end; ++iter) {
if (!(iter->flags & HTTPFF_HEADER))
break;
nlhr->AddHeader(iter->name, iter->value_str);
@@ -457,7 +457,7 @@ int CSend::HTTPFormCreate(MHttpRequest* nlhr, const char* url, HTTPFormData* frm
for (HTTPFormData *iter = frm, *end = frm + frmNum; iter != end; ++iter) {
if (iter->flags & HTTPFF_HEADER)
continue;
-
+
str.AppendFormat("--%s", boundary);
str.Append("\r\nContent-Disposition: form-data; name=\"");
@@ -489,19 +489,24 @@ int CSend::HTTPFormCreate(MHttpRequest* nlhr, const char* url, HTTPFormData* frm
}
str.Append(mime);
str.Append("\r\n\r\n");
-
+
/// add file content
long filesize = 0;
- FILE *fp = fopen(iter->value_str, "rb");
+ Utf2T wszFileName(iter->value_str);
+ FILE *fp = _wfopen(wszFileName, L"rb");
if (fp) {
- fseek(fp, 0, SEEK_END);
- filesize = ftell(fp); fseek(fp, 0, SEEK_SET);
+ filesize = _filelength(fileno(fp));
ptrA buf((char *)mir_alloc(filesize));
if (fread(buf, 1, filesize, fp) != filesize) {
str.Append(buf, filesize);
fclose(fp), fp = nullptr;
}
- else str.Append(buf, filesize);
+ else {
+ int iLen = str.GetLength();
+ str.Preallocate(iLen + filesize + 1000);
+ memcpy(str.GetBuffer() + iLen, buf, filesize);
+ str.ReleaseBufferSetLength(iLen + filesize);
+ }
}
if (!fp) {
Error(L"Error occurred when opening local file.\nAborting file upload...");
diff --git a/plugins/SendScreenshotPlus/src/CSend.h b/plugins/SendScreenshotPlus/src/CSend.h
index dee2e01dc3..b8f745d534 100644
--- a/plugins/SendScreenshotPlus/src/CSend.h
+++ b/plugins/SendScreenshotPlus/src/CSend.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-09 Miranda ICQ/IM project,
This file is part of Send Screenshot Plus, a Miranda IM plugin.
diff --git a/plugins/SendScreenshotPlus/src/CSendCloduFile.h b/plugins/SendScreenshotPlus/src/CSendCloduFile.h
index 441cbfa7e6..94102947aa 100644
--- a/plugins/SendScreenshotPlus/src/CSendCloduFile.h
+++ b/plugins/SendScreenshotPlus/src/CSendCloduFile.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-09 Miranda ICQ/IM project,
This file is part of Send Screenshot Plus, a Miranda IM plugin.
diff --git a/plugins/SendScreenshotPlus/src/CSendCloudFile.cpp b/plugins/SendScreenshotPlus/src/CSendCloudFile.cpp
index 08cee0d39f..70b1d9a08e 100644
--- a/plugins/SendScreenshotPlus/src/CSendCloudFile.cpp
+++ b/plugins/SendScreenshotPlus/src/CSendCloudFile.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-09 Miranda ICQ/IM project,
This file is part of Send Screenshot Plus, a Miranda IM plugin.
@@ -30,8 +30,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
/////////////////////////////////////////////////////////////////////////////////////////
-CSendCloudFile::CSendCloudFile(HWND Owner, MCONTACT hContact, bool bAsync, const char *service)
- : CSend(Owner, hContact, bAsync), m_service(service)
+CSendCloudFile::CSendCloudFile(HWND Owner, MCONTACT hContact, bool bAsync, const char *service) :
+ CSend(Owner, hContact, bAsync), m_service(service)
{
// @todo : re-enable SS_DLG_DELETEAFTERSSEND with full implemention of Dropbox upload with progress, msg and sounds
m_EnableItem = SS_DLG_DESCRIPTION | SS_DLG_AUTOSEND | SS_DLG_DELETEAFTERSSEND;
@@ -57,7 +57,7 @@ void CSendCloudFile::SendThread()
// @todo : SS_DLG_DESCRIPTION and SS_DLG_DELETEAFTERSSEND are of no use as of now since we don't track upload progress
CFUPLOADDATA ud = { m_service, m_pszFile, L"SendSS" };
- CFUPLOADRESULT ur = { };
+ CFUPLOADRESULT ur = {};
if (CallService(MS_CLOUDFILE_UPLOAD, (WPARAM)&ud, (LPARAM)&ur)) {
Error(LPGENW("%s (%i):\nCould not add a share to the CloudFile plugin."), TranslateW(m_pszSendTyp), 0);
@@ -72,7 +72,7 @@ void CSendCloudFile::SendThread()
Exit(ACKRESULT_FAILED);
}
-void CSendCloudFile::SendThreadWrapper(void * Obj)
+void CSendCloudFile::SendThreadWrapper(void *Obj)
{
- reinterpret_cast<CSendCloudFile*>(Obj)->SendThread();
+ reinterpret_cast<CSendCloudFile *>(Obj)->SendThread();
}
diff --git a/plugins/SendScreenshotPlus/src/CSendEmail.cpp b/plugins/SendScreenshotPlus/src/CSendEmail.cpp
index 25196571d3..44e8628beb 100644
--- a/plugins/SendScreenshotPlus/src/CSendEmail.cpp
+++ b/plugins/SendScreenshotPlus/src/CSendEmail.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-09 Miranda ICQ/IM project,
This file is part of Send Screenshot Plus, a Miranda IM plugin.
@@ -30,8 +30,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
/////////////////////////////////////////////////////////////////////////////////////////
-CSendEmail::CSendEmail(HWND Owner, MCONTACT hContact, bool /*bAsync*/)
- : CSend(Owner, hContact, true)
+CSendEmail::CSendEmail(HWND Owner, MCONTACT hContact, bool /*bAsync*/) :
+ CSend(Owner, hContact, true)
{
m_EnableItem = SS_DLG_DESCRIPTION | SS_DLG_DELETEAFTERSSEND; // SS_DLG_AUTOSEND | ;
m_pszSendTyp = LPGENW("Email transfer");
@@ -135,7 +135,7 @@ void CSendEmail::SendThread()
int res = lpMAPISendMail(NULL, NULL, &Msg, MAPI_LOGON_UI | MAPI_DIALOG, 0);
::FreeLibrary(hMAPILib);
- wchar_t* err;
+ wchar_t *err;
switch (res) {
case SUCCESS_SUCCESS:
// The call succeeded and the message was sent.
@@ -195,7 +195,7 @@ void CSendEmail::SendThread()
}
}
-void CSendEmail::SendThreadWrapper(void * Obj)
+void CSendEmail::SendThreadWrapper(void *Obj)
{
- reinterpret_cast<CSendEmail*>(Obj)->SendThread();
+ reinterpret_cast<CSendEmail *>(Obj)->SendThread();
}
diff --git a/plugins/SendScreenshotPlus/src/CSendEmail.h b/plugins/SendScreenshotPlus/src/CSendEmail.h
index 314bfb032e..89b0ed8c6b 100644
--- a/plugins/SendScreenshotPlus/src/CSendEmail.h
+++ b/plugins/SendScreenshotPlus/src/CSendEmail.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-09 Miranda ICQ/IM project,
This file is part of Send Screenshot Plus, a Miranda IM plugin.
diff --git a/plugins/SendScreenshotPlus/src/CSendFTPFile.cpp b/plugins/SendScreenshotPlus/src/CSendFTPFile.cpp
index 6bd36b41ad..ecc8cef991 100644
--- a/plugins/SendScreenshotPlus/src/CSendFTPFile.cpp
+++ b/plugins/SendScreenshotPlus/src/CSendFTPFile.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-09 Miranda ICQ/IM project,
This file is part of Send Screenshot Plus, a Miranda IM plugin.
@@ -30,8 +30,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
/////////////////////////////////////////////////////////////////////////////////////////
-CSendFTPFile::CSendFTPFile(HWND Owner, MCONTACT hContact, bool /*bAsync*/)
- : CSend(Owner, hContact, true)
+CSendFTPFile::CSendFTPFile(HWND Owner, MCONTACT hContact, bool /*bAsync*/) :
+ CSend(Owner, hContact, true)
{
m_EnableItem = 0; //SS_DLG_DESCRIPTION | SS_DLG_AUTOSEND | SS_DLG_DELETEAFTERSSEND;
m_pszSendTyp = LPGENW("FTPFile transfer");
@@ -60,8 +60,8 @@ int CSendFTPFile::Send()
********************************************************************************************/
mir_free(m_pszFileName);
m_pszFileName = GetFileNameA(m_pszFile);
- size_t size = sizeof(char)*(mir_strlen(m_pszFileName) + 2);
- m_pszFileName = (char*)mir_realloc(m_pszFileName, size);
+ size_t size = sizeof(char) * (mir_strlen(m_pszFileName) + 2);
+ m_pszFileName = (char *)mir_realloc(m_pszFileName, size);
m_pszFileName[size - 1] = NULL;
// start Send thread
@@ -87,7 +87,7 @@ void CSendFTPFile::SendThread()
Exit(ACKRESULT_FAILED);
}
-void CSendFTPFile::SendThreadWrapper(void * Obj)
+void CSendFTPFile::SendThreadWrapper(void *Obj)
{
- reinterpret_cast<CSendFTPFile*>(Obj)->SendThread();
+ reinterpret_cast<CSendFTPFile *>(Obj)->SendThread();
}
diff --git a/plugins/SendScreenshotPlus/src/CSendFTPFile.h b/plugins/SendScreenshotPlus/src/CSendFTPFile.h
index 660bcb3d5c..d5c3525487 100644
--- a/plugins/SendScreenshotPlus/src/CSendFTPFile.h
+++ b/plugins/SendScreenshotPlus/src/CSendFTPFile.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-09 Miranda ICQ/IM project,
This file is part of Send Screenshot Plus, a Miranda IM plugin.
diff --git a/plugins/SendScreenshotPlus/src/CSendFile.cpp b/plugins/SendScreenshotPlus/src/CSendFile.cpp
index 4477305848..45fd6a0c64 100644
--- a/plugins/SendScreenshotPlus/src/CSendFile.cpp
+++ b/plugins/SendScreenshotPlus/src/CSendFile.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-09 Miranda ICQ/IM project,
This file is part of Send Screenshot Plus, a Miranda IM plugin.
@@ -30,8 +30,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
/////////////////////////////////////////////////////////////////////////////////////////
-CSendFile::CSendFile(HWND Owner, MCONTACT hContact, bool /*bAsync*/)
- : CSend(Owner, hContact, true)
+CSendFile::CSendFile(HWND Owner, MCONTACT hContact, bool /*bAsync*/) :
+ CSend(Owner, hContact, true)
{
m_EnableItem = SS_DLG_AUTOSEND | SS_DLG_DELETEAFTERSSEND | SS_DLG_DESCRIPTION;
m_pszSendTyp = LPGENW("File transfer");
diff --git a/plugins/SendScreenshotPlus/src/CSendFile.h b/plugins/SendScreenshotPlus/src/CSendFile.h
index 6427627f06..e44b6f9c52 100644
--- a/plugins/SendScreenshotPlus/src/CSendFile.h
+++ b/plugins/SendScreenshotPlus/src/CSendFile.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-09 Miranda ICQ/IM project,
This file is part of Send Screenshot Plus, a Miranda IM plugin.
diff --git a/plugins/SendScreenshotPlus/src/CSendHTTPServer.cpp b/plugins/SendScreenshotPlus/src/CSendHTTPServer.cpp
index 2eef7d3e43..63b1c7519c 100644
--- a/plugins/SendScreenshotPlus/src/CSendHTTPServer.cpp
+++ b/plugins/SendScreenshotPlus/src/CSendHTTPServer.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-09 Miranda ICQ/IM project,
This file is part of Send Screenshot Plus, a Miranda IM plugin.
@@ -32,8 +32,8 @@ INT_PTR(*g_MirCallService)(const char *, WPARAM, LPARAM) = nullptr;
/////////////////////////////////////////////////////////////////////////////////////////
-CSendHTTPServer::CSendHTTPServer(HWND Owner, MCONTACT hContact, bool /*bAsync*/)
- : CSend(Owner, hContact, true)
+CSendHTTPServer::CSendHTTPServer(HWND Owner, MCONTACT hContact, bool /*bAsync*/) :
+ CSend(Owner, hContact, true)
{
m_EnableItem = SS_DLG_DESCRIPTION; //| SS_DLG_AUTOSEND | SS_DLG_DELETEAFTERSSEND;
m_pszSendTyp = LPGENW("HTTPServer transfer");
@@ -86,7 +86,7 @@ void CSendHTTPServer::SendThread()
// patched plugin version
ret = CallService(MS_HTTP_ADD_CHANGE_REMOVE, (WPARAM)m_hContact, (LPARAM)&m_fsi);
if (!ret) {
- m_URL = ptrA((char*)CallService(MS_HTTP_GET_LINK, (WPARAM)m_fsi.pszSrvPath, 0));
+ m_URL = ptrA((char *)CallService(MS_HTTP_GET_LINK, (WPARAM)m_fsi.pszSrvPath, 0));
}
}
else {
@@ -111,7 +111,7 @@ void CSendHTTPServer::SendThread()
Exit(ACKRESULT_FAILED);
}
-void CSendHTTPServer::SendThreadWrapper(void * Obj)
+void CSendHTTPServer::SendThreadWrapper(void *Obj)
{
- reinterpret_cast<CSendHTTPServer*>(Obj)->SendThread();
+ reinterpret_cast<CSendHTTPServer *>(Obj)->SendThread();
}
diff --git a/plugins/SendScreenshotPlus/src/CSendHTTPServer.h b/plugins/SendScreenshotPlus/src/CSendHTTPServer.h
index f23dbcfad9..7c67cc7eba 100644
--- a/plugins/SendScreenshotPlus/src/CSendHTTPServer.h
+++ b/plugins/SendScreenshotPlus/src/CSendHTTPServer.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-09 Miranda ICQ/IM project,
This file is part of Send Screenshot Plus, a Miranda IM plugin.
diff --git a/plugins/SendScreenshotPlus/src/CSendHost_ImageShack.cpp b/plugins/SendScreenshotPlus/src/CSendHost_ImageShack.cpp
index ec4c9203f1..b6b131cca9 100644
--- a/plugins/SendScreenshotPlus/src/CSendHost_ImageShack.cpp
+++ b/plugins/SendScreenshotPlus/src/CSendHost_ImageShack.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-09 Miranda ICQ/IM project,
This file is part of Send Screenshot Plus, a Miranda IM plugin.
@@ -46,24 +46,40 @@ CSendHost_ImageShack::~CSendHost_ImageShack()
int CSendHost_ImageShack::Send()
{
if (!g_hNetlibUser) { // check Netlib
+LBL_Error:
Error(SS_ERR_INIT, m_pszSendTyp);
Exit(ACKRESULT_FAILED);
return !m_bAsync;
}
+ CMStringA szKey(g_plugin.getMStringA("Key"));
+ if (szKey.IsEmpty()) {
+ ENTER_STRING es = {};
+ es.szModuleName = MODULENAME;
+ es.caption = TranslateT("Enter your personal API key from Imageshack");
+ if (!EnterString(&es)) {
+ m_pszSendTyp = LPGENW("API key is missing");
+ goto LBL_Error;
+ }
+
+ szKey = es.ptszResult;
+ g_plugin.setString("Key", szKey);
+ }
+
m_pRequest.reset(new MHttpRequest(REQUEST_POST));
- char* tmp; tmp = mir_u2a(m_pszFile);
+ T2Utf tmp(m_pszFile);
HTTPFormData frm[] = {
// { "Referer", HTTPFORM_HEADER("http://www.imageshack.us/upload_api.php") },
{ "fileupload", HTTPFORM_FILE(tmp) },
// { "rembar", "yes" },// no info bar on thumb
{ "public", "no" },
- { "key", HTTPFORM_8BIT(DEVKEY_IMAGESHACK) },
+ { "key", szKey.c_str() },
};
+
int error = HTTPFormCreate(m_pRequest.get(), "http://imageshack.us/upload_api.php", frm, sizeof(frm) / sizeof(HTTPFormData));
- mir_free(tmp);
if (error)
return !m_bAsync;
+
// start upload thread
if (m_bAsync) {
mir_forkthread(&CSendHost_ImageShack::SendThreadWrapper, this);
@@ -79,7 +95,7 @@ void CSendHost_ImageShack::SendThread()
NLHR_PTR reply(Netlib_HttpTransaction(g_hNetlibUser, m_pRequest.get()));
if (reply) {
if (reply->resultCode >= 200 && reply->resultCode < 300 && reply->body.GetLength()) {
- const char* url = nullptr;
+ const char *url = nullptr;
url = GetHTMLContent(reply->body.GetBuffer(), "<image_link>", "</image_link>");
if (url && *url) {
m_URLthumb = m_URL = url;
@@ -87,7 +103,7 @@ void CSendHost_ImageShack::SendThread()
int idx = m_URLthumb.ReverseFind('.');
if (idx != -1 && m_URLthumb.GetLength() - idx > 2)
m_URLthumb.Insert(idx + 1, "th");
- else
+ else
m_URLthumb.Empty();
svcSendMsgExit(url);
@@ -95,7 +111,7 @@ void CSendHost_ImageShack::SendThread()
}
url = GetHTMLContent(reply->body.GetBuffer(), "<error ", "</error>");
- wchar_t* err = nullptr;
+ wchar_t *err = nullptr;
if (url) err = mir_a2u(url);
if (!err || !*err) { // fallback to server response mess
mir_free(err);
@@ -111,7 +127,7 @@ void CSendHost_ImageShack::SendThread()
Exit(ACKRESULT_FAILED);
}
-void CSendHost_ImageShack::SendThreadWrapper(void * Obj)
+void CSendHost_ImageShack::SendThreadWrapper(void *Obj)
{
- reinterpret_cast<CSendHost_ImageShack*>(Obj)->SendThread();
+ reinterpret_cast<CSendHost_ImageShack *>(Obj)->SendThread();
}
diff --git a/plugins/SendScreenshotPlus/src/CSendHost_ImageShack.h b/plugins/SendScreenshotPlus/src/CSendHost_ImageShack.h
index 6ba8153342..afa048bd3d 100644
--- a/plugins/SendScreenshotPlus/src/CSendHost_ImageShack.h
+++ b/plugins/SendScreenshotPlus/src/CSendHost_ImageShack.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-09 Miranda ICQ/IM project,
This file is part of Send Screenshot Plus, a Miranda IM plugin.
diff --git a/plugins/SendScreenshotPlus/src/CSendHost_imgur.cpp b/plugins/SendScreenshotPlus/src/CSendHost_imgur.cpp
index 9352e29de6..d98a07e194 100644
--- a/plugins/SendScreenshotPlus/src/CSendHost_imgur.cpp
+++ b/plugins/SendScreenshotPlus/src/CSendHost_imgur.cpp
@@ -2,7 +2,7 @@
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
- Copyright (C) 2014-24 Miranda NG team (https://miranda-ng.org)
+ Copyright (C) 2014-25 Miranda NG team (https://miranda-ng.org)
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
@@ -35,18 +35,18 @@ int CSendHost_Imgur::Send()
Exit(ACKRESULT_FAILED);
return !m_bAsync;
}
-
+
m_pRequest.reset(new MHttpRequest(REQUEST_POST));
- char* tmp; tmp = mir_u2a(m_pszFile);
+ T2Utf tmp(m_pszFile);
HTTPFormData frm[] = {
{ "Authorization", HTTPFORM_HEADER("Client-ID 2a7303d78abe041") },
{ "image", HTTPFORM_FILE(tmp) },
};
int error = HTTPFormCreate(m_pRequest.get(), "https://api.imgur.com/3/image", frm, _countof(frm));
- mir_free(tmp);
if (error)
return !m_bAsync;
+
// start upload thread
if (m_bAsync) {
mir_forkthread(&CSendHost_Imgur::SendThread, this);
@@ -56,9 +56,9 @@ int CSendHost_Imgur::Send()
return 1;
}
-void CSendHost_Imgur::SendThread(void* obj)
+void CSendHost_Imgur::SendThread(void *obj)
{
- CSendHost_Imgur *self = (CSendHost_Imgur*)obj;
+ CSendHost_Imgur *self = (CSendHost_Imgur *)obj;
// send DATA and wait for m_nlreply
NLHR_PTR reply(Netlib_HttpTransaction(g_hNetlibUser, self->m_pRequest.get()));
if (reply) {
diff --git a/plugins/SendScreenshotPlus/src/CSendHost_imgur.h b/plugins/SendScreenshotPlus/src/CSendHost_imgur.h
index 4db1c425ec..c991702f86 100644
--- a/plugins/SendScreenshotPlus/src/CSendHost_imgur.h
+++ b/plugins/SendScreenshotPlus/src/CSendHost_imgur.h
@@ -2,7 +2,7 @@
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
- Copyright (C) 2014-24 Miranda NG team (https://miranda-ng.org)
+ Copyright (C) 2014-25 Miranda NG team (https://miranda-ng.org)
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
diff --git a/plugins/SendScreenshotPlus/src/CSendHost_uploadpie.cpp b/plugins/SendScreenshotPlus/src/CSendHost_uploadpie.cpp
index bd44dfd008..13bd17aa8d 100644
--- a/plugins/SendScreenshotPlus/src/CSendHost_uploadpie.cpp
+++ b/plugins/SendScreenshotPlus/src/CSendHost_uploadpie.cpp
@@ -2,7 +2,7 @@
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
- Copyright (C) 2014-24 Miranda NG team (https://miranda-ng.org)
+ Copyright (C) 2014-25 Miranda NG team (https://miranda-ng.org)
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
@@ -38,9 +38,10 @@ int CSendHost_UploadPie::Send()
Exit(ACKRESULT_FAILED);
return !m_bAsync;
}
-
+
m_pRequest.reset(new MHttpRequest(REQUEST_POST));
- char* tmp; tmp = mir_u2a(m_pszFile);
+ T2Utf tmp(m_pszFile);
+
HTTPFormData frm[] = {
{ "MAX_FILE_SIZE", HTTPFORM_INT(3145728) },
{ "upload", HTTPFORM_INT(1) },
@@ -49,10 +50,9 @@ int CSendHost_UploadPie::Send()
};
int error = HTTPFormCreate(m_pRequest.get(), kHostURL, frm, _countof(frm));
- mir_free(tmp);
if (error)
return !m_bAsync;
-
+
// start upload thread
if (m_bAsync) {
mir_forkthread(&CSendHost_UploadPie::SendThread, this);
@@ -62,35 +62,37 @@ int CSendHost_UploadPie::Send()
return 1;
}
-void CSendHost_UploadPie::SendThread(void* obj)
+void CSendHost_UploadPie::SendThread(void *obj)
{
- CSendHost_UploadPie* self = (CSendHost_UploadPie*)obj;
+ CSendHost_UploadPie *self = (CSendHost_UploadPie *)obj;
// send DATA and wait for m_nlreply
NLHR_PTR reply(Netlib_HttpTransaction(g_hNetlibUser, self->m_pRequest.get()));
if (reply) {
if (reply->resultCode >= 200 && reply->resultCode < 300 && reply->body.GetLength()) {
- char* url = reply->body.GetBuffer();
+ char *url = reply->body.GetBuffer();
do {
- char* pos;
+ char *pos;
if ((url = strstr(url, kHostURL))) {
- for (pos = url + _countof(kHostURL)-1; (*pos >= '0'&&*pos <= '9') || (*pos >= 'a'&&*pos <= 'z') || (*pos >= 'A'&&*pos <= 'Z') || *pos == '_' || *pos == '-' || *pos == '"' || *pos == '\''; ++pos) {
- if (*pos == '"' || *pos == '\'') break;
+ for (pos = url + _countof(kHostURL) - 1; (*pos >= '0' && *pos <= '9') || (*pos >= 'a' && *pos <= 'z') || (*pos >= 'A' && *pos <= 'Z') || *pos == '_' || *pos == '-' || *pos == '"' || *pos == '\''; ++pos) {
+ if (*pos == '"' || *pos == '\'')
+ break;
}
- if (url + _countof(kHostURL)-1 != pos && (*pos == '"' || *pos == '\'')) {
+ if (url + _countof(kHostURL) - 1 != pos && (*pos == '"' || *pos == '\'')) {
*pos = '\0';
break;
}
++url;
}
} while (url);
-
+
if (url) {
self->m_URL = url;
- self->svcSendMsgExit(url); return;
+ self->svcSendMsgExit(url);
+ return;
}
else { // check error mess from server
- const char* err = GetHTMLContent(reply->body.GetBuffer(), "<p id=\"error\"", "</p>");
- wchar_t* werr;
+ const char *err = GetHTMLContent(reply->body.GetBuffer(), "<p id=\"error\"", "</p>");
+ wchar_t *werr;
if (err) werr = mir_a2u(err);
else werr = mir_a2u(reply->body);
self->Error(L"%s", werr);
diff --git a/plugins/SendScreenshotPlus/src/CSendHost_uploadpie.h b/plugins/SendScreenshotPlus/src/CSendHost_uploadpie.h
index 93f7f33b84..05f8e9d502 100644
--- a/plugins/SendScreenshotPlus/src/CSendHost_uploadpie.h
+++ b/plugins/SendScreenshotPlus/src/CSendHost_uploadpie.h
@@ -2,7 +2,7 @@
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
- Copyright (C) 2014-24 Miranda NG team (https://miranda-ng.org)
+ Copyright (C) 2014-25 Miranda NG team (https://miranda-ng.org)
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
diff --git a/plugins/SendScreenshotPlus/src/DevKey.h b/plugins/SendScreenshotPlus/src/DevKey.h
deleted file mode 100644
index 2999f74466..0000000000
--- a/plugins/SendScreenshotPlus/src/DevKey.h
+++ /dev/null
@@ -1,3 +0,0 @@
-#ifndef DEVKEY_IMAGESHACK
-#define DEVKEY_IMAGESHACK "IA5ZRTV6fb6256ccbc3c38650bdce6e6dcfc9e55" /*Test DevKey*/
-#endif
diff --git a/plugins/SendScreenshotPlus/src/Main.cpp b/plugins/SendScreenshotPlus/src/Main.cpp
index f8f418f63d..307b135394 100644
--- a/plugins/SendScreenshotPlus/src/Main.cpp
+++ b/plugins/SendScreenshotPlus/src/Main.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-09 Miranda ICQ/IM project,
This file is part of Send Screenshot Plus, a Miranda IM plugin.
@@ -67,7 +67,7 @@ IconItem ICONS_BTN[ICO_BTN_END_] =
};
static HANDLE m_hFolderScreenshot = nullptr;
-wchar_t* GetCustomPath()
+wchar_t *GetCustomPath()
{
wchar_t *pszPath = Utils_ReplaceVarsW(L"%miranda_userdata%\\Screenshots");
if (m_hFolderScreenshot) {
@@ -280,7 +280,7 @@ int CMPlugin::Load()
g_plugin.registerIcon(MODULENAME "/" LPGEN("Buttons"), ICONS_BTN, MODULENAME);
// services
-#define srv_reg(name) CreateServiceFunction(MODULENAME "/" #name, service_##name);
+ #define srv_reg(name) CreateServiceFunction(MODULENAME "/" #name, service_##name);
srv_reg(OpenCaptureDialog);
srv_reg(SendDesktop);
srv_reg(Send2ImageShack);
diff --git a/plugins/SendScreenshotPlus/src/UMainForm.cpp b/plugins/SendScreenshotPlus/src/UMainForm.cpp
index 1ab1d0ecb7..16a1ed45e6 100644
--- a/plugins/SendScreenshotPlus/src/UMainForm.cpp
+++ b/plugins/SendScreenshotPlus/src/UMainForm.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-09 Miranda ICQ/IM project,
This file is part of Send Screenshot Plus, a Miranda IM plugin.
@@ -118,7 +118,7 @@ INT_PTR CALLBACK TfrmMain::DlgTfrmMain(HWND hWnd, UINT msg, WPARAM wParam, LPARA
CHandleMapping::iterator wnd;
if (msg == WM_INITDIALOG) {
- wnd = _HandleMapping.insert(CHandleMapping::value_type(hWnd, reinterpret_cast<TfrmMain*>(lParam))).first;
+ wnd = _HandleMapping.insert(CHandleMapping::value_type(hWnd, reinterpret_cast<TfrmMain *>(lParam))).first;
wnd->second->m_hWnd = hWnd;
wnd->second->wmInitdialog(wParam, lParam);
return 0;
@@ -177,7 +177,7 @@ INT_PTR CALLBACK TfrmMain::DlgTfrmMain(HWND hWnd, UINT msg, WPARAM wParam, LPARA
int EnumCloudFileServices(const CFSERVICEINFO *serviceInfo, void *param)
{
HWND hCtrl = (HWND)param;
- ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, serviceInfo->userName), new UPLOAD_INFO(SS_CLOUDFILE, (void*)serviceInfo->accountName));
+ ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, serviceInfo->userName), new UPLOAD_INFO(SS_CLOUDFILE, (void *)serviceInfo->accountName));
return 0;
}
@@ -231,7 +231,7 @@ void TfrmMain::wmInitdialog(WPARAM, LPARAM)
// get tab boundaries (required after 1st tab)
GetClientRect(m_hwndTab, &rcTab);
- MapWindowPoints(m_hwndTab, m_hWnd, (POINT*)&rcTab, 2);
+ MapWindowPoints(m_hwndTab, m_hWnd, (POINT *)&rcTab, 2);
TabCtrl_AdjustRect(m_hwndTab, 0, &rcTab);
rcTab.bottom -= rcTab.top; rcTab.right -= rcTab.left;
@@ -331,13 +331,13 @@ void TfrmMain::wmInitdialog(WPARAM, LPARAM)
m_opt_cboxSendBy = SS_IMAGESHACK;
}
ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, L"ImageShack"), new UPLOAD_INFO(SS_IMAGESHACK));
- ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateT("Upload Pie (30m)")), new UPLOAD_INFO(SS_UPLOADPIE, (void*)1));
- ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateT("Upload Pie (1d)")), new UPLOAD_INFO(SS_UPLOADPIE, (void*)4));
- ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateT("Upload Pie (1w)")), new UPLOAD_INFO(SS_UPLOADPIE, (void*)5));
+ ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateT("Upload Pie (30m)")), new UPLOAD_INFO(SS_UPLOADPIE, (void *)1));
+ ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateT("Upload Pie (1d)")), new UPLOAD_INFO(SS_UPLOADPIE, (void *)4));
+ ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateT("Upload Pie (1w)")), new UPLOAD_INFO(SS_UPLOADPIE, (void *)5));
ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, L"Imgur"), new UPLOAD_INFO(SS_IMGUR));
for (int i = 0; i < ComboBox_GetCount(hCtrl); i++) {
- UPLOAD_INFO *p = (UPLOAD_INFO*)ComboBox_GetItemData(hCtrl, i);
+ UPLOAD_INFO *p = (UPLOAD_INFO *)ComboBox_GetItemData(hCtrl, i);
if (p && p->sendBy == m_opt_cboxSendBy) {
pDefault = p;
ComboBox_SetCurSel(hCtrl, i);
@@ -458,7 +458,7 @@ void TfrmMain::wmCommand(WPARAM wParam, LPARAM lParam)
break;
case ID_cboxSendBy:
{
- UPLOAD_INFO *upload = (UPLOAD_INFO*)ComboBox_GetItemData((HWND)lParam, ComboBox_GetCurSel((HWND)lParam));
+ UPLOAD_INFO *upload = (UPLOAD_INFO *)ComboBox_GetItemData((HWND)lParam, ComboBox_GetCurSel((HWND)lParam));
m_opt_cboxSendBy = upload->sendBy;
cboxSendByChange(upload->param);
}
@@ -496,7 +496,7 @@ void TfrmMain::wmClose(WPARAM, LPARAM)
HWND hCtrl = GetDlgItem(m_hWnd, ID_cboxSendBy);
size_t count = ComboBox_GetCount(hCtrl);
for (size_t i = 0; i < count; i++) {
- UPLOAD_INFO *ui = (UPLOAD_INFO*)ComboBox_GetItemData(hCtrl, i);
+ UPLOAD_INFO *ui = (UPLOAD_INFO *)ComboBox_GetItemData(hCtrl, i);
delete ui;
}
DestroyWindow(m_hWnd);
@@ -517,11 +517,11 @@ void TfrmMain::SetTargetWindow(HWND hwnd)
int len = GetWindowTextLength(m_hTargetWindow) + 1;
wchar_t *lpTitle;
if (len > 1) {
- lpTitle = (wchar_t*)mir_alloc(len*sizeof(wchar_t));
+ lpTitle = (wchar_t *)mir_alloc(len * sizeof(wchar_t));
GetWindowText(m_hTargetWindow, lpTitle, len);
}
else { // no WindowText present, use WindowClass
- lpTitle = (wchar_t*)mir_alloc(64 * sizeof(wchar_t));
+ lpTitle = (wchar_t *)mir_alloc(64 * sizeof(wchar_t));
RealGetWindowClass(m_hTargetWindow, lpTitle, 64);
}
SetDlgItemText(m_hwndTabPage, ID_edtCaption, lpTitle);
@@ -535,7 +535,7 @@ void TfrmMain::wmTimer(WPARAM wParam, LPARAM)
static int primarymouse;
if (!m_hTargetHighlighter) {
primarymouse = GetSystemMetrics(SM_SWAPBUTTON) ? VK_RBUTTON : VK_LBUTTON;
- m_hTargetHighlighter = CreateWindowEx(WS_EX_LAYERED | WS_EX_TRANSPARENT | WS_EX_TOOLWINDOW, (wchar_t*)g_clsTargetHighlighter, nullptr, WS_POPUP, 0, 0, 0, 0, nullptr, nullptr, g_plugin.getInst(), nullptr);
+ m_hTargetHighlighter = CreateWindowEx(WS_EX_LAYERED | WS_EX_TRANSPARENT | WS_EX_TOOLWINDOW, (wchar_t *)g_clsTargetHighlighter, nullptr, WS_POPUP, 0, 0, 0, 0, nullptr, nullptr, g_plugin.getInst(), nullptr);
if (!m_hTargetHighlighter) return;
SetLayeredWindowAttributes(m_hTargetHighlighter, 0, 123, LWA_ALPHA);
SetSystemCursor(CopyCursor(GetIcon(ICO_TARGET)), OCR_IBEAM); // text cursor
@@ -565,7 +565,7 @@ void TfrmMain::wmTimer(WPARAM wParam, LPARAM)
RECT rect;
if (m_opt_chkClientArea) {
GetClientRect(hwnd, &rect);
- ClientToScreen(hwnd, (POINT*)&rect);
+ ClientToScreen(hwnd, (POINT *)&rect);
rect.right = rect.left + rect.right;
rect.bottom = rect.top + rect.bottom;
}
@@ -589,9 +589,9 @@ void TfrmMain::wmTimer(WPARAM wParam, LPARAM)
return;
}
if (wParam == ID_chkTimed) { // Timer for Screenshot
-#ifdef _DEBUG
+ #ifdef _DEBUG
OutputDebugStringA("SS Bitmap Timer Start\r\n");
-#endif
+ #endif
if (!m_bCapture) { // only start once
if (m_Screenshot) {
FreeImage_Unload(m_Screenshot);
@@ -607,17 +607,17 @@ void TfrmMain::wmTimer(WPARAM wParam, LPARAM)
break;
case 2: // edge case, existing local file
break;
-#ifdef _DEBUG
+ #ifdef _DEBUG
default:
OutputDebugStringA("SS Bitmap Timer Stop (no tabCapture)\r\n");
-#endif
+ #endif
}
m_bCapture = false;
if (m_Screenshot || m_opt_tabCapture == 2) { // @note : test without "if"
KillTimer(m_hWnd, ID_chkTimed);
-#ifdef _DEBUG
+ #ifdef _DEBUG
OutputDebugStringA("SS Bitmap Timer Stop (CaptureDone)\r\n");
-#endif
+ #endif
SendMessage(m_hWnd, UM_EVENT, 0, (LPARAM)EVT_CaptureDone);
}
}
@@ -869,7 +869,7 @@ void TfrmMain::cboxSendByChange(void *param)
m_cSend = new CSendFTPFile(m_hWnd, m_hContact, true);
break;
case SS_CLOUDFILE: // "CloudFile"
- m_cSend = new CSendCloudFile(m_hWnd, m_hContact, false, (char*)param);
+ m_cSend = new CSendCloudFile(m_hWnd, m_hContact, false, (char *)param);
break;
case SS_IMAGESHACK: // "ImageShack"
m_cSend = new CSendHost_ImageShack(m_hWnd, m_hContact, true);
diff --git a/plugins/SendScreenshotPlus/src/UMainForm.h b/plugins/SendScreenshotPlus/src/UMainForm.h
index 732a2cc752..d030027167 100644
--- a/plugins/SendScreenshotPlus/src/UMainForm.h
+++ b/plugins/SendScreenshotPlus/src/UMainForm.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-09 Miranda ICQ/IM project,
This file is part of Send Screenshot Plus, a Miranda IM plugin.
diff --git a/plugins/SendScreenshotPlus/src/Utils.cpp b/plugins/SendScreenshotPlus/src/Utils.cpp
index 51eb068be3..c594dea6c0 100644
--- a/plugins/SendScreenshotPlus/src/Utils.cpp
+++ b/plugins/SendScreenshotPlus/src/Utils.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-09 Miranda ICQ/IM project,
This file is part of Send Screenshot Plus, a Miranda IM plugin.
@@ -44,9 +44,9 @@ void ComboBox_SelectItem(HWND hCombo, LPARAM data)
static BOOL CALLBACK MonitorInfoEnumProc(HMONITOR hMonitor, HDC, LPRECT, LPARAM dwData)
{
- MONITORS* monitors = (MONITORS*)dwData;
+ MONITORS *monitors = (MONITORS *)dwData;
++monitors->count;
- monitors->info = (MONITORINFOEX*)mir_realloc(monitors->info, sizeof(MONITORINFOEX)*monitors->count);
+ monitors->info = (MONITORINFOEX *)mir_realloc(monitors->info, sizeof(MONITORINFOEX) * monitors->count);
monitors->info[monitors->count - 1].cbSize = sizeof(MONITORINFOEX);
if (!GetMonitorInfo(hMonitor, (LPMONITORINFO)(monitors->info + monitors->count - 1)))
return FALSE; // stop enumeration if error
@@ -54,7 +54,7 @@ static BOOL CALLBACK MonitorInfoEnumProc(HMONITOR hMonitor, HDC, LPRECT, LPARAM
return TRUE;
}
-size_t MonitorInfoEnum(MONITORINFOEX* &myMonitors, RECT &virtualScreen)
+size_t MonitorInfoEnum(MONITORINFOEX *&myMonitors, RECT &virtualScreen)
{
MONITORS tmp = { 0, nullptr };
if (EnumDisplayMonitors(nullptr, nullptr, MonitorInfoEnumProc, (LPARAM)&tmp)) {
@@ -65,29 +65,29 @@ size_t MonitorInfoEnum(MONITORINFOEX* &myMonitors, RECT &virtualScreen)
}
return tmp.count;
}
-
+
mir_free(tmp.info);
return 0;
}
-FIBITMAP* CreateDIBFromDC(HDC hDC, const RECT* rect, HWND hCapture = nullptr);
+FIBITMAP *CreateDIBFromDC(HDC hDC, const RECT *rect, HWND hCapture = nullptr);
/////////////////////////////////////////////////////////////////////////////////////////
// capture window as FIBITMAP - caller must FreeImage_Unload(dib)
-FIBITMAP* CaptureWindow(HWND hCapture, BOOL bClientArea, BOOL bIndirectCapture)
+FIBITMAP *CaptureWindow(HWND hCapture, BOOL bClientArea, BOOL bIndirectCapture)
{
- FIBITMAP* dib;
+ FIBITMAP *dib;
HWND hForegroundWin;
RECT rect; // cropping rect
if (!hCapture || !IsWindow(hCapture))
return nullptr;
-
+
hForegroundWin = GetForegroundWindow(); // old foreground window
SetForegroundWindow(hCapture); // force target foreground
BringWindowToTop(hCapture); // bring it to top as well
-
+
// redraw window to prevent runtime artifacts in picture
UpdateWindow(hCapture);
@@ -95,12 +95,12 @@ FIBITMAP* CaptureWindow(HWND hCapture, BOOL bClientArea, BOOL bIndirectCapture)
if (hParent && !IsChild(hParent, hCapture))
hParent = nullptr;
if (bIndirectCapture) {
- intptr_t wastopmost = GetWindowLongPtr(hCapture, GWL_EXSTYLE)&WS_EX_TOPMOST;
+ intptr_t wastopmost = GetWindowLongPtr(hCapture, GWL_EXSTYLE) & WS_EX_TOPMOST;
if (!wastopmost)
SetWindowPos(hCapture, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
if (bClientArea) {
GetClientRect(hCapture, &rect);
- ClientToScreen(hCapture, (POINT*)&rect);
+ ClientToScreen(hCapture, (POINT *)&rect);
rect.right += rect.left; rect.bottom += rect.top;
}
else
@@ -127,18 +127,18 @@ FIBITMAP* CaptureWindow(HWND hCapture, BOOL bClientArea, BOOL bIndirectCapture)
if (bClientArea) {
GetWindowRect(hCapture, &rect);
RECT rectCA; GetClientRect(hCapture, &rectCA);
- ClientToScreen(hCapture, (POINT*)&rectCA);
+ ClientToScreen(hCapture, (POINT *)&rectCA);
rectCA.left = ABS(rectCA.left - rect.left);
rectCA.top = ABS(rectCA.top - rect.top);
rectCA.right += rectCA.left; rectCA.bottom += rectCA.top;
-
+
// crop the window to ClientArea
- FIBITMAP* dibClient = FreeImage_Copy(dib, rectCA.left, rectCA.top, rectCA.right, rectCA.bottom);
+ FIBITMAP *dibClient = FreeImage_Copy(dib, rectCA.left, rectCA.top, rectCA.right, rectCA.bottom);
FreeImage_Unload(dib);
dib = dibClient;
}
}
-
+
// restore previous foreground window
if (hForegroundWin) {
SetForegroundWindow(hForegroundWin);
@@ -147,11 +147,11 @@ FIBITMAP* CaptureWindow(HWND hCapture, BOOL bClientArea, BOOL bIndirectCapture)
return dib;
}
-FIBITMAP* CaptureMonitor(const wchar_t* szDevice, const RECT* cropRect/*=NULL*/)
+FIBITMAP *CaptureMonitor(const wchar_t *szDevice, const RECT *cropRect/*=NULL*/)
{
HDC hScrDC;
RECT rect;
-
+
// get screen resolution
if (!szDevice) {
hScrDC = CreateDC(L"DISPLAY", nullptr, nullptr, nullptr);
@@ -172,13 +172,13 @@ FIBITMAP* CaptureMonitor(const wchar_t* szDevice, const RECT* cropRect/*=NULL*/)
if (cropRect->right < rect.right) rect.right = cropRect->right;
if (cropRect->bottom < rect.bottom) rect.bottom = cropRect->bottom;
}
-
+
FIBITMAP *dib = CreateDIBFromDC(hScrDC, &rect);
ReleaseDC(nullptr, hScrDC);
return dib;
}
-FIBITMAP* CreateDIBFromDC(HDC hDC, const RECT* rect, HWND hCapture/*=NULL*/)
+FIBITMAP *CreateDIBFromDC(HDC hDC, const RECT *rect, HWND hCapture/*=NULL*/)
{
long width = rect->right - rect->left;
long height = rect->bottom - rect->top;
@@ -212,18 +212,18 @@ FIBITMAP* CreateDIBFromDC(HDC hDC, const RECT* rect, HWND hCapture/*=NULL*/)
SelectBitmap(hMaskDC, hMask);
HRGN hRgn = CreateRectRgn(0, 0, 0, 0);
if (hCapture && GetWindowRgn(hCapture, hRgn) == ERROR) {
- if ((GetWindowLongPtr(hCapture, GWL_EXSTYLE)&WS_EX_LAYERED)) {
+ if ((GetWindowLongPtr(hCapture, GWL_EXSTYLE) & WS_EX_LAYERED)) {
uint8_t bAlpha = 0;
COLORREF crKey = 0x00000000;
DWORD dwFlags = 0;
if (GetLayeredWindowAttributes(hCapture, &crKey, &bAlpha, &dwFlags)) {
// per window transparency (like fading in a whole window)
- if ((dwFlags&LWA_COLORKEY)) {
+ if ((dwFlags & LWA_COLORKEY)) {
SetBkColor(hMemDC, crKey);
BitBlt(hMaskDC, 0, 0, width, height, hMemDC, rect->left, rect->top, SRCCOPY);
bInvert = true;
}
- else if ((dwFlags&LWA_ALPHA)) {
+ else if ((dwFlags & LWA_ALPHA)) {
bFixAlpha = false;
}
}
@@ -242,9 +242,9 @@ FIBITMAP* CreateDIBFromDC(HDC hDC, const RECT* rect, HWND hCapture/*=NULL*/)
}
DeleteObject(hRgn);
if (bFixAlpha) {
- FIBITMAP* dibMask = FreeImage_CreateDIBFromHBITMAP(hMask);
+ FIBITMAP *dibMask = FreeImage_CreateDIBFromHBITMAP(hMask);
if (bInvert) FreeImage_Invert(dibMask);
- FIBITMAP* dib8 = FreeImage_ConvertTo8Bits(dibMask);
+ FIBITMAP *dib8 = FreeImage_ConvertTo8Bits(dibMask);
// copy the dib8 alpha mask to dib32 main bitmap
FreeImage_SetChannel(dib, dib8, FICC_ALPHA);
FreeImage_Unload(dibMask);
@@ -253,14 +253,14 @@ FIBITMAP* CreateDIBFromDC(HDC hDC, const RECT* rect, HWND hCapture/*=NULL*/)
DeleteDC(hMaskDC);
DeleteObject(hMask);
DeleteObject(hBr);
-
+
// clean up
DeleteDC(hMemDC);
DeleteObject(hBitmap);
if (!hDC)
ReleaseDC(nullptr, hScrDC);
-#ifdef _DEBUG
+ #ifdef _DEBUG
switch (FreeImage_GetImageType(dib)) {
case FIT_UNKNOWN:
OutputDebugStringA("FIBITMAP Type: FIT_UNKNOWN\r\n");
@@ -307,15 +307,15 @@ FIBITMAP* CreateDIBFromDC(HDC hDC, const RECT* rect, HWND hCapture/*=NULL*/)
}
BOOL inf = FreeImage_IsTransparent(dib);
OutputDebugStringA(inf ? "FIBITMAP Transparent: true\r\n" : "FIBITMAP Transparent: false\r\n");
-#endif
+ #endif
return dib;
}
/////////////////////////////////////////////////////////////////////////////////////////
-char* GetFileNameA(const wchar_t* pszPath)
+char *GetFileNameA(const wchar_t *pszPath)
{
- const wchar_t* slash = wcsrchr(pszPath, '\\');
+ const wchar_t *slash = wcsrchr(pszPath, '\\');
if (!slash) slash = wcsrchr(pszPath, '/');
if (slash)
return mir_u2a(slash + 1);
@@ -332,7 +332,7 @@ BOOL GetEncoderClsid(wchar_t *wchMimeType, CLSID &clsidEncoder)
BOOL bOk = FALSE;
Gdiplus::GetImageEncodersSize(&uiNum, &uiSize);
if (uiSize > 0) {
- Gdiplus::ImageCodecInfo* pImageCodecInfo = (Gdiplus::ImageCodecInfo*)mir_alloc(uiSize);
+ Gdiplus::ImageCodecInfo *pImageCodecInfo = (Gdiplus::ImageCodecInfo *)mir_alloc(uiSize);
if (pImageCodecInfo) {
Gdiplus::GetImageEncoders(uiNum, uiSize, pImageCodecInfo);
for (UINT i = 0; i < uiNum; ++i) {
@@ -361,7 +361,7 @@ void SaveGIF(HBITMAP hBmp, const wchar_t *szFilename)
CLSID clsidEncoder;
if (GetEncoderClsid(L"image/gif", clsidEncoder)) {
LPWSTR pswFile = mir_wstrdup(szFilename);
- pBitmap->Save((const wchar_t*)pswFile, &clsidEncoder, nullptr);
+ pBitmap->Save((const wchar_t *)pswFile, &clsidEncoder, nullptr);
mir_free(pswFile);
}
delete pBitmap;
@@ -385,7 +385,7 @@ void SaveTIF(HBITMAP hBmp, const wchar_t *szFilename)
CLSID EncCLSID;
if (GetEncoderClsid(L"image/tiff", EncCLSID)) {
//--- Create a 2-parameter array, for Compression and for Color Bit depth
- Gdiplus::EncoderParameters* EncParams = (Gdiplus::EncoderParameters*) malloc(sizeof(Gdiplus::EncoderParameters) + 1 * sizeof(Gdiplus::EncoderParameter));
+ Gdiplus::EncoderParameters *EncParams = (Gdiplus::EncoderParameters *)malloc(sizeof(Gdiplus::EncoderParameters) + 1 * sizeof(Gdiplus::EncoderParameter));
// Gdiplus::EncoderParameters pEncoderParameters;
//--- Use LZW Compression instead of Group 4, since it works for color and G4 doesn't
ULONG ulCompression = Gdiplus::EncoderValueCompressionLZW;
@@ -402,7 +402,7 @@ void SaveTIF(HBITMAP hBmp, const wchar_t *szFilename)
EncParams->Parameter[1].Value = &ulColorDepth;
LPWSTR pswFile = mir_wstrdup(szFilename);
- stat = pBitmap->Save((const wchar_t*)pswFile, &EncCLSID, EncParams);
+ stat = pBitmap->Save((const wchar_t *)pswFile, &EncCLSID, EncParams);
mir_free(pswFile);
free(EncParams);
}
diff --git a/plugins/SendScreenshotPlus/src/Utils.h b/plugins/SendScreenshotPlus/src/Utils.h
index 63f30de9d1..90657ae045 100644
--- a/plugins/SendScreenshotPlus/src/Utils.h
+++ b/plugins/SendScreenshotPlus/src/Utils.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-09 Miranda ICQ/IM project,
This file is part of Send Screenshot Plus, a Miranda IM plugin.
diff --git a/plugins/SendScreenshotPlus/src/ctrl_button.cpp b/plugins/SendScreenshotPlus/src/ctrl_button.cpp
index e3d29d71b0..510f38fc40 100644
--- a/plugins/SendScreenshotPlus/src/ctrl_button.cpp
+++ b/plugins/SendScreenshotPlus/src/ctrl_button.cpp
@@ -166,8 +166,8 @@ static void __fastcall PaintThemeButton(BTNCTRL *ctl, HDC hdcMem, LPRECT rcClien
if ((ctl->dwStyle & MBS_FLAT) && ctl->hThemeToolbar) {
int state = IsWindowEnabled(ctl->hwnd)
? (ctl->stateId == PBS_NORMAL && ctl->defbutton
- ? PBS_DEFAULTED
- : ctl->stateId)
+ ? PBS_DEFAULTED
+ : ctl->stateId)
: PBS_DISABLED;
if (IsThemeBackgroundPartiallyTransparent(ctl->hThemeToolbar, TP_BUTTON, TBStateConvert2Flat(state))) {
if (SUCCEEDED(DrawThemeParentBackground(ctl->hwnd, hdcMem, rcClient)))
@@ -180,8 +180,8 @@ static void __fastcall PaintThemeButton(BTNCTRL *ctl, HDC hdcMem, LPRECT rcClien
if (ctl->hThemeButton) {
int state = IsWindowEnabled(ctl->hwnd)
? (ctl->stateId == PBS_NORMAL && ctl->defbutton
- ? PBS_DEFAULTED
- : ctl->stateId)
+ ? PBS_DEFAULTED
+ : ctl->stateId)
: PBS_DISABLED;
if (IsThemeBackgroundPartiallyTransparent(ctl->hThemeButton, BP_PUSHBUTTON, state)) {
if (SUCCEEDED(DrawThemeParentBackground(ctl->hwnd, hdcMem, rcClient)))
@@ -291,7 +291,7 @@ static void __fastcall PaintButton(BTNCTRL *ctl, HDC hdcMem, LPRECT rcClient)
}
else {
UINT uState = DFCS_BUTTONPUSH | ((ctl->stateId == PBS_HOT) ? DFCS_HOT : 0) | ((ctl->stateId == PBS_PRESSED) ? DFCS_PUSHED : 0);
- if (ctl->defbutton&&ctl->stateId == PBS_NORMAL) uState |= DLGC_DEFPUSHBUTTON;
+ if (ctl->defbutton && ctl->stateId == PBS_NORMAL) uState |= DLGC_DEFPUSHBUTTON;
DrawFrameControl(hdcMem, rcClient, DFC_BUTTON, uState);
// Draw focus rectangle if button has focus
if (ctl->bFocus) {
@@ -568,40 +568,40 @@ static LRESULT CALLBACK Button_WndProc(HWND hwndBtn, UINT uMsg, WPARAM wParam, L
GetWindowText(bct->hwnd, szButton, _countof(szButton));
SetWindowText(bct->hwnd, TranslateW(szButton));
break;
-
+
case WM_SETFOCUS: // set keybord bFocus and redraw
bct->bFocus = 1;
InvalidateRect(bct->hwnd, nullptr, TRUE);
break;
-
+
case WM_KILLFOCUS: // kill bFocus and redraw
bct->bFocus = 0;
InvalidateRect(bct->hwnd, nullptr, TRUE);
break;
-
+
case WM_WINDOWPOSCHANGED:
InvalidateRect(bct->hwnd, nullptr, TRUE);
break;
-
+
case WM_ENABLE: // windows tells us to enable/disable
bct->stateId = wParam ? PBS_NORMAL : PBS_DISABLED;
InvalidateRect(bct->hwnd, nullptr, TRUE);
break;
-
+
case WM_MOUSELEAVE: // faked by the WM_TIMER
if (bct->stateId != PBS_DISABLED) { // don't change states if disabled
bct->stateId = PBS_NORMAL;
InvalidateRect(bct->hwnd, nullptr, TRUE);
}
break;
-
+
case WM_LBUTTONDOWN:
if (bct->stateId != PBS_DISABLED) { // don't change states if disabled
bct->stateId = PBS_PRESSED;
InvalidateRect(bct->hwnd, nullptr, TRUE);
}
break;
-
+
case WM_LBUTTONUP:
if (bct->stateId != PBS_DISABLED) { // don't change states if disabled
uint8_t bPressed = bct->stateId == PBS_PRESSED;
@@ -618,7 +618,7 @@ static LRESULT CALLBACK Button_WndProc(HWND hwndBtn, UINT uMsg, WPARAM wParam, L
InvalidateRect(bct->hwnd, nullptr, TRUE);
}
break;
-
+
case WM_MOUSEMOVE:
if (bct->stateId == PBS_NORMAL) {
bct->stateId = PBS_HOT;
@@ -627,7 +627,7 @@ static LRESULT CALLBACK Button_WndProc(HWND hwndBtn, UINT uMsg, WPARAM wParam, L
// Call timer, used to start cheesy TrackMouseEvent faker
SetTimer(hwndBtn, BUTTON_POLLID, BUTTON_POLLDELAY, nullptr);
break;
-
+
case WM_TIMER: // use a timer to check if they have did a mouseout
if (wParam == BUTTON_POLLID) {
RECT rc;
diff --git a/plugins/SendScreenshotPlus/src/ctrl_button.h b/plugins/SendScreenshotPlus/src/ctrl_button.h
index 102578d50f..ea06501769 100644
--- a/plugins/SendScreenshotPlus/src/ctrl_button.h
+++ b/plugins/SendScreenshotPlus/src/ctrl_button.h
@@ -5,7 +5,7 @@ Copyright:
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-09 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp b/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp
index 82d6475621..dd87397c62 100644
--- a/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp
+++ b/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
Copyright:
-© 2012-24 Miranda NG team (https://miranda-ng.org)
+© 2012-25 Miranda NG team (https://miranda-ng.org)
© 2006-10 DeathAxe, Yasnovidyashii, Merlin, K. Romanov, Kreol
This program is free software; you can redistribute it and/or
@@ -30,7 +30,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
HICON Skin_GetIcon_SendSS(unsigned short id)
{
- if(id==0xFFFF)
+ if (id == 0xFFFF)
return GetIcon(ICO_MAIN);
return GetIconBtn(id);
}
@@ -260,7 +260,7 @@ static INT_PTR CALLBACK MsgBoxProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM l
}
}
// increase width if info text requires more
- if ((pMsgBox->uType&MB_INFOBAR) && pMsgBox->ptszInfoText && *pMsgBox->ptszInfoText) {
+ if ((pMsgBox->uType & MB_INFOBAR) && pMsgBox->ptszInfoText && *pMsgBox->ptszInfoText) {
int multiline = 0;
RECT rcico; GetClientRect(GetDlgItem(hDlg, ICO_DLGLOGO), &rcico);
rcico.right = rcico.right * 100 / 66; // padding
diff --git a/plugins/SendScreenshotPlus/src/dlg_msgbox.h b/plugins/SendScreenshotPlus/src/dlg_msgbox.h
index 587a2bf60c..5357dc1641 100644
--- a/plugins/SendScreenshotPlus/src/dlg_msgbox.h
+++ b/plugins/SendScreenshotPlus/src/dlg_msgbox.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
Copyright:
-© 2012-24 Miranda NG team (https://miranda-ng.org)
+© 2012-25 Miranda NG team (https://miranda-ng.org)
© 2006-10 DeathAxe, Yasnovidyashii, Merlin, K. Romanov, Kreol
This program is free software; you can redistribute it and/or
diff --git a/plugins/SendScreenshotPlus/src/stdafx.cxx b/plugins/SendScreenshotPlus/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/SendScreenshotPlus/src/stdafx.cxx
+++ b/plugins/SendScreenshotPlus/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/SendScreenshotPlus/src/stdafx.h b/plugins/SendScreenshotPlus/src/stdafx.h
index e2c570c370..0d6364dff7 100644
--- a/plugins/SendScreenshotPlus/src/stdafx.h
+++ b/plugins/SendScreenshotPlus/src/stdafx.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-09 Miranda ICQ/IM project,
This file is part of Send Screenshot Plus, a Miranda IM plugin.
@@ -38,6 +38,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <gdiplus.h>
#include <mapi.h>
#include <UxTheme.h>
+#include <io.h>
#include <map>
#include <memory>
@@ -84,7 +85,6 @@ using namespace std;
#include "CSendHost_ImageShack.h"
#include "CSendHost_uploadpie.h"
#include "CSendHost_imgur.h"
-#include "DevKey.h"
#include "UMainForm.h"
#include "Utils.h"
diff --git a/plugins/SendScreenshotPlus/src/version.h b/plugins/SendScreenshotPlus/src/version.h
index dd8c6ef385..1f0e6a2fa9 100644
--- a/plugins/SendScreenshotPlus/src/version.h
+++ b/plugins/SendScreenshotPlus/src/version.h
@@ -1,7 +1,7 @@
#define __MAJOR_VERSION 0
#define __MINOR_VERSION 9
#define __RELEASE_NUM 0
-#define __BUILD_NUM 3
+#define __BUILD_NUM 4
#include <stdver.h>
diff --git a/plugins/Sessions/Src/Import.cpp b/plugins/Sessions/Src/Import.cpp
index 815b3be97f..a47aaa0f07 100644
--- a/plugins/Sessions/Src/Import.cpp
+++ b/plugins/Sessions/Src/Import.cpp
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/Sessions/Src/LoadSessions.cpp b/plugins/Sessions/Src/LoadSessions.cpp
index 0ee908bb68..41e236a252 100644
--- a/plugins/Sessions/Src/LoadSessions.cpp
+++ b/plugins/Sessions/Src/LoadSessions.cpp
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/Sessions/Src/SaveSessions.cpp b/plugins/Sessions/Src/SaveSessions.cpp
index c843e7ee6e..e058aed018 100644
--- a/plugins/Sessions/Src/SaveSessions.cpp
+++ b/plugins/Sessions/Src/SaveSessions.cpp
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/Sessions/Src/stdafx.cxx b/plugins/Sessions/Src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/Sessions/Src/stdafx.cxx
+++ b/plugins/Sessions/Src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/ShellExt/src/shlcom.cpp b/plugins/ShellExt/src/shlcom.cpp
index c27ff9cfdb..8e8314ddd4 100644
--- a/plugins/ShellExt/src/shlcom.cpp
+++ b/plugins/ShellExt/src/shlcom.cpp
@@ -236,7 +236,7 @@ void ipcGetSkinIcons(THeaderIPC * ipch)
bool ipcGetSortedContacts(THeaderIPC * ipch, int* pSlot, bool bGroupMode)
{
// hide offliners?
- bool bHideOffline = Clist::HideOffline;
+ bool bHideOffline = Clist::bHideOffline;
// do they wanna hide the offline people anyway?
if (g_plugin.getByte(SHLExt_ShowNoOffline, 0) == 1)
// hide offline people
@@ -409,7 +409,7 @@ void __stdcall ipcService(ULONG_PTR)
// if the group mode is on, check if they want the CList setting
bool bGroupMode = (BST_CHECKED == g_plugin.getByte(SHLExt_UseGroups, BST_UNCHECKED));
if (bGroupMode && BST_CHECKED == g_plugin.getByte(SHLExt_UseCListSetting, BST_UNCHECKED))
- bGroupMode = Clist::UseGroups;
+ bGroupMode = Clist::bUseGroups;
TSlotIPC * pct = nullptr;
int iSlot = 0;
diff --git a/plugins/ShellExt/src/stdafx.cxx b/plugins/ShellExt/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/ShellExt/src/stdafx.cxx
+++ b/plugins/ShellExt/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/SimpleAR/src/Main.cpp b/plugins/SimpleAR/src/Main.cpp
index 450ed5dfdd..c50fd5dc38 100644
--- a/plugins/SimpleAR/src/Main.cpp
+++ b/plugins/SimpleAR/src/Main.cpp
@@ -207,7 +207,7 @@ INT addEvent(WPARAM hContact, LPARAM hDBEvent)
dbei.eventType = EVENTTYPE_MESSAGE;
dbei.flags = DBEF_UTF | DBEF_SENT;
dbei.szModule = pszProto;
- dbei.timestamp = time(0);
+ dbei.iTimestamp = time(0);
dbei.cbBlob = (int)mir_strlen(pszUtf) + 1;
dbei.pBlob = pszUtf;
db_event_add(hContact, &dbei);
diff --git a/plugins/SimpleAR/src/stdafx.cxx b/plugins/SimpleAR/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/SimpleAR/src/stdafx.cxx
+++ b/plugins/SimpleAR/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/SimpleStatusMsg/src/awaymsg.cpp b/plugins/SimpleStatusMsg/src/awaymsg.cpp
index b4c8474bad..3d8211ccb1 100644
--- a/plugins/SimpleStatusMsg/src/awaymsg.cpp
+++ b/plugins/SimpleStatusMsg/src/awaymsg.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-10 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/SimpleStatusMsg/src/stdafx.cxx b/plugins/SimpleStatusMsg/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/SimpleStatusMsg/src/stdafx.cxx
+++ b/plugins/SimpleStatusMsg/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/SkypeStatusChange/SkypeStatusChange.vcxproj b/plugins/SkypeStatusChange/SkypeStatusChange.vcxproj
deleted file mode 100644
index e35270e203..0000000000
--- a/plugins/SkypeStatusChange/SkypeStatusChange.vcxproj
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>SkypeStatusChange</ProjectName>
- <ProjectGuid>{10F78F26-2B20-4158-869F-CB29533B4C2C}</ProjectGuid>
- </PropertyGroup>
- <ImportGroup Label="PropertySheets">
- <Import Project="$(ProjectDir)..\..\build\vc.common\plugin.props" />
- </ImportGroup>
- <ItemGroup>
- <ClCompile Include="src\main.cpp" />
- <ClCompile Include="src\options.cpp" />
- <ClCompile Include="src\stdafx.cxx">
- <PrecompiledHeader>Create</PrecompiledHeader>
- </ClCompile>
- <ClInclude Include="src\resource.h" />
- <ClInclude Include="src\stdafx.h" />
- <ClInclude Include="src\version.h" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="res\SkypeStatusChange.rc" />
- <ResourceCompile Include="res\Version.rc" />
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/plugins/SkypeStatusChange/SkypeStatusChange.vcxproj.filters b/plugins/SkypeStatusChange/SkypeStatusChange.vcxproj.filters
deleted file mode 100644
index d39c8711df..0000000000
--- a/plugins/SkypeStatusChange/SkypeStatusChange.vcxproj.filters
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$(ProjectDir)..\..\build\vc.common\common.filters" />
- <ItemGroup>
- <ClCompile Include="src\main.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="src\options.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="src\stdafx.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="src\resource.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="src\stdafx.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="src\version.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="res\SkypeStatusChange.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- <ResourceCompile Include="res\Version.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/plugins/SkypeStatusChange/res/SkypeStatusChange.rc b/plugins/SkypeStatusChange/res/SkypeStatusChange.rc
deleted file mode 100644
index 8235922234..0000000000
--- a/plugins/SkypeStatusChange/res/SkypeStatusChange.rc
+++ /dev/null
@@ -1,120 +0,0 @@
-// Microsoft Visual C++ generated resource script.
-//
-#include "..\src\resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include "afxres.h"
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// Russian (Russia) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS)
-LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
-#pragma code_page(1251)
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE
-BEGIN
- "..\\src\\resource.h\0"
-END
-
-2 TEXTINCLUDE
-BEGIN
- "#include ""afxres.h""\r\n"
- "\0"
-END
-
-3 TEXTINCLUDE
-BEGIN
- "\r\n"
- "\0"
-END
-
-#endif // APSTUDIO_INVOKED
-
-#endif // Russian (Russia) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-/////////////////////////////////////////////////////////////////////////////
-// English (Neutral) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL
-#pragma code_page(1252)
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Dialog
-//
-
-IDD_DIALOG_SETTINGS DIALOGEX 0, 0, 312, 218
-STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_VISIBLE
-EXSTYLE WS_EX_CONTROLPARENT
-FONT 8, "MS Shell Dlg", 400, 0, 0x1
-BEGIN
- CONTROL "Synchronize status message",IDC_CHECK_SYNCK_STATUS_MSG,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,179,289,10
- LTEXT "&Check any protocol or any status to exclude it from synchronization:",IDC_STATIC,7,13,298,8
- CONTROL "",IDC_TREE_PROTOCOLS,"SysTreeView32",TVS_CHECKBOXES | WS_BORDER | WS_HSCROLL | WS_TABSTOP,16,26,225,146
- CONTROL "Synchronize if current status differs from previous one",IDC_CHECK_STATUSES,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,194,284,10
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// DESIGNINFO
-//
-
-#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO
-BEGIN
- IDD_DIALOG_SETTINGS, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 305
- TOPMARGIN, 7
- BOTTOMMARGIN, 211
- END
-END
-#endif // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// AFX_DIALOG_LAYOUT
-//
-
-IDD_DIALOG_SETTINGS AFX_DIALOG_LAYOUT
-BEGIN
- 0
-END
-
-#endif // English (Neutral) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif // not APSTUDIO_INVOKED
-
diff --git a/plugins/SkypeStatusChange/res/Version.rc b/plugins/SkypeStatusChange/res/Version.rc
deleted file mode 100644
index 5a5ddd63ed..0000000000
--- a/plugins/SkypeStatusChange/res/Version.rc
+++ /dev/null
@@ -1,9 +0,0 @@
-// Microsoft Visual C++ generated resource script.
-//
-#ifdef APSTUDIO_INVOKED
-#error this file is not editable by Microsoft Visual C++
-#endif //APSTUDIO_INVOKED
-
-#include "..\src\version.h"
-
-#include "..\..\build\Version.rc"
diff --git a/plugins/SkypeStatusChange/src/main.cpp b/plugins/SkypeStatusChange/src/main.cpp
deleted file mode 100644
index 3be15c1351..0000000000
--- a/plugins/SkypeStatusChange/src/main.cpp
+++ /dev/null
@@ -1,311 +0,0 @@
-#include "stdafx.h"
-#include "resource.h"
-#include "Version.h"
-
-#pragma comment(lib, "Comctl32.lib")
-
-CMPlugin g_plugin;
-
-int SSC_OptInitialise(WPARAM wp, LPARAM lp);
-
-UINT g_MsgIDSkypeControlAPIAttach = 0;
-UINT g_MsgIDSkypeControlAPIDiscover = 0;
-HWND g_wndMainWindow = nullptr;
-
-bool g_bMirandaIsShutdown = false;
-
-HANDLE g_hThread = nullptr;
-HANDLE g_hEventShutdown = nullptr;
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-static PLUGININFOEX pluginInfoEx =
-{
- sizeof(PLUGININFOEX),
- __PLUGIN_NAME,
- PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM),
- __DESCRIPTION,
- __AUTHOR,
- __COPYRIGHT,
- __AUTHORWEB,
- UNICODE_AWARE,
- { 0x2925520b, 0x6677, 0x4658, { 0x8b, 0xad, 0x56, 0x61, 0xd1, 0x3e, 0x46, 0x92 }}
-};
-
-static int CompareStatuses(const PrevStatus *p1, const PrevStatus *p2)
-{
- return mir_strcmp(p1->szProto, p2->szProto);
-}
-
-CMPlugin::CMPlugin() :
- PLUGIN<CMPlugin>("Change Skype Status", pluginInfoEx),
- m_aProtocol2Status(3, CompareStatuses),
- bSyncStatusMsg(getModule(), "SyncStatusMsg", false),
- bSyncStatusState(getModule(), "SyncStatusState", false)
-{}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-enum
-{
- // Client is successfully attached and API window handle can be found in wParam parameter
- SKYPECONTROLAPI_ATTACH_SUCCESS = 0,
-
- // Skype has acknowledged connection request and is waiting for confirmation from the user.
- SKYPECONTROLAPI_ATTACH_PENDING_AUTHORIZATION = 1,
-
- // The client is not yet attached and should wait for SKYPECONTROLAPI_ATTACH_SUCCESS message
- // User has explicitly denied access to client
- SKYPECONTROLAPI_ATTACH_REFUSED = 2,
-
- // API is not available at the moment. For example, this happens when no user is currently logged in.
- SKYPECONTROLAPI_ATTACH_NOT_AVAILABLE = 3,
-
- // Client should wait for SKYPECONTROLAPI_ATTACH_API_AVAILABLE broadcast before making any further
- // connection attempts.
- SKYPECONTROLAPI_ATTACH_API_AVAILABLE = 0x8001
-};
-
-LPCTSTR g_pszSkypeWndClassName = L"SkypeHelperWindow{155198f0-8749-47b7-ac53-58f2ac70844c}";
-
-const CMirandaStatus2SkypeStatus g_aStatusCode[MAX_STATUS_COUNT] =
-{
- {ID_STATUS_AWAY, "AWAY",L"Away"},
- {ID_STATUS_NA, "AWAY",L"Not available"}, // removed in Skype 5
- {ID_STATUS_DND, "DND",L"Do not disturb"},
- {ID_STATUS_ONLINE, "ONLINE",L"Online"},
- {ID_STATUS_FREECHAT, "ONLINE",L"Free for chat"}, // SKYPEME status doesn't work in Skype 4!
- {ID_STATUS_OFFLINE, "OFFLINE",L"Offline"},
- {ID_STATUS_INVISIBLE, "INVISIBLE",L"Invisible"},
- {ID_STATUS_OCCUPIED,"DND",L"Occupied"}
-};
-
-enum { INVALID_INDEX = 0xFFFFFFFF };
-
-class CStatusInfo
-{
-public:
- CStatusInfo() : m_nStatusIndex(INVALID_INDEX) { m_szModule[0] = '\0'; }
-
- size_t StatusIndex()const { return m_nStatusIndex; }
- void StatusIndex(size_t val) { m_nStatusIndex = val; }
-
- const char* Module()const { return m_szModule; }
- void Module(const char* val)
- {
- if (val)
- strncpy_s(m_szModule, val, mir_strlen(val));
- else
- m_szModule[0] = '\0';
- }
-
-private:
- char m_szModule[MAXMODULELABELLENGTH];
- size_t m_nStatusIndex;
-};
-
-CStatusInfo g_CurrStatusInfo;
-mir_cs g_csStatusInfo;
-
-int SSC_OnProtocolAck(WPARAM, LPARAM lParam)
-{
- if (g_bMirandaIsShutdown)
- return 0;
-
- ACKDATA* pAckData = reinterpret_cast<ACKDATA*>(lParam);
- if (pAckData->type != ACKTYPE_STATUS || pAckData->result != ACKRESULT_SUCCESS || !pAckData->szModule)
- return 0;
-
- if (!g_plugin.IsProtocolExcluded(pAckData->szModule)) {
- int nStatus = Proto_GetStatus(pAckData->szModule);
- for (size_t i = 0; i < _countof(g_aStatusCode); ++i) {
- const CMirandaStatus2SkypeStatus& ms = g_aStatusCode[i];
- if (ms.m_nMirandaStatus == nStatus) {
- int nPrevStatus;
- if ((false == g_plugin.IsProtocolStatusExcluded(pAckData->szModule, nStatus))
- && ((!g_plugin.bSyncStatusState)
- || (false == g_plugin.GetPreviousStatus(pAckData->szModule, nPrevStatus))
- || (nPrevStatus != nStatus))) {
- {
- mir_cslock guard(g_csStatusInfo);
- g_CurrStatusInfo.StatusIndex(i);
- g_CurrStatusInfo.Module(pAckData->szModule);
- }
- if (0 == ::PostMessage(HWND_BROADCAST, g_MsgIDSkypeControlAPIDiscover, (WPARAM)g_wndMainWindow, 0)) {
- mir_cslock guard(g_csStatusInfo);
- g_CurrStatusInfo.StatusIndex(INVALID_INDEX);
- g_CurrStatusInfo.Module(nullptr);
- }
- else g_plugin.SetPreviousStatus(pAckData->szModule, nStatus);
- }
- break;
- }
- }
- }
-
- return 0;
-}
-
-static void ThreadFunc(void*)
-{
- while (true) {
- MSG msg;
- if (TRUE == ::PeekMessage(&msg, g_wndMainWindow, 0, 0, PM_NOREMOVE)) {
- while (::GetMessage(&msg, g_wndMainWindow, 0, 0)) {
- TranslateMessage(&msg);
- DispatchMessage(&msg);
- }
- }
- else {
- uint32_t dwResult = ::MsgWaitForMultipleObjects(1, &g_hEventShutdown, FALSE, INFINITE, QS_ALLEVENTS);
- assert(WAIT_FAILED != dwResult);
- if (WAIT_OBJECT_0 == dwResult)
- break;
- }
- }
-}
-
-LRESULT APIENTRY SkypeAPI_WindowProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp)
-{
- LRESULT lReturnCode = 0;
- bool bIssueDefProc = false;
-
- switch (msg) {
- case WM_DESTROY:
- g_wndMainWindow = nullptr;
- break;
-
- case WM_COPYDATA:
- break;
-
- default:
- if (msg == g_MsgIDSkypeControlAPIAttach) {
- switch (lp) {
- case SKYPECONTROLAPI_ATTACH_SUCCESS:
- {
- CStatusInfo si;
- {
- mir_cslock guard(g_csStatusInfo);
- si = g_CurrStatusInfo;
- }
- if (INVALID_INDEX != si.StatusIndex() && si.StatusIndex() < _countof(g_aStatusCode)) {
- const CMirandaStatus2SkypeStatus& ms = g_aStatusCode[si.StatusIndex()];
- HWND wndSkypeAPIWindow = reinterpret_cast<HWND>(wp);
-
- enum { BUFFER_SIZE = 256 };
- char szSkypeCmd[BUFFER_SIZE];
- const char szSkypeCmdSetStatus[] = "SET USERSTATUS ";
- ::strncpy_s(szSkypeCmd, szSkypeCmdSetStatus, sizeof(szSkypeCmdSetStatus) / sizeof(szSkypeCmdSetStatus[0]));
- ::strncat_s(szSkypeCmd, ms.m_pszSkypeStatus, _countof(szSkypeCmd) - mir_strlen(szSkypeCmd));
- uint32_t cLength = static_cast<uint32_t>(mir_strlen(szSkypeCmd));
-
- COPYDATASTRUCT oCopyData;
- oCopyData.dwData = 0;
- oCopyData.lpData = szSkypeCmd;
- oCopyData.cbData = cLength + 1;
- SendMessage(wndSkypeAPIWindow, WM_COPYDATA, (WPARAM)hWnd, (LPARAM)&oCopyData);
- if (g_plugin.bSyncStatusMsg) {
- wchar_t* pszStatusMsg = nullptr;
- if (ProtoServiceExists(si.Module(), PS_GETMYAWAYMSG))
- pszStatusMsg = reinterpret_cast<wchar_t*>(CallProtoService(si.Module(), PS_GETMYAWAYMSG, (WPARAM)ms.m_nMirandaStatus, SGMA_UNICODE));
-
- if ((nullptr == pszStatusMsg) || (CALLSERVICE_NOTFOUND == INT_PTR(pszStatusMsg)))
- 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);
- mir_free(pszStatusMsg);
-
- const char szSkypeCmdSetStatusMsg[] = "SET PROFILE MOOD_TEXT ";
- ::strncpy_s(szSkypeCmd, szSkypeCmdSetStatusMsg, sizeof(szSkypeCmdSetStatusMsg) / sizeof(szSkypeCmdSetStatusMsg[0]));
- ::strncat_s(szSkypeCmd, pMsg, _countof(szSkypeCmd) - mir_strlen(szSkypeCmd));
-
- oCopyData.dwData = 0;
- oCopyData.lpData = szSkypeCmd;
- oCopyData.cbData = static_cast<uint32_t>(mir_strlen(szSkypeCmd)) + 1;
- SendMessage(wndSkypeAPIWindow, WM_COPYDATA, (WPARAM)hWnd, (LPARAM)&oCopyData);
- }
- }
- }
- }
- break;
-
- case SKYPECONTROLAPI_ATTACH_PENDING_AUTHORIZATION:
- break;
-
- case SKYPECONTROLAPI_ATTACH_REFUSED:
- break;
-
- case SKYPECONTROLAPI_ATTACH_NOT_AVAILABLE:
- break;
-
- case SKYPECONTROLAPI_ATTACH_API_AVAILABLE:
- break;
- }
- lReturnCode = 1;
- }
- else bIssueDefProc = true;
- break;
- }
-
- if (true == bIssueDefProc)
- lReturnCode = DefWindowProc(hWnd, msg, wp, lp);
-
- return lReturnCode;
-}
-
-int SSC_OnPreShutdown(WPARAM/* wParam*/, LPARAM/* lParam*/)
-{
- g_bMirandaIsShutdown = true;
- BOOL b = SetEvent(g_hEventShutdown);
- assert(b && "SetEvent failed");
-
- uint32_t dwResult = ::WaitForSingleObject(g_hThread, INFINITE);
- assert(WAIT_FAILED != dwResult);
-
- b = ::CloseHandle(g_hEventShutdown);
- assert(b && "CloseHandle event");
-
- if (g_wndMainWindow) {
- b = DestroyWindow(g_wndMainWindow);
- assert(b && "DestoryWindow");
- g_wndMainWindow = nullptr;
- }
-
- UnregisterClass(g_pszSkypeWndClassName, g_plugin.getInst());
- return 0;
-}
-
-/******************************* INSTALLATION PROCEDURES *****************************/
-
-int CMPlugin::Load()
-{
- g_MsgIDSkypeControlAPIAttach = ::RegisterWindowMessage(L"SkypeControlAPIAttach");
- g_MsgIDSkypeControlAPIDiscover = ::RegisterWindowMessage(L"SkypeControlAPIDiscover");
- if ((0 == g_MsgIDSkypeControlAPIAttach) || (0 == g_MsgIDSkypeControlAPIDiscover))
- return 1;
-
- WNDCLASS oWindowClass = { 0 };
- oWindowClass.style = CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS;
- oWindowClass.lpfnWndProc = (WNDPROC)&SkypeAPI_WindowProc;
- oWindowClass.hInstance = g_plugin.getInst();
- oWindowClass.lpszClassName = g_pszSkypeWndClassName;
- if (!RegisterClass(&oWindowClass))
- return 1;
-
- g_wndMainWindow = CreateWindowEx(WS_EX_APPWINDOW | WS_EX_WINDOWEDGE,
- g_pszSkypeWndClassName, L"", WS_BORDER | WS_SYSMENU | WS_MINIMIZEBOX,
- CW_USEDEFAULT, CW_USEDEFAULT, 128, 128, nullptr, nullptr, g_plugin.getInst(), nullptr);
- if (g_wndMainWindow == nullptr)
- return 1;
-
- g_bMirandaIsShutdown = false;
- g_hEventShutdown = ::CreateEvent(nullptr, TRUE, FALSE, nullptr);
-
- g_hThread = mir_forkthread(ThreadFunc);
-
- HookEvent(ME_PROTO_ACK, SSC_OnProtocolAck);
- HookEvent(ME_SYSTEM_PRESHUTDOWN, SSC_OnPreShutdown);
- HookEvent(ME_OPT_INITIALISE, SSC_OptInitialise);
- return 0;
-}
diff --git a/plugins/SkypeStatusChange/src/options.cpp b/plugins/SkypeStatusChange/src/options.cpp
deleted file mode 100644
index f132ecd6db..0000000000
--- a/plugins/SkypeStatusChange/src/options.cpp
+++ /dev/null
@@ -1,161 +0,0 @@
-#include "stdafx.h"
-#include "resource.h"
-
-/////////////////////////////////////////////////////////////////////////////////////////////
-
-struct CTreeItemData
-{
- bool m_isProtocol;
- char *m_pszModule;
- int m_nStatus;
-};
-
-class CSettingsDlg : public CDlgBase
-{
- CCtrlCheck chkMsg, chkState;
- CCtrlTreeView m_tree;
-
- void DisableChildren(HTREEITEM htiParent, int iState)
- {
- TVITEMEX tvi = {};
- tvi.mask = TVIF_STATE;
- tvi.stateMask = TVIS_STATEIMAGEMASK;
- if (iState == 1) {
- tvi.mask |= TVIF_STATEEX;
- tvi.uStateEx = TVIS_EX_DISABLED;
- tvi.state = INDEXTOSTATEIMAGEMASK(2);
- }
- else tvi.state = INDEXTOSTATEIMAGEMASK(1);
-
- for (HTREEITEM hti = m_tree.GetChild(htiParent); hti; hti = m_tree.GetNextSibling(hti)) {
- tvi.hItem = hti;
- m_tree.SetItem(&tvi);
- }
- }
-
- void FreeMemory(HTREEITEM hti)
- {
- for (HTREEITEM h = m_tree.GetChild(hti); h; h = m_tree.GetNextSibling(h)) {
- FreeMemory(h);
- CTreeItemData *pData = GetItemData(h);
- if (pData)
- delete pData;
- }
- }
-
- CTreeItemData* GetItemData(HTREEITEM hti)
- {
- TVITEMEX tvi = {};
- tvi.hItem = hti;
- tvi.mask = TVIF_PARAM | TVIF_HANDLE;
- return (m_tree.GetItem(&tvi)) ? (CTreeItemData *)tvi.lParam : nullptr;
- }
-
- void SaveExclusion(HTREEITEM htiParent)
- {
- for (HTREEITEM hti = m_tree.GetChild(htiParent); hti; hti = m_tree.GetNextSibling(hti)) {
- CTreeItemData *pData = GetItemData(hti);
- bool isChecked = m_tree.IsSelected(hti);
- if (pData->m_isProtocol) {
- g_plugin.ExcludeProtocol(pData->m_pszModule, isChecked);
- SaveExclusion(hti);
- }
- else g_plugin.ExcludeProtocolStatus(pData->m_pszModule, pData->m_nStatus, isChecked);
- }
- }
-
- HTREEITEM TreeInsert(wchar_t *pName, HTREEITEM htiParent, bool bSelected, CTreeItemData *pData)
- {
- TVINSERTSTRUCT tvi = {};
- tvi.hParent = htiParent;
- tvi.hInsertAfter = TVI_LAST;
- tvi.item.mask = TVIF_TEXT | TVIF_PARAM | TVIF_STATE;
- tvi.item.pszText = pName;
- tvi.item.lParam = reinterpret_cast<LPARAM>(pData);
- tvi.item.stateMask = TVIS_SELECTED;
- tvi.item.state = (bSelected) ? TVIS_SELECTED : 0;
- return m_tree.InsertItem(&tvi);
- }
-
-public:
- CSettingsDlg() :
- CDlgBase(g_plugin, IDD_DIALOG_SETTINGS),
- m_tree(this, IDC_TREE_PROTOCOLS),
- chkMsg(this, IDC_CHECK_SYNCK_STATUS_MSG),
- chkState(this, IDC_CHECK_STATUSES)
- {
- CreateLink(chkMsg, g_plugin.bSyncStatusMsg);
- CreateLink(chkState, g_plugin.bSyncStatusState);
-
- m_tree.OnItemChanged = Callback(this, &CSettingsDlg::onItemChanged_Tree);
- }
-
- bool OnInitDialog() override
- {
- for (auto &pAccount : Accounts()) {
- if (mir_strcmpi(pAccount->szProtoName, "SKYPE")) {
- g_plugin.ExcludeProtocol(pAccount->szModuleName, true);
- continue;
- }
-
- CTreeItemData *pItemData = new CTreeItemData;
- pItemData->m_isProtocol = true;
- pItemData->m_pszModule = pAccount->szModuleName;
-
- bool bProtocolExcluded = g_plugin.IsProtocolExcluded(pAccount->szModuleName);
- HTREEITEM hti = TreeInsert(pAccount->tszAccountName, TVI_ROOT, bProtocolExcluded, pItemData);
- if (hti) {
- int nStatusBits = CallProtoService(pAccount->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0);
- int nStatusExcluded = CallProtoService(pAccount->szModuleName, PS_GETCAPS, PFLAGNUM_5, 0);
- pItemData = new CTreeItemData;
- pItemData->m_isProtocol = false;
- pItemData->m_pszModule = pAccount->szModuleName;
- pItemData->m_nStatus = ID_STATUS_OFFLINE;
- bool bStatusExcluded = g_plugin.IsProtocolStatusExcluded(pAccount->szModuleName, pItemData->m_nStatus);
- TreeInsert(TranslateW(g_aStatusCode[5].m_ptszStatusName), hti, bStatusExcluded, 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);
- if ((m2s.m_nMirandaStatus != ID_STATUS_OFFLINE) && (nStatusBits & statusFlags) && !(nStatusExcluded & statusFlags)) {
- pItemData = new CTreeItemData;
- pItemData->m_isProtocol = false;
- pItemData->m_pszModule = pAccount->szModuleName;
- pItemData->m_nStatus = m2s.m_nMirandaStatus;
- bStatusExcluded = g_plugin.IsProtocolStatusExcluded(pAccount->szModuleName, pItemData->m_nStatus);
- TreeInsert(TranslateW(m2s.m_ptszStatusName), hti, bStatusExcluded, pItemData);
- }
- }
-
- m_tree.Expand(hti, TVE_EXPAND);
- }
- }
- return true;
- }
-
- bool OnApply() override
- {
- SaveExclusion(TVI_ROOT);
- return true;
- }
-
- void OnDestroy() override
- {
- FreeMemory(TVI_ROOT);
- }
-
- void onItemChanged_Tree(CCtrlTreeView::TEventInfo *ev)
- {
- DisableChildren(ev->hItem, m_tree.GetItemState(ev->hItem, TVIS_STATEIMAGEMASK) >> 12);
- }
-};
-
-int SSC_OptInitialise(WPARAM wp, LPARAM)
-{
- OPTIONSDIALOGPAGE odp = {};
- odp.position = 910000000;
- odp.szTitle.a = LPGEN("Change Skype status");
- odp.szGroup.a = LPGEN("Plugins");
- odp.pDialog = new CSettingsDlg();
- g_plugin.addOptions(wp, &odp);
- return 0;
-}
diff --git a/plugins/SkypeStatusChange/src/resource.h b/plugins/SkypeStatusChange/src/resource.h
deleted file mode 100644
index d46ce54239..0000000000
--- a/plugins/SkypeStatusChange/src/resource.h
+++ /dev/null
@@ -1,21 +0,0 @@
-//{{NO_DEPENDENCIES}}
-// Microsoft Visual C++ generated include file.
-// Used by SkypeStatusChange.rc
-//
-#define IDD_DIALOG_SETTINGS 101
-#define IDB_BITMAP1 102
-#define IDC_CHECK_SYNCK_STATUS_MSG 1001
-#define IDC_TREE_PROTOCOLS 1003
-#define IDC_CHECK1 1004
-#define IDC_CHECK_STATUSES 1004
-
-// Next default values for new objects
-//
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 103
-#define _APS_NEXT_COMMAND_VALUE 40001
-#define _APS_NEXT_CONTROL_VALUE 1005
-#define _APS_NEXT_SYMED_VALUE 101
-#endif
-#endif
diff --git a/plugins/SkypeStatusChange/src/stdafx.cxx b/plugins/SkypeStatusChange/src/stdafx.cxx
deleted file mode 100644
index 13f28e1314..0000000000
--- a/plugins/SkypeStatusChange/src/stdafx.cxx
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation version 2
-of the License.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "stdafx.h" \ No newline at end of file
diff --git a/plugins/SkypeStatusChange/src/stdafx.h b/plugins/SkypeStatusChange/src/stdafx.h
deleted file mode 100644
index 3a9b5d8242..0000000000
--- a/plugins/SkypeStatusChange/src/stdafx.h
+++ /dev/null
@@ -1,132 +0,0 @@
-#pragma once
-
-#include <windows.h>
-#include <stdio.h>
-#include <assert.h>
-#include <commctrl.h>
-
-#include <newpluginapi.h>
-#include <m_database.h>
-#include <m_protocols.h>
-#include <m_protosvc.h>
-#include <m_awaymsg.h>
-#include <m_options.h>
-#include <m_langpack.h>
-#include <m_utils.h>
-
-struct PrevStatus
-{
- PrevStatus(const char *_proto, int _status) :
- szProto(mir_strdup(_proto)),
- iStatus(_status)
- {}
-
- ptrA szProto;
- int iStatus;
-};
-
-struct CMPlugin : public PLUGIN<CMPlugin>
-{
- CMPlugin();
-
- CMOption<bool> bSyncStatusMsg, bSyncStatusState;
-
- int Load() override;
-
- enum
- {
- cssOnline = 0x00000001,
- cssOffline = 0x00000002,
- cssInvisible = 0x00000004,
- cssShortAway = 0x00000008,
- cssLongAway = 0x00000010,
- cssLightDND = 0x00000020,
- cssHeavyDND = 0x00000040,
- cssFreeChat = 0x00000080,
- cssIdle = 0x00000400,
- cssAll = 0x80000000
- };
-
- static unsigned long Status2Flag(int status)
- {
- switch (status) {
- case ID_STATUS_ONLINE: return cssOnline;
- case ID_STATUS_OFFLINE: return cssOffline;
- case ID_STATUS_INVISIBLE: return cssInvisible;
- case ID_STATUS_AWAY: return cssShortAway;
- case ID_STATUS_NA: return cssLongAway;
- case ID_STATUS_OCCUPIED: return cssLightDND;
- case ID_STATUS_DND: return cssHeavyDND;
- case ID_STATUS_FREECHAT: return cssFreeChat;
- case ID_STATUS_IDLE: return cssIdle;
- }
- return 0;
- }
-
- OBJLIST<PrevStatus> m_aProtocol2Status;
-
- bool IsProtocolExcluded(const char *pszProtocol)const
- {
- uint32_t dwSettings = db_get_dw(NULL, pszProtocol, "ChangeSkypeStatus_Exclusions", 0);
- return ((dwSettings & cssAll) ? true : false);
- }
-
- bool IsProtocolStatusExcluded(const char *pszProtocol, int nStatus)const
- {
- uint32_t dwSettings = db_get_dw(NULL, pszProtocol, "ChangeSkypeStatus_Exclusions", 0);
- return ((dwSettings & Status2Flag(nStatus)) ? true : false);
- }
-
- void ExcludeProtocol(const char *pszProtocol, bool bExclude)
- {
- uint32_t dwSettings = db_get_dw(NULL, pszProtocol, "ChangeSkypeStatus_Exclusions", 0);
- if (bExclude)
- dwSettings |= cssAll;
- else
- dwSettings &= ~cssAll;
-
- db_set_dw(NULL, pszProtocol, "ChangeSkypeStatus_Exclusions", dwSettings);
- }
-
- void ExcludeProtocolStatus(const char *pszProtocol, int nStatus, bool bExclude)
- {
- uint32_t dwSettings = db_get_dw(NULL, pszProtocol, "ChangeSkypeStatus_Exclusions", 0);
- if (bExclude)
- dwSettings |= Status2Flag(nStatus);
- else
- dwSettings &= ~Status2Flag(nStatus);
-
- db_set_dw(NULL, pszProtocol, "ChangeSkypeStatus_Exclusions", dwSettings);
- }
-
- bool GetPreviousStatus(const char *pszProtocol, int &nStatus)const
- {
- int i = m_aProtocol2Status.getIndex((PrevStatus *)&pszProtocol);
- if (i != -1) {
- nStatus = m_aProtocol2Status[i].iStatus;
- return true;
- }
-
- return false;
- }
-
- void SetPreviousStatus(const char *pszProtocol, int nStatus)
- {
- int i = m_aProtocol2Status.getIndex((PrevStatus *)&pszProtocol);
- if (i != -1)
- m_aProtocol2Status[i].iStatus = nStatus;
- else
- m_aProtocol2Status.insert(new PrevStatus(pszProtocol, nStatus));
- }
-};
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-struct CMirandaStatus2SkypeStatus
-{
- int m_nMirandaStatus;
- LPCSTR m_pszSkypeStatus;
- LPCTSTR m_ptszStatusName;
-};
-
-extern const CMirandaStatus2SkypeStatus g_aStatusCode[MAX_STATUS_COUNT];
diff --git a/plugins/SkypeStatusChange/src/version.h b/plugins/SkypeStatusChange/src/version.h
deleted file mode 100644
index c7cbddebe0..0000000000
--- a/plugins/SkypeStatusChange/src/version.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#define __MAJOR_VERSION 0
-#define __MINOR_VERSION 0
-#define __RELEASE_NUM 0
-#define __BUILD_NUM 18
-
-#include <stdver.h>
-
-#define __PLUGIN_NAME "Skype status change"
-#define __FILENAME "SkypeStatusChange.dll"
-#define __DESCRIPTION "Skype status change according to Miranda status."
-#define __AUTHOR "Dioksin"
-#define __AUTHORWEB "https://miranda-ng.org/p/SkypeStatusChange"
-#define __COPYRIGHT "© 2009-2010 Dioksin"
diff --git a/plugins/SmileyAdd/src/options.cpp b/plugins/SmileyAdd/src/options.cpp
index edf2272e06..1e2232bbb5 100644
--- a/plugins/SmileyAdd/src/options.cpp
+++ b/plugins/SmileyAdd/src/options.cpp
@@ -1,6 +1,6 @@
/*
Miranda NG SmileyAdd Plugin
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (C) 2005-11 Boris Krasnovskiy All Rights Reserved
Copyright (C) 2003-04 Rein-Peter de Boer
diff --git a/plugins/SmileyAdd/src/options.h b/plugins/SmileyAdd/src/options.h
index 0fdaf9a804..dc31940bbf 100644
--- a/plugins/SmileyAdd/src/options.h
+++ b/plugins/SmileyAdd/src/options.h
@@ -1,6 +1,6 @@
/*
Miranda NG SmileyAdd Plugin
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (C) 2005-11 Boris Krasnovskiy All Rights Reserved
Copyright (C) 2003-04 Rein-Peter de Boer
diff --git a/plugins/SmileyAdd/src/services.cpp b/plugins/SmileyAdd/src/services.cpp
index 5391ce58b1..c8dad1969d 100644
--- a/plugins/SmileyAdd/src/services.cpp
+++ b/plugins/SmileyAdd/src/services.cpp
@@ -1,6 +1,6 @@
/*
Miranda NG SmileyAdd Plugin
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (C) 2005-11 Boris Krasnovskiy All Rights Reserved
Copyright (C) 2003-04 Rein-Peter de Boer
diff --git a/plugins/SmileyAdd/src/smileys.cpp b/plugins/SmileyAdd/src/smileys.cpp
index aba608cc47..dd57dadc52 100644
--- a/plugins/SmileyAdd/src/smileys.cpp
+++ b/plugins/SmileyAdd/src/smileys.cpp
@@ -1,6 +1,6 @@
/*
Miranda NG SmileyAdd Plugin
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (C) 2005-11 Boris Krasnovskiy All Rights Reserved
Copyright (C) 2003-04 Rein-Peter de Boer
diff --git a/plugins/SmileyAdd/src/smileys.h b/plugins/SmileyAdd/src/smileys.h
index 118f82d3f7..4e3ebd936f 100644
--- a/plugins/SmileyAdd/src/smileys.h
+++ b/plugins/SmileyAdd/src/smileys.h
@@ -1,6 +1,6 @@
/*
Miranda NG SmileyAdd Plugin
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
Copyright (C) 2005-11 Boris Krasnovskiy All Rights Reserved
Copyright (C) 2003-04 Rein-Peter de Boer
diff --git a/plugins/SmileyAdd/src/stdafx.cxx b/plugins/SmileyAdd/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/SmileyAdd/src/stdafx.cxx
+++ b/plugins/SmileyAdd/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/SmileyAdd/src/version.h b/plugins/SmileyAdd/src/version.h
index cb7c19ac9c..ae468d5e25 100644
--- a/plugins/SmileyAdd/src/version.h
+++ b/plugins/SmileyAdd/src/version.h
@@ -10,4 +10,4 @@
#define __DESCRIPTION "Smiley support for Miranda NG."
#define __AUTHOR "Peacow, nightwish, bid, borkra"
#define __AUTHORWEB "https://miranda-ng.org/p/SmileyAdd"
-#define __COPYRIGHT "© 2012-24 Miranda NG team, 2004-12 Boris Krasnovskiy, portions by Rein-Peter de Boer"
+#define __COPYRIGHT "© 2012-25 Miranda NG team, 2004-12 Boris Krasnovskiy, portions by Rein-Peter de Boer"
diff --git a/plugins/SpellChecker/src/stdafx.cxx b/plugins/SpellChecker/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/SpellChecker/src/stdafx.cxx
+++ b/plugins/SpellChecker/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/SplashScreen/src/stdafx.cxx b/plugins/SplashScreen/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/SplashScreen/src/stdafx.cxx
+++ b/plugins/SplashScreen/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/StartPosition/src/main.cpp b/plugins/StartPosition/src/main.cpp
index ba65abc729..da41fcf462 100644
--- a/plugins/StartPosition/src/main.cpp
+++ b/plugins/StartPosition/src/main.cpp
@@ -5,7 +5,7 @@ Copyright (C) 2005-2008 Felipe Brahm - souFrag
ICQ#50566818
http://www.soufrag.cl
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/StartPosition/src/options.h b/plugins/StartPosition/src/options.h
index 70070481b6..01281d615b 100644
--- a/plugins/StartPosition/src/options.h
+++ b/plugins/StartPosition/src/options.h
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/StartPosition/src/startposition.h b/plugins/StartPosition/src/startposition.h
index 7e38a6438c..5e62b9c16b 100644
--- a/plugins/StartPosition/src/startposition.h
+++ b/plugins/StartPosition/src/startposition.h
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/StartPosition/src/stdafx.cxx b/plugins/StartPosition/src/stdafx.cxx
index 87b7477097..72e87c2758 100644
--- a/plugins/StartPosition/src/stdafx.cxx
+++ b/plugins/StartPosition/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/StartPosition/src/stdafx.h b/plugins/StartPosition/src/stdafx.h
index 968905d2ab..ad27570438 100644
--- a/plugins/StartPosition/src/stdafx.h
+++ b/plugins/StartPosition/src/stdafx.h
@@ -5,7 +5,7 @@ Copyright (C) 2005-2008 Felipe Brahm - souFrag
ICQ#50566818
http://www.soufrag.cl
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/StartPosition/src/version.h b/plugins/StartPosition/src/version.h
index 9c9eda5b3e..7b70150ccd 100644
--- a/plugins/StartPosition/src/version.h
+++ b/plugins/StartPosition/src/version.h
@@ -10,4 +10,4 @@
#define __DESCRIPTION "Plugin supports starting position of Contact List relative to the taskbar and screen side."
#define __AUTHOR "Felipe Brahm - souFrag"
#define __AUTHORWEB "https://miranda-ng.org/p/StartPosition"
-#define __COPYRIGHT "© 2005-2008 Felipe Brahm - souFrag, © 2012-24 Miranda NG team"
+#define __COPYRIGHT "© 2005-2008 Felipe Brahm - souFrag, © 2012-25 Miranda NG team"
diff --git a/plugins/StartupSilence/src/main.cpp b/plugins/StartupSilence/src/main.cpp
index 23b414d5a3..9e2f74e6ff 100644
--- a/plugins/StartupSilence/src/main.cpp
+++ b/plugins/StartupSilence/src/main.cpp
@@ -1,6 +1,6 @@
/*
Copyright (c) 2012-13 Vladimir Lyubimov
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/StartupSilence/src/stdafx.cxx b/plugins/StartupSilence/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/StartupSilence/src/stdafx.cxx
+++ b/plugins/StartupSilence/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/StartupSilence/src/version.h b/plugins/StartupSilence/src/version.h
index 8ef125b923..7f3d317bad 100644
--- a/plugins/StartupSilence/src/version.h
+++ b/plugins/StartupSilence/src/version.h
@@ -16,7 +16,7 @@
#define __DESCRIPTION "Suppresses popups and mutes sounds for 10-300 sec at Miranda NG startup, then sets them back to predefined state (Automatically per computer settings)."
#define __AUTHOR "Vladimir Lyubimov"
#define __AUTHORWEB "https://miranda-ng.org/"
-#define __COPYRIGHT "© 2012-24 Vladimir Lyubimov"
+#define __COPYRIGHT "© 2012-25 Vladimir Lyubimov"
// other stuff for Version resource
#include <stdver.h>
diff --git a/plugins/StatusChange/src/stdafx.cxx b/plugins/StatusChange/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/StatusChange/src/stdafx.cxx
+++ b/plugins/StatusChange/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/StatusManager/StatusManager.vcxproj b/plugins/StatusManager/StatusManager.vcxproj
index 5ae7ba06e5..5e56395372 100644
--- a/plugins/StatusManager/StatusManager.vcxproj
+++ b/plugins/StatusManager/StatusManager.vcxproj
@@ -52,11 +52,6 @@
<None Include="res\ttbUp.ico" />
</ItemGroup>
<ItemGroup>
- <ClCompile Include="..\helpers\gen_helpers.cpp">
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
<ResourceCompile Include="res\resource.rc" />
<ResourceCompile Include="res\version.rc" />
</ItemGroup>
diff --git a/plugins/StatusManager/StatusManager.vcxproj.filters b/plugins/StatusManager/StatusManager.vcxproj.filters
index d077f7ec80..c5ef5304a6 100644
--- a/plugins/StatusManager/StatusManager.vcxproj.filters
+++ b/plugins/StatusManager/StatusManager.vcxproj.filters
@@ -41,9 +41,6 @@
<ClCompile Include="src\stdafx.cxx">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\helpers\gen_helpers.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\advancedautoaway.h">
diff --git a/plugins/StatusManager/res/resource.rc b/plugins/StatusManager/res/resource.rc
index 415d618f52..493862193a 100644
--- a/plugins/StatusManager/res/resource.rc
+++ b/plugins/StatusManager/res/resource.rc
@@ -209,21 +209,19 @@ BEGIN
GROUPBOX "Window on startup",IDC_STATIC,194,7,104,209
CONTROL "Set window state",IDC_SETWINSTATE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,209,22,80,10
COMBOBOX IDC_WINSTATE,209,34,80,60,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- CONTROL "Set docked",IDC_SETDOCKED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,209,52,80,10
- COMBOBOX IDC_DOCKED,209,64,80,60,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- CONTROL "Set window location",IDC_SETWINLOCATION,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,209,82,80,10
- LTEXT "Left",IDC_STATIC,214,97,35,8
- EDITTEXT IDC_XPOS,259,94,30,14,ES_AUTOHSCROLL | ES_NUMBER
- LTEXT "Top",IDC_STATIC,214,113,35,8
- EDITTEXT IDC_YPOS,259,110,30,14,ES_AUTOHSCROLL | ES_NUMBER
- LTEXT "",IDC_CURWINLOC,209,128,80,8
- CONTROL "Set window size",IDC_SETWINSIZE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,209,140,80,10
- LTEXT "Width",IDC_STATIC,214,155,35,8
- EDITTEXT IDC_WIDTH,259,152,30,14,ES_AUTOHSCROLL | ES_NUMBER
+ CONTROL "Set window location",IDC_SETWINLOCATION,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,209,59,80,10
+ LTEXT "Left",IDC_STATIC,214,74,35,8
+ EDITTEXT IDC_XPOS,259,71,30,14,ES_AUTOHSCROLL | ES_NUMBER
+ LTEXT "Top",IDC_STATIC,214,90,35,8
+ EDITTEXT IDC_YPOS,259,87,30,14,ES_AUTOHSCROLL | ES_NUMBER
+ LTEXT "",IDC_CURWINLOC,209,105,80,8
+ CONTROL "Set window size",IDC_SETWINSIZE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,209,117,80,10
+ LTEXT "Width",IDC_STATIC,214,132,35,8
+ EDITTEXT IDC_WIDTH,259,129,30,14,ES_AUTOHSCROLL | ES_NUMBER
PUSHBUTTON "Show CMDL",IDC_SHOWCMDL,14,194,53,14
- LTEXT "Height",IDC_STATIC,214,171,35,8
- EDITTEXT IDC_HEIGHT,259,168,30,14,ES_AUTOHSCROLL | ES_NUMBER
- LTEXT "",IDC_CURWINSIZE,209,186,80,8
+ LTEXT "Height",IDC_STATIC,214,148,35,8
+ EDITTEXT IDC_HEIGHT,259,145,30,14,ES_AUTOHSCROLL | ES_NUMBER
+ LTEXT "",IDC_CURWINSIZE,209,163,80,8
END
IDD_PUOPT_KEEPSTATUS DIALOGEX 0, 0, 264, 223
diff --git a/plugins/StatusManager/src/aaa_main.cpp b/plugins/StatusManager/src/aaa_main.cpp
index f69cd394bb..37e818a05f 100644
--- a/plugins/StatusManager/src/aaa_main.cpp
+++ b/plugins/StatusManager/src/aaa_main.cpp
@@ -444,7 +444,7 @@ int LoadAutoAwaySetting(SMProto &autoAwaySetting, char *protoName)
if (g_bAAASettingSame)
flags = 0xFFFFFF;
else
- flags = CallProtoService(protoName, PS_GETCAPS, PFLAGNUM_2, 0) & ~CallProtoService(protoName, PS_GETCAPS, (WPARAM)PFLAGNUM_5, 0);
+ flags = GetStatusFlags(protoName);
mir_snprintf(setting, "%s_Lv1Status", protoName);
autoAwaySetting.lv1Status = AAAPlugin.getWord(setting, (flags & StatusModeToProtoFlag(ID_STATUS_AWAY)) ? ID_STATUS_AWAY : ID_STATUS_OFFLINE);
diff --git a/plugins/StatusManager/src/aaa_options.cpp b/plugins/StatusManager/src/aaa_options.cpp
index 6e976fe277..08efc53cd8 100644
--- a/plugins/StatusManager/src/aaa_options.cpp
+++ b/plugins/StatusManager/src/aaa_options.cpp
@@ -346,7 +346,7 @@ static INT_PTR CALLBACK DlgProcAutoAwayRulesOpts(HWND hwndDlg, UINT msg, WPARAM
int flags = 0;
if (!g_bAAASettingSame)
- flags = CallProtoService(setting->m_szName, PS_GETCAPS, PFLAGNUM_2, 0) & ~CallProtoService(setting->m_szName, PS_GETCAPS, (WPARAM)PFLAGNUM_5, 0);
+ flags = GetStatusFlags(setting->m_szName);
LVITEM lvItem = { 0 };
lvItem.mask = LVIF_TEXT | LVIF_PARAM;
@@ -367,7 +367,7 @@ static INT_PTR CALLBACK DlgProcAutoAwayRulesOpts(HWND hwndDlg, UINT msg, WPARAM
{
int flags = 0;
if (!g_bAAASettingSame)
- flags = CallProtoService(setting->m_szName, PS_GETCAPS, PFLAGNUM_2, 0) & ~CallProtoService(setting->m_szName, PS_GETCAPS, (WPARAM)PFLAGNUM_5, 0);
+ flags = GetStatusFlags(setting->m_szName);
// clear box and add new status, loop status and check if compatible with proto
SendDlgItemMessage(hwndDlg, IDC_LV1STATUS, CB_RESETCONTENT, 0, 0);
diff --git a/plugins/StatusManager/src/commonstatus.cpp b/plugins/StatusManager/src/commonstatus.cpp
index f0ffb071b6..eaa5325616 100644
--- a/plugins/StatusManager/src/commonstatus.cpp
+++ b/plugins/StatusManager/src/commonstatus.cpp
@@ -251,9 +251,8 @@ int SetStatusEx(TProtoSettings &ps)
// status checks
long protoFlag = Proto_Status2Flag(newstatus);
- int b_Caps2 = CallProtoService(p->m_szName, PS_GETCAPS, PFLAGNUM_2, 0) & protoFlag;
- int b_Caps5 = CallProtoService(p->m_szName, PS_GETCAPS, PFLAGNUM_5, 0) & protoFlag;
- if (newstatus != ID_STATUS_OFFLINE && (!b_Caps2 || b_Caps5)) {
+ int b_Caps25 = GetStatusFlags(p->m_szName) & protoFlag;
+ if (newstatus != ID_STATUS_OFFLINE && !b_Caps25) {
// status and status message for this status not supported
log_debug(0, "CommonStatus: status not supported %s", p->m_szName);
continue;
@@ -297,9 +296,24 @@ static INT_PTR GetProtocolCountService(WPARAM, LPARAM)
return pCount;
}
+int GetStatusFlags(const char *szProto)
+{
+ auto f2 = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_2, 0);
+ auto f5 = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_5, 0);
+ int flags = f2 & ~f5;
+ if (flags == 0 && f5)
+ flags = PF2_ONLINE;
+
+ return flags;
+}
+
bool IsSuitableProto(PROTOACCOUNT *pa)
{
- return (pa == nullptr) ? false : pa->IsVisible();
+ if (!pa || !pa->bIsVisible || !pa->IsEnabled() || !pa->ppro)
+ return false;
+
+ PROTOCOLDESCRIPTOR *pd = Proto_IsProtocolLoaded(pa->szProtoName);
+ return (pd != nullptr && (pd->type == PROTOTYPE_PROTOCOL || pd->type == PROTOTYPE_PROTOWITHACCS));
}
static int onShutdown(WPARAM, LPARAM)
diff --git a/plugins/StatusManager/src/commonstatus.h b/plugins/StatusManager/src/commonstatus.h
index 6695cebaa8..569eafa59a 100644
--- a/plugins/StatusManager/src/commonstatus.h
+++ b/plugins/StatusManager/src/commonstatus.h
@@ -49,6 +49,7 @@ wchar_t *GetDefaultStatusMessage(PROTOCOLSETTINGEX *ps, int status);
int GetActualStatus(PROTOCOLSETTINGEX *protoSetting);
int InitCommonStatus();
bool IsSuitableProto(PROTOACCOUNT *pa);
+int GetStatusFlags(const char *szProto);
/////////////////////////////////////////////////////////////////////////////////////////
// external data
diff --git a/plugins/StatusManager/src/confirmdialog.cpp b/plugins/StatusManager/src/confirmdialog.cpp
index 5ef6a719a3..e5417e14e3 100644
--- a/plugins/StatusManager/src/confirmdialog.cpp
+++ b/plugins/StatusManager/src/confirmdialog.cpp
@@ -312,7 +312,7 @@ static INT_PTR CALLBACK ConfirmDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
}
PROTOCOLSETTINGEX *proto = (PROTOCOLSETTINGEX*)lvItem.lParam;
- int flags = CallProtoService(proto->m_szName, PS_GETCAPS, PFLAGNUM_2, 0) & ~CallProtoService(proto->m_szName, PS_GETCAPS, (WPARAM)PFLAGNUM_5, 0);
+ int flags = GetStatusFlags(proto->m_szName);
// clear box and add new status, loop status and check if compatible with proto
SendDlgItemMessage(hwndDlg, IDC_STATUS, CB_RESETCONTENT, 0, 0);
int actualStatus = proto->m_status;
@@ -339,7 +339,7 @@ static INT_PTR CALLBACK ConfirmDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
for (auto &it : statusModes) {
int pf5 = CallProtoService(proto->m_szName, PS_GETCAPS, PFLAGNUM_5, 0);
- if (((flags & it.iFlag) || it.iFlag == PF2_OFFLINE) && (!(!(flags) & Proto_Status2Flag(it.iFlag)) || (pf5 & Proto_Status2Flag(it.iFlag)))) {
+ if (((flags & it.iFlag) || it.iFlag == PF2_OFFLINE) && (!(!(flags & Proto_Status2Flag(it.iFlag))) || (pf5 & Proto_Status2Flag(it.iFlag)))) {
wchar_t *statusMode = Clist_GetStatusModeDescription(it.iStatus, 0);
item = SendDlgItemMessage(hwndDlg, IDC_STATUS, CB_ADDSTRING, 0, (LPARAM)statusMode);
SendDlgItemMessage(hwndDlg, IDC_STATUS, CB_SETITEMDATA, item, it.iStatus);
diff --git a/plugins/StatusManager/src/ks_main.cpp b/plugins/StatusManager/src/ks_main.cpp
index 1fffb2c7fc..1abd2aa1ba 100644
--- a/plugins/StatusManager/src/ks_main.cpp
+++ b/plugins/StatusManager/src/ks_main.cpp
@@ -31,8 +31,6 @@ static HANDLE hStatusChangeHook = nullptr;
static HANDLE hCSStatusChangeHook = nullptr;
static HANDLE hCSStatusChangeExHook = nullptr;
-static HWND hMessageWindow = nullptr;
-
static UINT_PTR checkConnectionTimerId = 0;
static UINT_PTR afterCheckTimerId = 0;
static UINT_PTR processAckTimerId = 0;
@@ -65,7 +63,7 @@ INT_PTR IsProtocolEnabledService(WPARAM wParam, LPARAM lParam);
static int ProcessPopup(int reason, LPARAM lParam);
LRESULT CALLBACK KSPopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
-static uint32_t CALLBACK MessageWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
+static LRESULT CALLBACK MessageWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
// options.c
extern int KeepStatusOptionsInit(WPARAM wparam, LPARAM);
@@ -80,8 +78,7 @@ void KSUnloadOptions()
UnhookEvent(hCSStatusChangeExHook);
hProtoAckHook = hStatusChangeHook = hCSStatusChangeHook = hCSStatusChangeExHook = nullptr;
- if (IsWindow(hMessageWindow))
- DestroyWindow(hMessageWindow);
+ mir_unsubclassWindow(Miranda_GetSystemWindow()->GetHwnd(), MessageWndProc);
if (StartTimer(IDT_CHECKCONTIN, -1, FALSE))
WSACleanup();
@@ -112,12 +109,8 @@ int KSLoadOptions()
if (ServiceExists(ME_CS_STATUSCHANGE))
hCSStatusChangeHook = HookEvent(ME_CS_STATUSCHANGE, CSStatusChange);
hCSStatusChangeExHook = HookEvent(ME_CS_STATUSCHANGEEX, CSStatusChangeEx);
- if (KSPlugin.getByte(SETTING_CHECKAPMRESUME, 0)) {
- if (!IsWindow(hMessageWindow)) {
- hMessageWindow = CreateWindowEx(0, L"STATIC", nullptr, 0, 0, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
- SetWindowLongPtr(hMessageWindow, GWLP_WNDPROC, (LONG_PTR)MessageWndProc);
- }
- }
+ if (KSPlugin.getByte(SETTING_CHECKAPMRESUME, 0))
+ mir_subclassWindow(Miranda_GetSystemWindow()->GetHwnd(), MessageWndProc);
retryCount = 0;
}
@@ -524,8 +517,9 @@ static void CALLBACK CheckAckStatusTimer(HWND, UINT, UINT_PTR, DWORD)
for (auto &it : protoList) {
int curStatus = it->GetStatus();
int newStatus = Proto_GetStatus(it->m_szName);
+ int protoFlags = GetStatusFlags(it->m_szName);
// ok, np
- if (curStatus == ID_STATUS_CURRENT || curStatus == ID_STATUS_DISABLED || curStatus == newStatus || newStatus > MAX_STATUS)
+ if (curStatus == ID_STATUS_CURRENT || curStatus == ID_STATUS_DISABLED || curStatus == newStatus || newStatus > MAX_STATUS || !protoFlags)
continue;
if (IsStatusConnecting(newStatus)) { // connecting
@@ -899,9 +893,9 @@ static int ProcessPopup(int reason, LPARAM lParam)
if (hIcon == nullptr)
hIcon = Skin_LoadIcon(SKINICON_STATUS_OFFLINE);
- Netlib_Logf(0, "KeepStatus: %s", wszText.c_str());
+ Netlib_LogfW(0, L"KeepStatus: %s", wszText.c_str());
return ShowPopup(wszText, hIcon);
-}
+}
LRESULT CALLBACK KSPopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
@@ -995,7 +989,7 @@ INT_PTR AnnounceStatusChangeService(WPARAM, LPARAM lParam)
/////////////////////////////////////////////////////////////////////////////////////////
// window for suspend
-static uint32_t CALLBACK MessageWndProc(HWND, UINT msg, WPARAM wParam, LPARAM lParam)
+static LRESULT CALLBACK MessageWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
static TProtoSettings *ps = nullptr;
@@ -1003,7 +997,7 @@ static uint32_t CALLBACK MessageWndProc(HWND, UINT msg, WPARAM wParam, LPARAM lP
case WM_POWERBROADCAST:
switch (wParam) {
case PBT_APMSUSPEND:
- log_info(0, "KeepStatus: suspend state detected: %08X %08X", wParam, lParam);
+ log_info(0, "KeepStatus: suspend state detected");
if (ps == nullptr) {
ps = new TProtoSettings(protoList);
for (auto &it : *ps)
@@ -1040,7 +1034,7 @@ static uint32_t CALLBACK MessageWndProc(HWND, UINT msg, WPARAM wParam, LPARAM lP
break;
}
- return TRUE;
+ return mir_callNextSubclass(hwnd, MessageWndProc, msg, wParam, lParam);
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -1056,7 +1050,6 @@ static int onShutdown(WPARAM, LPARAM)
int KSModuleLoaded(WPARAM, LPARAM)
{
- hMessageWindow = nullptr;
KSLoadOptions();
hEvents[0] = HookEvent(ME_OPT_INITIALISE, KeepStatusOptionsInit);
diff --git a/plugins/StatusManager/src/resource.h b/plugins/StatusManager/src/resource.h
index a96ced8f45..14dc39f971 100644
--- a/plugins/StatusManager/src/resource.h
+++ b/plugins/StatusManager/src/resource.h
@@ -39,8 +39,6 @@
#define IDC_MAXRETRIES 1018
#define IDC_INITDELAY 1019
#define IDC_SETPROFILEDELAY 1020
-#define IDC_DOCKED 1021
-#define IDC_SETDOCKED 1022
#define IDC_MAXDELAY 1023
#define IDC_INCREASEEXPONENTIAL 1024
#define IDC_LNOTHING 1025
diff --git a/plugins/StatusManager/src/ss_main.cpp b/plugins/StatusManager/src/ss_main.cpp
index f838c1cdd7..c4e9b59eb5 100644
--- a/plugins/StatusManager/src/ss_main.cpp
+++ b/plugins/StatusManager/src/ss_main.cpp
@@ -23,13 +23,12 @@ CFakePlugin SSPlugin(SSMODULENAME);
static HANDLE hServices[3], hEvents[3];
static UINT_PTR setStatusTimerId = 0;
+static LRESULT CALLBACK MessageWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
/////////////////////////////////////////////////////////////////////////////////////////
static HANDLE hProtoAckHook, hCSStatusChangeHook, hStatusChangeHook;
-static HWND hMessageWindow;
-
static uint8_t showDialogOnStartup = 0;
/////////////////////////////////////////////////////////////////////////////////////////
@@ -234,16 +233,19 @@ static int OnOkToExit(WPARAM, LPARAM)
if (!Proto_GetAccount(pa->szModuleName))
continue;
- char lastName[128], lastMsg[128];
- mir_snprintf(lastName, "%s%s", PREFIX_LAST, pa->szModuleName);
- SSPlugin.setWord(lastName, pa->iRealStatus);
- mir_snprintf(lastMsg, "%s%s", PREFIX_LASTMSG, pa->szModuleName);
- SSPlugin.delSetting(lastMsg);
+ int iStatus = Proto_GetStatus(pa->szModuleName);
+ Netlib_Logf(0, "StatusManager: storing status %d for %s", iStatus, pa->szModuleName);
+
+ char szSetting[128];
+ mir_snprintf(szSetting, "%s%s", PREFIX_LAST, pa->szModuleName);
+ SSPlugin.setWord(szSetting, iStatus);
+ mir_snprintf(szSetting, "%s%s", PREFIX_LASTMSG, pa->szModuleName);
+ SSPlugin.delSetting(szSetting);
if (!(CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND & ~PF1_INDIVMODEMSG))
continue;
- if (!(CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0) & Proto_Status2Flag(pa->iRealStatus)))
+ if (!(CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0) & Proto_Status2Flag(iStatus)))
continue;
// NewAwaySys
@@ -257,7 +259,7 @@ static int OnOkToExit(WPARAM, LPARAM)
CallService(MS_NAS_GETSTATE, (WPARAM)&npi, 1);
}
if (npi.szMsg != nullptr) {
- SSPlugin.setWString(lastMsg, npi.tszMsg);
+ SSPlugin.setWString(szSetting, npi.tszMsg);
mir_free(npi.tszMsg);
}
}
@@ -305,8 +307,7 @@ static int OnShutdown(WPARAM, LPARAM)
if (SSPlugin.getByte(SETTING_SETWINSTATE, 0))
db_set_b(0, MODULE_CLIST, SETTING_WINSTATE, (uint8_t)state);
- if (hMessageWindow)
- DestroyWindow(hMessageWindow);
+ mir_unsubclassWindow(Miranda_GetSystemWindow()->GetHwnd(), MessageWndProc);
ShutdownConfirmDialog();
protoList.destroy();
@@ -314,11 +315,11 @@ static int OnShutdown(WPARAM, LPARAM)
}
/* Window proc for poweroff event */
-static uint32_t CALLBACK MessageWndProc(HWND, UINT msg, WPARAM wParam, LPARAM)
+static LRESULT CALLBACK MessageWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch (msg) {
case WM_ENDSESSION:
- log_debug(0, "WM_ENDSESSION");
+ log_debug(0, "WM_ENDSESSION: %d", (int)wParam);
if (wParam) {
log_debug(0, "WM_ENDSESSION: calling exit");
OnShutdown(0, 0);
@@ -327,7 +328,7 @@ static uint32_t CALLBACK MessageWndProc(HWND, UINT msg, WPARAM wParam, LPARAM)
break;
}
- return TRUE;
+ return mir_callNextSubclass(hwnd, MessageWndProc, msg, wParam, lParam);
}
int SSModuleLoaded(WPARAM, LPARAM)
@@ -339,9 +340,8 @@ int SSModuleLoaded(WPARAM, LPARAM)
/* shutdown hook for normal shutdown */
hEvents[1] = HookEvent(ME_SYSTEM_OKTOEXIT, OnOkToExit);
hEvents[2] = HookEvent(ME_SYSTEM_PRESHUTDOWN, OnShutdown);
- /* message window for poweroff */
- hMessageWindow = CreateWindowEx(0, L"STATIC", nullptr, 0, 0, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
- SetWindowLongPtr(hMessageWindow, GWLP_WNDPROC, (LONG_PTR)MessageWndProc);
+
+ mir_subclassWindow(Miranda_GetSystemWindow()->GetHwnd(), MessageWndProc);
GetProfile(-1, protoList);
@@ -388,7 +388,7 @@ int SSModuleLoaded(WPARAM, LPARAM)
WINDOWPLACEMENT wndpl = { sizeof(wndpl) };
if (GetWindowPlacement(hClist, &wndpl)) {
- if (wndpl.showCmd == SW_SHOWNORMAL && !Clist_IsDocked()) {
+ if (wndpl.showCmd == SW_SHOWNORMAL) {
RECT rc;
if (GetWindowRect(hClist, &rc)) {
int x = rc.left;
@@ -428,15 +428,6 @@ void StartupStatusLoad()
if (SSPlugin.getByte(SETTING_SETPROFILE, 1) || SSPlugin.getByte(SETTING_OFFLINECLOSE, 0))
db_set_w(0, "CList", "Status", (uint16_t)ID_STATUS_OFFLINE);
- // docking
- if (SSPlugin.getByte(SETTING_SETDOCKED, 0)) {
- int docked = SSPlugin.getByte(SETTING_DOCKED, DOCKED_NONE);
- if (docked == DOCKED_LEFT || docked == DOCKED_RIGHT)
- docked = -docked;
-
- db_set_b(0, MODULE_CLIST, SETTING_DOCKED, (uint8_t)docked);
- }
-
// Create service functions; the get functions are created here; they don't rely on commonstatus
hServices[0] = CreateServiceFunction(MS_SS_GETPROFILE, SrvGetProfile);
hServices[1] = CreateServiceFunction(MS_SS_GETPROFILECOUNT, GetProfileCount);
diff --git a/plugins/StatusManager/src/ss_options.cpp b/plugins/StatusManager/src/ss_options.cpp
index 3f9e37d69b..f40f8c7ced 100644
--- a/plugins/StatusManager/src/ss_options.cpp
+++ b/plugins/StatusManager/src/ss_options.cpp
@@ -250,10 +250,6 @@ class CSSMainOptDlg : public CSSOptionsBaseDlg
else profiles.AddString(TranslateT("default"));
profiles.SetCurSel(defProfile);
- chkSetDocked.Enable(db_get_b(0, MODULE_CLIST, SETTING_TOOLWINDOW, 1));
- if (!chkSetDocked.Enabled())
- chkSetDocked.SetState(false);
-
int val = SSPlugin.getByte(SETTING_WINSTATE, SETTING_STATE_NORMAL);
SendDlgItemMessage(m_hwnd, IDC_WINSTATE, CB_RESETCONTENT, 0, 0);
@@ -276,7 +272,7 @@ class CSSMainOptDlg : public CSSOptionsBaseDlg
}
CCtrlButton btnShowCmdl;
- CCtrlCheck chkSetProfile, chkShowDialog, chkSetWinSize, chkSetWinState, chkSetWinLocation, chkSetDocked;
+ CCtrlCheck chkSetProfile, chkShowDialog, chkSetWinSize, chkSetWinState, chkSetWinLocation;
CCtrlCombo profiles;
CTimer timer;
@@ -286,7 +282,6 @@ public:
timer(this, 10),
profiles(this, IDC_PROFILE),
btnShowCmdl(this, IDC_SHOWCMDL),
- chkSetDocked(this, IDC_SETDOCKED),
chkSetProfile(this, IDC_SETPROFILE),
chkShowDialog(this, IDC_SHOWDIALOG),
chkSetWinSize(this, IDC_SETWINSIZE),
@@ -297,7 +292,6 @@ public:
timer.OnEvent = Callback(this, &CSSMainOptDlg::onTimer);
- chkSetDocked.OnChange = Callback(this, &CSSMainOptDlg::onChange_Docked);
chkSetProfile.OnChange = Callback(this, &CSSMainOptDlg::onChange_SetProfile);
chkShowDialog.OnChange = Callback(this, &CSSMainOptDlg::onChange_ShowDialog);
chkSetWinSize.OnChange = Callback(this, &CSSMainOptDlg::onChange_SetWinSize);
@@ -312,7 +306,6 @@ public:
CheckDlgButton(m_hwnd, IDC_SHOWDIALOG, SSPlugin.getByte(SETTING_SHOWDIALOG, 0) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(m_hwnd, IDC_SETWINSTATE, SSPlugin.getByte(SETTING_SETWINSTATE, 0) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(m_hwnd, IDC_SETWINLOCATION, SSPlugin.getByte(SETTING_SETWINLOCATION, 0) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(m_hwnd, IDC_SETDOCKED, SSPlugin.getByte(SETTING_SETDOCKED, 0) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(m_hwnd, IDC_SETWINSIZE, SSPlugin.getByte(SETTING_SETWINSIZE, 0) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(m_hwnd, IDC_OFFLINECLOSE, SSPlugin.getByte(SETTING_OFFLINECLOSE, 1) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(m_hwnd, IDC_AUTODIAL, SSPlugin.getByte(SETTING_AUTODIAL, 0) ? BST_CHECKED : BST_UNCHECKED);
@@ -324,22 +317,6 @@ public:
SetDlgItemInt(m_hwnd, IDC_WIDTH, SSPlugin.getWord(SETTING_WIDTH, 0), FALSE);
SetDlgItemInt(m_hwnd, IDC_HEIGHT, SSPlugin.getWord(SETTING_HEIGHT, 0), FALSE);
- int val = SSPlugin.getByte(SETTING_DOCKED, DOCKED_NONE);
- int item = SendDlgItemMessage(m_hwnd, IDC_DOCKED, CB_ADDSTRING, 0, (LPARAM)TranslateT("Left"));
- SendDlgItemMessage(m_hwnd, IDC_DOCKED, CB_SETITEMDATA, (WPARAM)item, (LPARAM)DOCKED_LEFT);
- if (val == DOCKED_LEFT)
- SendDlgItemMessage(m_hwnd, IDC_DOCKED, CB_SETCURSEL, (WPARAM)item, 0);
-
- item = SendDlgItemMessage(m_hwnd, IDC_DOCKED, CB_ADDSTRING, 0, (LPARAM)TranslateT("Right"));
- SendDlgItemMessage(m_hwnd, IDC_DOCKED, CB_SETITEMDATA, (WPARAM)item, (LPARAM)DOCKED_RIGHT);
- if (val == DOCKED_RIGHT)
- SendDlgItemMessage(m_hwnd, IDC_DOCKED, CB_SETCURSEL, (WPARAM)item, 0);
-
- item = SendDlgItemMessage(m_hwnd, IDC_DOCKED, CB_ADDSTRING, 0, (LPARAM)TranslateT("None"));
- SendDlgItemMessage(m_hwnd, IDC_DOCKED, CB_SETITEMDATA, (WPARAM)item, (LPARAM)DOCKED_NONE);
- if (val == DOCKED_NONE)
- SendDlgItemMessage(m_hwnd, IDC_DOCKED, CB_SETCURSEL, (WPARAM)item, 0);
-
ReinitProfiles();
timer.Start(100);
return true;
@@ -366,12 +343,6 @@ public:
SSPlugin.setByte(SETTING_WINSTATE, (uint8_t)val);
}
- SSPlugin.setByte(SETTING_SETDOCKED, bChecked = chkSetDocked.GetState());
- if (bChecked) {
- int val = (int)SendDlgItemMessage(m_hwnd, IDC_DOCKED, CB_GETITEMDATA, SendDlgItemMessage(m_hwnd, IDC_DOCKED, CB_GETCURSEL, 0, 0), 0);
- SSPlugin.setByte(SETTING_DOCKED, (uint8_t)val);
- }
-
SSPlugin.setByte(SETTING_SETWINLOCATION, bChecked = chkSetWinLocation.GetState());
if (bChecked) {
SSPlugin.setDword(SETTING_XPOS, GetDlgItemInt(m_hwnd, IDC_XPOS, nullptr, TRUE));
@@ -438,11 +409,6 @@ public:
EnableWindow(GetDlgItem(m_hwnd, IDC_HEIGHT), !db_get_b(0, MODULE_CLUI, SETTING_AUTOSIZE, 0) && bChecked);
}
- void onChange_Docked(CCtrlCheck*)
- {
- EnableWindow(GetDlgItem(m_hwnd, IDC_DOCKED), chkSetDocked.GetState());
- }
-
void onTimer(CTimer*)
{
if (chkSetWinLocation.GetState() && chkSetWinSize.GetState()) {
@@ -531,18 +497,19 @@ class CSSAdvancedOptDlg : public CDlgBase
void SetProfile()
{
int sel = cmbProfile.GetCurData();
- chkCreateTTB.SetState(arProfiles[sel].createTtb);
- chkShowDialog.SetState(arProfiles[sel].showDialog);
- chkCreateMMI.SetState(arProfiles[sel].createMmi);
- chkInSubmenu.SetState(arProfiles[sel].inSubMenu);
- chkInSubmenu.Enable(arProfiles[sel].createMmi);
- chkRegHotkey.SetState(arProfiles[sel].regHotkey);
- edtHotkey.SendMsg(HKM_SETHOTKEY, arProfiles[sel].hotKey, 0);
- edtHotkey.Enable(arProfiles[sel].regHotkey);
+ auto &P = arProfiles[sel];
+ chkCreateTTB.SetState(P.createTtb);
+ chkShowDialog.SetState(P.showDialog);
+ chkCreateMMI.SetState(P.createMmi);
+ chkInSubmenu.SetState(P.inSubMenu);
+ chkInSubmenu.Enable(P.createMmi);
+ chkRegHotkey.SetState(P.regHotkey);
+ edtHotkey.SendMsg(HKM_SETHOTKEY, P.hotKey, 0);
+ edtHotkey.Enable(P.regHotkey);
// fill proto list
lstAccount.ResetContent();
- for (auto &it : arProfiles[sel].ps)
+ for (auto &it : P.ps)
lstAccount.AddString(it->m_tszAccName, (LPARAM)it);
lstAccount.SetCurSel(0);
@@ -556,7 +523,8 @@ class CSSAdvancedOptDlg : public CDlgBase
// fill status box
SMProto* ps = (SMProto*)lstAccount.GetItemData(idx);
- int flags = (CallProtoService(ps->m_szName, PS_GETCAPS, PFLAGNUM_2, 0))&~(CallProtoService(ps->m_szName, PS_GETCAPS, PFLAGNUM_5, 0));
+ int flags = GetStatusFlags(ps->m_szName);
+
lstStatus.ResetContent();
for (auto &it : statusModes) {
if ((flags & it.iFlag) || (it.iStatus == ID_STATUS_OFFLINE)) {
diff --git a/plugins/StatusManager/src/startupstatus.h b/plugins/StatusManager/src/startupstatus.h
index 7e3ad71123..8e81b9b63a 100644
--- a/plugins/StatusManager/src/startupstatus.h
+++ b/plugins/StatusManager/src/startupstatus.h
@@ -58,9 +58,6 @@ typedef struct {
#define SETTING_SETWINSTATE "SetState"
#define SETTING_WINSTATE "State"
-#define SETTING_SETDOCKED "SetDocked"
-#define SETTING_DOCKED "Docked"
-
#define SETTING_SHOWDIALOG "ShowDialog"
#define SETTING_OFFLINECLOSE "OfflineOnClose"
#define SETTING_SETPROFILE "SetStatusOnStartup"
@@ -98,10 +95,6 @@ typedef struct {
#define SHORTCUT_DESC L"Miranda NG"
#define SHORTCUT_FILENAME L"\\Miranda NG.lnk"
-#define DOCKED_NONE 0
-#define DOCKED_LEFT 1
-#define DOCKED_RIGHT 2
-
#define MS_SS_MENUSETPROFILEPREFIX "StartupStatus/SetProfile_"
// options
diff --git a/plugins/StatusManager/src/stdafx.cxx b/plugins/StatusManager/src/stdafx.cxx
index 87b7477097..72e87c2758 100644
--- a/plugins/StatusManager/src/stdafx.cxx
+++ b/plugins/StatusManager/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/StatusManager/src/version.h b/plugins/StatusManager/src/version.h
index ab088850f4..75190fa143 100644
--- a/plugins/StatusManager/src/version.h
+++ b/plugins/StatusManager/src/version.h
@@ -2,7 +2,7 @@
#define __MAJOR_VERSION 1
#define __MINOR_VERSION 2
#define __RELEASE_NUM 0
-#define __BUILD_NUM 6
+#define __BUILD_NUM 7
// other stuff for Version resource
#include <stdver.h>
@@ -13,4 +13,4 @@
#define __DESCRIPTION "A connection checker and auto away module. Also allows you to define the status Miranda should set on startup, configurable per protocol."
#define __AUTHOR "P Boon"
#define __AUTHORWEB "https://miranda-ng.org/p/StatusManager"
-#define __COPYRIGHT "© 2003-08 P. Boon, 2008-24 George Hazan"
+#define __COPYRIGHT "© 2003-08 P. Boon, 2008-25 George Hazan"
diff --git a/plugins/StopSpamMod/src/stdafx.cxx b/plugins/StopSpamMod/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/StopSpamMod/src/stdafx.cxx
+++ b/plugins/StopSpamMod/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/StopSpamMod/src/utilities.cpp b/plugins/StopSpamMod/src/utilities.cpp
index 95581f9b47..aafcd0c285 100644
--- a/plugins/StopSpamMod/src/utilities.cpp
+++ b/plugins/StopSpamMod/src/utilities.cpp
@@ -67,7 +67,7 @@ bool ProtoInList(const char *szProto)
void DeleteCListGroupsByName(wchar_t *szGroupName)
{
- uint8_t ConfirmDelete = Clist::ConfirmDelete;
+ uint8_t ConfirmDelete = Clist::bConfirmDelete;
if (ConfirmDelete)
db_set_b(0, "CList", "ConfirmDelete", 0);
@@ -260,7 +260,7 @@ void HistoryLog(MCONTACT hContact, char *data, int event_type, int flags)
Event.szModule = MODULENAME;
Event.eventType = event_type;
Event.flags = flags | DBEF_UTF;
- Event.timestamp = (uint32_t)time(0);
+ Event.iTimestamp = (uint32_t)time(0);
Event.cbBlob = (uint32_t)mir_strlen(data) + 1;
Event.pBlob = _strdup(data);
db_event_add(hContact, &Event);
diff --git a/plugins/StopSpamMod/src/version.h b/plugins/StopSpamMod/src/version.h
index c572378af9..2cc22ea84a 100644
--- a/plugins/StopSpamMod/src/version.h
+++ b/plugins/StopSpamMod/src/version.h
@@ -10,4 +10,4 @@
#define __DESCRIPTION "Anti-spam plugin for Miranda NG."
#define __AUTHOR "Roman Miklashevsky, sss, Elzor"
#define __AUTHORWEB "https://miranda-ng.org/p/StopSpamMod"
-#define __COPYRIGHT "© 2004-24 Roman Miklashevsky, A. Petkevich, Kosh&chka, sss, Elzor"
+#define __COPYRIGHT "© 2004-25 Roman Miklashevsky, A. Petkevich, Kosh&chka, sss, Elzor"
diff --git a/plugins/StopSpamPlus/res/stopspam.rc b/plugins/StopSpamPlus/res/stopspam.rc
index dd81fc4a9c..84aa180360 100644
--- a/plugins/StopSpamPlus/res/stopspam.rc
+++ b/plugins/StopSpamPlus/res/stopspam.rc
@@ -52,21 +52,23 @@ BEGIN
CONTROL "",IDC_PROTO,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_AUTOARRANGE | LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,24,22,216,166
END
-IDD_MAIN DIALOGEX 0, 0, 309, 189
+IDD_MAIN DIALOGEX 0, 0, 309, 197
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
EXSTYLE WS_EX_CONTROLPARENT
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
- EDITTEXT ID_DESCRIPTION,12,7,282,82,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | NOT WS_TABSTOP
- CTEXT "Do not send more than",IDC_STATIC,11,93,101,12,SS_CENTERIMAGE
- EDITTEXT ID_MAXQUESTCOUNT,113,93,30,12,ES_AUTOHSCROLL | ES_NUMBER
- LTEXT "questions to one contact (0 - for no limit)",IDC_STATIC,144,93,150,12,SS_CENTERIMAGE
+ EDITTEXT ID_DESCRIPTION,7,7,294,82,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | NOT WS_TABSTOP
+ LTEXT "Maximum number of questions to one contact (0 - for no limit):",IDC_STATIC,9,95,258,9,SS_CENTERIMAGE
+ EDITTEXT ID_MAXQUESTCOUNT,272,93,30,12,ES_AUTOHSCROLL | ES_NUMBER
+ CONTROL "",IDC_SPIN1,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,291,92,11,14
+ LTEXT "Timeout in minutes to remove temporary contacts (0 - never)",IDC_STATIC,9,109,258,8,SS_CENTERIMAGE
+ EDITTEXT ID_MAXQUESTCOUNT2,272,107,30,12,ES_AUTOHSCROLL | ES_NUMBER
+ CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,293,106,11,14
CONTROL "Enable StopSpam-StopSpam infinite talk protection",ID_INFTALKPROT,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,109,282,10
- CONTROL "Add contact permanently",ID_ADDPERMANENT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,121,282,8
- CONTROL "Enable auth. requests blocking",ID_HANDLEAUTHREQ,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,133,270,8
- CONTROL "Answer is not case sensitive",ID_NOTCASESENS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,145,282,8
- CONTROL "Log Spammers to system history",ID_HISTORY_LOG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,157,282,8
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,124,282,10
+ CONTROL "Add contact permanently",ID_ADDPERMANENT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,136,282,8
+ CONTROL "Answer is not case sensitive",ID_NOTCASESENS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,148,282,8
+ CONTROL "Log Spammers to system history",ID_HISTORY_LOG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,160,282,8
END
@@ -99,10 +101,8 @@ BEGIN
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 302
- VERTGUIDE, 12
- VERTGUIDE, 294
TOPMARGIN, 7
- BOTTOMMARGIN, 181
+ BOTTOMMARGIN, 189
END
END
#endif // APSTUDIO_INVOKED
@@ -144,6 +144,11 @@ BEGIN
0
END
+IDD_MAIN AFX_DIALOG_LAYOUT
+BEGIN
+ 0
+END
+
#endif // Russian (Russia) resources
/////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/StopSpamPlus/src/events.cpp b/plugins/StopSpamPlus/src/events.cpp
index de5a5cfad9..067be9ac76 100644
--- a/plugins/StopSpamPlus/src/events.cpp
+++ b/plugins/StopSpamPlus/src/events.cpp
@@ -1,5 +1,7 @@
#include "stdafx.h"
+static std::map<MCONTACT, time_t> g_times;
+
int OnDbEventAdded(WPARAM, LPARAM lParam)
{
MEVENT hDbEvent = (MEVENT)lParam;
@@ -13,22 +15,21 @@ int OnDbEventAdded(WPARAM, LPARAM lParam)
return 0;
// event is an auth request
- if (!(dbei.flags & DBEF_SENT) && !(dbei.flags & DBEF_READ) && dbei.eventType == EVENTTYPE_AUTHREQUEST) {
+ if (!dbei.bSent && !dbei.bRead && dbei.eventType == EVENTTYPE_AUTHREQUEST) {
MCONTACT hContact = DbGetAuthEventContact(&dbei);
// if request is from unknown or not marked Answered contact
//and if I don't sent message to this contact
if (!Contact::OnList(hContact) && !g_plugin.getByte(hContact, DB_KEY_ANSWERED) && !g_plugin.getByte(hContact, DB_KEY_HASSENT)) {
- if (!g_plugin.HandleAuthReq) {
- char *buf = mir_utf8encodeW(variables_parse(g_plugin.getReply(), hContact).c_str());
- ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)buf);
- mir_free(buf);
- }
+ ProtoChainSend(hContact, PSS_MESSAGE, 0, T2Utf(variables_parse(g_plugin.getReply(), hContact).c_str()));
+
+ if (g_plugin.iAnswerTimeout)
+ g_times[hContact] = time(0);
g_plugin.setDword(hContact, DB_KEY_HASAUTH, hDbEvent);
Contact::RemoveFromList(hContact);
Contact::Hide(hContact);
- if (!g_plugin.HistLog)
+ if (!g_plugin.bHistLog)
db_event_delete(hDbEvent);
return 1;
}
@@ -48,10 +49,10 @@ int OnDbEventFilterAdd(WPARAM w, LPARAM l)
return 0; // ...let the event go its way
// if event is not a message, or if the message has been read or sent...
- if (dbei->eventType != EVENTTYPE_MESSAGE || (dbei->flags & DBEF_READ) != 0)
+ if (dbei->eventType != EVENTTYPE_MESSAGE || dbei->bRead)
return 0;
- if (dbei->flags & DBEF_SENT) {
+ if (dbei->bSent) {
g_plugin.setByte(hContact, DB_KEY_HASSENT, 1);
return 0;
}
@@ -93,21 +94,20 @@ int OnDbEventFilterAdd(WPARAM w, LPARAM l)
// if answer not empty
if (answer.length() > 0) {
// if message equal right answer...
- if (g_plugin.AnswNotCaseSens ? !mir_wstrcmpi(message.c_str(), answer.c_str()) : !mir_wstrcmp(message.c_str(), answer.c_str())) {
+ if (g_plugin.bAnswNotCaseSens ? !mir_wstrcmpi(message.c_str(), answer.c_str()) : !mir_wstrcmp(message.c_str(), answer.c_str())) {
// unhide contact
Contact::Hide(hContact, false);
+ g_times.erase(hContact);
// add contact permanently and delete our temporary variables
- if (g_plugin.AddPermanent) {
+ if (g_plugin.bAddPermanent) {
Contact::PutOnList(hContact);
db_delete_module(hContact, MODULENAME);
}
else g_plugin.setByte(hContact, DB_KEY_ANSWERED, 1);
// send congratulation
- char *buf = mir_utf8encodeW(variables_parse(g_plugin.getCongrats(), hContact).c_str());
- ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)buf);
- mir_free(buf);
+ ProtoChainSend(hContact, PSS_MESSAGE, 0, T2Utf(variables_parse(g_plugin.getCongrats(), hContact).c_str()));
// process the event
return 1;
@@ -119,7 +119,7 @@ int OnDbEventFilterAdd(WPARAM w, LPARAM l)
// if message message does not contain infintite talk protection prefix
// and question count for this contact is less then maximum
const wchar_t *pwszPrefix = TranslateT("StopSpam automatic message:\r\n");
- if ((!g_plugin.InfTalkProtection || tstring::npos == message.find(pwszPrefix)) && (!g_plugin.MaxQuestCount || g_plugin.getDword(hContact, DB_KEY_QUESTCOUNT) < g_plugin.MaxQuestCount)) {
+ if ((!g_plugin.bInfTalkProtection || tstring::npos == message.find(pwszPrefix)) && (!g_plugin.iMaxQuestCount || g_plugin.getDword(hContact, DB_KEY_QUESTCOUNT) < g_plugin.iMaxQuestCount)) {
// send question
tstring q = pwszPrefix + variables_parse(g_plugin.getQuestion(), hContact);
@@ -141,13 +141,36 @@ int OnDbEventFilterAdd(WPARAM w, LPARAM l)
return 0;
}
+void CMPlugin::Impl::OnTimer(CTimer *)
+{
+ int iTimeout = g_plugin.iAnswerTimeout;
+ if (!iTimeout)
+ return;
+
+ time_t now = time(0);
+
+ for (auto &it : g_times) {
+ if (now - it.second < iTimeout * 60)
+ continue;
+
+ if (MEVENT hDbEvent = g_plugin.getDword(it.first, DB_KEY_HASAUTH)) {
+ char *szProto = Proto_GetBaseAccountName(it.first);
+ CallProtoService(szProto, PS_AUTHDENY, hDbEvent, (LPARAM)_T2A(variables_parse(g_plugin.getReply(), it.first).c_str()));
+
+ Netlib_Logf(0, "StopSpam: removing temporary contact %d", it.first);
+ db_delete_contact(it.first);
+ g_times.erase(it.first);
+ }
+ }
+}
+
int OnShutdown(WPARAM, LPARAM)
{
for (auto &cc : Contacts()) {
if (Contact::OnList(cc))
continue;
- if (MEVENT hDbEvent = g_plugin.getByte(cc, DB_KEY_HASAUTH)) {
+ if (MEVENT hDbEvent = g_plugin.getDword(cc, DB_KEY_HASAUTH)) {
char *szProto = Proto_GetBaseAccountName(cc);
CallProtoService(szProto, PS_AUTHDENY, hDbEvent, (LPARAM)_T2A(variables_parse(g_plugin.getReply(), cc).c_str()));
}
diff --git a/plugins/StopSpamPlus/src/options.cpp b/plugins/StopSpamPlus/src/options.cpp
index 99981028c7..127288d49a 100644
--- a/plugins/StopSpamPlus/src/options.cpp
+++ b/plugins/StopSpamPlus/src/options.cpp
@@ -4,27 +4,28 @@ const wchar_t pluginDescription[] = LPGENW("No more spam! Robots can't go! Only
class COptMainDlg : public CDlgBase
{
- CCtrlEdit edtCount, edtDescr;
- CCtrlCheck chk1, chk2, chk3, chk4, chk6;
+ CCtrlEdit edtDescr;
+ CCtrlSpin spinCount, spinTimeout;
+ CCtrlCheck chk1, chk2, chk4, chk6;
public:
COptMainDlg() :
CDlgBase(g_plugin, IDD_MAIN),
- edtCount(this, ID_MAXQUESTCOUNT),
edtDescr(this, ID_DESCRIPTION),
+ spinCount(this, IDC_SPIN1, 10),
+ spinTimeout(this, IDC_SPIN2, 60),
chk1(this, ID_INFTALKPROT),
chk2(this, ID_ADDPERMANENT),
- chk3(this, ID_HANDLEAUTHREQ),
chk4(this, ID_NOTCASESENS),
chk6(this, ID_HISTORY_LOG)
{
- CreateLink(edtCount, g_plugin.MaxQuestCount);
+ CreateLink(spinCount, g_plugin.iMaxQuestCount);
+ CreateLink(spinTimeout, g_plugin.iAnswerTimeout);
- CreateLink(chk1, g_plugin.InfTalkProtection);
- CreateLink(chk2, g_plugin.AddPermanent);
- CreateLink(chk3, g_plugin.HandleAuthReq);
- CreateLink(chk4, g_plugin.AnswNotCaseSens);
- CreateLink(chk6, g_plugin.HistLog);
+ CreateLink(chk1, g_plugin.bInfTalkProtection);
+ CreateLink(chk2, g_plugin.bAddPermanent);
+ CreateLink(chk4, g_plugin.bAnswNotCaseSens);
+ CreateLink(chk6, g_plugin.bHistLog);
}
bool OnInitDialog() override
diff --git a/plugins/StopSpamPlus/src/resource.h b/plugins/StopSpamPlus/src/resource.h
index a4e7c05b61..aec5d198ba 100644
--- a/plugins/StopSpamPlus/src/resource.h
+++ b/plugins/StopSpamPlus/src/resource.h
@@ -1,6 +1,6 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
-// Used by C:\Users\georg\DiskW\miranda-ng\plugins\StopSpamPlus\res\stopspam.rc
+// Used by W:\miranda-ng\plugins\StopSpamPlus\res\stopspam.rc
//
#define IDD_MESSAGES 101
#define IDD_MAIN 102
@@ -13,21 +13,23 @@
#define ID_AUTHREPL 1007
#define ID_MAXQUESTCOUNT 1008
#define IDC_PROTO 1009
+#define ID_MAXQUESTCOUNT2 1009
#define ID_INFTALKPROT 1010
#define ID_ADDPERMANENT 1011
-#define ID_HANDLEAUTHREQ 1012
#define ID_NOTCASESENS 1013
#define ID_DIVIDER 1014
#define IDC_VARS 1015
#define ID_HISTORY_LOG 1017
+#define IDC_SPIN1 1018
+#define IDC_SPIN2 1019
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 105
+#define _APS_NEXT_RESOURCE_VALUE 106
#define _APS_NEXT_COMMAND_VALUE 40001
-#define _APS_NEXT_CONTROL_VALUE 1018
+#define _APS_NEXT_CONTROL_VALUE 1019
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
diff --git a/plugins/StopSpamPlus/src/stdafx.cxx b/plugins/StopSpamPlus/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/StopSpamPlus/src/stdafx.cxx
+++ b/plugins/StopSpamPlus/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/StopSpamPlus/src/stdafx.h b/plugins/StopSpamPlus/src/stdafx.h
index 75840d2c03..66bbfb137c 100644
--- a/plugins/StopSpamPlus/src/stdafx.h
+++ b/plugins/StopSpamPlus/src/stdafx.h
@@ -4,21 +4,25 @@
// disable security warnings about "*_s" functions
#define _CRT_SECURE_NO_DEPRECATE
+#include <time.h>
+
#include <windows.h>
#include <commctrl.h>
#include <sstream>
#include <list>
+#include <map>
#include <newpluginapi.h>
+#include <m_clistint.h>
#include <m_contacts.h>
#include <m_database.h>
-#include <m_protosvc.h>
-#include <m_options.h>
-#include <m_langpack.h>
+#include <m_gui.h>
#include <m_icolib.h>
+#include <m_langpack.h>
+#include <m_netlib.h>
+#include <m_options.h>
+#include <m_protosvc.h>
#include <m_skin.h>
-#include <m_clistint.h>
-#include <m_gui.h>
#include <m_variables.h>
@@ -39,10 +43,22 @@ struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
- CMOption<bool> InfTalkProtection, AddPermanent, HandleAuthReq, AnswNotCaseSens, HistLog;
+ struct Impl
+ {
+ Impl() :
+ timerAnswer(Miranda_GetSystemWindow(), UINT_PTR(this))
+ {
+ timerAnswer.OnEvent = Callback(this, &Impl::OnTimer);
+ }
+
+ CTimer timerAnswer;
+ void OnTimer(CTimer *);
+ } m_impl;
+
+ CMOption<bool> bInfTalkProtection, bAddPermanent, bAnswNotCaseSens, bHistLog;
CMOption<wchar_t *> Question, AuthRepl, Answer, Congratulation, AnswSplitString;
CMOption<char *> DisabledProtoList;
- CMOption<uint32_t> MaxQuestCount;
+ CMOption<uint32_t> iMaxQuestCount, iAnswerTimeout;
const wchar_t* getQuestion();
const wchar_t* getReply();
@@ -55,6 +71,7 @@ struct CMPlugin : public PLUGIN<CMPlugin>
}
int Load() override;
+ int Unload() override;
};
// utils
diff --git a/plugins/StopSpamPlus/src/stopspam.cpp b/plugins/StopSpamPlus/src/stopspam.cpp
index 81de4f5c53..5e4d8482a1 100644
--- a/plugins/StopSpamPlus/src/stopspam.cpp
+++ b/plugins/StopSpamPlus/src/stopspam.cpp
@@ -25,22 +25,30 @@ CMPlugin::CMPlugin() :
Answer(MODULENAME, "Answer", L"nospam"),
Congratulation(MODULENAME, "Congratulation"),
DisabledProtoList(MODULENAME, "DisabledProtoList", "MetaContacts RSSNews"),
- InfTalkProtection(MODULENAME, "InfTalkProtection", 1),
- AddPermanent(MODULENAME, "AddPermanent", 0),
- HandleAuthReq(MODULENAME, "HandleAuthReq", 0),
- MaxQuestCount(MODULENAME, "MaxQuestCount", 2),
- AnswNotCaseSens(MODULENAME, "AnswNotCaseSens", 1),
+ bInfTalkProtection(MODULENAME, "InfTalkProtection", 1),
+ bAddPermanent(MODULENAME, "AddPermanent", 0),
+ iMaxQuestCount(MODULENAME, "MaxQuestCount", 2),
+ iAnswerTimeout(MODULENAME, "AnswerTimeout", 5),
+ bAnswNotCaseSens(MODULENAME, "AnswNotCaseSens", 1),
AnswSplitString(MODULENAME, "AnswSplitString", L"|"),
- HistLog(MODULENAME, "HistLog", 0)
+ bHistLog(MODULENAME, "HistLog", 0)
{}
/////////////////////////////////////////////////////////////////////////////////////////
int CMPlugin::Load()
{
+ m_impl.timerAnswer.Start(60000);
+
HookEvent(ME_DB_EVENT_ADDED, OnDbEventAdded);
HookEvent(ME_DB_EVENT_FILTER_ADD, OnDbEventFilterAdd);
HookEvent(ME_OPT_INITIALISE, OnOptInit);
HookEvent(ME_SYSTEM_SHUTDOWN, OnShutdown);
return 0;
}
+
+int CMPlugin::Unload()
+{
+ m_impl.timerAnswer.Stop();
+ return 0;
+}
diff --git a/plugins/TabSRMM/TabSRMM_icons/res/version.h b/plugins/TabSRMM/TabSRMM_icons/res/version.h
index cadc98ee25..43bb647ccb 100644
--- a/plugins/TabSRMM/TabSRMM_icons/res/version.h
+++ b/plugins/TabSRMM/TabSRMM_icons/res/version.h
@@ -8,4 +8,4 @@
#define __PLUGIN_NAME "TabSRMM icons"
#define __FILENAME "TabSRMM_icons.dll"
#define __DESCRIPTION "Iconpack for TabSRMM plugin of Miranda NG."
-#define __COPYRIGHT "© 2012-24 Miranda NG team, 2000-2010 Miranda Project and contributors."
+#define __COPYRIGHT "© 2012-25 Miranda NG team, 2000-2010 Miranda Project and contributors."
diff --git a/plugins/TabSRMM/res/chat.rc b/plugins/TabSRMM/res/chat.rc
index cae7e4d74b..3a81b23100 100644
--- a/plugins/TabSRMM/res/chat.rc
+++ b/plugins/TabSRMM/res/chat.rc
@@ -91,9 +91,9 @@ BEGIN
GROUPBOX "Options",IDC_STATIC,3,0,300,229
CONTROL "",IDC_CHECKBOXES,"SysTreeView32",TVS_DISABLEDRAGDROP | TVS_FULLROWSELECT | WS_BORDER | WS_HSCROLL | WS_TABSTOP,6,9,289,177
LTEXT "Text for autocomplete:",IDC_STATIC,10,210,177,10
- EDITTEXT IDC_GROUP,191,192,102,14,ES_AUTOHSCROLL
- CONTROL "Add new rooms to group:",IDC_CHAT_USEGROUP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,193,179,10
EDITTEXT IDC_AUTOCOMPLETE,191,208,102,14,ES_AUTOHSCROLL
+ CONTROL "Add new rooms to group:",IDC_CHAT_USEGROUP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,193,179,10
+ EDITTEXT IDC_GROUP,191,192,102,14,ES_AUTOHSCROLL
END
IDD_OPTIONS2 DIALOGEX 0, 0, 306, 214
diff --git a/plugins/TabSRMM/src/ImageDataObject.cpp b/plugins/TabSRMM/src/ImageDataObject.cpp
index a601e2e4b7..66abcb4035 100644
--- a/plugins/TabSRMM/src/ImageDataObject.cpp
+++ b/plugins/TabSRMM/src/ImageDataObject.cpp
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
diff --git a/plugins/TabSRMM/src/TSButton.cpp b/plugins/TabSRMM/src/TSButton.cpp
index f556ca34ac..32203086b3 100644
--- a/plugins/TabSRMM/src/TSButton.cpp
+++ b/plugins/TabSRMM/src/TSButton.cpp
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
diff --git a/plugins/TabSRMM/src/buttonsbar.cpp b/plugins/TabSRMM/src/buttonsbar.cpp
index d346a36679..059e241226 100644
--- a/plugins/TabSRMM/src/buttonsbar.cpp
+++ b/plugins/TabSRMM/src/buttonsbar.cpp
@@ -24,25 +24,25 @@ static int CB_InitDefaultButtons(WPARAM, LPARAM)
bbd.dwButtonID = IDC_SRMM_BOLD;
bbd.dwDefPos = 40;
bbd.hIcon = g_plugin.getIconHandle(IDI_FONTBOLD);
- bbd.pwszTooltip = LPGENW("Bold text");
+ bbd.pwszTooltip = LPGENW("Bold");
g_plugin.addButton(&bbd);
bbd.dwButtonID = IDC_SRMM_ITALICS;
bbd.dwDefPos = 50;
bbd.hIcon = g_plugin.getIconHandle(IDI_FONTITALIC);
- bbd.pwszTooltip = LPGENW("Italic text");
+ bbd.pwszTooltip = LPGENW("Italics");
g_plugin.addButton(&bbd);
bbd.dwButtonID = IDC_SRMM_UNDERLINE;
bbd.dwDefPos = 60;
bbd.hIcon = g_plugin.getIconHandle(IDI_FONTUNDERLINE);
- bbd.pwszTooltip = LPGENW("Underlined text");
+ bbd.pwszTooltip = LPGENW("Underlined");
g_plugin.addButton(&bbd);
bbd.dwButtonID = IDC_SRMM_STRIKEOUT;
bbd.dwDefPos = 70;
bbd.hIcon = g_plugin.getIconHandle(IDI_STRIKEOUT);
- bbd.pwszTooltip = LPGENW("Strikethrough text");
+ bbd.pwszTooltip = LPGENW("Strikethrough");
g_plugin.addButton(&bbd);
bbd.bbbFlags = BBBF_ISIMBUTTON | BBBF_ISCHATBUTTON | BBBF_ISRSIDEBUTTON | BBBF_ISARROWBUTTON | BBBF_CREATEBYID | BBBF_NOREADONLY;
@@ -101,32 +101,32 @@ static int CB_InitDefaultButtons(WPARAM, LPARAM)
bbd.pszModuleName = "Tabsrmm";
bbd.dwDefPos = 80;
bbd.hIcon = g_plugin.getIconHandle(IDI_FONTCOLOR);
- bbd.pwszTooltip = LPGENW("Select a foreground color for the text (Ctrl+K)");
+ bbd.pwszTooltip = LPGENW("Select text color");
g_plugin.addButton(&bbd);
bbd.dwButtonID = IDC_SRMM_BKGCOLOR;
bbd.dwDefPos = 81;
bbd.hIcon = g_plugin.getIconHandle(IDI_BKGCOLOR);
- bbd.pwszTooltip = LPGENW("Select a background color for the text (Ctrl+L)");
+ bbd.pwszTooltip = LPGENW("Select background color");
g_plugin.addButton(&bbd);
bbd.bbbFlags = BBBF_ISCHATBUTTON | BBBF_ISRSIDEBUTTON | BBBF_CREATEBYID;
bbd.dwButtonID = IDC_SRMM_SHOWNICKLIST;
bbd.dwDefPos = 22;
bbd.hIcon = g_plugin.getIconHandle(IDI_SHOWNICKLIST);
- bbd.pwszTooltip = LPGENW("Show/hide the nick list (Ctrl+N)");
+ bbd.pwszTooltip = LPGENW("Show/hide the nick list");
g_plugin.addButton(&bbd);
bbd.dwButtonID = IDC_SRMM_FILTER;
bbd.dwDefPos = 24;
bbd.hIcon = g_plugin.getIconHandle(IDI_FILTER2);
- bbd.pwszTooltip = LPGENW("Enable/disable the event filter (Ctrl+F)");
+ bbd.pwszTooltip = LPGENW("Enable/disable the event filter");
g_plugin.addButton(&bbd);
bbd.dwButtonID = IDC_SRMM_CHANMGR;
bbd.dwDefPos = 33;
bbd.hIcon = g_plugin.getIconHandle(IDI_TOPICBUT);
- bbd.pwszTooltip = LPGENW("Control this room (Ctrl+O)");
+ bbd.pwszTooltip = LPGENW("Control this room");
g_plugin.addButton(&bbd);
return 0;
}
diff --git a/plugins/TabSRMM/src/chat.h b/plugins/TabSRMM/src/chat.h
index b34b751fd7..536927d5d3 100644
--- a/plugins/TabSRMM/src/chat.h
+++ b/plugins/TabSRMM/src/chat.h
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
diff --git a/plugins/TabSRMM/src/chat_log.cpp b/plugins/TabSRMM/src/chat_log.cpp
index b69cec7d86..cf2c4abf2e 100644
--- a/plugins/TabSRMM/src/chat_log.cpp
+++ b/plugins/TabSRMM/src/chat_log.cpp
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
diff --git a/plugins/TabSRMM/src/chat_main.cpp b/plugins/TabSRMM/src/chat_main.cpp
index 767900778d..36340d8d11 100644
--- a/plugins/TabSRMM/src/chat_main.cpp
+++ b/plugins/TabSRMM/src/chat_main.cpp
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
diff --git a/plugins/TabSRMM/src/chat_manager.cpp b/plugins/TabSRMM/src/chat_manager.cpp
index f681efd8fa..793700c123 100644
--- a/plugins/TabSRMM/src/chat_manager.cpp
+++ b/plugins/TabSRMM/src/chat_manager.cpp
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
diff --git a/plugins/TabSRMM/src/chat_options.cpp b/plugins/TabSRMM/src/chat_options.cpp
index 86c1516d29..6f546e1433 100644
--- a/plugins/TabSRMM/src/chat_options.cpp
+++ b/plugins/TabSRMM/src/chat_options.cpp
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
diff --git a/plugins/TabSRMM/src/chat_tools.cpp b/plugins/TabSRMM/src/chat_tools.cpp
index c5ef349ef8..e0995eba96 100644
--- a/plugins/TabSRMM/src/chat_tools.cpp
+++ b/plugins/TabSRMM/src/chat_tools.cpp
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
@@ -365,8 +365,7 @@ char GetIndicator(SESSION_INFO *si, LPCTSTR ptszNick, int *iNickIndex)
for (auto &ui : si->getUserList()) {
if (!mir_wstrcmp(ui->pszNick, ptszNick)) {
- STATUSINFO *ti = g_chatApi.TM_FindStatus(si->pStatuses, g_chatApi.TM_WordToString(si->pStatuses, ui->Status));
- if (ti) {
+ if (auto *ti = Chat_GetStatus(si, ui)) {
if (iNickIndex)
*iNickIndex = ti->iIconIndex; // color table's index is not zero-based
return szIndicators[ti->iIconIndex];
diff --git a/plugins/TabSRMM/src/contactcache.cpp b/plugins/TabSRMM/src/contactcache.cpp
index 68053f1750..9ae69bdf32 100644
--- a/plugins/TabSRMM/src/contactcache.cpp
+++ b/plugins/TabSRMM/src/contactcache.cpp
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
@@ -225,7 +225,7 @@ void CContactCache::saveHistory()
if (m_dat == nullptr)
return;
- CCtrlRichEdit &pEntry = m_dat->GetEntry();
+ auto &pEntry = m_dat->GetEntry();
ptrA szFromStream(pEntry.GetRichTextRtf());
if (szFromStream != nullptr) {
m_iHistoryCurrent = -1;
@@ -242,17 +242,20 @@ void CContactCache::inputHistoryEvent(WPARAM wParam)
if (m_dat == nullptr)
return;
- CCtrlRichEdit &pEntry = m_dat->GetEntry();
+ auto &pEntry = m_dat->GetEntry();
+
if (m_history.getCount() > 0) {
char *pszText;
if (wParam == VK_UP) {
if (m_iHistoryCurrent == 0)
return;
- if (m_iHistoryCurrent < 0)
- m_iHistoryCurrent = m_history.getCount()-1;
- else
- m_iHistoryCurrent--;
+ if (m_iHistoryCurrent < 0) {
+ m_savedEditContent = pEntry.GetRichTextRtf();
+ m_iHistoryCurrent = m_history.getCount() - 1;
+ }
+ else m_iHistoryCurrent--;
+
pszText = m_history[m_iHistoryCurrent];
}
else {
@@ -261,7 +264,7 @@ void CContactCache::inputHistoryEvent(WPARAM wParam)
if (m_iHistoryCurrent == m_history.getCount() - 1) {
m_iHistoryCurrent = -1;
- pszText = "";
+ pszText = m_savedEditContent;
}
else {
m_iHistoryCurrent++;
diff --git a/plugins/TabSRMM/src/contactcache.h b/plugins/TabSRMM/src/contactcache.h
index 18bac7d023..e618cb7c80 100644
--- a/plugins/TabSRMM/src/contactcache.h
+++ b/plugins/TabSRMM/src/contactcache.h
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
@@ -71,6 +71,7 @@ class CContactCache : public MZeroedObject
LIST<char> m_history;
int m_iHistoryCurrent;
+ ptrA m_savedEditContent;
void initPhaseTwo();
void releaseAlloced();
diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp
index 87584fdc32..e6faee405b 100644
--- a/plugins/TabSRMM/src/container.cpp
+++ b/plugins/TabSRMM/src/container.cpp
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
@@ -1720,12 +1720,9 @@ panel_found:
case WM_EXITSIZEMOVE:
GetClientRect(pContainer->m_hwndTabs, &rc);
- if (!((rc.right - rc.left) == pContainer->m_oldSize.cx && (rc.bottom - rc.top) == pContainer->m_oldSize.cy)) {
- dat = (CMsgDialog*)GetWindowLongPtr(pContainer->m_hwndActive, GWLP_USERDATA);
- if (dat)
- dat->DM_ScrollToBottom(0, 0);
+ if ((rc.right - rc.left) != pContainer->m_oldSize.cx || (rc.bottom - rc.top) != pContainer->m_oldSize.cy)
SendMessage(pContainer->m_hwndActive, WM_SIZE, 0, 0);
- }
+
pContainer->m_bSizingLoop = FALSE;
break;
diff --git a/plugins/TabSRMM/src/containeroptions.cpp b/plugins/TabSRMM/src/containeroptions.cpp
index 249160e9f7..73a0d9058c 100644
--- a/plugins/TabSRMM/src/containeroptions.cpp
+++ b/plugins/TabSRMM/src/containeroptions.cpp
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
diff --git a/plugins/TabSRMM/src/controls.cpp b/plugins/TabSRMM/src/controls.cpp
index ee23c6ff71..a97f236411 100644
--- a/plugins/TabSRMM/src/controls.cpp
+++ b/plugins/TabSRMM/src/controls.cpp
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
diff --git a/plugins/TabSRMM/src/controls.h b/plugins/TabSRMM/src/controls.h
index 2792535963..7cc4d4143a 100644
--- a/plugins/TabSRMM/src/controls.h
+++ b/plugins/TabSRMM/src/controls.h
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
diff --git a/plugins/TabSRMM/src/eventpopups.cpp b/plugins/TabSRMM/src/eventpopups.cpp
index 7aad179902..e4d823ed8f 100644
--- a/plugins/TabSRMM/src/eventpopups.cpp
+++ b/plugins/TabSRMM/src/eventpopups.cpp
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
diff --git a/plugins/TabSRMM/src/functions.h b/plugins/TabSRMM/src/functions.h
index fc21f1eebe..60d6ddc3ef 100644
--- a/plugins/TabSRMM/src/functions.h
+++ b/plugins/TabSRMM/src/functions.h
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp
index e17fe07358..f6a057223d 100644
--- a/plugins/TabSRMM/src/generic_msghandlers.cpp
+++ b/plugins/TabSRMM/src/generic_msghandlers.cpp
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
@@ -572,8 +572,8 @@ HWND CMsgDialog::DM_CreateClist()
if (hItem)
SendMessage(hwndClist, CLM_SETCHECKMARK, (WPARAM)hItem, 1);
- SendMessage(hwndClist, CLM_SETHIDEEMPTYGROUPS, Clist::HideEmptyGroups, 0);
- SendMessage(hwndClist, CLM_SETUSEGROUPS, Clist::UseGroups, 0);
+ SendMessage(hwndClist, CLM_SETHIDEEMPTYGROUPS, Clist::bHideEmptyGroups, 0);
+ SendMessage(hwndClist, CLM_SETUSEGROUPS, Clist::bUseGroups, 0);
SendMessage(hwndClist, CLM_FIRST + 106, 0, 1);
SendMessage(hwndClist, CLM_AUTOREBUILD, 0, 0);
if (hwndClist)
diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp
index 22f9580a84..fe05abd507 100644
--- a/plugins/TabSRMM/src/globals.cpp
+++ b/plugins/TabSRMM/src/globals.cpp
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
@@ -442,7 +442,7 @@ struct MSavedEvent
void CGlobals::RestoreUnreadMessageAlerts(void)
{
- OBJLIST<MSavedEvent> arEvents(10, NumericKeySortT);
+ OBJLIST<MSavedEvent> events(10, NumericKeySortT);
for (auto &hContact : Contacts()) {
if (Proto_GetBaseAccountName(hContact) == nullptr)
@@ -457,14 +457,14 @@ void CGlobals::RestoreUnreadMessageAlerts(void)
if (!dbei)
continue;
- if (!dbei.markedRead() && dbei.isAlertable())
+ if (!dbei.bRead && dbei.isAlertable())
if (!Srmm_FindWindow(hContact))
- arEvents.insert(new MSavedEvent(hContact, hDbEvent));
+ events.insert(new MSavedEvent(hContact, hDbEvent));
}
}
}
- for (auto &e : arEvents)
+ for (auto &e : events)
Srmm_AddEvent(e->hContact, e->hEvent);
}
@@ -509,7 +509,7 @@ void CGlobals::logStatusChange(WPARAM wParam, const CContactCache *c)
dbei.cbBlob = (int)mir_strlen(szUtf);
dbei.flags = DBEF_UTF | DBEF_READ;
dbei.eventType = EVENTTYPE_STATUSCHANGE;
- dbei.timestamp = time(0);
+ dbei.iTimestamp = time(0);
dbei.szModule = (char *)c->getProto();
dat->LogEvent(dbei);
}
diff --git a/plugins/TabSRMM/src/globals.h b/plugins/TabSRMM/src/globals.h
index a50ba6b4c0..6f4083ca8b 100644
--- a/plugins/TabSRMM/src/globals.h
+++ b/plugins/TabSRMM/src/globals.h
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
diff --git a/plugins/TabSRMM/src/hotkeyhandler.cpp b/plugins/TabSRMM/src/hotkeyhandler.cpp
index 7e8bd67b38..553e000912 100644
--- a/plugins/TabSRMM/src/hotkeyhandler.cpp
+++ b/plugins/TabSRMM/src/hotkeyhandler.cpp
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
@@ -224,7 +224,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
if (!AutoCreateWindow(0, wParam) && lParam) {
// no window created, simply add an unread event to contact list
DB::EventInfo dbei(lParam, false);
- if (dbei && !(dbei.flags & DBEF_READ)) {
+ if (dbei && !dbei.bRead) {
AddUnreadContact(wParam);
Srmm_AddEvent(wParam, lParam);
}
diff --git a/plugins/TabSRMM/src/infopanel.cpp b/plugins/TabSRMM/src/infopanel.cpp
index af160c72c4..fca7e4e010 100644
--- a/plugins/TabSRMM/src/infopanel.cpp
+++ b/plugins/TabSRMM/src/infopanel.cpp
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
diff --git a/plugins/TabSRMM/src/infopanel.h b/plugins/TabSRMM/src/infopanel.h
index 30dff675b5..94ce61928a 100644
--- a/plugins/TabSRMM/src/infopanel.h
+++ b/plugins/TabSRMM/src/infopanel.h
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
diff --git a/plugins/TabSRMM/src/mim.cpp b/plugins/TabSRMM/src/mim.cpp
index 285bb8059c..e89605ae1d 100644
--- a/plugins/TabSRMM/src/mim.cpp
+++ b/plugins/TabSRMM/src/mim.cpp
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
@@ -376,7 +376,7 @@ int CMimAPI::MessageEventAdded(WPARAM hContact, LPARAM hDbEvent)
DB::EventInfo dbei(hDbEvent);
BOOL isCustomEvent = IsCustomEvent(dbei.eventType);
bool isShownCustomEvent = dbei.isSrmm();
- if (dbei.markedRead() || (isCustomEvent && !isShownCustomEvent))
+ if (dbei.bRead || (isCustomEvent && !isShownCustomEvent))
return 0;
bool bAutoPopup = g_plugin.bAutoPopup;
@@ -446,7 +446,7 @@ int CMimAPI::MessageEventAdded(WPARAM hContact, LPARAM hDbEvent)
nowindowcreate:
// for tray support, we add the event to the tray menu. otherwise we send it back to
// the contact list for flashing
- if (!(dbei.flags & DBEF_READ)) {
+ if (!dbei.bRead) {
AddUnreadContact(hContact);
Srmm_AddEvent(hContact, hDbEvent);
}
diff --git a/plugins/TabSRMM/src/mim.h b/plugins/TabSRMM/src/mim.h
index 48a6cc46da..a6a56122db 100644
--- a/plugins/TabSRMM/src/mim.h
+++ b/plugins/TabSRMM/src/mim.h
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp
index 13aa569bbf..3689ee7b3d 100644
--- a/plugins/TabSRMM/src/msgdialog.cpp
+++ b/plugins/TabSRMM/src/msgdialog.cpp
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
@@ -332,9 +332,7 @@ CMsgDialog::CMsgDialog(int iDlgId, MCONTACT hContact) :
m_btnQuote.OnClick = Callback(this, &CMsgDialog::onClick_Quote);
if (m_si) {
- m_btnFilter.OnClick = Callback(this, &CMsgDialog::onClick_Filter);
m_btnNickList.OnClick = Callback(this, &CMsgDialog::onClick_ShowNickList);
-
m_nickList.OnDblClick = Callback(this, &CMsgDialog::onDblClick_List);
}
else {
@@ -576,8 +574,8 @@ bool CMsgDialog::OnInitDialog()
while (MEVENT hdbEvent = pCursor.FetchNext()) {
DBEVENTINFO dbei = {};
db_event_get(hdbEvent, &dbei);
- if (dbei.eventType == EVENTTYPE_MESSAGE && !(dbei.flags & DBEF_SENT)) {
- m_lastMessage = dbei.timestamp;
+ if (dbei.eventType == EVENTTYPE_MESSAGE && !dbei.bSent) {
+ m_lastMessage = dbei.getUnixtime();
DM_UpdateLastMessage();
break;
}
@@ -614,7 +612,7 @@ bool CMsgDialog::OnInitDialog()
m_bWasBackgroundCreate = m_bNeedCheckSize = m_bDeferredScroll = true;
}
- if (isChat()) {
+ if (isChat() && !g_plugin.bApplyPrivateSettings) {
m_pContainer->m_hwndActive = m_hwnd;
ShowWindow(m_hwnd, SW_SHOW);
}
@@ -912,25 +910,6 @@ void CMsgDialog::onClick_CancelAdd(CCtrlButton*)
Resize();
}
-void CMsgDialog::onClick_Filter(CCtrlButton *pButton)
-{
- if (!pButton->Enabled())
- return;
-
- m_bFilterEnabled = !m_bFilterEnabled;
- UpdateFilterButton();
-
- if (m_bFilterEnabled && !g_chatApi.bRightClickFilter)
- ShowFilterMenu();
- else {
- if (m_hwndFilter)
- SendMessage(m_hwndFilter, WM_CLOSE, 0, 0);
-
- RedrawLog();
- UpdateTitle();
- }
-}
-
void CMsgDialog::onClick_ShowNickList(CCtrlButton *pButton)
{
if (!pButton->Enabled() || m_si->iType == GCW_SERVER)
@@ -1807,7 +1786,8 @@ LRESULT CMsgDialog::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam)
}
if (isCtrl && !isAlt && !isShift) {
- if (wParam == VK_UP || wParam == VK_DOWN) { // input history scrolling (ctrl-up / down)
+ // input history scrolling (ctrl-up / down)
+ if (g_plugin.bScrollHistory && (wParam == VK_UP || wParam == VK_DOWN)) {
m_cache->inputHistoryEvent(wParam);
return 0;
}
@@ -1903,16 +1883,7 @@ LRESULT CMsgDialog::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam)
return TRUE;
}
- auto ret = CSuper::WndProc_Message(msg, wParam, lParam);
-
- switch (msg) {
- case EM_PASTESPECIAL:
- case WM_PASTE:
- if (m_bIsAutosizingInput)
- SendMessage(m_message.GetHwnd(), EM_SETSEL, 0, 0);
- }
-
- return ret;
+ return CSuper::WndProc_Message(msg, wParam, lParam);
}
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/TabSRMM/src/msgdlgother.cpp b/plugins/TabSRMM/src/msgdlgother.cpp
index b9b1ca8fd3..70f3efb37a 100644
--- a/plugins/TabSRMM/src/msgdlgother.cpp
+++ b/plugins/TabSRMM/src/msgdlgother.cpp
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
@@ -298,13 +298,13 @@ void CMsgDialog::EventAdded(MEVENT hDbEvent, const DB::EventInfo &dbei)
bool bAlertable = dbei.isAlertable();
bool bIsStatusChangeEvent = IsStatusEvent(dbei.eventType);
- bool bDisableNotify = (bAlertable && (dbei.flags & DBEF_READ));
+ bool bDisableNotify = (bAlertable && dbei.bRead);
if (!DbEventIsShown(dbei))
return;
- if (bAlertable && !(dbei.flags & DBEF_SENT)) {
- m_lastMessage = dbei.timestamp;
+ if (bAlertable && !dbei.bSent) {
+ m_lastMessage = dbei.getUnixtime();
m_wszStatusBar[0] = 0;
if (m_bShowTyping) {
m_nTypeSecs = 0;
@@ -318,7 +318,7 @@ void CMsgDialog::EventAdded(MEVENT hDbEvent, const DB::EventInfo &dbei)
// set the message log divider to mark new (maybe unseen) messages, if the container has
// been minimized or in the background.
- if (!(dbei.flags & DBEF_SENT) && !bIsStatusChangeEvent) {
+ if (!dbei.bSent && !bIsStatusChangeEvent) {
if (g_plugin.bDividersUsePopupConfig && g_plugin.bUseDividers) {
if (!MessageWindowOpened(m_hContact, nullptr))
DM_AddDivider();
@@ -342,7 +342,7 @@ void CMsgDialog::EventAdded(MEVENT hDbEvent, const DB::EventInfo &dbei)
// handle tab flashing
if (!bDisableNotify && !bIsStatusChangeEvent)
- if ((TabCtrl_GetCurSel(m_hwndParent) != m_iTabID) && !(dbei.flags & DBEF_SENT)) {
+ if ((TabCtrl_GetCurSel(m_hwndParent) != m_iTabID) && !dbei.bSent) {
switch (dbei.eventType) {
case EVENTTYPE_MESSAGE:
m_iFlashIcon = PluginConfig.g_IconMsgEvent;
@@ -364,7 +364,7 @@ void CMsgDialog::EventAdded(MEVENT hDbEvent, const DB::EventInfo &dbei)
// autoswitch tab if option is set AND container is minimized (otherwise, we never autoswitch)
// never switch for status changes...
- if (!(dbei.flags & DBEF_SENT) && !bIsStatusChangeEvent) {
+ if (!dbei.bSent && !bIsStatusChangeEvent) {
if (g_plugin.bAutoSwitchTabs && m_pContainer->m_hwndActive != m_hwnd) {
if ((IsIconic(m_pContainer->m_hwnd) && !IsZoomed(m_pContainer->m_hwnd)) || (g_plugin.bHideOnClose && !IsWindowVisible(m_pContainer->m_hwnd))) {
int iItem = GetTabIndexFromHWND(GetParent(m_hwnd), m_hwnd);
@@ -381,7 +381,7 @@ void CMsgDialog::EventAdded(MEVENT hDbEvent, const DB::EventInfo &dbei)
// flash window if it is not focused
if (!bDisableNotify && !bIsStatusChangeEvent)
- if (!IsActive() && !(dbei.flags & DBEF_SENT)) {
+ if (!IsActive() && !dbei.bSent) {
if (!m_pContainer->cfg.flags.m_bNoFlash && !m_pContainer->IsActive())
m_pContainer->FlashContainer(1, 0);
m_pContainer->SetIcon(this, Skin_LoadIcon(SKINICON_EVENT_MESSAGE));
@@ -389,7 +389,7 @@ void CMsgDialog::EventAdded(MEVENT hDbEvent, const DB::EventInfo &dbei)
}
// play a sound
- if (!bDisableNotify && bAlertable && !(dbei.flags & DBEF_SENT))
+ if (!bDisableNotify && bAlertable && !dbei.bSent)
PlayIncomingSound();
if (m_pWnd)
@@ -401,50 +401,47 @@ void CMsgDialog::EventAdded(MEVENT hDbEvent, const DB::EventInfo &dbei)
bool CMsgDialog::GetFirstEvent()
{
int historyMode = g_plugin.getByte(m_hContact, "LoadHistory", Srmm::iHistoryMode);
-
- m_hDbEventFirst = db_event_firstUnread(m_hContact);
-
if (m_bActualHistory)
historyMode = LOADHISTORY_COUNT;
DB::EventInfo dbei;
- DB::ECPTR pCursor(DB::EventsRev(m_hContact, m_hDbEventFirst));
switch (historyMode) {
- case LOADHISTORY_COUNT:
- int i;
-
- // ability to load only current session's history
- if (m_bActualHistory)
- i = m_cache->getSessionMsgCount();
- else
- i = g_plugin.getWord(SRMSGSET_LOADCOUNT, SRMSGDEFSET_LOADCOUNT);
+ case LOADHISTORY_UNREAD:
+ m_hDbEventFirst = db_event_firstUnread(m_hContact);
+ break;
- for (; i > 0; i--) {
- MEVENT hPrevEvent = pCursor.FetchNext();
- if (hPrevEvent == 0)
- break;
+ case LOADHISTORY_COUNT:
+ {
+ DB::ECPTR pCursor(DB::EventsRev(m_hContact));
+ int n = (m_bActualHistory) ? m_cache->getSessionMsgCount() : g_plugin.getWord(SRMSGSET_LOADCOUNT, SRMSGDEFSET_LOADCOUNT);
+ while (n > 0) {
+ MEVENT hPrevEvent = pCursor.FetchNext();
+ if (hPrevEvent == 0)
+ break;
- dbei.cbBlob = 0;
- m_hDbEventFirst = hPrevEvent;
- db_event_get(m_hDbEventFirst, &dbei);
- if (!DbEventIsShown(dbei))
- i++;
+ dbei.cbBlob = 0;
+ m_hDbEventFirst = hPrevEvent;
+ db_event_get(m_hDbEventFirst, &dbei);
+ if (DbEventIsShown(dbei))
+ n--;
+ }
}
break;
case LOADHISTORY_TIME:
if (m_hDbEventFirst == 0)
- dbei.timestamp = time(0);
+ dbei.iTimestamp = time(0);
else
db_event_get(m_hDbEventFirst, &dbei);
- uint32_t firstTime = dbei.timestamp - 60 * g_plugin.getWord(SRMSGSET_LOADTIME, SRMSGDEFSET_LOADTIME);
+ uint32_t firstTime = dbei.getUnixtime() - 60 * g_plugin.getWord(SRMSGSET_LOADTIME, SRMSGDEFSET_LOADTIME);
+ DB::ECPTR pCursor(DB::EventsRev(m_hContact));
while (MEVENT hPrevEvent = pCursor.FetchNext()) {
dbei.cbBlob = 0;
db_event_get(hPrevEvent, &dbei);
- if (dbei.timestamp < firstTime)
+ if (dbei.getUnixtime() < firstTime)
break;
m_hDbEventFirst = hPrevEvent;
}
@@ -493,7 +490,7 @@ int CMsgDialog::FindRTLLocale()
void CMsgDialog::FlashOnClist(MEVENT hEvent, const DB::EventInfo &dbei)
{
m_dwTickLastEvent = GetTickCount();
- bool bSent = dbei.flags & DBEF_SENT;
+ bool bSent = dbei.bSent;
if ((GetForegroundWindow() != m_pContainer->m_hwnd || m_pContainer->m_hwndActive != m_hwnd) && !bSent) {
m_dwUnread++;
@@ -995,7 +992,7 @@ void CMsgDialog::HandlePasteAndSend()
m_message.SendMsg(EM_PASTESPECIAL, CF_UNICODETEXT, 0);
if (GetWindowTextLength(m_message.GetHwnd()) > 0)
- SendMessage(m_hwnd, WM_COMMAND, IDOK, 0);
+ m_btnOk.Click();
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -2368,8 +2365,7 @@ void CMsgDialog::UpdateTitle()
switch (m_si->iType) {
case GCW_CHATROOM:
hIcon = Skin_LoadProtoIcon(m_si->pszModule, (m_wStatus <= ID_STATUS_OFFLINE) ? ID_STATUS_OFFLINE : m_wStatus);
- wszTitle.Format((nUsers == 1) ? TranslateT("%s: chat room (%u user%s)") : TranslateT("%s: chat room (%u users%s)"),
- szNick, nUsers, m_bFilterEnabled ? TranslateT(", event filter active") : L"");
+ wszTitle.Format((nUsers == 1) ? TranslateT("%s: chat room (%u user)") : TranslateT("%s: chat room (%u users)"), szNick, nUsers);
break;
case GCW_PRIVMESS:
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp
index 8cc7492280..db7b7d2dff 100644
--- a/plugins/TabSRMM/src/msgdlgutils.cpp
+++ b/plugins/TabSRMM/src/msgdlgutils.cpp
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
diff --git a/plugins/TabSRMM/src/msgdlgutils.h b/plugins/TabSRMM/src/msgdlgutils.h
index 84a0c4186a..c520cbd538 100644
--- a/plugins/TabSRMM/src/msgdlgutils.h
+++ b/plugins/TabSRMM/src/msgdlgutils.h
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp
index d3ae86f9cf..1eb2d12c4b 100644
--- a/plugins/TabSRMM/src/msglog.cpp
+++ b/plugins/TabSRMM/src/msglog.cpp
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
@@ -565,11 +565,11 @@ bool CLogWindow::CreateRtfEvent(RtfLogStreamData *streamData, DB::EventInfo &dbe
bool isBold = false, isItalic = false, isUnderline = false;
auto *dat = &m_pDlg;
- if (dbei.eventType == EVENTTYPE_MESSAGE && !dbei.markedRead())
+ if (dbei.eventType == EVENTTYPE_MESSAGE && !dbei.bRead)
dat->m_cache->updateStats(TSessionStats::SET_LAST_RCV, mir_strlen((char *)dbei.pBlob));
- BOOL isSent = (dbei.flags & DBEF_SENT);
- BOOL bIsStatusChangeEvent = IsStatusEvent(dbei.eventType);
+ bool isSent = dbei.bSent;
+ bool bIsStatusChangeEvent = IsStatusEvent(dbei.eventType);
if (!isSent && bIsStatusChangeEvent)
dbei.wipeNotify();
@@ -596,7 +596,7 @@ bool CLogWindow::CreateRtfEvent(RtfLogStreamData *streamData, DB::EventInfo &dbe
uint32_t dwEffectiveFlags = dat->m_dwFlags;
- dat->m_bIsHistory = (dbei.timestamp < dat->m_cache->getSessionStart() && dbei.markedRead());
+ dat->m_bIsHistory = (dbei.getUnixtime() < dat->m_cache->getSessionStart() && dbei.bRead);
int iFontIDOffset = dat->m_bIsHistory ? 8 : 0; // offset into the font table for either history (old) or new events... (# of fonts per configuration set)
g_groupBreak = TRUE;
@@ -610,9 +610,9 @@ bool CLogWindow::CreateRtfEvent(RtfLogStreamData *streamData, DB::EventInfo &dbe
dat->m_bDividerWanted = false;
}
- if (dwEffectiveFlags & MWF_LOG_GROUPMODE && ((dbei.flags & (DBEF_SENT | DBEF_READ | DBEF_RTL)) == LOWORD(dat->m_iLastEventType)) && dbei.eventType == EVENTTYPE_MESSAGE && HIWORD(dat->m_iLastEventType) == EVENTTYPE_MESSAGE && (dbei.timestamp - dat->m_lastEventTime) < 86400) {
+ if (dwEffectiveFlags & MWF_LOG_GROUPMODE && ((dbei.flags & (DBEF_SENT | DBEF_READ | DBEF_RTL)) == LOWORD(dat->m_iLastEventType)) && dbei.eventType == EVENTTYPE_MESSAGE && HIWORD(dat->m_iLastEventType) == EVENTTYPE_MESSAGE && (dbei.getUnixtime() - dat->m_lastEventTime) < 86400) {
g_groupBreak = FALSE;
- if ((time_t)dbei.timestamp > today && dat->m_lastEventTime < today)
+ if ((time_t)dbei.getUnixtime() > today && dat->m_lastEventTime < today)
g_groupBreak = TRUE;
}
@@ -642,7 +642,7 @@ bool CLogWindow::CreateRtfEvent(RtfLogStreamData *streamData, DB::EventInfo &dbe
// templated code starts here
if (dwEffectiveFlags & MWF_LOG_SHOWTIME) {
hTimeZone = ((dat->m_dwFlags & MWF_LOG_LOCALTIME) && !isSent) ? dat->m_hTimeZone : nullptr;
- time_t local_time = TimeZone_UtcToLocal(hTimeZone, dbei.timestamp);
+ time_t local_time = TimeZone_UtcToLocal(hTimeZone, dbei.getUnixtime());
event_time = *gmtime(&local_time);
}
@@ -765,14 +765,14 @@ bool CLogWindow::CreateRtfEvent(RtfLogStreamData *streamData, DB::EventInfo &dbe
break;
case 'D': // long date
if (showTime && showDate) {
- wchar_t *szFinalTimestamp = Template_MakeRelativeDate(hTimeZone, dbei.timestamp, 'D');
+ wchar_t *szFinalTimestamp = Template_MakeRelativeDate(hTimeZone, dbei.getUnixtime(), 'D');
AppendTimeStamp(szFinalTimestamp, isSent, str, skipFont, dat, iFontIDOffset);
}
else skipToNext = true;
break;
case 'E': // short date...
if (showTime && showDate) {
- wchar_t *szFinalTimestamp = Template_MakeRelativeDate(hTimeZone, dbei.timestamp, 'E');
+ wchar_t *szFinalTimestamp = Template_MakeRelativeDate(hTimeZone, dbei.getUnixtime(), 'E');
AppendTimeStamp(szFinalTimestamp, isSent, str, skipFont, dat, iFontIDOffset);
}
else skipToNext = true;
@@ -871,7 +871,7 @@ bool CLogWindow::CreateRtfEvent(RtfLogStreamData *streamData, DB::EventInfo &dbe
case 'R':
case 'r': // long date
if (showTime && showDate) {
- wchar_t *szFinalTimestamp = Template_MakeRelativeDate(hTimeZone, dbei.timestamp, cc);
+ wchar_t *szFinalTimestamp = Template_MakeRelativeDate(hTimeZone, dbei.getUnixtime(), cc);
AppendTimeStamp(szFinalTimestamp, isSent, str, skipFont, dat, iFontIDOffset);
}
else skipToNext = true;
@@ -879,7 +879,7 @@ bool CLogWindow::CreateRtfEvent(RtfLogStreamData *streamData, DB::EventInfo &dbe
case 't':
case 'T':
if (showTime) {
- wchar_t *szFinalTimestamp = Template_MakeRelativeDate(hTimeZone, dbei.timestamp, (wchar_t)((dwEffectiveFlags & MWF_LOG_SHOWSECONDS) ? cc : (wchar_t)'t'));
+ wchar_t *szFinalTimestamp = Template_MakeRelativeDate(hTimeZone, dbei.getUnixtime(), (wchar_t)((dwEffectiveFlags & MWF_LOG_SHOWSECONDS) ? cc : (wchar_t)'t'));
AppendTimeStamp(szFinalTimestamp, isSent, str, skipFont, dat, iFontIDOffset);
}
else skipToNext = true;
@@ -1116,7 +1116,7 @@ skip:
str.Append("\\par");
dat->m_iLastEventType = MAKELONG((dbei.flags & (DBEF_SENT | DBEF_READ | DBEF_RTL)), dbei.eventType);
- dat->m_lastEventTime = dbei.timestamp;
+ dat->m_lastEventTime = dbei.getUnixtime();
return true;
}
@@ -1205,12 +1205,12 @@ void CLogWindow::LogEvents(MEVENT hDbEventFirst, int count, bool fAppend, DB::Ev
m_pDlg.m_bLastParaDeleted = true;
}
- BOOL isSent;
+ bool isSent;
if (streamData.dbei != nullptr)
- isSent = (streamData.dbei->flags & DBEF_SENT) != 0;
+ isSent = streamData.dbei->bSent;
else {
DB::EventInfo dbei(hDbEventFirst, false);
- isSent = (dbei.flags & DBEF_SENT) != 0;
+ isSent = dbei.bSent;
}
ReplaceIcons(startAt, fAppend, isSent);
diff --git a/plugins/TabSRMM/src/msgoptions.cpp b/plugins/TabSRMM/src/msgoptions.cpp
index f7f8a8bb19..382af9cd11 100644
--- a/plugins/TabSRMM/src/msgoptions.cpp
+++ b/plugins/TabSRMM/src/msgoptions.cpp
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
@@ -397,6 +397,7 @@ public:
auto *pwszSection = LPGENW("Message window behavior");
treeOpts.AddOption(pwszSection, LPGENW("Always flash contact list and tray icon for new messages"), g_plugin.bFlashOnClist);
treeOpts.AddOption(pwszSection, LPGENW("Delete temporary contacts on close"), g_plugin.bDeleteTemp);
+ treeOpts.AddOption(pwszSection, LPGENW("Use Ctrl+arrows to scroll history in the input window"), g_plugin.bScrollHistory);
pwszSection = LPGENW("Sending messages");
treeOpts.AddOption(pwszSection, LPGENW("Minimize the message window on send"), g_plugin.bAutoMin);
@@ -624,7 +625,7 @@ public:
DB::EventInfo dbei;
dbei.szModule = m_szProto;
- dbei.timestamp = time(0);
+ dbei.iTimestamp = time(0);
dbei.eventType = (iIndex == 6) ? EVENTTYPE_STATUSCHANGE : EVENTTYPE_MESSAGE;
dbei.eventType = (iIndex == 7) ? EVENTTYPE_ERRMSG : dbei.eventType;
if (dbei.eventType == EVENTTYPE_ERRMSG)
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp
index c44bcccc4b..232faeec78 100644
--- a/plugins/TabSRMM/src/msgs.cpp
+++ b/plugins/TabSRMM/src/msgs.cpp
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
@@ -451,12 +451,12 @@ static TIconDesc _toolbaricons[] =
static TIconDesc _exttoolbaricons[] =
{
{ "tabSRMM_emoticon", LPGEN("Smiley button"), 0, -IDI_SMILEYICON, 1 }, // 9
- { "tabSRMM_bold", LPGEN("Format bold"), 0, -IDI_FONTBOLD, 1 },
- { "tabSRMM_italic", LPGEN("Format italic"), 0, -IDI_FONTITALIC, 1 },
- { "tabSRMM_underline", LPGEN("Format underline"), 0, -IDI_FONTUNDERLINE, 1 },
+ { "tabSRMM_bold", LPGEN("Make the text bold"), 0, -IDI_FONTBOLD, 1 },
+ { "tabSRMM_italic", LPGEN("Make the text italicized"), 0, -IDI_FONTITALIC, 1 },
+ { "tabSRMM_underline", LPGEN("Make the text underlined"), 0, -IDI_FONTUNDERLINE, 1 },
{ "tabSRMM_face", LPGEN("Font face"), 0, -IDI_FONTFACE, 1 },
{ "tabSRMM_color", LPGEN("Font color"), 0, -IDI_FONTCOLOR, 1 },
- { "tabSRMM_strikeout", LPGEN("Format strikethrough"), 0, -IDI_STRIKEOUT, 1 }
+ { "tabSRMM_strikeout", LPGEN("Make the text strikethrough"), 0, -IDI_STRIKEOUT, 1 }
};
static TIconDesc _chattoolbaricons[] =
diff --git a/plugins/TabSRMM/src/msgs.h b/plugins/TabSRMM/src/msgs.h
index 05ad07b5a3..3bb1339ac6 100644
--- a/plugins/TabSRMM/src/msgs.h
+++ b/plugins/TabSRMM/src/msgs.h
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
@@ -542,7 +542,6 @@ public:
bool TabAutoComplete();
- HWND m_hwndFilter;
BOOL m_iSavedSpaces;
wchar_t *m_wszSearchQuery, *m_wszSearchResult;
SESSION_INFO *m_pLastSession;
@@ -557,7 +556,6 @@ public:
void onClick_Ok(CCtrlButton *);
void onClick_Add(CCtrlButton *);
void onClick_Quote(CCtrlButton *);
- void onClick_Filter(CCtrlButton *);
void onClick_CancelAdd(CCtrlButton *);
void onClick_ShowNickList(CCtrlButton *);
@@ -1016,7 +1014,7 @@ struct CMPlugin : public PLUGIN<CMPlugin>
HANDLE hLogger;
// window settings
- CMOption<bool> bAutoMin, bAutoClose, bFlashOnClist, bDeleteTemp;
+ CMOption<bool> bAutoMin, bAutoClose, bFlashOnClist, bDeleteTemp, bScrollHistory;
CMOption<bool> bPasteAndSend, bAutoSplit, bUseSameSplitSize, bAutoCopy;
CMOption<bool> bStatusOnTabs, bUseXStatus, bDetailedTooltips, bAllowOfflineMultisend;
CMOption<bool> bAutoPopup, bAutoTabs, bAutoSwitchTabs, bAutoContainer, bPopupContainer, bHideOnClose, bAllowTab;
diff --git a/plugins/TabSRMM/src/muchighlight.cpp b/plugins/TabSRMM/src/muchighlight.cpp
index 7f35c72039..5dafba5297 100644
--- a/plugins/TabSRMM/src/muchighlight.cpp
+++ b/plugins/TabSRMM/src/muchighlight.cpp
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
diff --git a/plugins/TabSRMM/src/muchighlight.h b/plugins/TabSRMM/src/muchighlight.h
index 18d1317cb1..48b7c92e6f 100644
--- a/plugins/TabSRMM/src/muchighlight.h
+++ b/plugins/TabSRMM/src/muchighlight.h
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
diff --git a/plugins/TabSRMM/src/nen.h b/plugins/TabSRMM/src/nen.h
index 9b392bbe44..e5b4cebf6c 100644
--- a/plugins/TabSRMM/src/nen.h
+++ b/plugins/TabSRMM/src/nen.h
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
diff --git a/plugins/TabSRMM/src/selectcontainer.cpp b/plugins/TabSRMM/src/selectcontainer.cpp
index 113e92e27c..de0361e372 100644
--- a/plugins/TabSRMM/src/selectcontainer.cpp
+++ b/plugins/TabSRMM/src/selectcontainer.cpp
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
diff --git a/plugins/TabSRMM/src/sendlater.cpp b/plugins/TabSRMM/src/sendlater.cpp
index cfea821386..d48b975f39 100644
--- a/plugins/TabSRMM/src/sendlater.cpp
+++ b/plugins/TabSRMM/src/sendlater.cpp
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
@@ -792,7 +792,7 @@ HANDLE SendLater::processAck(const ACKDATA *ack)
dbei.eventType = EVENTTYPE_MESSAGE;
dbei.flags = DBEF_SENT | DBEF_UTF;
dbei.szModule = Proto_GetBaseAccountName((p->hContact));
- dbei.timestamp = time(0);
+ dbei.iTimestamp = time(0);
dbei.cbBlob = (int)mir_strlen(p->sendBuffer) + 1;
dbei.pBlob = p->sendBuffer;
db_event_add(p->hContact, &dbei);
diff --git a/plugins/TabSRMM/src/sendlater.h b/plugins/TabSRMM/src/sendlater.h
index 14112401dd..adaba4c5f4 100644
--- a/plugins/TabSRMM/src/sendlater.h
+++ b/plugins/TabSRMM/src/sendlater.h
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
diff --git a/plugins/TabSRMM/src/sendqueue.cpp b/plugins/TabSRMM/src/sendqueue.cpp
index 96c810f6ef..6698e6c563 100644
--- a/plugins/TabSRMM/src/sendqueue.cpp
+++ b/plugins/TabSRMM/src/sendqueue.cpp
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
@@ -357,7 +357,7 @@ void SendQueue::logError(CMsgDialog *dat, int iSendJobIndex, const wchar_t *szEr
dbei.flags = DBEF_SENT | DBEF_UTF;
dbei.cbBlob = (int)iMsgLen;
- dbei.timestamp = time(0);
+ dbei.iTimestamp = time(0);
dbei.szModule = (char *)szErrMsg;
dat->LogEvent(dbei);
@@ -461,7 +461,7 @@ int SendQueue::ackMessage(CMsgDialog *dat, WPARAM wParam, LPARAM lParam)
dbei.eventType = EVENTTYPE_MESSAGE;
dbei.flags = DBEF_SENT | DBEF_UTF;
dbei.szModule = Proto_GetBaseAccountName(job.hContact);
- dbei.timestamp = time(0);
+ dbei.iTimestamp = time(0);
dbei.cbBlob = (int)mir_strlen(job.szSendBuffer) + 1;
if (dat)
@@ -548,7 +548,7 @@ int SendQueue::doSendLater(int iJobIndex, CMsgDialog *dat, MCONTACT hContact, bo
dbei.eventType = EVENTTYPE_MESSAGE;
dbei.flags = DBEF_SENT | DBEF_UTF;
dbei.szModule = Proto_GetBaseAccountName(dat->m_hContact);
- dbei.timestamp = time(0);
+ dbei.iTimestamp = time(0);
dbei.pBlob = szUtf;
dbei.cbBlob = (int)mir_strlen(szUtf);
dat->LogEvent(dbei);
diff --git a/plugins/TabSRMM/src/sendqueue.h b/plugins/TabSRMM/src/sendqueue.h
index 8d9ae31613..9af43e2d85 100644
--- a/plugins/TabSRMM/src/sendqueue.h
+++ b/plugins/TabSRMM/src/sendqueue.h
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
diff --git a/plugins/TabSRMM/src/sidebar.cpp b/plugins/TabSRMM/src/sidebar.cpp
index c37e4f66ab..d94e04a484 100644
--- a/plugins/TabSRMM/src/sidebar.cpp
+++ b/plugins/TabSRMM/src/sidebar.cpp
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
diff --git a/plugins/TabSRMM/src/sidebar.h b/plugins/TabSRMM/src/sidebar.h
index eccae7fed9..b8bece4654 100644
--- a/plugins/TabSRMM/src/sidebar.h
+++ b/plugins/TabSRMM/src/sidebar.h
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
diff --git a/plugins/TabSRMM/src/srmm.cpp b/plugins/TabSRMM/src/srmm.cpp
index 88a3d82614..6c70f24694 100644
--- a/plugins/TabSRMM/src/srmm.cpp
+++ b/plugins/TabSRMM/src/srmm.cpp
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
@@ -68,6 +68,7 @@ CMPlugin::CMPlugin() :
bStatusOnTabs(SRMSGMOD_T, "tabstatus", true),
bFlashOnClist(SRMSGMOD_T, "flashcl", false),
bPasteAndSend(SRMSGMOD_T, "pasteandsend", true),
+ bScrollHistory(SRMSGMOD_T, "scrollhistory", true),
bAutoContainer(SRMSGMOD_T, "autocontainer", true),
bAutoSwitchTabs(SRMSGMOD_T, "autoswitchtabs", true),
bPopupContainer(SRMSGMOD_T, "cpopup", true),
diff --git a/plugins/TabSRMM/src/stdafx.cxx b/plugins/TabSRMM/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/TabSRMM/src/stdafx.cxx
+++ b/plugins/TabSRMM/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/TabSRMM/src/stdafx.h b/plugins/TabSRMM/src/stdafx.h
index c1bd0cb35b..cf7d8f3fe7 100644
--- a/plugins/TabSRMM/src/stdafx.h
+++ b/plugins/TabSRMM/src/stdafx.h
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
diff --git a/plugins/TabSRMM/src/tabctrl.cpp b/plugins/TabSRMM/src/tabctrl.cpp
index 2d8b39623a..4e8a70d49c 100644
--- a/plugins/TabSRMM/src/tabctrl.cpp
+++ b/plugins/TabSRMM/src/tabctrl.cpp
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
diff --git a/plugins/TabSRMM/src/taskbar.cpp b/plugins/TabSRMM/src/taskbar.cpp
index 91f2a6aaf7..7649743fc0 100644
--- a/plugins/TabSRMM/src/taskbar.cpp
+++ b/plugins/TabSRMM/src/taskbar.cpp
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
diff --git a/plugins/TabSRMM/src/taskbar.h b/plugins/TabSRMM/src/taskbar.h
index 210b83c923..44a372918c 100644
--- a/plugins/TabSRMM/src/taskbar.h
+++ b/plugins/TabSRMM/src/taskbar.h
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
diff --git a/plugins/TabSRMM/src/templates.cpp b/plugins/TabSRMM/src/templates.cpp
index 52d1552bbd..5df0f2ff44 100644
--- a/plugins/TabSRMM/src/templates.cpp
+++ b/plugins/TabSRMM/src/templates.cpp
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
diff --git a/plugins/TabSRMM/src/themeio.cpp b/plugins/TabSRMM/src/themeio.cpp
index d100bb41f0..a1214a0b05 100644
--- a/plugins/TabSRMM/src/themeio.cpp
+++ b/plugins/TabSRMM/src/themeio.cpp
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
diff --git a/plugins/TabSRMM/src/themes.cpp b/plugins/TabSRMM/src/themes.cpp
index fa07af18e5..de3bb661e5 100644
--- a/plugins/TabSRMM/src/themes.cpp
+++ b/plugins/TabSRMM/src/themes.cpp
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
diff --git a/plugins/TabSRMM/src/themes.h b/plugins/TabSRMM/src/themes.h
index e059a37093..00eea7d494 100644
--- a/plugins/TabSRMM/src/themes.h
+++ b/plugins/TabSRMM/src/themes.h
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
diff --git a/plugins/TabSRMM/src/userprefs.cpp b/plugins/TabSRMM/src/userprefs.cpp
index cb3533cf91..4db62ef00d 100644
--- a/plugins/TabSRMM/src/userprefs.cpp
+++ b/plugins/TabSRMM/src/userprefs.cpp
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
diff --git a/plugins/TabSRMM/src/utils.cpp b/plugins/TabSRMM/src/utils.cpp
index 0c177f2bb0..21e1f4c06b 100644
--- a/plugins/TabSRMM/src/utils.cpp
+++ b/plugins/TabSRMM/src/utils.cpp
@@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
diff --git a/plugins/TabSRMM/src/utils.h b/plugins/TabSRMM/src/utils.h
index f6c7ef5347..5437498fa4 100644
--- a/plugins/TabSRMM/src/utils.h
+++ b/plugins/TabSRMM/src/utils.h
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda NG: the free IM client for Microsoft* Windows*
//
-// Copyright (C) 2012-24 Miranda NG team,
+// Copyright (C) 2012-25 Miranda NG team,
// Copyright (c) 2000-09 Miranda ICQ/IM project,
// all portions of this codebase are copyrighted to the people
// listed in contributors.txt.
diff --git a/plugins/TabSRMM/src/version.h b/plugins/TabSRMM/src/version.h
index 882203e4e9..1f1d29d7cc 100644
--- a/plugins/TabSRMM/src/version.h
+++ b/plugins/TabSRMM/src/version.h
@@ -10,4 +10,4 @@
#define __DESCRIPTION "IM and group chat module for Miranda NG."
#define __AUTHOR "The Miranda developers team and contributors"
#define __AUTHORWEB "https://miranda-ng.org/p/TabSRMM"
-#define __COPYRIGHT "© 2012-24 Miranda NG team, 2000-2010 Miranda Project and contributors."
+#define __COPYRIGHT "© 2012-25 Miranda NG team, 2000-2010 Miranda Project and contributors."
diff --git a/plugins/TabSRMM/src/warning.cpp b/plugins/TabSRMM/src/warning.cpp
index 66b5459035..7de43d687f 100644
--- a/plugins/TabSRMM/src/warning.cpp
+++ b/plugins/TabSRMM/src/warning.cpp
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/TipperYM/src/options.cpp b/plugins/TipperYM/src/options.cpp
index 14845f77c9..3c1e0b864e 100644
--- a/plugins/TipperYM/src/options.cpp
+++ b/plugins/TipperYM/src/options.cpp
@@ -2000,7 +2000,7 @@ INT_PTR CALLBACK DlgProcFavouriteContacts(HWND hwndDlg, UINT msg, WPARAM wParam,
TranslateDialogDefault(hwndDlg);
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETHIDEEMPTYGROUPS, 1, 0);
- SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETUSEGROUPS, Clist::UseGroups, 0);
+ SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETUSEGROUPS, Clist::bUseGroups, 0);
for (auto &hContact : Contacts()) {
HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
diff --git a/plugins/TipperYM/src/stdafx.cxx b/plugins/TipperYM/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/TipperYM/src/stdafx.cxx
+++ b/plugins/TipperYM/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/TipperYM/src/stdafx.h b/plugins/TipperYM/src/stdafx.h
index 9e0a280fa9..83205f53fe 100644
--- a/plugins/TipperYM/src/stdafx.h
+++ b/plugins/TipperYM/src/stdafx.h
@@ -54,6 +54,7 @@ Boston, MA 02111-1307, USA.
#include <m_variables.h>
#include <m_smileyadd.h>
#include <m_imgsrvc.h>
+#include <m_tipper.h>
#include "resource.h"
#include "version.h"
diff --git a/plugins/TipperYM/src/subst.cpp b/plugins/TipperYM/src/subst.cpp
index bdc900221e..7bdbcbe36f 100644
--- a/plugins/TipperYM/src/subst.cpp
+++ b/plugins/TipperYM/src/subst.cpp
@@ -124,8 +124,8 @@ uint32_t LastMessageTimestamp(MCONTACT hContact, bool received)
for (MEVENT hDbEvent = db_event_last(hContact); hDbEvent; hDbEvent = db_event_prev(hContact, hDbEvent)) {
DBEVENTINFO dbei = {};
db_event_get(hDbEvent, &dbei);
- if (dbei.eventType == EVENTTYPE_MESSAGE && !(dbei.flags & DBEF_SENT) == received)
- return dbei.timestamp;
+ if (dbei.eventType == EVENTTYPE_MESSAGE && dbei.bSent != received)
+ return dbei.getUnixtime();
}
return 0;
@@ -166,7 +166,7 @@ wchar_t* GetLastMessageText(MCONTACT hContact, bool received)
{
for (MEVENT hDbEvent = db_event_last(hContact); hDbEvent; hDbEvent = db_event_prev(hContact, hDbEvent)) {
DB::EventInfo dbei(hDbEvent);
- if (dbei.eventType == EVENTTYPE_MESSAGE && !(dbei.flags & DBEF_SENT) == received) {
+ if (dbei.eventType == EVENTTYPE_MESSAGE && dbei.bSent != received) {
wchar_t *swzMsg = dbei.getText();
StripBBCodesInPlace(swzMsg);
return swzMsg;
@@ -367,9 +367,9 @@ bool GetSysSubstText(MCONTACT hContact, wchar_t *swzRawSpec, wchar_t *buff, int
DBEVENTINFO dbei = {};
if (!db_event_get(dbe, &dbei)) {
if (dbei.eventType == EVENTTYPE_MESSAGE) {
- dwNewTs = max(dwNewTs, dbei.timestamp);
- if (dbei.timestamp > dwLastTs) {
- if (dbei.flags & DBEF_SENT) dwCountOut++;
+ dwNewTs = max(dwNewTs, dbei.getUnixtime());
+ if (dbei.getUnixtime() > dwLastTs) {
+ if (dbei.bSent) dwCountOut++;
else dwCountIn++;
}
else break;
diff --git a/plugins/Toaster/src/version.h b/plugins/Toaster/src/version.h
index 0d96a4ece8..185bad77aa 100644
--- a/plugins/Toaster/src/version.h
+++ b/plugins/Toaster/src/version.h
@@ -10,4 +10,4 @@
#define __DESCRIPTION "Provides popup services based on Windows toast notification for different plugins."
#define __AUTHOR "Miranda NG team"
#define __AUTHORWEB "https://miranda-ng.org/p/Toaster"
-#define __COPYRIGHT "© 2015-24 Miranda NG team"
+#define __COPYRIGHT "© 2015-25 Miranda NG team"
diff --git a/plugins/TooltipNotify/src/TooltipNotify.cpp b/plugins/TooltipNotify/src/TooltipNotify.cpp
index 0bbd200e69..0c55dbc828 100644
--- a/plugins/TooltipNotify/src/TooltipNotify.cpp
+++ b/plugins/TooltipNotify/src/TooltipNotify.cpp
@@ -691,7 +691,7 @@ BOOL CTooltipNotify::ProtosDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM)
void CTooltipNotify::ResetCList(HWND hwndDlg)
{
- SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETUSEGROUPS, Clist::UseGroups, 0);
+ SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETUSEGROUPS, Clist::bUseGroups, 0);
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETHIDEEMPTYGROUPS, 1, 0);
}
diff --git a/plugins/TooltipNotify/src/stdafx.cxx b/plugins/TooltipNotify/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/TooltipNotify/src/stdafx.cxx
+++ b/plugins/TooltipNotify/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/TopToolBar/src/InternalButtons.cpp b/plugins/TopToolBar/src/InternalButtons.cpp
index 305aee611e..c41c52e364 100644
--- a/plugins/TopToolBar/src/InternalButtons.cpp
+++ b/plugins/TopToolBar/src/InternalButtons.cpp
@@ -158,8 +158,8 @@ void InitInternalButtons()
ttb.hIconHandleUp = Skin_GetIconHandle(SKINICON_OTHER_EXIT);
hExit = g_plugin.addTTB(&ttb);
- CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hShowHideOffline, Clist::HideOffline ? 0 : TTBST_PUSHED);
- CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hGroups, Clist::UseGroups ? TTBST_PUSHED : 0);
+ CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hShowHideOffline, Clist::bHideOffline ? 0 : TTBST_PUSHED);
+ CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hGroups, Clist::bUseGroups ? TTBST_PUSHED : 0);
CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hSounds,
db_get_b(0, "Skin", "UseSound", 1) ? TTBST_PUSHED : 0);
diff --git a/plugins/TopToolBar/src/stdafx.cxx b/plugins/TopToolBar/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/TopToolBar/src/stdafx.cxx
+++ b/plugins/TopToolBar/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/TopToolBar/src/toolbarwnd.cpp b/plugins/TopToolBar/src/toolbarwnd.cpp
index 2d11410c4c..63aac5b375 100644
--- a/plugins/TopToolBar/src/toolbarwnd.cpp
+++ b/plugins/TopToolBar/src/toolbarwnd.cpp
@@ -162,7 +162,7 @@ LRESULT CALLBACK TopToolBarProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara
return 0;
case WM_LBUTTONDOWN:
- if (db_get_b(0, "CLUI", "ClientAreaDrag", 0)) {
+ if (Clist::bClientAreaDrag) {
POINT pt;
GetCursorPos(&pt);
return SendMessage(GetParent(hwnd), WM_SYSCOMMAND, SC_MOVE | HTCAPTION, MAKELPARAM(pt.x, pt.y));
diff --git a/plugins/TrafficCounter/src/TrafficCounter.cpp b/plugins/TrafficCounter/src/TrafficCounter.cpp
index c4931fb019..a117eaabde 100644
--- a/plugins/TrafficCounter/src/TrafficCounter.cpp
+++ b/plugins/TrafficCounter/src/TrafficCounter.cpp
@@ -626,7 +626,7 @@ LRESULT CALLBACK TrafficCounterWndProc_MW(HWND hwnd, UINT msg, WPARAM wParam, LP
return 1;
case WM_LBUTTONDOWN:
- if (db_get_b(0, "CLUI", "ClientAreaDrag", SETTING_CLIENTDRAG_DEFAULT)) {
+ if (Clist::bClientAreaDrag) {
POINT p;
ClientToScreen(GetParent(hwnd), &p);
return SendMessage(GetParent(hwnd), WM_SYSCOMMAND, SC_MOVE | HTCAPTION, MAKELPARAM(p.x, p.y));
diff --git a/plugins/TrafficCounter/src/stdafx.cxx b/plugins/TrafficCounter/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/TrafficCounter/src/stdafx.cxx
+++ b/plugins/TrafficCounter/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/TranslitSwitcher/src/stdafx.cxx b/plugins/TranslitSwitcher/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/TranslitSwitcher/src/stdafx.cxx
+++ b/plugins/TranslitSwitcher/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/TranslitSwitcher/src/version.h b/plugins/TranslitSwitcher/src/version.h
index bcff1d2717..4ba75dc7ea 100644
--- a/plugins/TranslitSwitcher/src/version.h
+++ b/plugins/TranslitSwitcher/src/version.h
@@ -10,4 +10,4 @@
#define __DESCRIPTION "Allows you to switch a layout or transliterate or invert case of the entered text in the message window with SmileyAdd support."
#define __AUTHOR "Mataes, tico-tico, Tim"
#define __AUTHORWEB "https://miranda-ng.org/p/TranslitSwitcher"
-#define __COPYRIGHT "© 2007 Dmitry Titkov, 2011-24 Mataes, tico-tico"
+#define __COPYRIGHT "© 2007 Dmitry Titkov, 2011-25 Mataes, tico-tico"
diff --git a/plugins/UserGuide/src/stdafx.cxx b/plugins/UserGuide/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/UserGuide/src/stdafx.cxx
+++ b/plugins/UserGuide/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/UserInfoEx/src/dlg_msgbox.cpp b/plugins/UserInfoEx/src/dlg_msgbox.cpp
index 1df1143d7f..859272dbf1 100644
--- a/plugins/UserInfoEx/src/dlg_msgbox.cpp
+++ b/plugins/UserInfoEx/src/dlg_msgbox.cpp
@@ -2,7 +2,7 @@
UserinfoEx plugin for Miranda NG
Copyright:
-© 2012-24 Miranda NG team (https://miranda-ng.org)
+© 2012-25 Miranda NG team (https://miranda-ng.org)
© 2006-10 DeathAxe, Yasnovidyashii, Merlin, K. Romanov, Kreol
This program is free software; you can redistribute it and/or
diff --git a/plugins/UserInfoEx/src/dlg_msgbox.h b/plugins/UserInfoEx/src/dlg_msgbox.h
index 594ec78352..10d468a6fa 100644
--- a/plugins/UserInfoEx/src/dlg_msgbox.h
+++ b/plugins/UserInfoEx/src/dlg_msgbox.h
@@ -2,7 +2,7 @@
UserinfoEx plugin for Miranda NG
Copyright:
-© 2012-24 Miranda NG team (https://miranda-ng.org)
+© 2012-25 Miranda NG team (https://miranda-ng.org)
© 2006-10 DeathAxe, Yasnovidyashii, Merlin, K. Romanov, Kreol
This program is free software; you can redistribute it and/or
diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp b/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp
index e26522981f..1f27050971 100644
--- a/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp
+++ b/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp
@@ -401,7 +401,7 @@ uint8_t CExImContactXML::ExportEvents()
TiXmlElement *xmlEvent = _xmlDoc.NewElement("evt");
if (xmlEvent) {
xmlEvent->SetAttribute("type", dbei.eventType);
- xmlEvent->SetAttribute("time", (int)dbei.timestamp);
+ xmlEvent->SetAttribute("time", (int)dbei.getUnixtime());
xmlEvent->SetAttribute("flag", (int)dbei.flags);
TiXmlText *xmlText = _xmlDoc.NewText(pBase64Data);
@@ -914,8 +914,8 @@ int CExImContactXML::ImportEvent(LPCSTR pszModule, const TiXmlElement *xmlEvent)
// timestamp must be valid
DBEVENTINFO dbei = {};
- dbei.timestamp = xmlEvent->IntAttribute("time");
- if (dbei.timestamp == 0)
+ dbei.iTimestamp = xmlEvent->IntAttribute("time");
+ if (dbei.iTimestamp == 0)
return ERROR_INVALID_TIMESTAMP;
LPCSTR tmp = xmlEvent->GetText();
diff --git a/plugins/UserInfoEx/src/mir_db.cpp b/plugins/UserInfoEx/src/mir_db.cpp
index c6a1a05ca5..9afb7811f8 100644
--- a/plugins/UserInfoEx/src/mir_db.cpp
+++ b/plugins/UserInfoEx/src/mir_db.cpp
@@ -44,7 +44,7 @@ uint32_t WhenAdded(uint32_t dwUIN, LPCSTR)
memcpy(&dwEvtUIN, dbei.pBlob, sizeof(uint32_t));
MIR_FREE(dbei.pBlob);
if (dwEvtUIN == dwUIN)
- return dbei.timestamp;
+ return dbei.getUnixtime();
}
}
}
@@ -522,7 +522,7 @@ uint32_t TimeOf(MEVENT hEvent)
{
DBEVENTINFO dbei;
if (!GetInfo(hEvent, &dbei))
- return dbei.timestamp;
+ return dbei.getUnixtime();
return 0;
}
@@ -541,7 +541,7 @@ uint32_t TimeOf(MEVENT hEvent)
bool __forceinline IsEqual(const DBEVENTINFO *d1, const DBEVENTINFO *d2, bool Data)
{
bool res = d1 && d2 &&
- (d1->timestamp == d2->timestamp) &&
+ (d1->getUnixtime() == d2->getUnixtime()) &&
(d1->eventType == d2->eventType) &&
(d1->cbBlob == d2->cbBlob) &&
(!d1->szModule || !d2->szModule || !_stricmp(d1->szModule, d2->szModule));
@@ -574,7 +574,7 @@ bool Exists(MCONTACT hContact, MEVENT& hDbExistingEvent, DBEVENTINFO *dbei)
hDbExistingEvent = db_event_first(hContact);
if (hDbExistingEvent) {
if (!GetInfo(hDbExistingEvent, &edbei)) {
- if ((dbei->timestamp < edbei.timestamp))
+ if ((dbei->getUnixtime() < edbei.getUnixtime()))
return false;
if (IsEqual(dbei, &edbei, false)) {
@@ -596,7 +596,7 @@ bool Exists(MCONTACT hContact, MEVENT& hDbExistingEvent, DBEVENTINFO *dbei)
}
if (hDbExistingEvent) {
MEVENT sdbe = hDbExistingEvent;
- for (MEVENT edbe = sdbe; edbe && !GetInfo(edbe, &edbei) && (dbei->timestamp <= edbei.timestamp); edbe = db_event_prev(hContact, edbe)) {
+ for (MEVENT edbe = sdbe; edbe && !GetInfo(edbe, &edbei) && (dbei->getUnixtime() <= edbei.getUnixtime()); edbe = db_event_prev(hContact, edbe)) {
hDbExistingEvent = edbe;
//compare without data (faster)
if ( result = IsEqual(dbei, &edbei, false)) {
@@ -612,7 +612,7 @@ bool Exists(MCONTACT hContact, MEVENT& hDbExistingEvent, DBEVENTINFO *dbei)
} /*end for*/
if (!result) {
- for (MEVENT edbe = db_event_next(hContact, sdbe); edbe && !GetInfo(edbe, &edbei) && (dbei->timestamp >= edbei.timestamp); edbe = db_event_next(hContact, edbe)) {
+ for (MEVENT edbe = db_event_next(hContact, sdbe); edbe && !GetInfo(edbe, &edbei) && (dbei->getUnixtime() >= edbei.getUnixtime()); edbe = db_event_next(hContact, edbe)) {
hDbExistingEvent = edbe;
//compare without data (faster)
if (result = IsEqual(dbei, &edbei, false)) {
diff --git a/plugins/UserInfoEx/src/stdafx.cxx b/plugins/UserInfoEx/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/UserInfoEx/src/stdafx.cxx
+++ b/plugins/UserInfoEx/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/UserInfoEx/src/svc_reminder.cpp b/plugins/UserInfoEx/src/svc_reminder.cpp
index 82e3351baf..87bb0592bf 100644
--- a/plugins/UserInfoEx/src/svc_reminder.cpp
+++ b/plugins/UserInfoEx/src/svc_reminder.cpp
@@ -355,12 +355,24 @@ static uint8_t NotifyWithSound(const CEvent &evt)
* "check for anniversary" functions
***********************************************************************************************************/
+static wchar_t* GetSex(MCONTACT hContact)
+{
+ switch (GenderOf(hContact)) {
+ case 'M':
+ return TranslateT("He");
+ case 'F':
+ return TranslateT("She");
+ default:
+ return TranslateT("He/she");
+ }
+}
+
static uint8_t CheckAnniversaries(MCONTACT hContact, MTime &Now, CEvent &evt, uint8_t bNotify)
{
int numAnniversaries = 0;
int Diff = 0;
MAnnivDate mta;
- CMStringW tszMsg;
+ CMStringW wszMsg;
if (gRemindOpts.RemindState == REMIND_ANNIV || gRemindOpts.RemindState == REMIND_ALL) {
for (int i = 0; i < ANID_LAST && !mta.DBGetAnniversaryDate(hContact, i); i++) {
@@ -383,28 +395,18 @@ static uint8_t CheckAnniversaries(MCONTACT hContact, MTime &Now, CEvent &evt, ui
if (bNotify) {
// first anniversary found
if (numAnniversaries == 1)
- switch (GenderOf(hContact)){
- case 0:
- tszMsg += TranslateT("He/she has the following anniversaries:");
- break;
- case 'M':
- tszMsg += TranslateT("He has the following anniversaries:");
- break;
- case 'F':
- tszMsg += TranslateT("She has the following anniversaries:");
- break;
- }
- tszMsg.Append(L"\n- ");
+ wszMsg.AppendFormat(TranslateT("%s has the following anniversaries:"), GetSex(hContact));
+ wszMsg.Append(L"\n- ");
switch (Diff) {
case 0:
- tszMsg.AppendFormat(TranslateT("%d. %s today"), mta.Age(), mta.Description());
+ wszMsg.AppendFormat(TranslateT("%d. %s today"), mta.Age(), mta.Description());
break;
case 1:
- tszMsg.AppendFormat(TranslateT("%d. %s tomorrow"), mta.Age() + 1, mta.Description());
+ wszMsg.AppendFormat(TranslateT("%d. %s tomorrow"), mta.Age() + 1, mta.Description());
break;
default:
- tszMsg.AppendFormat(TranslateT("%d. %s in %d days"), mta.Age() + 1, mta.Description(), Diff);
+ wszMsg.AppendFormat(TranslateT("%d. %s in %d days"), mta.Age() + 1, mta.Description(), Diff);
}
}
}
@@ -414,12 +416,12 @@ static uint8_t CheckAnniversaries(MCONTACT hContact, MTime &Now, CEvent &evt, ui
// show one popup for all anniversaries
if (numAnniversaries != 0 && bNotify) {
- if (tszMsg.GetLength() >= MAX_SECONDLINE) {
- tszMsg.Truncate(MAX_SECONDLINE - 5);
- tszMsg.Append(L"\n...");
+ if (wszMsg.GetLength() >= MAX_SECONDLINE) {
+ wszMsg.Truncate(MAX_SECONDLINE - 5);
+ wszMsg.Append(L"\n...");
}
- NotifyWithPopup(hContact, CEvent::ANNIVERSARY, Diff, LPGENW("Anniversaries"), tszMsg);
+ NotifyWithPopup(hContact, CEvent::ANNIVERSARY, Diff, LPGENW("Anniversaries"), wszMsg);
}
return numAnniversaries != 0;
@@ -459,39 +461,25 @@ static bool CheckBirthday(MCONTACT hContact, MTime &Now, CEvent &evt, uint8_t bN
}
if (bNotify) {
- wchar_t szMsg[MAXDATASIZE];
- uint16_t cchMsg = 0;
+ CMStringW wszMsg;
switch (Diff) {
case 0:
- cchMsg = mir_snwprintf(szMsg, TranslateT("%s has birthday today."), Clist_GetContactDisplayName(hContact));
+ wszMsg.Format(TranslateT("%s has birthday today."), Clist_GetContactDisplayName(hContact));
break;
case 1:
- cchMsg = mir_snwprintf(szMsg, TranslateT("%s has birthday tomorrow."), Clist_GetContactDisplayName(hContact));
+ wszMsg.Format(TranslateT("%s has birthday tomorrow."), Clist_GetContactDisplayName(hContact));
break;
default:
- cchMsg = mir_snwprintf(szMsg, TranslateT("%s has birthday in %d days."), Clist_GetContactDisplayName(hContact), Diff);
+ wszMsg.Format(TranslateT("%s has birthday in %d days."), Clist_GetContactDisplayName(hContact), Diff);
}
+
int age = mtb.Age(&Now);
- if (age > 0)
- switch (GenderOf(hContact)){
- case 0:
- mir_snwprintf(szMsg + cchMsg, _countof(szMsg) - cchMsg,
- TranslateT("\nHe/she becomes %d years old."),
- age + (Diff > 0));
- break;
- case 'M':
- mir_snwprintf(szMsg + cchMsg, _countof(szMsg) - cchMsg,
- TranslateT("\nHe becomes %d years old."),
- age + (Diff > 0));
- break;
- case 'F':
- mir_snwprintf(szMsg + cchMsg, _countof(szMsg) - cchMsg,
- TranslateT("\nShe becomes %d years old."),
- age + (Diff > 0));
- break;
- }
- NotifyWithPopup(hContact, CEvent::BIRTHDAY, Diff, mtb.Description(), szMsg);
+ if (age > 0) {
+ wszMsg.AppendChar('\n');
+ wszMsg.AppendFormat(TranslateT("%s becomes %d years old."), GetSex(hContact), age + (Diff > 0));
+ }
+ NotifyWithPopup(hContact, CEvent::BIRTHDAY, Diff, mtb.Description(), wszMsg);
}
return true;
}
diff --git a/plugins/Variables/src/help.cpp b/plugins/Variables/src/help.cpp
index 4eece0aa35..a14acc0b8e 100644
--- a/plugins/Variables/src/help.cpp
+++ b/plugins/Variables/src/help.cpp
@@ -91,7 +91,7 @@ static INT_PTR CALLBACK extratextDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPA
// dialog box for the %subject% selection
void ResetCList(HWND hwndDlg)
{
- SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETUSEGROUPS, Clist::UseGroups, 0);
+ SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETUSEGROUPS, Clist::bUseGroups, 0);
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETHIDEEMPTYGROUPS, 1, 0);
}
diff --git a/plugins/Variables/src/parse_miranda.cpp b/plugins/Variables/src/parse_miranda.cpp
index 845dfc33ae..7e87c23ec5 100644
--- a/plugins/Variables/src/parse_miranda.cpp
+++ b/plugins/Variables/src/parse_miranda.cpp
@@ -442,9 +442,9 @@ static MEVENT findDbEvent(MCONTACT hContact, MEVENT hDbEvent, int flags)
hSearchEvent = findDbEvent(hSearchContact, NULL, flags);
dbe.cbBlob = 0;
if (!db_event_get(hSearchEvent, &dbe)) {
- if ((dbe.timestamp < matchTimestamp) || (matchTimestamp == 0)) {
+ if ((dbe.getUnixtime() < matchTimestamp) || (matchTimestamp == 0)) {
hMatchEvent = hSearchEvent;
- matchTimestamp = dbe.timestamp;
+ matchTimestamp = dbe.getUnixtime();
}
}
}
@@ -455,9 +455,9 @@ static MEVENT findDbEvent(MCONTACT hContact, MEVENT hDbEvent, int flags)
hSearchEvent = findDbEvent(hSearchContact, NULL, flags);
dbe.cbBlob = 0;
if (!db_event_get(hSearchEvent, &dbe)) {
- if ((dbe.timestamp > matchTimestamp) || (matchTimestamp == 0)) {
+ if ((dbe.getUnixtime() > matchTimestamp) || (matchTimestamp == 0)) {
hMatchEvent = hSearchEvent;
- matchTimestamp = dbe.timestamp;
+ matchTimestamp = dbe.getUnixtime();
}
}
}
@@ -466,14 +466,14 @@ static MEVENT findDbEvent(MCONTACT hContact, MEVENT hDbEvent, int flags)
else if (flags & DBE_NEXT) {
dbe.cbBlob = 0;
if (!db_event_get(hDbEvent, &dbe)) {
- priorTimestamp = dbe.timestamp;
+ priorTimestamp = dbe.getUnixtime();
for (auto &hSearchContact : Contacts()) {
hSearchEvent = findDbEvent(hSearchContact, hDbEvent, flags);
dbe.cbBlob = 0;
if (!db_event_get(hSearchEvent, &dbe)) {
- if (((dbe.timestamp < matchTimestamp) || (matchTimestamp == 0)) && (dbe.timestamp > priorTimestamp)) {
+ if (((dbe.getUnixtime() < matchTimestamp) || (matchTimestamp == 0)) && (dbe.getUnixtime() > priorTimestamp)) {
hMatchEvent = hSearchEvent;
- matchTimestamp = dbe.timestamp;
+ matchTimestamp = dbe.getUnixtime();
}
}
}
@@ -482,14 +482,14 @@ static MEVENT findDbEvent(MCONTACT hContact, MEVENT hDbEvent, int flags)
}
else if (flags & DBE_PREV) {
if (!db_event_get(hDbEvent, &dbe)) {
- priorTimestamp = dbe.timestamp;
+ priorTimestamp = dbe.getUnixtime();
for (auto &hSearchContact : Contacts()) {
hSearchEvent = findDbEvent(hSearchContact, hDbEvent, flags);
dbe.cbBlob = 0;
if (!db_event_get(hSearchEvent, &dbe)) {
- if (((dbe.timestamp > matchTimestamp) || (matchTimestamp == 0)) && (dbe.timestamp < priorTimestamp)) {
+ if (((dbe.getUnixtime() > matchTimestamp) || (matchTimestamp == 0)) && (dbe.getUnixtime() < priorTimestamp)) {
hMatchEvent = hSearchEvent;
- matchTimestamp = dbe.timestamp;
+ matchTimestamp = dbe.getUnixtime();
}
}
}
diff --git a/plugins/Variables/src/stdafx.cxx b/plugins/Variables/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/Variables/src/stdafx.cxx
+++ b/plugins/Variables/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/VoiceService/res/resource.rc b/plugins/VoiceService/res/resource.rc
index cd7836cb96..b0bb5c00c5 100644
--- a/plugins/VoiceService/res/resource.rc
+++ b/plugins/VoiceService/res/resource.rc
@@ -7,6 +7,7 @@
//
// Generated from the TEXTINCLUDE 2 resource.
//
+#define WINVER 0x0501
#include "winres.h"
/////////////////////////////////////////////////////////////////////////////
@@ -296,6 +297,7 @@ END
2 TEXTINCLUDE
BEGIN
+ "#define WINVER 0x0501\r\n"
"#include ""winres.h""\r\n"
"\0"
END
diff --git a/plugins/VoiceService/src/VoiceCall.cpp b/plugins/VoiceService/src/VoiceCall.cpp
index 69ac72df98..745401d440 100644
--- a/plugins/VoiceService/src/VoiceCall.cpp
+++ b/plugins/VoiceService/src/VoiceCall.cpp
@@ -214,6 +214,7 @@ void VoiceCall::SetState(int aState)
switch (state) {
case VOICE_STATE_TALKING:
m_calltimer.Start(1000);
+ Button_SetIcon_IcoLib(m_hwnd, IDC_ANSWERBTN, g_plugin.getIconHandle(IDI_ACTION_HOLD));
break;
case VOICE_STATE_RINGING:
incoming = true;
diff --git a/plugins/VoiceService/src/stdafx.cxx b/plugins/VoiceService/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/VoiceService/src/stdafx.cxx
+++ b/plugins/VoiceService/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/VoiceService/src/version.h b/plugins/VoiceService/src/version.h
index 7f173cbad6..43536c97e8 100644
--- a/plugins/VoiceService/src/version.h
+++ b/plugins/VoiceService/src/version.h
@@ -10,4 +10,4 @@
#define __DESCRIPTION "Provide services for protocols that support voice calls."
#define __AUTHOR "Ricardo Pescuma Domenecci"
#define __AUTHORWEB "https://miranda-ng.org/p/VoiceService"
-#define __COPYRIGHT "© 2007-2009 Ricardo Pescuma Domenecci, 2020-24 Miranda NG team"
+#define __COPYRIGHT "© 2007-2009 Ricardo Pescuma Domenecci, 2020-25 Miranda NG team"
diff --git a/plugins/Watrack_MPD/src/stdafx.cxx b/plugins/Watrack_MPD/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/Watrack_MPD/src/stdafx.cxx
+++ b/plugins/Watrack_MPD/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/WhenWasIt/src/dlg_handlers.cpp b/plugins/WhenWasIt/src/dlg_handlers.cpp
index 6990e1f4bd..89e8fe7929 100644
--- a/plugins/WhenWasIt/src/dlg_handlers.cpp
+++ b/plugins/WhenWasIt/src/dlg_handlers.cpp
@@ -2,7 +2,7 @@
WhenWasIt (birthday reminder) plugin for Miranda IM
Copyright © 2006 Cristian Libotean
-Copyright (C) 2014-24 Rozhuk Ivan
+Copyright (C) 2014-25 Rozhuk Ivan
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/WhenWasIt/src/stdafx.cxx b/plugins/WhenWasIt/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/WhenWasIt/src/stdafx.cxx
+++ b/plugins/WhenWasIt/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/WhoUsesMyFiles/src/options.cpp b/plugins/WhoUsesMyFiles/src/options.cpp
index 5e6015e418..5cad882725 100644
--- a/plugins/WhoUsesMyFiles/src/options.cpp
+++ b/plugins/WhoUsesMyFiles/src/options.cpp
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/WhoUsesMyFiles/src/stdafx.cxx b/plugins/WhoUsesMyFiles/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/WhoUsesMyFiles/src/stdafx.cxx
+++ b/plugins/WhoUsesMyFiles/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/WinterSpeak/src/stdafx.cxx b/plugins/WinterSpeak/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/WinterSpeak/src/stdafx.cxx
+++ b/plugins/WinterSpeak/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/XSoundNotify/src/stdafx.cxx b/plugins/XSoundNotify/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/XSoundNotify/src/stdafx.cxx
+++ b/plugins/XSoundNotify/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/YARelay/src/main.cpp b/plugins/YARelay/src/main.cpp
index 75ead98cc7..876f6a30a0 100644
--- a/plugins/YARelay/src/main.cpp
+++ b/plugins/YARelay/src/main.cpp
@@ -65,7 +65,7 @@ int ProtoAck(WPARAM,LPARAM lparam)
DBEVENTINFO dbei = {};
dbei.szModule = MODULENAME;
- dbei.timestamp = ltime;
+ dbei.iTimestamp = ltime;
dbei.flags = DBEF_SENT | DBEF_UTF;
dbei.eventType = EVENTTYPE_MESSAGE;
dbei.cbBlob = (uint32_t)mir_strlen(p->msgText) + 1;
@@ -118,7 +118,7 @@ static int MessageEventAdded(WPARAM hContact, LPARAM hDBEvent)
return 0;
// get time and date
- time_t tTime = dbei.timestamp;
+ time_t tTime = dbei.getUnixtime();
tm *tm_time = gmtime(&tTime);
// build a message
diff --git a/plugins/YARelay/src/stdafx.cxx b/plugins/YARelay/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/YARelay/src/stdafx.cxx
+++ b/plugins/YARelay/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/ZeroNotification/src/options.cpp b/plugins/ZeroNotification/src/options.cpp
index 77ce902464..087fd4ea2b 100644
--- a/plugins/ZeroNotification/src/options.cpp
+++ b/plugins/ZeroNotification/src/options.cpp
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/ZeroNotification/src/stdafx.cxx b/plugins/ZeroNotification/src/stdafx.cxx
index 87b7477097..72e87c2758 100644
--- a/plugins/ZeroNotification/src/stdafx.cxx
+++ b/plugins/ZeroNotification/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/ZeroSwitch/src/stdafx.cxx b/plugins/ZeroSwitch/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/ZeroSwitch/src/stdafx.cxx
+++ b/plugins/ZeroSwitch/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/helpers/commonheaders.h b/plugins/helpers/commonheaders.h
index b31bd8223c..05cb2daff8 100644
--- a/plugins/helpers/commonheaders.h
+++ b/plugins/helpers/commonheaders.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-03 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/wbOSD/src/stdafx.cxx b/plugins/wbOSD/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/wbOSD/src/stdafx.cxx
+++ b/plugins/wbOSD/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License