Commit Graph

50 Commits

Author SHA1 Message Date
Pete Batard fffd4d1160
[misc] harden usage of uprintf()
* Passing a non-formatting buffer as first parameter of uprintf() can lead
  to an exception if this buffer happens to contain a '%' character, so
  usage of uprintf() with string buffers that may contain '%' should be
  sanitized.
* Also drop the _uprintf/_uprintfs aliases as they are no longer required.
2023-04-20 17:43:24 +01:00
Pete Batard d78a556e4e
[loc] report if an external loc file is used, in the UI log
* Also avoid using LPTSTR in lieu of LPWSTR (even if they do resolve to the exact
  same thing) and force the use of app_dir when looking for a local .loc file.
* Closes #2193
2023-03-04 16:21:25 +00:00
Pete Batard 2d6a73e4f4
[checksum] enable toggling of SHA512 (Alt-H)
* Also fix overflow digest test into message length
* Also switch log font to Consolas
* Also update version to rufus-next
2020-06-25 11:58:56 +01:00
Tsarevich Dmitry 121257c584
[misc] fix PVS-Studio static analyzer warnings
* Surround macro params to ensure expected results
* Fix copy-paste errors
* Fix a potential buffer overflow in SetSectionHeaders()
* Add const modifier where relevant
* Use GetWindowLongPtr() everywhere
* Use proper sprintf format for unsigned int
* Use %s for printf-like funcs (https://www.viva64.com/en/w/v618/print/)
* Closes #1464
2020-02-28 17:08:11 +00:00
Pete Batard 645184f11e [ui] fix some unwanted display of LTR or RTL strings
* Some English messages could appear RTL in the log
* Folder paths with RTL strings could appear scrambled in the UI
2018-06-07 22:30:53 +01:00
Pete Batard c3aaa0c252 [loc] fix various RTL localization issues
With thanks to Itiel

* Fix a potential buffer overflow in lmprintf for RTL languages
* Automatically apply RLE/PDF to all RTL messages, and remove the RLE/PDFs from the .loc
* Fix Windows messing up of multiline RTL tooltips (The trick is, if you want actually
  want RTL, you need to *disable* RTL... Sure, Microsoft, that makes a lot of sense?!?)
* Also properly scale the length of the multiline tooltips according to the zoom factor
* Closes #1132
2018-05-18 00:55:35 +01:00
Pete Batard 42c158917c [ui] fix quick format not always being disabled for Large FAT32
* Also remove no longer needed 'progress_in_use' variable
2018-04-17 09:22:27 +02:00
Pete Batard 7fef3c6434 [ui] use our own custom bar with text
* Needed because native Windows produces obnoxious tearing on redrawing.
* Also rename global partition scheme variable back to 'pt'
* Also fix major and minor version numbers in the .rc
2018-04-16 17:05:23 +02:00
Pete Batard a44518355f [ui] UI redesign
* Better guide the user through the flow of operations
* Also follow a concept design by Fahad Al-Riyami
* Closes #117
2018-03-22 23:14:21 +00:00
Pete Batard 903ac993f2 [misc] remove no longer needed XP workarounds 2017-11-13 14:30:25 +00:00
Pete Batard bb00e220ac [ui] more info field fixes
* Prevent text selection and try to force a redraw, to ensure the text is centered on update
* Also update the libcdio 'AL' workaround
2017-07-26 11:47:02 +01:00
Pete Batard 93c2d7851e [ui] fix info box when downloading Syslinux/GRUB files
* Don't duplicate the PrintInfo() from DownloadFile()
* Make sure caret is disabled and displayed text will not appear selected
* Also update MSG_085 and remove unneeded MSG_240
2017-07-24 17:20:17 +01:00
Pete Batard 55b7d5c2da [misc] code cleanup
* Also fix WDK compilation issues
2017-04-25 20:25:50 +01:00
Pete Batard afec69c428 [ui] improve logging data
* Display the selected locate as well as LGP info in the log
* Also fix some potential Coverity warnings
2017-04-25 14:32:19 +01:00
Pete Batard b82462bb7d [ui] improve progress bar refresh
* Closes #699
2016-03-10 16:13:16 +00:00
Pete Batard 250d46e401 [core] use GetTickCount64() always where possible
* Damn you XP!!!
* Also some more code cleanup
2016-02-24 16:10:54 +00:00
Pete Batard 0e65b1c920 [ui] fix flickering of Status and Info fields
* Closes #634
2016-02-23 11:21:36 +00:00
Pete Batard 58755c1bc4 [loc] ensure that the log content is displayed LTR
* Part of #694
* This avoids weird interpretation of content from Windows' RTL logic
* Also fix a WDK compilation error
2016-02-15 23:02:02 +00:00
Pete Batard 140236acd6 [loc] display a note in the log when a translation is behind
* Also make sure the messages regarding language pack availability
  are visible to the users in the log
* Also fix a typo in the Malay translation
2016-02-15 12:50:06 +00:00
Pete Batard fb95409114 [misc] fix XP support... again
* Also add a close button to log dialog
* Also improve README.md
2015-10-23 22:31:23 +01:00
Pete Batard 621d1cae16 [misc] fix WDK compilation 2015-10-22 23:20:50 +01:00
Pete Batard 805d44a5b8 [loc] fix additional right-to-left issues
* Fix mishandling of spaces after period, comma, colon, etc.
* Fix Test/Alpha notifications not displaying properly in RTL mode
* Part of #621
2015-10-22 00:40:59 +01:00
Pete Batard e1f8b276c8 [loc] fix various RTL issues
* MSG_002 doesn't display in RTL
* Update Policy dialog loses RTL setting after the first paragraph
* Some text displayed in native Windows message boxes is not using RTL
 (even as the Message Box itself will display the rest of the UI elements as RTL)
* Detect if the relevant language pack is installed and use MessageBoxEx to
  display native message box buttons using the selected language.
* All theses issues are part of #621
* Also remove trailing whitespaces
2015-10-18 21:37:58 +01:00
Pete Batard fb09802c0f [ui] prompt users how they want to write ISOHybrid images
* Closes #543
* Also update localization messages and image analysis report
2015-08-22 15:21:48 +01:00
Pete Batard 485b016f17 [internal] use DialogIndirect to reduce the number of dialogs in the RC
* Since Microsoft forces our hand, we hack away into our compiled RC
  resources and change dialog attributes on the fly so that:
  - we can switch between LTR & RTL
  - change the font for Windows XP
* Note that the base RC font has been changed to "Segoe UI Symbols"
  so that it looks the same in the editor (at least for English) but
  can accommodate the length required for "MS Shell Dlg"
2015-07-04 18:27:15 +01:00
Pete Batard 14b8ab6a43 [ui] add a status bar button to initiate checksum computation
* Just click the "hash" sign to get a hash
* Also clean up status bar related functions
2015-06-30 23:22:10 +01:00
Pete Batard 821a9df1c8 [cmd] add -g option to disable the commandline hogger (rufus.com)
* This can be useful when launching Rufus from the commandline or a batch file with 'start /wait'
* Also fix a crash when specifying an unknown commandline option
* Also fix the commandline usage help
2015-02-22 01:14:00 +00:00
Pete Batard 7b0a5abab1 [loc] delete translations for the removed progress dialog 2015-01-24 02:30:42 +00:00
Pete Batard 032d4413c8 [togo] Add Windows To Go support - part 2
* Closes #126
* Only supported on Windows 8 or later for now
* Also fix MinGW and WDK compilation issues
2015-01-16 01:53:24 +00:00
Pete Batard 2e817ae944 [misc] pocketful of enhancement and fixes - part 1
* Add a cheat mode for VMWare disk detection
* Add a cheat mode to delete the rufus_files directory
* Don't attempt a grub2 download in case we couldn't read the version
* Don't use a shared message buffer between info and status and also
  use a more logical handling of low pri/high pri and timeout
* Also fix unwanted selection of info text on restore from minimize
* Also fix the localization generation and add more messages
2015-01-08 00:22:56 +00:00
Pete Batard a327bb114c [ui] Remove the separate progress dialog
* Closes #125
* Also provide more intuitive info for bad blocks check
* Also update Bled to latest to enable cancelling
2015-01-01 23:39:28 +00:00
Pete Batard 131df52482 [ui] fix unwanted behaviour when ISO is unsupported
* Remove "Scanning Image..." from status, and prevent the Start from being enabled when no drive is selected
* Closes #375
2014-10-31 19:06:05 +00:00
Pete Batard c85670f7b7 [core] report detected USB device speed
* Yes, it takes about all of the changes below, to basically add 3 extra characters in the log...
  That's Microsoft Windows for you, baby!
* Closes #314
2014-05-18 00:37:01 +01:00
Pete Batard 8ae158ba22 [loc] add support for right-to-left languages
* Closes #192
2014-01-24 02:46:06 +00:00
Pete Batard 24e73c5e10 [efi] set UEFI mode when a pure EFI ISO is selected
* Closes #168
* Also fix various VS Code Analysis warnings
2013-12-22 20:48:57 +00:00
Pete Batard 36693d2144 [core] detect memory cards in card readers
* Also remove drives with no media from the list
* Closes #18
2013-12-20 18:32:10 +00:00
Pete Batard 18c9df18b5 [loc] set log messages to use English locale
* This is done to ensure I can understand logs that are sent to me,
  even when a non English locale is used.
* Closes #188.
2013-12-19 23:56:40 +00:00
Pete Batard f3cf32f8d8 [loc] use a direct table for the messages
* More efficient and also the first step for addressing #188
2013-12-18 01:20:44 +00:00
Pete Batard fcf16fed25 [iso] update libcdio to latest
* Also remove MSG_176 from English version
* Also perform additional cleanup and remove a Clang warning
* Closes #224
2013-11-23 22:09:39 +00:00
Pete Batard aa0bf0ee2b [core] add HDD vs UFD detection
* Initial scoring to try to differentiate UFDs from HDDs (#219)
* Also improve GetDriveLetter() and add a global for fixed vs removable
* Also fix a bug with reporting of VID:PID with multiple devices
* Also fix a warning in localization
2013-11-14 01:21:50 +00:00
Mehmetali KURAN c6da7311b0 [loc] hash functions improvements
* Fix a leak when freeing the hash table (actual size is htab_size+1)
* Use a better hash algorithm
* Use a larger table with a size already set to a prime
2013-11-02 18:45:06 +00:00
Pete Batard c544429606 [loc] use a single rufus.loc as translator base
* Remove the need to maintain a new_translation.loc
* Add a sed invocation to remove comments and unwanted stuff
  to generate a final embedded.loc
* Note: sed is only invoked for MinGW.
  MS compilers still embed the unmodified rufus.loc.
* Also fix a small bug when parsing the version.
2013-11-01 21:53:48 +00:00
Pete Batard 44cc7ea652 [loc] add [v]ersion command support 2013-10-30 20:28:56 +00:00
Pete Batard df44b26342 [loc] add language selection menu 2013-10-24 22:59:20 +01:00
Pete Batard b19bcdefb9 [loc] fix override of translation commands from separate dialogs
* Hashed string was missing the dialog ID. This means that something like:
    g IDD_DIALOG1
    t IDC_CONTROL "Hello"
    g IDD_DIALOG2
    t IDC_CONTROL "Goodbye"
  would result in "Goodbye" appearing on dialog 1.
2013-10-19 15:48:22 +01:00
Pete Batard 4046861392 [loc] fix dialog command overrides
* Rufus wasn't overwriting the previous localization command
  if an updated one was being provided.
* Add hash functions required for a more efficient lookup
* Also improve some French translations
2013-10-18 23:08:49 +01:00
Pete Batard 4e840a6995 [loc] fix a crash on exit
* Don't free loc_filename if it points to embedded name
* Also fix resizing of main dialog
2013-10-17 20:42:03 +01:00
Pete Batard ff28e2027c [loc] fix various localization issues
* Fix missing [b]ase for Chinese and French
* Fix infinite loop when [b]ase is not available for default
* Fix resizing of main dialog forces forcing pos to 0,0
2013-10-17 20:12:16 +01:00
Pete Batard 1cdb58462b [loc] misc. fixes and improvements
* Add support for LCID provision to option -l
* Fix French translation
* Fix memory leak for loc_filename
* Don't delete an external 'rufus.loc' file if present
* Use IETF normalized tags
* Add quick instructions and sample for translators in new_translation.loc
* Improve About dialog
2013-10-16 20:45:34 +01:00
Pete Batard df06727416 [loc] add localization support
* This is a merge up to commit bd319269aa of the localization branch
* Also fixes Clang warnings
2013-10-15 23:25:54 +01:00