diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2012-11-24 16:15:56 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2012-11-24 16:15:56 +0000 |
commit | f1653a584862800b23353c88e3ffd4b98cbe3a57 (patch) | |
tree | d3707de28f9abf1b883644e178794de25af6f00b | |
parent | 9df3eaf9a55fcc5e6a751395b1e87cb5dbc79884 (diff) |
Fixed Apply button
git-svn-id: http://svn.miranda-ng.org/main/trunk@2464 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | plugins/NotesAndReminders/res/resource.rc | 107 | ||||
-rw-r--r-- | plugins/NotesAndReminders/src/options.cpp | 41 | ||||
-rw-r--r-- | plugins/NotesAndReminders/src/resource.h | 13 |
3 files changed, 82 insertions, 79 deletions
diff --git a/plugins/NotesAndReminders/res/resource.rc b/plugins/NotesAndReminders/res/resource.rc index d66898ed60..4cf8708442 100644 --- a/plugins/NotesAndReminders/res/resource.rc +++ b/plugins/NotesAndReminders/res/resource.rc @@ -16,10 +16,8 @@ // Neutral resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU)
-#ifdef _WIN32
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
#pragma code_page(1252)
-#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
@@ -92,13 +90,11 @@ END /////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
+// English (United States) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
-#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
@@ -111,36 +107,36 @@ EXSTYLE WS_EX_CONTROLPARENT CAPTION "Sticky Notes Options"
FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
- GROUPBOX "Default Note Size",IDC_STATIC,5,6,159,51
+ GROUPBOX "Default Note Size",IDC_STATIC,6,6,156,51
LTEXT "Width (Pixels)",IDC_STATIC,12,20,44,8
- EDITTEXT 1012,70,20,62,12,ES_AUTOHSCROLL | ES_NUMBER
+ EDITTEXT IDC_EDIT_WIDTH,70,20,62,12,ES_AUTOHSCROLL | ES_NUMBER
LTEXT "Height (Pixels)",IDC_STATIC,12,41,46,8
- EDITTEXT 1013,70,39,62,12,ES_AUTOHSCROLL | ES_NUMBER
- GROUPBOX "Notes Appearance",IDC_STATIC,5,61,159,72
- CONTROL "Show Scrollbars",1018,"Button",BS_AUTOCHECKBOX | BS_FLAT | WS_TABSTOP,12,77,67,10
- CONTROL "Show Buttons",1019,"Button",BS_AUTOCHECKBOX | BS_FLAT | WS_TABSTOP,88,77,64,10
+ EDITTEXT IDC_EDIT_HEIGHT,70,39,62,12,ES_AUTOHSCROLL | ES_NUMBER
+ GROUPBOX "Notes Appearance",IDC_STATIC,6,61,156,72
+ CONTROL "Show Scrollbars",IDC_CHECK_SCROLLBARS,"Button",BS_AUTOCHECKBOX | BS_FLAT | WS_TABSTOP,12,77,67,10
+ CONTROL "Show Buttons",IDC_CHECK_BUTTONS,"Button",BS_AUTOCHECKBOX | BS_FLAT | WS_TABSTOP,88,77,64,10
LTEXT "Title Date",IDC_STATIC,12,96,32,8
COMBOBOX IDC_COMBODATE,53,95,92,149,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "Title Time",IDC_STATIC,12,115,32,8
COMBOBOX IDC_COMBOTIME,53,114,92,130,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- GROUPBOX "Startup options",IDC_STATIC,179,6,116,56
- CONTROL "Hide notes at startup",1010,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | BS_FLAT | WS_TABSTOP,185,17,82,16
- CONTROL "Add Contact list menu items",1011,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | BS_FLAT | WS_TABSTOP,185,35,103,10
- CTEXT "(Requires Miranda restart)",IDC_STATIC,196,50,84,10
- GROUPBOX "Reminder options",IDC_STATIC,179,66,116,90
- CONTROL "Add Reminder closes dialog",1020,"Button",BS_AUTOCHECKBOX | BS_FLAT | WS_TABSTOP,185,81,103,10
- CONTROL "Use MCI to play alert sounds",1023,"Button",BS_AUTOCHECKBOX | BS_FLAT | WS_TABSTOP,185,96,106,10
+ GROUPBOX "Startup options",IDC_STATIC,168,6,128,56
+ CONTROL "Hide notes at startup",IDC_CHECK_HIDENOTES,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | BS_FLAT | WS_TABSTOP,172,17,119,16
+ CONTROL "Add Contact list menu items",IDC_CHECK_MENUS,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | BS_FLAT | WS_TABSTOP,172,35,119,10
+ CTEXT "(Requires Miranda restart)",IDC_STATIC,172,50,119,10
+ GROUPBOX "Reminder options",IDC_STATIC,168,66,128,95
+ CONTROL "Add Reminder closes dialog",IDC_CHECK_CLOSE,"Button",BS_AUTOCHECKBOX | BS_FLAT | WS_TABSTOP,172,81,119,10
+ CONTROL "Use MCI to play alert sounds",IDC_CHECK_MSI,"Button",BS_AUTOCHECKBOX | BS_FLAT | WS_TABSTOP,172,96,119,10
GROUPBOX "Note Transparency (Minimum Win 2k/XP)",IDC_STATIC,6,161,290,35
- CONTROL "Slider1",1014,"msctls_trackbar32",TBS_ENABLESELRANGE | WS_TABSTOP,8,171,283,14
+ CONTROL "Slider1",IDC_SLIDER_TRANSPARENCY,"msctls_trackbar32",TBS_ENABLESELRANGE | WS_TABSTOP,14,171,277,14
LTEXT "0%",IDC_STATIC,12,185,9,8
- LTEXT "100%",IDC_STATIC,276,186,18,8
+ LTEXT "100%",IDC_STATIC,273,186,18,8
LTEXT "Send Reminders through E-mail / SMS :",IDC_STATIC,6,207,130,10
- EDITTEXT 1017,137,204,158,14,ES_AUTOHSCROLL
+ EDITTEXT IDC_EDIT_EMAILSMS,137,204,159,14,ES_AUTOHSCROLL
LTEXT "Open links with this program instead:",IDC_STATIC,5,228,125,8
EDITTEXT IDC_EDIT_ALTBROWSER,138,225,140,14,ES_AUTOHSCROLL
PUSHBUTTON "...",IDC_BTN_BROWSEBROWSER,280,225,15,15
PUSHBUTTON "Reset to defaults",1007,32,140,94,14
- CTEXT "(Using MCI allows different sounds to be played simultaneously, may not be needed or desired when a custom sound plugin is installed.)",IDC_STATIC,181,111,111,42
+ CTEXT "(Using MCI allows different sounds to be played simultaneously, may not be needed or desired when a custom sound plugin is installed.)",IDC_STATIC,172,111,119,43
END
IDD_ADDREMINDER DIALOGEX 0, 0, 238, 199
@@ -213,27 +209,27 @@ END // Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
-IDI_ADDREMINDER ICON "addremin.ico"
-IDI_DELETEICON ICON "deleteic.ico"
-IDI_NOTEICON ICON "noteicon.ico"
-IDI_SHOWHIDE ICON "showhide.ico"
-IDI_CAPTIONICON ICON "captioni.ico"
-IDI_DELETEREMINDER ICON "deletere.ico"
-IDI_VIEWREMINDERS ICON "viewremi.ico"
-IDI_CAPTIONICONNOTTOP ICON "captionn.ico"
-IDI_HIDENOTE ICON "hidenote.ico"
-IDI_REMOVENOTE ICON "removeno.ico"
-IDI_REMINDER ICON "reminder.ico"
-IDI_BRINGFRONT ICON "bringfront.ico"
-IDI_PLAYSOUND ICON "playsound.ico"
-IDI_VIEWNOTES ICON "viewnotes.ico"
+IDI_ADDREMINDER ICON "addremin.ico"
+IDI_DELETEICON ICON "deleteic.ico"
+IDI_NOTEICON ICON "noteicon.ico"
+IDI_SHOWHIDE ICON "showhide.ico"
+IDI_CAPTIONICON ICON "captioni.ico"
+IDI_DELETEREMINDER ICON "deletere.ico"
+IDI_VIEWREMINDERS ICON "viewremi.ico"
+IDI_CAPTIONICONNOTTOP ICON "captionn.ico"
+IDI_HIDENOTE ICON "hidenote.ico"
+IDI_REMOVENOTE ICON "removeno.ico"
+IDI_REMINDER ICON "reminder.ico"
+IDI_BRINGFRONT ICON "bringfront.ico"
+IDI_PLAYSOUND ICON "playsound.ico"
+IDI_VIEWNOTES ICON "viewnotes.ico"
/////////////////////////////////////////////////////////////////////////////
//
// Menu
//
-MNU_REMINDERPOPUP MENU
+MNU_REMINDERPOPUP MENU
BEGIN
POPUP "Context Menu Reminder ListView"
BEGIN
@@ -246,7 +242,7 @@ BEGIN END
END
-MNU_NOTEPOPUP MENU
+MNU_NOTEPOPUP MENU
BEGIN
POPUP "Context Menu Note Popup"
BEGIN
@@ -291,7 +287,7 @@ BEGIN END
END
-MNU_NOTELISTPOPUP MENU
+MNU_NOTELISTPOPUP MENU
BEGIN
POPUP "Context Menu Note ListView"
BEGIN
@@ -316,36 +312,21 @@ END //
#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO
+GUIDELINES DESIGNINFO
BEGIN
- "IDD_STNOTEOPTIONS", DIALOG
+ IDD_STNOTEOPTIONS, DIALOG
BEGIN
- VERTGUIDE, 5
- VERTGUIDE, 12
- VERTGUIDE, 70
- VERTGUIDE, 88
- VERTGUIDE, 179
- VERTGUIDE, 185
- VERTGUIDE, 295
- BOTTOMMARGIN, 249
- HORZGUIDE, 6
- HORZGUIDE, 20
- END
-
- "IDD_ADDREMINDER", DIALOG
- BEGIN
- VERTGUIDE, 4
- END
-
- "IDD_NOTIFYREMINDER", DIALOG
- BEGIN
- VERTGUIDE, 161
- VERTGUIDE, 236
+ VERTGUIDE, 6
+ VERTGUIDE, 162
+ VERTGUIDE, 168
+ VERTGUIDE, 172
+ VERTGUIDE, 291
+ VERTGUIDE, 296
END
END
#endif // APSTUDIO_INVOKED
-#endif // English (U.S.) resources
+#endif // English (United States) resources
/////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/NotesAndReminders/src/options.cpp b/plugins/NotesAndReminders/src/options.cpp index 026d7e37a4..d85f1870d7 100644 --- a/plugins/NotesAndReminders/src/options.cpp +++ b/plugins/NotesAndReminders/src/options.cpp @@ -247,8 +247,6 @@ static int FS_ColorChanged(WPARAM wParam, LPARAM lParam) void RegisterFontServiceFonts()
{
- HDC hDC;
- int nFontScale;
FontIDT fontid = {0};
ColourIDT colorid = {0};
char szTemp[100];
@@ -261,8 +259,8 @@ void RegisterFontServiceFonts() strncpy(fontid.dbSettingsGroup, MODULENAME, SIZEOF(fontid.dbSettingsGroup));
fontid.flags = FIDF_ALLOWREREGISTER | FIDF_DEFAULTVALID | FIDF_SAVEPOINTSIZE;
- hDC = GetDC(NULL);
- nFontScale = GetDeviceCaps(hDC, LOGPIXELSY);
+ HDC hDC = GetDC(NULL);
+ int nFontScale = GetDeviceCaps(hDC, LOGPIXELSY);
ReleaseDC(NULL, hDC);
for (i = 0; i < SIZEOF(fontOptionsList); i++)
@@ -323,19 +321,15 @@ void LoadNRFont(int i, LOGFONT *lf, COLORREF *colour) static void TrimString(TCHAR *s)
{
- TCHAR *start;
- TCHAR *end;
- UINT n;
-
if (!s || !*s)
{
return;
}
- start = s;
- n = _tcslen(s) - 1;
+ TCHAR *start = s;
+ UINT n = _tcslen(s) - 1;
- end = s + n;
+ TCHAR *end = s + n;
if (!_istspace(*start) && !_istspace(*end))
{
@@ -521,6 +515,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hdlg,UINT message,WPARAM wParam,LPARAM lPar if ( GetOpenFileName(&ofn) )
{
SetDlgItemText(hdlg,IDC_EDIT_ALTBROWSER,s);
+ SendMessage(GetParent(hdlg), PSM_CHANGED, 0, 0);
}
}
break;
@@ -559,9 +554,27 @@ INT_PTR CALLBACK DlgProcOptions(HWND hdlg,UINT message,WPARAM wParam,LPARAM lPar SendMessage(GetParent(hdlg), PSM_CHANGED, 0, 0); // JK optim
return TRUE;
}
- default:
- SendMessage(GetParent(hdlg), PSM_CHANGED, 0, 0);
- return TRUE;
+ case IDC_EDIT_ALTBROWSER:
+ case IDC_EDIT_EMAILSMS:
+ case IDC_EDIT_WIDTH:
+ case IDC_EDIT_HEIGHT:
+ if (HIWORD(wParam) == EN_CHANGE && (HWND)lParam == GetFocus())
+ SendMessage(GetParent(hdlg), PSM_CHANGED, 0, 0);
+ break;
+ case IDC_COMBODATE:
+ case IDC_COMBOTIME:
+ if (HIWORD(wParam) == CBN_SELCHANGE)
+ SendMessage(GetParent(hdlg), PSM_CHANGED, 0, 0);
+ break;
+ case IDC_CHECK_SCROLLBARS:
+ case IDC_CHECK_BUTTONS:
+ case IDC_CHECK_HIDENOTES:
+ case IDC_CHECK_MENUS:
+ case IDC_CHECK_CLOSE:
+ case IDC_CHECK_MSI:
+ if (HIWORD(wParam) == BN_CLICKED)
+ SendMessage(GetParent(hdlg), PSM_CHANGED, 0, 0);
+ break;
}
}
return FALSE;
diff --git a/plugins/NotesAndReminders/src/resource.h b/plugins/NotesAndReminders/src/resource.h index 0ddf8b4031..e899809bc4 100644 --- a/plugins/NotesAndReminders/src/resource.h +++ b/plugins/NotesAndReminders/src/resource.h @@ -1,6 +1,6 @@ //{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
-// Used by resource.rc
+// Used by C:\Users\xx\Documents\Visual Studio 2010\Projects\myranda\plugins\NotesAndReminders\res\resource.rc
//
#define IDD_STNOTEOPTIONS 101
#define IDD_ADDREMINDER 102
@@ -20,10 +20,19 @@ #define IDI_BRINGFRONT 121
#define IDI_PLAYSOUND 122
#define IDI_VIEWNOTES 123
-
+#define IDC_CHECK_HIDENOTES 1010
+#define IDC_CHECK_MENUS 1011
+#define IDC_EDIT_WIDTH 1012
+#define IDC_EDIT_HEIGHT 1013
+#define IDC_SLIDER_TRANSPARENCY 1014
+#define IDC_EDIT_EMAILSMS 1017
+#define IDC_CHECK_SCROLLBARS 1018
+#define IDC_CHECK_BUTTONS 1019
+#define IDC_CHECK_CLOSE 1020
#define IDC_COMBODATE 1021
#define IDC_COMBOTIME 1022
#define IDC_COMBOREMINDERTIME 1023
+#define IDC_CHECK_MSI 1023
#define IDC_REFTIME 1024
#define IDC_STATIC_DATE 1025
#define IDC_STATIC_TIME 1026
|