2
* Copyright (c) 2016 elementary LLC. (http://launchpad.net/pantheon-files)
4
* This program is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU General Public
6
* License as published by the Free Software Foundation; either
7
* version 2 of the License, or (at your option) any later version.
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
* General Public License for more details.
14
* You should have received a copy of the GNU General Public
15
* License along with this program; if not, write to the
16
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17
* Boston, MA 02111-1307, USA.
20
public class PermissionButton : Gtk.Box {
21
public Gtk.ToggleButton btn_read;
22
public Gtk.ToggleButton btn_write;
23
public Gtk.ToggleButton btn_exe;
25
public Marlin.View.PropertiesWindow.PermissionType permission_type { get; construct; }
33
public PermissionButton (Marlin.View.PropertiesWindow.PermissionType permission_type) {
34
Object (permission_type: permission_type);
38
btn_read = new Gtk.ToggleButton.with_label (_("Read"));
39
btn_read.set_data ("permissiontype", permission_type);
40
btn_read.set_data ("permissionvalue", Value.READ);
42
btn_write = new Gtk.ToggleButton.with_label (_("Write"));
43
btn_write.set_data ("permissiontype", permission_type);
44
btn_write.set_data ("permissionvalue", Value.WRITE);
46
btn_exe = new Gtk.ToggleButton.with_label (_("Execute"));
47
btn_exe.set_data ("permissiontype", permission_type);
48
btn_exe.set_data ("permissionvalue", Value.EXE);
51
get_style_context ().add_class (Gtk.STYLE_CLASS_LINKED);