6 Commits

Author SHA1 Message Date
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
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