File: AlertViewView.vala

package info (click to toggle)
granite 6.2.0-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,768 kB
  • sloc: python: 10; makefile: 8
file content (21 lines) | stat: -rw-r--r-- 570 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
 * Copyright 2011-2017 elementary, Inc. (https://elementary.io)
 * SPDX-License-Identifier: LGPL-3.0-or-later
 */

public class AlertViewView : Gtk.Grid {
    construct {
        var alert = new Granite.Widgets.AlertView (
            "Nothing here",
            "Maybe you can enable <b>something</b> to hide it but <i>otherwise</i> it will stay here",
            "dialog-warning"
        );
        alert.show_action ("Hide this button");

        alert.action_activated.connect (() => {
            alert.hide_action ();
        });

        add (alert);
    }
}