diff options
author | George Hazan <george.hazan@gmail.com> | 2012-10-07 11:42:28 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-10-07 11:42:28 +0000 |
commit | 197fe77f67654cf8c46c53376190fc321176c08b (patch) | |
tree | 1a161cf7fb7968e3781b1d11771195d9b5e4c26c /protocols/Twitter | |
parent | 4bcab3fc00696ca2daf1396bfc75bd49009644d6 (diff) |
old database macros removed from m_database.h
git-svn-id: http://svn.miranda-ng.org/main/trunk@1796 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Twitter')
-rw-r--r-- | protocols/Twitter/connection.cpp | 18 | ||||
-rw-r--r-- | protocols/Twitter/proto.cpp | 4 | ||||
-rw-r--r-- | protocols/Twitter/ui.cpp | 10 |
3 files changed, 16 insertions, 16 deletions
diff --git a/protocols/Twitter/connection.cpp b/protocols/Twitter/connection.cpp index 3a91be3243..488bd3e657 100644 --- a/protocols/Twitter/connection.cpp +++ b/protocols/Twitter/connection.cpp @@ -78,7 +78,7 @@ void TwitterProto::SignOn(void*) }
if(NegotiateConnection()) // Could this be? The legendary Go Time??
{
- if(!in_chat_ && db_byte_get(0,m_szModuleName,TWITTER_KEY_CHATFEED,0))
+ if(!in_chat_ && db_get_b(0,m_szModuleName,TWITTER_KEY_CHATFEED,0))
OnJoinChat(0,true);
SetAllContactStatuses(ID_STATUS_ONLINE);
@@ -364,13 +364,13 @@ void TwitterProto::MessageLoop(void*) since_id_ = db_pod_get<twitter_id>(0,m_szModuleName,TWITTER_KEY_SINCEID,0);
dm_since_id_ = db_pod_get<twitter_id>(0,m_szModuleName,TWITTER_KEY_DMSINCEID,0);
- bool new_account = db_byte_get(0,m_szModuleName,TWITTER_KEY_NEW,1) != 0;
- bool popups = db_byte_get(0,m_szModuleName,TWITTER_KEY_POPUP_SIGNON,1) != 0;
+ bool new_account = db_get_b(0,m_szModuleName,TWITTER_KEY_NEW,1) != 0;
+ bool popups = db_get_b(0,m_szModuleName,TWITTER_KEY_POPUP_SIGNON,1) != 0;
// if this isn't set, it will automatically not turn a tweet into a msg. probably should make the default that it does turn a tweet into a message
- bool tweetToMsg = db_byte_get(0,m_szModuleName,TWITTER_KEY_TWEET_TO_MSG,0) != 0;
+ bool tweetToMsg = db_get_b(0,m_szModuleName,TWITTER_KEY_TWEET_TO_MSG,0) != 0;
- int poll_rate = db_dword_get(0,m_szModuleName,TWITTER_KEY_POLLRATE,80);
+ int poll_rate = db_get_dw(0,m_szModuleName,TWITTER_KEY_POLLRATE,80);
for(unsigned int i=0;;i++)
{
@@ -483,7 +483,7 @@ void TwitterProto::UpdateAvatar(HANDLE hContact,const std::string &url,bool forc {
PROTO_AVATAR_INFORMATIONT ai = {sizeof(ai),hContact};
- db_string_set(hContact,m_szModuleName,TWITTER_KEY_AV_URL,url.c_str());
+ db_set_s(hContact,m_szModuleName,TWITTER_KEY_AV_URL,url.c_str());
ProtoBroadcastAck(m_szModuleName,hContact,ACKTYPE_AVATAR,
ACKRESULT_SUCCESS,&ai,0);
}
@@ -543,12 +543,12 @@ void TwitterProto::ShowContactPopup(HANDLE hContact,const std::string &text) POPUPDATAT popup = {};
popup.lchContact = hContact;
- popup.iSeconds = db_dword_get(0,m_szModuleName,TWITTER_KEY_POPUP_TIMEOUT,0);
+ popup.iSeconds = db_get_dw(0,m_szModuleName,TWITTER_KEY_POPUP_TIMEOUT,0);
- popup.colorBack = db_dword_get(0,m_szModuleName,TWITTER_KEY_POPUP_COLBACK,0);
+ popup.colorBack = db_get_dw(0,m_szModuleName,TWITTER_KEY_POPUP_COLBACK,0);
if(popup.colorBack == 0xFFFFFFFF)
popup.colorBack = GetSysColor(COLOR_WINDOW);
- popup.colorText = db_dword_get(0,m_szModuleName,TWITTER_KEY_POPUP_COLTEXT,0);
+ popup.colorText = db_get_dw(0,m_szModuleName,TWITTER_KEY_POPUP_COLTEXT,0);
if(popup.colorBack == 0xFFFFFFFF)
popup.colorBack = GetSysColor(COLOR_WINDOWTEXT);
diff --git a/protocols/Twitter/proto.cpp b/protocols/Twitter/proto.cpp index f5b0698867..03949607ec 100644 --- a/protocols/Twitter/proto.cpp +++ b/protocols/Twitter/proto.cpp @@ -547,7 +547,7 @@ void TwitterProto::SendTweetWorker(void *p) void TwitterProto::UpdateSettings()
{
- if(db_byte_get(0,m_szModuleName,TWITTER_KEY_CHATFEED,0))
+ if(db_get_b(0,m_szModuleName,TWITTER_KEY_CHATFEED,0))
{
if(!in_chat_)
OnJoinChat(0,0);
@@ -564,7 +564,7 @@ void TwitterProto::UpdateSettings() if(!IsMyContact(hContact,true))
continue;
- if(db_byte_get(hContact,m_szModuleName,"ChatRoom",0))
+ if(db_get_b(hContact,m_szModuleName,"ChatRoom",0))
CallService(MS_DB_CONTACT_DELETE,reinterpret_cast<WPARAM>(hContact),0);
}
}
diff --git a/protocols/Twitter/ui.cpp b/protocols/Twitter/ui.cpp index 149c0b2780..f5f571fdef 100644 --- a/protocols/Twitter/ui.cpp +++ b/protocols/Twitter/ui.cpp @@ -440,14 +440,14 @@ INT_PTR CALLBACK popup_options_proc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM l proto = reinterpret_cast<TwitterProto*>(lParam);
CheckAndUpdateDlgButton(hwndDlg,IDC_SHOWPOPUPS,
- db_byte_get(0,proto->ModuleName(),TWITTER_KEY_POPUP_SHOW,0));
+ db_get_b(0,proto->ModuleName(),TWITTER_KEY_POPUP_SHOW,0));
CheckDlgButton(hwndDlg,IDC_NOSIGNONPOPUPS,
- !db_byte_get(0,proto->ModuleName(),TWITTER_KEY_POPUP_SIGNON,0));
+ !db_get_b(0,proto->ModuleName(),TWITTER_KEY_POPUP_SIGNON,0));
// ***** Get color information
- back_color = db_dword_get(0,proto->ModuleName(),TWITTER_KEY_POPUP_COLBACK,0);
- text_color = db_dword_get(0,proto->ModuleName(),TWITTER_KEY_POPUP_COLTEXT,0);
+ back_color = db_get_dw(0,proto->ModuleName(),TWITTER_KEY_POPUP_COLBACK,0);
+ text_color = db_get_dw(0,proto->ModuleName(),TWITTER_KEY_POPUP_COLTEXT,0);
SendDlgItemMessage(hwndDlg,IDC_COLBACK,CPM_SETCOLOUR,0,RGB(255,255,255));
SendDlgItemMessage(hwndDlg,IDC_COLTEXT,CPM_SETCOLOUR,0,RGB( 0, 0, 0));
@@ -464,7 +464,7 @@ INT_PTR CALLBACK popup_options_proc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM l }
// ***** Get timeout information
- timeout = db_dword_get(0,proto->ModuleName(),TWITTER_KEY_POPUP_TIMEOUT,0);
+ timeout = db_get_dw(0,proto->ModuleName(),TWITTER_KEY_POPUP_TIMEOUT,0);
SetDlgItemTextA(hwndDlg,IDC_TIMEOUT,"5");
if(timeout == 0)
|