~ubuntu-branches/ubuntu/hardy/vice/hardy

« back to all changes in this revision

Viewing changes to src/arch/win32/uirom.c

  • Committer: Bazaar Package Importer
  • Author(s): Laszlo Boszormenyi (GCS)
  • Date: 2007-10-07 07:05:46 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20071007070546-81yy0twlka7p2t0e
Tags: 1.22-1
* New upstream version (closes: #428280).
* Correct link to HTML documentation in manpage (closes: #409567).
* Fix most packaging mistakes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
            const char *filename;
63
63
            TCHAR *st_filename;
64
64
 
65
 
            resources_get_value(settings[n].resname, (void *)&filename);
 
65
            resources_get_string(settings[n].resname, &filename);
66
66
            st_filename = system_mbstowcs_alloc(filename);
67
67
            SetDlgItemText(hwnd, settings[n].idc_filename,
68
68
                           st_filename != NULL ? st_filename : TEXT(""));
84
84
            GetDlgItemText(hwnd, settings[n].idc_filename, st_filename,
85
85
                           MAX_PATH);
86
86
            system_wcstombs(filename, st_filename, MAX_PATH);
87
 
            resources_set_value(settings[n].resname,
88
 
                                (resource_value_t)filename);
 
87
            resources_set_string(settings[n].resname, filename);
89
88
        }
90
89
        n++;
91
90
    }
199
198
    active = 0;
200
199
    num = romset_archive_get_number();
201
200
 
202
 
    resources_get_value("RomsetArchiveActive", (void *)&conf);
 
201
    resources_get_string("RomsetArchiveActive", &conf);
203
202
 
204
203
    temp_hwnd = GetDlgItem(hwnd, IDC_ROMSET_ARCHIVE_ACTIVE);
205
204
    SendMessage(temp_hwnd, CB_RESETCONTENT, 0, 0);
234
233
static void init_romset_dialog(HWND hwnd)
235
234
{
236
235
    int res_value, idc_active;
237
 
    char *name;
 
236
    const char *name;
238
237
    TCHAR *st_name;
239
238
 
240
 
    resources_get_value("RomsetSourceFile", (void *)&res_value);
 
239
    resources_get_int("RomsetSourceFile", &res_value);
241
240
    idc_active = IDC_ROMSET_SELECT_ARCHIVE + res_value;
242
241
    update_romset_dialog(hwnd, idc_active);
243
242
 
244
 
    resources_get_value("RomsetArchiveName", (void *)&name);
 
243
    resources_get_string("RomsetArchiveName", &name);
245
244
    st_name = system_mbstowcs_alloc(name);
246
245
    SetDlgItemText(hwnd, IDC_ROMSET_ARCHIVE_NAME,
247
246
                   name != NULL ? st_name : TEXT(""));
248
247
    system_mbstowcs_free(st_name);
249
248
 
250
 
    resources_get_value("RomsetFileName", (void *)&name);
 
249
    resources_get_string("RomsetFileName", &name);
251
250
    st_name = system_mbstowcs_alloc(name);
252
251
    SetDlgItemText(hwnd, IDC_ROMSET_FILE_NAME,
253
252
                   name != NULL ? st_name : TEXT(""));
260
259
    char s[MAX_PATH];
261
260
 
262
261
    if (IsDlgButtonChecked(hwnd, IDC_ROMSET_SELECT_ARCHIVE) == BST_CHECKED)
263
 
        resources_set_value("RomsetSourceFile", (resource_value_t)0);
 
262
        resources_set_int("RomsetSourceFile", 0);
264
263
    if (IsDlgButtonChecked(hwnd, IDC_ROMSET_SELECT_FILE) == BST_CHECKED)
265
 
        resources_set_value("RomsetSourceFile", (resource_value_t)1);
 
264
        resources_set_int("RomsetSourceFile", 1);
266
265
 
267
266
    GetDlgItemText(hwnd, IDC_ROMSET_ARCHIVE_NAME, st, MAX_PATH);
268
267
    system_wcstombs(s, st, MAX_PATH);
269
 
    resources_set_value("RomsetArchiveName", (resource_value_t)s);
 
268
    resources_set_string("RomsetArchiveName", s);
270
269
 
271
270
    GetDlgItemText(hwnd, IDC_ROMSET_FILE_NAME, st, MAX_PATH);
272
271
    system_wcstombs(s, st, MAX_PATH);
273
 
    resources_set_value("RomsetFileName", (resource_value_t)s);
 
272
    resources_set_string("RomsetFileName", s);
274
273
}
275
274
 
 
275
/*
276
276
static void browse_archive_romset_dialog(HWND hwnd)
277
277
{
278
278
    uilib_select_browse(hwnd, translate_text(IDS_SELECT_ROMSET_ARCHIVE),
279
279
                        UILIB_FILTER_ALL, UILIB_SELECTOR_TYPE_FILE_LOAD,
280
280
                        IDC_ROMSET_ARCHIVE_NAME);
281
281
}
 
282
*/
282
283
 
283
284
static void load_archive_romset_dialog(HWND hwnd)
284
285
{
395
396
        if (settings[n].type == type) {
396
397
            int enable;
397
398
 
398
 
            resources_get_sprintf("Romset%s", (void *)&enable,
399
 
                                  settings[n].resname);
 
399
            resources_get_int_sprintf("Romset%s", &enable,
 
400
                                      settings[n].resname);
400
401
 
401
402
            CheckDlgButton(hwnd, settings[n].idc_resource,
402
403
                           enable ? BST_CHECKED : BST_UNCHECKED);
416
417
            enable = (IsDlgButtonChecked(hwnd, settings[n].idc_resource)
417
418
                     == BST_CHECKED) ? 1 : 0;
418
419
 
419
 
            resources_set_sprintf("Romset%s", (resource_value_t)enable,
420
 
                                 settings[n].resname);
 
420
            resources_set_int_sprintf("Romset%s", enable, settings[n].resname);
421
421
        }
422
422
        n++;
423
423
    }