15 Commits

Author SHA1 Message Date
Pandagrapher
990e9c70a5 Merge with 'Beep6581/dev' 2023-09-05 09:48:43 +02:00
Stephen Shkardoon
23f2a2fc9f Use _WIN32 instead of WIN32 to detect Windows
`WIN32` is not defined when building a 64-bit executable on Windows with Clang. `_WIN32` is the more appropriate option here.
http://web.archive.org/web/20191012035921/http://nadeausoftware.com/articles/2012/01/c_c_tip_how_use_compiler_predefined_macros_detect_operating_system contains a handy table/matrix of the options and why this is best.
2023-08-13 17:09:49 +12:00
Pandagrapher
d0743ef359 Merge with 'Beep6581/dev' 2023-08-12 18:03:41 +02:00
Lawrence Lee
a626bdae3e
Fix external editor on macOS
Avoid using Gio::AppInfo.
2023-07-31 22:57:57 -07:00
Pandagrapher
f7c25b18af Merge with 'Beep6581/dev' 2023-04-29 11:24:55 +02:00
Pandagrapher
23be310029 Fixes issues following merge with 'dev'
- External Editor: App icon not correctly managed in RTImage
- Favorite preferences: Fixes widget sizes
- Other fix: With some versions of Glib/Glibmm library on MacOS, Glib::KeyFile "load_from_file" function does not raise a Glib::Error but another exception. This causes crash opening preferences panel due to missing dynamic profiles configuration
2023-04-29 11:06:58 +02:00
Lawrence Lee
186995acf4
Improve code quality for external editor settings 2023-04-09 13:52:09 -07:00
Lawrence Lee
19f12f3182
Allow native commands as external editors
If an editor is marked as a native command, it is launched using the
older method (native for Windows or Glib otherwise). Non-native commands
are launched with Gio. When reading preferences containing the old style
external editor settings, all commands are marked as native to avoid
breaking them.

Fix bug where the send to editor button shows the wrong editor. The bug
happens when the other editor option is selected while the user edits
the external editors in preferences. When saved, the button shows the
first option is selected instead of the other editor option (the last
entry).
2023-04-08 18:16:23 -07:00
Pandagrapher
2338b8f366 Merge with "Beep6581/dev" 2 2023-03-11 11:03:19 +01:00
Lawrence Lee
194ef397a6
Fix external editor file chooser filter (Windows)
Look for files with the MIME type "application/x-msdownload", which are
Windows executable files. The Gio function for determining if a file is
executable does not work for Windows.
2023-01-08 22:17:21 -08:00
Lawrence Lee
329341f89f
Replace Gtk::make_managed() with Gtk::manage()
Maintain compatibility with gtkmm 3.16.
2022-03-05 18:36:28 -08:00
Lawrence Lee
58f0783561
Allow selecting file as external editor 2022-03-05 18:26:52 -08:00
Lawrence Lee
672d6302f3 Fix storage of external editor icons
De-serialize and serialize icons instead of using their names.
2021-08-14 17:11:07 -07:00
Lawrence Lee
d3e524a491 Fix crash when adding an external editor
On some platforms, the app chooser dialog causes a crash after selecting
an application. The application information returned by the dialog may
also trigger crashes when accessed. See
https://gitlab.gnome.org/GNOME/glib/-/issues/1104 and
https://gitlab.gnome.org/GNOME/glibmm/-/issues/94. This commit overrides
gtkmm's app chooser dialog to work around these bugs.
2021-08-14 16:05:11 -07:00
Lawrence Lee
453fb961f2 Create a preferences widget for external editors
The widget is intended to be embedded in the preferences dialog. It
displays a list of external editors using an icon, name, and command for
each editor. The name and command can be edited. Editors can be added,
removed, and rearranged. A button allows one to set an editor's
information by selecting from a list of installed applications.
2021-03-28 18:12:47 -07:00