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.
This commit is contained in:
Lawrence Lee
2021-08-14 16:05:11 -07:00
parent 9423ebc97c
commit d3e524a491
7 changed files with 130 additions and 10 deletions

View File

@@ -46,6 +46,7 @@ class FilePanel;
class MyProgressBar;
class Navigator;
class PopUpButton;
class RTAppChooserDialog;
class Thumbnail;
class ToolPanelCoordinator;
@@ -212,7 +213,7 @@ private:
bool idle_sendToGimp ( ProgressConnector<rtengine::IImagefloat*> *pc, Glib::ustring fname);
bool idle_sentToGimp (ProgressConnector<int> *pc, rtengine::IImagefloat* img, Glib::ustring filename);
void histogramProfile_toggled ();
Gtk::AppChooserDialog *getAppChooserDialog();
RTAppChooserDialog *getAppChooserDialog();
void onAppChooserDialogResponse(int resposneId);
void updateExternalEditorSelection();
@@ -249,7 +250,7 @@ private:
Gtk::Button* navNext;
Gtk::Button* navPrev;
Glib::RefPtr<Gio::AppInfo> external_editor_info;
std::unique_ptr<Gtk::AppChooserDialog> app_chooser_dialog;
std::unique_ptr<RTAppChooserDialog> app_chooser_dialog;
ExternalEditorChangedSignal *externalEditorChangedSignal;
sigc::connection externalEditorChangedSignalConnection;