* Corrected small things to make Circ-git compile from within MonoDevelop
[circ.git] / Circ.Frontend.GtkSharp / ServerPanel.cs
blob8e47216d83d650defebf80f1593edc516d5aa4ee
1 #region License
2 /* Circ.Frontend.GtkSharp : GTK# frontend for Circ
3 * Copyright (C) 2007 LAVAL Jérémie
5 * This file is licensed under the terms of the LGPL.
7 * For the complete licence see the file COPYING.
8 */
9 #endregion
10 using System;
11 using Gtk;
12 using Circ.Frontend;
13 using Circ.Controller;
15 namespace Circ.Frontend.GtkSharp
17 public partial class ServerPanel : Gtk.Bin
19 IConnectionControl ctrl;
20 MessagesPanel messages;
21 TextBuffer buffer;
23 public ServerPanel(IConnectionControl ctrl): base()
25 this.ctrl = ctrl;
26 Gtk.Application.Invoke( delegate {
27 this.messages = new MessagesPanel();
28 this.buffer = messages.Buffer;
30 this.Build();
31 this.textWindow.Add(messages);
32 this.channelsNb.SwitchPage += PageSwitched;
34 });
35 MainWindow.CurrentServerPanel = this;
38 internal Notebook Pages {
39 get {
40 return this.channelsNb;
44 void PageSwitched(object sender, SwitchPageArgs e)
46 MainWindow.CurrentChannelPanel = this.channelsNb.GetNthPage((int)e.PageNum) as ChannelPanel;
49 /*public int CurrentPage {
50 get {
51 return this.channelsNb.CurrentPage;
53 set {
54 this.channelsNb.CurrentPage = value;
58 public Widget CurrentPageWidget {
59 get {
60 return this.channelsNb.CurrentPageWidget;
64 public Widget GetMenuWidget(Widget widg)
66 return this.channelsNb.GetMenuLabel(widg);
69 public int NPages {
70 get {
71 return this.channelsNb.NPages;
75 public void NextPage()
77 this.channelsNb.NextPage();
78 }*/