Пример #1
0
        private Gtk.Widget MakeViewPage()
        {
            Gtk.VBox vbox = new Gtk.VBox(false, 0);
            vbox.BorderWidth = 6;

            textLabel              = new Gtk.Label();
            textLabel.Xalign       = 0;
            textLabel.UseUnderline = false;
            textLabel.Justify      = Gtk.Justification.Left;
            textLabel.Wrap         = true;
            textLabel.Text         = text;
            textLabel.Show();
            vbox.PackStart(textLabel, true, true, 0);

            Gtk.HButtonBox hButtonBox = new Gtk.HButtonBox();
            hButtonBox.Layout = Gtk.ButtonBoxStyle.End;

            deleteButton          = new Gtk.Button(Gtk.Stock.Delete);
            deleteButton.Clicked += OnDeleteButtonClicked;
            deleteButton.Show();
            hButtonBox.PackStart(deleteButton, false, false, 0);

            editButton          = new Gtk.Button(Gtk.Stock.Edit);
            editButton.Clicked += OnEditButtonClicked;
            editButton.Show();
            hButtonBox.PackStart(editButton, false, false, 0);

            hButtonBox.Show();
            vbox.PackStart(hButtonBox, false, false, 0);

            vbox.Show();
            return(vbox);
        }
Пример #2
0
        public NewSearchPage()
            : base(0.5f, 0.5f, 0f, 0f)
        {
            base.SetPadding(36, 36, 36, 36);
            base.FocusGrabbed += base_FocusGrabbed;

            mainVBox = new VBox();

            Label label = new Label();
            label.Xalign = 0;
            label.Markup = "<span size=\"x-large\" weight=\"bold\">Search for files...</span>";
            mainVBox.PackStart(label, false, false, 0);
            label.Show();

            searchEntry = new FileSearchEntry();
            searchEntry.WidthRequest = 400;
            mainVBox.PackStart(searchEntry, false, false, 6);
            searchEntry.Show();

            searchButton = new Button("_Search");
            searchButton.Image = new Image(Stock.Find, IconSize.Button);
            searchButton.Clicked += searchButton_Clicked;
            searchButton.Show();

            HButtonBox buttonBox = new HButtonBox();
            buttonBox.Layout = ButtonBoxStyle.End;
            buttonBox.PackStart(searchButton, false, false, 0);
            mainVBox.PackStart(buttonBox, false, false, 0);
            buttonBox.Show();

            base.Add(mainVBox);
            mainVBox.Show();
        }
Пример #3
0
        private Gtk.Widget MakeEditPage()
        {
            Gtk.VBox vbox = new Gtk.VBox(false, 0);
            vbox.BorderWidth = 6;

            Gtk.ScrolledWindow sw = new Gtk.ScrolledWindow();
            sw.ShadowType       = Gtk.ShadowType.EtchedIn;
            sw.HscrollbarPolicy = Gtk.PolicyType.Automatic;
            sw.VscrollbarPolicy = Gtk.PolicyType.Automatic;

            textView             = new Gtk.TextView();
            textView.WrapMode    = Gtk.WrapMode.Word;
            textView.Editable    = true;
            textView.Buffer.Text = text;
            textView.CanFocus    = true;
            textView.NoShowAll   = true;
            textView.SetSizeRequest(-1, 60);
            sw.Add(textView);
            sw.Show();
            vbox.PackStart(sw, true, true, 0);

            Gtk.HButtonBox hButtonBox = new Gtk.HButtonBox();
            hButtonBox.Layout = Gtk.ButtonBoxStyle.End;

            cancelButton           = new Gtk.Button(Gtk.Stock.Cancel);
            cancelButton.Clicked  += OnEditCanceled;
            cancelButton.NoShowAll = true;
            hButtonBox.PackStart(cancelButton, false, false, 0);

            saveButton           = new Gtk.Button(Gtk.Stock.Save);
            saveButton.Clicked  += OnSaveButtonClicked;
            saveButton.NoShowAll = true;
            hButtonBox.PackStart(saveButton, false, false, 0);

            hButtonBox.Show();
            vbox.PackStart(hButtonBox, false, false, 6);

            vbox.Show();
            return(vbox);
        }
Пример #4
0
        public static void Main(string[] args)
        {
            Application.Init();

            var window = new Gtk.Window(Gtk.WindowType.Toplevel)
            {
                Title       = "Treemap Example",
                BorderWidth = 0,                //12,
            };

            window.SetDefaultSize(640, 480);
            window.DeleteEvent += delegate {
                Gtk.Application.Quit();
            };
            window.Show();

            var vbox = new Gtk.VBox(false, 6);

            window.Add(vbox);
            vbox.Show();

            var treemap = new TreeMap.TreeMap()
            {
                Model        = BuildModel(),
                TextColumn   = 0,
                WeightColumn = 1,
                Title        = "Treemap Example",
            };

            vbox.PackStart(treemap, true, true, 0);
            treemap.Show();

            var buttonbox = new Gtk.HButtonBox();

            buttonbox.BorderWidth = 12;
            buttonbox.Layout      = Gtk.ButtonBoxStyle.End;
            vbox.PackStart(buttonbox, false, true, 0);
            buttonbox.Show();

            var close = new Gtk.Button(Gtk.Stock.Close);

            close.CanDefault = true;
            close.Clicked   += delegate { Gtk.Application.Quit(); };
            buttonbox.PackStart(close, false, true, 0);
            window.Default = close;
            close.Show();

            Application.Run();
        }
Пример #5
0
        public static void Main(string[] args)
        {
            Application.Init ();

            var window = new Gtk.Window (Gtk.WindowType.Toplevel) {
                Title       = "Treemap Example",
                BorderWidth = 0,//12,
            };
            window.SetDefaultSize (640, 480);
            window.DeleteEvent += delegate {
                Gtk.Application.Quit ();
            };
            window.Show ();

            var vbox = new Gtk.VBox (false, 6);
            window.Add (vbox);
            vbox.Show ();

            var treemap = new TreeMap.TreeMap () {
                Model        = BuildModel (),
                TextColumn   = 0,
                WeightColumn = 1,
                Title        = "Treemap Example",
            };
            vbox.PackStart (treemap, true, true, 0);
            treemap.Show ();

            var buttonbox = new Gtk.HButtonBox ();
            buttonbox.BorderWidth = 12;
            buttonbox.Layout = Gtk.ButtonBoxStyle.End;
            vbox.PackStart (buttonbox, false, true, 0);
            buttonbox.Show ();

            var close = new Gtk.Button (Gtk.Stock.Close);
            close.CanDefault = true;
            close.Clicked += delegate { Gtk.Application.Quit (); };
            buttonbox.PackStart (close, false, true, 0);
            window.Default = close;
            close.Show ();

            Application.Run ();
        }
Пример #6
0
        public EditWindow(Invoice invoice,
		                  string file,
		                  InvoiceDirectory idir_,
                          InvoicesChanged cb)
            : base(WindowType.Toplevel)
        {
            loadedFile = file;
            idir = idir_;
            callback = cb;

            VBox box = new VBox(false, 0);
            table = new Table(7, 3, false);
            Table tablespec = new Table(16, 4, false);
            tablesum = new Table(4, 2, false);

            HButtonBox buttons = new HButtonBox();
            Button save = Button.NewWithLabel("Spara");
            Button abort = Button.NewWithLabel("Avbryt");

            namn = new Entry();
            address = new Entry();
            postnr = new Entry();
            postort = new Entry();
            referens = new Entry();
            datum = new Entry();
            fakturanr = new Entry();
            antaldgr = new Entry();

            ScrolledWindow scrolled = new ScrolledWindow();
            Button GetAddress = Button.NewWithLabel("Slå upp address");

            Add(box);
            scrolled.AddWithViewport(tablespec);
            scrolled.SetPolicy(PolicyType.Never, PolicyType.Automatic);
            box.PackStart(table, false, false, 0);
            box.PackStart(scrolled, true, true, 0);
            scrolled.SetUsize(~1, 250);

            box.PackStart(tablesum, false, false, 0);
            box.PackStart(buttons,  false, false, 0);

            buttons.PackStart(save);
            buttons.PackStart(abort);

            specs = new Spec[15];
            for (uint i=0; i<15; i++) {
                specs[i] = new Spec(invoice.specs[i], tablespec, i + 1);
                specs[i].Changed += RecalcSum;
            }

            tablespec.Attach(new Label("Beskrivning"), 0, 1, 0, 1, 0, 0, 0, 0);
            tablespec.Attach(new Label("Antal"),       1, 2, 0, 1, 0, 0, 0, 0);
            tablespec.Attach(new Label("À pris"),      2, 3, 0, 1, 0, 0, 0, 0);
            tablespec.Attach(new Label("Belopp"),      3, 4, 0, 1, 0, 0, 0, 0);

            SetPosition(WindowPosition.Center);

            namn.Changed += UpdateTitle;
            fakturanr.Changed += UpdateTitle;

            namn.Text = invoice.namn;
            address.Text = invoice.address;
            postnr.Text = invoice.postnr;
            postort.Text = invoice.postort;
            referens.Text = invoice.referens;
            datum.Text = invoice.datum;
            fakturanr.Text = invoice.fakturanr;
            antaldgr.Text = invoice.antaldgr;

            labround = new Label("0");
            labsum   = new Label("0");
            labmoms  = new Label("0");
            labtot   = new Label("0");

            RecalcSum();

            Attach2(0, "Namn", namn);
            table.Attach(GetAddress, 2, 3, 0, 1, 0, 0, 0, 0);
            Attach2(1, "Address", address);
            Attach2(2, "Postnummer", postnr);
            Attach2(3, "Postort", postort);
            Attach2(4, "Er referens", referens);
            Attach2(5, "Datum", datum);
            Attach2(6, "Fakturanummer", fakturanr);
            Attach2(7, "Antal dagar",   antaldgr);

            Attach3(0, "Avrundning", labround);
            Attach3(1, "Summa", labsum);
            Attach3(2, "Moms", labmoms);
            Attach3(3, "Att betala", labtot);

            abort.Clicked += Abort;
            save.Clicked += Save;
            GetAddress.Clicked += FindAddress;

            box.ShowAll();
        }
        private void AddTagsTab()
        {
            Table tags_table = new Table(1, 2, false);
            tags_table.BorderWidth = 5;
            tags_table.ColumnSpacing = 10;
            tags_table.RowSpacing = 10;

            ScrolledWindow tags_swin = new ScrolledWindow();
            tags_swin.ShadowType = ShadowType.In;
            tags_swin.SetPolicy(PolicyType.Automatic, PolicyType.Automatic);
            tags_table.Attach(tags_swin, 0, 1, 0, 1);

            cr_toggle = new CellRendererToggle();
            cr_toggle.Activatable = true;
            cr_toggle.Toggled += new ToggledHandler(OnCrToggleToggled);
            tv_tags = new TreeView();
            tags_swin.Add(tv_tags);

            store_tags = new ListStore(typeof(bool), typeof(string));
            tv_tags.Model = store_tags;

            // set up the columns for the view
            TreeViewColumn column_Read = new TreeViewColumn("Use", cr_toggle, "active", 0);
            tv_tags.AppendColumn(column_Read);

            TreeViewColumn column_Name = new TreeViewColumn("Title", new CellRendererText(), "text", 1);
            tv_tags.AppendColumn(column_Name);

            foreach ( string tag in Feeds.GetTags() ) {
                TreeIter iter = store_tags.Append();
                if ( feed.Tags.Contains(tag) ) {
                    store_tags.SetValue(iter, 0, true);
                } else {
                    store_tags.SetValue(iter, 0, false);
                }
                store_tags.SetValue(iter, 1, tag);
            }

            ButtonBox tags_bbox = new HButtonBox();
            tags_bbox.Layout = ButtonBoxStyle.End;
            tags_table.Attach(tags_bbox, 0, 1, 1, 2);

            Button add_button = new Button(Stock.Add);
            add_button.Clicked += new EventHandler(OnAddButtonClicked);
            tags_bbox.PackStart(add_button);

            notebook.AppendPage(tags_table, new Label("Tags"));
        }
Пример #8
0
            public ProgressWindow(AssemblyImporter  importer, Thread thread)
                : base(GettextCatalog.GetString ("Importing..."))
            {
                _thread = thread;
                _importer = importer;
                _progress = new ProgressBar ();
                _progress.Orientation = ProgressBarOrientation.LeftToRight;
                _progress.Pulse ();

                Button cancel = new Button ();
                cancel.UseStock = true;
                cancel.Label = Gtk.Stock.Cancel;
                cancel.Clicked += CancelImporting;

                HButtonBox buttonBox = new HButtonBox ();
                buttonBox.PackStart (cancel, false, false, 0);

                VBox vbox = new VBox ();
                _message = new Label (GettextCatalog.GetString ("Please wait while loading..."));
                vbox.PackStart (_message, false, false, 0);
                vbox.PackEnd (buttonBox, false, false, 0);
                vbox.PackEnd (_progress, false, false, 0);

                _timer = GLib.Timeout.Add (100, new GLib.TimeoutHandler (ProgressTimeout));

                Add (vbox);

                Modal = true;
                HeightRequest = 70;
                WidthRequest = 180;
                WindowPosition = Gtk.WindowPosition.CenterAlways;
                Resizable = false;
                Icon = PixbufLoader.GetIcon ("main_icon.png");
                ShowAll ();
            }
Пример #9
0
 private void InitializeWidgets()
 {
     this.Spacing = 10;
        this.BorderWidth = 10;
        AccTreeView = new iFolderTreeView();
        ScrolledWindow sw = new ScrolledWindow();
        sw.ShadowType = Gtk.ShadowType.EtchedIn;
        sw.Add(AccTreeView);
        this.PackStart(sw, true, true, 0);
        AccTreeStore = new ListStore(typeof(string));
        AccTreeView.Model = AccTreeStore;
        TreeViewColumn onlineColumn = new TreeViewColumn();
        onlineColumn.Title = Util.GS("Online");
        onlineToggleButton = new CellRendererToggle();
        onlineToggleButton.Xpad = 5;
        onlineToggleButton.Xalign = 0.5F;
        onlineColumn.PackStart(onlineToggleButton, true);
        onlineColumn.SetCellDataFunc(onlineToggleButton,
     new TreeCellDataFunc(OnlineCellToggleDataFunc));
        onlineToggleButton.Toggled += new ToggledHandler(OnlineToggled);
        AccTreeView.AppendColumn(onlineColumn);
        TreeViewColumn serverColumn = new TreeViewColumn();
        serverColumn.Title = Util.GS("Server Name");
        CellRendererText servercr = new CellRendererText();
        servercr.Xpad = 5;
        serverColumn.PackStart(servercr, false);
        serverColumn.SetCellDataFunc(servercr,
        new TreeCellDataFunc(ServerCellTextDataFunc));
        serverColumn.Resizable = true;
        serverColumn.MinWidth = 150;
        AccTreeView.AppendColumn(serverColumn);
        TreeViewColumn nameColumn = new TreeViewColumn();
        nameColumn.Title = Util.GS("User Name");
        CellRendererText ncrt = new CellRendererText();
        nameColumn.PackStart(ncrt, false);
        nameColumn.SetCellDataFunc(ncrt,
     new TreeCellDataFunc(NameCellTextDataFunc));
        nameColumn.Resizable = true;
        nameColumn.MinWidth = 150;
        AccTreeView.AppendColumn(nameColumn);
        AccTreeView.Selection.Mode = SelectionMode.Single;
        AccTreeView.Selection.Changed +=
     new EventHandler(AccSelectionChangedHandler);
        HButtonBox buttonBox = new HButtonBox();
        buttonBox.Spacing = 10;
        buttonBox.Layout = ButtonBoxStyle.End;
        this.PackStart(buttonBox, false, false, 0);
        AddButton = new Button(Gtk.Stock.Add);
        buttonBox.PackStart(AddButton);
        AddButton.Clicked += new EventHandler(OnAddAccount);
        RemoveButton = new Button(Gtk.Stock.Remove);
        buttonBox.PackStart(RemoveButton);
        RemoveButton.Clicked += new EventHandler(OnRemoveAccount);
        DetailsButton = new Button(Gtk.Stock.Properties);
        buttonBox.PackStart(DetailsButton);
        DetailsButton.Clicked += new EventHandler(OnDetailsClicked);
        AccTreeView.RowActivated += new RowActivatedHandler(
       OnAccTreeRowActivated);
 }
Пример #10
0
		public ExceptionCaughtDialog (ExceptionInfo val, ExceptionCaughtMessage msg)
		{
			Title = GettextCatalog.GetString ("Exception Caught");
			ex = val;
			widget = new ExceptionCaughtWidget (val);
			this.msg = msg;

			VBox box = new VBox ();
			box.Spacing = 6;
			box.PackStart (widget, true, true, 0);
			HButtonBox buttonBox = new HButtonBox ();
			buttonBox.BorderWidth = 6;

			var copy = new Gtk.Button (GettextCatalog.GetString ("Copy to Clipboard"));
			buttonBox.PackStart (copy, false, false, 0);
			copy.Clicked += HandleCopyClicked;

			var close = new Gtk.Button (GettextCatalog.GetString ("Close"));
			buttonBox.PackStart (close, false, false, 0);
			close.Clicked += (sender, e) => msg.Close ();
			close.Activated += (sender, e) => msg.Close ();

			box.PackStart (buttonBox, false, false, 0);
			VBox.Add (box);

			DefaultWidth = 500;
			DefaultHeight = 350;

			box.ShowAll ();
			ActionArea.Hide ();
		}
Пример #11
0
        private Gtk.Widget MakeViewPage()
        {
            Gtk.VBox vbox = new Gtk.VBox (false, 0);
            vbox.BorderWidth = 6;

            textLabel = new Gtk.Label ();
            textLabel.Xalign = 0;
            textLabel.UseUnderline = false;
            textLabel.Justify = Gtk.Justification.Left;
            textLabel.Wrap = true;
            textLabel.Text = text;
            textLabel.Show ();
            vbox.PackStart (textLabel, true, true, 0);

            Gtk.HButtonBox hButtonBox = new Gtk.HButtonBox ();
            hButtonBox.Layout = Gtk.ButtonBoxStyle.End;

            deleteButton = new Gtk.Button (Gtk.Stock.Delete);
            deleteButton.Clicked += OnDeleteButtonClicked;
            deleteButton.Show ();
            hButtonBox.PackStart (deleteButton, false, false, 0);

            editButton = new Gtk.Button (Gtk.Stock.Edit);
            editButton.Clicked += OnEditButtonClicked;
            editButton.Show ();
            hButtonBox.PackStart (editButton, false, false, 0);

            hButtonBox.Show ();
            vbox.PackStart (hButtonBox, false, false, 0);

            vbox.Show ();
            return vbox;
        }
Пример #12
0
 private void MessageDialog(string msg)
 {
     Dialog dialog = new Dialog();
     HButtonBox buttons = new HButtonBox();
     buttons.PackStart(Button.NewWithLabel("Ok"));
     dialog.VBox.PackStart(new Label(msg));
     dialog.ActionArea.PackStart(buttons);
     dialog.ShowAll();
 }
Пример #13
0
        public MessageDialog(ArrayList list)
            : base(WindowType.Toplevel)
        {
            Title = "Error";
            IconName = "dialog-error";

            DeleteEvent += OnClose;

            Resizable = false;
            BorderWidth = 6;

            vbox = new VBox(false, 6);
            Add(vbox);
            hbox = new HBox(false, 6);

            vbox.PackStart(hbox);

            image = new Image(Stock.DialogError, IconSize.Dialog);
            hbox.PackStart(image);

            table = new Table(2, 3, false);
            table.RowSpacing = 6;
            hbox.PackEnd(table);

            label = new Label();
            label.Markup = "<big><b>Some feeds failed to import</b></big>";
            table.Attach(label, 1, 2, 0, 1);

            buffer = new TextBuffer(new TextTagTable());
            foreach ( string feed in list ) {
                buffer.Text = buffer.Text + feed+"\n";;
            }

            textview = new TextView(buffer);
            textview.Editable = false;
            textview.WrapMode = WrapMode.Word;
            textview.SetSizeRequest(400, 150);

            textviewsw = new ScrolledWindow(new Adjustment(0, 0, 0, 0, 0, 0), new Adjustment(0, 0, 0, 0, 0, 0));
            textviewsw.ShadowType = ShadowType.In;
            textviewsw.SetPolicy(PolicyType.Automatic, PolicyType.Automatic);
            textviewsw.Add(textview);
            table.Attach(textviewsw, 1, 2, 1, 2);

            bbox = new HButtonBox();
            bbox.Layout = ButtonBoxStyle.End;
            bbox.Spacing = 6;
            vbox.PackEnd(bbox);

            close_button = new Button(Stock.Close);
            close_button.Clicked += new EventHandler(OnClose);
            bbox.PackStart(close_button);

            TransientFor = (Browser)Summa.Core.Application.Browsers[0];
        }
Пример #14
0
 private void InitializeWidgets(Manager simiasManager)
 {
     this.SetDefaultSize (480, 550);
        VBox winBox = new VBox();
        this.Add (winBox);
        winBox.BorderWidth = 7;
        winBox.Spacing = 7;
        this.Icon = new Gdk.Pixbuf(Util.ImagesPath("ifolder24.png"));
        this.WindowPosition = Gtk.WindowPosition.Center;
        PrefNoteBook = new Notebook();
        generalPage = new PrefsGeneralPage(this, ifws);
        PrefNoteBook.AppendPage( generalPage,
       new Label(Util.GS("General")));
        accountsPage = new PrefsAccountsPage(this);
        PrefNoteBook.AppendPage( accountsPage,
       new Label(Util.GS("Accounts")));
        PrefNoteBook.SwitchPage +=
     new SwitchPageHandler(OnSwitchPageEvent);
        winBox.PackStart(PrefNoteBook, true, true, 0);
        HButtonBox buttonBox = new HButtonBox();
        buttonBox.BorderWidth = 10;
        buttonBox.Spacing = 10;
        buttonBox.Layout = ButtonBoxStyle.Edge;
        winBox.PackStart(buttonBox, false, false, 0);
        Button helpButton = new Button(Gtk.Stock.Help);
        buttonBox.PackStart(helpButton);
        helpButton.Clicked += new EventHandler(HelpEventHandler);
        Button closeButton = new Button(Gtk.Stock.Close);
        buttonBox.PackStart(closeButton);
        closeButton.Clicked += new EventHandler(CloseEventHandler);
 }
Пример #15
0
        private LogWindow()
            : base("LOG")
        {
            this.WidthRequest = 780;
            this.HeightRequest = 350;
            this.AllowShrink = true;
            this.WindowPosition = WindowPosition.None;

            this.DeleteEvent += delegate {
                this.Dispose();
            };

            scope_iters = new Dictionary<LogScope, TreeIter?>();

            store = new TreeStore(
                typeof(string), typeof(int), typeof(string), typeof(string), typeof(string), typeof(string));

            mainbox = new VBox();
            this.Add(mainbox);

            view = new TreeView(store);
            view.AppendColumn("Čas", new CellRendererText(), "text", 0);
            view.AppendColumn("Trvání", new CellRendererText(), "text", 5);
            view.AppendColumn("Druh", new CellRendererText(), "text", 2);
            view.AppendColumn("Text", new CellRendererText(), "text", 3);
            view.AppendColumn("Unístění", new CellRendererText(), "text", 4);
            view.ShowExpanders = true;
            view.EnableTreeLines = true;
            view.EnableGridLines = TreeViewGridLines.Vertical;
            view.ExpanderColumn = view.Columns[1];

            foreach(TreeViewColumn col in view.Columns)
            {
                col.Reorderable = true;
                col.Resizable = true;
            }

            scrollw = new ScrolledWindow();
            scrollw.Add(view);
            mainbox.PackStart(scrollw);

            buttons = new HButtonBox();
            buttons.Layout = ButtonBoxStyle.Spread;
            buttons.Spacing = 10;
            buttons.BorderWidth = 5;
            mainbox.PackStart(buttons, false, false, 0);

            Button btn_clear = new Button("gtk-clear");
            btn_clear.Label = "Vyčistit";
            btn_clear.Clicked += delegate { this.Clear(); };
            buttons.PackStart(btn_clear);

            btn_hide = new Button("gtk-hide");
            btn_hide.Label = "Schovat";
            btn_hide.Clicked += delegate { this.Hide(); };
            buttons.PackStart(btn_hide);

            btn_close = new Button("gtk-close");
            btn_close.Label = "Zavřít";
            btn_close.Clicked += delegate { this.Dispose(); };
            buttons.PackStart(btn_close);

            this.ShowAll();
        }
Пример #16
0
        private void BuildInterface()
        {
            VBox usersPane = new VBox ();
            VBox photosPane = new VBox ();
            HBox panes = new HBox ();

            #region Users pane
            usersLabel = new Label ("Users");
            usersView = new TreeView ();
            usersView.SetSizeRequest (320, 240);

            TreeViewColumn userIdColumn = new TreeViewColumn ();
            TreeViewColumn userUidColumn = new TreeViewColumn ();
            TreeViewColumn userNameColumn = new TreeViewColumn ();

            userIdColumn.Title = "ID";
            userUidColumn.Title = "UID";
            userNameColumn.Title = "Name";

            CellRendererText idRenderer = new CellRendererText ();
            CellRendererText uidRenderer = new CellRendererText ();
            CellRendererText nameRenderer = new CellRendererText ();

            userIdColumn.PackStart (idRenderer, true);
            userUidColumn.PackStart (uidRenderer, true);
            userNameColumn.PackStart (nameRenderer, true);

            userIdColumn.SetCellDataFunc (idRenderer, new TreeCellDataFunc (RenderUserId));
            userUidColumn.SetCellDataFunc (uidRenderer, new TreeCellDataFunc (RenderUserUid));
            userNameColumn.SetCellDataFunc (nameRenderer, new TreeCellDataFunc (RenderUserName));

            usersView.AppendColumn (userIdColumn);
            usersView.AppendColumn (userUidColumn);
            usersView.AppendColumn (userNameColumn);

            usersPane.PackStart (usersLabel, false, false, 8);
            usersPane.PackStart (usersView);
            #endregion

            #region Photos pane
            photosLabel = new Label ("Photos");
            addPhotoButton = new Button ("Add photo");
            deletePhotoButton = new Button ("Delete photo");

            addPhotoButton.Sensitive = false;
            deletePhotoButton.Sensitive = false;

            photoManagementButtons = new HButtonBox ();
            photoManagementButtons.LayoutStyle = ButtonBoxStyle.Start;
            photoManagementButtons.PackStart (addPhotoButton);
            photoManagementButtons.PackStart (deletePhotoButton);

            photosView = new TreeView ();
            photosView.SetSizeRequest (320, 240);
            TreeViewColumn photoIdColumn = new TreeViewColumn ();
            photoIdColumn.Title = "ID";
            TreeViewColumn photoImageColumn = new TreeViewColumn();
            photoImageColumn.Title = "Image";

            CellRendererText photoIdRenderer = new CellRendererText();
            CellRendererPixbuf imageRenderer = new CellRendererPixbuf();

            photoIdColumn.PackStart(photoIdRenderer, true);
            photoImageColumn.PackStart(imageRenderer, true);

            photoIdColumn.SetCellDataFunc(photoIdRenderer, new TreeCellDataFunc(RenderPhotoId));
            photoImageColumn.SetCellDataFunc(imageRenderer, new TreeCellDataFunc(RenderPhotoImage));

            photosView.AppendColumn (photoIdColumn);
            photosView.AppendColumn (photoImageColumn);

            ListStore photosStore = new ListStore (typeof(Photo));
            photosView.Model = photosStore;

            photosPane.PackStart (photosLabel, false, false, 8);
            photosPane.PackStart (photosView);
            photosPane.PackStart (photoManagementButtons);
            #endregion

            panes.PackStart (usersPane);
            panes.PackStart (photosPane);

            #region Control buttons
            controlButtons = new HButtonBox ();
            saveButton = new Button ("Save");
            cancelButton = new Button ("Cancel");
            controlButtons.PackStart (saveButton, false, false, 8);
            controlButtons.PackStart (cancelButton, false, false, 8);
            controlButtons.LayoutStyle = ButtonBoxStyle.End;
            #endregion

            VBox rows = new VBox ();
            rows.PackStart (panes);
            rows.PackStart (controlButtons);
            this.Add (rows);
            this.ShowAll ();

            #region Event Handlers Setup
            this.DeleteEvent += new DeleteEventHandler (OnDelete);
            usersView.CursorChanged += new EventHandler (UsersViewCursorChanged);
            addPhotoButton.Clicked += new EventHandler (AddPhotoButtonClicked);
            #endregion
        }
Пример #17
0
        private void MessageDialog(string msg)
        {
            Dialog dialog = new Dialog();
            HButtonBox buttons = new HButtonBox();
            Button ok = Button.NewWithLabel("Ok");
            buttons.PackStart(ok);

            ok.Clicked += delegate (object o, EventArgs dummy) {
                dialog.Destroy();
            };

            dialog.VBox.PackStart(new Label(msg));
            dialog.ActionArea.PackStart(buttons);
            dialog.ShowAll();
        }
Пример #18
0
        private void DeleteInvoice(object sender, EventArgs args)
        {
            string inv;
            if (SelectedInvoice(out inv)) {
                Dialog dialog = new Dialog();
                Label msg = new Label("Vill du radera fakturan " + inv + "?");
                HButtonBox buttons = new HButtonBox();
                Button yes = Button.NewWithLabel("Ja");
                Button no = Button.NewWithLabel("Nej");
                dialog.VBox.PackStart(msg);
                dialog.ActionArea.PackStart(buttons);
                buttons.PackStart(yes);
                buttons.PackStart(no);

                no.Clicked += delegate (object o, EventArgs dummy) {
                    dialog.Destroy();
                };

                yes.Clicked += delegate (object o, EventArgs dummy) {
                    InvoiceDirectory.remove(idir.PathName(inv));
                    UpdateHDList();
                    dialog.Destroy();
                };

                dialog.ShowAll();
            }
        }
Пример #19
0
        private void build()
        {
            this.Title = "New Battlelords Character";
            {
                // page 1 - intro
                Gtk.TextView tv = new Gtk.TextView();
                Gtk.TextBuffer tb;
                tb = tv.Buffer;
                //tb.Text = MediaManager.GetHtml("intro.html");
                tb.Text = "Welcome to the Battlelords Character Asistant.\n" +
                    "\nThis will guide you thru the initial player character generation. " +
                    "You will be presented with some initial options that can not change " +
                    "once the character is created. " +
                    "\nStep 1" +
                    "\nStep 2" +
                    "\nStep 3" +
                    "\nStep 4" +
                    "\nConculsion";
                tv.WrapMode = WrapMode.Word;
                tv.Editable = false;

                this.AppendPage(tv);
                this.SetPageTitle(tv, "Introduction");
                this.SetPageType(tv, AssistantPageType.Intro);
                this.SetPageComplete(tv, true);
            }
            {
                // page 2 - rolling method
                string method1 = "Percentile dice are rolled and marked down in order of the given visual statistics. " +
                    "Eight rolls are initially made. The player then makes three additional dice rolls. " +
                    "He has the option of replacing any three previously rolled statistics with one of these number. " +
                    "Players may not move rolls around! First roll is Strength, second roll is Manual Dexterity, etc.";
                Gtk.VBox vb = new Gtk.VBox();
                Gtk.HBox hb1 = new Gtk.HBox();
                Gtk.Label lb1 = new Gtk.Label("Rolling Method");
                string[] entries = {"Method 1", "Method 2", "Method 3", "Fill In"};
                Gtk.ComboBox cb1 = new Gtk.ComboBox(entries);
                hb1.PackStart(lb1, true, false , 0);
                hb1.PackEnd(cb1, true, false, 0);
                cb1.Active = 0;
                Gtk.HBox hb2 = new Gtk.HBox();
                Gtk.CheckButton b1 = new Gtk.CheckButton("Max Body Points");
                Gtk.CheckButton b2 = new Gtk.CheckButton("Max Starting Money");
                b1.Active = true;
                b2.Active = true;
                hb2.PackStart(b1, true, false, 1);
                hb2.PackEnd(b2, true, false, 1);
                Gtk.ScrolledWindow sw = new Gtk.ScrolledWindow();
                Gtk.TextView tv = new Gtk.TextView();
                tv.WrapMode = WrapMode.Word;
                tv.Editable = false;
                Gtk.TextBuffer tb = tv.Buffer;
                tb.Text = method1;
                sw.Add(tv);
                //vb.PackStart(hb1, false, false, 0);
                vb.PackStart(hb2, false, false, 0);
                //vb.PackEnd(sw, true, true, 0);

                this.AppendPage(vb);
                this.SetPageTitle(vb, "Rolling Options");
                this.SetPageType(vb, AssistantPageType.Content);
                this.SetPageComplete(vb, true);
            }
            {
                // page 3 - race
                TreeStore ts = new TreeStore(typeof(string), typeof(string));
                foreach (BattlelordsRace r in this.session.Races)
                {
                    ts.AppendValues(r.Name, r.Name);
                }
                TreeView tv = new TreeView(ts);
                tv.HeadersVisible = true;
                tv.AppendColumn("Battlelords Race", new CellRendererText(), "text", 0);

                this.AppendPage(tv);
                this.SetPageTitle(tv, "Select Race");
                this.SetPageType(tv, AssistantPageType.Content);
                this.SetPageComplete(tv, true);
            }
            {
                // page 4 - Basics page
                /*
                 * 1 char name
                 * 2 player name
                 * 3 height
                 * 4 weight
                 * 5 body pts
                 * 6 start money
                 */
                Gtk.VBox vb2 = new Gtk.VBox();

                Gtk.HBox hb1 = new Gtk.HBox();
                Gtk.Label lb1 = new Gtk.Label("Player's Name:");
                Gtk.Entry en1 = new Gtk.Entry();
                hb1.PackStart(lb1, false, false, 0);
                hb1.PackStart(new Gtk.HSeparator(), true, false, 0);
                hb1.PackEnd(en1, true, true, 0);

                Gtk.HBox hb2 = new Gtk.HBox();
                Gtk.Label lb2 = new Gtk.Label("Character's Name:");
                Gtk.Entry en2 = new Gtk.Entry();
                hb2.PackStart(lb2, false, false, 0);
                hb2.PackStart(new Gtk.HSeparator(), true, false, 0);
                hb2.PackEnd(en2, true, true, 0);

                Gtk.HBox hb3 = new Gtk.HBox();
                Gtk.Label lb3 = new Gtk.Label("Height (ft):");
                Gtk.Entry en3 = new Gtk.Entry();
                en3.Sensitive = false;
                Gtk.Button b3 = new Gtk.Button();
                //b3.Label = "roll";
                b3.TooltipText = "Click here to roll height.";
                b3.Image = MediaManager.GetImageFromBaseFile("dice.png");
                hb3.PackStart(lb3, false, false, 0);
                hb3.PackStart(new Gtk.HSeparator(), true, false, 0);
                hb3.PackStart(en3, true, true, 0);
                hb3.PackEnd(b3, false, false, 0);

                Gtk.HBox hb4 = new Gtk.HBox();
                Gtk.Label lb4 = new Gtk.Label("Weight (lbs):");
                Gtk.Entry en4 = new Gtk.Entry();
                en4.Sensitive = false;
                Gtk.Button b4 = new Gtk.Button();
                //b4.Label = "roll";
                b4.TooltipText = "Click here to roll for weight.";
                b4.Image = MediaManager.GetImageFromBaseFile("dice.png");
                hb4.PackStart(lb4, false, false, 0);
                hb4.PackStart(new Gtk.HSeparator(), true, false, 0);
                hb4.PackStart(en4, true, true, 0);
                hb4.PackEnd(b4, false, false, 0);

                Gtk.HBox hb5 = new Gtk.HBox();
                Gtk.Label lb5 = new Gtk.Label("Body Points:");
                Gtk.Entry en5 = new Gtk.Entry();
                en5.Sensitive = false;
                Gtk.Button b5 = new Gtk.Button();
                b5.TooltipText = "Click here to roll for body points.";
                b5.Image = MediaManager.GetImageFromBaseFile("dice.png");
                hb5.PackStart(lb5, false, false, 0);
                hb5.PackStart(new Gtk.HSeparator(), true, false, 0);
                hb5.PackStart(en5, true, true, 0);
                hb5.PackEnd(b5, false, false, 0);

                Gtk.HBox hb6 = new Gtk.HBox();
                Gtk.Label lb6 = new Gtk.Label("Starting Money:");
                Gtk.Entry en6 = new Gtk.Entry();
                en6.Sensitive = false;
                Gtk.Button b6 = new Gtk.Button();
                b6.TooltipText = "Click here to roll for starting money.";
                b6.Image = MediaManager.GetImageFromBaseFile("dice.png");
                hb6.PackStart(lb6, false, false, 0);
                hb6.PackStart(new Gtk.HSeparator(), true, false, 0);
                hb6.PackStart(en6, true, true, 0);
                hb6.PackEnd(b6, false, false, 0);

                vb2.PackStart(hb1, false, false, 0);
                vb2.PackStart(hb2, false, false, 0);
                vb2.PackStart(hb3, false, false, 0);
                vb2.PackStart(hb4, false, false, 0);
                vb2.PackStart(hb5, false, false, 0);
                vb2.PackStart(hb6, false, false, 0);

                this.AppendPage(vb2);
                this.SetPageTitle(vb2, "Enter Basic Information");
                this.SetPageType(vb2, AssistantPageType.Content);
                this.SetPageComplete(vb2, true);
            }
            {
                // page 5 - vitals
                VBox vb5 = new VBox();
                Gtk.Notebook nb = new Gtk.Notebook();
                //Battle.Gui.VitalsControl stvc = new Battle.Gui.VitalsControl(this.session);
                //stvc.Sensitive = false;
                VitalsControl m1vitals = new VitalsControl(this.session);
                VitalsControl m2vitals = new VitalsControl(this.session);
                VitalsControl m3vitals = new VitalsControl(this.session);
                VitalsControl fillvitals = new VitalsControl(this.session);

                m1vitals.Enabled = false;
                m2vitals.Enabled = false;
                m3vitals.Enabled = false;

                nb.AppendPage(m1vitals, new Gtk.Label("Method 1"));
                nb.AppendPage(m2vitals, new Gtk.Label("Method 2"));
                nb.AppendPage(m3vitals, new Gtk.Label("Method 3"));
                nb.AppendPage(fillvitals, new Gtk.Label("Fill In"));

                HButtonBox bb5 = new HButtonBox();
                Button rollBtn = new Button(Stock.Execute);
                rollBtn.Clicked += delegate(object sender, EventArgs e) {
                    Console.WriteLine("{0}", sender.GetType().ToString());
                };
                rollBtn.Label = "Roll";
                Button saveBtn = new Button(Stock.Save);
                saveBtn.Label = "Save";
                bb5.PackStart(rollBtn);
                bb5.PackEnd(saveBtn);
                nb.SwitchPage += delegate(object o, SwitchPageArgs args) {
                    if (args.PageNum == 3)
                    {
                        rollBtn.Sensitive = false;
                    }
                    else {
                        rollBtn.Sensitive = true;
                    }
                };

                vb5.Add(nb);
                vb5.Add(bb5);

                this.AppendPage(vb5);
                this.SetPageTitle(vb5, "Enter Vitals");
                this.SetPageType(vb5, AssistantPageType.Content);
                this.SetPageComplete(vb5, true);

            }
            {
                // page 6 - secondaries
                Gtk.Label not_completed_label = new Gtk.Label("not completed");
                Pango.FontDescription d = new Pango.FontDescription();
                d.Style =  Pango.Style.Italic;
                not_completed_label.ModifyFont(d);

                this.AppendPage(not_completed_label);
                this.SetPageTitle(not_completed_label, "Enter Secondary Attributes");
                this.SetPageType(not_completed_label, AssistantPageType.Content);
                this.SetPageComplete(not_completed_label, true);
            }
            {
                // page 7 - fate
                Gtk.Label not_completed_label = new Gtk.Label("not completed");
                Pango.FontDescription d = new Pango.FontDescription();
                d.Style =  Pango.Style.Italic;
                not_completed_label.ModifyFont(d);

                this.AppendPage(not_completed_label);
                this.SetPageTitle(not_completed_label, "Determine Fate");
                this.SetPageType(not_completed_label, AssistantPageType.Content);
                this.SetPageComplete(not_completed_label, true);
            }
            {
                // page 8 - social
                Gtk.Label not_completed_label = new Gtk.Label("not completed");
                Pango.FontDescription d = new Pango.FontDescription();
                d.Style =  Pango.Style.Italic;
                not_completed_label.ModifyFont(d);

                this.AppendPage(not_completed_label);
                this.SetPageTitle(not_completed_label, "Social Status");
                this.SetPageType(not_completed_label, AssistantPageType.Content);
                this.SetPageComplete(not_completed_label, true);
            }
            {
                // page 9 - skills
                Gtk.Label not_completed_label = new Gtk.Label("not completed");
                Pango.FontDescription d = new Pango.FontDescription();
                d.Style =  Pango.Style.Italic;
                not_completed_label.ModifyFont(d);

                this.AppendPage(not_completed_label);
                this.SetPageTitle(not_completed_label, "Choose Initial Skills");
                this.SetPageType(not_completed_label, AssistantPageType.Content);
                this.SetPageComplete(not_completed_label, true);
            }
            {
                // page 10 - matrixes
                Gtk.Label not_completed_label = new Gtk.Label("not completed");
                Pango.FontDescription d = new Pango.FontDescription();
                d.Style =  Pango.Style.Italic;
                not_completed_label.ModifyFont(d);

                this.AppendPage(not_completed_label);
                this.SetPageTitle(not_completed_label, "Choose Initial Matrixes");
                this.SetPageType(not_completed_label, AssistantPageType.Content);
                this.SetPageComplete(not_completed_label, true);
            }
            {
                // page 11 - confirm
                TextView tv11 = new TextView();
                TextBuffer b11 = tv11.Buffer;
                b11.Text = "Confirm this new character.";
                tv11.Editable = false;
                this.AppendPage(tv11);
                this.SetPageTitle(tv11, "Confirm New Character");
                this.SetPageType(tv11, AssistantPageType.Confirm);
                this.SetPageComplete(tv11, true);
            }
            this.Close += HandleHandleClose;
            this.Cancel += HandleHandleCancel;
            this.ShowAll();
        }
Пример #20
0
        private void DialogConstructPriv()
        {
            Title = "Add tag";
            IconName = "add";

            DeleteEvent += OnCancel;

            Resizable = false;
            BorderWidth = 6;

            vbox = new VBox(false, 6);
            Add(vbox);
            hbox = new HBox(false, 6);

            vbox.PackStart(hbox);

            image = new Image(Stock.Add, IconSize.Dialog);
            hbox.PackStart(image);

            table = new Table(2, 3, false);
            table.RowSpacing = 6;
            hbox.PackEnd(table);

            label = new Label();
            label.Markup = "Enter the name of the tag:";
            table.Attach(label, 1, 2, 0, 1);

            entry = new Entry();
            table.Attach(entry, 1, 2, 1, 2);

            bbox = new HButtonBox();
            bbox.Layout = ButtonBoxStyle.End;
            bbox.Spacing = 6;
            vbox.PackEnd(bbox);

            cancel_button = new Button(Stock.Cancel);
            cancel_button.Clicked += new EventHandler(OnCancel);
            bbox.PackStart(cancel_button);

            add_button = new Button(Stock.Add);
            bbox.PackEnd(add_button);
        }
Пример #21
0
        private Widget CreateBottomBar()
        {
            HButtonBox buttonBox = new HButtonBox ();
            buttonBox.Layout = ButtonBoxStyle.Edge;

            toggleSidebarButton = new Button ();
            toggleSidebarButton.Label = Catalog.GetString ("Close Sidebar");
            toggleSidebarButton.Relief = ReliefStyle.None;
            toggleSidebarButton.Clicked += OnToggleSidebarButtonClicked;
            toggleSidebarButton.Show ();
            buttonBox.PackStart (toggleSidebarButton, false, false, 0);

            personHScale = new HScale (1, 3, 1);
            personHScale.DrawValue = false;
            personHScale.ValueChanged += OnPersonHScaledValueChanged;
            personHScale.Show ();
            buttonBox.PackEnd (personHScale, false, false, 0);

            buttonBox.Show ();
            return buttonBox;
        }
Пример #22
0
        private Gtk.Widget MakeEditPage()
        {
            Gtk.VBox vbox = new Gtk.VBox (false, 0);
            vbox.BorderWidth = 6;

            Gtk.ScrolledWindow sw = new Gtk.ScrolledWindow ();
            sw.ShadowType = Gtk.ShadowType.EtchedIn;
            sw.HscrollbarPolicy = Gtk.PolicyType.Automatic;
            sw.VscrollbarPolicy = Gtk.PolicyType.Automatic;

            textView = new Gtk.TextView ();
            textView.WrapMode = Gtk.WrapMode.Word;
            textView.Editable = true;
            textView.Buffer.Text = text;
            textView.CanFocus = true;
            textView.NoShowAll = true;
            textView.SetSizeRequest (-1, 60);
            sw.Add (textView);
            sw.Show ();
            vbox.PackStart (sw, true, true, 0);

            Gtk.HButtonBox hButtonBox = new Gtk.HButtonBox ();
            hButtonBox.Layout = Gtk.ButtonBoxStyle.End;

            cancelButton = new Gtk.Button (Gtk.Stock.Cancel);
            cancelButton.Clicked += OnEditCanceled;
            cancelButton.NoShowAll = true;
            hButtonBox.PackStart (cancelButton, false, false, 0);

            saveButton = new Gtk.Button (Gtk.Stock.Save);
            saveButton.Clicked += OnSaveButtonClicked;
            saveButton.NoShowAll = true;
            hButtonBox.PackStart (saveButton, false, false, 0);

            hButtonBox.Show ();
            vbox.PackStart (hButtonBox, false, false, 6);

            vbox.Show ();
            return vbox;
        }
Пример #23
0
        private void BuildInterface()
        {
            VBox vbox = this.Child as VBox;
            HButtonBox buttonBox = new HButtonBox ();

            drawingArea = new DrawingArea ();
            drawingArea.SetSizeRequest (640, 480);

            captureButton = new Button ("Capture");
            previewButton = new Button ("Preview");
            previewButton.Sensitive = false;
            saveButton = new Button ("Save");
            saveButton.Sensitive = false;
            cancelButton = new Button ("Cancel");
            buttonBox.PackStart (captureButton);
            buttonBox.PackStart (previewButton);
            buttonBox.PackStart (saveButton);
            buttonBox.PackStart (cancelButton);
            buttonBox.LayoutStyle = ButtonBoxStyle.Center;

            vbox.PackStart (drawingArea);
            vbox.PackStart (buttonBox, false, true, 8);

            this.ShowAll ();

            this.DeleteEvent += new DeleteEventHandler(OnDelete);
            captureButton.Clicked += new EventHandler (CaptureButtonClicked);
            previewButton.Clicked += new EventHandler(PreviewButtonClicked);
            saveButton.Clicked += new EventHandler (SaveButtonClicked);
            cancelButton.Clicked += new EventHandler (CancelButtonClicked);
        }
		void Build ()
		{
			BorderWidth = 0;
			WidthRequest = 901;
			HeightRequest = 632;

			Name = "wizard_dialog";
			Title = GettextCatalog.GetString ("New Project");
			WindowPosition = WindowPosition.CenterOnParent;
			TransientFor = IdeApp.Workbench.RootWindow;

			projectConfigurationWidget = new GtkProjectConfigurationWidget ();
			projectConfigurationWidget.Name = "projectConfigurationWidget";

			// Top banner of dialog.
			var topLabelEventBox = new EventBox ();
			topLabelEventBox.Name = "topLabelEventBox";
			topLabelEventBox.HeightRequest = 52;
			topLabelEventBox.ModifyBg (StateType.Normal, bannerBackgroundColor);
			topLabelEventBox.ModifyFg (StateType.Normal, whiteColor);
			topLabelEventBox.BorderWidth = 0;

			var topBannerTopEdgeLineEventBox = new EventBox ();
			topBannerTopEdgeLineEventBox.Name = "topBannerTopEdgeLineEventBox";
			topBannerTopEdgeLineEventBox.HeightRequest = 1;
			topBannerTopEdgeLineEventBox.ModifyBg (StateType.Normal, bannerLineColor);
			topBannerTopEdgeLineEventBox.BorderWidth = 0;

			var topBannerBottomEdgeLineEventBox = new EventBox ();
			topBannerBottomEdgeLineEventBox.Name = "topBannerBottomEdgeLineEventBox";
			topBannerBottomEdgeLineEventBox.HeightRequest = 1;
			topBannerBottomEdgeLineEventBox.ModifyBg (StateType.Normal, bannerLineColor);
			topBannerBottomEdgeLineEventBox.BorderWidth = 0;

			topBannerLabel = new Label ();
			topBannerLabel.Name = "topBannerLabel";
			Pango.FontDescription font = topBannerLabel.Style.FontDescription.Copy (); // UNDONE: VV: Use FontService?
			font.Size = (int)(font.Size * 1.8);
			topBannerLabel.ModifyFont (font);
			topBannerLabel.ModifyFg (StateType.Normal, whiteColor);
			var topLabelHBox = new HBox ();
			topLabelHBox.Name = "topLabelHBox";
			topLabelHBox.PackStart (topBannerLabel, false, false, 20);
			topLabelEventBox.Add (topLabelHBox);

			VBox.PackStart (topBannerTopEdgeLineEventBox, false, false, 0);
			VBox.PackStart (topLabelEventBox, false, false, 0);
			VBox.PackStart (topBannerBottomEdgeLineEventBox, false, false, 0);

			// Main templates section.
			centreVBox = new VBox ();
			centreVBox.Name = "centreVBox";
			VBox.PackStart (centreVBox, true, true, 0);
			templatesHBox = new HBox ();
			templatesHBox.Name = "templatesHBox";
			centreVBox.PackEnd (templatesHBox, true, true, 0);

			// Template categories.
			var templateCategoriesBgBox = new EventBox ();
			templateCategoriesBgBox.Name = "templateCategoriesVBox";
			templateCategoriesBgBox.BorderWidth = 0;
			templateCategoriesBgBox.ModifyBg (StateType.Normal, categoriesBackgroundColor);
			templateCategoriesBgBox.WidthRequest = 220;
			var templateCategoriesScrolledWindow = new ScrolledWindow ();
			templateCategoriesScrolledWindow.Name = "templateCategoriesScrolledWindow";
			templateCategoriesScrolledWindow.HscrollbarPolicy = PolicyType.Never;

			// Template categories tree view.
			templateCategoriesTreeView = new TreeView ();
			templateCategoriesTreeView.Name = "templateCategoriesTreeView";
			templateCategoriesTreeView.BorderWidth = 0;
			templateCategoriesTreeView.HeadersVisible = false;
			templateCategoriesTreeView.Model = templateCategoriesListStore;
			templateCategoriesTreeView.SearchColumn = -1; // disable the interactive search
			templateCategoriesTreeView.AppendColumn (CreateTemplateCategoriesTreeViewColumn ());
			templateCategoriesScrolledWindow.Add (templateCategoriesTreeView);
			templateCategoriesBgBox.Add (templateCategoriesScrolledWindow);
			templatesHBox.PackStart (templateCategoriesBgBox, false, false, 0);

			// Templates.
			var templatesBgBox = new EventBox ();
			templatesBgBox.ModifyBg (StateType.Normal, templateListBackgroundColor);
			templatesBgBox.Name = "templatesVBox";
			templatesBgBox.WidthRequest = 400;
			templatesHBox.PackStart (templatesBgBox, false, false, 0);
			var templatesScrolledWindow = new ScrolledWindow ();
			templatesScrolledWindow.Name = "templatesScrolledWindow";
			templatesScrolledWindow.HscrollbarPolicy = PolicyType.Never;

			// Templates tree view.
			templatesTreeView = new TreeView ();
			templatesTreeView.Name = "templatesTreeView";
			templatesTreeView.HeadersVisible = false;
			templatesTreeView.Model = templatesListStore;
			templatesTreeView.SearchColumn = -1; // disable the interactive search
			templatesTreeView.AppendColumn (CreateTemplateListTreeViewColumn ());
			templatesScrolledWindow.Add (templatesTreeView);
			templatesBgBox.Add (templatesScrolledWindow);

			// Template
			var templateEventBox = new EventBox ();
			templateEventBox.Name = "templateEventBox";
			templateEventBox.ModifyBg (StateType.Normal, templateBackgroundColor);
			templatesHBox.PackStart (templateEventBox, true, true, 0);
			templateVBox = new VBox ();
			templateVBox.Visible = false;
			templateVBox.BorderWidth = 20;
			templateVBox.Spacing = 10;
			templateEventBox.Add (templateVBox);

			// Template large image.
			templateImage = new ImageView ();
			templateImage.Name = "templateImage";
			templateImage.HeightRequest = 140;
			templateImage.WidthRequest = 240;
			templateVBox.PackStart (templateImage, false, false, 10);

			// Template description.
			templateNameLabel = new Label ();
			templateNameLabel.Name = "templateNameLabel";
			templateNameLabel.WidthRequest = 240;
			templateNameLabel.Wrap = true;
			templateNameLabel.Xalign = 0;
			templateNameLabel.Markup = MarkupTemplateName ("TemplateName");
			templateVBox.PackStart (templateNameLabel, false, false, 0);
			templateDescriptionLabel = new Label ();
			templateDescriptionLabel.Name = "templateDescriptionLabel";
			templateDescriptionLabel.WidthRequest = 240;
			templateDescriptionLabel.Wrap = true;
			templateDescriptionLabel.Xalign = 0;
			templateVBox.PackStart (templateDescriptionLabel, false, false, 0);
			templateVBox.PackStart (new Label (), true, true, 0);

			// Template - button separator.
			var templateSectionSeparatorEventBox = new EventBox ();
			templateSectionSeparatorEventBox.Name = "templateSectionSeparatorEventBox";
			templateSectionSeparatorEventBox.HeightRequest = 1;
			templateSectionSeparatorEventBox.ModifyBg (StateType.Normal, templateSectionSeparatorColor);
			VBox.PackStart (templateSectionSeparatorEventBox, false, false, 0);

			// Buttons at bottom of dialog.
			var bottomHBox = new HBox ();
			bottomHBox.Name = "bottomHBox";
			VBox.PackStart (bottomHBox, false, false, 0);

			// Cancel button - bottom left.
			var cancelButtonBox = new HButtonBox ();
			cancelButtonBox.Name = "cancelButtonBox";
			cancelButtonBox.BorderWidth = 16;
			cancelButton = new Button ();
			cancelButton.Name = "cancelButton";
			cancelButton.Label = "gtk-cancel";
			cancelButton.UseStock = true;
			cancelButtonBox.PackStart (cancelButton, false, false, 0);
			bottomHBox.PackStart (cancelButtonBox, false, false, 0);

			// Previous button - bottom right.
			var previousNextButtonBox = new HButtonBox ();
			previousNextButtonBox.Name = "previousNextButtonBox";
			previousNextButtonBox.BorderWidth = 16;
			previousNextButtonBox.Spacing = 9;
			bottomHBox.PackStart (previousNextButtonBox);
			previousNextButtonBox.Layout = ButtonBoxStyle.End;

			previousButton = new Button ();
			previousButton.Name = "previousButton";
			previousButton.Label = GettextCatalog.GetString ("Previous");
			previousButton.Sensitive = false;
			previousNextButtonBox.PackEnd (previousButton);

			// Next button - bottom right.
			nextButton = new Button ();
			nextButton.Name = "nextButton";
			nextButton.Label = GettextCatalog.GetString ("Next");
			previousNextButtonBox.PackEnd (nextButton);

			// Remove default button action area.
			VBox.Remove (ActionArea);

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

			Show ();

			templatesTreeView.HasFocus = true;
			Resizable = false;
		}
Пример #25
0
        public AddFeedDialog()
            : base(WindowType.Toplevel)
        {
            Title = StringCatalog.AddFeedTitle;
            IconName = "add";

            DeleteEvent += OnCancel;

            Resizable = false;
            BorderWidth = 6;

            vbox = new VBox(false, 6);
            Add(vbox);
            hbox = new HBox(false, 6);

            vbox.PackStart(hbox);

            image = new Image(Stock.Add, IconSize.Dialog);
            hbox.PackStart(image);

            table = new Table(2, 3, false);
            table.RowSpacing = 6;
            hbox.PackEnd(table);

            label = new Label();
            label.Markup = StringCatalog.AddFeedMessage;
            table.Attach(label, 1, 2, 0, 1);

            entry = new Entry();
            entry.Activated += OnActivated;
            table.Attach(entry, 1, 2, 1, 2);

            bbox = new HButtonBox();
            bbox.Layout = ButtonBoxStyle.End;
            bbox.Spacing = 6;
            vbox.PackEnd(bbox);

            cancel_button = new Button(Stock.Cancel);
            cancel_button.Clicked += new EventHandler(OnCancel);
            bbox.PackStart(cancel_button);

            add_button = new Button(Stock.Add);
            add_button.Clicked += new EventHandler(OnAdd);
            add_button.GrabFocus();
            bbox.PackEnd(add_button);
        }
Пример #26
0
 private void CreateWidgets()
 {
     this.SetDefaultSize (500, 400);
        this.Icon = new Gdk.Pixbuf(Util.ImagesPath("ifolder16.png"));
        this.WindowPosition = Gtk.WindowPosition.Center;
        VBox vbox = new VBox (false, 0);
        this.Add (vbox);
                 vbox.Spacing = 10;
                 vbox.BorderWidth = 10;
                 AccTreeView = new iFolderTreeView();
                 ScrolledWindow sw = new ScrolledWindow();
                 sw.ShadowType = Gtk.ShadowType.EtchedIn;
                 sw.Add(AccTreeView);
                 vbox.PackStart(sw, true, true, 0);
                 AccTreeStore = new ListStore(typeof(string));
                 AccTreeView.Model = AccTreeStore;
                 TreeViewColumn serverColumn = new TreeViewColumn();
                 serverColumn.Title = Util.GS("User Name");
                 CellRendererText servercr = new CellRendererText();
                 servercr.Xpad = 5;
                 serverColumn.PackStart(servercr, false);
                 serverColumn.SetCellDataFunc(servercr,
                                                                          new TreeCellDataFunc(ServerCellTextDataFunc));
                 serverColumn.Resizable = true;
                 serverColumn.MinWidth = 150;
                 AccTreeView.AppendColumn(serverColumn);
                 TreeViewColumn nameColumn = new TreeViewColumn();
                 nameColumn.Title = Util.GS("Home Location");
                 CellRendererText ncrt = new CellRendererText();
                 nameColumn.PackStart(ncrt, false);
                 nameColumn.SetCellDataFunc(ncrt,
                                                                    new TreeCellDataFunc(NameCellTextDataFunc));
                 nameColumn.Resizable = true;
                 nameColumn.MinWidth = 175;
                 AccTreeView.AppendColumn(nameColumn);
                 AccTreeView.Selection.Mode = SelectionMode.Single;
                 AccTreeView.Selection.Changed +=
                         new EventHandler(AccSelectionChangedHandler);
                 TreeViewColumn statusColumn = new TreeViewColumn();
        statusColumn.Title = Util.GS("Status");
        CellRendererText scrt = new CellRendererText();
        statusColumn.PackStart(scrt, false);
        statusColumn.SetCellDataFunc(scrt, new TreeCellDataFunc(StatusCellTextDataFunc));
                 statusColumn.Resizable = true;
                 statusColumn.MinWidth = 75;
                 AccTreeView.AppendColumn(statusColumn);
                 HButtonBox buttonBox = new HButtonBox();
                 buttonBox.Spacing = 10;
                 buttonBox.Layout = ButtonBoxStyle.End;
                 vbox.PackStart(buttonBox, false, false, 0);
                 MigrateButton = new Button("_Migrate");
                 buttonBox.PackStart(MigrateButton);
                 MigrateButton.Clicked += new EventHandler(OnMigrateAccount);
                 DetailsButton = new Button(Gtk.Stock.Cancel);
                 buttonBox.PackStart(DetailsButton);
        this.DetailsButton.Clicked += new EventHandler(OnCancelClicked);
 }
Пример #27
0
		public Gtk.Widget MakeSyncPane ()
		{
			Gtk.VBox vbox = new Gtk.VBox (false, 0);
			vbox.Spacing = 4;
			vbox.BorderWidth = 8;

			Gtk.HBox hbox = new Gtk.HBox (false, 4);

			Gtk.Label label = new Gtk.Label (Catalog.GetString ("Ser_vice:"));
			label.Xalign = 0;
			label.Show ();
			hbox.PackStart (label, false, false, 0);

			// Populate the store with all the available SyncServiceAddins
			syncAddinStore = new Gtk.ListStore (typeof (SyncServiceAddin));
			syncAddinIters = new Dictionary<string,Gtk.TreeIter> ();
			SyncServiceAddin [] addins = Tomboy.DefaultNoteManager.AddinManager.GetSyncServiceAddins ();
			Array.Sort (addins, CompareSyncAddinsByName);
			foreach (SyncServiceAddin addin in addins) {
				Gtk.TreeIter iter = syncAddinStore.Append ();
				syncAddinStore.SetValue (iter, 0, addin);
				syncAddinIters [addin.Id] = iter;
			}

			syncAddinCombo = new Gtk.ComboBox (syncAddinStore);
			label.MnemonicWidget = syncAddinCombo;
			Gtk.CellRendererText crt = new Gtk.CellRendererText ();
			syncAddinCombo.PackStart (crt, true);
			syncAddinCombo.SetCellDataFunc (crt,
			                                new Gtk.CellLayoutDataFunc (ComboBoxTextDataFunc));

			// Read from Preferences which service is configured and select it
			// by default.  Otherwise, just select the first one in the list.
			string addin_id = Preferences.Get (
			                          Preferences.SYNC_SELECTED_SERVICE_ADDIN) as String;

			Gtk.TreeIter active_iter;
			if (addin_id != null && syncAddinIters.ContainsKey (addin_id)) {
				active_iter = syncAddinIters [addin_id];
				syncAddinCombo.SetActiveIter (active_iter);
			} else {
				if (syncAddinStore.GetIterFirst (out active_iter) == true) {
					syncAddinCombo.SetActiveIter (active_iter);
				}
			}

			syncAddinCombo.Changed += OnSyncAddinComboChanged;

			syncAddinCombo.Show ();
			hbox.PackStart (syncAddinCombo, true, true, 0);

			hbox.Show ();
			vbox.PackStart (hbox, false, false, 0);

			// Get the preferences GUI for the Sync Addin
			if (active_iter.Stamp != Gtk.TreeIter.Zero.Stamp)
				selectedSyncAddin = syncAddinStore.GetValue (active_iter, 0) as SyncServiceAddin;

			if (selectedSyncAddin != null)
				syncAddinPrefsWidget = selectedSyncAddin.CreatePreferencesControl (OnSyncAddinPrefsChanged);
			if (syncAddinPrefsWidget == null) {
				Gtk.Label l = new Gtk.Label (Catalog.GetString ("Not configurable"));
				l.Yalign = 0.5f;
				l.Yalign = 0.5f;
				syncAddinPrefsWidget = l;
			}
			if (syncAddinPrefsWidget != null && addin_id != null &&
			                syncAddinIters.ContainsKey (addin_id) && selectedSyncAddin.IsConfigured)
				syncAddinPrefsWidget.Sensitive = false;

			syncAddinPrefsWidget.Show ();
			syncAddinPrefsContainer = new Gtk.VBox (false, 0);
			syncAddinPrefsContainer.PackStart (syncAddinPrefsWidget, false, false, 0);
			syncAddinPrefsContainer.Show ();
			vbox.PackStart (syncAddinPrefsContainer, true, true, 10);

			// Autosync preference
			int timeout = (int) Preferences.Get (Preferences.SYNC_AUTOSYNC_TIMEOUT);
			if (timeout > 0 && timeout < 5) {
				timeout = 5;
				Preferences.Set (Preferences.SYNC_AUTOSYNC_TIMEOUT, 5);
			}
			Gtk.HBox autosyncBox = new Gtk.HBox (false, 5);
			// Translators: This is and the next string go together.
			// Together they look like "Automatically Sync in Background Every [_] Minutes",
			// where "[_]" is a GtkSpinButton.
			autosyncCheck =
				new Gtk.CheckButton (Catalog.GetString ("Automaticall_y Sync in Background Every"));
			autosyncSpinner = new Gtk.SpinButton (5, 1000, 1);
			autosyncSpinner.Value = timeout >= 5 ? timeout : 10;
			Gtk.Label autosyncExtraText =
				// Translators: See above comment for details on
				// this string.
				new Gtk.Label (Catalog.GetString ("Minutes"));
			autosyncCheck.Active = autosyncSpinner.Sensitive = timeout >= 5;
			EventHandler updateTimeoutPref = (o, e) => {
				Preferences.Set (Preferences.SYNC_AUTOSYNC_TIMEOUT,
				                 autosyncCheck.Active ? (int) autosyncSpinner.Value : -1);
			};
			autosyncCheck.Toggled += (o, e) => {
				autosyncSpinner.Sensitive = autosyncCheck.Active;
				updateTimeoutPref (o, e);
			};
			autosyncSpinner.ValueChanged += updateTimeoutPref;

			autosyncBox.PackStart (autosyncCheck);
			autosyncBox.PackStart (autosyncSpinner);
			autosyncBox.PackStart (autosyncExtraText);
			vbox.PackStart (autosyncBox, false, true, 0);

			Gtk.HButtonBox bbox = new Gtk.HButtonBox ();
			bbox.Spacing = 4;
			bbox.LayoutStyle = Gtk.ButtonBoxStyle.End;

			// "Advanced..." button to bring up extra sync config dialog
			Gtk.Button advancedConfigButton = new Gtk.Button (Catalog.GetString ("_Advanced..."));
			advancedConfigButton.Clicked += OnAdvancedSyncConfigButton;
			advancedConfigButton.Show ();
			bbox.PackStart (advancedConfigButton, false, false, 0);
			bbox.SetChildSecondary (advancedConfigButton, true);

			resetSyncAddinButton = new Gtk.Button (Gtk.Stock.Clear);
			resetSyncAddinButton.Clicked += OnResetSyncAddinButton;
			resetSyncAddinButton.Sensitive =
			        (selectedSyncAddin != null &&
			         addin_id == selectedSyncAddin.Id &&
			         selectedSyncAddin.IsConfigured);
			resetSyncAddinButton.Show ();
			bbox.PackStart (resetSyncAddinButton, false, false, 0);

			// TODO: Tabbing should go directly from sync prefs widget to here
			// TODO: Consider connecting to "Enter" pressed in sync prefs widget
			saveSyncAddinButton = new Gtk.Button (Gtk.Stock.Save);
			saveSyncAddinButton.Clicked += OnSaveSyncAddinButton;
			saveSyncAddinButton.Sensitive =
			        (selectedSyncAddin != null &&
			         (addin_id != selectedSyncAddin.Id || !selectedSyncAddin.IsConfigured));
			saveSyncAddinButton.Show ();
			bbox.PackStart (saveSyncAddinButton, false, false, 0);

			syncAddinCombo.Sensitive =
			        (selectedSyncAddin == null ||
			         addin_id != selectedSyncAddin.Id ||
			         !selectedSyncAddin.IsConfigured);

			bbox.Show ();
			vbox.PackStart (bbox, false, false, 0);

			vbox.ShowAll ();
			return vbox;
		}
Пример #28
0
        public void Run(object o, EventArgs e)
        {
            Console.WriteLine ("EXECUTING ExiflowRenameVersion EXTENSION");

            Window win = new Window ("window");
            dialog = new Dialog (dialog_name, win, Gtk.DialogFlags.DestroyWithParent);

            Frame frame_versions = new Frame ("new version");
            HBox hbox_versions = new HBox();
            frame_versions.Child = hbox_versions;

                // RadioButtons left
                VBox vbox_versions_left = new VBox ();
                hbox_versions.PackStart (vbox_versions_left, true, false, 0);
                // EntryBox right
                VBox vbox_versions_right = new VBox ();
                hbox_versions.PackStart (vbox_versions_right, true, false, 0);
                vbox_versions_right.PackStart (new_version_entry, true, false, 0);
                vbox_versions_right.PackStart (overwrite_file_ok, true, false, 0);

            Frame frame_resulting_filename = new Frame ("resulting filename");
            VBox vbox_resulting_filename = new VBox ();
            frame_resulting_filename.Child = vbox_resulting_filename;
                vbox_resulting_filename.PackStart (new_filename_label, true, false, 0);
                vbox_resulting_filename.PackStart (overwrite_warning_label, true, false, 0);

            new_version_entry.Changed += new EventHandler (on_new_version_entry_changed);
            overwrite_file_ok.Toggled += new EventHandler (on_overwrite_file_ok_toggled);

            gtk_cancel.UseStock = true;
            gtk_cancel.Clicked += CancelClicked;
            gtk_ok.UseStock = true;
            gtk_ok.Clicked += OkClicked;

            foreach (Photo p in App.Instance.Organizer.SelectedPhotos ()) {
                this.currentphoto = p;
                //Console.WriteLine ("MimeType: "+ Gnome.Vfs.MimeType.GetMimeTypeForUri (p.DefaultVersionUri.ToString ()));

                //uint default_id = p.DefaultVersionId;
                //Console.WriteLine ("DefaultVersionId: "+default_id);
                //string filename = GetNextIntelligentVersionFileNames (p)[0];

                string [] possiblefilenames = GetNextIntelligentVersionFileNames(p);
                new_version_entry.Text = GetVersionName(possiblefilenames[0].ToString());

                for (int i=0; i < possiblefilenames.Length; i++ ){
                    Gtk.RadioButton rb = new Gtk.RadioButton (versionrb,GetVersionName(possiblefilenames[i].ToString()));
                    rb.Clicked += new EventHandler(on_versionrb_changed);
                    vbox_versions_left.PackStart (rb, true, false, 0);

                }

                dialog.Modal = false;
                dialog.TransientFor = null;
            }

            VBox vbox_main = new VBox ();
                vbox_main.PackStart (frame_versions);
                vbox_main.PackStart (frame_resulting_filename);

            HButtonBox hbb_ok_cancel = new HButtonBox ();
                hbb_ok_cancel.PackStart (gtk_cancel, true, false, 0);
                hbb_ok_cancel.PackStart (gtk_ok, true, false, 0);

            dialog.VBox.PackStart(vbox_main, false, true,0);
            dialog.ActionArea.PackStart (hbb_ok_cancel, false,true,0);
            dialog.ShowAll();
        }
        private void InitComponents()
        {
            Resizable = true;
            HeightRequest = 425;
            WidthRequest = 410;
            WindowPosition = WindowPosition.Center;
            Icon = IconThemeUtils.LoadIcon ("banshee", 16);

            var vbox = new VBox () {
                Spacing = 6,
                BorderWidth = 12
            };

            track_info_display = new ClassicTrackInfoDisplay ();
            vbox.PackStart (track_info_display, false, false, 0);

            lyrics_browser = new LyricsBrowser ();

            lyrics_pane = new ScrolledWindow ();
            lyrics_pane.Add (lyrics_browser);

            var frame = new Frame ();
            frame.Add (lyrics_pane);

            vbox.PackStart (frame, true, true, 0);

            var button_box = new HButtonBox () {
                Spacing = 6,
                BorderWidth = 1,
                LayoutStyle = ButtonBoxStyle.End
            };

            var copy_button = new Button ("gtk-copy") {
                TooltipText = AddinManager.CurrentLocalizer.GetString ("Copy lyrics to clipboard")
            };
            var close_button = new Button ("gtk-close");
            refresh_button = new Button ("gtk-refresh");
            save_button = new Button ("gtk-save");

            button_box.PackStart (copy_button, false, false, 0);
            button_box.PackStart (refresh_button, false, false, 0);
            button_box.PackStart (save_button, false, false, 0);
            button_box.PackStart (close_button, false, false, 0);

            vbox.PackStart (button_box, false, false, 0);

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

            text_view = new TextView ();
            text_view.WrapMode = WrapMode.Word;

            Hide ();

            KeyPressEvent += OnKeyPressed;
            DeleteEvent += delegate(object o, DeleteEventArgs args) {
                OnClose (this, null);
                args.RetVal = true;
            };

            refresh_button.Clicked += OnRefresh;
            save_button.Clicked += OnSaveLyrics;
            close_button.Clicked += OnClose;
            copy_button.Clicked += OnCopy;

            lyrics_browser.AddLinkClicked += ManuallyAddLyrics;
            LyricsManager.Instance.LoadStarted += lyrics_browser.OnLoading;
            LyricsManager.Instance.LoadFinished += lyrics_browser.LoadString;
            SwitchTo (HTML_MODE);
        }
Пример #30
0
		Widget CreateButtonBox ()
		{
			var buttons = new HButtonBox () { Layout = ButtonBoxStyle.End, Spacing = 12 };

			var copy = new Button (Stock.Copy);
			copy.Clicked += CopyClicked;
			copy.Show ();

			buttons.PackStart (copy, false, true, 0);

			var close = new Button (Stock.Close);
			close.Activated += CloseClicked;
			close.Clicked += CloseClicked;
			close.Show ();

			buttons.PackStart (close, false, true, 0);

			buttons.Show ();

			return buttons;
		}
Пример #31
0
        private void InitComponents()
        {
            vbox = new Gtk.VBox (false, 4);

            /*
             * Añadiendo las cajas horizontales donde se van
             * a distribuir los widgets
             */
            hbox1 = new Gtk.HBox (false, 1);
            hbox2 = new Gtk.HBox (false, 1);
            hbox3 = new Gtk.HBox (false, 1);

            /*
             * Primera caja horizontal
             */
            texto = new Gtk.Label (
                String.Format (
                "<big><b>{0}</b></big>",
                Catalog.GetString("Welcome to Dalle.")));
            texto.UseMarkup = true;

            hbox1.PackStart(texto, false , false, 7);

            /*
             * Segunda caja horizontal
             */
            vbox2 = new Gtk.VBox (false, 3);
            texto2 = new Gtk.Label (Catalog.GetString("What do you want to do?"));

            PasteOption = new Gtk.RadioButton (Catalog.GetString ("Merge Files"));

            SplitOption = new Gtk.RadioButton (PasteOption, Catalog.GetString("Split Files"));

            vbox2.PackStart(texto2, false, false, 7);
            vbox2.PackStart(PasteOption, false , false, 7);
            vbox2.PackStart(SplitOption, false, false, 7);

            hbox2.PackStart(vbox2, false, false, 7);

            /*
             * Tercera caja horizontal
             */
            hbbox = new Gtk.HButtonBox();

            run = new Gtk.Button(Gtk.Stock.Execute);
            exit = new Gtk.Button(Gtk.Stock.Quit);
            about = new Gtk.Button(Catalog.GetString("About"));

            hbbox.PackStart(about, false, false, 7);

            hbbox.PackStart(exit, false, false, 7);
            hbbox.PackStart(run, false, false, 7);

            hbox3.PackEnd(hbbox, false ,false, 7);

            /*
             * Empaquetando las cajas horizontales en la caja
             * vertical que ocupa la ventana principal
             */
            vbox.PackStart(hbox1, false, false, 7);
            vbox.PackStart(hbox2, false, false, 7);
            vbox.PackEnd(hbox3, false, false, 7);

            this.Add (vbox);

            /*
             * Eventos
             */
            run.Clicked += new EventHandler(run_click);
            exit.Clicked += new EventHandler(exit_click);
            about.Clicked += new EventHandler(about_click);
        }