summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/AVS/main.cpp23
-rw-r--r--plugins/Alarms/options.cpp17
-rw-r--r--plugins/AssocMgr/assoclist.cpp6
-rw-r--r--plugins/AuthState/options.cpp11
-rw-r--r--plugins/AutoRun/main.c20
-rw-r--r--plugins/BASS_interface/Main.cpp8
-rw-r--r--plugins/BasicHistory/Options.cpp16
-rw-r--r--plugins/Bonsai/hooked_events.cpp7
-rw-r--r--plugins/Bonsai/services.cpp2
-rw-r--r--plugins/BossKeyPlus/Options.cpp10
-rw-r--r--plugins/BuddyExpectator/options.cpp17
-rw-r--r--plugins/CSList/cslist.cpp8
-rw-r--r--plugins/ChangeKeyboardLayout/hook_events.c14
-rw-r--r--plugins/ClientChangeNotify/OptDlg.cpp6
-rw-r--r--plugins/Clist/clistopts.c4
-rw-r--r--plugins/Clist/cluiopts.c4
-rw-r--r--plugins/Clist_modern/modern_clcopts.cpp77
-rw-r--r--plugins/Clist_modern/modern_clistopts.cpp64
-rw-r--r--plugins/Clist_modern/modern_skinopt.cpp14
-rw-r--r--plugins/Clist_modern/modern_toolbar.cpp23
-rw-r--r--plugins/Clist_mw/BkgrCfg.cpp8
-rw-r--r--plugins/Clist_mw/clcopts.cpp12
-rw-r--r--plugins/Clist_mw/clistopts.cpp2
-rw-r--r--plugins/Clist_mw/cluiopts.cpp14
-rw-r--r--plugins/Clist_nicer/SRC/clcitems.cpp12
-rw-r--r--plugins/Clist_nicer/SRC/clcopts.cpp2653
-rw-r--r--plugins/Clist_nicer/SRC/clcpaint.cpp2
-rw-r--r--plugins/Clist_nicer/SRC/config.cpp2
-rw-r--r--plugins/Clist_nicer/SRC/contact.cpp2
-rw-r--r--plugins/Clist_nicer/SRC/extBackg.cpp20
-rw-r--r--plugins/Clist_nicer/SRC/init.cpp6
-rw-r--r--plugins/Clist_nicer/SRC/statusbar.cpp4
-rw-r--r--plugins/Clist_nicer/SRC/statusfloater.cpp4
-rw-r--r--plugins/Clist_nicer/SRC/viewmodes.cpp28
-rw-r--r--plugins/Clist_nicer/coolsb/coolsblib.cpp8
-rw-r--r--plugins/Clist_nicer/coolsb/coolscroll.cpp10
-rw-r--r--plugins/Console/Console.c7
-rw-r--r--plugins/CountryFlags/extraimg.c29
-rw-r--r--plugins/Db_autobackups/options.c20
-rw-r--r--plugins/Dbx_mmap_SA/dialogs.c20
-rw-r--r--plugins/ExtraIcons/options.cpp8
-rw-r--r--plugins/FavContacts/src/main.cpp6
-rw-r--r--plugins/FingerPrintModPlus/src/fingerprint.cpp12
-rw-r--r--plugins/FloatingContacts/options.cpp32
-rw-r--r--plugins/Folders/hooked_events.cpp7
-rw-r--r--plugins/Gender/options.cpp10
-rw-r--r--plugins/HistoryLinkListPlus/linklist.c21
-rw-r--r--plugins/HistorySweeperLight/options.c8
-rw-r--r--plugins/IEView/Options.cpp60
-rw-r--r--plugins/IgnoreState/options.cpp11
-rw-r--r--plugins/KeyboardNotify/options.cpp17
-rw-r--r--plugins/LangMan/options.cpp11
-rw-r--r--plugins/ListeningTo/options.cpp21
-rw-r--r--plugins/MenuItemEx/options.c19
-rw-r--r--plugins/MetaContacts/meta_services.c42
-rw-r--r--plugins/NewAwaySysMod/AwayOpt.cpp21
-rw-r--r--plugins/NewAwaySysMod/Common.h4
-rw-r--r--plugins/NewXstatusNotify/options.cpp31
-rw-r--r--plugins/Nudge/options.cpp27
-rw-r--r--plugins/PackUpdater/Src/Options.cpp18
-rw-r--r--plugins/Popup/src/main.cpp84
-rw-r--r--plugins/QuickMessages/options.c23
-rw-r--r--plugins/QuickReplies/options.cpp11
-rw-r--r--plugins/Rate/options.cpp9
-rw-r--r--plugins/RecentContacts/options.cpp5
-rw-r--r--plugins/SRMM/msgoptions.c1
-rw-r--r--plugins/Scriver/chat/options.c12
-rw-r--r--plugins/SecureIM/options.cpp6
-rw-r--r--plugins/SecureIM/popupOptions.cpp5
-rw-r--r--plugins/SeenPlugin/options.c43
-rw-r--r--plugins/Sessions/Src/Options.cpp19
-rw-r--r--plugins/SimpleAR/Src/Options.cpp23
-rw-r--r--plugins/SimpleStatusMsg/options.cpp18
-rw-r--r--plugins/SmileyAdd/options.cpp7
-rw-r--r--plugins/SpellChecker/options.cpp31
-rw-r--r--plugins/SplashScreen/src/options.cpp11
-rw-r--r--plugins/StatusPlugins/KeepStatus/options.cpp6
-rw-r--r--plugins/StopSpamPlus/src/events.cpp18
-rw-r--r--plugins/Svc_dbepp/options.cpp18
-rw-r--r--plugins/Svc_vi/hooked_events.cpp19
-rw-r--r--plugins/TabSRMM/src/msgoptions.cpp89
-rw-r--r--plugins/TabSRMM/src/typingnotify.cpp6
-rw-r--r--plugins/TipperYM/options.cpp66
-rw-r--r--plugins/TooltipNotify/src/TooltipNotify.cpp10
-rw-r--r--plugins/Updater/options.cpp19
-rw-r--r--plugins/UserInfoEx/dlg_propsheet.cpp2
-rw-r--r--plugins/UserInfoEx/psp_options.cpp7
-rw-r--r--plugins/Variables/options.cpp2
-rw-r--r--plugins/WhenWasIt/hooked_events.cpp6
-rw-r--r--plugins/YAPP/options.cpp24
-rw-r--r--plugins/ZeroNotification/main.c8
-rw-r--r--protocols/AimOscar/ui.cpp2
-rw-r--r--protocols/FacebookRM/proto.cpp6
-rw-r--r--protocols/GTalkExt/notifications.cpp6
-rw-r--r--protocols/GTalkExt/options.cpp6
-rw-r--r--protocols/GTalkExt/options.h6
-rw-r--r--protocols/Gadu-Gadu/dialogs.c1
-rw-r--r--protocols/IcqOscarJ/icq_opts.cpp12
-rw-r--r--protocols/JabberG/jabber_opt.cpp1
-rw-r--r--protocols/MRA/MraPopUp.cpp7
-rw-r--r--protocols/MRA/Mra_options.cpp63
-rw-r--r--protocols/MSN/msn_opts.cpp6
-rw-r--r--protocols/NewsAggregator/Src/Options.cpp20
-rw-r--r--protocols/Omegle/proto.cpp2
-rw-r--r--protocols/Quotes/Forex.cpp13
-rw-r--r--protocols/Quotes/QuoteInfoDlg.cpp4
-rw-r--r--protocols/Twitter/proto.cpp8
-rw-r--r--protocols/Weather/weather_opt.cpp6
-rw-r--r--protocols/Yahoo/options.cpp2
-rw-r--r--src/modules/contacts/contacts.cpp22
-rw-r--r--src/modules/icolib/skin2icons.cpp1
-rw-r--r--src/modules/netlib/netlibopts.cpp6
-rw-r--r--src/modules/options/filter.cpp9
-rw-r--r--src/modules/skin/hotkeys.cpp6
-rw-r--r--src/modules/srfile/fileopts.cpp2
-rw-r--r--src/modules/updatenotify/updatenotify.cpp7
116 files changed, 2072 insertions, 2360 deletions
diff --git a/plugins/AVS/main.cpp b/plugins/AVS/main.cpp
index 5137944b00..137ecf6b8d 100644
--- a/plugins/AVS/main.cpp
+++ b/plugins/AVS/main.cpp
@@ -2167,27 +2167,24 @@ static int ContactDeleted(WPARAM wParam, LPARAM lParam)
static int OptInit(WPARAM wParam, LPARAM lParam)
{
- OPTIONSDIALOGPAGE odp;
-
- ZeroMemory(&odp, sizeof(odp));
+ OPTIONSDIALOGPAGE odp = { 0 };
odp.cbSize = sizeof(odp);
- odp.position = 0;
odp.hInstance = g_hInst;
- odp.flags = ODPF_BOLDGROUPS | ODPF_EXPERTONLY | ODPF_TCHAR;
- odp.ptszGroup = LPGENT("Customize");
- odp.ptszTitle = LPGENT("Avatars");
+ odp.flags = ODPF_BOLDGROUPS | ODPF_EXPERTONLY;
+ odp.pszGroup = LPGEN("Customize");
+ odp.pszTitle = LPGEN("Avatars");
- odp.ptszTab = LPGENT("Protocols");
+ odp.pszTab = LPGEN("Protocols");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS_PICTS);
odp.pfnDlgProc = DlgProcOptionsProtos;
Options_AddPage(wParam, &odp);
- odp.ptszTab = LPGENT("Contact Avatars");
+ odp.pszTab = LPGEN("Contact Avatars");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS_AVATARS);
odp.pfnDlgProc = DlgProcOptionsAvatars;
Options_AddPage(wParam, &odp);
- odp.ptszTab = LPGENT("Own Avatars");
+ odp.pszTab = LPGEN("Own Avatars");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS_OWN);
odp.pfnDlgProc = DlgProcOptionsOwn;
Options_AddPage(wParam, &odp);
@@ -2377,12 +2374,11 @@ static int OnDetailsInit(WPARAM wParam, LPARAM lParam)
// User dialog
OPTIONSDIALOGPAGE odp = {0};
odp.cbSize = sizeof(odp);
- odp.flags = ODPF_TCHAR;
odp.hIcon = g_hIcon;
odp.hInstance = g_hInst;
odp.pfnDlgProc = DlgProcAvatarProtoInfo;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_PROTO_AVATARS);
- odp.ptszTitle = LPGENT("Avatar");
+ odp.pszTitle = LPGEN("Avatar");
UserInfo_AddPage(wParam, &odp);
}
else
@@ -2393,13 +2389,12 @@ static int OnDetailsInit(WPARAM wParam, LPARAM lParam)
// Contact dialog
OPTIONSDIALOGPAGE odp = {0};
odp.cbSize = sizeof(odp);
- odp.flags = ODPF_TCHAR;
odp.hIcon = g_hIcon;
odp.hInstance = g_hInst;
odp.pfnDlgProc = DlgProcAvatarUserInfo;
odp.position = -2000000000;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_USER_AVATAR);
- odp.ptszTitle = LPGENT("Avatar");
+ odp.pszTitle = LPGEN("Avatar");
UserInfo_AddPage(wParam, &odp);
}
}
diff --git a/plugins/Alarms/options.cpp b/plugins/Alarms/options.cpp
index 8d88a7004d..685beea35b 100644
--- a/plugins/Alarms/options.cpp
+++ b/plugins/Alarms/options.cpp
@@ -1147,15 +1147,14 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
int OptInit(WPARAM wParam,LPARAM lParam)
{
OPTIONSDIALOGPAGE odp = { 0 };
- odp.cbSize = sizeof(odp);
- odp.position = -790000000;
- odp.hInstance = hInst;
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT1);
- odp.pszTitle = Translate("Alarms");
- odp.pszGroup = Translate("Events");
- odp.flags = ODPF_BOLDGROUPS;
- odp.nIDBottomSimpleControl = 0;
- odp.pfnDlgProc = DlgProcOpts;
+ odp.cbSize = sizeof(odp);
+ odp.position = -790000000;
+ odp.hInstance = hInst;
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT1);
+ odp.pszTitle = LPGEN("Alarms");
+ odp.pszGroup = LPGEN("Events");
+ odp.flags = ODPF_BOLDGROUPS;
+ odp.pfnDlgProc = DlgProcOpts;
Options_AddPage(wParam, &odp);
return 0;
diff --git a/plugins/AssocMgr/assoclist.cpp b/plugins/AssocMgr/assoclist.cpp
index 761aa9f05d..4ccb5645fe 100644
--- a/plugins/AssocMgr/assoclist.cpp
+++ b/plugins/AssocMgr/assoclist.cpp
@@ -976,9 +976,9 @@ static int AssocListOptInit(WPARAM wParam, LPARAM lParam)
odp.hInstance = hInst;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_ASSOCLIST);
odp.position = 900000100; /* network opts = 900000000 */
- odp.ptszGroup = _T("Services"); /* autotranslated */
- odp.ptszTitle = _T("Associations"); /* autotranslated */
- odp.flags = ODPF_BOLDGROUPS|ODPF_EXPERTONLY|ODPF_TCHAR;
+ odp.pszGroup = LPGEN("Services"); /* autotranslated */
+ odp.pszTitle = LPGEN("Associations"); /* autotranslated */
+ odp.flags = ODPF_BOLDGROUPS | ODPF_EXPERTONLY;
odp.pfnDlgProc = AssocListOptDlgProc;
Options_AddPage(wParam, &odp);
return 0;
diff --git a/plugins/AuthState/options.cpp b/plugins/AuthState/options.cpp
index cc3e2d8934..d2248d9e44 100644
--- a/plugins/AuthState/options.cpp
+++ b/plugins/AuthState/options.cpp
@@ -137,17 +137,14 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
int onOptInitialise(WPARAM wParam, LPARAM lParam)
{
- OPTIONSDIALOGPAGE odp;
-
- ZeroMemory(&odp, sizeof(odp));
+ OPTIONSDIALOGPAGE odp = { 0 };
odp.cbSize = sizeof(odp);
- odp.position = 0;
odp.hInstance = g_hInst;
- odp.ptszGroup = _T("Contact List");
+ odp.pszGroup = LPGEN("Contact List");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_AUTHSTATE_OPT);
- odp.ptszTitle = _T("Auth State");
+ odp.pszTitle = LPGEN("Auth State");
odp.pfnDlgProc = DlgProcOptions;
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS;
Options_AddPage(wParam, &odp);
return 0;
diff --git a/plugins/AutoRun/main.c b/plugins/AutoRun/main.c
index 696027f1d8..bf424c205e 100644
--- a/plugins/AutoRun/main.c
+++ b/plugins/AutoRun/main.c
@@ -129,16 +129,16 @@ static INT_PTR CALLBACK DlgProcAutorunOpts(HWND hwndDlg, UINT msg, WPARAM wParam
static int AutorunOptInitialise(WPARAM wParam,LPARAM lParam)
{
- OPTIONSDIALOGPAGE odp;
- odp.cbSize=sizeof(odp);
- odp.position=100100000;
- odp.hInstance=hInst;
- odp.pszTemplate=MAKEINTRESOURCE(IDD_OPT_AUTORUN);
- odp.pszTitle=Translate(ModuleName);
- odp.pszGroup=Translate("Plugins");
- odp.pfnDlgProc=DlgProcAutorunOpts;
- odp.flags=ODPF_BOLDGROUPS;
- Options_AddPage(wParam,&odp);
+ OPTIONSDIALOGPAGE odp = { 0 };
+ odp.cbSize = sizeof(odp);
+ odp.position = 100100000;
+ odp.hInstance = hInst;
+ odp.pszTemplate = MAKEINTRESOURCE(IDD_OPT_AUTORUN);
+ odp.pszTitle = ModuleName;
+ odp.pszGroup = LPGEN("Plugins");
+ odp.pfnDlgProc = DlgProcAutorunOpts;
+ odp.flags = ODPF_BOLDGROUPS;
+ Options_AddPage(wParam, &odp);
return 0;
}
//==========================================================================
diff --git a/plugins/BASS_interface/Main.cpp b/plugins/BASS_interface/Main.cpp
index 2c45df6ab3..f843a4d3ad 100644
--- a/plugins/BASS_interface/Main.cpp
+++ b/plugins/BASS_interface/Main.cpp
@@ -340,15 +340,13 @@ void InitIcons(void)
int OptionsInit(WPARAM wParam, LPARAM lParam)
{
OPTIONSDIALOGPAGE odp = {0};
-
odp.cbSize = sizeof(odp);
- odp.position = 0;
odp.hInstance = hInst;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS);
- odp.ptszTitle = _T(ModuleName);
+ odp.pszTitle = LPGEN(ModuleName);
odp.pfnDlgProc = OptionsProc;
- odp.ptszGroup = _T("Customize");
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.pszGroup = LPGEN("Customize");
+ odp.flags = ODPF_BOLDGROUPS;
Options_AddPage(wParam, &odp);
return 0;
diff --git a/plugins/BasicHistory/Options.cpp b/plugins/BasicHistory/Options.cpp
index bcc4f424ad..5f7b7f4997 100644
--- a/plugins/BasicHistory/Options.cpp
+++ b/plugins/BasicHistory/Options.cpp
@@ -124,35 +124,35 @@ int Options::InitOptions(WPARAM wParam, LPARAM lParam)
odp.cbSize = sizeof(odp);
odp.position = 100000000;
odp.hInstance = hInst;
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
- odp.ptszTitle = LPGENT("History");
+ odp.flags = ODPF_BOLDGROUPS;
+ odp.pszTitle = LPGEN("History");
- odp.ptszTab = LPGENT("Group list");
+ odp.pszTab = LPGEN("Group list");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_GROUPLIST);
odp.pfnDlgProc = Options::DlgProcOptsGroupList;
Options_AddPage(wParam, &odp);
- odp.ptszTab = LPGENT("Messages");
+ odp.pszTab = LPGEN("Messages");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_MESSAGES);
odp.pfnDlgProc = Options::DlgProcOptsMessages;
Options_AddPage(wParam, &odp);
- odp.ptszTab = LPGENT("Searching");
+ odp.pszTab = LPGEN("Searching");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_SEARCHING);
odp.pfnDlgProc = Options::DlgProcOptsSearching;
Options_AddPage(wParam, &odp);
- odp.ptszTab = LPGENT("Export");
+ odp.pszTab = LPGEN("Export");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_EXPORT);
odp.pfnDlgProc = Options::DlgProcOptsExport;
Options_AddPage(wParam, &odp);
- odp.ptszTab = LPGENT("Scheduler");
+ odp.pszTab = LPGEN("Scheduler");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_SCHEDULER);
odp.pfnDlgProc = Options::DlgProcOptsScheduler;
Options_AddPage(wParam, &odp);
- odp.ptszTab = LPGENT("Advanced");
+ odp.pszTab = LPGEN("Advanced");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_MAIN);
odp.pfnDlgProc = Options::DlgProcOptsMain;
Options_AddPage(wParam, &odp);
diff --git a/plugins/Bonsai/hooked_events.cpp b/plugins/Bonsai/hooked_events.cpp
index 2c32516c83..a104946229 100644
--- a/plugins/Bonsai/hooked_events.cpp
+++ b/plugins/Bonsai/hooked_events.cpp
@@ -76,15 +76,14 @@ int OnModulesLoaded(WPARAM wParam, LPARAM lParam)
int OnOptionsInitialise(WPARAM wParam, LPARAM lParam)
{
OPTIONSDIALOGPAGE odp = {0};
-
odp.cbSize = sizeof(odp);
odp.position = 100000000;
odp.hInstance = hInstance;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_FIXOPTIONS);
- odp.ptszTitle = TranslateT("Arrange Options");
- odp.ptszGroup = TranslateT("Services");
+ odp.pszTitle = LPGEN(("Arrange Options");
+ odp.pszGroup = LPGEN(("Services");
odp.groupPosition = 810000000;
- odp.flags=ODPF_BOLDGROUPS;
+ odp.flags = ODPF_BOLDGROUPS;
odp.pfnDlgProc = DlgProcOptions;
Options_AddPage(wParam, &odp);
diff --git a/plugins/Bonsai/services.cpp b/plugins/Bonsai/services.cpp
index 64d7f92c72..b555d2d7d1 100644
--- a/plugins/Bonsai/services.cpp
+++ b/plugins/Bonsai/services.cpp
@@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
static CRITICAL_SECTION csServices;
-static DWORD OPTIONS_ADDPAGE_HASH = NameHashFunction(MS_OPT_ADDPAGE);
+static DWORD OPTIONS_ADDPAGE_HASH = NameHashFunction("Opt/AddPage");
CALLSERVICEFUNCTION realCallServiceFunction = NULL;
diff --git a/plugins/BossKeyPlus/Options.cpp b/plugins/BossKeyPlus/Options.cpp
index 7d5b103450..7e375c7ae8 100644
--- a/plugins/BossKeyPlus/Options.cpp
+++ b/plugins/BossKeyPlus/Options.cpp
@@ -400,17 +400,17 @@ int OptsDlgInit(WPARAM wParam,LPARAM lParam)
optDi.pfnDlgProc = MainOptDlg;
optDi.pszTemplate = MAKEINTRESOURCEA(IDD_OPTDIALOGMAIN);
optDi.hInstance = g_hInstance;
- optDi.ptszTitle = _T("BossKey");
- optDi.ptszGroup = _T("Events");
- optDi.ptszTab = _T("Main");
- optDi.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ optDi.pszTitle = LPGEN("BossKey");
+ optDi.pszGroup = LPGEN("Events");
+ optDi.pszTab = LPGEN("Main");
+ optDi.flags = ODPF_BOLDGROUPS;
Options_AddPage(wParam, &optDi);
optDi.flags |= ODPF_EXPERTONLY;
optDi.pfnDlgProc = AdvOptDlg;
optDi.pszTemplate = MAKEINTRESOURCEA(IDD_OPTDIALOGADV);
- optDi.ptszTab = _T("Advanced");
+ optDi.pszTab = LPGEN("Advanced");
Options_AddPage(wParam, &optDi);
return(0);
diff --git a/plugins/BuddyExpectator/options.cpp b/plugins/BuddyExpectator/options.cpp
index fa0af1b535..2771c1aa15 100644
--- a/plugins/BuddyExpectator/options.cpp
+++ b/plugins/BuddyExpectator/options.cpp
@@ -493,20 +493,19 @@ static int OptionsInit(WPARAM wParam, LPARAM lParam)
ZeroMemory(&odp, sizeof(odp));
odp.cbSize = sizeof(odp);
odp.hInstance = hInst;
- odp.pszGroup = Translate("Plugins");
+ odp.pszGroup = LPGEN("Plugins");
odp.pszTemplate = MAKEINTRESOURCE(IDD_OPTIONSPANEL);
- odp.pszTitle = Translate("Buddy Expectator");
+ odp.pszTitle = LPGEN("Buddy Expectator");
odp.pfnDlgProc = OptionsFrameProc;
odp.flags = ODPF_BOLDGROUPS;
Options_AddPage(wParam, &odp);
- if (ServiceExists(MS_POPUP_ADDPOPUP))
- {
- odp.pszGroup = Translate("PopUps");
- odp.pszTemplate = MAKEINTRESOURCE(IDD_POPUPPANEL);
- odp.pfnDlgProc = PopUpOptionsFrameProc;
- Options_AddPage(wParam, &odp);
- }
+ if (ServiceExists(MS_POPUP_ADDPOPUP)) {
+ odp.pszGroup = LPGEN("PopUps");
+ odp.pszTemplate = MAKEINTRESOURCE(IDD_POPUPPANEL);
+ odp.pfnDlgProc = PopUpOptionsFrameProc;
+ Options_AddPage(wParam, &odp);
+ }
return 0;
}
diff --git a/plugins/CSList/cslist.cpp b/plugins/CSList/cslist.cpp
index c842881603..98d7c9e31f 100644
--- a/plugins/CSList/cslist.cpp
+++ b/plugins/CSList/cslist.cpp
@@ -196,10 +196,10 @@ int CSList::initOptions( WPARAM wparam, LPARAM lparam )
odp.position = 955000000;
odp.hInstance = CSList::handle;
odp.pszTemplate = MAKEINTRESOURCEA( IDD_OPTIONS );
- odp.ptszTitle = _T( MODULENAME );
- odp.pfnDlgProc = ( DLGPROC )CSOptionsProc;
- odp.ptszGroup = _T("Status");
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.pszTitle = MODULENAME;
+ odp.pfnDlgProc = CSOptionsProc;
+ odp.pszGroup = LPGEN("Status");
+ odp.flags = ODPF_BOLDGROUPS;
Options_AddPage(wparam, &odp);
return FALSE;
}
diff --git a/plugins/ChangeKeyboardLayout/hook_events.c b/plugins/ChangeKeyboardLayout/hook_events.c
index b3e97159f0..de8f764fe5 100644
--- a/plugins/ChangeKeyboardLayout/hook_events.c
+++ b/plugins/ChangeKeyboardLayout/hook_events.c
@@ -211,21 +211,15 @@ int OnOptionsInitialise(WPARAM wParam, LPARAM lParam)
odp.cbSize = sizeof(odp);
odp.hInstance = hInst;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_MAIN_OPTION_FORM);
- odp.pszTitle = Translate(ModuleName);
- odp.pszGroup = Translate("Plugins");
+ odp.pszTitle = ModuleName;
+ odp.pszGroup = LPGEN("Plugins");
odp.flags = ODPF_BOLDGROUPS;
odp.pfnDlgProc = DlgMainProcOptions;
Options_AddPage(wParam, &odp);
- if (ServiceExists(MS_POPUP_ADDPOPUP))
- {
- ZeroMemory(&odp, sizeof(odp));
- odp.cbSize = sizeof(odp);
- odp.hInstance = hInst;
+ if (ServiceExists(MS_POPUP_ADDPOPUP)) {
odp.pszTemplate = MAKEINTRESOURCEA(IDD_POPUP_OPTION_FORM);
- odp.pszTitle = Translate(ModuleName);
- odp.pszGroup = Translate("PopUps");
- odp.flags = ODPF_BOLDGROUPS;
+ odp.pszGroup = LPGEN("PopUps");
odp.pfnDlgProc = DlgPopupsProcOptions;
Options_AddPage(wParam, &odp);
}
diff --git a/plugins/ClientChangeNotify/OptDlg.cpp b/plugins/ClientChangeNotify/OptDlg.cpp
index 164e51e795..8ad9f73946 100644
--- a/plugins/ClientChangeNotify/OptDlg.cpp
+++ b/plugins/ClientChangeNotify/OptDlg.cpp
@@ -177,12 +177,12 @@ int OptionsDlgInit(WPARAM wParam, LPARAM lParam)
OPTIONSDIALOGPAGE optDi = {0};
optDi.cbSize = sizeof(optDi);
optDi.position = 920000000;
- optDi.ptszTitle = LPGENT("ClientChangeNotify");
+ optDi.pszTitle = LPGEN("ClientChangeNotify");
optDi.pfnDlgProc = PopupOptDlg;
optDi.pszTemplate = MAKEINTRESOURCEA(IDD_POPUPOPTDLG);
optDi.hInstance = g_hInstance;
- optDi.ptszGroup = LPGENT("PopUps");
- optDi.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ optDi.pszGroup = LPGEN("PopUps");
+ optDi.flags = ODPF_BOLDGROUPS;
Options_AddPage(wParam, &optDi);
return 0;
}
diff --git a/plugins/Clist/clistopts.c b/plugins/Clist/clistopts.c
index 33e880e3fc..9a787df82b 100644
--- a/plugins/Clist/clistopts.c
+++ b/plugins/Clist/clistopts.c
@@ -236,9 +236,7 @@ static UINT expertOnlyControls[] = { IDC_ALWAYSSTATUS };
int CListOptInit(WPARAM wParam, LPARAM lParam)
{
- OPTIONSDIALOGPAGE odp;
-
- ZeroMemory(&odp, sizeof(odp));
+ OPTIONSDIALOGPAGE odp = { 0 };
odp.cbSize = sizeof(odp);
odp.position = -1000000000;
odp.hInstance = g_hInst;
diff --git a/plugins/Clist/cluiopts.c b/plugins/Clist/cluiopts.c
index 2094716a07..e0b7bdbdee 100644
--- a/plugins/Clist/cluiopts.c
+++ b/plugins/Clist/cluiopts.c
@@ -337,9 +337,7 @@ static UINT expertOnlyControls[] =
int CluiOptInit(WPARAM wParam, LPARAM lParam)
{
- OPTIONSDIALOGPAGE odp;
-
- ZeroMemory(&odp, sizeof(odp));
+ OPTIONSDIALOGPAGE odp = { 0 };
odp.cbSize = sizeof(odp);
odp.position = 0;
odp.hInstance = g_hInst;
diff --git a/plugins/Clist_modern/modern_clcopts.cpp b/plugins/Clist_modern/modern_clcopts.cpp
index 1fcf7dbb0b..ee97d8c1cf 100644
--- a/plugins/Clist_modern/modern_clcopts.cpp
+++ b/plugins/Clist_modern/modern_clcopts.cpp
@@ -252,63 +252,56 @@ INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
static UINT StatusBarExpertControls[]={IDC_STATUSBAR_PER_PROTO, IDC_STATUSBAR_PROTO_LIST, IDC_SBAR_USE_ACCOUNT_SETTINGS, IDC_SBAR_HIDE_ACCOUNT_COMPLETELY};
-static struct TabItemOptionConf
+struct
{
- TCHAR *name; // Tab name
+ char *name; // Tab name
int id; // Dialog id
DLGPROC wnd_proc; // Dialog function
UINT* expertControls; // Expert Controls
int nExpertControls;
DWORD flag; // Expertonly
-} clist_opt_items[] =
+}
+static clist_opt_items[] =
{
- { LPGENT("General"), IDD_OPT_CLIST, DlgProcClistOpts, NULL, 0, 0},
- { LPGENT("Tray"), IDD_OPT_TRAY, DlgProcTrayOpts, NULL, 0, 0 },
- { LPGENT("List"), IDD_OPT_CLC, DlgProcClistListOpts, NULL, 0, 0 },
- { LPGENT("Window"), IDD_OPT_CLUI, DlgProcClistWindowOpts, NULL, 0, 0 },
- { LPGENT("Behaviour"), IDD_OPT_CLUI_2, DlgProcClistBehaviourOpts, NULL, 0, 0 },
- { LPGENT("Status Bar"), IDD_OPT_SBAR, DlgProcSBarOpts, StatusBarExpertControls, SIZEOF(StatusBarExpertControls), 0},
- { LPGENT("Additional stuff"), IDD_OPT_META_CLC, DlgProcClistAdditionalOpts, NULL, 0, 0 },
- { 0 }
+ { LPGEN("General"), IDD_OPT_CLIST, DlgProcClistOpts, NULL, 0, 0},
+ { LPGEN("Tray"), IDD_OPT_TRAY, DlgProcTrayOpts, NULL, 0, 0 },
+ { LPGEN("List"), IDD_OPT_CLC, DlgProcClistListOpts, NULL, 0, 0 },
+ { LPGEN("Window"), IDD_OPT_CLUI, DlgProcClistWindowOpts, NULL, 0, 0 },
+ { LPGEN("Behaviour"), IDD_OPT_CLUI_2, DlgProcClistBehaviourOpts, NULL, 0, 0 },
+ { LPGEN("Status Bar"), IDD_OPT_SBAR, DlgProcSBarOpts, StatusBarExpertControls, SIZEOF(StatusBarExpertControls), 0},
+ { LPGEN("Additional stuff"), IDD_OPT_META_CLC, DlgProcClistAdditionalOpts, NULL, 0, 0 }
};
-
int ClcOptInit(WPARAM wParam,LPARAM lParam)
{
- OPTIONSDIALOGPAGE odp;
- if (MirandaExiting()) return 0;
- ZeroMemory(&odp,sizeof(odp));
- odp.cbSize=sizeof(odp);
- odp.position=0;
- odp.hInstance=g_hInst;
- //odp.ptszGroup=TranslateT("Contact List");
- odp.pszTemplate=MAKEINTRESOURCEA(IDD_OPT_CLC);
- odp.ptszTitle=LPGENT("Contact List");
- odp.pfnDlgProc=DlgProcClistListOpts;
- odp.flags=ODPF_BOLDGROUPS|ODPF_TCHAR;
- //Options_AddPage(wParam,&odp);
- {
- int i;
- for (i=0; clist_opt_items[i].id!=0; i++)
- {
- odp.pszTemplate=MAKEINTRESOURCEA(clist_opt_items[i].id);
- odp.ptszTab=clist_opt_items[i].name;
- odp.pfnDlgProc=clist_opt_items[i].wnd_proc;
- odp.flags=ODPF_BOLDGROUPS|ODPF_TCHAR|clist_opt_items[i].flag;
- odp.expertOnlyControls = clist_opt_items[i].expertControls;
- odp.nExpertOnlyControls = clist_opt_items[i].nExpertControls;
- Options_AddPage(wParam,&odp);
- }
+ if (MirandaExiting())
+ return 0;
+
+ OPTIONSDIALOGPAGE odp = { 0 };
+ odp.cbSize = sizeof(odp);
+ odp.hInstance = g_hInst;
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_CLC);
+ odp.pszTitle = LPGEN("Contact List");
+ odp.pfnDlgProc = DlgProcClistListOpts;
+ odp.flags = ODPF_BOLDGROUPS;
+
+ for (int i=0; i < SIZEOF(clist_opt_items); i++) {
+ odp.pszTemplate = MAKEINTRESOURCEA(clist_opt_items[i].id);
+ odp.pszTab = clist_opt_items[i].name;
+ odp.pfnDlgProc = clist_opt_items[i].wnd_proc;
+ odp.flags = ODPF_BOLDGROUPS | clist_opt_items[i].flag;
+ odp.expertOnlyControls = clist_opt_items[i].expertControls;
+ odp.nExpertOnlyControls = clist_opt_items[i].nExpertControls;
+ Options_AddPage(wParam, &odp);
}
- if (g_CluiData.fDisableSkinEngine)
- {
+ if (g_CluiData.fDisableSkinEngine) {
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_CLIST_LISTBKG);
- odp.ptszGroup = LPGENT("Skins");
- odp.ptszTitle = LPGENT("Contact List");
- odp.ptszTab = LPGENT("List Background");
+ odp.pszGroup = LPGEN("Skins");
+ odp.pszTitle = LPGEN("Contact List");
+ odp.pszTab = LPGEN("List Background");
odp.pfnDlgProc = DlgProcClcBkgOpts;
- odp.flags = ODPF_BOLDGROUPS|ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS;
Options_AddPage(wParam, &odp);
}
diff --git a/plugins/Clist_modern/modern_clistopts.cpp b/plugins/Clist_modern/modern_clistopts.cpp
index 73c7c8c7e7..e16323619c 100644
--- a/plugins/Clist_modern/modern_clistopts.cpp
+++ b/plugins/Clist_modern/modern_clistopts.cpp
@@ -37,55 +37,48 @@ static INT_PTR CALLBACK DlgProcItemSecondLineOpts(HWND hwndDlg, UINT msg, WPARAM
static INT_PTR CALLBACK DlgProcItemThirdLineOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
static UINT expertOnlyControls[]={IDC_ALWAYSSTATUS};
-static struct _RowItemOptionConf
+struct
{
- TCHAR *name; // Tab name
+ char *name; // Tab name
int id; // Dialog id
DLGPROC wnd_proc; // Dialog function
-} row_opt_items[] = {
- { _T("Row"), IDD_OPT_ITEM_ROW, DlgProcItemRowOpts },
+}
+static row_opt_items[] =
+{
+ { LPGEN("Row"), IDD_OPT_ITEM_ROW, DlgProcItemRowOpts },
#ifdef _DEBUG
- { _T("Row design"), IDD_OPT_ROWTMPL, DlgTmplEditorOpts },
+ { LPGEN("Row design"), IDD_OPT_ROWTMPL, DlgTmplEditorOpts },
#endif
- { LPGENT("Avatar"), IDD_OPT_ITEM_AVATAR, DlgProcItemAvatarOpts },
- { LPGENT("Icon"), IDD_OPT_ITEM_ICON, DlgProcItemIconOpts },
- { LPGENT("Contact time"), IDD_OPT_ITEM_CONTACT_TIME, DlgProcItemContactTimeOpts },
- { LPGENT("Text"), IDD_OPT_ITEM_TEXT, DlgProcItemTextOpts },
- { LPGENT("Second Line"), IDD_OPT_ITEM_SECOND_LINE, DlgProcItemSecondLineOpts },
- { LPGENT("Third Line"), IDD_OPT_ITEM_THIRD_LINE, DlgProcItemThirdLineOpts },
- { LPGENT("Extra Icons"), IDD_OPT_ITEM_EXTRAICONS, DlgProcExtraIconsOpts},
- { 0 }
+ { LPGEN("Avatar"), IDD_OPT_ITEM_AVATAR, DlgProcItemAvatarOpts },
+ { LPGEN("Icon"), IDD_OPT_ITEM_ICON, DlgProcItemIconOpts },
+ { LPGEN("Contact time"), IDD_OPT_ITEM_CONTACT_TIME, DlgProcItemContactTimeOpts },
+ { LPGEN("Text"), IDD_OPT_ITEM_TEXT, DlgProcItemTextOpts },
+ { LPGEN("Second Line"), IDD_OPT_ITEM_SECOND_LINE, DlgProcItemSecondLineOpts },
+ { LPGEN("Third Line"), IDD_OPT_ITEM_THIRD_LINE, DlgProcItemThirdLineOpts },
+ { LPGEN("Extra Icons"), IDD_OPT_ITEM_EXTRAICONS, DlgProcExtraIconsOpts}
};
int CListOptInit(WPARAM wParam,LPARAM lParam)
{
-
- OPTIONSDIALOGPAGE odp;
-
- ZeroMemory(&odp,sizeof(odp));
- odp.cbSize=sizeof(odp);
- odp.position=-200000000;
- odp.hInstance=g_hInst;
- // odp.pfnDlgProc=DlgProcItemsOpts;
- odp.pszTemplate=MAKEINTRESOURCEA(IDD_OPT_ITEMS);
- odp.ptszGroup=LPGENT("Contact List");
- odp.ptszTitle=LPGENT("Row items");
- odp.flags=ODPF_BOLDGROUPS|ODPF_TCHAR;
- // Options_AddPage(wParam,&odp);
-
+ OPTIONSDIALOGPAGE odp = { 0 };
+ odp.cbSize = sizeof(odp);
+ odp.position = -200000000;
+ odp.hInstance = g_hInst;
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_ITEMS);
+ odp.pszGroup = LPGEN("Contact List");
+ odp.pszTitle = LPGEN("Row items");
+ odp.flags = ODPF_BOLDGROUPS;
{
BOOL hasExtraIconsService = ServiceExists("ExtraIcon/Register");
- int i;
- for (i=0; row_opt_items[i].id!=0; i++)
- {
+ for (int i=0; i < SIZEOF(row_opt_items); i++) {
if (hasExtraIconsService && row_opt_items[i].id == IDD_OPT_ITEM_EXTRAICONS)
continue;
- odp.pszTemplate=MAKEINTRESOURCEA(row_opt_items[i].id);
- odp.ptszTab=row_opt_items[i].name;
- odp.pfnDlgProc=row_opt_items[i].wnd_proc;
- Options_AddPage(wParam,&odp);
+ odp.pszTemplate = MAKEINTRESOURCEA(row_opt_items[i].id);
+ odp.pszTab = row_opt_items[i].name;
+ odp.pfnDlgProc = row_opt_items[i].wnd_proc;
+ Options_AddPage(wParam, &odp);
}
}
@@ -94,8 +87,7 @@ int CListOptInit(WPARAM wParam,LPARAM lParam)
static INT_PTR CALLBACK DlgProcItemRowOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- switch (msg)
- {
+ switch (msg) {
case WM_INITDIALOG:
{
int i;
diff --git a/plugins/Clist_modern/modern_skinopt.cpp b/plugins/Clist_modern/modern_skinopt.cpp
index 021691db9f..6a2296b287 100644
--- a/plugins/Clist_modern/modern_skinopt.cpp
+++ b/plugins/Clist_modern/modern_skinopt.cpp
@@ -61,23 +61,23 @@ int SkinOptInit( WPARAM wParam, LPARAM lParam )
odp.hInstance = g_hInst;
odp.pfnDlgProc = DlgSkinOpts;
odp.pszTemplate = MAKEINTRESOURCEA( IDD_OPT_SKIN );
- odp.ptszGroup = LPGENT( "Skins" );
- odp.ptszTitle = LPGENT( "Contact List" );
- odp.flags = ODPF_BOLDGROUPS|ODPF_TCHAR;
- odp.ptszTab = LPGENT( "Load/Save" );
+ odp.pszGroup = LPGEN( "Skins" );
+ odp.pszTitle = LPGEN( "Contact List" );
+ odp.flags = ODPF_BOLDGROUPS;
+ odp.pszTab = LPGEN( "Load/Save" );
Options_AddPage(wParam, &odp);
- if ( ModernGetSettingByte( NULL, "ModernData", "EnableSkinEditor", SETTING_ENABLESKINEDITOR_DEFAULT ) )
- {
+ if ( ModernGetSettingByte( NULL, "ModernData", "EnableSkinEditor", SETTING_ENABLESKINEDITOR_DEFAULT )) {
odp.flags |= ODPF_EXPERTONLY;
odp.pfnDlgProc = DlgSkinEditorOpts;
odp.pszTemplate = MAKEINTRESOURCEA( IDD_OPT_SKINEDITOR );
- odp.ptszTab = LPGENT( "Object Editor" );
+ odp.pszTab = LPGEN( "Object Editor" );
Options_AddPage(wParam, &odp);
}
}
return 0;
}
+
int ModernSkinOptInit( WPARAM wParam, LPARAM lParam )
{
MODERNOPTOBJECT obj = {0};
diff --git a/plugins/Clist_modern/modern_toolbar.cpp b/plugins/Clist_modern/modern_toolbar.cpp
index 0c3e9e868b..d39bbf4c48 100644
--- a/plugins/Clist_modern/modern_toolbar.cpp
+++ b/plugins/Clist_modern/modern_toolbar.cpp
@@ -286,19 +286,18 @@ static int ehhToolBarBackgroundSettingsChanged(WPARAM wParam, LPARAM lParam)
return 0;
}
-static int ehhToolbarOptInit(WPARAM wParam, LPARAM lParam)
+static int ehhToolbarOptInit(WPARAM wParam, LPARAM lParam)
{
- OPTIONSDIALOGPAGE odp;
- ZeroMemory(&odp,sizeof(odp));
- odp.cbSize=sizeof(odp);
- odp.position=0;
- odp.hInstance=g_hInst;
- odp.ptszGroup=LPGENT("Contact List");
- odp.pszTemplate=MAKEINTRESOURCEA(IDD_OPT_TOOLBAR);
- odp.ptszTitle=LPGENT("ToolBar");
- odp.pfnDlgProc=(DLGPROC)ToolBar_OptDlgProc;
- odp.flags=ODPF_BOLDGROUPS|ODPF_TCHAR;
- Options_AddPage(wParam,&odp);
+ OPTIONSDIALOGPAGE odp = { 0 };
+ odp.cbSize = sizeof(odp);
+ odp.position = 0;
+ odp.hInstance = g_hInst;
+ odp.pszGroup = LPGEN("Contact List");
+ odp.pszTitle = LPGEN("ToolBar");
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_TOOLBAR);
+ odp.pfnDlgProc = (DLGPROC)ToolBar_OptDlgProc;
+ odp.flags = ODPF_BOLDGROUPS;
+ Options_AddPage(wParam, &odp);
return 0;
}
static INT_PTR svcToolBarAddButton(WPARAM wParam, LPARAM lParam)
diff --git a/plugins/Clist_mw/BkgrCfg.cpp b/plugins/Clist_mw/BkgrCfg.cpp
index b08a833aca..8753b852d6 100644
--- a/plugins/Clist_mw/BkgrCfg.cpp
+++ b/plugins/Clist_mw/BkgrCfg.cpp
@@ -279,19 +279,15 @@ static INT_PTR BkgrCfg_Register(WPARAM wParam,LPARAM lParam)
int OnOptionsInit(WPARAM wParam,LPARAM lParam)
{
- OPTIONSDIALOGPAGE odp;
-
- ZeroMemory(&odp,sizeof(odp));
+ OPTIONSDIALOGPAGE odp = { 0 };
odp.cbSize = sizeof(odp);
- odp.position = 0;
odp.hInstance = g_hInst;
odp.pszGroup = LPGEN("Customize");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_CLCBKG2);
odp.pszTitle = LPGEN("Backgrounds");
odp.pfnDlgProc = DlgProcBkgOpts;
odp.flags = ODPF_BOLDGROUPS;
-
- Options_AddPage(wParam,&odp);
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/Clist_mw/clcopts.cpp b/plugins/Clist_mw/clcopts.cpp
index f7567594b1..43634f6fad 100644
--- a/plugins/Clist_mw/clcopts.cpp
+++ b/plugins/Clist_mw/clcopts.cpp
@@ -52,35 +52,33 @@ int ClcOptInit(WPARAM wParam,LPARAM lParam)
{
OPTIONSDIALOGPAGE odp = { 0 };
odp.cbSize = sizeof(odp);
- odp.position = 0;
odp.hInstance = g_hInst;
odp.pszGroup = LPGEN("Contact List");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_CLC);
odp.pszTitle = LPGEN("List");
odp.pfnDlgProc = DlgProcClcMainOpts;
odp.flags = ODPF_BOLDGROUPS|ODPF_EXPERTONLY;
- Options_AddPage(wParam,&odp);
+ Options_AddPage(wParam, &odp);
if (!ServiceExists(MS_BACKGROUNDCONFIG_REGISTER)) {
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_CLCBKG);
odp.pszTitle = LPGEN("List Background");
odp.pfnDlgProc = DlgProcClcBkgOpts;
odp.flags = ODPF_BOLDGROUPS;
- Options_AddPage(wParam,&odp);
+ Options_AddPage(wParam, &odp);
}
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_META_CLC);
odp.pszTitle = LPGEN("List MetaContacts");
odp.pfnDlgProc = DlgProcClcMetaOpts;
- Options_AddPage(wParam,&odp);
+ Options_AddPage(wParam, &odp);
- if (!ServiceExists(MS_BACKGROUNDCONFIG_REGISTER))
- {
+ if (!ServiceExists(MS_BACKGROUNDCONFIG_REGISTER)) {
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_CLCBKG);
odp.pszTitle = LPGEN("StatusBar Background");
odp.pfnDlgProc = DlgProcStatusBarBkgOpts;
odp.flags = ODPF_BOLDGROUPS;
- Options_AddPage(wParam,&odp);
+ Options_AddPage(wParam, &odp);
}
return 0;
diff --git a/plugins/Clist_mw/clistopts.cpp b/plugins/Clist_mw/clistopts.cpp
index 508a356d45..d2738d8aa6 100644
--- a/plugins/Clist_mw/clistopts.cpp
+++ b/plugins/Clist_mw/clistopts.cpp
@@ -48,7 +48,7 @@ int CListOptInit(WPARAM wParam,LPARAM lParam)
odp.nIDBottomSimpleControl = IDC_STCLISTGROUP;
odp.expertOnlyControls = expertOnlyControls;
odp.nExpertOnlyControls = sizeof(expertOnlyControls)/sizeof(expertOnlyControls[0]);
- Options_AddPage(wParam,&odp);
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/Clist_mw/cluiopts.cpp b/plugins/Clist_mw/cluiopts.cpp
index 27c7a1defe..8fd1c1651e 100644
--- a/plugins/Clist_mw/cluiopts.cpp
+++ b/plugins/Clist_mw/cluiopts.cpp
@@ -36,11 +36,8 @@ int OnStatusBarBackgroundChange();
static UINT expertOnlyControls[] = {IDC_BRINGTOFRONT, IDC_AUTOSIZE,IDC_STATIC21,IDC_MAXSIZEHEIGHT,IDC_MAXSIZESPIN,IDC_STATIC22,IDC_AUTOSIZEUPWARD,IDC_SHOWMAINMENU,IDC_SHOWCAPTION,IDC_CLIENTDRAG};
int CluiOptInit(WPARAM wParam,LPARAM lParam)
{
- OPTIONSDIALOGPAGE odp;
-
- ZeroMemory(&odp,sizeof(odp));
+ OPTIONSDIALOGPAGE odp = { 0 };
odp.cbSize = sizeof(odp);
- odp.position = 0;
odp.hInstance = g_hInst;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_CLUI);
odp.pszTitle = LPGEN("Window");
@@ -49,16 +46,17 @@ int CluiOptInit(WPARAM wParam,LPARAM lParam)
odp.flags = ODPF_BOLDGROUPS;
odp.nIDBottomSimpleControl = IDC_STWINDOWGROUP;
odp.expertOnlyControls = expertOnlyControls;
- odp.nExpertOnlyControls = sizeof(expertOnlyControls)/sizeof(expertOnlyControls[0]);
- Options_AddPage(wParam,&odp);
+ odp.nExpertOnlyControls = SIZEOF(expertOnlyControls);
+ Options_AddPage(wParam, &odp);
+
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_SBAR);
odp.pszTitle = LPGEN("Status Bar");
odp.pfnDlgProc = DlgProcSBarOpts;
- odp.flags = ODPF_BOLDGROUPS|ODPF_EXPERTONLY;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_EXPERTONLY;
odp.nIDBottomSimpleControl = 0;
odp.nExpertOnlyControls = 0;
odp.expertOnlyControls = NULL;
- Options_AddPage(wParam,&odp);
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/Clist_nicer/SRC/clcitems.cpp b/plugins/Clist_nicer/SRC/clcitems.cpp
index 009a57a36d..9e759946e9 100644
--- a/plugins/Clist_nicer/SRC/clcitems.cpp
+++ b/plugins/Clist_nicer/SRC/clcitems.cpp
@@ -328,7 +328,7 @@ BYTE GetCachedStatusMsg(int iExtraCacheEntry, char *szProto)
if(cEntry->bStatusMsgValid > STATUSMSG_XSTATUSNAME) {
int j = 0, i;
cEntry->statusMsg = (TCHAR *)realloc(cEntry->statusMsg, (lstrlen(dbv.ptszVal) + 2) * sizeof(TCHAR));
- for(i = 0; dbv.ptszVal[i]; i++) {
+ for (i = 0; dbv.ptszVal[i]; i++) {
if(dbv.ptszVal[i] == (TCHAR)0x0d)
continue;
cEntry->statusMsg[j] = dbv.ptszVal[i] == (wchar_t)0x0a ? (wchar_t)' ' : dbv.ptszVal[i];
@@ -348,7 +348,7 @@ BYTE GetCachedStatusMsg(int iExtraCacheEntry, char *szProto)
iLen = min(lstrlenW(cEntry->statusMsg), 10);
GetStringTypeW(CT_CTYPE2, cEntry->statusMsg, iLen, infoTypeC2);
cEntry->dwCFlags &= ~ECF_RTLSTATUSMSG;
- for(i = 0; i < 10; i++) {
+ for (i = 0; i < 10; i++) {
if(infoTypeC2[i] == C2_RIGHTTOLEFT) {
cEntry->dwCFlags |= ECF_RTLSTATUSMSG;
break;
@@ -416,7 +416,7 @@ void RTL_DetectAndSet(struct ClcContact *contact, HANDLE hContact)
iLen = min(lstrlenW(szText), 10);
GetStringTypeW(CT_CTYPE2, szText, iLen, infoTypeC2);
cfg::eCache[index].dwCFlags &= ~ECF_RTLNICK;
- for(i = 0; i < 10; i++) {
+ for (i = 0; i < 10; i++) {
if(infoTypeC2[i] == C2_RIGHTTOLEFT) {
cfg::eCache[index].dwCFlags |= ECF_RTLNICK;
return;
@@ -436,7 +436,7 @@ void RTL_DetectGroupName(struct ClcContact *group)
if(group->szText) {
iLen = min(lstrlenW(group->szText), 10);
GetStringTypeW(CT_CTYPE2, group->szText, iLen, infoTypeC2);
- for(i = 0; i < 10; i++) {
+ for (i = 0; i < 10; i++) {
if(infoTypeC2[i] == C2_RIGHTTOLEFT) {
group->isRtl = 1;
return;
@@ -561,7 +561,7 @@ void ReloadSkinItemsToCache()
int i;
char *szProto;
- for(i = 0; i < cfg::nextCacheEntry; i++) {
+ for (i = 0; i < cfg::nextCacheEntry; i++) {
szProto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)cfg::eCache[i].hContact, 0);
if(szProto)
LoadSkinItemToCache(&cfg::eCache[i], szProto);
@@ -574,7 +574,7 @@ DWORD CalcXMask(HANDLE hContact)
int i;
DWORD dwResult = cfg::dat.dwExtraImageMask, bForced, bHidden;
- for(i = 0; i <= 10; i++) {
+ for (i = 0; i <= 10; i++) {
bForced = (dwXMask & (1 << (2 * i)));
bHidden = (dwXMask & (1 << (2 * i + 1)));
if(bForced == 0 && bHidden == 0)
diff --git a/plugins/Clist_nicer/SRC/clcopts.cpp b/plugins/Clist_nicer/SRC/clcopts.cpp
index 3a243e6084..b4b8128eea 100644
--- a/plugins/Clist_nicer/SRC/clcopts.cpp
+++ b/plugins/Clist_nicer/SRC/clcopts.cpp
@@ -129,101 +129,71 @@ static DWORD MakeCheckBoxTreeFlags(HWND hwndTree)
}
/*
- * functions to enumerate display profiles
- */
-
-/*
-int DSP_EnumProc(const char *szSetting, LPARAM lParam)
-{
- pfnEnumCallback EnumCallback = (pfnEnumCallback)lParam;
- if (szSetting != NULL)
- EnumCallback((char *)szSetting);
- return(0);
-}
-
-void DSP_EnumModes(pfnEnumCallback EnumCallback)
-{
- static UINT uID_max;
-
- DBCONTACTENUMSETTINGS dbces;
-
- uID_max = 0;
-
- dbces.pfnEnumProc = DSP_EnumProc;
- dbces.szModule = DSP_PROFILES_MODULE;
- dbces.ofsSettings = 0;
- dbces.lParam = (LPARAM)EnumCallback;
- CallService(MS_DB_CONTACT_ENUMSETTINGS,0,(LPARAM)&dbces);
-}
-
- */
-/*
* write a display profile to the db
* p->uID must contain the (valid) identifier
*/
static void DSP_Write(DISPLAYPROFILESET *p)
{
- char szBuf[256], szKey[256];
- int i = 0, j;
- DWORD dwFlags = 0;
- DISPLAYPROFILE *dp;
-
- _snprintf(szKey, 256, "[%u]", p->uID);
- cfg::writeTString(NULL, DSP_PROFILES_MODULE, szKey, p->tszName);
-
- for(j = 0; j < 4; j++) {
-
- dp = &p->dp[i];
- i = 0;
-
- /*
- * dword values
- */
-
- _snprintf(szBuf, 256, "%u,%u,%d,%u,%u", dp->dwFlags, dp->dwExtraImageMask, dp->avatarBorder, dp->clcExStyle, dp->clcOfflineModes);
- szBuf[255] = 0;
- _snprintf(szKey, 256, "{dw_%u_%u}", p->uID, j);
- cfg::writeString(NULL, DSP_PROFILES_MODULE, szKey, szBuf);
-
- _snprintf(szKey, 256, "{b_%u_%u}", p->uID, j);
-
- /*
- * byte values
- */
-
- szBuf[i++] = (BYTE)dp->exIconScale;
- szBuf[i++] = (BYTE)dp->dualRowMode;
- szBuf[i++] = (BYTE)dp->avatarRadius;
- szBuf[i++] = (BYTE)dp->avatarSize;
- szBuf[i++] = (BYTE)dp->sortOrder[0];szBuf[i++] = (BYTE)dp->sortOrder[1];szBuf[i++] = (BYTE)dp->sortOrder[2];
- szBuf[i++] = dp->bUseDCMirroring;
- szBuf[i++] = dp->bGroupAlign;
- szBuf[i++] = dp->avatarPadding;
- szBuf[i++] = dp->bLeftMargin; szBuf[i++] = dp->bRightMargin; szBuf[i++] = dp->bRowSpacing;
- szBuf[i++] = dp->bGroupIndent; szBuf[i++] = dp->bRowHeight; szBuf[i++] = dp->bGroupRowHeight;
- szBuf[i++] = 0;
-
- cfg::writeString(NULL, DSP_PROFILES_MODULE, szKey, szBuf);
-
- /*
- * bool values (convert to bitflags
- */
-
- _snprintf(szKey, 256, "{f_%u_%u}", p->uID, j);
- dwFlags = ((dp->bCenterStatusIcons ? DSPF_CENTERSTATUSICON : 0) |
- (dp->bDimIdle ? DSPF_DIMIDLE : 0) |
- (dp->bNoOfflineAvatars ? DSPF_NOFFLINEAVATARS : 0) |
- (dp->bShowLocalTime ? DSPF_SHOWLOCALTIME : 0) |
- (dp->bShowLocalTimeSelective ? DSPF_LOCALTIMESELECTIVE : 0) |
- (dp->bDontSeparateOffline ? DSPF_DONTSEPARATEOFFLINE : 0) |
- (dp->bCenterGroupNames ? DSPF_CENTERGROUPNAMES : 0));
-
- cfg::writeDword(NULL, DSP_PROFILES_MODULE, szKey, dwFlags);
- }
+ char szBuf[256], szKey[256];
+ int i = 0, j;
+ DWORD dwFlags = 0;
+ DISPLAYPROFILE *dp;
+
+ _snprintf(szKey, 256, "[%u]", p->uID);
+ cfg::writeTString(NULL, DSP_PROFILES_MODULE, szKey, p->tszName);
+
+ for (j = 0; j < 4; j++) {
+
+ dp = &p->dp[i];
+ i = 0;
+
+ /*
+ * dword values
+ */
+
+ _snprintf(szBuf, 256, "%u,%u,%d,%u,%u", dp->dwFlags, dp->dwExtraImageMask, dp->avatarBorder, dp->clcExStyle, dp->clcOfflineModes);
+ szBuf[255] = 0;
+ _snprintf(szKey, 256, "{dw_%u_%u}", p->uID, j);
+ cfg::writeString(NULL, DSP_PROFILES_MODULE, szKey, szBuf);
+
+ _snprintf(szKey, 256, "{b_%u_%u}", p->uID, j);
+
+ /*
+ * byte values
+ */
+
+ szBuf[i++] = (BYTE)dp->exIconScale;
+ szBuf[i++] = (BYTE)dp->dualRowMode;
+ szBuf[i++] = (BYTE)dp->avatarRadius;
+ szBuf[i++] = (BYTE)dp->avatarSize;
+ szBuf[i++] = (BYTE)dp->sortOrder[0];szBuf[i++] = (BYTE)dp->sortOrder[1];szBuf[i++] = (BYTE)dp->sortOrder[2];
+ szBuf[i++] = dp->bUseDCMirroring;
+ szBuf[i++] = dp->bGroupAlign;
+ szBuf[i++] = dp->avatarPadding;
+ szBuf[i++] = dp->bLeftMargin; szBuf[i++] = dp->bRightMargin; szBuf[i++] = dp->bRowSpacing;
+ szBuf[i++] = dp->bGroupIndent; szBuf[i++] = dp->bRowHeight; szBuf[i++] = dp->bGroupRowHeight;
+ szBuf[i++] = 0;
+
+ cfg::writeString(NULL, DSP_PROFILES_MODULE, szKey, szBuf);
+
+ /*
+ * bool values (convert to bitflags
+ */
+
+ _snprintf(szKey, 256, "{f_%u_%u}", p->uID, j);
+ dwFlags = ((dp->bCenterStatusIcons ? DSPF_CENTERSTATUSICON : 0) |
+ (dp->bDimIdle ? DSPF_DIMIDLE : 0) |
+ (dp->bNoOfflineAvatars ? DSPF_NOFFLINEAVATARS : 0) |
+ (dp->bShowLocalTime ? DSPF_SHOWLOCALTIME : 0) |
+ (dp->bShowLocalTimeSelective ? DSPF_LOCALTIMESELECTIVE : 0) |
+ (dp->bDontSeparateOffline ? DSPF_DONTSEPARATEOFFLINE : 0) |
+ (dp->bCenterGroupNames ? DSPF_CENTERGROUPNAMES : 0));
+
+ cfg::writeDword(NULL, DSP_PROFILES_MODULE, szKey, dwFlags);
+ }
}
-
/*
* read a profile from the DB
* p->uID must contain the (valid) identifier
@@ -231,80 +201,80 @@ static void DSP_Write(DISPLAYPROFILESET *p)
static int DSP_Read(DISPLAYPROFILESET *p)
{
- char szBuf[256], szKey[256];
- int i = 0, j;
- DWORD dwFlags = 0;
- DBVARIANT dbv = {0};
- DISPLAYPROFILE *dp;
-
- _snprintf(szKey, 256, "[%u]", p->uID);
-
- if(cfg::getTString(NULL, DSP_PROFILES_MODULE, szKey, &dbv))
- return 0;
-
- mir_sntprintf(p->tszName, 60, dbv.ptszVal);
- DBFreeVariant(&dbv);
-
- for(j = 0; j < 4; j++) {
-
- dp = &p->dp[j];
- i = 0;
- /*
- * dword values
- */
-
- mir_snprintf(szKey, 256, "{dw_%u_%u}", p->uID, j);
- if (!cfg::getString(NULL, DSP_PROFILES_MODULE, szKey, &dbv)) {
- sscanf(dbv.pszVal, "%u,%u,%u,%u,%u", dp->dwFlags, dp->dwExtraImageMask, dp->avatarBorder, dp->clcExStyle, dp->clcOfflineModes);
- DBFreeVariant(&dbv);
- }
- else
- return 0;
-
- /*
- * byte values
- */
-
- _snprintf(szKey, 256, "{b_%u_%u}", p->uID, j);
- if (!cfg::getString(NULL, DSP_PROFILES_MODULE, szKey, &dbv)) {
- if(lstrlenA(dbv.pszVal) >= 16) {
- dp->exIconScale = (int)szBuf[i++];
- dp->dualRowMode = szBuf[i++];
- dp->avatarRadius = szBuf[i++];
- dp->avatarSize = szBuf[i++];
- dp->sortOrder[0] = szBuf[i++]; dp->sortOrder[1] = szBuf[i++]; dp->sortOrder[2] = szBuf[i++];
- dp->bUseDCMirroring = szBuf[i++];
- dp->bGroupAlign = szBuf[i++];
- dp->avatarPadding = szBuf[i++];
- dp->bLeftMargin = szBuf[i++]; dp->bRightMargin = szBuf[i++]; dp->bRowSpacing = szBuf[i++];
- dp->bGroupIndent = szBuf[i++]; dp->bRowHeight = szBuf[i++]; dp->bGroupRowHeight = szBuf[i++];
- }
- else {
- DBFreeVariant(&dbv);
- return 0;
- }
- DBFreeVariant(&dbv);
- }
- else
- return 0;
-
- /*
- * bool values (convert to bitflags
- */
-
- _snprintf(szKey, 256, "{f_%u_%u}", p->uID, j);
- dwFlags = cfg::getDword(DSP_PROFILES_MODULE, szKey, 0);
-
- dp->bCenterStatusIcons = dwFlags & DSPF_CENTERSTATUSICON ? 1 : 0;
- dp->bDimIdle = dwFlags & DSPF_DIMIDLE ? 1 : 0;
- dp->bNoOfflineAvatars = dwFlags & DSPF_NOFFLINEAVATARS ? 1 : 0;
- dp->bShowLocalTime = dwFlags & DSPF_SHOWLOCALTIME ? 1 : 0;
- dp->bShowLocalTimeSelective = dwFlags & DSPF_LOCALTIMESELECTIVE ? 1 : 0;
- dp->bDontSeparateOffline = dwFlags & DSPF_DONTSEPARATEOFFLINE ? 1 : 0;
- dp->bCenterGroupNames = dwFlags & DSPF_CENTERGROUPNAMES ? 1 : 0;
- }
+ char szBuf[256], szKey[256];
+ int i = 0, j;
+ DWORD dwFlags = 0;
+ DBVARIANT dbv = {0};
+ DISPLAYPROFILE *dp;
+
+ _snprintf(szKey, 256, "[%u]", p->uID);
+
+ if (cfg::getTString(NULL, DSP_PROFILES_MODULE, szKey, &dbv))
+ return 0;
+
+ mir_sntprintf(p->tszName, 60, dbv.ptszVal);
+ DBFreeVariant(&dbv);
+
+ for (j = 0; j < 4; j++) {
+
+ dp = &p->dp[j];
+ i = 0;
+ /*
+ * dword values
+ */
+
+ mir_snprintf(szKey, 256, "{dw_%u_%u}", p->uID, j);
+ if (!cfg::getString(NULL, DSP_PROFILES_MODULE, szKey, &dbv)) {
+ sscanf(dbv.pszVal, "%u,%u,%u,%u,%u", dp->dwFlags, dp->dwExtraImageMask, dp->avatarBorder, dp->clcExStyle, dp->clcOfflineModes);
+ DBFreeVariant(&dbv);
+ }
+ else
+ return 0;
+
+ /*
+ * byte values
+ */
+
+ _snprintf(szKey, 256, "{b_%u_%u}", p->uID, j);
+ if (!cfg::getString(NULL, DSP_PROFILES_MODULE, szKey, &dbv)) {
+ if (lstrlenA(dbv.pszVal) >= 16) {
+ dp->exIconScale = (int)szBuf[i++];
+ dp->dualRowMode = szBuf[i++];
+ dp->avatarRadius = szBuf[i++];
+ dp->avatarSize = szBuf[i++];
+ dp->sortOrder[0] = szBuf[i++]; dp->sortOrder[1] = szBuf[i++]; dp->sortOrder[2] = szBuf[i++];
+ dp->bUseDCMirroring = szBuf[i++];
+ dp->bGroupAlign = szBuf[i++];
+ dp->avatarPadding = szBuf[i++];
+ dp->bLeftMargin = szBuf[i++]; dp->bRightMargin = szBuf[i++]; dp->bRowSpacing = szBuf[i++];
+ dp->bGroupIndent = szBuf[i++]; dp->bRowHeight = szBuf[i++]; dp->bGroupRowHeight = szBuf[i++];
+ }
+ else {
+ DBFreeVariant(&dbv);
+ return 0;
+ }
+ DBFreeVariant(&dbv);
+ }
+ else
+ return 0;
- return 1;
+ /*
+ * bool values (convert to bitflags
+ */
+
+ _snprintf(szKey, 256, "{f_%u_%u}", p->uID, j);
+ dwFlags = cfg::getDword(DSP_PROFILES_MODULE, szKey, 0);
+
+ dp->bCenterStatusIcons = dwFlags & DSPF_CENTERSTATUSICON ? 1 : 0;
+ dp->bDimIdle = dwFlags & DSPF_DIMIDLE ? 1 : 0;
+ dp->bNoOfflineAvatars = dwFlags & DSPF_NOFFLINEAVATARS ? 1 : 0;
+ dp->bShowLocalTime = dwFlags & DSPF_SHOWLOCALTIME ? 1 : 0;
+ dp->bShowLocalTimeSelective = dwFlags & DSPF_LOCALTIMESELECTIVE ? 1 : 0;
+ dp->bDontSeparateOffline = dwFlags & DSPF_DONTSEPARATEOFFLINE ? 1 : 0;
+ dp->bCenterGroupNames = dwFlags & DSPF_CENTERGROUPNAMES ? 1 : 0;
+ }
+
+ return 1;
}
/*
@@ -313,36 +283,36 @@ static int DSP_Read(DISPLAYPROFILESET *p)
static void DSP_LoadFromDefaults(DISPLAYPROFILE *p)
{
- p->dwExtraImageMask = cfg::dat.dwExtraImageMask;
- p->exIconScale = cfg::dat.exIconScale;
- p->bCenterStatusIcons = cfg::dat.bCenterStatusIcons;
- p->dwFlags = cfg::dat.dwFlags;
- p->bDimIdle = cfg::getByte("CLC", "ShowIdle", CLCDEFAULT_SHOWIDLE);
- p->avatarBorder = cfg::dat.avatarBorder;
- p->avatarSize = cfg::dat.avatarSize;
- p->avatarRadius = cfg::dat.avatarRadius;
- p->dualRowMode = cfg::dat.dualRowMode;
- p->bNoOfflineAvatars = cfg::dat.bNoOfflineAvatars;
- p->bShowLocalTime = cfg::dat.bShowLocalTime;
- p->bShowLocalTimeSelective = cfg::dat.bShowLocalTimeSelective;
- p->clcExStyle = cfg::getDword("CLC", "ExStyle", pcli->pfnGetDefaultExStyle());
- p->clcOfflineModes = cfg::getDword("CLC", "OfflineModes", CLCDEFAULT_OFFLINEMODES);
- p->bDontSeparateOffline = cfg::dat.bDontSeparateOffline;
- p->sortOrder[0] = cfg::dat.sortOrder[0];
- p->sortOrder[1] = cfg::dat.sortOrder[1];
- p->sortOrder[2] = cfg::dat.sortOrder[2];
- p->bUseDCMirroring = cfg::dat.bUseDCMirroring;
- p->bCenterGroupNames = cfg::getByte("CLCExt", "EXBK_CenterGroupnames", 0);
- p->bGroupAlign = cfg::dat.bGroupAlign;
- p->avatarPadding = cfg::dat.avatarPadding;
-
- p->bLeftMargin = cfg::getByte("CLC", "LeftMargin", CLCDEFAULT_LEFTMARGIN);
- p->bRightMargin = cfg::getByte("CLC", "RightMargin", CLCDEFAULT_LEFTMARGIN);
- p->bRowSpacing = cfg::dat.bRowSpacing;
- p->bGroupIndent = cfg::getByte("CLC", "GroupIndent", CLCDEFAULT_GROUPINDENT);
- p->bRowHeight = cfg::getByte("CLC", "RowHeight", CLCDEFAULT_ROWHEIGHT);
- p->bGroupRowHeight = cfg::getByte("CLC", "GRowHeight", CLCDEFAULT_ROWHEIGHT);
- CopyMemory(p->exIconOrder, cfg::dat.exIconOrder, EXICON_COUNT);
+ p->dwExtraImageMask = cfg::dat.dwExtraImageMask;
+ p->exIconScale = cfg::dat.exIconScale;
+ p->bCenterStatusIcons = cfg::dat.bCenterStatusIcons;
+ p->dwFlags = cfg::dat.dwFlags;
+ p->bDimIdle = cfg::getByte("CLC", "ShowIdle", CLCDEFAULT_SHOWIDLE);
+ p->avatarBorder = cfg::dat.avatarBorder;
+ p->avatarSize = cfg::dat.avatarSize;
+ p->avatarRadius = cfg::dat.avatarRadius;
+ p->dualRowMode = cfg::dat.dualRowMode;
+ p->bNoOfflineAvatars = cfg::dat.bNoOfflineAvatars;
+ p->bShowLocalTime = cfg::dat.bShowLocalTime;
+ p->bShowLocalTimeSelective = cfg::dat.bShowLocalTimeSelective;
+ p->clcExStyle = cfg::getDword("CLC", "ExStyle", pcli->pfnGetDefaultExStyle());
+ p->clcOfflineModes = cfg::getDword("CLC", "OfflineModes", CLCDEFAULT_OFFLINEMODES);
+ p->bDontSeparateOffline = cfg::dat.bDontSeparateOffline;
+ p->sortOrder[0] = cfg::dat.sortOrder[0];
+ p->sortOrder[1] = cfg::dat.sortOrder[1];
+ p->sortOrder[2] = cfg::dat.sortOrder[2];
+ p->bUseDCMirroring = cfg::dat.bUseDCMirroring;
+ p->bCenterGroupNames = cfg::getByte("CLCExt", "EXBK_CenterGroupnames", 0);
+ p->bGroupAlign = cfg::dat.bGroupAlign;
+ p->avatarPadding = cfg::dat.avatarPadding;
+
+ p->bLeftMargin = cfg::getByte("CLC", "LeftMargin", CLCDEFAULT_LEFTMARGIN);
+ p->bRightMargin = cfg::getByte("CLC", "RightMargin", CLCDEFAULT_LEFTMARGIN);
+ p->bRowSpacing = cfg::dat.bRowSpacing;
+ p->bGroupIndent = cfg::getByte("CLC", "GroupIndent", CLCDEFAULT_GROUPINDENT);
+ p->bRowHeight = cfg::getByte("CLC", "RowHeight", CLCDEFAULT_ROWHEIGHT);
+ p->bGroupRowHeight = cfg::getByte("CLC", "GRowHeight", CLCDEFAULT_ROWHEIGHT);
+ CopyMemory(p->exIconOrder, cfg::dat.exIconOrder, EXICON_COUNT);
}
/*
@@ -351,128 +321,128 @@ static void DSP_LoadFromDefaults(DISPLAYPROFILE *p)
void DSP_Apply(DISPLAYPROFILE *p)
{
- int oldexIconScale = cfg::dat.exIconScale;
- DWORD oldMask = cfg::dat.dwExtraImageMask;
- int i;
- DWORD exStyle;
- char temp[EXICON_COUNT + 1];
- /*
- * icons page
- */
- cfg::dat.dwFlags &= ~(CLUI_FRAME_STATUSICONS | CLUI_SHOWVISI | CLUI_USEMETAICONS | CLUI_FRAME_USEXSTATUSASSTATUS | CLUI_FRAME_OVERLAYICONS | CLUI_FRAME_SELECTIVEICONS);
- cfg::dat.dwExtraImageMask = p->dwExtraImageMask;
- cfg::dat.exIconScale = p->exIconScale;
- cfg::dat.bCenterStatusIcons = p->bCenterStatusIcons;
-
- cfg::writeDword("CLUI", "ximgmask", cfg::dat.dwExtraImageMask);
- cfg::writeByte("CLC", "ExIconScale", (BYTE)cfg::dat.exIconScale);
- cfg::writeByte("CLC", "si_centered", (BYTE)cfg::dat.bCenterStatusIcons);
- cfg::writeByte("CLC", "ShowIdle", (BYTE)p->bDimIdle);
-
- CopyMemory(cfg::dat.exIconOrder, p->exIconOrder, EXICON_COUNT);
- CopyMemory(temp, p->exIconOrder, EXICON_COUNT);
- temp[EXICON_COUNT] = 0;
- cfg::writeString(NULL, "CLUI", "exIconOrder", temp);
-
- /*
- * advanced (avatars & 2nd row)
- */
-
- cfg::dat.dwFlags &= ~(CLUI_FRAME_AVATARSLEFT | CLUI_FRAME_AVATARSRIGHT | CLUI_FRAME_AVATARSRIGHTWITHNICK |
- CLUI_FRAME_AVATARS | CLUI_FRAME_AVATARBORDER | CLUI_FRAME_ROUNDAVATAR |
- CLUI_FRAME_ALWAYSALIGNNICK | CLUI_FRAME_SHOWSTATUSMSG | CLUI_FRAME_GDIPLUS);
-
- cfg::dat.avatarSize = p->avatarSize;
- cfg::dat.avatarBorder = p->avatarBorder;
- cfg::dat.avatarRadius = p->avatarRadius;
- cfg::dat.dualRowMode = p->dualRowMode;
- cfg::dat.bNoOfflineAvatars = p->bNoOfflineAvatars;
- cfg::dat.bShowLocalTime = p->bShowLocalTime;
- cfg::dat.bShowLocalTimeSelective = p->bShowLocalTimeSelective;
-
- if(cfg::dat.hBrushAvatarBorder)
- DeleteObject(cfg::dat.hBrushAvatarBorder);
- cfg::dat.hBrushAvatarBorder = CreateSolidBrush(cfg::dat.avatarBorder);
-
- /*
- * items page
- */
-
- cfg::dat.dwFlags &= ~CLUI_STICKYEVENTS;
-
- cfg::dat.sortOrder[0] = p->sortOrder[0];
- cfg::dat.sortOrder[1] = p->sortOrder[1];
- cfg::dat.sortOrder[2] = p->sortOrder[2];
- cfg::dat.bDontSeparateOffline = p->bDontSeparateOffline;
- cfg::writeByte("CList", "DontSeparateOffline", (BYTE)cfg::dat.bDontSeparateOffline);
- cfg::writeDword("CLC", "OfflineModes", p->clcOfflineModes);
-
- cfg::writeDword("CList", "SortOrder",
- MAKELONG(MAKEWORD(cfg::dat.sortOrder[0], cfg::dat.sortOrder[1]),
- MAKEWORD(cfg::dat.sortOrder[2], 0)));
-
- cfg::dat.bUseDCMirroring = p->bUseDCMirroring;
- cfg::writeByte("CLC", "MirrorDC", cfg::dat.bUseDCMirroring);
-
- /*
- * groups page
- */
-
- cfg::dat.dwFlags &= ~CLUI_FRAME_NOGROUPICON;
- cfg::dat.bGroupAlign = p->bGroupAlign;
- cfg::writeByte("CLC", "GroupAlign", cfg::dat.bGroupAlign);
- cfg::writeByte("CLCExt", "EXBK_CenterGroupnames", (BYTE)p->bCenterGroupNames);
-
- exStyle = cfg::getDword("CLC", "ExStyle", pcli->pfnGetDefaultExStyle());
- for (i = 0; i < sizeof(checkBoxToGroupStyleEx) / sizeof(checkBoxToGroupStyleEx[0]); i++)
- exStyle &= ~(checkBoxToGroupStyleEx[i].flag);
-
- exStyle |= p->clcExStyle;
- cfg::writeDword("CLC", "ExStyle", exStyle);
- cfg::dat.avatarPadding = p->avatarPadding;
- cfg::writeByte("CList", "AvatarPadding", cfg::dat.avatarPadding);
-
- cfg::dat.bRowSpacing = p->bRowSpacing;
- cfg::writeByte("CLC", "RowGap", cfg::dat.bRowSpacing);
-
- cfg::writeByte("CLC", "LeftMargin", (BYTE)p->bLeftMargin);
- cfg::writeByte("CLC", "RightMargin", (BYTE)p->bRightMargin);
- cfg::writeByte("CLC", "GroupIndent", (BYTE)p->bGroupIndent);
- cfg::writeByte("CLC", "RowHeight", (BYTE)p->bRowHeight);
- cfg::writeByte("CLC", "GRowHeight", (BYTE)p->bGroupRowHeight);
-
- if(cfg::dat.sortOrder[0] == SORTBY_LASTMSG || cfg::dat.sortOrder[1] == SORTBY_LASTMSG || cfg::dat.sortOrder[2] == SORTBY_LASTMSG) {
- int i;
-
- for(i = 0; i < cfg::nextCacheEntry; i++)
- cfg::eCache[i].dwLastMsgTime = INTSORT_GetLastMsgTime(cfg::eCache[i].hContact);
- }
+ int oldexIconScale = cfg::dat.exIconScale;
+ DWORD oldMask = cfg::dat.dwExtraImageMask;
+ int i;
+ DWORD exStyle;
+ char temp[EXICON_COUNT + 1];
+ /*
+ * icons page
+ */
+ cfg::dat.dwFlags &= ~(CLUI_FRAME_STATUSICONS | CLUI_SHOWVISI | CLUI_USEMETAICONS | CLUI_FRAME_USEXSTATUSASSTATUS | CLUI_FRAME_OVERLAYICONS | CLUI_FRAME_SELECTIVEICONS);
+ cfg::dat.dwExtraImageMask = p->dwExtraImageMask;
+ cfg::dat.exIconScale = p->exIconScale;
+ cfg::dat.bCenterStatusIcons = p->bCenterStatusIcons;
+
+ cfg::writeDword("CLUI", "ximgmask", cfg::dat.dwExtraImageMask);
+ cfg::writeByte("CLC", "ExIconScale", (BYTE)cfg::dat.exIconScale);
+ cfg::writeByte("CLC", "si_centered", (BYTE)cfg::dat.bCenterStatusIcons);
+ cfg::writeByte("CLC", "ShowIdle", (BYTE)p->bDimIdle);
+
+ CopyMemory(cfg::dat.exIconOrder, p->exIconOrder, EXICON_COUNT);
+ CopyMemory(temp, p->exIconOrder, EXICON_COUNT);
+ temp[EXICON_COUNT] = 0;
+ cfg::writeString(NULL, "CLUI", "exIconOrder", temp);
+
+ /*
+ * advanced (avatars & 2nd row)
+ */
+
+ cfg::dat.dwFlags &= ~(CLUI_FRAME_AVATARSLEFT | CLUI_FRAME_AVATARSRIGHT | CLUI_FRAME_AVATARSRIGHTWITHNICK |
+ CLUI_FRAME_AVATARS | CLUI_FRAME_AVATARBORDER | CLUI_FRAME_ROUNDAVATAR |
+ CLUI_FRAME_ALWAYSALIGNNICK | CLUI_FRAME_SHOWSTATUSMSG | CLUI_FRAME_GDIPLUS);
+
+ cfg::dat.avatarSize = p->avatarSize;
+ cfg::dat.avatarBorder = p->avatarBorder;
+ cfg::dat.avatarRadius = p->avatarRadius;
+ cfg::dat.dualRowMode = p->dualRowMode;
+ cfg::dat.bNoOfflineAvatars = p->bNoOfflineAvatars;
+ cfg::dat.bShowLocalTime = p->bShowLocalTime;
+ cfg::dat.bShowLocalTimeSelective = p->bShowLocalTimeSelective;
+
+ if (cfg::dat.hBrushAvatarBorder)
+ DeleteObject(cfg::dat.hBrushAvatarBorder);
+ cfg::dat.hBrushAvatarBorder = CreateSolidBrush(cfg::dat.avatarBorder);
+
+ /*
+ * items page
+ */
+
+ cfg::dat.dwFlags &= ~CLUI_STICKYEVENTS;
+
+ cfg::dat.sortOrder[0] = p->sortOrder[0];
+ cfg::dat.sortOrder[1] = p->sortOrder[1];
+ cfg::dat.sortOrder[2] = p->sortOrder[2];
+ cfg::dat.bDontSeparateOffline = p->bDontSeparateOffline;
+ cfg::writeByte("CList", "DontSeparateOffline", (BYTE)cfg::dat.bDontSeparateOffline);
+ cfg::writeDword("CLC", "OfflineModes", p->clcOfflineModes);
+
+ cfg::writeDword("CList", "SortOrder",
+ MAKELONG(MAKEWORD(cfg::dat.sortOrder[0], cfg::dat.sortOrder[1]),
+ MAKEWORD(cfg::dat.sortOrder[2], 0)));
+
+ cfg::dat.bUseDCMirroring = p->bUseDCMirroring;
+ cfg::writeByte("CLC", "MirrorDC", cfg::dat.bUseDCMirroring);
+
+ /*
+ * groups page
+ */
+
+ cfg::dat.dwFlags &= ~CLUI_FRAME_NOGROUPICON;
+ cfg::dat.bGroupAlign = p->bGroupAlign;
+ cfg::writeByte("CLC", "GroupAlign", cfg::dat.bGroupAlign);
+ cfg::writeByte("CLCExt", "EXBK_CenterGroupnames", (BYTE)p->bCenterGroupNames);
+
+ exStyle = cfg::getDword("CLC", "ExStyle", pcli->pfnGetDefaultExStyle());
+ for (i = 0; i < sizeof(checkBoxToGroupStyleEx) / sizeof(checkBoxToGroupStyleEx[0]); i++)
+ exStyle &= ~(checkBoxToGroupStyleEx[i].flag);
+
+ exStyle |= p->clcExStyle;
+ cfg::writeDword("CLC", "ExStyle", exStyle);
+ cfg::dat.avatarPadding = p->avatarPadding;
+ cfg::writeByte("CList", "AvatarPadding", cfg::dat.avatarPadding);
+
+ cfg::dat.bRowSpacing = p->bRowSpacing;
+ cfg::writeByte("CLC", "RowGap", cfg::dat.bRowSpacing);
+
+ cfg::writeByte("CLC", "LeftMargin", (BYTE)p->bLeftMargin);
+ cfg::writeByte("CLC", "RightMargin", (BYTE)p->bRightMargin);
+ cfg::writeByte("CLC", "GroupIndent", (BYTE)p->bGroupIndent);
+ cfg::writeByte("CLC", "RowHeight", (BYTE)p->bRowHeight);
+ cfg::writeByte("CLC", "GRowHeight", (BYTE)p->bGroupRowHeight);
+
+ if (cfg::dat.sortOrder[0] == SORTBY_LASTMSG || cfg::dat.sortOrder[1] == SORTBY_LASTMSG || cfg::dat.sortOrder[2] == SORTBY_LASTMSG) {
+ int i;
+
+ for (i = 0; i < cfg::nextCacheEntry; i++)
+ cfg::eCache[i].dwLastMsgTime = INTSORT_GetLastMsgTime(cfg::eCache[i].hContact);
+ }
- cfg::writeByte("CLC", "ShowLocalTime", (BYTE)cfg::dat.bShowLocalTime);
- cfg::writeByte("CLC", "SelectiveLocalTime", (BYTE)cfg::dat.bShowLocalTimeSelective);
- cfg::writeDword("CLC", "avatarborder", cfg::dat.avatarBorder);
- cfg::writeDword("CLC", "avatarradius", cfg::dat.avatarRadius);
- cfg::writeWord(NULL, "CList", "AvatarSize", (WORD)cfg::dat.avatarSize);
- cfg::writeByte("CLC", "DualRowMode", cfg::dat.dualRowMode);
- cfg::writeByte("CList", "NoOfflineAV", (BYTE)cfg::dat.bNoOfflineAvatars);
+ cfg::writeByte("CLC", "ShowLocalTime", (BYTE)cfg::dat.bShowLocalTime);
+ cfg::writeByte("CLC", "SelectiveLocalTime", (BYTE)cfg::dat.bShowLocalTimeSelective);
+ cfg::writeDword("CLC", "avatarborder", cfg::dat.avatarBorder);
+ cfg::writeDword("CLC", "avatarradius", cfg::dat.avatarRadius);
+ cfg::writeWord(NULL, "CList", "AvatarSize", (WORD)cfg::dat.avatarSize);
+ cfg::writeByte("CLC", "DualRowMode", cfg::dat.dualRowMode);
+ cfg::writeByte("CList", "NoOfflineAV", (BYTE)cfg::dat.bNoOfflineAvatars);
- KillTimer(pcli->hwndContactTree, TIMERID_REFRESH);
- if(cfg::dat.bShowLocalTime)
- SetTimer(pcli->hwndContactTree, TIMERID_REFRESH, 65000, NULL);
+ KillTimer(pcli->hwndContactTree, TIMERID_REFRESH);
+ if (cfg::dat.bShowLocalTime)
+ SetTimer(pcli->hwndContactTree, TIMERID_REFRESH, 65000, NULL);
- cfg::dat.dwFlags |= p->dwFlags;
- cfg::writeDword("CLUI", "Frameflags", cfg::dat.dwFlags);
+ cfg::dat.dwFlags |= p->dwFlags;
+ cfg::writeDword("CLUI", "Frameflags", cfg::dat.dwFlags);
- for(i = 0; i < cfg::nextCacheEntry; i++)
- cfg::eCache[i].dwXMask = CalcXMask(cfg::eCache[i].hContact);
+ for (i = 0; i < cfg::nextCacheEntry; i++)
+ cfg::eCache[i].dwXMask = CalcXMask(cfg::eCache[i].hContact);
- if(oldexIconScale != cfg::dat.exIconScale) {
- ImageList_RemoveAll(himlExtraImages);
- ImageList_SetIconSize(himlExtraImages, cfg::dat.exIconScale, cfg::dat.exIconScale);
- IcoLibReloadIcons();
- }
- pcli->pfnClcOptionsChanged();
- pcli->pfnClcBroadcast(CLM_AUTOREBUILD, 0, 0);
+ if (oldexIconScale != cfg::dat.exIconScale) {
+ ImageList_RemoveAll(himlExtraImages);
+ ImageList_SetIconSize(himlExtraImages, cfg::dat.exIconScale, cfg::dat.exIconScale);
+ IcoLibReloadIcons();
+ }
+ pcli->pfnClcOptionsChanged();
+ pcli->pfnClcBroadcast(CLM_AUTOREBUILD, 0, 0);
}
void GetDefaultFontSetting(int i, LOGFONT *lf, COLORREF *colour)
@@ -504,196 +474,190 @@ static INT_PTR CALLBACK DlgProcDspGroups(HWND hwndDlg, UINT msg, WPARAM wParam,
switch (msg) {
case WM_INITDIALOG:
{
- int i = 0;
- TranslateDialogDefault(hwndDlg);
- SendDlgItemMessage(hwndDlg, IDC_GROUPALIGN, CB_INSERTSTRING, -1, (LPARAM)TranslateT("Always Left"));
- SendDlgItemMessage(hwndDlg, IDC_GROUPALIGN, CB_INSERTSTRING, -1, (LPARAM)TranslateT("Always Right"));
- SendDlgItemMessage(hwndDlg, IDC_GROUPALIGN, CB_INSERTSTRING, -1, (LPARAM)TranslateT("Automatic (RTL)"));
- return TRUE;
+ int i = 0;
+ TranslateDialogDefault(hwndDlg);
+ SendDlgItemMessage(hwndDlg, IDC_GROUPALIGN, CB_INSERTSTRING, -1, (LPARAM)TranslateT("Always Left"));
+ SendDlgItemMessage(hwndDlg, IDC_GROUPALIGN, CB_INSERTSTRING, -1, (LPARAM)TranslateT("Always Right"));
+ SendDlgItemMessage(hwndDlg, IDC_GROUPALIGN, CB_INSERTSTRING, -1, (LPARAM)TranslateT("Automatic (RTL)"));
}
- case WM_COMMAND:
- if ((LOWORD(wParam) == IDC_ROWHEIGHT || LOWORD(wParam) == IDC_AVATARPADDING || LOWORD(wParam) == IDC_ROWGAP || LOWORD(wParam) == IDC_RIGHTMARGIN || LOWORD(wParam) == IDC_LEFTMARGIN || LOWORD(wParam) == IDC_SMOOTHTIME || LOWORD(wParam) == IDC_GROUPINDENT || LOWORD(wParam) == IDC_GROUPROWHEIGHT)
- && (HIWORD(wParam) != EN_CHANGE || (HWND) lParam != GetFocus()))
- return 0;
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- break;
- case WM_USER + 100:
- {
- DISPLAYPROFILE *p = (DISPLAYPROFILE *)lParam;
- if(p) {
- DWORD exStyle = p->clcExStyle;
+ return TRUE;
+
+ case WM_COMMAND:
+ if ((LOWORD(wParam) == IDC_ROWHEIGHT || LOWORD(wParam) == IDC_AVATARPADDING || LOWORD(wParam) == IDC_ROWGAP || LOWORD(wParam) == IDC_RIGHTMARGIN || LOWORD(wParam) == IDC_LEFTMARGIN || LOWORD(wParam) == IDC_SMOOTHTIME || LOWORD(wParam) == IDC_GROUPINDENT || LOWORD(wParam) == IDC_GROUPROWHEIGHT)
+ && (HIWORD(wParam) != EN_CHANGE || (HWND) lParam != GetFocus()))
+ return 0;
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ break;
+
+ case WM_USER + 100:
+ {
+ DISPLAYPROFILE *p = (DISPLAYPROFILE *)lParam;
+ if (p) {
+ DWORD exStyle = p->clcExStyle;
int i;
- for (i = 0; i < sizeof(checkBoxToGroupStyleEx) / sizeof(checkBoxToGroupStyleEx[0]); i++)
- CheckDlgButton(hwndDlg, checkBoxToGroupStyleEx[i].id, (exStyle & checkBoxToGroupStyleEx[i].flag) ^ (checkBoxToGroupStyleEx[i].flag * checkBoxToGroupStyleEx[i].not_t) ? BST_CHECKED : BST_UNCHECKED);
-
- CheckDlgButton(hwndDlg, IDC_NOGROUPICON, (p->dwFlags & CLUI_FRAME_NOGROUPICON) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_CENTERGROUPNAMES, p->bCenterGroupNames);
- SendDlgItemMessage(hwndDlg, IDC_GROUPALIGN, CB_SETCURSEL, p->bGroupAlign, 0);
- SendDlgItemMessage(hwndDlg, IDC_AVATARPADDINGSPIN, UDM_SETRANGE, 0, MAKELONG(10, 0));
- SendDlgItemMessage(hwndDlg, IDC_AVATARPADDINGSPIN, UDM_SETPOS, 0, p->avatarPadding);
-
- SendDlgItemMessage(hwndDlg, IDC_LEFTMARGINSPIN, UDM_SETRANGE, 0, MAKELONG(64, 0));
- SendDlgItemMessage(hwndDlg, IDC_LEFTMARGINSPIN, UDM_SETPOS, 0, p->bLeftMargin);
- SendDlgItemMessage(hwndDlg, IDC_RIGHTMARGINSPIN, UDM_SETRANGE, 0, MAKELONG(64, 0));
- SendDlgItemMessage(hwndDlg, IDC_RIGHTMARGINSPIN, UDM_SETPOS, 0, p->bRightMargin);
- SendDlgItemMessage(hwndDlg, IDC_ROWGAPSPIN, UDM_SETRANGE, 0, MAKELONG(10, 0));
- SendDlgItemMessage(hwndDlg, IDC_ROWGAPSPIN, UDM_SETPOS, 0, p->bRowSpacing);
- SendDlgItemMessage(hwndDlg, IDC_GROUPINDENTSPIN, UDM_SETRANGE, 0, MAKELONG(50, 0));
- SendDlgItemMessage(hwndDlg, IDC_GROUPINDENTSPIN, UDM_SETPOS, 0, p->bGroupIndent);
- SendDlgItemMessage(hwndDlg, IDC_ROWHEIGHTSPIN, UDM_SETRANGE, 0, MAKELONG(255, 8));
- SendDlgItemMessage(hwndDlg, IDC_ROWHEIGHTSPIN, UDM_SETPOS, 0, p->bRowHeight);
- SendDlgItemMessage(hwndDlg, IDC_GROUPROWHEIGHTSPIN, UDM_SETRANGE, 0, MAKELONG(255, 8));
- SendDlgItemMessage(hwndDlg, IDC_GROUPROWHEIGHTSPIN, UDM_SETPOS, 0, p->bGroupRowHeight);
- }
- return 0;
- }
- case WM_USER + 200:
- {
- DISPLAYPROFILE *p = (DISPLAYPROFILE *)lParam;
- if(p) {
- int i;
- DWORD exStyle = 0;
- LRESULT curSel;
- BOOL translated;
-
- for (i = 0; i < sizeof(checkBoxToGroupStyleEx) / sizeof(checkBoxToGroupStyleEx[0]); i++) {
- if ((IsDlgButtonChecked(hwndDlg, checkBoxToGroupStyleEx[i].id) == 0) == checkBoxToGroupStyleEx[i].not_t)
- exStyle |= checkBoxToGroupStyleEx[i].flag;
- }
- p->clcExStyle = exStyle;
- p->dwFlags |= (IsDlgButtonChecked(hwndDlg, IDC_NOGROUPICON) ? CLUI_FRAME_NOGROUPICON : 0);
- p->bCenterGroupNames = IsDlgButtonChecked(hwndDlg, IDC_CENTERGROUPNAMES) ? 1 : 0;
- curSel = SendDlgItemMessage(hwndDlg, IDC_GROUPALIGN, CB_GETCURSEL, 0, 0);
- if(curSel != CB_ERR)
- p->bGroupAlign = (BYTE)curSel;
-
- p->avatarPadding = (BYTE)GetDlgItemInt(hwndDlg, IDC_AVATARPADDING, &translated, FALSE);
- p->bLeftMargin = (BYTE)SendDlgItemMessage(hwndDlg, IDC_LEFTMARGINSPIN, UDM_GETPOS, 0, 0);
- p->bRightMargin = (BYTE)SendDlgItemMessage(hwndDlg, IDC_RIGHTMARGINSPIN, UDM_GETPOS, 0, 0);
- p->bRowSpacing = (BYTE)SendDlgItemMessage(hwndDlg, IDC_ROWGAPSPIN, UDM_GETPOS, 0, 0);
- p->bGroupIndent = (BYTE)SendDlgItemMessage(hwndDlg, IDC_GROUPINDENTSPIN, UDM_GETPOS, 0, 0);
- p->bRowHeight = (BYTE)SendDlgItemMessage(hwndDlg, IDC_ROWHEIGHTSPIN, UDM_GETPOS, 0, 0);
- p->bGroupRowHeight = (BYTE)SendDlgItemMessage(hwndDlg, IDC_GROUPROWHEIGHTSPIN, UDM_GETPOS, 0, 0);
- }
- return 0;
- }
- case WM_NOTIFY:
- switch (((LPNMHDR) lParam)->idFrom) {
- case 0:
- switch (((LPNMHDR) lParam)->code) {
- case PSN_APPLY:
- {
- return TRUE;
- }
- }
- break;
- }
- break;
+ for (i = 0; i < sizeof(checkBoxToGroupStyleEx) / sizeof(checkBoxToGroupStyleEx[0]); i++)
+ CheckDlgButton(hwndDlg, checkBoxToGroupStyleEx[i].id, (exStyle & checkBoxToGroupStyleEx[i].flag) ^ (checkBoxToGroupStyleEx[i].flag * checkBoxToGroupStyleEx[i].not_t) ? BST_CHECKED : BST_UNCHECKED);
+
+ CheckDlgButton(hwndDlg, IDC_NOGROUPICON, (p->dwFlags & CLUI_FRAME_NOGROUPICON) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_CENTERGROUPNAMES, p->bCenterGroupNames);
+ SendDlgItemMessage(hwndDlg, IDC_GROUPALIGN, CB_SETCURSEL, p->bGroupAlign, 0);
+ SendDlgItemMessage(hwndDlg, IDC_AVATARPADDINGSPIN, UDM_SETRANGE, 0, MAKELONG(10, 0));
+ SendDlgItemMessage(hwndDlg, IDC_AVATARPADDINGSPIN, UDM_SETPOS, 0, p->avatarPadding);
+
+ SendDlgItemMessage(hwndDlg, IDC_LEFTMARGINSPIN, UDM_SETRANGE, 0, MAKELONG(64, 0));
+ SendDlgItemMessage(hwndDlg, IDC_LEFTMARGINSPIN, UDM_SETPOS, 0, p->bLeftMargin);
+ SendDlgItemMessage(hwndDlg, IDC_RIGHTMARGINSPIN, UDM_SETRANGE, 0, MAKELONG(64, 0));
+ SendDlgItemMessage(hwndDlg, IDC_RIGHTMARGINSPIN, UDM_SETPOS, 0, p->bRightMargin);
+ SendDlgItemMessage(hwndDlg, IDC_ROWGAPSPIN, UDM_SETRANGE, 0, MAKELONG(10, 0));
+ SendDlgItemMessage(hwndDlg, IDC_ROWGAPSPIN, UDM_SETPOS, 0, p->bRowSpacing);
+ SendDlgItemMessage(hwndDlg, IDC_GROUPINDENTSPIN, UDM_SETRANGE, 0, MAKELONG(50, 0));
+ SendDlgItemMessage(hwndDlg, IDC_GROUPINDENTSPIN, UDM_SETPOS, 0, p->bGroupIndent);
+ SendDlgItemMessage(hwndDlg, IDC_ROWHEIGHTSPIN, UDM_SETRANGE, 0, MAKELONG(255, 8));
+ SendDlgItemMessage(hwndDlg, IDC_ROWHEIGHTSPIN, UDM_SETPOS, 0, p->bRowHeight);
+ SendDlgItemMessage(hwndDlg, IDC_GROUPROWHEIGHTSPIN, UDM_SETRANGE, 0, MAKELONG(255, 8));
+ SendDlgItemMessage(hwndDlg, IDC_GROUPROWHEIGHTSPIN, UDM_SETPOS, 0, p->bGroupRowHeight);
+ }
+ }
+ return 0;
+
+ case WM_USER + 200:
+ {
+ DISPLAYPROFILE *p = (DISPLAYPROFILE *)lParam;
+ if (p) {
+ int i;
+ DWORD exStyle = 0;
+ LRESULT curSel;
+ BOOL translated;
+
+ for (i = 0; i < sizeof(checkBoxToGroupStyleEx) / sizeof(checkBoxToGroupStyleEx[0]); i++) {
+ if ((IsDlgButtonChecked(hwndDlg, checkBoxToGroupStyleEx[i].id) == 0) == checkBoxToGroupStyleEx[i].not_t)
+ exStyle |= checkBoxToGroupStyleEx[i].flag;
+ }
+ p->clcExStyle = exStyle;
+ p->dwFlags |= (IsDlgButtonChecked(hwndDlg, IDC_NOGROUPICON) ? CLUI_FRAME_NOGROUPICON : 0);
+ p->bCenterGroupNames = IsDlgButtonChecked(hwndDlg, IDC_CENTERGROUPNAMES) ? 1 : 0;
+ curSel = SendDlgItemMessage(hwndDlg, IDC_GROUPALIGN, CB_GETCURSEL, 0, 0);
+ if (curSel != CB_ERR)
+ p->bGroupAlign = (BYTE)curSel;
+
+ p->avatarPadding = (BYTE)GetDlgItemInt(hwndDlg, IDC_AVATARPADDING, &translated, FALSE);
+ p->bLeftMargin = (BYTE)SendDlgItemMessage(hwndDlg, IDC_LEFTMARGINSPIN, UDM_GETPOS, 0, 0);
+ p->bRightMargin = (BYTE)SendDlgItemMessage(hwndDlg, IDC_RIGHTMARGINSPIN, UDM_GETPOS, 0, 0);
+ p->bRowSpacing = (BYTE)SendDlgItemMessage(hwndDlg, IDC_ROWGAPSPIN, UDM_GETPOS, 0, 0);
+ p->bGroupIndent = (BYTE)SendDlgItemMessage(hwndDlg, IDC_GROUPINDENTSPIN, UDM_GETPOS, 0, 0);
+ p->bRowHeight = (BYTE)SendDlgItemMessage(hwndDlg, IDC_ROWHEIGHTSPIN, UDM_GETPOS, 0, 0);
+ p->bGroupRowHeight = (BYTE)SendDlgItemMessage(hwndDlg, IDC_GROUPROWHEIGHTSPIN, UDM_GETPOS, 0, 0);
+ }
+ return 0;
+ }
+
+ case WM_NOTIFY:
+ switch (((LPNMHDR) lParam)->idFrom) {
+ case 0:
+ switch (((LPNMHDR) lParam)->code) {
+ case PSN_APPLY:
+ return TRUE;
+ }
+ break;
+ }
+ break;
}
return FALSE;
}
static INT_PTR CALLBACK DlgProcDspItems(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
+ DISPLAYPROFILE *p;
+
switch (msg) {
case WM_INITDIALOG:
{
- int i = 0;
- HIMAGELIST himlOld;
-
- TranslateDialogDefault(hwndDlg);
- if(himlCheckBoxes == 0)
- CreateStateImageList();
-
- himlOld = TreeView_SetImageList(GetDlgItem(hwndDlg, IDC_HIDEOFFLINEOPTS), himlCheckBoxes, TVSIL_STATE);
- ImageList_Destroy(himlOld);
-
- for(i = 0; sortCtrlIDs[i] != 0; i++) {
- SendDlgItemMessage(hwndDlg, sortCtrlIDs[i], CB_INSERTSTRING, -1, (LPARAM)TranslateT("Nothing"));
- SendDlgItemMessage(hwndDlg, sortCtrlIDs[i], CB_INSERTSTRING, -1, (LPARAM)TranslateT("Name"));
- SendDlgItemMessage(hwndDlg, sortCtrlIDs[i], CB_INSERTSTRING, -1, (LPARAM)TranslateT("Protocol"));
- SendDlgItemMessage(hwndDlg, sortCtrlIDs[i], CB_INSERTSTRING, -1, (LPARAM)TranslateT("Status"));
- SendDlgItemMessage(hwndDlg, sortCtrlIDs[i], CB_INSERTSTRING, -1, (LPARAM)TranslateT("Last Message"));
- SendDlgItemMessage(hwndDlg, sortCtrlIDs[i], CB_INSERTSTRING, -1, (LPARAM)TranslateT("Message Frequency"));
- }
- SendDlgItemMessage(hwndDlg, IDC_CLISTALIGN, CB_INSERTSTRING, -1, (LPARAM)TranslateT("Never"));
- SendDlgItemMessage(hwndDlg, IDC_CLISTALIGN, CB_INSERTSTRING, -1, (LPARAM)TranslateT("Always"));
- SendDlgItemMessage(hwndDlg, IDC_CLISTALIGN, CB_INSERTSTRING, -1, (LPARAM)TranslateT("For RTL only"));
- SendDlgItemMessage(hwndDlg, IDC_CLISTALIGN, CB_INSERTSTRING, -1, (LPARAM)TranslateT("RTL TEXT only"));
- return TRUE;
+ int i = 0;
+ HIMAGELIST himlOld;
+
+ TranslateDialogDefault(hwndDlg);
+ if (himlCheckBoxes == 0)
+ CreateStateImageList();
+
+ himlOld = TreeView_SetImageList(GetDlgItem(hwndDlg, IDC_HIDEOFFLINEOPTS), himlCheckBoxes, TVSIL_STATE);
+ ImageList_Destroy(himlOld);
+
+ for (i = 0; sortCtrlIDs[i] != 0; i++) {
+ SendDlgItemMessage(hwndDlg, sortCtrlIDs[i], CB_INSERTSTRING, -1, (LPARAM)TranslateT("Nothing"));
+ SendDlgItemMessage(hwndDlg, sortCtrlIDs[i], CB_INSERTSTRING, -1, (LPARAM)TranslateT("Name"));
+ SendDlgItemMessage(hwndDlg, sortCtrlIDs[i], CB_INSERTSTRING, -1, (LPARAM)TranslateT("Protocol"));
+ SendDlgItemMessage(hwndDlg, sortCtrlIDs[i], CB_INSERTSTRING, -1, (LPARAM)TranslateT("Status"));
+ SendDlgItemMessage(hwndDlg, sortCtrlIDs[i], CB_INSERTSTRING, -1, (LPARAM)TranslateT("Last Message"));
+ SendDlgItemMessage(hwndDlg, sortCtrlIDs[i], CB_INSERTSTRING, -1, (LPARAM)TranslateT("Message Frequency"));
+ }
+ SendDlgItemMessage(hwndDlg, IDC_CLISTALIGN, CB_INSERTSTRING, -1, (LPARAM)TranslateT("Never"));
+ SendDlgItemMessage(hwndDlg, IDC_CLISTALIGN, CB_INSERTSTRING, -1, (LPARAM)TranslateT("Always"));
+ SendDlgItemMessage(hwndDlg, IDC_CLISTALIGN, CB_INSERTSTRING, -1, (LPARAM)TranslateT("For RTL only"));
+ SendDlgItemMessage(hwndDlg, IDC_CLISTALIGN, CB_INSERTSTRING, -1, (LPARAM)TranslateT("RTL TEXT only"));
+ }
+ return TRUE;
+
+ case WM_COMMAND:
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ break;
+
+ case WM_USER + 100:
+ p = (DISPLAYPROFILE *)lParam;
+ if (p) {
+ FillCheckBoxTree(GetDlgItem(hwndDlg, IDC_HIDEOFFLINEOPTS), offlineValues, sizeof(offlineValues) / sizeof(offlineValues[0]), p->clcOfflineModes);
+ CheckDlgButton(hwndDlg, IDC_EVENTSONTOP, (p->dwFlags & CLUI_STICKYEVENTS) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_DONTSEPARATE, p->bDontSeparateOffline);
+ for (int i = 0; sortCtrlIDs[i] != 0; i++)
+ SendDlgItemMessage(hwndDlg, sortCtrlIDs[i], CB_SETCURSEL, p->sortOrder[i], 0);
+
+ SendDlgItemMessage(hwndDlg, IDC_CLISTALIGN, CB_SETCURSEL, p->bUseDCMirroring, 0);
+ }
+ return 0;
+
+ case WM_USER + 200:
+ p = (DISPLAYPROFILE *)lParam;
+ if (p) {
+ for (int i = 0; sortCtrlIDs[i] != 0; i++) {
+ LRESULT curSel = SendDlgItemMessage(hwndDlg, sortCtrlIDs[i], CB_GETCURSEL, 0, 0);
+ if (curSel == 0 || curSel == CB_ERR)
+ p->sortOrder[i] = 0;
+ else
+ p->sortOrder[i] = (BYTE)curSel;
+ }
+ p->bDontSeparateOffline = IsDlgButtonChecked(hwndDlg, IDC_DONTSEPARATE) ? 1 : 0;
+ p->dwFlags |= IsDlgButtonChecked(hwndDlg, IDC_EVENTSONTOP) ? CLUI_STICKYEVENTS : 0;
+ p->clcOfflineModes = MakeCheckBoxTreeFlags(GetDlgItem(hwndDlg, IDC_HIDEOFFLINEOPTS));
+ p->bUseDCMirroring = (BYTE)SendDlgItemMessage(hwndDlg, IDC_CLISTALIGN, CB_GETCURSEL, 0, 0);
+ }
+ return 0;
+
+ case WM_NOTIFY:
+ switch (((LPNMHDR) lParam)->idFrom) {
+ case IDC_HIDEOFFLINEOPTS:
+ if (((LPNMHDR) lParam)->code == NM_CLICK) {
+ TVHITTESTINFO hti;
+ hti.pt.x = (short) LOWORD(GetMessagePos());
+ hti.pt.y = (short) HIWORD(GetMessagePos());
+ ScreenToClient(((LPNMHDR) lParam)->hwndFrom, &hti.pt);
+ if (TreeView_HitTest(((LPNMHDR) lParam)->hwndFrom, &hti))
+ if (hti.flags & TVHT_ONITEMSTATEICON) {
+ TVITEM tvi;
+ tvi.mask = TVIF_HANDLE | TVIF_IMAGE | TVIF_SELECTEDIMAGE;
+ tvi.hItem = hti.hItem;
+ TreeView_GetItem(((LPNMHDR) lParam)->hwndFrom, &tvi);
+ tvi.iImage = tvi.iSelectedImage = tvi.iImage == 1 ? 2 : 1;
+ TreeView_SetItem(((LPNMHDR) lParam)->hwndFrom, &tvi);
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ }
+ }
+ break;
+ case 0:
+ switch (((LPNMHDR) lParam)->code) {
+ case PSN_APPLY:
+ return TRUE;
+ }
+ break;
}
- case WM_COMMAND:
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- break;
- case WM_USER + 100:
- {
- DISPLAYPROFILE *p = (DISPLAYPROFILE *)lParam;
- if(p) {
- int i;
- FillCheckBoxTree(GetDlgItem(hwndDlg, IDC_HIDEOFFLINEOPTS), offlineValues, sizeof(offlineValues) / sizeof(offlineValues[0]), p->clcOfflineModes);
- CheckDlgButton(hwndDlg, IDC_EVENTSONTOP, (p->dwFlags & CLUI_STICKYEVENTS) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_DONTSEPARATE, p->bDontSeparateOffline);
- for(i = 0; sortCtrlIDs[i] != 0; i++)
- SendDlgItemMessage(hwndDlg, sortCtrlIDs[i], CB_SETCURSEL, p->sortOrder[i], 0);
-
- SendDlgItemMessage(hwndDlg, IDC_CLISTALIGN, CB_SETCURSEL, p->bUseDCMirroring, 0);
- }
- return 0;
- }
- case WM_USER + 200:
- {
- DISPLAYPROFILE *p = (DISPLAYPROFILE *)lParam;
- if(p) {
- int i;
- LRESULT curSel;
-
- for(i = 0; sortCtrlIDs[i] != 0; i++) {
- curSel = SendDlgItemMessage(hwndDlg, sortCtrlIDs[i], CB_GETCURSEL, 0, 0);
- if(curSel == 0 || curSel == CB_ERR)
- p->sortOrder[i] = 0;
- else
- p->sortOrder[i] = (BYTE)curSel;
- }
- p->bDontSeparateOffline = IsDlgButtonChecked(hwndDlg, IDC_DONTSEPARATE) ? 1 : 0;
- p->dwFlags |= IsDlgButtonChecked(hwndDlg, IDC_EVENTSONTOP) ? CLUI_STICKYEVENTS : 0;
- p->clcOfflineModes = MakeCheckBoxTreeFlags(GetDlgItem(hwndDlg, IDC_HIDEOFFLINEOPTS));
- p->bUseDCMirroring = (BYTE)SendDlgItemMessage(hwndDlg, IDC_CLISTALIGN, CB_GETCURSEL, 0, 0);
- }
- return 0;
- }
- case WM_NOTIFY:
- switch (((LPNMHDR) lParam)->idFrom) {
- case IDC_HIDEOFFLINEOPTS:
- if (((LPNMHDR) lParam)->code == NM_CLICK) {
- TVHITTESTINFO hti;
- hti.pt.x = (short) LOWORD(GetMessagePos());
- hti.pt.y = (short) HIWORD(GetMessagePos());
- ScreenToClient(((LPNMHDR) lParam)->hwndFrom, &hti.pt);
- if (TreeView_HitTest(((LPNMHDR) lParam)->hwndFrom, &hti))
- if (hti.flags & TVHT_ONITEMSTATEICON) {
- TVITEM tvi;
- tvi.mask = TVIF_HANDLE | TVIF_IMAGE | TVIF_SELECTEDIMAGE;
- tvi.hItem = hti.hItem;
- TreeView_GetItem(((LPNMHDR) lParam)->hwndFrom, &tvi);
- tvi.iImage = tvi.iSelectedImage = tvi.iImage == 1 ? 2 : 1;
- TreeView_SetItem(((LPNMHDR) lParam)->hwndFrom, &tvi);
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- }
- }
- break;
- case 0:
- switch (((LPNMHDR) lParam)->code) {
- case PSN_APPLY:
- {
- return TRUE;
- }
- }
- break;
- }
- case WM_DESTROY: {
- break;
- }
- break;
}
return FALSE;
}
@@ -701,136 +665,138 @@ static INT_PTR CALLBACK DlgProcDspItems(HWND hwndDlg, UINT msg, WPARAM wParam, L
static UINT avatar_controls[] = { IDC_ALIGNMENT, IDC_AVATARSBORDER, IDC_AVATARSROUNDED, IDC_AVATARBORDERCLR, IDC_ALWAYSALIGNNICK, IDC_AVATARHEIGHT, IDC_AVATARSIZESPIN, 0 };
static INT_PTR CALLBACK DlgProcDspAdvanced(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
+ DISPLAYPROFILE *p;
+
switch (msg) {
case WM_INITDIALOG:
{
- int i = 0;
-
- TranslateDialogDefault(hwndDlg);
- SendDlgItemMessage(hwndDlg, IDC_DUALROWMODE, CB_INSERTSTRING, -1, (LPARAM)TranslateT("Never"));
- SendDlgItemMessage(hwndDlg, IDC_DUALROWMODE, CB_INSERTSTRING, -1, (LPARAM)TranslateT("Always"));
- SendDlgItemMessage(hwndDlg, IDC_DUALROWMODE, CB_INSERTSTRING, -1, (LPARAM)TranslateT("When space allows it"));
- SendDlgItemMessage(hwndDlg, IDC_DUALROWMODE, CB_INSERTSTRING, -1, (LPARAM)TranslateT("When needed"));
-
- SendDlgItemMessage(hwndDlg, IDC_ALIGNMENT, CB_INSERTSTRING, -1, (LPARAM)TranslateT("With Nickname - left"));
- SendDlgItemMessage(hwndDlg, IDC_ALIGNMENT, CB_INSERTSTRING, -1, (LPARAM)TranslateT("Far left"));
- SendDlgItemMessage(hwndDlg, IDC_ALIGNMENT, CB_INSERTSTRING, -1, (LPARAM)TranslateT("Far right"));
- SendDlgItemMessage(hwndDlg, IDC_ALIGNMENT, CB_INSERTSTRING, -1, (LPARAM)TranslateT("With Nickname - right"));
-
- if(cfg::dat.bAvatarServiceAvail) {
- Utils::enableDlgControl(hwndDlg, IDC_CLISTAVATARS, TRUE);
- while(avatar_controls[i] != 0)
- Utils::enableDlgControl(hwndDlg, avatar_controls[i++], TRUE);
- }
- else {
- Utils::enableDlgControl(hwndDlg, IDC_CLISTAVATARS, FALSE);
- while(avatar_controls[i] != 0)
- Utils::enableDlgControl(hwndDlg, avatar_controls[i++], FALSE);
- }
+ int i = 0;
+
+ TranslateDialogDefault(hwndDlg);
+ SendDlgItemMessage(hwndDlg, IDC_DUALROWMODE, CB_INSERTSTRING, -1, (LPARAM)TranslateT("Never"));
+ SendDlgItemMessage(hwndDlg, IDC_DUALROWMODE, CB_INSERTSTRING, -1, (LPARAM)TranslateT("Always"));
+ SendDlgItemMessage(hwndDlg, IDC_DUALROWMODE, CB_INSERTSTRING, -1, (LPARAM)TranslateT("When space allows it"));
+ SendDlgItemMessage(hwndDlg, IDC_DUALROWMODE, CB_INSERTSTRING, -1, (LPARAM)TranslateT("When needed"));
+
+ SendDlgItemMessage(hwndDlg, IDC_ALIGNMENT, CB_INSERTSTRING, -1, (LPARAM)TranslateT("With Nickname - left"));
+ SendDlgItemMessage(hwndDlg, IDC_ALIGNMENT, CB_INSERTSTRING, -1, (LPARAM)TranslateT("Far left"));
+ SendDlgItemMessage(hwndDlg, IDC_ALIGNMENT, CB_INSERTSTRING, -1, (LPARAM)TranslateT("Far right"));
+ SendDlgItemMessage(hwndDlg, IDC_ALIGNMENT, CB_INSERTSTRING, -1, (LPARAM)TranslateT("With Nickname - right"));
+
+ if (cfg::dat.bAvatarServiceAvail) {
+ Utils::enableDlgControl(hwndDlg, IDC_CLISTAVATARS, TRUE);
+ while(avatar_controls[i] != 0)
+ Utils::enableDlgControl(hwndDlg, avatar_controls[i++], TRUE);
+ }
+ else {
+ Utils::enableDlgControl(hwndDlg, IDC_CLISTAVATARS, FALSE);
+ while(avatar_controls[i] != 0)
+ Utils::enableDlgControl(hwndDlg, avatar_controls[i++], FALSE);
+ }
return TRUE;
}
- case WM_COMMAND:
- switch(LOWORD(wParam)) {
- case IDC_CLISTAVATARS:
- if ((HWND)lParam != GetFocus())
- return 0;
- break;
- case IDC_SHOWLOCALTIME:
- Utils::enableDlgControl(hwndDlg, IDC_SHOWLOCALTIMEONLYWHENDIFFERENT, IsDlgButtonChecked(hwndDlg, IDC_SHOWLOCALTIME));
- break;
- case IDC_AVATARSROUNDED:
- Utils::enableDlgControl(hwndDlg, IDC_RADIUS, IsDlgButtonChecked(hwndDlg, IDC_AVATARSROUNDED) ? TRUE : FALSE);
- Utils::enableDlgControl(hwndDlg, IDC_RADIUSSPIN, IsDlgButtonChecked(hwndDlg, IDC_AVATARSROUNDED) ? TRUE : FALSE);
- break;
- case IDC_AVATARSBORDER:
- Utils::enableDlgControl(hwndDlg, IDC_AVATARBORDERCLR, IsDlgButtonChecked(hwndDlg, IDC_AVATARSBORDER) ? TRUE : FALSE);
- break;
- }
- if ((LOWORD(wParam) == IDC_RADIUS || LOWORD(wParam) == IDC_AVATARHEIGHT) && (HIWORD(wParam) != EN_CHANGE || (HWND) lParam != GetFocus()))
- return 0;
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- break;
- case WM_USER + 100:
- {
- DISPLAYPROFILE *p = (DISPLAYPROFILE *)lParam;
- if(p) {
- CheckDlgButton(hwndDlg, IDC_NOAVATARSOFFLINE, p->bNoOfflineAvatars);
- SendDlgItemMessage(hwndDlg, IDC_DUALROWMODE, CB_SETCURSEL, (WPARAM)p->dualRowMode, 0);
- CheckDlgButton(hwndDlg, IDC_CLISTAVATARS, (p->dwFlags & CLUI_FRAME_AVATARS) ? BST_CHECKED : BST_UNCHECKED);
-
- CheckDlgButton(hwndDlg, IDC_AVATARSBORDER, (p->dwFlags & CLUI_FRAME_AVATARBORDER) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_AVATARSROUNDED, (p->dwFlags & CLUI_FRAME_ROUNDAVATAR) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_ALWAYSALIGNNICK, (p->dwFlags & CLUI_FRAME_ALWAYSALIGNNICK) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SHOWSTATUSMSG, (p->dwFlags & CLUI_FRAME_SHOWSTATUSMSG) ? BST_CHECKED : BST_UNCHECKED);
-
- SendDlgItemMessage(hwndDlg, IDC_AVATARBORDERCLR, CPM_SETCOLOUR, 0, p->avatarBorder);
-
- SendDlgItemMessage(hwndDlg, IDC_RADIUSSPIN, UDM_SETRANGE, 0, MAKELONG(10, 2));
- SendDlgItemMessage(hwndDlg, IDC_RADIUSSPIN, UDM_SETPOS, 0, p->avatarRadius);
-
- SendDlgItemMessage(hwndDlg, IDC_AVATARSIZESPIN, UDM_SETRANGE, 0, MAKELONG(100, 16));
- SendDlgItemMessage(hwndDlg, IDC_AVATARSIZESPIN, UDM_SETPOS, 0, p->avatarSize);
-
- Utils::enableDlgControl(hwndDlg, IDC_RADIUS, IsDlgButtonChecked(hwndDlg, IDC_AVATARSROUNDED) ? TRUE : FALSE);
- Utils::enableDlgControl(hwndDlg, IDC_RADIUSSPIN, IsDlgButtonChecked(hwndDlg, IDC_AVATARSROUNDED) ? TRUE : FALSE);
- Utils::enableDlgControl(hwndDlg, IDC_AVATARBORDERCLR, IsDlgButtonChecked(hwndDlg, IDC_AVATARSBORDER) ? TRUE : FALSE);
-
- CheckDlgButton(hwndDlg, IDC_SHOWLOCALTIME, p->bShowLocalTime ? 1 : 0);
- CheckDlgButton(hwndDlg, IDC_SHOWLOCALTIMEONLYWHENDIFFERENT, p->bShowLocalTimeSelective ? 1 : 0);
- Utils::enableDlgControl(hwndDlg, IDC_SHOWLOCALTIMEONLYWHENDIFFERENT, IsDlgButtonChecked(hwndDlg, IDC_SHOWLOCALTIME));
-
- if(p->dwFlags & CLUI_FRAME_AVATARSLEFT)
- SendDlgItemMessage(hwndDlg, IDC_ALIGNMENT, CB_SETCURSEL, 1, 0);
- else if(p->dwFlags & CLUI_FRAME_AVATARSRIGHT)
- SendDlgItemMessage(hwndDlg, IDC_ALIGNMENT, CB_SETCURSEL, 2, 0);
- else if(p->dwFlags & CLUI_FRAME_AVATARSRIGHTWITHNICK)
- SendDlgItemMessage(hwndDlg, IDC_ALIGNMENT, CB_SETCURSEL, 3, 0);
- else
- SendDlgItemMessage(hwndDlg, IDC_ALIGNMENT, CB_SETCURSEL, 0, 0);
- }
- return 0;
- }
- case WM_USER + 200:
- {
- DISPLAYPROFILE *p = (DISPLAYPROFILE *)lParam;
- if(p) {
- LRESULT sel = SendDlgItemMessage(hwndDlg, IDC_ALIGNMENT, CB_GETCURSEL, 0, 0);
- BOOL translated;
+ case WM_COMMAND:
+ switch(LOWORD(wParam)) {
+ case IDC_CLISTAVATARS:
+ if ((HWND)lParam != GetFocus())
+ return 0;
+ break;
+
+ case IDC_SHOWLOCALTIME:
+ Utils::enableDlgControl(hwndDlg, IDC_SHOWLOCALTIMEONLYWHENDIFFERENT, IsDlgButtonChecked(hwndDlg, IDC_SHOWLOCALTIME));
+ break;
+
+ case IDC_AVATARSROUNDED:
+ Utils::enableDlgControl(hwndDlg, IDC_RADIUS, IsDlgButtonChecked(hwndDlg, IDC_AVATARSROUNDED) ? TRUE : FALSE);
+ Utils::enableDlgControl(hwndDlg, IDC_RADIUSSPIN, IsDlgButtonChecked(hwndDlg, IDC_AVATARSROUNDED) ? TRUE : FALSE);
+ break;
+
+ case IDC_AVATARSBORDER:
+ Utils::enableDlgControl(hwndDlg, IDC_AVATARBORDERCLR, IsDlgButtonChecked(hwndDlg, IDC_AVATARSBORDER) ? TRUE : FALSE);
+ break;
+ }
+ if ((LOWORD(wParam) == IDC_RADIUS || LOWORD(wParam) == IDC_AVATARHEIGHT) && (HIWORD(wParam) != EN_CHANGE || (HWND) lParam != GetFocus()))
+ return 0;
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ break;
- if(sel != CB_ERR) {
- if(sel == 1)
- p->dwFlags |= CLUI_FRAME_AVATARSLEFT;
- else if(sel == 2)
- p->dwFlags |= CLUI_FRAME_AVATARSRIGHT;
- else if(sel == 3)
- p->dwFlags |= CLUI_FRAME_AVATARSRIGHTWITHNICK;
- }
-
- p->dwFlags |= ((IsDlgButtonChecked(hwndDlg, IDC_CLISTAVATARS) ? CLUI_FRAME_AVATARS : 0) |
- (IsDlgButtonChecked(hwndDlg, IDC_AVATARSBORDER) ? CLUI_FRAME_AVATARBORDER : 0) |
- (IsDlgButtonChecked(hwndDlg, IDC_AVATARSROUNDED) ? CLUI_FRAME_ROUNDAVATAR : 0) |
- (IsDlgButtonChecked(hwndDlg, IDC_ALWAYSALIGNNICK) ? CLUI_FRAME_ALWAYSALIGNNICK : 0) |
- (IsDlgButtonChecked(hwndDlg, IDC_SHOWSTATUSMSG) ? CLUI_FRAME_SHOWSTATUSMSG : 0));
-
- p->avatarBorder = SendDlgItemMessage(hwndDlg, IDC_AVATARBORDERCLR, CPM_GETCOLOUR, 0, 0);
- p->avatarRadius = GetDlgItemInt(hwndDlg, IDC_RADIUS, &translated, FALSE);
- p->avatarSize = GetDlgItemInt(hwndDlg, IDC_AVATARHEIGHT, &translated, FALSE);
- p->bNoOfflineAvatars = IsDlgButtonChecked(hwndDlg, IDC_NOAVATARSOFFLINE) ? TRUE : FALSE;
- p->bShowLocalTime = IsDlgButtonChecked(hwndDlg, IDC_SHOWLOCALTIME) ? 1 : 0;
- p->bShowLocalTimeSelective = IsDlgButtonChecked(hwndDlg, IDC_SHOWLOCALTIMEONLYWHENDIFFERENT) ? 1 : 0;
-
- p->dualRowMode = (BYTE)SendDlgItemMessage(hwndDlg, IDC_DUALROWMODE, CB_GETCURSEL, 0, 0);
- if(p->dualRowMode == CB_ERR)
- p->dualRowMode = 0;
- }
- return 0;
- }
- case WM_NOTIFY:
+ case WM_USER + 100:
+ p = (DISPLAYPROFILE *)lParam;
+ if (p) {
+ CheckDlgButton(hwndDlg, IDC_NOAVATARSOFFLINE, p->bNoOfflineAvatars);
+ SendDlgItemMessage(hwndDlg, IDC_DUALROWMODE, CB_SETCURSEL, (WPARAM)p->dualRowMode, 0);
+ CheckDlgButton(hwndDlg, IDC_CLISTAVATARS, (p->dwFlags & CLUI_FRAME_AVATARS) ? BST_CHECKED : BST_UNCHECKED);
+
+ CheckDlgButton(hwndDlg, IDC_AVATARSBORDER, (p->dwFlags & CLUI_FRAME_AVATARBORDER) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_AVATARSROUNDED, (p->dwFlags & CLUI_FRAME_ROUNDAVATAR) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_ALWAYSALIGNNICK, (p->dwFlags & CLUI_FRAME_ALWAYSALIGNNICK) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_SHOWSTATUSMSG, (p->dwFlags & CLUI_FRAME_SHOWSTATUSMSG) ? BST_CHECKED : BST_UNCHECKED);
+
+ SendDlgItemMessage(hwndDlg, IDC_AVATARBORDERCLR, CPM_SETCOLOUR, 0, p->avatarBorder);
+
+ SendDlgItemMessage(hwndDlg, IDC_RADIUSSPIN, UDM_SETRANGE, 0, MAKELONG(10, 2));
+ SendDlgItemMessage(hwndDlg, IDC_RADIUSSPIN, UDM_SETPOS, 0, p->avatarRadius);
+
+ SendDlgItemMessage(hwndDlg, IDC_AVATARSIZESPIN, UDM_SETRANGE, 0, MAKELONG(100, 16));
+ SendDlgItemMessage(hwndDlg, IDC_AVATARSIZESPIN, UDM_SETPOS, 0, p->avatarSize);
+
+ Utils::enableDlgControl(hwndDlg, IDC_RADIUS, IsDlgButtonChecked(hwndDlg, IDC_AVATARSROUNDED) ? TRUE : FALSE);
+ Utils::enableDlgControl(hwndDlg, IDC_RADIUSSPIN, IsDlgButtonChecked(hwndDlg, IDC_AVATARSROUNDED) ? TRUE : FALSE);
+ Utils::enableDlgControl(hwndDlg, IDC_AVATARBORDERCLR, IsDlgButtonChecked(hwndDlg, IDC_AVATARSBORDER) ? TRUE : FALSE);
+
+ CheckDlgButton(hwndDlg, IDC_SHOWLOCALTIME, p->bShowLocalTime ? 1 : 0);
+ CheckDlgButton(hwndDlg, IDC_SHOWLOCALTIMEONLYWHENDIFFERENT, p->bShowLocalTimeSelective ? 1 : 0);
+ Utils::enableDlgControl(hwndDlg, IDC_SHOWLOCALTIMEONLYWHENDIFFERENT, IsDlgButtonChecked(hwndDlg, IDC_SHOWLOCALTIME));
+
+ if (p->dwFlags & CLUI_FRAME_AVATARSLEFT)
+ SendDlgItemMessage(hwndDlg, IDC_ALIGNMENT, CB_SETCURSEL, 1, 0);
+ else if (p->dwFlags & CLUI_FRAME_AVATARSRIGHT)
+ SendDlgItemMessage(hwndDlg, IDC_ALIGNMENT, CB_SETCURSEL, 2, 0);
+ else if (p->dwFlags & CLUI_FRAME_AVATARSRIGHTWITHNICK)
+ SendDlgItemMessage(hwndDlg, IDC_ALIGNMENT, CB_SETCURSEL, 3, 0);
+ else
+ SendDlgItemMessage(hwndDlg, IDC_ALIGNMENT, CB_SETCURSEL, 0, 0);
+ }
+ return 0;
+
+ case WM_USER + 200:
+ p = (DISPLAYPROFILE *)lParam;
+ if (p) {
+ LRESULT sel = SendDlgItemMessage(hwndDlg, IDC_ALIGNMENT, CB_GETCURSEL, 0, 0);
+ BOOL translated;
+
+ if (sel != CB_ERR) {
+ if (sel == 1)
+ p->dwFlags |= CLUI_FRAME_AVATARSLEFT;
+ else if (sel == 2)
+ p->dwFlags |= CLUI_FRAME_AVATARSRIGHT;
+ else if (sel == 3)
+ p->dwFlags |= CLUI_FRAME_AVATARSRIGHTWITHNICK;
+ }
+
+ p->dwFlags |= ((IsDlgButtonChecked(hwndDlg, IDC_CLISTAVATARS) ? CLUI_FRAME_AVATARS : 0) |
+ (IsDlgButtonChecked(hwndDlg, IDC_AVATARSBORDER) ? CLUI_FRAME_AVATARBORDER : 0) |
+ (IsDlgButtonChecked(hwndDlg, IDC_AVATARSROUNDED) ? CLUI_FRAME_ROUNDAVATAR : 0) |
+ (IsDlgButtonChecked(hwndDlg, IDC_ALWAYSALIGNNICK) ? CLUI_FRAME_ALWAYSALIGNNICK : 0) |
+ (IsDlgButtonChecked(hwndDlg, IDC_SHOWSTATUSMSG) ? CLUI_FRAME_SHOWSTATUSMSG : 0));
+
+ p->avatarBorder = SendDlgItemMessage(hwndDlg, IDC_AVATARBORDERCLR, CPM_GETCOLOUR, 0, 0);
+ p->avatarRadius = GetDlgItemInt(hwndDlg, IDC_RADIUS, &translated, FALSE);
+ p->avatarSize = GetDlgItemInt(hwndDlg, IDC_AVATARHEIGHT, &translated, FALSE);
+ p->bNoOfflineAvatars = IsDlgButtonChecked(hwndDlg, IDC_NOAVATARSOFFLINE) ? TRUE : FALSE;
+ p->bShowLocalTime = IsDlgButtonChecked(hwndDlg, IDC_SHOWLOCALTIME) ? 1 : 0;
+ p->bShowLocalTimeSelective = IsDlgButtonChecked(hwndDlg, IDC_SHOWLOCALTIMEONLYWHENDIFFERENT) ? 1 : 0;
+
+ p->dualRowMode = (BYTE)SendDlgItemMessage(hwndDlg, IDC_DUALROWMODE, CB_GETCURSEL, 0, 0);
+ if (p->dualRowMode == CB_ERR)
+ p->dualRowMode = 0;
+ }
+ return 0;
+
+ case WM_NOTIFY:
switch (((LPNMHDR) lParam)->code) {
case PSN_APPLY:
- {
- return TRUE;
- }
+ return TRUE;
}
break;
}
@@ -847,9 +813,9 @@ ORDERTREEDATA OrderTreeData[]=
{EXTRA_ICON_ADV2, _T("Advanced #2"), 4, TRUE, 0},
{EXTRA_ICON_WEB, _T("Homepage"), 1, TRUE, 0},
{EXTRA_ICON_CLIENT, _T("Client (fingerprint required)"), 10, TRUE, 0},
- {EXTRA_ICON_RES2, _T("Reserved #2"), 8, TRUE, 0},
- {EXTRA_ICON_ADV3, _T("Advanced #3"), 5, TRUE, 0},
- {EXTRA_ICON_ADV4, _T("Advanced #4"), 6, TRUE, 0},
+ {EXTRA_ICON_RES2, _T("Reserved #2"), 8, TRUE, 0},
+ {EXTRA_ICON_ADV3, _T("Advanced #3"), 5, TRUE, 0},
+ {EXTRA_ICON_ADV4, _T("Advanced #4"), 6, TRUE, 0},
};
static int dragging=0;
@@ -857,81 +823,66 @@ static HTREEITEM hDragItem=NULL;
static int FillOrderTree(HWND hwndDlg, HWND hwndTree, BYTE *exIconOrder, unsigned dwExtraImageMask)
{
- int i = 0;
TVINSERTSTRUCT tvis = {0};
TreeView_DeleteAllItems(hwndTree);
tvis.hInsertAfter = TVI_LAST;
tvis.item.mask = TVIF_PARAM | TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE;
- for (i = 0; i < EXICON_COUNT; i++) {
- int iIndex = (int)(exIconOrder[i] - 1);
+ for (int i = 0; i < EXICON_COUNT; i++) {
+ int iIndex = (int)(exIconOrder[i] - 1);
tvis.item.lParam=(LPARAM)(&(OrderTreeData[iIndex]));
tvis.item.pszText = TranslateTS(OrderTreeData[iIndex].Name);
- OrderTreeData[iIndex].Visible = (dwExtraImageMask & (1 << OrderTreeData[iIndex].ID)) != 0;
+ OrderTreeData[iIndex].Visible = (dwExtraImageMask & (1 << OrderTreeData[iIndex].ID)) != 0;
tvis.item.iImage = tvis.item.iSelectedImage = OrderTreeData[iIndex].Visible;
TreeView_InsertItem(hwndTree, &tvis);
}
- /*
- {
- TVSORTCB sort={0};
- sort.hParent=NULL;
- sort.lParam=0;
- sort.lpfnCompare=CompareFunc;
- TreeView_SortChildrenCB(Tree,&sort,0);
- }
- */
+
return 0;
}
static int SaveOrderTree(HWND hwndDlg, HWND hwndTree, DISPLAYPROFILE *p)
{
- HTREEITEM ht;
TVITEM tvi = {0};
- int iIndex = 0;
-
tvi.mask = TVIF_HANDLE | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_PARAM;
- ht = TreeView_GetRoot(hwndTree);
- p->dwExtraImageMask = 0;
+ p->dwExtraImageMask = 0;
- do {
- ORDERTREEDATA *it = NULL;
+ HTREEITEM ht = TreeView_GetRoot(hwndTree);
+ for (int iIndex = 0; ht != NULL; iIndex++) {
tvi.hItem = ht;
TreeView_GetItem(hwndTree, &tvi);
- it = (ORDERTREEDATA *)(tvi.lParam);
- p->exIconOrder[iIndex] = it->ID + 1;
- p->dwExtraImageMask |= (it->Visible ? (1 << it->ID) : 0);
+ ORDERTREEDATA *it = (ORDERTREEDATA *)(tvi.lParam);
+ p->exIconOrder[iIndex] = it->ID + 1;
+ p->dwExtraImageMask |= (it->Visible ? (1 << it->ID) : 0);
ht = TreeView_GetNextSibling(hwndTree, ht);
- iIndex++;
- } while (ht);
+ }
+
return 0;
}
static INT_PTR CALLBACK DlgProcXIcons(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
+ DISPLAYPROFILE *p;
+
switch (msg) {
case WM_INITDIALOG:
- {
- TranslateDialogDefault(hwndDlg);
- SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_EXTRAORDER), GWL_STYLE, GetWindowLongPtr(GetDlgItem(hwndDlg,IDC_EXTRAORDER),GWL_STYLE)|TVS_NOHSCROLL);
- {
- if(himlCheckBoxes == 0) {
- CreateStateImageList();
- }
- TreeView_SetImageList(GetDlgItem(hwndDlg,IDC_EXTRAORDER), himlCheckBoxes, TVSIL_NORMAL);
- }
- return TRUE;
- }
+ TranslateDialogDefault(hwndDlg);
+ SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_EXTRAORDER), GWL_STYLE, GetWindowLongPtr(GetDlgItem(hwndDlg,IDC_EXTRAORDER),GWL_STYLE)|TVS_NOHSCROLL);
+
+ if (himlCheckBoxes == 0)
+ CreateStateImageList();
+
+ TreeView_SetImageList(GetDlgItem(hwndDlg,IDC_EXTRAORDER), himlCheckBoxes, TVSIL_NORMAL);
+ return TRUE;
+
case WM_COMMAND:
if ((LOWORD(wParam) == IDC_EXICONSCALE) && (HIWORD(wParam) != EN_CHANGE || (HWND) lParam != GetFocus()))
return 0;
- if(IDC_RESETXICONS == LOWORD(wParam))
- {
+ if (IDC_RESETXICONS == LOWORD(wParam)) {
BYTE exIconOrder[EXICON_COUNT];
- for(int i = 0; i < EXICON_COUNT; i++)
- {
+ for (int i = 0; i < EXICON_COUNT; i++) {
OrderTreeData[i].Visible = TRUE;
exIconOrder[i] = i + 1;
}
@@ -940,161 +891,147 @@ static INT_PTR CALLBACK DlgProcXIcons(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
- case WM_USER + 100:
- {
- DISPLAYPROFILE *p = (DISPLAYPROFILE *)lParam;
- if(p) {
- CheckDlgButton(hwndDlg, IDC_XSTATUSASSTATUS, p->dwFlags & CLUI_FRAME_USEXSTATUSASSTATUS ? 1 : 0);
-
- CheckDlgButton(hwndDlg, IDC_SHOWSTATUSICONS, (p->dwFlags & CLUI_FRAME_STATUSICONS) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SHOWVISIBILITY, (p->dwFlags & CLUI_SHOWVISI) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SHOWMETA, (p->dwFlags & CLUI_USEMETAICONS) ? BST_CHECKED : BST_UNCHECKED);
-
- CheckDlgButton(hwndDlg, IDC_OVERLAYICONS, (p->dwFlags & CLUI_FRAME_OVERLAYICONS) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SELECTIVEICONS, (p->dwFlags & CLUI_FRAME_SELECTIVEICONS) ? BST_CHECKED : BST_UNCHECKED);
-
- CheckDlgButton(hwndDlg, IDC_STATUSICONSCENTERED, p->bCenterStatusIcons ? 1 : 0);
- CheckDlgButton(hwndDlg, IDC_IDLE, p->bDimIdle ? BST_CHECKED : BST_UNCHECKED);
-
- SendDlgItemMessage(hwndDlg, IDC_EXICONSCALESPIN, UDM_SETRANGE, 0, MAKELONG(20, 8));
- SendDlgItemMessage(hwndDlg, IDC_EXICONSCALESPIN, UDM_SETPOS, 0, (LPARAM)p->exIconScale);
- FillOrderTree(hwndDlg, GetDlgItem(hwndDlg, IDC_EXTRAORDER), p->exIconOrder, p->dwExtraImageMask);
- }
- return 0;
- }
- case WM_USER + 200:
- {
- DISPLAYPROFILE *p = (DISPLAYPROFILE *)lParam;
- if(p) {
- SaveOrderTree(hwndDlg, GetDlgItem(hwndDlg, IDC_EXTRAORDER), p);
-
- p->exIconScale = SendDlgItemMessage(hwndDlg, IDC_EXICONSCALESPIN, UDM_GETPOS, 0, 0);
- p->exIconScale = (p->exIconScale < 8 || p->exIconScale > 20) ? 16 : p->exIconScale;
-
- p->dwFlags |= ((IsDlgButtonChecked(hwndDlg, IDC_SHOWSTATUSICONS) ? CLUI_FRAME_STATUSICONS : 0) |
- (IsDlgButtonChecked(hwndDlg, IDC_SHOWVISIBILITY) ? CLUI_SHOWVISI : 0) |
- (IsDlgButtonChecked(hwndDlg, IDC_SHOWMETA) ? CLUI_USEMETAICONS : 0) |
- (IsDlgButtonChecked(hwndDlg, IDC_OVERLAYICONS) ? CLUI_FRAME_OVERLAYICONS : 0) |
- (IsDlgButtonChecked(hwndDlg, IDC_XSTATUSASSTATUS) ? CLUI_FRAME_USEXSTATUSASSTATUS : 0) |
- (IsDlgButtonChecked(hwndDlg, IDC_SELECTIVEICONS) ? CLUI_FRAME_SELECTIVEICONS : 0));
-
- p->bDimIdle = IsDlgButtonChecked(hwndDlg, IDC_IDLE) ? 1 : 0;
- p->bCenterStatusIcons = IsDlgButtonChecked(hwndDlg, IDC_STATUSICONSCENTERED) ? 1 : 0;
- }
- return 0;
- }
- case WM_NOTIFY:
- if (((LPNMHDR) lParam)->idFrom == IDC_EXTRAORDER) {
- switch (((LPNMHDR)lParam)->code) {
- case TVN_BEGINDRAGA:
- case TVN_BEGINDRAGW:
- SetCapture(hwndDlg);
- dragging=1;
- hDragItem=((LPNMTREEVIEWA)lParam)->itemNew.hItem;
- TreeView_SelectItem(GetDlgItem(hwndDlg,IDC_EXTRAORDER),hDragItem);
- break;
- case NM_CLICK:
- {
- TVHITTESTINFO hti;
- hti.pt.x=(short)LOWORD(GetMessagePos());
- hti.pt.y=(short)HIWORD(GetMessagePos());
- ScreenToClient(((LPNMHDR)lParam)->hwndFrom,&hti.pt);
- if(TreeView_HitTest(((LPNMHDR)lParam)->hwndFrom,&hti))
- if(hti.flags&TVHT_ONITEMICON)
- {
- TVITEMA tvi;
- tvi.mask=TVIF_HANDLE|TVIF_IMAGE|TVIF_SELECTEDIMAGE;
- tvi.hItem=hti.hItem;
- TreeView_GetItem(((LPNMHDR)lParam)->hwndFrom,&tvi);
- tvi.iImage=tvi.iSelectedImage=!tvi.iImage;
- ((ORDERTREEDATA *)tvi.lParam)->Visible=tvi.iImage;
- TreeView_SetItem(((LPNMHDR)lParam)->hwndFrom,&tvi);
- SendMessage((GetParent(hwndDlg)), PSM_CHANGED, (WPARAM)hwndDlg, 0);
- }
-
- }
- }
- break;
- }
+ case WM_USER + 100:
+ p = (DISPLAYPROFILE *)lParam;
+ if (p) {
+ CheckDlgButton(hwndDlg, IDC_XSTATUSASSTATUS, p->dwFlags & CLUI_FRAME_USEXSTATUSASSTATUS ? 1 : 0);
+
+ CheckDlgButton(hwndDlg, IDC_SHOWSTATUSICONS, (p->dwFlags & CLUI_FRAME_STATUSICONS) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_SHOWVISIBILITY, (p->dwFlags & CLUI_SHOWVISI) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_SHOWMETA, (p->dwFlags & CLUI_USEMETAICONS) ? BST_CHECKED : BST_UNCHECKED);
+
+ CheckDlgButton(hwndDlg, IDC_OVERLAYICONS, (p->dwFlags & CLUI_FRAME_OVERLAYICONS) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_SELECTIVEICONS, (p->dwFlags & CLUI_FRAME_SELECTIVEICONS) ? BST_CHECKED : BST_UNCHECKED);
+
+ CheckDlgButton(hwndDlg, IDC_STATUSICONSCENTERED, p->bCenterStatusIcons ? 1 : 0);
+ CheckDlgButton(hwndDlg, IDC_IDLE, p->bDimIdle ? BST_CHECKED : BST_UNCHECKED);
+
+ SendDlgItemMessage(hwndDlg, IDC_EXICONSCALESPIN, UDM_SETRANGE, 0, MAKELONG(20, 8));
+ SendDlgItemMessage(hwndDlg, IDC_EXICONSCALESPIN, UDM_SETPOS, 0, (LPARAM)p->exIconScale);
+ FillOrderTree(hwndDlg, GetDlgItem(hwndDlg, IDC_EXTRAORDER), p->exIconOrder, p->dwExtraImageMask);
+ }
+ return 0;
+
+ case WM_USER + 200:
+ p = (DISPLAYPROFILE *)lParam;
+ if (p) {
+ SaveOrderTree(hwndDlg, GetDlgItem(hwndDlg, IDC_EXTRAORDER), p);
+
+ p->exIconScale = SendDlgItemMessage(hwndDlg, IDC_EXICONSCALESPIN, UDM_GETPOS, 0, 0);
+ p->exIconScale = (p->exIconScale < 8 || p->exIconScale > 20) ? 16 : p->exIconScale;
+
+ p->dwFlags |= ((IsDlgButtonChecked(hwndDlg, IDC_SHOWSTATUSICONS) ? CLUI_FRAME_STATUSICONS : 0) |
+ (IsDlgButtonChecked(hwndDlg, IDC_SHOWVISIBILITY) ? CLUI_SHOWVISI : 0) |
+ (IsDlgButtonChecked(hwndDlg, IDC_SHOWMETA) ? CLUI_USEMETAICONS : 0) |
+ (IsDlgButtonChecked(hwndDlg, IDC_OVERLAYICONS) ? CLUI_FRAME_OVERLAYICONS : 0) |
+ (IsDlgButtonChecked(hwndDlg, IDC_XSTATUSASSTATUS) ? CLUI_FRAME_USEXSTATUSASSTATUS : 0) |
+ (IsDlgButtonChecked(hwndDlg, IDC_SELECTIVEICONS) ? CLUI_FRAME_SELECTIVEICONS : 0));
+
+ p->bDimIdle = IsDlgButtonChecked(hwndDlg, IDC_IDLE) ? 1 : 0;
+ p->bCenterStatusIcons = IsDlgButtonChecked(hwndDlg, IDC_STATUSICONSCENTERED) ? 1 : 0;
+ }
+ return 0;
+
+ case WM_NOTIFY:
+ if (((LPNMHDR) lParam)->idFrom == IDC_EXTRAORDER) {
+ switch (((LPNMHDR)lParam)->code) {
+ case TVN_BEGINDRAGA:
+ case TVN_BEGINDRAGW:
+ SetCapture(hwndDlg);
+ dragging=1;
+ hDragItem=((LPNMTREEVIEWA)lParam)->itemNew.hItem;
+ TreeView_SelectItem(GetDlgItem(hwndDlg,IDC_EXTRAORDER),hDragItem);
+ break;
+ case NM_CLICK:
+ {
+ TVHITTESTINFO hti;
+ hti.pt.x=(short)LOWORD(GetMessagePos());
+ hti.pt.y=(short)HIWORD(GetMessagePos());
+ ScreenToClient(((LPNMHDR)lParam)->hwndFrom,&hti.pt);
+ if (TreeView_HitTest(((LPNMHDR)lParam)->hwndFrom,&hti))
+ if (hti.flags&TVHT_ONITEMICON)
+ {
+ TVITEMA tvi;
+ tvi.mask=TVIF_HANDLE|TVIF_IMAGE|TVIF_SELECTEDIMAGE;
+ tvi.hItem=hti.hItem;
+ TreeView_GetItem(((LPNMHDR)lParam)->hwndFrom,&tvi);
+ tvi.iImage=tvi.iSelectedImage=!tvi.iImage;
+ ((ORDERTREEDATA *)tvi.lParam)->Visible=tvi.iImage;
+ TreeView_SetItem(((LPNMHDR)lParam)->hwndFrom,&tvi);
+ SendMessage((GetParent(hwndDlg)), PSM_CHANGED, (WPARAM)hwndDlg, 0);
+ }
+ }
+ }
+ break;
+ }
switch (((LPNMHDR) lParam)->code) {
case PSN_APPLY:
- {
- return TRUE;
- }
+ return TRUE;
}
break;
case WM_MOUSEMOVE:
- {
- if (!dragging)
- break;
- {
- TVHITTESTINFO hti;
- hti.pt.x = (short)LOWORD(lParam);
- hti.pt.y = (short)HIWORD(lParam);
- ClientToScreen(hwndDlg, &hti.pt);
- ScreenToClient(GetDlgItem(hwndDlg, IDC_EXTRAORDER), &hti.pt);
- TreeView_HitTest(GetDlgItem(hwndDlg,IDC_EXTRAORDER), &hti);
- if(hti.flags&(TVHT_ONITEM|TVHT_ONITEMRIGHT)) {
- HTREEITEM it = hti.hItem;
- hti.pt.y -= TreeView_GetItemHeight(GetDlgItem(hwndDlg, IDC_EXTRAORDER)) / 2;
- TreeView_HitTest(GetDlgItem(hwndDlg, IDC_EXTRAORDER), &hti);
- //TreeView_SetInsertMark(GetDlgItem(hwndDlg,IDC_EXTRAORDER),hti.hItem,1);
- if (!(hti.flags & TVHT_ABOVE))
- TreeView_SetInsertMark(GetDlgItem(hwndDlg, IDC_EXTRAORDER), hti.hItem, 1);
- else
- TreeView_SetInsertMark(GetDlgItem(hwndDlg, IDC_EXTRAORDER), it, 0);
- }
- else {
- if(hti.flags & TVHT_ABOVE) SendDlgItemMessage(hwndDlg,IDC_EXTRAORDER, WM_VSCROLL, MAKEWPARAM(SB_LINEUP, 0), 0);
- if(hti.flags & TVHT_BELOW) SendDlgItemMessage(hwndDlg, IDC_EXTRAORDER, WM_VSCROLL, MAKEWPARAM(SB_LINEDOWN, 0), 0);
- TreeView_SetInsertMark(GetDlgItem(hwndDlg, IDC_EXTRAORDER), NULL, 0);
- }
+ if (dragging) {
+ TVHITTESTINFO hti;
+ hti.pt.x = (short)LOWORD(lParam);
+ hti.pt.y = (short)HIWORD(lParam);
+ ClientToScreen(hwndDlg, &hti.pt);
+ ScreenToClient(GetDlgItem(hwndDlg, IDC_EXTRAORDER), &hti.pt);
+ TreeView_HitTest(GetDlgItem(hwndDlg,IDC_EXTRAORDER), &hti);
+ if (hti.flags&(TVHT_ONITEM|TVHT_ONITEMRIGHT)) {
+ HTREEITEM it = hti.hItem;
+ hti.pt.y -= TreeView_GetItemHeight(GetDlgItem(hwndDlg, IDC_EXTRAORDER)) / 2;
+ TreeView_HitTest(GetDlgItem(hwndDlg, IDC_EXTRAORDER), &hti);
+ //TreeView_SetInsertMark(GetDlgItem(hwndDlg,IDC_EXTRAORDER),hti.hItem,1);
+ if (!(hti.flags & TVHT_ABOVE))
+ TreeView_SetInsertMark(GetDlgItem(hwndDlg, IDC_EXTRAORDER), hti.hItem, 1);
+ else
+ TreeView_SetInsertMark(GetDlgItem(hwndDlg, IDC_EXTRAORDER), it, 0);
+ }
+ else {
+ if (hti.flags & TVHT_ABOVE) SendDlgItemMessage(hwndDlg,IDC_EXTRAORDER, WM_VSCROLL, MAKEWPARAM(SB_LINEUP, 0), 0);
+ if (hti.flags & TVHT_BELOW) SendDlgItemMessage(hwndDlg, IDC_EXTRAORDER, WM_VSCROLL, MAKEWPARAM(SB_LINEDOWN, 0), 0);
+ TreeView_SetInsertMark(GetDlgItem(hwndDlg, IDC_EXTRAORDER), NULL, 0);
}
}
break;
+
case WM_LBUTTONUP:
- {
- if (!dragging) break;
+ if (dragging) {
TreeView_SetInsertMark(GetDlgItem(hwndDlg,IDC_EXTRAORDER),NULL,0);
dragging=0;
ReleaseCapture();
- {
- TVHITTESTINFO hti;
- TVITEM tvi;
- hti.pt.x=(short)LOWORD(lParam);
- hti.pt.y=(short)HIWORD(lParam);
- ClientToScreen(hwndDlg,&hti.pt);
- ScreenToClient(GetDlgItem(hwndDlg,IDC_EXTRAORDER),&hti.pt);
- hti.pt.y-=TreeView_GetItemHeight(GetDlgItem(hwndDlg,IDC_EXTRAORDER))/2;
- TreeView_HitTest(GetDlgItem(hwndDlg,IDC_EXTRAORDER),&hti);
- if(hDragItem==hti.hItem) break;
- if (hti.flags&TVHT_ABOVE) hti.hItem=TVI_FIRST;
- tvi.mask=TVIF_HANDLE|TVIF_PARAM;
- tvi.hItem=hDragItem;
- TreeView_GetItem(GetDlgItem(hwndDlg,IDC_EXTRAORDER),&tvi);
- if(hti.flags&(TVHT_ONITEM|TVHT_ONITEMRIGHT)||(hti.hItem==TVI_FIRST))
- {
- TVINSERTSTRUCT tvis;
- TCHAR name[128];
- tvis.item.mask=TVIF_HANDLE|TVIF_PARAM|TVIF_TEXT|TVIF_IMAGE|TVIF_SELECTEDIMAGE;
- tvis.item.stateMask=0xFFFFFFFF;
- tvis.item.pszText=name;
- tvis.item.cchTextMax=sizeof(name);
- tvis.item.hItem=hDragItem;
- tvis.item.iImage=tvis.item.iSelectedImage=((ORDERTREEDATA *)tvi.lParam)->Visible;
- TreeView_GetItem(GetDlgItem(hwndDlg,IDC_EXTRAORDER),&tvis.item);
- TreeView_DeleteItem(GetDlgItem(hwndDlg,IDC_EXTRAORDER),hDragItem);
- tvis.hParent=NULL;
- tvis.hInsertAfter=hti.hItem;
- TreeView_SelectItem(GetDlgItem(hwndDlg,IDC_EXTRAORDER),TreeView_InsertItem(GetDlgItem(hwndDlg,IDC_EXTRAORDER),&tvis));
- SendMessage((GetParent(hwndDlg)), PSM_CHANGED, (WPARAM)hwndDlg, 0);
- }
+
+ TVHITTESTINFO hti;
+ TVITEM tvi;
+ hti.pt.x=(short)LOWORD(lParam);
+ hti.pt.y=(short)HIWORD(lParam);
+ ClientToScreen(hwndDlg,&hti.pt);
+ ScreenToClient(GetDlgItem(hwndDlg,IDC_EXTRAORDER),&hti.pt);
+ hti.pt.y-=TreeView_GetItemHeight(GetDlgItem(hwndDlg,IDC_EXTRAORDER))/2;
+ TreeView_HitTest(GetDlgItem(hwndDlg,IDC_EXTRAORDER),&hti);
+ if (hDragItem==hti.hItem) break;
+ if (hti.flags&TVHT_ABOVE) hti.hItem=TVI_FIRST;
+ tvi.mask=TVIF_HANDLE|TVIF_PARAM;
+ tvi.hItem=hDragItem;
+ TreeView_GetItem(GetDlgItem(hwndDlg,IDC_EXTRAORDER),&tvi);
+ if (hti.flags&(TVHT_ONITEM|TVHT_ONITEMRIGHT)||(hti.hItem==TVI_FIRST)) {
+ TVINSERTSTRUCT tvis;
+ TCHAR name[128];
+ tvis.item.mask=TVIF_HANDLE|TVIF_PARAM|TVIF_TEXT|TVIF_IMAGE|TVIF_SELECTEDIMAGE;
+ tvis.item.stateMask=0xFFFFFFFF;
+ tvis.item.pszText=name;
+ tvis.item.cchTextMax=sizeof(name);
+ tvis.item.hItem=hDragItem;
+ tvis.item.iImage=tvis.item.iSelectedImage=((ORDERTREEDATA *)tvi.lParam)->Visible;
+ TreeView_GetItem(GetDlgItem(hwndDlg,IDC_EXTRAORDER),&tvis.item);
+ TreeView_DeleteItem(GetDlgItem(hwndDlg,IDC_EXTRAORDER),hDragItem);
+ tvis.hParent=NULL;
+ tvis.hInsertAfter=hti.hItem;
+ TreeView_SelectItem(GetDlgItem(hwndDlg,IDC_EXTRAORDER),TreeView_InsertItem(GetDlgItem(hwndDlg,IDC_EXTRAORDER),&tvis));
+ SendMessage((GetParent(hwndDlg)), PSM_CHANGED, (WPARAM)hwndDlg, 0);
}
}
- case WM_DESTROY: {
- break;
- }
break;
}
return FALSE;
@@ -1105,607 +1042,583 @@ static DISPLAYPROFILE dsp_current;
static INT_PTR CALLBACK DlgProcDspProfiles(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
- static int iInit = TRUE;
- static HWND hwndTab;
- static int iTabCount;
-
- switch(msg)
- {
- case WM_INITDIALOG:
- {
- TCITEM tci;
- RECT rcClient;
- int oPage = cfg::getByte("CLUI", "opage_d", 0);
- HWND hwndAdd;
- DISPLAYPROFILE dsp_default;
-
- TranslateDialogDefault(hwnd);
- hwndList = GetDlgItem(hwnd, IDC_PROFILELIST);
-
- hwndAdd = GetDlgItem(hwnd, IDC_DSP_ADD);
- SendMessage(hwndAdd, BUTTONSETASFLATBTN, 0, 1);
- SendMessage(hwndAdd, BUTTONSETASFLATBTN + 10, 0, 1);
- SendMessage(hwndAdd, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_ADDCONTACT), IMAGE_ICON, 16, 16, LR_SHARED));
- SetWindowText(hwndAdd, TranslateT("Add New..."));
-
- hwndAdd = GetDlgItem(hwnd, IDC_DSP_DELETE);
- SendMessage(hwndAdd, BUTTONSETASFLATBTN, 0, 1);
- SendMessage(hwndAdd, BUTTONSETASFLATBTN + 10, 0, 1);
- SendMessage(hwndAdd, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_DELETE), IMAGE_ICON, 16, 16, LR_SHARED));
- SetWindowText(hwndAdd, TranslateT("Delete"));
-
- hwndAdd = GetDlgItem(hwnd, IDC_DSP_RENAME);
- SendMessage(hwndAdd, BUTTONSETASFLATBTN, 0, 1);
- SendMessage(hwndAdd, BUTTONSETASFLATBTN + 10, 0, 1);
- SendMessage(hwndAdd, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_RENAME), IMAGE_ICON, 16, 16, LR_SHARED));
- SetWindowText(hwndAdd, TranslateT("Rename..."));
-
- hwndAdd = GetDlgItem(hwnd, IDC_DSP_APPLY);
- SendMessage(hwndAdd, BUTTONSETASFLATBTN, 0, 1);
- SendMessage(hwndAdd, BUTTONSETASFLATBTN + 10, 0, 1);
- SendMessage(hwndAdd, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_OPTIONS), IMAGE_ICON, 16, 16, LR_SHARED));
- SetWindowText(hwndAdd, TranslateT("Apply this profile"));
-
- GetClientRect(hwnd, &rcClient);
- hwndTab = GetDlgItem(hwnd, IDC_OPTIONSTAB);
- iInit = TRUE;
- tci.mask = TCIF_PARAM|TCIF_TEXT;
-
- tci.lParam = (LPARAM)CreateDialog(g_hInst,MAKEINTRESOURCE(IDD_OPT_DSPITEMS), hwnd, DlgProcDspItems);
- tci.pszText = TranslateT("Contacts");
- TabCtrl_InsertItem(hwndTab, 0, &tci);
- MoveWindow((HWND)tci.lParam,64,25,rcClient.right-128,rcClient.bottom-67,1);
- ShowWindow((HWND)tci.lParam, oPage == 0 ? SW_SHOW : SW_HIDE);
- if(IS_THEMED)
- API::pfnEnableThemeDialogTexture((HWND)tci.lParam, ETDT_ENABLETAB);
-
- tci.lParam = (LPARAM)CreateDialog(g_hInst,MAKEINTRESOURCE(IDD_OPT_DSPGROUPS), hwnd, DlgProcDspGroups);
- tci.pszText = TranslateT("Groups and layout");
- TabCtrl_InsertItem(hwndTab, 1, &tci);
- MoveWindow((HWND)tci.lParam,64,25,rcClient.right-128,rcClient.bottom-67,1);
- ShowWindow((HWND)tci.lParam, oPage == 1 ? SW_SHOW : SW_HIDE);
- if(IS_THEMED)
- API::pfnEnableThemeDialogTexture((HWND)tci.lParam, ETDT_ENABLETAB);
-
- tci.lParam = (LPARAM)CreateDialog(g_hInst,MAKEINTRESOURCE(IDD_OPT_XICONS), hwnd, DlgProcXIcons);
- tci.pszText = TranslateT("Icons");
- TabCtrl_InsertItem(hwndTab, 2, &tci);
- MoveWindow((HWND)tci.lParam,64,25,rcClient.right-128,rcClient.bottom-67,1);
- ShowWindow((HWND)tci.lParam, oPage == 2 ? SW_SHOW : SW_HIDE);
- if(IS_THEMED)
- API::pfnEnableThemeDialogTexture((HWND)tci.lParam, ETDT_ENABLETAB);
-
- tci.lParam = (LPARAM)CreateDialog(g_hInst,MAKEINTRESOURCE(IDD_OPT_DSPADVANCED), hwnd, DlgProcDspAdvanced);
- tci.pszText = TranslateT("Advanced");
- TabCtrl_InsertItem(hwndTab, 3, &tci);
- MoveWindow((HWND)tci.lParam,64,25,rcClient.right-128,rcClient.bottom-67,1);
- ShowWindow((HWND)tci.lParam, oPage == 3 ? SW_SHOW : SW_HIDE);
- if(IS_THEMED)
- API::pfnEnableThemeDialogTexture((HWND)tci.lParam, ETDT_ENABLETAB);
-
- TabCtrl_SetCurSel(GetDlgItem(hwnd, IDC_OPTIONSTAB), oPage);
-
- DSP_LoadFromDefaults(&dsp_default);
- CopyMemory(&dsp_current, &dsp_default, sizeof(DISPLAYPROFILE));
-
- iTabCount = TabCtrl_GetItemCount(hwndTab);
-
- SendMessage(hwnd, WM_USER + 100, 0, (LPARAM)&dsp_default);
- SendMessage(hwndList, LB_INSERTSTRING, 0, (LPARAM)TranslateT("<current>"));
-
- hwndList = GetDlgItem(hwnd, IDC_CLASSLIST);
- SendMessage(hwndList, LB_INSERTSTRING, 0, (LPARAM)TranslateT("Default"));
- SendMessage(hwndList, LB_INSERTSTRING, 1, (LPARAM)TranslateT("Offline contact"));
- SendMessage(hwndList, LB_INSERTSTRING, 2, (LPARAM)TranslateT("Selected contact"));
- SendMessage(hwndList, LB_INSERTSTRING, 3, (LPARAM)TranslateT("Hottracked contact"));
-
- iInit = FALSE;
- return FALSE;
- }
-
- /*
- * distribute a WM_USER message to all child windows so they can update their pages from the
- * display profile structure
- * LPARAM = DISPLAYPROFILE *
- */
-
- case WM_USER + 100:
- {
- DISPLAYPROFILE *p = (DISPLAYPROFILE *)lParam;
-
- if(p) {
- int i;
- TCITEM item = {0};
- item.mask = TCIF_PARAM;
-
- for(i = 0; i < iTabCount; i++) {
- TabCtrl_GetItem(hwndTab, i, &item);
- if(item.lParam && IsWindow((HWND)item.lParam))
- SendMessage((HWND)item.lParam, WM_USER + 100, 0, (LPARAM)p);
- }
- }
- return 0;
- }
-
- /*
- * collect the settings from the pages into a DISPLAYPROFILE struct
- */
- case WM_USER + 200:
- {
- DISPLAYPROFILE *p = (DISPLAYPROFILE *)lParam;
- int i;
- TCITEM item = {0};
- item.mask = TCIF_PARAM;
-
- for(i = 0; i < iTabCount; i++) {
- TabCtrl_GetItem(hwndTab, i, &item);
- if(item.lParam && IsWindow((HWND)item.lParam))
- SendMessage((HWND)item.lParam, WM_USER + 200, 0, (LPARAM)p);
- }
- return 0;
- }
-
- case PSM_CHANGED: // used so tabs dont have to call SendMessage(GetParent(GetParent(hwnd)), PSM_CHANGED, 0, 0);
- if (!iInit)
- SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
- break;
- case WM_NOTIFY:
- switch(((LPNMHDR)lParam)->idFrom) {
- case 0:
- switch (((LPNMHDR)lParam)->code)
- {
- case PSN_APPLY:
- {
- DISPLAYPROFILE p;
-
- ZeroMemory(&p, sizeof(DISPLAYPROFILE));
- SendMessage(hwnd, WM_USER + 200, 0, (LPARAM)&p);
- DSP_Apply(&p);
- }
- break;
- }
- break;
- case IDC_OPTIONSTAB:
- switch (((LPNMHDR)lParam)->code)
- {
- case TCN_SELCHANGING:
- {
- TCITEM tci;
- tci.mask = TCIF_PARAM;
- TabCtrl_GetItem(GetDlgItem(hwnd,IDC_OPTIONSTAB),TabCtrl_GetCurSel(GetDlgItem(hwnd,IDC_OPTIONSTAB)),&tci);
- ShowWindow((HWND)tci.lParam,SW_HIDE);
- }
- break;
- case TCN_SELCHANGE:
- {
- TCITEM tci;
- tci.mask = TCIF_PARAM;
- TabCtrl_GetItem(GetDlgItem(hwnd,IDC_OPTIONSTAB),TabCtrl_GetCurSel(GetDlgItem(hwnd,IDC_OPTIONSTAB)),&tci);
- ShowWindow((HWND)tci.lParam,SW_SHOW);
- cfg::writeByte("CLUI", "opage_d", (BYTE)TabCtrl_GetCurSel(GetDlgItem(hwnd, IDC_OPTIONSTAB)));
- }
- break;
- }
- break;
-
- }
- break;
- }
- return FALSE;
+ static int iInit = TRUE;
+ static HWND hwndTab;
+ static int iTabCount;
+
+ DISPLAYPROFILE *p;
+ TCITEM tci;
+
+ switch(msg) {
+ case WM_INITDIALOG:
+ TranslateDialogDefault(hwnd);
+ {
+ hwndList = GetDlgItem(hwnd, IDC_PROFILELIST);
+
+ HWND hwndAdd = GetDlgItem(hwnd, IDC_DSP_ADD);
+ SendMessage(hwndAdd, BUTTONSETASFLATBTN, 0, 1);
+ SendMessage(hwndAdd, BUTTONSETASFLATBTN + 10, 0, 1);
+ SendMessage(hwndAdd, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_ADDCONTACT), IMAGE_ICON, 16, 16, LR_SHARED));
+ SetWindowText(hwndAdd, TranslateT("Add New..."));
+
+ hwndAdd = GetDlgItem(hwnd, IDC_DSP_DELETE);
+ SendMessage(hwndAdd, BUTTONSETASFLATBTN, 0, 1);
+ SendMessage(hwndAdd, BUTTONSETASFLATBTN + 10, 0, 1);
+ SendMessage(hwndAdd, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_DELETE), IMAGE_ICON, 16, 16, LR_SHARED));
+ SetWindowText(hwndAdd, TranslateT("Delete"));
+
+ hwndAdd = GetDlgItem(hwnd, IDC_DSP_RENAME);
+ SendMessage(hwndAdd, BUTTONSETASFLATBTN, 0, 1);
+ SendMessage(hwndAdd, BUTTONSETASFLATBTN + 10, 0, 1);
+ SendMessage(hwndAdd, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_RENAME), IMAGE_ICON, 16, 16, LR_SHARED));
+ SetWindowText(hwndAdd, TranslateT("Rename..."));
+
+ hwndAdd = GetDlgItem(hwnd, IDC_DSP_APPLY);
+ SendMessage(hwndAdd, BUTTONSETASFLATBTN, 0, 1);
+ SendMessage(hwndAdd, BUTTONSETASFLATBTN + 10, 0, 1);
+ SendMessage(hwndAdd, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_OPTIONS), IMAGE_ICON, 16, 16, LR_SHARED));
+ SetWindowText(hwndAdd, TranslateT("Apply this profile"));
+
+ RECT rcClient;
+ GetClientRect(hwnd, &rcClient);
+
+ hwndTab = GetDlgItem(hwnd, IDC_OPTIONSTAB);
+ iInit = TRUE;
+
+ TCITEM tci;
+ tci.mask = TCIF_PARAM|TCIF_TEXT;
+ tci.lParam = (LPARAM)CreateDialog(g_hInst,MAKEINTRESOURCE(IDD_OPT_DSPITEMS), hwnd, DlgProcDspItems);
+ tci.pszText = TranslateT("Contacts");
+ TabCtrl_InsertItem(hwndTab, 0, &tci);
+
+ int oPage = cfg::getByte("CLUI", "opage_d", 0);
+ MoveWindow((HWND)tci.lParam,64,25,rcClient.right-128,rcClient.bottom-67,1);
+ ShowWindow((HWND)tci.lParam, oPage == 0 ? SW_SHOW : SW_HIDE);
+ if (IS_THEMED)
+ API::pfnEnableThemeDialogTexture((HWND)tci.lParam, ETDT_ENABLETAB);
+
+ tci.lParam = (LPARAM)CreateDialog(g_hInst,MAKEINTRESOURCE(IDD_OPT_DSPGROUPS), hwnd, DlgProcDspGroups);
+ tci.pszText = TranslateT("Groups and layout");
+ TabCtrl_InsertItem(hwndTab, 1, &tci);
+ MoveWindow((HWND)tci.lParam,64,25,rcClient.right-128,rcClient.bottom-67,1);
+ ShowWindow((HWND)tci.lParam, oPage == 1 ? SW_SHOW : SW_HIDE);
+ if (IS_THEMED)
+ API::pfnEnableThemeDialogTexture((HWND)tci.lParam, ETDT_ENABLETAB);
+
+ tci.lParam = (LPARAM)CreateDialog(g_hInst,MAKEINTRESOURCE(IDD_OPT_XICONS), hwnd, DlgProcXIcons);
+ tci.pszText = TranslateT("Icons");
+ TabCtrl_InsertItem(hwndTab, 2, &tci);
+ MoveWindow((HWND)tci.lParam,64,25,rcClient.right-128,rcClient.bottom-67,1);
+ ShowWindow((HWND)tci.lParam, oPage == 2 ? SW_SHOW : SW_HIDE);
+ if (IS_THEMED)
+ API::pfnEnableThemeDialogTexture((HWND)tci.lParam, ETDT_ENABLETAB);
+
+ tci.lParam = (LPARAM)CreateDialog(g_hInst,MAKEINTRESOURCE(IDD_OPT_DSPADVANCED), hwnd, DlgProcDspAdvanced);
+ tci.pszText = TranslateT("Advanced");
+ TabCtrl_InsertItem(hwndTab, 3, &tci);
+ MoveWindow((HWND)tci.lParam,64,25,rcClient.right-128,rcClient.bottom-67,1);
+ ShowWindow((HWND)tci.lParam, oPage == 3 ? SW_SHOW : SW_HIDE);
+ if (IS_THEMED)
+ API::pfnEnableThemeDialogTexture((HWND)tci.lParam, ETDT_ENABLETAB);
+
+ TabCtrl_SetCurSel(GetDlgItem(hwnd, IDC_OPTIONSTAB), oPage);
+
+ DISPLAYPROFILE dsp_default;
+ DSP_LoadFromDefaults(&dsp_default);
+ CopyMemory(&dsp_current, &dsp_default, sizeof(DISPLAYPROFILE));
+
+ iTabCount = TabCtrl_GetItemCount(hwndTab);
+
+ SendMessage(hwnd, WM_USER + 100, 0, (LPARAM)&dsp_default);
+ SendMessage(hwndList, LB_INSERTSTRING, 0, (LPARAM)TranslateT("<current>"));
+
+ hwndList = GetDlgItem(hwnd, IDC_CLASSLIST);
+ SendMessage(hwndList, LB_INSERTSTRING, 0, (LPARAM)TranslateT("Default"));
+ SendMessage(hwndList, LB_INSERTSTRING, 1, (LPARAM)TranslateT("Offline contact"));
+ SendMessage(hwndList, LB_INSERTSTRING, 2, (LPARAM)TranslateT("Selected contact"));
+ SendMessage(hwndList, LB_INSERTSTRING, 3, (LPARAM)TranslateT("Hottracked contact"));
+
+ iInit = FALSE;
+ return FALSE;
+ }
+
+ /*
+ * distribute a WM_USER message to all child windows so they can update their pages from the
+ * display profile structure
+ * LPARAM = DISPLAYPROFILE *
+ */
+
+ case WM_USER + 100:
+ p = (DISPLAYPROFILE *)lParam;
+ if (p) {
+ int i;
+ TCITEM item = {0};
+ item.mask = TCIF_PARAM;
+
+ for (i = 0; i < iTabCount; i++) {
+ TabCtrl_GetItem(hwndTab, i, &item);
+ if (item.lParam && IsWindow((HWND)item.lParam))
+ SendMessage((HWND)item.lParam, WM_USER + 100, 0, (LPARAM)p);
+ }
+ }
+ return 0;
+
+ /*
+ * collect the settings from the pages into a DISPLAYPROFILE struct
+ */
+ case WM_USER + 200:
+ p = (DISPLAYPROFILE *)lParam;
+ if (p) {
+ TCITEM item = {0};
+ item.mask = TCIF_PARAM;
+
+ for (int i = 0; i < iTabCount; i++) {
+ TabCtrl_GetItem(hwndTab, i, &item);
+ if (item.lParam && IsWindow((HWND)item.lParam))
+ SendMessage((HWND)item.lParam, WM_USER + 200, 0, (LPARAM)p);
+ }
+ return 0;
+ }
+
+ case PSM_CHANGED: // used so tabs dont have to call SendMessage(GetParent(GetParent(hwnd)), PSM_CHANGED, 0, 0);
+ if (!iInit)
+ SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
+ break;
+
+ case WM_NOTIFY:
+ switch(((LPNMHDR)lParam)->idFrom) {
+ case 0:
+ switch (((LPNMHDR)lParam)->code) {
+ case PSN_APPLY:
+ {
+ DISPLAYPROFILE p;
+ ZeroMemory(&p, sizeof(DISPLAYPROFILE));
+ SendMessage(hwnd, WM_USER + 200, 0, (LPARAM)&p);
+ DSP_Apply(&p);
+ }
+ break;
+ }
+ break;
+
+ case IDC_OPTIONSTAB:
+ switch (((LPNMHDR)lParam)->code) {
+ case TCN_SELCHANGING:
+ tci.mask = TCIF_PARAM;
+ TabCtrl_GetItem(GetDlgItem(hwnd,IDC_OPTIONSTAB),TabCtrl_GetCurSel(GetDlgItem(hwnd,IDC_OPTIONSTAB)),&tci);
+ ShowWindow((HWND)tci.lParam,SW_HIDE);
+ break;
+
+ case TCN_SELCHANGE:
+ tci.mask = TCIF_PARAM;
+ TabCtrl_GetItem(GetDlgItem(hwnd,IDC_OPTIONSTAB),TabCtrl_GetCurSel(GetDlgItem(hwnd,IDC_OPTIONSTAB)),&tci);
+ ShowWindow((HWND)tci.lParam,SW_SHOW);
+ cfg::writeByte("CLUI", "opage_d", (BYTE)TabCtrl_GetCurSel(GetDlgItem(hwnd, IDC_OPTIONSTAB)));
+ break;
+ }
+ break;
+ }
+ break;
+ }
+ return FALSE;
}
static INT_PTR CALLBACK TabOptionsDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
- static int iInit = TRUE;
-
- switch(msg)
- {
- case WM_INITDIALOG:
- {
- TCITEM tci;
- RECT rcClient;
- int oPage = cfg::getByte("CLUI", "opage_m", 0);
-
- GetClientRect(hwnd, &rcClient);
- iInit = TRUE;
- tci.mask = TCIF_PARAM|TCIF_TEXT;
- tci.lParam = (LPARAM)CreateDialog(g_hInst,MAKEINTRESOURCE(IDD_OPT_CLIST), hwnd, DlgProcGenOpts);
- tci.pszText = TranslateT("General");
- TabCtrl_InsertItem(GetDlgItem(hwnd, IDC_OPTIONSTAB), 0, &tci);
- MoveWindow((HWND)tci.lParam,5,25,rcClient.right-9,rcClient.bottom-30,1);
- ShowWindow((HWND)tci.lParam, oPage == 0 ? SW_SHOW : SW_HIDE);
- if(IS_THEMED)
- API::pfnEnableThemeDialogTexture((HWND)tci.lParam, ETDT_ENABLETAB);
-
- tci.lParam = (LPARAM)CreateDialog(g_hInst,MAKEINTRESOURCE(IDD_OPT_CLC), hwnd, DlgProcClcMainOpts);
- tci.pszText = TranslateT("List layout");
- TabCtrl_InsertItem(GetDlgItem(hwnd, IDC_OPTIONSTAB), 1, &tci);
- MoveWindow((HWND)tci.lParam,5,25,rcClient.right-9,rcClient.bottom-30,1);
- ShowWindow((HWND)tci.lParam, oPage == 1 ? SW_SHOW : SW_HIDE);
- if(IS_THEMED)
- API::pfnEnableThemeDialogTexture((HWND)tci.lParam, ETDT_ENABLETAB);
-
- tci.lParam = (LPARAM)CreateDialog(g_hInst,MAKEINTRESOURCE(IDD_OPT_CLUI), hwnd, DlgProcCluiOpts);
- tci.pszText = TranslateT("Window");
- TabCtrl_InsertItem(GetDlgItem(hwnd, IDC_OPTIONSTAB), 2, &tci);
- MoveWindow((HWND)tci.lParam,5,25,rcClient.right-9,rcClient.bottom-30,1);
- ShowWindow((HWND)tci.lParam, oPage == 2 ? SW_SHOW : SW_HIDE);
- if(IS_THEMED)
- API::pfnEnableThemeDialogTexture((HWND)tci.lParam, ETDT_ENABLETAB);
-
- tci.lParam = (LPARAM)CreateDialog(g_hInst,MAKEINTRESOURCE(IDD_OPT_CLCBKG), hwnd, DlgProcClcBkgOpts);
- tci.pszText = TranslateT("Background");
- TabCtrl_InsertItem(GetDlgItem(hwnd, IDC_OPTIONSTAB), 3, &tci);
- MoveWindow((HWND)tci.lParam,5,25,rcClient.right-9,rcClient.bottom-30,1);
- ShowWindow((HWND)tci.lParam, oPage == 3 ? SW_SHOW : SW_HIDE);
- if(IS_THEMED)
- API::pfnEnableThemeDialogTexture((HWND)tci.lParam, ETDT_ENABLETAB);
-
- tci.lParam = (LPARAM)CreateDialog(g_hInst,MAKEINTRESOURCE(IDD_OPT_SBAR), hwnd, DlgProcSBarOpts);
- tci.pszText = TranslateT("Status Bar");
- TabCtrl_InsertItem(GetDlgItem(hwnd, IDC_OPTIONSTAB), 4, &tci);
- MoveWindow((HWND)tci.lParam,5,25,rcClient.right-9,rcClient.bottom-30,1);
- ShowWindow((HWND)tci.lParam, oPage == 4 ? SW_SHOW : SW_HIDE);
- if(IS_THEMED)
- API::pfnEnableThemeDialogTexture((HWND)tci.lParam, ETDT_ENABLETAB);
-
- TabCtrl_SetCurSel(GetDlgItem(hwnd, IDC_OPTIONSTAB), oPage);
- iInit = FALSE;
- return FALSE;
- }
-
- case PSM_CHANGED: // used so tabs dont have to call SendMessage(GetParent(GetParent(hwnd)), PSM_CHANGED, 0, 0);
- if (!iInit)
- SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
- break;
- case WM_NOTIFY:
- switch(((LPNMHDR)lParam)->idFrom) {
- case 0:
- switch (((LPNMHDR)lParam)->code)
- {
- case PSN_APPLY:
- {
- TCITEM tci;
- int i,count;
- tci.mask = TCIF_PARAM;
- count = TabCtrl_GetItemCount(GetDlgItem(hwnd,IDC_OPTIONSTAB));
- for (i=0;i<count;i++)
- {
- TabCtrl_GetItem(GetDlgItem(hwnd,IDC_OPTIONSTAB),i,&tci);
- SendMessage((HWND)tci.lParam,WM_NOTIFY,0,lParam);
- }
- }
- break;
- }
- break;
- case IDC_OPTIONSTAB:
- switch (((LPNMHDR)lParam)->code)
- {
- case TCN_SELCHANGING:
- {
- TCITEM tci;
- tci.mask = TCIF_PARAM;
- TabCtrl_GetItem(GetDlgItem(hwnd,IDC_OPTIONSTAB),TabCtrl_GetCurSel(GetDlgItem(hwnd,IDC_OPTIONSTAB)),&tci);
- ShowWindow((HWND)tci.lParam,SW_HIDE);
- }
- break;
- case TCN_SELCHANGE:
- {
- TCITEM tci;
- tci.mask = TCIF_PARAM;
- TabCtrl_GetItem(GetDlgItem(hwnd,IDC_OPTIONSTAB),TabCtrl_GetCurSel(GetDlgItem(hwnd,IDC_OPTIONSTAB)),&tci);
- ShowWindow((HWND)tci.lParam,SW_SHOW);
- cfg::writeByte("CLUI", "opage_m", (BYTE)TabCtrl_GetCurSel(GetDlgItem(hwnd, IDC_OPTIONSTAB)));
- }
- break;
- }
- break;
-
- }
- break;
- }
- return FALSE;
+ TCITEM tci;
+ static int iInit = TRUE;
+
+ switch(msg) {
+ case WM_INITDIALOG:
+ {
+ RECT rcClient;
+ int oPage = cfg::getByte("CLUI", "opage_m", 0);
+
+ GetClientRect(hwnd, &rcClient);
+ iInit = TRUE;
+ tci.mask = TCIF_PARAM|TCIF_TEXT;
+ tci.lParam = (LPARAM)CreateDialog(g_hInst,MAKEINTRESOURCE(IDD_OPT_CLIST), hwnd, DlgProcGenOpts);
+ tci.pszText = TranslateT("General");
+ TabCtrl_InsertItem(GetDlgItem(hwnd, IDC_OPTIONSTAB), 0, &tci);
+ MoveWindow((HWND)tci.lParam,5,25,rcClient.right-9,rcClient.bottom-30,1);
+ ShowWindow((HWND)tci.lParam, oPage == 0 ? SW_SHOW : SW_HIDE);
+ if (IS_THEMED)
+ API::pfnEnableThemeDialogTexture((HWND)tci.lParam, ETDT_ENABLETAB);
+
+ tci.lParam = (LPARAM)CreateDialog(g_hInst,MAKEINTRESOURCE(IDD_OPT_CLC), hwnd, DlgProcClcMainOpts);
+ tci.pszText = TranslateT("List layout");
+ TabCtrl_InsertItem(GetDlgItem(hwnd, IDC_OPTIONSTAB), 1, &tci);
+ MoveWindow((HWND)tci.lParam,5,25,rcClient.right-9,rcClient.bottom-30,1);
+ ShowWindow((HWND)tci.lParam, oPage == 1 ? SW_SHOW : SW_HIDE);
+ if (IS_THEMED)
+ API::pfnEnableThemeDialogTexture((HWND)tci.lParam, ETDT_ENABLETAB);
+
+ tci.lParam = (LPARAM)CreateDialog(g_hInst,MAKEINTRESOURCE(IDD_OPT_CLUI), hwnd, DlgProcCluiOpts);
+ tci.pszText = TranslateT("Window");
+ TabCtrl_InsertItem(GetDlgItem(hwnd, IDC_OPTIONSTAB), 2, &tci);
+ MoveWindow((HWND)tci.lParam,5,25,rcClient.right-9,rcClient.bottom-30,1);
+ ShowWindow((HWND)tci.lParam, oPage == 2 ? SW_SHOW : SW_HIDE);
+ if (IS_THEMED)
+ API::pfnEnableThemeDialogTexture((HWND)tci.lParam, ETDT_ENABLETAB);
+
+ tci.lParam = (LPARAM)CreateDialog(g_hInst,MAKEINTRESOURCE(IDD_OPT_CLCBKG), hwnd, DlgProcClcBkgOpts);
+ tci.pszText = TranslateT("Background");
+ TabCtrl_InsertItem(GetDlgItem(hwnd, IDC_OPTIONSTAB), 3, &tci);
+ MoveWindow((HWND)tci.lParam,5,25,rcClient.right-9,rcClient.bottom-30,1);
+ ShowWindow((HWND)tci.lParam, oPage == 3 ? SW_SHOW : SW_HIDE);
+ if (IS_THEMED)
+ API::pfnEnableThemeDialogTexture((HWND)tci.lParam, ETDT_ENABLETAB);
+
+ tci.lParam = (LPARAM)CreateDialog(g_hInst,MAKEINTRESOURCE(IDD_OPT_SBAR), hwnd, DlgProcSBarOpts);
+ tci.pszText = TranslateT("Status Bar");
+ TabCtrl_InsertItem(GetDlgItem(hwnd, IDC_OPTIONSTAB), 4, &tci);
+ MoveWindow((HWND)tci.lParam,5,25,rcClient.right-9,rcClient.bottom-30,1);
+ ShowWindow((HWND)tci.lParam, oPage == 4 ? SW_SHOW : SW_HIDE);
+ if (IS_THEMED)
+ API::pfnEnableThemeDialogTexture((HWND)tci.lParam, ETDT_ENABLETAB);
+
+ TabCtrl_SetCurSel(GetDlgItem(hwnd, IDC_OPTIONSTAB), oPage);
+ iInit = FALSE;
+ }
+ return FALSE;
+
+ case PSM_CHANGED: // used so tabs dont have to call SendMessage(GetParent(GetParent(hwnd)), PSM_CHANGED, 0, 0);
+ if (!iInit)
+ SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
+ break;
+
+ case WM_NOTIFY:
+ switch(((LPNMHDR)lParam)->idFrom) {
+ case 0:
+ switch (((LPNMHDR)lParam)->code) {
+ case PSN_APPLY:
+ tci.mask = TCIF_PARAM;
+ int count = TabCtrl_GetItemCount(GetDlgItem(hwnd,IDC_OPTIONSTAB));
+ for (int i=0; i < count; i++) {
+ TabCtrl_GetItem(GetDlgItem(hwnd,IDC_OPTIONSTAB),i,&tci);
+ SendMessage((HWND)tci.lParam,WM_NOTIFY,0,lParam);
+ }
+ break;
+ }
+ break;
+
+ case IDC_OPTIONSTAB:
+ switch (((LPNMHDR)lParam)->code) {
+ case TCN_SELCHANGING:
+ tci.mask = TCIF_PARAM;
+ TabCtrl_GetItem(GetDlgItem(hwnd,IDC_OPTIONSTAB),TabCtrl_GetCurSel(GetDlgItem(hwnd,IDC_OPTIONSTAB)),&tci);
+ ShowWindow((HWND)tci.lParam,SW_HIDE);
+ break;
+
+ case TCN_SELCHANGE:
+ tci.mask = TCIF_PARAM;
+ TabCtrl_GetItem(GetDlgItem(hwnd,IDC_OPTIONSTAB),TabCtrl_GetCurSel(GetDlgItem(hwnd,IDC_OPTIONSTAB)),&tci);
+ ShowWindow((HWND)tci.lParam,SW_SHOW);
+ cfg::writeByte("CLUI", "opage_m", (BYTE)TabCtrl_GetCurSel(GetDlgItem(hwnd, IDC_OPTIONSTAB)));
+ break;
+ }
+ break;
+ }
+ break;
+ }
+ return FALSE;
}
int ClcOptInit(WPARAM wParam, LPARAM lParam)
{
- OPTIONSDIALOGPAGE odp;
-
- ZeroMemory(&odp, sizeof(odp));
- odp.cbSize = sizeof(odp);
- odp.position = 0;
- odp.hInstance = g_hInst;
- odp.pszGroup = LPGEN("Contact List");
-
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_DSPPROFILES);
- odp.pszTitle = LPGEN("Contact rows");
- odp.pfnDlgProc = DlgProcDspProfiles;
- odp.flags = ODPF_BOLDGROUPS | ODPF_EXPERTONLY;
- Options_AddPage(wParam, &odp);
-
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_FLOATING);
- odp.pszTitle = LPGEN("Floating contacts");
- odp.pfnDlgProc = DlgProcFloatingContacts;
- odp.flags = ODPF_BOLDGROUPS | ODPF_EXPERTONLY;
- Options_AddPage(wParam, &odp);
-
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT);
- odp.pszGroup = LPGEN("Skins");
- odp.pszTitle = LPGEN("Contact list");
- odp.flags = ODPF_BOLDGROUPS;
- odp.pfnDlgProc = OptionsDlgProc;
- Options_AddPage(wParam, &odp);
-
- odp.position = -1000000000;
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONSDIALOG);
- odp.pszGroup = NULL;
- odp.pszTitle = LPGEN("Contact List");
- odp.pfnDlgProc = TabOptionsDlgProc;
- odp.flags = ODPF_BOLDGROUPS;
- odp.nIDBottomSimpleControl = 0;
- Options_AddPage(wParam, &odp);
- return 0;
+ OPTIONSDIALOGPAGE odp = { 0 };
+
+ ZeroMemory(&odp, sizeof(odp));
+ odp.cbSize = sizeof(odp);
+ odp.position = 0;
+ odp.hInstance = g_hInst;
+ odp.pszGroup = LPGEN("Contact List");
+
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_DSPPROFILES);
+ odp.pszTitle = LPGEN("Contact rows");
+ odp.pfnDlgProc = DlgProcDspProfiles;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_EXPERTONLY;
+ Options_AddPage(wParam, &odp);
+
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_FLOATING);
+ odp.pszTitle = LPGEN("Floating contacts");
+ odp.pfnDlgProc = DlgProcFloatingContacts;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_EXPERTONLY;
+ Options_AddPage(wParam, &odp);
+
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT);
+ odp.pszGroup = LPGEN("Skins");
+ odp.pszTitle = LPGEN("Contact list");
+ odp.flags = ODPF_BOLDGROUPS;
+ odp.pfnDlgProc = OptionsDlgProc;
+ Options_AddPage(wParam, &odp);
+
+ odp.position = -1000000000;
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONSDIALOG);
+ odp.pszGroup = NULL;
+ odp.pszTitle = LPGEN("Contact List");
+ odp.pfnDlgProc = TabOptionsDlgProc;
+ odp.flags = ODPF_BOLDGROUPS;
+ odp.nIDBottomSimpleControl = 0;
+ Options_AddPage(wParam, &odp);
+ return 0;
}
static int opt_clc_main_changed = 0;
static INT_PTR CALLBACK DlgProcClcMainOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- switch (msg) {
- case WM_INITDIALOG:
- TranslateDialogDefault(hwndDlg);
- opt_clc_main_changed = 0;
- SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_GREYOUTOPTS), GWL_STYLE, GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_GREYOUTOPTS), GWL_STYLE) | TVS_NOHSCROLL | TVS_CHECKBOXES);
-
- {
- int i;
- DWORD exStyle = cfg::getDword("CLC", "ExStyle", pcli->pfnGetDefaultExStyle());
- UDACCEL accel[2] = {
- {0,10}, {2,50}
- };
- SendDlgItemMessage(hwndDlg, IDC_SMOOTHTIMESPIN, UDM_SETRANGE, 0, MAKELONG(999, 0));
- SendDlgItemMessage(hwndDlg, IDC_SMOOTHTIMESPIN, UDM_SETACCEL, sizeof(accel) / sizeof(accel[0]), (LPARAM) &accel);
- SendDlgItemMessage(hwndDlg, IDC_SMOOTHTIMESPIN, UDM_SETPOS, 0, MAKELONG(cfg::getWord("CLC", "ScrollTime", CLCDEFAULT_SCROLLTIME), 0));
-
- for (i = 0; i < sizeof(checkBoxToStyleEx) / sizeof(checkBoxToStyleEx[0]); i++)
- CheckDlgButton(hwndDlg, checkBoxToStyleEx[i].id, (exStyle & checkBoxToStyleEx[i].flag) ^ (checkBoxToStyleEx[i].flag * checkBoxToStyleEx[i].not_t) ? BST_CHECKED : BST_UNCHECKED);
- }
- CheckDlgButton(hwndDlg, IDC_FULLROWSELECT, (cfg::dat.dwFlags & CLUI_FULLROWSELECT) ? BST_CHECKED : BST_UNCHECKED);
-
- CheckDlgButton(hwndDlg, IDC_DBLCLKAVATARS, cfg::dat.bDblClkAvatars);
- CheckDlgButton(hwndDlg, IDC_GREYOUT, cfg::getDword("CLC", "GreyoutFlags", CLCDEFAULT_GREYOUTFLAGS) ? BST_CHECKED : BST_UNCHECKED);
- Utils::enableDlgControl(hwndDlg, IDC_SMOOTHTIME, IsDlgButtonChecked(hwndDlg, IDC_NOTNOSMOOTHSCROLLING));
- Utils::enableDlgControl(hwndDlg, IDC_GREYOUTOPTS, IsDlgButtonChecked(hwndDlg, IDC_GREYOUT));
- FillCheckBoxTree(GetDlgItem(hwndDlg, IDC_GREYOUTOPTS), greyoutValues, sizeof(greyoutValues) / sizeof(greyoutValues[0]), cfg::getDword("CLC", "FullGreyoutFlags", CLCDEFAULT_FULLGREYOUTFLAGS));
- CheckDlgButton(hwndDlg, IDC_NOSCROLLBAR, cfg::getByte("CLC", "NoVScrollBar", 0) ? BST_CHECKED : BST_UNCHECKED);
-
- return TRUE;
- case WM_VSCROLL:
- opt_clc_main_changed = 1;
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- break;
- case WM_COMMAND:
- if (LOWORD(wParam) == IDC_NOTNOSMOOTHSCROLLING)
- Utils::enableDlgControl(hwndDlg, IDC_SMOOTHTIME, IsDlgButtonChecked(hwndDlg, IDC_NOTNOSMOOTHSCROLLING));
- if (LOWORD(wParam) == IDC_GREYOUT)
- Utils::enableDlgControl(hwndDlg, IDC_GREYOUTOPTS, IsDlgButtonChecked(hwndDlg, IDC_GREYOUT));
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- opt_clc_main_changed = 1;
- break;
- case WM_NOTIFY:
- switch (((LPNMHDR) lParam)->idFrom) {
- case IDC_GREYOUTOPTS:
- if (((LPNMHDR) lParam)->code == NM_CLICK) {
- TVHITTESTINFO hti;
- hti.pt.x = (short) LOWORD(GetMessagePos());
- hti.pt.y = (short) HIWORD(GetMessagePos());
- ScreenToClient(((LPNMHDR) lParam)->hwndFrom, &hti.pt);
- if (TreeView_HitTest(((LPNMHDR) lParam)->hwndFrom, &hti))
- if (hti.flags & TVHT_ONITEMSTATEICON) {
- TVITEM tvi;
- tvi.mask = TVIF_HANDLE | TVIF_IMAGE | TVIF_SELECTEDIMAGE;
- tvi.hItem = hti.hItem;
- TreeView_GetItem(((LPNMHDR) lParam)->hwndFrom, &tvi);
- tvi.iImage = tvi.iSelectedImage = tvi.iImage == 1 ? 2 : 1;
- TreeView_SetItem(((LPNMHDR) lParam)->hwndFrom, &tvi);
- opt_clc_main_changed = 1;
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- }
- }
- break;
- case 0:
- switch (((LPNMHDR) lParam)->code) {
- case PSN_APPLY:
- {
- int i;
- DWORD exStyle = cfg::getDword("CLC", "ExStyle", CLCDEFAULT_EXSTYLE);
-
- if (!opt_clc_main_changed)
- return TRUE;
-
- for (i = 0; i < sizeof(checkBoxToStyleEx) / sizeof(checkBoxToStyleEx[0]); i++)
- exStyle &= ~(checkBoxToStyleEx[i].flag);
-
- for (i = 0; i < sizeof(checkBoxToStyleEx) / sizeof(checkBoxToStyleEx[0]); i++) {
- if ((IsDlgButtonChecked(hwndDlg, checkBoxToStyleEx[i].id) == 0) == checkBoxToStyleEx[i].not_t)
- exStyle |= checkBoxToStyleEx[i].flag;
- }
- cfg::writeDword("CLC", "ExStyle", exStyle);
- } {
- DWORD fullGreyoutFlags = MakeCheckBoxTreeFlags(GetDlgItem(hwndDlg, IDC_GREYOUTOPTS));
- cfg::writeDword("CLC", "FullGreyoutFlags", fullGreyoutFlags);
- if (IsDlgButtonChecked(hwndDlg, IDC_GREYOUT))
- cfg::writeDword("CLC", "GreyoutFlags", fullGreyoutFlags);
- else
- cfg::writeDword("CLC", "GreyoutFlags", 0);
- }
- cfg::writeWord("CLC", "ScrollTime", (WORD) SendDlgItemMessage(hwndDlg, IDC_SMOOTHTIMESPIN, UDM_GETPOS, 0, 0));
- cfg::writeByte("CLC", "NoVScrollBar", (BYTE) (IsDlgButtonChecked(hwndDlg, IDC_NOSCROLLBAR) ? 1 : 0));
- cfg::dat.dwFlags = IsDlgButtonChecked(hwndDlg, IDC_FULLROWSELECT) ? cfg::dat.dwFlags | CLUI_FULLROWSELECT : cfg::dat.dwFlags & ~CLUI_FULLROWSELECT;
- cfg::dat.bDblClkAvatars = IsDlgButtonChecked(hwndDlg, IDC_DBLCLKAVATARS) ? TRUE : FALSE;
- cfg::writeByte("CLC", "dblclkav", (BYTE)cfg::dat.bDblClkAvatars);
- cfg::writeDword("CLUI", "Frameflags", cfg::dat.dwFlags);
-
- pcli->pfnClcOptionsChanged();
- CoolSB_SetupScrollBar();
- PostMessage(pcli->hwndContactList, CLUIINTM_REDRAW, 0, 0);
- opt_clc_main_changed = 0;
- return TRUE;
- }
- break;
- }
- break;
- case WM_DESTROY:
- ImageList_Destroy(TreeView_GetImageList(GetDlgItem(hwndDlg, IDC_GREYOUTOPTS), TVSIL_STATE));
- break;
- }
- return FALSE;
+ switch (msg) {
+ case WM_INITDIALOG:
+ TranslateDialogDefault(hwndDlg);
+ opt_clc_main_changed = 0;
+ SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_GREYOUTOPTS), GWL_STYLE, GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_GREYOUTOPTS), GWL_STYLE) | TVS_NOHSCROLL | TVS_CHECKBOXES);
+ {
+ int i;
+ DWORD exStyle = cfg::getDword("CLC", "ExStyle", pcli->pfnGetDefaultExStyle());
+ UDACCEL accel[2] = {
+ {0,10}, {2,50}
+ };
+ SendDlgItemMessage(hwndDlg, IDC_SMOOTHTIMESPIN, UDM_SETRANGE, 0, MAKELONG(999, 0));
+ SendDlgItemMessage(hwndDlg, IDC_SMOOTHTIMESPIN, UDM_SETACCEL, sizeof(accel) / sizeof(accel[0]), (LPARAM) &accel);
+ SendDlgItemMessage(hwndDlg, IDC_SMOOTHTIMESPIN, UDM_SETPOS, 0, MAKELONG(cfg::getWord("CLC", "ScrollTime", CLCDEFAULT_SCROLLTIME), 0));
+
+ for (i = 0; i < sizeof(checkBoxToStyleEx) / sizeof(checkBoxToStyleEx[0]); i++)
+ CheckDlgButton(hwndDlg, checkBoxToStyleEx[i].id, (exStyle & checkBoxToStyleEx[i].flag) ^ (checkBoxToStyleEx[i].flag * checkBoxToStyleEx[i].not_t) ? BST_CHECKED : BST_UNCHECKED);
+ }
+ CheckDlgButton(hwndDlg, IDC_FULLROWSELECT, (cfg::dat.dwFlags & CLUI_FULLROWSELECT) ? BST_CHECKED : BST_UNCHECKED);
+
+ CheckDlgButton(hwndDlg, IDC_DBLCLKAVATARS, cfg::dat.bDblClkAvatars);
+ CheckDlgButton(hwndDlg, IDC_GREYOUT, cfg::getDword("CLC", "GreyoutFlags", CLCDEFAULT_GREYOUTFLAGS) ? BST_CHECKED : BST_UNCHECKED);
+ Utils::enableDlgControl(hwndDlg, IDC_SMOOTHTIME, IsDlgButtonChecked(hwndDlg, IDC_NOTNOSMOOTHSCROLLING));
+ Utils::enableDlgControl(hwndDlg, IDC_GREYOUTOPTS, IsDlgButtonChecked(hwndDlg, IDC_GREYOUT));
+ FillCheckBoxTree(GetDlgItem(hwndDlg, IDC_GREYOUTOPTS), greyoutValues, sizeof(greyoutValues) / sizeof(greyoutValues[0]), cfg::getDword("CLC", "FullGreyoutFlags", CLCDEFAULT_FULLGREYOUTFLAGS));
+ CheckDlgButton(hwndDlg, IDC_NOSCROLLBAR, cfg::getByte("CLC", "NoVScrollBar", 0) ? BST_CHECKED : BST_UNCHECKED);
+
+ return TRUE;
+ case WM_VSCROLL:
+ opt_clc_main_changed = 1;
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ break;
+ case WM_COMMAND:
+ if (LOWORD(wParam) == IDC_NOTNOSMOOTHSCROLLING)
+ Utils::enableDlgControl(hwndDlg, IDC_SMOOTHTIME, IsDlgButtonChecked(hwndDlg, IDC_NOTNOSMOOTHSCROLLING));
+ if (LOWORD(wParam) == IDC_GREYOUT)
+ Utils::enableDlgControl(hwndDlg, IDC_GREYOUTOPTS, IsDlgButtonChecked(hwndDlg, IDC_GREYOUT));
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ opt_clc_main_changed = 1;
+ break;
+ case WM_NOTIFY:
+ switch (((LPNMHDR) lParam)->idFrom) {
+ case IDC_GREYOUTOPTS:
+ if (((LPNMHDR) lParam)->code == NM_CLICK) {
+ TVHITTESTINFO hti;
+ hti.pt.x = (short) LOWORD(GetMessagePos());
+ hti.pt.y = (short) HIWORD(GetMessagePos());
+ ScreenToClient(((LPNMHDR) lParam)->hwndFrom, &hti.pt);
+ if (TreeView_HitTest(((LPNMHDR) lParam)->hwndFrom, &hti))
+ if (hti.flags & TVHT_ONITEMSTATEICON) {
+ TVITEM tvi;
+ tvi.mask = TVIF_HANDLE | TVIF_IMAGE | TVIF_SELECTEDIMAGE;
+ tvi.hItem = hti.hItem;
+ TreeView_GetItem(((LPNMHDR) lParam)->hwndFrom, &tvi);
+ tvi.iImage = tvi.iSelectedImage = tvi.iImage == 1 ? 2 : 1;
+ TreeView_SetItem(((LPNMHDR) lParam)->hwndFrom, &tvi);
+ opt_clc_main_changed = 1;
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ }
+ }
+ break;
+ case 0:
+ switch (((LPNMHDR) lParam)->code) {
+ case PSN_APPLY:
+ {
+ int i;
+ DWORD exStyle = cfg::getDword("CLC", "ExStyle", CLCDEFAULT_EXSTYLE);
+
+ if (!opt_clc_main_changed)
+ return TRUE;
+
+ for (i = 0; i < sizeof(checkBoxToStyleEx) / sizeof(checkBoxToStyleEx[0]); i++)
+ exStyle &= ~(checkBoxToStyleEx[i].flag);
+
+ for (i = 0; i < sizeof(checkBoxToStyleEx) / sizeof(checkBoxToStyleEx[0]); i++) {
+ if ((IsDlgButtonChecked(hwndDlg, checkBoxToStyleEx[i].id) == 0) == checkBoxToStyleEx[i].not_t)
+ exStyle |= checkBoxToStyleEx[i].flag;
+ }
+ cfg::writeDword("CLC", "ExStyle", exStyle);
+ } {
+ DWORD fullGreyoutFlags = MakeCheckBoxTreeFlags(GetDlgItem(hwndDlg, IDC_GREYOUTOPTS));
+ cfg::writeDword("CLC", "FullGreyoutFlags", fullGreyoutFlags);
+ if (IsDlgButtonChecked(hwndDlg, IDC_GREYOUT))
+ cfg::writeDword("CLC", "GreyoutFlags", fullGreyoutFlags);
+ else
+ cfg::writeDword("CLC", "GreyoutFlags", 0);
+ }
+ cfg::writeWord("CLC", "ScrollTime", (WORD) SendDlgItemMessage(hwndDlg, IDC_SMOOTHTIMESPIN, UDM_GETPOS, 0, 0));
+ cfg::writeByte("CLC", "NoVScrollBar", (BYTE) (IsDlgButtonChecked(hwndDlg, IDC_NOSCROLLBAR) ? 1 : 0));
+ cfg::dat.dwFlags = IsDlgButtonChecked(hwndDlg, IDC_FULLROWSELECT) ? cfg::dat.dwFlags | CLUI_FULLROWSELECT : cfg::dat.dwFlags & ~CLUI_FULLROWSELECT;
+ cfg::dat.bDblClkAvatars = IsDlgButtonChecked(hwndDlg, IDC_DBLCLKAVATARS) ? TRUE : FALSE;
+ cfg::writeByte("CLC", "dblclkav", (BYTE)cfg::dat.bDblClkAvatars);
+ cfg::writeDword("CLUI", "Frameflags", cfg::dat.dwFlags);
+
+ pcli->pfnClcOptionsChanged();
+ CoolSB_SetupScrollBar();
+ PostMessage(pcli->hwndContactList, CLUIINTM_REDRAW, 0, 0);
+ opt_clc_main_changed = 0;
+ return TRUE;
+ }
+ break;
+ }
+ break;
+ case WM_DESTROY:
+ ImageList_Destroy(TreeView_GetImageList(GetDlgItem(hwndDlg, IDC_GREYOUTOPTS), TVSIL_STATE));
+ break;
+ }
+ return FALSE;
}
static int opt_clc_bkg_changed = 0;
static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- switch (msg) {
- case WM_INITDIALOG:
- opt_clc_bkg_changed = 0;
- TranslateDialogDefault(hwndDlg);
- CheckDlgButton(hwndDlg, IDC_BITMAP, cfg::getByte("CLC", "UseBitmap", CLCDEFAULT_USEBITMAP) ? BST_CHECKED : BST_UNCHECKED);
- SendMessage(hwndDlg, WM_USER + 10, 0, 0);
- SendDlgItemMessage(hwndDlg, IDC_BKGCOLOUR, CPM_SETDEFAULTCOLOUR, 0, CLCDEFAULT_BKCOLOUR);
- SendDlgItemMessage(hwndDlg, IDC_BKGCOLOUR, CPM_SETCOLOUR, 0, cfg::getDword("CLC", "BkColour", CLCDEFAULT_BKCOLOUR));
- CheckDlgButton(hwndDlg, IDC_WINCOLOUR, cfg::getByte("CLC", "UseWinColours", 0));
- CheckDlgButton(hwndDlg, IDC_SKINMODE, cfg::dat.bWallpaperMode);
- SendMessage(hwndDlg, WM_USER + 11, 0, 0); {
- DBVARIANT dbv;
-
- if (!cfg::getString(NULL, "CLC", "BkBitmap", &dbv)) {
- if (ServiceExists(MS_UTILS_PATHTOABSOLUTE)) {
- char szPath[MAX_PATH];
-
- if (CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM) dbv.pszVal, (LPARAM) szPath))
- SetDlgItemTextA(hwndDlg, IDC_FILENAME, szPath);
- }
- DBFreeVariant(&dbv);
- }
- } {
- WORD bmpUse = cfg::getWord("CLC", "BkBmpUse", CLCDEFAULT_BKBMPUSE);
- CheckDlgButton(hwndDlg, IDC_STRETCHH, bmpUse & CLB_STRETCHH ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_STRETCHV, bmpUse & CLB_STRETCHV ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_TILEH, bmpUse & CLBF_TILEH ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_TILEV, bmpUse & CLBF_TILEV ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SCROLL, bmpUse & CLBF_SCROLL ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_PROPORTIONAL, bmpUse & CLBF_PROPORTIONAL ? BST_CHECKED : BST_UNCHECKED);
- } {
- HRESULT (STDAPICALLTYPE *MySHAutoComplete)(HWND, DWORD);
- MySHAutoComplete = (HRESULT(STDAPICALLTYPE *)(HWND, DWORD))GetProcAddress(GetModuleHandleA("shlwapi"), "SHAutoComplete");
- if (MySHAutoComplete)
- MySHAutoComplete(GetDlgItem(hwndDlg, IDC_FILENAME), 1);
- }
- return TRUE;
- case WM_USER+10:
- Utils::enableDlgControl(hwndDlg, IDC_FILENAME, IsDlgButtonChecked(hwndDlg, IDC_BITMAP));
- Utils::enableDlgControl(hwndDlg, IDC_BROWSE, IsDlgButtonChecked(hwndDlg, IDC_BITMAP));
- Utils::enableDlgControl(hwndDlg, IDC_STRETCHH, IsDlgButtonChecked(hwndDlg, IDC_BITMAP));
- Utils::enableDlgControl(hwndDlg, IDC_STRETCHV, IsDlgButtonChecked(hwndDlg, IDC_BITMAP));
- Utils::enableDlgControl(hwndDlg, IDC_TILEH, IsDlgButtonChecked(hwndDlg, IDC_BITMAP));
- Utils::enableDlgControl(hwndDlg, IDC_TILEV, IsDlgButtonChecked(hwndDlg, IDC_BITMAP));
- Utils::enableDlgControl(hwndDlg, IDC_SCROLL, IsDlgButtonChecked(hwndDlg, IDC_BITMAP));
- Utils::enableDlgControl(hwndDlg, IDC_PROPORTIONAL, IsDlgButtonChecked(hwndDlg, IDC_BITMAP));
- break;
- case WM_USER+11:
- {
- BOOL b = IsDlgButtonChecked(hwndDlg, IDC_WINCOLOUR);
- Utils::enableDlgControl(hwndDlg, IDC_BKGCOLOUR, !b);
- break;
- }
- case WM_COMMAND:
- if (LOWORD(wParam) == IDC_BROWSE) {
- char str[MAX_PATH];
- OPENFILENAMEA ofn = {
- 0
- };
- char filter[512];
-
- GetDlgItemTextA(hwndDlg, IDC_FILENAME, str, sizeof(str));
- ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400;
- ofn.hwndOwner = hwndDlg;
- ofn.hInstance = NULL;
- CallService(MS_UTILS_GETBITMAPFILTERSTRINGS, sizeof(filter), (LPARAM) filter);
- ofn.lpstrFilter = filter;
- ofn.lpstrFile = str;
- ofn.Flags = OFN_FILEMUSTEXIST | OFN_HIDEREADONLY;
- ofn.nMaxFile = sizeof(str);
- ofn.nMaxFileTitle = MAX_PATH;
- ofn.lpstrDefExt = "bmp";
- if (!GetOpenFileNameA(&ofn))
- break;
- SetDlgItemTextA(hwndDlg, IDC_FILENAME, str);
- } else if (LOWORD(wParam) == IDC_FILENAME && HIWORD(wParam) != EN_CHANGE)
- break;
- if (LOWORD(wParam) == IDC_BITMAP)
- SendMessage(hwndDlg, WM_USER + 10, 0, 0);
- if (LOWORD(wParam) == IDC_WINCOLOUR)
- SendMessage(hwndDlg, WM_USER + 11, 0, 0);
- if (LOWORD(wParam) == IDC_FILENAME && (HIWORD(wParam) != EN_CHANGE || (HWND) lParam != GetFocus()))
- return 0;
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- opt_clc_bkg_changed = 1;
- break;
- case WM_NOTIFY:
- switch (((LPNMHDR) lParam)->idFrom) {
- case 0:
- switch (((LPNMHDR) lParam)->code) {
- case PSN_APPLY:
- if (!opt_clc_bkg_changed)
- return TRUE;
-
- cfg::writeByte("CLC", "UseBitmap", (BYTE) IsDlgButtonChecked(hwndDlg, IDC_BITMAP)); {
- COLORREF col;
- col = SendDlgItemMessage(hwndDlg, IDC_BKGCOLOUR, CPM_GETCOLOUR, 0, 0);
- if (col == CLCDEFAULT_BKCOLOUR)
- DBDeleteContactSetting(NULL, "CLC", "BkColour");
- else
- cfg::writeDword("CLC", "BkColour", col);
- cfg::writeByte("CLC", "UseWinColours", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_WINCOLOUR));
- } {
- char str[MAX_PATH], strrel[MAX_PATH];
-
- GetDlgItemTextA(hwndDlg, IDC_FILENAME, str, sizeof(str));
- if (CallService(MS_UTILS_PATHTORELATIVE, (WPARAM) str, (LPARAM) strrel))
- cfg::writeString(NULL, "CLC", "BkBitmap", strrel);
- else
- cfg::writeString(NULL, "CLC", "BkBitmap", str);
- } {
- WORD flags = 0;
- if (IsDlgButtonChecked(hwndDlg, IDC_STRETCHH))
- flags |= CLB_STRETCHH;
- if (IsDlgButtonChecked(hwndDlg, IDC_STRETCHV))
- flags |= CLB_STRETCHV;
- if (IsDlgButtonChecked(hwndDlg, IDC_TILEH))
- flags |= CLBF_TILEH;
- if (IsDlgButtonChecked(hwndDlg, IDC_TILEV))
- flags |= CLBF_TILEV;
- if (IsDlgButtonChecked(hwndDlg, IDC_SCROLL))
- flags |= CLBF_SCROLL;
- if (IsDlgButtonChecked(hwndDlg, IDC_PROPORTIONAL))
- flags |= CLBF_PROPORTIONAL;
- cfg::writeWord("CLC", "BkBmpUse", flags);
- cfg::dat.bWallpaperMode = IsDlgButtonChecked(hwndDlg, IDC_SKINMODE) ? 1 : 0;
- cfg::writeByte("CLUI", "UseBkSkin", (BYTE)cfg::dat.bWallpaperMode);
- }
- pcli->pfnClcOptionsChanged();
- PostMessage(pcli->hwndContactList, CLUIINTM_REDRAW, 0, 0);
- opt_clc_bkg_changed = 0;
- return TRUE;
- }
- break;
- }
- break;
- }
- return FALSE;
-}
+ switch (msg) {
+ case WM_INITDIALOG:
+ opt_clc_bkg_changed = 0;
+ TranslateDialogDefault(hwndDlg);
+ CheckDlgButton(hwndDlg, IDC_BITMAP, cfg::getByte("CLC", "UseBitmap", CLCDEFAULT_USEBITMAP) ? BST_CHECKED : BST_UNCHECKED);
+ SendMessage(hwndDlg, WM_USER + 10, 0, 0);
+ SendDlgItemMessage(hwndDlg, IDC_BKGCOLOUR, CPM_SETDEFAULTCOLOUR, 0, CLCDEFAULT_BKCOLOUR);
+ SendDlgItemMessage(hwndDlg, IDC_BKGCOLOUR, CPM_SETCOLOUR, 0, cfg::getDword("CLC", "BkColour", CLCDEFAULT_BKCOLOUR));
+ CheckDlgButton(hwndDlg, IDC_WINCOLOUR, cfg::getByte("CLC", "UseWinColours", 0));
+ CheckDlgButton(hwndDlg, IDC_SKINMODE, cfg::dat.bWallpaperMode);
+ SendMessage(hwndDlg, WM_USER + 11, 0, 0);
+ {
+ DBVARIANT dbv;
+ if (!cfg::getTString(NULL, "CLC", "BkBitmap", &dbv)) {
+ TCHAR szPath[MAX_PATH];
+ if (CallService(MS_UTILS_PATHTOABSOLUTET, (WPARAM) dbv.ptszVal, (LPARAM)szPath))
+ SetDlgItemText(hwndDlg, IDC_FILENAME, szPath);
+ DBFreeVariant(&dbv);
+ }
+ WORD bmpUse = cfg::getWord("CLC", "BkBmpUse", CLCDEFAULT_BKBMPUSE);
+ CheckDlgButton(hwndDlg, IDC_STRETCHH, bmpUse & CLB_STRETCHH ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_STRETCHV, bmpUse & CLB_STRETCHV ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_TILEH, bmpUse & CLBF_TILEH ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_TILEV, bmpUse & CLBF_TILEV ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_SCROLL, bmpUse & CLBF_SCROLL ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_PROPORTIONAL, bmpUse & CLBF_PROPORTIONAL ? BST_CHECKED : BST_UNCHECKED);
+
+ HRESULT (STDAPICALLTYPE *MySHAutoComplete)(HWND, DWORD);
+ MySHAutoComplete = (HRESULT(STDAPICALLTYPE *)(HWND, DWORD))GetProcAddress(GetModuleHandleA("shlwapi"), "SHAutoComplete");
+ if (MySHAutoComplete)
+ MySHAutoComplete(GetDlgItem(hwndDlg, IDC_FILENAME), 1);
+ }
+ return TRUE;
+
+ case WM_USER+10:
+ Utils::enableDlgControl(hwndDlg, IDC_FILENAME, IsDlgButtonChecked(hwndDlg, IDC_BITMAP));
+ Utils::enableDlgControl(hwndDlg, IDC_BROWSE, IsDlgButtonChecked(hwndDlg, IDC_BITMAP));
+ Utils::enableDlgControl(hwndDlg, IDC_STRETCHH, IsDlgButtonChecked(hwndDlg, IDC_BITMAP));
+ Utils::enableDlgControl(hwndDlg, IDC_STRETCHV, IsDlgButtonChecked(hwndDlg, IDC_BITMAP));
+ Utils::enableDlgControl(hwndDlg, IDC_TILEH, IsDlgButtonChecked(hwndDlg, IDC_BITMAP));
+ Utils::enableDlgControl(hwndDlg, IDC_TILEV, IsDlgButtonChecked(hwndDlg, IDC_BITMAP));
+ Utils::enableDlgControl(hwndDlg, IDC_SCROLL, IsDlgButtonChecked(hwndDlg, IDC_BITMAP));
+ Utils::enableDlgControl(hwndDlg, IDC_PROPORTIONAL, IsDlgButtonChecked(hwndDlg, IDC_BITMAP));
+ break;
+ case WM_USER+11:
+ {
+ BOOL b = IsDlgButtonChecked(hwndDlg, IDC_WINCOLOUR);
+ Utils::enableDlgControl(hwndDlg, IDC_BKGCOLOUR, !b);
+ break;
+ }
+ case WM_COMMAND:
+ if (LOWORD(wParam) == IDC_BROWSE) {
+ char str[MAX_PATH];
+ OPENFILENAMEA ofn = { 0 };
+ char filter[512];
+
+ GetDlgItemTextA(hwndDlg, IDC_FILENAME, str, sizeof(str));
+ ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400;
+ ofn.hwndOwner = hwndDlg;
+ ofn.hInstance = NULL;
+ CallService(MS_UTILS_GETBITMAPFILTERSTRINGS, sizeof(filter), (LPARAM) filter);
+ ofn.lpstrFilter = filter;
+ ofn.lpstrFile = str;
+ ofn.Flags = OFN_FILEMUSTEXIST | OFN_HIDEREADONLY;
+ ofn.nMaxFile = sizeof(str);
+ ofn.nMaxFileTitle = MAX_PATH;
+ ofn.lpstrDefExt = "bmp";
+ if (!GetOpenFileNameA(&ofn))
+ break;
+ SetDlgItemTextA(hwndDlg, IDC_FILENAME, str);
+ }
+ else if (LOWORD(wParam) == IDC_FILENAME && HIWORD(wParam) != EN_CHANGE)
+ break;
+
+ if (LOWORD(wParam) == IDC_BITMAP)
+ SendMessage(hwndDlg, WM_USER + 10, 0, 0);
+ if (LOWORD(wParam) == IDC_WINCOLOUR)
+ SendMessage(hwndDlg, WM_USER + 11, 0, 0);
+ if (LOWORD(wParam) == IDC_FILENAME && (HIWORD(wParam) != EN_CHANGE || (HWND) lParam != GetFocus()))
+ return 0;
+
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ opt_clc_bkg_changed = 1;
+ break;
+ case WM_NOTIFY:
+ switch (((LPNMHDR) lParam)->idFrom) {
+ case 0:
+ switch (((LPNMHDR) lParam)->code) {
+ case PSN_APPLY:
+ if (!opt_clc_bkg_changed)
+ return TRUE;
+
+ cfg::writeByte("CLC", "UseBitmap", (BYTE) IsDlgButtonChecked(hwndDlg, IDC_BITMAP)); {
+ COLORREF col;
+ col = SendDlgItemMessage(hwndDlg, IDC_BKGCOLOUR, CPM_GETCOLOUR, 0, 0);
+ if (col == CLCDEFAULT_BKCOLOUR)
+ DBDeleteContactSetting(NULL, "CLC", "BkColour");
+ else
+ cfg::writeDword("CLC", "BkColour", col);
+ cfg::writeByte("CLC", "UseWinColours", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_WINCOLOUR));
+ } {
+ char str[MAX_PATH], strrel[MAX_PATH];
+
+ GetDlgItemTextA(hwndDlg, IDC_FILENAME, str, sizeof(str));
+ if (CallService(MS_UTILS_PATHTORELATIVE, (WPARAM) str, (LPARAM) strrel))
+ cfg::writeString(NULL, "CLC", "BkBitmap", strrel);
+ else
+ cfg::writeString(NULL, "CLC", "BkBitmap", str);
+ } {
+ WORD flags = 0;
+ if (IsDlgButtonChecked(hwndDlg, IDC_STRETCHH))
+ flags |= CLB_STRETCHH;
+ if (IsDlgButtonChecked(hwndDlg, IDC_STRETCHV))
+ flags |= CLB_STRETCHV;
+ if (IsDlgButtonChecked(hwndDlg, IDC_TILEH))
+ flags |= CLBF_TILEH;
+ if (IsDlgButtonChecked(hwndDlg, IDC_TILEV))
+ flags |= CLBF_TILEV;
+ if (IsDlgButtonChecked(hwndDlg, IDC_SCROLL))
+ flags |= CLBF_SCROLL;
+ if (IsDlgButtonChecked(hwndDlg, IDC_PROPORTIONAL))
+ flags |= CLBF_PROPORTIONAL;
+ cfg::writeWord("CLC", "BkBmpUse", flags);
+ cfg::dat.bWallpaperMode = IsDlgButtonChecked(hwndDlg, IDC_SKINMODE) ? 1 : 0;
+ cfg::writeByte("CLUI", "UseBkSkin", (BYTE)cfg::dat.bWallpaperMode);
+ }
+ pcli->pfnClcOptionsChanged();
+ PostMessage(pcli->hwndContactList, CLUIINTM_REDRAW, 0, 0);
+ opt_clc_bkg_changed = 0;
+ return TRUE;
+ }
+ break;
+ }
+ break;
+ }
+ return FALSE;
+}
diff --git a/plugins/Clist_nicer/SRC/clcpaint.cpp b/plugins/Clist_nicer/SRC/clcpaint.cpp
index ef7cf12932..8844972745 100644
--- a/plugins/Clist_nicer/SRC/clcpaint.cpp
+++ b/plugins/Clist_nicer/SRC/clcpaint.cpp
@@ -1010,7 +1010,7 @@ bgskipped:
if(dwFlags & CLUI_FRAME_USEXSTATUSASSTATUS)
cEntry->dwXMask &= ~EIMG_SHOW_ADV1;
- for(i = EXICON_COUNT - 1; i >= 0; i--) {
+ for (i = EXICON_COUNT - 1; i >= 0; i--) {
iIndex = cfg::dat.exIconOrder[i] - 1;
if(iIndex >= 0 && iIndex < EXICON_COUNT) {
id = OrderTreeData[iIndex].ID;
diff --git a/plugins/Clist_nicer/SRC/config.cpp b/plugins/Clist_nicer/SRC/config.cpp
index 04315a162a..85994a922c 100644
--- a/plugins/Clist_nicer/SRC/config.cpp
+++ b/plugins/Clist_nicer/SRC/config.cpp
@@ -206,7 +206,7 @@ int cfg::getCache(const HANDLE hContact, const char *szProto)
{
int i, iFound = -1;
- for(i = 0; i < nextCacheEntry; i++) {
+ for (i = 0; i < nextCacheEntry; i++) {
if(eCache[i].hContact == hContact) {
iFound = i;
break;
diff --git a/plugins/Clist_nicer/SRC/contact.cpp b/plugins/Clist_nicer/SRC/contact.cpp
index 1d8f90e5c2..f51672e52c 100644
--- a/plugins/Clist_nicer/SRC/contact.cpp
+++ b/plugins/Clist_nicer/SRC/contact.cpp
@@ -298,7 +298,7 @@ int CompareContacts(const struct ClcContact* c1, const struct ClcContact* c2)
if(result)
return result;
- for(i = 0; i <= 2; i++) {
+ for (i = 0; i <= 2; i++) {
if(cfg::dat.sortOrder[i]) {
result = INTSORT_CompareContacts(c1, c2, cfg::dat.sortOrder[i]);
if(result != 0)
diff --git a/plugins/Clist_nicer/SRC/extBackg.cpp b/plugins/Clist_nicer/SRC/extBackg.cpp
index 0aa2b32265..503c288d4e 100644
--- a/plugins/Clist_nicer/SRC/extBackg.cpp
+++ b/plugins/Clist_nicer/SRC/extBackg.cpp
@@ -259,7 +259,7 @@ StatusItems_t *GetProtocolStatusItem(const char *szProto)
if(szProto == NULL)
return NULL;
- for(i = ID_EXTBK_LAST_D - ID_STATUS_OFFLINE + 1; i <= ID_EXTBK_LAST - ID_STATUS_OFFLINE; i++) {
+ for (i = ID_EXTBK_LAST_D - ID_STATUS_OFFLINE + 1; i <= ID_EXTBK_LAST - ID_STATUS_OFFLINE; i++) {
if (!strcmp(StatusItems[i].szName[0] == '{' ? &StatusItems[i].szName[3] : StatusItems[i].szName, szProto))
return &StatusItems[i];
}
@@ -281,7 +281,7 @@ void LoadExtBkSettingsFromDB()
StatusItems = (StatusItems_t *)malloc(sizeof(StatusItems_t) * ((ID_EXTBK_LAST - ID_STATUS_OFFLINE) + protoCount + 2));
CopyMemory(StatusItems, _StatusItems, sizeof(_StatusItems));
- for(i = 0; i < protoCount; i++) {
+ for (i = 0; i < protoCount; i++) {
ID_EXTBK_LAST++;
CopyMemory(&StatusItems[ID_EXTBK_LAST - ID_STATUS_OFFLINE], &StatusItems[0], sizeof(StatusItems_t));
mir_snprintf(StatusItems[ID_EXTBK_LAST - ID_STATUS_OFFLINE].szDBname, 30, "EXBK_%s", accs[i]->szModuleName );
@@ -546,7 +546,7 @@ void extbk_export(char *file)
WritePrivateProfileStructA("ExtBKSettings", buffer, &(StatusItems[n].BORDERSTYLE), sizeof(StatusItems[n].BORDERSTYLE), file);
}
}
- for(n = 0; n <= FONTID_LAST; n++) {
+ for (n = 0; n <= FONTID_LAST; n++) {
mir_snprintf(szSection, 255, "Font%d", n);
mir_snprintf(szKey, 255, "Font%dName", n);
@@ -769,7 +769,7 @@ static void ReadItem(StatusItems_t *this_item, char *szItem, char *file)
if(strcmp(buffer, "None")) {
int i;
- for(i = 0; i <= ID_EXTBK_LAST - ID_STATUS_OFFLINE; i++) {
+ for (i = 0; i <= ID_EXTBK_LAST - ID_STATUS_OFFLINE; i++) {
if (!_stricmp(StatusItems[i].szName[0] == '{' ? &StatusItems[i].szName[3] : StatusItems[i].szName, buffer)) {
defaults = &StatusItems[i];
break;
@@ -934,7 +934,7 @@ done_with_glyph:
}
goto imgread_done;
}
- for(n = 0;;n++) {
+ for (n = 0;;n++) {
mir_snprintf(szItemNr, 30, "Item%d", n);
GetPrivateProfileStringA(itemname, szItemNr, "None", buffer, 500, szFileName);
if (!strcmp(buffer, "None"))
@@ -960,7 +960,7 @@ done_with_glyph:
}
continue;
}
- for(i = 0; i <= ID_EXTBK_LAST - ID_STATUS_OFFLINE; i++) {
+ for (i = 0; i <= ID_EXTBK_LAST - ID_STATUS_OFFLINE; i++) {
if (!_stricmp(StatusItems[i].szName[0] == '{' ? &StatusItems[i].szName[3] : StatusItems[i].szName, buffer)) {
if (!alloced) {
if (!(tmpItem.dwFlags & IMAGE_GLYPH))
@@ -1026,7 +1026,7 @@ void IMG_DeleteItems()
}
g_glyphItem = NULL;
- for(i = 0; i <= ID_EXTBK_LAST - ID_STATUS_OFFLINE; i++)
+ for (i = 0; i <= ID_EXTBK_LAST - ID_STATUS_OFFLINE; i++)
StatusItems[i].imageItem = NULL;
}
@@ -1140,7 +1140,7 @@ static void BTN_ReadItem(char *itemName, char *file)
if(GetPrivateProfileIntA(itemName, "contact", 0, file) != 0)
tmpItem.dwFlags |= BUTTON_DBACTIONONCONTACT;
- for(n = 0; n <= 1; n++) {
+ for (n = 0; n <= 1; n++) {
char szKey[20];
BYTE *pValue;
@@ -1374,7 +1374,7 @@ void LoadPerContactSkins(TCHAR *tszFileName)
UIN[0] = 0;
break;
}
- for(j = 0; j < i - 1; j++) {
+ for (j = 0; j < i - 1; j++) {
if (!strcmp(szProto, items[j].szName) && !strcmp(UIN, items[j].szDBname)
&& lstrlenA(szProto) == lstrlenA(items[j].szName) && lstrlenA(UIN) == lstrlenA(items[j].szDBname)) {
@@ -1455,7 +1455,7 @@ void extbk_import(char *file, HWND hwndDlg)
data = 0;
GetPrivateProfileStructA("Global", "Version", &version, 4, file);
if(version >= 2) {
- for(n = 0; n <= FONTID_LAST; n++) {
+ for (n = 0; n <= FONTID_LAST; n++) {
mir_snprintf(szSection, 255, "Font%d", n);
mir_snprintf(szKey, 255, "Font%dName", n);
diff --git a/plugins/Clist_nicer/SRC/init.cpp b/plugins/Clist_nicer/SRC/init.cpp
index e606f3320f..35384d9d4f 100644
--- a/plugins/Clist_nicer/SRC/init.cpp
+++ b/plugins/Clist_nicer/SRC/init.cpp
@@ -293,10 +293,10 @@ extern "C" int __declspec(dllexport) CListInitialise(PLUGINLINK * link)
if (!cfg::getString(NULL, "CLUI", "exIconOrder", &dbv)) {
if(lstrlenA(dbv.pszVal) < EXICON_COUNT) {
- for(i = 1; i <= EXICON_COUNT; i++)
+ for (i = 1; i <= EXICON_COUNT; i++)
cfg::dat.exIconOrder[i - 1] = i;
} else {
- for(i = 0; i < EXICON_COUNT; i++)
+ for (i = 0; i < EXICON_COUNT; i++)
if(dbv.pszVal[i] < EXICON_COUNT+1 && dbv.pszVal[i] >0)
cfg::dat.exIconOrder[i] = dbv.pszVal[i];
else
@@ -304,7 +304,7 @@ extern "C" int __declspec(dllexport) CListInitialise(PLUGINLINK * link)
}
DBFreeVariant(&dbv);
} else {
- for(i = 1; i <= EXICON_COUNT; i++)
+ for (i = 1; i <= EXICON_COUNT; i++)
cfg::dat.exIconOrder[i - 1] = i;
}
ReloadThemedOptions();
diff --git a/plugins/Clist_nicer/SRC/statusbar.cpp b/plugins/Clist_nicer/SRC/statusbar.cpp
index aba30d92a1..8d130cd866 100644
--- a/plugins/Clist_nicer/SRC/statusbar.cpp
+++ b/plugins/Clist_nicer/SRC/statusbar.cpp
@@ -129,7 +129,7 @@ LRESULT CALLBACK NewStatusBarWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
dis.hDC = hdcMem;
dis.CtlType = 0;
nParts = SendMessage(hwnd, SB_GETPARTS, 0, 0);
- for(i = 0; i < nParts; i++) {
+ for (i = 0; i < nParts; i++) {
SendMessage(hwnd, SB_GETRECT, i, (LPARAM)&dis.rcItem);
OffsetRect(&dis.rcItem, 0, -b_offset);
dis.itemData = SendMessage(hwnd, SB_GETTEXTA, i, 0);
@@ -161,7 +161,7 @@ LRESULT CALLBACK NewStatusBarWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
ScreenToClient(hwnd, &pt);
nParts = SendMessage(hwnd, SB_GETPARTS, 0, 0);
- for(i = 0; i < nParts; i++) {
+ for (i = 0; i < nParts; i++) {
SendMessage(hwnd, SB_GETRECT, i, (LPARAM)&rc);
if(PtInRect(&rc,pt)) {
ProtocolData *PD;
diff --git a/plugins/Clist_nicer/SRC/statusfloater.cpp b/plugins/Clist_nicer/SRC/statusfloater.cpp
index 860241afa6..d07196ee16 100644
--- a/plugins/Clist_nicer/SRC/statusfloater.cpp
+++ b/plugins/Clist_nicer/SRC/statusfloater.cpp
@@ -243,7 +243,7 @@ INT_PTR CALLBACK DlgProcFloatingContacts(HWND hwndDlg, UINT msg, WPARAM wParam,
Utils::enableDlgControl(hwndDlg, IDC_FLT_SHOWTOOLTIPS, 0);
}
- for(i = 0; padctrlIDs[i] != 0; i++)
+ for (i = 0; padctrlIDs[i] != 0; i++)
SendDlgItemMessage(hwndDlg, padctrlIDs[i], UDM_SETRANGE, 0, MAKELONG(20, 0));
SendDlgItemMessage(hwndDlg, IDC_FLT_WIDTHSPIN, UDM_SETRANGE, 0, MAKELONG(200, 50));
SendDlgItemMessage(hwndDlg, IDC_FLT_RADIUSSPIN, UDM_SETRANGE, 0, MAKELONG(20, 1));
@@ -897,7 +897,7 @@ void SFL_SetSize()
hdc = GetDC(g_hwndSFL);
oldFont = reinterpret_cast<HFONT>(SelectObject(hdc, GetStockObject(DEFAULT_GUI_FONT)));
- for(i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++) {
+ for (i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++) {
szStatusMode = Translate((char *)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, (WPARAM)i, 0));
GetTextExtentPoint32A(hdc, szStatusMode, lstrlenA(szStatusMode), &sz);
lWidth = max(lWidth, sz.cx + 16 + 8);
diff --git a/plugins/Clist_nicer/SRC/viewmodes.cpp b/plugins/Clist_nicer/SRC/viewmodes.cpp
index 184466b5a2..e19a0a89c2 100644
--- a/plugins/Clist_nicer/SRC/viewmodes.cpp
+++ b/plugins/Clist_nicer/SRC/viewmodes.cpp
@@ -130,7 +130,7 @@ static int UpdateClistItem(HANDLE hContact, DWORD mask)
{
int i;
- for(i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++)
+ for (i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++)
SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_SETEXTRAIMAGE, (WPARAM)hContact, MAKELONG(i - ID_STATUS_OFFLINE,
(1 << (i - ID_STATUS_OFFLINE)) & mask ? i - ID_STATUS_OFFLINE : nullImage));
@@ -142,7 +142,7 @@ static DWORD GetMaskForItem(HANDLE hItem)
int i;
DWORD dwMask = 0;
- for(i = 0; i <= ID_STATUS_OUTTOLUNCH - ID_STATUS_OFFLINE; i++)
+ for (i = 0; i <= ID_STATUS_OUTTOLUNCH - ID_STATUS_OFFLINE; i++)
dwMask |= (SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_GETEXTRAIMAGE, (WPARAM)hItem, i) == nullImage ? 0 : 1 << i);
return dwMask;
@@ -167,13 +167,13 @@ static void UpdateStickies()
{
HANDLE hItem;
- for(i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++)
+ for (i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++)
SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_SETEXTRAIMAGE, (WPARAM)hInfoItem, MAKELONG(i - ID_STATUS_OFFLINE, (1 << (i - ID_STATUS_OFFLINE)) & stickyStatusMask ? i - ID_STATUS_OFFLINE : ID_STATUS_OUTTOLUNCH - ID_STATUS_OFFLINE + 1));
hItem=(HANDLE)SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_GETNEXTITEM,CLGN_ROOT,0);
hItem=(HANDLE)SendDlgItemMessage(clvmHwnd, IDC_CLIST,CLM_GETNEXTITEM,CLGN_NEXTGROUP, (LPARAM)hItem);
while(hItem) {
- for(i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++)
+ for (i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++)
SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_SETEXTRAIMAGE, (WPARAM)hItem, MAKELONG(i - ID_STATUS_OFFLINE, nullImage));
hItem=(HANDLE)SendDlgItemMessage(clvmHwnd, IDC_CLIST,CLM_GETNEXTITEM,CLGN_NEXTGROUP,(LPARAM)hItem);
}
@@ -227,7 +227,7 @@ static int FillDialog(HWND hwnd)
item.pszText = TranslateT("Ungrouped contacts");
newItem = SendMessage(hwndList, LVM_INSERTITEM, 0, (LPARAM)&item);
- for(i = 0;;i++) {
+ for (i = 0;;i++) {
mir_snprintf(buf, 20, "%d", i);
if(cfg::getTString(NULL, "CListGroups", buf, &dbv))
break;
@@ -244,7 +244,7 @@ static int FillDialog(HWND hwnd)
lvc.mask = LVCF_FMT;
lvc.fmt = LVCFMT_IMAGE | LVCFMT_LEFT;
ListView_InsertColumn(hwndList, 0, &lvc);
- for(i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++) {
+ for (i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++) {
item.pszText = Translate((char *)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, (WPARAM)i, 0));
item.iItem = i - ID_STATUS_OFFLINE;
newItem = SendMessageA(hwndList, LVM_INSERTITEMA, 0, (LPARAM)&item);
@@ -367,7 +367,7 @@ void SaveState()
char szTemp[256];
hwndList = GetDlgItem(clvmHwnd, IDC_PROTOCOLS);
- for(i = 0; i < ListView_GetItemCount(hwndList); i++) {
+ for (i = 0; i < ListView_GetItemCount(hwndList); i++) {
if(ListView_GetCheckState(hwndList, i)) {
item.mask = LVIF_TEXT;
item.pszText = szTemp;
@@ -389,7 +389,7 @@ void SaveState()
operators |= ListView_GetCheckState(hwndList, 0) ? CLVM_INCLUDED_UNGROUPED : 0;
- for(i = 0; i < ListView_GetItemCount(hwndList); i++) {
+ for (i = 0; i < ListView_GetItemCount(hwndList); i++) {
if(ListView_GetCheckState(hwndList, i)) {
item.mask = LVIF_TEXT;
item.pszText = szTemp;
@@ -403,7 +403,7 @@ void SaveState()
}
}
hwndList = GetDlgItem(clvmHwnd, IDC_STATUSMODES);
- for(i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++) {
+ for (i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++) {
if(ListView_GetCheckState(hwndList, i - ID_STATUS_OFFLINE))
statusMask |= (1 << (i - ID_STATUS_OFFLINE));
}
@@ -517,7 +517,7 @@ void UpdateFilters()
item.pszText = szTemp;
item.cchTextMax = 255;
- for(i = 0; i < ListView_GetItemCount(hwndList); i++) {
+ for (i = 0; i < ListView_GetItemCount(hwndList); i++) {
item.iItem = i;
SendMessageA(hwndList, LVM_GETITEMA, 0, (LPARAM)&item);
mir_snprintf(szMask, 256, "%s|", szTemp);
@@ -540,7 +540,7 @@ void UpdateFilters()
ListView_SetCheckState(hwndList, 0, dwFlags & CLVM_INCLUDED_UNGROUPED ? TRUE : FALSE);
- for(i = 1; i < ListView_GetItemCount(hwndList); i++) {
+ for (i = 1; i < ListView_GetItemCount(hwndList); i++) {
item.iItem = i;
SendMessage(hwndList, LVM_GETITEM, 0, (LPARAM)&item);
_sntprintf(szMask, 256, _T("%s|"), szTemp);
@@ -554,7 +554,7 @@ void UpdateFilters()
HWND hwndList = GetDlgItem(clvmHwnd, IDC_STATUSMODES);
int i;
- for(i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++) {
+ for (i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++) {
if ((1 << (i - ID_STATUS_OFFLINE)) & statusMask)
ListView_SetCheckState(hwndList, i - ID_STATUS_OFFLINE, TRUE)
else
@@ -610,7 +610,7 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP
API::pfnEnableThemeDialogTexture(hwndDlg, ETDT_ENABLETAB);
himlViewModes = ImageList_Create(16, 16, ILC_MASK | (IsWinVerXPPlus() ? ILC_COLOR32 : ILC_COLOR16), 12, 0);
- for(i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++)
+ for (i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++)
ImageList_AddIcon(himlViewModes, LoadSkinnedProtoIcon(NULL, i));
hIcon = (HICON)LoadImage(g_hInst, MAKEINTRESOURCE(IDI_MINIMIZE), IMAGE_ICON, 16, 16, 0);
@@ -1216,7 +1216,7 @@ void ApplyViewMode(const char *name)
BYTE bSaved = cfg::dat.sortOrder[0];
cfg::dat.sortOrder[0] = SORTBY_LASTMSG;
- for(i = 0; i < cfg::nextCacheEntry; i++)
+ for (i = 0; i < cfg::nextCacheEntry; i++)
cfg::eCache[i].dwLastMsgTime = INTSORT_GetLastMsgTime(cfg::eCache[i].hContact);
cfg::dat.sortOrder[0] = bSaved;
diff --git a/plugins/Clist_nicer/coolsb/coolsblib.cpp b/plugins/Clist_nicer/coolsb/coolsblib.cpp
index 3a90d0d070..42f74c4ca0 100644
--- a/plugins/Clist_nicer/coolsb/coolsblib.cpp
+++ b/plugins/Clist_nicer/coolsb/coolsblib.cpp
@@ -632,7 +632,7 @@ BOOL WINAPI CoolSB_InsertButton(HWND hwnd, int wSBflags, UINT nPos, SCROLLBUT *p
else
{
//insert space for the button at the specified position
- for(i = sbar->nButtons; i > nPos; i--)
+ for (i = sbar->nButtons; i > nPos; i--)
{
sbar->sbButtons[i] = sbar->sbButtons[i-1];
}
@@ -718,7 +718,7 @@ BOOL WINAPI CoolSB_InsertButton(HWND hwnd, int wSBflags, UINT nPos, SCROLLBUT *p
static SCROLLBUT *GetButtonFromId(SCROLLBAR *sbar, UINT uCmdId)
{
int i;
- for(i = 0; i < sbar->nButtons; i++)
+ for (i = 0; i < sbar->nButtons; i++)
{
if(sbar->sbButtons[i].uCmdId == uCmdId)
return &sbar->sbButtons[i];
@@ -798,7 +798,7 @@ BOOL WINAPI CoolSB_RemoveButton(HWND hwnd, int wSBflags, UINT uItem, BOOL fByCmd
else if(fByCmd == TRUE)
{
//find the button with the specified command id
- for(i = 0; i < sbar->nButtons; i++)
+ for (i = 0; i < sbar->nButtons; i++)
{
if(sbar->sbButtons[i].uCmdId == uItem)
{
@@ -813,7 +813,7 @@ BOOL WINAPI CoolSB_RemoveButton(HWND hwnd, int wSBflags, UINT uItem, BOOL fByCmd
}
//remove the button!
- for(i = uItem; i < sbar->nButtons - 1; i++)
+ for (i = uItem; i < sbar->nButtons - 1; i++)
{
sbar->sbButtons[i] = sbar->sbButtons[i+1];
}
diff --git a/plugins/Clist_nicer/coolsb/coolscroll.cpp b/plugins/Clist_nicer/coolsb/coolscroll.cpp
index 7f4dbf95b5..882b91e8fd 100644
--- a/plugins/Clist_nicer/coolsb/coolscroll.cpp
+++ b/plugins/Clist_nicer/coolsb/coolscroll.cpp
@@ -513,7 +513,7 @@ static int GetButtonSize(SCROLLBAR *sbar, HWND hwnd, UINT uBeforeAfter)
SCROLLBUT *sbut = sbar->sbButtons;
- for(i = 0; i < sbar->nButtons; i++)
+ for (i = 0; i < sbar->nButtons; i++)
{
//only consider those buttons on the same side as nTopBottom says
if(sbut[i].uPlacement == uBeforeAfter)
@@ -1340,7 +1340,7 @@ static LRESULT DrawHorzButtons(SCROLLBAR *sbar, HDC hdc, const RECT *rect, int l
xposl = rect->left - sbar->nButSizeBefore;
xposr = rect->right;
- for(i = 0; i < sbar->nButtons; i++)
+ for (i = 0; i < sbar->nButtons; i++)
{
if ((leftright & SBBP_LEFT) && sbut[i].uPlacement == SBBP_LEFT)
{
@@ -1776,7 +1776,7 @@ static UINT GetHorzButtonFromPt(SCROLLBAR *sb, RECT *rect, POINT pt, BOOL fRetur
if(sb->fButVisibleAfter)
rightpos -= sb->nButSizeAfter;
- for(i = 0; i < sb->nButtons; i++)
+ for (i = 0; i < sb->nButtons; i++)
{
if(sb->fButVisibleBefore && sbut[i].uPlacement == SBBP_LEFT)
{
@@ -1868,7 +1868,7 @@ static UINT GetHorzButtonRectFromId(SCROLLBAR *sb, RECT *rect, UINT index)
rightpos -= sb->nButSizeAfter;
//find the particular button in question
- for(i = 0; i < index; i++)
+ for (i = 0; i < index; i++)
{
if(sb->fButVisibleBefore && sbut[i].uPlacement == SBBP_LEFT)
{
@@ -2618,7 +2618,7 @@ static void ResizeButtonsToFit(SCROLLWND *sw, SCROLLBAR *sbar, HWND hwnd)
//restore any resizable buttons to their user-defined sizes,
//before shrinking them to fit. This means when we make the window
//bigger, the buttons will restore to their initial sizes
- for(i = 0; i < sbar->nButtons; i++)
+ for (i = 0; i < sbar->nButtons; i++)
{
sbut = &sbar->sbButtons[i];
if(sbut->uButType & SBBM_RESIZABLE)
diff --git a/plugins/Console/Console.c b/plugins/Console/Console.c
index 54bc0af80f..7f752d36de 100644
--- a/plugins/Console/Console.c
+++ b/plugins/Console/Console.c
@@ -1188,13 +1188,12 @@ static int OptInit(WPARAM wParam,LPARAM lParam)
{
OPTIONSDIALOGPAGE odp={0};
odp.cbSize = sizeof(odp);
- odp.position = 0;
odp.hInstance = hInst;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS);
- odp.ptszGroup = TranslateT("Network");
- odp.ptszTitle = TranslateT("Console");
+ odp.pszGroup = LPGEN("Network");
+ odp.pszTitle = LPGEN("Console");
odp.pfnDlgProc = OptDlgProc;
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS;
odp.expertOnlyControls = NULL;
Options_AddPage(wParam, &odp);
return 0;
diff --git a/plugins/CountryFlags/extraimg.c b/plugins/CountryFlags/extraimg.c
index 43f2930848..f019827e21 100644
--- a/plugins/CountryFlags/extraimg.c
+++ b/plugins/CountryFlags/extraimg.c
@@ -371,24 +371,23 @@ static INT_PTR CALLBACK ExtraImgOptDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,L
return FALSE;
}
+static UINT expertOnlyControls[]={IDC_CHECK_USEIPTOCOUNTRY};
static int ExtraImgOptInit(WPARAM wParam,LPARAM lParam)
{
- OPTIONSDIALOGPAGE odp;
- static UINT expertOnlyControls[]={IDC_CHECK_USEIPTOCOUNTRY};
+ OPTIONSDIALOGPAGE odp = { 0 };
UNREFERENCED_PARAMETER(lParam);
- ZeroMemory(&odp,sizeof(odp));
- odp.cbSize=sizeof(odp);
- odp.hInstance=hInst;
- odp.pszTemplate=MAKEINTRESOURCEA(IDD_OPT_EXTRAIMG);
- odp.position=900000002;
- odp.ptszGroup=_T("Contact List"); /* autotranslated */
- odp.ptszTitle=_T("Country Flags"); /* autotranslated */
- odp.ptszTab=_T("Country Flags"); /* autotranslated, can be made a tab */
- odp.flags=ODPF_BOLDGROUPS|ODPF_TCHAR;
- odp.pfnDlgProc=ExtraImgOptDlgProc;
- odp.expertOnlyControls=expertOnlyControls;
- odp.nExpertOnlyControls=SIZEOF(expertOnlyControls);
- Options_AddPage(wParam,&odp);
+ odp.cbSize = sizeof(odp);
+ odp.hInstance = hInst;
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_EXTRAIMG);
+ odp.position = 900000002;
+ odp.pszGroup = LPGEN("Contact List"); /* autotranslated */
+ odp.pszTitle = LPGEN("Country Flags"); /* autotranslated */
+ odp.pszTab = LPGEN("Country Flags"); /* autotranslated, can be made a tab */
+ odp.flags = ODPF_BOLDGROUPS;
+ odp.pfnDlgProc = ExtraImgOptDlgProc;
+ odp.expertOnlyControls = expertOnlyControls;
+ odp.nExpertOnlyControls = SIZEOF(expertOnlyControls);
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/Db_autobackups/options.c b/plugins/Db_autobackups/options.c
index 06051a940a..161d94ae4b 100644
--- a/plugins/Db_autobackups/options.c
+++ b/plugins/Db_autobackups/options.c
@@ -343,17 +343,15 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
int OptionsInit(WPARAM wParam, LPARAM lParam)
{
- OPTIONSDIALOGPAGE odp;
-
- ZeroMemory(&odp, sizeof(odp));
- odp.cbSize = sizeof(odp);
- odp.position = -790000000;
- odp.hInstance = hInst;
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS);
- odp.ptszTitle = LPGENT("Database AutoBackups");
- odp.ptszGroup = LPGENT("Services");
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
- odp.pfnDlgProc = DlgProcOptions;
+ OPTIONSDIALOGPAGE odp = { 0 };
+ odp.cbSize = sizeof(odp);
+ odp.position = -790000000;
+ odp.hInstance = hInst;
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS);
+ odp.pszTitle = LPGEN("Database AutoBackups");
+ odp.pszGroup = LPGEN("Services");
+ odp.flags = ODPF_BOLDGROUPS;
+ odp.pfnDlgProc = DlgProcOptions;
Options_AddPage(wParam, &odp);
return 0;
diff --git a/plugins/Dbx_mmap_SA/dialogs.c b/plugins/Dbx_mmap_SA/dialogs.c
index 26c15790c6..748322692b 100644
--- a/plugins/Dbx_mmap_SA/dialogs.c
+++ b/plugins/Dbx_mmap_SA/dialogs.c
@@ -48,17 +48,15 @@ BOOL IsDlgItemEnabled(HWND hwndDlg, int iIDCtrl)
static int OptionsInit(WPARAM wParam, LPARAM lParam)
{
- OPTIONSDIALOGPAGE odp;
-
- ZeroMemory(&odp, sizeof(odp));
- odp.cbSize = sizeof(odp);
- odp.position = -790000000;
- odp.hInstance = g_hInst;
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS);
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
- odp.ptszTitle = TranslateT("Database Features");
- odp.ptszGroup = TranslateT("Services");
- odp.pfnDlgProc = DlgProcOptions;
+ OPTIONSDIALOGPAGE odp = { 0 };
+ odp.cbSize = sizeof(odp);
+ odp.position = -790000000;
+ odp.hInstance = g_hInst;
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS);
+ odp.flags = ODPF_BOLDGROUPS;
+ odp.pszTitle = LPGEN("Database Features");
+ odp.pszGroup = LPGEN("Services");
+ odp.pfnDlgProc = DlgProcOptions;
Options_AddPage(wParam, &odp);
return 0;
diff --git a/plugins/ExtraIcons/options.cpp b/plugins/ExtraIcons/options.cpp
index a47450a7fe..411d3c59be 100644
--- a/plugins/ExtraIcons/options.cpp
+++ b/plugins/ExtraIcons/options.cpp
@@ -38,13 +38,13 @@ int InitOptionsCallback(WPARAM wParam, LPARAM lParam)
OPTIONSDIALOGPAGE odp = { 0 };
odp.cbSize = sizeof(odp);
odp.hInstance = hInst;
- odp.pszGroup = LPGENT("Contact List");
- odp.pszTitle = LPGENT("Extra icons");
- odp.pszTab = LPGENT("General");
+ odp.pszGroup = LPGEN("Contact List");
+ odp.pszTitle = LPGEN("Extra icons");
+ odp.pszTab = LPGEN("General");
odp.pfnDlgProc = OptionsDlgProc;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS);
odp.flags = ODPF_BOLDGROUPS | ODPF_EXPERTONLY;
- Options_AddPage(wParam,&odp);
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/FavContacts/src/main.cpp b/plugins/FavContacts/src/main.cpp
index 0fb5757e54..a48cb4f536 100644
--- a/plugins/FavContacts/src/main.cpp
+++ b/plugins/FavContacts/src/main.cpp
@@ -292,10 +292,10 @@ int ProcessOptInitialise(WPARAM wParam, LPARAM lParam)
odp.position = 100000000;
odp.hInstance = g_hInst;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS);
- odp.ptszGroup = TranslateT("Contact List");
- odp.ptszTitle = TranslateT("Favourites");
+ odp.pszGroup = LPGEN("Contact List");
+ odp.pszTitle = LPGEN("Favourites");
odp.groupPosition = 910000000;
- odp.flags = ODPF_BOLDGROUPS|ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS;
odp.pfnDlgProc = OptionsDlgProc;
Options_AddPage(wParam, &odp);
return 0;
diff --git a/plugins/FingerPrintModPlus/src/fingerprint.cpp b/plugins/FingerPrintModPlus/src/fingerprint.cpp
index 7ef43072b5..a802975898 100644
--- a/plugins/FingerPrintModPlus/src/fingerprint.cpp
+++ b/plugins/FingerPrintModPlus/src/fingerprint.cpp
@@ -937,18 +937,14 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
}
int OnOptInitialise(WPARAM wParam, LPARAM lParam)
{
- OPTIONSDIALOGPAGE odp;
-
- ZeroMemory(&odp, sizeof(odp));
-
+ OPTIONSDIALOGPAGE odp = { 0 };
odp.cbSize = sizeof(odp);
- odp.position = 0;
odp.hInstance = g_hInst;
- odp.ptszGroup = LPGENT("Customize");
+ odp.pszGroup = LPGEN("Customize");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_DIALOG);
- odp.ptszTitle = LPGENT("Fingerprint");
+ odp.pszTitle = LPGEN("Fingerprint");
odp.pfnDlgProc = DlgProcOptions;
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS;
Options_AddPage(wParam, &odp);
return 0;
diff --git a/plugins/FloatingContacts/options.cpp b/plugins/FloatingContacts/options.cpp
index 2779b22804..cee946a438 100644
--- a/plugins/FloatingContacts/options.cpp
+++ b/plugins/FloatingContacts/options.cpp
@@ -103,28 +103,20 @@ OnOptionsInitialize
, IN LPARAM lParam
)
{
- OPTIONSDIALOGPAGE odp;
-
- ZeroMemory(&odp, sizeof(odp));
- odp.cbSize = sizeof(odp);
- odp.hInstance = hInst;
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_FLTCONT);
- odp.ptszTitle = _T("Floating Contacts");
- odp.ptszGroup = _T("Plugins");
- odp.ptszTab = _T("Main Features");
- odp.flags = ODPF_BOLDGROUPS|ODPF_TCHAR;
- odp.pfnDlgProc = (DLGPROC)OptWndProc;
+ OPTIONSDIALOGPAGE odp = { 0 };
+ odp.cbSize = sizeof(odp);
+ odp.hInstance = hInst;
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_FLTCONT);
+ odp.pszTitle = LPGEN("Floating Contacts");
+ odp.pszGroup = LPGEN("Plugins");
+ odp.pszTab = LPGEN("Main Features");
+ odp.flags = ODPF_BOLDGROUPS;
+ odp.pfnDlgProc = (DLGPROC)OptWndProc;
Options_AddPage(wParam, &odp);
- ZeroMemory(&odp, sizeof(odp));
- odp.cbSize = sizeof(odp);
- odp.hInstance = hInst;
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_SKIN);
- odp.ptszTitle = _T("Floating Contacts");
- odp.ptszGroup = _T("Plugins");
- odp.ptszTab = _T("Appearance");
- odp.flags = ODPF_BOLDGROUPS|ODPF_TCHAR;
- odp.pfnDlgProc = (DLGPROC)OptSknWndProc;
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_SKIN);
+ odp.pszTab = LPGEN("Appearance");
+ odp.pfnDlgProc = (DLGPROC)OptSknWndProc;
Options_AddPage(wParam, &odp);
return 0;
diff --git a/plugins/Folders/hooked_events.cpp b/plugins/Folders/hooked_events.cpp
index 20ba19d4ec..24ece7534e 100644
--- a/plugins/Folders/hooked_events.cpp
+++ b/plugins/Folders/hooked_events.cpp
@@ -70,15 +70,14 @@ int OnModulesLoaded(WPARAM wParam, LPARAM lParam)
int OnOptionsInitialize(WPARAM wParam, LPARAM lParam)
{
OPTIONSDIALOGPAGE odp = { 0 };
-
odp.cbSize = sizeof(odp);
odp.position = 100000000;
odp.hInstance = hInstance;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_FOLDERS);
- odp.pszTitle = Translate("Folders");
- odp.pszGroup = Translate("Customize");
+ odp.pszTitle = LPGEN("Folders");
+ odp.pszGroup = LPGEN("Customize");
odp.groupPosition = 910000000;
- odp.flags=ODPF_BOLDGROUPS;
+ odp.flags = ODPF_BOLDGROUPS;
odp.pfnDlgProc = DlgProcOpts;
Options_AddPage(wParam, &odp);
diff --git a/plugins/Gender/options.cpp b/plugins/Gender/options.cpp
index cc9ab8d59f..4d4875c0af 100644
--- a/plugins/Gender/options.cpp
+++ b/plugins/Gender/options.cpp
@@ -151,16 +151,14 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
int onOptInitialise(WPARAM wParam, LPARAM lParam)
{
- OPTIONSDIALOGPAGE odp;
- ZeroMemory(&odp, sizeof(odp));
+ OPTIONSDIALOGPAGE odp = { 0 };
odp.cbSize = sizeof(odp);
- odp.position = 0;
odp.hInstance = g_hInst;
- odp.ptszGroup = LPGENT("Plugins");
+ odp.pszGroup = LPGEN("Plugins");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_GENDER_OPT);
- odp.ptszTitle = LPGENT("Gender");
+ odp.pszTitle = LPGEN("Gender");
odp.pfnDlgProc = DlgProcOptions;
- odp.flags = ODPF_BOLDGROUPS|ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS;
Options_AddPage(wParam, &odp);
return 0;
diff --git a/plugins/HistoryLinkListPlus/linklist.c b/plugins/HistoryLinkListPlus/linklist.c
index bcf72add92..56c4c2caaf 100644
--- a/plugins/HistoryLinkListPlus/linklist.c
+++ b/plugins/HistoryLinkListPlus/linklist.c
@@ -161,20 +161,17 @@ int __declspec(dllexport) Unload(void)
int InitOptionsDlg(WPARAM wParam, LPARAM lParam)
{
- OPTIONSDIALOGPAGE optionsDialog;
+ OPTIONSDIALOGPAGE odp = { 0 };
UNREFERENCED_PARAMETER(lParam);
- ZeroMemory(&optionsDialog, sizeof(OPTIONSDIALOGPAGE));
- optionsDialog.cbSize = sizeof(optionsDialog);
- optionsDialog.hInstance = hInst;
- optionsDialog.ptszGroup = LPGENT("History");
- optionsDialog.ptszTitle = LPGENT("History Linklist");
- optionsDialog.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS_DLG);
- optionsDialog.pfnDlgProc = OptionsDlgProc;
- optionsDialog.expertOnlyControls = NULL;
- optionsDialog.nExpertOnlyControls = 0;
- optionsDialog.flags = ODPF_BOLDGROUPS|ODPF_TCHAR;
- Options_AddPage(wParam, (LPARAM)&optionsDialog);
+ odp.cbSize = sizeof(odp);
+ odp.hInstance = hInst;
+ odp.pszGroup = LPGEN("History");
+ odp.pszTitle = LPGEN("History Linklist");
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS_DLG);
+ odp.pfnDlgProc = OptionsDlgProc;
+ odp.flags = ODPF_BOLDGROUPS;
+ Options_AddPage(wParam, (LPARAM)&odp);
return 0;
}
diff --git a/plugins/HistorySweeperLight/options.c b/plugins/HistorySweeperLight/options.c
index 601c768201..53a2ab5bd9 100644
--- a/plugins/HistorySweeperLight/options.c
+++ b/plugins/HistorySweeperLight/options.c
@@ -340,16 +340,14 @@ INT_PTR CALLBACK DlgProcHSOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa
int HSOptInitialise(WPARAM wParam,LPARAM lParam)
{
OPTIONSDIALOGPAGE odp = {0};
-
odp.cbSize = sizeof(odp);
odp.position = 0;
odp.hInstance = hInst;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_HISTORYSWEEPER);
- odp.ptszTitle = _T(ModuleName);
- odp.ptszGroup = _T("History");
+ odp.pszTitle = ModuleName;
+ odp.pszGroup = LPGEN("History");
odp.pfnDlgProc = DlgProcHSOpts;
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
-
+ odp.flags = ODPF_BOLDGROUPS;
Options_AddPage(wParam, &odp);
return 0;
diff --git a/plugins/IEView/Options.cpp b/plugins/IEView/Options.cpp
index 4c1948d60e..d47b465e98 100644
--- a/plugins/IEView/Options.cpp
+++ b/plugins/IEView/Options.cpp
@@ -41,18 +41,19 @@ static HIMAGELIST hProtocolImageList = NULL;
static HIMAGELIST hImageList = NULL;
static BOOL (WINAPI *pfnEnableThemeDialogTexture)(HANDLE, DWORD) = 0;
-typedef struct TabDefStruct {
+struct
+{
DLGPROC dlgProc;
DWORD dlgId;
- TCHAR *tabName;
-} TabDef;
-
-static TabDef tabPages[] = {
- {IEViewGeneralOptDlgProc, IDD_GENERAL_OPTIONS, _T("General")},
- {IEViewSRMMOptDlgProc, IDD_SRMM_OPTIONS, _T("Message Log")},
- {IEViewGroupChatsOptDlgProc, IDD_SRMM_OPTIONS, _T("Group Chats")},
- {IEViewHistoryOptDlgProc, IDD_SRMM_OPTIONS, _T("History")}
- };
+ char *tabName;
+}
+static tabPages[] =
+{
+ { IEViewGeneralOptDlgProc, IDD_GENERAL_OPTIONS, LPGEN("General") },
+ { IEViewSRMMOptDlgProc, IDD_SRMM_OPTIONS, LPGEN("Message Log") },
+ { IEViewGroupChatsOptDlgProc, IDD_SRMM_OPTIONS, LPGEN("Group Chats") },
+ { IEViewHistoryOptDlgProc, IDD_SRMM_OPTIONS, LPGEN("History") }
+};
static LPARAM GetItemParam(HWND hwndTreeView, HTREEITEM hItem) {
TVITEM tvi = {0};
@@ -422,25 +423,23 @@ static bool BrowseFile(HWND hwndDlg, char *filter, char *defExt, char *path, in
int IEViewOptInit(WPARAM wParam, LPARAM lParam)
{
- DWORD i;
OPTIONSDIALOGPAGE odp = { 0 };
odp.cbSize = sizeof(odp);
- odp.position = 0;
odp.hInstance = hInstance;
- odp.ptszGroup = _T("Message Sessions");
- odp.ptszTitle = _T("IEView");
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
- odp.nIDBottomSimpleControl = 0;
+ odp.pszGroup = LPGEN("Message Sessions");
+ odp.pszTitle = LPGEN("IEView");
+ odp.flags = ODPF_BOLDGROUPS;
odp.pszTemplate = MAKEINTRESOURCEA(tabPages[0].dlgId);
odp.pfnDlgProc = tabPages[0].dlgProc;
- odp.ptszTab = tabPages[0].tabName;
+ odp.pszTab = tabPages[0].tabName;
Options_AddPage(wParam, &odp);
- odp.ptszGroup = _T("Skins");
- odp.ptszTitle = _T("IEView");
- for (i = 1; i < SIZEOF(tabPages); i++) {
+
+ odp.pszGroup = LPGEN("Skins");
+ odp.pszTitle = LPGEN("IEView");
+ for (size_t i = 1; i < SIZEOF(tabPages); i++) {
odp.pszTemplate = MAKEINTRESOURCEA(tabPages[i].dlgId);
odp.pfnDlgProc = tabPages[i].dlgProc;
- odp.ptszTab = tabPages[i].tabName;
+ odp.pszTab = tabPages[i].tabName;
Options_AddPage(wParam, &odp);
}
return 0;
@@ -650,9 +649,8 @@ static INT_PTR CALLBACK IEViewSRMMOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wPar
{
ProtocolSettings *proto = (ProtocolSettings *)GetItemParam((HWND)wParam, (HTREEITEM) lParam);
if (proto != NULL) {
- if (strcmpi(proto->getProtocolName(), "_default_")) {
- proto->setSRMMEnableTemp(TreeView_GetCheckState((HWND)wParam, (HTREEITEM) lParam));
- }
+ if (strcmpi(proto->getProtocolName(), "_default_"))
+ proto->setSRMMEnableTemp( TreeView_GetCheckState((HWND)wParam, (HTREEITEM) lParam));
}
if ((HTREEITEM) lParam != TreeView_GetSelection((HWND)wParam)) {
TreeView_SelectItem((HWND)wParam, (HTREEITEM) lParam);
@@ -789,11 +787,10 @@ static INT_PTR CALLBACK IEViewHistoryOptDlgProc(HWND hwndDlg, UINT msg, WPARAM w
case UM_CHECKSTATECHANGE:
{
ProtocolSettings *proto = (ProtocolSettings *)GetItemParam((HWND)wParam, (HTREEITEM) lParam);
- if (proto != NULL) {
- if (strcmpi(proto->getProtocolName(), "_default_")) {
+ if (proto != NULL)
+ if (strcmpi(proto->getProtocolName(), "_default_"))
proto->setHistoryEnableTemp(TreeView_GetCheckState((HWND)wParam, (HTREEITEM) lParam));
- }
- }
+
if ((HTREEITEM) lParam != TreeView_GetSelection((HWND)wParam)) {
TreeView_SelectItem((HWND)wParam, (HTREEITEM) lParam);
} else {
@@ -930,11 +927,10 @@ static INT_PTR CALLBACK IEViewGroupChatsOptDlgProc(HWND hwndDlg, UINT msg, WPARA
case UM_CHECKSTATECHANGE:
{
ProtocolSettings *proto = (ProtocolSettings *)GetItemParam((HWND)wParam, (HTREEITEM) lParam);
- if (proto != NULL) {
- if (strcmpi(proto->getProtocolName(), "_default_")) {
+ if (proto != NULL)
+ if (strcmpi(proto->getProtocolName(), "_default_"))
proto->setChatEnableTemp(TreeView_GetCheckState((HWND)wParam, (HTREEITEM) lParam));
- }
- }
+
if ((HTREEITEM) lParam != TreeView_GetSelection((HWND)wParam)) {
TreeView_SelectItem((HWND)wParam, (HTREEITEM) lParam);
} else {
diff --git a/plugins/IgnoreState/options.cpp b/plugins/IgnoreState/options.cpp
index 83ebefa587..eda6b6ffea 100644
--- a/plugins/IgnoreState/options.cpp
+++ b/plugins/IgnoreState/options.cpp
@@ -264,16 +264,13 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
int onOptInitialise(WPARAM wParam, LPARAM lParam)
{
- OPTIONSDIALOGPAGE odp;
-
- ZeroMemory(&odp, sizeof(odp));
+ OPTIONSDIALOGPAGE odp = { 0 };
odp.cbSize = sizeof(odp);
- odp.position = 0;
odp.hInstance = g_hInst;
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
- odp.ptszGroup = _T("Contact List");
+ odp.flags = ODPF_BOLDGROUPS;
+ odp.pszGroup = LPGEN("Contact List");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_RATE_OPT);
- odp.ptszTitle = _T(MODULENAME);
+ odp.pszTitle = MODULENAME;
odp.pfnDlgProc = DlgProcOptions;
Options_AddPage(wParam, &odp);
diff --git a/plugins/KeyboardNotify/options.cpp b/plugins/KeyboardNotify/options.cpp
index c196a84ec3..d74902aec8 100644
--- a/plugins/KeyboardNotify/options.cpp
+++ b/plugins/KeyboardNotify/options.cpp
@@ -154,26 +154,21 @@ static BOOL (WINAPI *pfnEnableThemeDialogTexture)(HANDLE, DWORD) = 0;
// **
int InitializeOptions(WPARAM wParam,LPARAM lParam)
{
-
- OPTIONSDIALOGPAGE odp;
- HMODULE hUxTheme = NULL;
-
- if(bWindowsNT && dWinVer >= 5.01) {
- hUxTheme = GetModuleHandle(L"uxtheme.dll");
-
+ if (bWindowsNT && dWinVer >= 5.01) {
+ HMODULE hUxTheme = GetModuleHandle(L"uxtheme.dll");
if(hUxTheme)
pfnEnableThemeDialogTexture = (BOOL (WINAPI *)(HANDLE, DWORD))GetProcAddress(hUxTheme, "EnableThemeDialogTexture");
}
- ZeroMemory(&odp,sizeof(odp));
+ OPTIONSDIALOGPAGE odp = { 0 };
odp.cbSize = sizeof(odp);
odp.position = 0;
odp.hInstance = hInst;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS);
- odp.pszTitle = "Keyboard Flash";
- odp.pszGroup = "Plugins";
+ odp.pszTitle = LPGEN("Keyboard Flash");
+ odp.pszGroup = LPGEN("Plugins");
odp.groupPosition = 910000000;
- odp.flags=ODPF_BOLDGROUPS;
+ odp.flags = ODPF_BOLDGROUPS;
odp.pfnDlgProc = DlgProcOptions;
odp.nIDBottomSimpleControl = 0;
Options_AddPage(wParam, &odp);
diff --git a/plugins/LangMan/options.cpp b/plugins/LangMan/options.cpp
index bd3d421726..a3347c7ac6 100644
--- a/plugins/LangMan/options.cpp
+++ b/plugins/LangMan/options.cpp
@@ -646,16 +646,13 @@ void ReloadLangOptList(void)
static int LangOptInit(WPARAM wParam, LPARAM lParam)
{
- OPTIONSDIALOGPAGE odp;
+ OPTIONSDIALOGPAGE odp = { 0 };
UNREFERENCED_PARAMETER(lParam);
- ZeroMemory(&odp, sizeof(odp));
odp.cbSize = sizeof(odp);
odp.hInstance = hInst;
- odp.flags = ODPF_BOLDGROUPS|ODPF_TCHAR;
- odp.position = 1200000090; /* plugin opts = 1300000000 */
-// odp.ptszGroup = _T("Appearance"); /* autotranslated */
- odp.ptszTitle = _T("Appearance"); /* autotranslated */
-// odp.ptszTab = _T("Language"); /* autotranslated, can be made a tab */
+ odp.flags = ODPF_BOLDGROUPS;
+ odp.position = 1200000090;
+ odp.pszTitle = LPGEN("Appearance"); /* autotranslated */
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_LANG);
odp.pfnDlgProc = LangOptDlgProc;
Options_AddPage(wParam, &odp);
diff --git a/plugins/ListeningTo/options.cpp b/plugins/ListeningTo/options.cpp
index babbbe7ebd..cd604c33fd 100644
--- a/plugins/ListeningTo/options.cpp
+++ b/plugins/ListeningTo/options.cpp
@@ -83,29 +83,28 @@ int InitOptionsCallback(WPARAM wParam,LPARAM lParam)
OPTIONSDIALOGPAGE odp = { 0 };
odp.cbSize=sizeof(odp);
odp.hInstance = hInst;
- odp.ptszGroup = TranslateT("Status");
- odp.ptszTitle = TranslateT("Listening info");
+ odp.flags = ODPF_BOLDGROUPS;
- odp.ptszTab = TranslateT("General");
+ odp.pszGroup = LPGEN("Status");
+ odp.pszTitle = LPGEN("Listening info");
+ odp.pszTab = LPGEN("General");
odp.pfnDlgProc = OptionsDlgProc;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS);
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
odp.expertOnlyControls = optionsExpertControls;
odp.nExpertOnlyControls = MAX_REGS(optionsExpertControls);
odp.nIDBottomSimpleControl = IDC_LISTENING_G;
- Options_AddPage(wParam,&odp);
+ Options_AddPage(wParam, &odp);
- odp.ptszTab = TranslateT("Format");
+ odp.pszTab = LPGEN("Format");
odp.pfnDlgProc = FormatDlgProc;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_FORMAT);
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR | ODPF_EXPERTONLY;
- Options_AddPage(wParam,&odp);
+ odp.flags = ODPF_BOLDGROUPS | ODPF_EXPERTONLY;
+ Options_AddPage(wParam, &odp);
- odp.ptszTab = TranslateT("Players");
+ odp.pszTab = LPGEN("Players");
odp.pfnDlgProc = PlayersDlgProc;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_PLAYERS);
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR | ODPF_EXPERTONLY;
- Options_AddPage(wParam,&odp);
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/MenuItemEx/options.c b/plugins/MenuItemEx/options.c
index 70626f64d6..0aa0bbb68b 100644
--- a/plugins/MenuItemEx/options.c
+++ b/plugins/MenuItemEx/options.c
@@ -122,16 +122,15 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam)
int OptionsInit(WPARAM wparam,LPARAM lparam)
{
OPTIONSDIALOGPAGE odp={0};
+ odp.cbSize = sizeof(odp);
+ odp.position = 955000000;
+ odp.hInstance = hinstance;
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS);
+ odp.pszTitle = MODULENAME;
+ odp.pfnDlgProc = OptionsProc;
+ odp.pszGroup = LPGEN("Customize");
+ odp.flags = ODPF_BOLDGROUPS;
+ Options_AddPage(wparam,&odp);
- odp.cbSize=sizeof(odp);
- odp.position=955000000;
- odp.hInstance=hinstance;
- odp.pszTemplate=MAKEINTRESOURCEA(IDD_OPTIONS);
- odp.ptszTitle= _T(MODULENAME);
- odp.pfnDlgProc=OptionsProc;
- odp.ptszGroup=_T("Customize");
- odp.flags=ODPF_BOLDGROUPS | ODPF_TCHAR;
-
- Options_AddPage(wparam,&odp);
return 0;
}
diff --git a/plugins/MetaContacts/meta_services.c b/plugins/MetaContacts/meta_services.c
index e066ef8709..97a6623be4 100644
--- a/plugins/MetaContacts/meta_services.c
+++ b/plugins/MetaContacts/meta_services.c
@@ -1846,33 +1846,29 @@ INT_PTR Meta_GetInfo(WPARAM wParam, LPARAM lParam) {
return 0; // fail
}
-int Meta_OptInit(WPARAM wParam, LPARAM lParam) {
- OPTIONSDIALOGPAGE odp;
- ZeroMemory(&odp, sizeof(odp));
- odp.cbSize = sizeof(odp);
- odp.position = -790000000;
- odp.hInstance = hInstance;
- odp.flags = ODPF_BOLDGROUPS;
-
- odp.pszTemplate = MAKEINTRESOURCE(IDD_OPTIONS);
- odp.pszTitle = "MetaContacts";
- odp.pszGroup = "Contact List";
- odp.pszTab = "General";
- odp.pfnDlgProc = DlgProcOpts;
+int Meta_OptInit(WPARAM wParam, LPARAM lParam)
+{
+ OPTIONSDIALOGPAGE odp = { 0 };
+ odp.cbSize = sizeof(odp);
+ odp.position = -790000000;
+ odp.hInstance = hInstance;
+ odp.flags = ODPF_BOLDGROUPS;
+
+ odp.pszTemplate = MAKEINTRESOURCE(IDD_OPTIONS);
+ odp.pszTitle = LPGEN("MetaContacts");
+ odp.pszGroup = LPGEN("Contact List");
+ odp.pszTab = LPGEN("General");
+ odp.pfnDlgProc = DlgProcOpts;
Options_AddPage(wParam, &odp);
- odp.pszTemplate = MAKEINTRESOURCE(IDD_PRIORITIES);
- odp.pszTitle = "MetaContacts";
- odp.pszGroup = "Contact List";
- odp.pszTab = "Priorities";
- odp.pfnDlgProc = DlgProcOptsPriorities;
+ odp.pszTemplate = MAKEINTRESOURCE(IDD_PRIORITIES);
+ odp.pszTab = LPGEN("Priorities");
+ odp.pfnDlgProc = DlgProcOptsPriorities;
Options_AddPage(wParam, &odp);
- odp.pszTemplate = MAKEINTRESOURCE(IDD_HISTORY);
- odp.pszTitle = "MetaContacts";
- odp.pszGroup = "Contact List";
- odp.pszTab = "History";
- odp.pfnDlgProc = DlgProcOpts;
+ odp.pszTemplate = MAKEINTRESOURCE(IDD_HISTORY);
+ odp.pszTab = LPGEN("History");
+ odp.pfnDlgProc = DlgProcOpts;
Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/NewAwaySysMod/AwayOpt.cpp b/plugins/NewAwaySysMod/AwayOpt.cpp
index dc8ed83d56..e875afe353 100644
--- a/plugins/NewAwaySysMod/AwayOpt.cpp
+++ b/plugins/NewAwaySysMod/AwayOpt.cpp
@@ -1758,36 +1758,27 @@ int OptsDlgInit(WPARAM wParam, LPARAM lParam)
optDi.cbSize = sizeof(optDi);
optDi.position = 920000000;
optDi.hInstance = g_hInstance;
- optDi.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
-/*
- optDi.ptszTitle = OPT_TITLE;
- optDi.pfnDlgProc = PopupOptDlg;
- optDi.pszTemplate = MAKEINTRESOURCEA(IDD_POPUPOPTDLG);
- optDi.ptszGroup = OPT_POPUPGROUP;
- Options_AddPage(wParam, &optDi);
-*/
-// optDi.ptszTitle = OPT_TITLE;
- optDi.ptszTitle = OPT_MAINGROUP;
-// optDi.ptszGroup = OPT_MAINGROUP;
+ optDi.flags = ODPF_BOLDGROUPS;
+ optDi.pszTitle = OPT_MAINGROUP;
optDi.pfnDlgProc = MessagesOptDlg;
optDi.pszTemplate = MAKEINTRESOURCEA(IDD_MESSAGES);
- optDi.ptszTab = LPGENT("Statuses messages");
+ optDi.pszTab = LPGEN("Statuses messages");
Options_AddPage(wParam, &optDi);
optDi.pfnDlgProc = MoreOptDlg;
optDi.pszTemplate = MAKEINTRESOURCEA(IDD_MOREOPTDIALOG);
- optDi.ptszTab = LPGENT("Main options");
+ optDi.pszTab = LPGEN("Main options");
Options_AddPage(wParam, &optDi);
optDi.pfnDlgProc = AutoreplyOptDlg;
optDi.pszTemplate = MAKEINTRESOURCEA(IDD_AUTOREPLY);
- optDi.ptszTab = LPGENT("Autoreply");
+ optDi.pszTab = LPGEN("Autoreply");
Options_AddPage(wParam, &optDi);
optDi.pfnDlgProc = ContactsOptDlg;
optDi.pszTemplate = MAKEINTRESOURCEA(IDD_CONTACTSOPTDLG);
- optDi.ptszTab = LPGENT("Contacts");
+ optDi.pszTab = LPGEN("Contacts");
Options_AddPage(wParam, &optDi);
return 0;
}
diff --git a/plugins/NewAwaySysMod/Common.h b/plugins/NewAwaySysMod/Common.h
index 7801d3f47e..4c769b4e24 100644
--- a/plugins/NewAwaySysMod/Common.h
+++ b/plugins/NewAwaySysMod/Common.h
@@ -220,8 +220,8 @@
// options dialog
#define OPT_TITLE LPGENT("Away System")
-#define OPT_MAINGROUP LPGENT("Status")
-#define OPT_POPUPGROUP LPGENT("PopUps")
+#define OPT_MAINGROUP LPGEN("Status")
+#define OPT_POPUPGROUP LPGEN("PopUps")
#define MRM_MAX_GENERATED_TITLE_LEN 35 // maximum length of automatically generated title for recent messages
diff --git a/plugins/NewXstatusNotify/options.cpp b/plugins/NewXstatusNotify/options.cpp
index 193fb56884..5fc13a53ad 100644
--- a/plugins/NewXstatusNotify/options.cpp
+++ b/plugins/NewXstatusNotify/options.cpp
@@ -1053,39 +1053,38 @@ int OptionsInitialize(WPARAM wParam, LPARAM lParam)
odp.cbSize = sizeof(odp);
odp.position = -100000000;
odp.hInstance = hInst;
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
- odp.ptszTitle = LPGENT("Status Notify");
- odp.ptszGroup = LPGENT("Status");
- odp.ptszTab = LPGENT("General");
+ odp.flags = ODPF_BOLDGROUPS;
+ odp.pszTitle = LPGEN("Status Notify");
+ odp.pszGroup = LPGEN("Status");
+ odp.pszTab = LPGEN("General");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_GENERAL);
odp.pfnDlgProc = DlgProcGeneralOpts;
- Options_AddPage(wParam,&odp);
+ Options_AddPage(wParam, &odp);
- odp.ptszTab = LPGENT("Filtering");
+ odp.pszTab = LPGEN("Filtering");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_FILTERS);
odp.pfnDlgProc = DlgProcFiltering;
- Options_AddPage(wParam,&odp);
+ Options_AddPage(wParam, &odp);
- odp.ptszTab = LPGENT("Message log");
+ odp.pszTab = LPGEN("Message log");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_XLOG);
odp.pfnDlgProc = DlgProcXLogOpts;
Options_AddPage(wParam, &odp);
- if (ServiceExists(MS_POPUP_ADDPOPUP))
- {
- odp.ptszTitle = LPGENT("Status Notify");
- odp.ptszGroup = LPGENT("Popups");
- odp.ptszTab = LPGENT("General");
+ if (ServiceExists(MS_POPUP_ADDPOPUP)) {
+ odp.pszTitle = LPGEN("Status Notify");
+ odp.pszGroup = LPGEN("Popups");
+ odp.pszTab = LPGEN("General");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_POPUP);
odp.pfnDlgProc = DlgProcPopUpOpts;
- Options_AddPage(wParam,&odp);
+ Options_AddPage(wParam, &odp);
- odp.ptszTab = LPGENT("Extra status");
+ odp.pszTab = LPGEN("Extra status");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_XPOPUP);
odp.pfnDlgProc = DlgProcXPopupOpts;
Options_AddPage(wParam, &odp);
- odp.ptszTab = LPGENT("Status message");
+ odp.pszTab = LPGEN("Status message");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_SMPOPUP);
odp.pfnDlgProc = DlgProcSMPopupOpts;
Options_AddPage(wParam, &odp);
diff --git a/plugins/Nudge/options.cpp b/plugins/Nudge/options.cpp
index 7d5f052c6d..b0369143dc 100644
--- a/plugins/Nudge/options.cpp
+++ b/plugins/Nudge/options.cpp
@@ -10,23 +10,22 @@ CNudgeElement* ActualNudge = NULL;
int NudgeOptInit(WPARAM wParam,LPARAM lParam)
{
OPTIONSDIALOGPAGE odp = { 0 };
- odp.cbSize = sizeof(odp);
- odp.position = -790000000;
- odp.hInstance = hInst;
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_NUDGE);
- odp.ptszTitle = LPGENT("Nudge");
- odp.ptszGroup = LPGENT("Events");
- odp.ptszTab = LPGENT("Nudge");
- odp.flags = ODPF_BOLDGROUPS|ODPF_TCHAR;
-// odp.nIDBottomSimpleControl = IDC_STMSNGROUP;
- odp.pfnDlgProc = DlgProcNudgeOpt;
+ odp.cbSize = sizeof(odp);
+ odp.position = -790000000;
+ odp.hInstance = hInst;
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_NUDGE);
+ odp.pszTitle = LPGEN("Nudge");
+ odp.pszGroup = LPGEN("Events");
+ odp.pszTab = LPGEN("Nudge");
+ odp.flags = ODPF_BOLDGROUPS;
+ odp.pfnDlgProc = DlgProcNudgeOpt;
Options_AddPage(wParam, &odp);
- odp.position = -790000001;
- odp.ptszTab = LPGENT("Window Shaking");
- odp.pfnDlgProc = DlgProcShakeOpt;
+ odp.position = -790000001;
+ odp.pszTab = LPGEN("Window Shaking");
+ odp.pfnDlgProc = DlgProcShakeOpt;
odp.flags |= ODPF_EXPERTONLY;
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_SHAKE);
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_SHAKE);
Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/PackUpdater/Src/Options.cpp b/plugins/PackUpdater/Src/Options.cpp
index 8c0d236aba..e86493faab 100644
--- a/plugins/PackUpdater/Src/Options.cpp
+++ b/plugins/PackUpdater/Src/Options.cpp
@@ -459,24 +459,22 @@ return FALSE;
int OptInit(WPARAM wParam, LPARAM lParam)
{
OPTIONSDIALOGPAGE odp = {0};
-
- ZeroMemory(&odp, sizeof(odp));
odp.cbSize = sizeof(odp);
odp.position = 100000000;
odp.hInstance = hInst;
- odp.flags = ODPF_TCHAR | ODPF_BOLDGROUPS;
+ odp.flags = ODPF_BOLDGROUPS;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_UPDATENOTIFY);
- odp.ptszGroup = _T("Events");
- odp.ptszTitle = _T("Pack Updater");
+ odp.pszGroup = LPGEN("Events");
+ odp.pszTitle = LPGEN("Pack Updater");
odp.pfnDlgProc = UpdateNotifyOptsProc;
Options_AddPage(wParam, &odp);
- if (ServiceExists(MS_POPUP_ADDPOPUP))
- {
+
+ if (ServiceExists(MS_POPUP_ADDPOPUP)) {
odp.pszTemplate = MAKEINTRESOURCEA(IDD_POPUP);
- odp.ptszGroup = _T("PopUps");
- odp.ptszTitle = _T("Pack Updater");
+ odp.pszGroup = LPGEN("PopUps");
+ odp.pszTitle = LPGEN("Pack Updater");
odp.pfnDlgProc = DlgPopUpOpts;
- Options_AddPage(wParam,&odp);
+ Options_AddPage(wParam, &odp);
}
return 0;
} \ No newline at end of file
diff --git a/plugins/Popup/src/main.cpp b/plugins/Popup/src/main.cpp
index f24b89f7e5..73920652fb 100644
--- a/plugins/Popup/src/main.cpp
+++ b/plugins/Popup/src/main.cpp
@@ -133,52 +133,44 @@ static struct {
static int OptionsInitialize(WPARAM wParam,LPARAM lParam)
{
OPTIONSDIALOGPAGE odp = { 0 };
-
- odp.cbSize = sizeof(odp);
- odp.hInstance = hInst;
- odp.position = 100000000;
- odp.groupPosition = 910000000;
- odp.flags = ODPF_TCHAR | ODPF_BOLDGROUPS;
- odp.ptszTitle = LPGENT(MODULNAME_PLU);
-
- odp.ptszTab = LPGENT("General");
- odp.pfnDlgProc = DlgProcPopUpGeneral;
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_POPUP_GENERAL);
- Options_AddPage(wParam,&odp);
-
- odp.ptszTab = LPGENT("Classes");
- odp.pfnDlgProc = DlgProcOptsClasses;
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_NOTIFICATIONS);
- Options_AddPage(wParam,&odp);
-
- odp.ptszTab = LPGENT("Actions");
- odp.pfnDlgProc = DlgProcPopupActions;
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_ACTIONS);
- Options_AddPage(wParam,&odp);
-
- odp.ptszTab = LPGENT("Contacts");
- odp.pfnDlgProc = DlgProcContactOpts;
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_CONTACTS);
- Options_AddPage(wParam,&odp);
-
- odp.ptszTab = LPGENT("Advanced");
- odp.pfnDlgProc = DlgProcPopUpAdvOpts;
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_POPUP_ADVANCED);
- odp.flags |= ODPF_EXPERTONLY;
- Options_AddPage(wParam,&odp);
-
- odp.ptszGroup = LPGENT("Skins");
- odp.ptszTab = LPGENT(MODULNAME_PLU);
- odp.pfnDlgProc = DlgProcPopSkinsOpts;
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_SKIN2);
- Options_AddPage(wParam,&odp);
-
- //Test page
- //odp.ptszTab = LPGEN("General (old)");
- //odp.pfnDlgProc = DlgProcPopUpOpts;
- //odp.pszTemplate = MAKEINTRESOURCE(IDD_OPT_POPUP);
- //Options_AddPage(wParam,&odp);
-
+ odp.cbSize = sizeof(odp);
+ odp.position = 100000000;
+ odp.groupPosition = 910000000;
+ odp.hInstance = hInst;
+ odp.flags = ODPF_BOLDGROUPS;
+ odp.pszTitle = MODULNAME_PLU;
+
+ odp.pszTab = LPGEN("General");
+ odp.pfnDlgProc = DlgProcPopUpGeneral;
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_POPUP_GENERAL);
+ Options_AddPage(wParam, &odp);
+
+ odp.pszTab = LPGEN("Classes");
+ odp.pfnDlgProc = DlgProcOptsClasses;
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_NOTIFICATIONS);
+ Options_AddPage(wParam, &odp);
+
+ odp.pszTab = LPGEN("Actions");
+ odp.pfnDlgProc = DlgProcPopupActions;
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_ACTIONS);
+ Options_AddPage(wParam, &odp);
+
+ odp.pszTab = LPGEN("Contacts");
+ odp.pfnDlgProc = DlgProcContactOpts;
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_CONTACTS);
+ Options_AddPage(wParam, &odp);
+
+ odp.pszTab = LPGEN("Advanced");
+ odp.pfnDlgProc = DlgProcPopUpAdvOpts;
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_POPUP_ADVANCED);
+ odp.flags |= ODPF_EXPERTONLY;
+ Options_AddPage(wParam, &odp);
+
+ odp.pszGroup = LPGEN("Skins");
+ odp.pszTab = LPGEN(MODULNAME_PLU);
+ odp.pfnDlgProc = DlgProcPopSkinsOpts;
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_SKIN2);
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/QuickMessages/options.c b/plugins/QuickMessages/options.c
index 4e269f1273..ff412f3859 100644
--- a/plugins/QuickMessages/options.c
+++ b/plugins/QuickMessages/options.c
@@ -1152,18 +1152,17 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam)
}
int OptionsInit(WPARAM wparam,LPARAM lparam)
- {
+{
OPTIONSDIALOGPAGE odp={0};
-
- odp.cbSize=sizeof(odp);
- odp.position=940000000;
- odp.hInstance=hinstance;
- odp.pszTemplate=MAKEINTRESOURCEA(IDD_OPTIONS);
- odp.pszTitle=LPGEN("Quick Messages");
- odp.pfnDlgProc=OptionsProc;
- odp.pszGroup=LPGEN("Plugins");
- odp.flags=ODPF_BOLDGROUPS;
-
+ odp.cbSize = sizeof(odp);
+ odp.position = 940000000;
+ odp.hInstance = hinstance;
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS);
+ odp.pszTitle = LPGEN("Quick Messages");
+ odp.pfnDlgProc = OptionsProc;
+ odp.pszGroup = LPGEN("Plugins");
+ odp.flags = ODPF_BOLDGROUPS;
Options_AddPage(wparam,&odp);
+
return 0;
- }
+}
diff --git a/plugins/QuickReplies/options.cpp b/plugins/QuickReplies/options.cpp
index 84ce88dc1c..3c96f42e89 100644
--- a/plugins/QuickReplies/options.cpp
+++ b/plugins/QuickReplies/options.cpp
@@ -188,17 +188,16 @@ static UINT expertOnlyControls[] = { IDC_VARIABLES, IDC_VARIABLES_HINT };
int OnOptInitialized(WPARAM wParam, LPARAM lParam)
{
- TCHAR tabName[32];
- mir_sntprintf(tabName, SIZEOF(tabName), _T("Button %x"), iNumber + 1);
+ char tabName[32];
+ mir_snprintf(tabName, SIZEOF(tabName), "Button %x", iNumber + 1);
OPTIONSDIALOGPAGE odp = {0};
odp.cbSize = sizeof(odp);
- odp.ptszGroup = _T("Message Sessions");
- odp.ptszTitle = _T("Quick Replies");
- odp.ptszTab = tabName;
+ odp.pszGroup = LPGEN("Message Sessions");
+ odp.pszTitle = LPGEN("Quick Replies");
+ odp.pszTab = tabName;
odp.position = iNumber;
odp.hInstance = hInstance;
- odp.flags = ODPF_TCHAR;
odp.expertOnlyControls = expertOnlyControls;
odp.nExpertOnlyControls = SIZEOF(expertOnlyControls);
diff --git a/plugins/Rate/options.cpp b/plugins/Rate/options.cpp
index 013945258f..d6088aa691 100644
--- a/plugins/Rate/options.cpp
+++ b/plugins/Rate/options.cpp
@@ -207,15 +207,12 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
int onOptInitialise(WPARAM wParam, LPARAM lParam)
{
- OPTIONSDIALOGPAGE odp;
-
- ZeroMemory(&odp, sizeof(odp));
+ OPTIONSDIALOGPAGE odp = { 0 };
odp.cbSize = sizeof(odp);
- odp.position = 0;
odp.hInstance = g_hInst;
- odp.pszGroup = Translate("Contact List");
+ odp.pszGroup = LPGEN("Contact List");
+ odp.pszTitle = LPGEN("Rate");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_RATE_OPT);
- odp.pszTitle = Translate("Rate");
odp.pfnDlgProc = DlgProcOptions;
odp.flags = ODPF_BOLDGROUPS;
Options_AddPage(wParam, &odp);
diff --git a/plugins/RecentContacts/options.cpp b/plugins/RecentContacts/options.cpp
index 264b813d72..d8f09adb9b 100644
--- a/plugins/RecentContacts/options.cpp
+++ b/plugins/RecentContacts/options.cpp
@@ -61,11 +61,10 @@ int onOptInitialise(WPARAM wParam, LPARAM lParam)
{
OPTIONSDIALOGPAGE odp = { 0 };
odp.cbSize = sizeof(odp);
- odp.position = 0;
odp.hInstance = hInst;
- odp.pszGroup = "Contact List";
+ odp.pszGroup = LPGEN("Contact List");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_LASTUC_OPT);
- odp.pszTitle = Translate(msLastUC_ShowListName);
+ odp.pszTitle = msLastUC_ShowListName;
odp.pfnDlgProc = DlgProcOptions;
odp.flags = ODPF_BOLDGROUPS;
Options_AddPage(wParam, &odp);
diff --git a/plugins/SRMM/msgoptions.c b/plugins/SRMM/msgoptions.c
index feb91e8266..86e8c0321f 100644
--- a/plugins/SRMM/msgoptions.c
+++ b/plugins/SRMM/msgoptions.c
@@ -584,7 +584,6 @@ static INT_PTR CALLBACK DlgProcTypeOptions(HWND hwndDlg, UINT msg, WPARAM wParam
static int OptInitialise(WPARAM wParam, LPARAM lParam)
{
OPTIONSDIALOGPAGE odp = { 0 };
-
odp.cbSize = sizeof(odp);
odp.position = 910000000;
odp.hInstance = g_hInst;
diff --git a/plugins/Scriver/chat/options.c b/plugins/Scriver/chat/options.c
index 11ea14a12d..35be477e9d 100644
--- a/plugins/Scriver/chat/options.c
+++ b/plugins/Scriver/chat/options.c
@@ -780,18 +780,16 @@ static INT_PTR CALLBACK DlgProcOptionsPopup(HWND hwndDlg,UINT uMsg,WPARAM wParam
static int OptionsInitialize(WPARAM wParam, LPARAM lParam)
{
-
- OPTIONSDIALOGPAGE odp = {0};
- if(g_dat->popupInstalled)
- {
+ if (g_dat->popupInstalled) {
+ OPTIONSDIALOGPAGE odp = {0};
odp.cbSize = sizeof(odp);
odp.position = 910000002;
odp.hInstance = g_hInst;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONSPOPUP);
- odp.ptszTitle = LPGENT("Messaging");
- odp.ptszGroup = LPGENT("Popups");
+ odp.pszTitle = LPGEN("Messaging");
+ odp.pszGroup = LPGEN("Popups");
odp.pfnDlgProc = DlgProcOptionsPopup;
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS;
odp.ptszTab = NULL;
Options_AddPage(wParam, &odp);
}
diff --git a/plugins/SecureIM/options.cpp b/plugins/SecureIM/options.cpp
index 93689874a9..a3513522e7 100644
--- a/plugins/SecureIM/options.cpp
+++ b/plugins/SecureIM/options.cpp
@@ -1912,9 +1912,9 @@ BOOL LoadImportRSAKeyDlg(HWND hParent, LPSTR key, BOOL priv)
}
-int onRegisterOptions(WPARAM wParam, LPARAM) {
- OPTIONSDIALOGPAGE odp;
- memset(&odp,0,sizeof(odp));
+int onRegisterOptions(WPARAM wParam, LPARAM)
+{
+ OPTIONSDIALOGPAGE odp = { 0 };
odp.cbSize = sizeof(odp);
odp.hInstance = g_hInst;
odp.pszTemplate = MAKEINTRESOURCE(IDD_OPTIONSTAB);
diff --git a/plugins/SecureIM/popupOptions.cpp b/plugins/SecureIM/popupOptions.cpp
index a295c8dac8..6e08cd81fc 100644
--- a/plugins/SecureIM/popupOptions.cpp
+++ b/plugins/SecureIM/popupOptions.cpp
@@ -223,13 +223,14 @@ void RefreshPopupOptionsDlg(HWND hec,HWND hdc,HWND hss,HWND hsr,HWND hks,HWND hk
}
-int onRegisterPopOptions(WPARAM wParam, LPARAM) {
+int onRegisterPopOptions(WPARAM wParam, LPARAM)
+{
OPTIONSDIALOGPAGE odp = {0};
odp.cbSize = sizeof(odp);
odp.hInstance = g_hInst;
odp.pszTemplate = MAKEINTRESOURCE(IDD_POPUP);
odp.pszTitle = (char*)szModuleName;
- odp.pszGroup = Translate("Popups");
+ odp.pszGroup = LPGEN("Popups");
odp.pfnDlgProc = PopOptionsDlgProc;
Options_AddPage(wParam, &odp);
return 0;
diff --git a/plugins/SeenPlugin/options.c b/plugins/SeenPlugin/options.c
index fc39a64a63..daab1e8ee3 100644
--- a/plugins/SeenPlugin/options.c
+++ b/plugins/SeenPlugin/options.c
@@ -465,31 +465,28 @@ INT_PTR CALLBACK OptsSettingsDlgProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lpa
int OptionsInit(WPARAM wparam,LPARAM lparam)
{
- OPTIONSDIALOGPAGE odp;
- HMODULE hUxTheme = 0;
-
- if(IsWinVerXPPlus()) {
- hUxTheme = GetModuleHandle(_T("uxtheme.dll"));
-
- if(hUxTheme)
- pfnEnableThemeDialogTexture = (BOOL (WINAPI *)(HANDLE, DWORD))GetProcAddress(hUxTheme, "EnableThemeDialogTexture");
- }
-
- ZeroMemory(&odp,sizeof(odp));
- odp.cbSize=sizeof(odp);
- odp.position = 100000000;
- odp.hInstance=hInstance;
- odp.flags=ODPF_BOLDGROUPS;
- odp.pszTemplate=MAKEINTRESOURCE(IDD_SETTINGS);
- odp.pszGroup="Services";
- odp.pszTitle="Last seen";
- odp.pfnDlgProc= OptsSettingsDlgProc;
+ OPTIONSDIALOGPAGE odp = { 0 };
+
+ if(IsWinVerXPPlus()) {
+ HMODULE hUxTheme = GetModuleHandle(_T("uxtheme.dll"));
+ if (hUxTheme)
+ pfnEnableThemeDialogTexture = (BOOL (WINAPI *)(HANDLE, DWORD))GetProcAddress(hUxTheme, "EnableThemeDialogTexture");
+ }
+
+ odp.cbSize = sizeof(odp);
+ odp.position = 100000000;
+ odp.hInstance = hInstance;
+ odp.flags = ODPF_BOLDGROUPS;
+ odp.pszTemplate = MAKEINTRESOURCE(IDD_SETTINGS);
+ odp.pszGroup = LPGEN("Services");
+ odp.pszTitle = LPGEN("Last seen");
+ odp.pfnDlgProc = OptsSettingsDlgProc;
Options_AddPage(wparam,&odp);
- if (ServiceExists(MS_POPUP_ADDPOPUP))
- {
+
+ if (ServiceExists(MS_POPUP_ADDPOPUP)) {
odp.pszTemplate = MAKEINTRESOURCE(IDD_POPUPS);
- odp.pszGroup = "PopUps";
- odp.pszTitle = "Last seen";
+ odp.pszGroup = LPGEN("PopUps");
+ odp.pszTitle = LPGEN("Last seen");
odp.pfnDlgProc = OptsPopUpsDlgProc;
Options_AddPage(wparam,&odp);
}
diff --git a/plugins/Sessions/Src/Options.cpp b/plugins/Sessions/Src/Options.cpp
index ccdf23c1ff..4502f2f863 100644
--- a/plugins/Sessions/Src/Options.cpp
+++ b/plugins/Sessions/Src/Options.cpp
@@ -556,17 +556,16 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam)
int OptionsInit(WPARAM wparam,LPARAM lparam)
{
- OPTIONSDIALOGPAGE odp={0};
-
+ OPTIONSDIALOGPAGE odp = { 0 };
odp.cbSize = sizeof(odp);
- odp.position=955000000;
- odp.hInstance=hinstance;
- odp.pszTemplate=MAKEINTRESOURCEA(IDD_OPTIONS);
- odp.ptszTitle=LPGENT(__INTERNAL_NAME);
- odp.pfnDlgProc=OptionsProc;
- odp.ptszGroup=LPGENT("Message Sessions");
- odp.flags=ODPF_BOLDGROUPS | ODPF_TCHAR;
-
+ odp.position = 955000000;
+ odp.hInstance = hinstance;
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS);
+ odp.pszTitle = __INTERNAL_NAME;
+ odp.pfnDlgProc = OptionsProc;
+ odp.pszGroup = LPGEN("Message Sessions");
+ odp.flags = ODPF_BOLDGROUPS;
Options_AddPage(wparam,&odp);
+
return 0;
} \ No newline at end of file
diff --git a/plugins/SimpleAR/Src/Options.cpp b/plugins/SimpleAR/Src/Options.cpp
index 78e4161a86..e53236d22c 100644
--- a/plugins/SimpleAR/Src/Options.cpp
+++ b/plugins/SimpleAR/Src/Options.cpp
@@ -146,18 +146,15 @@ INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara
INT OptInit(WPARAM wParam,LPARAM lParam)
{
- OPTIONSDIALOGPAGE odp;
-
- ZeroMemory(&odp,sizeof(odp));
- odp.cbSize=sizeof(odp);
- odp.position=-790000000;
- odp.hInstance=hinstance;
- odp.pszTemplate=MAKEINTRESOURCEA(IDD_OPTION);
- odp.ptszTitle= _T("Simple Auto Replier");
- odp.ptszGroup = _T("Plugins");
- odp.flags=ODPF_BOLDGROUPS | ODPF_TCHAR;
- odp.nIDBottomSimpleControl=0;
- odp.pfnDlgProc=DlgProcOpts;
- Options_AddPage(wParam,&odp);
+ OPTIONSDIALOGPAGE odp = { 0 };
+ odp.cbSize = sizeof(odp);
+ odp.position = -790000000;
+ odp.hInstance = hinstance;
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTION);
+ odp.pszTitle = LPGEN("Simple Auto Replier");
+ odp.pszGroup = LPGEN("Plugins");
+ odp.flags = ODPF_BOLDGROUPS;
+ odp.pfnDlgProc = DlgProcOpts;
+ Options_AddPage(wParam, &odp);
return 0;
} \ No newline at end of file
diff --git a/plugins/SimpleStatusMsg/options.cpp b/plugins/SimpleStatusMsg/options.cpp
index dac11ff175..c4868ddf1b 100644
--- a/plugins/SimpleStatusMsg/options.cpp
+++ b/plugins/SimpleStatusMsg/options.cpp
@@ -1715,13 +1715,12 @@ int InitOptions(WPARAM wParam, LPARAM lParam)
OPTIONSDIALOGPAGE odp = {0};
odp.cbSize = sizeof(odp);
odp.hInstance = g_hInst;
+ odp.flags = ODPF_BOLDGROUPS;
- if (!ServiceExists(MS_SS_GETPROFILECOUNT))
- {
- odp.ptszTitle = LPGENT("Status");
+ if (!ServiceExists(MS_SS_GETPROFILECOUNT)) {
+ odp.pszTitle = LPGEN("Status");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_STATUS);
odp.pfnDlgProc = DlgStatusOptionsProc;
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
Options_AddPage(wParam, &odp);
}
@@ -1730,19 +1729,18 @@ int InitOptions(WPARAM wParam, LPARAM lParam)
odp.position = 870000000;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_GENERAL);
- odp.ptszTitle = LPGENT("Status Messages");
- odp.ptszGroup = LPGENT("Status");
- odp.ptszTab = LPGENT("General");
+ odp.pszTitle = LPGEN("Status Messages");
+ odp.pszGroup = LPGEN("Status");
+ odp.pszTab = LPGEN("General");
odp.pfnDlgProc = DlgOptionsProc;
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
Options_AddPage(wParam, &odp);
- odp.ptszTab = LPGENT("Variables");
+ odp.pszTab = LPGEN("Variables");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_VARIABLES);
odp.pfnDlgProc = DlgVariablesOptionsProc;
Options_AddPage(wParam, &odp);
- odp.ptszTab = LPGENT("Advanced");
+ odp.pszTab = LPGEN("Advanced");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_ADVANCED);
odp.pfnDlgProc = DlgAdvancedOptionsProc;
odp.flags |= ODPF_EXPERTONLY;
diff --git a/plugins/SmileyAdd/options.cpp b/plugins/SmileyAdd/options.cpp
index b540b15b35..b485c5ca99 100644
--- a/plugins/SmileyAdd/options.cpp
+++ b/plugins/SmileyAdd/options.cpp
@@ -64,16 +64,15 @@ static INT_PTR CALLBACK DlgProcSmileysOptions(HWND hwndDlg, UINT msg, WPARAM wPa
int SmileysOptionsInitialize(WPARAM addInfo, LPARAM)
{
OPTIONSDIALOGPAGE odp = {0};
-
odp.cbSize = sizeof(odp);
odp.position = 910000000;
odp.hInstance = g_hInst;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_SMILEYS);
- odp.pszTitle = "Smileys";
- odp.pszGroup = "Customize";
+ odp.pszTitle = LPGEN("Smileys");
+ odp.pszGroup = LPGEN("Customize");
odp.pfnDlgProc = DlgProcSmileysOptions;
odp.flags = ODPF_BOLDGROUPS;
- Options_AddPage( addInfo, &odp);
+ Options_AddPage(addInfo, &odp);
return 0;
}
diff --git a/plugins/SpellChecker/options.cpp b/plugins/SpellChecker/options.cpp
index 015cfc893c..4c8b299266 100644
--- a/plugins/SpellChecker/options.cpp
+++ b/plugins/SpellChecker/options.cpp
@@ -64,37 +64,32 @@ static OptPageControl autoReplaceControls[] = {
int InitOptionsCallback(WPARAM wParam,LPARAM lParam)
{
- OPTIONSDIALOGPAGE odp;
-
- ZeroMemory(&odp,sizeof(odp));
- odp.cbSize=sizeof(odp);
- odp.position=0;
- odp.hInstance=hInst;
- odp.ptszGroup = LPGENT("Message Sessions");
- odp.ptszTitle = LPGENT("Spell Checker");
+ OPTIONSDIALOGPAGE odp = { 0 };
+ odp.cbSize = sizeof(odp);
+ odp.hInstance = hInst;
+ odp.pszGroup = LPGEN("Message Sessions");
+ odp.pszTitle = LPGEN("Spell Checker");
odp.pfnDlgProc = OptionsDlgProc;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS);
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS;
odp.nIDBottomSimpleControl = IDC_SPELL_CHECKER;
odp.expertOnlyControls = optionsExpertControls;
odp.nExpertOnlyControls = MAX_REGS(optionsExpertControls);
- Options_AddPage(wParam,&odp);
+ Options_AddPage(wParam, &odp);
ZeroMemory(&odp,sizeof(odp));
- odp.cbSize=sizeof(odp);
- odp.position=0;
- odp.hInstance=hInst;
- odp.ptszGroup = LPGENT("Message Sessions");
- odp.ptszTitle = LPGENT("Auto-replacements");
+ odp.cbSize = sizeof(odp);
+ odp.hInstance = hInst;
+ odp.pszGroup = LPGEN("Message Sessions");
+ odp.pszTitle = LPGEN("Auto-replacements");
odp.pfnDlgProc = AutoreplaceDlgProc;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_REPLACEMENTS);
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
- Options_AddPage(wParam,&odp);
+ odp.flags = ODPF_BOLDGROUPS;
+ Options_AddPage(wParam, &odp);
return 0;
}
-
void InitOptions()
{
LoadOptions();
diff --git a/plugins/SplashScreen/src/options.cpp b/plugins/SplashScreen/src/options.cpp
index 1ed7c5e9e8..cf70b8558f 100644
--- a/plugins/SplashScreen/src/options.cpp
+++ b/plugins/SplashScreen/src/options.cpp
@@ -432,17 +432,14 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
int OptInit(WPARAM wParam, LPARAM lParam)
{
- OPTIONSDIALOGPAGE odp;
-
- ZeroMemory(&odp, sizeof(odp));
+ OPTIONSDIALOGPAGE odp = { 0 };
odp.cbSize = sizeof(odp);
- odp.position = 0;
odp.hInstance = hInst;
- odp.ptszGroup = _T("Skins");
+ odp.pszGroup = LPGEN("Skins");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_SPLASH_OPT);
- odp.ptszTitle = _T("Splash Screen");
+ odp.pszTitle = LPGEN("Splash Screen");
odp.pfnDlgProc = DlgProcOptions;
- odp.flags = ODPF_TCHAR | ODPF_BOLDGROUPS;
+ odp.flags = ODPF_BOLDGROUPS;
Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/StatusPlugins/KeepStatus/options.cpp b/plugins/StatusPlugins/KeepStatus/options.cpp
index ba6cf472d5..06ae43e3df 100644
--- a/plugins/StatusPlugins/KeepStatus/options.cpp
+++ b/plugins/StatusPlugins/KeepStatus/options.cpp
@@ -586,10 +586,10 @@ int OptionsInit(WPARAM wparam,LPARAM lparam)
odp.hInstance = hInst;
odp.pszGroup = LPGEN("Status");
odp.pszTitle = LPGEN("KeepStatus");
- odp.flags = ODPF_BOLDGROUPS;
+ odp.flags = ODPF_BOLDGROUPS;
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_TABS);
- odp.pfnDlgProc = DlgProcKsTabs;
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_TABS);
+ odp.pfnDlgProc = DlgProcKsTabs;
Options_AddPage(wparam,&odp);
if ( ServiceExists( MS_POPUP_ADDPOPUP )) {
diff --git a/plugins/StopSpamPlus/src/events.cpp b/plugins/StopSpamPlus/src/events.cpp
index 8a3ab3e92e..ab8c34d450 100644
--- a/plugins/StopSpamPlus/src/events.cpp
+++ b/plugins/StopSpamPlus/src/events.cpp
@@ -193,27 +193,25 @@ MIRANDA_HOOK_EVENT(ME_OPT_INITIALISE, w, l)
{
OPTIONSDIALOGPAGE odp = {0};
odp.cbSize = sizeof(odp);
- odp.ptszGroup = _T("Message Sessions");
- odp.ptszTitle = _T(pluginName);
+ odp.pszGroup = LPGEN("Message Sessions");
+ odp.pszTitle = pluginName;
odp.position = -1;
odp.hInstance = hInst;
- odp.flags = ODPF_TCHAR;
- odp.ptszTab = _T("Main");
+ odp.pszTab = LPGEN("Main");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_MAIN);
odp.pfnDlgProc = MainDlgProc;
- Options_AddPage( w, &odp);
+ Options_AddPage(w, &odp);
-
- odp.ptszTab = _T("Messages");
+ odp.pszTab = LPGEN("Messages");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_MESSAGES);
odp.pfnDlgProc = MessagesDlgProc;
- Options_AddPage( w, &odp);
+ Options_AddPage(w, &odp);
- odp.ptszTab = _T("Protocols");
+ odp.pszTab = LPGEN("Protocols");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_PROTO);
odp.pfnDlgProc = ProtoDlgProc;
- Options_AddPage( w, &odp);
+ Options_AddPage(w, &odp);
return 0;
}
diff --git a/plugins/Svc_dbepp/options.cpp b/plugins/Svc_dbepp/options.cpp
index b149e7f41f..0630fa353c 100644
--- a/plugins/Svc_dbepp/options.cpp
+++ b/plugins/Svc_dbepp/options.cpp
@@ -80,19 +80,15 @@ INT_PTR CALLBACK DlgProcOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
INT OptInit(WPARAM wParam,LPARAM lParam)
{
- OPTIONSDIALOGPAGE odp;
-
- ZeroMemory(&odp,sizeof(odp));
- odp.cbSize=sizeof(odp);
- odp.position=0;
- odp.hInstance=hInst;
- odp.pszTemplate=MAKEINTRESOURCE(IDD_OPTIONS);
- odp.pszGroup= "Services";
- odp.pszTitle= modFullname;
+ OPTIONSDIALOGPAGE odp = { 0 };
+ odp.cbSize = sizeof(odp);
+ odp.hInstance = hInst;
+ odp.pszTemplate = MAKEINTRESOURCE(IDD_OPTIONS);
+ odp.pszGroup = LPGEN("Services");
+ odp.pszTitle = modFullname;
odp.pfnDlgProc = DlgProcOpts;
odp.flags = ODPF_BOLDGROUPS;
- odp.expertOnlyControls=NULL;
- Options_AddPage(wParam,&odp);
+ Options_AddPage(wParam, &odp);
return 0;
} \ No newline at end of file
diff --git a/plugins/Svc_vi/hooked_events.cpp b/plugins/Svc_vi/hooked_events.cpp
index 7645bf83bc..2a391a7e39 100644
--- a/plugins/Svc_vi/hooked_events.cpp
+++ b/plugins/Svc_vi/hooked_events.cpp
@@ -24,9 +24,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
HANDLE hModulesLoaded;
HANDLE hOptionsInitialize;
-const int nExpertOnlyControls = 10;
-UINT uiExpertOnlyControls[nExpertOnlyControls] = {0};
-
#define HOST "http://eblis.tla.ro/projects"
#define VERSIONINFO_VERSION_URL HOST "/miranda/VersionInfo/updater/VersionInfo.html"
@@ -72,26 +69,24 @@ int OnModulesLoaded(WPARAM wParam, LPARAM lParam)
return 0;
}
+static UINT uiExpertOnlyControls[] = { IDC_SHOWUUIDS, IDC_SHOWINSTALLEDLANGUAGES };
+
int OnOptionsInitialise(WPARAM wParam, LPARAM lParam)
{
OPTIONSDIALOGPAGE odp = { 0 };
-
- uiExpertOnlyControls[0] = IDC_SHOWUUIDS;
- uiExpertOnlyControls[1] = IDC_SHOWINSTALLEDLANGUAGES;
-
odp.cbSize = sizeof(odp);
odp.position = 100000000;
odp.hInstance = hInst;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_VERSIONINFO);
- odp.pszTitle = Translate("Version Information");
- odp.pszGroup = Translate("Services");
+ odp.pszTitle = LPGEN("Version Information");
+ odp.pszGroup = LPGEN("Services");
odp.groupPosition = 910000000;
- odp.flags=ODPF_BOLDGROUPS;
+ odp.flags = ODPF_BOLDGROUPS;
odp.pfnDlgProc = DlgProcOpts;
odp.expertOnlyControls = uiExpertOnlyControls;
- odp.nExpertOnlyControls = 2;
+ odp.nExpertOnlyControls = SIZEOF(uiExpertOnlyControls);
- Options_AddPage(wParam,&odp);
+ Options_AddPage(wParam, &odp);
return 0;
} \ No newline at end of file
diff --git a/plugins/TabSRMM/src/msgoptions.cpp b/plugins/TabSRMM/src/msgoptions.cpp
index 61279c2eb9..1125c90316 100644
--- a/plugins/TabSRMM/src/msgoptions.cpp
+++ b/plugins/TabSRMM/src/msgoptions.cpp
@@ -1274,103 +1274,92 @@ struct {
static int OptInitialise(WPARAM wParam, LPARAM lParam)
{
- OPTIONSDIALOGPAGE odp = { 0 };
-
if(PluginConfig.g_PopupWAvail||PluginConfig.g_PopupAvail)
TN_OptionsInitialize(wParam, lParam);
+ OPTIONSDIALOGPAGE odp = { 0 };
odp.cbSize = sizeof(odp);
odp.position = 910000000;
odp.hInstance = g_hInst;
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_MSGDLG);
odp.ptszTitle = LPGENT("Message Sessions");
- odp.pfnDlgProc = DlgProcOptions;
- odp.ptszGroup = NULL;
- odp.nIDBottomSimpleControl = 0;
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
- odp.ptszTab = TranslateT("General");
+ odp.flags = ODPF_BOLDGROUPS;
+
+ odp.pszTab = LPGEN("General");
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_MSGDLG);
+ odp.pfnDlgProc = DlgProcOptions;
Options_AddPage(wParam, &odp);
- odp.ptszTab = TranslateT("Tabs and layout");
+ odp.pszTab = LPGEN("Tabs and layout");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_TABBEDMSG);
odp.pfnDlgProc = DlgProcTabbedOptions;
- Options_AddPage(wParam,&odp);
+ Options_AddPage(wParam, &odp);
- odp.ptszTab = TranslateT("Containers");
+ odp.pszTab = LPGEN("Containers");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_CONTAINERS);
odp.pfnDlgProc = DlgProcContainerSettings;
- Options_AddPage(wParam,&odp);
+ Options_AddPage(wParam, &odp);
- odp.ptszTab = TranslateT("Message log");
+ odp.pszTab = LPGEN("Message log");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_MSGLOG);
odp.pfnDlgProc = DlgProcLogOptions;
- Options_AddPage(wParam,&odp);
+ Options_AddPage(wParam, &odp);
- odp.ptszTab = TranslateT("Tool bar");
+ odp.pszTab = LPGEN("Tool bar");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_TOOLBAR);
odp.pfnDlgProc = DlgProcToolBar;
- Options_AddPage(wParam,&odp);
+ Options_AddPage(wParam, &odp);
- odp.ptszTab = TranslateT("Advanced tweaks");
+ odp.pszTab = LPGEN("Advanced tweaks");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS_PLUS);
odp.pfnDlgProc = PlusOptionsProc;
- Options_AddPage(wParam,&odp);
-
+ Options_AddPage(wParam, &odp);
- odp.ptszGroup = LPGENT("Message Sessions");
+ odp.pszGroup = LPGEN("Message Sessions");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_MSGTYPE);
- odp.ptszTitle = LPGENT("Typing Notify");
+ odp.pszTitle = LPGEN("Typing Notify");
odp.pfnDlgProc = DlgProcTypeOptions;
Options_AddPage(wParam, &odp);
odp.pszTemplate = MAKEINTRESOURCEA(IDD_POPUP_OPT);
- odp.ptszTitle = LPGENT("Event notifications");
- odp.ptszGroup = LPGENT("PopUps");
- odp.pfnDlgProc = DlgProcPopupOpts;
- odp.nIDBottomSimpleControl = 0;
+ odp.pszTitle = LPGEN("Event notifications");
+ odp.pszGroup = LPGEN("PopUps");
+ odp.pfnDlgProc = DlgProcPopupOpts;
Options_AddPage(wParam, &odp);
-
-
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_SKIN);
- odp.ptszTitle = LPGENT("Message window");
- odp.ptszTab = TranslateT("Load and apply");
- odp.pfnDlgProc = DlgProcSkinOpts;
- odp.nIDBottomSimpleControl = 0;
- odp.ptszGroup = LPGENT("Skins");
+ odp.pszTitle = LPGEN("Message window");
+ odp.pszTab = LPGEN("Load and apply");
+ odp.pfnDlgProc = DlgProcSkinOpts;
+ odp.pszGroup = LPGEN("Skins");
Options_AddPage(wParam, &odp);
odp.pszTemplate = MAKEINTRESOURCEA(IDD_TABCONFIG);
- odp.ptszTab = TranslateT("Window layout tweaks");
- odp.pfnDlgProc = DlgProcTabConfig;
- odp.nIDBottomSimpleControl = 0;
+ odp.pszTab = LPGEN("Window layout tweaks");
+ odp.pfnDlgProc = DlgProcTabConfig;
Options_AddPage(wParam, &odp);
/* group chats */
- odp.ptszGroup = LPGENT("Message Sessions");
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS1);
- odp.ptszTitle = LPGENT("Group Chats");
- odp.ptszTab = TranslateT("Settings");
+ odp.pszGroup = LPGEN("Message Sessions");
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS1);
+ odp.pszTitle = LPGEN("Group Chats");
+ odp.pszTab = LPGEN("Settings");
odp.pfnDlgProc = DlgProcOptions1;
Options_AddPage(wParam, &odp);
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS2);
- odp.ptszTab = TranslateT("Log formatting");
- odp.pfnDlgProc = DlgProcOptions2;
- odp.nIDBottomSimpleControl = 0;
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS2);
+ odp.pszTab = LPGEN("Log formatting");
+ odp.pfnDlgProc = DlgProcOptions2;
Options_AddPage(wParam, &odp);
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS3);
- odp.ptszTab = TranslateT("Events and filters");
- odp.pfnDlgProc = DlgProcOptions3;
- odp.nIDBottomSimpleControl = 0;
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS3);
+ odp.pszTab = LPGEN("Events and filters");
+ odp.pfnDlgProc = DlgProcOptions3;
Options_AddPage(wParam, &odp);
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS4);
- odp.ptszTab = TranslateT("Highlighting");
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS4);
+ odp.pszTab = LPGEN("Highlighting");
odp.pfnDlgProc = CMUCHighlight::dlgProc;
- odp.nIDBottomSimpleControl = 0;
Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/TabSRMM/src/typingnotify.cpp b/plugins/TabSRMM/src/typingnotify.cpp
index f68973c42d..71b5138bd6 100644
--- a/plugins/TabSRMM/src/typingnotify.cpp
+++ b/plugins/TabSRMM/src/typingnotify.cpp
@@ -495,10 +495,8 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
int TN_OptionsInitialize(WPARAM wParam, LPARAM lParam)
{
-
- OPTIONSDIALOGPAGE odp = { 0 };
-
if (PluginConfig.g_PopupAvail) {
+ OPTIONSDIALOGPAGE odp = { 0 };
odp.cbSize = sizeof(odp);
odp.position = 100000000;
odp.hInstance = g_hInst;
@@ -508,7 +506,7 @@ int TN_OptionsInitialize(WPARAM wParam, LPARAM lParam)
odp.groupPosition = 910000000;
odp.flags = ODPF_BOLDGROUPS;
odp.pfnDlgProc = DlgProcOpts;
- Options_AddPage(wParam,&odp);
+ Options_AddPage(wParam, &odp);
}
return 0;
}
diff --git a/plugins/TipperYM/options.cpp b/plugins/TipperYM/options.cpp
index 29624e2b3a..b6035e8d67 100644
--- a/plugins/TipperYM/options.cpp
+++ b/plugins/TipperYM/options.cpp
@@ -2418,49 +2418,43 @@ INT_PTR CALLBACK DlgProcOptsTraytip(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
int OptInit(WPARAM wParam, LPARAM lParam)
{
OPTIONSDIALOGPAGE odp = {0};
-
- odp.cbSize = sizeof(odp);
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
- odp.position = -790000000;
- odp.hInstance = hInst;
-
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_APPEARANCE);
- odp.ptszTab = LPGENT("Appearance");
- odp.ptszTitle = LPGENT("Tooltips");
- odp.ptszGroup = LPGENT("Customize");
- odp.nIDBottomSimpleControl = 0;
- odp.pfnDlgProc = DlgProcOptsAppearance;
+ odp.cbSize = sizeof(odp);
+ odp.flags = ODPF_BOLDGROUPS;
+ odp.position = -790000000;
+ odp.hInstance = hInst;
+
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_APPEARANCE);
+ odp.pszTab = LPGEN("Appearance");
+ odp.pszTitle = LPGEN("Tooltips");
+ odp.pszGroup = LPGEN("Customize");
+ odp.pfnDlgProc = DlgProcOptsAppearance;
Options_AddPage(wParam, &odp);
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_SKIN);
- odp.ptszTab = LPGENT("Tooltips");
- odp.ptszGroup = LPGENT("Skins");
- odp.nIDBottomSimpleControl = 0;
- odp.pfnDlgProc = DlgProcOptsSkin;
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_SKIN);
+ odp.pszTab = LPGEN("Tooltips");
+ odp.pszGroup = LPGEN("Skins");
+ odp.pfnDlgProc = DlgProcOptsSkin;
Options_AddPage(wParam, &odp);
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_CONTENT);
- odp.ptszTab = LPGENT("Content");
- odp.ptszTitle = LPGENT("Tooltips");
- odp.ptszGroup = LPGENT("Customize");
- odp.nIDBottomSimpleControl = 0;
- odp.pfnDlgProc = DlgProcOptsContent;
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_CONTENT);
+ odp.pszTab = LPGEN("Content");
+ odp.pszTitle = LPGEN("Tooltips");
+ odp.pszGroup = LPGEN("Customize");
+ odp.pfnDlgProc = DlgProcOptsContent;
Options_AddPage(wParam, &odp);
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_TRAYTIP);
- odp.ptszTab = LPGENT("Tray tooltip");
- odp.ptszTitle = LPGENT("Tooltips");
- odp.ptszGroup = LPGENT("Customize");
- odp.nIDBottomSimpleControl = 0;
- odp.pfnDlgProc = DlgProcOptsTraytip;
-
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_TRAYTIP);
+ odp.pszTab = LPGEN("Tray tooltip");
+ odp.pszTitle = LPGEN("Tooltips");
+ odp.pszGroup = LPGEN("Customize");
+ odp.pfnDlgProc = DlgProcOptsTraytip;
Options_AddPage(wParam, &odp);
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_EXTRA);
- odp.ptszTab = LPGENT("Extra");
- odp.ptszTitle = LPGENT("Tooltips");
- odp.ptszGroup = LPGENT("Customize");
- odp.nIDBottomSimpleControl = 0;
- odp.pfnDlgProc = DlgProcOptsExtra;
+
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_EXTRA);
+ odp.pszTab = LPGEN("Extra");
+ odp.pszTitle = LPGEN("Tooltips");
+ odp.pszGroup = LPGEN("Customize");
+ odp.pfnDlgProc = DlgProcOptsExtra;
Options_AddPage(wParam, &odp);
return 0;
diff --git a/plugins/TooltipNotify/src/TooltipNotify.cpp b/plugins/TooltipNotify/src/TooltipNotify.cpp
index 88ab42b740..8a1a005144 100644
--- a/plugins/TooltipNotify/src/TooltipNotify.cpp
+++ b/plugins/TooltipNotify/src/TooltipNotify.cpp
@@ -297,17 +297,15 @@ int CTooltipNotify::ContactSettingChanged(WPARAM wParam, LPARAM lParam)
int CTooltipNotify::InitializeOptions(WPARAM wParam, LPARAM lParam)
{
- OPTIONSDIALOGPAGE odp;
-
- ZeroMemory(&odp,sizeof(odp));
+ OPTIONSDIALOGPAGE odp = { 0 };
odp.cbSize = sizeof(odp);
odp.position = 100000000;
odp.hInstance = m_hDllInstance;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS);
- odp.ptszTitle = TranslateT("Tooltip Notify");
- odp.ptszGroup = TranslateT("Appearance");
+ odp.pszTitle = LPGEN("Tooltip Notify");
+ odp.pszGroup = LPGEN("Appearance");
odp.groupPosition = 910000000;
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS;
odp.pfnDlgProc = CTooltipNotify::OptionsDlgProcWrapper;
::Options_AddPage(wParam, &odp);
diff --git a/plugins/Updater/options.cpp b/plugins/Updater/options.cpp
index 03acb47c00..15e1d69754 100644
--- a/plugins/Updater/options.cpp
+++ b/plugins/Updater/options.cpp
@@ -374,16 +374,15 @@ static INT_PTR CALLBACK DlgProcOpts1(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
int OptInit(WPARAM wParam,LPARAM lParam)
{
OPTIONSDIALOGPAGE odp = { 0 };
- odp.cbSize = sizeof(odp);
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
- odp.position = -790000000;
- odp.hInstance = hInst;
-
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT1);
- odp.ptszTitle = LPGENT("Updater");
- odp.ptszGroup = LPGENT("Services");
- odp.nIDBottomSimpleControl = 0;
- odp.pfnDlgProc = DlgProcOpts1;
+ odp.cbSize = sizeof(odp);
+ odp.flags = ODPF_BOLDGROUPS;
+ odp.position = -790000000;
+ odp.hInstance = hInst;
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT1);
+ odp.pszTitle = LPGEN("Updater");
+ odp.pszGroup = LPGEN("Services");
+ odp.nIDBottomSimpleControl = 0;
+ odp.pfnDlgProc = DlgProcOpts1;
Options_AddPage(wParam, &odp);
return 0;
diff --git a/plugins/UserInfoEx/dlg_propsheet.cpp b/plugins/UserInfoEx/dlg_propsheet.cpp
index 0b9db512cd..e413602e47 100644
--- a/plugins/UserInfoEx/dlg_propsheet.cpp
+++ b/plugins/UserInfoEx/dlg_propsheet.cpp
@@ -561,7 +561,7 @@ static INT InitDetails(WPARAM wParam, LPARAM lParam)
if (lParam || bChangeDetailsEnabled) {
odp.cbSize = sizeof(odp);
odp.hInstance = ghInst;
- odp.flags = /*ODPF_BOLDGROUPS|*/ODPF_ICON|ODPF_TCHAR;
+ odp.flags = ODPF_ICON | ODPF_TCHAR;
odp.ptszGroup = IcoLib_GetDefaultIconFileName();
if (lParam) {
diff --git a/plugins/UserInfoEx/psp_options.cpp b/plugins/UserInfoEx/psp_options.cpp
index d399f82c57..3d0427ecba 100644
--- a/plugins/UserInfoEx/psp_options.cpp
+++ b/plugins/UserInfoEx/psp_options.cpp
@@ -1511,11 +1511,9 @@ static INT_PTR CALLBACK DlgProc_Popups(HWND hDlg, UINT uMsg, WPARAM wParam, LPAR
**/
static INT OnInitOptions(WPARAM wParam, LPARAM lParam)
{
- OPTIONSDIALOGPAGE odp;
- ZeroMemory(&odp, sizeof(odp));
-
DlgContactInfoInitTreeIcons();
+ OPTIONSDIALOGPAGE odp = { 0 };
odp.position = 95400;
odp.hInstance = ghInst;
odp.pszTitle = MODNAME;
@@ -1551,8 +1549,7 @@ static INT OnInitOptions(WPARAM wParam, LPARAM lParam)
Options_AddPage(wParam, &odp);
// Popups page
- if (ServiceExists(MS_POPUP_ADDPOPUPT))
- {
+ if (ServiceExists(MS_POPUP_ADDPOPUPT)) {
odp.pszTitle = MODNAME;
odp.pszGroup = LPGEN("Popups");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_POPUP);
diff --git a/plugins/Variables/options.cpp b/plugins/Variables/options.cpp
index 9fceb111c6..b4a720094f 100644
--- a/plugins/Variables/options.cpp
+++ b/plugins/Variables/options.cpp
@@ -141,7 +141,7 @@ int OptionsInit(WPARAM wParam, LPARAM lParam)
odp.pszTitle = LPGEN("Variables");
odp.pfnDlgProc = SetOptsDlgProc;
odp.flags = ODPF_BOLDGROUPS;
- Options_AddPage(wParam,&odp);
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/WhenWasIt/hooked_events.cpp b/plugins/WhenWasIt/hooked_events.cpp
index 6d11805c28..bec98e9b4c 100644
--- a/plugins/WhenWasIt/hooked_events.cpp
+++ b/plugins/WhenWasIt/hooked_events.cpp
@@ -195,10 +195,10 @@ int OnOptionsInitialise(WPARAM wParam, LPARAM lParam)
odp.position = 100000000;
odp.hInstance = hInstance;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_WWI);
- odp.ptszTitle = _T("When Was It");
- odp.ptszGroup = _T("Contact List");
+ odp.pszTitle = LPGEN("When Was It");
+ odp.pszGroup = LPGEN("Contact List");
odp.groupPosition = 910000000;
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS;
odp.pfnDlgProc = DlgProcOptions;
Options_AddPage(wParam, &odp);
diff --git a/plugins/YAPP/options.cpp b/plugins/YAPP/options.cpp
index 268135db8b..7ba798e5fa 100644
--- a/plugins/YAPP/options.cpp
+++ b/plugins/YAPP/options.cpp
@@ -471,20 +471,20 @@ static INT_PTR CALLBACK DlgProcOptsClasses(HWND hwndDlg, UINT msg, WPARAM wParam
int OptInit(WPARAM wParam, LPARAM lParam) {
OPTIONSDIALOGPAGE odp = { 0 };
- odp.cbSize = sizeof(odp);
- odp.flags = ODPF_BOLDGROUPS;
- odp.position = -790000000;
- odp.hInstance = hInst;
- odp.pszTitle = LPGEN("PopUps");
-
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT1);
- odp.pszTab = LPGEN("Settings");
- odp.pfnDlgProc = DlgProcOpts1;
+ odp.cbSize = sizeof(odp);
+ odp.flags = ODPF_BOLDGROUPS;
+ odp.position = -790000000;
+ odp.hInstance = hInst;
+ odp.pszTitle = LPGEN("PopUps");
+
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT1);
+ odp.pszTab = LPGEN("Settings");
+ odp.pfnDlgProc = DlgProcOpts1;
Options_AddPage(wParam, &odp);
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_CLASSES);
- odp.pszTab = LPGEN("Classes");
- odp.pfnDlgProc = DlgProcOptsClasses;
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_CLASSES);
+ odp.pszTab = LPGEN("Classes");
+ odp.pfnDlgProc = DlgProcOptsClasses;
Options_AddPage(wParam, &odp);
return 0;
diff --git a/plugins/ZeroNotification/main.c b/plugins/ZeroNotification/main.c
index 92572cb326..7104202c68 100644
--- a/plugins/ZeroNotification/main.c
+++ b/plugins/ZeroNotification/main.c
@@ -222,16 +222,14 @@ static INT_PTR CALLBACK DlgProcNoSoundOpts(HWND hwndDlg, UINT msg, WPARAM wParam
//Called when the user opened the options dialog
static int OptionsInitialize(WPARAM wParam,LPARAM lParam)
{
- OPTIONSDIALOGPAGE odp;
-
- ZeroMemory(&odp,sizeof(odp));
+ OPTIONSDIALOGPAGE odp = { 0 };
odp.cbSize = sizeof(odp);
odp.position = 100000000;
odp.hInstance = hInst;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_NOSOUND);
odp.pszTitle = PLUGINNAME_SHORT;
- odp.pszTitle = "Zero Notifications";
- odp.pszGroup = Translate("Plugins");
+ odp.pszTitle = LPGEN("Zero Notifications");
+ odp.pszGroup = LPGEN("Plugins");
odp.groupPosition = 100000000;
odp.pfnDlgProc = DlgProcNoSoundOpts;
Options_AddPage(wParam, &odp);
diff --git a/protocols/AimOscar/ui.cpp b/protocols/AimOscar/ui.cpp
index 4aa7502f73..87bedbbff8 100644
--- a/protocols/AimOscar/ui.cpp
+++ b/protocols/AimOscar/ui.cpp
@@ -1165,7 +1165,7 @@ int CAimProto::OnOptionsInit(WPARAM wParam,LPARAM lParam)
odp.pszTemplate = MAKEINTRESOURCEA(IDD_PRIVACY);
odp.pfnDlgProc = privacy_dialog;
odp.nIDBottomSimpleControl = 0;
- Options_AddPage(wParam,&odp);
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/protocols/FacebookRM/proto.cpp b/protocols/FacebookRM/proto.cpp
index b0887d3f66..884fa84149 100644
--- a/protocols/FacebookRM/proto.cpp
+++ b/protocols/FacebookRM/proto.cpp
@@ -424,13 +424,13 @@ int FacebookProto::OnOptionsInit(WPARAM wParam,LPARAM lParam)
odp.ptszTab = LPGENT("Account");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS);
odp.pfnDlgProc = FBOptionsProc;
- Options_AddPage(wParam,&odp);
+ Options_AddPage(wParam, &odp);
odp.position = 271829;
odp.ptszTab = LPGENT("Advanced");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS_ADVANCED);
odp.pfnDlgProc = FBOptionsAdvancedProc;
- Options_AddPage(wParam,&odp);
+ Options_AddPage(wParam, &odp);
odp.position = 271830;
if (ServiceExists(MS_POPUP_ADDPOPUPT))
@@ -438,7 +438,7 @@ int FacebookProto::OnOptionsInit(WPARAM wParam,LPARAM lParam)
odp.ptszTab = LPGENT("Events");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS_EVENTS);
odp.pfnDlgProc = FBEventsProc;
- Options_AddPage(wParam,&odp);
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/protocols/GTalkExt/notifications.cpp b/protocols/GTalkExt/notifications.cpp
index 59bb956308..8a8d8a618e 100644
--- a/protocols/GTalkExt/notifications.cpp
+++ b/protocols/GTalkExt/notifications.cpp
@@ -241,7 +241,7 @@ HANDLE SetupPseudocontact(LPCTSTR jid, LPCTSTR unreadCount, LPCSTR acc, LPCTSTR
if (allocateName) free((PVOID)displayName);
}
- DBWriteContactSettingTString(result, CLIST_MODULE_NAME, STATUS_MSG_SETTING, TranslateT(MAIL_NOTIFICATIONS));
+ DBWriteContactSettingTString(result, CLIST_MODULE_NAME, STATUS_MSG_SETTING, TranslateTS(MAIL_NOTIFICATIONS));
DBWriteContactSettingTString(result, SHORT_PLUGIN_NAME, UNREAD_THREADS_SETTING, unreadCount);
return result;
@@ -352,9 +352,9 @@ void UnreadThreadNotification(LPCSTR acc, LPCTSTR jid, LPCTSTR url, LPCTSTR unre
}
if (ReadCheckbox(0, IDC_ADDSNIP, (DWORD)TlsGetValue(itlsSettings)))
- wsprintf(&data.lptzText[0], TranslateT(FULL_NOTIFICATION_FORMAT), mtn->subj, senders, mtn->snip);
+ wsprintf(&data.lptzText[0], TranslateTS(FULL_NOTIFICATION_FORMAT), mtn->subj, senders, mtn->snip);
else
- wsprintf(&data.lptzText[0], TranslateT(SHORT_NOTIFICATION_FORMAT), mtn->subj, senders);
+ wsprintf(&data.lptzText[0], TranslateTS(SHORT_NOTIFICATION_FORMAT), mtn->subj, senders);
}
__finally {
free(senders);
diff --git a/protocols/GTalkExt/options.cpp b/protocols/GTalkExt/options.cpp
index 4232054a2c..e64e23679c 100644
--- a/protocols/GTalkExt/options.cpp
+++ b/protocols/GTalkExt/options.cpp
@@ -158,7 +158,7 @@ void ShowTestPopup(HWND wnd)
{
POPUPDATAT data = {0};
wsprintf(&data.lptzContactName[0], TEST_LETTER_INBOX);
- wsprintf(&data.lptzText[0], TranslateT(FULL_NOTIFICATION_FORMAT),
+ wsprintf(&data.lptzText[0], TranslateTS(FULL_NOTIFICATION_FORMAT),
TEST_LETTER_SUBJECT, TEST_LETTER_SENDER, TEST_LETTER_SNIP);
int len = SendMessage(GetDlgItem(wnd, IDC_TIMEOUTEDIT), WM_GETTEXTLENGTH, 0, 0) + 1;
@@ -245,7 +245,7 @@ void AddPopupsPage(WPARAM wParam)
{
OPTIONSDIALOGPAGE odp = {0};
odp.cbSize = sizeof(odp);
- odp.ptszTitle = _T(MAIL_NOTIFICATIONS);
+ odp.ptszTitle = MAIL_NOTIFICATIONS;
odp.pfnDlgProc = PopupsOptionsDlgProc;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_POPUPSETTINGS);
odp.hInstance = hInst;
@@ -265,7 +265,7 @@ void AddAccPage(LPCTSTR acc, LPCSTR mod, WPARAM wParam)
odp.hInstance = hInst;
odp.ptszGroup = NETWORK_OPTIONS_GROUP;
odp.flags = ODPF_UNICODE | ODPF_USERINFOTAB;
- odp.ptszTab =_T(MAIL_NOTIFICATIONS);
+ odp.ptszTab = MAIL_NOTIFICATIONS;
odp.dwInitParam = (LPARAM)mod;
Options_AddPage(wParam, &odp);
diff --git a/protocols/GTalkExt/options.h b/protocols/GTalkExt/options.h
index d213bcbb47..bc720e22ed 100644
--- a/protocols/GTalkExt/options.h
+++ b/protocols/GTalkExt/options.h
@@ -23,9 +23,9 @@
#include "resources.h"
-static const LPTSTR _T(MAIL_NOTIFICATIONS) = _T("GMail notifications");
-static const LPTSTR _T(FULL_NOTIFICATION_FORMAT) = _T("subject\n %s\nfrom\n%s\n%s\n");
-static const LPTSTR _T(SHORT_NOTIFICATION_FORMAT) = _T("subject\n %s\nfrom\n%s");
+static const LPTSTR MAIL_NOTIFICATIONS = _T("GMail notifications");
+static const LPTSTR FULL_NOTIFICATION_FORMAT = _T("subject\n %s\nfrom\n%s\n%s\n");
+static const LPTSTR SHORT_NOTIFICATION_FORMAT = _T("subject\n %s\nfrom\n%s");
static const LPSTR PSEUDOCONTACT_LINK = "GTalkExtNotifyContact";
static const LPSTR PSEUDOCONTACT_FLAG = "IsNotifyContact";
diff --git a/protocols/Gadu-Gadu/dialogs.c b/protocols/Gadu-Gadu/dialogs.c
index ed068a1d16..5582d15ffb 100644
--- a/protocols/Gadu-Gadu/dialogs.c
+++ b/protocols/Gadu-Gadu/dialogs.c
@@ -126,7 +126,6 @@ static void SetValue(HWND hwndDlg, int idCtrl, HANDLE hContact, char *szModule,
int gg_options_init(GGPROTO *gg, WPARAM wParam, LPARAM lParam)
{
OPTIONSDIALOGPAGE odp = { 0 };
-
odp.cbSize = sizeof(odp);
odp.position = 1003000;
odp.hInstance = hInstance;
diff --git a/protocols/IcqOscarJ/icq_opts.cpp b/protocols/IcqOscarJ/icq_opts.cpp
index 67c71d014e..da34fe2cdb 100644
--- a/protocols/IcqOscarJ/icq_opts.cpp
+++ b/protocols/IcqOscarJ/icq_opts.cpp
@@ -576,16 +576,13 @@ INT_PTR CALLBACK DlgProcIcqPopupOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
int CIcqProto::OnOptionsInit(WPARAM wParam, LPARAM lParam)
{
- OPTIONSDIALOGPAGE odp = {0};
- HMODULE hUxTheme = 0;
-
- if (IsWinVerXPPlus())
- {
- hUxTheme = GetModuleHandleA("uxtheme.dll");
+ if (IsWinVerXPPlus()) {
+ HMODULE hUxTheme = GetModuleHandleA("uxtheme.dll");
if (hUxTheme)
pfnEnableThemeDialogTexture = (BOOL (WINAPI *)(HANDLE, DWORD))GetProcAddress(hUxTheme, "EnableThemeDialogTexture");
}
+ OPTIONSDIALOGPAGE odp = {0};
odp.cbSize = sizeof(odp);
odp.position = -800000000;
odp.hInstance = hInst;
@@ -614,8 +611,7 @@ int CIcqProto::OnOptionsInit(WPARAM wParam, LPARAM lParam)
odp.pfnDlgProc = DlgProcIcqPrivacyOpts;
Options_AddPage(wParam, &odp);
- if (bPopUpService)
- {
+ if (bPopUpService) {
odp.position = 100000000;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_POPUPS);
odp.groupPosition = 900000000;
diff --git a/protocols/JabberG/jabber_opt.cpp b/protocols/JabberG/jabber_opt.cpp
index 63c38d6d0c..f4e070271a 100644
--- a/protocols/JabberG/jabber_opt.cpp
+++ b/protocols/JabberG/jabber_opt.cpp
@@ -1605,7 +1605,6 @@ INT_PTR __cdecl CJabberProto::OnMenuHandleRosterControl( WPARAM, LPARAM )
int CJabberProto::OnOptionsInit( WPARAM wParam, LPARAM )
{
OPTIONSDIALOGPAGE odp = { 0 };
-
odp.cbSize = sizeof( odp );
odp.hInstance = hInst;
odp.ptszGroup = LPGENT("Network");
diff --git a/protocols/MRA/MraPopUp.cpp b/protocols/MRA/MraPopUp.cpp
index 67cf3ad263..ec3893aea5 100644
--- a/protocols/MRA/MraPopUp.cpp
+++ b/protocols/MRA/MraPopUp.cpp
@@ -27,15 +27,14 @@ int MraPopupOptInit(WPARAM wParam,LPARAM lParam)
{
if (ServiceExists(MS_POPUP_ADDPOPUP)) {
OPTIONSDIALOGPAGE odp = {0};
-
odp.cbSize = sizeof(odp);
odp.position = 100000000;
odp.hInstance = masMraSettings.hInstance;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_POPUPS);
- odp.ptszTitle = PROTOCOL_NAMEW;
- odp.ptszGroup = TranslateW(L"Popups");
+ odp.pszTitle = PROTOCOL_NAMEA;
+ odp.pszGroup = LPGEN("Popups");
odp.groupPosition = 900000000;
- odp.flags = (ODPF_BOLDGROUPS | ODPF_UNICODE);
+ odp.flags = ODPF_BOLDGROUPS;
odp.nIDBottomSimpleControl = IDC_GROUPMAIN;
odp.pfnDlgProc = MraPopupDlgProcOpts;
Options_AddPage(wParam, &odp);
diff --git a/protocols/MRA/Mra_options.cpp b/protocols/MRA/Mra_options.cpp
index 664a9ce8a6..97e1aa1b91 100644
--- a/protocols/MRA/Mra_options.cpp
+++ b/protocols/MRA/Mra_options.cpp
@@ -10,40 +10,39 @@ INT_PTR CALLBACK DlgProcOptsConnections (HWND hWndDlg, UINT msg, WPARAM wParam,
int OptInit(WPARAM wParam,LPARAM lParam)
{
OPTIONSDIALOGPAGE odp={0};
-
- odp.cbSize=sizeof(odp);
- odp.hInstance=masMraSettings.hInstance;
- odp.pszTitle=PROTOCOL_NAMEA;
- odp.pszGroup="Network";
- odp.flags=ODPF_BOLDGROUPS;
-
- odp.pszTab="Account";
- odp.pszTemplate=MAKEINTRESOURCEA(IDD_OPT_ACCOUNT);
- odp.pfnDlgProc=DlgProcOptsAccount;
- Options_AddPage(wParam,&odp);
-
- odp.pszTab="Connections";
- odp.pszTemplate=MAKEINTRESOURCEA(IDD_OPT_CONNECTIONS);
- odp.pfnDlgProc=DlgProcOptsConnections;
- Options_AddPage(wParam,&odp);
-
- odp.pszTab="Anti spam";
- odp.pszTemplate=MAKEINTRESOURCEA(IDD_OPT_ANTISPAM);
- odp.pfnDlgProc=MraAntiSpamDlgProcOpts;
- Options_AddPage(wParam,&odp);
-
- odp.pszTab="Files";
- odp.pszTemplate=MAKEINTRESOURCEA(IDD_OPT_FILES);
- odp.pfnDlgProc=MraFilesQueueDlgProcOpts;
- Options_AddPage(wParam,&odp);
-
- odp.pszTab="Avatars";
- odp.pszTemplate=MAKEINTRESOURCEA(IDD_OPT_AVATRS);
- odp.pfnDlgProc=MraAvatarsQueueDlgProcOpts;
- Options_AddPage(wParam,&odp);
+ odp.cbSize = sizeof(odp);
+ odp.hInstance = masMraSettings.hInstance;
+ odp.pszTitle = PROTOCOL_NAMEA;
+ odp.pszGroup = LPGEN("Network");
+ odp.flags = ODPF_BOLDGROUPS;
+
+ odp.pszTab = LPGEN("Account");
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_ACCOUNT);
+ odp.pfnDlgProc = DlgProcOptsAccount;
+ Options_AddPage(wParam, &odp);
+
+ odp.pszTab = LPGEN("Connections");
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_CONNECTIONS);
+ odp.pfnDlgProc = DlgProcOptsConnections;
+ Options_AddPage(wParam, &odp);
+
+ odp.pszTab = LPGEN("Anti spam");
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_ANTISPAM);
+ odp.pfnDlgProc = MraAntiSpamDlgProcOpts;
+ Options_AddPage(wParam, &odp);
+
+ odp.pszTab = LPGEN("Files");
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_FILES);
+ odp.pfnDlgProc = MraFilesQueueDlgProcOpts;
+ Options_AddPage(wParam, &odp);
+
+ odp.pszTab = LPGEN("Avatars");
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_AVATRS);
+ odp.pfnDlgProc = MraAvatarsQueueDlgProcOpts;
+ Options_AddPage(wParam, &odp);
MraPopupOptInit(wParam,lParam);
-return(0);
+ return 0;
}
diff --git a/protocols/MSN/msn_opts.cpp b/protocols/MSN/msn_opts.cpp
index 11d077c52c..c55755f1b9 100644
--- a/protocols/MSN/msn_opts.cpp
+++ b/protocols/MSN/msn_opts.cpp
@@ -730,17 +730,17 @@ int CMsnProto::OnOptionsInit(WPARAM wParam,LPARAM lParam)
odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR | ODPF_DONTTRANSLATE;
odp.pfnDlgProc = DlgProcMsnOpts;
odp.dwInitParam = (LPARAM)this;
- Options_AddPage(wParam,&odp);
+ Options_AddPage(wParam, &odp);
odp.ptszTab = LPGENT("Connection");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_MSN_CONN);
odp.pfnDlgProc = DlgProcMsnConnOpts;
- Options_AddPage(wParam,&odp);
+ Options_AddPage(wParam, &odp);
odp.ptszTab = LPGENT("Server list");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_LISTSMGR);
odp.pfnDlgProc = DlgProcMsnServLists;
- Options_AddPage(wParam,&odp);
+ Options_AddPage(wParam, &odp);
odp.ptszTab = LPGENT("Notifications");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_NOTIFY);
diff --git a/protocols/NewsAggregator/Src/Options.cpp b/protocols/NewsAggregator/Src/Options.cpp
index c9264f3d27..9484d263fc 100644
--- a/protocols/NewsAggregator/Src/Options.cpp
+++ b/protocols/NewsAggregator/Src/Options.cpp
@@ -634,16 +634,14 @@ INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
INT OptInit(WPARAM wParam, LPARAM lParam)
{
OPTIONSDIALOGPAGE odp = {0};
-
- ZeroMemory(&odp, sizeof(odp));
odp.cbSize = sizeof(odp);
- odp.position = 100000000;
- odp.hInstance = hInst;
- odp.flags = ODPF_TCHAR | ODPF_BOLDGROUPS;
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS);
- odp.ptszGroup = LPGENT("Network");
- odp.ptszTitle = LPGENT("News Aggregator");
- odp.pfnDlgProc = UpdateNotifyOptsProc;
- Options_AddPage(wParam, &odp);
- return 0;
+ odp.position = 100000000;
+ odp.hInstance = hInst;
+ odp.flags = ODPF_BOLDGROUPS;
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS);
+ odp.pszGroup = LPGEN("Network");
+ odp.pszTitle = LPGEN("News Aggregator");
+ odp.pfnDlgProc = UpdateNotifyOptsProc;
+ Options_AddPage(wParam, &odp);
+ return 0;
} \ No newline at end of file
diff --git a/protocols/Omegle/proto.cpp b/protocols/Omegle/proto.cpp
index ca930961b8..b91cc72f23 100644
--- a/protocols/Omegle/proto.cpp
+++ b/protocols/Omegle/proto.cpp
@@ -219,7 +219,7 @@ int OmegleProto::OnOptionsInit(WPARAM wParam,LPARAM lParam)
odp.ptszTab = LPGENT("Account");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS);
odp.pfnDlgProc = OmegleOptionsProc;
- Options_AddPage(wParam,&odp);
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/protocols/Quotes/Forex.cpp b/protocols/Quotes/Forex.cpp
index 62f2c6af28..bd86956a2c 100644
--- a/protocols/Quotes/Forex.cpp
+++ b/protocols/Quotes/Forex.cpp
@@ -375,22 +375,17 @@ namespace
int QuotesEventFunc_OptInitialise(WPARAM wp,LPARAM/* lp*/)
{
-// USES_CONVERSION;
-
const CModuleInfo::TQuotesProvidersPtr& pProviders = CModuleInfo::GetQuoteProvidersPtr();
const CQuotesProviders::TQuotesProviders& rapProviders = pProviders->GetProviders();
- OPTIONSDIALOGPAGE odp;
- ZeroMemory(&odp,sizeof(odp));
-
+ OPTIONSDIALOGPAGE odp = { 0 };
odp.cbSize = sizeof(odp);
odp.position = 910000000;
odp.hInstance = CModuleInfo::GetModuleHandle();
- tstring sProtocolName = quotes_a2t(QUOTES_PROTOCOL_NAME);
- odp.ptszTitle = const_cast<TCHAR*>(sProtocolName.c_str());//A2T(QUOTES_PROTOCOL_NAME);
- odp.ptszGroup = _T("Network");
+ odp.pszTitle = QUOTES_PROTOCOL_NAME;
+ odp.pszGroup = LPGEN("Network");
odp.hIcon = Quotes_LoadIconEx(ICON_STR_MAIN);
- odp.flags = ODPF_TCHAR|ODPF_USERINFOTAB;
+ odp.flags = ODPF_USERINFOTAB;
std::for_each(rapProviders.begin(),rapProviders.end(),boost::bind(&IQuotesProvider::ShowPropertyPage,_1,wp,boost::ref(odp)));
return 0;
diff --git a/protocols/Quotes/QuoteInfoDlg.cpp b/protocols/Quotes/QuoteInfoDlg.cpp
index 0cb1c8a686..9e33a66a80 100644
--- a/protocols/Quotes/QuoteInfoDlg.cpp
+++ b/protocols/Quotes/QuoteInfoDlg.cpp
@@ -153,14 +153,12 @@ int QuotesEventFunc_OnUserInfoInit(WPARAM wp,LPARAM lp)
OPTIONSDIALOGPAGE odp = {0};
odp.cbSize = sizeof( odp );
odp.hInstance = CModuleInfo::GetModuleHandle();
- //odp.dwInitParam = ( LPARAM )this;
odp.hIcon = Quotes_LoadIconEx(ICON_STR_MAIN);
- odp.flags = ODPF_TCHAR;
odp.pfnDlgProc = QuoteInfoDlgProc;
odp.position = -2000000000;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_DIALOG_QUOTE_INFO);
- odp.ptszTitle = TranslateT("Quote");
+ odp.pszTitle = LPGEN("Quote");
UserInfo_AddPage(wp, &odp);
return 0;
}
diff --git a/protocols/Twitter/proto.cpp b/protocols/Twitter/proto.cpp
index 30b3b90a16..f45e64e5d9 100644
--- a/protocols/Twitter/proto.cpp
+++ b/protocols/Twitter/proto.cpp
@@ -365,16 +365,16 @@ int TwitterProto::OnOptionsInit(WPARAM wParam,LPARAM lParam)
odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
odp.ptszTab = LPGENT("Basic");
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS);
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS);
odp.pfnDlgProc = options_proc;
- Options_AddPage(wParam,&odp);
+ Options_AddPage(wParam, &odp);
- if(ServiceExists(MS_POPUP_ADDPOPUPT))
+ if(ServiceExists(MS_POPUP_ADDPOPUPT))
{
odp.ptszTab = LPGENT("Popups");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS_POPUPS);
odp.pfnDlgProc = popup_options_proc;
- Options_AddPage(wParam,&odp);
+ Options_AddPage(wParam, &odp);
}
return 0;
diff --git a/protocols/Weather/weather_opt.cpp b/protocols/Weather/weather_opt.cpp
index 6e27c45e5c..68dea66ff6 100644
--- a/protocols/Weather/weather_opt.cpp
+++ b/protocols/Weather/weather_opt.cpp
@@ -291,13 +291,13 @@ int OptInit(WPARAM wParam,LPARAM lParam) {
odp.pszTitle = WEATHERPROTOTEXT;
odp.pszTab = LPGEN("General");
odp.flags = ODPF_BOLDGROUPS;
- Options_AddPage(wParam,&odp);
+ Options_AddPage(wParam, &odp);
// text options
odp.pszTemplate = MAKEINTRESOURCEA(IDD_TEXTOPT);
odp.pfnDlgProc = DlgProcText;
odp.pszTab = LPGEN("Display");
- Options_AddPage(wParam,&odp);
+ Options_AddPage(wParam, &odp);
// if popup service exists, load the weather popup options
if ((ServiceExists(MS_POPUP_ADDPOPUP))) {
@@ -307,7 +307,7 @@ int OptInit(WPARAM wParam,LPARAM lParam) {
odp.groupPosition = 910000000;
odp.pszTab = NULL;
odp.pfnDlgProc = DlgPopUpOpts;
- Options_AddPage(wParam,&odp);
+ Options_AddPage(wParam, &odp);
}
return 0;
diff --git a/protocols/Yahoo/options.cpp b/protocols/Yahoo/options.cpp
index da51259fcc..6acd8c0dca 100644
--- a/protocols/Yahoo/options.cpp
+++ b/protocols/Yahoo/options.cpp
@@ -376,7 +376,7 @@ INT_PTR __cdecl CYahooProto::OnOptionsInit(WPARAM wParam,LPARAM lParam)
odp.hInstance = hInstance;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_YAHOO);
odp.ptszTitle = m_tszUserName;
- odp.flags = ODPF_BOLDGROUPS|ODPF_TCHAR|ODPF_DONTTRANSLATE;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR | ODPF_DONTTRANSLATE;
odp.ptszGroup = LPGENT("Network");
odp.ptszTab = LPGENT("Account");
odp.pfnDlgProc = DlgProcYahooOpts;
diff --git a/src/modules/contacts/contacts.cpp b/src/modules/contacts/contacts.cpp
index 11180fb52c..a2959909a4 100644
--- a/src/modules/contacts/contacts.cpp
+++ b/src/modules/contacts/contacts.cpp
@@ -492,21 +492,17 @@ static int ContactOptInit(WPARAM wParam, LPARAM)
return 0;
}
-int LoadContactsModule(void) {
- {
- // Load the name order
- BYTE i;
- DBVARIANT dbv;
-
- for (i=0; i<NAMEORDERCOUNT; i++)
- nameOrder[i]=i;
+int LoadContactsModule(void)
+{
+ for (BYTE i=0; i < NAMEORDERCOUNT; i++)
+ nameOrder[i]=i;
- if ( !DBGetContactSetting(NULL, "Contact", "NameOrder", &dbv))
- {
- CopyMemory(nameOrder, dbv.pbVal, dbv.cpbVal);
- DBFreeVariant(&dbv);
- }
+ DBVARIANT dbv;
+ if ( !DBGetContactSetting(NULL, "Contact", "NameOrder", &dbv)) {
+ CopyMemory(nameOrder, dbv.pbVal, dbv.cpbVal);
+ DBFreeVariant(&dbv);
}
+
CreateServiceFunction(MS_CONTACT_GETCONTACTINFO, GetContactInfo);
HookEvent(ME_OPT_INITIALISE, ContactOptInit);
return 0;
diff --git a/src/modules/icolib/skin2icons.cpp b/src/modules/icolib/skin2icons.cpp
index e02fcf579a..810c15d741 100644
--- a/src/modules/icolib/skin2icons.cpp
+++ b/src/modules/icolib/skin2icons.cpp
@@ -1833,7 +1833,6 @@ static UINT iconsExpertOnlyControls[]={IDC_IMPORT};
static int SkinOptionsInit(WPARAM wParam, LPARAM)
{
OPTIONSDIALOGPAGE odp = {0};
-
odp.cbSize = sizeof(odp);
odp.hInstance = hMirandaInst;
odp.flags = ODPF_BOLDGROUPS;
diff --git a/src/modules/netlib/netlibopts.cpp b/src/modules/netlib/netlibopts.cpp
index 2ce5282f2b..20e90d9932 100644
--- a/src/modules/netlib/netlibopts.cpp
+++ b/src/modules/netlib/netlibopts.cpp
@@ -536,9 +536,11 @@ int NetlibOptInitialise(WPARAM wParam, LPARAM)
int optionsCount = 0;
EnterCriticalSection(&csNetlibUser);
for (int i = 0; i < netlibUser.getCount(); ++i)
- if ( !(netlibUser[i]->user.flags & NUF_NOOPTIONS)) ++optionsCount;
+ if ( !(netlibUser[i]->user.flags & NUF_NOOPTIONS))
+ ++optionsCount;
LeaveCriticalSection(&csNetlibUser);
- if (optionsCount == 0) return 0;
+ if (optionsCount == 0)
+ return 0;
OPTIONSDIALOGPAGE odp = { 0 };
diff --git a/src/modules/options/filter.cpp b/src/modules/options/filter.cpp
index b68efeda9c..2ea0aa4752 100644
--- a/src/modules/options/filter.cpp
+++ b/src/modules/options/filter.cpp
@@ -189,18 +189,17 @@ static INT_PTR CALLBACK DlgProcOptSearch(HWND hWnd, UINT msg, WPARAM wParam, LPA
static int OnOptionsInitialise(WPARAM wParam, LPARAM)
{
OPTIONSDIALOGPAGE odp = {0};
-
+
odp.cbSize = sizeof(odp);
odp.position = -190000000;
odp.hInstance = hMirandaInst;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_KEYWORDFILTER);
- odp.ptszTitle = TranslateT("Options search");
- odp.ptszGroup = TranslateT("Customize");
+ odp.pszTitle = LPGEN("Options search");
+ odp.pszGroup = LPGEN("Customize");
odp.groupPosition = 810000000;
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS;
odp.pfnDlgProc = DlgProcOptSearch;
Options_AddPage(wParam, &odp);
-
return 0;
}
diff --git a/src/modules/skin/hotkeys.cpp b/src/modules/skin/hotkeys.cpp
index e9588c30ad..7d01f93a01 100644
--- a/src/modules/skin/hotkeys.cpp
+++ b/src/modules/skin/hotkeys.cpp
@@ -1367,11 +1367,11 @@ static int sttOptionsInit(WPARAM wParam, LPARAM)
OPTIONSDIALOGPAGE odp = {0};
odp.cbSize = sizeof(odp);
odp.hInstance = hMirandaInst;
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS;
odp.position = -180000000;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_HOTKEYS);
- odp.ptszTitle = TranslateT("Hotkeys");
- odp.ptszGroup = TranslateT("Customize");
+ odp.pszTitle = LPGEN("Hotkeys");
+ odp.pszGroup = LPGEN("Customize");
odp.pfnDlgProc = sttOptionsDlgProc;
Options_AddPage(wParam, &odp);
return 0;
diff --git a/src/modules/srfile/fileopts.cpp b/src/modules/srfile/fileopts.cpp
index bc6bafc3b5..aa4c78543b 100644
--- a/src/modules/srfile/fileopts.cpp
+++ b/src/modules/srfile/fileopts.cpp
@@ -231,7 +231,7 @@ static INT_PTR CALLBACK DlgProcFileOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
int FileOptInitialise(WPARAM wParam, LPARAM)
{
- OPTIONSDIALOGPAGE odp={0};
+ OPTIONSDIALOGPAGE odp = {0};
odp.cbSize = sizeof(odp);
odp.position = 900000000;
odp.hInstance = hMirandaInst;
diff --git a/src/modules/updatenotify/updatenotify.cpp b/src/modules/updatenotify/updatenotify.cpp
index 6732fe777b..50129c960a 100644
--- a/src/modules/updatenotify/updatenotify.cpp
+++ b/src/modules/updatenotify/updatenotify.cpp
@@ -133,10 +133,9 @@ void UnloadUpdateNotifyModule()
UnhookEvent(hHookPreShutdown);
}
-static int UpdateNotifyOptInit(WPARAM wParam, LPARAM) {
- OPTIONSDIALOGPAGE odp;
-
- ZeroMemory(&odp, sizeof(odp));
+static int UpdateNotifyOptInit(WPARAM wParam, LPARAM)
+{
+ OPTIONSDIALOGPAGE odp = { 0 };
odp.cbSize = sizeof(odp);
odp.position = 100000000;
odp.hInstance = hMirandaInst;