~wingpanel-devs/wingpanel/simplify-background-management

« back to all changes in this revision

Viewing changes to lib/Widgets/Container.vala

  • Committer: RabbitBot
  • Author(s): Marcus Wichelmann
  • Date: 2015-10-20 17:31:28 UTC
  • mfrom: (94.1.28 automatic-cleanup-branch)
  • Revision ID: rabbitbot-20151020173128-d8m9e9mofmfd0igk
Automatic code cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*-
2
 
 * Copyright (c) 2015 Wingpanel Developers (http://launchpad.net/wingpanel)
 
1
/*
 
2
 * Copyright (c) 2011-2015 Wingpanel Developers (http://launchpad.net/wingpanel)
3
3
 *
4
 
 * This program is free software: you can redistribute it and/or modify
5
 
 * it under the terms of the GNU Library General Public License as published by
6
 
 * the Free Software Foundation, either version 2.1 of the License, or
7
 
 * (at your option) any later version.
 
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.
8
8
 *
9
9
 * This program is distributed in the hope that it will be useful,
10
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
 
 * GNU Library General Public License for more details.
 
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
12
 * General Public License for more details.
13
13
 *
14
 
 * You should have received a copy of the GNU Library General Public License
15
 
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
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.
16
18
 */
17
19
 
18
20
public class Wingpanel.Widgets.Container : Gtk.Button {
19
 
        private Gtk.Grid content_widget;
20
 
 
21
 
        public Container () {
22
 
                content_widget = new Gtk.Grid ();
23
 
                content_widget.hexpand = true;
24
 
 
25
 
                this.add (content_widget);
26
 
 
27
 
                set_style_classes ();
28
 
        }
29
 
 
30
 
        public Gtk.Grid get_content_widget () {
31
 
                return content_widget;
32
 
        }
33
 
 
34
 
        private void set_style_classes () {
35
 
                var style_context = this.get_style_context ();
36
 
                style_context.add_class (Gtk.STYLE_CLASS_MENUITEM);
37
 
                style_context.remove_class (Gtk.STYLE_CLASS_BUTTON);
38
 
                style_context.remove_class ("text-button");
39
 
        }
40
 
}
 
21
    private Gtk.Grid content_widget;
 
22
 
 
23
    public Container () {
 
24
        content_widget = new Gtk.Grid ();
 
25
        content_widget.hexpand = true;
 
26
 
 
27
        this.add (content_widget);
 
28
 
 
29
        set_style_classes ();
 
30
    }
 
31
 
 
32
    public Gtk.Grid get_content_widget () {
 
33
        return content_widget;
 
34
    }
 
35
 
 
36
    private void set_style_classes () {
 
37
        var style_context = this.get_style_context ();
 
38
        style_context.add_class (Gtk.STYLE_CLASS_MENUITEM);
 
39
        style_context.remove_class (Gtk.STYLE_CLASS_BUTTON);
 
40
        style_context.remove_class ("text-button");
 
41
    }
 
42
}
 
 
b'\\ No newline at end of file'