[Git][wxwidgets/wxwidgets][master] 9 commits: CMake: Enable wxUSE_WEBVIEW_EDGE by default

2 views
Skip to first unread message

Vadim Zeitlin (@_VZ_)

unread,
May 28, 2025, 7:37:07 PMMay 28
to wx-commi...@googlegroups.com

Vadim Zeitlin pushed to branch master at wxWidgets / wxWidgets

Commits:

  • 2ad3b0d1
    by Maarten Bent at 2025-05-28T22:02:50+02:00
    CMake: Enable wxUSE_WEBVIEW_EDGE by default
    
  • 3c1a2506
    by Maarten Bent at 2025-05-28T23:33:48+02:00
    CMake: Check for CURL in wxWidgetsConfig.cmake
    
    Fixes #25463
    
  • 7d0590e7
    by Felipe at 2025-05-29T01:11:12+02:00
    Update Brazilian Portuguese translations
    
  • dce8b099
    by Bill Su at 2025-05-29T01:21:10+02:00
    Respect menu path style in wxFileHistory::AddFilesToMenu() too
    
    Previously this function didn't respect the path style and always used
    full paths in the menu items labels.
    
    Fix this by moving the logic for determining the correct label to use
    into GetMRUEntryLabel(), where it logically belongs.
    
    Closes #25451.
    
  • 3fc7ffc2
    by Blake-Madden at 2025-05-29T01:25:33+02:00
    Check result of downloading WebView2 from CMake
    
    Abort the build immediately if downloading failed instead of running
    into problems later.
    
    Closes #25457.
    
  • 9402c423
    by Blake-Madden at 2025-05-29T01:26:42+02:00
    Explain how to include an out-of-tree wxWidgets folder in CMake
    
    Closes #25458.
    
  • c52ec537
    by Blake-Madden at 2025-05-29T01:27:59+02:00
    Fix wxINFOBAR_CHECKBOX style getting lost under MSW
    
    Pass the style to wxWindow::Create() instead of calling SetWindowStyle()
    ourselves: this ensures that wxINFOBAR_CHECKBOX is not overwritten by
    the base class default style in wxMSW wxWindow::Create().
    
    Closes #25461.
    
  • 3015f489
    by Vadim Zeitlin at 2025-05-29T01:30:27+02:00
    Merge branch 'cmake-default-webview' of github.com:MaartenBent/wxWidgets
    
    CMake: Enable wxUSE_WEBVIEW_EDGE by default and add check for curl.
    
    See #25462.
    
  • a26eda72
    by Vadim Zeitlin at 2025-05-29T01:34:29+02:00
    Make wxPlatformInfo::Get() thread-safe
    
    Protect gs_platInfo initialization with a critical section to ensure
    that we don't try to do it in parallel from more than one thread,
    resulting in crashes.
    
    See #25464.
    
    Closes #25459.
    

11 changed files:

Changes:

  • CMakePresets.json
    ... ... @@ -23,9 +23,6 @@
    23 23
                 "description": "Base configuration for MSW",
    
    24 24
                 "hidden": true,
    
    25 25
                 "inherits": "common",
    
    26
    -            "cacheVariables": {
    
    27
    -                "wxUSE_WEBVIEW_EDGE": "ON"
    
    28
    -            },
    
    29 26
                 "condition": {
    
    30 27
                     "type": "equals",
    
    31 28
                     "lhs": "${hostSystemName}",
    

  • build/cmake/lib/webview/CMakeLists.txt
    ... ... @@ -63,7 +63,14 @@ elseif(WXMSW)
    63 63
                 file(DOWNLOAD
    
    64 64
                     ${WEBVIEW2_URL}
    
    65 65
                     ${CMAKE_CURRENT_BINARY_DIR}/webview2.nuget
    
    66
    -                EXPECTED_HASH SHA256=${WEBVIEW2_SHA256})
    
    66
    +                EXPECTED_HASH SHA256=${WEBVIEW2_SHA256}
    
    67
    +                STATUS DOWNLOAD_RESULT)
    
    68
    +            # Check that the download was successful.
    
    69
    +            list(GET DOWNLOAD_RESULT 0 DOWNLOAD_RESULT_NUM)
    
    70
    +            if(NOT ${DOWNLOAD_RESULT_NUM} EQUAL 0)
    
    71
    +                list(GET DOWNLOAD_RESULT 1 DOWNLOAD_RESULT_STR)
    
    72
    +                message(FATAL_ERROR "Error ${DOWNLOAD_RESULT_NUM} downloading WebView2 SDK: ${DOWNLOAD_RESULT_STR}.")
    
    73
    +            endif()
    
    67 74
                 file(MAKE_DIRECTORY ${WEBVIEW2_PACKAGE_DIR})
    
    68 75
                 execute_process(COMMAND
    
    69 76
                     "${CMAKE_COMMAND}" -E tar x "${CMAKE_CURRENT_BINARY_DIR}/webview2.nuget"
    

  • build/cmake/options.cmake
    ... ... @@ -481,11 +481,6 @@ if(WIN32)
    481 481
         else()
    
    482 482
             set(wxUSE_WINRT_DEFAULT OFF)
    
    483 483
         endif()
    
    484
    -    if(EXISTS "${wxSOURCE_DIR}/3rdparty/webview2")
    
    485
    -        set(wxUSE_WEBVIEW_EDGE_DEFAULT ON)
    
    486
    -    else()
    
    487
    -        set(wxUSE_WEBVIEW_EDGE_DEFAULT OFF)
    
    488
    -    endif()
    
    489 484
     
    
    490 485
         wx_option(wxUSE_ACCESSIBILITY "enable accessibility support")
    
    491 486
         wx_option(wxUSE_ACTIVEX " enable wxActiveXContainer class (Win32 only)")
    
    ... ... @@ -497,7 +492,7 @@ if(WIN32)
    497 492
         wx_option(wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW "use PS printing in wxMSW (Win32 only)")
    
    498 493
         wx_option(wxUSE_TASKBARICON_BALLOONS "enable wxTaskBarIcon::ShowBalloon() method (Win32 only)")
    
    499 494
         wx_option(wxUSE_UXTHEME "enable support for Windows XP themed look (Win32 only)")
    
    500
    -    wx_option(wxUSE_WEBVIEW_EDGE "use wxWebView Edge (Chromium) backend (Windows only)" ${wxUSE_WEBVIEW_EDGE_DEFAULT})
    
    495
    +    wx_option(wxUSE_WEBVIEW_EDGE "use wxWebView Edge (Chromium) backend (Windows only)")
    
    501 496
         wx_option(wxUSE_WEBVIEW_EDGE_STATIC "use wxWebView Edge with static loader" OFF)
    
    502 497
         wx_option(wxUSE_WEBVIEW_IE "use wxWebView IE backend (Win32 only)")
    
    503 498
         wx_option(wxUSE_WINRT "enable WinRT support" ${wxUSE_WINRT_DEFAULT})
    

  • build/cmake/wxWidgetsConfig.cmake.in
    ... ... @@ -139,6 +139,12 @@ foreach(libname @wxLIB_TARGETS@)
    139 139
         endif()
    
    140 140
     endforeach()
    
    141 141
     
    
    142
    +if(TARGET wx::wxnet AND @wxUSE_WEBREQUEST_CURL@)
    
    143
    +    # make sure CURL targets are available:
    
    144
    +    # The link interface of target "wx::wxnet" contains: CURL::libcurl_shared
    
    145
    +    find_package(CURL QUIET)
    
    146
    +endif()
    
    147
    +
    
    142 148
     if(TARGET wx::wxgl)
    
    143 149
         # make sure OpenGL targets are available:
    
    144 150
         # The link interface of target "wx::wxgl" contains: OpenGL::GLU
    

  • docs/changes.txt
    ... ... @@ -281,6 +281,7 @@ All:
    281 281
     - Fix wxWebResponse::GetMimeType(), add GetContentType() (Blake-Madden, #23461).
    
    282 282
     - Improve locale matching algorithm (Ulrich Telle, #24855)
    
    283 283
     - Make wxLogXXX(string) safe to use (#25414).
    
    284
    +- Make wxPlatformInfo::Get() thread-safe (#25459).
    
    284 285
     - Make wxString {To,From}CDouble() faster and more robust (#23287).
    
    285 286
     - Make wxrc-generated code faster to build (DoctorNoobingstoneIPresume, #24579).
    
    286 287
     - Multiple headers with same name in wxWebRequest (Stefan Dinkelacker, #24878).
    
    ... ... @@ -290,10 +291,10 @@ All:
    290 291
     - Preserve errno in wxString methods (Lauri Nurmi, #23113).
    
    291 292
     - Support constructing wxString from std::string_view (Ian McInerney, #23711).
    
    292 293
     - Update 3rd party libraries to latest versions (Maarten Bent, #25112, #25325).
    
    293
    -- Update translations for Corsican (Patriccollu, #25420), Czech (PB, #25412),
    
    294
    -  French (#25400), German (tstkr), Romanian (Cătălin Răceanu, #25403),
    
    295
    -  Simplified Chinese (0tkl, #25450), Turkish (Kerim Demirkaynak, #25267) and
    
    296
    -  Ukrainian (Yuri Chornoivan, #25410).
    
    294
    +- Update translations for Brazilian Portuguese (Felipe), Corsican (Patriccollu,
    
    295
    +  #25420), Czech (PB, #25412), French (#25400), German (tstkr),
    
    296
    +  Romanian (Cătălin Răceanu, #25403), Simplified Chinese (0tkl, #25450),
    
    297
    +  Turkish (Kerim Demirkaynak, #25267) and Ukrainian (Yuri Chornoivan, #25410).
    
    297 298
     - Update language database (Ulrich Telle, #23437).
    
    298 299
     - Use UTF-8 for environment variables (#25101).
    
    299 300
     - Use variadic templates for vararg functions (#22981).
    
    ... ... @@ -344,6 +345,7 @@ All (GUI):
    344 345
     - Make wxGenericValidator more flexible (Bill Su, #24134).
    
    345 346
     - Make wxGrid::ProcessTableMessage() more convenient to use (Joachim Wiesemann).
    
    346 347
     - Provide reason for wxNotificationMessage dismissal (Lauri Nurmi, #24340).
    
    348
    +- Respect menu path style in wxFileHistory::AddFilesToMenu() (Bill Su, #25451).
    
    347 349
     - Restore non-live-resize in wxAUI and wxSplitterWindow (AliKet, #24193).
    
    348 350
     - Save/restore wxAuiNotebook layout (#24950).
    
    349 351
     - Several fixes to scrolling in wxVListBox (Bill Su, #24278).
    

  • docs/doxygen/overviews/cmake.md
    ... ... @@ -134,8 +134,8 @@ target_link_libraries(myapp ${wxWidgets_LIBRARIES})
    134 134
     Using a sub directory                  {#cmake_subdir}
    
    135 135
     ---------------------
    
    136 136
     You can use wxWidgets as a subdirectory in your application's build tree
    
    137
    -e.g. as a git submodule. This way the wxWidgets libraries will be part
    
    138
    -of your applications build process.
    
    137
    +(e.g., as a git submodule). This way the wxWidgets libraries will be part
    
    138
    +of your application's build process.
    
    139 139
     
    
    140 140
     Your *CMakeLists.txt* would look like this:
    
    141 141
     ~~~
    
    ... ... @@ -153,6 +153,25 @@ set(wxBUILD_SHARED OFF)
    153 153
     ~~~~
    
    154 154
     to your *CMakeLists.txt* if you want to always use static wxWidgets libraries.
    
    155 155
     
    
    156
    +Using an out-of-tree directory         {#cmake_outerdir}
    
    157
    +---------------------
    
    158
    +Likewise, wxWidgets can also be outside of your project, but still be part
    
    159
    +of your application's build process. To do this, you will need to provide a
    
    160
    +build directory argument to `add_subdirectory()`.
    
    161
    +This will tell CMake where to place wxWidget's build files.
    
    162
    +
    
    163
    +For example, if wxWidgets is one folder up from your project:
    
    164
    +~~~
    
    165
    +...
    
    166
    +add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/../wxWidgets"
    
    167
    +                 "${CMAKE_CURRENT_SOURCE_DIR}/wxWidgets_lib")
    
    168
    +add_executable(myapp myapp.cpp)
    
    169
    +target_link_libraries(myapp wx::net wx::core wx::base)
    
    170
    +~~~
    
    171
    +
    
    172
    +This can be useful if you have multiple projects using wxWidgets.
    
    173
    +This way, you can place wxWidgets side-by-side with your other projects and
    
    174
    +have their CMake scripts all point to the same wxWidgets folder.
    
    156 175
     
    
    157 176
     Using XRC
    
    158 177
     ---------
    

  • interface/wx/platinfo.h
    ... ... @@ -270,6 +270,11 @@ public:
    270 270
         /**
    
    271 271
             Returns the global wxPlatformInfo object, initialized with the values
    
    272 272
             for the currently running platform.
    
    273
    +
    
    274
    +        Note that this function is thread-safe, i.e. it can be called
    
    275
    +        concurrently from multiple threads without locking (unless wxWidgets
    
    276
    +        was compiled without threads support, i.e. with @c wxUSE_THREADS
    
    277
    +        changed to be 0).
    
    273 278
         */
    
    274 279
         static const wxPlatformInfo& Get();
    
    275 280
     
    

  • locale/pt_BR.po
    ... ... @@ -4,10 +4,10 @@
    4 4
     # translation of pt_BR.po to
    
    5 5
     msgid ""
    
    6 6
     msgstr ""
    
    7
    -"Project-Id-Version: wxWidgets 3.3.2.1\n"
    
    7
    +"Project-Id-Version: wxWidgets 3.2.8.1\n"
    
    8 8
     "Report-Msgid-Bugs-To: \n"
    
    9 9
     "POT-Creation-Date: 2025-05-14 20:23+0200\n"
    
    10
    -"PO-Revision-Date: 2023-03-27 12:18-0300\n"
    
    10
    +"PO-Revision-Date: 2025-05-28 18:23-0300\n"
    
    11 11
     "Last-Translator: Felipe <felip...@gmail.com>\n"
    
    12 12
     "Language-Team: Felipe <felip...@gmail.com>\n"
    
    13 13
     "Language: pt_BR\n"
    
    ... ... @@ -15,7 +15,7 @@ msgstr ""
    15 15
     "Content-Type: text/plain; charset=UTF-8\n"
    
    16 16
     "Content-Transfer-Encoding: 8bit\n"
    
    17 17
     "Plural-Forms: nplurals=2; plural=n > 1;\n"
    
    18
    -"X-Generator: Poedit 3.2.2\n"
    
    18
    +"X-Generator: Poedit 3.6\n"
    
    19 19
     "X-Poedit-SourceCharset: UTF-8\n"
    
    20 20
     
    
    21 21
     #: ../include/wx/defs.h:2582
    
    ... ... @@ -718,7 +718,8 @@ msgid "SPECIAL"
    718 718
     msgstr "ESPECIAL"
    
    719 719
     
    
    720 720
     #: ../src/common/accelcmn.cpp:373
    
    721
    -#, fuzzy
    
    721
    +#| msgctxt "keyboard key"
    
    722
    +#| msgid "Ctrl"
    
    722 723
     msgid "Ctrl"
    
    723 724
     msgstr "Ctrl"
    
    724 725
     
    
    ... ... @@ -1318,26 +1319,25 @@ msgid ""
    1318 1319
     " and additionally, the existing configuration file was renamed to \"%s\" and "
    
    1319 1320
     "couldn't be renamed back, please rename it to its original path \"%s\""
    
    1320 1321
     msgstr ""
    
    1322
    +" E adicionalmente, o arquivo de configuração existente foi renomeado pra "
    
    1323
    +"\"%s\" e não pôde ser renomeado de novo, por favor renomeie-o pro seu "
    
    1324
    +"caminho original \"%s\""
    
    1321 1325
     
    
    1322 1326
     #: ../src/common/fileconf.cpp:389
    
    1323
    -#, fuzzy
    
    1324 1327
     msgid " due to the following error:\n"
    
    1325
    -msgstr "E inclui os seguintes arquivos:\n"
    
    1328
    +msgstr " devido ao seguinte erro:\n"
    
    1326 1329
     
    
    1327 1330
     #: ../src/common/fileconf.cpp:412
    
    1328
    -#, fuzzy
    
    1329 1331
     msgid "failed to rename the existing file"
    
    1330
    -msgstr "Falhou em ler o arquivo do texto \"%s\"."
    
    1332
    +msgstr "Falhou em renomear o arquivo existente"
    
    1331 1333
     
    
    1332 1334
     #: ../src/common/fileconf.cpp:421
    
    1333
    -#, fuzzy
    
    1334 1335
     msgid "failed to create the new file directory"
    
    1335
    -msgstr "Falhou em obter o diretório de trabalho"
    
    1336
    +msgstr "Falhou em criar o novo diretório do arquivo"
    
    1336 1337
     
    
    1337 1338
     #: ../src/common/fileconf.cpp:428
    
    1338
    -#, fuzzy
    
    1339 1339
     msgid "failed to move the file to the new location"
    
    1340
    -msgstr "Falhou em definir a visualização da web como nível da emulação moderna"
    
    1340
    +msgstr "Falhou em mover o arquivo para o novo local"
    
    1341 1341
     
    
    1342 1342
     #: ../src/common/fileconf.cpp:462
    
    1343 1343
     #, c-format
    
    ... ... @@ -1395,9 +1395,8 @@ msgid "Config entry name cannot start with '%c'."
    1395 1395
     msgstr "O nome da entrada da config não pode iniciar com '%c'."
    
    1396 1396
     
    
    1397 1397
     #: ../src/common/fileconf.cpp:1146
    
    1398
    -#, fuzzy
    
    1399 1398
     msgid "Failed to create configuration file directory."
    
    1400
    -msgstr "Falhou em criar o objeto da configuração da fonte."
    
    1399
    +msgstr "Falhou em criar o diretório do arquivo de configuração."
    
    1401 1400
     
    
    1402 1401
     #: ../src/common/fileconf.cpp:1158
    
    1403 1402
     msgid "can't open user configuration file."
    
    ... ... @@ -2215,7 +2214,7 @@ msgstr ""
    2215 2214
     #: ../src/common/imagbmp.cpp:1180
    
    2216 2215
     #, c-format
    
    2217 2216
     msgid "BMP Header: Invalid number of colors (%d)."
    
    2218
    -msgstr ""
    
    2217
    +msgstr "Cabeçalho BMP: número inválido de cores (%d)."
    
    2219 2218
     
    
    2220 2219
     #: ../src/common/imagbmp.cpp:1273
    
    2221 2220
     msgid "Error in reading image DIB."
    
    ... ... @@ -2452,43 +2451,40 @@ msgid "TIFF: Error writing image."
    2452 2451
     msgstr "TIFF: Erro ao gravar a imagem."
    
    2453 2452
     
    
    2454 2453
     #: ../src/common/imagtiff.cpp:881
    
    2455
    -#, fuzzy
    
    2456 2454
     msgid "TIFF: Error flushing data."
    
    2457
    -msgstr "TIFF: Erro ao salvar a imagem."
    
    2455
    +msgstr "TIFF: Erro ao limpar os dados."
    
    2458 2456
     
    
    2459 2457
     #: ../src/common/imagwebp.cpp:56
    
    2460 2458
     msgid "WebP: Invalid data (failed to get features)."
    
    2461
    -msgstr ""
    
    2459
    +msgstr "WebP: Dados inválidos (falhou em obter recursos)."
    
    2462 2460
     
    
    2463 2461
     #: ../src/common/imagwebp.cpp:65
    
    2464 2462
     msgid "WebP: Allocating image memory failed."
    
    2465
    -msgstr ""
    
    2463
    +msgstr "WebP: Falhou em alocar a memória da imagem."
    
    2466 2464
     
    
    2467 2465
     #: ../src/common/imagwebp.cpp:82
    
    2468 2466
     msgid "WebP: Decoding RGBA image data failed."
    
    2469
    -msgstr ""
    
    2467
    +msgstr "WebP: Falhou em decodificar os dados da imagem RGBA."
    
    2470 2468
     
    
    2471 2469
     #: ../src/common/imagwebp.cpp:98
    
    2472 2470
     msgid "WebP: Decoding RGB image data failed."
    
    2473
    -msgstr ""
    
    2471
    +msgstr "WebP: Falhou em decodificar os dados da imagem RGB."
    
    2474 2472
     
    
    2475 2473
     #: ../src/common/imagwebp.cpp:113 ../src/common/imagwebp.cpp:201
    
    2476 2474
     msgid "WebP: Allocating stream buffer failed."
    
    2477
    -msgstr ""
    
    2475
    +msgstr "WebP: Falhou em alocar o buffer do fluxo."
    
    2478 2476
     
    
    2479 2477
     #: ../src/common/imagwebp.cpp:131
    
    2480
    -#, fuzzy
    
    2481 2478
     msgid "WebP: Failed to parse container data."
    
    2482
    -msgstr "Falhou em definir os dados da área de transferência."
    
    2479
    +msgstr "WebP: Falhou em analisar os dados do contêiner."
    
    2483 2480
     
    
    2484 2481
     #: ../src/common/imagwebp.cpp:222
    
    2485
    -#, fuzzy
    
    2486 2482
     msgid "WebP: Error decoding animation."
    
    2487
    -msgstr "Erro ao ler as opções da config."
    
    2483
    +msgstr "WebP: Erro ao decodificar a animação."
    
    2488 2484
     
    
    2489 2485
     #: ../src/common/imagwebp.cpp:240
    
    2490 2486
     msgid "WebP: Error getting next animation frame."
    
    2491
    -msgstr ""
    
    2487
    +msgstr "WebP: Erro ao obter o próximo frame de animação."
    
    2492 2488
     
    
    2493 2489
     #: ../src/common/init.cpp:172
    
    2494 2490
     #, c-format
    
    ... ... @@ -3970,15 +3966,17 @@ msgid "Error: %s (%d)"
    3970 3966
     msgstr "Erro: %s (%d)"
    
    3971 3967
     
    
    3972 3968
     #: ../src/common/webrequest.cpp:655
    
    3973
    -#, fuzzy, c-format
    
    3969
    +#, c-format
    
    3974 3970
     msgid ""
    
    3975 3971
     "Not enough free disk space for download: %llu needed but only %llu available."
    
    3976
    -msgstr "Não há espaço o bastante no disco pro download."
    
    3972
    +msgstr ""
    
    3973
    +"Não há espaço livre no disco o bastante pro download: %llu necessários mas "
    
    3974
    +"só %llu disponíveis."
    
    3977 3975
     
    
    3978 3976
     #: ../src/common/webrequest.cpp:669
    
    3979
    -#, fuzzy, c-format
    
    3977
    +#, c-format
    
    3980 3978
     msgid "Failed to create temporary file in %s"
    
    3981
    -msgstr "Falhou em criar um nome de arquivo temporário"
    
    3979
    +msgstr "Falhou em criar um arquivo temporário no %s"
    
    3982 3980
     
    
    3983 3981
     #: ../src/common/webrequest_curl.cpp:1106
    
    3984 3982
     msgid "libcurl could not be initialized"
    
    ... ... @@ -3994,33 +3992,34 @@ msgid "Error running JavaScript: %s"
    3994 3992
     msgstr "Erro ao executar o JavaScript: %s"
    
    3995 3993
     
    
    3996 3994
     #: ../src/common/webview_chromium.cpp:858
    
    3997
    -#, fuzzy, c-format
    
    3995
    +#, c-format
    
    3998 3996
     msgid "Failed to set proxy \"%s\": %s"
    
    3999
    -msgstr "Falhou em criar o diretório \"%s\""
    
    3997
    +msgstr "Falhou em definir o proxy \"%s\": %s"
    
    4000 3998
     
    
    4001 3999
     #: ../src/common/webview_chromium.cpp:989
    
    4002 4000
     msgid ""
    
    4003 4001
     "Chromium can't be used because libcef.so wasn't loaded early enough; please "
    
    4004 4002
     "relink the application or use LD_PRELOAD to load it earlier."
    
    4005 4003
     msgstr ""
    
    4004
    +"O Chromium não pôde ser usado porque o libcef.so não foi carregado cedo o "
    
    4005
    +"bastante; por favor vincule o aplicativo de novo ou use o LD_PRELOAD pra "
    
    4006
    +"carregá-lo mais cedo."
    
    4006 4007
     
    
    4007 4008
     #: ../src/common/webview_chromium.cpp:1108
    
    4008
    -#, fuzzy
    
    4009 4009
     msgid "Could not initialize Chromium"
    
    4010
    -msgstr "Não pôde inicializar o libnotify."
    
    4010
    +msgstr "Não pôde inicializar o Chromium"
    
    4011 4011
     
    
    4012 4012
     #: ../src/common/webview_chromium.cpp:1616
    
    4013 4013
     msgid "Show DevTools"
    
    4014
    -msgstr ""
    
    4014
    +msgstr "Mostrar DevTools"
    
    4015 4015
     
    
    4016 4016
     #: ../src/common/webview_chromium.cpp:1617
    
    4017
    -#, fuzzy
    
    4018 4017
     msgid "Close DevTools"
    
    4019
    -msgstr "Fechar Tudo"
    
    4018
    +msgstr "Fechar DevTools"
    
    4020 4019
     
    
    4021 4020
     #: ../src/common/webview_chromium.cpp:1623
    
    4022 4021
     msgid "Inspect"
    
    4023
    -msgstr ""
    
    4022
    +msgstr "Inspecionar"
    
    4024 4023
     
    
    4025 4024
     #: ../src/common/wincmn.cpp:1628
    
    4026 4025
     msgid "This platform does not support background transparency."
    
    ... ... @@ -4424,11 +4423,12 @@ msgstr "Direita"
    4424 4423
     msgid ""
    
    4425 4424
     "\"%s\" is not in the expected date format, please enter it as e.g. \"%s\"."
    
    4426 4425
     msgstr ""
    
    4426
    +"O \"%s\" não está no formato de data esperado, por favor insira-o como no "
    
    4427
    +"ex: \"%s\"."
    
    4427 4428
     
    
    4428 4429
     #: ../src/generic/datectlg.cpp:94
    
    4429
    -#, fuzzy
    
    4430 4430
     msgid "Invalid date"
    
    4431
    -msgstr "Item de visualização dos dados inválido"
    
    4431
    +msgstr "Data inválida"
    
    4432 4432
     
    
    4433 4433
     #: ../src/generic/dbgrptg.cpp:159
    
    4434 4434
     #, c-format
    
    ... ... @@ -4845,36 +4845,37 @@ msgid ""
    4845 4845
     "Error copying grid to the clipboard. Either selected cells were not "
    
    4846 4846
     "contiguous or no cell was selected."
    
    4847 4847
     msgstr ""
    
    4848
    +"Erro ao copiar a grade para a área de transferência. Ou as células "
    
    4849
    +"selecionadas não eram contíguas ou nenhuma célula foi selecionada."
    
    4848 4850
     
    
    4849 4851
     #: ../src/generic/grid.cpp:12739
    
    4850
    -#, fuzzy
    
    4851 4852
     msgid "Grid Corner"
    
    4852
    -msgstr "Canto"
    
    4853
    +msgstr "Canto da Grade"
    
    4853 4854
     
    
    4854 4855
     #: ../src/generic/grid.cpp:12741
    
    4855
    -#, fuzzy, c-format
    
    4856
    +#, c-format
    
    4856 4857
     msgid "Column %s Header"
    
    4857
    -msgstr "Coluna %u"
    
    4858
    +msgstr "Coluna %s Cabeçalho"
    
    4858 4859
     
    
    4859 4860
     #: ../src/generic/grid.cpp:12743
    
    4860 4861
     #, c-format
    
    4861 4862
     msgid "Row %s Header"
    
    4862
    -msgstr ""
    
    4863
    +msgstr "Linha %s cabeçalho"
    
    4863 4864
     
    
    4864 4865
     #: ../src/generic/grid.cpp:12745
    
    4865
    -#, fuzzy, c-format
    
    4866
    +#, c-format
    
    4866 4867
     msgid "Column %s: %s"
    
    4867
    -msgstr "Coluna %u"
    
    4868
    +msgstr "Coluna %s: %s"
    
    4868 4869
     
    
    4869 4870
     #: ../src/generic/grid.cpp:12749
    
    4870
    -#, fuzzy, c-format
    
    4871
    +#, c-format
    
    4871 4872
     msgid "Row %s: %s"
    
    4872
    -msgstr "\t%s: %s\n"
    
    4873
    +msgstr "Linha %s: %s"
    
    4873 4874
     
    
    4874 4875
     #: ../src/generic/grid.cpp:12753
    
    4875 4876
     #, c-format
    
    4876 4877
     msgid "Row %s, Column %s: %s"
    
    4877
    -msgstr ""
    
    4878
    +msgstr "Linha %s, Coluna %s: %s"
    
    4878 4879
     
    
    4879 4880
     #: ../src/generic/helpext.cpp:257
    
    4880 4881
     #, c-format
    
    ... ... @@ -5266,40 +5267,39 @@ msgid "MDI child"
    5266 5267
     msgstr "Filho do MDI"
    
    5267 5268
     
    
    5268 5269
     #: ../src/gtk/power.cpp:188
    
    5269
    -#, fuzzy, c-format
    
    5270
    +#, c-format
    
    5270 5271
     msgid "Failed to open D-Bus connection to the login manager: %s"
    
    5271
    -msgstr "Falhou em conectar ao gerenciador da sessão: %s"
    
    5272
    +msgstr "Falhou em abrir a conexão D-Bus com o gerenciador de login: %s"
    
    5272 5273
     
    
    5273 5274
     #: ../src/gtk/power.cpp:214
    
    5274
    -#, fuzzy
    
    5275 5275
     msgid "wxWidgets application"
    
    5276
    -msgstr "Esconder Aplicativo"
    
    5276
    +msgstr "Aplicativo do wxWidgets"
    
    5277 5277
     
    
    5278 5278
     #: ../src/gtk/power.cpp:226
    
    5279 5279
     msgid "Application needs to keep running"
    
    5280
    -msgstr ""
    
    5280
    +msgstr "O aplicativo precisa continuar executando"
    
    5281 5281
     
    
    5282 5282
     #: ../src/gtk/power.cpp:233
    
    5283 5283
     msgid "Clean up before suspend"
    
    5284
    -msgstr ""
    
    5284
    +msgstr "Limpar antes de suspender"
    
    5285 5285
     
    
    5286 5286
     #: ../src/gtk/power.cpp:259
    
    5287
    -#, fuzzy, c-format
    
    5287
    +#, c-format
    
    5288 5288
     msgid "Failed to inhibit sleep: %s"
    
    5289
    -msgstr "Falhou em iniciar a conexão dial-up: %s"
    
    5289
    +msgstr "Falhou em inibir a suspensão: %s"
    
    5290 5290
     
    
    5291 5291
     #: ../src/gtk/power.cpp:265
    
    5292 5292
     msgid "Unexpected response to D-Bus \"Inhibit\" request."
    
    5293
    -msgstr ""
    
    5293
    +msgstr "Resposta inesperada a requisição de \"Inibição\" do D-Bus."
    
    5294 5294
     
    
    5295 5295
     #: ../src/gtk/print.cpp:218
    
    5296 5296
     msgid "Custom size"
    
    5297 5297
     msgstr "Tamanho personalizado"
    
    5298 5298
     
    
    5299 5299
     #: ../src/gtk/print.cpp:752
    
    5300
    -#, fuzzy, c-format
    
    5300
    +#, c-format
    
    5301 5301
     msgid "Error while printing: %s"
    
    5302
    -msgstr "Erro enquanto imprimia: "
    
    5302
    +msgstr "Erro enquanto imprimia: %s"
    
    5303 5303
     
    
    5304 5304
     #: ../src/gtk/print.cpp:816
    
    5305 5305
     msgid "Page Setup"
    
    ... ... @@ -5315,10 +5315,13 @@ msgstr ""
    5315 5315
     msgid ""
    
    5316 5316
     "Setting proxy is not supported by WebKit, at least version 2.16 is required."
    
    5317 5317
     msgstr ""
    
    5318
    +"A configuração do proxy não é suportada pelo WebKit, pelo menos a versão "
    
    5319
    +"2.16 é requerida."
    
    5318 5320
     
    
    5319 5321
     #: ../src/gtk/webview_webkit2.cpp:1104
    
    5320 5322
     msgid "This program was compiled without support for setting WebKit proxy."
    
    5321 5323
     msgstr ""
    
    5324
    +"Este programa foi compilado sem suporte pra configuração do proxy do WebKit."
    
    5322 5325
     
    
    5323 5326
     #: ../src/gtk/window.cpp:6289
    
    5324 5327
     msgid ""
    
    ... ... @@ -5719,9 +5722,9 @@ msgstr ": o arquivo não existe!"
    5719 5722
     
    
    5720 5723
     #. TRANSLATORS: %s may be a document title.
    
    5721 5724
     #: ../src/html/htmprint.cpp:717
    
    5722
    -#, fuzzy, c-format
    
    5725
    +#, c-format
    
    5723 5726
     msgid "%s Preview"
    
    5724
    -msgstr " Pré-visualizar"
    
    5727
    +msgstr "%s Pré-visualização"
    
    5725 5728
     
    
    5726 5729
     #: ../src/html/htmprint.cpp:755 ../src/richtext/richtextprint.cpp:618
    
    5727 5730
     msgid ""
    
    ... ... @@ -6030,10 +6033,12 @@ msgstr "Falhou em criar o diálogo achar/substituir padrão (código do erro %d)
    6030 6033
     #: ../src/msw/filedlg.cpp:1241
    
    6031 6034
     msgid "Access to the file system is not allowed from secure desktop."
    
    6032 6035
     msgstr ""
    
    6036
    +"O acesso ao sistema de arquivos não é permitido a partir da área de trabalho "
    
    6037
    +"segura."
    
    6033 6038
     
    
    6034 6039
     #: ../src/msw/filedlg.cpp:1242
    
    6035 6040
     msgid "Security warning"
    
    6036
    -msgstr ""
    
    6041
    +msgstr "Aviso de segurança"
    
    6037 6042
     
    
    6038 6043
     #: ../src/msw/filedlg.cpp:1533
    
    6039 6044
     #, c-format
    
    ... ... @@ -6509,6 +6514,7 @@ msgstr "Não consegue carregar o ícone do '%s'."
    6509 6514
     #: ../src/msw/webview_edge.cpp:285
    
    6510 6515
     msgid "This program was compiled without support for setting Edge proxy."
    
    6511 6516
     msgstr ""
    
    6517
    +"Este programa foi compilado sem suporte pra configuração de proxy do Edge."
    
    6512 6518
     
    
    6513 6519
     #: ../src/msw/webview_ie.cpp:1010
    
    6514 6520
     msgid "Failed to find web view emulation level in the registry"
    
    ... ... @@ -7099,7 +7105,7 @@ msgstr "Escolha um arquivo"
    7099 7105
     
    
    7100 7106
     #: ../src/qt/mdi.cpp:254
    
    7101 7107
     msgid "&Tile"
    
    7102
    -msgstr ""
    
    7108
    +msgstr "&Mosaico"
    
    7103 7109
     
    
    7104 7110
     #: ../src/richtext/richtextbackgroundpage.cpp:147
    
    7105 7111
     #: ../src/richtext/richtextformatdlg.cpp:376
    
    ... ... @@ -9323,9 +9329,9 @@ msgid "XML parsing error: '%s' at line %d"
    9323 9329
     msgstr "Erro de análise do XML: '%s' na linha %d"
    
    9324 9330
     
    
    9325 9331
     #: ../src/xrc/xh_propgrid.cpp:239
    
    9326
    -#, fuzzy, c-format
    
    9332
    +#, c-format
    
    9327 9333
     msgid "Page %i"
    
    9328
    -msgstr "Página %d"
    
    9334
    +msgstr "Página %i"
    
    9329 9335
     
    
    9330 9336
     #: ../src/xrc/xmlres.cpp:448
    
    9331 9337
     #, c-format
    
    ... ... @@ -9347,10 +9353,6 @@ msgstr "Não consegue carregar os recursos do arquivo '%s'."
    9347 9353
     msgid "Creating %s \"%s\" failed."
    
    9348 9354
     msgstr "Falhou em criar %s \"%s\"."
    
    9349 9355
     
    
    9350
    -#, c-format
    
    9351
    -#~ msgid "BMP: header has biClrUsed=%d when biBitCount=%d."
    
    9352
    -#~ msgstr "BMP: o cabeçalho tem biClrUsed=%d quando o biBitCount=%d."
    
    9353
    -
    
    9354 9356
     #~ msgctxt "keyboard key"
    
    9355 9357
     #~ msgid "Alt+"
    
    9356 9358
     #~ msgstr "Alt+"
    
    ... ... @@ -9367,6 +9369,30 @@ msgstr "Falhou em criar %s \"%s\"."
    9367 9369
     #~ msgid "RawCtrl+"
    
    9368 9370
     #~ msgstr "RawCtrl+"
    
    9369 9371
     
    
    9372
    +#, c-format
    
    9373
    +#~ msgid "BMP: header has biClrUsed=%d when biBitCount=%d."
    
    9374
    +#~ msgstr "BMP: o cabeçalho tem biClrUsed=%d quando o biBitCount=%d."
    
    9375
    +
    
    9376
    +#~| msgid "ctrl"
    
    9377
    +#~ msgctxt "keyboard key"
    
    9378
    +#~ msgid "ctrl"
    
    9379
    +#~ msgstr "ctrl"
    
    9380
    +
    
    9381
    +#~| msgid "alt"
    
    9382
    +#~ msgctxt "keyboard key"
    
    9383
    +#~ msgid "alt"
    
    9384
    +#~ msgstr "alt"
    
    9385
    +
    
    9386
    +#~| msgid "shift"
    
    9387
    +#~ msgctxt "keyboard key"
    
    9388
    +#~ msgid "shift"
    
    9389
    +#~ msgstr "shift"
    
    9390
    +
    
    9391
    +#~| msgid "rawctrl"
    
    9392
    +#~ msgctxt "keyboard key"
    
    9393
    +#~ msgid "rawctrl"
    
    9394
    +#~ msgstr "rawctrl"
    
    9395
    +
    
    9370 9396
     #~ msgid "Copying more than one selected block to clipboard is not supported."
    
    9371 9397
     #~ msgstr ""
    
    9372 9398
     #~ "Não é suportado copiar mais do que um bloco selecionado pra área de "
    

  • src/common/filehistorycmn.cpp
    ... ... @@ -41,10 +41,36 @@ namespace
    41 41
     // return the string used for the MRU list items in the menu
    
    42 42
     //
    
    43 43
     // NB: the index n is 0-based, as usual, but the strings start from 1
    
    44
    -wxString GetMRUEntryLabel(int n, const wxString& path)
    
    44
    +wxString
    
    45
    +GetMRUEntryLabel(int n,
    
    46
    +                 const wxString& path,
    
    47
    +                 wxFileHistoryMenuPathStyle style,
    
    48
    +                 const wxString& firstPath)
    
    45 49
     {
    
    50
    +    const wxFileName currFn(path);
    
    51
    +
    
    52
    +    wxString pathInMenu;
    
    53
    +    switch ( style )
    
    54
    +    {
    
    55
    +        case wxFH_PATH_SHOW_IF_DIFFERENT:
    
    56
    +            if ( currFn.HasName() && currFn.GetPath() == firstPath )
    
    57
    +                pathInMenu = currFn.GetFullName();
    
    58
    +            else
    
    59
    +                pathInMenu = currFn.GetFullPath();
    
    60
    +            break;
    
    61
    +
    
    62
    +        case wxFH_PATH_SHOW_NEVER:
    
    63
    +            // Only show the filename + extension and not the path.
    
    64
    +            pathInMenu = currFn.GetFullName();
    
    65
    +            break;
    
    66
    +
    
    67
    +        case wxFH_PATH_SHOW_ALWAYS:
    
    68
    +            // Always show full path.
    
    69
    +            pathInMenu = currFn.GetFullPath();
    
    70
    +            break;
    
    71
    +    }
    
    72
    +
    
    46 73
         // we need to quote '&' characters which are used for mnemonics
    
    47
    -    wxString pathInMenu(path);
    
    48 74
         pathInMenu.Replace("&", "&&");
    
    49 75
     
    
    50 76
     #ifdef __WXMSW__
    
    ... ... @@ -153,36 +179,15 @@ void wxFileHistoryBase::DoRefreshLabels()
    153 179
         // Update the labels in all menus
    
    154 180
         for ( size_t i = 0; i < numFiles; i++ )
    
    155 181
         {
    
    156
    -        const wxFileName currFn(m_fileHistory[i]);
    
    157
    -
    
    158
    -        wxString pathInMenu;
    
    159
    -        switch ( m_menuPathStyle )
    
    160
    -        {
    
    161
    -            case wxFH_PATH_SHOW_IF_DIFFERENT:
    
    162
    -                if ( currFn.HasName() && currFn.GetPath() == firstPath )
    
    163
    -                    pathInMenu = currFn.GetFullName();
    
    164
    -                else
    
    165
    -                    pathInMenu = currFn.GetFullPath();
    
    166
    -                break;
    
    167
    -
    
    168
    -            case wxFH_PATH_SHOW_NEVER:
    
    169
    -                // Only show the filename + extension and not the path.
    
    170
    -                pathInMenu = currFn.GetFullName();
    
    171
    -                break;
    
    172
    -
    
    173
    -            case wxFH_PATH_SHOW_ALWAYS:
    
    174
    -                // Always show full path.
    
    175
    -                pathInMenu = currFn.GetFullPath();
    
    176
    -                break;
    
    177
    -        }
    
    178
    -
    
    179 182
             for ( wxList::compatibility_iterator node = m_fileMenus.GetFirst();
    
    180 183
                   node;
    
    181 184
                   node = node->GetNext() )
    
    182 185
             {
    
    183 186
                 wxMenu * const menu = (wxMenu *)node->GetData();
    
    184 187
     
    
    185
    -            menu->SetLabel(m_idBase + i, GetMRUEntryLabel(i, pathInMenu));
    
    188
    +            menu->SetLabel(m_idBase + i, GetMRUEntryLabel(i, m_fileHistory[i],
    
    189
    +                                                          m_menuPathStyle,
    
    190
    +                                                          firstPath));
    
    186 191
             }
    
    187 192
         }
    
    188 193
     }
    
    ... ... @@ -206,6 +211,11 @@ void wxFileHistoryBase::RemoveFileFromHistory(size_t i)
    206 211
         m_fileHistory.RemoveAt(i);
    
    207 212
         numFiles--;
    
    208 213
     
    
    214
    +    // Remember the path in case we need to compare with it below.
    
    215
    +    const wxString firstPath = !m_fileHistory.empty()
    
    216
    +                                ? wxFileName(m_fileHistory[0]).GetPath()
    
    217
    +                                : wxString();
    
    218
    +
    
    209 219
         for ( wxList::compatibility_iterator node = m_fileMenus.GetFirst();
    
    210 220
               node;
    
    211 221
               node = node->GetNext() )
    
    ... ... @@ -215,7 +225,9 @@ void wxFileHistoryBase::RemoveFileFromHistory(size_t i)
    215 225
             // shift filenames up
    
    216 226
             for ( size_t j = i; j < numFiles; j++ )
    
    217 227
             {
    
    218
    -            menu->SetLabel(m_idBase + j, GetMRUEntryLabel(j, m_fileHistory[j]));
    
    228
    +            menu->SetLabel(m_idBase + j, GetMRUEntryLabel(j, m_fileHistory[j],
    
    229
    +                                                          m_menuPathStyle,
    
    230
    +                                                          firstPath));
    
    219 231
             }
    
    220 232
     
    
    221 233
             // delete the last menu item which is unused now
    
    ... ... @@ -310,9 +322,14 @@ void wxFileHistoryBase::AddFilesToMenu(wxMenu* menu)
    310 322
         if ( menu->GetMenuItemCount() )
    
    311 323
             menu->AppendSeparator();
    
    312 324
     
    
    325
    +    // Remember the path in case we need to compare with it below.
    
    326
    +    const wxString firstPath(wxFileName(m_fileHistory[0]).GetPath());
    
    327
    +
    
    313 328
         for ( size_t i = 0; i < m_fileHistory.GetCount(); i++ )
    
    314 329
         {
    
    315
    -        menu->Append(m_idBase + i, GetMRUEntryLabel(i, m_fileHistory[i]));
    
    330
    +        menu->Append(m_idBase + i, GetMRUEntryLabel(i, m_fileHistory[i],
    
    331
    +                                                    m_menuPathStyle,
    
    332
    +                                                    firstPath));
    
    316 333
         }
    
    317 334
     }
    
    318 335
     
    

  • src/common/platinfo.cpp
    ... ... @@ -33,11 +33,21 @@
    33 33
         #include "wx/versioninfo.h"
    
    34 34
     #endif
    
    35 35
     
    
    36
    +namespace
    
    37
    +{
    
    38
    +
    
    36 39
     // global object
    
    37 40
     // VERY IMPORTANT: do not use the default constructor since it would
    
    38 41
     //                 try to init the wxPlatformInfo instance using
    
    39 42
     //                 gs_platInfo itself!
    
    40
    -static wxPlatformInfo gs_platInfo(wxPORT_UNKNOWN);
    
    43
    +wxPlatformInfo gs_platInfo(wxPORT_UNKNOWN);
    
    44
    +
    
    45
    +#if wxUSE_THREADS
    
    46
    +// Critical section protecting gs_platInfo initialization.
    
    47
    +wxCriticalSection gs_csInit;
    
    48
    +#endif // wxUSE_THREADS
    
    49
    +
    
    50
    +} // anonymous namespace
    
    41 51
     
    
    42 52
     // ----------------------------------------------------------------------------
    
    43 53
     // constants
    
    ... ... @@ -215,12 +225,12 @@ void wxPlatformInfo::InitForCurrentPlatform()
    215 225
     /* static */
    
    216 226
     const wxPlatformInfo& wxPlatformInfo::Get()
    
    217 227
     {
    
    218
    -    static bool initialized = false;
    
    219
    -    if ( !initialized )
    
    220
    -    {
    
    228
    +#if wxUSE_THREADS
    
    229
    +    wxCriticalSectionLocker lockInit(gs_csInit);
    
    230
    +#endif // wxUSE_THREADS
    
    231
    +
    
    232
    +    if ( !gs_platInfo.m_initializedForCurrentPlatform )
    
    221 233
             gs_platInfo.InitForCurrentPlatform();
    
    222
    -        initialized = true;
    
    223
    -    }
    
    224 234
     
    
    225 235
         return gs_platInfo;
    
    226 236
     }
    

  • src/generic/infobar.cpp
    ... ... @@ -72,8 +72,7 @@ bool wxInfoBarGeneric::Create(wxWindow *parent, wxWindowID winid, long style)
    72 72
         // calling Hide() before Create() ensures that we're created initially
    
    73 73
         // hidden
    
    74 74
         Hide();
    
    75
    -    SetWindowStyle(style);
    
    76
    -    if ( !wxWindow::Create(parent, winid) )
    
    75
    +    if ( !wxWindow::Create(parent, winid, wxDefaultPosition, wxDefaultSize, style) )
    
    77 76
             return false;
    
    78 77
     
    
    79 78
         // use special, easy to notice, colours
    

Reply all
Reply to author
Forward
0 new messages