2
* Copyright (c) 2013 Christopher Timberlake
3
* <Chris@TimberlakeTechnologies.com> -or- <www.ChristopherTimberlake.com>
5
* Permission is hereby granted, free of charge, to any person obtaining a copy
6
* of this software and associated documentation files (the "Software"), to deal
7
* in the Software without restriction, including without limitation the rights
8
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
* copies of the Software, and to permit persons to whom the Software is
10
* furnished to do so, subject to the following conditions:
12
* The above copyright notice and this permission notice shall be included in
13
* all copies or substantial portions of the Software.
15
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
26
class Builder_Widget : Gtk.InfoBar {
27
public Gtk.Label message;
28
public Gtk.ProgressBar progress;
29
private Gtk.Container content;
31
public Builder_Widget() {
32
content = (Gtk.Container)base.get_content_area ();
33
message = new Gtk.Label("Building...");
34
content.add (message);
36
var action = base.get_action_area();
37
var box = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0);
39
progress = new Gtk.ProgressBar ();
40
progress.set_show_text (true);
41
progress.set_fraction(0.5);
42
progress.set_size_request(10, 10);
46
var cancel = new Gtk.Button();
48
var image = new Image.from_pixbuf(Gtk.IconTheme.get_default ().lookup_by_gicon (new ThemedIcon ("process-stop-symbolic"), 16, 0).load_symbolic ({0.33, 0.33, 0.33, 0.33}));
49
cancel.set_image(image);
50
} catch(GLib.Error err){
51
stdout.printf("\n Error: %s", err.message);
55
base.add_action_widget(box, 0);