~jeremywootten/pantheon-files/fix-backspace-in-columnv-view

« back to all changes in this revision

Viewing changes to libwidgets/MimeActions.vala

  • Committer: jeremy at elementaryos
  • Date: 2016-04-30 11:11:40 UTC
  • mfrom: (2023.1.107 pantheon-files)
  • Revision ID: jeremy@elementaryos.org-20160430111140-ez2siepsfxwj9asi
Merge trunk to r2130

Show diffs side-by-side

added added

removed removed

Lines of Context:
233
233
 
234
234
    public static void open_glib_file_request (GLib.File file_to_open, Gtk.Widget parent, AppInfo? app = null) {
235
235
        if (app == null) {
236
 
            Gtk.Widget? toplevel = parent != null ? parent.get_toplevel () : null;
237
 
            var chooser = new PF.ChooseAppDialog (toplevel, file_to_open);
238
 
            var choice = chooser.get_app_info ();
 
236
            var choice = choose_app_for_glib_file (file_to_open, parent);
239
237
            if (choice != null) {
240
238
                launch_glib_file_with_app (file_to_open, parent, choice);
241
239
            }
244
242
        }
245
243
    }
246
244
 
 
245
    public static AppInfo? choose_app_for_glib_file (GLib.File file_to_open, Gtk.Widget parent) {
 
246
        Gtk.Widget? toplevel = parent != null ? parent.get_toplevel () : null;
 
247
        var chooser = new PF.ChooseAppDialog (toplevel, file_to_open);
 
248
        return chooser.get_app_info ();
 
249
    }
 
250
 
247
251
    private static void launch_glib_file_with_app (GLib.File file_to_open, Gtk.Widget parent, AppInfo app) {
248
252
        var goffile = GOF.File.get (file_to_open);
249
253
        goffile.launch (parent.get_screen (), app);