diff options
author | George Hazan <george.hazan@gmail.com> | 2012-11-29 11:43:52 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-11-29 11:43:52 +0000 |
commit | 41958e91d52457e264e7e62e22beb605432a76a2 (patch) | |
tree | 88fb1623464d18e0fe80775f7fba4660aad229ca /plugins/Weather/src/weather_contacts.cpp | |
parent | 35d3ce335858b8ac7c9db915f798f2f6a916a16d (diff) |
- weather is not updated in the virtual mode;
- unused option removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@2557 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Weather/src/weather_contacts.cpp')
-rw-r--r-- | plugins/Weather/src/weather_contacts.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/plugins/Weather/src/weather_contacts.cpp b/plugins/Weather/src/weather_contacts.cpp index 4c049f5d26..c43f3332d4 100644 --- a/plugins/Weather/src/weather_contacts.cpp +++ b/plugins/Weather/src/weather_contacts.cpp @@ -32,7 +32,7 @@ static void OpenUrl( TCHAR* format, TCHAR* id ) GetID( id );
mir_sntprintf( loc, SIZEOF(loc), format, id );
- CallService(MS_UTILS_OPENURL, opt.NewBrowserWin | OUF_TCHAR, (LPARAM)loc );
+ CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW | OUF_TCHAR, (LPARAM)loc );
}
//============ BASIC CONTACTS FUNCTIONS AND LINKS ============
@@ -43,7 +43,7 @@ INT_PTR ViewLog(WPARAM wParam, LPARAM lParam) {
// see if the log path is set
DBVARIANT dbv;
- if ( !DBGetContactSettingTString((HANDLE)wParam, WEATHERPROTONAME, "Log", &dbv)) {
+ if ( !db_get_ts((HANDLE)wParam, WEATHERPROTONAME, "Log", &dbv)) {
if (dbv.pszVal[0] != 0)
ShellExecute((HWND)lParam, _T("open"), dbv.ptszVal, _T(""), _T(""), SW_SHOW);
db_free(&dbv);
@@ -182,17 +182,17 @@ INT_PTR CALLBACK DlgProcChange(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa // start to get the settings
// if the setting not exist, leave the dialog box blank
- if ( !DBGetContactSettingTString(hContact, WEATHERPROTONAME, "ID", &dbv)) {
+ if ( !db_get_ts(hContact, WEATHERPROTONAME, "ID", &dbv)) {
SetDlgItemText(hwndDlg, IDC_ID, dbv.ptszVal);
// check if the station is a default station
CheckDlgButton(hwndDlg, IDC_DEFA, _tcscmp(dbv.ptszVal, opt.Default) != 0);
db_free(&dbv);
}
- if ( !DBGetContactSettingTString(hContact, WEATHERPROTONAME, "Nick", &dbv)) {
+ if ( !db_get_ts(hContact, WEATHERPROTONAME, "Nick", &dbv)) {
SetDlgItemText(hwndDlg, IDC_NAME, dbv.ptszVal);
db_free(&dbv);
}
- if ( !DBGetContactSettingTString(hContact, WEATHERPROTONAME, "Log", &dbv)) {
+ if ( !db_get_ts(hContact, WEATHERPROTONAME, "Log", &dbv)) {
SetDlgItemText(hwndDlg, IDC_LOG, dbv.ptszVal);
// if the log path is not empty, check the checkbox for external log
if (dbv.ptszVal[0]) CheckDlgButton(hwndDlg, IDC_External, TRUE);
@@ -206,11 +206,11 @@ INT_PTR CALLBACK DlgProcChange(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa CheckDlgButton(hwndDlg, IDC_DAutoUpdate, db_get_b(hContact, WEATHERPROTONAME, "DAutoUpdate", FALSE));
CheckDlgButton(hwndDlg, IDC_Internal, db_get_b(hContact, WEATHERPROTONAME, "History", 0));
- if ( !DBGetContactSettingTString(hContact, WEATHERPROTONAME, "InfoURL", &dbv)) {
+ if ( !db_get_ts(hContact, WEATHERPROTONAME, "InfoURL", &dbv)) {
SetDlgItemText(hwndDlg, IDC_IURL, dbv.ptszVal);
db_free(&dbv);
}
- if ( !DBGetContactSettingTString(hContact, WEATHERPROTONAME, "MapURL", &dbv)) {
+ if ( !db_get_ts(hContact, WEATHERPROTONAME, "MapURL", &dbv)) {
SetDlgItemText(hwndDlg, IDC_MURL, dbv.ptszVal);
db_free(&dbv);
}
@@ -437,7 +437,7 @@ int ContactDeleted(WPARAM wParam, LPARAM lParam) // exit this function if it is not default station
DBVARIANT dbv;
- if ( !DBGetContactSettingTString((HANDLE)wParam, WEATHERPROTONAME, "ID", &dbv)) {
+ if ( !db_get_ts((HANDLE)wParam, WEATHERPROTONAME, "ID", &dbv)) {
if ( _tcscmp(dbv.ptszVal, opt.Default)) {
db_free(&dbv);
return 0;
@@ -451,14 +451,14 @@ int ContactDeleted(WPARAM wParam, LPARAM lParam) HANDLE hContact = db_find_first();
while(hContact) {
if (IsMyContact(hContact)) {
- if ( !DBGetContactSettingTString(hContact, WEATHERPROTONAME, "ID", &dbv)) {
+ if ( !db_get_ts(hContact, WEATHERPROTONAME, "ID", &dbv)) {
// if the station is not a default station, set it as the new default station
// this is the first weather station encountered from the search
if ( _tcscmp(opt.Default, dbv.ptszVal)) {
_tcscpy(opt.Default, dbv.ptszVal);
opt.DefStn = hContact;
db_free(&dbv);
- if ( !DBGetContactSettingTString(hContact, WEATHERPROTONAME, "Nick", &dbv)) {
+ if ( !db_get_ts(hContact, WEATHERPROTONAME, "Nick", &dbv)) {
TCHAR str[255];
mir_sntprintf(str, SIZEOF(str), TranslateT("%s is now the default weather station"), dbv.ptszVal);
db_free(&dbv);
|