* Corrected small things to make Circ-git compile from within MonoDevelop
[circ.git] / Circ.Frontend.GtkSharp / TabWidget.cs
blob4e112a472b723a46f1a6cf24fbdfd5b492726032
1 // Code adapted from Stetic which is Copyright (c) 2004 Novell, Inc
3 using Gtk;
4 using System;
6 namespace Circ.Frontend.GtkSharp
8 public class TabWidget: HBox
10 Label tabLabel;
11 Image hl;
13 public TabWidget(string tabName, Notebook nb, int index)
15 tabLabel = new Label(tabName);
16 hl = new Gtk.Image (Gdk.Pixbuf.LoadFromResource("chat.png"));
18 this.PackStart (hl, true, true, 0);
19 this.PackStart (tabLabel, true, true, 3);
20 Button b = new Button (new Gtk.Image ("gtk-close", IconSize.Menu));
21 b.Relief = Gtk.ReliefStyle.None;
22 b.WidthRequest = b.HeightRequest = 24;
24 b.Clicked += delegate (object s, EventArgs a) {
25 nb.RemovePage(index);
28 this.PackStart (b, false, false, 0);
29 //this.ShowAll();
32 public bool IsHl {
33 get {
34 return hl.Visible;
35 } set {
36 if (value)
37 hl.Show();
38 else
39 hl.Hide();