diff options
Diffstat (limited to 'plugins/TopToolBar')
-rw-r--r-- | plugins/TopToolBar/res/main.rc | 19 | ||||
-rw-r--r-- | plugins/TopToolBar/src/InternalButtons.cpp | 55 | ||||
-rw-r--r-- | plugins/TopToolBar/src/main.cpp | 2 | ||||
-rw-r--r-- | plugins/TopToolBar/src/resource.h | 4 | ||||
-rw-r--r-- | plugins/TopToolBar/src/toolbar.cpp | 2 |
5 files changed, 41 insertions, 41 deletions
diff --git a/plugins/TopToolBar/res/main.rc b/plugins/TopToolBar/res/main.rc index 0af1b7b89b..6a2260d1d6 100644 --- a/plugins/TopToolBar/res/main.rc +++ b/plugins/TopToolBar/res/main.rc @@ -17,7 +17,7 @@ #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU)
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
-#pragma code_page(1251)
+#pragma code_page(1250)
/////////////////////////////////////////////////////////////////////////////
//
@@ -25,11 +25,11 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL //
IDD_OPT_BUTORDER DIALOGEX 0, 0, 300, 231
-STYLE DS_SETFONT | WS_CHILD
+STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
EXSTYLE WS_EX_CONTROLPARENT
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
- GROUPBOX "Buttons Order && Visibility",IDC_STATIC,10,0,150,229
+ GROUPBOX "Buttons order and 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
@@ -44,9 +44,9 @@ BEGIN 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,109,130,14
+ PUSHBUTTON "Add separator",IDC_ADDSEP,165,5,130,14
+ PUSHBUTTON "Add launch",IDC_ADDLBUTTON,165,25,130,14
+ PUSHBUTTON "Delete separator/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
@@ -94,18 +94,18 @@ IDB_SEP BITMAP "sep.bmp" // TEXTINCLUDE
//
-1 TEXTINCLUDE
+1 TEXTINCLUDE
BEGIN
"..\\src\\resource.h\0"
END
-2 TEXTINCLUDE
+2 TEXTINCLUDE
BEGIN
"#include ""winres.h""\r\n"
"\0"
END
-3 TEXTINCLUDE
+3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
@@ -146,3 +146,4 @@ IDI_MIRANDAUP ICON "Show Main Menu_UP.ico" /////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED
+
diff --git a/plugins/TopToolBar/src/InternalButtons.cpp b/plugins/TopToolBar/src/InternalButtons.cpp index 528554d87c..7981315660 100644 --- a/plugins/TopToolBar/src/InternalButtons.cpp +++ b/plugins/TopToolBar/src/InternalButtons.cpp @@ -1,29 +1,27 @@ #include "common.h"
-#define TTBI_GROUPSHOWHIDE "TTBInternal/GroupShowHide"
-#define TTBI_SOUNDSONOFF "TTBInternal/SoundsOnOFF"
-#define TTBI_MAINMENUBUTT "TTBInternal/MainMenuBUTT"
+#define TTBI_GROUPSHOWHIDE "TTBInternal/GroupShowHide"
+#define TTBI_SOUNDSONOFF "TTBInternal/SoundsOnOFF"
+#define TTBI_MAINMENUBUTT "TTBInternal/MainMenuBUTT"
static HWND hwndContactTree;
-struct
-{
+struct {
char *name, *pszService;
int iconidUp, iconidDn;
char *tooltipUp, *tooltipDn;
HANDLE hButton;
}
-static stdButtons[] =
-{
- { "Show only Online Users", MS_CLIST_SETHIDEOFFLINE, IDI_SHOWONLINEUP, IDI_SHOWONLINEDN, "Hide Offline Users", "Show All Users" },
- { "Groups On/Off", TTBI_GROUPSHOWHIDE, IDI_GROUPSUP, IDI_GROUPSDN, "Hide Groups", "Show Groups" },
- { "Sounds Enable/Disable", TTBI_SOUNDSONOFF, IDI_SOUNDUP, IDI_SOUNDDN, "Disable Sounds", "Enable Sounds" },
-
- { "Show Options Page", "Options/OptionsCommand", IDI_OPTIONSUP, 0, "Show Options" },
- { "Minimize Button", MS_CLIST_SHOWHIDE, IDI_MINIMIZEUP, 0, NULL },
- { "Find/Add Contacts", MS_FINDADD_FINDADD, IDI_FINDADDUP, 0, NULL },
- { "Show Main Menu", TTBI_MAINMENUBUTT, IDI_MIRANDAUP, 0, "Show Main Menu" }
+static stdButtons[] = {
+ { "Show only online users", MS_CLIST_SETHIDEOFFLINE, IDI_SHOWONLINEUP, IDI_SHOWONLINEDN, "Hide offline users", "Show all users" },
+ { "Groups on/off", TTBI_GROUPSHOWHIDE, IDI_GROUPSUP, IDI_GROUPSDN, "Hide groups", "Show groups" },
+ { "Sounds enable/disable", TTBI_SOUNDSONOFF, IDI_SOUNDUP, IDI_SOUNDDN, "Disable sounds", "Enable sounds" },
+
+ { "Show options page", "Options/OptionsCommand", IDI_OPTIONSUP, 0, "Show options" },
+ { "Minimize button", MS_CLIST_SHOWHIDE, IDI_MINIMIZEUP, 0, NULL },
+ { "Find/Add contacts", MS_FINDADD_FINDADD, IDI_FINDADDUP, 0, NULL },
+ { "Show main menu", TTBI_MAINMENUBUTT, IDI_MIRANDAUP, 0, "Show main menu" }
};
///////////////////////////////////////////////////////////////////////////////
@@ -34,9 +32,9 @@ int OnSettingChanging(WPARAM hContact, LPARAM lParam) if (hContact != 0 || dbcws == NULL)
return 0;
- if ( !strcmp(dbcws->szModule, "CList")) {
- if ( !strcmp(dbcws->szSetting, "HideOffline"))
- CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)stdButtons[0].hButton, (dbcws->value.bVal) ? TTBST_PUSHED : TTBST_RELEASED);
+ if (!strcmp(dbcws->szModule, "CList")) {
+ if (!strcmp(dbcws->szSetting, "HideOffline"))
+ CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)stdButtons[0].hButton, (dbcws->value.bVal) ? TTBST_PUSHED : TTBST_RELEASED);
else if (!strcmp(dbcws->szSetting, "UseGroups"))
CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)stdButtons[1].hButton, (dbcws->value.bVal) ? TTBST_PUSHED : TTBST_RELEASED);
@@ -44,7 +42,7 @@ int OnSettingChanging(WPARAM hContact, LPARAM lParam) else if (!strcmp(dbcws->szModule, "Skin")) {
if (!strcmp(dbcws->szSetting, "UseSound"))
- CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)stdButtons[2].hButton, (dbcws->value.bVal) ? TTBST_RELEASED : TTBST_PUSHED);
+ CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)stdButtons[2].hButton, (dbcws->value.bVal) ? TTBST_RELEASED : TTBST_PUSHED);
}
return 0;
@@ -56,13 +54,13 @@ INT_PTR TTBInternalMainMenuButt(WPARAM wParam, LPARAM lParam) POINT pt;
GetCursorPos(&pt);
- TrackPopupMenu(hMenu, TPM_TOPALIGN|TPM_LEFTALIGN|TPM_RIGHTBUTTON, pt.x, pt.y, 0, (HWND)CallService(MS_CLUI_GETHWND, 0, 0), NULL);
+ TrackPopupMenu(hMenu, TPM_TOPALIGN | TPM_LEFTALIGN | TPM_RIGHTBUTTON, pt.x, pt.y, 0, (HWND)CallService(MS_CLUI_GETHWND, 0, 0), NULL);
return 0;
}
INT_PTR TTBInternalGroupShowHide(WPARAM wParam, LPARAM lParam)
{
- int newVal = !(GetWindowLongPtr(hwndContactTree, GWL_STYLE)&CLS_USEGROUPS);
+ int newVal = !(GetWindowLongPtr(hwndContactTree, GWL_STYLE) & CLS_USEGROUPS);
db_set_b(NULL, "CList", "UseGroups", (BYTE)newVal);
SendMessage(hwndContactTree, CLM_SETUSEGROUPS, newVal, 0);
return 0;
@@ -82,10 +80,10 @@ void InitInternalButtons() hwndContactTree = (HWND)CallService(MS_CLUI_GETHWNDTREE, 0, 0);
CreateServiceFunction(TTBI_GROUPSHOWHIDE, TTBInternalGroupShowHide);
- CreateServiceFunction(TTBI_SOUNDSONOFF, TTBInternalSoundsOnOff);
- CreateServiceFunction(TTBI_MAINMENUBUTT, TTBInternalMainMenuButt);
+ CreateServiceFunction(TTBI_SOUNDSONOFF, TTBInternalSoundsOnOff);
+ CreateServiceFunction(TTBI_MAINMENUBUTT, TTBInternalMainMenuButt);
- for (int i=0; i < SIZEOF(stdButtons); i++) {
+ for (int i = 0; i < SIZEOF(stdButtons); i++) {
TTBButton ttb = { 0 };
ttb.cbSize = sizeof(ttb);
ttb.name = stdButtons[i].name;
@@ -99,7 +97,8 @@ void InitInternalButtons() ttb.dwFlags |= TTBBF_ASPUSHBUTTON;
ttb.hIconDn = (HICON)LoadImage(hInst, MAKEINTRESOURCE(stdButtons[i].iconidDn), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR);
}
- else ttb.hIconDn = NULL;
+ else
+ ttb.hIconDn = NULL;
if (i == 0)
ttb.wParamUp = 1;
@@ -107,13 +106,13 @@ void InitInternalButtons() stdButtons[i].hButton = (HANDLE)TTBAddButton((WPARAM)&ttb, 0);
}
- CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)stdButtons[0].hButton,
+ CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)stdButtons[0].hButton,
db_get_b(NULL, "CList", "HideOffline", 0) ? TTBST_PUSHED : TTBST_RELEASED);
- CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)stdButtons[1].hButton,
+ CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)stdButtons[1].hButton,
db_get_b(NULL, "CList", "UseGroups", 1) ? TTBST_PUSHED : TTBST_RELEASED);
- CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)stdButtons[2].hButton,
+ CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)stdButtons[2].hButton,
db_get_b(NULL, "Skin", "UseSound", 1) ? TTBST_RELEASED : TTBST_PUSHED);
HookEvent(ME_DB_CONTACT_SETTINGCHANGED, OnSettingChanging);
diff --git a/plugins/TopToolBar/src/main.cpp b/plugins/TopToolBar/src/main.cpp index de9d0a528c..87d431ad2e 100644 --- a/plugins/TopToolBar/src/main.cpp +++ b/plugins/TopToolBar/src/main.cpp @@ -4,7 +4,7 @@ HINSTANCE hInst;
int hLangpack;
-PLUGININFOEX pluginInfo =
+PLUGININFOEX pluginInfo =
{
sizeof(PLUGININFOEX),
__PLUGIN_NAME,
diff --git a/plugins/TopToolBar/src/resource.h b/plugins/TopToolBar/src/resource.h index 498762de51..81cfa42467 100644 --- a/plugins/TopToolBar/src/resource.h +++ b/plugins/TopToolBar/src/resource.h @@ -1,6 +1,6 @@ //{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
-// Used by main.rc
+// Used by ..\res\main.rc
//
#define IDB_SEP 118
#define IDI_SHOWONLINEUP 125
@@ -55,7 +55,7 @@ #define IDC_BUTTONORDERTREE 1591
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 139
diff --git a/plugins/TopToolBar/src/toolbar.cpp b/plugins/TopToolBar/src/toolbar.cpp index 278c4ec7c0..92a1f00fea 100644 --- a/plugins/TopToolBar/src/toolbar.cpp +++ b/plugins/TopToolBar/src/toolbar.cpp @@ -608,7 +608,7 @@ static int OnModulesLoad(WPARAM wParam, LPARAM lParam) if ( HookEvent(ME_BACKGROUNDCONFIG_CHANGED, OnBGChange)) {
char buf[256];
- mir_snprintf(buf, SIZEOF(buf), "%s/%s", LPGEN("TopToolBar Background"), TTB_OPTDIR);
+ mir_snprintf(buf, SIZEOF(buf), "%s/%s", LPGEN("TopToolBar background"), TTB_OPTDIR);
CallService(MS_BACKGROUNDCONFIG_REGISTER, (WPARAM)buf, 0);
}
return 0;
|