summaryrefslogtreecommitdiff
path: root/plugins/SendScreenshotPlus/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-04-05 22:27:16 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-04-05 22:27:16 +0000
commit007b4c7301f0d26a72f89f74e9929f42e24eb3e6 (patch)
treeb1ee30b70c6e36d1a06aed6885cb80dc560a68ca /plugins/SendScreenshotPlus/src
parentf4a1bbc6ba4b8137cb868639ac146aa97e97e9df (diff)
- rest of menus cleared;
- old database macroses wiped out from all plugins (left in m_database.h for compatibility) git-svn-id: http://svn.miranda-ng.org/main/trunk@4324 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SendScreenshotPlus/src')
-rw-r--r--plugins/SendScreenshotPlus/src/CSend.cpp2
-rw-r--r--plugins/SendScreenshotPlus/src/UMainForm.cpp60
-rw-r--r--plugins/SendScreenshotPlus/src/dlg_msgbox.cpp4
3 files changed, 33 insertions, 33 deletions
diff --git a/plugins/SendScreenshotPlus/src/CSend.cpp b/plugins/SendScreenshotPlus/src/CSend.cpp
index d7498d21b6..097b9ff18f 100644
--- a/plugins/SendScreenshotPlus/src/CSend.cpp
+++ b/plugins/SendScreenshotPlus/src/CSend.cpp
@@ -60,7 +60,7 @@ CSend::~CSend(){
void CSend::SetContact(HANDLE hContact) {
m_hContact = hContact;
m_pszProto = GetContactProto(hContact);
- m_ChatRoom = DBGetContactSettingByte(hContact, m_pszProto, "ChatRoom", 0);
+ m_ChatRoom = db_get_b(hContact, m_pszProto, "ChatRoom", 0);
m_PFflag = hasCap(PF1_URLSEND);
m_PFflag = hasCap(PF1_CHAT);
m_PFflag = hasCap(PF1_IMSEND);
diff --git a/plugins/SendScreenshotPlus/src/UMainForm.cpp b/plugins/SendScreenshotPlus/src/UMainForm.cpp
index 229f19ac37..95311e984d 100644
--- a/plugins/SendScreenshotPlus/src/UMainForm.cpp
+++ b/plugins/SendScreenshotPlus/src/UMainForm.cpp
@@ -716,51 +716,51 @@ TfrmMain::~TfrmMain() {
//---------------------------------------------------------------------------
// Load / Saving options from miranda's database
void TfrmMain::LoadOptions(void) {
- DWORD rgb = DBGetContactSettingDword(NULL, SZ_SENDSS, "AlphaColor", 16777215);
+ DWORD rgb = db_get_dw(NULL, SZ_SENDSS, "AlphaColor", 16777215);
m_AlphaColor.rgbRed = GetRValue(rgb);
m_AlphaColor.rgbGreen = GetGValue(rgb);
m_AlphaColor.rgbBlue = GetBValue(rgb);
m_AlphaColor.rgbReserved = 0;
-// m_opt_chkEmulateClick = DBGetContactSettingByte(NULL, SZ_SENDSS, "AutoSend", 1);
- m_opt_edtQuality = DBGetContactSettingByte(NULL, SZ_SENDSS, "JpegQuality", 75);
+// m_opt_chkEmulateClick = db_get_b(NULL, SZ_SENDSS, "AutoSend", 1);
+ m_opt_edtQuality = db_get_b(NULL, SZ_SENDSS, "JpegQuality", 75);
- m_opt_tabCapture = DBGetContactSettingByte(NULL, SZ_SENDSS, "Capture", 0);
- m_opt_chkClientArea = DBGetContactSettingByte(NULL, SZ_SENDSS, "ClientArea", 0);
- m_opt_cboxDesktop = DBGetContactSettingByte(NULL, SZ_SENDSS, "Desktop", 0);
+ m_opt_tabCapture = db_get_b(NULL, SZ_SENDSS, "Capture", 0);
+ m_opt_chkClientArea = db_get_b(NULL, SZ_SENDSS, "ClientArea", 0);
+ m_opt_cboxDesktop = db_get_b(NULL, SZ_SENDSS, "Desktop", 0);
- m_opt_chkTimed = DBGetContactSettingByte(NULL, SZ_SENDSS, "TimedCap", 0);
- m_opt_edtTimed = DBGetContactSettingByte(NULL, SZ_SENDSS, "CapTime", 3);
- m_opt_cboxFormat = DBGetContactSettingByte(NULL, SZ_SENDSS, "OutputFormat", 3);
- m_opt_cboxSendBy = DBGetContactSettingByte(NULL, SZ_SENDSS, "SendBy", 0);
+ m_opt_chkTimed = db_get_b(NULL, SZ_SENDSS, "TimedCap", 0);
+ m_opt_edtTimed = db_get_b(NULL, SZ_SENDSS, "CapTime", 3);
+ m_opt_cboxFormat = db_get_b(NULL, SZ_SENDSS, "OutputFormat", 3);
+ m_opt_cboxSendBy = db_get_b(NULL, SZ_SENDSS, "SendBy", 0);
- m_opt_chkEditor = DBGetContactSettingByte(NULL, SZ_SENDSS, "Preview", 0);
- m_opt_btnDesc = DBGetContactSettingByte(NULL, SZ_SENDSS, "AutoDescription", 1);
- m_opt_btnDeleteAfterSend = DBGetContactSettingByte(NULL, SZ_SENDSS, "DelAfterSend", 1);
- m_opt_chkOpenAgain = DBGetContactSettingByte(NULL, SZ_SENDSS, "OpenAgain", 0);
+ m_opt_chkEditor = db_get_b(NULL, SZ_SENDSS, "Preview", 0);
+ m_opt_btnDesc = db_get_b(NULL, SZ_SENDSS, "AutoDescription", 1);
+ m_opt_btnDeleteAfterSend = db_get_b(NULL, SZ_SENDSS, "DelAfterSend", 1);
+ m_opt_chkOpenAgain = db_get_b(NULL, SZ_SENDSS, "OpenAgain", 0);
}
void TfrmMain::SaveOptions(void) {
if(m_bOnExitSave) {
- DBWriteContactSettingDword(NULL, SZ_SENDSS, "AlphaColor",
+ db_set_dw(NULL, SZ_SENDSS, "AlphaColor",
(DWORD)RGB(m_AlphaColor.rgbRed, m_AlphaColor.rgbGreen, m_AlphaColor.rgbBlue));
-// DBWriteContactSettingByte(NULL, SZ_SENDSS, "AutoSend", m_opt_chkEmulateClick);
- DBWriteContactSettingByte(NULL, SZ_SENDSS, "JpegQuality", m_opt_edtQuality);
+// db_set_b(NULL, SZ_SENDSS, "AutoSend", m_opt_chkEmulateClick);
+ db_set_b(NULL, SZ_SENDSS, "JpegQuality", m_opt_edtQuality);
- DBWriteContactSettingByte(NULL, SZ_SENDSS, "Capture", m_opt_tabCapture);
- DBWriteContactSettingByte(NULL, SZ_SENDSS, "ClientArea", m_opt_chkClientArea);
- DBWriteContactSettingByte(NULL, SZ_SENDSS, "Desktop", m_opt_cboxDesktop);
+ db_set_b(NULL, SZ_SENDSS, "Capture", m_opt_tabCapture);
+ db_set_b(NULL, SZ_SENDSS, "ClientArea", m_opt_chkClientArea);
+ db_set_b(NULL, SZ_SENDSS, "Desktop", m_opt_cboxDesktop);
- DBWriteContactSettingByte(NULL, SZ_SENDSS, "TimedCap", m_opt_chkTimed);
- DBWriteContactSettingByte(NULL, SZ_SENDSS, "CapTime", m_opt_edtTimed);
- DBWriteContactSettingByte(NULL, SZ_SENDSS, "OutputFormat", m_opt_cboxFormat);
- DBWriteContactSettingByte(NULL, SZ_SENDSS, "SendBy", m_opt_cboxSendBy);
+ db_set_b(NULL, SZ_SENDSS, "TimedCap", m_opt_chkTimed);
+ db_set_b(NULL, SZ_SENDSS, "CapTime", m_opt_edtTimed);
+ db_set_b(NULL, SZ_SENDSS, "OutputFormat", m_opt_cboxFormat);
+ db_set_b(NULL, SZ_SENDSS, "SendBy", m_opt_cboxSendBy);
- DBWriteContactSettingByte(NULL, SZ_SENDSS, "AutoDescription", m_opt_btnDesc);
- DBWriteContactSettingByte(NULL, SZ_SENDSS, "DelAfterSend", m_opt_btnDeleteAfterSend);
- DBWriteContactSettingByte(NULL, SZ_SENDSS, "OpenAgain", m_opt_chkOpenAgain);
- DBWriteContactSettingByte(NULL, SZ_SENDSS, "Preview", m_opt_chkEditor);
+ db_set_b(NULL, SZ_SENDSS, "AutoDescription", m_opt_btnDesc);
+ db_set_b(NULL, SZ_SENDSS, "DelAfterSend", m_opt_btnDeleteAfterSend);
+ db_set_b(NULL, SZ_SENDSS, "OpenAgain", m_opt_chkOpenAgain);
+ db_set_b(NULL, SZ_SENDSS, "Preview", m_opt_chkEditor);
}
}
@@ -957,7 +957,7 @@ INT_PTR TfrmMain::SaveScreenshot(FIBITMAP* dib) {
mir_tcsadd(path, m_FDestFolder);
if (path[_tcslen(path)-1] != _T('\\')) mir_tcsadd(path, _T("\\"));
mir_tcsadd(path, _T("shot%.5ld"));
- int FileNumber=DBGetContactSettingDword(NULL, SZ_SENDSS, "FileNumber", 0) + 1;
+ int FileNumber=db_get_dw(NULL, SZ_SENDSS, "FileNumber", 0) + 1;
// '00000'-'%.5ld'=0 (add more or less len if differ from 5
size_t len = (_tcslen(path)+0+1);
pszFilename = (LPTSTR)mir_alloc(sizeof(TCHAR)*(len));
@@ -1103,7 +1103,7 @@ INT_PTR TfrmMain::SaveScreenshot(FIBITMAP* dib) {
mir_freeAndNil(pszFilename);
if (ret) {
- DBWriteContactSettingDword(NULL, SZ_SENDSS, "FileNumber", (DWORD)FileNumber);
+ db_set_dw(NULL, SZ_SENDSS, "FileNumber", (DWORD)FileNumber);
mir_freeAndNil(m_pszFile);
mir_freeAndNil(m_pszFileDesc);
m_pszFile = ret;
diff --git a/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp b/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp
index 9d49a9b63f..7f618368c8 100644
--- a/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp
+++ b/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp
@@ -729,8 +729,8 @@ INT_PTR MsgBoxService(WPARAM wParam, LPARAM lParam)
if (!(pMsgBox->uType & (MB_INFOBAR|MB_NOPOPUP)) && // message box can be a popup?
ServiceExists(MS_POPUP_ADDPOPUPT) && // popups exist?
myGlobals.PopUpActionsExist == 1 && // popup support ext stuct?
- (DBGetContactSettingDword(NULL, "PopUp","Actions", 0) & 1) && // popup++ actions on?
- DBGetContactSettingByte(NULL, MODNAME, SET_POPUPMSGBOX, DEFVAL_POPUPMSGBOX) // user likes popups?
+ (db_get_dw(NULL, "PopUp","Actions", 0) & 1) && // popup++ actions on?
+ db_get_b(NULL, MODNAME, SET_POPUPMSGBOX, DEFVAL_POPUPMSGBOX) // user likes popups?
)
{
rc = DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_MSGBOXDUMMI), pMsgBox->hParent, (DLGPROC)MsgBoxPop, lParam);