summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-12-30 18:32:36 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-12-30 18:32:36 +0000
commitb52dd1c1f38d1aeeb01c303d405a51afa82efe3b (patch)
tree8f5f5d7d330b54a8188480b8acea9284fb94f727 /plugins/Clist_modern/src
parentb67369c7256dc40eb7aa7b3527c1cb45e2a27b27 (diff)
code cleaning and reordering
git-svn-id: http://svn.miranda-ng.org/main/trunk@7432 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern/src')
-rw-r--r--plugins/Clist_modern/src/modern_clcopts.cpp2040
1 files changed, 1001 insertions, 1039 deletions
diff --git a/plugins/Clist_modern/src/modern_clcopts.cpp b/plugins/Clist_modern/src/modern_clcopts.cpp
index 9e4103d8b2..a782a6167d 100644
--- a/plugins/Clist_modern/src/modern_clcopts.cpp
+++ b/plugins/Clist_modern/src/modern_clcopts.cpp
@@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
#include "hdr/modern_commonheaders.h"
#include "hdr/modern_clc.h"
#include "hdr/modern_commonprototypes.h"
@@ -29,6 +30,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_modernopt.h>
#include "m_fontservice.h"
+INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
+
#define FONTF_NORMAL 0
#define FONTF_BOLD 1
#define FONTF_ITALIC 2
@@ -36,36 +39,36 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct FontOptionsList
{
- DWORD dwFlags;
- int fontID;
- TCHAR* szGroup;
- TCHAR* szDescr;
- COLORREF defColour;
- TCHAR* szDefFace;
- BYTE defCharset, defStyle;
- char defSize;
- FONTEFFECT defeffect;
-
- COLORREF colour;
- TCHAR szFace[LF_FACESIZE];
- BYTE charset, style;
- char size;
+ DWORD dwFlags;
+ int fontID;
+ TCHAR *szGroup;
+ TCHAR *szDescr;
+ COLORREF defColour;
+ TCHAR *szDefFace;
+ BYTE defCharset, defStyle;
+ char defSize;
+ FONTEFFECT defeffect;
+
+ COLORREF colour;
+ TCHAR szFace[LF_FACESIZE];
+ BYTE charset, style;
+ char size;
};
-#define CLCGROUP LPGENT("Contact List")_T("/")LPGENT("Contact names")
-#define CLCLINESGROUP LPGENT("Contact List")_T("/")LPGENT("Row items")
-#define CLCFRAMESGROUP LPGENT("Contact List")_T("/")LPGENT("Frame texts")
-#define CLCCOLOURSGROUP LPGENT("Contact List")_T("/")LPGENT("Special colors")
+#define CLCGROUP LPGENT("Contact List")_T("/")LPGENT("Contact names")
+#define CLCLINESGROUP LPGENT("Contact List")_T("/")LPGENT("Row items")
+#define CLCFRAMESGROUP LPGENT("Contact List")_T("/")LPGENT("Frame texts")
+#define CLCCOLOURSGROUP LPGENT("Contact List")_T("/")LPGENT("Special colors")
-#define DEFAULT_COLOUR RGB(0, 0, 0)
-#define DEFAULT_GREYCOLOUR RGB(128, 128, 128)
-#define DEFAULT_BACKCOLOUR RGB(255, 255, 255)
+#define DEFAULT_COLOUR RGB(0, 0, 0)
+#define DEFAULT_GREYCOLOUR RGB(128, 128, 128)
+#define DEFAULT_BACKCOLOUR RGB(255, 255, 255)
-#define DEFAULT_FAMILY _T("Arial")
-#define DEFAULT_EFFECT { 0, 0x00000000, 0x00000000 }
+#define DEFAULT_FAMILY _T("Arial")
+#define DEFAULT_EFFECT { 0, 0x00000000, 0x00000000 }
-#define DEFAULT_SIZE -11
-#define DEFAULT_SMALLSIZE -8
+#define DEFAULT_SIZE -11
+#define DEFAULT_SMALLSIZE -8
static struct FontOptionsList fontOptionsList[] = {
{ FIDF_CLASSGENERAL, FONTID_CONTACTS, CLCGROUP, LPGENT("Standard contacts"), DEFAULT_COLOUR, DEFAULT_FAMILY, DEFAULT_CHARSET, FONTF_NORMAL, DEFAULT_SIZE, DEFAULT_EFFECT },
@@ -105,32 +108,31 @@ struct ColourOptionsList
COLORREF defColour;
};
-static struct ColourOptionsList colourOptionsList[] = {
-
- { "CLC", "BkColour", CLCGROUP, LPGENT("Background"), DEFAULT_BACKCOLOUR },
- { "CLC", "Rows_BkColour", CLCLINESGROUP, LPGENT("Background"), DEFAULT_BACKCOLOUR },
- { "CLC", "Frames_BkColour", CLCFRAMESGROUP, LPGENT("Background"), DEFAULT_BACKCOLOUR},
-
- { "CLC", "HotTextColour", CLCCOLOURSGROUP, LPGENT("Hot text"), CLCDEFAULT_MODERN_HOTTEXTCOLOUR },
- { "CLC", "SelTextColour", CLCCOLOURSGROUP, LPGENT("Selected text"), CLCDEFAULT_MODERN_SELTEXTCOLOUR },
- { "CLC", "QuickSearchColour", CLCCOLOURSGROUP, LPGENT("Quick search text"), CLCDEFAULT_MODERN_QUICKSEARCHCOLOUR},
-
- { "Menu", "TextColour", CLCCOLOURSGROUP, LPGENT("Menu text"), CLCDEFAULT_TEXTCOLOUR},
- { "Menu", "SelTextColour", CLCCOLOURSGROUP, LPGENT("Selected menu text"), CLCDEFAULT_MODERN_SELTEXTCOLOUR},
- { "FrameTitleBar", "TextColour", CLCCOLOURSGROUP, LPGENT("Frame title text"), CLCDEFAULT_TEXTCOLOUR },
- { "StatusBar", "TextColour", CLCCOLOURSGROUP, LPGENT("Statusbar text"), CLCDEFAULT_TEXTCOLOUR},
- { "ModernSettings", "KeyColor", CLCCOLOURSGROUP, LPGENT("3rd party frames transparent back color"), SETTING_KEYCOLOR_DEFAULT},
-
+static struct ColourOptionsList colourOptionsList[] =
+{
+ { "CLC", "BkColour", CLCGROUP, LPGENT("Background"), DEFAULT_BACKCOLOUR },
+ { "CLC", "Rows_BkColour", CLCLINESGROUP, LPGENT("Background"), DEFAULT_BACKCOLOUR },
+ { "CLC", "Frames_BkColour", CLCFRAMESGROUP, LPGENT("Background"), DEFAULT_BACKCOLOUR },
+
+ { "CLC", "HotTextColour", CLCCOLOURSGROUP, LPGENT("Hot text"), CLCDEFAULT_MODERN_HOTTEXTCOLOUR },
+ { "CLC", "SelTextColour", CLCCOLOURSGROUP, LPGENT("Selected text"), CLCDEFAULT_MODERN_SELTEXTCOLOUR },
+ { "CLC", "QuickSearchColour", CLCCOLOURSGROUP, LPGENT("Quick search text"), CLCDEFAULT_MODERN_QUICKSEARCHCOLOUR },
+
+ { "Menu", "TextColour", CLCCOLOURSGROUP, LPGENT("Menu text"), CLCDEFAULT_TEXTCOLOUR },
+ { "Menu", "SelTextColour", CLCCOLOURSGROUP, LPGENT("Selected menu text"), CLCDEFAULT_MODERN_SELTEXTCOLOUR },
+ { "FrameTitleBar", "TextColour", CLCCOLOURSGROUP, LPGENT("Frame title text"), CLCDEFAULT_TEXTCOLOUR },
+ { "StatusBar", "TextColour", CLCCOLOURSGROUP, LPGENT("Statusbar text"), CLCDEFAULT_TEXTCOLOUR },
+ { "ModernSettings", "KeyColor", CLCCOLOURSGROUP, LPGENT("3rd party frames transparent back color"), SETTING_KEYCOLOR_DEFAULT }
};
void RegisterCLUIFonts( void )
{
static bool registered = false;
- if ( registered )
+ if (registered)
return;
- FontIDT fontid = {0};
- EffectIDT effectid = {0};
+ FontIDT fontid = { 0 };
+ EffectIDT effectid = { 0 };
char idstr[10];
int index = 0;
@@ -140,7 +142,7 @@ void RegisterCLUIFonts( void )
effectid.cbSize = sizeof(effectid);
strncpy(effectid.dbSettingsGroup, "CLC", SIZEOF(effectid.dbSettingsGroup));
- for (int i=0; i < SIZEOF(fontOptionsList); i++, index++ ) {
+ for (int i = 0; i < SIZEOF(fontOptionsList); i++, index++) {
fontid.flags = FIDF_DEFAULTVALID | FIDF_APPENDNAME | FIDF_SAVEPOINTSIZE | FIDF_ALLOWEFFECTS | FIDF_ALLOWREREGISTER | FIDF_NOAS;
fontid.flags |= fontOptionsList[i].dwFlags;
@@ -148,7 +150,7 @@ void RegisterCLUIFonts( void )
_tcsncpy(fontid.name, fontOptionsList[i].szDescr, SIZEOF(fontid.name));
mir_snprintf(idstr, SIZEOF(idstr), "Font%d", fontOptionsList[i].fontID);
strncpy(fontid.prefix, idstr, SIZEOF(fontid.prefix));
- fontid.order = i+1;
+ fontid.order = i + 1;
fontid.deffontsettings.charset = fontOptionsList[i].defCharset;
fontid.deffontsettings.colour = fontOptionsList[i].defColour;
@@ -171,13 +173,13 @@ void RegisterCLUIFonts( void )
EffectRegisterT(&effectid);
}
- ColourIDT colourid = {0};
+ ColourIDT colourid = { 0 };
colourid.cbSize = sizeof(colourid);
- for (int i=0; i < SIZEOF( colourOptionsList); i++ ) {
- _tcsncpy(colourid.group, colourOptionsList[i].szGroup, SIZEOF(colourid.group));
- _tcsncpy(colourid.name, colourOptionsList[i].szDescr, SIZEOF(colourid.group));
- strncpy(colourid.setting, colourOptionsList[i].chName, SIZEOF(colourid.setting));
+ for (int i = 0; i < SIZEOF(colourOptionsList); i++) {
+ _tcsncpy(colourid.group, colourOptionsList[i].szGroup, SIZEOF(colourid.group));
+ _tcsncpy(colourid.name, colourOptionsList[i].szDescr, SIZEOF(colourid.group));
+ strncpy(colourid.setting, colourOptionsList[i].chName, SIZEOF(colourid.setting));
strncpy(colourid.dbSettingsGroup, colourOptionsList[i].chGroup, SIZEOF(colourid.dbSettingsGroup));
colourid.defcolour = colourOptionsList[i].defColour;
colourid.order = i + 1;
@@ -186,11 +188,6 @@ void RegisterCLUIFonts( void )
registered = true;
}
-static INT_PTR CALLBACK DlgProcClistListOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
-static INT_PTR CALLBACK DlgProcClistAdditionalOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
-static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
-static INT_PTR CALLBACK DlgProcStatusBarBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
-
DWORD GetDefaultExStyle(void)
{
BOOL param;
@@ -202,94 +199,37 @@ DWORD GetDefaultExStyle(void)
return ret;
}
-void GetFontSetting(int i,LOGFONT *lf,COLORREF *colour,BYTE *effect, COLORREF *eColour1,COLORREF *eColour2)
+void GetFontSetting(int i, LOGFONT *lf, COLORREF *colour, BYTE *effect, COLORREF *eColour1, COLORREF *eColour2)
{
- DBVARIANT dbv = {0};
+ DBVARIANT dbv = { 0 };
char idstr[32];
- int index = 0;
- for ( index = 0; index < SIZEOF(fontOptionsList); index++ )
- if ( fontOptionsList[index].fontID == i )
+ int index;
+ for (index = 0; index < SIZEOF(fontOptionsList); index++)
+ if (fontOptionsList[index].fontID == i)
break;
- if ( index == SIZEOF(fontOptionsList))
+ if (index == SIZEOF(fontOptionsList))
return;
- FontIDT fontid = {0};
+ FontIDT fontid = { 0 };
fontid.cbSize = sizeof(fontid);
- _tcsncpy( fontid.group, fontOptionsList[index].szGroup, SIZEOF( fontid.group ));
- _tcsncpy( fontid.name, fontOptionsList[index].szDescr, SIZEOF( fontid.name ));
+ _tcsncpy(fontid.group, fontOptionsList[index].szGroup, SIZEOF(fontid.group));
+ _tcsncpy(fontid.name, fontOptionsList[index].szDescr, SIZEOF(fontid.name));
- COLORREF col = CallService(MS_FONT_GETT, (WPARAM)&fontid, (LPARAM)lf );
+ COLORREF col = CallService(MS_FONT_GETT, (WPARAM)&fontid, (LPARAM)lf);
- if ( colour )
+ if (colour)
*colour = col;
if (effect) {
- mir_snprintf(idstr,SIZEOF(idstr),"Font%dEffect",i);
- *effect = db_get_b(NULL,"CLC",idstr,0);
- mir_snprintf(idstr,SIZEOF(idstr),"Font%dEffectCol1",i);
- *eColour1 = db_get_dw(NULL,"CLC",idstr,0);
- mir_snprintf(idstr,SIZEOF(idstr),"Font%dEffectCol2",i);
- *eColour2 = db_get_dw(NULL,"CLC",idstr,0);
- }
-}
-
-
-static INT_PTR CALLBACK DlgProcClistOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
-static INT_PTR CALLBACK DlgProcTrayOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
-static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
-static INT_PTR CALLBACK DlgProcClistBehaviourOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
-INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
-
-struct
-{
- char *name; // Tab name
- int id; // Dialog id
- DLGPROC wnd_proc; // Dialog function
- DWORD flag; // Expertonly
-}
-static clist_opt_items[] =
-{
- { LPGEN("General"), IDD_OPT_CLIST, DlgProcClistOpts, 0},
- { LPGEN("Tray"), IDD_OPT_TRAY, DlgProcTrayOpts, 0 },
- { LPGEN("List"), IDD_OPT_CLC, DlgProcClistListOpts, 0 },
- { LPGEN("Window"), IDD_OPT_CLUI, DlgProcClistWindowOpts, 0 },
- { LPGEN("Behavior"), IDD_OPT_CLUI_2, DlgProcClistBehaviourOpts, 0 },
- { LPGEN("Status Bar"), IDD_OPT_SBAR, DlgProcSBarOpts, 0},
- { LPGEN("Additional stuff"), IDD_OPT_META_CLC, DlgProcClistAdditionalOpts, 0 }
-};
-
-int ClcOptInit(WPARAM wParam,LPARAM lParam)
-{
- if (MirandaExiting())
- return 0;
-
- OPTIONSDIALOGPAGE odp = { 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;
- Options_AddPage(wParam, &odp);
+ mir_snprintf(idstr, SIZEOF(idstr), "Font%dEffect", i);
+ *effect = db_get_b(NULL, "CLC", idstr, 0);
+ mir_snprintf(idstr, SIZEOF(idstr), "Font%dEffectCol1", i);
+ *eColour1 = db_get_dw(NULL, "CLC", idstr, 0);
+ mir_snprintf(idstr, SIZEOF(idstr), "Font%dEffectCol2", i);
+ *eColour2 = db_get_dw(NULL, "CLC", idstr, 0);
}
-
- if (g_CluiData.fDisableSkinEngine) {
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_CLIST_LISTBKG);
- odp.pszGroup = LPGEN("Skins");
- odp.pszTitle = LPGEN("Contact List");
- odp.pszTab = LPGEN("List Background");
- odp.pfnDlgProc = DlgProcClcBkgOpts;
- odp.flags = ODPF_BOLDGROUPS;
- Options_AddPage(wParam, &odp);
- }
- return 0;
}
struct CheckBoxToStyleEx_t
@@ -298,19 +238,20 @@ struct CheckBoxToStyleEx_t
DWORD flag;
int neg;
};
+
static const struct CheckBoxToStyleEx_t checkBoxToStyleEx[] = {
- {IDC_DISABLEDRAGDROP,CLS_EX_DISABLEDRAGDROP,0},
- {IDC_NOTEDITLABELS,CLS_EX_EDITLABELS,1},
- {IDC_SHOWSELALWAYS,CLS_EX_SHOWSELALWAYS,0},
- {IDC_TRACKSELECT,CLS_EX_TRACKSELECT,0},
- {IDC_SHOWGROUPCOUNTS,CLS_EX_SHOWGROUPCOUNTS,0},
- {IDC_HIDECOUNTSWHENEMPTY,CLS_EX_HIDECOUNTSWHENEMPTY,0},
- {IDC_DIVIDERONOFF,CLS_EX_DIVIDERONOFF,0},
- {IDC_NOTNOTRANSLUCENTSEL,CLS_EX_NOTRANSLUCENTSEL,1},
- {IDC_LINEWITHGROUPS,CLS_EX_LINEWITHGROUPS,0},
- {IDC_QUICKSEARCHVISONLY,CLS_EX_QUICKSEARCHVISONLY,0},
- {IDC_SORTGROUPSALPHA,CLS_EX_SORTGROUPSALPHA,0},
- {IDC_NOTNOSMOOTHSCROLLING,CLS_EX_NOSMOOTHSCROLLING,1}
+ { IDC_DISABLEDRAGDROP, CLS_EX_DISABLEDRAGDROP, 0 },
+ { IDC_NOTEDITLABELS, CLS_EX_EDITLABELS, 1 },
+ { IDC_SHOWSELALWAYS, CLS_EX_SHOWSELALWAYS, 0 },
+ { IDC_TRACKSELECT, CLS_EX_TRACKSELECT, 0 },
+ { IDC_SHOWGROUPCOUNTS, CLS_EX_SHOWGROUPCOUNTS, 0 },
+ { IDC_HIDECOUNTSWHENEMPTY, CLS_EX_HIDECOUNTSWHENEMPTY, 0 },
+ { IDC_DIVIDERONOFF, CLS_EX_DIVIDERONOFF, 0 },
+ { IDC_NOTNOTRANSLUCENTSEL, CLS_EX_NOTRANSLUCENTSEL, 1 },
+ { IDC_LINEWITHGROUPS, CLS_EX_LINEWITHGROUPS, 0 },
+ { IDC_QUICKSEARCHVISONLY, CLS_EX_QUICKSEARCHVISONLY, 0 },
+ { IDC_SORTGROUPSALPHA, CLS_EX_SORTGROUPSALPHA, 0 },
+ { IDC_NOTNOSMOOTHSCROLLING, CLS_EX_NOSMOOTHSCROLLING, 1 }
};
struct CheckBoxValues_t {
@@ -318,41 +259,40 @@ struct CheckBoxValues_t {
TCHAR *szDescr;
};
static const struct CheckBoxValues_t greyoutValues[] = {
- {GREYF_UNFOCUS,LPGENT("Not focused")},
- {MODEF_OFFLINE,LPGENT("Offline")},
- {PF2_ONLINE,LPGENT("Online")},
- {PF2_SHORTAWAY,LPGENT("Away")},
- {PF2_LONGAWAY,LPGENT("NA")},
- {PF2_LIGHTDND,LPGENT("Occupied")},
- {PF2_HEAVYDND,LPGENT("DND")},
- {PF2_FREECHAT,LPGENT("Free for chat")},
- {PF2_INVISIBLE,LPGENT("Invisible")},
- {PF2_OUTTOLUNCH,LPGENT("Out to lunch")},
- {PF2_ONTHEPHONE,LPGENT("On the phone")}
+ { GREYF_UNFOCUS, LPGENT("Not focused") },
+ { MODEF_OFFLINE, LPGENT("Offline") },
+ { PF2_ONLINE, LPGENT("Online") },
+ { PF2_SHORTAWAY, LPGENT("Away") },
+ { PF2_LONGAWAY, LPGENT("NA") },
+ { PF2_LIGHTDND, LPGENT("Occupied") },
+ { PF2_HEAVYDND, LPGENT("DND") },
+ { PF2_FREECHAT, LPGENT("Free for chat") },
+ { PF2_INVISIBLE, LPGENT("Invisible") },
+ { PF2_OUTTOLUNCH, LPGENT("Out to lunch") },
+ { PF2_ONTHEPHONE, LPGENT("On the phone") }
};
-static const struct CheckBoxValues_t offlineValues[] =
+
+static const struct CheckBoxValues_t offlineValues[] =
{
- {MODEF_OFFLINE,LPGENT("Offline")},
- {PF2_ONLINE,LPGENT("Online")},
- {PF2_SHORTAWAY,LPGENT("Away")},
- {PF2_LONGAWAY,LPGENT("NA")},
- {PF2_LIGHTDND,LPGENT("Occupied")},
- {PF2_HEAVYDND,LPGENT("DND")},
- {PF2_FREECHAT,LPGENT("Free for chat")},
- {PF2_INVISIBLE,LPGENT("Invisible")},
- {PF2_OUTTOLUNCH,LPGENT("Out to lunch")},
- {PF2_ONTHEPHONE,LPGENT("On the phone")}
+ { MODEF_OFFLINE, LPGENT("Offline") },
+ { PF2_ONLINE, LPGENT("Online") },
+ { PF2_SHORTAWAY, LPGENT("Away") },
+ { PF2_LONGAWAY, LPGENT("NA") },
+ { PF2_LIGHTDND, LPGENT("Occupied") },
+ { PF2_HEAVYDND, LPGENT("DND") },
+ { PF2_FREECHAT, LPGENT("Free for chat") },
+ { PF2_INVISIBLE, LPGENT("Invisible") },
+ { PF2_OUTTOLUNCH, LPGENT("Out to lunch") },
+ { PF2_ONTHEPHONE, LPGENT("On the phone") }
};
static void FillCheckBoxTree(HWND hwndTree,const struct CheckBoxValues_t *values,int nValues,DWORD style)
{
TVINSERTSTRUCT tvis;
- int i;
-
tvis.hParent = NULL;
tvis.hInsertAfter = TVI_LAST;
tvis.item.mask = TVIF_PARAM|TVIF_TEXT|TVIF_STATE|TVIF_IMAGE;
- for (i=0; i < nValues; i++) {
+ for (int i=0; i < nValues; i++) {
tvis.item.lParam = values[i].style;
tvis.item.pszText = TranslateTS(values[i].szDescr);
tvis.item.stateMask = TVIS_STATEIMAGEMASK;
@@ -365,78 +305,77 @@ static void FillCheckBoxTree(HWND hwndTree,const struct CheckBoxValues_t *values
static DWORD MakeCheckBoxTreeFlags(HWND hwndTree)
{
DWORD flags = 0;
- TVITEMA tvi;
-
- tvi.mask = TVIF_HANDLE|TVIF_PARAM|TVIF_IMAGE;
+ TVITEM tvi;
+ tvi.mask = TVIF_HANDLE | TVIF_PARAM | TVIF_IMAGE;
tvi.hItem = TreeView_GetRoot(hwndTree);
while(tvi.hItem) {
TreeView_GetItem(hwndTree,&tvi);
- if (tvi.iImage) flags |= tvi.lParam;
+ if (tvi.iImage)
+ flags |= tvi.lParam;
tvi.hItem = TreeView_GetNextSibling(hwndTree,tvi.hItem);
}
return flags;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
static INT_PTR CALLBACK DlgProcClistAdditionalOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- LPNMHDR t;
- t = ((LPNMHDR)lParam);
switch (msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- CheckDlgButton(hwndDlg, IDC_META, db_get_b(NULL,"CLC","Meta",SETTING_USEMETAICON_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); /// by FYR
- CheckDlgButton(hwndDlg, IDC_METADBLCLK, db_get_b(NULL,"CLC","MetaDoubleClick",SETTING_METAAVOIDDBLCLICK_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); /// by FYR
- CheckDlgButton(hwndDlg, IDC_METASUBEXTRA, db_get_b(NULL,"CLC","MetaHideExtra",SETTING_METAHIDEEXTRA_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); /// by FYR
- CheckDlgButton(hwndDlg, IDC_METASUBEXTRA_IGN, db_get_b(NULL,"CLC","MetaIgnoreEmptyExtra",SETTING_METAAVOIDDBLCLICK_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); /// by FYR
- CheckDlgButton(hwndDlg, IDC_METASUB_HIDEOFFLINE, db_get_b(NULL,"CLC","MetaHideOfflineSub",SETTING_METAHIDEOFFLINESUB_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); /// by FYR
- CheckDlgButton(hwndDlg, IDC_METAEXPAND, db_get_b(NULL,"CLC","MetaExpanding",SETTING_METAEXPANDING_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); /// by FYR
- CheckDlgButton(hwndDlg, IDC_DISCOVER_AWAYMSG, db_get_b(NULL,"ModernData","InternalAwayMsgDiscovery",SETTING_INTERNALAWAYMSGREQUEST_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); /// by FYR
- CheckDlgButton(hwndDlg, IDC_REMOVE_OFFLINE_AWAYMSG, db_get_b(NULL,"ModernData","RemoveAwayMessageForOffline",SETTING_REMOVEAWAYMSGFOROFFLINE_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); /// by FYR
- CheckDlgButton(hwndDlg, IDC_FILTER_SEARCH, db_get_b(NULL,"CLC","FilterSearch",SETTING_FILTERSEARCH_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); /// by Robyer
-
- SendDlgItemMessage(hwndDlg,IDC_SUBINDENTSPIN,UDM_SETBUDDY,(WPARAM)GetDlgItem(hwndDlg,IDC_SUBINDENT),0);
- SendDlgItemMessage(hwndDlg,IDC_SUBINDENTSPIN,UDM_SETRANGE, 0, MAKELONG(50, 0));
- SendDlgItemMessage(hwndDlg,IDC_SUBINDENTSPIN,UDM_SETPOS, 0, MAKELONG( db_get_b(NULL,"CLC","SubIndent",CLCDEFAULT_GROUPINDENT),0));
-
+ CheckDlgButton(hwndDlg, IDC_META, db_get_b(NULL, "CLC", "Meta", SETTING_USEMETAICON_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); /// by FYR
+ CheckDlgButton(hwndDlg, IDC_METADBLCLK, db_get_b(NULL, "CLC", "MetaDoubleClick", SETTING_METAAVOIDDBLCLICK_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); /// by FYR
+ CheckDlgButton(hwndDlg, IDC_METASUBEXTRA, db_get_b(NULL, "CLC", "MetaHideExtra", SETTING_METAHIDEEXTRA_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); /// by FYR
+ CheckDlgButton(hwndDlg, IDC_METASUBEXTRA_IGN, db_get_b(NULL, "CLC", "MetaIgnoreEmptyExtra", SETTING_METAAVOIDDBLCLICK_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); /// by FYR
+ CheckDlgButton(hwndDlg, IDC_METASUB_HIDEOFFLINE, db_get_b(NULL, "CLC", "MetaHideOfflineSub", SETTING_METAHIDEOFFLINESUB_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); /// by FYR
+ CheckDlgButton(hwndDlg, IDC_METAEXPAND, db_get_b(NULL, "CLC", "MetaExpanding", SETTING_METAEXPANDING_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); /// by FYR
+ CheckDlgButton(hwndDlg, IDC_DISCOVER_AWAYMSG, db_get_b(NULL, "ModernData", "InternalAwayMsgDiscovery", SETTING_INTERNALAWAYMSGREQUEST_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); /// by FYR
+ CheckDlgButton(hwndDlg, IDC_REMOVE_OFFLINE_AWAYMSG, db_get_b(NULL, "ModernData", "RemoveAwayMessageForOffline", SETTING_REMOVEAWAYMSGFOROFFLINE_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); /// by FYR
+ CheckDlgButton(hwndDlg, IDC_FILTER_SEARCH, db_get_b(NULL, "CLC", "FilterSearch", SETTING_FILTERSEARCH_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); /// by Robyer
+
+ SendDlgItemMessage(hwndDlg, IDC_SUBINDENTSPIN, UDM_SETBUDDY, (WPARAM)GetDlgItem(hwndDlg, IDC_SUBINDENT), 0);
+ SendDlgItemMessage(hwndDlg, IDC_SUBINDENTSPIN, UDM_SETRANGE, 0, MAKELONG(50, 0));
+ SendDlgItemMessage(hwndDlg, IDC_SUBINDENTSPIN, UDM_SETPOS, 0, MAKELONG(db_get_b(NULL, "CLC", "SubIndent", CLCDEFAULT_GROUPINDENT), 0));
{
- BYTE t = IsDlgButtonChecked(hwndDlg,IDC_METAEXPAND);
- EnableWindow(GetDlgItem(hwndDlg,IDC_METADBLCLK),t);
- EnableWindow(GetDlgItem(hwndDlg,IDC_METASUBEXTRA),t);
- EnableWindow(GetDlgItem(hwndDlg,IDC_METASUB_HIDEOFFLINE),t);
- EnableWindow(GetDlgItem(hwndDlg,IDC_SUBINDENTSPIN),t);
- EnableWindow(GetDlgItem(hwndDlg,IDC_SUBINDENT),t);
+ BYTE t = IsDlgButtonChecked(hwndDlg, IDC_METAEXPAND);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_METADBLCLK), t);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_METASUBEXTRA), t);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_METASUB_HIDEOFFLINE), t);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_SUBINDENTSPIN), t);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_SUBINDENT), t);
t = ServiceExists(MS_MC_GETMOSTONLINECONTACT);
- CLUI_ShowWindowMod(GetDlgItem(hwndDlg,IDC_META),t);
- CLUI_ShowWindowMod(GetDlgItem(hwndDlg,IDC_METADBLCLK),t);
- CLUI_ShowWindowMod(GetDlgItem(hwndDlg,IDC_METASUB_HIDEOFFLINE),t);
- CLUI_ShowWindowMod(GetDlgItem(hwndDlg,IDC_METAEXPAND),t);
- CLUI_ShowWindowMod(GetDlgItem(hwndDlg,IDC_METASUBEXTRA),t);
- CLUI_ShowWindowMod(GetDlgItem(hwndDlg,IDC_FRAME_META),t);
- CLUI_ShowWindowMod(GetDlgItem(hwndDlg,IDC_FRAME_META_CAPT),!t);
- CLUI_ShowWindowMod(GetDlgItem(hwndDlg,IDC_SUBINDENTSPIN),t);
- CLUI_ShowWindowMod(GetDlgItem(hwndDlg,IDC_SUBINDENT),t);
- CLUI_ShowWindowMod(GetDlgItem(hwndDlg,IDC_SUBIDENTCAPT),t);
+ CLUI_ShowWindowMod(GetDlgItem(hwndDlg, IDC_META), t);
+ CLUI_ShowWindowMod(GetDlgItem(hwndDlg, IDC_METADBLCLK), t);
+ CLUI_ShowWindowMod(GetDlgItem(hwndDlg, IDC_METASUB_HIDEOFFLINE), t);
+ CLUI_ShowWindowMod(GetDlgItem(hwndDlg, IDC_METAEXPAND), t);
+ CLUI_ShowWindowMod(GetDlgItem(hwndDlg, IDC_METASUBEXTRA), t);
+ CLUI_ShowWindowMod(GetDlgItem(hwndDlg, IDC_FRAME_META), t);
+ CLUI_ShowWindowMod(GetDlgItem(hwndDlg, IDC_FRAME_META_CAPT), !t);
+ CLUI_ShowWindowMod(GetDlgItem(hwndDlg, IDC_SUBINDENTSPIN), t);
+ CLUI_ShowWindowMod(GetDlgItem(hwndDlg, IDC_SUBINDENT), t);
+ CLUI_ShowWindowMod(GetDlgItem(hwndDlg, IDC_SUBIDENTCAPT), t);
}
return TRUE;
case WM_COMMAND:
if (LOWORD(wParam) == IDC_METAEXPAND) {
- BYTE t = IsDlgButtonChecked(hwndDlg,IDC_METAEXPAND);
- EnableWindow(GetDlgItem(hwndDlg,IDC_METADBLCLK),t);
- EnableWindow(GetDlgItem(hwndDlg,IDC_METASUBEXTRA),t);
- EnableWindow(GetDlgItem(hwndDlg,IDC_METASUB_HIDEOFFLINE),t);
- EnableWindow(GetDlgItem(hwndDlg,IDC_SUBINDENTSPIN),t);
- EnableWindow(GetDlgItem(hwndDlg,IDC_SUBINDENT),t);
+ BYTE t = IsDlgButtonChecked(hwndDlg, IDC_METAEXPAND);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_METADBLCLK), t);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_METASUBEXTRA), t);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_METASUB_HIDEOFFLINE), t);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_SUBINDENTSPIN), t);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_SUBINDENT), t);
}
if ((LOWORD(wParam) == IDC_SUBINDENT) && (HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus())) return 0;
SendMessage(GetParent(hwndDlg), PSM_CHANGED, (WPARAM)hwndDlg, 0);
return TRUE;
case WM_NOTIFY:
- switch(t->idFrom) {
+ switch (((LPNMHDR)lParam)->idFrom) {
case 0:
- switch (t->code) {
+ switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
db_set_b(NULL,"CLC","Meta",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_META)); // by FYR
db_set_b(NULL,"CLC","MetaDoubleClick",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_METADBLCLK)); // by FYR
@@ -454,13 +393,14 @@ static INT_PTR CALLBACK DlgProcClistAdditionalOpts(HWND hwndDlg, UINT msg, WPARA
PostMessage(pcli->hwndContactList,WM_SIZE, 0, 0);
return TRUE;
}
- break;
}
break;
}
return FALSE;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
static INT_PTR CALLBACK DlgProcClistListOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch (msg) {
@@ -512,262 +452,253 @@ static INT_PTR CALLBACK DlgProcClistListOpts(HWND hwndDlg, UINT msg, WPARAM wPar
break;
case WM_NOTIFY:
- switch(((LPNMHDR)lParam)->idFrom) {
+ switch (((LPNMHDR)lParam)->idFrom) {
case IDC_GREYOUTOPTS:
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_ONITEMICON) {
+ 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.mask = TVIF_HANDLE | TVIF_IMAGE | TVIF_SELECTEDIMAGE;
tvi.hItem = hti.hItem;
- TreeView_GetItem(((LPNMHDR)lParam)->hwndFrom,&tvi);
+ TreeView_GetItem(((LPNMHDR)lParam)->hwndFrom, &tvi);
tvi.iImage = tvi.iSelectedImage = tvi.iImage = !tvi.iImage;
- //tvi.state = tvi.iImage?2:1;
- TreeView_SetItem(((LPNMHDR)lParam)->hwndFrom,&tvi);
+ TreeView_SetItem(((LPNMHDR)lParam)->hwndFrom, &tvi);
SendMessage(GetParent(hwndDlg), PSM_CHANGED, (WPARAM)hwndDlg, 0);
}
}
break;
+
case 0:
switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
- {
- DWORD exStyle = 0;
- for (int i=0; i < SIZEOF(checkBoxToStyleEx); i++)
- if ((IsDlgButtonChecked(hwndDlg,checkBoxToStyleEx[i].id) == 0) == checkBoxToStyleEx[i].neg)
- exStyle |= checkBoxToStyleEx[i].flag;
- db_set_dw(NULL,"CLC","ExStyle",exStyle);
- }
- {
- DWORD fullGreyoutFlags = MakeCheckBoxTreeFlags(GetDlgItem(hwndDlg,IDC_GREYOUTOPTS));
- db_set_dw(NULL,"CLC","FullGreyoutFlags",fullGreyoutFlags);
- if (IsDlgButtonChecked(hwndDlg,IDC_GREYOUT))
- db_set_dw(NULL,"CLC","GreyoutFlags",fullGreyoutFlags);
- else
- db_set_dw(NULL,"CLC","GreyoutFlags",0);
- }
+ DWORD exStyle = 0;
+ for (int i = 0; i < SIZEOF(checkBoxToStyleEx); i++)
+ if ((IsDlgButtonChecked(hwndDlg, checkBoxToStyleEx[i].id) == 0) == checkBoxToStyleEx[i].neg)
+ exStyle |= checkBoxToStyleEx[i].flag;
+ db_set_dw(NULL, "CLC", "ExStyle", exStyle);
+
+ DWORD fullGreyoutFlags = MakeCheckBoxTreeFlags(GetDlgItem(hwndDlg, IDC_GREYOUTOPTS));
+ db_set_dw(NULL, "CLC", "FullGreyoutFlags", fullGreyoutFlags);
+ if (IsDlgButtonChecked(hwndDlg, IDC_GREYOUT))
+ db_set_dw(NULL, "CLC", "GreyoutFlags", fullGreyoutFlags);
+ else
+ db_set_dw(NULL, "CLC", "GreyoutFlags", 0);
- db_set_b(NULL,"CLC","ShowIdle",(BYTE)(IsDlgButtonChecked(hwndDlg,IDC_IDLE)?1:0));
- db_set_dw(NULL,"CLC","OfflineModes",MakeCheckBoxTreeFlags(GetDlgItem(hwndDlg,IDC_HIDEOFFLINEOPTS)));
- db_set_w(NULL,"CLC","ScrollTime",(WORD)SendDlgItemMessage(hwndDlg,IDC_SMOOTHTIMESPIN,UDM_GETPOS, 0, 0));
- db_set_b(NULL,"CLC","GroupIndent",(BYTE)SendDlgItemMessage(hwndDlg,IDC_GROUPINDENTSPIN,UDM_GETPOS, 0, 0));
- db_set_b(NULL,"CLC","NoVScrollBar",(BYTE)(IsDlgButtonChecked(hwndDlg,IDC_NOSCROLLBAR)?1:0));
+ db_set_b(NULL, "CLC", "ShowIdle", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_IDLE) ? 1 : 0));
+ db_set_dw(NULL, "CLC", "OfflineModes", MakeCheckBoxTreeFlags(GetDlgItem(hwndDlg, IDC_HIDEOFFLINEOPTS)));
+ db_set_w(NULL, "CLC", "ScrollTime", (WORD)SendDlgItemMessage(hwndDlg, IDC_SMOOTHTIMESPIN, UDM_GETPOS, 0, 0));
+ db_set_b(NULL, "CLC", "GroupIndent", (BYTE)SendDlgItemMessage(hwndDlg, IDC_GROUPINDENTSPIN, UDM_GETPOS, 0, 0));
+ db_set_b(NULL, "CLC", "NoVScrollBar", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_NOSCROLLBAR) ? 1 : 0));
ClcOptionsChanged();
return TRUE;
}
- break;
}
break;
case WM_DESTROY:
- ImageList_Destroy(TreeView_GetImageList(GetDlgItem(hwndDlg,IDC_GREYOUTOPTS),TVSIL_NORMAL));
+ ImageList_Destroy(TreeView_GetImageList(GetDlgItem(hwndDlg, IDC_GREYOUTOPTS), TVSIL_NORMAL));
break;
}
return FALSE;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
static INT_PTR CALLBACK DlgProcStatusBarBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch (msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- CheckDlgButton(hwndDlg,IDC_BITMAP,db_get_b(NULL,"StatusBar","UseBitmap",CLCDEFAULT_USEBITMAP)?BST_CHECKED:BST_UNCHECKED);
- SendMessage(hwndDlg,WM_USER+10, 0, 0);
- SendDlgItemMessage(hwndDlg,IDC_BKGCOLOUR,CPM_SETDEFAULTCOLOUR, 0, CLCDEFAULT_BKCOLOUR);
+ CheckDlgButton(hwndDlg, IDC_BITMAP, db_get_b(NULL, "StatusBar", "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, db_get_dw(NULL,"StatusBar","BkColour",CLCDEFAULT_BKCOLOUR));
- SendDlgItemMessage(hwndDlg,IDC_SELCOLOUR,CPM_SETDEFAULTCOLOUR, 0, CLCDEFAULT_SELBKCOLOUR);
- SendDlgItemMessage(hwndDlg,IDC_SELCOLOUR,CPM_SETCOLOUR, 0, db_get_dw(NULL,"StatusBar","SelBkColour",CLCDEFAULT_SELBKCOLOUR));
+ SendDlgItemMessage(hwndDlg, IDC_SELCOLOUR, CPM_SETDEFAULTCOLOUR, 0, CLCDEFAULT_SELBKCOLOUR);
+ SendDlgItemMessage(hwndDlg, IDC_SELCOLOUR, CPM_SETCOLOUR, 0, db_get_dw(NULL, "StatusBar", "SelBkColour", CLCDEFAULT_SELBKCOLOUR));
{
- DBVARIANT dbv;
- if ( !db_get_s(NULL, "StatusBar", "BkBitmap", &dbv)) {
- SetDlgItemTextA(hwndDlg,IDC_FILENAME,dbv.pszVal);
-
- char szPath[MAX_PATH];
- if ( PathToAbsolute(dbv.pszVal, szPath))
- SetDlgItemTextA(hwndDlg,IDC_FILENAME,szPath);
+ ptrT tszFileName(db_get_tsa(NULL, "StatusBar", "BkBitmap"));
+ if (tszFileName) {
+ SetDlgItemText(hwndDlg, IDC_FILENAME, tszFileName);
- db_free(&dbv);
+ TCHAR szPath[MAX_PATH];
+ if (PathToAbsoluteT(tszFileName, szPath))
+ SetDlgItemText(hwndDlg, IDC_FILENAME, szPath);
}
}
- CheckDlgButton(hwndDlg,IDC_HILIGHTMODE,db_get_b(NULL,"StatusBar","HiLightMode",SETTING_SBHILIGHTMODE_DEFAULT) == 0?BST_CHECKED:BST_UNCHECKED);
- CheckDlgButton(hwndDlg,IDC_HILIGHTMODE1,db_get_b(NULL,"StatusBar","HiLightMode",SETTING_SBHILIGHTMODE_DEFAULT) == 1?BST_CHECKED:BST_UNCHECKED);
- CheckDlgButton(hwndDlg,IDC_HILIGHTMODE2,db_get_b(NULL,"StatusBar","HiLightMode",SETTING_SBHILIGHTMODE_DEFAULT) == 2?BST_CHECKED:BST_UNCHECKED);
- CheckDlgButton(hwndDlg,IDC_HILIGHTMODE3,db_get_b(NULL,"StatusBar","HiLightMode",SETTING_SBHILIGHTMODE_DEFAULT) == 3?BST_CHECKED:BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_HILIGHTMODE, db_get_b(NULL, "StatusBar", "HiLightMode", SETTING_SBHILIGHTMODE_DEFAULT) == 0 ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_HILIGHTMODE1, db_get_b(NULL, "StatusBar", "HiLightMode", SETTING_SBHILIGHTMODE_DEFAULT) == 1 ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_HILIGHTMODE2, db_get_b(NULL, "StatusBar", "HiLightMode", SETTING_SBHILIGHTMODE_DEFAULT) == 2 ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_HILIGHTMODE3, db_get_b(NULL, "StatusBar", "HiLightMode", SETTING_SBHILIGHTMODE_DEFAULT) == 3 ? BST_CHECKED : BST_UNCHECKED);
{
- WORD bmpUse = db_get_w(NULL,"StatusBar","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);
- CheckDlgButton(hwndDlg,IDC_TILEVROWH,bmpUse&CLBF_TILEVTOROWHEIGHT?BST_CHECKED:BST_UNCHECKED);
+ WORD bmpUse = db_get_w(NULL, "StatusBar", "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);
+ CheckDlgButton(hwndDlg, IDC_TILEVROWH, bmpUse&CLBF_TILEVTOROWHEIGHT ? BST_CHECKED : BST_UNCHECKED);
SHAutoComplete(GetDlgItem(hwndDlg, IDC_FILENAME), 1);
}
return TRUE;
-
- case WM_USER+10:
- EnableWindow(GetDlgItem(hwndDlg,IDC_FILENAME),IsDlgButtonChecked(hwndDlg,IDC_BITMAP));
- EnableWindow(GetDlgItem(hwndDlg,IDC_BROWSE),IsDlgButtonChecked(hwndDlg,IDC_BITMAP));
- EnableWindow(GetDlgItem(hwndDlg,IDC_STRETCHH),IsDlgButtonChecked(hwndDlg,IDC_BITMAP));
- EnableWindow(GetDlgItem(hwndDlg,IDC_STRETCHV),IsDlgButtonChecked(hwndDlg,IDC_BITMAP));
- EnableWindow(GetDlgItem(hwndDlg,IDC_TILEH),IsDlgButtonChecked(hwndDlg,IDC_BITMAP));
- EnableWindow(GetDlgItem(hwndDlg,IDC_TILEV),IsDlgButtonChecked(hwndDlg,IDC_BITMAP));
- EnableWindow(GetDlgItem(hwndDlg,IDC_SCROLL),IsDlgButtonChecked(hwndDlg,IDC_BITMAP));
- EnableWindow(GetDlgItem(hwndDlg,IDC_PROPORTIONAL),IsDlgButtonChecked(hwndDlg,IDC_BITMAP));
- EnableWindow(GetDlgItem(hwndDlg,IDC_TILEVROWH),IsDlgButtonChecked(hwndDlg,IDC_BITMAP));
+
+ case WM_USER + 10:
+ EnableWindow(GetDlgItem(hwndDlg, IDC_FILENAME), IsDlgButtonChecked(hwndDlg, IDC_BITMAP));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_BROWSE), IsDlgButtonChecked(hwndDlg, IDC_BITMAP));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_STRETCHH), IsDlgButtonChecked(hwndDlg, IDC_BITMAP));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_STRETCHV), IsDlgButtonChecked(hwndDlg, IDC_BITMAP));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_TILEH), IsDlgButtonChecked(hwndDlg, IDC_BITMAP));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_TILEV), IsDlgButtonChecked(hwndDlg, IDC_BITMAP));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_SCROLL), IsDlgButtonChecked(hwndDlg, IDC_BITMAP));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_PROPORTIONAL), IsDlgButtonChecked(hwndDlg, IDC_BITMAP));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_TILEVROWH), IsDlgButtonChecked(hwndDlg, IDC_BITMAP));
break;
-
+
case WM_COMMAND:
if (LOWORD(wParam) == IDC_BROWSE) {
- char str[MAX_PATH];
- OPENFILENAMEA ofn = {0};
- char filter[512];
+ TCHAR str[MAX_PATH], filter[512];
- GetDlgItemTextA(hwndDlg,IDC_FILENAME,str,SIZEOF(str));
+ OPENFILENAME ofn = { 0 };
+ GetDlgItemText(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);
+ CallService(MS_UTILS_GETBITMAPFILTERSTRINGST, 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);
+ ofn.lpstrDefExt = _T("bmp");
+ if (!GetOpenFileName(&ofn))
+ break;
+
+ SetDlgItemText(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_FILENAME && (HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus())) return 0;
+ 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_FILENAME && (HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus()))
+ return 0;
SendMessage(GetParent(hwndDlg), PSM_CHANGED, (WPARAM)hwndDlg, 0);
break;
-
+
case WM_NOTIFY:
- switch(((LPNMHDR)lParam)->idFrom) {
+ switch (((LPNMHDR)lParam)->idFrom) {
case 0:
switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
- db_set_b(NULL,"StatusBar","UseBitmap",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_BITMAP));
- {
- COLORREF col;
- col = SendDlgItemMessage(hwndDlg,IDC_BKGCOLOUR,CPM_GETCOLOUR, 0, 0);
- if (col == CLCDEFAULT_BKCOLOUR) db_unset(NULL,"StatusBar","BkColour");
- else db_set_dw(NULL,"StatusBar","BkColour",col);
- col = SendDlgItemMessage(hwndDlg,IDC_SELCOLOUR,CPM_GETCOLOUR, 0, 0);
- if (col == CLCDEFAULT_SELBKCOLOUR) db_unset(NULL,"StatusBar","SelBkColour");
- else db_set_dw(NULL,"StatusBar","SelBkColour",col);
- }
- {
- char str[MAX_PATH],strrel[MAX_PATH];
- GetDlgItemTextA(hwndDlg,IDC_FILENAME,str,SIZEOF(str));
- if ( PathToRelative(str, strrel))
- db_set_s(NULL,"StatusBar","BkBitmap",strrel);
- else
- db_set_s(NULL,"StatusBar","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;
- if (IsDlgButtonChecked(hwndDlg,IDC_TILEVROWH)) flags |= CLBF_TILEVTOROWHEIGHT;
-
- db_set_w(NULL,"StatusBar","BkBmpUse",flags);
- }
- {
- int hil = 0;
- if (IsDlgButtonChecked(hwndDlg,IDC_HILIGHTMODE1)) hil = 1;
- if (IsDlgButtonChecked(hwndDlg,IDC_HILIGHTMODE2)) hil = 2;
- if (IsDlgButtonChecked(hwndDlg,IDC_HILIGHTMODE3)) hil = 3;
+ db_set_b(NULL, "StatusBar", "UseBitmap", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_BITMAP));
+
+ COLORREF col = SendDlgItemMessage(hwndDlg, IDC_BKGCOLOUR, CPM_GETCOLOUR, 0, 0);
+ if (col == CLCDEFAULT_BKCOLOUR) db_unset(NULL, "StatusBar", "BkColour");
+ else db_set_dw(NULL, "StatusBar", "BkColour", col);
+ col = SendDlgItemMessage(hwndDlg, IDC_SELCOLOUR, CPM_GETCOLOUR, 0, 0);
+ if (col == CLCDEFAULT_SELBKCOLOUR) db_unset(NULL, "StatusBar", "SelBkColour");
+ else db_set_dw(NULL, "StatusBar", "SelBkColour", col);
+
+ char str[MAX_PATH], strrel[MAX_PATH];
+ GetDlgItemTextA(hwndDlg, IDC_FILENAME, str, SIZEOF(str));
+ if (PathToRelative(str, strrel))
+ db_set_s(NULL, "StatusBar", "BkBitmap", strrel);
+ else
+ db_set_s(NULL, "StatusBar", "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;
+ if (IsDlgButtonChecked(hwndDlg, IDC_TILEVROWH)) flags |= CLBF_TILEVTOROWHEIGHT;
+ db_set_w(NULL, "StatusBar", "BkBmpUse", flags);
- db_set_b(NULL,"StatusBar","HiLightMode",(BYTE)hil);
- }
+ int hil = 0;
+ if (IsDlgButtonChecked(hwndDlg, IDC_HILIGHTMODE1)) hil = 1;
+ if (IsDlgButtonChecked(hwndDlg, IDC_HILIGHTMODE2)) hil = 2;
+ if (IsDlgButtonChecked(hwndDlg, IDC_HILIGHTMODE3)) hil = 3;
+ db_set_b(NULL, "StatusBar", "HiLightMode", (BYTE)hil);
ClcOptionsChanged();
- //OnStatusBarBackgroundChange();
return TRUE;
}
- break;
}
break;
}
return FALSE;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
static int _GetNetVisibleProtoCount()
{
- int i,count,netProtoCount;
+ int i, count, netProtoCount;
PROTOACCOUNT **accs;
- ProtoEnumAccounts( &count, &accs );
- for (i=0, netProtoCount = 0;i < count; i++)
- {
- if ( pcli->pfnGetProtocolVisibility(accs[i]->szModuleName) == 0 )
+ ProtoEnumAccounts(&count, &accs);
+ for (i = 0, netProtoCount = 0; i < count; i++) {
+ if (pcli->pfnGetProtocolVisibility(accs[i]->szModuleName) == 0)
continue;
netProtoCount++;
}
return netProtoCount;
}
-TCHAR *sortby[] = {LPGENT("Name"), LPGENT("Name (use locale settings)") , LPGENT("Status"), LPGENT("Last message time"), LPGENT("Account Name"), LPGENT("Rate"), LPGENT("-Nothing-")};
-int sortbyValue[] = { SORTBY_NAME, SORTBY_NAME_LOCALE, SORTBY_STATUS, SORTBY_LASTMSG, SORTBY_PROTO ,SORTBY_RATE , SORTBY_NOTHING };
+TCHAR *sortby[] = { LPGENT("Name"), LPGENT("Name (use locale settings)"), LPGENT("Status"), LPGENT("Last message time"), LPGENT("Account Name"), LPGENT("Rate"), LPGENT("-Nothing-") };
+int sortbyValue[] = { SORTBY_NAME, SORTBY_NAME_LOCALE, SORTBY_STATUS, SORTBY_LASTMSG, SORTBY_PROTO, SORTBY_RATE, SORTBY_NOTHING };
static INT_PTR CALLBACK DlgProcClistOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch (msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- CheckDlgButton(hwndDlg, IDC_HIDEOFFLINE, db_get_b(NULL,"CList","HideOffline",SETTING_HIDEOFFLINE_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_HIDEEMPTYGROUPS, db_get_b(NULL,"CList","HideEmptyGroups",SETTING_HIDEEMPTYGROUPS_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_DISABLEGROUPS, db_get_b(NULL,"CList","UseGroups",SETTING_USEGROUPS_DEFAULT) ? BST_UNCHECKED : BST_CHECKED);
- CheckDlgButton(hwndDlg, IDC_CONFIRMDELETE, db_get_b(NULL,"CList","ConfirmDelete",SETTING_CONFIRMDELETE_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_HIDEOFFLINE, db_get_b(NULL, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_HIDEEMPTYGROUPS, db_get_b(NULL, "CList", "HideEmptyGroups", SETTING_HIDEEMPTYGROUPS_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_DISABLEGROUPS, db_get_b(NULL, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT) ? BST_UNCHECKED : BST_CHECKED);
+ CheckDlgButton(hwndDlg, IDC_CONFIRMDELETE, db_get_b(NULL, "CList", "ConfirmDelete", SETTING_CONFIRMDELETE_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg,IDC_GAMMACORRECT,db_get_b(NULL,"CLC","GammaCorrect",CLCDEFAULT_GAMMACORRECT)?BST_CHECKED:BST_UNCHECKED);
- CheckDlgButton(hwndDlg,IDC_HILIGHTMODE,db_get_b(NULL,"CLC","HiLightMode",SETTING_HILIGHTMODE_DEFAULT) == 0?BST_CHECKED:BST_UNCHECKED);
- CheckDlgButton(hwndDlg,IDC_HILIGHTMODE1,db_get_b(NULL,"CLC","HiLightMode",SETTING_HILIGHTMODE_DEFAULT) == 1?BST_CHECKED:BST_UNCHECKED);
- CheckDlgButton(hwndDlg,IDC_HILIGHTMODE2,db_get_b(NULL,"CLC","HiLightMode",SETTING_HILIGHTMODE_DEFAULT) == 2?BST_CHECKED:BST_UNCHECKED);
- CheckDlgButton(hwndDlg,IDC_HILIGHTMODE3,db_get_b(NULL,"CLC","HiLightMode",SETTING_HILIGHTMODE_DEFAULT) == 3?BST_CHECKED:BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_GAMMACORRECT, db_get_b(NULL, "CLC", "GammaCorrect", CLCDEFAULT_GAMMACORRECT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_HILIGHTMODE, db_get_b(NULL, "CLC", "HiLightMode", SETTING_HILIGHTMODE_DEFAULT) == 0 ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_HILIGHTMODE1, db_get_b(NULL, "CLC", "HiLightMode", SETTING_HILIGHTMODE_DEFAULT) == 1 ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_HILIGHTMODE2, db_get_b(NULL, "CLC", "HiLightMode", SETTING_HILIGHTMODE_DEFAULT) == 2 ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_HILIGHTMODE3, db_get_b(NULL, "CLC", "HiLightMode", SETTING_HILIGHTMODE_DEFAULT) == 3 ? BST_CHECKED : BST_UNCHECKED);
{
int i, item;
int s1, s2, s3;
- for (i=0; i < SIZEOF(sortby); i++)
- {
- item = SendDlgItemMessage(hwndDlg,IDC_CLSORT1,CB_ADDSTRING, 0, (LPARAM)TranslateTS(sortby[i]));
- SendDlgItemMessage(hwndDlg,IDC_CLSORT1,CB_SETITEMDATA,item,0);
- item = SendDlgItemMessage(hwndDlg,IDC_CLSORT2,CB_ADDSTRING, 0, (LPARAM)TranslateTS(sortby[i]));
- SendDlgItemMessage(hwndDlg,IDC_CLSORT2,CB_SETITEMDATA,item,0);
- item = SendDlgItemMessage(hwndDlg,IDC_CLSORT3,CB_ADDSTRING, 0, (LPARAM)TranslateTS(sortby[i]));
- SendDlgItemMessage(hwndDlg,IDC_CLSORT3,CB_SETITEMDATA,item,0);
+ for (i = 0; i < SIZEOF(sortby); i++) {
+ item = SendDlgItemMessage(hwndDlg, IDC_CLSORT1, CB_ADDSTRING, 0, (LPARAM)TranslateTS(sortby[i]));
+ SendDlgItemMessage(hwndDlg, IDC_CLSORT1, CB_SETITEMDATA, item, 0);
+ item = SendDlgItemMessage(hwndDlg, IDC_CLSORT2, CB_ADDSTRING, 0, (LPARAM)TranslateTS(sortby[i]));
+ SendDlgItemMessage(hwndDlg, IDC_CLSORT2, CB_SETITEMDATA, item, 0);
+ item = SendDlgItemMessage(hwndDlg, IDC_CLSORT3, CB_ADDSTRING, 0, (LPARAM)TranslateTS(sortby[i]));
+ SendDlgItemMessage(hwndDlg, IDC_CLSORT3, CB_SETITEMDATA, item, 0);
}
- s1 = db_get_b(NULL,"CList","SortBy1",SETTING_SORTBY1_DEFAULT);
- s2 = db_get_b(NULL,"CList","SortBy2",SETTING_SORTBY2_DEFAULT);
- s3 = db_get_b(NULL,"CList","SortBy3",SETTING_SORTBY3_DEFAULT);
+ s1 = db_get_b(NULL, "CList", "SortBy1", SETTING_SORTBY1_DEFAULT);
+ s2 = db_get_b(NULL, "CList", "SortBy2", SETTING_SORTBY2_DEFAULT);
+ s3 = db_get_b(NULL, "CList", "SortBy3", SETTING_SORTBY3_DEFAULT);
- for (i=0; i < SIZEOF(sortby); i++)
- {
+ for (i = 0; i < SIZEOF(sortby); i++) {
if (s1 == sortbyValue[i])
- SendDlgItemMessage(hwndDlg,IDC_CLSORT1,CB_SETCURSEL,i,0);
+ SendDlgItemMessage(hwndDlg, IDC_CLSORT1, CB_SETCURSEL, i, 0);
if (s2 == sortbyValue[i])
- SendDlgItemMessage(hwndDlg,IDC_CLSORT2,CB_SETCURSEL,i,0);
+ SendDlgItemMessage(hwndDlg, IDC_CLSORT2, CB_SETCURSEL, i, 0);
if (s3 == sortbyValue[i])
- SendDlgItemMessage(hwndDlg,IDC_CLSORT3,CB_SETCURSEL,i,0);
+ SendDlgItemMessage(hwndDlg, IDC_CLSORT3, CB_SETCURSEL, i, 0);
}
- CheckDlgButton(hwndDlg, IDC_NOOFFLINEMOVE, db_get_b(NULL,"CList","NoOfflineBottom",SETTING_NOOFFLINEBOTTOM_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_OFFLINETOROOT, db_get_b(NULL,"CList","PlaceOfflineToRoot",SETTING_PLACEOFFLINETOROOT_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_NOOFFLINEMOVE, db_get_b(NULL, "CList", "NoOfflineBottom", SETTING_NOOFFLINEBOTTOM_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_OFFLINETOROOT, db_get_b(NULL, "CList", "PlaceOfflineToRoot", SETTING_PLACEOFFLINETOROOT_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
}
return TRUE;
@@ -780,33 +711,33 @@ static INT_PTR CALLBACK DlgProcClistOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
case 0:
switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
- db_set_b(NULL,"CList","HideOffline",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_HIDEOFFLINE));
- db_set_b(NULL,"CList","HideEmptyGroups",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_HIDEEMPTYGROUPS));
- db_set_b(NULL,"CList","UseGroups",(BYTE)!IsDlgButtonChecked(hwndDlg,IDC_DISABLEGROUPS));
- db_set_b(NULL,"CList","ConfirmDelete",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_CONFIRMDELETE));
+ db_set_b(NULL, "CList", "HideOffline", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_HIDEOFFLINE));
+ db_set_b(NULL, "CList", "HideEmptyGroups", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_HIDEEMPTYGROUPS));
+ db_set_b(NULL, "CList", "UseGroups", (BYTE)!IsDlgButtonChecked(hwndDlg, IDC_DISABLEGROUPS));
+ db_set_b(NULL, "CList", "ConfirmDelete", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_CONFIRMDELETE));
- db_set_b(NULL,"CLC","GammaCorrect",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_GAMMACORRECT));
+ db_set_b(NULL, "CLC", "GammaCorrect", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_GAMMACORRECT));
int hil = 0;
- if (IsDlgButtonChecked(hwndDlg,IDC_HILIGHTMODE1)) hil = 1;
- if (IsDlgButtonChecked(hwndDlg,IDC_HILIGHTMODE2)) hil = 2;
- if (IsDlgButtonChecked(hwndDlg,IDC_HILIGHTMODE3)) hil = 3;
- db_set_b(NULL,"CLC","HiLightMode",(BYTE)hil);
-
- int s1 = SendDlgItemMessage(hwndDlg,IDC_CLSORT1,CB_GETCURSEL, 0, 0);
- int s2 = SendDlgItemMessage(hwndDlg,IDC_CLSORT2,CB_GETCURSEL, 0, 0);
- int s3 = SendDlgItemMessage(hwndDlg,IDC_CLSORT3,CB_GETCURSEL, 0, 0);
+ if (IsDlgButtonChecked(hwndDlg, IDC_HILIGHTMODE1)) hil = 1;
+ if (IsDlgButtonChecked(hwndDlg, IDC_HILIGHTMODE2)) hil = 2;
+ if (IsDlgButtonChecked(hwndDlg, IDC_HILIGHTMODE3)) hil = 3;
+ db_set_b(NULL, "CLC", "HiLightMode", (BYTE)hil);
+
+ int s1 = SendDlgItemMessage(hwndDlg, IDC_CLSORT1, CB_GETCURSEL, 0, 0);
+ int s2 = SendDlgItemMessage(hwndDlg, IDC_CLSORT2, CB_GETCURSEL, 0, 0);
+ int s3 = SendDlgItemMessage(hwndDlg, IDC_CLSORT3, CB_GETCURSEL, 0, 0);
if (s1 >= 0) s1 = sortbyValue[s1];
if (s2 >= 0) s2 = sortbyValue[s2];
if (s3 >= 0) s3 = sortbyValue[s3];
- db_set_b(NULL,"CList","SortBy1",(BYTE)s1);
- db_set_b(NULL,"CList","SortBy2",(BYTE)s2);
- db_set_b(NULL,"CList","SortBy3",(BYTE)s3);
+ db_set_b(NULL, "CList", "SortBy1", (BYTE)s1);
+ db_set_b(NULL, "CList", "SortBy2", (BYTE)s2);
+ db_set_b(NULL, "CList", "SortBy3", (BYTE)s3);
- db_set_b(NULL,"CList","NoOfflineBottom",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_NOOFFLINEMOVE));
- db_set_b(NULL,"CList","PlaceOfflineToRoot",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_OFFLINETOROOT));
+ db_set_b(NULL, "CList", "NoOfflineBottom", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_NOOFFLINEMOVE));
+ db_set_b(NULL, "CList", "PlaceOfflineToRoot", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_OFFLINETOROOT));
pcli->pfnLoadContactTree(); /* this won't do job properly since it only really works when changes happen */
- SendMessage(pcli->hwndContactTree,CLM_AUTOREBUILD, 0, 0); /* force reshuffle */
+ SendMessage(pcli->hwndContactTree, CLM_AUTOREBUILD, 0, 0); /* force reshuffle */
ClcOptionsChanged(); // Used to force loading avatar an list height related options
return TRUE;
}
@@ -817,108 +748,106 @@ static INT_PTR CALLBACK DlgProcClistOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
return FALSE;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
static INT_PTR CALLBACK DlgProcTrayOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch (msg) {
case WM_INITDIALOG:
+ TranslateDialogDefault(hwndDlg);
{
- TranslateDialogDefault(hwndDlg);
- CheckDlgButton(hwndDlg, IDC_NOOFFLINEMOVE, db_get_b( NULL,"CList", "NoOfflineBottom", SETTING_NOOFFLINEBOTTOM_DEFAULT ) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_OFFLINETOROOT, db_get_b( NULL,"CList", "PlaceOfflineToRoot", SETTING_PLACEOFFLINETOROOT_DEFAULT ) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_ONECLK, db_get_b( NULL,"CList", "Tray1Click", SETTING_TRAY1CLICK_DEFAULT ) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_NOOFFLINEMOVE, db_get_b(NULL, "CList", "NoOfflineBottom", SETTING_NOOFFLINEBOTTOM_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_OFFLINETOROOT, db_get_b(NULL, "CList", "PlaceOfflineToRoot", SETTING_PLACEOFFLINETOROOT_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_ONECLK, db_get_b(NULL, "CList", "Tray1Click", SETTING_TRAY1CLICK_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
{
- BYTE trayOption = db_get_b(NULL,"CLUI","XStatusTray",SETTING_TRAYOPTION_DEFAULT);
- CheckDlgButton(hwndDlg, IDC_SHOWXSTATUS, (trayOption&3) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SHOWNORMAL, (trayOption&2) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_TRANSPARENTOVERLAY, (trayOption&4) ? BST_CHECKED : BST_UNCHECKED);
+ BYTE trayOption = db_get_b(NULL, "CLUI", "XStatusTray", SETTING_TRAYOPTION_DEFAULT);
+ CheckDlgButton(hwndDlg, IDC_SHOWXSTATUS, (trayOption & 3) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_SHOWNORMAL, (trayOption & 2) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_TRANSPARENTOVERLAY, (trayOption & 4) ? BST_CHECKED : BST_UNCHECKED);
- EnableWindow(GetDlgItem(hwndDlg,IDC_SHOWNORMAL),IsDlgButtonChecked(hwndDlg,IDC_SHOWXSTATUS));
- EnableWindow(GetDlgItem(hwndDlg,IDC_TRANSPARENTOVERLAY),IsDlgButtonChecked(hwndDlg,IDC_SHOWXSTATUS) && IsDlgButtonChecked(hwndDlg,IDC_SHOWNORMAL));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_SHOWNORMAL), IsDlgButtonChecked(hwndDlg, IDC_SHOWXSTATUS));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_TRANSPARENTOVERLAY), IsDlgButtonChecked(hwndDlg, IDC_SHOWXSTATUS) && IsDlgButtonChecked(hwndDlg, IDC_SHOWNORMAL));
}
- CheckDlgButton(hwndDlg, IDC_ALWAYSSTATUS, db_get_b(NULL,"CList","AlwaysStatus",SETTING_ALWAYSSTATUS_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
-
- CheckDlgButton(hwndDlg, IDC_ALWAYSPRIMARY, !db_get_b(NULL,"CList","AlwaysPrimary",SETTING_ALWAYSPRIMARY_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
-
- CheckDlgButton(hwndDlg, IDC_ALWAYSMULTI, !db_get_b(NULL,"CList","AlwaysMulti",SETTING_ALWAYSMULTI_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_DONTCYCLE, db_get_b(NULL,"CList","TrayIcon",SETTING_TRAYICON_DEFAULT) == SETTING_TRAYICON_SINGLE ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_CYCLE, db_get_b(NULL,"CList","TrayIcon",SETTING_TRAYICON_DEFAULT) == SETTING_TRAYICON_CYCLE ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_MULTITRAY, db_get_b(NULL,"CList","TrayIcon",SETTING_TRAYICON_DEFAULT) == SETTING_TRAYICON_MULTI ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_DISABLEBLINK, db_get_b(NULL,"CList","DisableTrayFlash",SETTING_DISABLETRAYFLASH_DEFAULT) == 1 ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SHOW_AVATARS, db_get_b(NULL,"CList","AvatarsShow",SETTINGS_SHOWAVATARS_DEFAULT) == 1 ? BST_CHECKED : BST_UNCHECKED );
- CheckDlgButton(hwndDlg, IDC_SHOW_ANIAVATARS, db_get_b(NULL,"CList","AvatarsAnimated", ServiceExists(MS_AV_GETAVATARBITMAP)) == 1 ? BST_CHECKED : BST_UNCHECKED );
-
- if (IsDlgButtonChecked(hwndDlg,IDC_DONTCYCLE)) {
- EnableWindow(GetDlgItem(hwndDlg,IDC_CYCLETIMESPIN),FALSE);
- EnableWindow(GetDlgItem(hwndDlg,IDC_CYCLETIME),FALSE);
- EnableWindow(GetDlgItem(hwndDlg,IDC_ALWAYSMULTI),FALSE);
+ CheckDlgButton(hwndDlg, IDC_ALWAYSSTATUS, db_get_b(NULL, "CList", "AlwaysStatus", SETTING_ALWAYSSTATUS_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+
+ CheckDlgButton(hwndDlg, IDC_ALWAYSPRIMARY, !db_get_b(NULL, "CList", "AlwaysPrimary", SETTING_ALWAYSPRIMARY_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+
+ CheckDlgButton(hwndDlg, IDC_ALWAYSMULTI, !db_get_b(NULL, "CList", "AlwaysMulti", SETTING_ALWAYSMULTI_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_DONTCYCLE, db_get_b(NULL, "CList", "TrayIcon", SETTING_TRAYICON_DEFAULT) == SETTING_TRAYICON_SINGLE ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_CYCLE, db_get_b(NULL, "CList", "TrayIcon", SETTING_TRAYICON_DEFAULT) == SETTING_TRAYICON_CYCLE ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_MULTITRAY, db_get_b(NULL, "CList", "TrayIcon", SETTING_TRAYICON_DEFAULT) == SETTING_TRAYICON_MULTI ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_DISABLEBLINK, db_get_b(NULL, "CList", "DisableTrayFlash", SETTING_DISABLETRAYFLASH_DEFAULT) == 1 ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_SHOW_AVATARS, db_get_b(NULL, "CList", "AvatarsShow", SETTINGS_SHOWAVATARS_DEFAULT) == 1 ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_SHOW_ANIAVATARS, db_get_b(NULL, "CList", "AvatarsAnimated", ServiceExists(MS_AV_GETAVATARBITMAP)) == 1 ? BST_CHECKED : BST_UNCHECKED);
+
+ if (IsDlgButtonChecked(hwndDlg, IDC_DONTCYCLE)) {
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CYCLETIMESPIN), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CYCLETIME), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_ALWAYSMULTI), FALSE);
}
- if (IsDlgButtonChecked(hwndDlg,IDC_CYCLE)) {
- EnableWindow(GetDlgItem(hwndDlg,IDC_PRIMARYSTATUS),FALSE);
- EnableWindow(GetDlgItem(hwndDlg,IDC_ALWAYSMULTI),FALSE);
- EnableWindow(GetDlgItem(hwndDlg,IDC_ALWAYSPRIMARY),FALSE);
+ if (IsDlgButtonChecked(hwndDlg, IDC_CYCLE)) {
+ EnableWindow(GetDlgItem(hwndDlg, IDC_PRIMARYSTATUS), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_ALWAYSMULTI), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_ALWAYSPRIMARY), FALSE);
}
- if (IsDlgButtonChecked(hwndDlg,IDC_MULTITRAY)) {
- EnableWindow(GetDlgItem(hwndDlg,IDC_CYCLETIMESPIN),FALSE);
- EnableWindow(GetDlgItem(hwndDlg,IDC_CYCLETIME),FALSE);
- EnableWindow(GetDlgItem(hwndDlg,IDC_PRIMARYSTATUS),FALSE);
- EnableWindow(GetDlgItem(hwndDlg,IDC_ALWAYSPRIMARY),FALSE);
+ if (IsDlgButtonChecked(hwndDlg, IDC_MULTITRAY)) {
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CYCLETIMESPIN), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CYCLETIME), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_PRIMARYSTATUS), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_ALWAYSPRIMARY), FALSE);
}
- SendDlgItemMessage(hwndDlg,IDC_CYCLETIMESPIN,UDM_SETRANGE, 0, MAKELONG(120, 1));
- SendDlgItemMessage(hwndDlg,IDC_CYCLETIMESPIN,UDM_SETPOS, 0, MAKELONG(db_get_w(NULL,"CList","CycleTime",SETTING_CYCLETIME_DEFAULT),0));
+ SendDlgItemMessage(hwndDlg, IDC_CYCLETIMESPIN, UDM_SETRANGE, 0, MAKELONG(120, 1));
+ SendDlgItemMessage(hwndDlg, IDC_CYCLETIMESPIN, UDM_SETPOS, 0, MAKELONG(db_get_w(NULL, "CList", "CycleTime", SETTING_CYCLETIME_DEFAULT), 0));
{
- int i,count,item;
+ int i, count, item;
PROTOACCOUNT **accs;
- DBVARIANT dbv = {DBVT_DELETED};
- db_get(NULL,"CList","PrimaryStatus",&dbv);
- ProtoEnumAccounts( &count, &accs );
- item = SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_ADDSTRING, 0, (LPARAM)TranslateT("Global"));
- SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_SETITEMDATA,item,0);
- for (i=0; i < count; i++) {
- if ( !IsAccountEnabled( accs[i] ) || CallProtoService(accs[i]->szModuleName,PS_GETCAPS,PFLAGNUM_2,0) == 0)
+ DBVARIANT dbv = { DBVT_DELETED };
+ db_get(NULL, "CList", "PrimaryStatus", &dbv);
+ ProtoEnumAccounts(&count, &accs);
+ item = SendDlgItemMessage(hwndDlg, IDC_PRIMARYSTATUS, CB_ADDSTRING, 0, (LPARAM)TranslateT("Global"));
+ SendDlgItemMessage(hwndDlg, IDC_PRIMARYSTATUS, CB_SETITEMDATA, item, 0);
+ for (i = 0; i < count; i++) {
+ if (!IsAccountEnabled(accs[i]) || CallProtoService(accs[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0) == 0)
continue;
- item = SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_ADDSTRING, 0, (LPARAM)accs[i]->tszAccountName);
- SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_SETITEMDATA,item,(LPARAM)accs[i]);
- if ((dbv.type == DBVT_ASCIIZ || dbv.type == DBVT_UTF8) && !strcmp(dbv.pszVal,accs[i]->szModuleName))
- SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_SETCURSEL,item,0);
+ item = SendDlgItemMessage(hwndDlg, IDC_PRIMARYSTATUS, CB_ADDSTRING, 0, (LPARAM)accs[i]->tszAccountName);
+ SendDlgItemMessage(hwndDlg, IDC_PRIMARYSTATUS, CB_SETITEMDATA, item, (LPARAM)accs[i]);
+ if ((dbv.type == DBVT_ASCIIZ || dbv.type == DBVT_UTF8) && !strcmp(dbv.pszVal, accs[i]->szModuleName))
+ SendDlgItemMessage(hwndDlg, IDC_PRIMARYSTATUS, CB_SETCURSEL, item, 0);
}
db_free(&dbv);
}
- if (-1 == (int)SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_GETCURSEL, 0, 0))
- SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_SETCURSEL, 0, 0);
- SendDlgItemMessage(hwndDlg,IDC_BLINKSPIN,UDM_SETBUDDY,(WPARAM)GetDlgItem(hwndDlg,IDC_BLINKTIME),0); // set buddy
- SendDlgItemMessage(hwndDlg,IDC_BLINKSPIN,UDM_SETRANGE, 0, MAKELONG(0x3FFF,250));
- SendDlgItemMessage(hwndDlg,IDC_BLINKSPIN,UDM_SETPOS, 0, MAKELONG(db_get_w(NULL,"CList","IconFlashTime",SETTING_ICONFLASHTIME_DEFAULT),0));
- {
- int i = _GetNetVisibleProtoCount();
- if (i < 2)
- {
- EnableWindow(GetDlgItem(hwndDlg,IDC_PRIMARYSTATUS),TRUE);
- EnableWindow(GetDlgItem(hwndDlg,IDC_CYCLETIMESPIN),FALSE);
- EnableWindow(GetDlgItem(hwndDlg,IDC_CYCLETIME),FALSE);
- EnableWindow(GetDlgItem(hwndDlg,IDC_ALWAYSPRIMARY),FALSE);
- EnableWindow(GetDlgItem(hwndDlg,IDC_ALWAYSPRIMARY),FALSE);
- EnableWindow(GetDlgItem(hwndDlg,IDC_CYCLE),FALSE);
- EnableWindow(GetDlgItem(hwndDlg,IDC_MULTITRAY),FALSE);
- CheckDlgButton(hwndDlg,IDC_DONTCYCLE,TRUE);
- }
+ if (-1 == (int)SendDlgItemMessage(hwndDlg, IDC_PRIMARYSTATUS, CB_GETCURSEL, 0, 0))
+ SendDlgItemMessage(hwndDlg, IDC_PRIMARYSTATUS, CB_SETCURSEL, 0, 0);
+ SendDlgItemMessage(hwndDlg, IDC_BLINKSPIN, UDM_SETBUDDY, (WPARAM)GetDlgItem(hwndDlg, IDC_BLINKTIME), 0); // set buddy
+ SendDlgItemMessage(hwndDlg, IDC_BLINKSPIN, UDM_SETRANGE, 0, MAKELONG(0x3FFF, 250));
+ SendDlgItemMessage(hwndDlg, IDC_BLINKSPIN, UDM_SETPOS, 0, MAKELONG(db_get_w(NULL, "CList", "IconFlashTime", SETTING_ICONFLASHTIME_DEFAULT), 0));
+
+ int i = _GetNetVisibleProtoCount();
+ if (i < 2) {
+ EnableWindow(GetDlgItem(hwndDlg, IDC_PRIMARYSTATUS), TRUE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CYCLETIMESPIN), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CYCLETIME), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_ALWAYSPRIMARY), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_ALWAYSPRIMARY), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CYCLE), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_MULTITRAY), FALSE);
+ CheckDlgButton(hwndDlg, IDC_DONTCYCLE, TRUE);
}
}
return TRUE;
case WM_COMMAND:
- if (LOWORD(wParam) == IDC_SHOWXSTATUS || LOWORD(wParam) == IDC_SHOWNORMAL)
- {
- EnableWindow(GetDlgItem(hwndDlg,IDC_SHOWNORMAL),IsDlgButtonChecked(hwndDlg,IDC_SHOWXSTATUS));
- EnableWindow(GetDlgItem(hwndDlg,IDC_TRANSPARENTOVERLAY),IsDlgButtonChecked(hwndDlg,IDC_SHOWXSTATUS) && IsDlgButtonChecked(hwndDlg,IDC_SHOWNORMAL));
+ if (LOWORD(wParam) == IDC_SHOWXSTATUS || LOWORD(wParam) == IDC_SHOWNORMAL) {
+ EnableWindow(GetDlgItem(hwndDlg, IDC_SHOWNORMAL), IsDlgButtonChecked(hwndDlg, IDC_SHOWXSTATUS));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_TRANSPARENTOVERLAY), IsDlgButtonChecked(hwndDlg, IDC_SHOWXSTATUS) && IsDlgButtonChecked(hwndDlg, IDC_SHOWNORMAL));
}
- if (LOWORD(wParam) == IDC_DONTCYCLE || LOWORD(wParam) == IDC_CYCLE || LOWORD(wParam) == IDC_MULTITRAY)
- {
- EnableWindow(GetDlgItem(hwndDlg,IDC_PRIMARYSTATUS),IsDlgButtonChecked(hwndDlg,IDC_DONTCYCLE));
- EnableWindow(GetDlgItem(hwndDlg,IDC_CYCLETIME),IsDlgButtonChecked(hwndDlg,IDC_CYCLE));
- EnableWindow(GetDlgItem(hwndDlg,IDC_CYCLETIMESPIN),IsDlgButtonChecked(hwndDlg,IDC_CYCLE));
- EnableWindow(GetDlgItem(hwndDlg,IDC_ALWAYSMULTI),IsDlgButtonChecked(hwndDlg,IDC_MULTITRAY));
- EnableWindow(GetDlgItem(hwndDlg,IDC_ALWAYSPRIMARY),IsDlgButtonChecked(hwndDlg,IDC_DONTCYCLE));
+ if (LOWORD(wParam) == IDC_DONTCYCLE || LOWORD(wParam) == IDC_CYCLE || LOWORD(wParam) == IDC_MULTITRAY) {
+ EnableWindow(GetDlgItem(hwndDlg, IDC_PRIMARYSTATUS), IsDlgButtonChecked(hwndDlg, IDC_DONTCYCLE));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CYCLETIME), IsDlgButtonChecked(hwndDlg, IDC_CYCLE));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CYCLETIMESPIN), IsDlgButtonChecked(hwndDlg, IDC_CYCLE));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_ALWAYSMULTI), IsDlgButtonChecked(hwndDlg, IDC_MULTITRAY));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_ALWAYSPRIMARY), IsDlgButtonChecked(hwndDlg, IDC_DONTCYCLE));
}
if (LOWORD(wParam) == IDC_PRIMARYSTATUS && HIWORD(wParam) != CBN_SELCHANGE) break;
if (LOWORD(wParam) == IDC_BLINKTIME && (HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus())) return 0; // dont make apply enabled during buddy set crap
@@ -930,50 +859,50 @@ static INT_PTR CALLBACK DlgProcTrayOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
case 0:
switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
- db_set_b(NULL,"CList","Tray1Click",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_ONECLK));
- db_set_b(NULL,"CList","AlwaysStatus",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_ALWAYSSTATUS));
+ db_set_b(NULL, "CList", "Tray1Click", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_ONECLK));
+ db_set_b(NULL, "CList", "AlwaysStatus", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_ALWAYSSTATUS));
- db_set_b(NULL,"CList","AlwaysMulti",(BYTE)!IsDlgButtonChecked(hwndDlg,IDC_ALWAYSMULTI));
- db_set_b(NULL,"CList","AlwaysPrimary",(BYTE)!IsDlgButtonChecked(hwndDlg,IDC_ALWAYSPRIMARY));
+ db_set_b(NULL, "CList", "AlwaysMulti", (BYTE)!IsDlgButtonChecked(hwndDlg, IDC_ALWAYSMULTI));
+ db_set_b(NULL, "CList", "AlwaysPrimary", (BYTE)!IsDlgButtonChecked(hwndDlg, IDC_ALWAYSPRIMARY));
- db_set_w(NULL,"CList","CycleTime",(WORD)SendDlgItemMessage(hwndDlg,IDC_CYCLETIMESPIN,UDM_GETPOS, 0, 0));
- db_set_w(NULL,"CList","IconFlashTime",(WORD)SendDlgItemMessage(hwndDlg,IDC_BLINKSPIN,UDM_GETPOS, 0, 0));
- db_set_b(NULL,"CList","DisableTrayFlash",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_DISABLEBLINK));
+ db_set_w(NULL, "CList", "CycleTime", (WORD)SendDlgItemMessage(hwndDlg, IDC_CYCLETIMESPIN, UDM_GETPOS, 0, 0));
+ db_set_w(NULL, "CList", "IconFlashTime", (WORD)SendDlgItemMessage(hwndDlg, IDC_BLINKSPIN, UDM_GETPOS, 0, 0));
+ db_set_b(NULL, "CList", "DisableTrayFlash", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_DISABLEBLINK));
- if (_GetNetVisibleProtoCount()>1)
- db_set_b(NULL,"CList","TrayIcon",(BYTE)(IsDlgButtonChecked(hwndDlg,IDC_DONTCYCLE)?SETTING_TRAYICON_SINGLE:(IsDlgButtonChecked(hwndDlg,IDC_CYCLE)?SETTING_TRAYICON_CYCLE:SETTING_TRAYICON_MULTI)));
+ if (_GetNetVisibleProtoCount() > 1)
+ db_set_b(NULL, "CList", "TrayIcon", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_DONTCYCLE) ? SETTING_TRAYICON_SINGLE : (IsDlgButtonChecked(hwndDlg, IDC_CYCLE) ? SETTING_TRAYICON_CYCLE : SETTING_TRAYICON_MULTI)));
+
+ BYTE xOptions = 0;
+ xOptions = IsDlgButtonChecked(hwndDlg, IDC_SHOWXSTATUS) ? 1 : 0;
+ xOptions |= (xOptions && IsDlgButtonChecked(hwndDlg, IDC_SHOWNORMAL)) ? 2 : 0;
+ xOptions |= (xOptions && IsDlgButtonChecked(hwndDlg, IDC_TRANSPARENTOVERLAY)) ? 4 : 0;
+ db_set_b(NULL, "CLUI", "XStatusTray", xOptions);
+
+ int cursel = SendDlgItemMessage(hwndDlg, IDC_PRIMARYSTATUS, CB_GETCURSEL, 0, 0);
+ PROTOACCOUNT* pa = (PROTOACCOUNT*)SendDlgItemMessage(hwndDlg, IDC_PRIMARYSTATUS, CB_GETITEMDATA, cursel, 0);
+ if (!pa)
+ db_unset(NULL, "CList", "PrimaryStatus");
+ else
+ db_set_s(NULL, "CList", "PrimaryStatus", pa->szModuleName);
- {
- BYTE xOptions = 0;
- xOptions = IsDlgButtonChecked(hwndDlg,IDC_SHOWXSTATUS)?1:0;
- xOptions |= (xOptions && IsDlgButtonChecked(hwndDlg,IDC_SHOWNORMAL))?2:0;
- xOptions |= (xOptions && IsDlgButtonChecked(hwndDlg,IDC_TRANSPARENTOVERLAY))?4:0;
- db_set_b(NULL,"CLUI","XStatusTray",xOptions);
-
- int cursel = SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_GETCURSEL, 0, 0);
- PROTOACCOUNT* pa = (PROTOACCOUNT*)SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_GETITEMDATA,cursel,0);
- if ( !pa )
- db_unset(NULL, "CList","PrimaryStatus");
- else
- db_set_s(NULL,"CList","PrimaryStatus", pa->szModuleName);
- }
pcli->pfnTrayIconIconsChanged();
pcli->pfnLoadContactTree(); /* this won't do job properly since it only really works when changes happen */
- SendMessage(pcli->hwndContactTree,CLM_AUTOREBUILD, 0, 0); /* force reshuffle */
+ SendMessage(pcli->hwndContactTree, CLM_AUTOREBUILD, 0, 0); /* force reshuffle */
ClcOptionsChanged(); // Used to force loading avatar an list height related options
return TRUE;
}
- break;
}
break;
}
return FALSE;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
void ClcOptionsChanged(void)
{
- pcli->pfnClcBroadcast( INTM_RELOADOPTIONS, 0, 0);
- pcli->pfnClcBroadcast( INTM_INVALIDATE, 0, 0);
+ pcli->pfnClcBroadcast(INTM_RELOADOPTIONS, 0, 0);
+ pcli->pfnClcBroadcast(INTM_INVALIDATE, 0, 0);
}
HWND g_hCLUIOptionsWnd = NULL;
@@ -983,110 +912,108 @@ static INT_PTR CALLBACK DlgProcClistBehaviourOpts(HWND hwndDlg, UINT msg, WPARAM
switch (msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- CheckDlgButton(hwndDlg, IDC_CLIENTDRAG, db_get_b(NULL,"CLUI","ClientAreaDrag",SETTING_CLIENTDRAG_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_DRAGTOSCROLL, ( db_get_b(NULL,"CLUI","DragToScroll",SETTING_DRAGTOSCROLL_DEFAULT) && !db_get_b(NULL,"CLUI","ClientAreaDrag",SETTING_CLIENTDRAG_DEFAULT)) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_CLIENTDRAG, db_get_b(NULL, "CLUI", "ClientAreaDrag", SETTING_CLIENTDRAG_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_DRAGTOSCROLL, (db_get_b(NULL, "CLUI", "DragToScroll", SETTING_DRAGTOSCROLL_DEFAULT) && !db_get_b(NULL, "CLUI", "ClientAreaDrag", SETTING_CLIENTDRAG_DEFAULT)) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_AUTOSIZE, g_CluiData.fAutoSize ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_LOCKSIZING, db_get_b(NULL,"CLUI","LockSize",SETTING_LOCKSIZE_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_BRINGTOFRONT, db_get_b(NULL,"CList","BringToFront",SETTING_BRINGTOFRONT_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
-
- SendDlgItemMessage(hwndDlg,IDC_MAXSIZESPIN,UDM_SETRANGE, 0, MAKELONG(100, 0));
- SendDlgItemMessage(hwndDlg,IDC_MAXSIZESPIN,UDM_SETPOS, 0, db_get_b(NULL,"CLUI","MaxSizeHeight",SETTING_MAXSIZEHEIGHT_DEFAULT));
- SendDlgItemMessage(hwndDlg,IDC_MINSIZESPIN,UDM_SETRANGE, 0, MAKELONG(100, 0));
- SendDlgItemMessage(hwndDlg,IDC_MINSIZESPIN,UDM_SETPOS, 0, db_get_b(NULL,"CLUI","MinSizeHeight",SETTING_MINSIZEHEIGHT_DEFAULT));
- CheckDlgButton(hwndDlg, IDC_AUTOSIZEUPWARD, db_get_b(NULL,"CLUI","AutoSizeUpward",SETTING_AUTOSIZEUPWARD_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SNAPTOEDGES, db_get_b(NULL,"CLUI","SnapToEdges",SETTING_SNAPTOEDGES_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_DOCKTOSIDES, db_get_b(NULL,"CLUI","DockToSides",SETTING_DOCKTOSIDES_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
-
- CheckDlgButton(hwndDlg, IDC_EVENTAREA_NONE, db_get_b(NULL,"CLUI","EventArea",SETTING_EVENTAREAMODE_DEFAULT) == 0 ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_EVENTAREA, db_get_b(NULL,"CLUI","EventArea",SETTING_EVENTAREAMODE_DEFAULT) == 1 ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_EVENTAREA_ALWAYS, db_get_b(NULL,"CLUI","EventArea",SETTING_EVENTAREAMODE_DEFAULT) == 2 ? BST_CHECKED : BST_UNCHECKED);
-
- CheckDlgButton(hwndDlg, IDC_AUTOHIDE, db_get_b(NULL,"CList","AutoHide",SETTING_AUTOHIDE_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN,UDM_SETRANGE, 0, MAKELONG(900, 1));
- SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN,UDM_SETPOS, 0, MAKELONG(db_get_w(NULL,"CList","HideTime",SETTING_HIDETIME_DEFAULT),0));
- EnableWindow(GetDlgItem(hwndDlg,IDC_HIDETIME),IsDlgButtonChecked(hwndDlg,IDC_AUTOHIDE));
- EnableWindow(GetDlgItem(hwndDlg,IDC_HIDETIMESPIN),IsDlgButtonChecked(hwndDlg,IDC_AUTOHIDE));
- EnableWindow(GetDlgItem(hwndDlg,IDC_STATIC01),IsDlgButtonChecked(hwndDlg,IDC_AUTOHIDE));
+ CheckDlgButton(hwndDlg, IDC_LOCKSIZING, db_get_b(NULL, "CLUI", "LockSize", SETTING_LOCKSIZE_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_BRINGTOFRONT, db_get_b(NULL, "CList", "BringToFront", SETTING_BRINGTOFRONT_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+
+ SendDlgItemMessage(hwndDlg, IDC_MAXSIZESPIN, UDM_SETRANGE, 0, MAKELONG(100, 0));
+ SendDlgItemMessage(hwndDlg, IDC_MAXSIZESPIN, UDM_SETPOS, 0, db_get_b(NULL, "CLUI", "MaxSizeHeight", SETTING_MAXSIZEHEIGHT_DEFAULT));
+ SendDlgItemMessage(hwndDlg, IDC_MINSIZESPIN, UDM_SETRANGE, 0, MAKELONG(100, 0));
+ SendDlgItemMessage(hwndDlg, IDC_MINSIZESPIN, UDM_SETPOS, 0, db_get_b(NULL, "CLUI", "MinSizeHeight", SETTING_MINSIZEHEIGHT_DEFAULT));
+ CheckDlgButton(hwndDlg, IDC_AUTOSIZEUPWARD, db_get_b(NULL, "CLUI", "AutoSizeUpward", SETTING_AUTOSIZEUPWARD_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_SNAPTOEDGES, db_get_b(NULL, "CLUI", "SnapToEdges", SETTING_SNAPTOEDGES_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_DOCKTOSIDES, db_get_b(NULL, "CLUI", "DockToSides", SETTING_DOCKTOSIDES_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+
+ CheckDlgButton(hwndDlg, IDC_EVENTAREA_NONE, db_get_b(NULL, "CLUI", "EventArea", SETTING_EVENTAREAMODE_DEFAULT) == 0 ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_EVENTAREA, db_get_b(NULL, "CLUI", "EventArea", SETTING_EVENTAREAMODE_DEFAULT) == 1 ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_EVENTAREA_ALWAYS, db_get_b(NULL, "CLUI", "EventArea", SETTING_EVENTAREAMODE_DEFAULT) == 2 ? BST_CHECKED : BST_UNCHECKED);
+
+ CheckDlgButton(hwndDlg, IDC_AUTOHIDE, db_get_b(NULL, "CList", "AutoHide", SETTING_AUTOHIDE_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN, UDM_SETRANGE, 0, MAKELONG(900, 1));
+ SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN, UDM_SETPOS, 0, MAKELONG(db_get_w(NULL, "CList", "HideTime", SETTING_HIDETIME_DEFAULT), 0));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_HIDETIME), IsDlgButtonChecked(hwndDlg, IDC_AUTOHIDE));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_HIDETIMESPIN), IsDlgButtonChecked(hwndDlg, IDC_AUTOHIDE));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC01), IsDlgButtonChecked(hwndDlg, IDC_AUTOHIDE));
{
- int i, item;
- TCHAR *hidemode[] = {TranslateT("Hide to tray"), TranslateT("Behind left edge"), TranslateT("Behind right edge")};
- for (i=0; i < SIZEOF(hidemode); i++) {
- item = SendDlgItemMessage(hwndDlg,IDC_HIDEMETHOD,CB_ADDSTRING, 0, (LPARAM)(hidemode[i]));
- SendDlgItemMessage(hwndDlg,IDC_HIDEMETHOD,CB_SETITEMDATA,item,0);
- SendDlgItemMessage(hwndDlg,IDC_HIDEMETHOD,CB_SETCURSEL,db_get_b(NULL,"ModernData","HideBehind",SETTING_HIDEBEHIND_DEFAULT),0);
+ TCHAR *hidemode[] = { TranslateT("Hide to tray"), TranslateT("Behind left edge"), TranslateT("Behind right edge") };
+ for (int i = 0; i < SIZEOF(hidemode); i++) {
+ int item = SendDlgItemMessage(hwndDlg, IDC_HIDEMETHOD, CB_ADDSTRING, 0, (LPARAM)hidemode[i]);
+ SendDlgItemMessage(hwndDlg, IDC_HIDEMETHOD, CB_SETITEMDATA, item, 0);
+ SendDlgItemMessage(hwndDlg, IDC_HIDEMETHOD, CB_SETCURSEL, db_get_b(NULL, "ModernData", "HideBehind", SETTING_HIDEBEHIND_DEFAULT), 0);
}
}
- SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN2,UDM_SETRANGE, 0, MAKELONG(600, 0));
- SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN2,UDM_SETPOS, 0, MAKELONG(db_get_w(NULL,"ModernData","ShowDelay",SETTING_SHOWDELAY_DEFAULT),0));
- SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN3,UDM_SETRANGE, 0, MAKELONG(600, 0));
- SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN3,UDM_SETPOS, 0, MAKELONG(db_get_w(NULL,"ModernData","HideDelay",SETTING_HIDEDELAY_DEFAULT),0));
- SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN4,UDM_SETRANGE, 0, MAKELONG(50, 1));
- SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN4,UDM_SETPOS, 0, MAKELONG(db_get_w(NULL,"ModernData","HideBehindBorderSize",SETTING_HIDEBEHINDBORDERSIZE_DEFAULT),0));
+ SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN2, UDM_SETRANGE, 0, MAKELONG(600, 0));
+ SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN2, UDM_SETPOS, 0, MAKELONG(db_get_w(NULL, "ModernData", "ShowDelay", SETTING_SHOWDELAY_DEFAULT), 0));
+ SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN3, UDM_SETRANGE, 0, MAKELONG(600, 0));
+ SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN3, UDM_SETPOS, 0, MAKELONG(db_get_w(NULL, "ModernData", "HideDelay", SETTING_HIDEDELAY_DEFAULT), 0));
+ SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN4, UDM_SETRANGE, 0, MAKELONG(50, 1));
+ SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN4, UDM_SETPOS, 0, MAKELONG(db_get_w(NULL, "ModernData", "HideBehindBorderSize", SETTING_HIDEBEHINDBORDERSIZE_DEFAULT), 0));
{
- int mode = SendDlgItemMessage(hwndDlg,IDC_HIDEMETHOD,CB_GETCURSEL, 0, 0);
- EnableWindow(GetDlgItem(hwndDlg,IDC_SHOWDELAY),mode != 0);
- EnableWindow(GetDlgItem(hwndDlg,IDC_HIDEDELAY),mode != 0);
- EnableWindow(GetDlgItem(hwndDlg,IDC_HIDETIMESPIN2),mode != 0);
- EnableWindow(GetDlgItem(hwndDlg,IDC_HIDETIMESPIN3),mode != 0);
- EnableWindow(GetDlgItem(hwndDlg,IDC_HIDETIMESPIN4),mode != 0);
- EnableWindow(GetDlgItem(hwndDlg,IDC_HIDEDELAY2),mode != 0);
- EnableWindow(GetDlgItem(hwndDlg,IDC_STATIC5),mode != 0);
- EnableWindow(GetDlgItem(hwndDlg,IDC_STATIC6),mode != 0);
- EnableWindow(GetDlgItem(hwndDlg,IDC_STATIC7),mode != 0);
- EnableWindow(GetDlgItem(hwndDlg,IDC_STATIC8),mode != 0);
- EnableWindow(GetDlgItem(hwndDlg,IDC_STATIC10),mode != 0);
- EnableWindow(GetDlgItem(hwndDlg,IDC_STATIC13),mode != 0);
+ int mode = SendDlgItemMessage(hwndDlg, IDC_HIDEMETHOD, CB_GETCURSEL, 0, 0);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_SHOWDELAY), mode != 0);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_HIDEDELAY), mode != 0);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_HIDETIMESPIN2), mode != 0);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_HIDETIMESPIN3), mode != 0);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_HIDETIMESPIN4), mode != 0);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_HIDEDELAY2), mode != 0);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC5), mode != 0);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC6), mode != 0);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC7), mode != 0);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC8), mode != 0);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC10), mode != 0);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC13), mode != 0);
}
- if ( !IsDlgButtonChecked(hwndDlg,IDC_AUTOSIZE)) {
- EnableWindow(GetDlgItem(hwndDlg,IDC_STATIC21),FALSE);
- EnableWindow(GetDlgItem(hwndDlg,IDC_STATIC22),FALSE);
- EnableWindow(GetDlgItem(hwndDlg,IDC_MAXSIZEHEIGHT),FALSE);
- EnableWindow(GetDlgItem(hwndDlg,IDC_MAXSIZESPIN),FALSE);
- EnableWindow(GetDlgItem(hwndDlg,IDC_MINSIZEHEIGHT),FALSE);
- EnableWindow(GetDlgItem(hwndDlg,IDC_MINSIZESPIN),FALSE);
- EnableWindow(GetDlgItem(hwndDlg,IDC_AUTOSIZEUPWARD),FALSE);
+ if (!IsDlgButtonChecked(hwndDlg, IDC_AUTOSIZE)) {
+ EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC21), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC22), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_MAXSIZEHEIGHT), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_MAXSIZESPIN), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_MINSIZEHEIGHT), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_MINSIZESPIN), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_AUTOSIZEUPWARD), FALSE);
}
return TRUE;
case WM_COMMAND:
if (LOWORD(wParam) == IDC_AUTOHIDE) {
- EnableWindow(GetDlgItem(hwndDlg,IDC_HIDETIME),IsDlgButtonChecked(hwndDlg,IDC_AUTOHIDE));
- EnableWindow(GetDlgItem(hwndDlg,IDC_HIDETIMESPIN),IsDlgButtonChecked(hwndDlg,IDC_AUTOHIDE));
- EnableWindow(GetDlgItem(hwndDlg,IDC_STATIC01),IsDlgButtonChecked(hwndDlg,IDC_AUTOHIDE));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_HIDETIME), IsDlgButtonChecked(hwndDlg, IDC_AUTOHIDE));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_HIDETIMESPIN), IsDlgButtonChecked(hwndDlg, IDC_AUTOHIDE));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC01), IsDlgButtonChecked(hwndDlg, IDC_AUTOHIDE));
}
- else if (LOWORD(wParam) == IDC_DRAGTOSCROLL && IsDlgButtonChecked(hwndDlg,IDC_CLIENTDRAG)) {
- CheckDlgButton(hwndDlg,IDC_CLIENTDRAG,FALSE);
+ else if (LOWORD(wParam) == IDC_DRAGTOSCROLL && IsDlgButtonChecked(hwndDlg, IDC_CLIENTDRAG)) {
+ CheckDlgButton(hwndDlg, IDC_CLIENTDRAG, FALSE);
}
- else if (LOWORD(wParam) == IDC_CLIENTDRAG && IsDlgButtonChecked(hwndDlg,IDC_DRAGTOSCROLL)) {
- CheckDlgButton(hwndDlg,IDC_DRAGTOSCROLL,FALSE);
+ else if (LOWORD(wParam) == IDC_CLIENTDRAG && IsDlgButtonChecked(hwndDlg, IDC_DRAGTOSCROLL)) {
+ CheckDlgButton(hwndDlg, IDC_DRAGTOSCROLL, FALSE);
}
else if (LOWORD(wParam) == IDC_AUTOSIZE) {
- EnableWindow(GetDlgItem(hwndDlg,IDC_STATIC21),IsDlgButtonChecked(hwndDlg,IDC_AUTOSIZE));
- EnableWindow(GetDlgItem(hwndDlg,IDC_STATIC22),IsDlgButtonChecked(hwndDlg,IDC_AUTOSIZE));
- EnableWindow(GetDlgItem(hwndDlg,IDC_MAXSIZEHEIGHT),IsDlgButtonChecked(hwndDlg,IDC_AUTOSIZE));
- EnableWindow(GetDlgItem(hwndDlg,IDC_MAXSIZESPIN),IsDlgButtonChecked(hwndDlg,IDC_AUTOSIZE));
- EnableWindow(GetDlgItem(hwndDlg,IDC_MINSIZEHEIGHT),IsDlgButtonChecked(hwndDlg,IDC_AUTOSIZE));
- EnableWindow(GetDlgItem(hwndDlg,IDC_MINSIZESPIN),IsDlgButtonChecked(hwndDlg,IDC_AUTOSIZE));
- EnableWindow(GetDlgItem(hwndDlg,IDC_AUTOSIZEUPWARD),IsDlgButtonChecked(hwndDlg,IDC_AUTOSIZE));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC21), IsDlgButtonChecked(hwndDlg, IDC_AUTOSIZE));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC22), IsDlgButtonChecked(hwndDlg, IDC_AUTOSIZE));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_MAXSIZEHEIGHT), IsDlgButtonChecked(hwndDlg, IDC_AUTOSIZE));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_MAXSIZESPIN), IsDlgButtonChecked(hwndDlg, IDC_AUTOSIZE));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_MINSIZEHEIGHT), IsDlgButtonChecked(hwndDlg, IDC_AUTOSIZE));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_MINSIZESPIN), IsDlgButtonChecked(hwndDlg, IDC_AUTOSIZE));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_AUTOSIZEUPWARD), IsDlgButtonChecked(hwndDlg, IDC_AUTOSIZE));
}
- else if (LOWORD(wParam) == IDC_HIDEMETHOD)
- {
- int mode = SendDlgItemMessage(hwndDlg,IDC_HIDEMETHOD,CB_GETCURSEL, 0, 0);
- EnableWindow(GetDlgItem(hwndDlg,IDC_SHOWDELAY),mode != 0);
- EnableWindow(GetDlgItem(hwndDlg,IDC_HIDEDELAY),mode != 0);
- EnableWindow(GetDlgItem(hwndDlg,IDC_HIDETIMESPIN2),mode != 0);
- EnableWindow(GetDlgItem(hwndDlg,IDC_HIDETIMESPIN3),mode != 0);
- EnableWindow(GetDlgItem(hwndDlg,IDC_HIDETIMESPIN4),mode != 0);
- EnableWindow(GetDlgItem(hwndDlg,IDC_HIDEDELAY2),mode != 0);
- EnableWindow(GetDlgItem(hwndDlg,IDC_STATIC5),mode != 0);
- EnableWindow(GetDlgItem(hwndDlg,IDC_STATIC6),mode != 0);
- EnableWindow(GetDlgItem(hwndDlg,IDC_STATIC7),mode != 0);
- EnableWindow(GetDlgItem(hwndDlg,IDC_STATIC8),mode != 0);
- EnableWindow(GetDlgItem(hwndDlg,IDC_STATIC10),mode != 0);
- EnableWindow(GetDlgItem(hwndDlg,IDC_STATIC13),mode != 0);
+ else if (LOWORD(wParam) == IDC_HIDEMETHOD) {
+ int mode = SendDlgItemMessage(hwndDlg, IDC_HIDEMETHOD, CB_GETCURSEL, 0, 0);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_SHOWDELAY), mode != 0);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_HIDEDELAY), mode != 0);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_HIDETIMESPIN2), mode != 0);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_HIDETIMESPIN3), mode != 0);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_HIDETIMESPIN4), mode != 0);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_HIDEDELAY2), mode != 0);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC5), mode != 0);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC6), mode != 0);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC7), mode != 0);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC8), mode != 0);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC10), mode != 0);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC13), mode != 0);
}
- if ((LOWORD(wParam) == IDC_HIDETIME || LOWORD(wParam) == IDC_HIDEDELAY2 || LOWORD(wParam) == IDC_HIDEDELAY || LOWORD(wParam) == IDC_SHOWDELAY || LOWORD(wParam) == IDC_MAXSIZEHEIGHT || LOWORD(wParam) == IDC_MINSIZEHEIGHT) &&
+ if ((LOWORD(wParam) == IDC_HIDETIME || LOWORD(wParam) == IDC_HIDEDELAY2 || LOWORD(wParam) == IDC_HIDEDELAY || LOWORD(wParam) == IDC_SHOWDELAY || LOWORD(wParam) == IDC_MAXSIZEHEIGHT || LOWORD(wParam) == IDC_MINSIZEHEIGHT) &&
(HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus()))
return 0;
@@ -1097,31 +1024,31 @@ static INT_PTR CALLBACK DlgProcClistBehaviourOpts(HWND hwndDlg, UINT msg, WPARAM
case WM_NOTIFY:
switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
- db_set_b(NULL,"ModernData","HideBehind",(BYTE)SendDlgItemMessage(hwndDlg,IDC_HIDEMETHOD,CB_GETCURSEL, 0, 0));
- db_set_w(NULL,"ModernData","ShowDelay",(WORD)SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN2,UDM_GETPOS, 0, 0));
- db_set_w(NULL,"ModernData","HideDelay",(WORD)SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN3,UDM_GETPOS, 0, 0));
- db_set_w(NULL,"ModernData","HideBehindBorderSize",(WORD)SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN4,UDM_GETPOS, 0, 0));
+ db_set_b(NULL, "ModernData", "HideBehind", (BYTE)SendDlgItemMessage(hwndDlg, IDC_HIDEMETHOD, CB_GETCURSEL, 0, 0));
+ db_set_w(NULL, "ModernData", "ShowDelay", (WORD)SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN2, UDM_GETPOS, 0, 0));
+ db_set_w(NULL, "ModernData", "HideDelay", (WORD)SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN3, UDM_GETPOS, 0, 0));
+ db_set_w(NULL, "ModernData", "HideBehindBorderSize", (WORD)SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN4, UDM_GETPOS, 0, 0));
- db_set_b(NULL,"CLUI","DragToScroll",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_DRAGTOSCROLL));
- db_set_b(NULL,"CList","BringToFront",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_BRINGTOFRONT));
+ db_set_b(NULL, "CLUI", "DragToScroll", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_DRAGTOSCROLL));
+ db_set_b(NULL, "CList", "BringToFront", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_BRINGTOFRONT));
g_mutex_bChangingMode = TRUE;
- db_set_b(NULL,"CLUI","ClientAreaDrag",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_CLIENTDRAG));
- db_set_b(NULL,"CLUI","AutoSize",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_AUTOSIZE));
- db_set_b(NULL,"CLUI","LockSize",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_LOCKSIZING));
- db_set_b(NULL,"CLUI","MaxSizeHeight",(BYTE)GetDlgItemInt(hwndDlg,IDC_MAXSIZEHEIGHT,NULL,FALSE));
- db_set_b(NULL,"CLUI","MinSizeHeight",(BYTE)GetDlgItemInt(hwndDlg,IDC_MINSIZEHEIGHT,NULL,FALSE));
- db_set_b(NULL,"CLUI","AutoSizeUpward",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_AUTOSIZEUPWARD));
- db_set_b(NULL,"CLUI","SnapToEdges",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_SNAPTOEDGES));
+ db_set_b(NULL, "CLUI", "ClientAreaDrag", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_CLIENTDRAG));
+ db_set_b(NULL, "CLUI", "AutoSize", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_AUTOSIZE));
+ db_set_b(NULL, "CLUI", "LockSize", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_LOCKSIZING));
+ db_set_b(NULL, "CLUI", "MaxSizeHeight", (BYTE)GetDlgItemInt(hwndDlg, IDC_MAXSIZEHEIGHT, NULL, FALSE));
+ db_set_b(NULL, "CLUI", "MinSizeHeight", (BYTE)GetDlgItemInt(hwndDlg, IDC_MINSIZEHEIGHT, NULL, FALSE));
+ db_set_b(NULL, "CLUI", "AutoSizeUpward", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_AUTOSIZEUPWARD));
+ db_set_b(NULL, "CLUI", "SnapToEdges", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SNAPTOEDGES));
- db_set_b(NULL,"CLUI","DockToSides",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_DOCKTOSIDES));
+ db_set_b(NULL, "CLUI", "DockToSides", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_DOCKTOSIDES));
- db_set_b(NULL,"CLUI","EventArea",
- (BYTE)(IsDlgButtonChecked(hwndDlg,IDC_EVENTAREA_ALWAYS)?2:(BYTE)IsDlgButtonChecked(hwndDlg,IDC_EVENTAREA)?1:0));
+ db_set_b(NULL, "CLUI", "EventArea",
+ (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_EVENTAREA_ALWAYS) ? 2 : (BYTE)IsDlgButtonChecked(hwndDlg, IDC_EVENTAREA) ? 1 : 0));
- db_set_b(NULL,"CList","AutoHide",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_AUTOHIDE));
- db_set_w(NULL,"CList","HideTime",(WORD)SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN,UDM_GETPOS, 0, 0));
+ db_set_b(NULL, "CList", "AutoHide", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_AUTOHIDE));
+ db_set_w(NULL, "CList", "HideTime", (WORD)SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN, UDM_GETPOS, 0, 0));
CLUI_ChangeWindowMode();
- SendMessage(pcli->hwndContactTree,WM_SIZE, 0, 0); //forces it to send a cln_listsizechanged
+ SendMessage(pcli->hwndContactTree, WM_SIZE, 0, 0); //forces it to send a cln_listsizechanged
CLUI_ReloadCLUIOptions();
EventArea_ConfigureEventArea();
cliShowHide(0, 1);
@@ -1133,6 +1060,8 @@ static INT_PTR CALLBACK DlgProcClistBehaviourOpts(HWND hwndDlg, UINT msg, WPARAM
return FALSE;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
BOOL fEnabled = FALSE;
@@ -1140,174 +1069,170 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
g_hCLUIOptionsWnd = hwndDlg;
- CheckDlgButton(hwndDlg, IDC_ONTOP, db_get_b(NULL,"CList","OnTop",SETTING_ONTOP_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_ONTOP, db_get_b(NULL, "CList", "OnTop", SETTING_ONTOP_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
{
//====== Activate/Deactivate Non-Layered items =======
fEnabled = !g_CluiData.fLayered || g_CluiData.fDisableSkinEngine;
- EnableWindow(GetDlgItem(hwndDlg,IDC_TOOLWND),fEnabled);
- EnableWindow(GetDlgItem(hwndDlg,IDC_MIN2TRAY),fEnabled);
- EnableWindow(GetDlgItem(hwndDlg,IDC_BORDER),fEnabled);
- EnableWindow(GetDlgItem(hwndDlg,IDC_NOBORDERWND),fEnabled);
- EnableWindow(GetDlgItem(hwndDlg,IDC_SHOWCAPTION),fEnabled);
- EnableWindow(GetDlgItem(hwndDlg,IDC_SHOWMAINMENU),fEnabled);
- EnableWindow(GetDlgItem(hwndDlg,IDC_TITLETEXT),fEnabled);
- EnableWindow(GetDlgItem(hwndDlg,IDC_DROPSHADOW),fEnabled);
- EnableWindow(GetDlgItem(hwndDlg,IDC_AEROGLASS),!fEnabled && (g_proc_DWMEnableBlurBehindWindow != NULL));
- EnableWindow(GetDlgItem(hwndDlg,IDC_TITLEBAR_STATIC),fEnabled);
- EnableWindow(GetDlgItem(hwndDlg,IDC_ROUNDCORNERS),fEnabled);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_TOOLWND), fEnabled);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_MIN2TRAY), fEnabled);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_BORDER), fEnabled);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_NOBORDERWND), fEnabled);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_SHOWCAPTION), fEnabled);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_SHOWMAINMENU), fEnabled);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_TITLETEXT), fEnabled);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_DROPSHADOW), fEnabled);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_AEROGLASS), !fEnabled && (g_proc_DWMEnableBlurBehindWindow != NULL));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_TITLEBAR_STATIC), fEnabled);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_ROUNDCORNERS), fEnabled);
}
{
//====== Non-Layered Mode =====
- CheckDlgButton(hwndDlg, IDC_TOOLWND, db_get_b(NULL,"CList","ToolWindow",SETTING_TOOLWINDOW_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_MIN2TRAY, db_get_b(NULL,"CList","Min2Tray",SETTING_MIN2TRAY_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_BORDER, db_get_b(NULL,"CList","ThinBorder",SETTING_THINBORDER_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_NOBORDERWND, db_get_b(NULL,"CList","NoBorder",SETTING_NOBORDER_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- if (IsDlgButtonChecked(hwndDlg,IDC_TOOLWND))
- EnableWindow(GetDlgItem(hwndDlg,IDC_MIN2TRAY),FALSE);
- CheckDlgButton(hwndDlg, IDC_SHOWCAPTION, db_get_b(NULL,"CLUI","ShowCaption",SETTING_SHOWCAPTION_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SHOWMAINMENU, db_get_b(NULL,"CLUI","ShowMainMenu",SETTING_SHOWMAINMENU_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- if ( !IsDlgButtonChecked(hwndDlg,IDC_SHOWCAPTION)) {
- EnableWindow(GetDlgItem(hwndDlg,IDC_MIN2TRAY),FALSE);
- EnableWindow(GetDlgItem(hwndDlg,IDC_TOOLWND),FALSE);
- EnableWindow(GetDlgItem(hwndDlg,IDC_TITLETEXT),FALSE);
+ CheckDlgButton(hwndDlg, IDC_TOOLWND, db_get_b(NULL, "CList", "ToolWindow", SETTING_TOOLWINDOW_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_MIN2TRAY, db_get_b(NULL, "CList", "Min2Tray", SETTING_MIN2TRAY_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_BORDER, db_get_b(NULL, "CList", "ThinBorder", SETTING_THINBORDER_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_NOBORDERWND, db_get_b(NULL, "CList", "NoBorder", SETTING_NOBORDER_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ if (IsDlgButtonChecked(hwndDlg, IDC_TOOLWND))
+ EnableWindow(GetDlgItem(hwndDlg, IDC_MIN2TRAY), FALSE);
+ CheckDlgButton(hwndDlg, IDC_SHOWCAPTION, db_get_b(NULL, "CLUI", "ShowCaption", SETTING_SHOWCAPTION_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_SHOWMAINMENU, db_get_b(NULL, "CLUI", "ShowMainMenu", SETTING_SHOWMAINMENU_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ if (!IsDlgButtonChecked(hwndDlg, IDC_SHOWCAPTION)) {
+ EnableWindow(GetDlgItem(hwndDlg, IDC_MIN2TRAY), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_TOOLWND), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_TITLETEXT), FALSE);
}
- if (IsDlgButtonChecked(hwndDlg,IDC_BORDER) || IsDlgButtonChecked(hwndDlg,IDC_NOBORDERWND)) {
- EnableWindow(GetDlgItem(hwndDlg,IDC_MIN2TRAY),FALSE);
- EnableWindow(GetDlgItem(hwndDlg,IDC_TOOLWND),FALSE);
- EnableWindow(GetDlgItem(hwndDlg,IDC_TITLETEXT),FALSE);
- EnableWindow(GetDlgItem(hwndDlg,IDC_SHOWCAPTION),FALSE);
+ if (IsDlgButtonChecked(hwndDlg, IDC_BORDER) || IsDlgButtonChecked(hwndDlg, IDC_NOBORDERWND)) {
+ EnableWindow(GetDlgItem(hwndDlg, IDC_MIN2TRAY), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_TOOLWND), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_TITLETEXT), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_SHOWCAPTION), FALSE);
}
- CheckDlgButton(hwndDlg, IDC_DROPSHADOW, db_get_b(NULL,"CList","WindowShadow",SETTING_WINDOWSHADOW_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_ROUNDCORNERS, db_get_b(NULL,"CLC","RoundCorners",SETTING_ROUNDCORNERS_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_DROPSHADOW, db_get_b(NULL, "CList", "WindowShadow", SETTING_WINDOWSHADOW_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_ROUNDCORNERS, db_get_b(NULL, "CLC", "RoundCorners", SETTING_ROUNDCORNERS_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
} //====== End of Non-Layered Mode =====
- CheckDlgButton(hwndDlg, IDC_FADEINOUT, db_get_b(NULL,"CLUI","FadeInOut",SETTING_FADEIN_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_ONDESKTOP, db_get_b(NULL,"CList","OnDesktop", SETTING_ONDESKTOP_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- SendDlgItemMessage(hwndDlg,IDC_FRAMESSPIN,UDM_SETRANGE, 0, MAKELONG(50, 0));
- SendDlgItemMessage(hwndDlg,IDC_CAPTIONSSPIN,UDM_SETRANGE, 0, MAKELONG(50, 0));
- SendDlgItemMessage(hwndDlg,IDC_FRAMESSPIN,UDM_SETPOS, 0, db_get_dw(NULL,"CLUIFrames","GapBetweenFrames",SETTING_GAPFRAMES_DEFAULT));
- SendDlgItemMessage(hwndDlg,IDC_CAPTIONSSPIN,UDM_SETPOS, 0, db_get_dw(NULL,"CLUIFrames","GapBetweenTitleBar",SETTING_GAPTITLEBAR_DEFAULT));
- SendDlgItemMessage(hwndDlg,IDC_LEFTMARGINSPIN,UDM_SETRANGE, 0, MAKELONG(250, 0));
- SendDlgItemMessage(hwndDlg,IDC_RIGHTMARGINSPIN,UDM_SETRANGE, 0, MAKELONG(250, 0));
- SendDlgItemMessage(hwndDlg,IDC_TOPMARGINSPIN,UDM_SETRANGE, 0, MAKELONG(250, 0));
- SendDlgItemMessage(hwndDlg,IDC_BOTTOMMARGINSPIN,UDM_SETRANGE, 0, MAKELONG(250, 0));
- SendDlgItemMessage(hwndDlg,IDC_LEFTMARGINSPIN,UDM_SETPOS, 0, db_get_b(NULL,"CLUI","LeftClientMargin",SETTING_LEFTCLIENTMARIGN_DEFAULT));
- SendDlgItemMessage(hwndDlg,IDC_RIGHTMARGINSPIN,UDM_SETPOS, 0, db_get_b(NULL,"CLUI","RightClientMargin",SETTING_RIGHTCLIENTMARIGN_DEFAULT));
- SendDlgItemMessage(hwndDlg,IDC_TOPMARGINSPIN,UDM_SETPOS, 0, db_get_b(NULL,"CLUI","TopClientMargin",SETTING_TOPCLIENTMARIGN_DEFAULT));
- SendDlgItemMessage(hwndDlg,IDC_BOTTOMMARGINSPIN,UDM_SETPOS, 0, db_get_b(NULL,"CLUI","BottomClientMargin",SETTING_BOTTOMCLIENTMARIGN_DEFAULT));
-
- CheckDlgButton(hwndDlg, IDC_DISABLEENGINE, db_get_b(NULL,"ModernData","DisableEngine", SETTING_DISABLESKIN_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_AEROGLASS, db_get_b(NULL,"ModernData","AeroGlass",SETTING_AEROGLASS_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
-
- EnableWindow(GetDlgItem(hwndDlg,IDC_LAYERENGINE), !db_get_b(NULL,"ModernData","DisableEngine", SETTING_DISABLESKIN_DEFAULT) ? TRUE : FALSE);
- CheckDlgButton(hwndDlg, IDC_LAYERENGINE, (db_get_b(NULL,"ModernData","EnableLayering",SETTING_ENABLELAYERING_DEFAULT) && !db_get_b(NULL,"ModernData","DisableEngine", SETTING_DISABLESKIN_DEFAULT)) ? BST_UNCHECKED:BST_CHECKED);
+ CheckDlgButton(hwndDlg, IDC_FADEINOUT, db_get_b(NULL, "CLUI", "FadeInOut", SETTING_FADEIN_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_ONDESKTOP, db_get_b(NULL, "CList", "OnDesktop", SETTING_ONDESKTOP_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ SendDlgItemMessage(hwndDlg, IDC_FRAMESSPIN, UDM_SETRANGE, 0, MAKELONG(50, 0));
+ SendDlgItemMessage(hwndDlg, IDC_CAPTIONSSPIN, UDM_SETRANGE, 0, MAKELONG(50, 0));
+ SendDlgItemMessage(hwndDlg, IDC_FRAMESSPIN, UDM_SETPOS, 0, db_get_dw(NULL, "CLUIFrames", "GapBetweenFrames", SETTING_GAPFRAMES_DEFAULT));
+ SendDlgItemMessage(hwndDlg, IDC_CAPTIONSSPIN, UDM_SETPOS, 0, db_get_dw(NULL, "CLUIFrames", "GapBetweenTitleBar", SETTING_GAPTITLEBAR_DEFAULT));
+ SendDlgItemMessage(hwndDlg, IDC_LEFTMARGINSPIN, UDM_SETRANGE, 0, MAKELONG(250, 0));
+ SendDlgItemMessage(hwndDlg, IDC_RIGHTMARGINSPIN, UDM_SETRANGE, 0, MAKELONG(250, 0));
+ SendDlgItemMessage(hwndDlg, IDC_TOPMARGINSPIN, UDM_SETRANGE, 0, MAKELONG(250, 0));
+ SendDlgItemMessage(hwndDlg, IDC_BOTTOMMARGINSPIN, UDM_SETRANGE, 0, MAKELONG(250, 0));
+ SendDlgItemMessage(hwndDlg, IDC_LEFTMARGINSPIN, UDM_SETPOS, 0, db_get_b(NULL, "CLUI", "LeftClientMargin", SETTING_LEFTCLIENTMARIGN_DEFAULT));
+ SendDlgItemMessage(hwndDlg, IDC_RIGHTMARGINSPIN, UDM_SETPOS, 0, db_get_b(NULL, "CLUI", "RightClientMargin", SETTING_RIGHTCLIENTMARIGN_DEFAULT));
+ SendDlgItemMessage(hwndDlg, IDC_TOPMARGINSPIN, UDM_SETPOS, 0, db_get_b(NULL, "CLUI", "TopClientMargin", SETTING_TOPCLIENTMARIGN_DEFAULT));
+ SendDlgItemMessage(hwndDlg, IDC_BOTTOMMARGINSPIN, UDM_SETPOS, 0, db_get_b(NULL, "CLUI", "BottomClientMargin", SETTING_BOTTOMCLIENTMARIGN_DEFAULT));
+
+ CheckDlgButton(hwndDlg, IDC_DISABLEENGINE, db_get_b(NULL, "ModernData", "DisableEngine", SETTING_DISABLESKIN_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_AEROGLASS, db_get_b(NULL, "ModernData", "AeroGlass", SETTING_AEROGLASS_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+
+ EnableWindow(GetDlgItem(hwndDlg, IDC_LAYERENGINE), !db_get_b(NULL, "ModernData", "DisableEngine", SETTING_DISABLESKIN_DEFAULT) ? TRUE : FALSE);
+ CheckDlgButton(hwndDlg, IDC_LAYERENGINE, (db_get_b(NULL, "ModernData", "EnableLayering", SETTING_ENABLELAYERING_DEFAULT) && !db_get_b(NULL, "ModernData", "DisableEngine", SETTING_DISABLESKIN_DEFAULT)) ? BST_UNCHECKED : BST_CHECKED);
{
- DBVARIANT dbv = {0};
+ DBVARIANT dbv = { 0 };
TCHAR *s;
- if ( !db_get_ts(NULL,"CList","TitleText",&dbv))
+ if (!db_get_ts(NULL, "CList", "TitleText", &dbv))
s = dbv.ptszVal;
else
s = _T(MIRANDANAME);
SetDlgItemText(hwndDlg, IDC_TITLETEXT, s);
db_free(&dbv);
- SendDlgItemMessage(hwndDlg,IDC_TITLETEXT,CB_ADDSTRING, 0, (LPARAM)MIRANDANAME);
+ SendDlgItemMessage(hwndDlg, IDC_TITLETEXT, CB_ADDSTRING, 0, (LPARAM)MIRANDANAME);
char szUin[20];
mir_snprintf(szUin, SIZEOF(szUin), "%u", db_get_dw(NULL, "ICQ", "UIN", 0));
- SendDlgItemMessage(hwndDlg,IDC_TITLETEXT,CB_ADDSTRING, 0, (LPARAM)szUin);
+ SendDlgItemMessage(hwndDlg, IDC_TITLETEXT, CB_ADDSTRING, 0, (LPARAM)szUin);
- if ( !db_get_s(NULL,"ICQ","Nick",&dbv)) {
- SendDlgItemMessage(hwndDlg,IDC_TITLETEXT,CB_ADDSTRING, 0, (LPARAM)dbv.pszVal);
+ if (!db_get_s(NULL, "ICQ", "Nick", &dbv)) {
+ SendDlgItemMessage(hwndDlg, IDC_TITLETEXT, CB_ADDSTRING, 0, (LPARAM)dbv.pszVal);
db_free(&dbv);
dbv.pszVal = NULL;
}
- if ( !db_get_s(NULL,"ICQ","FirstName",&dbv)) {
- SendDlgItemMessage(hwndDlg,IDC_TITLETEXT,CB_ADDSTRING, 0, (LPARAM)dbv.pszVal);
+ if (!db_get_s(NULL, "ICQ", "FirstName", &dbv)) {
+ SendDlgItemMessage(hwndDlg, IDC_TITLETEXT, CB_ADDSTRING, 0, (LPARAM)dbv.pszVal);
db_free(&dbv);
dbv.pszVal = NULL;
}
- if ( !db_get_s(NULL,"ICQ","e-mail",&dbv)) {
- SendDlgItemMessage(hwndDlg,IDC_TITLETEXT,CB_ADDSTRING, 0, (LPARAM)dbv.pszVal);
+ if (!db_get_s(NULL, "ICQ", "e-mail", &dbv)) {
+ SendDlgItemMessage(hwndDlg, IDC_TITLETEXT, CB_ADDSTRING, 0, (LPARAM)dbv.pszVal);
db_free(&dbv);
dbv.pszVal = NULL;
}
}
CheckDlgButton(hwndDlg, IDC_TRANSPARENT, db_get_b(NULL, "CList", "Transparent", SETTING_TRANSPARENT_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- if ( !IsDlgButtonChecked(hwndDlg,IDC_TRANSPARENT)) {
- EnableWindow(GetDlgItem(hwndDlg,IDC_STATIC11),FALSE);
- EnableWindow(GetDlgItem(hwndDlg,IDC_STATIC12),FALSE);
- EnableWindow(GetDlgItem(hwndDlg,IDC_TRANSACTIVE),FALSE);
- EnableWindow(GetDlgItem(hwndDlg,IDC_TRANSINACTIVE),FALSE);
- EnableWindow(GetDlgItem(hwndDlg,IDC_ACTIVEPERC),FALSE);
- EnableWindow(GetDlgItem(hwndDlg,IDC_INACTIVEPERC),FALSE);
+ if (!IsDlgButtonChecked(hwndDlg, IDC_TRANSPARENT)) {
+ EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC11), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC12), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_TRANSACTIVE), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_TRANSINACTIVE), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_ACTIVEPERC), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_INACTIVEPERC), FALSE);
}
- SendDlgItemMessage(hwndDlg,IDC_TRANSACTIVE,TBM_SETRANGE,FALSE,MAKELONG(1,255));
- SendDlgItemMessage(hwndDlg,IDC_TRANSINACTIVE,TBM_SETRANGE,FALSE,MAKELONG(1,255));
- SendDlgItemMessage(hwndDlg,IDC_TRANSACTIVE,TBM_SETPOS,TRUE,db_get_b(NULL,"CList","Alpha",SETTING_ALPHA_DEFAULT));
- SendDlgItemMessage(hwndDlg,IDC_TRANSINACTIVE,TBM_SETPOS,TRUE,db_get_b(NULL,"CList","AutoAlpha",SETTING_AUTOALPHA_DEFAULT));
- SendMessage(hwndDlg,WM_HSCROLL,0x12345678,0);
+ SendDlgItemMessage(hwndDlg, IDC_TRANSACTIVE, TBM_SETRANGE, FALSE, MAKELONG(1, 255));
+ SendDlgItemMessage(hwndDlg, IDC_TRANSINACTIVE, TBM_SETRANGE, FALSE, MAKELONG(1, 255));
+ SendDlgItemMessage(hwndDlg, IDC_TRANSACTIVE, TBM_SETPOS, TRUE, db_get_b(NULL, "CList", "Alpha", SETTING_ALPHA_DEFAULT));
+ SendDlgItemMessage(hwndDlg, IDC_TRANSINACTIVE, TBM_SETPOS, TRUE, db_get_b(NULL, "CList", "AutoAlpha", SETTING_AUTOALPHA_DEFAULT));
+ SendMessage(hwndDlg, WM_HSCROLL, 0x12345678, 0);
return TRUE;
case WM_COMMAND:
if (LOWORD(wParam) == IDC_TRANSPARENT) {
- EnableWindow(GetDlgItem(hwndDlg,IDC_STATIC11),IsDlgButtonChecked(hwndDlg,IDC_TRANSPARENT));
- EnableWindow(GetDlgItem(hwndDlg,IDC_STATIC12),IsDlgButtonChecked(hwndDlg,IDC_TRANSPARENT));
- EnableWindow(GetDlgItem(hwndDlg,IDC_TRANSACTIVE),IsDlgButtonChecked(hwndDlg,IDC_TRANSPARENT));
- EnableWindow(GetDlgItem(hwndDlg,IDC_TRANSINACTIVE),IsDlgButtonChecked(hwndDlg,IDC_TRANSPARENT));
- EnableWindow(GetDlgItem(hwndDlg,IDC_ACTIVEPERC),IsDlgButtonChecked(hwndDlg,IDC_TRANSPARENT));
- EnableWindow(GetDlgItem(hwndDlg,IDC_INACTIVEPERC),IsDlgButtonChecked(hwndDlg,IDC_TRANSPARENT));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC11), IsDlgButtonChecked(hwndDlg, IDC_TRANSPARENT));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC12), IsDlgButtonChecked(hwndDlg, IDC_TRANSPARENT));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_TRANSACTIVE), IsDlgButtonChecked(hwndDlg, IDC_TRANSPARENT));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_TRANSINACTIVE), IsDlgButtonChecked(hwndDlg, IDC_TRANSPARENT));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_ACTIVEPERC), IsDlgButtonChecked(hwndDlg, IDC_TRANSPARENT));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_INACTIVEPERC), IsDlgButtonChecked(hwndDlg, IDC_TRANSPARENT));
}
- else if (LOWORD(wParam) == IDC_LAYERENGINE || LOWORD(wParam) == IDC_DISABLEENGINE)
- { //====== Activate/Deactivate Non-Layered items =======
- fEnabled = !(IsWindowEnabled(GetDlgItem(hwndDlg,IDC_LAYERENGINE)) && !IsDlgButtonChecked(hwndDlg,IDC_LAYERENGINE) && !IsDlgButtonChecked(hwndDlg,IDC_DISABLEENGINE));
-
- EnableWindow(GetDlgItem(hwndDlg,IDC_TOOLWND),fEnabled && (IsDlgButtonChecked(hwndDlg,IDC_SHOWCAPTION)) && !(IsDlgButtonChecked(hwndDlg,IDC_NOBORDERWND) || IsDlgButtonChecked(hwndDlg,IDC_BORDER)));
- EnableWindow(GetDlgItem(hwndDlg,IDC_MIN2TRAY),fEnabled && (IsDlgButtonChecked(hwndDlg,IDC_TOOLWND) && IsDlgButtonChecked(hwndDlg,IDC_SHOWCAPTION)) && !(IsDlgButtonChecked(hwndDlg,IDC_NOBORDERWND) || IsDlgButtonChecked(hwndDlg,IDC_BORDER)));
- EnableWindow(GetDlgItem(hwndDlg,IDC_TITLETEXT),fEnabled && (IsDlgButtonChecked(hwndDlg,IDC_SHOWCAPTION)) && !(IsDlgButtonChecked(hwndDlg,IDC_NOBORDERWND) || IsDlgButtonChecked(hwndDlg,IDC_BORDER)));
- EnableWindow(GetDlgItem(hwndDlg,IDC_SHOWCAPTION),fEnabled && !(IsDlgButtonChecked(hwndDlg,IDC_NOBORDERWND) || IsDlgButtonChecked(hwndDlg,IDC_BORDER)));
- EnableWindow(GetDlgItem(hwndDlg,IDC_BORDER),fEnabled);
- EnableWindow(GetDlgItem(hwndDlg,IDC_NOBORDERWND),fEnabled);
- EnableWindow(GetDlgItem(hwndDlg,IDC_SHOWMAINMENU),fEnabled);
- EnableWindow(GetDlgItem(hwndDlg,IDC_DROPSHADOW),fEnabled);
- EnableWindow(GetDlgItem(hwndDlg,IDC_AEROGLASS),!fEnabled && (g_proc_DWMEnableBlurBehindWindow != NULL));
- EnableWindow(GetDlgItem(hwndDlg,IDC_TITLEBAR_STATIC),fEnabled);
- EnableWindow(GetDlgItem(hwndDlg,IDC_ROUNDCORNERS),fEnabled);
- if (LOWORD(wParam) == IDC_DISABLEENGINE)
- {
+ else if (LOWORD(wParam) == IDC_LAYERENGINE || LOWORD(wParam) == IDC_DISABLEENGINE) { //====== Activate/Deactivate Non-Layered items =======
+ fEnabled = !(IsWindowEnabled(GetDlgItem(hwndDlg, IDC_LAYERENGINE)) && !IsDlgButtonChecked(hwndDlg, IDC_LAYERENGINE) && !IsDlgButtonChecked(hwndDlg, IDC_DISABLEENGINE));
+
+ EnableWindow(GetDlgItem(hwndDlg, IDC_TOOLWND), fEnabled && (IsDlgButtonChecked(hwndDlg, IDC_SHOWCAPTION)) && !(IsDlgButtonChecked(hwndDlg, IDC_NOBORDERWND) || IsDlgButtonChecked(hwndDlg, IDC_BORDER)));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_MIN2TRAY), fEnabled && (IsDlgButtonChecked(hwndDlg, IDC_TOOLWND) && IsDlgButtonChecked(hwndDlg, IDC_SHOWCAPTION)) && !(IsDlgButtonChecked(hwndDlg, IDC_NOBORDERWND) || IsDlgButtonChecked(hwndDlg, IDC_BORDER)));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_TITLETEXT), fEnabled && (IsDlgButtonChecked(hwndDlg, IDC_SHOWCAPTION)) && !(IsDlgButtonChecked(hwndDlg, IDC_NOBORDERWND) || IsDlgButtonChecked(hwndDlg, IDC_BORDER)));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_SHOWCAPTION), fEnabled && !(IsDlgButtonChecked(hwndDlg, IDC_NOBORDERWND) || IsDlgButtonChecked(hwndDlg, IDC_BORDER)));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_BORDER), fEnabled);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_NOBORDERWND), fEnabled);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_SHOWMAINMENU), fEnabled);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_DROPSHADOW), fEnabled);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_AEROGLASS), !fEnabled && (g_proc_DWMEnableBlurBehindWindow != NULL));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_TITLEBAR_STATIC), fEnabled);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_ROUNDCORNERS), fEnabled);
+ if (LOWORD(wParam) == IDC_DISABLEENGINE) {
EnableWindow(GetDlgItem(hwndDlg, IDC_LAYERENGINE), !IsDlgButtonChecked(hwndDlg, IDC_DISABLEENGINE));
- if (IsDlgButtonChecked(hwndDlg,IDC_DISABLEENGINE))
- CheckDlgButton(hwndDlg,IDC_LAYERENGINE,BST_CHECKED);
+ if (IsDlgButtonChecked(hwndDlg, IDC_DISABLEENGINE))
+ CheckDlgButton(hwndDlg, IDC_LAYERENGINE, BST_CHECKED);
}
-
}
- else if (LOWORD(wParam) == IDC_ONDESKTOP && IsDlgButtonChecked(hwndDlg,IDC_ONDESKTOP)) {
+ else if (LOWORD(wParam) == IDC_ONDESKTOP && IsDlgButtonChecked(hwndDlg, IDC_ONDESKTOP)) {
CheckDlgButton(hwndDlg, IDC_ONTOP, BST_UNCHECKED);
}
- else if (LOWORD(wParam) == IDC_ONTOP && IsDlgButtonChecked(hwndDlg,IDC_ONTOP)) {
+ else if (LOWORD(wParam) == IDC_ONTOP && IsDlgButtonChecked(hwndDlg, IDC_ONTOP)) {
CheckDlgButton(hwndDlg, IDC_ONDESKTOP, BST_UNCHECKED);
}
else if (LOWORD(wParam) == IDC_TOOLWND) {
- EnableWindow(GetDlgItem(hwndDlg,IDC_MIN2TRAY),!IsDlgButtonChecked(hwndDlg,IDC_TOOLWND));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_MIN2TRAY), !IsDlgButtonChecked(hwndDlg, IDC_TOOLWND));
}
else if (LOWORD(wParam) == IDC_SHOWCAPTION) {
- EnableWindow(GetDlgItem(hwndDlg,IDC_TOOLWND),IsDlgButtonChecked(hwndDlg,IDC_SHOWCAPTION));
- EnableWindow(GetDlgItem(hwndDlg,IDC_MIN2TRAY),!IsDlgButtonChecked(hwndDlg,IDC_TOOLWND) && IsDlgButtonChecked(hwndDlg,IDC_SHOWCAPTION));
- EnableWindow(GetDlgItem(hwndDlg,IDC_TITLETEXT),IsDlgButtonChecked(hwndDlg,IDC_SHOWCAPTION));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_TOOLWND), IsDlgButtonChecked(hwndDlg, IDC_SHOWCAPTION));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_MIN2TRAY), !IsDlgButtonChecked(hwndDlg, IDC_TOOLWND) && IsDlgButtonChecked(hwndDlg, IDC_SHOWCAPTION));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_TITLETEXT), IsDlgButtonChecked(hwndDlg, IDC_SHOWCAPTION));
}
- else if (LOWORD(wParam) == IDC_NOBORDERWND || LOWORD(wParam) == IDC_BORDER)
- {
- EnableWindow(GetDlgItem(hwndDlg,IDC_TOOLWND),(IsDlgButtonChecked(hwndDlg,IDC_SHOWCAPTION)) && !(IsDlgButtonChecked(hwndDlg,IDC_NOBORDERWND) || IsDlgButtonChecked(hwndDlg,IDC_BORDER)));
- EnableWindow(GetDlgItem(hwndDlg,IDC_MIN2TRAY),(IsDlgButtonChecked(hwndDlg,IDC_TOOLWND) && IsDlgButtonChecked(hwndDlg,IDC_SHOWCAPTION)) && !(IsDlgButtonChecked(hwndDlg,IDC_NOBORDERWND) || IsDlgButtonChecked(hwndDlg,IDC_BORDER)));
- EnableWindow(GetDlgItem(hwndDlg,IDC_TITLETEXT),(IsDlgButtonChecked(hwndDlg,IDC_SHOWCAPTION)) && !(IsDlgButtonChecked(hwndDlg,IDC_NOBORDERWND) || IsDlgButtonChecked(hwndDlg,IDC_BORDER)));
- EnableWindow(GetDlgItem(hwndDlg,IDC_SHOWCAPTION),!(IsDlgButtonChecked(hwndDlg,IDC_NOBORDERWND) || IsDlgButtonChecked(hwndDlg,IDC_BORDER)));
- if (LOWORD(wParam) == IDC_BORDER) CheckDlgButton(hwndDlg, IDC_NOBORDERWND,BST_UNCHECKED);
- else CheckDlgButton(hwndDlg, IDC_BORDER,BST_UNCHECKED);
+ else if (LOWORD(wParam) == IDC_NOBORDERWND || LOWORD(wParam) == IDC_BORDER) {
+ EnableWindow(GetDlgItem(hwndDlg, IDC_TOOLWND), (IsDlgButtonChecked(hwndDlg, IDC_SHOWCAPTION)) && !(IsDlgButtonChecked(hwndDlg, IDC_NOBORDERWND) || IsDlgButtonChecked(hwndDlg, IDC_BORDER)));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_MIN2TRAY), (IsDlgButtonChecked(hwndDlg, IDC_TOOLWND) && IsDlgButtonChecked(hwndDlg, IDC_SHOWCAPTION)) && !(IsDlgButtonChecked(hwndDlg, IDC_NOBORDERWND) || IsDlgButtonChecked(hwndDlg, IDC_BORDER)));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_TITLETEXT), (IsDlgButtonChecked(hwndDlg, IDC_SHOWCAPTION)) && !(IsDlgButtonChecked(hwndDlg, IDC_NOBORDERWND) || IsDlgButtonChecked(hwndDlg, IDC_BORDER)));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_SHOWCAPTION), !(IsDlgButtonChecked(hwndDlg, IDC_NOBORDERWND) || IsDlgButtonChecked(hwndDlg, IDC_BORDER)));
+ if (LOWORD(wParam) == IDC_BORDER) CheckDlgButton(hwndDlg, IDC_NOBORDERWND, BST_UNCHECKED);
+ else CheckDlgButton(hwndDlg, IDC_BORDER, BST_UNCHECKED);
}
- if ((LOWORD(wParam) == IDC_TITLETEXT || LOWORD(wParam) == IDC_MAXSIZEHEIGHT || LOWORD(wParam) == IDC_MINSIZEHEIGHT || LOWORD(wParam) == IDC_FRAMESGAP || LOWORD(wParam) == IDC_CAPTIONSGAP ||
- LOWORD(wParam) == IDC_LEFTMARGIN || LOWORD(wParam) == IDC_RIGHTMARGIN || LOWORD(wParam) == IDC_TOPMARGIN || LOWORD(wParam) == IDC_BOTTOMMARGIN)
+ if ((LOWORD(wParam) == IDC_TITLETEXT || LOWORD(wParam) == IDC_MAXSIZEHEIGHT || LOWORD(wParam) == IDC_MINSIZEHEIGHT || LOWORD(wParam) == IDC_FRAMESGAP || LOWORD(wParam) == IDC_CAPTIONSGAP ||
+ LOWORD(wParam) == IDC_LEFTMARGIN || LOWORD(wParam) == IDC_RIGHTMARGIN || LOWORD(wParam) == IDC_TOPMARGIN || LOWORD(wParam) == IDC_BOTTOMMARGIN)
&& (HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus()))
return 0;
// Enable apply button
@@ -1315,93 +1240,90 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP
break;
case WM_HSCROLL:
- { char str[10];
- mir_snprintf(str, SIZEOF(str), "%d%%", 100 * SendDlgItemMessage(hwndDlg, IDC_TRANSINACTIVE, TBM_GETPOS, 0, 0) / 255);
- SetDlgItemTextA(hwndDlg,IDC_INACTIVEPERC,str);
- mir_snprintf(str, SIZEOF(str), "%d%%", 100 * SendDlgItemMessage(hwndDlg, IDC_TRANSACTIVE, TBM_GETPOS, 0, 0) / 255);
- SetDlgItemTextA(hwndDlg,IDC_ACTIVEPERC,str);
+ {
+ char str[10];
+ mir_snprintf(str, SIZEOF(str), "%d%%", 100 * SendDlgItemMessage(hwndDlg, IDC_TRANSINACTIVE, TBM_GETPOS, 0, 0) / 255);
+ SetDlgItemTextA(hwndDlg, IDC_INACTIVEPERC, str);
+ mir_snprintf(str, SIZEOF(str), "%d%%", 100 * SendDlgItemMessage(hwndDlg, IDC_TRANSACTIVE, TBM_GETPOS, 0, 0) / 255);
+ SetDlgItemTextA(hwndDlg, IDC_ACTIVEPERC, str);
}
- if (wParam != 0x12345678) SendMessage(GetParent(hwndDlg), PSM_CHANGED, (WPARAM)hwndDlg, 0);
+ if (wParam != 0x12345678)
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, (WPARAM)hwndDlg, 0);
break;
case WM_NOTIFY:
switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
- db_set_b(NULL,"CLUI","LeftClientMargin",(BYTE)SendDlgItemMessage(hwndDlg,IDC_LEFTMARGINSPIN,UDM_GETPOS, 0, 0));
- db_set_b(NULL,"CLUI","RightClientMargin",(BYTE)SendDlgItemMessage(hwndDlg,IDC_RIGHTMARGINSPIN,UDM_GETPOS, 0, 0));
- db_set_b(NULL,"CLUI","TopClientMargin",(BYTE)SendDlgItemMessage(hwndDlg,IDC_TOPMARGINSPIN,UDM_GETPOS, 0, 0));
- db_set_b(NULL,"CLUI","BottomClientMargin",(BYTE)SendDlgItemMessage(hwndDlg,IDC_BOTTOMMARGINSPIN,UDM_GETPOS, 0, 0));
- db_set_b(NULL,"ModernData","DisableEngine",IsDlgButtonChecked(hwndDlg,IDC_DISABLEENGINE));
- db_set_b(NULL,"ModernData","AeroGlass",IsDlgButtonChecked(hwndDlg,IDC_AEROGLASS));
- if ( !IsDlgButtonChecked(hwndDlg,IDC_DISABLEENGINE))
- {
- if (IsDlgButtonChecked(hwndDlg,IDC_LAYERENGINE))
- db_set_b(NULL,"ModernData","EnableLayering",0);
+ db_set_b(NULL, "CLUI", "LeftClientMargin", (BYTE)SendDlgItemMessage(hwndDlg, IDC_LEFTMARGINSPIN, UDM_GETPOS, 0, 0));
+ db_set_b(NULL, "CLUI", "RightClientMargin", (BYTE)SendDlgItemMessage(hwndDlg, IDC_RIGHTMARGINSPIN, UDM_GETPOS, 0, 0));
+ db_set_b(NULL, "CLUI", "TopClientMargin", (BYTE)SendDlgItemMessage(hwndDlg, IDC_TOPMARGINSPIN, UDM_GETPOS, 0, 0));
+ db_set_b(NULL, "CLUI", "BottomClientMargin", (BYTE)SendDlgItemMessage(hwndDlg, IDC_BOTTOMMARGINSPIN, UDM_GETPOS, 0, 0));
+ db_set_b(NULL, "ModernData", "DisableEngine", IsDlgButtonChecked(hwndDlg, IDC_DISABLEENGINE));
+ db_set_b(NULL, "ModernData", "AeroGlass", IsDlgButtonChecked(hwndDlg, IDC_AEROGLASS));
+ if (!IsDlgButtonChecked(hwndDlg, IDC_DISABLEENGINE)) {
+ if (IsDlgButtonChecked(hwndDlg, IDC_LAYERENGINE))
+ db_set_b(NULL, "ModernData", "EnableLayering", 0);
else
- db_unset(NULL,"ModernData","EnableLayering");
+ db_unset(NULL, "ModernData", "EnableLayering");
}
- g_CluiData.dwKeyColor = db_get_dw(NULL,"ModernSettings","KeyColor",(DWORD)SETTING_KEYCOLOR_DEFAULT);
- db_set_b(NULL,"CList","OnDesktop",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_ONDESKTOP));
- db_set_b(NULL,"CList","OnTop",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_ONTOP));
- SetWindowPos(pcli->hwndContactList, IsDlgButtonChecked(hwndDlg,IDC_ONTOP)?HWND_TOPMOST:HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE |SWP_NOACTIVATE);
- db_set_b(NULL,"CLUI","DragToScroll",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_DRAGTOSCROLL));
+ g_CluiData.dwKeyColor = db_get_dw(NULL, "ModernSettings", "KeyColor", (DWORD)SETTING_KEYCOLOR_DEFAULT);
+ db_set_b(NULL, "CList", "OnDesktop", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_ONDESKTOP));
+ db_set_b(NULL, "CList", "OnTop", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_ONTOP));
+ SetWindowPos(pcli->hwndContactList, IsDlgButtonChecked(hwndDlg, IDC_ONTOP) ? HWND_TOPMOST : HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
+ db_set_b(NULL, "CLUI", "DragToScroll", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_DRAGTOSCROLL));
{ //====== Non-Layered Mode ======
- db_set_b(NULL,"CList","ToolWindow",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_TOOLWND));
- db_set_b(NULL,"CLUI","ShowCaption",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_SHOWCAPTION));
- db_set_b(NULL,"CLUI","ShowMainMenu",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_SHOWMAINMENU));
- db_set_b(NULL,"CList","ThinBorder",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_BORDER));
- db_set_b(NULL,"CList","NoBorder",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_NOBORDERWND));
+ db_set_b(NULL, "CList", "ToolWindow", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_TOOLWND));
+ db_set_b(NULL, "CLUI", "ShowCaption", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SHOWCAPTION));
+ db_set_b(NULL, "CLUI", "ShowMainMenu", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SHOWMAINMENU));
+ db_set_b(NULL, "CList", "ThinBorder", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_BORDER));
+ db_set_b(NULL, "CList", "NoBorder", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_NOBORDERWND));
{
TCHAR title[256];
- GetDlgItemText(hwndDlg,IDC_TITLETEXT,title,SIZEOF(title));
- db_set_ws(NULL,"CList","TitleText",title);
+ GetDlgItemText(hwndDlg, IDC_TITLETEXT, title, SIZEOF(title));
+ db_set_ws(NULL, "CList", "TitleText", title);
}
- db_set_b(NULL,"CList","Min2Tray",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_MIN2TRAY));
- db_set_b(NULL,"CList","WindowShadow",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_DROPSHADOW));
- db_set_b(NULL,"CLC","RoundCorners",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_ROUNDCORNERS));
+ db_set_b(NULL, "CList", "Min2Tray", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_MIN2TRAY));
+ db_set_b(NULL, "CList", "WindowShadow", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_DROPSHADOW));
+ db_set_b(NULL, "CLC", "RoundCorners", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_ROUNDCORNERS));
} //====== End of Non-Layered Mode ======
g_mutex_bChangingMode = TRUE;
- if (IsDlgButtonChecked(hwndDlg,IDC_ONDESKTOP))
- {
- HWND hProgMan = FindWindow(_T("Progman"),NULL);
- if (IsWindow(hProgMan))
- {
- SetParent(pcli->hwndContactList,hProgMan);
- Sync( CLUIFrames_SetParentForContainers, (HWND)hProgMan );
+ if (IsDlgButtonChecked(hwndDlg, IDC_ONDESKTOP)) {
+ HWND hProgMan = FindWindow(_T("Progman"), NULL);
+ if (IsWindow(hProgMan)) {
+ SetParent(pcli->hwndContactList, hProgMan);
+ Sync(CLUIFrames_SetParentForContainers, (HWND)hProgMan);
g_CluiData.fOnDesktop = 1;
}
}
- else
- {
- if (GetParent(pcli->hwndContactList))
- {
- SetParent(pcli->hwndContactList,NULL);
- Sync( CLUIFrames_SetParentForContainers, (HWND)NULL );
+ else {
+ if (GetParent(pcli->hwndContactList)) {
+ SetParent(pcli->hwndContactList, NULL);
+ Sync(CLUIFrames_SetParentForContainers, (HWND)NULL);
}
g_CluiData.fOnDesktop = 0;
}
AniAva_UpdateParent();
- db_set_b(NULL,"CLUI","FadeInOut",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_FADEINOUT));
- g_CluiData.fSmoothAnimation = (BYTE)IsDlgButtonChecked(hwndDlg,IDC_FADEINOUT);
+ db_set_b(NULL, "CLUI", "FadeInOut", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_FADEINOUT));
+ g_CluiData.fSmoothAnimation = (BYTE)IsDlgButtonChecked(hwndDlg, IDC_FADEINOUT);
{
- int i1 = SendDlgItemMessage(hwndDlg,IDC_FRAMESSPIN,UDM_GETPOS, 0, 0);
- int i2 = SendDlgItemMessage(hwndDlg,IDC_CAPTIONSSPIN,UDM_GETPOS, 0, 0);
+ int i1 = SendDlgItemMessage(hwndDlg, IDC_FRAMESSPIN, UDM_GETPOS, 0, 0);
+ int i2 = SendDlgItemMessage(hwndDlg, IDC_CAPTIONSSPIN, UDM_GETPOS, 0, 0);
- db_set_dw(NULL,"CLUIFrames","GapBetweenFrames",(DWORD)i1);
- db_set_dw(NULL,"CLUIFrames","GapBetweenTitleBar",(DWORD)i2);
- Sync(CLUIFramesOnClistResize, (WPARAM)pcli->hwndContactList,0);
+ db_set_dw(NULL, "CLUIFrames", "GapBetweenFrames", (DWORD)i1);
+ db_set_dw(NULL, "CLUIFrames", "GapBetweenTitleBar", (DWORD)i2);
+ Sync(CLUIFramesOnClistResize, (WPARAM)pcli->hwndContactList, 0);
}
- db_set_b(NULL,"CList","Transparent",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_TRANSPARENT));
- db_set_b(NULL,"CList","Alpha",(BYTE)SendDlgItemMessage(hwndDlg,IDC_TRANSACTIVE,TBM_GETPOS, 0, 0));
- db_set_b(NULL,"CList","AutoAlpha",(BYTE)SendDlgItemMessage(hwndDlg,IDC_TRANSINACTIVE,TBM_GETPOS, 0, 0));
- db_set_b(NULL,"CList","OnDesktop",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_ONDESKTOP));
+ db_set_b(NULL, "CList", "Transparent", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_TRANSPARENT));
+ db_set_b(NULL, "CList", "Alpha", (BYTE)SendDlgItemMessage(hwndDlg, IDC_TRANSACTIVE, TBM_GETPOS, 0, 0));
+ db_set_b(NULL, "CList", "AutoAlpha", (BYTE)SendDlgItemMessage(hwndDlg, IDC_TRANSINACTIVE, TBM_GETPOS, 0, 0));
+ db_set_b(NULL, "CList", "OnDesktop", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_ONDESKTOP));
ske_LoadSkinFromDB();
CLUI_UpdateLayeredMode();
CLUI_ChangeWindowMode();
- SendMessage(pcli->hwndContactTree,WM_SIZE, 0, 0); //forces it to send a cln_listsizechanged
+ SendMessage(pcli->hwndContactTree, WM_SIZE, 0, 0); //forces it to send a cln_listsizechanged
CLUI_ReloadCLUIOptions();
cliShowHide(0, 1);
g_mutex_bChangingMode = FALSE;
@@ -1411,11 +1333,10 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP
return FALSE;
}
-#include "hdr/modern_commonheaders.h"
+/////////////////////////////////////////////////////////////////////////////////////////
#define CLBF_TILEVTOROWHEIGHT 0x0100
-
#define DEFAULT_BKCOLOUR GetSysColor(COLOR_3DFACE)
#define DEFAULT_USEBITMAP 0
#define DEFAULT_BKBMPUSE CLB_STRETCH
@@ -1437,9 +1358,10 @@ int bkgrCount = 0;
#define M_BKGR_TILE 0x10
static int bitmapRelatedControls[] = {
- IDC_FILENAME,IDC_BROWSE,IDC_STRETCHH,IDC_STRETCHV,IDC_TILEH,IDC_TILEV,
- IDC_SCROLL,IDC_PROPORTIONAL,IDC_TILEVROWH
+ IDC_FILENAME, IDC_BROWSE, IDC_STRETCHH, IDC_STRETCHV, IDC_TILEH, IDC_TILEV,
+ IDC_SCROLL, IDC_PROPORTIONAL, IDC_TILEVROWH
};
+
struct BkgrItem
{
BYTE changed;
@@ -1461,228 +1383,226 @@ static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
struct BkgrData *dat = (struct BkgrData *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
switch (msg) {
case WM_INITDIALOG:
- {
- int indx;
- HWND hList = GetDlgItem(hwndDlg, IDC_BKGRLIST);
TranslateDialogDefault(hwndDlg);
-
- dat = (struct BkgrData*)mir_alloc(sizeof(struct BkgrData));
- SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)dat);
- dat->count = bkgrCount;
- dat->item = (struct BkgrItem*)mir_alloc(sizeof(struct BkgrItem)*dat->count);
- dat->indx = CB_ERR;
- for (indx = 0; indx < dat->count; indx++)
{
- char *module = bkgrList[indx] + strlen(bkgrList[indx]) + 1;
- int jndx;
-
- dat->item[indx].changed = FALSE;
- dat->item[indx].useBitmap = db_get_b(NULL,module, "UseBitmap", DEFAULT_USEBITMAP);
- dat->item[indx].bkColor = db_get_dw(NULL,module, "BkColour", DEFAULT_BKCOLOUR);
- dat->item[indx].selColor = db_get_dw(NULL,module, "SelBkColour", DEFAULT_SELBKCOLOUR);
- dat->item[indx].useWinColours = db_get_b(NULL,module, "UseWinColours", CLCDEFAULT_USEWINDOWSCOLOURS);
- {
+ int indx;
+ HWND hList = GetDlgItem(hwndDlg, IDC_BKGRLIST);
+
+ dat = (struct BkgrData*)mir_alloc(sizeof(struct BkgrData));
+ SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)dat);
+ dat->count = bkgrCount;
+ dat->item = (struct BkgrItem*)mir_alloc(sizeof(struct BkgrItem)*dat->count);
+ dat->indx = CB_ERR;
+ for (indx = 0; indx < dat->count; indx++) {
+ char *module = bkgrList[indx] + strlen(bkgrList[indx]) + 1;
+ int jndx;
+
+ dat->item[indx].changed = FALSE;
+ dat->item[indx].useBitmap = db_get_b(NULL, module, "UseBitmap", DEFAULT_USEBITMAP);
+ dat->item[indx].bkColor = db_get_dw(NULL, module, "BkColour", DEFAULT_BKCOLOUR);
+ dat->item[indx].selColor = db_get_dw(NULL, module, "SelBkColour", DEFAULT_SELBKCOLOUR);
+ dat->item[indx].useWinColours = db_get_b(NULL, module, "UseWinColours", CLCDEFAULT_USEWINDOWSCOLOURS);
+
DBVARIANT dbv;
- if ( !db_get_s(NULL,module,"BkBitmap",&dbv))
- {
+ if (!db_get_s(NULL, module, "BkBitmap", &dbv)) {
int retval = PathToAbsolute(dbv.pszVal, dat->item[indx].filename);
- if ( !retval || retval == CALLSERVICE_NOTFOUND)
+ if (!retval || retval == CALLSERVICE_NOTFOUND)
lstrcpynA(dat->item[indx].filename, dbv.pszVal, MAX_PATH);
mir_free(dbv.pszVal);
}
- else
- *dat->item[indx].filename = 0;
+ else *dat->item[indx].filename = 0;
+
+ dat->item[indx].flags = db_get_w(NULL, module, "BkBmpUse", DEFAULT_BKBMPUSE);
+ jndx = SendMessageA(hList, CB_ADDSTRING, 0, (LPARAM)Translate(bkgrList[indx]));
+ SendMessage(hList, CB_SETITEMDATA, jndx, indx);
}
- dat->item[indx].flags = db_get_w(NULL,module,"BkBmpUse", DEFAULT_BKBMPUSE);
- jndx = SendMessageA(hList, CB_ADDSTRING, 0, (LPARAM)Translate(bkgrList[indx]));
- SendMessage(hList, CB_SETITEMDATA, jndx, indx);
+ SendMessage(hList, CB_SETCURSEL, 0, 0);
+ PostMessage(hwndDlg, WM_COMMAND, MAKEWPARAM(IDC_BKGRLIST, CBN_SELCHANGE), 0);
+ SHAutoComplete(GetDlgItem(hwndDlg, IDC_FILENAME), 1);
}
- SendMessage(hList, CB_SETCURSEL, 0, 0);
- PostMessage(hwndDlg, WM_COMMAND, MAKEWPARAM(IDC_BKGRLIST, CBN_SELCHANGE), 0);
- SHAutoComplete(GetDlgItem(hwndDlg, IDC_FILENAME), 1);
return TRUE;
- }
+
case WM_DESTROY:
if (dat) {
mir_free(dat->item);
mir_free(dat);
}
-
return TRUE;
case M_BKGR_GETSTATE:
- {
- int indx = wParam;
- if (indx == CB_ERR || indx >= dat->count) break;
- indx = SendDlgItemMessage(hwndDlg, IDC_BKGRLIST, CB_GETITEMDATA, indx, 0);
+ {
+ int indx = wParam;
+ if (indx == CB_ERR || indx >= dat->count)
+ break;
- dat->item[indx].useBitmap = IsDlgButtonChecked(hwndDlg,IDC_BITMAP);
- dat->item[indx].useWinColours = IsDlgButtonChecked(hwndDlg,IDC_USEWINCOL);
- dat->item[indx].bkColor = SendDlgItemMessage(hwndDlg, IDC_BKGCOLOUR, CPM_GETCOLOUR, 0, 0);
- dat->item[indx].selColor = SendDlgItemMessage(hwndDlg, IDC_SELCOLOUR, CPM_GETCOLOUR, 0, 0);
+ indx = SendDlgItemMessage(hwndDlg, IDC_BKGRLIST, CB_GETITEMDATA, indx, 0);
+
+ dat->item[indx].useBitmap = IsDlgButtonChecked(hwndDlg, IDC_BITMAP);
+ dat->item[indx].useWinColours = IsDlgButtonChecked(hwndDlg, IDC_USEWINCOL);
+ dat->item[indx].bkColor = SendDlgItemMessage(hwndDlg, IDC_BKGCOLOUR, CPM_GETCOLOUR, 0, 0);
+ dat->item[indx].selColor = SendDlgItemMessage(hwndDlg, IDC_SELCOLOUR, CPM_GETCOLOUR, 0, 0);
+
+ GetDlgItemTextA(hwndDlg, IDC_FILENAME, dat->item[indx].filename, SIZEOF(dat->item[indx].filename));
- GetDlgItemTextA(hwndDlg, IDC_FILENAME, dat->item[indx].filename, SIZEOF(dat->item[indx].filename));
- {
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;
- if (IsDlgButtonChecked(hwndDlg,IDC_TILEVROWH)) flags |= CLBF_TILEVTOROWHEIGHT;
+ 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;
+ if (IsDlgButtonChecked(hwndDlg, IDC_TILEVROWH)) flags |= CLBF_TILEVTOROWHEIGHT;
dat->item[indx].flags = flags;
}
break;
- }
+
case M_BKGR_SETSTATE:
- {
- int flags;
- int indx = wParam;
- if (indx == -1) break;
- flags = dat->item[indx].flags;
- if (indx == CB_ERR || indx >= dat->count) break;
- indx = SendDlgItemMessage(hwndDlg, IDC_BKGRLIST, CB_GETITEMDATA, indx, 0);
-
- CheckDlgButton(hwndDlg, IDC_BITMAP, dat->item[indx].useBitmap?BST_CHECKED:BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_USEWINCOL, dat->item[indx].useWinColours?BST_CHECKED:BST_UNCHECKED);
-
- EnableWindow(GetDlgItem(hwndDlg,IDC_BKGCOLOUR), !dat->item[indx].useWinColours);
- EnableWindow(GetDlgItem(hwndDlg,IDC_SELCOLOUR), !dat->item[indx].useWinColours);
-
- SendDlgItemMessage(hwndDlg, IDC_BKGCOLOUR, CPM_SETDEFAULTCOLOUR, 0, DEFAULT_BKCOLOUR);
- SendDlgItemMessage(hwndDlg, IDC_BKGCOLOUR, CPM_SETCOLOUR, 0, dat->item[indx].bkColor);
- SendDlgItemMessage(hwndDlg, IDC_SELCOLOUR, CPM_SETDEFAULTCOLOUR, 0, DEFAULT_SELBKCOLOUR);
- SendDlgItemMessage(hwndDlg, IDC_SELCOLOUR, CPM_SETCOLOUR, 0, dat->item[indx].selColor);
- SetDlgItemTextA(hwndDlg, IDC_FILENAME, dat->item[indx].filename);
-
- CheckDlgButton(hwndDlg,IDC_STRETCHH, flags&CLB_STRETCHH?BST_CHECKED:BST_UNCHECKED);
- CheckDlgButton(hwndDlg,IDC_STRETCHV,flags&CLB_STRETCHV?BST_CHECKED:BST_UNCHECKED);
- CheckDlgButton(hwndDlg,IDC_TILEH,flags&CLBF_TILEH?BST_CHECKED:BST_UNCHECKED);
- CheckDlgButton(hwndDlg,IDC_TILEV,flags&CLBF_TILEV?BST_CHECKED:BST_UNCHECKED);
- CheckDlgButton(hwndDlg,IDC_SCROLL,flags&CLBF_SCROLL?BST_CHECKED:BST_UNCHECKED);
- CheckDlgButton(hwndDlg,IDC_PROPORTIONAL,flags&CLBF_PROPORTIONAL?BST_CHECKED:BST_UNCHECKED);
- CheckDlgButton(hwndDlg,IDC_TILEVROWH,flags&CLBF_TILEVTOROWHEIGHT?BST_CHECKED:BST_UNCHECKED);
-
- SendMessage(hwndDlg, M_BKGR_UPDATE, 0, 0);
+ {
+ int flags;
+ int indx = wParam;
+ if (indx == -1) break;
+ flags = dat->item[indx].flags;
+ if (indx == CB_ERR || indx >= dat->count) break;
+ indx = SendDlgItemMessage(hwndDlg, IDC_BKGRLIST, CB_GETITEMDATA, indx, 0);
+
+ CheckDlgButton(hwndDlg, IDC_BITMAP, dat->item[indx].useBitmap ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_USEWINCOL, dat->item[indx].useWinColours ? BST_CHECKED : BST_UNCHECKED);
+
+ EnableWindow(GetDlgItem(hwndDlg, IDC_BKGCOLOUR), !dat->item[indx].useWinColours);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_SELCOLOUR), !dat->item[indx].useWinColours);
+
+ SendDlgItemMessage(hwndDlg, IDC_BKGCOLOUR, CPM_SETDEFAULTCOLOUR, 0, DEFAULT_BKCOLOUR);
+ SendDlgItemMessage(hwndDlg, IDC_BKGCOLOUR, CPM_SETCOLOUR, 0, dat->item[indx].bkColor);
+ SendDlgItemMessage(hwndDlg, IDC_SELCOLOUR, CPM_SETDEFAULTCOLOUR, 0, DEFAULT_SELBKCOLOUR);
+ SendDlgItemMessage(hwndDlg, IDC_SELCOLOUR, CPM_SETCOLOUR, 0, dat->item[indx].selColor);
+ SetDlgItemTextA(hwndDlg, IDC_FILENAME, dat->item[indx].filename);
+
+ CheckDlgButton(hwndDlg, IDC_STRETCHH, flags&CLB_STRETCHH ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_STRETCHV, flags&CLB_STRETCHV ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_TILEH, flags&CLBF_TILEH ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_TILEV, flags&CLBF_TILEV ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_SCROLL, flags&CLBF_SCROLL ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_PROPORTIONAL, flags&CLBF_PROPORTIONAL ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_TILEVROWH, flags&CLBF_TILEVTOROWHEIGHT ? BST_CHECKED : BST_UNCHECKED);
+
+ SendMessage(hwndDlg, M_BKGR_UPDATE, 0, 0);
+ }
break;
- }
+
case M_BKGR_UPDATE:
- {
- int isChecked = IsDlgButtonChecked(hwndDlg,IDC_BITMAP);
- int indx;
- for (indx = 0; indx < SIZEOF(bitmapRelatedControls); indx++)
- EnableWindow(GetDlgItem(hwndDlg, bitmapRelatedControls[indx]),isChecked);
+ {
+ int isChecked = IsDlgButtonChecked(hwndDlg, IDC_BITMAP);
+ for (int indx = 0; indx < SIZEOF(bitmapRelatedControls); indx++)
+ EnableWindow(GetDlgItem(hwndDlg, bitmapRelatedControls[indx]), isChecked);
+ }
break;
- }
+
case WM_COMMAND:
- if (LOWORD(wParam) == IDC_BROWSE)
- {
- char str[MAX_PATH];
- OPENFILENAMEA ofn = {0};
- char filter[512];
+ if (LOWORD(wParam) == IDC_BROWSE) {
+ TCHAR str[MAX_PATH];
+ TCHAR filter[512];
- GetDlgItemTextA(hwndDlg,IDC_FILENAME, str, SIZEOF(str));
+ OPENFILENAME ofn = { 0 };
+ GetDlgItemText(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);
+ CallService(MS_UTILS_GETBITMAPFILTERSTRINGST, 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);
+ ofn.lpstrDefExt = _T("bmp");
+ if (!GetOpenFileName(&ofn))
+ break;
+
+ SetDlgItemText(hwndDlg, IDC_FILENAME, str);
}
- else
- if (LOWORD(wParam) == IDC_FILENAME && HIWORD(wParam) != EN_CHANGE) break;
+ else if (LOWORD(wParam) == IDC_FILENAME && HIWORD(wParam) != EN_CHANGE)
+ break;
+
if (LOWORD(wParam) == IDC_BITMAP)
SendMessage(hwndDlg, M_BKGR_UPDATE, 0, 0);
if (LOWORD(wParam) == IDC_FILENAME && (HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus()))
return 0;
- if (LOWORD(wParam) == IDC_BKGRLIST)
- {
- if (HIWORD(wParam) == CBN_SELCHANGE)
- {
+
+ if (LOWORD(wParam) == IDC_BKGRLIST) {
+ if (HIWORD(wParam) == CBN_SELCHANGE) {
SendMessage(hwndDlg, M_BKGR_GETSTATE, dat->indx, 0);
SendMessage(hwndDlg, M_BKGR_SETSTATE, dat->indx = SendDlgItemMessage(hwndDlg, IDC_BKGRLIST, CB_GETCURSEL, 0, 0), 0);
}
return 0;
}
- {
+ else {
int indx = SendDlgItemMessage(hwndDlg, IDC_BKGRLIST, CB_GETCURSEL, 0, 0);
- if (indx != CB_ERR && indx < dat->count)
- {
+ if (indx != CB_ERR && indx < dat->count) {
indx = SendDlgItemMessage(hwndDlg, IDC_BKGRLIST, CB_GETITEMDATA, indx, 0);
dat->item[indx].changed = TRUE;
-
- }
- {
- BOOL EnableColours = !IsDlgButtonChecked(hwndDlg,IDC_USEWINCOL);
- EnableWindow(GetDlgItem(hwndDlg,IDC_BKGCOLOUR), EnableColours);
- EnableWindow(GetDlgItem(hwndDlg,IDC_SELCOLOUR), EnableColours);
}
+
+ BOOL EnableColours = !IsDlgButtonChecked(hwndDlg, IDC_USEWINCOL);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_BKGCOLOUR), EnableColours);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_SELCOLOUR), EnableColours);
+
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
}
break;
+
case WM_NOTIFY:
- switch(((LPNMHDR)lParam)->idFrom) {
+ switch (((LPNMHDR)lParam)->idFrom) {
case 0:
switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
SendMessage(hwndDlg, M_BKGR_GETSTATE, SendDlgItemMessage(hwndDlg, IDC_BKGRLIST, CB_GETCURSEL, 0, 0), 0);
- {
- for (int indx = 0; indx < dat->count; indx++)
- if (dat->item[indx].changed)
- {
- char *module = bkgrList[indx] + strlen(bkgrList[indx]) + 1;
- db_set_b(NULL, module, "UseBitmap", (BYTE)dat->item[indx].useBitmap);
-
- COLORREF col;
- if ((col = dat->item[indx].bkColor) == DEFAULT_BKCOLOUR)
- db_unset(NULL, module, "BkColour");
- else
- db_set_dw(NULL, module, "BkColour", col);
-
- if ((col = dat->item[indx].selColor) == DEFAULT_SELBKCOLOUR)
- db_unset(NULL, module, "SelBkColour");
- else
- db_set_dw(NULL, module, "SelBkColour", col);
-
- db_set_b(NULL, module, "UseWinColours", (BYTE)dat->item[indx].useWinColours);
-
- char str[MAX_PATH];
- int retval = PathToAbsolute(dat->item[indx].filename, str);
- if ( !retval || retval == CALLSERVICE_NOTFOUND)
- db_set_s(NULL, module, "BkBitmap", dat->item[indx].filename);
- else
- db_set_s(NULL, module, "BkBitmap", str);
-
- db_set_w(NULL, module, "BkBmpUse", dat->item[indx].flags);
- dat->item[indx].changed = FALSE;
- NotifyEventHooks(g_CluiData.hEventBkgrChanged, (WPARAM)module, 0);
- }
- return TRUE;
+
+ for (int indx = 0; indx < dat->count; indx++) {
+ BkgrItem &p = dat->item[indx];
+ if (!p.changed)
+ continue;
+
+ char *module = bkgrList[indx] + strlen(bkgrList[indx]) + 1;
+ db_set_b(NULL, module, "UseBitmap", (BYTE)p.useBitmap);
+
+ COLORREF col;
+ if ((col = p.bkColor) == DEFAULT_BKCOLOUR)
+ db_unset(NULL, module, "BkColour");
+ else
+ db_set_dw(NULL, module, "BkColour", col);
+
+ if ((col = p.selColor) == DEFAULT_SELBKCOLOUR)
+ db_unset(NULL, module, "SelBkColour");
+ else
+ db_set_dw(NULL, module, "SelBkColour", col);
+
+ db_set_b(NULL, module, "UseWinColours", (BYTE)p.useWinColours);
+
+ char str[MAX_PATH];
+ int retval = PathToAbsolute(p.filename, str);
+ if (!retval || retval == CALLSERVICE_NOTFOUND)
+ db_set_s(NULL, module, "BkBitmap", p.filename);
+ else
+ db_set_s(NULL, module, "BkBitmap", str);
+
+ db_set_w(NULL, module, "BkBmpUse", p.flags);
+ p.changed = FALSE;
+ NotifyEventHooks(g_CluiData.hEventBkgrChanged, (WPARAM)module, 0);
}
+ return TRUE;
}
- break;
}
break;
}
return FALSE;
}
-static INT_PTR BkgrCfg_Register(WPARAM wParam,LPARAM lParam)
+static INT_PTR BkgrCfg_Register(WPARAM wParam, LPARAM lParam)
{
- char *szSetting = (char *)wParam;
- char *value, *tok;
+ char *szSetting = (char*)wParam;
int len = strlen(szSetting) + 1;
- value = (char *)mir_alloc(len + 4); // add room for flags (DWORD)
+ char *value = (char *)mir_alloc(len + 4); // add room for flags (DWORD)
memcpy(value, szSetting, len);
- tok = strchr(value, '/');
+ char *tok = strchr(value, '/');
if (tok == NULL) {
mir_free(value);
return 1;
@@ -1690,7 +1610,7 @@ static INT_PTR BkgrCfg_Register(WPARAM wParam,LPARAM lParam)
*tok = 0;
*(DWORD*)(value + len) = lParam;
- bkgrList = (char **)mir_realloc(bkgrList, sizeof(char*)*(bkgrCount+1));
+ bkgrList = (char **)mir_realloc(bkgrList, sizeof(char*)*(bkgrCount + 1));
bkgrList[bkgrCount] = value;
bkgrCount++;
return 0;
@@ -1706,19 +1626,15 @@ int BackgroundsUnloadModule(void)
{
if (bkgrList != NULL) {
for (int indx = 0; indx < bkgrCount; indx++)
- if (bkgrList[indx] != NULL)
- mir_free(bkgrList[indx]);
+ mir_free(bkgrList[indx]);
mir_free(bkgrList);
}
DestroyHookableEvent(g_CluiData.hEventBkgrChanged);
g_CluiData.hEventBkgrChanged = NULL;
-
return 0;
}
-
-
-
+/////////////////////////////////////////////////////////////////////////////////////////
enum
{
@@ -1756,11 +1672,9 @@ struct OptCheckBox
DWORD OptCheckBox_LoadValue(struct OptCheckBox *cb)
{
- switch (cb->valueType)
- {
+ switch (cb->valueType) {
case CBVT_NONE:
- switch (cb->dbType)
- {
+ switch (cb->dbType) {
case DBVT_BYTE:
return db_get_b(NULL, cb->dbModule, cb->dbSetting, cb->defValue);
case DBVT_WORD:
@@ -1788,7 +1702,7 @@ DWORD OptCheckBox_LoadValue(struct OptCheckBox *cb)
void OptCheckBox_Load(HWND hwnd, struct OptCheckBox *cb)
{
DWORD value = OptCheckBox_LoadValue(cb);
- if (cb->dwBit) value &= cb->dwBit;
+ if (cb->dwBit) value &= cb->dwBit;
CheckDlgButton(hwnd, cb->idc, value ? BST_CHECKED : BST_UNCHECKED);
}
@@ -1832,78 +1746,76 @@ void OptCheckBox_Save(HWND hwnd, struct OptCheckBox *cb)
}
}
-static struct OptCheckBox opts[] =
+static struct OptCheckBox opts[] =
{
//{IDC_, def, bit, dbtype, dbmodule, dbsetting, valtype, pval},
- { IDC_ONTOP, SETTING_ONTOP_DEFAULT, 0, DBVT_BYTE, "CList", "OnTop"},
- { IDC_SHOWPROTO, SETTING_SBARSHOW_DEFAULT, 2, DBVT_BYTE, "CLUI","SBarShow"},
- { IDC_SHOWSTATUS, SETTING_SBARSHOW_DEFAULT, 4, DBVT_BYTE, "CLUI","SBarShow"},
- { IDC_AUTOHIDE, SETTING_AUTOHIDE_DEFAULT, 0, DBVT_BYTE, "CList", "AutoHide"},
- { IDC_FADEINOUT, SETTING_FADEIN_DEFAULT, 0, DBVT_BYTE, "CLUI", "FadeInOut"},
- { IDC_TRANSPARENT, SETTING_TRANSPARENT_DEFAULT, 0, DBVT_BYTE, "CList", "Transparent"},
- { IDC_SHOWGROUPCOUNTS, GetDefaultExStyle(), CLS_EX_SHOWGROUPCOUNTS, DBVT_DWORD, "CLC", "ExStyle"},
- { IDC_HIDECOUNTSWHENEMPTY, GetDefaultExStyle(), CLS_EX_HIDECOUNTSWHENEMPTY, DBVT_DWORD, "CLC", "ExStyle"},
- { IDC_MINIMODE, SETTING_COMPACTMODE_DEFAULT, 0, DBVT_BYTE, "CLC", "CompactMode"},
- { IDC_SHOW_AVATARS, SETTINGS_SHOWAVATARS_DEFAULT, 0, DBVT_BYTE, "CList","AvatarsShow"},
- { IDC_SHOW_ANIAVATARS, FALSE, 0, DBVT_BYTE, "CList","AvatarsAnimated"},
- { IDC_SHOW, SETTING_SHOWTIME_DEFAULT, 0, DBVT_BYTE, "CList", "ContactTimeShow"},
+ { IDC_ONTOP, SETTING_ONTOP_DEFAULT, 0, DBVT_BYTE, "CList", "OnTop" },
+ { IDC_SHOWPROTO, SETTING_SBARSHOW_DEFAULT, 2, DBVT_BYTE, "CLUI", "SBarShow" },
+ { IDC_SHOWSTATUS, SETTING_SBARSHOW_DEFAULT, 4, DBVT_BYTE, "CLUI", "SBarShow" },
+ { IDC_AUTOHIDE, SETTING_AUTOHIDE_DEFAULT, 0, DBVT_BYTE, "CList", "AutoHide" },
+ { IDC_FADEINOUT, SETTING_FADEIN_DEFAULT, 0, DBVT_BYTE, "CLUI", "FadeInOut" },
+ { IDC_TRANSPARENT, SETTING_TRANSPARENT_DEFAULT, 0, DBVT_BYTE, "CList", "Transparent" },
+ { IDC_SHOWGROUPCOUNTS, GetDefaultExStyle(), CLS_EX_SHOWGROUPCOUNTS, DBVT_DWORD, "CLC", "ExStyle" },
+ { IDC_HIDECOUNTSWHENEMPTY, GetDefaultExStyle(), CLS_EX_HIDECOUNTSWHENEMPTY, DBVT_DWORD, "CLC", "ExStyle" },
+ { IDC_MINIMODE, SETTING_COMPACTMODE_DEFAULT, 0, DBVT_BYTE, "CLC", "CompactMode" },
+ { IDC_SHOW_AVATARS, SETTINGS_SHOWAVATARS_DEFAULT, 0, DBVT_BYTE, "CList", "AvatarsShow" },
+ { IDC_SHOW_ANIAVATARS, FALSE, 0, DBVT_BYTE, "CList", "AvatarsAnimated" },
+ { IDC_SHOW, SETTING_SHOWTIME_DEFAULT, 0, DBVT_BYTE, "CList", "ContactTimeShow" },
};
static INT_PTR CALLBACK DlgProcModernOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
static bool bInit = true;
+ char str[10];
switch (msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
bInit = true;
{
- int i=0;
- int item;
- int s1, s2, s3;
-
- for (i=0; i < SIZEOF(opts); ++i)
- OptCheckBox_Load(hwndDlg, opts+i);
-
- EnableWindow(GetDlgItem(hwndDlg,IDC_HIDETIME),IsDlgButtonChecked(hwndDlg,IDC_AUTOHIDE));
- EnableWindow(GetDlgItem(hwndDlg,IDC_HIDETIMESPIN),IsDlgButtonChecked(hwndDlg,IDC_AUTOHIDE));
- SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN,UDM_SETRANGE, 0, MAKELONG(900, 1));
- SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN,UDM_SETPOS, 0, MAKELONG(db_get_w(NULL,"CList","HideTime",SETTING_HIDETIME_DEFAULT),0));
-
- if ( !IsDlgButtonChecked(hwndDlg,IDC_TRANSPARENT)) {
- EnableWindow(GetDlgItem(hwndDlg,IDC_STATIC11),FALSE);
- EnableWindow(GetDlgItem(hwndDlg,IDC_STATIC12),FALSE);
- EnableWindow(GetDlgItem(hwndDlg,IDC_TRANSACTIVE),FALSE);
- EnableWindow(GetDlgItem(hwndDlg,IDC_TRANSINACTIVE),FALSE);
- EnableWindow(GetDlgItem(hwndDlg,IDC_ACTIVEPERC),FALSE);
- EnableWindow(GetDlgItem(hwndDlg,IDC_INACTIVEPERC),FALSE);
+ int i, item;
+ for (i = 0; i < SIZEOF(opts); ++i)
+ OptCheckBox_Load(hwndDlg, opts + i);
+
+ EnableWindow(GetDlgItem(hwndDlg, IDC_HIDETIME), IsDlgButtonChecked(hwndDlg, IDC_AUTOHIDE));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_HIDETIMESPIN), IsDlgButtonChecked(hwndDlg, IDC_AUTOHIDE));
+ SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN, UDM_SETRANGE, 0, MAKELONG(900, 1));
+ SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN, UDM_SETPOS, 0, MAKELONG(db_get_w(NULL, "CList", "HideTime", SETTING_HIDETIME_DEFAULT), 0));
+
+ if (!IsDlgButtonChecked(hwndDlg, IDC_TRANSPARENT)) {
+ EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC11), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC12), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_TRANSACTIVE), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_TRANSINACTIVE), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_ACTIVEPERC), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_INACTIVEPERC), FALSE);
}
- SendDlgItemMessage(hwndDlg,IDC_TRANSACTIVE,TBM_SETRANGE,FALSE,MAKELONG(1,255));
- SendDlgItemMessage(hwndDlg,IDC_TRANSINACTIVE,TBM_SETRANGE,FALSE,MAKELONG(1,255));
- SendDlgItemMessage(hwndDlg,IDC_TRANSACTIVE,TBM_SETPOS,TRUE,db_get_b(NULL,"CList","Alpha",SETTING_ALPHA_DEFAULT));
- SendDlgItemMessage(hwndDlg,IDC_TRANSINACTIVE,TBM_SETPOS,TRUE,db_get_b(NULL,"CList","AutoAlpha",SETTING_AUTOALPHA_DEFAULT));
- SendMessage(hwndDlg,WM_HSCROLL,0x12345678,0);
-
- for (i=0; i < SIZEOF(sortby); i++) {
- item = SendDlgItemMessage(hwndDlg,IDC_CLSORT1,CB_ADDSTRING, 0, (LPARAM)TranslateTS(sortby[i]));
- SendDlgItemMessage(hwndDlg,IDC_CLSORT1,CB_SETITEMDATA,item,0);
- item = SendDlgItemMessage(hwndDlg,IDC_CLSORT2,CB_ADDSTRING, 0, (LPARAM)TranslateTS(sortby[i]));
- SendDlgItemMessage(hwndDlg,IDC_CLSORT2,CB_SETITEMDATA,item,0);
- item = SendDlgItemMessage(hwndDlg,IDC_CLSORT3,CB_ADDSTRING, 0, (LPARAM)TranslateTS(sortby[i]));
- SendDlgItemMessage(hwndDlg,IDC_CLSORT3,CB_SETITEMDATA,item,0);
+ SendDlgItemMessage(hwndDlg, IDC_TRANSACTIVE, TBM_SETRANGE, FALSE, MAKELONG(1, 255));
+ SendDlgItemMessage(hwndDlg, IDC_TRANSINACTIVE, TBM_SETRANGE, FALSE, MAKELONG(1, 255));
+ SendDlgItemMessage(hwndDlg, IDC_TRANSACTIVE, TBM_SETPOS, TRUE, db_get_b(NULL, "CList", "Alpha", SETTING_ALPHA_DEFAULT));
+ SendDlgItemMessage(hwndDlg, IDC_TRANSINACTIVE, TBM_SETPOS, TRUE, db_get_b(NULL, "CList", "AutoAlpha", SETTING_AUTOALPHA_DEFAULT));
+ SendMessage(hwndDlg, WM_HSCROLL, 0x12345678, 0);
+
+ for (i = 0; i < SIZEOF(sortby); i++) {
+ item = SendDlgItemMessage(hwndDlg, IDC_CLSORT1, CB_ADDSTRING, 0, (LPARAM)TranslateTS(sortby[i]));
+ SendDlgItemMessage(hwndDlg, IDC_CLSORT1, CB_SETITEMDATA, item, 0);
+ item = SendDlgItemMessage(hwndDlg, IDC_CLSORT2, CB_ADDSTRING, 0, (LPARAM)TranslateTS(sortby[i]));
+ SendDlgItemMessage(hwndDlg, IDC_CLSORT2, CB_SETITEMDATA, item, 0);
+ item = SendDlgItemMessage(hwndDlg, IDC_CLSORT3, CB_ADDSTRING, 0, (LPARAM)TranslateTS(sortby[i]));
+ SendDlgItemMessage(hwndDlg, IDC_CLSORT3, CB_SETITEMDATA, item, 0);
}
- s1 = db_get_b(NULL,"CList","SortBy1",SETTING_SORTBY1_DEFAULT);
- s2 = db_get_b(NULL,"CList","SortBy2",SETTING_SORTBY2_DEFAULT);
- s3 = db_get_b(NULL,"CList","SortBy3",SETTING_SORTBY3_DEFAULT);
+ int s1 = db_get_b(NULL, "CList", "SortBy1", SETTING_SORTBY1_DEFAULT);
+ int s2 = db_get_b(NULL, "CList", "SortBy2", SETTING_SORTBY2_DEFAULT);
+ int s3 = db_get_b(NULL, "CList", "SortBy3", SETTING_SORTBY3_DEFAULT);
- for (i=0; i < SIZEOF(sortby); i++) {
+ for (i = 0; i < SIZEOF(sortby); i++) {
if (s1 == sortbyValue[i])
- SendDlgItemMessage(hwndDlg,IDC_CLSORT1,CB_SETCURSEL,i,0);
+ SendDlgItemMessage(hwndDlg, IDC_CLSORT1, CB_SETCURSEL, i, 0);
if (s2 == sortbyValue[i])
- SendDlgItemMessage(hwndDlg,IDC_CLSORT2,CB_SETCURSEL,i,0);
+ SendDlgItemMessage(hwndDlg, IDC_CLSORT2, CB_SETCURSEL, i, 0);
if (s3 == sortbyValue[i])
- SendDlgItemMessage(hwndDlg,IDC_CLSORT3,CB_SETCURSEL,i,0);
+ SendDlgItemMessage(hwndDlg, IDC_CLSORT3, CB_SETCURSEL, i, 0);
}
bInit = false;
@@ -1915,75 +1827,71 @@ static INT_PTR CALLBACK DlgProcModernOptions(HWND hwndDlg, UINT msg, WPARAM wPar
break;
case WM_HSCROLL:
- {
- char str[10];
- mir_snprintf(str, SIZEOF(str), "%d%%", 100 * SendDlgItemMessage(hwndDlg, IDC_TRANSINACTIVE, TBM_GETPOS, 0, 0) / 255);
- SetDlgItemTextA(hwndDlg,IDC_INACTIVEPERC,str);
- mir_snprintf(str, SIZEOF(str), "%d%%", 100 * SendDlgItemMessage(hwndDlg, IDC_TRANSACTIVE, TBM_GETPOS, 0, 0) / 255);
- SetDlgItemTextA(hwndDlg,IDC_ACTIVEPERC,str);
- if (wParam != 0x12345678)
- if ( !bInit) SendMessage(GetParent(hwndDlg), PSM_CHANGED, (WPARAM)hwndDlg, 0);
- }
+ mir_snprintf(str, SIZEOF(str), "%d%%", 100 * SendDlgItemMessage(hwndDlg, IDC_TRANSINACTIVE, TBM_GETPOS, 0, 0) / 255);
+ SetDlgItemTextA(hwndDlg, IDC_INACTIVEPERC, str);
+ mir_snprintf(str, SIZEOF(str), "%d%%", 100 * SendDlgItemMessage(hwndDlg, IDC_TRANSACTIVE, TBM_GETPOS, 0, 0) / 255);
+ SetDlgItemTextA(hwndDlg, IDC_ACTIVEPERC, str);
+ if (wParam != 0x12345678 && !bInit)
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, (WPARAM)hwndDlg, 0);
break;
case WM_COMMAND:
switch (LOWORD(wParam)) {
case IDC_AUTOHIDE:
- EnableWindow(GetDlgItem(hwndDlg,IDC_HIDETIME),IsDlgButtonChecked(hwndDlg,IDC_AUTOHIDE));
- EnableWindow(GetDlgItem(hwndDlg,IDC_HIDETIMESPIN),IsDlgButtonChecked(hwndDlg,IDC_AUTOHIDE));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_HIDETIME), IsDlgButtonChecked(hwndDlg, IDC_AUTOHIDE));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_HIDETIMESPIN), IsDlgButtonChecked(hwndDlg, IDC_AUTOHIDE));
break;
+
case IDC_TRANSPARENT:
- EnableWindow(GetDlgItem(hwndDlg,IDC_STATIC11),IsDlgButtonChecked(hwndDlg,IDC_TRANSPARENT));
- EnableWindow(GetDlgItem(hwndDlg,IDC_STATIC12),IsDlgButtonChecked(hwndDlg,IDC_TRANSPARENT));
- EnableWindow(GetDlgItem(hwndDlg,IDC_TRANSACTIVE),IsDlgButtonChecked(hwndDlg,IDC_TRANSPARENT));
- EnableWindow(GetDlgItem(hwndDlg,IDC_TRANSINACTIVE),IsDlgButtonChecked(hwndDlg,IDC_TRANSPARENT));
- EnableWindow(GetDlgItem(hwndDlg,IDC_ACTIVEPERC),IsDlgButtonChecked(hwndDlg,IDC_TRANSPARENT));
- EnableWindow(GetDlgItem(hwndDlg,IDC_INACTIVEPERC),IsDlgButtonChecked(hwndDlg,IDC_TRANSPARENT));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC11), IsDlgButtonChecked(hwndDlg, IDC_TRANSPARENT));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC12), IsDlgButtonChecked(hwndDlg, IDC_TRANSPARENT));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_TRANSACTIVE), IsDlgButtonChecked(hwndDlg, IDC_TRANSPARENT));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_TRANSINACTIVE), IsDlgButtonChecked(hwndDlg, IDC_TRANSPARENT));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_ACTIVEPERC), IsDlgButtonChecked(hwndDlg, IDC_TRANSPARENT));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_INACTIVEPERC), IsDlgButtonChecked(hwndDlg, IDC_TRANSPARENT));
break;
}
- if ( !bInit) SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ if (!bInit)
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
case WM_NOTIFY:
- switch (((LPNMHDR) lParam)->idFrom) {
+ switch (((LPNMHDR)lParam)->idFrom) {
case 0:
- switch (((LPNMHDR) lParam)->code) {
+ switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
g_mutex_bChangingMode = TRUE;
- {
- for (int i=0; i < SIZEOF(opts); ++i)
- OptCheckBox_Save(hwndDlg, opts+i);
-
- SetWindowPos(pcli->hwndContactList, IsDlgButtonChecked(hwndDlg,IDC_ONTOP)?HWND_TOPMOST:HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
- db_set_w(NULL,"CList","HideTime",(WORD)SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN,UDM_GETPOS, 0, 0));
-
- db_set_b(NULL,"CList","Alpha",(BYTE)SendDlgItemMessage(hwndDlg,IDC_TRANSACTIVE,TBM_GETPOS, 0, 0));
- db_set_b(NULL,"CList","AutoAlpha",(BYTE)SendDlgItemMessage(hwndDlg,IDC_TRANSINACTIVE,TBM_GETPOS, 0, 0));
- {
- int s1 = SendDlgItemMessage(hwndDlg,IDC_CLSORT1,CB_GETCURSEL, 0, 0);
- int s2 = SendDlgItemMessage(hwndDlg,IDC_CLSORT2,CB_GETCURSEL, 0, 0);
- int s3 = SendDlgItemMessage(hwndDlg,IDC_CLSORT3,CB_GETCURSEL, 0, 0);
- if (s1 >= 0) s1 = sortbyValue[s1];
- if (s2 >= 0) s2 = sortbyValue[s2];
- if (s3 >= 0) s3 = sortbyValue[s3];
- db_set_b(NULL,"CList","SortBy1",(BYTE)s1);
- db_set_b(NULL,"CList","SortBy2",(BYTE)s2);
- db_set_b(NULL,"CList","SortBy3",(BYTE)s3);
- }
- ClcOptionsChanged();
- AniAva_UpdateOptions();
- ske_LoadSkinFromDB();
- CLUI_UpdateLayeredMode();
- CLUI_ChangeWindowMode();
- SendMessage(pcli->hwndContactTree,WM_SIZE, 0, 0); //forces it to send a cln_listsizechanged
- CLUI_ReloadCLUIOptions();
- cliShowHide(0, 1);
- }
- g_mutex_bChangingMode = FALSE;
- return TRUE;
+ for (int i = 0; i < SIZEOF(opts); ++i)
+ OptCheckBox_Save(hwndDlg, opts + i);
+
+ SetWindowPos(pcli->hwndContactList, IsDlgButtonChecked(hwndDlg, IDC_ONTOP) ? HWND_TOPMOST : HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
+ db_set_w(NULL, "CList", "HideTime", (WORD)SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN, UDM_GETPOS, 0, 0));
+
+ db_set_b(NULL, "CList", "Alpha", (BYTE)SendDlgItemMessage(hwndDlg, IDC_TRANSACTIVE, TBM_GETPOS, 0, 0));
+ db_set_b(NULL, "CList", "AutoAlpha", (BYTE)SendDlgItemMessage(hwndDlg, IDC_TRANSINACTIVE, TBM_GETPOS, 0, 0));
+
+ int s1 = SendDlgItemMessage(hwndDlg, IDC_CLSORT1, CB_GETCURSEL, 0, 0);
+ int s2 = SendDlgItemMessage(hwndDlg, IDC_CLSORT2, CB_GETCURSEL, 0, 0);
+ int s3 = SendDlgItemMessage(hwndDlg, IDC_CLSORT3, CB_GETCURSEL, 0, 0);
+ if (s1 >= 0) s1 = sortbyValue[s1];
+ if (s2 >= 0) s2 = sortbyValue[s2];
+ if (s3 >= 0) s3 = sortbyValue[s3];
+ db_set_b(NULL, "CList", "SortBy1", (BYTE)s1);
+ db_set_b(NULL, "CList", "SortBy2", (BYTE)s2);
+ db_set_b(NULL, "CList", "SortBy3", (BYTE)s3);
+
+ ClcOptionsChanged();
+ AniAva_UpdateOptions();
+ ske_LoadSkinFromDB();
+ CLUI_UpdateLayeredMode();
+ CLUI_ChangeWindowMode();
+ SendMessage(pcli->hwndContactTree, WM_SIZE, 0, 0); //forces it to send a cln_listsizechanged
+ CLUI_ReloadCLUIOptions();
+ cliShowHide(0, 1);
}
- break;
+ g_mutex_bChangingMode = FALSE;
+ return TRUE;
}
break;
}
@@ -1991,9 +1899,11 @@ static INT_PTR CALLBACK DlgProcModernOptions(HWND hwndDlg, UINT msg, WPARAM wPar
return FALSE;
}
-int ModernOptInit(WPARAM wParam,LPARAM lParam)
+/////////////////////////////////////////////////////////////////////////////////////////
+
+int ModernOptInit(WPARAM wParam, LPARAM lParam)
{
- static int iBoldControls[] =
+ static int iBoldControls[] =
{
IDC_TXT_TITLE1, IDC_TXT_TITLE2,
IDC_TXT_TITLE3, IDC_TXT_TITLE4,
@@ -2018,3 +1928,55 @@ int ModernOptInit(WPARAM wParam,LPARAM lParam)
CallService(MS_MODERNOPT_ADDOBJECT, wParam, (LPARAM)&obj);
return 0;
}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
+struct
+{
+ char *name; // Tab name
+ int id; // Dialog id
+ DLGPROC wnd_proc; // Dialog function
+ DWORD flag; // Expertonly
+}
+static clist_opt_items[] =
+{
+ { LPGEN("General"), IDD_OPT_CLIST, DlgProcClistOpts, 0 },
+ { LPGEN("Tray"), IDD_OPT_TRAY, DlgProcTrayOpts, 0 },
+ { LPGEN("List"), IDD_OPT_CLC, DlgProcClistListOpts, 0 },
+ { LPGEN("Window"), IDD_OPT_CLUI, DlgProcClistWindowOpts, 0 },
+ { LPGEN("Behavior"), IDD_OPT_CLUI_2, DlgProcClistBehaviourOpts, 0 },
+ { LPGEN("Status Bar"), IDD_OPT_SBAR, DlgProcSBarOpts, 0 },
+ { LPGEN("Additional stuff"), IDD_OPT_META_CLC, DlgProcClistAdditionalOpts, 0 }
+};
+
+int ClcOptInit(WPARAM wParam, LPARAM lParam)
+{
+ if (MirandaExiting())
+ return 0;
+
+ OPTIONSDIALOGPAGE odp = { 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;
+ Options_AddPage(wParam, &odp);
+ }
+
+ if (g_CluiData.fDisableSkinEngine) {
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_CLIST_LISTBKG);
+ odp.pszGroup = LPGEN("Skins");
+ odp.pszTitle = LPGEN("Contact List");
+ odp.pszTab = LPGEN("List Background");
+ odp.pfnDlgProc = DlgProcClcBkgOpts;
+ odp.flags = ODPF_BOLDGROUPS;
+ Options_AddPage(wParam, &odp);
+ }
+ return 0;
+}