Пример #1
0
 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget Bibtex.Configuration
     Stetic.BinContainer.Attach(this);
     this.Name = "Bibtex.Configuration";
     // Container child Bibtex.Configuration.Gtk.Container+ContainerChild
     this.alignment1      = new Gtk.Alignment(0.5F, 0.5F, 1F, 1F);
     this.alignment1.Name = "alignment1";
     // Container child alignment1.Gtk.Container+ContainerChild
     this.table1               = new Gtk.Table(((uint)(2)), ((uint)(2)), false);
     this.table1.Name          = "table1";
     this.table1.RowSpacing    = ((uint)(6));
     this.table1.ColumnSpacing = ((uint)(6));
     // Container child table1.Gtk.Table+TableChild
     this.bibtexFileLabel           = new Gtk.Label();
     this.bibtexFileLabel.Name      = "bibtexFileLabel";
     this.bibtexFileLabel.LabelProp = Mono.Addins.AddinManager.CurrentLocalizer.GetString("Choose BibTeX file");
     this.table1.Add(this.bibtexFileLabel);
     Gtk.Table.TableChild w1 = ((Gtk.Table.TableChild)(this.table1[this.bibtexFileLabel]));
     w1.XOptions = ((Gtk.AttachOptions)(4));
     w1.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.chooseBibtexFileButton      = new Gtk.FileChooserButton(Mono.Addins.AddinManager.CurrentLocalizer.GetString("Select A File"), ((Gtk.FileChooserAction)(0)));
     this.chooseBibtexFileButton.Name = "chooseBibtexFileButton";
     this.table1.Add(this.chooseBibtexFileButton);
     Gtk.Table.TableChild w2 = ((Gtk.Table.TableChild)(this.table1[this.chooseBibtexFileButton]));
     w2.LeftAttach  = ((uint)(1));
     w2.RightAttach = ((uint)(2));
     w2.YOptions    = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.chooseDocsFolderButton      = new Gtk.FileChooserButton(Mono.Addins.AddinManager.CurrentLocalizer.GetString("Select your documents folder"), ((Gtk.FileChooserAction)(2)));
     this.chooseDocsFolderButton.Name = "chooseDocsFolderButton";
     this.table1.Add(this.chooseDocsFolderButton);
     Gtk.Table.TableChild w3 = ((Gtk.Table.TableChild)(this.table1[this.chooseDocsFolderButton]));
     w3.TopAttach    = ((uint)(1));
     w3.BottomAttach = ((uint)(2));
     w3.LeftAttach   = ((uint)(1));
     w3.RightAttach  = ((uint)(2));
     w3.YOptions     = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.docFolderLable           = new Gtk.Label();
     this.docFolderLable.Name      = "docFolderLable";
     this.docFolderLable.LabelProp = Mono.Addins.AddinManager.CurrentLocalizer.GetString("Choose documents folder");
     this.table1.Add(this.docFolderLable);
     Gtk.Table.TableChild w4 = ((Gtk.Table.TableChild)(this.table1[this.docFolderLable]));
     w4.TopAttach    = ((uint)(1));
     w4.BottomAttach = ((uint)(2));
     w4.XOptions     = ((Gtk.AttachOptions)(4));
     w4.YOptions     = ((Gtk.AttachOptions)(4));
     this.alignment1.Add(this.table1);
     this.Add(this.alignment1);
     if ((this.Child != null))
     {
         this.Child.ShowAll();
     }
     this.Show();
     this.chooseDocsFolderButton.SelectionChanged += new System.EventHandler(this.OnChooseDocsFolderButtonSelectionChanged);
     this.chooseBibtexFileButton.SelectionChanged += new System.EventHandler(this.OnChooseBibtexFileButtonSelectionChanged);
 }
Пример #2
0
        public void createGui()
        {
            basedir_section = new Section("cuesheets-basedir", "CueSheet Music Directory:", 20);
            source_page.Add(basedir_section);

            string dir = _source.getCueSheetDir();

            Gtk.Label             lbl = new Gtk.Label("CueSheet Music Directory:");
            Gtk.FileChooserButton btn = new Gtk.FileChooserButton("CueSheet Music Directory:", Gtk.FileChooserAction.SelectFolder);
            if (dir != null)
            {
                btn.SelectFilename(dir);
            }
            Gtk.HBox box = new Gtk.HBox();
            box.Add(lbl);
            box.Add(btn);
            box.ShowAll();
            btn.CurrentFolderChanged += delegate(object sender, EventArgs args) {
                string dir1 = btn.Filename;
                Hyena.Log.Information("Folder changed to = " + dir1);
            };
            btn.FileSet += delegate(object sender, EventArgs args) {
                string dir1 = btn.Filename;
                Hyena.Log.Information("Base directory changed to = " + dir1);
                _source.setCueSheetDir(dir1);
            };

            Console.WriteLine(_source);

            Gtk.VBox vb = new Gtk.VBox();
            vb.PackStart(box, false, false, 0);

            Gtk.Image  icn_about = new Gtk.Image(Gtk.Stock.About, Gtk.IconSize.Button);
            Gtk.Button about     = new Gtk.Button(icn_about);
            about.Clicked += new EventHandler(handleAbout);
            Gtk.HBox  hb     = new Gtk.HBox();
            Gtk.Label _about = new Gtk.Label("About the CueSheet extension");
            hb.PackEnd(about, false, false, 0);
            hb.PackEnd(_about, false, false, 5);
            vb.PackStart(hb, false, false, 0);
            Gtk.HBox   hb1      = new Gtk.HBox();
            Gtk.Label  _info    = new Gtk.Label("How to use the Cuesheet extension (opens browser)");
            Gtk.Image  icn_info = new Gtk.Image(Gtk.Stock.Info, Gtk.IconSize.Button);
            Gtk.Button btn_info = new Gtk.Button(icn_info);
            btn_info.Clicked += new EventHandler(handleInfo);
            hb1.PackEnd(btn_info, false, false, 0);
            hb1.PackEnd(_info, false, false, 5);
            vb.PackStart(hb1, false, false, 0);

            Gtk.HBox hbX = new Gtk.HBox();
            vb.PackEnd(hbX, true, true, 0);

            vb.ShowAll();

            source_page.DisplayWidget = vb;
        }
        public void createGui()
        {
            basedir_section=new Section("cuesheets-basedir","CueSheet Music Directory:",20);
            source_page.Add (basedir_section);

            string dir=_source.getCueSheetDir();
            Gtk.Label lbl=new Gtk.Label("CueSheet Music Directory:");
            Gtk.FileChooserButton btn=new Gtk.FileChooserButton("CueSheet Music Directory:",Gtk.FileChooserAction.SelectFolder);
            if (dir!=null) {
                btn.SelectFilename (dir);
            }
            Gtk.HBox box=new Gtk.HBox();
            box.Add (lbl);
            box.Add (btn);
            box.ShowAll ();
            btn.CurrentFolderChanged+=delegate(object sender,EventArgs args) {
                string dir1=btn.Filename;
                Hyena.Log.Information ("Folder changed to = "+dir1);
            };
            btn.FileSet+=delegate(object sender,EventArgs args) {
                string dir1=btn.Filename;
                Hyena.Log.Information ("Base directory changed to = "+dir1);
                _source.setCueSheetDir(dir1);
            };

            Console.WriteLine (_source);

            Gtk.VBox vb=new Gtk.VBox();
            vb.PackStart (box,false,false,0);

            Gtk.Image icn_about=new Gtk.Image(Gtk.Stock.About,Gtk.IconSize.Button);
            Gtk.Button about=new Gtk.Button(icn_about);
            about.Clicked+=new EventHandler(handleAbout);
            Gtk.HBox hb=new Gtk.HBox();
            Gtk.Label _about=new Gtk.Label("About the CueSheet extension");
            hb.PackEnd (about,false,false,0);
            hb.PackEnd (_about,false,false,5);
            vb.PackStart (hb,false,false,0);
            Gtk.HBox hb1=new Gtk.HBox();
            Gtk.Label _info=new Gtk.Label("How to use the Cuesheet extension (opens browser)");
            Gtk.Image icn_info=new Gtk.Image(Gtk.Stock.Info,Gtk.IconSize.Button);
            Gtk.Button btn_info=new Gtk.Button(icn_info);
            btn_info.Clicked+=new EventHandler(handleInfo);
            hb1.PackEnd(btn_info,false,false,0);
            hb1.PackEnd(_info,false,false,5);
            vb.PackStart (hb1,false,false,0);

            Gtk.HBox hbX=new Gtk.HBox();
            vb.PackEnd (hbX,true,true,0);

            vb.ShowAll ();

            source_page.DisplayWidget = vb;
        }
Пример #4
0
        public void Run(IBrowsableCollection selection)
        {
            this.selection = selection;

            var view = new TrayView(selection);

            view.DisplayDates = false;
            view.DisplayTags  = false;

            builder = new GtkBeans.Builder(null, "folder_export.ui", null);
            builder.Autoconnect(this);
            Dialog.Modal        = false;
            Dialog.TransientFor = null;

            thumb_scrolledwindow.Add(view);
            HandleSizeActive(null, null);
            name_entry.Text = gallery_name;

            string uri_path = System.IO.Path.Combine(FSpot.Core.Global.HomeDirectory, "Desktop");

            if (!System.IO.Directory.Exists(uri_path))
            {
                uri_path = FSpot.Core.Global.HomeDirectory;
            }

            uri_chooser = new Gtk.FileChooserButton(Catalog.GetString("Select Export Folder"),
                                                    Gtk.FileChooserAction.SelectFolder);

            uri_chooser.LocalOnly = false;

            if (!String.IsNullOrEmpty(Preferences.Get <string> (URI_KEY)))
            {
                uri_chooser.SetCurrentFolderUri(Preferences.Get <string> (URI_KEY));
            }
            else
            {
                uri_chooser.SetFilename(uri_path);
            }

            chooser_hbox.PackStart(uri_chooser);

            Dialog.ShowAll();
            Dialog.Response += HandleResponse;

            LoadPreference(SCALE_KEY);
            LoadPreference(SIZE_KEY);
            LoadPreference(OPEN_KEY);
            LoadPreference(EXPORT_TAGS_KEY);
            LoadPreference(EXPORT_TAG_ICONS_KEY);
            LoadPreference(METHOD_KEY);
        }
Пример #5
0
        public FilePickerHandler()
        {
            Control = new Gtk.EventBox();
            action  = FileAction.OpenFile;

            filebutton = new Gtk.FileChooserButton("", Gtk.FileChooserAction.Open);

            // Save is not a valid option for FileChooserButton, therefore
            // we need to create our own, or use the ThemedFilePickerHandler
            savebox   = new Gtk.HBox();
            saveentry = new Gtk.Entry();
            savebox.PackStart(saveentry, true, true, 0);
            savebutton       = new Gtk.Button();
            savebutton.Label = "Browse";
            savebox.PackStart(savebutton, false, true, 1);

            Control.Child = filebutton;
        }
        private void HandleResponse(object sender, Gtk.ResponseArgs args)
        {
            if (args.ResponseId != Gtk.ResponseType.Ok)
            {
                // FIXME this is to work around a bug in gtk+ where
                // the filesystem events are still listened to when
                // a FileChooserButton is destroyed but not finalized
                // and an event comes in that wants to update the child widgets.
                Dialog.Destroy();
                uri_chooser.Dispose();
                uri_chooser = null;
                return;
            }

            dest   = new Gnome.Vfs.Uri(uri_chooser.Uri);
            open   = open_check.Active;
            scale  = scale_check.Active;
            rotate = rotate_check.Active;

            gallery_name = name_entry.Text;

            if (description_entry != null)
            {
                description = description_entry.Text;
            }

            if (scale)
            {
                size = size_spin.ValueAsInt;
            }

            command_thread      = new System.Threading.Thread(new System.Threading.ThreadStart(Upload));
            command_thread.Name = Catalog.GetString("Transferring Pictures");

            //FIXME: get the files/dirs count in a cleaner way than (* 5 + 2(zip) + 9)
            // selection * 5 (original, mq, lq, thumbs, comments)
            // 2: zipfiles
            // 9: directories + info.txt + .htaccess
            // this should actually be 1 anyway, because we transfer just one dir
            progress_dialog = new FSpot.ThreadProgressDialog(command_thread, 1);
            progress_dialog.Start();
        }
Пример #7
0
        private void HandleResponse(object sender, Gtk.ResponseArgs args)
        {
            if (args.ResponseId != Gtk.ResponseType.Ok)
            {
                // FIXME this is to work around a bug in gtk+ where
                // the filesystem events are still listened to when
                // a FileChooserButton is destroyed but not finalized
                // and an event comes in that wants to update the child widgets.
                Dialog.Destroy();
                uri_chooser.Dispose();
                uri_chooser = null;
                return;
            }

            dest           = GLib.FileFactory.NewForUri(uri_chooser.Uri);
            open           = open_check.Active;
            scale          = scale_check.Active;
            exportTags     = export_tags_check.Active;
            exportTagIcons = export_tag_icons_check.Active;

            gallery_name = name_entry.Text;

            if (description_entry != null)
            {
                description = description_entry.Text;
            }

            if (scale)
            {
                size = size_spin.ValueAsInt;
            }

            command_thread      = new System.Threading.Thread(new System.Threading.ThreadStart(Upload));
            command_thread.Name = Catalog.GetString("Exporting Photos");

            progress_dialog = new ThreadProgressDialog(command_thread, 1);
            progress_dialog.Start();
        }
 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget ocmgtk.ImportDirectoryDialog
     this.WidthRequest = 500;
     this.Name = "ocmgtk.ImportDirectoryDialog";
     this.Title = Mono.Unix.Catalog.GetString("Import Directory");
     this.TypeHint = ((Gdk.WindowTypeHint)(1));
     this.WindowPosition = ((Gtk.WindowPosition)(4));
     this.Modal = true;
     this.BorderWidth = ((uint)(6));
     this.Resizable = false;
     this.AllowGrow = false;
     // Internal child ocmgtk.ImportDirectoryDialog.VBox
     Gtk.VBox w1 = this.VBox;
     w1.Name = "dialog1_VBox";
     w1.BorderWidth = ((uint)(2));
     // Container child dialog1_VBox.Gtk.Box+BoxChild
     this.table1 = new Gtk.Table(((uint)(1)), ((uint)(2)), false);
     this.table1.Name = "table1";
     this.table1.RowSpacing = ((uint)(6));
     this.table1.ColumnSpacing = ((uint)(6));
     // Container child table1.Gtk.Table+TableChild
     this.dirChooser = new Gtk.FileChooserButton(Mono.Unix.Catalog.GetString("Select A Folder"), ((Gtk.FileChooserAction)(2)));
     this.dirChooser.Name = "dirChooser";
     this.dirChooser.ShowHidden = true;
     this.table1.Add(this.dirChooser);
     Gtk.Table.TableChild w2 = ((Gtk.Table.TableChild)(this.table1[this.dirChooser]));
     w2.LeftAttach = ((uint)(1));
     w2.RightAttach = ((uint)(2));
     w2.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.label1 = new Gtk.Label();
     this.label1.Name = "label1";
     this.label1.LabelProp = Mono.Unix.Catalog.GetString("Directory:");
     this.table1.Add(this.label1);
     Gtk.Table.TableChild w3 = ((Gtk.Table.TableChild)(this.table1[this.label1]));
     w3.XOptions = ((Gtk.AttachOptions)(4));
     w3.YOptions = ((Gtk.AttachOptions)(4));
     w1.Add(this.table1);
     Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(w1[this.table1]));
     w4.Position = 0;
     w4.Expand = false;
     w4.Fill = false;
     // Container child dialog1_VBox.Gtk.Box+BoxChild
     this.frame1 = new Gtk.Frame();
     this.frame1.Name = "frame1";
     this.frame1.ShadowType = ((Gtk.ShadowType)(0));
     // Container child frame1.Gtk.Container+ContainerChild
     this.GtkAlignment2 = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment2.Name = "GtkAlignment2";
     this.GtkAlignment2.LeftPadding = ((uint)(12));
     // Container child GtkAlignment2.Gtk.Container+ContainerChild
     this.vbox2 = new Gtk.VBox();
     this.vbox2.Name = "vbox2";
     this.vbox2.Spacing = 6;
     // Container child vbox2.Gtk.Box+BoxChild
     this.deleteCheck = new Gtk.CheckButton();
     this.deleteCheck.CanFocus = true;
     this.deleteCheck.Name = "deleteCheck";
     this.deleteCheck.Label = Mono.Unix.Catalog.GetString("Delete files on completion");
     this.deleteCheck.DrawIndicator = true;
     this.deleteCheck.UseUnderline = true;
     this.vbox2.Add(this.deleteCheck);
     Gtk.Box.BoxChild w5 = ((Gtk.Box.BoxChild)(this.vbox2[this.deleteCheck]));
     w5.Position = 0;
     w5.Expand = false;
     w5.Fill = false;
     // Container child vbox2.Gtk.Box+BoxChild
     this.statusCheck = new Gtk.CheckButton();
     this.statusCheck.CanFocus = true;
     this.statusCheck.Name = "statusCheck";
     this.statusCheck.Label = Mono.Unix.Catalog.GetString("Do not overwrite existing found status in database");
     this.statusCheck.DrawIndicator = true;
     this.statusCheck.UseUnderline = true;
     this.vbox2.Add(this.statusCheck);
     Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(this.vbox2[this.statusCheck]));
     w6.Position = 1;
     w6.Expand = false;
     w6.Fill = false;
     // Container child vbox2.Gtk.Box+BoxChild
     this.oldLogsCheck = new Gtk.CheckButton();
     this.oldLogsCheck.CanFocus = true;
     this.oldLogsCheck.Name = "oldLogsCheck";
     this.oldLogsCheck.Label = Mono.Unix.Catalog.GetString("Purge old cache logs");
     this.oldLogsCheck.DrawIndicator = true;
     this.oldLogsCheck.UseUnderline = true;
     this.vbox2.Add(this.oldLogsCheck);
     Gtk.Box.BoxChild w7 = ((Gtk.Box.BoxChild)(this.vbox2[this.oldLogsCheck]));
     w7.Position = 2;
     w7.Expand = false;
     w7.Fill = false;
     // Container child vbox2.Gtk.Box+BoxChild
     this.gsakFieldsCheck = new Gtk.CheckButton();
     this.gsakFieldsCheck.CanFocus = true;
     this.gsakFieldsCheck.Name = "gsakFieldsCheck";
     this.gsakFieldsCheck.Label = Mono.Unix.Catalog.GetString("Ignore GSAK/OCM extra fields in GPX file");
     this.gsakFieldsCheck.DrawIndicator = true;
     this.gsakFieldsCheck.UseUnderline = true;
     this.vbox2.Add(this.gsakFieldsCheck);
     Gtk.Box.BoxChild w8 = ((Gtk.Box.BoxChild)(this.vbox2[this.gsakFieldsCheck]));
     w8.Position = 3;
     w8.Expand = false;
     w8.Fill = false;
     // Container child vbox2.Gtk.Box+BoxChild
     this.hbox1 = new Gtk.HBox();
     this.hbox1.Name = "hbox1";
     this.hbox1.Spacing = 6;
     // Container child hbox1.Gtk.Box+BoxChild
     this.addToListCheck = new Gtk.CheckButton();
     this.addToListCheck.CanFocus = true;
     this.addToListCheck.Name = "addToListCheck";
     this.addToListCheck.Label = Mono.Unix.Catalog.GetString("Add to bookmark list:");
     this.addToListCheck.DrawIndicator = true;
     this.addToListCheck.UseUnderline = true;
     this.hbox1.Add(this.addToListCheck);
     Gtk.Box.BoxChild w9 = ((Gtk.Box.BoxChild)(this.hbox1[this.addToListCheck]));
     w9.Position = 0;
     w9.Expand = false;
     // Container child hbox1.Gtk.Box+BoxChild
     this.bmCombo = Gtk.ComboBox.NewText();
     this.bmCombo.Sensitive = false;
     this.bmCombo.Name = "bmCombo";
     this.hbox1.Add(this.bmCombo);
     Gtk.Box.BoxChild w10 = ((Gtk.Box.BoxChild)(this.hbox1[this.bmCombo]));
     w10.Position = 1;
     w10.Expand = false;
     w10.Fill = false;
     // Container child hbox1.Gtk.Box+BoxChild
     this.addBmrkButton = new Gtk.Button();
     this.addBmrkButton.Sensitive = false;
     this.addBmrkButton.CanFocus = true;
     this.addBmrkButton.Name = "addBmrkButton";
     // Container child addBmrkButton.Gtk.Container+ContainerChild
     this.image20 = new Gtk.Image();
     this.image20.Sensitive = false;
     this.image20.Name = "image20";
     this.image20.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-add", Gtk.IconSize.Menu, 16);
     this.addBmrkButton.Add(this.image20);
     this.addBmrkButton.Label = null;
     this.hbox1.Add(this.addBmrkButton);
     Gtk.Box.BoxChild w12 = ((Gtk.Box.BoxChild)(this.hbox1[this.addBmrkButton]));
     w12.Position = 2;
     w12.Expand = false;
     w12.Fill = false;
     this.vbox2.Add(this.hbox1);
     Gtk.Box.BoxChild w13 = ((Gtk.Box.BoxChild)(this.vbox2[this.hbox1]));
     w13.Position = 4;
     w13.Expand = false;
     w13.Fill = false;
     this.GtkAlignment2.Add(this.vbox2);
     this.frame1.Add(this.GtkAlignment2);
     this.GtkLabel7 = new Gtk.Label();
     this.GtkLabel7.Name = "GtkLabel7";
     this.GtkLabel7.LabelProp = Mono.Unix.Catalog.GetString("<b>Options</b>");
     this.GtkLabel7.UseMarkup = true;
     this.frame1.LabelWidget = this.GtkLabel7;
     w1.Add(this.frame1);
     Gtk.Box.BoxChild w16 = ((Gtk.Box.BoxChild)(w1[this.frame1]));
     w16.Position = 1;
     w16.Expand = false;
     w16.Fill = false;
     // Internal child ocmgtk.ImportDirectoryDialog.ActionArea
     Gtk.HButtonBox w17 = this.ActionArea;
     w17.Name = "dialog1_ActionArea";
     w17.Spacing = 10;
     w17.BorderWidth = ((uint)(5));
     w17.LayoutStyle = ((Gtk.ButtonBoxStyle)(4));
     // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
     this.buttonCancel = new Gtk.Button();
     this.buttonCancel.CanDefault = true;
     this.buttonCancel.CanFocus = true;
     this.buttonCancel.Name = "buttonCancel";
     this.buttonCancel.UseStock = true;
     this.buttonCancel.UseUnderline = true;
     this.buttonCancel.Label = "gtk-cancel";
     this.AddActionWidget(this.buttonCancel, -6);
     Gtk.ButtonBox.ButtonBoxChild w18 = ((Gtk.ButtonBox.ButtonBoxChild)(w17[this.buttonCancel]));
     w18.Expand = false;
     w18.Fill = false;
     // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
     this.buttonOk = new Gtk.Button();
     this.buttonOk.CanDefault = true;
     this.buttonOk.CanFocus = true;
     this.buttonOk.Name = "buttonOk";
     this.buttonOk.UseStock = true;
     this.buttonOk.UseUnderline = true;
     this.buttonOk.Label = "gtk-ok";
     this.AddActionWidget(this.buttonOk, -5);
     Gtk.ButtonBox.ButtonBoxChild w19 = ((Gtk.ButtonBox.ButtonBoxChild)(w17[this.buttonOk]));
     w19.Position = 1;
     w19.Expand = false;
     w19.Fill = false;
     if ((this.Child != null)) {
         this.Child.ShowAll();
     }
     this.DefaultWidth = 512;
     this.DefaultHeight = 281;
     this.Show();
     this.addToListCheck.Toggled += new System.EventHandler(this.OnBmrkToggle);
     this.addBmrkButton.Clicked += new System.EventHandler(this.OnAddClicked);
 }
        private void CreateGui()
        {
            Gtk.FileChooserButton fc = new Gtk.FileChooserButton("Choose directory to put your splitted files", Gtk.FileChooserAction.SelectFolder);
            string fn = Banshee.Configuration.ConfigurationClient.Get <string>("cuesheets_todevice", "");

            if (fn != "")
            {
                fc.SelectFilename(fn);
            }
            fc.FileSet += new EventHandler(delegate(Object sender, EventArgs args) {
                fn = fc.Filename;
                Banshee.Configuration.ConfigurationClient.Set <string>("cuesheets_todevice", fn);
            });
            Gtk.Button btn    = new Gtk.Button("Split CueSheet Audio File");
            Gtk.Button csplit = new Gtk.Button("Cancel");
            csplit.Clicked += delegate(object sender, EventArgs args) {
                _splt.CancelSplit();
            };
            Gtk.ProgressBar bar    = new Gtk.ProgressBar();
            Gtk.ProgressBar nr     = new Gtk.ProgressBar();
            Gtk.Button      ok     = (Gtk.Button)base.AddButton("OK", 1);
            Gtk.Label       result = new Gtk.Label("-");

            btn.Clicked += delegate(object sender, EventArgs args) {
                btn.Hide();
                csplit.Show();
                result.Markup = "";

                ok.Sensitive  = false;
                fc.Sensitive  = false;
                btn.Sensitive = false;

                _splt.SplitWithPaths();

                bool convert_to_latin1 = true;
                _splt.SplitToDir(fn, convert_to_latin1);

                GLib.Timeout.Add(50, delegate() {
                    bar.Fraction = _splt.ProgressOfCurrentTrack;
                    int n        = _splt.ProgressNTracks;
                    int i        = _splt.ProgressCurrentTrack;
                    double d     = ((double)i) / ((double)n);
                    nr.Fraction  = d;
                    if (_splt.SplitFinished)
                    {
                        ok.Sensitive  = true;
                        btn.Sensitive = true;
                        fc.Sensitive  = true;
                        csplit.Hide();
                        btn.Show();
                        if (_splt.Cancelled)
                        {
                            result.Markup = "<b>Split Cancelled</b>";
                        }
                        else
                        {
                            result.Markup = "<b>Finished</b>";
                        }
                    }
                    return(!_splt.SplitFinished);
                });
            };
            fc.Show();
            nr.Show();
            bar.Show();
            btn.Show();
            result.Show();
            base.VBox.Add(fc);
            base.VBox.Add(hsep());
            base.VBox.Add(nr);
            base.VBox.Add(bar);
            base.VBox.Add(hsep());
            base.VBox.Add(result);
            base.VBox.Add(hsep());
            base.VBox.Add(btn);
            base.VBox.Add(csplit);

            base.VBox.Show();
        }
Пример #10
0
        public void Run(IBrowsableCollection selection)
        {
            /*
            Gnome.Vfs.ModuleCallbackFullAuthentication auth = new Gnome.Vfs.ModuleCallbackFullAuthentication ();
            auth.Callback += new Gnome.Vfs.ModuleCallbackHandler (HandleAuth);
            auth.SetDefault ();
            auth.Push ();

            Gnome.Vfs.ModuleCallbackAuthentication mauth = new Gnome.Vfs.ModuleCallbackAuthentication ();
            mauth.Callback += new Gnome.Vfs.ModuleCallbackHandler (HandleAuth);
            mauth.SetDefault ();
            mauth.Push ();

            Gnome.Vfs.ModuleCallbackSaveAuthentication sauth = new Gnome.Vfs.ModuleCallbackSaveAuthentication ();
            sauth.Callback += new Gnome.Vfs.ModuleCallbackHandler (HandleAuth);
            sauth.SetDefault ();
            sauth.Push ();

            Gnome.Vfs.ModuleCallbackStatusMessage msg = new Gnome.Vfs.ModuleCallbackStatusMessage ();
            msg.Callback += new Gnome.Vfs.ModuleCallbackHandler (HandleMsg);
            msg.SetDefault ();
            msg.Push ();
            */
            this.selection = selection;

            IconView view = (IconView) new IconView (selection);
            view.DisplayDates = false;
            view.DisplayTags = false;

            xml = new Glade.XML (null, "FolderExport.glade", dialog_name, "f-spot");
            xml.Autoconnect (this);
            Dialog.Modal = false;
            Dialog.TransientFor = null;

            thumb_scrolledwindow.Add (view);
            HandleSizeActive (null, null);
            name_entry.Text = gallery_name;

            string uri_path = System.IO.Path.Combine (FSpot.Global.HomeDirectory, "Desktop");
            if (!System.IO.Directory.Exists (uri_path))
                    uri_path = FSpot.Global.HomeDirectory;

            uri_chooser = new Gtk.FileChooserButton (Catalog.GetString ("Select Export Folder"),
                                 Gtk.FileChooserAction.SelectFolder);

            uri_chooser.LocalOnly = false;

            if (!String.IsNullOrEmpty (Preferences.Get<string> (URI_KEY)))
                uri_chooser.SetUri (Preferences.Get<string> (URI_KEY));
            else
                uri_chooser.SetFilename (uri_path);

            chooser_hbox.PackStart (uri_chooser);

            Dialog.ShowAll ();

            //LoadHistory ();
            Dialog.Response += HandleResponse;

            LoadPreference (SCALE_KEY);
            LoadPreference (SIZE_KEY);
            LoadPreference (OPEN_KEY);
            LoadPreference (ROTATE_KEY);
            LoadPreference (EXPORT_TAGS_KEY);
            LoadPreference (EXPORT_TAG_ICONS_KEY);
            LoadPreference (METHOD_KEY);
        }
 protected virtual void Build() {
     Stetic.Gui.Initialize(this);
     // Widget Movierok.Configuration
     Stetic.BinContainer.Attach(this);
     this.Name = "Movierok.Configuration";
     // Container child Movierok.Configuration.Gtk.Container+ContainerChild
     this.boxConfig = new Gtk.VBox();
     this.boxConfig.Name = "boxConfig";
     this.boxConfig.Spacing = 6;
     // Container child boxConfig.Gtk.Box+BoxChild
     this.frmGeneral = new Gtk.Frame();
     this.frmGeneral.Name = "frmGeneral";
     this.frmGeneral.ShadowType = ((Gtk.ShadowType)(0));
     // Container child frmGeneral.Gtk.Container+ContainerChild
     this.GtkAlignment = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment.Name = "GtkAlignment";
     this.GtkAlignment.LeftPadding = ((uint)(12));
     // Container child GtkAlignment.Gtk.Container+ContainerChild
     this.table4 = new Gtk.Table(((uint)(2)), ((uint)(2)), false);
     this.table4.Name = "table4";
     this.table4.RowSpacing = ((uint)(6));
     this.table4.ColumnSpacing = ((uint)(6));
     // Container child table4.Gtk.Table+TableChild
     this.chsrPlayer = new Gtk.FileChooserButton(Mono.Unix.Catalog.GetString("Select A File"), ((Gtk.FileChooserAction)(0)));
     this.chsrPlayer.Name = "chsrPlayer";
     this.table4.Add(this.chsrPlayer);
     Gtk.Table.TableChild w1 = ((Gtk.Table.TableChild)(this.table4[this.chsrPlayer]));
     w1.TopAttach = ((uint)(1));
     w1.BottomAttach = ((uint)(2));
     w1.LeftAttach = ((uint)(1));
     w1.RightAttach = ((uint)(2));
     w1.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table4.Gtk.Table+TableChild
     this.lblPlayer = new Gtk.Label();
     this.lblPlayer.Name = "lblPlayer";
     this.lblPlayer.Xalign = 0F;
     this.lblPlayer.LabelProp = Mono.Unix.Catalog.GetString("Player:");
     this.table4.Add(this.lblPlayer);
     Gtk.Table.TableChild w2 = ((Gtk.Table.TableChild)(this.table4[this.lblPlayer]));
     w2.TopAttach = ((uint)(1));
     w2.BottomAttach = ((uint)(2));
     w2.XOptions = ((Gtk.AttachOptions)(4));
     w2.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table4.Gtk.Table+TableChild
     this.lblUsername = new Gtk.Label();
     this.lblUsername.Name = "lblUsername";
     this.lblUsername.Xalign = 0F;
     this.lblUsername.LabelProp = Mono.Unix.Catalog.GetString("Username:"******"txtUsername";
     this.txtUsername.IsEditable = true;
     this.txtUsername.InvisibleChar = '●';
     this.table4.Add(this.txtUsername);
     Gtk.Table.TableChild w4 = ((Gtk.Table.TableChild)(this.table4[this.txtUsername]));
     w4.LeftAttach = ((uint)(1));
     w4.RightAttach = ((uint)(2));
     w4.YOptions = ((Gtk.AttachOptions)(4));
     this.GtkAlignment.Add(this.table4);
     this.frmGeneral.Add(this.GtkAlignment);
     this.GtkLabel1 = new Gtk.Label();
     this.GtkLabel1.Name = "GtkLabel1";
     this.GtkLabel1.LabelProp = Mono.Unix.Catalog.GetString("<b>General</b>");
     this.GtkLabel1.UseMarkup = true;
     this.frmGeneral.LabelWidget = this.GtkLabel1;
     this.boxConfig.Add(this.frmGeneral);
     Gtk.Box.BoxChild w7 = ((Gtk.Box.BoxChild)(this.boxConfig[this.frmGeneral]));
     w7.Position = 0;
     w7.Expand = false;
     w7.Fill = false;
     // Container child boxConfig.Gtk.Box+BoxChild
     this.frmAdvanced = new Gtk.Frame();
     this.frmAdvanced.Name = "frmAdvanced";
     this.frmAdvanced.ShadowType = ((Gtk.ShadowType)(0));
     // Container child frmAdvanced.Gtk.Container+ContainerChild
     this.GtkAlignment1 = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment1.Name = "GtkAlignment1";
     this.GtkAlignment1.LeftPadding = ((uint)(12));
     // Container child GtkAlignment1.Gtk.Container+ContainerChild
     this.table5 = new Gtk.Table(((uint)(1)), ((uint)(2)), false);
     this.table5.Name = "table5";
     this.table5.RowSpacing = ((uint)(6));
     this.table5.ColumnSpacing = ((uint)(6));
     // Container child table5.Gtk.Table+TableChild
     this.cmbProfiles = Gtk.ComboBox.NewText();
     this.cmbProfiles.Name = "cmbProfiles";
     this.cmbProfiles.Active = 0;
     this.table5.Add(this.cmbProfiles);
     Gtk.Table.TableChild w8 = ((Gtk.Table.TableChild)(this.table5[this.cmbProfiles]));
     w8.LeftAttach = ((uint)(1));
     w8.RightAttach = ((uint)(2));
     w8.XOptions = ((Gtk.AttachOptions)(4));
     w8.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table5.Gtk.Table+TableChild
     this.lblProfiles = new Gtk.Label();
     this.lblProfiles.Name = "lblProfiles";
     this.lblProfiles.Xalign = 0F;
     this.lblProfiles.LabelProp = Mono.Unix.Catalog.GetString("Firefox Profile:");
     this.table5.Add(this.lblProfiles);
     Gtk.Table.TableChild w9 = ((Gtk.Table.TableChild)(this.table5[this.lblProfiles]));
     w9.XOptions = ((Gtk.AttachOptions)(4));
     w9.YOptions = ((Gtk.AttachOptions)(4));
     this.GtkAlignment1.Add(this.table5);
     this.frmAdvanced.Add(this.GtkAlignment1);
     this.lblAdvanced = new Gtk.Label();
     this.lblAdvanced.Name = "lblAdvanced";
     this.lblAdvanced.LabelProp = Mono.Unix.Catalog.GetString("<b>Advanced</b>");
     this.lblAdvanced.UseMarkup = true;
     this.frmAdvanced.LabelWidget = this.lblAdvanced;
     this.boxConfig.Add(this.frmAdvanced);
     Gtk.Box.BoxChild w12 = ((Gtk.Box.BoxChild)(this.boxConfig[this.frmAdvanced]));
     w12.Position = 1;
     w12.Expand = false;
     w12.Fill = false;
     // Container child boxConfig.Gtk.Box+BoxChild
     this.vbox1 = new Gtk.VBox();
     this.vbox1.Name = "vbox1";
     this.vbox1.Spacing = 6;
     // Container child vbox1.Gtk.Box+BoxChild
     this.lblAccount = new Gtk.Label();
     this.lblAccount.Name = "lblAccount";
     this.lblAccount.LabelProp = Mono.Unix.Catalog.GetString("Don't have an account?");
     this.vbox1.Add(this.lblAccount);
     Gtk.Box.BoxChild w13 = ((Gtk.Box.BoxChild)(this.vbox1[this.lblAccount]));
     w13.Position = 0;
     w13.Expand = false;
     w13.Fill = false;
     // Container child vbox1.Gtk.Box+BoxChild
     this.btnAccount = new Gtk.Button();
     this.btnAccount.CanFocus = true;
     this.btnAccount.Name = "btnAccount";
     this.btnAccount.UseUnderline = true;
     this.btnAccount.Label = "Sign up for movierok";
     this.vbox1.Add(this.btnAccount);
     Gtk.Box.BoxChild w14 = ((Gtk.Box.BoxChild)(this.vbox1[this.btnAccount]));
     w14.Position = 1;
     w14.Expand = false;
     w14.Fill = false;
     this.boxConfig.Add(this.vbox1);
     Gtk.Box.BoxChild w15 = ((Gtk.Box.BoxChild)(this.boxConfig[this.vbox1]));
     w15.PackType = ((Gtk.PackType)(1));
     w15.Position = 2;
     w15.Expand = false;
     w15.Fill = false;
     this.Add(this.boxConfig);
     if ((this.Child != null)) {
         this.Child.ShowAll();
     }
     this.Show();
     this.cmbProfiles.Changed += new System.EventHandler(this.OnCmbProfilesChanged);
     this.btnAccount.Clicked += new System.EventHandler(this.OnBtnAccountClicked);
 }
 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget Monsoon.LoadTorrentDialog
     this.Name = "Monsoon.LoadTorrentDialog";
     this.Title = Mono.Unix.Catalog.GetString("Load torrent");
     this.WindowPosition = ((Gtk.WindowPosition)(4));
     // Internal child Monsoon.LoadTorrentDialog.VBox
     Gtk.VBox w1 = this.VBox;
     w1.Name = "dialog1_VBox";
     w1.BorderWidth = ((uint)(2));
     // Container child dialog1_VBox.Gtk.Box+BoxChild
     this.vbox4 = new Gtk.VBox();
     this.vbox4.Name = "vbox4";
     this.vbox4.Spacing = 6;
     // Container child vbox4.Gtk.Box+BoxChild
     this.frame3 = new Gtk.Frame();
     this.frame3.Name = "frame3";
     this.frame3.ShadowType = ((Gtk.ShadowType)(0));
     // Container child frame3.Gtk.Container+ContainerChild
     this.GtkAlignment2 = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment2.Name = "GtkAlignment2";
     this.GtkAlignment2.LeftPadding = ((uint)(12));
     // Container child GtkAlignment2.Gtk.Container+ContainerChild
     this.vbox5 = new Gtk.VBox();
     this.vbox5.Name = "vbox5";
     this.vbox5.Spacing = 6;
     // Container child vbox5.Gtk.Box+BoxChild
     this.hbox5 = new Gtk.HBox();
     this.hbox5.Name = "hbox5";
     this.hbox5.Spacing = 6;
     // Container child hbox5.Gtk.Box+BoxChild
     this.fileChooser = new Gtk.FileChooserButton(Mono.Unix.Catalog.GetString("Select A Folder"), ((Gtk.FileChooserAction)(2)));
     this.fileChooser.Name = "fileChooser";
     this.fileChooser.ShowHidden = true;
     this.hbox5.Add(this.fileChooser);
     Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.hbox5[this.fileChooser]));
     w2.Position = 0;
     this.vbox5.Add(this.hbox5);
     Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.vbox5[this.hbox5]));
     w3.Position = 0;
     w3.Expand = false;
     w3.Fill = false;
     // Container child vbox5.Gtk.Box+BoxChild
     this.table1 = new Gtk.Table(((uint)(2)), ((uint)(2)), false);
     this.table1.Name = "table1";
     this.table1.RowSpacing = ((uint)(6));
     this.table1.ColumnSpacing = ((uint)(6));
     // Container child table1.Gtk.Table+TableChild
     this.label2 = new Gtk.Label();
     this.label2.Name = "label2";
     this.label2.Xalign = 0F;
     this.label2.LabelProp = Mono.Unix.Catalog.GetString("Name:");
     this.table1.Add(this.label2);
     Gtk.Table.TableChild w4 = ((Gtk.Table.TableChild)(this.table1[this.label2]));
     w4.XOptions = ((Gtk.AttachOptions)(4));
     w4.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.label3 = new Gtk.Label();
     this.label3.Name = "label3";
     this.label3.Xalign = 0F;
     this.label3.LabelProp = Mono.Unix.Catalog.GetString("Size:");
     this.table1.Add(this.label3);
     Gtk.Table.TableChild w5 = ((Gtk.Table.TableChild)(this.table1[this.label3]));
     w5.TopAttach = ((uint)(1));
     w5.BottomAttach = ((uint)(2));
     w5.XOptions = ((Gtk.AttachOptions)(4));
     w5.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.lblName = new Gtk.Label();
     this.lblName.Name = "lblName";
     this.lblName.Xalign = 0F;
     this.lblName.LabelProp = Mono.Unix.Catalog.GetString("Suse-11.0-i386.iso");
     this.table1.Add(this.lblName);
     Gtk.Table.TableChild w6 = ((Gtk.Table.TableChild)(this.table1[this.lblName]));
     w6.LeftAttach = ((uint)(1));
     w6.RightAttach = ((uint)(2));
     w6.XOptions = ((Gtk.AttachOptions)(4));
     w6.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.lblSize = new Gtk.Label();
     this.lblSize.Name = "lblSize";
     this.lblSize.Xalign = 0F;
     this.lblSize.LabelProp = Mono.Unix.Catalog.GetString("700MB");
     this.table1.Add(this.lblSize);
     Gtk.Table.TableChild w7 = ((Gtk.Table.TableChild)(this.table1[this.lblSize]));
     w7.TopAttach = ((uint)(1));
     w7.BottomAttach = ((uint)(2));
     w7.LeftAttach = ((uint)(1));
     w7.RightAttach = ((uint)(2));
     w7.XOptions = ((Gtk.AttachOptions)(4));
     w7.YOptions = ((Gtk.AttachOptions)(4));
     this.vbox5.Add(this.table1);
     Gtk.Box.BoxChild w8 = ((Gtk.Box.BoxChild)(this.vbox5[this.table1]));
     w8.Position = 1;
     w8.Expand = false;
     w8.Fill = false;
     this.GtkAlignment2.Add(this.vbox5);
     this.frame3.Add(this.GtkAlignment2);
     this.GtkLabel2 = new Gtk.Label();
     this.GtkLabel2.Name = "GtkLabel2";
     this.GtkLabel2.LabelProp = Mono.Unix.Catalog.GetString("<b>Save</b>");
     this.GtkLabel2.UseMarkup = true;
     this.frame3.LabelWidget = this.GtkLabel2;
     this.vbox4.Add(this.frame3);
     Gtk.Box.BoxChild w11 = ((Gtk.Box.BoxChild)(this.vbox4[this.frame3]));
     w11.Position = 0;
     w11.Expand = false;
     w11.Fill = false;
     // Container child vbox4.Gtk.Box+BoxChild
     this.expander1 = new Gtk.Expander(null);
     this.expander1.CanFocus = true;
     this.expander1.Name = "expander1";
     this.expander1.Expanded = true;
     // Container child expander1.Gtk.Container+ContainerChild
     this.GtkScrolledWindow = new Gtk.ScrolledWindow();
     this.GtkScrolledWindow.Name = "GtkScrolledWindow";
     this.GtkScrolledWindow.ShadowType = ((Gtk.ShadowType)(1));
     // Container child GtkScrolledWindow.Gtk.Container+ContainerChild
     this.torrentTreeView = new Gtk.TreeView();
     this.torrentTreeView.CanFocus = true;
     this.torrentTreeView.Name = "torrentTreeView";
     this.GtkScrolledWindow.Add(this.torrentTreeView);
     this.expander1.Add(this.GtkScrolledWindow);
     this.GtkLabel1 = new Gtk.Label();
     this.GtkLabel1.Name = "GtkLabel1";
     this.GtkLabel1.LabelProp = Mono.Unix.Catalog.GetString("Files");
     this.GtkLabel1.UseUnderline = true;
     this.expander1.LabelWidget = this.GtkLabel1;
     this.vbox4.Add(this.expander1);
     Gtk.Box.BoxChild w14 = ((Gtk.Box.BoxChild)(this.vbox4[this.expander1]));
     w14.Position = 1;
     // Container child vbox4.Gtk.Box+BoxChild
     this.checkbutton2 = new Gtk.CheckButton();
     this.checkbutton2.CanFocus = true;
     this.checkbutton2.Name = "checkbutton2";
     this.checkbutton2.Label = Mono.Unix.Catalog.GetString("Always show this dialog");
     this.checkbutton2.Active = true;
     this.checkbutton2.DrawIndicator = true;
     this.checkbutton2.UseUnderline = true;
     this.vbox4.Add(this.checkbutton2);
     Gtk.Box.BoxChild w15 = ((Gtk.Box.BoxChild)(this.vbox4[this.checkbutton2]));
     w15.Position = 2;
     w15.Expand = false;
     w15.Fill = false;
     w1.Add(this.vbox4);
     Gtk.Box.BoxChild w16 = ((Gtk.Box.BoxChild)(w1[this.vbox4]));
     w16.Position = 0;
     // Internal child Monsoon.LoadTorrentDialog.ActionArea
     Gtk.HButtonBox w17 = this.ActionArea;
     w17.Name = "dialog1_ActionArea";
     w17.Spacing = 6;
     w17.BorderWidth = ((uint)(5));
     w17.LayoutStyle = ((Gtk.ButtonBoxStyle)(4));
     // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
     this.buttonCancel = new Gtk.Button();
     this.buttonCancel.CanDefault = true;
     this.buttonCancel.CanFocus = true;
     this.buttonCancel.Name = "buttonCancel";
     this.buttonCancel.UseStock = true;
     this.buttonCancel.UseUnderline = true;
     this.buttonCancel.Label = "gtk-cancel";
     this.AddActionWidget(this.buttonCancel, -6);
     Gtk.ButtonBox.ButtonBoxChild w18 = ((Gtk.ButtonBox.ButtonBoxChild)(w17[this.buttonCancel]));
     w18.Expand = false;
     w18.Fill = false;
     // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
     this.buttonOk = new Gtk.Button();
     this.buttonOk.CanDefault = true;
     this.buttonOk.CanFocus = true;
     this.buttonOk.Name = "buttonOk";
     this.buttonOk.UseStock = true;
     this.buttonOk.UseUnderline = true;
     this.buttonOk.Label = "gtk-ok";
     this.AddActionWidget(this.buttonOk, -5);
     Gtk.ButtonBox.ButtonBoxChild w19 = ((Gtk.ButtonBox.ButtonBoxChild)(w17[this.buttonOk]));
     w19.Position = 1;
     w19.Expand = false;
     w19.Fill = false;
     if ((this.Child != null)) {
         this.Child.ShowAll();
     }
     this.DefaultWidth = 400;
     this.DefaultHeight = 474;
     this.Show();
 }
Пример #13
0
        private void HandleResponse(object sender, Gtk.ResponseArgs args)
        {
            if (args.ResponseId != Gtk.ResponseType.Ok) {
                // FIXME this is to work around a bug in gtk+ where
                // the filesystem events are still listened to when
                // a FileChooserButton is destroyed but not finalized
                // and an event comes in that wants to update the child widgets.
                Dialog.Destroy ();
                uri_chooser.Dispose ();
                uri_chooser = null;
                return;
            }

            dest = GLib.FileFactory.NewForUri (uri_chooser.Uri);
            open = open_check.Active;
            scale = scale_check.Active;
            exportTags = export_tags_check.Active;
            exportTagIcons = export_tag_icons_check.Active;

            gallery_name = name_entry.Text;

            if (description_entry != null)
                description = description_entry.Text;

            if (scale)
                size = size_spin.ValueAsInt;

            command_thread = new System.Threading.Thread (new System.Threading.ThreadStart (Upload));
            command_thread.Name = Catalog.GetString ("Exporting Photos");

            progress_dialog = new ThreadProgressDialog (command_thread, 1);
            progress_dialog.Start ();
        }
        public void CreateGui()
        {
            Gtk.Image icn_reload=new Gtk.Image(Gtk.Stock.Refresh,Gtk.IconSize.Button);
            _reload=new Gtk.Button(icn_reload);
            _reload.Clicked+=OnReload;

            _performer=new Gtk.Entry(200);
            _title=new Gtk.Entry(200);
            _title.WidthChars=60;
            _performer.WidthChars=60;
            _subtitle=new Gtk.Entry(300);
            _subtitle.WidthChars=60;
            _composer=new Gtk.Entry(200);
            _composer.WidthChars=60;
            _year=new Gtk.Entry(20);
            _year.WidthChars=20;

            _image=new Gtk.Image();
            _image.SetSizeRequest (100,100);
            _imagefile=new Gtk.FileChooserButton("Choose image file",Gtk.FileChooserAction.Open);
            _imagefile.FileSet+=new EventHandler(EvtImageSet);

            Gtk.Image icn_add_track=new Gtk.Image(Gtk.Stock.Add,Gtk.IconSize.Button);
            _add_track=new Gtk.Button(icn_add_track);
            _add_track.Clicked+=OnAddTrack;

            Gtk.Image icn_del_track=new Gtk.Image(Gtk.Stock.Delete,Gtk.IconSize.Button);
            _del_track=new Gtk.Button(icn_del_track);
            _del_track.Clicked+=OnDelTrack;

            Gtk.Image icn_save=new Gtk.Image(Gtk.Stock.Save,Gtk.IconSize.Button);
            _save=new Gtk.Button(icn_save);
            _save.Clicked+=OnSave;

            _store=new Gtk.ListStore(typeof(int),typeof(string),typeof(string),typeof(string),typeof(string),typeof(string));
            _tracks=new Gtk.TreeView();
            {
                Gtk.CellRendererText cr0=new Gtk.CellRendererText();
                cr0.Scale=0.8;
                _tracks.AppendColumn ("Nr.", cr0, "text", 0);

                Gtk.CellRendererText cr_title=new Gtk.CellRendererText();
                cr_title.Scale=0.8;
                cr_title.Editable=true;
                cr_title.Edited+=new Gtk.EditedHandler(delegate(object sender,Gtk.EditedArgs args) {
                    setCell(1,args.NewText,new Gtk.TreePath(args.Path));
                });
                _tracks.AppendColumn ("Title", cr_title, "text", 1);

                Gtk.CellRendererText cr_artist=new Gtk.CellRendererText();
                cr_artist.Editable=true;
                cr_artist.Scale=0.8;
                cr_artist.Edited+=new Gtk.EditedHandler(delegate(object sender,Gtk.EditedArgs args) {
                    setCell(2,args.NewText,new Gtk.TreePath(args.Path));
                });
                _tracks.AppendColumn ("Artist", cr_artist, "text", 2);

                Gtk.CellRendererText cr_composer=new Gtk.CellRendererText();
                cr_composer.Editable=true;
                cr_composer.Scale=0.8;
                cr_composer.Edited+=new Gtk.EditedHandler(delegate(object sender,Gtk.EditedArgs args) {
                    setCell(3,args.NewText,new Gtk.TreePath(args.Path));
                });
                _tracks.AppendColumn ("Composer", cr_composer, "text", 3);

                Gtk.CellRendererText cr_piece=new Gtk.CellRendererText();
                cr_piece.Editable=true;
                cr_piece.Scale=0.8;
                cr_piece.Edited+=new Gtk.EditedHandler(delegate(object sender,Gtk.EditedArgs args) {
                    setCell(4,args.NewText,new Gtk.TreePath(args.Path));
                });
                _tracks.AppendColumn ("Piece", cr_piece, "text", 4);

                Gtk.CellRendererText cr_time=new Gtk.CellRendererText();
                cr_time.Editable=true;
                cr_time.Scale=0.8;
                cr_time.Edited+=new Gtk.EditedHandler(delegate(object sender,Gtk.EditedArgs args) {
                    setCell (5,args.NewText,new Gtk.TreePath(args.Path));
                });
                _tracks.AppendColumn ("Offset", cr_time, "text", 5);
            }

            _tracks.Model = _store;

            Gtk.Table tbl=new Gtk.Table(2,5,false);
            tbl.Attach (new Gtk.Label("Album:"),0,1,0,1);
            tbl.Attach (_title,1,2,0,1);
            tbl.Attach (new Gtk.Label("Artist:"),0,1,1,2);
            tbl.Attach (_performer,1,2,1,2);
            tbl.Attach (new Gtk.Label("Composer:"),0,1,2,3);
            tbl.Attach (_composer,1,2,2,3);
            tbl.Attach (new Gtk.Label("Subtitle:"),0,1,3,4);
            tbl.Attach (_subtitle,1,2,3,4);
            tbl.Attach (new Gtk.Label("year:"),0,1,4,5);
            tbl.Attach (_year,1,2,4,5);

            Gtk.Frame frm=new Gtk.Frame();
            frm.Add (tbl);

            Gtk.HBox hb2=new Gtk.HBox();
            hb2.PackEnd (_reload,false,false,1);
            hb2.PackEnd (_del_track,false,false,1);
            hb2.PackEnd (_add_track,false,false,1);
            hb2.PackEnd (_save,false,false,1);

            Gtk.HBox hb=new Gtk.HBox();
            Gtk.VBox vb1=new Gtk.VBox();
            vb1.PackStart (frm,false,false,0);
            vb1.PackStart (hb2,true,true,0);
            hb.PackStart (vb1,false,false,0);

            Gtk.Frame frm2=new Gtk.Frame();
            frm2.Add (_image);
            Gtk.VBox vbi=new Gtk.VBox();
            Gtk.HBox bb=new Gtk.HBox();
            bb.PackStart(new Gtk.VBox(),true,true,0);
            bb.PackStart(frm2,false,false,0);
            bb.PackEnd (new Gtk.VBox(),true,true,0);

            vbi.PackStart (bb,true,true,2);
            vbi.PackEnd (_imagefile,false,false,2);
            hb.PackEnd (vbi,true,true,2);

            Gtk.ScrolledWindow scroll=new Gtk.ScrolledWindow();
            scroll.Add (_tracks);
            scroll.SetSizeRequest (800,300);

            base.VBox.PackStart(hb,false,false,4);
            base.VBox.PackStart(scroll,true,true,0);
            base.VBox.ShowAll ();

            base.AddButton ("Close",0);
        }
Пример #15
0
 protected virtual void OnChooseBibtexFileButtonSelectionChanged
     (object sender, System.EventArgs e)
 {
     Gtk.FileChooserButton window = (Gtk.FileChooserButton)sender;
     BibtexFilePath = window.Filename;
 }
        public void Run(IBrowsableCollection selection)
        {
            /*
             * Gnome.Vfs.ModuleCallbackFullAuthentication auth = new Gnome.Vfs.ModuleCallbackFullAuthentication ();
             * auth.Callback += new Gnome.Vfs.ModuleCallbackHandler (HandleAuth);
             * auth.SetDefault ();
             * auth.Push ();
             *
             * Gnome.Vfs.ModuleCallbackAuthentication mauth = new Gnome.Vfs.ModuleCallbackAuthentication ();
             * mauth.Callback += new Gnome.Vfs.ModuleCallbackHandler (HandleAuth);
             * mauth.SetDefault ();
             * mauth.Push ();
             *
             * Gnome.Vfs.ModuleCallbackSaveAuthentication sauth = new Gnome.Vfs.ModuleCallbackSaveAuthentication ();
             * sauth.Callback += new Gnome.Vfs.ModuleCallbackHandler (HandleAuth);
             * sauth.SetDefault ();
             * sauth.Push ();
             *
             * Gnome.Vfs.ModuleCallbackStatusMessage msg = new Gnome.Vfs.ModuleCallbackStatusMessage ();
             * msg.Callback += new Gnome.Vfs.ModuleCallbackHandler (HandleMsg);
             * msg.SetDefault ();
             * msg.Push ();
             */
            this.selection = selection;

            IconView view = (IconView) new IconView(selection);

            view.DisplayDates = false;
            view.DisplayTags  = false;

            Dialog.Modal        = false;
            Dialog.TransientFor = null;

            thumb_scrolledwindow.Add(view);
            HandleSizeActive(null, null);
            name_entry.Text = gallery_name;

            string uri_path = System.IO.Path.Combine(FSpot.Global.HomeDirectory, "Desktop");

            if (!System.IO.Directory.Exists(uri_path))
            {
                uri_path = FSpot.Global.HomeDirectory;
            }

            uri_chooser = new Gtk.FileChooserButton(Catalog.GetString("Select Export Folder"),
                                                    Gtk.FileChooserAction.SelectFolder);

            uri_chooser.LocalOnly = false;

            if (Preferences.Get(Preferences.EXPORT_FOLDER_URI) != null && Preferences.Get(Preferences.EXPORT_FOLDER_URI) as string != String.Empty)
            {
                uri_chooser.SetUri(Preferences.Get(Preferences.EXPORT_FOLDER_URI) as string);
            }
            else
            {
                uri_chooser.SetFilename(uri_path);
            }

            chooser_hbox.PackStart(uri_chooser);

            Dialog.ShowAll();

            //LoadHistory ();
            Dialog.Response += HandleResponse;

            LoadPreference(Preferences.EXPORT_FOLDER_SCALE);
            LoadPreference(Preferences.EXPORT_FOLDER_SIZE);
            LoadPreference(Preferences.EXPORT_FOLDER_OPEN);
            LoadPreference(Preferences.EXPORT_FOLDER_ROTATE);
            LoadPreference(Preferences.EXPORT_FOLDER_METHOD);
        }
Пример #17
0
 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget MainWindow
     this.Name = "MainWindow";
     this.Title = Mono.Unix.Catalog.GetString("(ymt5gui) mt5 to objf");
     this.WindowPosition = ((Gtk.WindowPosition)(4));
     this.BorderWidth = ((uint)(3));
     // Container child MainWindow.Gtk.Container+ContainerChild
     this.vbox2 = new Gtk.VBox();
     this.vbox2.Name = "vbox2";
     this.vbox2.Spacing = 6;
     // Container child vbox2.Gtk.Box+BoxChild
     this.frame1 = new Gtk.Frame();
     this.frame1.Name = "frame1";
     // Container child frame1.Gtk.Container+ContainerChild
     this.GtkAlignment = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment.Name = "GtkAlignment";
     this.GtkAlignment.LeftPadding = ((uint)(12));
     // Container child GtkAlignment.Gtk.Container+ContainerChild
     this.vbox4 = new Gtk.VBox();
     this.vbox4.Name = "vbox4";
     this.vbox4.Spacing = 6;
     // Container child vbox4.Gtk.Box+BoxChild
     this.checkbutton2 = new Gtk.CheckButton();
     this.checkbutton2.CanFocus = true;
     this.checkbutton2.Name = "checkbutton2";
     this.checkbutton2.Label = Mono.Unix.Catalog.GetString("extract all mt5 from directory");
     this.checkbutton2.DrawIndicator = true;
     this.checkbutton2.UseUnderline = true;
     this.vbox4.Add(this.checkbutton2);
     Gtk.Box.BoxChild w1 = ((Gtk.Box.BoxChild)(this.vbox4[this.checkbutton2]));
     w1.Position = 0;
     w1.Expand = false;
     w1.Fill = false;
     // Container child vbox4.Gtk.Box+BoxChild
     this.filechooserbutton1 = new Gtk.FileChooserButton(Mono.Unix.Catalog.GetString("Sélectionner un fichier"), ((Gtk.FileChooserAction)(0)));
     this.filechooserbutton1.Name = "filechooserbutton1";
     this.vbox4.Add(this.filechooserbutton1);
     Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.vbox4[this.filechooserbutton1]));
     w2.Position = 1;
     w2.Expand = false;
     w2.Fill = false;
     this.GtkAlignment.Add(this.vbox4);
     this.frame1.Add(this.GtkAlignment);
     this.GtkLabel2 = new Gtk.Label();
     this.GtkLabel2.Name = "GtkLabel2";
     this.GtkLabel2.LabelProp = Mono.Unix.Catalog.GetString("<b>M</b>T5 path");
     this.GtkLabel2.UseMarkup = true;
     this.frame1.LabelWidget = this.GtkLabel2;
     this.vbox2.Add(this.frame1);
     Gtk.Box.BoxChild w5 = ((Gtk.Box.BoxChild)(this.vbox2[this.frame1]));
     w5.Position = 0;
     w5.Expand = false;
     w5.Fill = false;
     // Container child vbox2.Gtk.Box+BoxChild
     this.frame2 = new Gtk.Frame();
     this.frame2.Name = "frame2";
     // Container child frame2.Gtk.Container+ContainerChild
     this.GtkAlignment1 = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment1.Name = "GtkAlignment1";
     this.GtkAlignment1.LeftPadding = ((uint)(12));
     // Container child GtkAlignment1.Gtk.Container+ContainerChild
     this.vbox3 = new Gtk.VBox();
     this.vbox3.Name = "vbox3";
     this.vbox3.Spacing = 6;
     // Container child vbox3.Gtk.Box+BoxChild
     this.frame4 = new Gtk.Frame();
     this.frame4.Name = "frame4";
     this.frame4.ShadowType = ((Gtk.ShadowType)(0));
     // Container child frame4.Gtk.Container+ContainerChild
     this.GtkAlignment3 = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment3.Name = "GtkAlignment3";
     this.GtkAlignment3.LeftPadding = ((uint)(12));
     // Container child GtkAlignment3.Gtk.Container+ContainerChild
     this.filechooserbutton2 = new Gtk.FileChooserButton(Mono.Unix.Catalog.GetString("Sélectionner un fichier"), ((Gtk.FileChooserAction)(2)));
     this.filechooserbutton2.Name = "filechooserbutton2";
     this.GtkAlignment3.Add(this.filechooserbutton2);
     this.frame4.Add(this.GtkAlignment3);
     this.GtkLabel6 = new Gtk.Label();
     this.GtkLabel6.Name = "GtkLabel6";
     this.GtkLabel6.LabelProp = Mono.Unix.Catalog.GetString("Output path to objf");
     this.GtkLabel6.UseMarkup = true;
     this.frame4.LabelWidget = this.GtkLabel6;
     this.vbox3.Add(this.frame4);
     Gtk.Box.BoxChild w8 = ((Gtk.Box.BoxChild)(this.vbox3[this.frame4]));
     w8.Position = 0;
     w8.Expand = false;
     w8.Fill = false;
     // Container child vbox3.Gtk.Box+BoxChild
     this.checkbutton1 = new Gtk.CheckButton();
     this.checkbutton1.CanFocus = true;
     this.checkbutton1.Name = "checkbutton1";
     this.checkbutton1.Label = Mono.Unix.Catalog.GetString("do not use triangle strip (obj compatible)");
     this.checkbutton1.Active = true;
     this.checkbutton1.DrawIndicator = true;
     this.checkbutton1.UseUnderline = true;
     this.vbox3.Add(this.checkbutton1);
     Gtk.Box.BoxChild w9 = ((Gtk.Box.BoxChild)(this.vbox3[this.checkbutton1]));
     w9.Position = 1;
     w9.Expand = false;
     w9.Fill = false;
     this.GtkAlignment1.Add(this.vbox3);
     this.frame2.Add(this.GtkAlignment1);
     this.GtkLabel5 = new Gtk.Label();
     this.GtkLabel5.Name = "GtkLabel5";
     this.GtkLabel5.LabelProp = Mono.Unix.Catalog.GetString("<b>O</b>bjf pathes");
     this.GtkLabel5.UseMarkup = true;
     this.frame2.LabelWidget = this.GtkLabel5;
     this.vbox2.Add(this.frame2);
     Gtk.Box.BoxChild w12 = ((Gtk.Box.BoxChild)(this.vbox2[this.frame2]));
     w12.Position = 1;
     w12.Expand = false;
     w12.Fill = false;
     // Container child vbox2.Gtk.Box+BoxChild
     this.frame3 = new Gtk.Frame();
     this.frame3.Name = "frame3";
     // Container child frame3.Gtk.Container+ContainerChild
     this.GtkAlignment2 = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment2.Name = "GtkAlignment2";
     this.GtkAlignment2.LeftPadding = ((uint)(12));
     // Container child GtkAlignment2.Gtk.Container+ContainerChild
     this.hbox1 = new Gtk.HBox();
     this.hbox1.Name = "hbox1";
     this.hbox1.Spacing = 6;
     // Container child hbox1.Gtk.Box+BoxChild
     this.button2 = new Gtk.Button();
     this.button2.CanFocus = true;
     this.button2.Name = "button2";
     this.button2.UseUnderline = true;
     this.button2.Label = Mono.Unix.Catalog.GetString("Generate");
     this.hbox1.Add(this.button2);
     Gtk.Box.BoxChild w13 = ((Gtk.Box.BoxChild)(this.hbox1[this.button2]));
     w13.Position = 0;
     w13.Expand = false;
     w13.Fill = false;
     // Container child hbox1.Gtk.Box+BoxChild
     this.vbox1 = new Gtk.VBox();
     this.vbox1.Name = "vbox1";
     this.vbox1.Spacing = 6;
     // Container child vbox1.Gtk.Box+BoxChild
     this.progressbar1 = new Gtk.ProgressBar();
     this.progressbar1.Name = "progressbar1";
     this.vbox1.Add(this.progressbar1);
     Gtk.Box.BoxChild w14 = ((Gtk.Box.BoxChild)(this.vbox1[this.progressbar1]));
     w14.Position = 0;
     w14.Expand = false;
     w14.Fill = false;
     this.hbox1.Add(this.vbox1);
     Gtk.Box.BoxChild w15 = ((Gtk.Box.BoxChild)(this.hbox1[this.vbox1]));
     w15.Position = 1;
     this.GtkAlignment2.Add(this.hbox1);
     this.frame3.Add(this.GtkAlignment2);
     this.GtkLabel10 = new Gtk.Label();
     this.GtkLabel10.Name = "GtkLabel10";
     this.GtkLabel10.LabelProp = Mono.Unix.Catalog.GetString("<b>M</b>t52objf");
     this.GtkLabel10.UseMarkup = true;
     this.frame3.LabelWidget = this.GtkLabel10;
     this.vbox2.Add(this.frame3);
     Gtk.Box.BoxChild w18 = ((Gtk.Box.BoxChild)(this.vbox2[this.frame3]));
     w18.Position = 2;
     w18.Expand = false;
     w18.Fill = false;
     this.Add(this.vbox2);
     if ((this.Child != null)) {
         this.Child.ShowAll();
     }
     this.DefaultWidth = 764;
     this.DefaultHeight = 218;
     this.Show();
     this.DeleteEvent += new Gtk.DeleteEventHandler(this.OnDeleteEvent);
     this.checkbutton2.Toggled += new System.EventHandler(this.onMt5DirectoryToggle);
     this.button2.Clicked += new System.EventHandler(this.OnButton2Clicked);
 }
Пример #18
0
 protected virtual void OnChooseDocsFolderButtonSelectionChanged
     (object sender, System.EventArgs e)
 {
     Gtk.FileChooserButton window = (Gtk.FileChooserButton)sender;
     DocumentLibrary = window.Filename;
 }
Пример #19
0
        public GCDialog(GameConfig config)
        {
            Build();

            mConfig         = config;
            OutputPath.Text = mConfig.OutputDirectoryPath;
            Gtk.FileChooserButton fileChooserButton = new Gtk.FileChooserButton("select output directory", Gtk.FileChooserAction.SelectFolder);
            if (config.Game == Game.Persona3 || config.Game == Game.Persona4)
            {
                var p34Config = (Persona34GameConfig)config;

                ISOLabel.Visible     = true;
                ISOLabel.TooltipText = "Path to an unmodified ISO of " + config.Game.ToString();
                ISOPath.Visible      = true;
                if (p34Config.DvdRootOrIsoPath.Length == 0)
                {
                    ISOPath.Text = nameof(p34Config.DvdRootOrIsoPath);
                }
                else
                {
                    ISOPath.Text = p34Config.DvdRootOrIsoPath;
                }
                ISOPicker.Visible = true;

                // Dvd root directory text box

                /*
                 * TextBox dvdRootPathTextBox;
                 * {
                 *  dvdRootPathTextBox = new TextBox()
                 *  {
                 *      VerticalContentAlignment = VerticalAlignment.Center,
                 *      HorizontalAlignment = HorizontalAlignment.Center,
                 *      VerticalAlignment = VerticalAlignment.Center,
                 *      Height = 20,
                 *      TextWrapping = TextWrapping.Wrap,
                 *      Width = 291,
                 *  };
                 *
                 *  dvdRootPathTextBox.SetBinding(TextBox.TextProperty, new Binding(nameof(Persona34GameConfig.DvdRootOrIsoPath)));
                 *
                 *  Grid.SetRow(dvdRootPathTextBox, 2);
                 *  Grid.SetColumn(dvdRootPathTextBox, 1);
                 *  ConfigPropertyGrid.Children.Add(dvdRootPathTextBox);
                 * }
                 */

                // Dvd root directory text box button

                /*
                 * {
                 *  var dvdRootPathTextBoxButton = new Button()
                 *  {
                 *      Content = "...",
                 *      HorizontalAlignment = HorizontalAlignment.Right,
                 *      VerticalAlignment = VerticalAlignment.Center,
                 *      Width = 20,
                 *      Height = 20
                 *  };
                 *
                 *  dvdRootPathTextBoxButton.Click += (s, e) =>
                 *  {
                 *      var file = SelectFile(new CommonFileDialogFilter("ISO file", ".iso"));
                 *      if (file != null)
                 *      {
                 *          p34Config.DvdRootOrIsoPath = file;
                 *          dvdRootPathTextBox.GetBindingExpression(TextBox.TextProperty).UpdateTarget();
                 *      }
                 *  };
                 *
                 *  Grid.SetRow(dvdRootPathTextBoxButton, 2);
                 *  Grid.SetColumn(dvdRootPathTextBoxButton, 1);
                 *  ConfigPropertyGrid.Children.Add(dvdRootPathTextBoxButton);
                 * }
                 */
            }


            else if (config.Game == Game.Persona5)
            {
                var ppConfig = (Persona5GameConfig)config;
            }
            else
            {
                var ppConfig = (PersonaPortableGameConfig)config;

                // Add extra row
                // ConfigPropertyGrid.RowDefinitions.Add(new RowDefinition());
                CPKLabel.Visible     = true;
                CPKLabel.TooltipText = "Path to an unmodified CPK of " + config.Game.ToString();
                CPKPath.Visible      = true;
                CPKPicker.Visible    = true;



                // Cpk root directory path label

                /*
                 * {
                 *  var cpkRootPathLabel = new Label()
                 *  {
                 *      Content = "CPK Path",
                 *      ToolTip = "Path to an unmodified CPK of " + config.Game.ToString(),
                 *      HorizontalContentAlignment = HorizontalAlignment.Center,
                 *      VerticalContentAlignment = VerticalAlignment.Center,
                 *      HorizontalAlignment = HorizontalAlignment.Center,
                 *      VerticalAlignment = VerticalAlignment.Center,
                 *      Height = 25,
                 *      Width = 120
                 *  };
                 *
                 *  Grid.SetRow(cpkRootPathLabel, 2);
                 *  Grid.SetColumn(cpkRootPathLabel, 0);
                 *  ConfigPropertyGrid.Children.Add(cpkRootPathLabel);
                 * }
                 *
                 *
                 * // Cpk root directory text box
                 * TextBox cpkRootPathTextBox;
                 * {
                 *  cpkRootPathTextBox = new TextBox()
                 *  {
                 *      VerticalContentAlignment = VerticalAlignment.Center,
                 *      HorizontalAlignment = HorizontalAlignment.Center,
                 *      VerticalAlignment = VerticalAlignment.Center,
                 *      Height = 20,
                 *      TextWrapping = TextWrapping.Wrap,
                 *      Width = 291,
                 *  };
                 *
                 *  cpkRootPathTextBox.SetBinding(TextBox.TextProperty, new Binding(nameof(PersonaPortableGameConfig.CpkRootOrPath)));
                 *
                 *  Grid.SetRow(cpkRootPathTextBox, 2);
                 *  Grid.SetColumn(cpkRootPathTextBox, 1);
                 *  ConfigPropertyGrid.Children.Add(cpkRootPathTextBox);
                 * }
                 *
                 * // Cpk root directory text box button
                 * {
                 *  var cpkRootPathTextBoxButton = new Button()
                 *  {
                 *      Content = "...",
                 *      HorizontalAlignment = HorizontalAlignment.Right,
                 *      VerticalAlignment = VerticalAlignment.Center,
                 *      Width = 20,
                 *      Height = 20
                 *  };
                 *
                 *  cpkRootPathTextBoxButton.Click += (s, e) =>
                 *  {
                 *      var file = SelectFile(new CommonFileDialogFilter("CPK file", ".cpk"));
                 *      if (file != null)
                 *      {
                 *          ppConfig.CpkRootOrPath = file;
                 *          cpkRootPathTextBox.GetBindingExpression(TextBox.TextProperty).UpdateTarget();
                 *      }
                 *  };
                 *
                 *  Grid.SetRow(cpkRootPathTextBoxButton, 2);
                 *  Grid.SetColumn(cpkRootPathTextBoxButton, 1);
                 *  ConfigPropertyGrid.Children.Add(cpkRootPathTextBoxButton);
                 * }
                 */

                // Add extra row

                CPKCheckbox.Visible = true;

                /*
                 * ConfigPropertyGrid.RowDefinitions.Add(new RowDefinition());
                 * // Extraction checkbox label
                 * {
                 *  var cpkExtractLabel = new Label()
                 *  {
                 *      Content = "Use Extracted Files",
                 *      ToolTip = "Extract the contents of the CPK at the specified CPK Path",
                 *      HorizontalContentAlignment = HorizontalAlignment.Center,
                 *      VerticalContentAlignment = VerticalAlignment.Center,
                 *      HorizontalAlignment = HorizontalAlignment.Center,
                 *      VerticalAlignment = VerticalAlignment.Center,
                 *      Height = 35,
                 *      Width = 120
                 *  };
                 *
                 *  Grid.SetRow(cpkExtractLabel, 4);
                 *  Grid.SetColumn(cpkExtractLabel, 0);
                 *  ConfigPropertyGrid.Children.Add(cpkExtractLabel);
                 * }
                 *
                 * // Cpk Extraction checkbox
                 * CheckBox cpkExtract;
                 * {
                 *  cpkExtract = new CheckBox()
                 *  {
                 *      VerticalContentAlignment = VerticalAlignment.Center,
                 *      HorizontalAlignment = HorizontalAlignment.Left,
                 *      VerticalAlignment = VerticalAlignment.Center,
                 *      Height = 35,
                 *  };
                 *
                 *  cpkExtract.SetBinding(CheckBox.IsCheckedProperty, new Binding(nameof(PersonaPortableGameConfig.Extract)));
                 *
                 *  Grid.SetRow(cpkExtract, 4);
                 *  Grid.SetColumn(cpkExtract, 1);
                 *  ConfigPropertyGrid.Children.Add(cpkExtract);
                 * }
                 *
                 * }
                 */
                if (config.Game != Game.Persona3 && config.Game != Game.Persona4)
                {
                    /*
                     * // Add extra row
                     * ConfigPropertyGrid.RowDefinitions.Add(new RowDefinition());
                     *
                     * // Compression checkbox label
                     * {
                     *  var cpkCompressionLabel = new Label()
                     *  {
                     *      Content = "Use Compression",
                     *      ToolTip = "Check if CPK compression is required by " + config.Game.ToString(),
                     *      HorizontalContentAlignment = HorizontalAlignment.Center,
                     *      VerticalContentAlignment = VerticalAlignment.Center,
                     *      HorizontalAlignment = HorizontalAlignment.Center,
                     *      VerticalAlignment = VerticalAlignment.Center,
                     *      Height = 35,
                     *      Width = 120
                     *  };
                     *
                     *  Grid.SetRow(cpkCompressionLabel, 3);
                     *  Grid.SetColumn(cpkCompressionLabel, 0);
                     *  ConfigPropertyGrid.Children.Add(cpkCompressionLabel);
                     * }
                     *
                     * // Cpk compression checkbox
                     * CheckBox cpkCompression;
                     * {
                     *  cpkCompression = new CheckBox()
                     *  {
                     *      VerticalContentAlignment = VerticalAlignment.Center,
                     *      HorizontalAlignment = HorizontalAlignment.Left,
                     *      VerticalAlignment = VerticalAlignment.Center,
                     *      Height = 35,
                     *  };
                     *
                     *  cpkCompression.SetBinding(CheckBox.IsCheckedProperty, new Binding(nameof(PersonaPortableGameConfig.Compression)));
                     *
                     *  Grid.SetRow(cpkCompression, 3);
                     *  Grid.SetColumn(cpkCompression, 1);
                     *  ConfigPropertyGrid.Children.Add(cpkCompression);
                     * }
                     */
                    CVMCheckbox.Visible = true;
                }
            }
        }
Пример #20
0
 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget MainWindow
     this.Name = "MainWindow";
     this.Title = Mono.Unix.Catalog.GetString("Youtube Video Downloader");
     this.Icon = Stetic.IconLoader.LoadIcon(this, "stock_score-highest", Gtk.IconSize.Menu, 16);
     this.WindowPosition = ((Gtk.WindowPosition)(4));
     this.Resizable = false;
     this.AllowGrow = false;
     // Container child MainWindow.Gtk.Container+ContainerChild
     this.vbox1 = new Gtk.VBox();
     this.vbox1.Name = "vbox1";
     this.vbox1.Spacing = 6;
     // Container child vbox1.Gtk.Box+BoxChild
     this.vbox2 = new Gtk.VBox();
     this.vbox2.Name = "vbox2";
     this.vbox2.Spacing = 6;
     // Container child vbox2.Gtk.Box+BoxChild
     this.hbox1 = new Gtk.HBox();
     this.hbox1.Name = "hbox1";
     this.hbox1.Spacing = 6;
     // Container child hbox1.Gtk.Box+BoxChild
     this.label1 = new Gtk.Label();
     this.label1.Name = "label1";
     this.label1.LabelProp = Mono.Unix.Catalog.GetString("Youtube URL");
     this.hbox1.Add(this.label1);
     Gtk.Box.BoxChild w1 = ((Gtk.Box.BoxChild)(this.hbox1[this.label1]));
     w1.Position = 0;
     w1.Expand = false;
     w1.Fill = false;
     // Container child hbox1.Gtk.Box+BoxChild
     this.txturl = new Gtk.Entry();
     this.txturl.CanFocus = true;
     this.txturl.Name = "txturl";
     this.txturl.IsEditable = true;
     this.txturl.InvisibleChar = '●';
     this.hbox1.Add(this.txturl);
     Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.hbox1[this.txturl]));
     w2.Position = 1;
     this.vbox2.Add(this.hbox1);
     Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.vbox2[this.hbox1]));
     w3.Position = 0;
     w3.Expand = false;
     w3.Fill = false;
     // Container child vbox2.Gtk.Box+BoxChild
     this.hbox2 = new Gtk.HBox();
     this.hbox2.Name = "hbox2";
     this.hbox2.Spacing = 6;
     // Container child hbox2.Gtk.Box+BoxChild
     this.label2 = new Gtk.Label();
     this.label2.Name = "label2";
     this.label2.LabelProp = Mono.Unix.Catalog.GetString("Video Name");
     this.hbox2.Add(this.label2);
     Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(this.hbox2[this.label2]));
     w4.Position = 0;
     w4.Expand = false;
     w4.Fill = false;
     // Container child hbox2.Gtk.Box+BoxChild
     this.txtname = new Gtk.Entry();
     this.txtname.CanFocus = true;
     this.txtname.Name = "txtname";
     this.txtname.IsEditable = true;
     this.txtname.InvisibleChar = '●';
     this.hbox2.Add(this.txtname);
     Gtk.Box.BoxChild w5 = ((Gtk.Box.BoxChild)(this.hbox2[this.txtname]));
     w5.Position = 1;
     this.vbox2.Add(this.hbox2);
     Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(this.vbox2[this.hbox2]));
     w6.Position = 1;
     w6.Expand = false;
     w6.Fill = false;
     this.vbox1.Add(this.vbox2);
     Gtk.Box.BoxChild w7 = ((Gtk.Box.BoxChild)(this.vbox1[this.vbox2]));
     w7.Position = 0;
     w7.Expand = false;
     w7.Fill = false;
     // Container child vbox1.Gtk.Box+BoxChild
     this.vbox3 = new Gtk.VBox();
     this.vbox3.Name = "vbox3";
     this.vbox3.Spacing = 6;
     // Container child vbox3.Gtk.Box+BoxChild
     this.hbox3 = new Gtk.HBox();
     this.hbox3.Name = "hbox3";
     this.hbox3.Spacing = 6;
     // Container child hbox3.Gtk.Box+BoxChild
     this.label3 = new Gtk.Label();
     this.label3.Name = "label3";
     this.label3.LabelProp = Mono.Unix.Catalog.GetString("Destination Folder");
     this.hbox3.Add(this.label3);
     Gtk.Box.BoxChild w8 = ((Gtk.Box.BoxChild)(this.hbox3[this.label3]));
     w8.Position = 0;
     w8.Expand = false;
     w8.Fill = false;
     // Container child hbox3.Gtk.Box+BoxChild
     this.txtpath = new Gtk.FileChooserButton(Mono.Unix.Catalog.GetString("Please select the destination folder"), ((Gtk.FileChooserAction)(2)));
     this.txtpath.Name = "txtpath";
     this.txtpath.ShowHidden = true;
     this.hbox3.Add(this.txtpath);
     Gtk.Box.BoxChild w9 = ((Gtk.Box.BoxChild)(this.hbox3[this.txtpath]));
     w9.Position = 1;
     this.vbox3.Add(this.hbox3);
     Gtk.Box.BoxChild w10 = ((Gtk.Box.BoxChild)(this.vbox3[this.hbox3]));
     w10.Position = 0;
     w10.Expand = false;
     w10.Fill = false;
     // Container child vbox3.Gtk.Box+BoxChild
     this.hbox4 = new Gtk.HBox();
     this.hbox4.Name = "hbox4";
     this.hbox4.Spacing = 6;
     // Container child hbox4.Gtk.Box+BoxChild
     this.hbox5 = new Gtk.HBox();
     this.hbox5.Name = "hbox5";
     this.hbox5.Spacing = 6;
     // Container child hbox5.Gtk.Box+BoxChild
     this.chkflv = new Gtk.CheckButton();
     this.chkflv.CanFocus = true;
     this.chkflv.Name = "chkflv";
     this.chkflv.Label = Mono.Unix.Catalog.GetString("flv");
     this.chkflv.Active = true;
     this.chkflv.DrawIndicator = true;
     this.chkflv.UseUnderline = true;
     this.hbox5.Add(this.chkflv);
     Gtk.Box.BoxChild w11 = ((Gtk.Box.BoxChild)(this.hbox5[this.chkflv]));
     w11.Position = 0;
     // Container child hbox5.Gtk.Box+BoxChild
     this.chkavi = new Gtk.CheckButton();
     this.chkavi.CanFocus = true;
     this.chkavi.Name = "chkavi";
     this.chkavi.Label = Mono.Unix.Catalog.GetString("avi");
     this.chkavi.DrawIndicator = true;
     this.chkavi.UseUnderline = true;
     this.hbox5.Add(this.chkavi);
     Gtk.Box.BoxChild w12 = ((Gtk.Box.BoxChild)(this.hbox5[this.chkavi]));
     w12.Position = 1;
     this.hbox4.Add(this.hbox5);
     Gtk.Box.BoxChild w13 = ((Gtk.Box.BoxChild)(this.hbox4[this.hbox5]));
     w13.Position = 0;
     // Container child hbox4.Gtk.Box+BoxChild
     this.hbox6 = new Gtk.HBox();
     this.hbox6.Name = "hbox6";
     this.hbox6.Spacing = 6;
     // Container child hbox6.Gtk.Box+BoxChild
     this.chk3gp = new Gtk.CheckButton();
     this.chk3gp.CanFocus = true;
     this.chk3gp.Name = "chk3gp";
     this.chk3gp.Label = Mono.Unix.Catalog.GetString("3gp");
     this.chk3gp.DrawIndicator = true;
     this.chk3gp.UseUnderline = true;
     this.hbox6.Add(this.chk3gp);
     Gtk.Box.BoxChild w14 = ((Gtk.Box.BoxChild)(this.hbox6[this.chk3gp]));
     w14.Position = 0;
     // Container child hbox6.Gtk.Box+BoxChild
     this.chkmp3 = new Gtk.CheckButton();
     this.chkmp3.CanFocus = true;
     this.chkmp3.Name = "chkmp3";
     this.chkmp3.Label = Mono.Unix.Catalog.GetString("mp3");
     this.chkmp3.DrawIndicator = true;
     this.chkmp3.UseUnderline = true;
     this.hbox6.Add(this.chkmp3);
     Gtk.Box.BoxChild w15 = ((Gtk.Box.BoxChild)(this.hbox6[this.chkmp3]));
     w15.Position = 1;
     this.hbox4.Add(this.hbox6);
     Gtk.Box.BoxChild w16 = ((Gtk.Box.BoxChild)(this.hbox4[this.hbox6]));
     w16.Position = 1;
     this.vbox3.Add(this.hbox4);
     Gtk.Box.BoxChild w17 = ((Gtk.Box.BoxChild)(this.vbox3[this.hbox4]));
     w17.Position = 1;
     w17.Expand = false;
     w17.Fill = false;
     this.vbox1.Add(this.vbox3);
     Gtk.Box.BoxChild w18 = ((Gtk.Box.BoxChild)(this.vbox1[this.vbox3]));
     w18.Position = 1;
     w18.Expand = false;
     w18.Fill = false;
     // Container child vbox1.Gtk.Box+BoxChild
     this.hbox7 = new Gtk.HBox();
     this.hbox7.Name = "hbox7";
     this.hbox7.Spacing = 6;
     // Container child hbox7.Gtk.Box+BoxChild
     this.hseparator1 = new Gtk.HSeparator();
     this.hseparator1.Name = "hseparator1";
     this.hbox7.Add(this.hseparator1);
     Gtk.Box.BoxChild w19 = ((Gtk.Box.BoxChild)(this.hbox7[this.hseparator1]));
     w19.Position = 0;
     // Container child hbox7.Gtk.Box+BoxChild
     this.lblstatus = new Gtk.Label();
     this.lblstatus.Name = "lblstatus";
     this.lblstatus.LabelProp = "";
     this.hbox7.Add(this.lblstatus);
     Gtk.Box.BoxChild w20 = ((Gtk.Box.BoxChild)(this.hbox7[this.lblstatus]));
     w20.Position = 1;
     w20.Expand = false;
     w20.Fill = false;
     // Container child hbox7.Gtk.Box+BoxChild
     this.hbox8 = new Gtk.HBox();
     this.hbox8.Name = "hbox8";
     this.hbox8.Spacing = 6;
     // Container child hbox8.Gtk.Box+BoxChild
     this.btnok = new Gtk.Button();
     this.btnok.CanFocus = true;
     this.btnok.Name = "btnok";
     this.btnok.UseUnderline = true;
     this.btnok.Label = Mono.Unix.Catalog.GetString("OK");
     this.hbox8.Add(this.btnok);
     Gtk.Box.BoxChild w21 = ((Gtk.Box.BoxChild)(this.hbox8[this.btnok]));
     w21.Position = 0;
     w21.Expand = false;
     w21.Fill = false;
     this.hbox7.Add(this.hbox8);
     Gtk.Box.BoxChild w22 = ((Gtk.Box.BoxChild)(this.hbox7[this.hbox8]));
     w22.Position = 2;
     w22.Expand = false;
     w22.Fill = false;
     this.vbox1.Add(this.hbox7);
     Gtk.Box.BoxChild w23 = ((Gtk.Box.BoxChild)(this.vbox1[this.hbox7]));
     w23.Position = 2;
     w23.Expand = false;
     w23.Fill = false;
     this.Add(this.vbox1);
     if ((this.Child != null)) {
         this.Child.ShowAll();
     }
     this.DefaultWidth = 395;
     this.DefaultHeight = 169;
     this.Show();
     this.DeleteEvent += new Gtk.DeleteEventHandler(this.OnDeleteEvent);
     this.btnok.Clicked += new System.EventHandler(this.OnBtnokClicked);
 }
Пример #21
0
 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget MonoDevelop.VersionControl.Bazaar.Dialogs.BranchSelectionDialog
     this.CanFocus       = true;
     this.Name           = "MonoDevelop.VersionControl.Bazaar.Dialogs.BranchSelectionDialog";
     this.Title          = Mono.Unix.Catalog.GetString("Choose a Branch");
     this.WindowPosition = ((Gtk.WindowPosition)(4));
     this.Modal          = true;
     // Internal child MonoDevelop.VersionControl.Bazaar.Dialogs.BranchSelectionDialog.VBox
     Gtk.VBox w1 = this.VBox;
     w1.Name        = "dialog1_VBox";
     w1.BorderWidth = ((uint)(2));
     // Container child dialog1_VBox.Gtk.Box+BoxChild
     this.vbox2         = new Gtk.VBox();
     this.vbox2.Name    = "vbox2";
     this.vbox2.Spacing = 6;
     // Container child vbox2.Gtk.Box+BoxChild
     this.GtkScrolledWindow            = new Gtk.ScrolledWindow();
     this.GtkScrolledWindow.Name       = "GtkScrolledWindow";
     this.GtkScrolledWindow.ShadowType = ((Gtk.ShadowType)(1));
     // Container child GtkScrolledWindow.Gtk.Container+ContainerChild
     this.branchTreeView              = new Gtk.TreeView();
     this.branchTreeView.CanFocus     = true;
     this.branchTreeView.Name         = "branchTreeView";
     this.branchTreeView.SearchColumn = 0;
     this.GtkScrolledWindow.Add(this.branchTreeView);
     this.vbox2.Add(this.GtkScrolledWindow);
     Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.vbox2[this.GtkScrolledWindow]));
     w3.Position = 0;
     // Container child vbox2.Gtk.Box+BoxChild
     this.localPathButton            = new Gtk.FileChooserButton(Mono.Unix.Catalog.GetString("Choose Local Path"), ((Gtk.FileChooserAction)(2)));
     this.localPathButton.Name       = "localPathButton";
     this.localPathButton.ShowHidden = true;
     this.vbox2.Add(this.localPathButton);
     Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(this.vbox2[this.localPathButton]));
     w4.Position = 1;
     w4.Expand   = false;
     w4.Fill     = false;
     // Container child vbox2.Gtk.Box+BoxChild
     this.hbox1         = new Gtk.HBox();
     this.hbox1.Name    = "hbox1";
     this.hbox1.Spacing = 6;
     // Container child hbox1.Gtk.Box+BoxChild
     this.defaultCB               = new Gtk.CheckButton();
     this.defaultCB.CanFocus      = true;
     this.defaultCB.Name          = "defaultCB";
     this.defaultCB.Label         = Mono.Unix.Catalog.GetString("Set as _Default");
     this.defaultCB.DrawIndicator = true;
     this.defaultCB.UseUnderline  = true;
     this.hbox1.Add(this.defaultCB);
     Gtk.Box.BoxChild w5 = ((Gtk.Box.BoxChild)(this.hbox1[this.defaultCB]));
     w5.Position = 0;
     // Container child hbox1.Gtk.Box+BoxChild
     this.overwriteCB               = new Gtk.CheckButton();
     this.overwriteCB.CanFocus      = true;
     this.overwriteCB.Name          = "overwriteCB";
     this.overwriteCB.Label         = Mono.Unix.Catalog.GetString("O_verwrite");
     this.overwriteCB.DrawIndicator = true;
     this.overwriteCB.UseUnderline  = true;
     this.hbox1.Add(this.overwriteCB);
     Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(this.hbox1[this.overwriteCB]));
     w6.Position = 1;
     // Container child hbox1.Gtk.Box+BoxChild
     this.omitCB               = new Gtk.CheckButton();
     this.omitCB.CanFocus      = true;
     this.omitCB.Name          = "omitCB";
     this.omitCB.Label         = Mono.Unix.Catalog.GetString("O_mit History");
     this.omitCB.DrawIndicator = true;
     this.omitCB.UseUnderline  = true;
     this.hbox1.Add(this.omitCB);
     Gtk.Box.BoxChild w7 = ((Gtk.Box.BoxChild)(this.hbox1[this.omitCB]));
     w7.Position = 2;
     this.vbox2.Add(this.hbox1);
     Gtk.Box.BoxChild w8 = ((Gtk.Box.BoxChild)(this.vbox2[this.hbox1]));
     w8.Position = 2;
     w8.Expand   = false;
     w8.Fill     = false;
     w1.Add(this.vbox2);
     Gtk.Box.BoxChild w9 = ((Gtk.Box.BoxChild)(w1[this.vbox2]));
     w9.Position = 0;
     // Internal child MonoDevelop.VersionControl.Bazaar.Dialogs.BranchSelectionDialog.ActionArea
     Gtk.HButtonBox w10 = this.ActionArea;
     w10.Name        = "dialog1_ActionArea";
     w10.Spacing     = 6;
     w10.BorderWidth = ((uint)(5));
     w10.LayoutStyle = ((Gtk.ButtonBoxStyle)(4));
     // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
     this.buttonCancel              = new Gtk.Button();
     this.buttonCancel.CanDefault   = true;
     this.buttonCancel.CanFocus     = true;
     this.buttonCancel.Name         = "buttonCancel";
     this.buttonCancel.UseStock     = true;
     this.buttonCancel.UseUnderline = true;
     this.buttonCancel.Label        = "gtk-cancel";
     this.AddActionWidget(this.buttonCancel, -6);
     Gtk.ButtonBox.ButtonBoxChild w11 = ((Gtk.ButtonBox.ButtonBoxChild)(w10[this.buttonCancel]));
     w11.Expand = false;
     w11.Fill   = false;
     // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
     this.buttonOk              = new Gtk.Button();
     this.buttonOk.CanDefault   = true;
     this.buttonOk.CanFocus     = true;
     this.buttonOk.Name         = "buttonOk";
     this.buttonOk.UseStock     = true;
     this.buttonOk.UseUnderline = true;
     this.buttonOk.Label        = "gtk-ok";
     this.AddActionWidget(this.buttonOk, -5);
     Gtk.ButtonBox.ButtonBoxChild w12 = ((Gtk.ButtonBox.ButtonBoxChild)(w10[this.buttonOk]));
     w12.Position = 1;
     w12.Expand   = false;
     w12.Fill     = false;
     if ((this.Child != null))
     {
         this.Child.ShowAll();
     }
     this.DefaultWidth  = 400;
     this.DefaultHeight = 257;
     this.Show();
     this.omitCB.Toggled += new System.EventHandler(this.OnOmitCBToggled);
 }
 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget SimpleDownloader.MainWindow
     this.Name = "SimpleDownloader.MainWindow";
     this.Title = Mono.Unix.Catalog.GetString("Simple Downloader");
     this.WindowPosition = ((Gtk.WindowPosition)(4));
     // Container child SimpleDownloader.MainWindow.Gtk.Container+ContainerChild
     this.vbox4 = new Gtk.VBox();
     this.vbox4.Name = "vbox4";
     this.vbox4.Spacing = 6;
     // Container child vbox4.Gtk.Box+BoxChild
     this.table2 = new Gtk.Table(((uint)(2)), ((uint)(2)), false);
     this.table2.RowSpacing = ((uint)(6));
     this.table2.ColumnSpacing = ((uint)(6));
     // Container child table2.Gtk.Table+TableChild
     this.downloadPath = new Gtk.FileChooserButton(Mono.Unix.Catalog.GetString("Datei auswählen"), ((Gtk.FileChooserAction)(0)));
     this.downloadPath.Name = "downloadPath";
     this.table2.Add(this.downloadPath);
     Gtk.Table.TableChild w1 = ((Gtk.Table.TableChild)(this.table2[this.downloadPath]));
     w1.TopAttach = ((uint)(1));
     w1.BottomAttach = ((uint)(2));
     w1.LeftAttach = ((uint)(1));
     w1.RightAttach = ((uint)(2));
     w1.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table2.Gtk.Table+TableChild
     this.downloadUrl = new Gtk.Entry();
     this.downloadUrl.CanFocus = true;
     this.downloadUrl.Name = "downloadUrl";
     this.downloadUrl.IsEditable = true;
     this.downloadUrl.InvisibleChar = '●';
     this.table2.Add(this.downloadUrl);
     Gtk.Table.TableChild w2 = ((Gtk.Table.TableChild)(this.table2[this.downloadUrl]));
     w2.LeftAttach = ((uint)(1));
     w2.RightAttach = ((uint)(2));
     w2.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table2.Gtk.Table+TableChild
     this.label5 = new Gtk.Label();
     this.label5.Name = "label5";
     this.label5.LabelProp = Mono.Unix.Catalog.GetString("Download URL:");
     this.table2.Add(this.label5);
     Gtk.Table.TableChild w3 = ((Gtk.Table.TableChild)(this.table2[this.label5]));
     w3.XOptions = ((Gtk.AttachOptions)(4));
     w3.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table2.Gtk.Table+TableChild
     this.label6 = new Gtk.Label();
     this.label6.Name = "label6";
     this.label6.LabelProp = Mono.Unix.Catalog.GetString("Download Path:");
     this.table2.Add(this.label6);
     Gtk.Table.TableChild w4 = ((Gtk.Table.TableChild)(this.table2[this.label6]));
     w4.TopAttach = ((uint)(1));
     w4.BottomAttach = ((uint)(2));
     w4.XOptions = ((Gtk.AttachOptions)(4));
     w4.YOptions = ((Gtk.AttachOptions)(4));
     this.vbox4.Add(this.table2);
     Gtk.Box.BoxChild w5 = ((Gtk.Box.BoxChild)(this.vbox4[this.table2]));
     w5.Position = 0;
     w5.Expand = false;
     w5.Fill = false;
     // Container child vbox4.Gtk.Box+BoxChild
     this.hbox3 = new Gtk.HBox();
     this.hbox3.Name = "hbox3";
     this.hbox3.Spacing = 6;
     // Container child hbox3.Gtk.Box+BoxChild
     this.alignment1 = new Gtk.Alignment(0.5F, 0.5F, 1F, 1F);
     this.alignment1.Name = "alignment1";
     this.hbox3.Add(this.alignment1);
     Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(this.hbox3[this.alignment1]));
     w6.Position = 0;
     // Container child hbox3.Gtk.Box+BoxChild
     this.stopButton = new Gtk.Button();
     this.stopButton.CanFocus = true;
     this.stopButton.Name = "stopButton";
     this.stopButton.UseUnderline = true;
     this.stopButton.Label = Mono.Unix.Catalog.GetString("Stop");
     this.hbox3.Add(this.stopButton);
     Gtk.Box.BoxChild w7 = ((Gtk.Box.BoxChild)(this.hbox3[this.stopButton]));
     w7.Position = 1;
     w7.Expand = false;
     w7.Fill = false;
     // Container child hbox3.Gtk.Box+BoxChild
     this.downloadButton = new Gtk.Button();
     this.downloadButton.CanFocus = true;
     this.downloadButton.Name = "downloadButton";
     this.downloadButton.UseUnderline = true;
     // Container child downloadButton.Gtk.Container+ContainerChild
     Gtk.Alignment w8 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
     // Container child GtkAlignment.Gtk.Container+ContainerChild
     Gtk.HBox w9 = new Gtk.HBox();
     w9.Spacing = 2;
     // Container child GtkHBox.Gtk.Container+ContainerChild
     Gtk.Image w10 = new Gtk.Image();
     w10.Pixbuf = Stetic.IconLoader.LoadIcon(this, "down", Gtk.IconSize.Menu, 16);
     w9.Add(w10);
     // Container child GtkHBox.Gtk.Container+ContainerChild
     Gtk.Label w12 = new Gtk.Label();
     w12.LabelProp = Mono.Unix.Catalog.GetString("Download");
     w12.UseUnderline = true;
     w9.Add(w12);
     w8.Add(w9);
     this.downloadButton.Add(w8);
     this.hbox3.Add(this.downloadButton);
     Gtk.Box.BoxChild w16 = ((Gtk.Box.BoxChild)(this.hbox3[this.downloadButton]));
     w16.Position = 2;
     w16.Expand = false;
     w16.Fill = false;
     this.vbox4.Add(this.hbox3);
     Gtk.Box.BoxChild w17 = ((Gtk.Box.BoxChild)(this.vbox4[this.hbox3]));
     w17.Position = 1;
     w17.Expand = false;
     w17.Fill = false;
     // Container child vbox4.Gtk.Box+BoxChild
     this.downloadProgressBar = new Gtk.ProgressBar();
     this.downloadProgressBar.Name = "downloadProgressBar";
     this.vbox4.Add(this.downloadProgressBar);
     Gtk.Box.BoxChild w18 = ((Gtk.Box.BoxChild)(this.vbox4[this.downloadProgressBar]));
     w18.Position = 2;
     w18.Expand = false;
     w18.Fill = false;
     // Container child vbox4.Gtk.Box+BoxChild
     this.progressLabel = new Gtk.Label();
     this.progressLabel.Name = "progressLabel";
     this.progressLabel.LabelProp = Mono.Unix.Catalog.GetString("Waiting for download");
     this.vbox4.Add(this.progressLabel);
     Gtk.Box.BoxChild w19 = ((Gtk.Box.BoxChild)(this.vbox4[this.progressLabel]));
     w19.Position = 3;
     w19.Expand = false;
     w19.Fill = false;
     this.Add(this.vbox4);
     if ((this.Child != null)) {
         this.Child.ShowAll();
     }
     this.DefaultWidth = 458;
     this.DefaultHeight = 172;
     this.Show();
     this.DeleteEvent += new Gtk.DeleteEventHandler(this.OnDeleteEvent);
     this.stopButton.Clicked += new System.EventHandler(this.OnStopButtonClicked);
     this.downloadButton.Clicked += new System.EventHandler(this.OnDownloadButtonClicked);
 }
Пример #23
0
 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget Do.Plugins.Rss.Configuration
     Stetic.BinContainer.Attach(this);
     this.Name = "Do.Plugins.Rss.Configuration";
     // Container child Do.Plugins.Rss.Configuration.Gtk.Container+ContainerChild
     this.alignment1               = new Gtk.Alignment(0.5F, 0.5F, 1F, 1F);
     this.alignment1.Name          = "alignment1";
     this.alignment1.LeftPadding   = ((uint)(6));
     this.alignment1.TopPadding    = ((uint)(6));
     this.alignment1.RightPadding  = ((uint)(6));
     this.alignment1.BottomPadding = ((uint)(6));
     // Container child alignment1.Gtk.Container+ContainerChild
     this.table1               = new Gtk.Table(((uint)(3)), ((uint)(2)), false);
     this.table1.Name          = "table1";
     this.table1.RowSpacing    = ((uint)(6));
     this.table1.ColumnSpacing = ((uint)(6));
     // Container child table1.Gtk.Table+TableChild
     this.CacheDuration          = new Gtk.SpinButton(0, 100, 1);
     this.CacheDuration.CanFocus = true;
     this.CacheDuration.Name     = "CacheDuration";
     this.CacheDuration.Adjustment.PageIncrement = 10;
     this.CacheDuration.ClimbRate = 1;
     this.CacheDuration.Numeric   = true;
     this.table1.Add(this.CacheDuration);
     Gtk.Table.TableChild w1 = ((Gtk.Table.TableChild)(this.table1[this.CacheDuration]));
     w1.TopAttach    = ((uint)(2));
     w1.BottomAttach = ((uint)(3));
     w1.LeftAttach   = ((uint)(1));
     w1.RightAttach  = ((uint)(2));
     w1.XOptions     = ((Gtk.AttachOptions)(4));
     w1.YOptions     = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.label1           = new Gtk.Label();
     this.label1.Name      = "label1";
     this.label1.LabelProp = Mono.Addins.AddinManager.CurrentLocalizer.GetString("OPML feed file");
     this.table1.Add(this.label1);
     Gtk.Table.TableChild w2 = ((Gtk.Table.TableChild)(this.table1[this.label1]));
     w2.XOptions = ((Gtk.AttachOptions)(4));
     w2.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.label2           = new Gtk.Label();
     this.label2.Name      = "label2";
     this.label2.LabelProp = Mono.Addins.AddinManager.CurrentLocalizer.GetString("Timeout (in seconds)");
     this.table1.Add(this.label2);
     Gtk.Table.TableChild w3 = ((Gtk.Table.TableChild)(this.table1[this.label2]));
     w3.TopAttach    = ((uint)(1));
     w3.BottomAttach = ((uint)(2));
     w3.XOptions     = ((Gtk.AttachOptions)(4));
     w3.YOptions     = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.label3           = new Gtk.Label();
     this.label3.Name      = "label3";
     this.label3.LabelProp = Mono.Addins.AddinManager.CurrentLocalizer.GetString("Cache duration (in minutes)");
     this.table1.Add(this.label3);
     Gtk.Table.TableChild w4 = ((Gtk.Table.TableChild)(this.table1[this.label3]));
     w4.TopAttach    = ((uint)(2));
     w4.BottomAttach = ((uint)(3));
     w4.XOptions     = ((Gtk.AttachOptions)(4));
     w4.YOptions     = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.OpmlChooser      = new Gtk.FileChooserButton(Mono.Addins.AddinManager.CurrentLocalizer.GetString("Select A File"), ((Gtk.FileChooserAction)(0)));
     this.OpmlChooser.Name = "OpmlChooser";
     this.table1.Add(this.OpmlChooser);
     Gtk.Table.TableChild w5 = ((Gtk.Table.TableChild)(this.table1[this.OpmlChooser]));
     w5.LeftAttach  = ((uint)(1));
     w5.RightAttach = ((uint)(2));
     w5.YOptions    = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.Timeout          = new Gtk.SpinButton(0, 100, 1);
     this.Timeout.CanFocus = true;
     this.Timeout.Name     = "Timeout";
     this.Timeout.Adjustment.PageIncrement = 10;
     this.Timeout.ClimbRate = 1;
     this.Timeout.Numeric   = true;
     this.table1.Add(this.Timeout);
     Gtk.Table.TableChild w6 = ((Gtk.Table.TableChild)(this.table1[this.Timeout]));
     w6.TopAttach    = ((uint)(1));
     w6.BottomAttach = ((uint)(2));
     w6.LeftAttach   = ((uint)(1));
     w6.RightAttach  = ((uint)(2));
     w6.XOptions     = ((Gtk.AttachOptions)(4));
     w6.YOptions     = ((Gtk.AttachOptions)(4));
     this.alignment1.Add(this.table1);
     this.Add(this.alignment1);
     if ((this.Child != null))
     {
         this.Child.ShowAll();
     }
     this.Show();
     this.Timeout.ValueChanged       += new System.EventHandler(this.OnTimeoutValueChanged);
     this.OpmlChooser.FileActivated  += new System.EventHandler(this.OnOpmlChooserFileActivated);
     this.CacheDuration.ValueChanged += new System.EventHandler(this.OnCacheDurationValueChanged);
 }
Пример #24
0
 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget ocmgtk.ImportDirectoryDialog
     this.WidthRequest   = 500;
     this.Name           = "ocmgtk.ImportDirectoryDialog";
     this.Title          = Mono.Unix.Catalog.GetString("Import Directory");
     this.TypeHint       = ((Gdk.WindowTypeHint)(1));
     this.WindowPosition = ((Gtk.WindowPosition)(4));
     this.Modal          = true;
     this.BorderWidth    = ((uint)(6));
     this.Resizable      = false;
     this.AllowGrow      = false;
     // Internal child ocmgtk.ImportDirectoryDialog.VBox
     Gtk.VBox w1 = this.VBox;
     w1.Name        = "dialog1_VBox";
     w1.BorderWidth = ((uint)(2));
     // Container child dialog1_VBox.Gtk.Box+BoxChild
     this.table1               = new Gtk.Table(((uint)(1)), ((uint)(2)), false);
     this.table1.Name          = "table1";
     this.table1.RowSpacing    = ((uint)(6));
     this.table1.ColumnSpacing = ((uint)(6));
     // Container child table1.Gtk.Table+TableChild
     this.dirChooser            = new Gtk.FileChooserButton(Mono.Unix.Catalog.GetString("Select A Folder"), ((Gtk.FileChooserAction)(2)));
     this.dirChooser.Name       = "dirChooser";
     this.dirChooser.ShowHidden = true;
     this.table1.Add(this.dirChooser);
     Gtk.Table.TableChild w2 = ((Gtk.Table.TableChild)(this.table1[this.dirChooser]));
     w2.LeftAttach  = ((uint)(1));
     w2.RightAttach = ((uint)(2));
     w2.YOptions    = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.label1           = new Gtk.Label();
     this.label1.Name      = "label1";
     this.label1.LabelProp = Mono.Unix.Catalog.GetString("Directory:");
     this.table1.Add(this.label1);
     Gtk.Table.TableChild w3 = ((Gtk.Table.TableChild)(this.table1[this.label1]));
     w3.XOptions = ((Gtk.AttachOptions)(4));
     w3.YOptions = ((Gtk.AttachOptions)(4));
     w1.Add(this.table1);
     Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(w1[this.table1]));
     w4.Position = 0;
     w4.Expand   = false;
     w4.Fill     = false;
     // Container child dialog1_VBox.Gtk.Box+BoxChild
     this.frame1            = new Gtk.Frame();
     this.frame1.Name       = "frame1";
     this.frame1.ShadowType = ((Gtk.ShadowType)(0));
     // Container child frame1.Gtk.Container+ContainerChild
     this.GtkAlignment2             = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment2.Name        = "GtkAlignment2";
     this.GtkAlignment2.LeftPadding = ((uint)(12));
     // Container child GtkAlignment2.Gtk.Container+ContainerChild
     this.vbox2         = new Gtk.VBox();
     this.vbox2.Name    = "vbox2";
     this.vbox2.Spacing = 6;
     // Container child vbox2.Gtk.Box+BoxChild
     this.deleteCheck               = new Gtk.CheckButton();
     this.deleteCheck.CanFocus      = true;
     this.deleteCheck.Name          = "deleteCheck";
     this.deleteCheck.Label         = Mono.Unix.Catalog.GetString("Delete files on completion");
     this.deleteCheck.DrawIndicator = true;
     this.deleteCheck.UseUnderline  = true;
     this.vbox2.Add(this.deleteCheck);
     Gtk.Box.BoxChild w5 = ((Gtk.Box.BoxChild)(this.vbox2[this.deleteCheck]));
     w5.Position = 0;
     w5.Expand   = false;
     w5.Fill     = false;
     // Container child vbox2.Gtk.Box+BoxChild
     this.statusCheck               = new Gtk.CheckButton();
     this.statusCheck.CanFocus      = true;
     this.statusCheck.Name          = "statusCheck";
     this.statusCheck.Label         = Mono.Unix.Catalog.GetString("Do not overwrite existing found status in database");
     this.statusCheck.DrawIndicator = true;
     this.statusCheck.UseUnderline  = true;
     this.vbox2.Add(this.statusCheck);
     Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(this.vbox2[this.statusCheck]));
     w6.Position = 1;
     w6.Expand   = false;
     w6.Fill     = false;
     // Container child vbox2.Gtk.Box+BoxChild
     this.oldLogsCheck               = new Gtk.CheckButton();
     this.oldLogsCheck.CanFocus      = true;
     this.oldLogsCheck.Name          = "oldLogsCheck";
     this.oldLogsCheck.Label         = Mono.Unix.Catalog.GetString("Purge old cache logs");
     this.oldLogsCheck.DrawIndicator = true;
     this.oldLogsCheck.UseUnderline  = true;
     this.vbox2.Add(this.oldLogsCheck);
     Gtk.Box.BoxChild w7 = ((Gtk.Box.BoxChild)(this.vbox2[this.oldLogsCheck]));
     w7.Position = 2;
     w7.Expand   = false;
     w7.Fill     = false;
     // Container child vbox2.Gtk.Box+BoxChild
     this.gsakFieldsCheck               = new Gtk.CheckButton();
     this.gsakFieldsCheck.CanFocus      = true;
     this.gsakFieldsCheck.Name          = "gsakFieldsCheck";
     this.gsakFieldsCheck.Label         = Mono.Unix.Catalog.GetString("Ignore GSAK/OCM extra fields in GPX file");
     this.gsakFieldsCheck.DrawIndicator = true;
     this.gsakFieldsCheck.UseUnderline  = true;
     this.vbox2.Add(this.gsakFieldsCheck);
     Gtk.Box.BoxChild w8 = ((Gtk.Box.BoxChild)(this.vbox2[this.gsakFieldsCheck]));
     w8.Position = 3;
     w8.Expand   = false;
     w8.Fill     = false;
     // Container child vbox2.Gtk.Box+BoxChild
     this.hbox1         = new Gtk.HBox();
     this.hbox1.Name    = "hbox1";
     this.hbox1.Spacing = 6;
     // Container child hbox1.Gtk.Box+BoxChild
     this.addToListCheck               = new Gtk.CheckButton();
     this.addToListCheck.CanFocus      = true;
     this.addToListCheck.Name          = "addToListCheck";
     this.addToListCheck.Label         = Mono.Unix.Catalog.GetString("Add to bookmark list:");
     this.addToListCheck.DrawIndicator = true;
     this.addToListCheck.UseUnderline  = true;
     this.hbox1.Add(this.addToListCheck);
     Gtk.Box.BoxChild w9 = ((Gtk.Box.BoxChild)(this.hbox1[this.addToListCheck]));
     w9.Position = 0;
     w9.Expand   = false;
     // Container child hbox1.Gtk.Box+BoxChild
     this.bmCombo           = Gtk.ComboBox.NewText();
     this.bmCombo.Sensitive = false;
     this.bmCombo.Name      = "bmCombo";
     this.hbox1.Add(this.bmCombo);
     Gtk.Box.BoxChild w10 = ((Gtk.Box.BoxChild)(this.hbox1[this.bmCombo]));
     w10.Position = 1;
     w10.Expand   = false;
     w10.Fill     = false;
     // Container child hbox1.Gtk.Box+BoxChild
     this.addBmrkButton           = new Gtk.Button();
     this.addBmrkButton.Sensitive = false;
     this.addBmrkButton.CanFocus  = true;
     this.addBmrkButton.Name      = "addBmrkButton";
     // Container child addBmrkButton.Gtk.Container+ContainerChild
     this.image20           = new Gtk.Image();
     this.image20.Sensitive = false;
     this.image20.Name      = "image20";
     this.image20.Pixbuf    = Stetic.IconLoader.LoadIcon(this, "gtk-add", Gtk.IconSize.Menu, 16);
     this.addBmrkButton.Add(this.image20);
     this.addBmrkButton.Label = null;
     this.hbox1.Add(this.addBmrkButton);
     Gtk.Box.BoxChild w12 = ((Gtk.Box.BoxChild)(this.hbox1[this.addBmrkButton]));
     w12.Position = 2;
     w12.Expand   = false;
     w12.Fill     = false;
     this.vbox2.Add(this.hbox1);
     Gtk.Box.BoxChild w13 = ((Gtk.Box.BoxChild)(this.vbox2[this.hbox1]));
     w13.Position = 4;
     w13.Expand   = false;
     w13.Fill     = false;
     this.GtkAlignment2.Add(this.vbox2);
     this.frame1.Add(this.GtkAlignment2);
     this.GtkLabel7           = new Gtk.Label();
     this.GtkLabel7.Name      = "GtkLabel7";
     this.GtkLabel7.LabelProp = Mono.Unix.Catalog.GetString("<b>Options</b>");
     this.GtkLabel7.UseMarkup = true;
     this.frame1.LabelWidget  = this.GtkLabel7;
     w1.Add(this.frame1);
     Gtk.Box.BoxChild w16 = ((Gtk.Box.BoxChild)(w1[this.frame1]));
     w16.Position = 1;
     w16.Expand   = false;
     w16.Fill     = false;
     // Internal child ocmgtk.ImportDirectoryDialog.ActionArea
     Gtk.HButtonBox w17 = this.ActionArea;
     w17.Name        = "dialog1_ActionArea";
     w17.Spacing     = 10;
     w17.BorderWidth = ((uint)(5));
     w17.LayoutStyle = ((Gtk.ButtonBoxStyle)(4));
     // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
     this.buttonCancel              = new Gtk.Button();
     this.buttonCancel.CanDefault   = true;
     this.buttonCancel.CanFocus     = true;
     this.buttonCancel.Name         = "buttonCancel";
     this.buttonCancel.UseStock     = true;
     this.buttonCancel.UseUnderline = true;
     this.buttonCancel.Label        = "gtk-cancel";
     this.AddActionWidget(this.buttonCancel, -6);
     Gtk.ButtonBox.ButtonBoxChild w18 = ((Gtk.ButtonBox.ButtonBoxChild)(w17[this.buttonCancel]));
     w18.Expand = false;
     w18.Fill   = false;
     // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
     this.buttonOk              = new Gtk.Button();
     this.buttonOk.CanDefault   = true;
     this.buttonOk.CanFocus     = true;
     this.buttonOk.Name         = "buttonOk";
     this.buttonOk.UseStock     = true;
     this.buttonOk.UseUnderline = true;
     this.buttonOk.Label        = "gtk-ok";
     this.AddActionWidget(this.buttonOk, -5);
     Gtk.ButtonBox.ButtonBoxChild w19 = ((Gtk.ButtonBox.ButtonBoxChild)(w17[this.buttonOk]));
     w19.Position = 1;
     w19.Expand   = false;
     w19.Fill     = false;
     if ((this.Child != null))
     {
         this.Child.ShowAll();
     }
     this.DefaultWidth  = 512;
     this.DefaultHeight = 281;
     this.Show();
     this.addToListCheck.Toggled += new System.EventHandler(this.OnBmrkToggle);
     this.addBmrkButton.Clicked  += new System.EventHandler(this.OnAddClicked);
 }
Пример #25
0
 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget UI
     Name           = "UI";
     Title          = Mono.Unix.Catalog.GetString("vCardLib UI 1.4");
     Icon           = new Gdk.Pixbuf(System.IO.Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "./vcard.jpg"));
     WindowPosition = ((Gtk.WindowPosition)(4));
     Gravity        = ((Gdk.Gravity)(5));
     // Container child UI.Gtk.Container+ContainerChild
     vbox1         = new Gtk.VBox();
     vbox1.Name    = "vbox1";
     vbox1.Spacing = 6;
     // Container child vbox1.Gtk.Box+BoxChild
     hbox1         = new Gtk.HBox();
     hbox1.Name    = "hbox1";
     hbox1.Spacing = 6;
     // Container child hbox1.Gtk.Box+BoxChild
     label2           = new Gtk.Label();
     label2.Name      = "label2";
     label2.LabelProp = Mono.Unix.Catalog.GetString("File Path:");
     hbox1.Add(label2);
     Gtk.Box.BoxChild w1 = ((Gtk.Box.BoxChild)(hbox1[label2]));
     w1.Position = 0;
     w1.Expand   = false;
     w1.Fill     = false;
     // Container child hbox1.Gtk.Box+BoxChild
     ofd_select_vcard      = new Gtk.FileChooserButton(Mono.Unix.Catalog.GetString("Select a File"), ((Gtk.FileChooserAction)(0)));
     ofd_select_vcard.Name = "ofd_select_vcard";
     hbox1.Add(ofd_select_vcard);
     Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(hbox1[ofd_select_vcard]));
     w2.PackType = ((Gtk.PackType)(1));
     w2.Position = 1;
     vbox1.Add(hbox1);
     Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(vbox1[hbox1]));
     w3.Position = 0;
     w3.Expand   = false;
     w3.Fill     = false;
     // Container child vbox1.Gtk.Box+BoxChild
     hbox2         = new Gtk.HBox();
     hbox2.Name    = "hbox2";
     hbox2.Spacing = 6;
     // Container child hbox2.Gtk.Box+BoxChild
     label4           = new Gtk.Label();
     label4.Name      = "label4";
     label4.LabelProp = Mono.Unix.Catalog.GetString("Search:");
     hbox2.Add(label4);
     Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(hbox2[label4]));
     w4.Position = 0;
     w4.Expand   = false;
     w4.Fill     = false;
     // Container child hbox2.Gtk.Box+BoxChild
     txt_search            = new Gtk.TextView();
     txt_search.CanFocus   = true;
     txt_search.Name       = "txt_search";
     txt_search.AcceptsTab = false;
     hbox2.Add(txt_search);
     Gtk.Box.BoxChild w5 = ((Gtk.Box.BoxChild)(hbox2[txt_search]));
     w5.Position = 1;
     vbox1.Add(hbox2);
     Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(vbox1[hbox2]));
     w6.Position = 1;
     w6.Expand   = false;
     w6.Fill     = false;
     // Container child vbox1.Gtk.Box+BoxChild
     GtkScrolledWindow            = new Gtk.ScrolledWindow();
     GtkScrolledWindow.Name       = "GtkScrolledWindow";
     GtkScrolledWindow.ShadowType = ((Gtk.ShadowType)(1));
     // Container child GtkScrolledWindow.Gtk.Container+ContainerChild
     dgv_contacts          = new Gtk.NodeView();
     dgv_contacts.CanFocus = true;
     dgv_contacts.Name     = "dgv_contacts";
     GtkScrolledWindow.Add(dgv_contacts);
     vbox1.Add(GtkScrolledWindow);
     Gtk.Box.BoxChild w8 = ((Gtk.Box.BoxChild)(vbox1[GtkScrolledWindow]));
     w8.Position = 2;
     Add(vbox1);
     if ((Child != null))
     {
         Child.ShowAll();
     }
     DefaultWidth  = 666;
     DefaultHeight = 432;
     Show();
     DeleteEvent += OnDeleteEvent;
     ofd_select_vcard.SelectionChanged += OnOfdSelectVcardSelectionChanged;
 }
        private void CreateGui()
        {
            Gtk.FileChooserButton fc=new Gtk.FileChooserButton("Choose directory to put your splitted files",Gtk.FileChooserAction.SelectFolder);
            string fn=Banshee.Configuration.ConfigurationClient.Get<string>("cuesheets_todevice","");
            if (fn!="") { fc.SelectFilename(fn); }
            fc.FileSet+=new EventHandler(delegate(Object sender,EventArgs args) {
                fn=fc.Filename;
                Banshee.Configuration.ConfigurationClient.Set<string>("cuesheets_todevice",fn);
            });
            Gtk.Button btn=new Gtk.Button("Split CueSheet Audio File");
            Gtk.Button csplit=new Gtk.Button("Cancel");
            csplit.Clicked+=delegate(object sender,EventArgs args) {
                _splt.CancelSplit();
            };
            Gtk.ProgressBar bar=new Gtk.ProgressBar();
            Gtk.ProgressBar nr=new Gtk.ProgressBar();
            Gtk.Button ok=(Gtk.Button) base.AddButton ("OK",1);
            Gtk.Label result=new Gtk.Label("-");

            btn.Clicked+=delegate(object sender,EventArgs args) {
                btn.Hide ();
                csplit.Show ();
                result.Markup="";

                ok.Sensitive=false;
                fc.Sensitive=false;
                btn.Sensitive=false;

                _splt.SplitWithPaths ();

                bool convert_to_latin1=true;
                _splt.SplitToDir (fn,convert_to_latin1);

                GLib.Timeout.Add(50,delegate () {
                    bar.Fraction=_splt.ProgressOfCurrentTrack;
                    int n=_splt.ProgressNTracks;
                    int i=_splt.ProgressCurrentTrack;
                    double d=((double) i)/((double) n);
                    nr.Fraction=d;
                    if (_splt.SplitFinished) {
                        ok.Sensitive=true;
                        btn.Sensitive=true;
                        fc.Sensitive=true;
                        csplit.Hide ();
                        btn.Show ();
                        if (_splt.Cancelled) {
                            result.Markup="<b>Split Cancelled</b>";
                        } else {
                            result.Markup="<b>Finished</b>";
                        }
                    }
                    return !_splt.SplitFinished;
                });

            };
            fc.Show ();
            nr.Show ();
            bar.Show ();
            btn.Show ();
            result.Show ();
            base.VBox.Add (fc);
            base.VBox.Add (hsep());
            base.VBox.Add (nr);
            base.VBox.Add (bar);
            base.VBox.Add (hsep ());
            base.VBox.Add (result);
            base.VBox.Add (hsep ());
            base.VBox.Add (btn);
            base.VBox.Add (csplit);

            base.VBox.Show();
        }
 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget MainWindow
     this.Name           = "MainWindow";
     this.Title          = Mono.Unix.Catalog.GetString("(ymt5gui) mt5 to objf");
     this.WindowPosition = ((Gtk.WindowPosition)(4));
     this.BorderWidth    = ((uint)(3));
     // Container child MainWindow.Gtk.Container+ContainerChild
     this.vbox2         = new Gtk.VBox();
     this.vbox2.Name    = "vbox2";
     this.vbox2.Spacing = 6;
     // Container child vbox2.Gtk.Box+BoxChild
     this.frame1      = new Gtk.Frame();
     this.frame1.Name = "frame1";
     // Container child frame1.Gtk.Container+ContainerChild
     this.GtkAlignment             = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment.Name        = "GtkAlignment";
     this.GtkAlignment.LeftPadding = ((uint)(12));
     // Container child GtkAlignment.Gtk.Container+ContainerChild
     this.vbox4         = new Gtk.VBox();
     this.vbox4.Name    = "vbox4";
     this.vbox4.Spacing = 6;
     // Container child vbox4.Gtk.Box+BoxChild
     this.checkbutton2               = new Gtk.CheckButton();
     this.checkbutton2.CanFocus      = true;
     this.checkbutton2.Name          = "checkbutton2";
     this.checkbutton2.Label         = Mono.Unix.Catalog.GetString("extract all mt5 from directory");
     this.checkbutton2.DrawIndicator = true;
     this.checkbutton2.UseUnderline  = true;
     this.vbox4.Add(this.checkbutton2);
     Gtk.Box.BoxChild w1 = ((Gtk.Box.BoxChild)(this.vbox4[this.checkbutton2]));
     w1.Position = 0;
     w1.Expand   = false;
     w1.Fill     = false;
     // Container child vbox4.Gtk.Box+BoxChild
     this.filechooserbutton1      = new Gtk.FileChooserButton(Mono.Unix.Catalog.GetString("Sélectionner un fichier"), ((Gtk.FileChooserAction)(0)));
     this.filechooserbutton1.Name = "filechooserbutton1";
     this.vbox4.Add(this.filechooserbutton1);
     Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.vbox4[this.filechooserbutton1]));
     w2.Position = 1;
     w2.Expand   = false;
     w2.Fill     = false;
     this.GtkAlignment.Add(this.vbox4);
     this.frame1.Add(this.GtkAlignment);
     this.GtkLabel2           = new Gtk.Label();
     this.GtkLabel2.Name      = "GtkLabel2";
     this.GtkLabel2.LabelProp = Mono.Unix.Catalog.GetString("<b>M</b>T5 path");
     this.GtkLabel2.UseMarkup = true;
     this.frame1.LabelWidget  = this.GtkLabel2;
     this.vbox2.Add(this.frame1);
     Gtk.Box.BoxChild w5 = ((Gtk.Box.BoxChild)(this.vbox2[this.frame1]));
     w5.Position = 0;
     w5.Expand   = false;
     w5.Fill     = false;
     // Container child vbox2.Gtk.Box+BoxChild
     this.frame2      = new Gtk.Frame();
     this.frame2.Name = "frame2";
     // Container child frame2.Gtk.Container+ContainerChild
     this.GtkAlignment1             = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment1.Name        = "GtkAlignment1";
     this.GtkAlignment1.LeftPadding = ((uint)(12));
     // Container child GtkAlignment1.Gtk.Container+ContainerChild
     this.vbox3         = new Gtk.VBox();
     this.vbox3.Name    = "vbox3";
     this.vbox3.Spacing = 6;
     // Container child vbox3.Gtk.Box+BoxChild
     this.frame4            = new Gtk.Frame();
     this.frame4.Name       = "frame4";
     this.frame4.ShadowType = ((Gtk.ShadowType)(0));
     // Container child frame4.Gtk.Container+ContainerChild
     this.GtkAlignment3             = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment3.Name        = "GtkAlignment3";
     this.GtkAlignment3.LeftPadding = ((uint)(12));
     // Container child GtkAlignment3.Gtk.Container+ContainerChild
     this.filechooserbutton2      = new Gtk.FileChooserButton(Mono.Unix.Catalog.GetString("Sélectionner un fichier"), ((Gtk.FileChooserAction)(2)));
     this.filechooserbutton2.Name = "filechooserbutton2";
     this.GtkAlignment3.Add(this.filechooserbutton2);
     this.frame4.Add(this.GtkAlignment3);
     this.GtkLabel6           = new Gtk.Label();
     this.GtkLabel6.Name      = "GtkLabel6";
     this.GtkLabel6.LabelProp = Mono.Unix.Catalog.GetString("Output path to objf");
     this.GtkLabel6.UseMarkup = true;
     this.frame4.LabelWidget  = this.GtkLabel6;
     this.vbox3.Add(this.frame4);
     Gtk.Box.BoxChild w8 = ((Gtk.Box.BoxChild)(this.vbox3[this.frame4]));
     w8.Position = 0;
     w8.Expand   = false;
     w8.Fill     = false;
     // Container child vbox3.Gtk.Box+BoxChild
     this.checkbutton1               = new Gtk.CheckButton();
     this.checkbutton1.CanFocus      = true;
     this.checkbutton1.Name          = "checkbutton1";
     this.checkbutton1.Label         = Mono.Unix.Catalog.GetString("do not use triangle strip (obj compatible)");
     this.checkbutton1.Active        = true;
     this.checkbutton1.DrawIndicator = true;
     this.checkbutton1.UseUnderline  = true;
     this.vbox3.Add(this.checkbutton1);
     Gtk.Box.BoxChild w9 = ((Gtk.Box.BoxChild)(this.vbox3[this.checkbutton1]));
     w9.Position = 1;
     w9.Expand   = false;
     w9.Fill     = false;
     this.GtkAlignment1.Add(this.vbox3);
     this.frame2.Add(this.GtkAlignment1);
     this.GtkLabel5           = new Gtk.Label();
     this.GtkLabel5.Name      = "GtkLabel5";
     this.GtkLabel5.LabelProp = Mono.Unix.Catalog.GetString("<b>O</b>bjf pathes");
     this.GtkLabel5.UseMarkup = true;
     this.frame2.LabelWidget  = this.GtkLabel5;
     this.vbox2.Add(this.frame2);
     Gtk.Box.BoxChild w12 = ((Gtk.Box.BoxChild)(this.vbox2[this.frame2]));
     w12.Position = 1;
     w12.Expand   = false;
     w12.Fill     = false;
     // Container child vbox2.Gtk.Box+BoxChild
     this.frame3      = new Gtk.Frame();
     this.frame3.Name = "frame3";
     // Container child frame3.Gtk.Container+ContainerChild
     this.GtkAlignment2             = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment2.Name        = "GtkAlignment2";
     this.GtkAlignment2.LeftPadding = ((uint)(12));
     // Container child GtkAlignment2.Gtk.Container+ContainerChild
     this.hbox1         = new Gtk.HBox();
     this.hbox1.Name    = "hbox1";
     this.hbox1.Spacing = 6;
     // Container child hbox1.Gtk.Box+BoxChild
     this.button2              = new Gtk.Button();
     this.button2.CanFocus     = true;
     this.button2.Name         = "button2";
     this.button2.UseUnderline = true;
     this.button2.Label        = Mono.Unix.Catalog.GetString("Generate");
     this.hbox1.Add(this.button2);
     Gtk.Box.BoxChild w13 = ((Gtk.Box.BoxChild)(this.hbox1[this.button2]));
     w13.Position = 0;
     w13.Expand   = false;
     w13.Fill     = false;
     // Container child hbox1.Gtk.Box+BoxChild
     this.vbox1         = new Gtk.VBox();
     this.vbox1.Name    = "vbox1";
     this.vbox1.Spacing = 6;
     // Container child vbox1.Gtk.Box+BoxChild
     this.progressbar1      = new Gtk.ProgressBar();
     this.progressbar1.Name = "progressbar1";
     this.vbox1.Add(this.progressbar1);
     Gtk.Box.BoxChild w14 = ((Gtk.Box.BoxChild)(this.vbox1[this.progressbar1]));
     w14.Position = 0;
     w14.Expand   = false;
     w14.Fill     = false;
     this.hbox1.Add(this.vbox1);
     Gtk.Box.BoxChild w15 = ((Gtk.Box.BoxChild)(this.hbox1[this.vbox1]));
     w15.Position = 1;
     this.GtkAlignment2.Add(this.hbox1);
     this.frame3.Add(this.GtkAlignment2);
     this.GtkLabel10           = new Gtk.Label();
     this.GtkLabel10.Name      = "GtkLabel10";
     this.GtkLabel10.LabelProp = Mono.Unix.Catalog.GetString("<b>M</b>t52objf");
     this.GtkLabel10.UseMarkup = true;
     this.frame3.LabelWidget   = this.GtkLabel10;
     this.vbox2.Add(this.frame3);
     Gtk.Box.BoxChild w18 = ((Gtk.Box.BoxChild)(this.vbox2[this.frame3]));
     w18.Position = 2;
     w18.Expand   = false;
     w18.Fill     = false;
     this.Add(this.vbox2);
     if ((this.Child != null))
     {
         this.Child.ShowAll();
     }
     this.DefaultWidth  = 764;
     this.DefaultHeight = 218;
     this.Show();
     this.DeleteEvent          += new Gtk.DeleteEventHandler(this.OnDeleteEvent);
     this.checkbutton2.Toggled += new System.EventHandler(this.onMt5DirectoryToggle);
     this.button2.Clicked      += new System.EventHandler(this.OnButton2Clicked);
 }
        public void CreateGui()
        {
            Gtk.Image icn_reload = new Gtk.Image(Gtk.Stock.Refresh, Gtk.IconSize.Button);
            _reload          = new Gtk.Button(icn_reload);
            _reload.Clicked += OnReload;

            _performer            = new Gtk.Entry(200);
            _title                = new Gtk.Entry(200);
            _title.WidthChars     = 60;
            _performer.WidthChars = 60;
            _subtitle             = new Gtk.Entry(300);
            _subtitle.WidthChars  = 60;
            _composer             = new Gtk.Entry(200);
            _composer.WidthChars  = 60;
            _year            = new Gtk.Entry(20);
            _year.WidthChars = 20;

            _image = new Gtk.Image();
            _image.SetSizeRequest(100, 100);
            _imagefile          = new Gtk.FileChooserButton("Choose image file", Gtk.FileChooserAction.Open);
            _imagefile.FileSet += new EventHandler(EvtImageSet);

            Gtk.Image icn_add_track = new Gtk.Image(Gtk.Stock.Add, Gtk.IconSize.Button);
            _add_track          = new Gtk.Button(icn_add_track);
            _add_track.Clicked += OnAddTrack;

            Gtk.Image icn_del_track = new Gtk.Image(Gtk.Stock.Delete, Gtk.IconSize.Button);
            _del_track          = new Gtk.Button(icn_del_track);
            _del_track.Clicked += OnDelTrack;

            Gtk.Image icn_save = new Gtk.Image(Gtk.Stock.Save, Gtk.IconSize.Button);
            _save          = new Gtk.Button(icn_save);
            _save.Clicked += OnSave;

            _store  = new Gtk.ListStore(typeof(int), typeof(string), typeof(string), typeof(string), typeof(string), typeof(string));
            _tracks = new Gtk.TreeView();
            {
                Gtk.CellRendererText cr0 = new Gtk.CellRendererText();
                cr0.Scale = 0.8;
                _tracks.AppendColumn("Nr.", cr0, "text", 0);

                Gtk.CellRendererText cr_title = new Gtk.CellRendererText();
                cr_title.Scale    = 0.8;
                cr_title.Editable = true;
                cr_title.Edited  += new Gtk.EditedHandler(delegate(object sender, Gtk.EditedArgs args) {
                    setCell(1, args.NewText, new Gtk.TreePath(args.Path));
                });
                _tracks.AppendColumn("Title", cr_title, "text", 1);

                Gtk.CellRendererText cr_artist = new Gtk.CellRendererText();
                cr_artist.Editable = true;
                cr_artist.Scale    = 0.8;
                cr_artist.Edited  += new Gtk.EditedHandler(delegate(object sender, Gtk.EditedArgs args) {
                    setCell(2, args.NewText, new Gtk.TreePath(args.Path));
                });
                _tracks.AppendColumn("Artist", cr_artist, "text", 2);

                Gtk.CellRendererText cr_composer = new Gtk.CellRendererText();
                cr_composer.Editable = true;
                cr_composer.Scale    = 0.8;
                cr_composer.Edited  += new Gtk.EditedHandler(delegate(object sender, Gtk.EditedArgs args) {
                    setCell(3, args.NewText, new Gtk.TreePath(args.Path));
                });
                _tracks.AppendColumn("Composer", cr_composer, "text", 3);

                Gtk.CellRendererText cr_piece = new Gtk.CellRendererText();
                cr_piece.Editable = true;
                cr_piece.Scale    = 0.8;
                cr_piece.Edited  += new Gtk.EditedHandler(delegate(object sender, Gtk.EditedArgs args) {
                    setCell(4, args.NewText, new Gtk.TreePath(args.Path));
                });
                _tracks.AppendColumn("Piece", cr_piece, "text", 4);

                Gtk.CellRendererText cr_time = new Gtk.CellRendererText();
                cr_time.Editable = true;
                cr_time.Scale    = 0.8;
                cr_time.Edited  += new Gtk.EditedHandler(delegate(object sender, Gtk.EditedArgs args) {
                    setCell(5, args.NewText, new Gtk.TreePath(args.Path));
                });
                _tracks.AppendColumn("Offset", cr_time, "text", 5);
            }

            _tracks.Model = _store;

            Gtk.Table tbl = new Gtk.Table(2, 5, false);
            tbl.Attach(new Gtk.Label("Album:"), 0, 1, 0, 1);
            tbl.Attach(_title, 1, 2, 0, 1);
            tbl.Attach(new Gtk.Label("Artist:"), 0, 1, 1, 2);
            tbl.Attach(_performer, 1, 2, 1, 2);
            tbl.Attach(new Gtk.Label("Composer:"), 0, 1, 2, 3);
            tbl.Attach(_composer, 1, 2, 2, 3);
            tbl.Attach(new Gtk.Label("Subtitle:"), 0, 1, 3, 4);
            tbl.Attach(_subtitle, 1, 2, 3, 4);
            tbl.Attach(new Gtk.Label("year:"), 0, 1, 4, 5);
            tbl.Attach(_year, 1, 2, 4, 5);

            Gtk.Frame frm = new Gtk.Frame();
            frm.Add(tbl);

            Gtk.HBox hb2 = new Gtk.HBox();
            hb2.PackEnd(_reload, false, false, 1);
            hb2.PackEnd(_del_track, false, false, 1);
            hb2.PackEnd(_add_track, false, false, 1);
            hb2.PackEnd(_save, false, false, 1);

            Gtk.HBox hb  = new Gtk.HBox();
            Gtk.VBox vb1 = new Gtk.VBox();
            vb1.PackStart(frm, false, false, 0);
            vb1.PackStart(hb2, true, true, 0);
            hb.PackStart(vb1, false, false, 0);

            Gtk.Frame frm2 = new Gtk.Frame();
            frm2.Add(_image);
            Gtk.VBox vbi = new Gtk.VBox();
            Gtk.HBox bb  = new Gtk.HBox();
            bb.PackStart(new Gtk.VBox(), true, true, 0);
            bb.PackStart(frm2, false, false, 0);
            bb.PackEnd(new Gtk.VBox(), true, true, 0);

            vbi.PackStart(bb, true, true, 2);
            vbi.PackEnd(_imagefile, false, false, 2);
            hb.PackEnd(vbi, true, true, 2);

            Gtk.ScrolledWindow scroll = new Gtk.ScrolledWindow();
            scroll.Add(_tracks);
            scroll.SetSizeRequest(800, 300);

            base.VBox.PackStart(hb, false, false, 4);
            base.VBox.PackStart(scroll, true, true, 0);
            base.VBox.ShowAll();

            base.AddButton("Close", 0);
        }
		public void Run (IBrowsableCollection selection)
		{
			/*
			Gnome.Vfs.ModuleCallbackFullAuthentication auth = new Gnome.Vfs.ModuleCallbackFullAuthentication ();
			auth.Callback += new Gnome.Vfs.ModuleCallbackHandler (HandleAuth);
			auth.SetDefault ();
			auth.Push ();
			
			Gnome.Vfs.ModuleCallbackAuthentication mauth = new Gnome.Vfs.ModuleCallbackAuthentication ();
			mauth.Callback += new Gnome.Vfs.ModuleCallbackHandler (HandleAuth);
			mauth.SetDefault ();
			mauth.Push ();
			
			Gnome.Vfs.ModuleCallbackSaveAuthentication sauth = new Gnome.Vfs.ModuleCallbackSaveAuthentication ();
			sauth.Callback += new Gnome.Vfs.ModuleCallbackHandler (HandleAuth);
			sauth.SetDefault ();
			sauth.Push ();
			
			Gnome.Vfs.ModuleCallbackStatusMessage msg = new Gnome.Vfs.ModuleCallbackStatusMessage ();
			msg.Callback += new Gnome.Vfs.ModuleCallbackHandler (HandleMsg);
			msg.SetDefault ();
			msg.Push ();
			*/
			this.selection = selection;
			
			IconView view = (IconView) new IconView (selection);
			view.DisplayDates = false;
			view.DisplayTags = false;

			Dialog.Modal = false;
			Dialog.TransientFor = null;

			thumb_scrolledwindow.Add (view);
			HandleSizeActive (null, null);
			name_entry.Text = gallery_name;

			string uri_path = System.IO.Path.Combine (FSpot.Global.HomeDirectory, "Desktop");
			if (!System.IO.Directory.Exists (uri_path))
			        uri_path = FSpot.Global.HomeDirectory;

			uri_chooser = new Gtk.FileChooserButton (Catalog.GetString ("Select Export Folder"),
								 Gtk.FileChooserAction.SelectFolder);
			
			uri_chooser.LocalOnly = false;

			if (Preferences.Get (Preferences.EXPORT_FOLDER_URI) != null && Preferences.Get (Preferences.EXPORT_FOLDER_URI) as string != String.Empty)
				uri_chooser.SetUri (Preferences.Get (Preferences.EXPORT_FOLDER_URI) as string);
			else
				uri_chooser.SetFilename (uri_path);

			chooser_hbox.PackStart (uri_chooser);

			Dialog.ShowAll ();

			//LoadHistory ();
			Dialog.Response += HandleResponse;

			LoadPreference (Preferences.EXPORT_FOLDER_SCALE);
			LoadPreference (Preferences.EXPORT_FOLDER_SIZE);
			LoadPreference (Preferences.EXPORT_FOLDER_OPEN);
			LoadPreference (Preferences.EXPORT_FOLDER_ROTATE);
			LoadPreference (Preferences.EXPORT_FOLDER_METHOD);
		}
 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget ocmgtk.CopyMoveDialog
     this.WidthRequest = 350;
     this.Name = "ocmgtk.CopyMoveDialog";
     this.Title = Mono.Unix.Catalog.GetString("Copy/Move");
     this.TypeHint = ((Gdk.WindowTypeHint)(1));
     this.WindowPosition = ((Gtk.WindowPosition)(4));
     this.Modal = true;
     this.BorderWidth = ((uint)(6));
     this.Resizable = false;
     this.AllowGrow = false;
     this.SkipPagerHint = true;
     this.SkipTaskbarHint = true;
     // Internal child ocmgtk.CopyMoveDialog.VBox
     Gtk.VBox w1 = this.VBox;
     w1.Name = "dialog1_VBox";
     w1.BorderWidth = ((uint)(2));
     // Container child dialog1_VBox.Gtk.Box+BoxChild
     this.hbox1 = new Gtk.HBox();
     this.hbox1.Name = "hbox1";
     this.hbox1.Spacing = 6;
     // Container child hbox1.Gtk.Box+BoxChild
     this.label3 = new Gtk.Label();
     this.label3.Name = "label3";
     this.label3.LabelProp = Mono.Unix.Catalog.GetString("Target Database:");
     this.hbox1.Add(this.label3);
     Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.hbox1[this.label3]));
     w2.Position = 0;
     w2.Expand = false;
     w2.Fill = false;
     // Container child hbox1.Gtk.Box+BoxChild
     this.chooser = new Gtk.FileChooserButton(Mono.Unix.Catalog.GetString("Select A File"), ((Gtk.FileChooserAction)(0)));
     this.chooser.Name = "chooser";
     this.hbox1.Add(this.chooser);
     Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.hbox1[this.chooser]));
     w3.Position = 1;
     w1.Add(this.hbox1);
     Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(w1[this.hbox1]));
     w4.Position = 0;
     w4.Expand = false;
     w4.Fill = false;
     // Container child dialog1_VBox.Gtk.Box+BoxChild
     this.frame1 = new Gtk.Frame();
     this.frame1.Name = "frame1";
     this.frame1.ShadowType = ((Gtk.ShadowType)(0));
     this.frame1.LabelYalign = 0F;
     // Container child frame1.Gtk.Container+ContainerChild
     this.GtkAlignment2 = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment2.Name = "GtkAlignment2";
     this.GtkAlignment2.LeftPadding = ((uint)(12));
     // Container child GtkAlignment2.Gtk.Container+ContainerChild
     this.vbox2 = new Gtk.VBox();
     this.vbox2.Name = "vbox2";
     this.vbox2.Spacing = 6;
     // Container child vbox2.Gtk.Box+BoxChild
     this.visibleRadio = new Gtk.RadioButton(Mono.Unix.Catalog.GetString("All unfiltered caches"));
     this.visibleRadio.CanFocus = true;
     this.visibleRadio.Name = "visibleRadio";
     this.visibleRadio.DrawIndicator = true;
     this.visibleRadio.UseUnderline = true;
     this.visibleRadio.Group = new GLib.SList(System.IntPtr.Zero);
     this.vbox2.Add(this.visibleRadio);
     Gtk.Box.BoxChild w5 = ((Gtk.Box.BoxChild)(this.vbox2[this.visibleRadio]));
     w5.Position = 0;
     w5.Expand = false;
     w5.Fill = false;
     // Container child vbox2.Gtk.Box+BoxChild
     this.selectedRadio = new Gtk.RadioButton(Mono.Unix.Catalog.GetString("Just the selected cache"));
     this.selectedRadio.CanFocus = true;
     this.selectedRadio.Name = "selectedRadio";
     this.selectedRadio.DrawIndicator = true;
     this.selectedRadio.UseUnderline = true;
     this.selectedRadio.Group = this.visibleRadio.Group;
     this.vbox2.Add(this.selectedRadio);
     Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(this.vbox2[this.selectedRadio]));
     w6.Position = 1;
     w6.Expand = false;
     w6.Fill = false;
     // Container child vbox2.Gtk.Box+BoxChild
     this.entireRadio = new Gtk.RadioButton(Mono.Unix.Catalog.GetString("The entire database"));
     this.entireRadio.Sensitive = false;
     this.entireRadio.CanFocus = true;
     this.entireRadio.Name = "entireRadio";
     this.entireRadio.DrawIndicator = true;
     this.entireRadio.UseUnderline = true;
     this.entireRadio.Group = this.visibleRadio.Group;
     this.vbox2.Add(this.entireRadio);
     Gtk.Box.BoxChild w7 = ((Gtk.Box.BoxChild)(this.vbox2[this.entireRadio]));
     w7.Position = 2;
     w7.Expand = false;
     w7.Fill = false;
     this.GtkAlignment2.Add(this.vbox2);
     this.frame1.Add(this.GtkAlignment2);
     this.GtkLabel3 = new Gtk.Label();
     this.GtkLabel3.Name = "GtkLabel3";
     this.GtkLabel3.LabelProp = Mono.Unix.Catalog.GetString("<b>Move Options</b>");
     this.GtkLabel3.UseMarkup = true;
     this.frame1.LabelWidget = this.GtkLabel3;
     w1.Add(this.frame1);
     Gtk.Box.BoxChild w10 = ((Gtk.Box.BoxChild)(w1[this.frame1]));
     w10.Position = 1;
     w10.Expand = false;
     w10.Fill = false;
     // Internal child ocmgtk.CopyMoveDialog.ActionArea
     Gtk.HButtonBox w11 = this.ActionArea;
     w11.Name = "dialog1_ActionArea";
     w11.Spacing = 10;
     w11.BorderWidth = ((uint)(5));
     w11.LayoutStyle = ((Gtk.ButtonBoxStyle)(4));
     // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
     this.buttonCancel = new Gtk.Button();
     this.buttonCancel.CanDefault = true;
     this.buttonCancel.CanFocus = true;
     this.buttonCancel.Name = "buttonCancel";
     this.buttonCancel.UseStock = true;
     this.buttonCancel.UseUnderline = true;
     this.buttonCancel.Label = "gtk-cancel";
     this.AddActionWidget(this.buttonCancel, -6);
     Gtk.ButtonBox.ButtonBoxChild w12 = ((Gtk.ButtonBox.ButtonBoxChild)(w11[this.buttonCancel]));
     w12.Expand = false;
     w12.Fill = false;
     // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
     this.buttonOk = new Gtk.Button();
     this.buttonOk.CanDefault = true;
     this.buttonOk.CanFocus = true;
     this.buttonOk.Name = "buttonOk";
     this.buttonOk.UseStock = true;
     this.buttonOk.UseUnderline = true;
     this.buttonOk.Label = "gtk-ok";
     this.AddActionWidget(this.buttonOk, -5);
     Gtk.ButtonBox.ButtonBoxChild w13 = ((Gtk.ButtonBox.ButtonBoxChild)(w11[this.buttonOk]));
     w13.Position = 1;
     w13.Expand = false;
     w13.Fill = false;
     if ((this.Child != null)) {
         this.Child.ShowAll();
     }
     this.DefaultWidth = 400;
     this.DefaultHeight = 225;
     this.Show();
     this.buttonCancel.Clicked += new System.EventHandler(this.OnButtonCancelClicked);
     this.buttonOk.Clicked += new System.EventHandler(this.OKClicked);
 }
		private void HandleResponse (object sender, Gtk.ResponseArgs args)
		{
			if (args.ResponseId != Gtk.ResponseType.Ok) {
				// FIXME this is to work around a bug in gtk+ where
				// the filesystem events are still listened to when
				// a FileChooserButton is destroyed but not finalized
				// and an event comes in that wants to update the child widgets.
				Dialog.Destroy ();
				uri_chooser.Dispose ();
				uri_chooser = null;
				return;
			}

			dest = new Gnome.Vfs.Uri (uri_chooser.Uri);
			open = open_check.Active;
			scale = scale_check.Active;
			rotate = rotate_check.Active;

			gallery_name = name_entry.Text;

			if (description_entry != null)
				description = description_entry.Text;

			if (scale)
				size = size_spin.ValueAsInt;

			command_thread = new System.Threading.Thread (new System.Threading.ThreadStart (Upload));
			command_thread.Name = Catalog.GetString ("Transferring Pictures");

			//FIXME: get the files/dirs count in a cleaner way than (* 5 + 2(zip) + 9)
			// selection * 5 (original, mq, lq, thumbs, comments)
			// 2: zipfiles
			// 9: directories + info.txt + .htaccess
			// this should actually be 1 anyway, because we transfer just one dir 
			progress_dialog = new FSpot.ThreadProgressDialog (command_thread, 1);
			progress_dialog.Start ();
		}
Пример #32
0
 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget ocmgtk.CopyMoveDialog
     this.WidthRequest    = 350;
     this.Name            = "ocmgtk.CopyMoveDialog";
     this.Title           = Mono.Unix.Catalog.GetString("Copy/Move");
     this.TypeHint        = ((Gdk.WindowTypeHint)(1));
     this.WindowPosition  = ((Gtk.WindowPosition)(4));
     this.Modal           = true;
     this.BorderWidth     = ((uint)(6));
     this.Resizable       = false;
     this.AllowGrow       = false;
     this.SkipPagerHint   = true;
     this.SkipTaskbarHint = true;
     // Internal child ocmgtk.CopyMoveDialog.VBox
     Gtk.VBox w1 = this.VBox;
     w1.Name        = "dialog1_VBox";
     w1.BorderWidth = ((uint)(2));
     // Container child dialog1_VBox.Gtk.Box+BoxChild
     this.hbox1         = new Gtk.HBox();
     this.hbox1.Name    = "hbox1";
     this.hbox1.Spacing = 6;
     // Container child hbox1.Gtk.Box+BoxChild
     this.label3           = new Gtk.Label();
     this.label3.Name      = "label3";
     this.label3.LabelProp = Mono.Unix.Catalog.GetString("Target Database:");
     this.hbox1.Add(this.label3);
     Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.hbox1[this.label3]));
     w2.Position = 0;
     w2.Expand   = false;
     w2.Fill     = false;
     // Container child hbox1.Gtk.Box+BoxChild
     this.chooser      = new Gtk.FileChooserButton(Mono.Unix.Catalog.GetString("Select A File"), ((Gtk.FileChooserAction)(0)));
     this.chooser.Name = "chooser";
     this.hbox1.Add(this.chooser);
     Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.hbox1[this.chooser]));
     w3.Position = 1;
     w1.Add(this.hbox1);
     Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(w1[this.hbox1]));
     w4.Position = 0;
     w4.Expand   = false;
     w4.Fill     = false;
     // Container child dialog1_VBox.Gtk.Box+BoxChild
     this.frame1             = new Gtk.Frame();
     this.frame1.Name        = "frame1";
     this.frame1.ShadowType  = ((Gtk.ShadowType)(0));
     this.frame1.LabelYalign = 0F;
     // Container child frame1.Gtk.Container+ContainerChild
     this.GtkAlignment2             = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment2.Name        = "GtkAlignment2";
     this.GtkAlignment2.LeftPadding = ((uint)(12));
     // Container child GtkAlignment2.Gtk.Container+ContainerChild
     this.vbox2         = new Gtk.VBox();
     this.vbox2.Name    = "vbox2";
     this.vbox2.Spacing = 6;
     // Container child vbox2.Gtk.Box+BoxChild
     this.visibleRadio               = new Gtk.RadioButton(Mono.Unix.Catalog.GetString("All unfiltered caches"));
     this.visibleRadio.CanFocus      = true;
     this.visibleRadio.Name          = "visibleRadio";
     this.visibleRadio.DrawIndicator = true;
     this.visibleRadio.UseUnderline  = true;
     this.visibleRadio.Group         = new GLib.SList(System.IntPtr.Zero);
     this.vbox2.Add(this.visibleRadio);
     Gtk.Box.BoxChild w5 = ((Gtk.Box.BoxChild)(this.vbox2[this.visibleRadio]));
     w5.Position = 0;
     w5.Expand   = false;
     w5.Fill     = false;
     // Container child vbox2.Gtk.Box+BoxChild
     this.selectedRadio               = new Gtk.RadioButton(Mono.Unix.Catalog.GetString("Just the selected cache"));
     this.selectedRadio.CanFocus      = true;
     this.selectedRadio.Name          = "selectedRadio";
     this.selectedRadio.DrawIndicator = true;
     this.selectedRadio.UseUnderline  = true;
     this.selectedRadio.Group         = this.visibleRadio.Group;
     this.vbox2.Add(this.selectedRadio);
     Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(this.vbox2[this.selectedRadio]));
     w6.Position = 1;
     w6.Expand   = false;
     w6.Fill     = false;
     // Container child vbox2.Gtk.Box+BoxChild
     this.entireRadio               = new Gtk.RadioButton(Mono.Unix.Catalog.GetString("The entire database"));
     this.entireRadio.Sensitive     = false;
     this.entireRadio.CanFocus      = true;
     this.entireRadio.Name          = "entireRadio";
     this.entireRadio.DrawIndicator = true;
     this.entireRadio.UseUnderline  = true;
     this.entireRadio.Group         = this.visibleRadio.Group;
     this.vbox2.Add(this.entireRadio);
     Gtk.Box.BoxChild w7 = ((Gtk.Box.BoxChild)(this.vbox2[this.entireRadio]));
     w7.Position = 2;
     w7.Expand   = false;
     w7.Fill     = false;
     this.GtkAlignment2.Add(this.vbox2);
     this.frame1.Add(this.GtkAlignment2);
     this.GtkLabel3           = new Gtk.Label();
     this.GtkLabel3.Name      = "GtkLabel3";
     this.GtkLabel3.LabelProp = Mono.Unix.Catalog.GetString("<b>Move Options</b>");
     this.GtkLabel3.UseMarkup = true;
     this.frame1.LabelWidget  = this.GtkLabel3;
     w1.Add(this.frame1);
     Gtk.Box.BoxChild w10 = ((Gtk.Box.BoxChild)(w1[this.frame1]));
     w10.Position = 1;
     w10.Expand   = false;
     w10.Fill     = false;
     // Internal child ocmgtk.CopyMoveDialog.ActionArea
     Gtk.HButtonBox w11 = this.ActionArea;
     w11.Name        = "dialog1_ActionArea";
     w11.Spacing     = 10;
     w11.BorderWidth = ((uint)(5));
     w11.LayoutStyle = ((Gtk.ButtonBoxStyle)(4));
     // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
     this.buttonCancel              = new Gtk.Button();
     this.buttonCancel.CanDefault   = true;
     this.buttonCancel.CanFocus     = true;
     this.buttonCancel.Name         = "buttonCancel";
     this.buttonCancel.UseStock     = true;
     this.buttonCancel.UseUnderline = true;
     this.buttonCancel.Label        = "gtk-cancel";
     this.AddActionWidget(this.buttonCancel, -6);
     Gtk.ButtonBox.ButtonBoxChild w12 = ((Gtk.ButtonBox.ButtonBoxChild)(w11[this.buttonCancel]));
     w12.Expand = false;
     w12.Fill   = false;
     // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
     this.buttonOk              = new Gtk.Button();
     this.buttonOk.CanDefault   = true;
     this.buttonOk.CanFocus     = true;
     this.buttonOk.Name         = "buttonOk";
     this.buttonOk.UseStock     = true;
     this.buttonOk.UseUnderline = true;
     this.buttonOk.Label        = "gtk-ok";
     this.AddActionWidget(this.buttonOk, -5);
     Gtk.ButtonBox.ButtonBoxChild w13 = ((Gtk.ButtonBox.ButtonBoxChild)(w11[this.buttonOk]));
     w13.Position = 1;
     w13.Expand   = false;
     w13.Fill     = false;
     if ((this.Child != null))
     {
         this.Child.ShowAll();
     }
     this.DefaultWidth  = 400;
     this.DefaultHeight = 225;
     this.Show();
     this.buttonCancel.Clicked += new System.EventHandler(this.OnButtonCancelClicked);
     this.buttonOk.Clicked     += new System.EventHandler(this.OKClicked);
 }
Пример #33
0
        public void Run(IBrowsableCollection selection)
        {
            this.selection = selection;

            var view = new TrayView (selection);
            view.DisplayDates = false;
            view.DisplayTags = false;

            builder = new GtkBeans.Builder (null, "folder_export.ui", null);
            builder.Autoconnect (this);
            Dialog.Modal = false;
            Dialog.TransientFor = null;

            thumb_scrolledwindow.Add (view);
            HandleSizeActive (null, null);
            name_entry.Text = gallery_name;

            string uri_path = System.IO.Path.Combine (FSpot.Core.Global.HomeDirectory, "Desktop");
            if (!System.IO.Directory.Exists (uri_path))
                    uri_path = FSpot.Core.Global.HomeDirectory;

            uri_chooser = new Gtk.FileChooserButton (Catalog.GetString ("Select Export Folder"),
                                 Gtk.FileChooserAction.SelectFolder);

            uri_chooser.LocalOnly = false;

            if (!String.IsNullOrEmpty (Preferences.Get<string> (URI_KEY)))
                uri_chooser.SetCurrentFolderUri (Preferences.Get<string> (URI_KEY));
            else
                uri_chooser.SetFilename (uri_path);

            chooser_hbox.PackStart (uri_chooser);

            Dialog.ShowAll ();
            Dialog.Response += HandleResponse;

            LoadPreference (SCALE_KEY);
            LoadPreference (SIZE_KEY);
            LoadPreference (OPEN_KEY);
            LoadPreference (EXPORT_TAGS_KEY);
            LoadPreference (EXPORT_TAG_ICONS_KEY);
            LoadPreference (METHOD_KEY);
        }
 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget MonoDevelop.VersionControl.Bazaar.Dialogs.BranchSelectionDialog
     this.CanFocus = true;
     this.Name = "MonoDevelop.VersionControl.Bazaar.Dialogs.BranchSelectionDialog";
     this.Title = Mono.Unix.Catalog.GetString("Choose a Branch");
     this.WindowPosition = ((Gtk.WindowPosition)(4));
     this.Modal = true;
     // Internal child MonoDevelop.VersionControl.Bazaar.Dialogs.BranchSelectionDialog.VBox
     Gtk.VBox w1 = this.VBox;
     w1.Name = "dialog1_VBox";
     w1.BorderWidth = ((uint)(2));
     // Container child dialog1_VBox.Gtk.Box+BoxChild
     this.vbox2 = new Gtk.VBox();
     this.vbox2.Name = "vbox2";
     this.vbox2.Spacing = 6;
     // Container child vbox2.Gtk.Box+BoxChild
     this.GtkScrolledWindow = new Gtk.ScrolledWindow();
     this.GtkScrolledWindow.Name = "GtkScrolledWindow";
     this.GtkScrolledWindow.ShadowType = ((Gtk.ShadowType)(1));
     // Container child GtkScrolledWindow.Gtk.Container+ContainerChild
     this.branchTreeView = new Gtk.TreeView();
     this.branchTreeView.CanFocus = true;
     this.branchTreeView.Name = "branchTreeView";
     this.branchTreeView.SearchColumn = 0;
     this.GtkScrolledWindow.Add(this.branchTreeView);
     this.vbox2.Add(this.GtkScrolledWindow);
     Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.vbox2[this.GtkScrolledWindow]));
     w3.Position = 0;
     // Container child vbox2.Gtk.Box+BoxChild
     this.localPathButton = new Gtk.FileChooserButton(Mono.Unix.Catalog.GetString("Choose Local Path"), ((Gtk.FileChooserAction)(2)));
     this.localPathButton.Name = "localPathButton";
     this.localPathButton.ShowHidden = true;
     this.vbox2.Add(this.localPathButton);
     Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(this.vbox2[this.localPathButton]));
     w4.Position = 1;
     w4.Expand = false;
     w4.Fill = false;
     // Container child vbox2.Gtk.Box+BoxChild
     this.hbox1 = new Gtk.HBox();
     this.hbox1.Name = "hbox1";
     this.hbox1.Spacing = 6;
     // Container child hbox1.Gtk.Box+BoxChild
     this.defaultCB = new Gtk.CheckButton();
     this.defaultCB.CanFocus = true;
     this.defaultCB.Name = "defaultCB";
     this.defaultCB.Label = Mono.Unix.Catalog.GetString("Set as _Default");
     this.defaultCB.DrawIndicator = true;
     this.defaultCB.UseUnderline = true;
     this.hbox1.Add(this.defaultCB);
     Gtk.Box.BoxChild w5 = ((Gtk.Box.BoxChild)(this.hbox1[this.defaultCB]));
     w5.Position = 0;
     // Container child hbox1.Gtk.Box+BoxChild
     this.overwriteCB = new Gtk.CheckButton();
     this.overwriteCB.CanFocus = true;
     this.overwriteCB.Name = "overwriteCB";
     this.overwriteCB.Label = Mono.Unix.Catalog.GetString("O_verwrite");
     this.overwriteCB.DrawIndicator = true;
     this.overwriteCB.UseUnderline = true;
     this.hbox1.Add(this.overwriteCB);
     Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(this.hbox1[this.overwriteCB]));
     w6.Position = 1;
     // Container child hbox1.Gtk.Box+BoxChild
     this.omitCB = new Gtk.CheckButton();
     this.omitCB.CanFocus = true;
     this.omitCB.Name = "omitCB";
     this.omitCB.Label = Mono.Unix.Catalog.GetString("O_mit History");
     this.omitCB.DrawIndicator = true;
     this.omitCB.UseUnderline = true;
     this.hbox1.Add(this.omitCB);
     Gtk.Box.BoxChild w7 = ((Gtk.Box.BoxChild)(this.hbox1[this.omitCB]));
     w7.Position = 2;
     this.vbox2.Add(this.hbox1);
     Gtk.Box.BoxChild w8 = ((Gtk.Box.BoxChild)(this.vbox2[this.hbox1]));
     w8.Position = 2;
     w8.Expand = false;
     w8.Fill = false;
     w1.Add(this.vbox2);
     Gtk.Box.BoxChild w9 = ((Gtk.Box.BoxChild)(w1[this.vbox2]));
     w9.Position = 0;
     // Internal child MonoDevelop.VersionControl.Bazaar.Dialogs.BranchSelectionDialog.ActionArea
     Gtk.HButtonBox w10 = this.ActionArea;
     w10.Name = "dialog1_ActionArea";
     w10.Spacing = 6;
     w10.BorderWidth = ((uint)(5));
     w10.LayoutStyle = ((Gtk.ButtonBoxStyle)(4));
     // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
     this.buttonCancel = new Gtk.Button();
     this.buttonCancel.CanDefault = true;
     this.buttonCancel.CanFocus = true;
     this.buttonCancel.Name = "buttonCancel";
     this.buttonCancel.UseStock = true;
     this.buttonCancel.UseUnderline = true;
     this.buttonCancel.Label = "gtk-cancel";
     this.AddActionWidget(this.buttonCancel, -6);
     Gtk.ButtonBox.ButtonBoxChild w11 = ((Gtk.ButtonBox.ButtonBoxChild)(w10[this.buttonCancel]));
     w11.Expand = false;
     w11.Fill = false;
     // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
     this.buttonOk = new Gtk.Button();
     this.buttonOk.CanDefault = true;
     this.buttonOk.CanFocus = true;
     this.buttonOk.Name = "buttonOk";
     this.buttonOk.UseStock = true;
     this.buttonOk.UseUnderline = true;
     this.buttonOk.Label = "gtk-ok";
     this.AddActionWidget(this.buttonOk, -5);
     Gtk.ButtonBox.ButtonBoxChild w12 = ((Gtk.ButtonBox.ButtonBoxChild)(w10[this.buttonOk]));
     w12.Position = 1;
     w12.Expand = false;
     w12.Fill = false;
     if ((this.Child != null)) {
         this.Child.ShowAll();
     }
     this.DefaultWidth = 400;
     this.DefaultHeight = 257;
     this.Show();
     this.omitCB.Toggled += new System.EventHandler(this.OnOmitCBToggled);
 }
 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget Whee.WordBuilder.Dialogs.ExportDialog
     this.Name           = "Whee.WordBuilder.Dialogs.ExportDialog";
     this.Title          = "Export";
     this.Icon           = Stetic.IconLoader.LoadIcon(this, "gtk-execute", Gtk.IconSize.Menu, 16);
     this.TypeHint       = ((Gdk.WindowTypeHint)(1));
     this.WindowPosition = ((Gtk.WindowPosition)(4));
     this.Modal          = true;
     // Internal child Whee.WordBuilder.Dialogs.ExportDialog.VBox
     Gtk.VBox w1 = this.VBox;
     w1.Name        = "dialog1_VBox";
     w1.BorderWidth = ((uint)(2));
     // Container child dialog1_VBox.Gtk.Box+BoxChild
     this.table1               = new Gtk.Table(((uint)(2)), ((uint)(2)), false);
     this.table1.Name          = "table1";
     this.table1.RowSpacing    = ((uint)(6));
     this.table1.ColumnSpacing = ((uint)(6));
     // Container child table1.Gtk.Table+TableChild
     this.exportFileChooserButton      = new Gtk.FileChooserButton("Export to file", ((Gtk.FileChooserAction)(0)));
     this.exportFileChooserButton.Name = "exportFileChooserButton";
     this.exportFileChooserButton.DoOverwriteConfirmation = true;
     this.table1.Add(this.exportFileChooserButton);
     Gtk.Table.TableChild w2 = ((Gtk.Table.TableChild)(this.table1[this.exportFileChooserButton]));
     w2.TopAttach    = ((uint)(1));
     w2.BottomAttach = ((uint)(2));
     w2.LeftAttach   = ((uint)(1));
     w2.RightAttach  = ((uint)(2));
     w2.XOptions     = ((Gtk.AttachOptions)(4));
     w2.YOptions     = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.exportFormatComboBox      = Gtk.ComboBox.NewText();
     this.exportFormatComboBox.Name = "exportFormatComboBox";
     this.table1.Add(this.exportFormatComboBox);
     Gtk.Table.TableChild w3 = ((Gtk.Table.TableChild)(this.table1[this.exportFormatComboBox]));
     w3.LeftAttach  = ((uint)(1));
     w3.RightAttach = ((uint)(2));
     w3.YOptions    = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.label1           = new Gtk.Label();
     this.label1.Name      = "label1";
     this.label1.LabelProp = "Export format:";
     this.table1.Add(this.label1);
     Gtk.Table.TableChild w4 = ((Gtk.Table.TableChild)(this.table1[this.label1]));
     w4.XOptions = ((Gtk.AttachOptions)(4));
     w4.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.label2           = new Gtk.Label();
     this.label2.Name      = "label2";
     this.label2.LabelProp = "Filename:";
     this.table1.Add(this.label2);
     Gtk.Table.TableChild w5 = ((Gtk.Table.TableChild)(this.table1[this.label2]));
     w5.TopAttach    = ((uint)(1));
     w5.BottomAttach = ((uint)(2));
     w5.XOptions     = ((Gtk.AttachOptions)(4));
     w5.YOptions     = ((Gtk.AttachOptions)(4));
     w1.Add(this.table1);
     Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(w1[this.table1]));
     w6.Position = 0;
     w6.Expand   = false;
     w6.Fill     = false;
     // Internal child Whee.WordBuilder.Dialogs.ExportDialog.ActionArea
     Gtk.HButtonBox w7 = this.ActionArea;
     w7.Name        = "dialog1_ActionArea";
     w7.Spacing     = 10;
     w7.BorderWidth = ((uint)(5));
     w7.LayoutStyle = ((Gtk.ButtonBoxStyle)(4));
     // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
     this.buttonCancel              = new Gtk.Button();
     this.buttonCancel.CanDefault   = true;
     this.buttonCancel.CanFocus     = true;
     this.buttonCancel.Name         = "buttonCancel";
     this.buttonCancel.UseStock     = true;
     this.buttonCancel.UseUnderline = true;
     this.buttonCancel.Label        = "gtk-cancel";
     this.AddActionWidget(this.buttonCancel, -6);
     Gtk.ButtonBox.ButtonBoxChild w8 = ((Gtk.ButtonBox.ButtonBoxChild)(w7[this.buttonCancel]));
     w8.Expand = false;
     w8.Fill   = false;
     // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
     this.buttonOk              = new Gtk.Button();
     this.buttonOk.CanDefault   = true;
     this.buttonOk.CanFocus     = true;
     this.buttonOk.Name         = "buttonOk";
     this.buttonOk.UseStock     = true;
     this.buttonOk.UseUnderline = true;
     this.buttonOk.Label        = "gtk-ok";
     this.AddActionWidget(this.buttonOk, -5);
     Gtk.ButtonBox.ButtonBoxChild w9 = ((Gtk.ButtonBox.ButtonBoxChild)(w7[this.buttonOk]));
     w9.Position = 1;
     w9.Expand   = false;
     w9.Fill     = false;
     if ((this.Child != null))
     {
         this.Child.ShowAll();
     }
     this.DefaultWidth  = 429;
     this.DefaultHeight = 154;
     this.Show();
 }
Пример #36
0
 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget Monsoon.LoadTorrentDialog
     this.Name           = "Monsoon.LoadTorrentDialog";
     this.Title          = Mono.Unix.Catalog.GetString("Load torrent");
     this.WindowPosition = ((Gtk.WindowPosition)(4));
     // Internal child Monsoon.LoadTorrentDialog.VBox
     Gtk.VBox w1 = this.VBox;
     w1.Name        = "dialog1_VBox";
     w1.BorderWidth = ((uint)(2));
     // Container child dialog1_VBox.Gtk.Box+BoxChild
     this.vbox4         = new Gtk.VBox();
     this.vbox4.Name    = "vbox4";
     this.vbox4.Spacing = 6;
     // Container child vbox4.Gtk.Box+BoxChild
     this.frame3            = new Gtk.Frame();
     this.frame3.Name       = "frame3";
     this.frame3.ShadowType = ((Gtk.ShadowType)(0));
     // Container child frame3.Gtk.Container+ContainerChild
     this.GtkAlignment2             = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment2.Name        = "GtkAlignment2";
     this.GtkAlignment2.LeftPadding = ((uint)(12));
     // Container child GtkAlignment2.Gtk.Container+ContainerChild
     this.vbox5         = new Gtk.VBox();
     this.vbox5.Name    = "vbox5";
     this.vbox5.Spacing = 6;
     // Container child vbox5.Gtk.Box+BoxChild
     this.hbox5         = new Gtk.HBox();
     this.hbox5.Name    = "hbox5";
     this.hbox5.Spacing = 6;
     // Container child hbox5.Gtk.Box+BoxChild
     this.fileChooser            = new Gtk.FileChooserButton(Mono.Unix.Catalog.GetString("Select A Folder"), ((Gtk.FileChooserAction)(2)));
     this.fileChooser.Name       = "fileChooser";
     this.fileChooser.ShowHidden = true;
     this.hbox5.Add(this.fileChooser);
     Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.hbox5[this.fileChooser]));
     w2.Position = 0;
     this.vbox5.Add(this.hbox5);
     Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.vbox5[this.hbox5]));
     w3.Position = 0;
     w3.Expand   = false;
     w3.Fill     = false;
     // Container child vbox5.Gtk.Box+BoxChild
     this.table1               = new Gtk.Table(((uint)(2)), ((uint)(2)), false);
     this.table1.Name          = "table1";
     this.table1.RowSpacing    = ((uint)(6));
     this.table1.ColumnSpacing = ((uint)(6));
     // Container child table1.Gtk.Table+TableChild
     this.label2           = new Gtk.Label();
     this.label2.Name      = "label2";
     this.label2.Xalign    = 0F;
     this.label2.LabelProp = Mono.Unix.Catalog.GetString("Name:");
     this.table1.Add(this.label2);
     Gtk.Table.TableChild w4 = ((Gtk.Table.TableChild)(this.table1[this.label2]));
     w4.XOptions = ((Gtk.AttachOptions)(4));
     w4.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.label3           = new Gtk.Label();
     this.label3.Name      = "label3";
     this.label3.Xalign    = 0F;
     this.label3.LabelProp = Mono.Unix.Catalog.GetString("Size:");
     this.table1.Add(this.label3);
     Gtk.Table.TableChild w5 = ((Gtk.Table.TableChild)(this.table1[this.label3]));
     w5.TopAttach    = ((uint)(1));
     w5.BottomAttach = ((uint)(2));
     w5.XOptions     = ((Gtk.AttachOptions)(4));
     w5.YOptions     = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.lblName           = new Gtk.Label();
     this.lblName.Name      = "lblName";
     this.lblName.Xalign    = 0F;
     this.lblName.LabelProp = Mono.Unix.Catalog.GetString("Suse-11.0-i386.iso");
     this.table1.Add(this.lblName);
     Gtk.Table.TableChild w6 = ((Gtk.Table.TableChild)(this.table1[this.lblName]));
     w6.LeftAttach  = ((uint)(1));
     w6.RightAttach = ((uint)(2));
     w6.XOptions    = ((Gtk.AttachOptions)(4));
     w6.YOptions    = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.lblSize           = new Gtk.Label();
     this.lblSize.Name      = "lblSize";
     this.lblSize.Xalign    = 0F;
     this.lblSize.LabelProp = Mono.Unix.Catalog.GetString("700MB");
     this.table1.Add(this.lblSize);
     Gtk.Table.TableChild w7 = ((Gtk.Table.TableChild)(this.table1[this.lblSize]));
     w7.TopAttach    = ((uint)(1));
     w7.BottomAttach = ((uint)(2));
     w7.LeftAttach   = ((uint)(1));
     w7.RightAttach  = ((uint)(2));
     w7.XOptions     = ((Gtk.AttachOptions)(4));
     w7.YOptions     = ((Gtk.AttachOptions)(4));
     this.vbox5.Add(this.table1);
     Gtk.Box.BoxChild w8 = ((Gtk.Box.BoxChild)(this.vbox5[this.table1]));
     w8.Position = 1;
     w8.Expand   = false;
     w8.Fill     = false;
     this.GtkAlignment2.Add(this.vbox5);
     this.frame3.Add(this.GtkAlignment2);
     this.GtkLabel2           = new Gtk.Label();
     this.GtkLabel2.Name      = "GtkLabel2";
     this.GtkLabel2.LabelProp = Mono.Unix.Catalog.GetString("<b>Save</b>");
     this.GtkLabel2.UseMarkup = true;
     this.frame3.LabelWidget  = this.GtkLabel2;
     this.vbox4.Add(this.frame3);
     Gtk.Box.BoxChild w11 = ((Gtk.Box.BoxChild)(this.vbox4[this.frame3]));
     w11.Position = 0;
     w11.Expand   = false;
     w11.Fill     = false;
     // Container child vbox4.Gtk.Box+BoxChild
     this.expander1          = new Gtk.Expander(null);
     this.expander1.CanFocus = true;
     this.expander1.Name     = "expander1";
     this.expander1.Expanded = true;
     // Container child expander1.Gtk.Container+ContainerChild
     this.GtkScrolledWindow            = new Gtk.ScrolledWindow();
     this.GtkScrolledWindow.Name       = "GtkScrolledWindow";
     this.GtkScrolledWindow.ShadowType = ((Gtk.ShadowType)(1));
     // Container child GtkScrolledWindow.Gtk.Container+ContainerChild
     this.torrentTreeView          = new Gtk.TreeView();
     this.torrentTreeView.CanFocus = true;
     this.torrentTreeView.Name     = "torrentTreeView";
     this.GtkScrolledWindow.Add(this.torrentTreeView);
     this.expander1.Add(this.GtkScrolledWindow);
     this.GtkLabel1              = new Gtk.Label();
     this.GtkLabel1.Name         = "GtkLabel1";
     this.GtkLabel1.LabelProp    = Mono.Unix.Catalog.GetString("Files");
     this.GtkLabel1.UseUnderline = true;
     this.expander1.LabelWidget  = this.GtkLabel1;
     this.vbox4.Add(this.expander1);
     Gtk.Box.BoxChild w14 = ((Gtk.Box.BoxChild)(this.vbox4[this.expander1]));
     w14.Position = 1;
     // Container child vbox4.Gtk.Box+BoxChild
     this.checkbutton2               = new Gtk.CheckButton();
     this.checkbutton2.CanFocus      = true;
     this.checkbutton2.Name          = "checkbutton2";
     this.checkbutton2.Label         = Mono.Unix.Catalog.GetString("Always show this dialog");
     this.checkbutton2.Active        = true;
     this.checkbutton2.DrawIndicator = true;
     this.checkbutton2.UseUnderline  = true;
     this.vbox4.Add(this.checkbutton2);
     Gtk.Box.BoxChild w15 = ((Gtk.Box.BoxChild)(this.vbox4[this.checkbutton2]));
     w15.Position = 2;
     w15.Expand   = false;
     w15.Fill     = false;
     w1.Add(this.vbox4);
     Gtk.Box.BoxChild w16 = ((Gtk.Box.BoxChild)(w1[this.vbox4]));
     w16.Position = 0;
     // Internal child Monsoon.LoadTorrentDialog.ActionArea
     Gtk.HButtonBox w17 = this.ActionArea;
     w17.Name        = "dialog1_ActionArea";
     w17.Spacing     = 6;
     w17.BorderWidth = ((uint)(5));
     w17.LayoutStyle = ((Gtk.ButtonBoxStyle)(4));
     // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
     this.buttonCancel              = new Gtk.Button();
     this.buttonCancel.CanDefault   = true;
     this.buttonCancel.CanFocus     = true;
     this.buttonCancel.Name         = "buttonCancel";
     this.buttonCancel.UseStock     = true;
     this.buttonCancel.UseUnderline = true;
     this.buttonCancel.Label        = "gtk-cancel";
     this.AddActionWidget(this.buttonCancel, -6);
     Gtk.ButtonBox.ButtonBoxChild w18 = ((Gtk.ButtonBox.ButtonBoxChild)(w17[this.buttonCancel]));
     w18.Expand = false;
     w18.Fill   = false;
     // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
     this.buttonOk              = new Gtk.Button();
     this.buttonOk.CanDefault   = true;
     this.buttonOk.CanFocus     = true;
     this.buttonOk.Name         = "buttonOk";
     this.buttonOk.UseStock     = true;
     this.buttonOk.UseUnderline = true;
     this.buttonOk.Label        = "gtk-ok";
     this.AddActionWidget(this.buttonOk, -5);
     Gtk.ButtonBox.ButtonBoxChild w19 = ((Gtk.ButtonBox.ButtonBoxChild)(w17[this.buttonOk]));
     w19.Position = 1;
     w19.Expand   = false;
     w19.Fill     = false;
     if ((this.Child != null))
     {
         this.Child.ShowAll();
     }
     this.DefaultWidth  = 400;
     this.DefaultHeight = 474;
     this.Show();
 }