~ubuntu-branches/ubuntu/trusty/vice/trusty-proposed

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Zed Pobre
  • Date: 2006-07-30 19:15:59 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20060730191559-aybuaxdqc7uc57fc
Tags: 1.19-1
* New upstream version (Closes: #344245, #379781)
* Reference to roms in package description fixed (Closes: #302900)
* Acknowledge xlibs NMU (Closes: #346768)
* Build-Depends: bison++ | bison
* Build-Depends: libxaw-headers

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
#include "res.h"
51
51
#include "resources.h"
52
52
#include "system.h"
 
53
#include "translate.h"
53
54
#include "ui.h"
54
55
#include "uilib.h"
55
56
#include "uiperipheral.h"
195
196
        GetDlgItemText(hwnd, IDC_DISKIMAGE, st, MAX_PATH);
196
197
        system_wcstombs(s, st, MAX_PATH);
197
198
        if (file_system_attach_disk(num, s) < 0 ) {
198
 
            ui_error("Cannot attach specified file");
 
199
            ui_error(translate_text(IDS_CANNOT_ATTACH_FILE));
199
200
            return 0;
200
201
        }
201
202
    } else {
243
244
{
244
245
    TCHAR *st_name;
245
246
 
246
 
    st_name = uilib_select_file(hwnd, TEXT("Attach disk image"),
 
247
    st_name = uilib_select_file(hwnd, translate_text(IDS_ATTACH_DISK_IMAGE),
247
248
                                UILIB_FILTER_ALL | UILIB_FILTER_DISK
248
249
                                | UILIB_FILTER_ZIP,
249
250
                                UILIB_SELECTOR_TYPE_FILE_LOAD,
259
260
{
260
261
    TCHAR *st_name;
261
262
 
262
 
    st_name = uilib_select_file(hwnd, TEXT("Autostart disk image"),
 
263
    st_name = uilib_select_file(hwnd, translate_text(IDS_AUTOSTART_DISK_IMAGE),
263
264
                                UILIB_FILTER_ALL | UILIB_FILTER_DISK
264
265
                                | UILIB_FILTER_ZIP,
265
266
                                UILIB_SELECTOR_TYPE_FILE_LOAD,
271
272
        SetDlgItemText(hwnd, IDC_DISKIMAGE, st_name);
272
273
        name = system_wcstombs_alloc(st_name);
273
274
        if (autostart_autodetect(name, "*", 0, AUTOSTART_MODE_RUN) < 0)
274
 
            ui_error("Cannot autostart specified file.");
 
275
            ui_error(translate_text(IDS_CANNOT_AUTOSTART_FILE));
275
276
        system_wcstombs_free(name);
276
277
        lib_free(st_name);
277
278
    }
286
287
    bi.hwndOwner = hwnd;
287
288
    bi.pidlRoot = NULL;
288
289
    bi.pszDisplayName = st;
289
 
    bi.lpszTitle = TEXT("Select file system directory");
 
290
    bi.lpszTitle = translate_text(IDS_SELECT_FS_DIRECTORY);
290
291
    bi.ulFlags = 0;
291
292
    bi.lpfn = NULL;
292
293
    bi.lParam = 0;
372
373
 
373
374
static char *printertextdevice[3] = { NULL, NULL, NULL };
374
375
 
375
 
static const TCHAR *ui_printer[] =
 
376
static const int ui_printer[] =
376
377
{
377
 
    TEXT("None"),
378
 
    TEXT("File system"),
 
378
    IDS_NONE,
 
379
    IDS_FILE_SYSTEM,
379
380
#ifdef HAVE_OPENCBM
380
 
    TEXT("Real IEC device"),
 
381
    IDS_REAL_IEC_DEVICE,
381
382
#endif
382
 
    NULL
 
383
    0
383
384
};
384
385
 
385
386
static const TCHAR *ui_printer_driver[] =
471
472
    for (res_value_loop = 0; ui_printer[res_value_loop];
472
473
        res_value_loop++) {
473
474
        SendMessage(printer_hwnd, CB_ADDSTRING, 0,
474
 
                    (LPARAM)ui_printer[res_value_loop]);
 
475
                    (LPARAM)translate_text(ui_printer[res_value_loop]));
475
476
    }
476
477
    SendMessage(printer_hwnd, CB_SETCURSEL, (WPARAM)res_value, 0);
477
478
 
692
693
        psp[i].dwFlags = PSP_USETITLE /*| PSP_HASHELP*/ ;
693
694
        psp[i].hInstance = winmain_instance;
694
695
#ifdef _ANONYMOUS_UNION
695
 
        psp[i].pszTemplate = MAKEINTRESOURCE(IDD_PRINTER_SETTINGS_DIALOG);
 
696
        psp[i].pszTemplate = MAKEINTRESOURCE(translate_res(IDD_PRINTER_SETTINGS_DIALOG));
696
697
        psp[i].pszIcon = NULL;
697
698
#else
698
699
        psp[i].DUMMYUNIONNAME.pszTemplate
699
 
            = MAKEINTRESOURCE(IDD_PRINTER_SETTINGS_DIALOG);
 
700
            = MAKEINTRESOURCE(translate_res(IDD_PRINTER_SETTINGS_DIALOG));
700
701
        psp[i].u2.pszIcon = NULL;
701
702
#endif
702
703
        psp[i].lParam = 0;
709
710
        psp[no_of_printers + i].hInstance = winmain_instance;
710
711
#ifdef _ANONYMOUS_UNION
711
712
        psp[no_of_printers + i].pszTemplate
712
 
            = MAKEINTRESOURCE(IDD_DISKDEVICE_DIALOG);
 
713
            = MAKEINTRESOURCE(translate_res(IDD_DISKDEVICE_DIALOG));
713
714
        psp[no_of_printers + i].pszIcon = NULL;
714
715
#else
715
716
        psp[no_of_printers + i].DUMMYUNIONNAME.pszTemplate
716
 
            = MAKEINTRESOURCE(IDD_DISKDEVICE_DIALOG);
 
717
            = MAKEINTRESOURCE(translate_res(IDD_DISKDEVICE_DIALOG));
717
718
        psp[no_of_printers + i].u2.pszIcon = NULL;
718
719
#endif
719
720
        psp[no_of_printers + i].lParam = 0;
722
723
 
723
724
    if (have_printer_userport) {
724
725
        psp[0].pfnDlgProc = callback_0;
725
 
        psp[0].pszTitle = TEXT("Printer Userport");
 
726
        psp[0].pszTitle = translate_text(IDS_PRINTER_USERPORT);
726
727
        i = 1;
727
728
    } else
728
729
        i = 0;
729
730
 
730
731
    psp[i + 0].pfnDlgProc = callback_4;
731
 
    psp[i + 0].pszTitle = TEXT("Printer 4");
 
732
    psp[i + 0].pszTitle = translate_text(IDS_PRINTER_4);
732
733
    psp[i + 1].pfnDlgProc = callback_5;
733
 
    psp[i + 1].pszTitle = TEXT("Printer 5");
 
734
    psp[i + 1].pszTitle = translate_text(IDS_PRINTER_5);
734
735
    psp[i + 2].pfnDlgProc = callback_8;
735
 
    psp[i + 2].pszTitle = TEXT("Drive 8");
 
736
    psp[i + 2].pszTitle = translate_text(IDS_DRIVE_8);
736
737
    psp[i + 3].pfnDlgProc = callback_9;
737
 
    psp[i + 3].pszTitle = TEXT("Drive 9");
 
738
    psp[i + 3].pszTitle = translate_text(IDS_DRIVE_9);
738
739
    psp[i + 4].pfnDlgProc = callback_10;
739
 
    psp[i + 4].pszTitle = TEXT("Drive 10");
 
740
    psp[i + 4].pszTitle = translate_text(IDS_DRIVE_10);
740
741
    psp[i + 5].pfnDlgProc = callback_11;
741
 
    psp[i + 5].pszTitle = TEXT("Drive 11");
 
742
    psp[i + 5].pszTitle = translate_text(IDS_DRIVE_11);
742
743
 
743
744
    psh.dwSize = sizeof(PROPSHEETHEADER);
744
745
    psh.dwFlags = PSH_PROPSHEETPAGE | PSH_NOAPPLYNOW;
745
746
    psh.hwndParent = hwnd;
746
747
    psh.hInstance = winmain_instance;
747
 
    psh.pszCaption = TEXT("Peripheral Settings");
 
748
    psh.pszCaption = translate_text(IDS_PERIPHERAL_SETTINGS);
748
749
    psh.nPages = no_of_drives + no_of_printers;
749
750
#ifdef _ANONYMOUS_UNION
750
751
    psh.pszIcon = NULL;