summaryrefslogtreecommitdiff
path: root/libraries/libfm/patches/0016-Fix-file-owner-group-should-be-properly-disabled-in-.patch
blob: 34a1b3041ebddbe616d62267df983410200bd5c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From 7b83548b43e2af014873655c850f580b16d24d57 Mon Sep 17 00:00:00 2001
From: Andriy Grytsenko <andrej@rep.kiev.ua>
Date: Mon, 19 Nov 2012 23:33:40 +0200
Subject: [PATCH 16/22] Fix: file owner/group should be properly disabled in
 dialog.

Currently if owner and group cannot be changed by user those fields
are enabled for set cursor but content is unchangeable. That may
be questioned by users and considered as bug, it also visually not
distinguishable from changeable case.
The commit properly disables those fields completely so user will
see it cannot be changed and cannot set keyboard focus there.
---
 src/gtk/fm-file-properties.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gtk/fm-file-properties.c b/src/gtk/fm-file-properties.c
index 3d79cdf..a87b546 100644
--- a/src/gtk/fm-file-properties.c
+++ b/src/gtk/fm-file-properties.c
@@ -591,8 +591,8 @@ static void update_permissions(FmFilePropData* data)
     /* on local filesystems, only root can do chown. */
     if( data->all_native && geteuid() != 0 )
     {
-        gtk_editable_set_editable(GTK_EDITABLE(data->owner), FALSE);
-        gtk_editable_set_editable(GTK_EDITABLE(data->group), FALSE);
+        gtk_widget_set_sensitive(GTK_WIDGET(data->owner), FALSE);
+        gtk_widget_set_sensitive(GTK_WIDGET(data->group), FALSE);
     }
 
     /* read access chooser */
-- 
1.8.0.1