i am writing (using C++ and GTKmm) a simple photo browser that is available on GitHub:
Currently i am working on creating a button, which will allow user to open currently displayed photo in external editor (for example GIMP). Because of this, i have two questions:
-
Are there any examples of using Gtk::AppChooserDialog class? I couldn’t find any and it’s hard to start working on choosing the editor without them.
-
Most important question – i am thinking about a way to launch an application with photo in command line. The only solution that comes to my mind is using system() call to do something like this: system(“gimp /path/to/current/photo.jpg”); , but it is probably not the best way of doing this. Anybody knows a better way? I would like to port my application to Windows someday and a more portable way would be great.
Thank you very much in advance.
Thank you very much for answers, gpoo and ergosys! In the end i decided to use
Gio::Appinfoas it looks more OOP-like. If anyone would face the same problem – this is what i have end up with:Of course choosing the editor with
Gtk::AppChooserDialogis not yet implemented.