mirror of
https://github.com/Ponce/slackbuilds
synced 2024-10-07 11:07:00 +02:00
32 lines
1.1 KiB
Diff
32 lines
1.1 KiB
Diff
|
From f53d9b1c4f47b56c8c726a9ea8c070e6bdfc8a12 Mon Sep 17 00:00:00 2001
|
||
|
From: Andriy Grytsenko <andrej@rep.kiev.ua>
|
||
|
Date: Mon, 12 Nov 2012 22:26:18 +0200
|
||
|
Subject: [PATCH 02/11] [#3586151]'Open in ...' actions should be available
|
||
|
only for directories.
|
||
|
|
||
|
Added check if all selected items are directories and if not
|
||
|
then don't add those items into popup.
|
||
|
---
|
||
|
src/tab-page.c | 5 +++++
|
||
|
1 file changed, 5 insertions(+)
|
||
|
|
||
|
diff --git a/src/tab-page.c b/src/tab-page.c
|
||
|
index 1c79b94..29a4192 100644
|
||
|
--- a/src/tab-page.c
|
||
|
+++ b/src/tab-page.c
|
||
|
@@ -433,6 +433,11 @@ static void update_files_popup(FmFolderView* fv, GtkWindow* win,
|
||
|
GtkUIManager* ui, GtkActionGroup* act_grp,
|
||
|
FmFileInfoList* files)
|
||
|
{
|
||
|
+ GList* l;
|
||
|
+
|
||
|
+ for(l = fm_file_info_list_peek_head_link(files); l; l = l->next)
|
||
|
+ if(!fm_file_info_is_dir(l->data))
|
||
|
+ return; /* actions are valid only if all selected are directories */
|
||
|
gtk_action_group_set_translation_domain(act_grp, NULL);
|
||
|
gtk_action_group_add_actions(act_grp, folder_menu_actions,
|
||
|
G_N_ELEMENTS(folder_menu_actions), win);
|
||
|
--
|
||
|
1.8.0.1
|
||
|
|