Changeset 94


Ignore:
Timestamp:
Jul 17, 2021, 9:24:00 PM (4 years ago)
Author:
Gregg Young
Message:

Add unicode support; Add -i switch for AOS install to GQ; Remove language selection from GQ; Remove help file lang selection from Gotcha; Clean up and rework dialogs/strings

Location:
trunk
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • trunk/NLS/br/goqresbr.rc

    r91 r94  
    3939}
    4040
     41RCDATA LANG_ID {"55"}
     42
    4143MENU IDM_SSWPOPUP
    4244{
     
    8587        LTEXT           "Utilit rio de captura de Telas/Janelas\n"
    8688                        "Copyright (c) 1998-2007 Thorsten Thielen\n"
    87                         "Copyright (c) 2018-2019 The Netlabs Gotcha Group\n"
     89                        "Copyright (c) 2018-2021 The Netlabs Gotcha Group\n"
    8890                        "All rights reserved\n"
    8991                        "WWW: http://trac.netlabs.org/gotcha\n"
     
    218220        LTEXT           "Utilit rio de captura de Telas/Janelas\n"
    219221                        "Copyright (c) 1998-2007 Thorsten Thielen\n"
    220                         "Copyright (c) 2018-2019 The Netlabs Gotcha Group\n"
     222                        "Copyright (c) 2018-2021 The Netlabs Gotcha Group\n"
    221223                        "All rights reserved\n"
    222                         "WWW: http://trac.netlabs.org/gotcha", WID_NIL,
     224                        "WWW: http://trac.netlabs.org/gotcha", WID_ST_COPYRIGHT,
    223225                         5, 62, 190, 26, DT_WORDBREAK
    224         GROUPBOX        "Programa", WID_NIL, 5, 5, 95, 46
     226        /*GROUPBOX        "Programa", WID_NIL, 5, 5, 95, 46
    225227        LISTBOX         WID_LB_LANGUAGES, 9, 9, 88, 34, LS_NOADJUSTPOS
    226228        GROUPBOX        "Ajuda Online", WID_NIL, 104, 5, 95, 46
     
    228230        LTEXT           "Nota: Estas op‡äes farÆo efeito somente na pr¢xima  "
    229231                        "vez em que o programa for iniciado.",
    230                         WID_ST_LANGNOTE, 5, 50, 184, 8, DT_WORDBREAK //translation update
     232                        WID_ST_LANGNOTE, 5, 50, 184, 8, DT_WORDBREAK //translation update*/
    231233    END
    232234END
     
    281283    IDS_ERROR_SEMAPHOREFAILED    "Semaphore creation failed"
    282284    IDS_ERROR_SEMAPHOREFAILEDMSG "Try restarting Gotcha Quiet"
    283 }
     285    IDS_ERROR_RESOURSEMODFAILED  "Could not (re)load resource module '%s' (return code %d). Make sure the DLL is in the LIBPATH. If this is the case, try deleting GOTCHA.INI and restart. If this fails, contact the author (ygk@qwest.net)."
     286
     287}
     288
     289STRINGTABLE
     290{
     291    LANG_COPYRIGHT  "Utilit rio de captura de Telas/Janelas\nCopyright (c) 1998-2007 Thorsten Thielen\n2018-2019 Netlabs Gotcha Group All rights Reserved\nWWW: http://trac.netlabs.org/gotcha"
     292    LANG_PROGRAM    "Programa"
     293    LANG_HELPFILE   "Ajuda Online"
     294    LANG_RESTART    "Nota: Estas op‡äes farÆo efeito somente na pr¢xima vez em que o programa for iniciado."
     295}
  • trunk/NLS/br/gotresbr.rc

    r91 r94  
    3333   etc. */
    3434RCDATA DLL_ID { "Gotcha!", 1, "Portuguˆs Brasileiro" }
     35
     36RCDATA LANG_ID {"55"}
    3537
    3638MENU IDM_SSWPOPUP
     
    225227                        "Copyright (c) 1998-2007 Thorsten Thielen\n"
    226228                        "2018-2019 Netlabs Gotcha Group All rights Reserved\n"
    227                         "WWW: http://trac.netlabs.org/gotcha", WID_NIL,
     229                        "WWW: http://trac.netlabs.org/gotcha", WID_ST_COPYRIGHT,
    228230                         10, 92, 190, 26, DT_WORDBREAK
    229231        GROUPBOX        "Programa", WID_NIL, 10, 5, 112, 66
    230232        LISTBOX         WID_LB_LANGUAGES, 14, 10, 105, 53, LS_NOADJUSTPOS
     233#if 0       
    231234        GROUPBOX        "Ajuda Online", WID_NIL, 134, 5, 112, 66
    232235        LISTBOX         WID_LB_LANGUAGESHELP, 137, 10, 105, 53, LS_NOADJUSTPOS
     236#endif       
    233237        LTEXT           "Nota: Estas op‡äes farÆo efeito somente na pr¢xima "
    234238                        "vez em que o programa for iniciado.",
     
    252256    IDS_ERROR_INIFILENOTOPEN           "O arquivo INI (""%s"") nÆo p“de ser aberto! Valores defaults serÆo utilizados."
    253257
    254     IDS_ERROR_HELPERHEADING                 "ERRO NO SISTEMA DE AJUDA"
    255     IDS_ERROR_COULDNOTINITHELP              "NÆo foi poss¡vel inicializar a ajuda online."
    256     IDS_ERROR_COULDNOTINITHELPFILE          "NÆo foi poss¡vel inicializar a ajuda online. O arquivo de ajuda '%s' existe no diret¢rio de Gotcha?"
     258    IDS_ERROR_HELPERHEADING            "ERRO NO SISTEMA DE AJUDA"
     259    IDS_ERROR_COULDNOTINITHELP         "NÆo foi poss¡vel inicializar a ajuda online."
     260    IDS_ERROR_COULDNOTINITHELPFILE     "NÆo foi poss¡vel inicializar a ajuda online. O arquivo de ajuda '%s' existe no diret¢rio de Gotcha?"
     261    IDS_ERROR_RESOURSEMODFAILED        "Could not (re)load resource module '%s' (return code %d). Make sure the DLL is in the LIBPATH. If this is the case, try deleting GOTCHA.INI and restart. If this fails, contact the author (ygk@qwest.net)."
     262
    257263
    258264    IDS_PAGESAVE                       "Salvando"
     
    279285    IDS_WISHCONTINUE          "Do you wish to continue?"   
    280286}
     287
     288STRINGTABLE
     289{
     290    LANG_COPYRIGHT  "Utilit rio de captura de Telas/Janelas\nCopyright ž 1998-2007 Thorsten Thielen 2018-2019 Netlabs Gotcha Group All rights Reserved\nWWW: http://trac.netlabs.org/gotcha"
     291    LANG_PROGRAM    "Programa"
     292    LANG_HELPFILE   "Ajuda Online"
     293    LANG_RESTART    "Nota: Estas op‡äes farÆo efeito somente na pr¢xima vez em que o programa for iniciado."
     294}
  • trunk/NLS/cz/goqrescz.rc

    r91 r94  
    3333     "Gotchaq!",              /* What program is the dll for? */
    3434     1,                      /* Version number of the dll */
    35      "¬esky",              /* Name of the language for the list */
     35     "Ÿeçtina",              /* Name of the language for the list */
    3636/*     "Thorsten Thielen",     /* Translator's name */
    3737/*     "English",              /* Language to be used for online help */
    3838/*     "Gotcha_en",              /* Name of the help file */
    3939}
     40
     41RCDATA LANG_ID {"420"}
     42
     43CODEPAGE 852
    4044
    4145MENU IDM_SSWPOPUP
     
    223227                        "Copyright (c) 2018-2019 The Netlabs Gotcha Group\n"
    224228                        "All rights reserved. "
    225                         "WWW: http://trac.netlabs.org/gotcha", WID_NIL,
     229                        "WWW: http://trac.netlabs.org/gotcha", WID_ST_COPYRIGHT,
    226230                         5, 67, 190, 26, DT_WORDBREAK
    227         GROUPBOX        "Program", WID_NIL, 5, 2, 95, 46
     231        /*GROUPBOX        "Program", WID_ST_PROGRAM, 5, 2, 95, 46
    228232        LISTBOX         WID_LB_LANGUAGES, 9, 6, 88, 34, LS_NOADJUSTPOS
    229         GROUPBOX        "N povØda", WID_NIL, 104, 2, 95, 46
     233        GROUPBOX        "N povØda", WID_ST_HELPFILE, 104, 2, 95, 46
    230234        LISTBOX         WID_LB_LANGUAGESHELP, 107, 6, 88, 34, LS_NOADJUSTPOS
    231235        LTEXT           "Pozn mka: Tato nastaven¡ se poprv‚ projev¡ pýi "
    232236                        "pý¡çt¡m spuçtØn¡ programu.",
    233                         WID_ST_LANGNOTE, 5, 47, 184, 16, DT_WORDBREAK //translation update
     237                        WID_ST_LANGNOTE, 5, 47, 184, 16, DT_WORDBREAK //translation update*/
    234238    END
    235239END
     
    288292    IDS_ERROR_SEMAPHOREFAILED    "Semaphore creation failed"
    289293    IDS_ERROR_SEMAPHOREFAILEDMSG "Try restarting Gotcha Quiet"
     294    IDS_ERROR_RESOURSEMODFAILED  "Could not (re)load resource module '%s' (return code %d). Make sure the DLL is in the LIBPATH. If this is the case, try deleting GOTCHA.INI and restart. If this fails, contact the author (ygk@qwest.net)."
     295
    290296}
     297
     298STRINGTABLE
     299{
     300    LANG_COPYRIGHT  "N stroj pro sejmut¡ obrazovky/okna\nCopyright (c) 1998-2007 Thorsten Thielen\n2018-2019 Netlabs Gotcha Group All rights Reserved\nWWW: http://trac.netlabs.org/gotcha"
     301    LANG_PROGRAM    "Program"
     302    LANG_HELPFILE   "N povØda"
     303    LANG_RESTART    "Pozn mka: Tato nastaven¡ se poprv‚ projev¡ pýi pý¡çt¡m spuçtØn¡ programu."
     304}
  • trunk/NLS/cz/gotrescz.rc

    r91 r94  
    2323/* Please do NOT try to translate the following statement :-) */
    2424RCINCLUDE "..\common.rc"
    25 
     25CODEPAGE 852
    2626/* Pros¡m, upravte jm‚no jazyka (ale ponechte Ÿ¡slo) :-)
    2727   If possible use the name your language is called "in itself"
     
    3535     "Gotcha!",            /* Pro kterì program je urŸena tato knihovna DLL? */
    3636     1,                    /* ¬¡slo verze knihovny DLL */
    37      "¬esky",              /* Jm‚no jazyka pro uveden¡ do seznamu */
     37     "¬eçtina",              /* Jm‚no jazyka pro uveden¡ do seznamu */
    3838/*     "Tom ç Hajnì",    /* Jm‚no pýekladatele, Tomas Hajny */
    3939/*     "¬eçtina",              /* Jazyk pou§itì pro n povØdu */
    4040/*     "czech",                /* Jm‚no souboru s n povØdou */
    4141}
     42
     43RCDATA LANG_ID {"420"}
     44
    4245
    4346MENU IDM_SSWPOPUP
     
    157160    BEGIN
    158161        NOTEBOOK        WID_NB_SETTINGS, 5, 21, 270, 170, BKS_BACKPAGESTR |
    159                         BKS_MAJORTABTOP | BKS_ROUNDEDTABS |
    160                         BKS_TABTEXTCENTER | BKS_SPIRALBIND | WS_GROUP |
    161                         BKS_TABBEDDIALOG
     162                        BKS_MAJORTABTOP | BKS_TABBEDDIALOG
    162163        DEFPUSHBUTTON   "~Ok", WID_PB_OK, 5, 4, 60, 14
    163164        PUSHBUTTON      "O~bnovit", WID_PB_UNDO, 70, 4, 60, 14
     
    244245                        "Copyright (c) 1998-2007 Thorsten Thielen\n"
    245246                        "2018-2019 Netlabs Gotcha Group All rights Reserved\n"
    246                         "WWW: http://trac.netlabs.org/gotcha", WID_NIL,
     247                        "WWW: http://trac.netlabs.org/gotcha", WID_ST_COPYRIGHT,
    247248                         10, 92, 190, 26, DT_WORDBREAK
    248249        GROUPBOX        "Program", WID_NIL, 10, 5, 112, 66
    249250        LISTBOX         WID_LB_LANGUAGES, 14, 10, 105, 53, LS_NOADJUSTPOS
     251#if 0       
    250252        GROUPBOX        "N povØda", WID_NIL, 134, 5, 112, 66
    251253        LISTBOX         WID_LB_LANGUAGESHELP, 137, 10, 105, 53, LS_NOADJUSTPOS
    252         LTEXT           "Pozn mka: Tato nastaven¡ se poprv‚ projev¡ pýi "
    253                         "pý¡çt¡m spuçtØn¡ programu."
    254                         WID_ST_LANGNOTE, 10, 70, 184, 16, DT_WORDBREAK
     254#endif       
     255        LTEXT           "Pozn mka: Tato nastaven¡ se poprv‚ projev¡ pýi pý¡çt¡m spuçtØn¡ programu.",
     256                        WID_ST_LANGNOTE, 10, 70, 214, 16
    255257    END
    256258END
     
    272274    IDS_ERROR_INIFILENOTOPEN           "Nebylo mo§n‚ otevý¡t konfiguraŸn¡ soubor INI (""%s"")! Budou pou§ita standardn¡ nastaven¡."
    273275
    274     IDS_ERROR_HELPERHEADING                 "CHYBA NµPOVD·DY"
    275     IDS_ERROR_COULDNOTINITHELP              "Nemohu inicializovat n povØdu."
    276     IDS_ERROR_COULDNOTINITHELPFILE          "Nemohu inicializovat n povØdu. Existuje v adres ýi produktu Gotcha! soubor ""%s""?"
    277 
    278     IDS_PAGESAVE                       "Ukl d n¡"
     276    IDS_ERROR_HELPERHEADING            "CHYBA NµPOVD·DY"
     277    IDS_ERROR_COULDNOTINITHELP         "Nemohu inicializovat n povØdu."
     278    IDS_ERROR_COULDNOTINITHELPFILE     "Nemohu inicializovat n povØdu. Existuje v adres ýi produktu Gotcha! soubor ""%s""?"
     279    IDS_ERROR_RESOURSEMODFAILED        "Could not (re)load resource module '%s' (return code %d). Make sure the DLL is in the LIBPATH. If this is the case, try deleting GOTCHA.INI and restart. If this fails, contact the author (ygk@qwest.net)."
     280
     281    IDS_PAGESAVE                       "Ulo§it"/* "Ukl d n¡    "*/
    279282    IDS_PAGESNAPSHOT                   "Momentky"
    280283    IDS_CAPTURE                        "R
    281284zn‚"
    282285    IDS_PAGELANGUAGE                   "Jazyk"
    283 
    284 //    IDS_SETTINGSTITLE                  "Nastaven¡"
    285286
    286287    IDS_BMF_JPG        "JPEG Interchange File Format (jpg)"
     
    300301    IDS_OK                    "~Ok"
    301302    IDS_CANCEL                "Zruçit"
    302     IDS_WISHCONTINUE          "Do you wish to continue?"   
     303    IDS_WISHCONTINUE          "Do you wish to continue?"
     304    IDS_UNDO                  "O~bnovit"
     305    IDS_HELP                  "N povØda"
     306   
     307//    IDS_SETTINGSTITLE                  "Nastaven¡" 
    303308}
     309
     310STRINGTABLE
     311{
     312    LANG_COPYRIGHT  "N stroj pro sejmut¡ obrazovky/okna\nCopyright (c) 1998-2007 Thorsten Thielen\n2018-2019 Netlabs Gotcha Group All rights Reserved\nWWW: http://trac.netlabs.org/gotcha"
     313    LANG_PROGRAM    "Program"
     314    LANG_HELPFILE   "N povØda"
     315    LANG_RESTART    "Pozn mka: Tato nastaven¡ se poprv‚ projev¡ pýi pý¡çt¡m spuçtØn¡ programu."
     316}
  • trunk/NLS/de/goqresde.rc

    r91 r94  
    3838/*     "Gotcha_en",              /* Name of the help file */
    3939}
     40
     41RCDATA LANG_ID {"49"}
    4042
    4143MENU IDM_SSWPOPUP
     
    221223                        "Copyright (c) 2018-2019 The Netlabs Gotcha Group\n"
    222224                        "All rights reserved. "
    223                         "WWW: http://trac.netlabs.org/gotcha", WID_NIL,
     225                        "WWW: http://trac.netlabs.org/gotcha", WID_ST_COPYRIGHT,
    224226                         5, 67, 190, 26, DT_WORDBREAK
    225         GROUPBOX        "Programm", WID_NIL, 5, 2, 95, 46
     227        /*GROUPBOX        "Programm", WID_NIL, 5, 2, 95, 46
    226228        LISTBOX         WID_LB_LANGUAGES, 9, 6, 88, 34, LS_NOADJUSTPOS
    227229        GROUPBOX        "Onlinehilfe", WID_NIL, 104, 2, 95, 46
     
    229231        LTEXT           "Hinweis: Diese Einstellungen werden erst beim n„chsten "
    230232                        "Starten des Programmes wirksam.",
    231                         WID_ST_LANGNOTE, 5, 47, 184, 16, DT_WORDBREAK //translation update
     233                        WID_ST_LANGNOTE, 5, 47, 184, 16, DT_WORDBREAK //translation update*/
    232234    END
    233235END
     
    282284    IDS_ERROR_SEMAPHOREFAILED    "Semaphore creation failed"
    283285    IDS_ERROR_SEMAPHOREFAILEDMSG "Try restarting Gotcha Quiet"
    284 }
     286    IDS_ERROR_RESOURSEMODFAILED  "Could not (re)load resource module '%s' (return code %d). Make sure the DLL is in the LIBPATH. If this is the case, try deleting GOTCHA.INI and restart. If this fails, contact the author (ygk@qwest.net)."
     287
     288}
     289
     290STRINGTABLE
     291{
     292    LANG_COPYRIGHT  "Bildschirm/Fenster-Screenshot-Programm\nCopyright (c) 1998-2007 Thorsten Thielen\nCopyright (c) 2018-2019 The Netlabs Gotcha Group\nAll rights reserved. WWW: http://trac.netlabs.org/gotcha"
     293    LANG_PROGRAM    "Programm"
     294    LANG_HELPFILE   "Onlinehilfe"
     295    LANG_RESTART    "Starten des Programmes wirksam."
     296}
  • trunk/NLS/de/gotresde.rc

    r91 r94  
    3030   etc. */
    3131RCDATA DLL_ID { "Gotcha!", 1, "Deutsch" }
     32
     33RCDATA LANG_ID {"49"}
    3234
    3335MENU IDM_SSWPOPUP
     
    226228                        "Copyright (c) 1998-2007 Thorsten Thielen\n"
    227229                        "2018-2019 Netlabs Gotcha Group All rights Reserved\n"
    228                         "WWW: http://trac.netlabs.org/gotcha", WID_NIL,
     230                        "WWW: http://trac.netlabs.org/gotcha", WID_ST_COPYRIGHT,
    229231                         10, 92, 190, 26, DT_WORDBREAK
    230232        GROUPBOX        "Programm", WID_NIL, 10, 5, 112, 66
    231233        LISTBOX         WID_LB_LANGUAGES, 14, 10, 105, 53, LS_NOADJUSTPOS
     234#if 0       
    232235        GROUPBOX        "Onlinehilfe", WID_NIL, 134, 5, 112, 66
    233236        LISTBOX         WID_LB_LANGUAGESHELP, 137, 10, 105, 53, LS_NOADJUSTPOS
     237#endif       
    234238        LTEXT           "Hinweis: Diese Einstellungen werden erst beim n„chsten "
    235239                        "Starten des Programmes wirksam.",
     
    253257    IDS_ERROR_INIFILENOTOPEN           "Konnten die INI-Datei (""%s"") nicht ”ffnen. Standarteinstellungen werden benutzt."
    254258
    255     IDS_ERROR_HELPERHEADING                 "HILFE-FEHLER"
    256     IDS_ERROR_COULDNOTINITHELP              "Konnte Online-Hilfe nicht initialisieren."
    257     IDS_ERROR_COULDNOTINITHELPFILE          "Konnte Online-Hilfe nicht initialisieren. Existiert die Hilfedatei '%s' in Gotcha!s Verzeichnis?"
     259    IDS_ERROR_HELPERHEADING            "HILFE-FEHLER"
     260    IDS_ERROR_COULDNOTINITHELP         "Konnte Online-Hilfe nicht initialisieren."
     261    IDS_ERROR_COULDNOTINITHELPFILE     "Konnte Online-Hilfe nicht initialisieren. Existiert die Hilfedatei '%s' in Gotcha!s Verzeichnis?"
     262    IDS_ERROR_RESOURSEMODFAILED        "Could not (re)load resource module '%s' (return code %d). Make sure the DLL is in the LIBPATH. If this is the case, try deleting GOTCHA.INI and restart. If this fails, contact the author (ygk@qwest.net)."
    258263
    259264    IDS_PAGESAVE                       "Speichern"
     
    280285    IDS_WISHCONTINUE          "Do you wish to continue?"   
    281286}
     287
     288STRINGTABLE
     289{
     290    LANG_COPYRIGHT  "Bildschirm/Fenster-Screenshot-Programm\nCopyright ž 1998-2007 Thorsten Thielen 2018-2019 The Netlabs Gotcha Group All rights reserved.\nWWW: http://trac.netlabs.org/gotcha"
     291    LANG_PROGRAM    "Programm"
     292    LANG_HELPFILE   "Onlinehilfe"
     293    LANG_RESTART    "Starten des Programmes wirksam."
     294}
  • trunk/NLS/en/goqresen.rc

    r91 r94  
    3838/*     "Gotcha_en",              /* Name of the help file */
    3939}
     40
     41RCDATA LANG_ID {"1"}
    4042
    4143ACCELTABLE 1 LOADONCALL
     
    241243                        "Copyright (c) 1998-2007 Thorsten Thielen\n"
    242244                        "2018-2020 Netlabs Gotcha! team. All rights reserved.\n"
    243                         "WWW: https://trac.netlabs.org/gotcha", WID_NIL,
     245                        "WWW: https://trac.netlabs.org/gotcha", WID_ST_COPYRIGHT,
    244246                         5, 62, 190, 26, DT_WORDBREAK
    245         GROUPBOX        "Program", WID_NIL, 5, 5, 95, 46
     247        /*GROUPBOX        "Program", WID_ST_PROGRAM, 5, 5, 95, 46
    246248        LISTBOX         WID_LB_LANGUAGES, 9, 9, 88, 34, LS_NOADJUSTPOS
    247         GROUPBOX        "Online help", WID_NIL, 104, 5, 95, 46
     249        GROUPBOX        "Online help", WID_ST_HELPFILE, 104, 5, 95, 46
    248250        LISTBOX         WID_LB_LANGUAGESHELP, 107, 9, 88, 34, LS_NOADJUSTPOS
    249251        LTEXT           "Note: A restart is required for these settings to take effect",
    250                         WID_ST_LANGNOTE, 5, 50, 184, 8, DT_WORDBREAK
     252                        WID_ST_LANGNOTE, 5, 50, 184, 8, DT_WORDBREAK*/ // Must inable the WM_DESTROY code
    251253    END
    252254END
     
    272274
    273275    IDS_MAINWIN                        "Gotcha!"
    274     IDS_PAGESAVE                       "Saving"
     276    IDS_PAGESAVE                       "Save"
    275277    IDS_CAPTURE                        "Capture"
    276     IDS_PAGELANGUAGE                   "Language"
     278    IDS_PAGELANGUAGE                   "About"
    277279
    278280    IDS_BMF_JPG        "JPEG Interchange File Format (jpg)"
     
    299301    IDS_ERROR_SEMAPHOREFAILED    "Semaphore creation failed"
    300302    IDS_ERROR_SEMAPHOREFAILEDMSG "Try restarting Gotcha Quiet"
     303    IDS_ERROR_RESOURSEMODFAILED  "Could not (re)load resource module '%s' (return code %d). Make sure the DLL is in the LIBPATH. If this is the case, try deleting GOTCHA.INI and restart. If this fails, contact the author (ygk@qwest.net)."
     304
    301305}                               
     306
     307STRINGTABLE
     308{
     309    LANG_COPYRIGHT  "Screen/window capture utility\nCopyright ž 1998-2007 Thorsten Thielen 2018-2020 Netlabs Gotcha! team. All rights reserved.\nWWW: https://trac.netlabs.org/gotcha"
     310    LANG_PROGRAM    "Program"
     311    LANG_HELPFILE   "Online help"
     312    LANG_RESTART    "Note: A restart is required for these settings to take effect"
     313}
  • trunk/NLS/en/gotresen.rc

    r91 r94  
    2121/* Please do NOT try to translate the following statement :-) */
    2222RCINCLUDE "..\common.rc"
    23 
     23CODEPAGE 852
    2424/* Please adjust the name of the language (but leave the number alone :-)
    2525   If possible use the name your language is called "in itself"
     
    3939}
    4040
     41RCDATA LANG_ID {"1"}
     42
    4143MENU IDM_SSWPOPUP
    4244{
     
    8385        WINDOW          "", FID_CLIENT, 0, 0, 200, 85, "thth.wc.gotcha.main",
    8486                        FS_NOBYTEALIGN | NOT WS_VISIBLE
    85         /*BEGIN
     87        BEGIN
    8688            GROUPBOX        "Save image to", WID_TEST, 4, 51, 90, 30
    8789            AUTORADIOBUTTON "~Clipboard", WID_RB_CLIPBOARD, 10, 63, 78, 10, WS_TABSTOP
     
    98100            PUSHBUTTON      "S~ettings", WID_PB_SETTINGS, 70, 4, 60, 12
    99101            PUSHBUTTON      "~About", WID_PB_ABOUT, 5, 4, 60, 12
    100         END */
     102        END
    101103    END
    102104END
     
    155157    BEGIN
    156158        NOTEBOOK        WID_NB_SETTINGS, 5, 21, 270, 170, BKS_BACKPAGESTR |
    157                         BKS_MAJORTABTOP | BKS_ROUNDEDTABS |
    158                         BKS_TABTEXTCENTER | BKS_SPIRALBIND | WS_GROUP |
    159                         BKS_TABBEDDIALOG
     159                        BKS_MAJORTABBOTTOM | WS_GROUP | BKS_TABBEDDIALOG
    160160        DEFPUSHBUTTON   "~Ok", WID_PB_OK, 5, 4, 60, 14
    161161        PUSHBUTTON      "~Undo", WID_PB_UNDO, 70, 4, 60, 14
     
    230230            WS_VISIBLE
    231231    BEGIN
    232         LTEXT           PSZ_NAMEVERSION, WID_NIL, 10, 118, 150, 8
     232        LTEXT           PSZ_NAMEVERSION, WID_NIL, 5, 118, 150, 8
    233233                        PRESPARAMS PP_FOREGROUNDCOLOR, 0x00C80A0AL
    234234        LTEXT           "Screen/window capture utility\n"
    235235                        "Copyright (c) 1998-2007 Thorsten Thielen\n"
    236236                        "2018-2020 Netlabs Gotcha! team. All rights reserved.\n"
    237                         "WWW: https://trac.netlabs.org/gotcha", WID_NIL,
    238                          10, 92, 190, 26, DT_WORDBREAK
    239         GROUPBOX        "Program", WID_NIL, 10, 5, 112, 66
    240         LISTBOX         WID_LB_LANGUAGES, 14, 10, 105, 53, LS_NOADJUSTPOS
    241         GROUPBOX        "Online help", WID_NIL, 134, 5, 112, 66
    242         LISTBOX         WID_LB_LANGUAGESHELP, 137, 10, 105, 53, LS_NOADJUSTPOS
     237                        "WWW: https://trac.netlabs.org/gotcha", WID_ST_COPYRIGHT,
     238                         5, 92, 190, 26, DT_WORDBREAK
     239        GROUPBOX        "Program", WID_ST_PROGRAM, 5, 5, 95, 46
     240        LISTBOX         WID_LB_LANGUAGES, 9, 9, 88, 34, LS_NOADJUSTPOS
     241#if 0       
     242        GROUPBOX        "Online help", WID_ST_HELPFILE, 104, 5, 95, 46
     243        LISTBOX         WID_LB_LANGUAGESHELP, 107, 9, 88, 34, LS_NOADJUSTPOS
     244#endif       
    243245        LTEXT           "Note: A restart is required for these settings to take effect",
    244                         WID_ST_LANGNOTE, 10, 74, 184, 8, DT_WORDBREAK
     246                        WID_ST_LANGNOTE, 5, 50, 184, 8, DT_WORDBREAK
    245247    END
    246248END
     
    261263    IDS_ERROR_INIFILENOTOPEN           "The INI-file (""%s"") could not be opened! Defaults will be used."
    262264
    263     IDS_ERROR_HELPERHEADING                 "HELP ERROR"
    264     IDS_ERROR_COULDNOTINITHELP              "Could not initialize online help."
    265     IDS_ERROR_COULDNOTINITHELPFILE          "Could not initialize online help. Does helpfile '%s' exist in Gotcha's directory?"
    266 
    267     IDS_PAGESAVE                       "Saving"
    268     IDS_PAGESNAPSHOT                   "Snapshot"
    269     IDS_CAPTURE                        "Misc"
     265    IDS_ERROR_HELPERHEADING            "HELP ERROR"
     266    IDS_ERROR_COULDNOTINITHELP         "Could not initialize online help."
     267    IDS_ERROR_COULDNOTINITHELPFILE     "Could not initialize online help. Does helpfile '%s' exist in Gotcha's directory?"
     268    IDS_ERROR_RESOURSEMODFAILED        "Could not (re)load resource module '%s' (return code %d). Make sure the DLL is in the LIBPATH. If this is the case, try deleting GOTCHA.INI and restart. If this fails, contact the author (ygk@qwest.net)."
     269
     270
     271    IDS_PAGESAVE                       "Save"
     272    IDS_PAGESNAPSHOT                   "Capture Type"
     273    IDS_CAPTURE                        "Capture Options"
    270274    IDS_PAGELANGUAGE                   "Language"
    271275
     
    288292    IDS_WISHCONTINUE          "Do you wish to continue?"
    289293}
     294
     295STRINGTABLE
     296{
     297    LANG_COPYRIGHT  "Screen/window capture utility\nCopyright ž 1998-2007 Thorsten Thielen 2018-2020 Netlabs Gotcha! team. All rights reserved.\nWWW: https://trac.netlabs.org/gotcha"
     298    LANG_PROGRAM    "Program"
     299    LANG_HELPFILE   "Online help"
     300    LANG_RESTART    "Note: A restart is required for these settings to take effect"
     301}
  • trunk/NLS/es/goqreses.rc

    r91 r94  
    3838/*     "Gotcha_en",              /* Name of the help file */
    3939}
     40
     41RCDATA LANG_ID {"34"}
    4042
    4143MENU IDM_SSWPOPUP
     
    239241                        "Copyright ž 1998-2007 Thorsten Thielen\n"
    240242                        "2018-2020 Equipo Gotcha! de Netlabs, todos los derechos reservados\n"
    241                         "WWW: https://trac.netlabs.org/gotcha", WID_NIL,
     243                        "WWW: https://trac.netlabs.org/gotcha", WID_ST_COPYRIGHT,
    242244                         5, 62, 190, 26, DT_WORDBREAK
    243         GROUPBOX        "Programa", WID_NIL, 5, 5, 95, 46
     245        /*GROUPBOX        "Programa", WID_NIL, 5, 5, 95, 46
    244246        LISTBOX         WID_LB_LANGUAGES, 9, 9, 88, 34, LS_NOADJUSTPOS
    245247        GROUPBOX        "Archivo de ayuda", WID_NIL, 104, 5, 95, 46
    246248        LISTBOX         WID_LB_LANGUAGESHELP, 107, 9, 88, 34, LS_NOADJUSTPOS
    247249        LTEXT           "Nota: estas dos opciones requieren reiniciar el programa",
    248                         WID_ST_LANGNOTE, 5, 50, 184, 8, DT_WORDBREAK
     250                        WID_ST_LANGNOTE, 5, 50, 184, 8, DT_WORDBREAK*/
    249251    END
    250252END
     
    299301    IDS_ERROR_SEMAPHOREFAILED    "Semaphore creation failed"
    300302    IDS_ERROR_SEMAPHOREFAILEDMSG "Try restarting Gotcha Quiet"
     303    IDS_ERROR_RESOURSEMODFAILED  "Could not (re)load resource module '%s' (return code %d). Make sure the DLL is in the LIBPATH. If this is the case, try deleting GOTCHA.INI and restart. If this fails, contact the author (ygk@qwest.net)."
     304
    301305}
     306
     307STRINGTABLE
     308{
     309    LANG_COPYRIGHT  "Herramienta de captura de pantalla/ventanas\nCopyright ž 1998-2007 Thorsten Thielen\n2018-2020 Equipo Gotcha! de Netlabs, todos los derechos reservados\nWWW: https://trac.netlabs.org/gotcha"
     310    LANG_PROGRAM    "Programa"
     311    LANG_HELPFILE   "Archivo de ayuda"
     312    LANG_RESTART    "Nota: estas dos opciones requieren reiniciar el programa"
     313}
  • trunk/NLS/es/gotreses.rc

    r91 r94  
    5353    MENUITEM "Cerrar",                      WID_CB_SSWENABLE
    5454}
     55
     56RCDATA LANG_ID {"34"}
    5557
    5658ACCELTABLE 1 PRELOAD
     
    235237                        "Copyright ž 1998-2007 Thorsten Thielen\n"
    236238                        "2018-2020 Equipo Gotcha! de Netlabs, todos los derechos reservados\n"
    237                         "WWW: https://trac.netlabs.org/gotcha", WID_NIL,
     239                        "WWW: https://trac.netlabs.org/gotcha", WID_ST_COPYRIGHT,
    238240                         10, 92, 190, 26, DT_WORDBREAK
    239241        GROUPBOX        "Programa", WID_NIL, 10, 5, 112, 66
    240242        LISTBOX         WID_LB_LANGUAGES, 14, 10, 105, 53, LS_NOADJUSTPOS
     243#if 0       
    241244        GROUPBOX        "Archivo de ayuda", WID_NIL, 134, 5, 112, 66
    242245        LISTBOX         WID_LB_LANGUAGESHELP, 137, 10, 105, 53, LS_NOADJUSTPOS
     246#endif       
    243247        LTEXT           "Nota: estas dos opciones requieren reiniciar el programa",
    244                         WID_ST_LANGNOTE, 10, 74, 184, 8, DT_WORDBREAK
     248                        WID_ST_LANGNOTE, 10, 70, 184, 8, DT_WORDBREAK
    245249    END
    246250END
     
    261265    IDS_ERROR_INIFILENOTOPEN           "­No se pudo abrir su archivo INI (®%s¯)! Se usar n las opciones por omisi¢n."
    262266
    263     IDS_ERROR_HELPERHEADING                 "ERROR DE AYUDA"
    264     IDS_ERROR_COULDNOTINITHELP              "No se pudo inicializar la ayuda."
    265     IDS_ERROR_COULDNOTINITHELPFILE          "No se pudo inicializar la ayuda. šEst  el archivo ®%s¯ en el directorio de Gotcha?"
     267    IDS_ERROR_HELPERHEADING            "ERROR DE AYUDA"
     268    IDS_ERROR_COULDNOTINITHELP         "No se pudo inicializar la ayuda."
     269    IDS_ERROR_COULDNOTINITHELPFILE     "No se pudo inicializar la ayuda. šEst  el archivo ®%s¯ en el directorio de Gotcha?"
     270    IDS_ERROR_RESOURSEMODFAILED        "Could not (re)load resource module '%s' (return code %d). Make sure the DLL is in the LIBPATH. If this is the case, try deleting GOTCHA.INI and restart. If this fails, contact the author (ygk@qwest.net)."
    266271
    267272    IDS_PAGESAVE                       "Guardar"
     
    288293    IDS_WISHCONTINUE          "šDesea continuar?"
    289294}
     295
     296STRINGTABLE
     297{
     298    LANG_COPYRIGHT  "Herramienta de captura de pantalla/ventanas\nCopyright ž 1998-2007 Thorsten Thielen 2018-2020 Equipo Gotcha! de Netlabs, todos los derechos reservados.\nWWW: https://trac.netlabs.org/gotcha"
     299    LANG_PROGRAM    "Programa"
     300    LANG_HELPFILE   "Archivo de ayuda"
     301    LANG_RESTART    "Nota: estas dos opciones requieren reiniciar el programa"
     302}
  • trunk/NLS/it/goqresit.rc

    r91 r94  
    3838/*     "Gotcha_en",              /* Name of the help file */
    3939}
     40
     41RCDATA LANG_ID {"39"}
    4042
    4143MENU IDM_SSWPOPUP
     
    224226                        "Copyright (c) 2018-2019 The Netlabs Gotcha Group\n"
    225227                        "All rights reserved\n"
    226                         "WWW: http://trac.netlabs.org/gotcha", WID_NIL,
     228                        "WWW: http://trac.netlabs.org/gotcha", WID_ST_COPYRIGHT,
    227229                         5, 62, 190, 26, DT_WORDBREAK
    228         GROUPBOX        "Programma", WID_NIL, 5, 5, 95, 46
     230        /*GROUPBOX        "Programma", WID_NIL, 5, 5, 95, 46
    229231        LISTBOX         WID_LB_LANGUAGES, 9, 9, 88, 34, LS_NOADJUSTPOS
    230232        GROUPBOX        "Aiuto in linea", WID_NIL, 104, 5, 95, 46
     
    232234        LTEXT           "Nota: queste impostazioni avranno effetto solo dopo "
    233235                        "il prossimo avvio del programma.",
    234                         WID_ST_LANGNOTE, 5, 50, 184, 8, DT_WORDBREAK //translation update
     236                        WID_ST_LANGNOTE, 5, 50, 184, 8, DT_WORDBREAK //translation update */
    235237    END
    236238END
     
    286288    IDS_ERROR_SEMAPHOREFAILED    "Semaphore creation failed"
    287289    IDS_ERROR_SEMAPHOREFAILEDMSG "Try restarting Gotcha Quiet"
     290    IDS_ERROR_RESOURSEMODFAILED  "Could not (re)load resource module '%s' (return code %d). Make sure the DLL is in the LIBPATH. If this is the case, try deleting GOTCHA.INI and restart. If this fails, contact the author (ygk@qwest.net)."
     291
    288292}
     293
     294STRINGTABLE
     295{
     296    LANG_COPYRIGHT  "Utilit
     297 per la cattura di finestre e schermate.\nCopyright (c) 1998-2007 Thorsten Thielen\nCopyright (c) 2018-2019 The Netlabs Gotcha Group\nAll rights reserved\nWWW: http://trac.netlabs.org/gotcha"
     298    LANG_PROGRAM    "Programma"
     299    LANG_HELPFILE   "Aiuto in linea"
     300    LANG_RESTART    "Nota: queste impostazioni avranno effetto solo dopo il prossimo avvio del programma."
     301}
  • trunk/NLS/it/gotresit.rc

    r91 r94  
    7474/*     "Gotcha_it.hlp",              /* Name of the help file */
    7575}
     76
     77RCDATA LANG_ID {"39"}
    7678
    7779MENU IDM_SSWPOPUP
     
    295297                        "Copyright (c) 1998-2007 Thorsten Thielen\n"
    296298                        "2018-2019 Netlabs Gotcha Group All rights Reserved\n"
    297                         "WWW: http://trac.netlabs.org/gotcha", WID_NIL,
    298                          10, 92, 190, 26, DT_WORDBREAK
     299                        "WWW: http://trac.netlabs.org/gotcha", WID_ST_COPYRIGHT,
     300                         10, 92, 190, 36, DT_WORDBREAK
    299301        GROUPBOX        "Programma", WID_NIL, 10, 5, 112, 66
    300302        LISTBOX         WID_LB_LANGUAGES, 14, 10, 105, 53, LS_NOADJUSTPOS
     303#if 0       
    301304        GROUPBOX        "Programma", WID_NIL, 134, 5, 112, 66
    302305        LISTBOX         WID_LB_LANGUAGESHELP, 137, 10, 105, 53, LS_NOADJUSTPOS
     306#endif       
    303307        LTEXT           "Nota: queste impostazioni avranno effetto solo dopo "
    304308                        "il prossimo avvio del programma.",
     
    326330    IDS_ERROR_COULDNOTINITHELP         "Non riesco ad inizializzare l'aiuto in linea."
    327331    IDS_ERROR_COULDNOTINITHELPFILE     "Non riesco ad inizializzare l'aiuto in linea. L'archivio di aiuto '%s' Š presente nella cartella di ""Gotcha!""?"
     332    IDS_ERROR_RESOURSEMODFAILED        "Could not (re)load resource module '%s' (return code %d). Make sure the DLL is in the LIBPATH. If this is the case, try deleting GOTCHA.INI and restart. If this fails, contact the author (ygk@qwest.net)."
    328333
    329334    IDS_PAGESAVE                       "Registrazione"
     
    351356}
    352357
     358STRINGTABLE
     359{
     360    LANG_COPYRIGHT  "Utilit
     361 per la cattura di finestre e schermate\nCopyright ž 1998-2007 Thorsten Thielen\n2018-2019 The Netlabs Gotcha Group\nAll rights reserved.\nWWW: http://trac.netlabs.org/gotcha"
     362    LANG_PROGRAM    "Programma"
     363    LANG_HELPFILE   "Aiuto in linea"
     364    LANG_RESTART    "Nota: queste impostazioni avranno effetto solo dopo il prossimo avvio del programma."
     365}
  • trunk/gotcha.cpp

    r92 r94  
    9292            g_usePMps = TRUE;
    9393        }
     94        if (stricmp (argv[i], "-i") == 0)
     95        {
     96            g_installer = TRUE;
     97            pset->SetFileSaveStyle (FSS_NUMFILES);
     98            pset->SetNumSaveDir ("Z:\\");
     99        }
    94100#endif
    95101    }
     
    113119    hab = WinInitialize (0);
    114120    HMQ hmq = WinCreateMsgQueue (hab, 0);
     121    int rc;
    115122
    116123    // Load settings moved up here so the string table is available for the already running error
    117124    pset = new SETTINGS;
    118     //DisplayError("DEBUG", "%d", Version());
    119 #ifdef _QUIET_
    120     if ((Version() < 2))
    121     {
    122         DisplayError(RSTR (IDS_ERROR_DLLOUTDATED),
    123                      RSTR (IDS_ERROR_DLLOUTDATEDMSG));
    124         exit (0);
    125     }
    126     int rc;
    127     HMTX    hmtx     = NULLHANDLE;
    128     // running multiple instances orphans all but the first hook unloaded
    129     rc = DosOpenMutexSem("\\SEM32\\GOTCHA", &hmtx);
    130     if (!rc) {
    131         DisplayError(RSTR (IDS_ERROR_ALREADYRUNNING),
    132                      RSTR (IDS_ERROR_ALREADYRUNNINGMSG));
    133         exit (0);
    134     }
    135     rc = DosCreateMutexSem("\\SEM32\\GOTCHA", &hmtx, 0, FALSE);
    136     if (rc) {
    137         DisplayError(RSTR (IDS_ERROR_SEMAPHOREFAILED),
    138                      RSTR (IDS_ERROR_SEMAPHOREFAILEDMSG));
    139         exit (0);
    140     }
    141 #endif
    142 
    143     // register our window classes
    144     WinRegisterClass (hab, "thth.wc.gotcha.main", WindowProcedure, 0L,
    145                       sizeof (ULONG)*2L);
    146 #ifndef _QUIET_
    147     WinRegisterClass (hab, "thth.wc.gotcha.snapshot", wpSnapshot,
    148                       CS_SIZEREDRAW, sizeof (ULONG)*2L);
    149 #endif
    150     // load the settings
    151     //pset = new SETTINGS;
    152125
    153126    pset->idleSetInIni = pset->QueryFlag(SEI_IDLEPRIORITY);
     
    156129    pset->pForceSaveFile = pset->QueryForceSaveFile();
    157130    pset->bSerialCapture = pset->SerialCapture ();
    158 #ifndef _QUIET_
     131    //DisplayError("DEBUG", "%d", Version());
     132#if 0
     133#ifdef _QUIET_
     134    HINI hini = PrfOpenProfile (hab, "gotchaq.ini");
     135#else
     136    HINI hini = PrfOpenProfile (hab, "gotcha.ini");
     137#endif
     138    BOOL fLChange = FALSE;
     139    ULONG ulDataSize;
     140    PrfQueryProfileSize(hini, "Language", "LangChangeRequested", &ulDataSize );
     141    PrfQueryProfileData(hini, "Language", "LangChangeRequested", &fLChange, &ulDataSize);
     142    if (!fLChange) {
     143    CHAR *lang = getenv("LANG");
     144#ifdef _QUIET_
     145    PSZ  psz = "goqresen";
     146#else
     147    PSZ  psz = "gotresen";
     148#endif
     149    PSZ  pszh = "gotcha_en";
     150    if (lang) {
     151        if (!strnicmp(lang, "es", 2)) {
     152            psz = "gotreses";
     153            pszh = "gotcha_es";
     154        }
     155        else if (!strnicmp(lang, "cs", 2)) {
     156            psz = "gotrescz";
     157        }
     158        else if (!strnicmp(lang, "de", 2)) {
     159            psz = "gotresde";
     160        }
     161        else if (!strnicmp(lang, "it", 2)) {
     162            psz = "gotresit";
     163            pszh = "gotcha_it";
     164        }
     165        else if (!strnicmp(lang, "br", 2)) {
     166            psz = "gotresbr";
     167            pszh = "gotcha_br";
     168        }
     169    }
     170    pset->SetString(SEI_LANGUAGE, psz);
     171    pset->SetString (SEI_LANGUAGEHELP, pszh);
     172
     173    pset->Save ();
     174    pset->ReloadResources (pset->QueryString(SEI_LANGUAGE));
     175    //fLChange = FALSE;
     176        //PrfWriteProfileData(hini, "Language", "LangChangeRequested", &fLChange, sizeof(BOOL));
     177    }
     178    if (hini)
     179        PrfCloseProfile (hini);
     180#endif
     181#ifdef _QUIET_
     182    CheckCmdlineArgs (argc, argv);
     183    if ((Version() < 2))
     184    {
     185        if (! g_installer)
     186            DisplayError(RSTR (IDS_ERROR_DLLOUTDATED),
     187                         RSTR (IDS_ERROR_DLLOUTDATEDMSG));
     188        exit (0);
     189    }
     190    HMTX    hmtx     = NULLHANDLE;
     191    // running multiple instances orphans all but the first hook unloaded
     192    rc = DosOpenMutexSem("\\SEM32\\GOTCHA", &hmtx);
     193    if (!rc) {
     194        if (! g_installer)
     195            DisplayError(RSTR (IDS_ERROR_ALREADYRUNNING),
     196                         RSTR (IDS_ERROR_ALREADYRUNNINGMSG));
     197        exit (0);
     198    }
     199    rc = DosCreateMutexSem("\\SEM32\\GOTCHA", &hmtx, 0, FALSE);
     200    if (rc) {
     201        if (! g_installer)
     202            DisplayError(RSTR (IDS_ERROR_SEMAPHOREFAILED),
     203                         RSTR (IDS_ERROR_SEMAPHOREFAILEDMSG));
     204        exit (0);
     205    }
     206#endif
     207
     208    // register our window classes
     209    WinRegisterClass (hab, "thth.wc.gotcha.main", WindowProcedure, 0L,
     210                      sizeof (ULONG)*2L);
     211#ifndef _QUIET_
     212    WinRegisterClass (hab, "thth.wc.gotcha.snapshot", wpSnapshot,
     213                      CS_SIZEREDRAW, sizeof (ULONG)*2L);
     214
    159215    // check cmd line args and if "-a" found take screenshot and exit
    160216    if (CheckCmdlineArgs (argc, argv))
     
    210266                     0,0, 0,0, SWP_SHOW);
    211267#endif
    212 
    213268    g_phelp = new Helper(hwndFrame);
    214269
  • trunk/gotcha.h

    r68 r94  
    4747#include "settings.h"
    4848
    49 //#define  _PMPRINTF_
    50 //#include "PMPRINTF.H"
     49#if 1
     50#define  _PMPRINTF_
     51#include "PMPRINTF.H"
     52#endif
    5153
    5254#define PSZ_EXTENSION    ".bmp"
  • trunk/id.h

    r91 r94  
    1919
    2020#define DLL_ID                    1
     21#define LANG_ID                   2
    2122
    2223#define ID_DLG_MAIN               1
     
    7273#define WID_LB_LANGUAGES          39
    7374#define WID_LB_LANGUAGESHELP      40
    74 #define WID_ST_LANGNOTE           41
    7575#define WID_PB_HELP               42
    7676#define WID_LB_FILEFORMAT         43
    7777#define WID_PB_EXIT               44
    7878#define WID_PB_SETCAPTURETYPE     45
     79
     80// These must be sequential with END last
     81#define WID_ST_COPYRIGHT          400
     82#define WID_ST_PROGRAM            401
     83#define WID_ST_HELPFILE           402
     84#define WID_ST_LANGNOTE           403
     85#define WID_ST_END                404
    7986
    8087#define IDM_SSWPOPUP              1
     
    130137#define SEI_UPDATE178DONE         27
    131138
     139#define EN 1
     140#define CZ 420
     141#define IT 39
     142#define DE 49
     143#define ES 34
     144#define RU 7
     145#define JP 81
     146#define PL 48
     147#define BR 55
    132148
    133149#define IDS_SETTINGS                        3
     
    172188#define IDS_ERROR_SEMAPHOREFAILED           44
    173189#define IDS_ERROR_SEMAPHOREFAILEDMSG        45
     190#define IDS_ERROR_RESOURSEMODFAILED         46
     191#define IDS_UNDO                            47
     192#define IDS_HELP                            48
     193
     194#define LANG_COPYRIGHT                      300
     195#define LANG_PROGRAM                        301
     196#define LANG_HELPFILE                       302
     197#define LANG_RESTART                        303
    174198
    175199#define MAIN_HELP_TABLE                     1
  • trunk/mainwin.cpp

    r92 r94  
    181181                             rcl.yTop - rcl.yBottom,
    182182                             SWP_SHOW | SWP_MOVE | SWP_SIZE | SWP_ZORDER);
     183            HMQ hmq;
     184            BOOL bUniCodeFont;
     185            CHAR ucFont[FACESIZE];
     186   
     187            if (pset->GetLangID() == RU) {
     188                hmq = WinQueryWindowULong( hwnd, QWL_HMQ);
     189                WinSetCp(hmq, 866);
     190                bUniCodeFont = TRUE;
     191            }
     192            else if (pset->GetLangID() == CZ || pset->GetLangID() == PL) {
     193                hmq = WinQueryWindowULong( hwnd, QWL_HMQ);
     194                WinSetCp(hmq, 852);
     195                bUniCodeFont = TRUE;
     196            }
     197            else {
     198                hmq = WinQueryWindowULong( hwnd, QWL_HMQ);
     199                WinSetCp(hmq, 850);
     200            }
     201   
     202            if (pset->GetLangID() == RU || pset->GetLangID() == CZ || pset->GetLangID() == PL) {
     203                strcpy(ucFont, "9.Times New Roman MT 30");
     204                WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont);
     205            }
     206            else
     207                WinRemovePresParam(hwnd, PP_FONTNAMESIZE);
    183208#endif
    184209        }
  • trunk/makefile

    r86 r94  
    1818GOTREVISION = $(%GOTREVISION)
    1919!else
    20 GOTREVISION = 0
     20GOTREVISION = 1
    2121!endif
    2222!ifdef %GOTFIXLEVEL
     
    108108    rstring.obj, &
    109109    settings.obj &
    110     lib dll\gotchdll.lib lib mmpm2.lib lib $(GBMPATH)\gbm.lib lib $(SRCDIR)\tools\gbmmemw.lib lib $(PMPRINTFPATH)\pmprintf.lib
     110    lib dll\gotchdll.lib lib mmpm2.lib lib $(GBMPATH)\gbm.lib lib $(SRCDIR)\tools\gbmmemw.lib lib $(PMPRINTFPATH)\pmprintf.lib lib libconv.lib
    111111    $(RC) $(RFLAGS) $(SRCDIR)\$(GOTCHAEXE).res $(GOTCHAEXE).exe
    112112    $(PERL) $(MAPSYMW) $(GOTCHAEXE).map
  • trunk/settings.cpp

    r92 r94  
    1818 ***/
    1919#include <direct.h>
     20#include <uconv.h>
    2021#include "settings.h"
    2122#include "ctype.h"
     
    3233USHORT ausDef[7] = { 0 };
    3334USHORT ausDefSSW[7] = { 0 };
     35BOOL  g_installer = FALSE;
    3436
    3537ImageFormatInfo Settings::ifi[BMF_INVALID] =
     
    109111        //DisplayError( "NOT Updated", "true" );
    110112    }
    111 
     113#ifdef _QUIET_
     114    HINI hini = PrfOpenProfile (hab, "gotchaq.ini");
     115#else
     116    HINI hini = PrfOpenProfile (hab, "gotcha.ini");
     117#endif
     118    BOOL fLChange = FALSE;
     119    ULONG ulDataSize;
     120    PrfQueryProfileSize(hini, "Language", "LangChangeRequested", &ulDataSize );
     121    PrfQueryProfileData(hini, "Language", "LangChangeRequested", &fLChange, &ulDataSize);
     122    if (!fLChange) {
     123    CHAR *lang = getenv("LANG");
     124#ifdef _QUIET_
     125    PSZ  psz = "goqresen";
     126#else
     127    PSZ  psz = "gotresen";
     128#endif
     129    PSZ  pszh = "gotcha_en";
     130    if (lang) {
     131        if (!strnicmp(lang, "es", 2)) {
     132            psz = "gotreses";
     133            pszh = "gotcha_es";
     134        }
     135        else if (!strnicmp(lang, "cs", 2)) {
     136            psz = "gotrescz";
     137        }
     138        else if (!strnicmp(lang, "de", 2)) {
     139            psz = "gotresde";
     140        }
     141        else if (!strnicmp(lang, "it", 2)) {
     142            psz = "gotresit";
     143            pszh = "gotcha_it";
     144        }
     145        else if (!strnicmp(lang, "br", 2)) {
     146            psz = "gotresbr";
     147            pszh = "gotcha_br";
     148        }
     149    }
     150    SetString(SEI_LANGUAGE, psz);
     151    SetString (SEI_LANGUAGEHELP, pszh);
     152    Save ();
     153    }
     154    if (hini)
     155        PrfCloseProfile (hini);
    112156    // to get the error msgs in default language
    113157    ReloadResources (QueryString(SEI_LANGUAGE));
    114 
    115     if (Error () == 1)
    116     {
    117         FileNotOpenError ();
    118         ReloadResources (QueryString(SEI_LANGUAGE));
     158#ifdef _QUIET_
     159    if (!g_installer) {
     160#endif
     161        if (Error () == 1)
     162        {
     163            FileNotOpenError ();
     164            ReloadResources (QueryString(SEI_LANGUAGE));
     165        }
     166        else if (Error () == 2)
     167        {
     168            VersionError ();
     169            ReloadResources (QueryString(SEI_LANGUAGE));
     170        }
     171#ifdef _QUIET_
    119172    }
    120     else if (Error () == 2)
    121     {
    122         VersionError ();
    123         ReloadResources (QueryString(SEI_LANGUAGE));
    124     }
     173#endif
    125174}
    126175
     
    135184}
    136185
    137 // ** FileNotOpenError **************************************************** /*fold00*/
     186// ** FileNotOpenError **************************************************** /*FOLD00*/
    138187
    139188USHORT SETTINGS :: FileNotOpenError (VOID)
     
    159208
    160209    // load the main dialog window
    161     hwndDlg = WinLoadDlg (HWND_DESKTOP, hwndFrame, PFNWP (DialogProcedure),
     210    hwndDlg = WinLoadDlg (HWND_DESKTOP, hwndFrame, (DialogProcedure),
    162211                          GETMODULE, ID_DLG_SETTINGS, this);
    163212    // FIXME YUKKI! YUKKI!! YUKKI!!! But I'm too lazy to do it better now :-)
     
    199248
    200249        idPage[0] = (ULONG)
    201             WinSendMsg (hwndNB, BKM_INSERTPAGE, 0L,
     250            WinSendMsg (hwndDlg, BKM_INSERTPAGE, 0L,
    202251                        MPFROM2SHORT (BKA_MAJOR | BKA_AUTOPAGESIZE,
    203252                                      BKA_LAST));
    204         WinSendMsg (hwndNB, BKM_SETTABTEXT, MPFROMLONG (idPage[0]),
     253        WinSendMsg (hwndDlg, BKM_SETTABTEXT, MPFROMLONG (idPage[0]),
    205254                    MPFROMP (pszPageTab[COUNT_PAGES-1]));
    206255        hwndPage[0] = WinLoadDlg (hwndNB, hwndNB, (PFNWP) Page4Procedure,
     
    214263        for (i = 0; i < cPages; i++)
    215264        {
     265            //BOOKPAGEINFO pi;
    216266            idPage[i] = (ULONG)
    217267                WinSendMsg (hwndNB, BKM_INSERTPAGE, 0L,
    218268                            MPFROM2SHORT (BKA_MAJOR | BKA_AUTOPAGESIZE,
    219269                                          BKA_LAST));
    220             WinSendMsg (hwndNB, BKM_SETTABTEXT,
    221                         MPFROMLONG (idPage[i]), MPFROMP (pszPageTab[i]));
     270#if 0
     271            pi.cb = sizeof(pi);
     272            pi.fl = BFA_PAGEFROMDLGRES | BFA_MAJORTABTEXT;
     273            pi.bLoadDlg = TRUE;
     274            pi.hmodPageDlg = g_hmod;
     275            switch (i) {
     276#ifndef  _QUIET_
     277            case 0:
     278                pi.idPageDlg = ID_DLG_SETTINGSPAGE1;
     279                pi.pfnPageDlgProc = NULL; //(PFN) Page1Procedure;
     280                break;
     281#else
     282            case 0:
     283                pi.idPageDlg = ID_DLG_SETTINGSPAGE0;
     284                pi.pfnPageDlgProc = NULL; //(PFN) WindowProcedure;
     285                break;
     286#endif
     287            case 1:
     288                pi.idPageDlg = ID_DLG_SETTINGSPAGE2;
     289                pi.pfnPageDlgProc = NULL; //(PFN) Page2Procedure;
     290                break;
     291#ifndef  _QUIET_
     292            case 2:
     293                pi.idPageDlg = ID_DLG_SETTINGSPAGE3;
     294                pi.pfnPageDlgProc = NULL; //(PFN) Page3Procedure;
     295                break;
     296#else
     297            case 2:
     298                pi.idPageDlg = ID_DLG_SETTINGSPAGE1;
     299                pi.pfnPageDlgProc = NULL; //(PFN) Page1Procedure;
     300                break;
     301#endif
     302            case 3:
     303                pi.idPageDlg = ID_DLG_SETTINGSPAGE4;
     304                pi.pfnPageDlgProc = NULL; //(PFN) Page4Procedure;
     305                break;
     306            }
     307            pi.cbMajorTab = strlen(pszPageTab[i]);
     308            pi.pszMajorTab = pszPageTab[i];
     309            pi.cbMinorTab = strlen(pszPageTab[i]);
     310            pi.pszMinorTab = pszPageTab[i];
     311            pi.cbStatusLine = 0;
     312            pi.pszStatusLine = NULL;
     313#endif
     314            if (pset->GetLangID() == CZ || pset->GetLangID() == RU || pset->GetLangID() == PL) {
     315                UniChar     target[300];
     316                CHAR       ucLangStr[300];
     317                UconvObject     uconv_object866 = NULL;
     318                UconvObject     uconv_object852 = NULL;
     319                UconvObject     uconv_object1207 = NULL;
     320                UconvObject     uconv_object850 = NULL;
     321                HAB hab;
     322                CHAR ucFont[FACESIZE];
     323   
     324                UniCreateUconvObject((UniChar *)L"IBM-852", &uconv_object852);
     325                UniCreateUconvObject((UniChar *)L"IBM-850", &uconv_object850);
     326                UniCreateUconvObject((UniChar *)L"IBM-866", &uconv_object866);
     327                UniCreateUconvObject((UniChar *)L"IBM-1207", &uconv_object1207);
     328               
     329                strcpy(ucLangStr, pszPageTab[i]);
     330                if (pset->GetLangID() == CZ || pset->GetLangID() == PL) {
     331                   
     332                    UniStrToUcs( uconv_object852, target, ucLangStr, 299);
     333                }
     334                else if (pset->GetLangID() == RU)
     335                    UniStrToUcs( uconv_object866, target, ucLangStr, 299);
     336                else {
     337                    UniStrToUcs( uconv_object850, target, ucLangStr, 299);
     338                }
     339                UniStrFromUcs( uconv_object1207, ucLangStr, target, 300);
     340                WinSendMsg (hwndNB, BKM_SETTABTEXT,
     341                            MPFROMLONG (idPage[i]), MPFROMP (ucLangStr));
     342                /*pi.cbMajorTab = strlen(ucLangStr) + 10;
     343                pi.pszMajorTab = ucLangStr;
     344                pi.cbMinorTab = 0;
     345                pi.pszMinorTab = "";*/
     346                if (uconv_object866)
     347                    UniFreeUconvObject(uconv_object866);
     348                if (uconv_object852)
     349                    UniFreeUconvObject(uconv_object852);
     350                if (uconv_object850)
     351                    UniFreeUconvObject(uconv_object850);
     352                if (uconv_object1207)
     353                    UniFreeUconvObject(uconv_object1207);
     354            }
     355            else
     356                WinSendMsg (hwndNB, BKM_SETTABTEXT,
     357                            MPFROMLONG (idPage[i]), MPFROMP (pszPageTab[i]));
     358            //WinSendMsg(hwndNB, BKM_SETPAGEINFO, MPFROMLONG(idPage[i]),
     359              //         MPFROMP(&pi));
    222360        }
    223361#ifndef _QUIET_
     
    301439}
    302440
     441ULONG winhDrawFormattedText(HPS hps, PRECTL prcl, const char *pcszText, ULONG flCmd);
     442
    303443// ** DialogProcedure ***************************************************** /*FOLD00*/
    304444
    305 MRESULT EXPENTRY
    306 SETTINGS :: DialogProcedure (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
     445MRESULT EXPENTRY SETTINGS :: DialogProcedure (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
    307446{
    308447    static PSETTINGS   pset = NULL;
     
    322461        LogDebug( "DialogProcedure: end WM_INITDLG" );
    323462#endif
     463        CHAR ucFont[FACESIZE];
     464        if (pset->GetLangID() == CZ || pset->GetLangID() == RU || pset->GetLangID() == PL) {
     465           HMQ hmq = WinQueryWindowULong( hwnd, QWL_HMQ);
     466           WinSetCp(hmq, 1207);
     467           strcpy(ucFont, "8.Times New Roman MT 30");
     468           WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont);
     469
     470           UniChar     target[300];
     471           CHAR       ucLangStr[300];
     472           UconvObject     uconv_object866 = NULL;
     473           UconvObject     uconv_object860 = NULL;
     474           UconvObject     uconv_object852 = NULL;
     475           UconvObject     uconv_object1207 = NULL;
     476           UconvObject     uconv_object850 = NULL;
     477           HAB hab;
     478           CHAR ucFont[FACESIZE];
     479
     480           UniCreateUconvObject((UniChar *)L"IBM-852", &uconv_object852);
     481           UniCreateUconvObject((UniChar *)L"IBM-850", &uconv_object850);
     482           UniCreateUconvObject((UniChar *)L"IBM-866", &uconv_object866);
     483           UniCreateUconvObject((UniChar *)L"IBM-1207", &uconv_object1207);
     484           
     485           WinLoadString(hab, g_hmod, IDS_UNDO, sizeof(ucLangStr), ucLangStr);
     486           if (pset->GetLangID() == CZ || pset->GetLangID() == PL) {
     487               
     488               UniStrToUcs( uconv_object852, target, ucLangStr, 299);
     489           }
     490           else if (pset->GetLangID() == RU)
     491               UniStrToUcs( uconv_object866, target, ucLangStr, 299);
     492           else {
     493               UniStrToUcs( uconv_object850, target, ucLangStr, 299);
     494           }
     495           UniStrFromUcs( uconv_object1207, ucLangStr, target, 300);
     496           WinSetDlgItemText(hwnd, WID_PB_UNDO, ucLangStr);
     497           WinLoadString(hab, g_hmod, IDS_HELP, sizeof(ucLangStr), ucLangStr);
     498
     499           if (pset->GetLangID() == CZ || pset->GetLangID() == PL) {
     500               
     501               UniStrToUcs( uconv_object852, target, ucLangStr, 299);
     502           }
     503           else if (pset->GetLangID() == RU)
     504               UniStrToUcs( uconv_object866, target, ucLangStr, 299);
     505           else {
     506               UniStrToUcs( uconv_object850, target, ucLangStr, 299);
     507           }
     508           UniStrFromUcs( uconv_object1207, ucLangStr, target, 300);
     509           WinSetDlgItemText(hwnd, WID_PB_HELP, ucLangStr);
     510           if (uconv_object866)
     511               UniFreeUconvObject(uconv_object866);
     512           if (uconv_object852)
     513               UniFreeUconvObject(uconv_object852);
     514           if (uconv_object850)
     515               UniFreeUconvObject(uconv_object850);
     516           if (uconv_object1207)
     517               UniFreeUconvObject(uconv_object1207);
     518        }
     519        else {
     520        strcpy(ucFont, "10.WarpSans");
     521        WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont);
     522        }
     523           
    324524        return MRESULT (FALSE);
    325525
     
    437637// ** Page1Procedure ****************************************************** /*FOLD00*/
    438638
    439 MRESULT EXPENTRY
    440 SETTINGS :: Page1Procedure (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
     639MRESULT EXPENTRY SETTINGS :: Page1Procedure (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
    441640{
    442641    static PSETTINGS   pset = NULL;
     
    458657            }
    459658        }
     659        HMQ hmq;
     660        BOOL bUniCodeFont;
     661        CHAR ucFont[FACESIZE];
     662
     663        if (pset->GetLangID() == RU) {
     664            hmq = WinQueryWindowULong( hwnd, QWL_HMQ);
     665            WinSetCp(hmq, 866);
     666            bUniCodeFont = TRUE;
     667        }
     668        else if (pset->GetLangID() == CZ || pset->GetLangID() == PL) {
     669            hmq = WinQueryWindowULong( hwnd, QWL_HMQ);
     670            WinSetCp(hmq, 852);
     671            bUniCodeFont = TRUE;
     672        }
     673        else {
     674            hmq = WinQueryWindowULong( hwnd, QWL_HMQ);
     675            WinSetCp(hmq, 850);
     676        }
     677
     678        if (bUniCodeFont) {
     679            strcpy(ucFont, "8.Times New Roman MT 30");
     680            WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont);
     681        }
     682        else {
     683            strcpy(ucFont, "10.WarpSans");
     684            WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont);
     685        }
     686
    460687#ifdef _DOLOGDEBUG_
    461688        LogDebug( "Page1Procedure: end WM_INITDLG" );
     
    463690        return MRESULT (FALSE);
    464691    }
     692
     693    case WM_DRAWITEM:
     694
     695        POWNERITEM poItem;
     696        HPS hps;
     697        RECTL       rcl,          // window area
     698                    rclClip;      // clipping region for drawn text
     699        POINTL      ptl;          // current text position
     700        FATTRS      fontAttrs;    // current font attributes
     701        FONTMETRICS fm;           // current font metr
     702
     703
     704        poItem = POWNERITEM (mp2);
     705
     706        //hps = WinBeginPaint( hwnd, NULLHANDLE, NULLHANDLE );
     707        memset( &fontAttrs, 0, sizeof(FATTRS) );
     708        PmpfF(("PageID %i", poItem->hItem));
     709        // set the font attributes and create the logical font
     710        fontAttrs.usRecordLength = sizeof(FATTRS);
     711        fontAttrs.usCodePage     = 852;
     712        fontAttrs.fsType         = FATTR_TYPE_MBCS;
     713        fontAttrs.fsFontUse      = FATTR_FONTUSE_NOMIX;
     714        strcpy( fontAttrs.szFacename, "10.WarpSans");
     715        GpiCreateLogFont( poItem->hps, NULL, 1L, &fontAttrs );
     716        GpiSetCharSet( poItem->hps, 1L );
     717        // paint the window background
     718        //WinQueryWindowRect( hwnd, &rcl ); ????
     719        WinFillRect( hps, &poItem->rclItem, SYSCLR_WINDOW );
     720        GpiQueryFontMetrics( poItem->hps, sizeof(FONTMETRICS), &fm );
     721        rclClip.xLeft   = poItem->rclItem.xLeft + fm.lAveCharWidth;
     722        rclClip.yBottom = poItem->rclItem.yBottom + fm.lXHeight;
     723        rclClip.xRight  = poItem->rclItem.xRight - fm.lAveCharWidth;
     724        rclClip.yTop    = poItem->rclItem.yTop - fm.lXHeight;
     725        ptl.x = rclClip.xLeft;
     726        ptl.y = rclClip.yTop - fm.lExternalLeading - fm.lMaxAscender;
     727        GpiCharStringPosAt( poItem->hps, &ptl, &rclClip, CHS_CLIP,
     728                           /*Strlen(pszPageTab[i])*/5, (PCH) /*pszPageTab[i]*/ "Test", NULL );
     729        WinEndPaint( hps );
     730
     731        //poItem->hwnd = hwndNB;            /*  Window handle. */
     732        //poItem->hps = hps;             /*  Presentation-space handle. */
     733        //poItem->fsState = BKS_BACKPAGESTR | BKS_MAJORTABTOP | BKS_TABBEDDIALOG;         /*  State. */
     734        //poItem->fsAttribute = BKA_MAJOR | BKA_AUTOPAGESIZE;     /*  Attribute. */
     735        //poItem->rclItem; ????        /*  Item rectangle. */
     736        //poItem->hItem = idPage[i];
     737
     738        break;
    465739
    466740    case WM_COMMAND:
     
    623897// ** Page2Procedure ****************************************************** /*FOLD00*/
    624898
    625 MRESULT EXPENTRY
    626 SETTINGS :: Page2Procedure (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
     899MRESULT EXPENTRY SETTINGS :: Page2Procedure (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
    627900{
    628901    static PSETTINGS   pset = NULL;
     
    638911        LogDebug( "Page1Procedure: end WM_INITDLG" );
    639912#endif
     913        HMQ hmq;
     914        BOOL bUniCodeFont;
     915        CHAR ucFont[FACESIZE];
     916       
     917        if (pset->GetLangID() == RU) {
     918            hmq = WinQueryWindowULong( hwnd, QWL_HMQ);
     919            WinSetCp(hmq, 866);
     920            bUniCodeFont = TRUE;
     921        }
     922        else if (pset->GetLangID() == CZ || pset->GetLangID() == PL) {
     923            hmq = WinQueryWindowULong( hwnd, QWL_HMQ);
     924            WinSetCp(hmq, 852);
     925            bUniCodeFont = TRUE;
     926        }
     927        else {
     928            hmq = WinQueryWindowULong( hwnd, QWL_HMQ);
     929            WinSetCp(hmq, 850);
     930        }
     931
     932        if (bUniCodeFont) {
     933            strcpy(ucFont, "8.Times New Roman MT 30");
     934            WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont);
     935        }
     936        //else
     937           // WinRemovePresParam(hwnd, PP_FONTNAMESIZE);
    640938        return MRESULT (FALSE);
    641939
     
    8191117// ** Page3Procedure ****************************************************** /*FOLD00*/
    8201118
    821 MRESULT EXPENTRY
    822 SETTINGS :: Page3Procedure (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
     1119MRESULT EXPENTRY SETTINGS :: Page3Procedure (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
    8231120{
    8241121    static PSETTINGS   pset = NULL;
     
    8341131        LogDebug( "Page3Procedure: end WM_INITDLG" );
    8351132#endif
     1133        HMQ hmq;
     1134        BOOL bUniCodeFont;
     1135        CHAR ucFont[FACESIZE];
     1136       
     1137        if (pset->GetLangID() == RU) {
     1138            hmq = WinQueryWindowULong( hwnd, QWL_HMQ);
     1139            WinSetCp(hmq, 866);
     1140            bUniCodeFont = TRUE;
     1141        }
     1142        else if (pset->GetLangID() == CZ || pset->GetLangID() == PL) {
     1143            hmq = WinQueryWindowULong( hwnd, QWL_HMQ);
     1144            WinSetCp(hmq, 852);
     1145            bUniCodeFont = TRUE;
     1146        }
     1147        else {
     1148            hmq = WinQueryWindowULong( hwnd, QWL_HMQ);
     1149            WinSetCp(hmq, 850);
     1150        }
     1151
     1152        if (bUniCodeFont) {
     1153            strcpy(ucFont, "8.Times New Roman MT 30");
     1154            WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont);
     1155        }
     1156        //else
     1157        //    WinRemovePresParam(hwnd, PP_FONTNAMESIZE);
    8361158        return MRESULT (FALSE);
    8371159
     
    9461268// ** Page4Procedure ****************************************************** /*FOLD00*/
    9471269
    948 MRESULT EXPENTRY
    949 SETTINGS :: Page4Procedure (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
     1270MRESULT EXPENTRY SETTINGS :: Page4Procedure (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
    9501271{
    9511272    static PSETTINGS   pset = NULL;
     
    9591280#endif
    9601281            pset = PSETTINGS (mp2);
    961 
     1282            HMQ hmq = WinQueryWindowULong(hwnd /*WinWindowFromID(hwnd, ID_DLG_SETTINGSPAGE4)*/, QWL_HMQ);
     1283            WinSetCp(hmq, 1207); // UPF-8 Unicode
     1284            WinRemovePresParam(hwnd, PP_FONTNAMESIZE);
    9621285            pset->GetLanguages(WinWindowFromID (hwnd, WID_LB_LANGUAGES));
    9631286
     
    10061329            LogDebug( "Page4Procedure: end WM_INITDLG" );
    10071330#endif
    1008         }
     1331
     1332            UniChar     target[300];
     1333            CHAR       ucLangStr[300];
     1334            UconvObject     uconv_object866 = NULL;
     1335            UconvObject     uconv_object860 = NULL;
     1336            UconvObject     uconv_object852 = NULL;
     1337            UconvObject     uconv_object1207 = NULL;
     1338            UconvObject     uconv_object850 = NULL;
     1339            int result;
     1340            int i;
     1341            HAB hab;
     1342            CHAR ucFont[FACESIZE];
     1343
     1344            UniCreateUconvObject((UniChar *)L"IBM-852", &uconv_object852);
     1345            UniCreateUconvObject((UniChar *)L"IBM-850", &uconv_object850);
     1346            UniCreateUconvObject((UniChar *)L"IBM-866", &uconv_object866);
     1347           
     1348            UniCreateUconvObject((UniChar *)L"IBM-1207", &uconv_object1207);
     1349            for (i = 0; i < WID_ST_END - 400; i++) {
     1350                WinLoadString(hab, g_hmod, LANG_COPYRIGHT + i, sizeof(ucLangStr), ucLangStr);
     1351                if (pset->GetLangID() == 420 ||
     1352                    pset->GetLangID() == PL) {
     1353                   
     1354                    UniStrToUcs( uconv_object852, target, ucLangStr, 299);
     1355                }
     1356                else if (pset->GetLangID() == RU)
     1357                    UniStrToUcs( uconv_object866, target, ucLangStr, 299);
     1358                else {
     1359                    UniStrToUcs( uconv_object850, target, ucLangStr, 299);
     1360                }
     1361                UniStrFromUcs( uconv_object1207, ucLangStr, target, 300);
     1362                WinSetDlgItemText(hwnd, WID_ST_COPYRIGHT + i, ucLangStr);
     1363            }
     1364
     1365            if (uconv_object866)
     1366                UniFreeUconvObject(uconv_object866);
     1367            if (uconv_object852)
     1368                UniFreeUconvObject(uconv_object852);
     1369            if (uconv_object850)
     1370                UniFreeUconvObject(uconv_object850);
     1371            if (uconv_object1207)
     1372                UniFreeUconvObject(uconv_object1207);
     1373           
     1374            if (pset->GetLangID() == RU || pset->GetLangID() == CZ || pset->GetLangID() == PL ||
     1375               pset->GetLangID() == IT) {
     1376                strcpy(ucFont, "8.Times New Roman MT 30");
     1377                WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont);
     1378            }
     1379           
     1380            //    WinRemovePresParam(hwnd, PP_FONTNAMESIZE);*/
     1381            //HMQ hmq = WinQueryWindowULong(hwnd /*WinWindowFromID(hwnd, WID_LB_LANGUAGES)*/, QWL_HMQ);
     1382            //WinSetCp(hmq, 1207); // UPF-8 Unicode
    10091383        return MRESULT (FALSE);
     1384        }
    10101385
    10111386    case WM_COMMAND:
     
    10761451
    10771452    case WM_DESTROY:
     1453#ifndef _QUIET_
    10781454        {
    10791455            CHAR   ach[_MAX_FNAME];
     1456            BOOL fChanged = TRUE;
    10801457
    10811458            ULONG ul = USHORT (WinSendDlgItemMsg (hwnd, WID_LB_LANGUAGES,
     
    10851462                                             LM_QUERYITEMHANDLE,
    10861463                                             MPFROMLONG(ul), NULL));
    1087             pset->SetString(SEI_LANGUAGE, psz);
    1088 
     1464            if (stricmp (pset->QueryString(SEI_LANGUAGE), psz) == 0)
     1465                fChanged = FALSE;
     1466            else
     1467                pset->SetString(SEI_LANGUAGE, psz);
     1468#if 0
    10891469            ul = USHORT (WinSendDlgItemMsg (hwnd, WID_LB_LANGUAGESHELP,
    10901470                                            LM_QUERYSELECTION,
     
    10921472            WinSendDlgItemMsg (hwnd, WID_LB_LANGUAGESHELP, LM_QUERYITEMTEXT,
    10931473                               MPFROM2SHORT (ul, sizeof (ach)), MPFROMP (ach));
    1094             pset->SetString (SEI_LANGUAGEHELP, ach);
    1095 
    1096             if (saveum)
     1474            if (stricmp (pset->QueryString(SEI_LANGUAGEHELP), ach) == 0 && !fChanged)
     1475                fChanged = FALSE;
     1476            else
     1477                pset->SetString (SEI_LANGUAGEHELP, ach);
     1478#endif
     1479            if (fChanged) {
     1480                if (!stricmp(psz, "gotreses") || !stricmp(psz, "goqreses"))
     1481                    strcpy(ach, "gotcha_es");
     1482                else if (!stricmp(psz, "gotresbr") || !stricmp(psz, "goqresbr"))
     1483                    strcpy(ach, "gotcha_br");
     1484                else if (!stricmp(psz, "gotresit") || !stricmp(psz, "goqresit"))
     1485                    strcpy(ach, "gotcha_it");
     1486                else
     1487                    strcpy(ach, "gotcha_en");
     1488                pset->SetString (SEI_LANGUAGEHELP, ach);
     1489            }
     1490            if (saveum && fChanged) {
    10971491                pset->Save ();
    1098         }
     1492#ifdef _QUIET_
     1493                HINI hini = PrfOpenProfile (hab, "gotchaq.ini");
     1494#else
     1495                HINI hini = PrfOpenProfile (hab, "gotcha.ini");
     1496#endif
     1497                BOOL fLChanged = TRUE;
     1498                PrfWriteProfileData(hini, "Language", "LangChangeRequested", &fLChanged, sizeof(BOOL));
     1499                if (hini)
     1500                    PrfCloseProfile (hini);
     1501            }
     1502        }
     1503#endif
    10991504        return MRESULT (FALSE);
    11001505    }
     
    11141519}
    11151520
    1116 // ** QueryWindowData ***************************************************** /*fold00*/
     1521// ** QueryWindowData ***************************************************** /*FOLD00*/
    11171522
    11181523VOID SETTINGS :: QueryWindowData (SWP *pswp, USHORT us[7], BOOL f)
     
    11581563    if ((rc = DosLoadModule(PSZ(NULL), 0, psz, &g_hmod)))
    11591564    {
    1160         DisplayError("Error",
    1161                      "Could not (re)load resource module '%s' (return code %d). "
    1162                      "Make sure the DLL is in the LIBPATH. If this is the case, "
    1163                      "try deleting GOTCHA.INI and restart. If this fails, contact "
    1164                      "the author (ygk@qwest.net).", psz, rc);
     1565        DisplayError(RSTR(IDS_HEADER_ERROR),
     1566                     RSTR(IDS_ERROR_RESOURSEMODFAILED), psz, rc);
    11651567        exit(1);
    11661568    }
    1167 
     1569    PVOID pv;
     1570    INT Lang;
     1571
     1572    DosGetResource(g_hmod, RT_RCDATA, LANG_ID, &pv);
     1573    Lang = atoi((PCHAR) pv);
     1574    SetLangID(Lang);
    11681575    ResourceString::Module(g_hmod);
    11691576#ifdef _QUIET_
     
    12361643        if ((rc = DosLoadModule(PSZ(NULL), 0, findbuf.achName, &hmod)) == NO_ERROR) {
    12371644            PVOID pv;
     1645            PVOID pl;
     1646
    12381647            if (DosGetResource(hmod, RT_RCDATA, DLL_ID, &pv) == NO_ERROR) {
    12391648#ifdef _QUIET_
     
    12421651                if (strcmp(PSZ(pv), "Gotcha!") == 0) {
    12431652#endif
    1244                     psz = PSZ(pv)+strlen(PSZ(pv))+3;
    1245                     ul = WinInsertLboxItem (hwnd, LIT_END, psz);
     1653                    psz = PSZ(pv)+strlen(PSZ(pv)) + 3;
     1654                   
     1655                    INT Lang;
     1656               
     1657                    DosGetResource(hmod, RT_RCDATA, LANG_ID, &pl);
     1658                    Lang = atoi((PCHAR) pl);
     1659#if 1
     1660                    UniChar     target[300];
     1661                    CHAR       ucLangStr[300];
     1662                    UconvObject     uconv_object866 = NULL;
     1663                    UconvObject     uconv_object852 = NULL;
     1664                    UconvObject     uconv_object1207 = NULL;
     1665                    UconvObject     uconv_object850 = NULL;
     1666                    int i;
     1667                   
     1668                    strcpy(ucLangStr, psz);
     1669                    UniCreateUconvObject((UniChar *)L"IBM-852", &uconv_object852);
     1670                    UniCreateUconvObject((UniChar *)L"IBM-850", &uconv_object850);
     1671                    UniCreateUconvObject((UniChar *)L"IBM-866", &uconv_object866);
     1672                    UniCreateUconvObject((UniChar *)L"IBM-1207", &uconv_object1207);
     1673                   
     1674                    if (Lang == CZ) {
     1675                        UniStrToUcs( uconv_object852, target, ucLangStr, 299);
     1676                        }
     1677                        else {
     1678                            UniStrToUcs( uconv_object850, target, ucLangStr, 299);
     1679                        }
     1680                        /*if (Lang == RU) {
     1681                            UniStrToUcs( uconv_object866, target, ucLangStr, 299);
     1682                        } */
     1683                        UniStrFromUcs( uconv_object1207, ucLangStr, target, 300);
     1684                    Lang = 0;
     1685                    if (uconv_object866)
     1686                        UniFreeUconvObject(uconv_object866);
     1687                    if (uconv_object852)
     1688                        UniFreeUconvObject(uconv_object852);
     1689                    if (uconv_object850)
     1690                        UniFreeUconvObject(uconv_object850);
     1691                    if (uconv_object1207)
     1692                        UniFreeUconvObject(uconv_object1207);
     1693
     1694
     1695#endif
     1696                    ul = WinInsertLboxItem (hwnd, LIT_END,/*psz*/ucLangStr);
    12461697                    WinSendMsg(hwnd, LM_SETITEMHANDLE, MPFROMLONG(ul),
    12471698                               MPFROMP (strdup(findbuf.achName)));
    12481699                }
     1700                if (pl)
     1701                    DosFreeResource(pl);
    12491702                DosFreeResource(pv);
    12501703            }
     
    13081761
    13091762// ************************************************************************
     1763
     1764ULONG winhDrawFormattedText(HPS hps,     // in: presentation space; its settings
     1765                                         // are used, but not altered
     1766                            PRECTL prcl, // in/out: rectangle to use for drawing
     1767                                         // (modified)
     1768                            const char *pcszText, // in: text to draw (zero-terminated)
     1769                            ULONG flCmd) // in: flags like in WinDrawText; I have
     1770                                         // only tested DT_TOP and DT_LEFT though.
     1771                                         // DT_WORDBREAK | DT_TEXTATTRS are always
     1772                                         // set.
     1773                                         // You can specify DT_QUERYEXTENT to only
     1774                                         // have prcl calculated without drawing.
     1775{
     1776    PSZ     p = (PSZ)pcszText;
     1777    LONG    lDrawn = 1,
     1778            lTotalDrawn = 0,
     1779            lLineCount = 0,
     1780            lOrigYTop = prcl->yTop;
     1781    ULONG   ulTextLen = strlen(pcszText),
     1782            ulCharHeight,
     1783            flCmd2,
     1784            xLeftmost = prcl->xRight,
     1785            xRightmost = prcl->xLeft;
     1786    RECTL   rcl2;
     1787
     1788    flCmd2 = flCmd | DT_WORDBREAK | DT_TEXTATTRS;
     1789
     1790    ulCharHeight = 30;//gpihQueryLineSpacing(hps);
     1791
     1792    while (    (lDrawn)
     1793            && (lTotalDrawn < ulTextLen)
     1794          )
     1795    {
     1796        memcpy(&rcl2, prcl, sizeof(rcl2));
     1797        lDrawn = WinDrawText(hps,
     1798                             ulTextLen-lTotalDrawn,
     1799                             p,
     1800                             &rcl2,
     1801                             0, 0,                       // colors
     1802                             flCmd2);
     1803
     1804        // update char counters
     1805        p += lDrawn;
     1806        lTotalDrawn += lDrawn;
     1807
     1808        // update x extents
     1809        if (rcl2.xLeft < xLeftmost)
     1810            xLeftmost = rcl2.xLeft;
     1811        if (rcl2.xRight > xRightmost)
     1812            xRightmost = rcl2.xRight;
     1813
     1814        // update y for next line
     1815        prcl->yTop -= ulCharHeight;
     1816
     1817        // increase line count
     1818        lLineCount++;
     1819    }
     1820    prcl->xLeft = xLeftmost;
     1821    prcl->xRight = xRightmost;
     1822    prcl->yBottom = prcl->yTop;
     1823    prcl->yTop = lOrigYTop;
     1824
     1825    return lLineCount;
     1826}
  • trunk/settings.h

    r92 r94  
    3232#endif
    3333
     34extern BOOL g_installer;
    3435// this should be increased every time the format of the proFile changes
    3536#define L_PROFILEVERSION          2
     
    132133    }
    133134
     135    VOID   SetLangID(INT   Language) {LangID = Language;}
     136    INT    GetLangID(VOID) {return LangID;}
     137
    134138    VOID   SelectLanguage (VOID);
    135139
     
    181185    BOOL   fAutoLanguage;
    182186    HWND   hwndDlg;
     187    INT    LangID;
    183188
    184189    static ImageFormatInfo ifi[];
Note: See TracChangeset for help on using the changeset viewer.