From 007b4c7301f0d26a72f89f74e9929f42e24eb3e6 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 5 Apr 2013 22:27:16 +0000 Subject: - 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 --- plugins/Ping/src/pinggraph.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'plugins/Ping/src/pinggraph.cpp') diff --git a/plugins/Ping/src/pinggraph.cpp b/plugins/Ping/src/pinggraph.cpp index c7edf260ef..b655cdc24f 100644 --- a/plugins/Ping/src/pinggraph.cpp +++ b/plugins/Ping/src/pinggraph.cpp @@ -243,7 +243,7 @@ LRESULT CALLBACK GraphWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar { char buff[30]; sprintf(buff, "WindowHandle%d", wd->item_id); - DBWriteContactSettingDword(0, PLUG, buff, 0); + db_set_dw(0, PLUG, buff, 0); } delete wd; } @@ -256,7 +256,7 @@ LRESULT CALLBACK GraphWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar INT_PTR ShowGraph(WPARAM wParam, LPARAM lParam) { char buff[30]; sprintf(buff, "WindowHandle%d", (DWORD)wParam); - HWND hGraphWnd = (HWND)DBGetContactSettingDword(0, PLUG, buff, 0); + HWND hGraphWnd = (HWND)db_get_dw(0, PLUG, buff, 0); if(hGraphWnd) { ShowWindow(hGraphWnd, SW_SHOW); SetWindowPos(hGraphWnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); @@ -292,10 +292,10 @@ INT_PTR ShowGraph(WPARAM wParam, LPARAM lParam) { wd->item_id = (DWORD)wParam; // wParam is destination id wd->hwnd_chk_grid = 0; wd->hwnd_chk_stat = 0; - wd->show_grid = DBGetContactSettingByte(0, PLUG, "ShowGridLines", 0) ? true : false; - wd->show_stat = DBGetContactSettingByte(0, PLUG, "ShowStats", 1) ? true : false; + wd->show_grid = db_get_b(0, PLUG, "ShowGridLines", 0) ? true : false; + wd->show_stat = db_get_b(0, PLUG, "ShowStats", 1) ? true : false; - DBWriteContactSettingDword(0, PLUG, buff, (DWORD)hGraphWnd); + db_set_dw(0, PLUG, buff, (DWORD)hGraphWnd); SetWindowLongPtr(hGraphWnd, GWLP_USERDATA, (LONG_PTR)wd); @@ -316,11 +316,11 @@ void graphs_cleanup() { for(int i = 0; i < list_size; i++) { sprintf(buff, "WindowHandle%d", i); - if(hwnd = (HWND)DBGetContactSettingDword(0, PLUG, buff, 0)) { + if(hwnd = (HWND)db_get_dw(0, PLUG, buff, 0)) { DestroyWindow(hwnd); - DBWriteContactSettingDword(0, PLUG, buff, 0); + db_set_dw(0, PLUG, buff, 0); sprintf(buff, "WindowWasOpen%d", i); - DBWriteContactSettingByte(0, PLUG, buff, 1); + db_set_b(0, PLUG, buff, 1); } } } @@ -332,10 +332,10 @@ void graphs_init() { CallService(PLUG "/GetPingList", 0, (LPARAM)&pl); for(pinglist_it i = pl.begin(); i != pl.end(); ++i) { sprintf(buff, "WindowHandle%d", i->item_id); // clean up from possible crash - DBWriteContactSettingDword(0, PLUG, buff, 0); + db_set_dw(0, PLUG, buff, 0); sprintf(buff, "WindowWasOpen%d", i->item_id); // restore windows that were open on shutdown - if(DBGetContactSettingByte(0, PLUG, buff, 0)) { - DBWriteContactSettingByte(0, PLUG, buff, 0); + if(db_get_b(0, PLUG, buff, 0)) { + db_set_b(0, PLUG, buff, 0); ShowGraph((WPARAM)i->item_id, (LPARAM)i->pszLabel); } } -- cgit v1.2.3