summaryrefslogtreecommitdiff
path: root/plugins/!NotAdopted/VypressChat
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2014-04-04 14:27:04 +0000
committerRobert Pösel <robyer@seznam.cz>2014-04-04 14:27:04 +0000
commitc7181615b01d42717df5a4cc557995fe8970e555 (patch)
tree829b619062f5630b15701a5faaaf16019b893ae6 /plugins/!NotAdopted/VypressChat
parente08dd78ccf05f9d5d768e5436fcfc5e8126356fe (diff)
Partial adopttion of VypressChat and WinPopup plugins
git-svn-id: http://svn.miranda-ng.org/main/trunk@8849 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/!NotAdopted/VypressChat')
-rw-r--r--plugins/!NotAdopted/VypressChat/contacts.c10
-rw-r--r--plugins/!NotAdopted/VypressChat/contrib/m_chat.h2
-rw-r--r--plugins/!NotAdopted/VypressChat/options.c8
-rw-r--r--plugins/!NotAdopted/VypressChat/pthread.c4
-rw-r--r--plugins/!NotAdopted/VypressChat/service.c4
-rw-r--r--plugins/!NotAdopted/VypressChat/util.c2
6 files changed, 15 insertions, 15 deletions
diff --git a/plugins/!NotAdopted/VypressChat/contacts.c b/plugins/!NotAdopted/VypressChat/contacts.c
index 5274900624..1a0cf2ee40 100644
--- a/plugins/!NotAdopted/VypressChat/contacts.c
+++ b/plugins/!NotAdopted/VypressChat/contacts.c
@@ -91,7 +91,7 @@ static int contacts_add_queued_message(
CallService(MS_DB_CONTACT_WRITESETTING, (WPARAM)hContact, (LPARAM)&cws);
free(new_data);
- DBFreeVariant(&dbv);
+ db_free(&dbv);
return 0;
}
@@ -137,7 +137,7 @@ static char * contacts_fetch_queued_message(
CallService(MS_DB_CONTACT_WRITESETTING, (WPARAM)hContact, (LPARAM)&cws);
}
- DBFreeVariant(&dbv);
+ db_free(&dbv);
return text;
}
@@ -350,7 +350,7 @@ char * contacts_get_contact_property(
if(dbv.type == DBVT_ASCIIZ) {
value = strdup(dbv.pszVal);
}
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
if(value == NULL)
value = strdup("(unknown)");
@@ -448,7 +448,7 @@ char * contacts_get_nickname(HANDLE hContact)
db_get(hContact, VQCHAT_PROTO, "Nick", &dbv);
nickname = util_loc2utf(dbv.pszVal);
- DBFreeVariant(&dbv);
+ db_free(&dbv);
} else {
nickname = strdup("(null)");
}
@@ -679,7 +679,7 @@ int contacts_is_user_contact(HANDLE hContact)
/* check that the contact has Nick set */
if(db_get(hContact, VQCHAT_PROTO, "Nick", &dbv)) return 0;
if(dbv.type != DBVT_ASCIIZ) return 0;
- DBFreeVariant(&dbv);
+ db_free(&dbv);
/* check if this is a chatroom */
if(db_byte_get(hContact, VQCHAT_PROTO, "ChatRoom", 0))
diff --git a/plugins/!NotAdopted/VypressChat/contrib/m_chat.h b/plugins/!NotAdopted/VypressChat/contrib/m_chat.h
index 8caf5d0e8c..680d27d1cd 100644
--- a/plugins/!NotAdopted/VypressChat/contrib/m_chat.h
+++ b/plugins/!NotAdopted/VypressChat/contrib/m_chat.h
@@ -79,7 +79,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
if (szProto != NULL && !lstrcmpi(szProto, PROTONAME))
{
- if(DBGetContactSettingByte(hContact, PROTONAME, "ChatRoom", 0) == 0)
+ if(db_get_b(hContact, PROTONAME, "ChatRoom", 0) == 0)
{
// ... do something with the hContact here;
}
diff --git a/plugins/!NotAdopted/VypressChat/options.c b/plugins/!NotAdopted/VypressChat/options.c
index d159b06b7d..b23b43758a 100644
--- a/plugins/!NotAdopted/VypressChat/options.c
+++ b/plugins/!NotAdopted/VypressChat/options.c
@@ -495,7 +495,7 @@ static int options_hook_opt_initialise(
odp.pszTitle = Translate(VQCHAT_PROTO_NAME);
odp.pfnDlgProc = options_user_dlgproc;
odp.flags = ODPF_BOLDGROUPS;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
/* add network configuration page
*/
@@ -504,7 +504,7 @@ static int options_hook_opt_initialise(
odp.pszTitle = Translate(VQCHAT_PROTO_NAME " Network");
odp.pfnDlgProc = options_network_dlgproc;
odp.flags = ODPF_BOLDGROUPS;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
return 0; /* success */
}
@@ -758,7 +758,7 @@ static void options_load_settings()
/* ok, got name from db */
user_set_nickname(dbv.pszVal, FALSE);
}
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
/* get user gender */
@@ -879,7 +879,7 @@ static void options_load_settings()
user_set_chanlist(dbv.pszVal, FALSE);
}
}
- if(!rc) DBFreeVariant(&dbv);
+ if(!rc) db_free(&dbv);
/* convert broadcasts masks from old-style
*/
diff --git a/plugins/!NotAdopted/VypressChat/pthread.c b/plugins/!NotAdopted/VypressChat/pthread.c
index 062ec1769b..a2f79da159 100644
--- a/plugins/!NotAdopted/VypressChat/pthread.c
+++ b/plugins/!NotAdopted/VypressChat/pthread.c
@@ -32,13 +32,13 @@ void pthread_r(struct pthread_arg *fa)
{
void (*callercode) (void *) = fa->threadcode;
void *arg = fa->arg;
- CallService(MS_SYSTEM_THREAD_PUSH, 0, 0);
+ Thread_Push(0, 0);
SetEvent(fa->hEvent);
/* __try { */
callercode(arg);
/* } */
/* __finally { */
- CallService(MS_SYSTEM_THREAD_POP, 0, 0);
+ Thread_Pop();
/* } */
}
diff --git a/plugins/!NotAdopted/VypressChat/service.c b/plugins/!NotAdopted/VypressChat/service.c
index 72fa7ea3b8..f2d7c33d8a 100644
--- a/plugins/!NotAdopted/VypressChat/service.c
+++ b/plugins/!NotAdopted/VypressChat/service.c
@@ -312,7 +312,7 @@ service_contact_channel_settings(WPARAM wParam, LPARAM lParam)
chatroom_channel_show_settings_dlg(channel);
free(channel);
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
}
@@ -367,7 +367,7 @@ service_contact_deleted(WPARAM wParam, LPARAM lParam)
free(channel);
}
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
}
diff --git a/plugins/!NotAdopted/VypressChat/util.c b/plugins/!NotAdopted/VypressChat/util.c
index 0cd8c758bf..3636f5e406 100644
--- a/plugins/!NotAdopted/VypressChat/util.c
+++ b/plugins/!NotAdopted/VypressChat/util.c
@@ -355,7 +355,7 @@ DWORD * db_dword_list(
}
}
- DBFreeVariant(&dbv);
+ db_free(&dbv);
return list;
}