From 8f5a7b54eb953bbfc877ec915e26b3a95ec28d00 Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10> Date: Sun, 21 Feb 2010 23:00:56 +0000 Subject: New updater with 3x reduced footprint and fully W7 and x64 compatible git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@476 4f64403b-2f21-0410-a795-97e2b3489a10 --- updater/conf_dialog.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'updater/conf_dialog.cpp') diff --git a/updater/conf_dialog.cpp b/updater/conf_dialog.cpp index a0d734b..9c6bdba 100644 --- a/updater/conf_dialog.cpp +++ b/updater/conf_dialog.cpp @@ -65,12 +65,12 @@ INT_PTR CALLBACK DlgProcConfirm(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP // items. lvI.mask = LVIF_TEXT | LVIF_PARAM | LVIF_NORECOMPUTE;// | LVIF_IMAGE; - UpdateList *todo = (UpdateList *)lParam; - for(todo->reset(); todo->current(); todo->next()) { + UpdateList &todo = *(UpdateList *)lParam; + for(int i=0; icurrent(); - lvI.pszText = TranslateTS(temp_str = GetTString(todo->current()->update.szComponentName)); + lvI.lParam = (LPARAM)&todo[i]; + lvI.pszText = TranslateTS(temp_str = GetTString(todo[i].update.szComponentName)); lvI.iItem = ListView_InsertItem(GetDlgItem(hwndDlg, IDC_LIST_UPDATES), &lvI); free(temp_str); @@ -93,9 +93,9 @@ INT_PTR CALLBACK DlgProcConfirm(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP // remember whether the user has decided not to update this component with this particular new version char stored_setting[256]; - mir_snprintf(stored_setting, 256, "DisabledVer%s", todo->current()->update.szComponentName); + mir_snprintf(stored_setting, 256, "DisabledVer%s", todo[i].update.szComponentName); DBVARIANT dbv; - bool check = todo->current()->update_options.enabled; + bool check = todo[i].update_options.enabled; if(!DBGetContactSetting(0, "Updater", stored_setting, &dbv)) { if(dbv.pszVal && strcmp(dbv.pszVal, ((UpdateInternal *)lvI.lParam)->newVersion) == 0) check = false; @@ -146,10 +146,10 @@ INT_PTR CALLBACK DlgProcConfirm(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP //ListView_SetItem(GetDlgItem(hwndDlg, IDC_LIST_UPDATES), &lvI); - UpdateList *todo = (UpdateList *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); + UpdateList &todo = *(UpdateList *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); bool enableOk = false; - for(todo->reset(); todo->current(); todo->next()) { - if(todo->current()->update_options.enabled) { + for(int i=0; i