summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2014-03-04 23:47:52 +0100
committerStefano Karapetsas <[email protected]>2014-03-04 23:47:52 +0100
commit4e15fee4b2626fdb76ca45e4a968f22ac4e02d98 (patch)
tree0ff95cab619927e8f3ac52abea35e69f2f781278
parent22746bb182915f1e91a663c603051e41ce539ed8 (diff)
parent1ffb12a82a5d808e4467fe18d9436c1088530f82 (diff)
downloadmate-applets-4e15fee4b2626fdb76ca45e4a968f22ac4e02d98.tar.bz2
mate-applets-4e15fee4b2626fdb76ca45e4a968f22ac4e02d98.tar.xz
Merge pull request #80 from dnk/preferred_apps
gtk3: use preferred app
-rw-r--r--drivemount/drive-button.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivemount/drive-button.c b/drivemount/drive-button.c
index 1ff9c7cb..be8b4fa5 100644
--- a/drivemount/drive-button.c
+++ b/drivemount/drive-button.c
@@ -545,7 +545,7 @@ open_drive (DriveButton *self, GtkWidget *item)
GFile *file = NULL;
GList *files = NULL;
GdkAppLaunchContext *launch_context;
- GDesktopAppInfo *app_info;
+ GAppInfo *app_info;
#else
char *argv[3] = { "caja", NULL, NULL };
@@ -584,14 +584,16 @@ open_drive (DriveButton *self, GtkWidget *item)
g_return_if_reached();
#if GTK_CHECK_VERSION (3, 0, 0)
- app_info = g_desktop_app_info_new ("caja.desktop");
+ app_info = g_app_info_get_default_for_type("inode/directory", FALSE);
+ if (!app_info)
+ app_info = G_APP_INFO (g_desktop_app_info_new ("caja.desktop"));
if (app_info) {
launch_context = gdk_app_launch_context_new ();
screen = gtk_widget_get_screen (GTK_WIDGET (self));
gdk_app_launch_context_set_screen (launch_context, screen);
files = g_list_prepend (files, file);
- g_app_info_launch (G_APP_INFO (app_info),
+ g_app_info_launch (app_info,
files,
G_APP_LAUNCH_CONTEXT (launch_context),
&error);