From 37a84ca7a5c967e8358708fd74fdc6038629103b Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Mon, 1 Oct 2001 10:44:14 +0000 Subject: [PATCH] r845: Require AppRun to be executable before showing a directory as an application. --- ROX-Filer/src/diritem.c | 3 ++- ROX-Filer/src/gtksavebox.c | 4 ++-- ROX-Filer/src/menu.c | 2 ++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ROX-Filer/src/diritem.c b/ROX-Filer/src/diritem.c index fec46454..716e380f 100644 --- a/ROX-Filer/src/diritem.c +++ b/ROX-Filer/src/diritem.c @@ -167,7 +167,8 @@ void diritem_restat(guchar *path, DirItem *item, gboolean make_thumb) /* Try to find AppRun... */ strcpy(tmp + path_len + 1, "AppRun"); - if (mc_lstat(tmp, &info) == 0 && info.st_uid == uid) + if (mc_lstat(tmp, &info) == 0 && info.st_uid == uid && + info.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)) item->flags |= ITEM_FLAG_APPDIR; /* Are we still missing an icon for this app? */ diff --git a/ROX-Filer/src/gtksavebox.c b/ROX-Filer/src/gtksavebox.c index d2f73e36..1505f964 100644 --- a/ROX-Filer/src/gtksavebox.c +++ b/ROX-Filer/src/gtksavebox.c @@ -293,8 +293,8 @@ gtk_savebox_set_pathname (GtkSavebox *savebox, gchar *pathname) gtk_widget_realize (savebox->entry); gtk_entry_set_position (GTK_ENTRY (savebox->entry), -1); - gtk_entry_select_region (GTK_ENTRY (savebox->entry), leaf, - dot ? dot - pathname : -1); + gtk_editable_select_region (GTK_EDITABLE (savebox->entry), leaf, + dot ? dot - pathname : -1); } static void diff --git a/ROX-Filer/src/menu.c b/ROX-Filer/src/menu.c index f43bf19b..14ba1deb 100644 --- a/ROX-Filer/src/menu.c +++ b/ROX-Filer/src/menu.c @@ -830,6 +830,8 @@ void target_callback(FilerWindow *filer_window, collection_clear_selection(collection); collection_select_item(collection, item); ((GtkItemFactoryCallback1) real_fn)(NULL, 0, GTK_WIDGET(collection)); + + /* TODO: Opening a Savebox grabs the selection; don't lose it again! */ if (item < collection->number_of_items) collection_unselect_item(collection, item); } -- 2.11.4.GIT