From adb15a53d1b4f617f30536b8f622b3eca6060af1 Mon Sep 17 00:00:00 2001 From: slotwin Date: Fri, 23 May 2014 01:31:00 +0000 Subject: Clist_modern: proper capitalization in options and menus options: fixed highlighting Apply button only when settings changed code cleanup git-svn-id: http://svn.miranda-ng.org/main/trunk@9285 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_modern/res/resource.rc | 80 ++--- plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp | 4 +- plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp | 24 +- plugins/Clist_modern/src/modern_clc.cpp | 4 +- plugins/Clist_modern/src/modern_clcopts.cpp | 71 ++-- plugins/Clist_modern/src/modern_clistevents.cpp | 2 +- plugins/Clist_modern/src/modern_clistmenus.cpp | 57 ++-- plugins/Clist_modern/src/modern_clistopts.cpp | 4 +- plugins/Clist_modern/src/modern_clisttray.cpp | 2 +- plugins/Clist_modern/src/modern_clui.cpp | 8 +- plugins/Clist_modern/src/modern_skineditor.cpp | 2 +- plugins/Clist_modern/src/modern_statusbar.cpp | 4 +- .../Clist_modern/src/modern_statusbar_options.cpp | 370 +++++++++------------ plugins/Clist_modern/src/modern_toolbar.cpp | 2 +- plugins/Clist_modern/src/modern_viewmodebar.cpp | 8 +- 15 files changed, 301 insertions(+), 341 deletions(-) (limited to 'plugins/Clist_modern') diff --git a/plugins/Clist_modern/res/resource.rc b/plugins/Clist_modern/res/resource.rc index 8633a00278..bc71f80db4 100644 --- a/plugins/Clist_modern/res/resource.rc +++ b/plugins/Clist_modern/res/resource.rc @@ -111,8 +111,8 @@ BEGIN LTEXT "Active opacity:",IDC_STATIC12,30,134,57,8 CONTROL "",IDC_TRANSACTIVE,"msctls_trackbar32",TBS_TOP | TBS_NOTICKS | WS_TABSTOP,89,131,64,14 LTEXT "000%",IDC_ACTIVEPERC,159,134,24,8,SS_NOPREFIX - CONTROL "Show Avatars",IDC_SHOW_AVATARS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,193,49,175,10 - CONTROL "Animate Avatars",IDC_SHOW_ANIAVATARS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,213,61,155,10 + CONTROL "Show avatars",IDC_SHOW_AVATARS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,193,49,175,10 + CONTROL "Animate avatars",IDC_SHOW_ANIAVATARS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,213,61,155,10 CONTROL "Show contact time in list",IDC_SHOW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,193,73,175,10 CONTROL "Compact mode",IDC_MINIMODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,193,37,175,10 CONTROL "Show protocol names",IDC_SHOWPROTO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,52,174,10 @@ -141,7 +141,7 @@ BEGIN CONTROL "Tile vertically according to row height",IDC_TILEVROWH, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,22,153,205,10 COMBOBOX IDC_BKGRLIST,4,4,226,155,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - CONTROL "Use Windows Colors",IDC_USEWINCOL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,33,213,10 + CONTROL "Use Windows colors",IDC_USEWINCOL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,33,213,10 END IDD_OPT_SKIN DIALOGEX 0, 0, 303, 220 @@ -155,7 +155,7 @@ BEGIN PUSHBUTTON "Info",IDC_BUTTON_INFO,118,170,48,12,WS_DISABLED CTEXT "\n\n\nPlease select one of available skins. \n\nOr browse for skin not in list.",IDC_STATIC_INFO,180,30,108,150 CONTROL "",IDC_PREVIEW,"Static",SS_OWNERDRAW | SS_CENTERIMAGE | SS_REALSIZEIMAGE,180,16,113,167 - GROUPBOX "Skin Preview",IDC_STATIC,175,5,123,182,WS_DISABLED + GROUPBOX "Skin preview",IDC_STATIC,175,5,123,182,WS_DISABLED LTEXT "WARNING: \tSkins can modify your current profile. Rollback is not possible. \n\t\tPlease BACKUP your database before applying skin.",IDC_STATIC,3,188,300,17 LTEXT "* Restart may be required for all changes to take effect",IDC_STATIC,3,210,300,8 COMBOBOX IDC_COMBO1,177,189,123,76,CBS_DROPDOWN | CBS_SORT | NOT WS_VISIBLE | WS_VSCROLL | WS_TABSTOP @@ -286,7 +286,7 @@ STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | DS_CENTER | WS_CHILD EXSTYLE WS_EX_CONTROLPARENT FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN - GROUPBOX "Status Bar",IDC_STATIC,9,3,293,224 + GROUPBOX "Status bar",IDC_STATIC,9,3,293,224 CONTROL "Show status bar",IDC_SHOWSBAR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,12,133,10 CONTROL "Make sections equal width",IDC_EQUALSECTIONS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,27,24,123,10 RTEXT "Space between",IDC_STATIC,28,37,60,10 @@ -301,17 +301,17 @@ BEGIN CONTROL "",IDC_OFFSETSPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,114,72,10,12 EDITTEXT IDC_SBAR_BORDER_BOTTOM,73,88,30,12,ES_AUTOHSCROLL CONTROL "",IDC_SBAR_BORDER_BOTTOM_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,93,88,10,12 - RTEXT "Vertical Align",IDC_STATIC,27,110,61,10 + RTEXT "Vertical align",IDC_STATIC,27,110,61,10 COMBOBOX IDC_SBAR_VERT_ALIGN,93,108,48,48,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - RTEXT "Horizontal Align",IDC_STATIC,27,124,61,10 + RTEXT "Horizontal align",IDC_STATIC,27,124,61,10 COMBOBOX IDC_SBAR_HORIZ_ALIGN,93,123,48,48,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "Multiline status bar:",IDC_STATIC,18,139,133,8 RTEXT "Accounts per line",IDC_STATIC,15,150,73,10 EDITTEXT IDC_MULTI_COUNT,93,148,48,12,ES_NUMBER CONTROL "",IDC_MULTI_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,129,148,11,12 - LTEXT "* To increase Status Bar height:\nSet in Main menu: Frames->Status Bar->Show title then pull appeared title of status bar up or down.",IDC_STATIC,27,163,123,42,WS_DISABLED - LTEXT "Hold [Shift] to inverse [Right Click] behavior",IDC_STATIC,27,207,267,8,WS_DISABLED - LTEXT "[Ctrl]+[Left Click] to filter only protocol. Click on empty space to show all",IDC_STATIC,27,216,267,8,WS_DISABLED + LTEXT "* To increase status bar height:\nset in Main menu: Frames->Status Bar->Show title then pull appeared title of status bar up or down.",IDC_STATIC,27,163,123,42,WS_DISABLED + LTEXT "Hold [Shift] to inverse [Right Click] behavior.",IDC_STATIC,27,207,267,8,WS_DISABLED + LTEXT "[Ctrl]+[Left Click] to filter only protocol. Click on empty space to show all.",IDC_STATIC,27,216,267,8,WS_DISABLED CONTROL "Set options per account",IDC_STATUSBAR_PER_PROTO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,160,12,134,10 COMBOBOX IDC_STATUSBAR_PROTO_LIST,160,23,134,30,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP CONTROL "Enable custom account settings",IDC_SBAR_USE_ACCOUNT_SETTINGS, @@ -332,7 +332,7 @@ BEGIN "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,160,148,134,16 CONTROL "Right click opens status menu",IDC_RIGHTSTATUS,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,160,165,134,8 CONTROL "Right click opens Miranda menu",IDC_RIGHTMIRANDA,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,160,175,134,8 - RTEXT "Space on Left",IDC_STATIC,171,187,60,10 + RTEXT "Space on left",IDC_STATIC,171,187,60,10 EDITTEXT IDC_OFFSETICON_LEFT,237,186,46,12,ES_NUMBER CONTROL "",IDC_OFFSETSPIN_LEFT,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,261,187,10,12 RTEXT "Space on right",IDC_STATIC,171,201,60,10 @@ -343,7 +343,7 @@ END IDD_DELETECONTACT DIALOGEX 0, 0, 284, 90 STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_CONTROLPARENT -CAPTION "Delete Contact" +CAPTION "Delete contact" FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN DEFPUSHBUTTON "No",IDNO,162,38,65,14 @@ -381,7 +381,7 @@ BEGIN CONTROL "Full selection",IDC_HILIGHTMODE1,"Button",BS_AUTORADIOBUTTON,12,131,119,10 CONTROL "Less selection",IDC_HILIGHTMODE2,"Button",BS_AUTORADIOBUTTON,12,147,119,10 CONTROL "No selection",IDC_HILIGHTMODE3,"Button",BS_AUTORADIOBUTTON,12,163,119,10 - GROUPBOX "Selection Mode",IDC_STATIC,2,101,142,95 + GROUPBOX "Selection mode",IDC_STATIC,2,101,142,95 END IDD_OPT_CLUI_2 DIALOGEX 0, 0, 266, 224 @@ -404,7 +404,7 @@ BEGIN GROUPBOX "Behavior",IDC_STWINDOWGROUP2,0,12,258,142,0,WS_EX_TRANSPARENT CONTROL "Lock manual resize",IDC_LOCKSIZING,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,102,240,12 GROUPBOX "Drag to",IDC_STATIC,0,158,124,61 - CONTROL "Easy Scroll",IDC_DRAGTOSCROLL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,181,108,8 + CONTROL "Easy scroll",IDC_DRAGTOSCROLL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,181,108,8 CONTROL "Easy move",IDC_CLIENTDRAG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,170,108,8 COMBOBOX IDC_HIDEMETHOD,93,48,148,73,CBS_DROPDOWNLIST | CBS_DISABLENOSCROLL | WS_TABSTOP EDITTEXT IDC_SHOWDELAY,164,63,36,12,ES_RIGHT | ES_NUMBER @@ -424,7 +424,7 @@ BEGIN GROUPBOX "Event notify area",IDC_STATIC,128,158,130,61 CONTROL "Disabled",IDC_EVENTAREA_NONE,"Button",BS_AUTORADIOBUTTON,138,174,114,8 CONTROL "Show automaticaly",IDC_EVENTAREA,"Button",BS_AUTORADIOBUTTON,138,186,114,8 - CONTROL "Always Visible",IDC_EVENTAREA_ALWAYS,"Button",BS_AUTORADIOBUTTON,138,198,114,8 + CONTROL "Always visible",IDC_EVENTAREA_ALWAYS,"Button",BS_AUTORADIOBUTTON,138,198,114,8 CONTROL "Dock to sides",IDC_DOCKTOSIDES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,206,108,8 LTEXT "and minimum",IDC_STATIC24,105,128,50,8 EDITTEXT IDC_MINSIZEHEIGHT,160,126,31,12,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER @@ -450,7 +450,7 @@ BEGIN CONTROL "Make selection highlight translucent",IDC_NOTNOTRANSLUCENTSEL, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,77,175,10 CONTROL "Dim idle contacts",IDC_IDLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,89,153,10 - LTEXT "'Hide Offline' means to hide:",IDC_STATIC,191,14,104,8 + LTEXT "'Hide offline' means to hide:",IDC_STATIC,191,14,104,8 CONTROL "Tree1",IDC_HIDEOFFLINEOPTS,"SysTreeView32",TVS_DISABLEDRAGDROP | TVS_NOTOOLTIPS | TVS_NONEVENHEIGHT | WS_BORDER | WS_TABSTOP,191,24,105,73 GROUPBOX "Groups",IDC_STATIC,2,105,148,115 CONTROL "Draw a line alongside group names",IDC_LINEWITHGROUPS, @@ -510,15 +510,15 @@ STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD | WS_VISIBLE EXSTYLE WS_EX_CONTROLPARENT FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN - CONTROL "Ignore Empty Extra icons places (arrange to right).",IDC_METASUBEXTRA_IGN, + CONTROL "Ignore empty extra icons places (arrange to right).",IDC_METASUBEXTRA_IGN, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,25,201,10 - CONTROL "Use 'Meta' protocol icons for Metacontacts",IDC_META, + CONTROL "Use 'Meta' protocol icons for MetaContacts",IDC_META, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,95,201,10 - CONTROL "Expand metacontacts",IDC_METAEXPAND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,107,201,16 + CONTROL "Expand MetaContacts",IDC_METAEXPAND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,107,201,16 CONTROL "Avoid double click expand",IDC_METADBLCLK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,124,196,10 - CONTROL "Hide all 'Extra icons' for subcontacts",IDC_METASUBEXTRA, + CONTROL "Hide all extra icons for subcontacts",IDC_METASUBEXTRA, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,137,196,10 - CONTROL "Hide offline subcontacts.",IDC_METASUB_HIDEOFFLINE, + CONTROL "Hide offline subcontacts",IDC_METASUB_HIDEOFFLINE, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,151,196,10 GROUPBOX "MetaContacts stuff",IDC_FRAME_META,2,81,218,101 GROUPBOX "Additional stuff",IDC_FRAME_META2,2,12,218,65 @@ -590,10 +590,10 @@ BEGIN LTEXT "pixels",IDC_STATIC3,266,42,33,8 LTEXT "pixels",IDC_STATIC2,266,28,33,8 LTEXT "Gaps",-1,136,21,38,9 - CONTROL "Use Non-Layered mode",IDC_LAYERENGINE,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,13,74,102,8 + CONTROL "Use non-layered mode",IDC_LAYERENGINE,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,13,74,102,8 CONTROL "Round corners",IDC_ROUNDCORNERS,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,13,189,102,8 GROUPBOX "Non-layered mode",IDC_STWINDOWGROUP3,4,51,115,151 - CONTROL "Disable Skin Engine",IDC_DISABLEENGINE,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,13,62,102,8 + CONTROL "Disable skin engine",IDC_DISABLEENGINE,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,13,62,102,8 CONTROL "Enable Aero Glass (Vista+)",IDC_AEROGLASS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,130,189,166,10 END @@ -635,7 +635,7 @@ EXSTYLE WS_EX_CONTROLPARENT FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN CONTROL "Draw border on avatar",IDC_AVATAR_DRAW_BORDER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,50,246,9 - CONTROL "Show Avatars",IDC_SHOW_AVATARS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,14,246,8 + CONTROL "Show avatars",IDC_SHOW_AVATARS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,14,246,8 CONTROL "Draw overlay icons",IDC_AVATAR_OVERLAY_ICONS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,137,246,8 LTEXT "Size:",IDC_AVATAR_SIZE_L,7,121,34,8 EDITTEXT IDC_AVATAR_SIZE,170,120,35,12,ES_NUMBER @@ -660,7 +660,7 @@ BEGIN EDITTEXT IDC_AVATAR_WIDTH,78,120,35,12,ES_NUMBER CONTROL "",IDC_AVATAR_WIDTH_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,102,120,11,12 RTEXT "Max width",IDC_AVATAR_SIZE_PIXELS,31,122,44,8 - CONTROL "Animate Avatars",IDC_SHOW_ANIAVATARS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,26,246,8 + CONTROL "Animate avatars",IDC_SHOW_ANIAVATARS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,26,246,8 CONTROL "Use old render method (fast, but has artefacts)",IDC_AVATAR_FASTDRAW, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,37,232,8 END @@ -691,7 +691,7 @@ STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD EXSTYLE WS_EX_CONTROLPARENT FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN - CONTROL "Right-To-Left reading mode (mirror template)",IDC_RTL, + CONTROL "Right-to-left reading mode (mirror template)",IDC_RTL, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,42,246,8 CONTROL "Replace smileys in contact list",IDC_REPLACE_SMILEYS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,81,246,8 CONTROL "Use protocol smileys",IDC_USE_PROTOCOL_SMILEYS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,21,94,232,8 @@ -722,7 +722,7 @@ BEGIN LTEXT "Text:",IDC_STATIC_TEXT,7,67,83,9 CONTROL "Status",IDC_STATUS,"Button",BS_AUTORADIOBUTTON,18,79,118,8 CONTROL "Nickname",IDC_NICKNAME,"Button",BS_AUTORADIOBUTTON,18,90,118,8 - CONTROL "Status Message",IDC_STATUS_MESSAGE,"Button",BS_AUTORADIOBUTTON,18,101,118,8 + CONTROL "Status message",IDC_STATUS_MESSAGE,"Button",BS_AUTORADIOBUTTON,18,101,118,8 CONTROL "Listening to",IDC_LISTENING_TO,"Button",BS_AUTORADIOBUTTON,18,112,118,8 CONTROL "Contact time",IDC_CONTACT_TIME,"Button",BS_AUTORADIOBUTTON,18,123,118,8 CONTROL "Text:",IDC_TEXT,"Button",BS_AUTORADIOBUTTON,18,134,118,8 @@ -751,7 +751,7 @@ BEGIN LTEXT "Text:",IDC_STATIC_TEXT,7,67,83,9 CONTROL "Status",IDC_STATUS,"Button",BS_AUTORADIOBUTTON,18,79,118,8 CONTROL "Nickname",IDC_NICKNAME,"Button",BS_AUTORADIOBUTTON,18,90,118,8 - CONTROL "Status Message",IDC_STATUS_MESSAGE,"Button",BS_AUTORADIOBUTTON,18,101,118,8 + CONTROL "Status message",IDC_STATUS_MESSAGE,"Button",BS_AUTORADIOBUTTON,18,101,118,8 CONTROL "Listening to",IDC_LISTENING_TO,"Button",BS_AUTORADIOBUTTON,18,112,118,8 CONTROL "Contact time",IDC_CONTACT_TIME,"Button",BS_AUTORADIOBUTTON,18,123,118,8 CONTROL "Text:",IDC_TEXT,"Button",BS_AUTORADIOBUTTON,18,134,118,8 @@ -1106,8 +1106,8 @@ BEGIN MENUITEM "&DND\tCtrl+5", ID_STATUS_DND MENUITEM "&Free for chat\tCtrl+6", ID_STATUS_FREECHAT MENUITEM "&Invisible\tCtrl+7", ID_STATUS_INVISIBLE - MENUITEM "On the &Phone\tCtrl+8", ID_STATUS_ONTHEPHONE - MENUITEM "Out to &Lunch\tCtrl+9", ID_STATUS_OUTTOLUNCH + MENUITEM "On the &phone\tCtrl+8", ID_STATUS_ONTHEPHONE + MENUITEM "Out to &lunch\tCtrl+9", ID_STATUS_OUTTOLUNCH END END @@ -1121,23 +1121,23 @@ BEGIN END POPUP "Nowhere" BEGIN - MENUITEM "&New Group", POPUP_NEWGROUP + MENUITEM "&New group", POPUP_NEWGROUP MENUITEM SEPARATOR - MENUITEM "&Hide Offline Users", POPUP_HIDEOFFLINE - MENUITEM "Hide &Offline Users out here", POPUP_HIDEOFFLINEROOT - MENUITEM "Hide &Empty Groups", POPUP_HIDEEMPTYGROUPS - MENUITEM "Disable &Groups", POPUP_DISABLEGROUPS + MENUITEM "&Hide offline users", POPUP_HIDEOFFLINE + MENUITEM "Hide &offline users out here", POPUP_HIDEOFFLINEROOT + MENUITEM "Hide &empty groups", POPUP_HIDEEMPTYGROUPS + MENUITEM "Disable &groups", POPUP_DISABLEGROUPS MENUITEM SEPARATOR MENUITEM "Hide Miranda", POPUP_HIDEMIRANDA END POPUP "Group" BEGIN - MENUITEM "&New Subgroup", POPUP_NEWSUBGROUP - MENUITEM "&Hide Offline Users in here", POPUP_GROUPHIDEOFFLINE - MENUITEM "&Show Offline Users in here", POPUP_GROUPSHOWOFFLINE + MENUITEM "&New subgroup", POPUP_NEWSUBGROUP + MENUITEM "&Hide offline users in here", POPUP_GROUPHIDEOFFLINE + MENUITEM "&Show offline users in here", POPUP_GROUPSHOWOFFLINE MENUITEM SEPARATOR - MENUITEM "&Rename Group", POPUP_RENAMEGROUP - MENUITEM "&Delete Group", POPUP_DELETEGROUP + MENUITEM "&Rename group", POPUP_RENAMEGROUP + MENUITEM "&Delete group", POPUP_DELETEGROUP END END diff --git a/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp index af25f3fa47..f55a911520 100644 --- a/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp +++ b/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp @@ -873,7 +873,7 @@ static HMENU CLUIFramesCreateMenuForFrame(int frameid,int root,int popuppos,HGEN mi.pszPopupName = (char *)root; mi.popupPosition = frameid; mi.position = popuppos++; - mi.pszName = LPGEN("&Floating Mode"); + mi.pszName = LPGEN("&Floating mode"); mi.flags = CMIF_CHILDPOPUP; mi.pszService = "Set_Floating"; mi.pszContactOwner = (char *)0; @@ -1742,7 +1742,7 @@ static int CLUIFramesLoadMainMenu() mi.flags = CMIF_ROOTHANDLE; mi.position = separator++; mi.hParentMenu = _hmiRoot; - mi.pszName = LPGEN("Show All Frames"); + mi.pszName = LPGEN("Show all frames"); mi.pszService = MS_CLIST_FRAMES_SHOWALLFRAMES; Menu_AddMainMenuItem(&mi); diff --git a/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp b/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp index 8996b94249..23fe23fdaa 100644 --- a/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp +++ b/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp @@ -224,7 +224,7 @@ static int OnBuildGroupMenu(WPARAM wParam, LPARAM lParam) return 0; } -static IconItem iconItem = { "New Group", "NewGroup", IDI_NEWGROUP2 }; +static IconItem iconItem = { "New group", "NewGroup", IDI_NEWGROUP2 }; int static OnIconLibIconChanged(WPARAM wParam, LPARAM lParam) { @@ -291,7 +291,7 @@ void GroupMenus_Init(void) mi.position = 200000; mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_FINDUSER); mi.pszService = "FindAdd/FindAddCommand"; - mi.pszName = LPGEN("&Find/Add Contacts..."); + mi.pszName = LPGEN("&Find/Add contacts..."); AddGroupMenuItem(0, (LPARAM)&mi); mi.position = 300000; @@ -322,30 +322,30 @@ void GroupMenus_Init(void) mi.position = 100000; mi.hIcon = ske_ImageList_GetIcon(hCListImages,NewGroupIconidx,0); mi.pszService = "CLISTMENUSGroup/CreateGroupHelper"; - mi.pszName = LPGEN("&New Group"); + mi.pszName = LPGEN("&New group"); hNewGroupMenuItem = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi); DestroyIcon_protect(mi.hIcon); mi.position = 100001; mi.hIcon = NULL; mi.pszService = MS_CLIST_SETHIDEOFFLINE; - mi.pszName = LPGEN("&Hide Offline Users"); + mi.pszName = LPGEN("&Hide offline users"); gmp.lParam = 0;gmp.wParam = -1; hHideOfflineUsersMenuItem = (HGENMENU)AddGroupMenuItem((WPARAM)&gmp, (LPARAM)&mi); mi.position = 100002; mi.pszService = "CLISTMENUSGroup/HideOfflineRootHelper"; - mi.pszName = LPGEN("Hide &Offline Users out here"); + mi.pszName = LPGEN("Hide &offline users out here"); hHideOfflineUsersOutHereMenuItem = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi); mi.position = 100003; mi.pszService = "CLISTMENUSGroup/HideGroupsHelper"; - mi.pszName = LPGEN("Hide &Empty Groups"); + mi.pszName = LPGEN("Hide &empty groups"); hHideEmptyGroupsMenuItem = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi); mi.position = 100004; mi.pszService = "CLISTMENUSGroup/UseGroupsHelper"; - mi.pszName = LPGEN("Disable &Groups"); + mi.pszName = LPGEN("Disable &groups"); hDisableGroupsMenuItem = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi); HookEvent(ME_SKIN2_ICONSCHANGED, OnIconLibIconChanged); @@ -546,7 +546,7 @@ void InitSubGroupMenus(void) mi.position = 1000; mi.hIcon = ske_ImageList_GetIcon(hCListImages,NewGroupIconidx,0); mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy"; - mi.pszName = LPGEN("&New SubGroup"); + mi.pszName = LPGEN("&New subgroup"); gmp.lParam = 0;gmp.wParam = POPUP_NEWSUBGROUP; hNewSubGroupMenuItem = (HGENMENU)AddSubGroupMenuItem((WPARAM)&gmp,(LPARAM)&mi); DestroyIcon_protect(mi.hIcon); @@ -554,7 +554,7 @@ void InitSubGroupMenus(void) mi.position = 1001; mi.hIcon = NULL; mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy"; - mi.pszName = LPGEN("&Hide Offline Users in here"); + mi.pszName = LPGEN("&Hide offline users in here"); gmp.lParam = 0; gmp.wParam = POPUP_GROUPHIDEOFFLINE; hHideOfflineUsersHereMenuItem = (HGENMENU)AddSubGroupMenuItem((WPARAM)&gmp,(LPARAM)&mi); @@ -562,7 +562,7 @@ void InitSubGroupMenus(void) mi.position = 1002; mi.hIcon = NULL; mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy"; - mi.pszName = LPGEN("&Show Offline Users in here"); + mi.pszName = LPGEN("&Show offline users in here"); gmp.lParam = 0; gmp.wParam = POPUP_GROUPSHOWOFFLINE; hShowOfflineUsersHereMenuItem = (HGENMENU)AddSubGroupMenuItem((WPARAM)&gmp,(LPARAM)&mi); @@ -572,7 +572,7 @@ void InitSubGroupMenus(void) mi.position = 900001; mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_RENAME); mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy"; - mi.pszName = LPGEN("&Rename Group"); + mi.pszName = LPGEN("&Rename group"); gmp.lParam = 0;gmp.wParam = POPUP_RENAMEGROUP; AddSubGroupMenuItem((WPARAM)&gmp,(LPARAM)&mi); DestroyIcon_protect(mi.hIcon); @@ -580,7 +580,7 @@ void InitSubGroupMenus(void) mi.position = 900002; mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_DELETE); mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy"; - mi.pszName = LPGEN("&Delete Group"); + mi.pszName = LPGEN("&Delete group"); gmp.lParam = 0;gmp.wParam = POPUP_DELETEGROUP; AddSubGroupMenuItem((WPARAM)&gmp,(LPARAM)&mi); DestroyIcon_protect(mi.hIcon); diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp index 77728deb54..5f6e1e415a 100644 --- a/plugins/Clist_modern/src/modern_clc.cpp +++ b/plugins/Clist_modern/src/modern_clc.cpp @@ -97,7 +97,7 @@ static int clcHookModulesLoaded(WPARAM wParam, LPARAM lParam) sid.iDefaultIndex = -IDI_LISTENING_TO; Skin_AddIcon(&sid); - sid.pszSection = LPGEN("Contact list") "/" LPGEN("Avatar Overlay"); + sid.pszSection = LPGEN("Contact list") "/" LPGEN("Avatar overlay"); for (int i = 0; i < SIZEOF(g_pAvatarOverlayIcons); i++) { sid.pszDescription = g_pAvatarOverlayIcons[i].description; sid.pszName = g_pAvatarOverlayIcons[i].name; @@ -105,7 +105,7 @@ static int clcHookModulesLoaded(WPARAM wParam, LPARAM lParam) Skin_AddIcon(&sid); } - sid.pszSection = LPGEN("Contact list") "/" LPGEN("Status Overlay"); + sid.pszSection = LPGEN("Contact list") "/" LPGEN("Status overlay"); for (int i = 0; i < SIZEOF(g_pStatusOverlayIcons); i++) { sid.pszDescription = g_pStatusOverlayIcons[i].description; sid.pszName = g_pStatusOverlayIcons[i].name; diff --git a/plugins/Clist_modern/src/modern_clcopts.cpp b/plugins/Clist_modern/src/modern_clcopts.cpp index f8c61b48ac..fd3bbd2154 100644 --- a/plugins/Clist_modern/src/modern_clcopts.cpp +++ b/plugins/Clist_modern/src/modern_clcopts.cpp @@ -56,20 +56,20 @@ struct FontOptionsList 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 }, @@ -102,10 +102,10 @@ static struct FontOptionsList fontOptionsList[] = { struct ColourOptionsList { - char* chGroup; - char* chName; - TCHAR* szGroup; - TCHAR* szDescr; + char* chGroup; + char* chName; + TCHAR* szGroup; + TCHAR* szDescr; COLORREF defColour; }; @@ -126,7 +126,7 @@ static struct ColourOptionsList colourOptionsList[] = { "ModernSettings", "KeyColor", CLCCOLOURSGROUP, LPGENT("3rd party frames transparent back color"), SETTING_KEYCOLOR_DEFAULT } }; -void RegisterCLUIFonts( void ) +void RegisterCLUIFonts(void) { static bool registered = false; if (registered) @@ -287,19 +287,19 @@ static const struct CheckBoxValues_t offlineValues[] = { PF2_ONTHEPHONE, LPGENT("On the phone") } }; -static void FillCheckBoxTree(HWND hwndTree,const struct CheckBoxValues_t *values,int nValues,DWORD style) +static void FillCheckBoxTree(HWND hwndTree, const struct CheckBoxValues_t *values, int nValues, DWORD style) { TVINSERTSTRUCT tvis; tvis.hParent = NULL; tvis.hInsertAfter = TVI_LAST; - tvis.item.mask = TVIF_PARAM|TVIF_TEXT|TVIF_STATE|TVIF_IMAGE; - for (int i=0; i < nValues; i++) { + tvis.item.mask = TVIF_PARAM | TVIF_TEXT | TVIF_STATE | TVIF_IMAGE; + 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; - tvis.item.state = INDEXTOSTATEIMAGEMASK((style&tvis.item.lParam) != 0?2:1); - tvis.item.iImage = tvis.item.iSelectedImage = (style&tvis.item.lParam) != 0?1:0; - TreeView_InsertItem(hwndTree,&tvis); + tvis.item.state = INDEXTOSTATEIMAGEMASK((style&tvis.item.lParam) != 0 ? 2 : 1); + tvis.item.iImage = tvis.item.iSelectedImage = (style & tvis.item.lParam) != 0 ? 1 : 0; + TreeView_InsertItem(hwndTree, &tvis); } } @@ -309,11 +309,11 @@ static DWORD MakeCheckBoxTreeFlags(HWND hwndTree) TVITEM tvi; tvi.mask = TVIF_HANDLE | TVIF_PARAM | TVIF_IMAGE; tvi.hItem = TreeView_GetRoot(hwndTree); - while(tvi.hItem) { - TreeView_GetItem(hwndTree,&tvi); + while (tvi.hItem) { + TreeView_GetItem(hwndTree, &tvi); if (tvi.iImage) flags |= tvi.lParam; - tvi.hItem = TreeView_GetNextSibling(hwndTree,tvi.hItem); + tvi.hItem = TreeView_GetNextSibling(hwndTree, tvi.hItem); } return flags; } @@ -640,7 +640,7 @@ static int _GetNetVisibleProtoCount() return netProtoCount; } -TCHAR *sortby[] = { LPGENT("Name"), LPGENT("Name (use locale settings)"), LPGENT("Status"), LPGENT("Last message time"), LPGENT("Account Name"), LPGENT("Rate"), LPGENT("-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) { @@ -689,6 +689,8 @@ static INT_PTR CALLBACK DlgProcClistOpts(HWND hwndDlg, UINT msg, WPARAM wParam, return TRUE; case WM_COMMAND: + if ((LOWORD(wParam) == IDC_CLSORT1 || LOWORD(wParam) == IDC_CLSORT2 || LOWORD(wParam) == IDC_CLSORT3) && HIWORD(wParam) != CBN_SELCHANGE) + break; SendMessage(GetParent(hwndDlg), PSM_CHANGED, (WPARAM)hwndDlg, 0); break; @@ -835,8 +837,10 @@ static INT_PTR CALLBACK DlgProcTrayOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L 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 + if (LOWORD(wParam) == IDC_PRIMARYSTATUS && HIWORD(wParam) != CBN_SELCHANGE) + return 0; + if ((LOWORD(wParam) == IDC_BLINKTIME || LOWORD(wParam) == IDC_CYCLETIME) && (HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus())) + return 0; SendMessage(GetParent(hwndDlg), PSM_CHANGED, (WPARAM)hwndDlg, 0); break; @@ -865,7 +869,7 @@ static INT_PTR CALLBACK DlgProcTrayOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L 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); + PROTOACCOUNT *pa = (PROTOACCOUNT *)SendDlgItemMessage(hwndDlg, IDC_PRIMARYSTATUS, CB_GETITEMDATA, cursel, 0); if (!pa) db_unset(NULL, "CList", "PrimaryStatus"); else @@ -998,9 +1002,12 @@ static INT_PTR CALLBACK DlgProcClistBehaviourOpts(HWND hwndDlg, UINT msg, WPARAM EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC8), mode != 0); EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC10), mode != 0); EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC13), mode != 0); + if (HIWORD(wParam) != CBN_SELCHANGE || (HWND)lParam != GetFocus()) + return 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) && - (HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus())) + 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; // Enable apply button @@ -1931,7 +1938,7 @@ static clist_opt_items[] = { 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("Status bar"), IDD_OPT_SBAR, DlgProcSBarOpts, 0 }, { LPGEN("Additional stuff"), IDD_OPT_META_CLC, DlgProcClistAdditionalOpts, 0 } }; diff --git a/plugins/Clist_modern/src/modern_clistevents.cpp b/plugins/Clist_modern/src/modern_clistevents.cpp index ae2461b09b..ade09879b1 100644 --- a/plugins/Clist_modern/src/modern_clistevents.cpp +++ b/plugins/Clist_modern/src/modern_clistevents.cpp @@ -421,7 +421,7 @@ int EventArea_Create(HWND hCluiWnd) Frame.Flags = ( db_get_b(NULL,"CLUI","ShowEventArea",SETTING_SHOWEVENTAREAFRAME_DEFAULT)?F_VISIBLE:0)|F_LOCKED|F_NOBORDER|F_NO_SUBCONTAINER|F_TCHAR; Frame.height = h; Frame.tname = _T("EventArea"); //do not translate - Frame.TBtname = TranslateT("Event Area"); + Frame.TBtname = TranslateT("Event area"); hNotifyFrame = (HANDLE)CallService(MS_CLIST_FRAMES_ADDFRAME,(WPARAM)&Frame,0); CallService(MS_SKINENG_REGISTERPAINTSUB,(WPARAM)Frame.hWnd,(LPARAM)EventArea_PaintCallbackProc); //$$$$$ register sub for frame CallService(MS_CLIST_FRAMES_UPDATEFRAME,-1,0); diff --git a/plugins/Clist_modern/src/modern_clistmenus.cpp b/plugins/Clist_modern/src/modern_clistmenus.cpp index fdbb006717..d04ae3ce93 100644 --- a/plugins/Clist_modern/src/modern_clistmenus.cpp +++ b/plugins/Clist_modern/src/modern_clistmenus.cpp @@ -38,9 +38,8 @@ INT_PTR CloseAction(WPARAM wParam, LPARAM lParam) int k; g_CluiData.bSTATE = STATE_PREPEARETOEXIT; // workaround for avatar service and other wich destroys service on OK_TOEXIT do - { k = CallService(MS_SYSTEM_OKTOEXIT, 0, 0); - } - while (!k); + k = CallService(MS_SYSTEM_OKTOEXIT, 0, 0); + while (!k); if (k) DestroyWindow(pcli->hwndContactList); @@ -50,7 +49,7 @@ INT_PTR CloseAction(WPARAM wParam, LPARAM lParam) int InitCustomMenus(void) { - CreateServiceFunction("CloseAction", CloseAction ); + CreateServiceFunction("CloseAction", CloseAction); LoadFavoriteContactMenu(); return 0; } @@ -69,13 +68,13 @@ void UninitCustomMenus(void) #define CLUI_FAVSETRATE "CLUI/SetContactRate" //LParam is rate, Wparam is contact handle #define CLUI_FAVTOGGLESHOWOFFLINE "CLUI/ToggleContactShowOffline" -static HGENMENU hFavoriteContactMenu = NULL; +static HGENMENU hFavoriteContactMenu = NULL; static HGENMENU *hFavoriteContactMenuItems = NULL; -static HGENMENU hShowIfOflineItem = NULL; +static HGENMENU hShowIfOflineItem = NULL; static HANDLE hOnContactMenuBuild_FAV = NULL; -static TCHAR * FAVMENUROOTNAME = LPGENT("&Contact rate"); +static TCHAR *FAVMENUROOTNAME = LPGENT("&Contact rate"); static TCHAR *rates[] = { LPGENT("None"), @@ -86,17 +85,17 @@ static TCHAR *rates[] = { static IconItem iconList[] = { - { LPGEN("Contact rate None"), "Rate1", IDI_FAVORITE_0 }, - { LPGEN("Contact rate Low"), "Rate2", IDI_FAVORITE_1 }, - { LPGEN("Contact rate Medium"), "Rate3", IDI_FAVORITE_2 }, - { LPGEN("Contact rate High"), "Rate4", IDI_FAVORITE_3 } + { LPGEN("Contact rate none"), "Rate1", IDI_FAVORITE_0 }, + { LPGEN("Contact rate low"), "Rate2", IDI_FAVORITE_1 }, + { LPGEN("Contact rate medium"), "Rate3", IDI_FAVORITE_2 }, + { LPGEN("Contact rate high"), "Rate4", IDI_FAVORITE_3 } }; static int FAV_OnContactMenuBuild(WPARAM hContact, LPARAM) { BYTE bContactRate = db_get_b(hContact, "CList", "Rate", 0); - if ( bContactRate > SIZEOF(rates)-1) - bContactRate = SIZEOF(rates)-1; + if (bContactRate > SIZEOF(rates) - 1) + bContactRate = SIZEOF(rates) - 1; BOOL bModifyMenu = FALSE; @@ -109,9 +108,9 @@ static int FAV_OnContactMenuBuild(WPARAM hContact, LPARAM) mi.ptszName = FAVMENUROOTNAME; else { TCHAR *str1 = TranslateTS(FAVMENUROOTNAME), *str2 = TranslateTS(rates[bContactRate]); - int bufsize = (lstrlen(str1)+lstrlen(str2)+15)*sizeof(TCHAR); - TCHAR *name = (TCHAR*)_alloca(bufsize); - mir_sntprintf(name, bufsize/sizeof(TCHAR), _T("%s (%s)"),str1,str2); + int bufsize = (lstrlen(str1) + lstrlen(str2) + 15) * sizeof(TCHAR); + TCHAR *name = (TCHAR *)_alloca(bufsize); + mir_sntprintf(name, bufsize / sizeof(TCHAR), _T("%s (%s)"), str1, str2); mi.ptszName = name; mi.flags |= CMIF_KEEPUNTRANSLATED; } @@ -124,19 +123,19 @@ static int FAV_OnContactMenuBuild(WPARAM hContact, LPARAM) } OptParam op; - op.Handle = hFavoriteContactMenu; + op.Handle = hFavoriteContactMenu; op.Setting = OPT_MENUITEMSETUNIQNAME; - op.Value = (INT_PTR)"ModernClistMenu_ContactRate"; + op.Value = (INT_PTR)"ModernClistMenu_ContactRate"; CallService(MO_SETOPTIONSMENUITEM, 0, (LPARAM)&op); mi.hParentMenu = hFavoriteContactMenu; if (!hFavoriteContactMenuItems) { - hFavoriteContactMenuItems = (HGENMENU*)malloc(sizeof(HANDLE)*SIZEOF(rates)); - memset(hFavoriteContactMenuItems, 0, sizeof(HANDLE)*SIZEOF(rates)); + hFavoriteContactMenuItems = (HGENMENU *)malloc(sizeof(HANDLE) * SIZEOF(rates)); + memset(hFavoriteContactMenuItems, 0, sizeof(HANDLE) * SIZEOF(rates)); } int i; - for (i=0; i < SIZEOF(rates); i++) { + for (i = 0; i < SIZEOF(rates); i++) { mi.icolibItem = iconList[i].hIcolib; mi.ptszName = rates[i]; mi.flags = CMIF_CHILDPOPUP | CMIF_TCHAR | ((bContactRate == i) ? CMIF_CHECKED : 0); @@ -146,20 +145,22 @@ static int FAV_OnContactMenuBuild(WPARAM hContact, LPARAM) mi.flags |= CMIM_FLAGS | CMIM_ICON; Menu_ModifyItem(hFavoriteContactMenuItems[i], &mi); } - else hFavoriteContactMenuItems[i] = Menu_AddContactMenuItem(&mi); + else + hFavoriteContactMenuItems[i] = Menu_AddContactMenuItem(&mi); } mi.hIcon = NULL; mi.ptszName = LPGENT("Show even if offline"); mi.flags = CMIF_CHILDPOPUP | CMIF_TCHAR | (db_get_b(hContact, "CList", "noOffline", 0) ? CMIF_CHECKED : 0); mi.pszService = CLUI_FAVTOGGLESHOWOFFLINE; - mi.popupPosition = i+100000000; + mi.popupPosition = i + 100000000; mi.position = -100000000; if (bModifyMenu && hShowIfOflineItem) { mi.flags |= CMIM_FLAGS | CMIM_ICON; Menu_ModifyItem(hShowIfOflineItem, &mi); } - else hShowIfOflineItem = Menu_AddContactMenuItem(&mi); + else + hShowIfOflineItem = Menu_AddContactMenuItem(&mi); return 0; } @@ -172,7 +173,7 @@ INT_PTR FAV_SetRate(WPARAM hContact, LPARAM nRate) return 0; } -INT_PTR FAV_ToggleShowOffline(WPARAM hContact,LPARAM lParam) +INT_PTR FAV_ToggleShowOffline(WPARAM hContact, LPARAM lParam) { if (hContact) db_set_b((MCONTACT)hContact, "CList", "noOffline", !db_get_b((MCONTACT)hContact, "CList", "noOffline", 0)); @@ -184,8 +185,8 @@ int LoadFavoriteContactMenu() { Icon_Register(g_hInst, LPGEN("Contact list"), iconList, SIZEOF(iconList)); - CreateServiceFunction(CLUI_FAVSETRATE,FAV_SetRate); - CreateServiceFunction(CLUI_FAVTOGGLESHOWOFFLINE,FAV_ToggleShowOffline); + CreateServiceFunction(CLUI_FAVSETRATE, FAV_SetRate); + CreateServiceFunction(CLUI_FAVTOGGLESHOWOFFLINE, FAV_ToggleShowOffline); hOnContactMenuBuild_FAV = HookEvent(ME_CLIST_PREBUILDCONTACTMENU, FAV_OnContactMenuBuild); return 0; } @@ -196,7 +197,7 @@ int UnloadFavoriteContactMenu() hFavoriteContactMenuItems = NULL; if (hFavoriteContactMenu) - CallService(MO_REMOVEMENUITEM,(WPARAM)hFavoriteContactMenu,0); + CallService(MO_REMOVEMENUITEM, (WPARAM)hFavoriteContactMenu, 0); hFavoriteContactMenu = NULL; return 0; diff --git a/plugins/Clist_modern/src/modern_clistopts.cpp b/plugins/Clist_modern/src/modern_clistopts.cpp index 69a9c504f9..1dc6e10028 100644 --- a/plugins/Clist_modern/src/modern_clistopts.cpp +++ b/plugins/Clist_modern/src/modern_clistopts.cpp @@ -933,8 +933,8 @@ static row_opt_items[] = { LPGEN("Icon"), IDD_OPT_ITEM_ICON, DlgProcItemIconOpts }, { LPGEN("Contact time"), IDD_OPT_ITEM_CONTACT_TIME, DlgProcItemContactTimeOpts }, { LPGEN("Text"), IDD_OPT_ITEM_TEXT, DlgProcItemTextOpts }, - { LPGEN("Second Line"), IDD_OPT_ITEM_SECOND_LINE, DlgProcItemSecondLineOpts }, - { LPGEN("Third Line"), IDD_OPT_ITEM_THIRD_LINE, DlgProcItemThirdLineOpts }, + { LPGEN("Second line"), IDD_OPT_ITEM_SECOND_LINE, DlgProcItemSecondLineOpts }, + { LPGEN("Third line"), IDD_OPT_ITEM_THIRD_LINE, DlgProcItemThirdLineOpts }, }; int CListOptInit(WPARAM wParam, LPARAM lParam) diff --git a/plugins/Clist_modern/src/modern_clisttray.cpp b/plugins/Clist_modern/src/modern_clisttray.cpp index 7ce4366044..e74f604772 100644 --- a/plugins/Clist_modern/src/modern_clisttray.cpp +++ b/plugins/Clist_modern/src/modern_clisttray.cpp @@ -531,7 +531,7 @@ void InitTrayMenus(void) mi.position = 200000; mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_FINDUSER); mi.pszService = "FindAdd/FindAddCommand"; - mi.pszName = LPGEN("&Find/Add Contacts..."); + mi.pszName = LPGEN("&Find/Add contacts..."); AddTrayMenuItem(0, (LPARAM)&mi); mi.position = 300000; diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp index 0b881617bc..1c4013ad40 100644 --- a/plugins/Clist_modern/src/modern_clui.cpp +++ b/plugins/Clist_modern/src/modern_clui.cpp @@ -333,7 +333,7 @@ HRESULT CLUI::RegisterAvatarMenu() CreateServiceFunction("CList/ShowContactAvatar", CLUI::Service_Menu_ShowContactAvatar); mi.position = 2000150000; mi.hIcon = LoadSmallIcon(g_hInst, IDI_SHOW_AVATAR); - mi.pszName = LPGEN("Show Contact &Avatar"); + mi.pszName = LPGEN("Show contact &avatar"); mi.pszService = "CList/ShowContactAvatar"; hShowAvatarMenuItem = Menu_AddContactMenuItem(&mi); DestroyIcon_protect(mi.hIcon); @@ -341,7 +341,7 @@ HRESULT CLUI::RegisterAvatarMenu() CreateServiceFunction("CList/HideContactAvatar", CLUI::Service_Menu_HideContactAvatar); mi.position = 2000150001; mi.hIcon = LoadSmallIcon(g_hInst, IDI_HIDE_AVATAR); - mi.pszName = LPGEN("Hide Contact &Avatar"); + mi.pszName = LPGEN("Hide contact &avatar"); mi.pszService = "CList/HideContactAvatar"; hHideAvatarMenuItem = Menu_AddContactMenuItem(&mi); DestroyIcon_protect(mi.hIcon); @@ -417,8 +417,8 @@ HRESULT CLUI::CreateCLC() Frame.align = alClient; Frame.hIcon = LoadSkinnedIcon(SKINICON_OTHER_FRAME); Frame.Flags = F_VISIBLE | F_SHOWTBTIP | F_NO_SUBCONTAINER | F_TCHAR; - Frame.tname = LPGENT("My Contacts"); - Frame.TBtname = TranslateT("My Contacts"); + Frame.tname = LPGENT("My contacts"); + Frame.TBtname = TranslateT("My contacts"); hFrameContactTree = (HWND)CallService(MS_CLIST_FRAMES_ADDFRAME,(WPARAM)&Frame,0); CallService(MS_SKINENG_REGISTERPAINTSUB,(WPARAM)Frame.hWnd,(LPARAM)CLCPaint::PaintCallbackProc); diff --git a/plugins/Clist_modern/src/modern_skineditor.cpp b/plugins/Clist_modern/src/modern_skineditor.cpp index 04c8e00c86..0f3a82cd4b 100644 --- a/plugins/Clist_modern/src/modern_skineditor.cpp +++ b/plugins/Clist_modern/src/modern_skineditor.cpp @@ -162,7 +162,7 @@ int FillObjectTree(HWND hwndDlg, int ObjectTreeID, char * wildmask) return 0; } TCHAR *TYPES[] = {LPGENT("- Empty - (do not draw this object)"),LPGENT("Solid fill object"),LPGENT("Image (draw image)"),LPGENT("Fragment (draw portion of image)")}; -TCHAR *FITMODES[] = {LPGENT("Stretch Both directions"),LPGENT("Stretch Vertical, Tile Horizontal"),LPGENT("Tile Vertical, Stretch Horizontal"),LPGENT("Tile Both directions")}; +TCHAR *FITMODES[] = {LPGENT("Stretch both directions"),LPGENT("Stretch vertical, tile horizontal"),LPGENT("Tile vertical, stretch horizontal"),LPGENT("Tile both directions")}; void SetAppropriateGroups(HWND hwndDlg, int Type) //str contains default values diff --git a/plugins/Clist_modern/src/modern_statusbar.cpp b/plugins/Clist_modern/src/modern_statusbar.cpp index 215ad7c737..8922bf04a3 100644 --- a/plugins/Clist_modern/src/modern_statusbar.cpp +++ b/plugins/Clist_modern/src/modern_statusbar.cpp @@ -941,8 +941,8 @@ HWND StatusBar_Create(HWND parent) if (db_get_b(NULL, "CLUI", "ShowSBar", SETTING_SHOWSBAR_DEFAULT)) Frame.Flags |= F_VISIBLE; Frame.height = h; - Frame.tname = _T("Status Bar"); - Frame.TBtname = TranslateT("Status Bar"); + Frame.tname = _T("Status bar"); + Frame.TBtname = TranslateT("Status bar"); hFramehModernStatusBar = (HANDLE)CallService(MS_CLIST_FRAMES_ADDFRAME, (WPARAM)&Frame, 0); CallService(MS_SKINENG_REGISTERPAINTSUB, (WPARAM)Frame.hWnd, (LPARAM)NewStatusPaintCallbackProc); //$$$$$ register sub for frame diff --git a/plugins/Clist_modern/src/modern_statusbar_options.cpp b/plugins/Clist_modern/src/modern_statusbar_options.cpp index 624b4dab8e..e6a5056918 100644 --- a/plugins/Clist_modern/src/modern_statusbar_options.cpp +++ b/plugins/Clist_modern/src/modern_statusbar_options.cpp @@ -39,12 +39,11 @@ typedef struct _StatusBarProtocolOptions BYTE ShowXStatus; int PaddingLeft; int PaddingRight; -} - StatusBarProtocolOptions; +} StatusBarProtocolOptions; static StatusBarProtocolOptions _GlobalOptions = {0}; -static void UpdateXStatusIconOptions(HWND hwndDlg, BOOL perProto, StatusBarProtocolOptions* dat, int curSelProto) +static void UpdateXStatusIconOptions(HWND hwndDlg, BOOL perProto, StatusBarProtocolOptions *dat, int curSelProto) { int en = IsDlgButtonChecked(hwndDlg,IDC_SHOWSBAR) && IsDlgButtonChecked(hwndDlg,IDC_SHOWICON ); @@ -72,9 +71,9 @@ static void UpdateXStatusIconOptions(HWND hwndDlg, BOOL perProto, StatusBarProto static void UpdateStatusBarOptionsDisplay(HWND hwndDlg) { - StatusBarProtocolOptions *dat = (StatusBarProtocolOptions*)GetWindowLongPtr(GetDlgItem(hwndDlg,IDC_STATUSBAR_PROTO_LIST),GWLP_USERDATA); - BOOL perProto = (BOOL)IsDlgButtonChecked(hwndDlg,IDC_STATUSBAR_PER_PROTO); - HWND hwndComboBox = GetDlgItem( hwndDlg, IDC_STATUSBAR_PROTO_LIST ); + StatusBarProtocolOptions *dat = (StatusBarProtocolOptions *)GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_STATUSBAR_PROTO_LIST), GWLP_USERDATA); + BOOL perProto = (BOOL)IsDlgButtonChecked(hwndDlg, IDC_STATUSBAR_PER_PROTO); + HWND hwndComboBox = GetDlgItem(hwndDlg, IDC_STATUSBAR_PROTO_LIST); StatusBarProtocolOptions sbpo; int curSelProto = SendMessage(hwndComboBox, CB_GETITEMDATA, SendMessage(hwndComboBox, CB_GETCURSEL, 0, 0), NULL) - 1; //first entry is the combo box is a constant. if (curSelProto < 0) @@ -89,36 +88,37 @@ static void UpdateStatusBarOptionsDisplay(HWND hwndDlg) EnableWindow(GetDlgItem(hwndDlg, IDC_SBAR_USE_ACCOUNT_SETTINGS), TRUE); CheckDlgButton(hwndDlg, IDC_SBAR_USE_ACCOUNT_SETTINGS, sbpo.AccountIsCustomized ? BST_CHECKED : BST_UNCHECKED); } - else EnableWindow(GetDlgItem(hwndDlg, IDC_SBAR_USE_ACCOUNT_SETTINGS), FALSE); + else + EnableWindow(GetDlgItem(hwndDlg, IDC_SBAR_USE_ACCOUNT_SETTINGS), FALSE); CheckDlgButton(hwndDlg, IDC_SBAR_HIDE_ACCOUNT_COMPLETELY, sbpo.HideAccount ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwndDlg, IDC_USECONNECTINGICON, sbpo.UseConnectingIcon ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwndDlg, IDC_SHOWXSTATUSNAME, ((sbpo.ShowXStatus&8)>0) ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwndDlg, IDC_SHOWXSTATUS, ((sbpo.ShowXStatus&3)>0) ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwndDlg, IDC_SHOWNORMAL, ((sbpo.ShowXStatus&3) == 2) ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwndDlg, IDC_SHOWBOTH, ((sbpo.ShowXStatus&3) == 3) ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(hwndDlg, IDC_SHOWXSTATUSNAME, ((sbpo.ShowXStatus & 8) > 0) ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(hwndDlg, IDC_SHOWXSTATUS, ((sbpo.ShowXStatus & 3) > 0) ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(hwndDlg, IDC_SHOWNORMAL, ((sbpo.ShowXStatus & 3) == 2) ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(hwndDlg, IDC_SHOWBOTH, ((sbpo.ShowXStatus & 3) == 3) ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwndDlg, IDC_SHOWUNREADEMAIL, (sbpo.ShowUnreadEmails == 1) ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwndDlg, IDC_TRANSPARENTOVERLAY, ((sbpo.ShowXStatus&4)) ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(hwndDlg, IDC_TRANSPARENTOVERLAY, (sbpo.ShowXStatus & 4) ? BST_CHECKED : BST_UNCHECKED); { BYTE showOpts = sbpo.SBarShow; - CheckDlgButton(hwndDlg, IDC_SHOWICON, showOpts&1 ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwndDlg, IDC_SHOWPROTO, showOpts&2 ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwndDlg, IDC_SHOWSTATUS, showOpts&4 ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(hwndDlg, IDC_SHOWICON, showOpts & 1 ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(hwndDlg, IDC_SHOWPROTO, showOpts & 2 ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(hwndDlg, IDC_SHOWSTATUS, showOpts & 4 ? BST_CHECKED : BST_UNCHECKED); } CheckDlgButton(hwndDlg, IDC_RIGHTSTATUS, sbpo.SBarRightClk ? BST_UNCHECKED : BST_CHECKED); - CheckDlgButton(hwndDlg, IDC_RIGHTMIRANDA, !IsDlgButtonChecked(hwndDlg,IDC_RIGHTSTATUS) ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(hwndDlg, IDC_RIGHTMIRANDA, !IsDlgButtonChecked(hwndDlg, IDC_RIGHTSTATUS) ? BST_CHECKED : BST_UNCHECKED); - SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN_LEFT,UDM_SETRANGE, 0, MAKELONG(50, 0)); - SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN_LEFT,UDM_SETPOS, 0, MAKELONG(sbpo.PaddingLeft,2)); + SendDlgItemMessage(hwndDlg, IDC_OFFSETSPIN_LEFT, UDM_SETRANGE, 0, MAKELONG(50, 0)); + SendDlgItemMessage(hwndDlg, IDC_OFFSETSPIN_LEFT, UDM_SETPOS, 0, MAKELONG(sbpo.PaddingLeft, 2)); - SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN_RIGHT,UDM_SETRANGE, 0, MAKELONG(50, 0)); - SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN_RIGHT,UDM_SETPOS, 0, MAKELONG(sbpo.PaddingRight,2)); + SendDlgItemMessage(hwndDlg, IDC_OFFSETSPIN_RIGHT, UDM_SETRANGE, 0, MAKELONG(50, 0)); + SendDlgItemMessage(hwndDlg, IDC_OFFSETSPIN_RIGHT, UDM_SETPOS, 0, MAKELONG(sbpo.PaddingRight, 2)); if (!sbpo.AccountIsCustomized) UpdateXStatusIconOptions(hwndDlg, perProto, dat, curSelProto); { - BOOL enableIcons = IsDlgButtonChecked(hwndDlg,IDC_SHOWICON ); + BOOL enableIcons = IsDlgButtonChecked(hwndDlg, IDC_SHOWICON); BOOL enableOptions = !perProto || sbpo.AccountIsCustomized; EnableWindow(GetDlgItem(hwndDlg, IDC_SBAR_HIDE_ACCOUNT_COMPLETELY), enableOptions && perProto); EnableWindow(GetDlgItem(hwndDlg, IDC_USECONNECTINGICON), enableOptions && enableIcons); @@ -149,21 +149,20 @@ static void UpdateStatusBarOptionsDisplay(HWND hwndDlg) INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) { - StatusBarProtocolOptions *dat = (StatusBarProtocolOptions*)GetWindowLongPtr(GetDlgItem(hwndDlg,IDC_STATUSBAR_PROTO_LIST),GWLP_USERDATA); - LOGFONTA lf; + StatusBarProtocolOptions *dat = (StatusBarProtocolOptions *)GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_STATUSBAR_PROTO_LIST), GWLP_USERDATA); BOOL perProto = IsDlgButtonChecked(hwndDlg, IDC_STATUSBAR_PER_PROTO); - HWND hwndComboBox = GetDlgItem( hwndDlg, IDC_STATUSBAR_PROTO_LIST ); + HWND hwndComboBox = GetDlgItem(hwndDlg, IDC_STATUSBAR_PROTO_LIST); int curSelProto = SendMessage(hwndComboBox, CB_GETITEMDATA, SendMessage(hwndComboBox, CB_GETCURSEL, 0, 0), NULL) - 1; //first entry is the combo box is a constant. if (curSelProto < 0) perProto = FALSE; switch (msg) { case WM_INITDIALOG: - perProto = (BOOL)db_get_b(NULL,"CLUI","SBarPerProto",SETTING_SBARPERPROTO_DEFAULT); + perProto = (BOOL)db_get_b(NULL, "CLUI", "SBarPerProto", SETTING_SBARPERPROTO_DEFAULT); TranslateDialogDefault(hwndDlg); - CheckDlgButton(hwndDlg, IDC_SHOWSBAR, db_get_b(NULL,"CLUI","ShowSBar",SETTING_SHOWSBAR_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(hwndDlg, IDC_SHOWSBAR, db_get_b(NULL, "CLUI", "ShowSBar", SETTING_SHOWSBAR_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwndDlg, IDC_STATUSBAR_PER_PROTO, perProto ? BST_CHECKED : BST_UNCHECKED); { // populate per-proto list box. @@ -174,47 +173,47 @@ INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l SendMessage(hwndComboBox, CB_RESETCONTENT, 0, 0); PROTOACCOUNT **accs; - ProtoEnumAccounts( &count, &accs ); + ProtoEnumAccounts(&count, &accs); - dat = (StatusBarProtocolOptions*)mir_alloc(sizeof(StatusBarProtocolOptions)*count); - SetWindowLongPtr(GetDlgItem(hwndDlg,IDC_STATUSBAR_PROTO_LIST),GWLP_USERDATA,(LONG_PTR)dat); + dat = (StatusBarProtocolOptions *)mir_alloc(sizeof(StatusBarProtocolOptions) * count); + SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_STATUSBAR_PROTO_LIST), GWLP_USERDATA, (LONG_PTR)dat); SendMessage(hwndComboBox, CB_ADDSTRING, 0, (LPARAM)TranslateT("<>")); SendMessage(hwndComboBox, CB_SETITEMDATA, 0, 0); - for (int i=0; i < count; i++ ) { + for (int i = 0; i < count; i++) { szName = accs[i]->szModuleName; dat[i].szName = szName; DWORD dwNewId = SendMessage(hwndComboBox, CB_ADDSTRING, 0, (LPARAM)accs[i]->tszAccountName); - SendMessage(hwndComboBox, CB_SETITEMDATA, dwNewId, (LPARAM)(i+1)); + SendMessage(hwndComboBox, CB_SETITEMDATA, dwNewId, (LPARAM)i + 1); mir_snprintf(buf, SIZEOF(buf), "SBarAccountIsCustom_%s", szName); - dat[i].AccountIsCustomized = db_get_b(NULL,"CLUI", buf, SETTING_SBARACCOUNTISCUSTOM_DEFAULT); + dat[i].AccountIsCustomized = db_get_b(NULL, "CLUI", buf, SETTING_SBARACCOUNTISCUSTOM_DEFAULT); mir_snprintf(buf, SIZEOF(buf), "HideAccount_%s", szName); - dat[i].HideAccount = db_get_b(NULL,"CLUI", buf, SETTING_SBARHIDEACCOUNT_DEFAULT); + dat[i].HideAccount = db_get_b(NULL, "CLUI", buf, SETTING_SBARHIDEACCOUNT_DEFAULT); mir_snprintf(buf, SIZEOF(buf), "SBarShow_%s", szName); - dat[i].SBarShow = db_get_b(NULL,"CLUI", buf, SETTING_SBARSHOW_DEFAULT); + dat[i].SBarShow = db_get_b(NULL, "CLUI", buf, SETTING_SBARSHOW_DEFAULT); mir_snprintf(buf, SIZEOF(buf), "SBarRightClk_%s", szName); - dat[i].SBarRightClk = db_get_b(NULL,"CLUI", buf, SETTING_SBARRIGHTCLK_DEFAULT); + dat[i].SBarRightClk = db_get_b(NULL, "CLUI", buf, SETTING_SBARRIGHTCLK_DEFAULT); mir_snprintf(buf, SIZEOF(buf), "ShowUnreadEmails_%s", szName); - dat[i].ShowUnreadEmails = db_get_b(NULL,"CLUI", buf, SETTING_SHOWUNREADEMAILS_DEFAULT); + dat[i].ShowUnreadEmails = db_get_b(NULL, "CLUI", buf, SETTING_SHOWUNREADEMAILS_DEFAULT); mir_snprintf(buf, SIZEOF(buf), "ShowXStatus_%s", szName); - dat[i].ShowXStatus = db_get_b(NULL,"CLUI", buf, SETTING_SHOWXSTATUS_DEFAULT); + dat[i].ShowXStatus = db_get_b(NULL, "CLUI", buf, SETTING_SHOWXSTATUS_DEFAULT); mir_snprintf(buf, SIZEOF(buf), "UseConnectingIcon_%s", szName); - dat[i].UseConnectingIcon = db_get_b(NULL,"CLUI", buf, SETTING_USECONNECTINGICON_DEFAULT); + dat[i].UseConnectingIcon = db_get_b(NULL, "CLUI", buf, SETTING_USECONNECTINGICON_DEFAULT); mir_snprintf(buf, SIZEOF(buf), "PaddingLeft_%s", szName); - dat[i].PaddingLeft = db_get_dw(NULL,"CLUI", buf, SETTING_PADDINGLEFT_DEFAULT); + dat[i].PaddingLeft = db_get_dw(NULL, "CLUI", buf, SETTING_PADDINGLEFT_DEFAULT); mir_snprintf(buf, SIZEOF(buf), "PaddingRight_%s", szName); - dat[i].PaddingRight = db_get_dw(NULL,"CLUI", buf, SETTING_PADDINGRIGHT_DEFAULT); + dat[i].PaddingRight = db_get_dw(NULL, "CLUI", buf, SETTING_PADDINGRIGHT_DEFAULT); } if (count) @@ -222,91 +221,80 @@ INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l } _GlobalOptions.AccountIsCustomized = TRUE; - _GlobalOptions.SBarRightClk = db_get_b(NULL,"CLUI", "SBarRightClk", SETTING_SBARRIGHTCLK_DEFAULT); - _GlobalOptions.ShowUnreadEmails = db_get_b(NULL,"CLUI", "ShowUnreadEmails", SETTING_SHOWUNREADEMAILS_DEFAULT); - _GlobalOptions.ShowXStatus = db_get_b(NULL,"CLUI", "ShowXStatus", SETTING_SHOWXSTATUS_DEFAULT); - _GlobalOptions.UseConnectingIcon = db_get_b(NULL,"CLUI", "UseConnectingIcon", SETTING_USECONNECTINGICON_DEFAULT); - _GlobalOptions.SBarShow = db_get_b(NULL,"CLUI","SBarShow",SETTING_SBARSHOW_DEFAULT); + _GlobalOptions.SBarRightClk = db_get_b(NULL, "CLUI", "SBarRightClk", SETTING_SBARRIGHTCLK_DEFAULT); + _GlobalOptions.ShowUnreadEmails = db_get_b(NULL, "CLUI", "ShowUnreadEmails", SETTING_SHOWUNREADEMAILS_DEFAULT); + _GlobalOptions.ShowXStatus = db_get_b(NULL, "CLUI", "ShowXStatus", SETTING_SHOWXSTATUS_DEFAULT); + _GlobalOptions.UseConnectingIcon = db_get_b(NULL, "CLUI", "UseConnectingIcon", SETTING_USECONNECTINGICON_DEFAULT); + _GlobalOptions.SBarShow = db_get_b(NULL, "CLUI", "SBarShow", SETTING_SBARSHOW_DEFAULT); - CheckDlgButton(hwndDlg, IDC_EQUALSECTIONS, db_get_b(NULL,"CLUI","EqualSections",SETTING_EQUALSECTIONS_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(hwndDlg, IDC_EQUALSECTIONS, db_get_b(NULL, "CLUI", "EqualSections", SETTING_EQUALSECTIONS_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); - SendDlgItemMessage(hwndDlg,IDC_MULTI_SPIN,UDM_SETRANGE, 0, MAKELONG(50, 0)); - SendDlgItemMessage(hwndDlg,IDC_MULTI_SPIN,UDM_SETPOS, 0, MAKELONG( db_get_b(NULL,"CLUI","StatusBarProtosPerLine",SETTING_PROTOSPERLINE_DEFAULT),0)); + SendDlgItemMessage(hwndDlg, IDC_MULTI_SPIN, UDM_SETRANGE, 0, MAKELONG(50, 0)); + SendDlgItemMessage(hwndDlg, IDC_MULTI_SPIN, UDM_SETPOS, 0, MAKELONG(db_get_b(NULL, "CLUI", "StatusBarProtosPerLine", SETTING_PROTOSPERLINE_DEFAULT), 0)); - SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN,UDM_SETRANGE, 0, MAKELONG(50, 0)); - SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN,UDM_SETPOS, 0, MAKELONG(db_get_dw(NULL,"CLUI","LeftOffset",SETTING_LEFTOFFSET_DEFAULT),0)); + SendDlgItemMessage(hwndDlg, IDC_OFFSETSPIN, UDM_SETRANGE, 0, MAKELONG(50, 0)); + SendDlgItemMessage(hwndDlg, IDC_OFFSETSPIN, UDM_SETPOS, 0, MAKELONG(db_get_dw(NULL, "CLUI", "LeftOffset", SETTING_LEFTOFFSET_DEFAULT), 0)); - SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN2,UDM_SETRANGE, 0, MAKELONG(50, 0)); - SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN2,UDM_SETPOS, 0, MAKELONG(db_get_dw(NULL,"CLUI","RightOffset",SETTING_RIGHTOFFSET_DEFAULT),0)); + SendDlgItemMessage(hwndDlg, IDC_OFFSETSPIN2, UDM_SETRANGE, 0, MAKELONG(50, 0)); + SendDlgItemMessage(hwndDlg, IDC_OFFSETSPIN2, UDM_SETPOS, 0, MAKELONG(db_get_dw(NULL, "CLUI", "RightOffset", SETTING_RIGHTOFFSET_DEFAULT), 0)); - SendDlgItemMessage(hwndDlg,IDC_SBAR_BORDER_TOP_SPIN,UDM_SETRANGE, 0, MAKELONG(50, 0)); - SendDlgItemMessage(hwndDlg,IDC_SBAR_BORDER_TOP_SPIN,UDM_SETPOS, 0, MAKELONG(db_get_dw(NULL,"CLUI","TopOffset",SETTING_TOPOFFSET_DEFAULT),0)); + SendDlgItemMessage(hwndDlg, IDC_SBAR_BORDER_TOP_SPIN, UDM_SETRANGE, 0, MAKELONG(50, 0)); + SendDlgItemMessage(hwndDlg, IDC_SBAR_BORDER_TOP_SPIN, UDM_SETPOS, 0, MAKELONG(db_get_dw(NULL, "CLUI", "TopOffset", SETTING_TOPOFFSET_DEFAULT), 0)); - SendDlgItemMessage(hwndDlg,IDC_SBAR_BORDER_BOTTOM_SPIN,UDM_SETRANGE, 0, MAKELONG(50, 0)); - SendDlgItemMessage(hwndDlg,IDC_SBAR_BORDER_BOTTOM_SPIN,UDM_SETPOS, 0, MAKELONG(db_get_dw(NULL,"CLUI","BottomOffset",SETTING_BOTTOMOFFSET_DEFAULT),0)); + SendDlgItemMessage(hwndDlg, IDC_SBAR_BORDER_BOTTOM_SPIN, UDM_SETRANGE, 0, MAKELONG(50, 0)); + SendDlgItemMessage(hwndDlg, IDC_SBAR_BORDER_BOTTOM_SPIN, UDM_SETPOS, 0, MAKELONG(db_get_dw(NULL, "CLUI", "BottomOffset", SETTING_BOTTOMOFFSET_DEFAULT), 0)); - SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN3,UDM_SETRANGE, 0, MAKELONG(50, 0)); - SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN3,UDM_SETPOS, 0, MAKELONG(db_get_dw(NULL,"CLUI","SpaceBetween",SETTING_SPACEBETWEEN_DEFAULT),2)); + SendDlgItemMessage(hwndDlg, IDC_OFFSETSPIN3, UDM_SETRANGE, 0, MAKELONG(50, 0)); + SendDlgItemMessage(hwndDlg, IDC_OFFSETSPIN3, UDM_SETPOS, 0, MAKELONG(db_get_dw(NULL, "CLUI", "SpaceBetween", SETTING_SPACEBETWEEN_DEFAULT), 2)); { - int i, item; - TCHAR *align[] = {LPGENT("Left"), LPGENT("Center"), LPGENT("Right")}; - for (i=0; i < SIZEOF(align); i++) { - item = SendDlgItemMessage(hwndDlg,IDC_SBAR_HORIZ_ALIGN,CB_ADDSTRING, 0, (LPARAM)TranslateTS(align[i])); - } - + TCHAR *align[] = { LPGENT("Left"), LPGENT("Center"), LPGENT("Right") }; + for (int i = 0; i < SIZEOF(align); i++) + SendDlgItemMessage(hwndDlg, IDC_SBAR_HORIZ_ALIGN, CB_ADDSTRING, 0, (LPARAM)TranslateTS(align[i])); SendDlgItemMessage(hwndDlg, IDC_SBAR_HORIZ_ALIGN, CB_SETCURSEL, db_get_b(NULL, "CLUI", "Align", SETTING_ALIGN_DEFAULT), 0); } { - int i, item; - TCHAR *align[] = {_T("Top"), _T("Center"), _T("Bottom")}; - for (i=0; i < SIZEOF(align); i++) { - item = SendDlgItemMessage(hwndDlg,IDC_SBAR_VERT_ALIGN,CB_ADDSTRING, 0, (LPARAM)TranslateTS(align[i])); - } - + TCHAR *align[] = { LPGENT("Top"), LPGENT("Center"), LPGENT("Bottom") }; + for (int i = 0; i < SIZEOF(align); i++) + SendDlgItemMessage(hwndDlg, IDC_SBAR_VERT_ALIGN, CB_ADDSTRING, 0, (LPARAM)TranslateTS(align[i])); SendDlgItemMessage(hwndDlg, IDC_SBAR_VERT_ALIGN, CB_SETCURSEL, db_get_b(NULL, "CLUI", "VAlign", SETTING_VALIGN_DEFAULT), 0); } { - int en = IsDlgButtonChecked(hwndDlg,IDC_SHOWSBAR); - int en_icons = IsDlgButtonChecked(hwndDlg,IDC_SHOWICON ); - - EnableWindow(GetDlgItem(hwndDlg,IDC_SHOWICON),en); - EnableWindow(GetDlgItem(hwndDlg,IDC_SHOWPROTO),en); - EnableWindow(GetDlgItem(hwndDlg,IDC_SHOWSTATUS),en); - EnableWindow(GetDlgItem(hwndDlg,IDC_RIGHTSTATUS),en); - EnableWindow(GetDlgItem(hwndDlg,IDC_RIGHTMIRANDA),en); - EnableWindow(GetDlgItem(hwndDlg,IDC_EQUALSECTIONS),en); - EnableWindow(GetDlgItem(hwndDlg,IDC_USECONNECTINGICON),en && en_icons); - EnableWindow(GetDlgItem(hwndDlg,IDC_USEOWNERDRAW),en); - EnableWindow(GetDlgItem(hwndDlg,IDC_OFFSETSPIN),en); - EnableWindow(GetDlgItem(hwndDlg,IDC_OFFSETICON),en); - EnableWindow(GetDlgItem(hwndDlg,IDC_OFFSETSPIN2),en); - EnableWindow(GetDlgItem(hwndDlg,IDC_OFFSETICON2),en); - EnableWindow(GetDlgItem(hwndDlg,IDC_OFFSETSPIN3),en); - EnableWindow(GetDlgItem(hwndDlg,IDC_OFFSETICON3),en); - EnableWindow(GetDlgItem(hwndDlg,IDC_BUTTON_BROWSE),en); - EnableWindow(GetDlgItem(hwndDlg,IDC_SHOW_ONLY_IF_DIFFERENT),en); - EnableWindow(GetDlgItem(hwndDlg,IDC_COLOUR),en); - EnableWindow(GetDlgItem(hwndDlg,IDC_SHOWXSTATUSNAME),en); - EnableWindow(GetDlgItem(hwndDlg,IDC_SHOWXSTATUS),en && en_icons); - EnableWindow(GetDlgItem(hwndDlg,IDC_SHOWBOTH),en && en_icons && IsDlgButtonChecked(hwndDlg,IDC_SHOWXSTATUS) && !IsDlgButtonChecked(hwndDlg,IDC_SHOWNORMAL)); - EnableWindow(GetDlgItem(hwndDlg,IDC_SHOWNORMAL),en && en_icons && IsDlgButtonChecked(hwndDlg,IDC_SHOWXSTATUS) && !IsDlgButtonChecked(hwndDlg,IDC_SHOWBOTH)); - EnableWindow(GetDlgItem(hwndDlg,IDC_TRANSPARENTOVERLAY),en && en_icons && IsDlgButtonChecked(hwndDlg,IDC_SHOWXSTATUS) && IsDlgButtonChecked(hwndDlg,IDC_SHOWNORMAL) && !IsDlgButtonChecked(hwndDlg,IDC_SHOWBOTH)); - EnableWindow(GetDlgItem(hwndDlg,IDC_SHOWUNREADEMAIL),en); - - EnableWindow(GetDlgItem(hwndDlg,IDC_OFFSETICON_LEFT),en); - EnableWindow(GetDlgItem(hwndDlg,IDC_OFFSETSPIN_LEFT),en); - EnableWindow(GetDlgItem(hwndDlg,IDC_OFFSETICON_RIGHT),en); - EnableWindow(GetDlgItem(hwndDlg,IDC_OFFSETSPIN_RIGHT),en); - - EnableWindow(GetDlgItem(hwndDlg,IDC_MULTI),en); - EnableWindow(GetDlgItem(hwndDlg,IDC_MULTI_2),en); - EnableWindow(GetDlgItem(hwndDlg,IDC_MULTI_COUNT),en); - EnableWindow(GetDlgItem(hwndDlg,IDC_MULTI_SPIN),en); - - EnableWindow(GetDlgItem(hwndDlg,IDC_STATUSBAR_PER_PROTO),en); + int en = IsDlgButtonChecked(hwndDlg, IDC_SHOWSBAR); + int en_icons = IsDlgButtonChecked(hwndDlg, IDC_SHOWICON); + + EnableWindow(GetDlgItem(hwndDlg, IDC_EQUALSECTIONS), en); + EnableWindow(GetDlgItem(hwndDlg, IDC_OFFSETSPIN), en); + EnableWindow(GetDlgItem(hwndDlg, IDC_OFFSETICON), en); + EnableWindow(GetDlgItem(hwndDlg, IDC_OFFSETSPIN2), en); + EnableWindow(GetDlgItem(hwndDlg, IDC_OFFSETICON2), en); + EnableWindow(GetDlgItem(hwndDlg, IDC_OFFSETSPIN3), en); + EnableWindow(GetDlgItem(hwndDlg, IDC_OFFSETICON3), en); + EnableWindow(GetDlgItem(hwndDlg, IDC_MULTI_COUNT), en); + EnableWindow(GetDlgItem(hwndDlg, IDC_MULTI_SPIN), en); + + EnableWindow(GetDlgItem(hwndDlg, IDC_SHOWICON), en); + EnableWindow(GetDlgItem(hwndDlg, IDC_SHOWPROTO), en); + EnableWindow(GetDlgItem(hwndDlg, IDC_SHOWSTATUS), en); + EnableWindow(GetDlgItem(hwndDlg, IDC_RIGHTSTATUS), en); + EnableWindow(GetDlgItem(hwndDlg, IDC_RIGHTMIRANDA), en); + EnableWindow(GetDlgItem(hwndDlg, IDC_USECONNECTINGICON), en && en_icons); + EnableWindow(GetDlgItem(hwndDlg, IDC_SHOWXSTATUSNAME), en); + EnableWindow(GetDlgItem(hwndDlg, IDC_SHOWXSTATUS), en && en_icons); + EnableWindow(GetDlgItem(hwndDlg, IDC_SHOWBOTH), en && en_icons && IsDlgButtonChecked(hwndDlg, IDC_SHOWXSTATUS) && !IsDlgButtonChecked(hwndDlg, IDC_SHOWNORMAL)); + EnableWindow(GetDlgItem(hwndDlg, IDC_SHOWNORMAL), en && en_icons && IsDlgButtonChecked(hwndDlg, IDC_SHOWXSTATUS) && !IsDlgButtonChecked(hwndDlg, IDC_SHOWBOTH)); + EnableWindow(GetDlgItem(hwndDlg, IDC_TRANSPARENTOVERLAY), en && en_icons && IsDlgButtonChecked(hwndDlg, IDC_SHOWXSTATUS) && IsDlgButtonChecked(hwndDlg, IDC_SHOWNORMAL) && !IsDlgButtonChecked(hwndDlg, IDC_SHOWBOTH)); + EnableWindow(GetDlgItem(hwndDlg, IDC_SHOWUNREADEMAIL), en); + + EnableWindow(GetDlgItem(hwndDlg, IDC_OFFSETICON_LEFT), en); + EnableWindow(GetDlgItem(hwndDlg, IDC_OFFSETSPIN_LEFT), en); + EnableWindow(GetDlgItem(hwndDlg, IDC_OFFSETICON_RIGHT), en); + EnableWindow(GetDlgItem(hwndDlg, IDC_OFFSETSPIN_RIGHT), en); + + + EnableWindow(GetDlgItem(hwndDlg, IDC_STATUSBAR_PER_PROTO), en); EnableWindow(GetDlgItem(hwndDlg, IDC_STATUSBAR_PROTO_LIST), en && IsDlgButtonChecked(hwndDlg, IDC_STATUSBAR_PER_PROTO)); EnableWindow(GetDlgItem(hwndDlg, IDC_SBAR_USE_ACCOUNT_SETTINGS), FALSE); } @@ -314,23 +302,12 @@ INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l UpdateStatusBarOptionsDisplay(hwndDlg); return TRUE; + case WM_USER + 1: + + case WM_COMMAND: - if (LOWORD(wParam) == IDC_BUTTON1) - { - if (HIWORD(wParam) == BN_CLICKED) - { - CHOOSEFONTA fnt; - memset(&fnt, 0, sizeof(CHOOSEFONTA)); - fnt.lStructSize = sizeof(CHOOSEFONTA); - fnt.hwndOwner = hwndDlg; - fnt.Flags = CF_SCREENFONTS|CF_INITTOLOGFONTSTRUCT; - fnt.lpLogFont = &lf; - ChooseFontA(&fnt); - SendMessage(GetParent(hwndDlg), PSM_CHANGED, (WPARAM)hwndDlg, 0); - return 0; - } - } - else if (LOWORD(wParam) == IDC_COLOUR || (LOWORD(wParam) == IDC_SBAR_HORIZ_ALIGN && HIWORD(wParam) == CBN_SELCHANGE)) SendMessage(GetParent(hwndDlg), PSM_CHANGED, (WPARAM)hwndDlg, 0); + if ((LOWORD(wParam) == IDC_SBAR_VERT_ALIGN || (LOWORD(wParam) == IDC_SBAR_HORIZ_ALIGN) && HIWORD(wParam) == CBN_SELCHANGE)) + SendMessage(GetParent(hwndDlg), PSM_CHANGED, (WPARAM)hwndDlg, 0); else if (LOWORD(wParam) == IDC_SHOWSBAR) { int en = IsDlgButtonChecked(hwndDlg,IDC_SHOWSBAR); int en_icons = IsDlgButtonChecked(hwndDlg,IDC_SHOWICON ); @@ -341,7 +318,6 @@ INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l EnableWindow(GetDlgItem(hwndDlg,IDC_RIGHTMIRANDA),en); EnableWindow(GetDlgItem(hwndDlg,IDC_EQUALSECTIONS),en); EnableWindow(GetDlgItem(hwndDlg,IDC_USECONNECTINGICON),en && en_icons); - EnableWindow(GetDlgItem(hwndDlg,IDC_USEOWNERDRAW),en); EnableWindow(GetDlgItem(hwndDlg,IDC_OFFSETSPIN),en); EnableWindow(GetDlgItem(hwndDlg,IDC_OFFSETICON),en); EnableWindow(GetDlgItem(hwndDlg,IDC_OFFSETSPIN2),en); @@ -353,14 +329,10 @@ INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l EnableWindow(GetDlgItem(hwndDlg,IDC_SBAR_BORDER_BOTTOM),en); EnableWindow(GetDlgItem(hwndDlg,IDC_SBAR_BORDER_BOTTOM_SPIN),en); EnableWindow(GetDlgItem(hwndDlg,IDC_SBAR_HORIZ_ALIGN),en); - EnableWindow(GetDlgItem(hwndDlg,IDC_COLOUR),en); - EnableWindow(GetDlgItem(hwndDlg,IDC_BUTTON1),en); EnableWindow(GetDlgItem(hwndDlg,IDC_SHOWXSTATUSNAME),en); EnableWindow(GetDlgItem(hwndDlg,IDC_SHOWXSTATUS),en && en_icons); EnableWindow(GetDlgItem(hwndDlg,IDC_SHOWUNREADEMAIL),en); - EnableWindow(GetDlgItem(hwndDlg,IDC_MULTI),en); - EnableWindow(GetDlgItem(hwndDlg,IDC_MULTI_2),en); EnableWindow(GetDlgItem(hwndDlg,IDC_MULTI_COUNT),en); EnableWindow(GetDlgItem(hwndDlg,IDC_MULTI_SPIN),en); @@ -372,55 +344,48 @@ INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l SendMessage(GetParent(hwndDlg), PSM_CHANGED, (WPARAM)hwndDlg, 0); } - else if (LOWORD(wParam) == IDC_STATUSBAR_PER_PROTO) - { - int en = IsDlgButtonChecked(hwndDlg,IDC_STATUSBAR_PER_PROTO); - EnableWindow(GetDlgItem(hwndDlg,IDC_STATUSBAR_PROTO_LIST),en); - EnableWindow(GetDlgItem(hwndDlg,IDC_SBAR_HIDE_ACCOUNT_COMPLETELY), en && perProto); - EnableWindow(GetDlgItem(hwndDlg,IDC_SBAR_USE_ACCOUNT_SETTINGS), en); + else if (LOWORD(wParam) == IDC_STATUSBAR_PER_PROTO) { + int en = IsDlgButtonChecked(hwndDlg, IDC_STATUSBAR_PER_PROTO); + EnableWindow(GetDlgItem(hwndDlg, IDC_STATUSBAR_PROTO_LIST), en); + EnableWindow(GetDlgItem(hwndDlg, IDC_SBAR_HIDE_ACCOUNT_COMPLETELY), en && perProto); + EnableWindow(GetDlgItem(hwndDlg, IDC_SBAR_USE_ACCOUNT_SETTINGS), en); UpdateStatusBarOptionsDisplay(hwndDlg); SendMessage(GetParent(hwndDlg), PSM_CHANGED, (WPARAM)hwndDlg, 0); } - else if ( - LOWORD(wParam) == IDC_SHOWXSTATUS || - LOWORD(wParam) == IDC_SHOWBOTH || - LOWORD(wParam) == IDC_SHOWNORMAL || - LOWORD(wParam) == IDC_TRANSPARENTOVERLAY || + else if (LOWORD(wParam) == IDC_SHOWXSTATUS || + LOWORD(wParam) == IDC_SHOWBOTH || + LOWORD(wParam) == IDC_SHOWNORMAL || + LOWORD(wParam) == IDC_TRANSPARENTOVERLAY || LOWORD(wParam) == IDC_SHOWXSTATUSNAME) - { UpdateXStatusIconOptions(hwndDlg, perProto, dat, curSelProto); - } - else if (LOWORD(wParam) == IDC_SBAR_USE_ACCOUNT_SETTINGS) - { + else if (LOWORD(wParam) == IDC_SBAR_USE_ACCOUNT_SETTINGS) { if (perProto) { dat[curSelProto].AccountIsCustomized = IsDlgButtonChecked(hwndDlg, IDC_SBAR_USE_ACCOUNT_SETTINGS); UpdateStatusBarOptionsDisplay(hwndDlg); } } - else if (LOWORD(wParam) == IDC_SBAR_HIDE_ACCOUNT_COMPLETELY) - { + else if (LOWORD(wParam) == IDC_SBAR_HIDE_ACCOUNT_COMPLETELY) { if (perProto) dat[curSelProto].HideAccount = IsDlgButtonChecked(hwndDlg, IDC_SBAR_HIDE_ACCOUNT_COMPLETELY); } - else if (LOWORD(wParam) == IDC_USECONNECTINGICON) - { + else if (LOWORD(wParam) == IDC_USECONNECTINGICON) { if (perProto) dat[curSelProto].UseConnectingIcon = IsDlgButtonChecked(hwndDlg, IDC_USECONNECTINGICON); else _GlobalOptions.UseConnectingIcon = IsDlgButtonChecked(hwndDlg, IDC_USECONNECTINGICON); } - else if (LOWORD(wParam) == IDC_SHOWUNREADEMAIL) - { + else if (LOWORD(wParam) == IDC_SHOWUNREADEMAIL) { if (perProto) dat[curSelProto].ShowUnreadEmails = IsDlgButtonChecked(hwndDlg, IDC_SHOWUNREADEMAIL); else _GlobalOptions.ShowUnreadEmails = IsDlgButtonChecked(hwndDlg, IDC_SHOWUNREADEMAIL); } - else if (LOWORD(wParam) == IDC_SHOWICON || LOWORD(wParam) == IDC_SHOWPROTO || LOWORD(wParam) == IDC_SHOWSTATUS) - { - BYTE val = (IsDlgButtonChecked(hwndDlg, IDC_SHOWICON)?1:0)|(IsDlgButtonChecked(hwndDlg, IDC_SHOWPROTO)?2:0)|(IsDlgButtonChecked(hwndDlg, IDC_SHOWSTATUS)?4:0); + else if (LOWORD(wParam) == IDC_SHOWICON || LOWORD(wParam) == IDC_SHOWPROTO || LOWORD(wParam) == IDC_SHOWSTATUS) { + BYTE val = (IsDlgButtonChecked(hwndDlg, IDC_SHOWICON) ? 1 : 0) | + (IsDlgButtonChecked(hwndDlg, IDC_SHOWPROTO) ? 2 : 0) | + (IsDlgButtonChecked(hwndDlg, IDC_SHOWSTATUS) ? 4 : 0); if (perProto) dat[curSelProto].SBarShow = val; else @@ -428,41 +393,29 @@ INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l UpdateStatusBarOptionsDisplay(hwndDlg); } - else if (LOWORD(wParam) == IDC_RIGHTSTATUS || LOWORD(wParam) == IDC_RIGHTMIRANDA) - { + else if (LOWORD(wParam) == IDC_RIGHTSTATUS || LOWORD(wParam) == IDC_RIGHTMIRANDA) { if (perProto) - dat[curSelProto].SBarRightClk = IsDlgButtonChecked(hwndDlg,IDC_RIGHTMIRANDA); + dat[curSelProto].SBarRightClk = IsDlgButtonChecked(hwndDlg, IDC_RIGHTMIRANDA); else - _GlobalOptions.SBarRightClk = IsDlgButtonChecked(hwndDlg,IDC_RIGHTMIRANDA); + _GlobalOptions.SBarRightClk = IsDlgButtonChecked(hwndDlg, IDC_RIGHTMIRANDA); } - else if (LOWORD(wParam) == IDC_OFFSETICON_LEFT) - { + else if (LOWORD(wParam) == IDC_OFFSETICON_LEFT) { if (perProto) - dat[curSelProto].PaddingLeft = (DWORD)SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN_LEFT,UDM_GETPOS, 0, 0); + dat[curSelProto].PaddingLeft = (DWORD)SendDlgItemMessage(hwndDlg, IDC_OFFSETSPIN_LEFT, UDM_GETPOS, 0, 0); else - _GlobalOptions.PaddingLeft = (DWORD)SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN_LEFT,UDM_GETPOS, 0, 0); + _GlobalOptions.PaddingLeft = (DWORD)SendDlgItemMessage(hwndDlg, IDC_OFFSETSPIN_LEFT, UDM_GETPOS, 0, 0); } - else if (LOWORD(wParam) == IDC_OFFSETICON_RIGHT) - { + else if (LOWORD(wParam) == IDC_OFFSETICON_RIGHT) { if (perProto) - dat[curSelProto].PaddingRight = (DWORD)SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN_RIGHT,UDM_GETPOS, 0, 0); + dat[curSelProto].PaddingRight = (DWORD)SendDlgItemMessage(hwndDlg, IDC_OFFSETSPIN_RIGHT, UDM_GETPOS, 0, 0); else - _GlobalOptions.PaddingRight = (DWORD)SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN_RIGHT,UDM_GETPOS, 0, 0); + _GlobalOptions.PaddingRight = (DWORD)SendDlgItemMessage(hwndDlg, IDC_OFFSETSPIN_RIGHT, UDM_GETPOS, 0, 0); } - else if (( - LOWORD(wParam) == IDC_MULTI_COUNT || - LOWORD(wParam) == IDC_OFFSETICON || - LOWORD(wParam) == IDC_OFFSETICON2 || - LOWORD(wParam) == IDC_OFFSETICON3 || - LOWORD(wParam) == IDC_SBAR_BORDER_BOTTOM || - LOWORD(wParam) == IDC_SBAR_BORDER_TOP - ) && ( - HIWORD(wParam) != EN_CHANGE || - (HWND)lParam != GetFocus() - )) + else if ((LOWORD(wParam) == IDC_MULTI_COUNT || LOWORD(wParam) == IDC_OFFSETICON || LOWORD(wParam) == IDC_OFFSETICON2 + || LOWORD(wParam) == IDC_OFFSETICON3 || LOWORD(wParam) == IDC_SBAR_BORDER_BOTTOM || LOWORD(wParam) == IDC_SBAR_BORDER_TOP) + && (HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus())) return 0; // dont make apply enabled during buddy set crap - else if ( LOWORD(wParam) == IDC_STATUSBAR_PROTO_LIST ) - { + else if (LOWORD(wParam) == IDC_STATUSBAR_PROTO_LIST) { UpdateStatusBarOptionsDisplay(hwndDlg); return 0; } @@ -472,56 +425,55 @@ INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l switch (((LPNMHDR)lParam)->code) { case PSN_APPLY: { - int count = db_get_dw(0, "Protocols","ProtoCount",-1); + int count = db_get_dw(0, "Protocols", "ProtoCount", -1); db_set_b(NULL, "CLUI", "SBarPerProto", IsDlgButtonChecked(hwndDlg, IDC_STATUSBAR_PER_PROTO)); - for (int i=0; i < count; i++) { + for (int i = 0; i < count; i++) { StatusBarProtocolOptions sbpo = dat[i]; char *defProto = sbpo.szName; char settingBuf[256]; mir_snprintf(settingBuf, SIZEOF(settingBuf), "SBarAccountIsCustom_%s", defProto); - db_set_b(NULL,"CLUI",settingBuf,(BYTE)sbpo.AccountIsCustomized); + db_set_b(NULL, "CLUI", settingBuf, (BYTE)sbpo.AccountIsCustomized); mir_snprintf(settingBuf, SIZEOF(settingBuf), "HideAccount_%s", defProto); - db_set_b(NULL,"CLUI",settingBuf,(BYTE)sbpo.HideAccount); + db_set_b(NULL, "CLUI", settingBuf, (BYTE)sbpo.HideAccount); mir_snprintf(settingBuf, SIZEOF(settingBuf), "SBarShow_%s", defProto); - db_set_b(NULL,"CLUI",settingBuf,(BYTE)sbpo.SBarShow); + db_set_b(NULL, "CLUI", settingBuf, (BYTE)sbpo.SBarShow); mir_snprintf(settingBuf, SIZEOF(settingBuf), "SBarRightClk_%s", defProto); - db_set_b(NULL,"CLUI",settingBuf,(BYTE)sbpo.SBarRightClk); + db_set_b(NULL, "CLUI", settingBuf, (BYTE)sbpo.SBarRightClk); mir_snprintf(settingBuf, SIZEOF(settingBuf), "UseConnectingIcon_%s", defProto); - db_set_b(NULL,"CLUI",settingBuf,(BYTE)sbpo.UseConnectingIcon); + db_set_b(NULL, "CLUI", settingBuf, (BYTE)sbpo.UseConnectingIcon); mir_snprintf(settingBuf, SIZEOF(settingBuf), "ShowUnreadEmails_%s", defProto); - db_set_b(NULL,"CLUI",settingBuf,(BYTE)sbpo.ShowUnreadEmails); + db_set_b(NULL, "CLUI", settingBuf, (BYTE)sbpo.ShowUnreadEmails); mir_snprintf(settingBuf, SIZEOF(settingBuf), "ShowXStatus_%s", defProto); - db_set_b(NULL,"CLUI",settingBuf,sbpo.ShowXStatus); + db_set_b(NULL, "CLUI", settingBuf, sbpo.ShowXStatus); mir_snprintf(settingBuf, SIZEOF(settingBuf), "PaddingLeft_%s", defProto); - db_set_dw(NULL,"CLUI",settingBuf,sbpo.PaddingLeft); + db_set_dw(NULL, "CLUI", settingBuf, sbpo.PaddingLeft); mir_snprintf(settingBuf, SIZEOF(settingBuf), "PaddingRight_%s", defProto); - db_set_dw(NULL,"CLUI",settingBuf,sbpo.PaddingRight); + db_set_dw(NULL, "CLUI", settingBuf, sbpo.PaddingRight); } - db_set_b(NULL,"CLUI","SBarShow",(BYTE)_GlobalOptions.SBarShow); - db_set_b(NULL,"CLUI","SBarRightClk",(BYTE)_GlobalOptions.SBarRightClk); - db_set_b(NULL,"CLUI","UseConnectingIcon",(BYTE)_GlobalOptions.UseConnectingIcon); - db_set_b(NULL,"CLUI","ShowUnreadEmails",(BYTE)_GlobalOptions.ShowUnreadEmails); - db_set_b(NULL,"CLUI","ShowXStatus",_GlobalOptions.ShowXStatus); - db_set_dw(NULL,"CLUI","PaddingLeft",_GlobalOptions.PaddingLeft); - db_set_dw(NULL,"CLUI","PaddingRight",_GlobalOptions.PaddingRight); - - - db_set_b(NULL,"CLUI","StatusBarProtosPerLine",(BYTE)SendDlgItemMessage(hwndDlg,IDC_MULTI_SPIN,UDM_GETPOS, 0, 0)); - db_set_b(NULL,"CLUI","EqualSections",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_EQUALSECTIONS)); - db_set_b(NULL,"CLUI","Align",(BYTE)SendDlgItemMessage(hwndDlg,IDC_SBAR_HORIZ_ALIGN,CB_GETCURSEL, 0, 0)); - db_set_b(NULL,"CLUI","VAlign",(BYTE)SendDlgItemMessage(hwndDlg,IDC_SBAR_VERT_ALIGN,CB_GETCURSEL, 0, 0)); - db_set_dw(NULL,"CLUI","LeftOffset",(DWORD)SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN,UDM_GETPOS, 0, 0)); - db_set_dw(NULL,"CLUI","RightOffset",(DWORD)SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN2,UDM_GETPOS, 0, 0)); - db_set_dw(NULL,"CLUI","TopOffset",(DWORD)SendDlgItemMessage(hwndDlg,IDC_SBAR_BORDER_TOP_SPIN,UDM_GETPOS, 0, 0)); - db_set_dw(NULL,"CLUI","BottomOffset",(DWORD)SendDlgItemMessage(hwndDlg,IDC_SBAR_BORDER_BOTTOM_SPIN,UDM_GETPOS, 0, 0)); - db_set_dw(NULL,"CLUI","SpaceBetween",(DWORD)SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN3,UDM_GETPOS, 0, 0)); - db_set_dw(NULL,"ModernData","StatusBarFontCol",SendDlgItemMessage(hwndDlg,IDC_COLOUR,CPM_GETCOLOUR, 0, 0)); - db_set_b(NULL,"CLUI","ShowSBar",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_SHOWSBAR)); + db_set_b(NULL, "CLUI", "SBarShow", (BYTE)_GlobalOptions.SBarShow); + db_set_b(NULL, "CLUI", "SBarRightClk", (BYTE)_GlobalOptions.SBarRightClk); + db_set_b(NULL, "CLUI", "UseConnectingIcon", (BYTE)_GlobalOptions.UseConnectingIcon); + db_set_b(NULL, "CLUI", "ShowUnreadEmails", (BYTE)_GlobalOptions.ShowUnreadEmails); + db_set_b(NULL, "CLUI", "ShowXStatus", _GlobalOptions.ShowXStatus); + db_set_dw(NULL, "CLUI", "PaddingLeft", _GlobalOptions.PaddingLeft); + db_set_dw(NULL, "CLUI", "PaddingRight", _GlobalOptions.PaddingRight); + + + db_set_b(NULL, "CLUI", "StatusBarProtosPerLine", (BYTE)SendDlgItemMessage(hwndDlg, IDC_MULTI_SPIN, UDM_GETPOS, 0, 0)); + db_set_b(NULL, "CLUI", "EqualSections", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_EQUALSECTIONS)); + db_set_b(NULL, "CLUI", "Align", (BYTE)SendDlgItemMessage(hwndDlg, IDC_SBAR_HORIZ_ALIGN, CB_GETCURSEL, 0, 0)); + db_set_b(NULL, "CLUI", "VAlign", (BYTE)SendDlgItemMessage(hwndDlg, IDC_SBAR_VERT_ALIGN, CB_GETCURSEL, 0, 0)); + db_set_dw(NULL, "CLUI", "LeftOffset", (DWORD)SendDlgItemMessage(hwndDlg, IDC_OFFSETSPIN, UDM_GETPOS, 0, 0)); + db_set_dw(NULL, "CLUI", "RightOffset", (DWORD)SendDlgItemMessage(hwndDlg, IDC_OFFSETSPIN2, UDM_GETPOS, 0, 0)); + db_set_dw(NULL, "CLUI", "TopOffset", (DWORD)SendDlgItemMessage(hwndDlg, IDC_SBAR_BORDER_TOP_SPIN, UDM_GETPOS, 0, 0)); + db_set_dw(NULL, "CLUI", "BottomOffset", (DWORD)SendDlgItemMessage(hwndDlg, IDC_SBAR_BORDER_BOTTOM_SPIN, UDM_GETPOS, 0, 0)); + db_set_dw(NULL, "CLUI", "SpaceBetween", (DWORD)SendDlgItemMessage(hwndDlg, IDC_OFFSETSPIN3, UDM_GETPOS, 0, 0)); + db_set_b(NULL, "CLUI", "ShowSBar", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SHOWSBAR)); LoadStatusBarData(); cliCluiProtocolStatusChanged(0, 0); diff --git a/plugins/Clist_modern/src/modern_toolbar.cpp b/plugins/Clist_modern/src/modern_toolbar.cpp index b6b6c3a38b..f809345a8a 100644 --- a/plugins/Clist_modern/src/modern_toolbar.cpp +++ b/plugins/Clist_modern/src/modern_toolbar.cpp @@ -46,7 +46,7 @@ static BTNS[] = { "ShowHideOffline",LPGEN("Show/Hide offline contacts"), MS_CLIST_TOGGLEHIDEOFFLINE, LPGEN("Hide offline contacts"), LPGEN("Show offline contacts"), 110, IDI_RESETVIEW, IDI_RESETVIEW, TRUE }, { "FindUser",LPGEN("Find user"), "FindAdd/FindAddCommand", LPGEN("Find user"), NULL, 140 , IDI_RESETVIEW, IDI_RESETVIEW, TRUE }, { "Options","Options", "Options/OptionsCommand", "Options", NULL, 150 , IDI_RESETVIEW, IDI_RESETVIEW, TRUE }, - { "UseGroups",LPGEN("Use/Disable groups"), MS_CLIST_TOGGLEGROUPS, LPGEN("Use groups"), LPGEN("Disable Groups"), 160, IDI_RESETVIEW, IDI_RESETVIEW, FALSE }, + { "UseGroups",LPGEN("Use/Disable groups"), MS_CLIST_TOGGLEGROUPS, LPGEN("Use groups"), LPGEN("Disable groups"), 160, IDI_RESETVIEW, IDI_RESETVIEW, FALSE }, { "EnableSounds",LPGEN("Enable/Disable sounds"), MS_CLIST_TOGGLESOUNDS, LPGEN("Enable sounds"), LPGEN("Disable sounds"), 170, IDI_RESETVIEW, IDI_RESETVIEW, FALSE }, { "Minimize",LPGEN("Minimize"), "CList/ShowHide", LPGEN("Minimize"), NULL, 180 , IDI_RESETVIEW, IDI_RESETVIEW, FALSE } }; diff --git a/plugins/Clist_modern/src/modern_viewmodebar.cpp b/plugins/Clist_modern/src/modern_viewmodebar.cpp index 523b2b7b80..b23da2dca2 100644 --- a/plugins/Clist_modern/src/modern_viewmodebar.cpp +++ b/plugins/Clist_modern/src/modern_viewmodebar.cpp @@ -952,7 +952,7 @@ void BuildViewModeMenu() menuCounter = 100; hViewModeMenu = CreatePopupMenu(); - AppendMenu(hViewModeMenu, MFT_STRING, 10002, TranslateT("All Contacts")); + AppendMenu(hViewModeMenu, MFT_STRING, 10002, TranslateT("All contacts")); AppendMenu(hViewModeMenu, MF_SEPARATOR, 0, NULL); @@ -960,7 +960,7 @@ void BuildViewModeMenu() if (GetMenuItemCount(hViewModeMenu) > 2) AppendMenu(hViewModeMenu, MF_SEPARATOR, 0, NULL); - AppendMenu(hViewModeMenu, MFT_STRING, 10001, TranslateT("Setup View Modes...")); + AppendMenu(hViewModeMenu, MFT_STRING, 10001, TranslateT("Setup view modes...")); } LRESULT CALLBACK ViewModeFrameWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) @@ -1229,7 +1229,7 @@ static int ehhViewModeBackgroundSettingsChanged(WPARAM wParam, LPARAM lParam) void CreateViewModeFrame() { - CallService(MS_BACKGROUNDCONFIG_REGISTER,(WPARAM)(LPGEN("View Mode Background")"/ViewMode"),0); + CallService(MS_BACKGROUNDCONFIG_REGISTER,(WPARAM)(LPGEN("View mode background")"/ViewMode"),0); HookEvent(ME_BACKGROUNDCONFIG_CHANGED,ehhViewModeBackgroundSettingsChanged); ehhViewModeBackgroundSettingsChanged(0, 0); @@ -1250,7 +1250,7 @@ void CreateViewModeFrame() frame.tname = _T("View modes"); frame.hIcon = LoadSkinnedIcon(SKINICON_OTHER_FRAME); frame.height = 18; - frame.TBtname = TranslateT("View Modes"); + frame.TBtname = TranslateT("View modes"); frame.Flags = F_VISIBLE | F_SHOWTBTIP | F_NOBORDER | F_NO_SUBCONTAINER | F_TCHAR; frame.align = alBottom; frame.hWnd = CreateWindowEx(0, _T("CLVMFrameWindow"), _T(CLVM_MODULE), WS_VISIBLE | WS_CHILD | WS_TABSTOP | WS_CLIPCHILDREN, 0, 0, 20, 20, pcli->hwndContactList, (HMENU)0, g_hInst, NULL); -- cgit v1.2.3