Beispiel #1
0
        public GtkToolbar(Window parent, ToolbarModel model)
        {
            this.Updating     = false;
            this.ToolbarStyle = ToolbarStyle.Icons;
            this.Tooltips     = false;

            buttons = new ToolbarItem[model.Count];
            for (int i = 0; i < buttons.Length; i++)
            {
                buttons[i] = new ToolbarItem(this, model, i);
                this.Insert(buttons[i], -1);
            }

            ToolItem space = new ToolItem();

            space.Expand = true;
            ToolButton info = new ToolButton(Stock.Info);

            info.Clicked += (sender, args) => {
                GtkAbout.ShowAbout(parent);
            };
            this.Insert(space, -1);
            this.Insert(info, -1);

            model.ToolbarChangedEvent += (sender, e) => SetSelected(e.Value);
        }
Beispiel #2
0
        public static void ShowAbout(Window parent)
        {
            GtkAbout dlog = new GtkAbout(parent);

            dlog.Modal = true;
            dlog.AddButton("Close", ResponseType.Close);
            dlog.Run();
            dlog.Destroy();
        }