summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-07-11 19:32:16 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-07-11 19:32:16 +0000
commitd4743dd3ca2c00865b4c5dff7267ef6023c46ca6 (patch)
tree6ff9f66a7148e764b78a1b4170e60aa7a3cf479b /plugins
parent7cea79f2940e3bfe7b38158e4d39c193a8868159 (diff)
TopToolbar options
git-svn-id: http://svn.miranda-ng.org/main/trunk@907 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/TopToolBar/main.rc87
-rw-r--r--plugins/TopToolBar/resource.h12
-rw-r--r--plugins/TopToolBar/toolbar.cpp2
-rw-r--r--plugins/TopToolBar/ttbopt.cpp18
4 files changed, 51 insertions, 68 deletions
diff --git a/plugins/TopToolBar/main.rc b/plugins/TopToolBar/main.rc
index 8f9f3bedce..96309e44d5 100644
--- a/plugins/TopToolBar/main.rc
+++ b/plugins/TopToolBar/main.rc
@@ -28,29 +28,30 @@ IDD_OPT_BUTORDER DIALOGEX 0, 0, 300, 231
STYLE DS_SETFONT | WS_CHILD
FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
- GROUPBOX "Buttons Order && Visibility",IDC_STATIC,10,0,150,180
- CONTROL "Tree1",IDC_BUTTONORDERTREE,"SysTreeView32",TVS_NOTOOLTIPS | TVS_CHECKBOXES | WS_BORDER | WS_HSCROLL | WS_TABSTOP,18,25,134,148
+ GROUPBOX "Buttons Order && Visibility",IDC_STATIC,10,0,150,229
+ CONTROL "Tree1",IDC_BUTTONORDERTREE,"SysTreeView32",TVS_NOTOOLTIPS | TVS_CHECKBOXES | WS_BORDER | WS_HSCROLL | WS_TABSTOP,18,25,134,197
+ LTEXT "Button height",IDC_STATIC,169,134,100,8
+ EDITTEXT IDC_BUTTHEIGHT,272,132,27,12,ES_NUMBER
+ CONTROL "",IDC_SPIN_HEIGHT,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,289,132,8,12
+ LTEXT "Button width",IDC_STATIC,169,148,100,8
+ EDITTEXT IDC_BUTTWIDTH,272,146,27,12,ES_NUMBER
+ CONTROL "",IDC_SPIN_WIDTH,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,289,146,8,12
+ LTEXT "Inteval between buttons",IDC_STATIC,169,164,100,8
+ EDITTEXT IDC_BUTTGAP,272,162,27,12,ES_NUMBER
+ CONTROL "",IDC_SPIN_GAP,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,289,162,8,12
+ CONTROL "Use flat mode",IDC_USEFLAT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,167,185,130,10
+ CONTROL "Auto resize",IDC_AUTORESIZE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,167,197,130,10
+ CONTROL "Single line",IDC_SINGLELINE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,167,209,130,10
LTEXT "Buttons order:",IDC_STATIC,18,15,132,8
-
PUSHBUTTON "Add Separator",IDC_ADDSEP,165,5,130,14
PUSHBUTTON "Add Launch",IDC_ADDLBUTTON,165,25,130,14
- PUSHBUTTON "Del Sep/Launch Button",IDC_REMOVEBUTTON,165,115,130,14
-
- EDITTEXT IDC_ENAME,200,45,95,14,ES_AUTOHSCROLL | WS_TABSTOP
- LTEXT "Name: ",IDC_LBUTTONNAME,165,45,30,14, SS_CENTERIMAGE
- EDITTEXT IDC_EPATH,165,72,112,14,ES_AUTOHSCROLL | WS_TABSTOP
+ PUSHBUTTON "Del Sep/Launch Button",IDC_REMOVEBUTTON,165,109,130,14
+ EDITTEXT IDC_ENAME,200,45,95,14,ES_AUTOHSCROLL
+ LTEXT "Name: ",IDC_LBUTTONNAME,165,45,30,14,SS_CENTERIMAGE
+ EDITTEXT IDC_EPATH,165,72,112,14,ES_AUTOHSCROLL
PUSHBUTTON "...",IDC_BROWSE,280,73,15,11
LTEXT "Path:",IDC_LBUTTONPATH,165,62,30,8
PUSHBUTTON "Set",IDC_LBUTTONSET,205,90,50,14
-
- EDITTEXT IDC_BUTTHEIGHT,10,182,24,12,ES_AUTOHSCROLL | WS_TABSTOP
- LTEXT "Button Height",IDC_STATIC,36,184,124,8
- EDITTEXT IDC_BUTTWIDTH,10,198,24,12,ES_AUTOHSCROLL | WS_TABSTOP
- LTEXT "Button Width",IDC_STATIC,36,200,124,8
- EDITTEXT IDC_BUTTGAP,10,214,24,12,ES_AUTOHSCROLL | WS_TABSTOP
- LTEXT "Button Gap",IDC_STATIC,36,216,124,8
-
- CONTROL "Use Flat Mode",IDC_USEFLAT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,165,216,130,10
END
@@ -72,49 +73,8 @@ BEGIN
BOTTOMMARGIN, 229
HORZGUIDE, 17
HORZGUIDE, 38
- HORZGUIDE, 133
- HORZGUIDE, 138
- END
-END
-#endif // APSTUDIO_INVOKED
-
-#endif // Neutral resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-/////////////////////////////////////////////////////////////////////////////
-// Russian (Russia) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS)
-LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
-#pragma code_page(1251)
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Dialog
-//
-
-IDD_FRAMEPLUG2 DIALOG 0, 0, 211, 11
-STYLE DS_SETFONT | WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN
-FONT 8, "MS Sans Serif"
-BEGIN
- CONTROL 262,IDC_P2ONLINEBUTT,"Static",SS_BITMAP | SS_NOTIFY | NOT WS_VISIBLE,55,0,13,10
- CONTROL 269,IDC_P2GROUPBUTT,"Static",SS_BITMAP | SS_NOTIFY | NOT WS_VISIBLE,70,0,13,10
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// DESIGNINFO
-//
-
-#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO
-BEGIN
- IDD_FRAMEPLUG2, DIALOG
- BEGIN
- RIGHTMARGIN, 197
- BOTTOMMARGIN, 10
+ HORZGUIDE, 123
+ HORZGUIDE, 136
END
END
#endif // APSTUDIO_INVOKED
@@ -160,8 +120,8 @@ END
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
-IDI_RUN ICON "icos\\run.ico"
IDI_SHOWONLINEUP ICON "icos\\Show only Online Users_UP.ico"
+IDI_RUN ICON "icos\\run.ico"
IDI_SHOWONLINEDN ICON "icos\\Show only Online Users_DN.ico"
IDI_GROUPSUP ICON "icos\\Groups On_Off_UP.ico"
IDI_GROUPSDN ICON "icos\\Groups On_Off_DN.ico"
@@ -171,10 +131,11 @@ IDI_OPTIONSUP ICON "icos\\Show Options Page_UP.ico"
IDI_MINIMIZEUP ICON "icos\\Minimize Button_UP.ico"
IDI_FINDADDUP ICON "icos\\Find_Add Contacts_UP.ico"
IDI_MIRANDAUP ICON "icos\\Show Main Menu_UP.ico"
-
-#endif // Russian (Russia) resources
+#endif // Neutral resources
/////////////////////////////////////////////////////////////////////////////
+
+
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
diff --git a/plugins/TopToolBar/resource.h b/plugins/TopToolBar/resource.h
index 7a4380acfe..498762de51 100644
--- a/plugins/TopToolBar/resource.h
+++ b/plugins/TopToolBar/resource.h
@@ -1,5 +1,5 @@
//{{NO_DEPENDENCIES}}
-// Microsoft Developer Studio generated include file.
+// Microsoft Visual C++ generated include file.
// Used by main.rc
//
#define IDB_SEP 118
@@ -26,6 +26,7 @@
#define IDC_ENAME 1007
#define IDC_LBUTTONNAME 1008
#define IDC_EPATH 1009
+#define IDC_AUTOSIZE 1010
#define IDC_LBUTTONPATH 1011
#define IDC_LBUTTONSET 1012
#define IDC_BUTTHEIGHT 1015
@@ -33,6 +34,11 @@
#define IDC_BUTTWIDTH 1016
#define IDC_BUTTGAP 1017
#define IDC_USEFLAT 1018
+#define IDC_AUTORESIZE 1019
+#define IDC_SINGLELINE 1020
+#define IDC_SPIN_HEIGHT 1024
+#define IDC_SPIN_WIDTH 1025
+#define IDC_SPIN_GAP 1026
#define IDC_BROWSE 1184
#define IDC_BKGCOLOUR 1269
#define IDC_FILENAME 1271
@@ -49,12 +55,12 @@
#define IDC_BUTTONORDERTREE 1591
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 139
#define _APS_NEXT_COMMAND_VALUE 40001
-#define _APS_NEXT_CONTROL_VALUE 1023
+#define _APS_NEXT_CONTROL_VALUE 1025
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
diff --git a/plugins/TopToolBar/toolbar.cpp b/plugins/TopToolBar/toolbar.cpp
index 70d3f02daa..a41c43607f 100644
--- a/plugins/TopToolBar/toolbar.cpp
+++ b/plugins/TopToolBar/toolbar.cpp
@@ -599,7 +599,7 @@ int LoadToolbarModule()
g_ctrl->nLastHeight = db_get_dw(0, TTB_OPTDIR, "LastHeight", DEFBUTTHEIGHT);
g_ctrl->bFlatButtons = db_get_b(0, TTB_OPTDIR, "UseFlatButton", true);
- g_ctrl->bSingleLine = db_get_b(0, TTB_OPTDIR, "SingleLine", true);
+ g_ctrl->bSingleLine = db_get_b(0, TTB_OPTDIR, "SingleLine", false);
g_ctrl->bAutoSize = db_get_b(0, TTB_OPTDIR, "AutoSize", true);
InitializeCriticalSection(&csButtonsHook);
diff --git a/plugins/TopToolBar/ttbopt.cpp b/plugins/TopToolBar/ttbopt.cpp
index a63554f436..ed88b054b2 100644
--- a/plugins/TopToolBar/ttbopt.cpp
+++ b/plugins/TopToolBar/ttbopt.cpp
@@ -192,10 +192,20 @@ static INT_PTR CALLBACK ButOrderOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
SetWindowLongPtr(hTree, GWL_STYLE, GetWindowLongPtr(hTree, GWL_STYLE)|TVS_NOHSCROLL);
SetDlgItemInt(hwndDlg, IDC_BUTTHEIGHT, g_ctrl->nButtonHeight, FALSE);
+ SendDlgItemMessage(hwndDlg, IDC_SPIN_HEIGHT, UDM_SETRANGE, 0, MAKELONG(50,10));
+ SendDlgItemMessage(hwndDlg, IDC_SPIN_HEIGHT, UDM_SETPOS, 0, MAKELONG(g_ctrl->nButtonHeight,0));
+
SetDlgItemInt(hwndDlg, IDC_BUTTWIDTH, g_ctrl->nButtonWidth, FALSE);
+ SendDlgItemMessage(hwndDlg, IDC_SPIN_WIDTH, UDM_SETRANGE, 0, MAKELONG(50,10));
+ SendDlgItemMessage(hwndDlg, IDC_SPIN_WIDTH, UDM_SETPOS, 0, MAKELONG(g_ctrl->nButtonWidth,0));
+
SetDlgItemInt(hwndDlg, IDC_BUTTGAP, g_ctrl->nButtonSpace, FALSE);
-
+ SendDlgItemMessage(hwndDlg, IDC_SPIN_GAP, UDM_SETRANGE, 0, MAKELONG(20,0));
+ SendDlgItemMessage(hwndDlg, IDC_SPIN_GAP, UDM_SETPOS, 0, MAKELONG(g_ctrl->nButtonSpace,0));
+
CheckDlgButton(hwndDlg, IDC_USEFLAT, g_ctrl->bFlatButtons);
+ CheckDlgButton(hwndDlg, IDC_AUTORESIZE, g_ctrl->bAutoSize);
+ CheckDlgButton(hwndDlg, IDC_SINGLELINE, g_ctrl->bSingleLine);
BuildTree(hwndDlg);
EnableWindow(GetDlgItem(hwndDlg, IDC_ENAME), FALSE);
@@ -362,12 +372,18 @@ static INT_PTR CALLBACK ButOrderOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
g_ctrl->nButtonHeight = GetDlgItemInt(hwndDlg, IDC_BUTTHEIGHT, NULL, FALSE);
g_ctrl->nButtonWidth = GetDlgItemInt(hwndDlg, IDC_BUTTWIDTH, NULL, FALSE);
g_ctrl->nButtonSpace = GetDlgItemInt(hwndDlg, IDC_BUTTGAP, NULL, FALSE);
+
g_ctrl->bFlatButtons = (BYTE)IsDlgButtonChecked(hwndDlg, IDC_USEFLAT);
+ g_ctrl->bAutoSize = (BYTE)IsDlgButtonChecked(hwndDlg, IDC_AUTORESIZE);
+ g_ctrl->bSingleLine = (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SINGLELINE);
db_set_dw(0, TTB_OPTDIR, "BUTTHEIGHT", g_ctrl->nButtonHeight);
db_set_dw(0, TTB_OPTDIR, "BUTTWIDTH", g_ctrl->nButtonWidth);
db_set_dw(0, TTB_OPTDIR, "BUTTGAP", g_ctrl->nButtonSpace);
+
db_set_b(0, TTB_OPTDIR, "UseFlatButton", g_ctrl->bFlatButtons);
+ db_set_b(0, TTB_OPTDIR, "SingleLine", g_ctrl->bSingleLine);
+ db_set_b(0, TTB_OPTDIR, "AutoSize", g_ctrl->bAutoSize);
SaveTree(hwndDlg);
RecreateWindows();