diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2013-03-10 11:49:39 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2013-03-10 11:49:39 +0000 |
commit | 1416051048756ab769de52ab5eb67a31e41524fd (patch) | |
tree | 401f4359adf6784bd46d2a721cc39d8043c2ca31 /plugins/TabSRMM/src/buttonsbar.cpp | |
parent | 9f75859a9af7fc3df868cb7b2714c3a19e239b1e (diff) |
removed not used headers
added version info
git-svn-id: http://svn.miranda-ng.org/main/trunk@3952 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM/src/buttonsbar.cpp')
-rw-r--r-- | plugins/TabSRMM/src/buttonsbar.cpp | 295 |
1 files changed, 147 insertions, 148 deletions
diff --git a/plugins/TabSRMM/src/buttonsbar.cpp b/plugins/TabSRMM/src/buttonsbar.cpp index 4a86c79137..2d05a0a9e1 100644 --- a/plugins/TabSRMM/src/buttonsbar.cpp +++ b/plugins/TabSRMM/src/buttonsbar.cpp @@ -1,5 +1,4 @@ #include "commonheaders.h"
-#pragma hdrstop
static HANDLE hButtonsBarAddButton;
static HANDLE hButtonsBarRemoveButton;
@@ -933,127 +932,127 @@ void CB_InitDefaultButtons() bbd.cbSize = sizeof(BBButton);
bbd.bbbFlags = BBBF_ISIMBUTTON | BBBF_ISLSIDEBUTTON | BBBF_ISARROWBUTTON | BBBF_CREATEBYID;
bbd.dwButtonID = IDC_PROTOCOL;
- bbd.dwDefPos = 10; - bbd.hIcon = LoadSkinnedIconHandle(SKINICON_OTHER_CONNECTING); - bbd.pszModuleName = "Tabsrmm"; - bbd.ptszTooltip = LPGENT("Protocol Button"); - - CB_AddButton(0, (LPARAM)&bbd); - + bbd.dwDefPos = 10;
+ bbd.hIcon = LoadSkinnedIconHandle(SKINICON_OTHER_CONNECTING);
+ bbd.pszModuleName = "Tabsrmm";
+ bbd.ptszTooltip = LPGENT("Protocol Button");
+
+ CB_AddButton(0, (LPARAM)&bbd);
+
bbd.bbbFlags = BBBF_ISIMBUTTON | BBBF_ISLSIDEBUTTON | BBBF_ISARROWBUTTON | BBBF_CREATEBYID;
- bbd.dwButtonID = IDC_NAME; - bbd.dwDefPos = 20; - bbd.hIcon = PluginConfig.g_buttonBarIconHandles[20]; - bbd.ptszTooltip = LPGENT("Info button"); - - CB_AddButton(0, (LPARAM)&bbd); - + bbd.dwButtonID = IDC_NAME;
+ bbd.dwDefPos = 20;
+ bbd.hIcon = PluginConfig.g_buttonBarIconHandles[20];
+ bbd.ptszTooltip = LPGENT("Info button");
+
+ CB_AddButton(0, (LPARAM)&bbd);
+
if (PluginConfig.g_SmileyAddAvail) {
bbd.bbbFlags = BBBF_ISIMBUTTON | BBBF_ISCHATBUTTON | BBBF_ISLSIDEBUTTON | BBBF_CREATEBYID;
bbd.dwButtonID = IDC_SMILEYBTN;
- bbd.iButtonWidth = 0; - bbd.dwDefPos = 30; - bbd.hIcon = PluginConfig.g_buttonBarIconHandles[9]; - bbd.ptszTooltip = LPGENT("Insert Emoticon"); - CB_AddButton(0, (LPARAM)&bbd); - } - + bbd.iButtonWidth = 0;
+ bbd.dwDefPos = 30;
+ bbd.hIcon = PluginConfig.g_buttonBarIconHandles[9];
+ bbd.ptszTooltip = LPGENT("Insert Emoticon");
+ CB_AddButton(0, (LPARAM)&bbd);
+ }
+
bbd.bbbFlags = BBBF_ISIMBUTTON | BBBF_ISCHATBUTTON | BBBF_ISLSIDEBUTTON | BBBF_ISPUSHBUTTON | BBBF_CANBEHIDDEN | BBBF_CREATEBYID;
- bbd.dwButtonID = IDC_FONTBOLD; - bbd.dwDefPos = 40; - bbd.hIcon = PluginConfig.g_buttonBarIconHandles[10]; - bbd.ptszTooltip = LPGENT("Bold text"); - - CB_AddButton(0, (LPARAM)&bbd); - + bbd.dwButtonID = IDC_FONTBOLD;
+ bbd.dwDefPos = 40;
+ bbd.hIcon = PluginConfig.g_buttonBarIconHandles[10];
+ bbd.ptszTooltip = LPGENT("Bold text");
+
+ CB_AddButton(0, (LPARAM)&bbd);
+
bbd.bbbFlags = BBBF_ISIMBUTTON | BBBF_ISCHATBUTTON | BBBF_ISLSIDEBUTTON | BBBF_ISPUSHBUTTON | BBBF_CANBEHIDDEN | BBBF_CREATEBYID;
- bbd.dwButtonID = IDC_FONTITALIC; - bbd.dwDefPos = 50; - bbd.hIcon = PluginConfig.g_buttonBarIconHandles[11]; - bbd.ptszTooltip = LPGENT("Italic text"); - - CB_AddButton(0, (LPARAM)&bbd); - + bbd.dwButtonID = IDC_FONTITALIC;
+ bbd.dwDefPos = 50;
+ bbd.hIcon = PluginConfig.g_buttonBarIconHandles[11];
+ bbd.ptszTooltip = LPGENT("Italic text");
+
+ CB_AddButton(0, (LPARAM)&bbd);
+
bbd.bbbFlags = BBBF_ISIMBUTTON | BBBF_ISCHATBUTTON | BBBF_ISLSIDEBUTTON | BBBF_ISPUSHBUTTON | BBBF_CANBEHIDDEN | BBBF_CREATEBYID;
- bbd.dwButtonID = IDC_FONTUNDERLINE; - bbd.dwDefPos = 60; - bbd.hIcon = PluginConfig.g_buttonBarIconHandles[12]; - bbd.ptszTooltip = LPGENT("Underlined text"); - - CB_AddButton(0, (LPARAM)&bbd); - + bbd.dwButtonID = IDC_FONTUNDERLINE;
+ bbd.dwDefPos = 60;
+ bbd.hIcon = PluginConfig.g_buttonBarIconHandles[12];
+ bbd.ptszTooltip = LPGENT("Underlined text");
+
+ CB_AddButton(0, (LPARAM)&bbd);
+
bbd.bbbFlags = BBBF_ISIMBUTTON | BBBF_ISLSIDEBUTTON | BBBF_ISPUSHBUTTON | BBBF_CANBEHIDDEN | BBBF_CREATEBYID;
- bbd.dwButtonID = IDC_FONTSTRIKEOUT; - bbd.dwDefPos = 70; - bbd.hIcon = PluginConfig.g_buttonBarIconHandles[15]; - bbd.ptszTooltip = LPGENT("Strike-through text"); - - CB_AddButton(0, (LPARAM)&bbd); - + bbd.dwButtonID = IDC_FONTSTRIKEOUT;
+ bbd.dwDefPos = 70;
+ bbd.hIcon = PluginConfig.g_buttonBarIconHandles[15];
+ bbd.ptszTooltip = LPGENT("Strike-through text");
+
+ CB_AddButton(0, (LPARAM)&bbd);
+
bbd.bbbFlags = BBBF_ISIMBUTTON | BBBF_ISCHATBUTTON | BBBF_ISLSIDEBUTTON | BBBF_CANBEHIDDEN | BBBF_CREATEBYID;
- bbd.dwButtonID = IDC_FONTFACE; - bbd.dwDefPos = 80; - bbd.hIcon = PluginConfig.g_buttonBarIconHandles[14]; - bbd.ptszTooltip = LPGENT("Select font color"); - - CB_AddButton(0, (LPARAM)&bbd); - + bbd.dwButtonID = IDC_FONTFACE;
+ bbd.dwDefPos = 80;
+ bbd.hIcon = PluginConfig.g_buttonBarIconHandles[14];
+ bbd.ptszTooltip = LPGENT("Select font color");
+
+ CB_AddButton(0, (LPARAM)&bbd);
+
bbd.bbbFlags = BBBF_ISIMBUTTON | BBBF_ISCHATBUTTON | BBBF_ISRSIDEBUTTON | BBBF_ISARROWBUTTON | BBBF_CREATEBYID;
bbd.dwButtonID = IDOK;
- bbd.dwDefPos = 10; - bbd.iButtonWidth = 51; - bbd.hIcon = PluginConfig.g_buttonBarIconHandles[6]; - bbd.ptszTooltip = LPGENT("Send message\nClick dropdown arrow for sending options"); - - CB_AddButton(0, (LPARAM)&bbd); - + bbd.dwDefPos = 10;
+ bbd.iButtonWidth = 51;
+ bbd.hIcon = PluginConfig.g_buttonBarIconHandles[6];
+ bbd.ptszTooltip = LPGENT("Send message\nClick dropdown arrow for sending options");
+
+ CB_AddButton(0, (LPARAM)&bbd);
+
bbd.bbbFlags = BBBF_ISIMBUTTON | BBBF_ISCHATBUTTON | BBBF_ISRSIDEBUTTON | BBBF_CREATEBYID;
bbd.dwButtonID = IDC_SAVE;
- bbd.dwDefPos = 20; - bbd.iButtonWidth = 0; - bbd.hIcon = PluginConfig.g_buttonBarIconHandles[8]; - bbd.ptszTooltip = LPGENT("Close session"); - - CB_AddButton(0, (LPARAM)&bbd); - + bbd.dwDefPos = 20;
+ bbd.iButtonWidth = 0;
+ bbd.hIcon = PluginConfig.g_buttonBarIconHandles[8];
+ bbd.ptszTooltip = LPGENT("Close session");
+
+ CB_AddButton(0, (LPARAM)&bbd);
+
bbd.bbbFlags = BBBF_ISIMBUTTON | BBBF_ISRSIDEBUTTON | BBBF_CREATEBYID;
bbd.dwButtonID = IDC_QUOTE;
- bbd.dwDefPos = 30; - bbd.iButtonWidth = 0; - bbd.hIcon = PluginConfig.g_buttonBarIconHandles[4]; - bbd.ptszTooltip = LPGENT("Quote last message OR selected text"); - - CB_AddButton(0, (LPARAM)&bbd); - + bbd.dwDefPos = 30;
+ bbd.iButtonWidth = 0;
+ bbd.hIcon = PluginConfig.g_buttonBarIconHandles[4];
+ bbd.ptszTooltip = LPGENT("Quote last message OR selected text");
+
+ CB_AddButton(0, (LPARAM)&bbd);
+
bbd.bbbFlags = BBBF_ISIMBUTTON | BBBF_ISRSIDEBUTTON | BBBF_CREATEBYID;
bbd.dwButtonID = IDC_TIME;
- bbd.dwDefPos = 40; - bbd.iButtonWidth = 0; - bbd.hIcon = PluginConfig.g_buttonBarIconHandles[2]; - bbd.ptszTooltip = LPGENT("Message Log Options"); - - CB_AddButton(0, (LPARAM)&bbd); - + bbd.dwDefPos = 40;
+ bbd.iButtonWidth = 0;
+ bbd.hIcon = PluginConfig.g_buttonBarIconHandles[2];
+ bbd.ptszTooltip = LPGENT("Message Log Options");
+
+ CB_AddButton(0, (LPARAM)&bbd);
+
bbd.bbbFlags = BBBF_ISIMBUTTON | BBBF_ISCHATBUTTON | BBBF_ISRSIDEBUTTON | BBBF_CREATEBYID;
bbd.dwButtonID = IDC_HISTORY;
- bbd.dwDefPos = 50; - bbd.iButtonWidth = 0; - bbd.hIcon = PluginConfig.g_buttonBarIconHandles[0]; - bbd.ptszTooltip = LPGENT("View User's History"); - - CB_AddButton(0, (LPARAM)&bbd); - + bbd.dwDefPos = 50;
+ bbd.iButtonWidth = 0;
+ bbd.hIcon = PluginConfig.g_buttonBarIconHandles[0];
+ bbd.ptszTooltip = LPGENT("View User's History");
+
+ CB_AddButton(0, (LPARAM)&bbd);
+
bbd.bbbFlags = BBBF_ISIMBUTTON | BBBF_ISRSIDEBUTTON | BBBF_CREATEBYID;
bbd.dwButtonID = IDC_PIC;
- bbd.dwDefPos = 60; - bbd.iButtonWidth = 0; - bbd.hIcon = PluginConfig.g_buttonBarIconHandles[7]; - bbd.ptszTooltip = LPGENT("Edit user notes"); - - CB_AddButton(0, (LPARAM)&bbd); - + bbd.dwDefPos = 60;
+ bbd.iButtonWidth = 0;
+ bbd.hIcon = PluginConfig.g_buttonBarIconHandles[7];
+ bbd.ptszTooltip = LPGENT("Edit user notes");
+
+ CB_AddButton(0, (LPARAM)&bbd);
+
//chat buttons
bbd.bbbFlags = BBBF_ISCHATBUTTON | BBBF_ISLSIDEBUTTON | BBBF_ISDUMMYBUTTON;
@@ -1088,41 +1087,41 @@ void CB_InitDefaultButtons() bbd.bbbFlags = BBBF_ISCHATBUTTON | BBBF_ISLSIDEBUTTON | BBBF_ISPUSHBUTTON | BBBF_CREATEBYID;
bbd.dwButtonID = IDC_BKGCOLOR;
bbd.pszModuleName = "Tabsrmm";
- bbd.dwDefPos = 81; - bbd.iButtonWidth = 22; - bbd.hIcon = PluginConfig.g_buttonBarIconHandles[16]; - bbd.ptszTooltip = LPGENT("Change background color"); - - CB_AddButton(0, (LPARAM)&bbd); - // + bbd.dwDefPos = 81;
+ bbd.iButtonWidth = 22;
+ bbd.hIcon = PluginConfig.g_buttonBarIconHandles[16];
+ bbd.ptszTooltip = LPGENT("Change background color");
+
+ CB_AddButton(0, (LPARAM)&bbd);
+ //
bbd.bbbFlags = BBBF_ISCHATBUTTON | BBBF_ISRSIDEBUTTON | BBBF_CREATEBYID;
bbd.dwButtonID = IDC_SHOWNICKLIST;
- bbd.dwDefPos = 22; - bbd.iButtonWidth = 22; - bbd.hIcon = PluginConfig.g_buttonBarIconHandles[19]; - bbd.ptszTooltip = LPGENT("Toggle nick list"); - - CB_AddButton(0, (LPARAM)&bbd); - + bbd.dwDefPos = 22;
+ bbd.iButtonWidth = 22;
+ bbd.hIcon = PluginConfig.g_buttonBarIconHandles[19];
+ bbd.ptszTooltip = LPGENT("Toggle nick list");
+
+ CB_AddButton(0, (LPARAM)&bbd);
+
bbd.bbbFlags = BBBF_ISCHATBUTTON | BBBF_ISRSIDEBUTTON | BBBF_CREATEBYID;
bbd.dwButtonID = IDC_FILTER;
- bbd.dwDefPos = 24; - bbd.iButtonWidth = 22; - bbd.hIcon = PluginConfig.g_buttonBarIconHandles[18]; - bbd.ptszTooltip = LPGENT("Event filter - right click to setup, left click to activate/deactivate"); - - CB_AddButton(0, (LPARAM)&bbd); - + bbd.dwDefPos = 24;
+ bbd.iButtonWidth = 22;
+ bbd.hIcon = PluginConfig.g_buttonBarIconHandles[18];
+ bbd.ptszTooltip = LPGENT("Event filter - right click to setup, left click to activate/deactivate");
+
+ CB_AddButton(0, (LPARAM)&bbd);
+
bbd.bbbFlags = BBBF_ISCHATBUTTON | BBBF_ISRSIDEBUTTON | BBBF_CREATEBYID;
bbd.dwButtonID = IDC_CHANMGR;
- bbd.dwDefPos = 33; - bbd.iButtonWidth = 22; - bbd.hIcon = PluginConfig.g_buttonBarIconHandles[17]; - bbd.ptszTooltip = LPGENT("Channel manager"); - - CB_AddButton(0, (LPARAM)&bbd); - + bbd.dwDefPos = 33;
+ bbd.iButtonWidth = 22;
+ bbd.hIcon = PluginConfig.g_buttonBarIconHandles[17];
+ bbd.ptszTooltip = LPGENT("Channel manager");
+
+ CB_AddButton(0, (LPARAM)&bbd);
+
BB_RegisterSeparators();
}
@@ -1231,13 +1230,13 @@ static int BuildMenuObjectsTree(HWND hToolBarTree) for (i=0; i < LButtonsList->realCount; i++) {
CustomButtonData * cbd = (CustomButtonData *)LButtonsList->items[i];
- tvis.item.lParam = (LPARAM)cbd; - - if (cbd->bDummy) { - tvis.item.pszText = TranslateT("<Separator>"); - tvis.item.iImage = tvis.item.iSelectedImage = 0; - } else { - tvis.item.pszText = TranslateTS(cbd->ptszTooltip); + tvis.item.lParam = (LPARAM)cbd;
+
+ if (cbd->bDummy) {
+ tvis.item.pszText = TranslateT("<Separator>");
+ tvis.item.iImage = tvis.item.iSelectedImage = 0;
+ } else {
+ tvis.item.pszText = TranslateTS(cbd->ptszTooltip);
iImage = ImageList_AddIcon(himgl, Skin_GetIconByHandle(cbd->hIcon));
tvis.item.iImage = tvis.item.iSelectedImage = iImage;
}
@@ -1261,13 +1260,13 @@ static int BuildMenuObjectsTree(HWND hToolBarTree) for (i = RButtonsList->realCount; i > 0; i--) {
CustomButtonData * cbd = (CustomButtonData *)RButtonsList->items[i-1];
- tvis.item.lParam = (LPARAM)cbd; - - if (cbd->bDummy) { - tvis.item.pszText = TranslateT("<Separator>"); - tvis.item.iImage = tvis.item.iSelectedImage = -1; - } else { - tvis.item.pszText = TranslateTS(cbd->ptszTooltip); + tvis.item.lParam = (LPARAM)cbd;
+
+ if (cbd->bDummy) {
+ tvis.item.pszText = TranslateT("<Separator>");
+ tvis.item.iImage = tvis.item.iSelectedImage = -1;
+ } else {
+ tvis.item.pszText = TranslateTS(cbd->ptszTooltip);
iImage = ImageList_AddIcon(himgl, Skin_GetIconByHandle(cbd->hIcon));
tvis.item.iImage = tvis.item.iSelectedImage = iImage;
}
@@ -1421,13 +1420,13 @@ INT_PTR CALLBACK DlgProcToolBar(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l List_InsertPtr(LButtonsList, cbd);
tvis.hParent = NULL;
- tvis.hInsertAfter = hti; - tvis.item.mask = TVIF_PARAM | TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE; - - tvis.item.pszText = TranslateT("<Separator>"); - tvis.item.iImage = tvis.item.iSelectedImage = -1; - tvis.item.lParam = (LPARAM)cbd; - + tvis.hInsertAfter = hti;
+ tvis.item.mask = TVIF_PARAM | TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE;
+
+ tvis.item.pszText = TranslateT("<Separator>");
+ tvis.item.iImage = tvis.item.iSelectedImage = -1;
+ tvis.item.lParam = (LPARAM)cbd;
+
hti = TreeView_InsertItem(hToolBarTree, &tvis);
TreeView_SetCheckState(hToolBarTree, hti, (cbd->bIMButton || cbd->bChatButton));
|