2
* This file is part of Clinica.
4
* Clinica is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation, either version 3 of the License, or
7
* (at your option) any later version.
9
* Clinica 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
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with Clinica. If not, see <http://www.gnu.org/licenses/>.
17
* Authors: Leonardo Robol <leo@robol.it>
22
public class ToolbarItem : Gtk.ToolItem {
24
public signal void activated ();
26
private Gtk.Button button;
28
public ToolbarItem (ResourceManager resources, string resource_path) {
31
button = new Gtk.Button ();
32
button.add (new Gtk.Image.from_resource (resource_path));
33
button.set_relief (Gtk.ReliefStyle.NONE);
35
button.clicked.connect ((button) => activated ());
40
public void set_active (bool sensitive) {
41
button.set_sensitive (sensitive);