public void ShowDialog() { string message=""; message = Catalog.GetString ("Sync operation of the entire catalog or a lot of selected photos with their files \n" + "could take hours, but hopefully it will be run in background.\n" + "You can stop F-Spot any time you want, the sync job will be restarted next time you start F-Fpot.\n" + "What do you want to do?"); Gtk.Label label; label = new Gtk.Label (message); RadioSelectedPhotos = new RadioButton ("Synchronize selected photos"); RadioEntireCatalog = new RadioButton (RadioSelectedPhotos, "Synchronize entire catalog"); if (App.Instance.Organizer.SelectedPhotos ().Length > 0) RadioSelectedPhotos.Active = true; else RadioEntireCatalog.Active = true; VBox.PackStart (label, false, false, 5); VBox.PackStart (RadioSelectedPhotos, false, false, 1); VBox.PackStart (RadioEntireCatalog, false, false, 1); this.WindowPosition = WindowPosition.Center; this.AddButton ("_Run", ResponseType.Apply); this.AddButton ("_Cancel", ResponseType.Cancel); this.Response += HandleResponse; ShowAll (); }
public static Gtk.Window Create () { window = new Window ("GtkRadioButton"); window.SetDefaultSize (200, 100); VBox box1 = new VBox (false, 0); window.Add (box1); VBox box2 = new VBox (false, 10); box2.BorderWidth = 10; box1.PackStart (box2, true, true, 0); radio_button = new RadioButton ("Button 1"); box2.PackStart (radio_button, true, true, 0); radio_button = new RadioButton (radio_button, "Button 2"); radio_button.Active = true; box2.PackStart (radio_button, true, true, 0); radio_button = new RadioButton (radio_button, "Button 3"); box2.PackStart (radio_button, true, true, 0); radio_button = new RadioButton (radio_button, "Inconsistent"); radio_button.Inconsistent = true; box2.PackStart (radio_button, true, true, 0); box1.PackStart (new HSeparator (), false, true, 0); box2 = new VBox (false, 10); box2.BorderWidth = 10; box1.PackStart (box2, true, true, 0); radio_button = new RadioButton ("Button 4"); radio_button.Mode = false; box2.PackStart (radio_button, true, true, 0); radio_button = new RadioButton (radio_button, "Button 5"); radio_button.Active = true; radio_button.Mode = false; box2.PackStart (radio_button, true, true, 0); radio_button = new RadioButton (radio_button, "Button 6"); radio_button.Mode = false; box2.PackStart (radio_button, true, true, 0); box1.PackStart (new HSeparator (), false, true, 0); box2 = new VBox (false, 10); box2.BorderWidth = 10; box1.PackStart (box2, false, true, 0); Button button = new Button (Stock.Close); button.Clicked += new EventHandler (Close_Button); box2.PackStart (button, true, true, 0); button.CanDefault = true; button.GrabDefault (); return window; }
RadioButton AddBasedOnButton(VBox vbox, RadioButton previous, int type, string description) { var button = new GimpRadioButton<int>(previous, description, type, GetVariable<int>("based_on")); vbox.Add(button); return button; }
RadioButton AddEncodingButton(VBox vbox, RadioButton previous, int type, string description) { var button = new GimpRadioButton<int>(previous, description, type, GetVariable<int>("encoding")); vbox.Add(button); return button; }
public CupboardListItem(Rsvg.Handle checkimage) { this.Build(); Button = new RadioButton(""); Button.Toggled += HandleButtonToggled; this.State = Button.State; CheckImage = checkimage; drawImage.AddEvents((int)Gdk.EventMask.ButtonPressMask); }
public override void LoadPanelContents() { this.compilerParameters = (PythonCompilerParameters)((IProperties)CustomizationObject).GetProperty("Config"); dllTarget = new RadioButton (exeTarget, "dll"); SetupUI (); RestoreValues (); this.ShowAll (); }
RadioButton AddErrorCorrectionButton(VBox vbox, RadioButton previous, string type, string description) { var variable = GetVariable<string>("error_correction"); var button = new GimpRadioButton<string>(previous, type + " " + _(description), type, variable); vbox.Add(button); return button; }
public ChooserDialog(string title) { base.Title = title; base.Modal = true; base.Icon = IconLibrary.PixbufLoader.GetIcon ("main_icon.png"); base.AddButton (GettextCatalog.GetString ("_Cancel"), Gtk.ResponseType.Cancel); base.AddButton (GettextCatalog.GetString ("_Accept"), Gtk.ResponseType.Accept); base.Response += new Gtk.ResponseHandler(OnResponse); _groupButton = null; }
public override void LoadPanelContents() { configuration = (DotNetProjectConfiguration)((IProperties)CustomizationObject).GetProperty("Config"); compilerParameters = (ILAsmCompilerParameters) configuration.CompilationParameters; dllTarget = new RadioButton (exeTarget, "dll"); SetupUI (); RestoreValues (); this.ShowAll (); }
public iFolderAccessDialog(Gtk.Window parent, string userName, string rights, bool enableOwner) : base() { if(parent != null) this.TransientFor = parent; if(userName == null) this.Title = Util.GS("Access Rights for Multiple Users"); else this.Title = string.Format(Util.GS("Access Rights for {0}"), userName); this.HasSeparator = false; this.Resizable = false; this.Modal = true; this.DefaultResponse = ResponseType.Ok; this.VBox.Spacing = 10; VBox accSectionBox = new VBox(); this.VBox.PackStart(accSectionBox, false, true, 0); accSectionBox.BorderWidth = 10; Label accSectionLabel = new Label("<span weight=\"bold\">" + Util.GS("Access Rights") + "</span>"); accSectionLabel.UseMarkup = true; accSectionLabel.Xalign = 0; accSectionBox.PackStart(accSectionLabel, false, true, 0); HBox accSpacerBox = new HBox(); accSectionBox.PackStart(accSpacerBox, false, true, 0); Label accSpaceLabel = new Label(" "); accSpacerBox.PackStart(accSpaceLabel, false, true, 0); VBox accWidgetBox = new VBox(); accSpacerBox.PackStart(accWidgetBox, false, true, 0); FCButton = new RadioButton(Util.GS("Full Control")); accWidgetBox.PackStart(FCButton, false, true, 0); RWButton = new RadioButton(FCButton, Util.GS("Read/Write")); accWidgetBox.PackStart(RWButton, false, true, 0); ROButton = new RadioButton(FCButton, Util.GS("Read Only")); accWidgetBox.PackStart(ROButton, false, true, 0); VBox ownerSectionBox = new VBox(); this.VBox.PackStart(ownerSectionBox, false, true, 0); ownerSectionBox.BorderWidth = 10; OwnerButton = new CheckButton(Util.GS("Make this user the owner of the iFolder.")); ownerSectionBox.PackStart(OwnerButton, false, true, 0); if(!enableOwner) OwnerButton.Sensitive = false; OwnerButton.Toggled += new EventHandler(OwnerButtonToggled); this.VBox.ShowAll(); this.AddButton(Stock.Cancel, ResponseType.Cancel); this.AddButton(Stock.Ok, ResponseType.Ok); if(rights == "Admin") FCButton.Active = true; else if(rights == "ReadOnly") ROButton.Active = true; else RWButton.Active = true; }
public ReceiptSaveDialog(Window parent, string rawFileName) : base() { mRawFileName = rawFileName; // Laying out Title = "Save receipt for " + System.IO.Path.GetFileName(mRawFileName); SetPosition(WindowPosition.Center); SetSizeRequest(450, 180); //this.AllowGrow = false; this.SkipPagerHint = true; this.SkipTaskbarHint = true; this.HasSeparator = false; Parent = parent; mCancelButton = (Button)AddButton("Cancel", ResponseType.Cancel); mSaveButton = (Button)AddButton("Save", ResponseType.Accept); this.Default = mSaveButton; VBox radio_buttons_box = new VBox(false, 2); radio_buttons_box.BorderWidth = 6; mDefault = new RadioButton("Default receipt for this photo (no name)"); mCustom = new RadioButton(mDefault, "Custom receipt for this photo"); mClass = new RadioButton(mDefault, "A common receipt for all photos in the same folder"); radio_buttons_box.PackStart(mDefault); radio_buttons_box.PackStart(mCustom); radio_buttons_box.PackStart(mClass); VBox.Add(radio_buttons_box); HBox name_box = new HBox(false, 8); name_box.BorderWidth = 6; Image receipt_icon = new Image(); receipt_icon.Pixbuf = Gdk.Pixbuf.LoadFromResource("CatEye.UI.Gtk.res.png.cestage-small-24x24.png"); Label name_label = new Label("Name:"); ListStore name_store = new ListStore(typeof(string)); mNameComboBoxEntry = new ComboBoxEntry(name_store, 0); name_box.PackStart(receipt_icon, false, false, 0); name_box.PackStart(name_label, false, false, 0); name_box.PackStart(mNameComboBoxEntry, true, true, 0); VBox.PackStart(name_box, false, false, 0); // Adding events Shown += HandleUIChange; mDefault.Clicked += HandleUIChange; mCustom.Clicked += HandleUIChange; mClass.Clicked += HandleUIChange; mNameComboBoxEntry.Entry.Changed += HandleUIChange; this.ShowAll(); }
public CalculatorPreferences() { // TextLabel Gtk.Label method_label = new Gtk.Label (Catalog.GetString ( "Choose calculation method:")); method_label.Wrap = true; method_label.Xalign = 0; PackStart (method_label); // Radio buttons auto_radio = new Gtk.RadioButton (Catalog.GetString ( "Automatic")); PackStart (auto_radio); alternate_radio = new Gtk.RadioButton (auto_radio, Catalog.GetString("Manual")); PackStart(alternate_radio); //Check if the preferences have been set earlier and adjust buttons if (Preferences.Get(CalculatorAddin.CALCULATOR_AUTOMATIC_MODE) == null) { alternate_radio.Active = true;; }else if((bool) Preferences.Get(CalculatorAddin.CALCULATOR_AUTOMATIC_MODE)) { auto_radio.Active = true; }else{ alternate_radio.Active = true; } auto_radio.Toggled += OnSelectedRadioToggled; //Decimal settings Gtk.Label decimal_label = new Gtk.Label (Catalog.GetString ( "Choose number of decimals:")); decimal_label.Wrap = true; decimal_label.Xalign = 0; PackStart (decimal_label); Gtk.SpinButton decimal_spinner = new Gtk.SpinButton (1, 12, 1); int decimal_count; try { decimal_count = (int) Preferences.Get (CalculatorAddin.CALCULATOR_DECIMAL_COUNT); } catch (Exception) { Logger.Debug("CalcAddin: Couldn't find a preference for decimal count."); decimal_count = 3; //Defaults to 3 if no preference is set. } decimal_spinner.Value = decimal_count <= 12 ? decimal_count : 3; PackStart (decimal_spinner); decimal_spinner.Show(); decimal_spinner.ValueChanged += OnDecimalValueChanged; }
/// <summary> /// <c>LearnSymbolDatabaseChooserDialog</c>'s constructor. /// </summary> /// <param name="parent"> /// The dialog's parent dialog, to which it's modal. /// </param> /// <param name="databases"> /// The databases the user can choose from. /// </param> public LearnSymbolDatabaseChooserDialog(Window parent, List<DatabaseFileInfo> databases) { XML gxml = new XML(null, "mathtextrecognizer.glade", "learnSymbolDatabaseChooserDialog", null); gxml.Autoconnect(this); learnSymbolDatabaseChooserDialog.Modal=true; learnSymbolDatabaseChooserDialog.Resizable = false; learnSymbolDatabaseChooserDialog.TransientFor = parent; databaseHash = new Dictionary<string,DatabaseFileInfo>(); optionsTooltips = new Tooltips(); RadioButton groupRB = new RadioButton("group"); foreach(DatabaseFileInfo databaseInfo in databases) { // We add a new option per database string label = System.IO.Path.GetFileName(databaseInfo.Path); RadioButton optionRB = new RadioButton(groupRB, label); optionRB.Clicked += new EventHandler(OnOptionRBClicked); optionsVB.Add(optionRB); MathTextDatabase database = databaseInfo.Database; optionsTooltips.SetTip(optionRB, String.Format("{0}\n{1}", database.ShortDescription, database.Description), "database description"); databaseHash.Add(label, databaseInfo); } // We add the option of creating a new database. newRB = new RadioButton(groupRB, "Crear nueva base de datos"); newRB.Clicked += new EventHandler(OnOptionRBClicked); optionsVB.Add(newRB); optionsTooltips.SetTip(newRB, "Te permite crear una base de datos nueva", "new databse description"); optionsTooltips.Enable(); learnSymbolDatabaseChooserDialog.ShowAll(); }
// creates the add window user interface public AddWindow() : base(Global.Core.Fuse.MainWindow, "Add Media") { VBox backbone = new VBox (false, 0); Button directory = new Button ("Add Directory"); Button files = new Button ("Add Files"); Button create_list = new Button ("Create Playlist"); RadioButton library = new RadioButton ("Add to Library"); RadioButton playlist = new RadioButton (library, "Add to Playlist"); // hook up widget events directory.Clicked += directory_clicked; files.Clicked += files_clicked; create_list.Clicked += create_list_clicked; library.Toggled += library_toggled; playlist.Toggled += playlist_toggled; // setup playlist combo box combo.Sensitive = false; combo.Model = Global.Core.Library.PlaylistTree.PlaylistStore; CellRendererText text = new CellRendererText (); combo.PackStart (text, true); combo.SetCellDataFunc (text, render); TreeIter iter; bool not_empty = combo.Model.GetIterFirst (out iter); playlist.Sensitive = not_empty; if (not_empty) combo.SetActiveIter (iter); // pack widgets backbone.PackStart (directory, false, false, 0); backbone.PackStart (files, false, false, 5); backbone.PackStart (create_list, false, false, 0); backbone.PackStart (new HSeparator (), false, false, 10); backbone.PackStart (library, false, false, 0); backbone.PackStart (playlist, false, false, 0); backbone.PackStart (combo, false, false, 0); backbone.BorderWidth = 15; this.Resizable = false; this.SkipPagerHint = true; this.SkipTaskbarHint = true; this.Add (backbone); }
public AggregationKindViewer(IBroadcaster hub) { _hub = hub; base.PackStart(new Gtk.Label (GettextCatalog.GetString ("Aggregation kind:")), false, false, 2); // none _none = new Gtk.RadioButton (GettextCatalog.GetString ("none")); _none.Toggled += new EventHandler(ToggledHandler); base.PackStart(_none, false, false, 5); // shared _shared = new Gtk.RadioButton(_none, GettextCatalog.GetString ("shared")); _shared.Toggled += new EventHandler(ToggledHandler); base.PackStart(_shared, false, false, 5); // composite _composite = new Gtk.RadioButton(_none, GettextCatalog.GetString ("composite")); _composite.Toggled += new EventHandler(ToggledHandler); base.PackStart(_composite, false, false, 5); }
//step 1 private void AskForClient() { this.CheckPacks(); //config this.Header = ""; this.Description = "¿Es un cliente existente, o se creará uno nuevo?"; this.CanGoPrevious = true; //go! this.ClearContentBox(); this.NewClientButton = new RadioButton(null, "Crear nuevo cliente"); this.ExistingClientButton = new RadioButton(this.NewClientButton, "Usar un cliente existente"); this.PackWidgetSingle(this.ExistingClientButton); this.PackWidgetSingle(this.NewClientButton); this.ContentVBox.ShowAll(); }
public ConfigurationDialog(AlbumArtWriterService service) : base(AddinManager.CurrentLocalizer.GetString ("Album Art Writer Configuration")) { this.service = service; Frame artframe = new Frame("artbox_frame"); artframe.Label = AddinManager.CurrentLocalizer.GetString("Output File Name (No Extension)"); HBox artname_box = new HBox (); artname_box.PackStart (new Label (AddinManager.CurrentLocalizer.GetString ("File Name:")), false, false, 0); artname_entry = new Entry (); artname_box.PackStart (artname_entry, true, true, 3); artframe.Add(artname_box); artframe.ShadowType = (ShadowType) 4; VBox.PackStart( artframe,false,false,3); Frame fileframe = new Frame("artbox_frame"); fileframe.Label = AddinManager.CurrentLocalizer.GetString("Output File type"); HBox image_radio_button_h_box = new HBox (); jpg = new RadioButton (null, "JPG File"); png = new RadioButton (jpg, "PNG File"); image_radio_button_h_box.PackStart(jpg, false, false, 3); image_radio_button_h_box.PackStart(png, false, false, 3); fileframe.Add(image_radio_button_h_box); fileframe.ShadowType = (ShadowType) 4; VBox.PackStart (fileframe, false, false, 3); AddDefaultCloseButton (); ShowAll(); // initialize values artname_entry.Text = service.ArtName; if (service.JPG){ jpg.Activate(); } else if (service.PNG) { png.Activate(); } // attach change handlers artname_entry.Changed += new EventHandler (on_ArtName_Changed); jpg.Toggled += new EventHandler(on_Radio_Clicked); png.Toggled += new EventHandler(on_Radio_Clicked); }
protected Gtk.RadioButton AddButton(Gtk.VBox vbox, string label, EventHandler handler) { Gtk.RadioButton btn; if (_groupButton != null) { btn = new Gtk.RadioButton (_groupButton, label); } else { btn = new Gtk.RadioButton (label); _groupButton = btn; btn.Toggle (); btn.Active = true; } btn.Toggled += handler; btn.KeyPressEvent += OnKeyPressEvent; vbox.Add (btn); btn.Show(); return btn; }
public NamedElementVisibilityViewer(IBroadcaster hub) { _hub = hub; base.PackStart(new Gtk.Label (GettextCatalog.GetString ("Visibility:")), false, false, 2); // public _public = new Gtk.RadioButton (GettextCatalog.GetString ("public")); _public.Toggled += new EventHandler(ToggledHandler); base.PackStart(_public, false, false, 5); // private _private = new Gtk.RadioButton(_public, GettextCatalog.GetString ("private")); _private.Toggled += new EventHandler(ToggledHandler); base.PackStart(_private, false, false, 5); // protected _protected = new Gtk.RadioButton(_public, GettextCatalog.GetString ("protected")); _protected.Toggled += new EventHandler(ToggledHandler); base.PackStart(_protected, false, false, 5); // package _package = new Gtk.RadioButton(_public, GettextCatalog.GetString ("package")); _package.Toggled += new EventHandler(ToggledHandler); base.PackStart(_package, false, false, 5); }
public ParameterDirectionKindViewer(IBroadcaster hub) { _hub = hub; base.PackStart(new Gtk.Label(GettextCatalog.GetString ("Direction:")), false, false, 2); // public _in = new Gtk.RadioButton("in"); _in.Toggled += new EventHandler(ToggledHandler); base.PackStart(_in, false, false, 5); // private _inout = new Gtk.RadioButton(_in, "inout"); _inout.Toggled += new EventHandler(ToggledHandler); base.PackStart(_inout, false, false, 5); // protected _out = new Gtk.RadioButton(_in, "out"); _out.Toggled += new EventHandler(ToggledHandler); base.PackStart(_out, false, false, 5); // package _return = new Gtk.RadioButton(_in, GettextCatalog.GetString ("return")); _return.Toggled += new EventHandler(ToggledHandler); base.PackStart(_return, false, false, 5); }
public MainWindow() : base(Gtk.WindowType.Toplevel) { SetDefaultSize(200, -1); var table = new Gtk.Table(5, 5, true); var separator = new Gtk.HSeparator(); var label0 = new Gtk.Label("Select file to copy/move"); _fileCopy = new Gtk.FileChooserButton("Select A File", Gtk.FileChooserAction.Open); _radioCopy = new Gtk.RadioButton("Copy"); _radioMove = new Gtk.RadioButton(_radioCopy, "Move"); var copyButton = new Gtk.Button("Copy"); Add(table); table.Attach(label0, 0, 4, 0, 1); table.Attach(_fileCopy, 0, 1, 1, 2); table.Attach(_radioCopy, 1, 2, 1, 2); table.Attach(_radioMove, 2, 3, 1, 2); table.Attach(copyButton, 3, 4, 1, 2); table.Attach(separator, 0, 4, 2, 3); var label1 = new Gtk.Label("Select destination for file(s)"); _folder = new Gtk.FileChooserButton("Select A File", Gtk.FileChooserAction.SelectFolder); var pasteButton = new Gtk.Button("Paste"); table.Attach(label1, 0, 4, 3, 4); table.Attach(_folder, 0, 1, 4, 5); table.Attach(pasteButton, 3, 4, 4, 5); DeleteEvent += OnDeleteEvent; copyButton.Clicked += OnCopyButtonClick; pasteButton.Clicked += OnPasteButtonClick; ShowAll(); }
void assignPorts(ArrayList ports, Gtk.RadioButton radio1, Gtk.RadioButton radio2, Gtk.RadioButton radio3, Gtk.RadioButton radio4, Gtk.RadioButton radio5) { int count = 1; foreach (string port in ports) { switch (count) { case 1: radio1.Label = port; radio1.Visible = true; break; case 2: radio2.Label = port; radio2.Visible = true; break; case 3: radio3.Label = port; radio3.Visible = true; break; case 4: radio4.Label = port; radio4.Visible = true; break; case 5: radio5.Label = port; radio5.Visible = true; break; } count++; } }
private string readSelectedRadioButton(Gtk.RadioButton radio1, Gtk.RadioButton radio2, Gtk.RadioButton radio3, Gtk.RadioButton radio4, Gtk.RadioButton radio5) { if (radio1.Active) { return(radio1.Label); } else if (radio2.Active) { return(radio2.Label); } else if (radio3.Active) { return(radio3.Label); } else if (radio4.Active) { return(radio4.Label); } else //if(radio5.Active) { return(radio5.Label); } }
internal PropertyGrid(EditorManager editorManager) { this.editorManager = editorManager; #region Toolbar PropertyGridToolbar tb = new PropertyGridToolbar (); base.PackStart (tb, false, false, 0); toolbar = tb; catButton = new RadioButton ((Gtk.RadioButton)null); catButton.DrawIndicator = false; catButton.Relief = ReliefStyle.None; Gdk.Pixbuf pixbuf = null; // try { // pixbuf = new Gdk.Pixbuf (typeof (PropertyGrid).Assembly, "MonoDevelop.Components.PropertyGrid.SortByCat.png"); // } catch {} //(Exception e) { //LoggingService.LogError ("Can't create pixbuf from resource: MonoDevelop.Components.PropertyGrid.SortByCat.png", e); //} if (pixbuf != null) { catButton.Image = new Gtk.Image (pixbuf); catButton.Image.Show (); } catButton.TooltipText = "Sort in categories"; catButton.Toggled += new EventHandler (toolbarClick); toolbar.Insert (catButton, 0); alphButton = new RadioButton (catButton); alphButton.DrawIndicator = false; alphButton.Relief = ReliefStyle.None; alphButton.Image = new Gtk.Image (Stock.SortAscending, IconSize.Menu); alphButton.Image.Show (); alphButton.TooltipText = "Sort alphabetically"; alphButton.Clicked += new EventHandler (toolbarClick); toolbar.Insert (alphButton, 1); catButton.Active = true; toolbar.Insert (new SeparatorToolItem (), 2); helpButton = new ToggleButton (); helpButton.Relief = ReliefStyle.None; helpButton.Image = new Gtk.Image (Gtk.Stock.Help, IconSize.Menu); helpButton.TooltipText = "Show help panel"; helpButton.Clicked += delegate { ShowHelp = helpButton.Active; //MonoDevelop.Core.PropertyService.Set (PROP_HELP_KEY, helpButton.Active); }; toolbar.Insert (helpButton, 3); #endregion vpaned = new VPaned (); tree = new PropertyGridTree (editorManager, this); tree.Changed += delegate { Update (); }; VBox tbox = new VBox (); toolbarSeparator = new HSeparator (); toolbarSeparator.Visible = true; tbox.PackStart (toolbarSeparator, false, false, 0); tbox.PackStart (tree, true, true, 0); helpSeparator = new HSeparator (); tbox.PackStart (helpSeparator, false, false, 0); helpSeparator.NoShowAll = true; vpaned.Pack1 (tbox, true, true); AddPropertyTab (new DefaultPropertyTab ()); AddPropertyTab (new EventPropertyTab ()); base.PackEnd (vpaned); base.FocusChain = new Gtk.Widget [] { vpaned }; //helpButton.Active = ShowHelp = MonoDevelop.Core.PropertyService.Get<bool> (PROP_HELP_KEY, true); Populate (); UpdateTabs (); }
private void Init() { Logger.Debug("Called Init"); this.Icon = Utilities.GetIcon("giver-48", 48); // Update the window title this.Title = string.Format("Giver Preferences"); //this.DefaultSize = new Gdk.Size (300, 500); this.VBox.Spacing = 0; this.VBox.BorderWidth = 0; this.SetDefaultSize(450, 100); this.AddButton(Stock.Close, Gtk.ResponseType.Ok); this.DefaultResponse = ResponseType.Ok; // Start with an event box to paint the background white EventBox eb = new EventBox(); eb.Show(); eb.BorderWidth = 0; eb.ModifyBg(StateType.Normal, new Gdk.Color(255, 255, 255)); eb.ModifyBase(StateType.Normal, new Gdk.Color(255, 255, 255)); VBox mainVBox = new VBox(); mainVBox.BorderWidth = 10; mainVBox.Spacing = 5; mainVBox.Show(); eb.Add(mainVBox); this.VBox.PackStart(eb); Label label = new Label(); label.Show(); label.Justify = Gtk.Justification.Left; label.SetAlignment(0.0f, 0.5f); label.LineWrap = false; label.UseMarkup = true; label.UseUnderline = false; label.Markup = "<span weight=\"bold\" size=\"large\">Your Name</span>"; mainVBox.PackStart(label, true, true, 0); // Name Box at the top of the Widget HBox nameBox = new HBox(); nameBox.Show(); nameEntry = new Entry(); nameEntry.Show(); nameBox.PackStart(nameEntry, true, true, 0); nameBox.Spacing = 10; mainVBox.PackStart(nameBox, false, false, 0); label = new Label(); label.Show(); label.Justify = Gtk.Justification.Left; label.SetAlignment(0.0f, 0.5f); label.LineWrap = false; label.UseMarkup = true; label.UseUnderline = false; label.Markup = "<span weight=\"bold\" size=\"large\">Your Picture</span>"; mainVBox.PackStart(label, true, true, 0); Gtk.Table table = new Table(4, 3, false); table.Show(); // None Entry noneButton = new RadioButton((Gtk.RadioButton)null); noneButton.Show(); table.Attach(noneButton, 0, 1, 0, 1, AttachOptions.Shrink, AttachOptions.Shrink, 0, 0); VBox vbox = new VBox(); vbox.Show(); Gtk.Image image = new Image(Utilities.GetIcon("computer", 48)); image.Show(); vbox.PackStart(image, false, false, 0); label = new Label("None"); label.Show(); vbox.PackStart(label, false, false, 0); table.Attach(vbox, 1, 2, 0, 1, AttachOptions.Shrink, AttachOptions.Shrink, 0, 0); vbox = new VBox(); vbox.Show(); table.Attach(vbox, 2, 3, 1, 2, AttachOptions.Expand | AttachOptions.Fill, AttachOptions.Expand | AttachOptions.Fill, 0, 0); // Local Entry localButton = new RadioButton(noneButton); localButton.Show(); table.Attach(localButton, 0, 1, 1, 2, AttachOptions.Shrink, AttachOptions.Shrink, 0, 0); vbox = new VBox(); vbox.Show(); localImage = new Image(Utilities.GetIcon("stock_person", 48)); localImage.Show(); vbox.PackStart(localImage, false, false, 0); label = new Label("File"); label.Show(); vbox.PackStart(label, false, false, 0); table.Attach(vbox, 1, 2, 1, 2, AttachOptions.Shrink, AttachOptions.Shrink, 0, 0); photoButton = new Button("Change Photo"); photoButton.Show(); table.Attach(photoButton, 2, 3, 1, 2, AttachOptions.Expand | AttachOptions.Fill, AttachOptions.Shrink, 0, 0); // Web Entry webButton = new RadioButton(noneButton); webButton.Show(); table.Attach(webButton, 0, 1, 2, 3, AttachOptions.Shrink, AttachOptions.Shrink, 0, 0); vbox = new VBox(); vbox.Show(); image = new Image(Utilities.GetIcon("web-browser", 48)); image.Show(); vbox.PackStart(image, false, false, 0); label = new Label("Web Link"); label.Show(); vbox.PackStart(label, false, false, 0); table.Attach(vbox, 1, 2, 2, 3, AttachOptions.Shrink, AttachOptions.Shrink, 0, 0); webEntry = new Entry(); webEntry.Show(); table.Attach(webEntry, 2, 3, 2, 3, AttachOptions.Expand | AttachOptions.Fill, AttachOptions.Expand | AttachOptions.Fill, 0, 0); // Gravatar Entry gravatarButton = new RadioButton(noneButton); gravatarButton.Show(); table.Attach(gravatarButton, 0, 1, 3, 4, AttachOptions.Shrink, AttachOptions.Shrink, 0, 0); vbox = new VBox(); vbox.Show(); image = new Image(Utilities.GetIcon("gravatar", 48)); image.Show(); vbox.PackStart(image, false, false, 0); label = new Label("Gravatar"); label.Show(); vbox.PackStart(label, false, false, 0); table.Attach(vbox, 1, 2, 3, 4, AttachOptions.Shrink, AttachOptions.Shrink, 0, 0); gravatarEntry = new Entry(); gravatarEntry.Show(); table.Attach(gravatarEntry, 2, 3, 3, 4, AttachOptions.Expand | AttachOptions.Fill, AttachOptions.Expand | AttachOptions.Fill, 0, 0); mainVBox.PackStart(table, true, true, 0); label = new Label(); label.Show(); label.Justify = Gtk.Justification.Left; label.SetAlignment(0.0f, 0.5f); label.LineWrap = false; label.UseMarkup = true; label.UseUnderline = false; label.Markup = "<span weight=\"bold\" size=\"large\">Your File Location</span>"; mainVBox.PackStart(label, true, true, 0); fileLocationButton = new FileChooserButton("Select storage location", FileChooserAction.SelectFolder); fileLocationButton.Show(); mainVBox.PackStart(fileLocationButton, true, true, 0); table = new Table(2, 3, false); table.Show(); // Port number section label = new Label(); label.Show(); label.Justify = Gtk.Justification.Left; label.SetAlignment(0.0f, 0.5f); label.LineWrap = false; label.UseMarkup = true; label.UseUnderline = false; label.Markup = "<span weight=\"bold\" size=\"large\">Port Number</span>"; mainVBox.PackStart(label, true, true, 0); // any port Entry anyPortButton = new RadioButton((Gtk.RadioButton)null); anyPortButton.Show(); table.Attach(anyPortButton, 0, 1, 0, 1, AttachOptions.Shrink, AttachOptions.Shrink, 0, 0); vbox = new VBox(); vbox.Show(); label = new Label(); label.Show(); label.Justify = Gtk.Justification.Left; label.SetAlignment(0.0f, 0.5f); label.LineWrap = false; label.UseMarkup = true; label.UseUnderline = false; label.Markup = "Any available port"; vbox.PackStart(label, false, false, 0); table.Attach(vbox, 1, 2, 0, 1, AttachOptions.Shrink, AttachOptions.Shrink, 0, 0); // fixed port Entry fixedPortButton = new RadioButton(anyPortButton); fixedPortButton.Show(); table.Attach(fixedPortButton, 0, 1, 1, 2, AttachOptions.Shrink, AttachOptions.Shrink, 0, 0); label = new Label(); label.Show(); label.Justify = Gtk.Justification.Left; label.SetAlignment(0.0f, 0.5f); label.LineWrap = false; label.UseMarkup = true; label.UseUnderline = false; label.Markup = "Use a fixed port"; table.Attach(label, 1, 2, 1, 2, AttachOptions.Expand | AttachOptions.Fill, AttachOptions.Expand | AttachOptions.Fill, 0, 0); portNumberEntry = new Entry(); portNumberEntry.Show(); table.Attach(portNumberEntry, 2, 3, 1, 2, AttachOptions.Expand | AttachOptions.Fill, AttachOptions.Expand | AttachOptions.Fill, 0, 0); mainVBox.PackStart(table, true, true, 0); DeleteEvent += WindowDeleted; }
public void ShowServerForm() { Reset (); VBox layout_vertical = new VBox (false, 0); Label header = new Label ("<span size='large'><b>" + _("Where is your remote folder?") + "</b></span>") { UseMarkup = true, Xalign = 0 }; Table table = new Table (7, 2, false) { RowSpacing = 12 }; HBox layout_server = new HBox (true, 0); ServerEntry = new SparkleEntry () { ExampleText = _("address-to-server.com") }; ServerEntry.Changed += CheckServerForm; RadioButton radio_button = new RadioButton ("<b>" + _("On my own server:") + "</b>"); layout_server.Add (radio_button); layout_server.Add (ServerEntry); string github_text = "<b>" + "Github" + "</b>\n" + "<span fgcolor='" + SecondaryTextColor + "' size='small'>" + _("Free hosting for Free and Open Source Software projects.") + "\n" + _("Also has paid accounts for extra private space and bandwidth.") + "</span>"; RadioButton radio_button_github = new RadioButton (radio_button, github_text); (radio_button_github.Child as Label).UseMarkup = true; (radio_button_github.Child as Label).Wrap = true; string gnome_text = "<b>" + _("The GNOME Project") + "</b>\n" + "<span fgcolor='" + SecondaryTextColor + "' size='small'>" + _("GNOME is an easy to understand interface to your computer.") + "\n" + _("Select this option if you’re a developer or designer working on GNOME.") + "</span>"; RadioButton radio_button_gnome = new RadioButton (radio_button, gnome_text); (radio_button_gnome.Child as Label).UseMarkup = true; (radio_button_gnome.Child as Label).Wrap = true; string gitorious_text = "<b>" + _("Gitorious") + "</b>\n" + "<span fgcolor='" + SecondaryTextColor + "' size='small'>" + _("Completely Free as in Freedom infrastructure.") + "\n" + _("Free accounts for Free and Open Source projects.") + "</span>"; RadioButton radio_button_gitorious = new RadioButton (radio_button, gitorious_text) { Xalign = 0 }; (radio_button_gitorious.Child as Label).UseMarkup = true; (radio_button_gitorious.Child as Label).Wrap = true; radio_button_github.Toggled += delegate { if (radio_button_github.Active) FolderEntry.ExampleText = _("Username/Folder"); }; radio_button_gitorious.Toggled += delegate { if (radio_button_gitorious.Active) FolderEntry.ExampleText = _("Project/Folder"); }; radio_button_gnome.Toggled += delegate { if (radio_button_gnome.Active) FolderEntry.ExampleText = _("Project"); }; radio_button.Toggled += delegate { if (radio_button.Active) { FolderEntry.ExampleText = _("Folder"); ServerEntry.Sensitive = true; CheckServerForm (); } else { ServerEntry.Sensitive = false; CheckServerForm (); } ShowAll (); }; table.Attach (layout_server, 0, 2, 1, 2); table.Attach (radio_button_github, 0, 2, 2, 3); table.Attach (radio_button_gitorious, 0, 2, 3, 4); table.Attach (radio_button_gnome, 0, 2, 4, 5); HBox layout_folder = new HBox (true, 0); FolderEntry = new SparkleEntry () { ExampleText = _("Folder") }; FolderEntry.Changed += CheckServerForm; Label folder_label = new Label (_("Folder Name:")) { UseMarkup = true, Xalign = 1 }; (radio_button.Child as Label).UseMarkup = true; layout_folder.PackStart (folder_label, true, true, 12); layout_folder.PackStart (FolderEntry, true, true, 0); SyncButton = new Button (_("Sync")); SyncButton.Clicked += delegate { string folder_name = FolderEntry.Text; string server = ServerEntry.Text; string canonical_name = System.IO.Path.GetFileNameWithoutExtension (folder_name); if (radio_button_gitorious.Active) server = "gitorious.org"; if (radio_button_github.Active) server = "github.com"; if (radio_button_gnome.Active) server = "gnome.org"; Application.Invoke (delegate { Deletable = false; ShowSyncingPage (canonical_name); }); SparkleShare.Controller.FolderFetched += delegate { Application.Invoke (delegate { this.progress_bar_pulse_timer.Stop (); Deletable = true; UrgencyHint = true; ShowSuccessPage (canonical_name); }); }; SparkleShare.Controller.FolderFetchError += delegate { Application.Invoke (delegate { this.progress_bar_pulse_timer.Stop (); Deletable = true; ShowErrorPage (); }); }; SparkleShare.Controller.FetchFolder (server, folder_name); }; if (ServerFormOnly) { Button cancel_button = new Button (_("Cancel")); cancel_button.Clicked += delegate { Close (); }; AddButton (cancel_button); } else { Button skip_button = new Button (_("Skip")); skip_button.Clicked += delegate { ShowCompletedPage (); }; AddButton (skip_button); } AddButton (SyncButton); layout_vertical.PackStart (header, false, false, 0); layout_vertical.PackStart (new Label (""), false, false, 3); layout_vertical.PackStart (table, false, false, 0); layout_vertical.PackStart (layout_folder, false, false, 6); Add (layout_vertical); CheckServerForm (); ShowAll (); }
private Widget CreateMoreOptionsExpander(string defaultDomainID) { optionsExpander = new Expander(Util.GS("More options")); optionsExpander.Activated += new EventHandler(OnOptionsExpanded); optionsExpander.Activate(); Table optionsTable = new Table(2, 3, false); optionsExpander.Add(optionsTable); optionsTable.ColumnSpacing = 10; optionsTable.RowSpacing = 10; optionsTable.SetColSpacing(0, 30); Label l = new Label(Util.GS("iFolder account")); l.Xalign = 0; optionsTable.Attach(l, 1,2,0,1, AttachOptions.Shrink | AttachOptions.Fill, 0,0,0); Encryption = new RadioButton(Util.GS("Passphrase Encryption")); optionsTable.Attach(Encryption, 2,3,1,2, AttachOptions.Shrink | AttachOptions.Fill, 0,0,0); Regular = new RadioButton(Encryption, Util.GS("Regular")); optionsTable.Attach(Regular, 3,4,1,2, AttachOptions.Shrink | AttachOptions.Fill, 0,0,0); SecureSync = new CheckButton(Util.GS("Secure Sync")); optionsTable.Attach(SecureSync, 4,5,1,2, AttachOptions.Shrink | AttachOptions.Fill, 0,0,0); l = new Label(Util.GS("Security")); l.Xalign = 0; optionsTable.Attach(l, 1,2,1,2, AttachOptions.Shrink | AttachOptions.Fill, 0,0,0); domainComboBox = ComboBox.NewText(); optionsTable.Attach(domainComboBox, 2,3,0,1, AttachOptions.Expand | AttachOptions.Fill, 0,0,0); int defaultDomain = 0; for (int x = 0; x < domains.Length; x++) { domainComboBox.AppendText(string.Format(domains[x].Name + " - " + domains[x].Host)); if (defaultDomainID != null) { if (defaultDomainID == domains[x].ID) defaultDomain = x; } else defaultDomain = x; } domainComboBox.Active = defaultDomain; int SecurityPolicy = ifws.GetSecurityPolicy(this.DomainID); ChangeStatus(SecurityPolicy); optionsTable.ShowAll(); return optionsExpander; }
protected TagListTab(Builder builder, IntPtr handle) : base(builder, handle) { builder.Autoconnect(this); foreach (var typeValue in Enum.GetValues(typeof(TagDetails.TagType))) { TagDetails.TagType type = (TagDetails.TagType)typeValue; Gtk.RadioButton button; if (this.typeButtons.Count == 0) { button = new Gtk.RadioButton(""); } else { button = new Gtk.RadioButton(this.typeButtons [0]); } button.Label = type.ToString(); this.typeButtons.Add(button); this.TagTypeBox.PackStart(button, true, true, 2); button.ShowAll(); button.CanFocus = false; button.Toggled += (sender, e) => { if (!this.loadingTag) { this.SetTagType(type); } }; } this.ImpliesTreeView.AppendColumn("Tag", new CellRendererText(), "text", 0); this.impliesStore = new ListStore(typeof(string)); this.ImpliesTreeView.Model = this.impliesStore; this.allTagsStore = new ListStore(typeof(int), typeof(string), typeof(float), typeof(int), typeof(string), typeof(TagDetails)); AddColumnText("ID", 0); AddColumnText("Usage", 3); AddColumnText("Tag", 1); AddColumnText("Score", 2); AddColumnText("Type", 4); this.filter = new TreeModelFilter(this.allTagsStore, null); this.filter.VisibleFunc = ((ITreeModel model, TreeIter iter) => { if (string.IsNullOrWhiteSpace(this.filterString)) { return(true); } lock (model) { string tagString = model.GetValue(iter, 1) as string; if (string.IsNullOrEmpty(tagString)) { return(true); } return(tagString.Contains(filterString)); } }); this.TagTreeView.HeadersClickable = true; this.TagTreeView.Model = this.allTagsStore; //this.filter; this.TagTreeView.CursorChanged += OnTagsCursorChanged; this.Sensitive = false; BooruApp.BooruApplication.EventCenter.DatabaseLoadStarted += this.OnDatabaseLoadStarted; BooruApp.BooruApplication.EventCenter.DatabaseLoadSucceeded += this.OnDatabaseLoadSucceeded; BooruApp.BooruApplication.EventCenter.WillQuit += this.OnWillQuit; }
/// <summary> /// setup fields like: store password:yes/no and the actual password entry, /// if it should be stored /// </summary> /// <param name="insertTo"></param> /// <param name="defaultSpacing"></param> void SetupGuiEncryptionRelated(Gtk.Box insertTo, int defaultSpacing) { Gtk.HBox customBox = new Gtk.HBox(false, defaultSpacing); insertTo.PackStart(customBox); rbt_storePw = new Gtk.RadioButton(Catalog.GetString("_Store password")); customBox.PackStart(rbt_storePw); customBox = new Gtk.HBox(false, defaultSpacing); insertTo.PackStart(customBox); // --- Password Boxes --- #if WIN32 && DPAPI String pw = DPAPIUtil.getPassword(); #else String pw = Convert.ToString(Preferences.Get(AddinPreferences.SYNC_PRIVATENOTES_PASSWORD)); #endif pw = (pw == null) ? "" : pw; Gtk.VBox pwbox = new Gtk.VBox(false, defaultSpacing); Gtk.HBox superbox = new Gtk.HBox(false, defaultSpacing); superbox.PackStart(new Gtk.Alignment(0, 0, 200, 0)); // spacer superbox.PackStart(pwbox); customBox.PackStart(superbox); stored_pw = new Gtk.Entry(); // set password style: stored_pw.InvisibleChar = '*'; stored_pw.Visibility = false; stored_pw.Text = pw; pwbox.PackStart(stored_pw); stored_pw2 = new Gtk.Entry(); // set password style: stored_pw2.InvisibleChar = '*'; stored_pw2.Visibility = false; stored_pw2.Text = pw; pwbox.PackStart(stored_pw2); match_label = new Gtk.Label(); match_label.Markup = Catalog.GetString(AddinPreferences.MATCH_TEXT); pwbox.PackStart(match_label); customBox = new Gtk.HBox(false, defaultSpacing); insertTo.PackStart(customBox); // give the first rbt here to link the 2 rbt_alwaysAsk = new Gtk.RadioButton(rbt_storePw, Catalog.GetString("_Always ask for password")); customBox.PackStart(rbt_alwaysAsk); // assign event-listener rbt_storePw.Toggled += PasswordMethodChanged; // init with values from preferences object value = Preferences.Get(AddinPreferences.SYNC_PRIVATENOTES_ASKEVERYTIME); if (value == null || value.Equals(false)) { rbt_storePw.Active = true; } else { rbt_alwaysAsk.Active = true; } // assign event-listeners stored_pw.Changed += PasswordChanged; stored_pw2.Changed += PasswordChanged; }
public RadioButtonLocalized(Gtk.RadioButton radio_group_member, string label) : base(radio_group_member, label) { }
public SyncTitleConflictDialog (Note existingNote, IList<string> noteUpdateTitles) : base (Catalog.GetString ("Note Conflict"), null, Gtk.DialogFlags.Modal) { this.existingNote = existingNote; this.noteUpdateTitles = noteUpdateTitles; // Suggest renaming note by appending " (old)" to the existing title string suggestedRenameBase = existingNote.Title + Catalog.GetString (" (old)"); string suggestedRename = suggestedRenameBase; for (int i = 1; !IsNoteTitleAvailable (suggestedRename); i++) suggestedRename = suggestedRenameBase + " " + i.ToString(); VBox outerVBox = new VBox (false, 12); outerVBox.BorderWidth = 12; outerVBox.Spacing = 8; HBox hbox = new HBox (false, 8); Image image = new Image (GuiUtils.GetIcon (Gtk.Stock.DialogWarning, 48)); // TODO: Is this the right icon? image.Show (); hbox.PackStart (image, false, false, 0); VBox vbox = new VBox (false, 8); headerLabel = new Label (); headerLabel.UseMarkup = true; headerLabel.Xalign = 0; headerLabel.UseUnderline = false; headerLabel.Show (); vbox.PackStart (headerLabel, false, false, 0); messageLabel = new Label (); messageLabel.Xalign = 0; messageLabel.UseUnderline = false; messageLabel.LineWrap = true; messageLabel.Wrap = true; messageLabel.Show (); vbox.PackStart (messageLabel, false, false, 0); vbox.Show (); hbox.PackStart (vbox, true, true, 0); hbox.Show (); outerVBox.PackStart (hbox); VBox.PackStart (outerVBox); Gtk.HBox renameHBox = new Gtk.HBox (); renameRadio = new Gtk.RadioButton (Catalog.GetString ("Rename local note:")); renameRadio.Toggled += radio_Toggled; Gtk.VBox renameOptionsVBox = new Gtk.VBox (); renameEntry = new Gtk.Entry (suggestedRename); renameEntry.Changed += renameEntry_Changed; renameUpdateCheck = new Gtk.CheckButton (Catalog.GetString ("Update links in referencing notes")); renameOptionsVBox.PackStart (renameEntry); //renameOptionsVBox.PackStart (renameUpdateCheck); // This seems like a superfluous option renameHBox.PackStart (renameRadio); renameHBox.PackStart (renameOptionsVBox); VBox.PackStart (renameHBox); deleteExistingRadio = new Gtk.RadioButton (renameRadio, Catalog.GetString ("Overwrite local note")); deleteExistingRadio.Toggled += radio_Toggled; VBox.PackStart (deleteExistingRadio); alwaysDoThisCheck = new Gtk.CheckButton (Catalog.GetString ("Always perform this action")); VBox.PackStart (alwaysDoThisCheck); continueButton = (Gtk.Button) AddButton (Gtk.Stock.GoForward, Gtk.ResponseType.Accept); // Set initial dialog text HeaderText = Catalog.GetString ("Note conflict detected"); MessageText = string.Format (Catalog.GetString ("The server version of \"{0}\" conflicts with your local note." + " What do you want to do with your local note?"), existingNote.Title); ShowAll (); }
public TabRadioToolButton(RadioButton group) : base(group) { DrawIndicator = false; Relief = ReliefStyle.None; NoShowAll = true; }
public void AddBrushShape( string name, string description, IBrushShape brushshape ) { RadioButton radiobutton = null; if (brushshapegroup != null ) { radiobutton = new RadioButton( brushshapegroup, name ); brushshapevbox.PackEnd( radiobutton ); brushshapevbox.ShowAll(); } else { radiobutton = new RadioButton( name ); brushshapevbox.PackEnd( radiobutton ); brushshapevbox.ShowAll(); brushshapegroup = radiobutton; brushshape.ShowControlBox( custombrushshapelabels, custombrushshapewidgets ); // radiobutton.Activate(); } brushshapes.Add( radiobutton, brushshape ); radiobutton.Toggled += new EventHandler( brushshape_Toggled ); }
/// <summary>Crea las hojas de las opciones, la parte central /// del diálogo.</summary> /// <returns>El notebook de las opciones.</returns> private Gtk.Widget CrearNotebook() { Gtk.Notebook notebook = new Gtk.Notebook(); notebook.BorderWidth = 10; // Panel de configuración del ensamblador. cbAdvertencias = new Gtk.CheckButton( Ventana.GetText("D_Conf_MostrarAdv")); Gtk.Frame frmEnsamblador = new Gtk.Frame(Ventana.GetText("D_Conf_Ensamblador")); VBox panelEnsamblador = new VBox(false, 5); panelEnsamblador.PackStart(cbAdvertencias); frmEnsamblador.Add(panelEnsamblador); // Panel de Memoria de control. rbMemoriaDef = new RadioButton(null, Ventana.GetText("D_Conf_MemDef")); rbMemoriaUsu = new RadioButton(rbMemoriaDef, Ventana.GetText("D_Conf_MemUsu")); rbMemoriaDef.Toggled += new EventHandler(rbToggled1); rbMemoriaUsu.Toggled += new EventHandler(rbToggled2); lblMemoriaAlt = new Gtk.Entry(""); lblMemoriaAlt.Sensitive = false; btnFichero = new Gtk.Button(Ventana.GetText("D_Conf_Explorar")); btnFichero.Clicked += new EventHandler(btnFicheroClicked); Gtk.Frame frmMemoria = new Gtk.Frame(Ventana.GetText("D_Conf_Memoria")); VBox panelMemoria = new Gtk.VBox(false, 5); panelMemoria.PackStart(rbMemoriaDef); panelMemoria.PackStart(rbMemoriaUsu); panelMemoria.PackStart(lblMemoriaAlt); panelMemoria.PackStart(btnFichero); frmMemoria.Add(panelMemoria); // Panel del simulador. Gtk.Frame frmSimulador = new Gtk.Frame(Ventana.GetText("D_Conf_Simulador")); VBox panelSimulador = new VBox(false, 5); panelSimulador.PackStart( new Gtk.Label(Ventana.GetText("D_Conf_Tiempo"))); sbTiempo = new Gtk.SpinButton( new Adjustment(1000.0, 50.0, 5000.0, 10.0, 100.0, 1.0), 1.0, 0); sbTiempo.Numeric = true; panelSimulador.PackStart(sbTiempo); frmSimulador.Add(panelSimulador); // ---- notebook.AppendPage( frmSimulador, new Gtk.Label(Ventana.GetText("D_Conf_Simulador"))); notebook.AppendPage( frmEnsamblador, new Gtk.Label(Ventana.GetText("D_Conf_Ensamblador"))); notebook.AppendPage( frmMemoria, new Gtk.Label(Ventana.GetText("D_Conf_Memoria"))); return(notebook); }
public void Run(object o, EventArgs e) { Console.WriteLine("EXECUTING ExiflowCreateVersion 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); Frame frame_open_with = new Frame("open with"); VBox vbox_open_with = new VBox(); frame_open_with.Child = vbox_open_with; vbox_open_with.PackStart(new_filename_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); } ComboBox owcb = GetComboBox(); vbox_open_with.PackStart(owcb, false, true, 0); dialog.Modal = false; dialog.TransientFor = null; } VBox vbox_main = new VBox(); vbox_main.PackStart(frame_versions); vbox_main.PackStart(frame_resulting_filename); //vbox_main.PackStart (frame_open_with); 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 GenerateCustomTemplate(List<string> customTemplate) { int x = 0; RadioButton rbGroup = new RadioButton("test"); foreach(string appPath in customTemplate){ string dir = System.IO.Path.GetDirectoryName(appPath); DirectoryInfo di = new DirectoryInfo(dir); string name = System.IO.Path.GetFileNameWithoutExtension(di.FullName); AppFile app = new AppFile(appPath); RadioButton rb = new RadioButton(name); rb.Group = rbGroup.Group; rb.Name = name; if(String.IsNullOrEmpty(app.Description)){ rb.Label = app.Title; }else { rb.Label = app.Description; } rb.TooltipMarkup = appPath; rb.Events = Gdk.EventMask.AllEventsMask; rb.Clicked+= delegate(object sndr, EventArgs evt) { if(File.Exists(appPath)){ //AppFile app = new AppFile(appPath); List<string> libs = new List<string>(app.Libs); Widget[] widgets = tblLibraries.Children; foreach (Widget w in widgets ){ int indx = libs.FindIndex(y=>y==w.Name); if(indx>-1) { (w as CheckButton).Active = true; } else { (w as CheckButton).Active = false; } } } }; rb.Active = true; tblScreens.Attach(rb,0,1,(uint)x,(uint)(x+1),AttachOptions.Fill,AttachOptions.Fill,0,0); x++; } tblScreens.ShowAll(); }
public RadioButtonLocalized(Gtk.RadioButton radio_group_member) : base(radio_group_member) { }
private void Init() { Logger.Debug("Called Init"); this.Icon = Utilities.GetIcon ("giver-48", 48); // Update the window title this.Title = string.Format ("Giver Preferences"); //this.DefaultSize = new Gdk.Size (300, 500); this.VBox.Spacing = 0; this.VBox.BorderWidth = 0; this.SetDefaultSize (450, 100); this.AddButton(Stock.Close, Gtk.ResponseType.Ok); this.DefaultResponse = ResponseType.Ok; // Start with an event box to paint the background white EventBox eb = new EventBox(); eb.Show(); eb.BorderWidth = 0; eb.ModifyBg(StateType.Normal, new Gdk.Color(255,255,255)); eb.ModifyBase(StateType.Normal, new Gdk.Color(255,255,255)); VBox mainVBox = new VBox(); mainVBox.BorderWidth = 10; mainVBox.Spacing = 5; mainVBox.Show (); eb.Add(mainVBox); this.VBox.PackStart(eb); Label label = new Label(); label.Show(); label.Justify = Gtk.Justification.Left; label.SetAlignment (0.0f, 0.5f); label.LineWrap = false; label.UseMarkup = true; label.UseUnderline = false; label.Markup = "<span weight=\"bold\" size=\"large\">Your Name</span>"; mainVBox.PackStart(label, true, true, 0); // Name Box at the top of the Widget HBox nameBox = new HBox(); nameBox.Show(); nameEntry = new Entry(); nameEntry.Show(); nameBox.PackStart(nameEntry, true, true, 0); nameBox.Spacing = 10; mainVBox.PackStart(nameBox, false, false, 0); label = new Label(); label.Show(); label.Justify = Gtk.Justification.Left; label.SetAlignment (0.0f, 0.5f); label.LineWrap = false; label.UseMarkup = true; label.UseUnderline = false; label.Markup = "<span weight=\"bold\" size=\"large\">Your Picture</span>"; mainVBox.PackStart(label, true, true, 0); Gtk.Table table = new Table(4, 3, false); table.Show(); // None Entry noneButton = new RadioButton((Gtk.RadioButton)null); noneButton.Show(); table.Attach(noneButton, 0, 1, 0, 1, AttachOptions.Shrink, AttachOptions.Shrink, 0, 0); VBox vbox = new VBox(); vbox.Show(); Gtk.Image image = new Image(Utilities.GetIcon("computer", 48)); image.Show(); vbox.PackStart(image, false, false, 0); label = new Label("None"); label.Show(); vbox.PackStart(label, false, false, 0); table.Attach(vbox, 1, 2, 0 ,1, AttachOptions.Shrink, AttachOptions.Shrink, 0, 0); vbox = new VBox(); vbox.Show(); table.Attach(vbox, 2,3,1,2, AttachOptions.Expand | AttachOptions.Fill, AttachOptions.Expand | AttachOptions.Fill, 0, 0); // Local Entry localButton = new RadioButton(noneButton); localButton.Show(); table.Attach(localButton, 0, 1, 1, 2, AttachOptions.Shrink, AttachOptions.Shrink, 0, 0); vbox = new VBox(); vbox.Show(); localImage = new Image(Utilities.GetIcon("stock_person", 48)); localImage.Show(); vbox.PackStart(localImage, false, false, 0); label = new Label("File"); label.Show(); vbox.PackStart(label, false, false, 0); table.Attach(vbox, 1, 2, 1 ,2, AttachOptions.Shrink, AttachOptions.Shrink, 0, 0); photoButton = new Button("Change Photo"); photoButton.Show(); table.Attach(photoButton, 2,3,1,2, AttachOptions.Expand | AttachOptions.Fill, AttachOptions.Shrink, 0, 0); // Web Entry webButton = new RadioButton(noneButton); webButton.Show(); table.Attach(webButton, 0, 1, 2, 3, AttachOptions.Shrink, AttachOptions.Shrink, 0, 0); vbox = new VBox(); vbox.Show(); image = new Image(Utilities.GetIcon("web-browser", 48)); image.Show(); vbox.PackStart(image, false, false, 0); label = new Label("Web Link"); label.Show(); vbox.PackStart(label, false, false, 0); table.Attach(vbox, 1, 2, 2 ,3, AttachOptions.Shrink, AttachOptions.Shrink, 0, 0); webEntry = new Entry(); webEntry.Show(); table.Attach(webEntry, 2,3,2,3, AttachOptions.Expand | AttachOptions.Fill, AttachOptions.Expand | AttachOptions.Fill, 0, 0); // Gravatar Entry gravatarButton = new RadioButton(noneButton); gravatarButton.Show(); table.Attach(gravatarButton, 0, 1, 3, 4, AttachOptions.Shrink, AttachOptions.Shrink, 0, 0); vbox = new VBox(); vbox.Show(); image = new Image(Utilities.GetIcon("gravatar", 48)); image.Show(); vbox.PackStart(image, false, false, 0); label = new Label("Gravatar"); label.Show(); vbox.PackStart(label, false, false, 0); table.Attach(vbox, 1, 2, 3 ,4, AttachOptions.Shrink, AttachOptions.Shrink, 0, 0); gravatarEntry = new Entry(); gravatarEntry.Show(); table.Attach(gravatarEntry, 2,3,3,4, AttachOptions.Expand | AttachOptions.Fill, AttachOptions.Expand | AttachOptions.Fill, 0, 0); mainVBox.PackStart(table, true, true, 0); label = new Label(); label.Show(); label.Justify = Gtk.Justification.Left; label.SetAlignment (0.0f, 0.5f); label.LineWrap = false; label.UseMarkup = true; label.UseUnderline = false; label.Markup = "<span weight=\"bold\" size=\"large\">Your File Location</span>"; mainVBox.PackStart(label, true, true, 0); fileLocationButton = new FileChooserButton("Select storage location", FileChooserAction.SelectFolder); fileLocationButton.Show(); mainVBox.PackStart(fileLocationButton, true, true, 0); table = new Table(2, 3, false); table.Show(); // Port number section label = new Label(); label.Show(); label.Justify = Gtk.Justification.Left; label.SetAlignment (0.0f, 0.5f); label.LineWrap = false; label.UseMarkup = true; label.UseUnderline = false; label.Markup = "<span weight=\"bold\" size=\"large\">Port Number</span>"; mainVBox.PackStart(label, true, true, 0); // any port Entry anyPortButton = new RadioButton((Gtk.RadioButton)null); anyPortButton.Show(); table.Attach(anyPortButton, 0, 1, 0, 1, AttachOptions.Shrink, AttachOptions.Shrink, 0, 0); vbox = new VBox(); vbox.Show(); label = new Label (); label.Show (); label.Justify = Gtk.Justification.Left; label.SetAlignment (0.0f, 0.5f); label.LineWrap = false; label.UseMarkup = true; label.UseUnderline = false; label.Markup = "Any available port"; vbox.PackStart(label, false, false, 0); table.Attach(vbox, 1, 2, 0, 1, AttachOptions.Shrink, AttachOptions.Shrink, 0, 0); // fixed port Entry fixedPortButton = new RadioButton(anyPortButton); fixedPortButton.Show(); table.Attach(fixedPortButton, 0, 1, 1, 2, AttachOptions.Shrink, AttachOptions.Shrink, 0, 0); label = new Label (); label.Show (); label.Justify = Gtk.Justification.Left; label.SetAlignment (0.0f, 0.5f); label.LineWrap = false; label.UseMarkup = true; label.UseUnderline = false; label.Markup = "Use a fixed port"; table.Attach(label, 1, 2, 1, 2, AttachOptions.Expand | AttachOptions.Fill, AttachOptions.Expand | AttachOptions.Fill, 0, 0); portNumberEntry = new Entry(); portNumberEntry.Show(); table.Attach(portNumberEntry, 2, 3, 1, 2, AttachOptions.Expand | AttachOptions.Fill, AttachOptions.Expand | AttachOptions.Fill, 0, 0); mainVBox.PackStart(table, true, true, 0); DeleteEvent += WindowDeleted; }
public SyncTitleConflictDialog(Note existingNote, IList <string> noteUpdateTitles) : base(Catalog.GetString("Note Conflict"), null, Gtk.DialogFlags.Modal) { this.existingNote = existingNote; this.noteUpdateTitles = noteUpdateTitles; // Suggest renaming note by appending " (old)" to the existing title string suggestedRenameBase = existingNote.Title + Catalog.GetString(" (old)"); string suggestedRename = suggestedRenameBase; for (int i = 1; !IsNoteTitleAvailable(suggestedRename); i++) { suggestedRename = suggestedRenameBase + " " + i.ToString(); } VBox outerVBox = new VBox(false, 12); outerVBox.BorderWidth = 12; outerVBox.Spacing = 8; HBox hbox = new HBox(false, 8); Image image = new Image(GuiUtils.GetIcon(Gtk.Stock.DialogWarning, 48)); // TODO: Is this the right icon? image.Show(); hbox.PackStart(image, false, false, 0); VBox vbox = new VBox(false, 8); headerLabel = new Label(); headerLabel.UseMarkup = true; headerLabel.Xalign = 0; headerLabel.UseUnderline = false; headerLabel.Show(); vbox.PackStart(headerLabel, false, false, 0); messageLabel = new Label(); messageLabel.Xalign = 0; messageLabel.UseUnderline = false; messageLabel.LineWrap = true; messageLabel.Wrap = true; messageLabel.Show(); vbox.PackStart(messageLabel, false, false, 0); vbox.Show(); hbox.PackStart(vbox, true, true, 0); hbox.Show(); outerVBox.PackStart(hbox); VBox.PackStart(outerVBox); Gtk.HBox renameHBox = new Gtk.HBox(); renameRadio = new Gtk.RadioButton(Catalog.GetString("Rename local note:")); renameRadio.Toggled += radio_Toggled; Gtk.VBox renameOptionsVBox = new Gtk.VBox(); renameEntry = new Gtk.Entry(suggestedRename); renameEntry.Changed += renameEntry_Changed; renameUpdateCheck = new Gtk.CheckButton(Catalog.GetString("Update links in referencing notes")); renameOptionsVBox.PackStart(renameEntry); //renameOptionsVBox.PackStart (renameUpdateCheck); // This seems like a superfluous option renameHBox.PackStart(renameRadio); renameHBox.PackStart(renameOptionsVBox); VBox.PackStart(renameHBox); deleteExistingRadio = new Gtk.RadioButton(renameRadio, Catalog.GetString("Overwrite local note")); deleteExistingRadio.Toggled += radio_Toggled; VBox.PackStart(deleteExistingRadio); alwaysDoThisCheck = new Gtk.CheckButton(Catalog.GetString("Always perform this action")); VBox.PackStart(alwaysDoThisCheck); continueButton = (Gtk.Button)AddButton(Gtk.Stock.GoForward, Gtk.ResponseType.Accept); // Set initial dialog text HeaderText = Catalog.GetString("Note conflict detected"); MessageText = string.Format(Catalog.GetString("The server version of \"{0}\" conflicts with your local note." + " What do you want to do with your local note?"), existingNote.Title); ShowAll(); }
public void AddBrushEffect( string name, string description, IBrushEffect brusheffect ) { RadioButton radiobutton = null; if (brusheffectgroup != null) { radiobutton = new RadioButton( brusheffectgroup, name ); brusheffectvbox.PackEnd( radiobutton ); brusheffectvbox.ShowAll(); } else { radiobutton = new RadioButton( name ); brusheffectvbox.PackEnd( radiobutton ); brusheffectvbox.ShowAll(); //radiobutton.Activate(); brusheffectgroup = radiobutton; brusheffect.ShowControlBox( custombrusheffectlabels, custombrusheffectwidgets ); } brusheffects.Add( radiobutton, brusheffect ); radiobutton.Toggled += new EventHandler(brusheffect_Toggled); }
public static void ColorsRadio(Gtk.Viewport v, Gtk.RadioButton r) { r.ModifyBg(StateType.Active, v.Style.Background(StateType.Selected)); r.ModifyBg(StateType.Prelight, v.Style.Background(StateType.Selected)); }
public void ShowServerForm() { Reset (); VBox layout_vertical = new VBox (false, 0); Label header = new Label ("<span size='x-large'><b>" + _("Where is your remote folder?") + "</b></span>") { UseMarkup = true, Xalign = 0 }; Table table = new Table (7, 2, false) { RowSpacing = 12 }; HBox layout_server = new HBox (true, 0); ServerEntry = new SparkleEntry () { ExampleText = _("address-to-server.com") }; ServerEntry.Changed += CheckServerForm; RadioButton radio_button = new RadioButton ("<b>" + _("On my own server:") + "</b>"); layout_server.Add (radio_button); layout_server.Add (ServerEntry); string github_text = "<b>" + "Github" + "</b>\n" + "<span fgcolor='" + SecondaryTextColor + "' size='small'>" + _("Free hosting for Free and Open Source Software projects.") + "\n" + _("Also has paid accounts for extra private space and bandwidth.") + "</span>"; RadioButton radio_button_github = new RadioButton (radio_button, github_text); (radio_button_github.Child as Label).UseMarkup = true; (radio_button_github.Child as Label).Wrap = true; string gnome_text = "<b>" + _("The GNOME Project") + "</b>\n" + "<span fgcolor='" + SecondaryTextColor + "' size='small'>" + _("GNOME is an easy to understand interface to your computer.") + "\n" + _("Select this option if you’re a developer or designer working on GNOME.") + "</span>"; RadioButton radio_button_gnome = new RadioButton (radio_button, gnome_text); (radio_button_gnome.Child as Label).UseMarkup = true; (radio_button_gnome.Child as Label).Wrap = true; string gitorious_text = "<b>" + _("Gitorious") + "</b>\n" + "<span fgcolor='" + SecondaryTextColor + "' size='small'>" + _("Completely Free as in Freedom infrastructure.") + "\n" + _("Free accounts for Free and Open Source projects.") + "</span>"; RadioButton radio_button_gitorious = new RadioButton (radio_button, gitorious_text) { Xalign = 0 }; (radio_button_gitorious.Child as Label).UseMarkup = true; (radio_button_gitorious.Child as Label).Wrap = true; radio_button_github.Toggled += delegate { if (radio_button_github.Active) FolderEntry.ExampleText = _("Username/Folder"); }; radio_button_gitorious.Toggled += delegate { if (radio_button_gitorious.Active) FolderEntry.ExampleText = _("Project/Folder"); }; radio_button_gnome.Toggled += delegate { if (radio_button_gnome.Active) FolderEntry.ExampleText = _("Project"); }; radio_button.Toggled += delegate { if (radio_button.Active) { FolderEntry.ExampleText = _("Folder"); ServerEntry.Sensitive = true; CheckServerForm (); } else { ServerEntry.Sensitive = false; CheckServerForm (); } ShowAll (); }; table.Attach (layout_server, 0, 2, 1, 2); table.Attach (radio_button_github, 0, 2, 2, 3); table.Attach (radio_button_gitorious, 0, 2, 3, 4); table.Attach (radio_button_gnome, 0, 2, 4, 5); HBox layout_folder = new HBox (true, 0); FolderEntry = new SparkleEntry () { ExampleText = _("Folder") }; FolderEntry.Changed += CheckServerForm; Label folder_label = new Label ("<b>" + _("Folder Name:") + "</b>") { UseMarkup = true, Xalign = 1 }; (radio_button.Child as Label).UseMarkup = true; layout_folder.PackStart (folder_label, true, true, 12); layout_folder.PackStart (FolderEntry, true, true, 0); SyncButton = new Button (_("Sync")); SyncButton.Clicked += delegate { string name = FolderEntry.Text; // Remove the starting slash if there is one if (name.StartsWith ("/")) name = name.Substring (1); string server = ServerEntry.Text; if (name.EndsWith ("/")) name = name.TrimEnd ("/".ToCharArray ()); if (name.StartsWith ("/")) name = name.TrimStart ("/".ToCharArray ()); if (server.StartsWith ("ssh://")) server = server.Substring (6); if (radio_button.Active) { // Use the default user 'git' if no username is specified if (!server.Contains ("@")) server = "git@" + server; // Prepend the Secure Shell protocol when it isn't specified if (!server.StartsWith ("ssh://")) server = "ssh://" + server; // Remove the trailing slash if there is one if (server.EndsWith ("/")) server = server.TrimEnd ("/".ToCharArray ()); } if (radio_button_gitorious.Active) { server = "ssh://[email protected]"; if (!name.EndsWith (".git")) { if (!name.Contains ("/")) name = name + "/" + name; name += ".git"; } } if (radio_button_github.Active) server = "ssh://[email protected]"; if (radio_button_gnome.Active) server = "ssh://[email protected]/git/"; string url = server + "/" + name; Console.WriteLine ("View", "[" + name + "] Formed URL: " + url); string canonical_name = System.IO.Path.GetFileNameWithoutExtension (name); DeleteEvent += PreventClose; ShowSyncingPage (canonical_name); SparkleShare.Controller.FolderFetched += delegate { DeleteEvent -= PreventClose; Application.Invoke (delegate { ShowSuccessPage (name); }); }; SparkleShare.Controller.FolderFetchError += delegate { DeleteEvent -= PreventClose; Application.Invoke (delegate { ShowErrorPage (); }); }; SparkleShare.Controller.FetchFolder (url, name); }; if (ServerFormOnly) { Button cancel_button = new Button (_("Cancel")); cancel_button.Clicked += delegate { Destroy (); }; AddButton (cancel_button); } else { Button skip_button = new Button (_("Skip")); skip_button.Clicked += delegate { ShowCompletedPage (); }; AddButton (skip_button); } AddButton (SyncButton); layout_vertical.PackStart (header, false, false, 0); layout_vertical.PackStart (new Label (""), false, false, 3); layout_vertical.PackStart (table, false, false, 0); layout_vertical.PackStart (layout_folder, false, false, 6); Add (layout_vertical); CheckServerForm (); ShowAll (); }
/// <summary> /// Constructor /// </summary> /// <param name="parent">GTK Parent Dialog</param> /// <param name="userName">User Name</param> /// <param name="rights">Access Rights</param> /// <param name="enableOwner">true to enable owner</param> public iFolderAccessDialog(Gtk.Window parent, string userName, string rights, bool enableOwner) : base() { if (parent != null) { this.TransientFor = parent; } if (userName == null) { this.Title = Util.GS("Access Rights for Multiple Users"); } else { this.Title = string.Format(Util.GS("Access Rights for {0}"), userName); } this.HasSeparator = false; this.Resizable = false; this.Modal = true; this.DefaultResponse = ResponseType.Ok; this.VBox.Spacing = 10; //------------------------------ // Access //------------------------------ // create a section box VBox accSectionBox = new VBox(); this.VBox.PackStart(accSectionBox, false, true, 0); accSectionBox.BorderWidth = 10; Label accSectionLabel = new Label("<span weight=\"bold\">" + Util.GS("Access Rights") + "</span>"); accSectionLabel.UseMarkup = true; accSectionLabel.Xalign = 0; accSectionBox.PackStart(accSectionLabel, false, true, 0); // create a hbox to provide spacing HBox accSpacerBox = new HBox(); accSectionBox.PackStart(accSpacerBox, false, true, 0); Label accSpaceLabel = new Label(" "); // four spaces accSpacerBox.PackStart(accSpaceLabel, false, true, 0); // create a vbox to actually place the widgets in for section VBox accWidgetBox = new VBox(); accSpacerBox.PackStart(accWidgetBox, false, true, 0); FCButton = new RadioButton(Util.GS("Full Control")); accWidgetBox.PackStart(FCButton, false, true, 0); RWButton = new RadioButton(FCButton, Util.GS("Read/Write")); accWidgetBox.PackStart(RWButton, false, true, 0); ROButton = new RadioButton(FCButton, Util.GS("Read Only")); accWidgetBox.PackStart(ROButton, false, true, 0); VBox ownerSectionBox = new VBox(); this.VBox.PackStart(ownerSectionBox, false, true, 0); ownerSectionBox.BorderWidth = 10; OwnerButton = new CheckButton(Util.GS("Make this user the owner of the iFolder.")); ownerSectionBox.PackStart(OwnerButton, false, true, 0); if (!enableOwner) { OwnerButton.Sensitive = false; } OwnerButton.Toggled += new EventHandler(OwnerButtonToggled); this.VBox.ShowAll(); this.AddButton(Stock.Cancel, ResponseType.Cancel); this.AddButton(Stock.Ok, ResponseType.Ok); if (rights == "Admin") { FCButton.Active = true; } else if (rights == "ReadOnly") { ROButton.Active = true; } else { RWButton.Active = true; } }