Exemplo n.º 1
0
        private void Build()
        {
            global::Stetic.Gui.Initialize(this);
            // Widget Client.Graphics.Window
            global::Stetic.BinContainer.Attach(this);
            this.Name = "Client.Graphics.Window";
            // Container child Client.Graphics.Window.Gtk.Container+ContainerChild
            this.vpaned1 = new global::Gtk.VPaned();
            this.vpaned1.CanFocus = true;
            this.vpaned1.Name = "vpaned1";
            this.vpaned1.Position = 319;
            // Container child vpaned1.Gtk.Paned+PanedChild
            this.hpaned1 = new global::Gtk.HPaned();
            this.hpaned1.CanFocus = true;
            this.hpaned1.Name = "hpaned1";
            this.hpaned1.Position = 333;
            // Container child hpaned1.Gtk.Paned+PanedChild
            this.scrollback1.Events = ((global::Gdk.EventMask)(256));
            this.scrollback1.Name = "scrollback1";
            this.hpaned1.Add(this.scrollback1);
            global::Gtk.Paned.PanedChild w1 = ((global::Gtk.Paned.PanedChild)(this.hpaned1[this.scrollback1]));
            w1.Resize = false;
            // Container child hpaned1.Gtk.Paned+PanedChild
            this.GtkScrolledWindow1 = new global::Gtk.ScrolledWindow();
            this.GtkScrolledWindow1.Name = "GtkScrolledWindow1";
            this.GtkScrolledWindow1.ShadowType = ((global::Gtk.ShadowType)(1));
            // Container child GtkScrolledWindow1.Gtk.Container+ContainerChild
            this.listView = new global::Gtk.TreeView();
            this.listView.ButtonPressEvent += new ButtonPressEventHandler(Menu2);
            this.listView.CanFocus = true;
            this.listView.ButtonPressEvent += new ButtonPressEventHandler(Ignore);
            this.listView.PopupMenu += new PopupMenuHandler(Menu);
            this.listView.Name = "listView";
            Pango.FontDescription font = new Pango.FontDescription();
            font.Size = Configuration.CurrentSkin.UserListFontSize;
            listView.ModifyFont(font);
            this.listView.Selection.Mode = SelectionMode.Multiple;
            this.GtkScrolledWindow1.Add(this.listView);
            this.hpaned1.Add(this.GtkScrolledWindow1);
            this.vpaned1.Add(this.hpaned1);
            global::Gtk.Paned.PanedChild w4 = ((global::Gtk.Paned.PanedChild)(this.vpaned1[this.hpaned1]));
            w4.Resize = false;
            // Container child vpaned1.Gtk.Paned+PanedChild
            this.textbox1.Events = ((global::Gdk.EventMask)(256));
            this.textbox1.Name = "textbox1";
            this.vpaned1.Add(this.textbox1);

            // this is a nasty bug in version of gtk distributed
            if (Configuration.CurrentPlatform != Core.Platform.Linuxx64 && Configuration.CurrentPlatform != Core.Platform.Linuxx86)
            {
                this.vpaned1.AddNotification("position", new GLib.NotifyHandler(Changed));
                this.hpaned1.AddNotification("position", new GLib.NotifyHandler(Changed));
            }

            this.Add(this.vpaned1);
            if ((this.Child != null))
            {
                this.Child.ShowAll();
            }

            if (!HasUserList)
            {
                GtkScrolledWindow1.Visible = false;
            }

            if (!hasTextBox)
            {
                textbox.Visible = false;
            }
        }
Exemplo n.º 2
0
 private void Build()
 {
     global::Stetic.Gui.Initialize(this);
     global::Stetic.BinContainer.Attach(this);
     this.Name = "Client.Graphics.PidgeonList";
     this.GtkScrolledWindow = new global::Gtk.ScrolledWindow();
     this.GtkScrolledWindow.Name = "GtkScrolledWindow";
     this.GtkScrolledWindow.ShadowType = ((global::Gtk.ShadowType)(1));
     this.tv = new global::Gtk.TreeView();
     this.tv.CanFocus = true;
     this.tv.Name = "treeview1";
     Gtk.TreeViewColumn Column = new TreeViewColumn();
     Gtk.TreeViewColumn pict = new Gtk.TreeViewColumn();
     Gtk.CellRendererText Item = new Gtk.CellRendererText();
     Gtk.CellRendererPixbuf icon = new CellRendererPixbuf();
     Column.Title = messages.get("list-active-conn", Core.SelectedLanguage);
     Column.PackStart(Item, true);
     pict.PackStart(icon, true);
     Column.SetCellDataFunc(Item, UserListRendererTool);
     pict.AddAttribute(icon, "pixbuf", 5);
     tv.AppendColumn(pict);
     tv.AppendColumn(Column);
     tv.PopupMenu += Menu;
     tv.TooltipColumn = 4;
     tv.ButtonPressEvent += new ButtonPressEventHandler(Menu2);
     Column.AddAttribute(Item, "text", 0);
     this.tv.Model = Values;
     this.GtkScrolledWindow.Add(this.tv);
     timer = new GLib.TimeoutHandler(timer01_Tick);
     GLib.Timeout.Add(200, timer);
     this.tv.RowActivated += new RowActivatedHandler(items_AfterSelect);
     this.Add(this.GtkScrolledWindow);
     this.tv.CursorChanged += new EventHandler(items_AfterSelect2);
     partToolStripMenuItem.Enabled = true;
     disconnectToolStripMenuItem.Enabled = true;
     closeToolStripMenuItem.Enabled = true;
     soundsToolStripMenuItem.Visible = true;
     highlightToolStripMenuItem.Visible = true;
     Pango.FontDescription font = new Pango.FontDescription();
     font.Size = Configuration.CurrentSkin.ChannelListFontSize;
     tv.ModifyFont(font);
     this.tv.ModifyFg(StateType.Normal, Core.FromColor(Configuration.CurrentSkin.FontColor));
     if ((this.Child != null))
     {
         this.Child.ShowAll();
     }
     this.Hide();
 }