Beispiel #1
0
        private void BuildInterface ()
        {
            field_chooser = new ComboBoxText ();
            field_chooser.Changed += HandleFieldChanged;

            op_chooser = new ComboBoxText ();
            op_chooser.RowSeparatorFunc = IsRowSeparator;
            op_chooser.Changed += HandleOperatorChanged;

            value_box = new HBox ();

            remove_button = new Button (new Image ("gtk-remove", IconSize.Button));
            remove_button.Relief = ReliefStyle.None;
            remove_button.Clicked += OnButtonRemoveClicked;

            add_button = new Button (new Image ("gtk-add", IconSize.Button));
            add_button.Relief = ReliefStyle.None;
            add_button.Clicked += OnButtonAddClicked;

            button_box = new HBox ();
            button_box.PackStart (remove_button, false, false, 0);
            button_box.PackStart (add_button, false, false, 0);

            foreach (QueryField field in sorted_fields) {
                field_chooser.AppendText (field.Label);
            }

            Show ();
            field_chooser.Active = 0;
        }
Beispiel #2
0
        public OpenRemoteServer () : base (Catalog.GetString ("Open remote DAAP server"), null)
        {
            VBox.Spacing = 6;
            VBox.PackStart (new Label () {
                Xalign = 0.0f,
                Text = Catalog.GetString ("Enter server IP address and port:")
            }, true, true, 0);

            HBox box = new HBox ();
            box.Spacing = 12;
            VBox.PackStart (box, false, false, 0);

            address_entry = ComboBoxText.NewWithEntry ();
            address_entry.Entry.Activated += OnEntryActivated;
            address_entry.Entry.WidthChars = 30;
            address_entry.Show ();

            port_entry = new SpinButton (1d, 65535d, 1d);
            port_entry.Value = 3689;
            port_entry.Show ();

            box.PackStart (address_entry, true, true, 0);
            box.PackEnd (port_entry, false, false, 0);

            address_entry.HasFocus = true;

            VBox.ShowAll ();

            AddStockButton (Stock.Cancel, ResponseType.Cancel);
            AddStockButton (Stock.Add, ResponseType.Ok, true);

            LoadHistory();
        }
		private void AttachWidgets (TextView textView)
		{
			// This is really different from the C version, but the
			// C versions seems a little pointless.

			Button button = new Button ("Click Me");
			button.Clicked +=  new EventHandler(EasterEggCB);
			textView.AddChildAtAnchor (button, buttonAnchor);
			button.ShowAll ();

			ComboBoxText combo = new ComboBoxText ();
			combo.AppendText ("Option 1");
			combo.AppendText ("Option 2");
			combo.AppendText ("Option 3");

 			textView.AddChildAtAnchor (combo, menuAnchor);

			HScale scale = new HScale (null);
			scale.SetRange (0,100);
			scale.SetSizeRequest (70, -1);
			textView.AddChildAtAnchor (scale, scaleAnchor);
			scale.ShowAll ();

			Gtk.Image image = Gtk.Image.LoadFromResource ("floppybuddy.gif");
			textView.AddChildAtAnchor (image, animationAnchor);
			image.ShowAll ();

			Entry entry = new Entry ();
			textView.AddChildAtAnchor (entry, entryAnchor);
			entry.ShowAll ();
		}
		// Convenience function to create a combo box holding a number of strings
		private ComboBox CreateComboBox (string [] strings)
		{
			ComboBoxText combo = new ComboBoxText ();

			foreach (string str in strings)
				combo.AppendText (str);

			combo.Active = 0;
			return combo;
		}
Beispiel #5
0
        public QueryLimitBox(QueryOrder [] orders, QueryLimit [] limits)
            : base()
        {
            this.orders = orders;
            this.limits = limits;

            Spacing = 5;

            enabled_checkbox = new CheckButton (Catalog.GetString ("_Limit to"));
            enabled_checkbox.Toggled += OnEnabledToggled;

            count_spin = new SpinButton (0, Double.MaxValue, 1);
            count_spin.Numeric = true;
            count_spin.Digits = 0;
            count_spin.Value = 25;
            count_spin.SetSizeRequest (60, -1);

            limit_combo = new ComboBoxText ();
            foreach (QueryLimit limit in limits) {
                limit_combo.AppendText (limit.Label);
            }

            order_combo = new ComboBoxText ();
            order_combo.RowSeparatorFunc = IsRowSeparator;
            foreach (QueryOrder order in orders) {
                if (order == null) {
                    order_combo.AppendText (String.Empty);
                } else {
                    order_combo.AppendText (order.Label);
                }
            }

            PackStart (enabled_checkbox, false, false, 0);
            PackStart (count_spin, false, false, 0);
            PackStart (limit_combo, false, false, 0);
            PackStart (new Label (Catalog.GetString ("selected by")), false, false, 0);
            PackStart (order_combo, false, false, 0);

            enabled_checkbox.Active = false;
            limit_combo.Active = 0;
            order_combo.Active = 0;

            OnEnabledToggled (null, null);

            ShowAll ();
        }
Beispiel #6
0
        // Relative: [<|>] [num] [minutes|hours] ago
        // TODO: Absolute: [>|>=|=|<|<=] [date/time]
        public FileSizeQueryValueEntry()
            : base()
        {
            spin_button = new SpinButton (0.0, 1.0, 1.0);
            spin_button.Digits = 1;
            spin_button.WidthChars = 4;
            spin_button.SetRange (0.0, Double.MaxValue);
            Add (spin_button);

            combo = new ComboBoxText ();
            combo.AppendText (Catalog.GetString ("bytes"));
            combo.AppendText (Catalog.GetString ("KB"));
            combo.AppendText (Catalog.GetString ("MB"));
            combo.AppendText (Catalog.GetString ("GB"));
            combo.Realized += delegate { if (!combo_set) { combo.Active = 2; } };
            Add (combo);

            spin_button.ValueChanged += HandleValueChanged;
            combo.Changed += HandleValueChanged;
        }
        public PlaylistQueryValueEntry()
            : base()
        {
            combo = new ComboBoxText ();
            combo.WidthRequest = DefaultWidth;

            int count = 0;
            PlaylistSource playlist;
            foreach (Source child in ServiceManager.SourceManager.DefaultSource.Children) {
                playlist = child as PlaylistSource;
                if (playlist != null && playlist.DbId != null) {
                    combo.AppendText (playlist.Name);
                    playlist_id_combo_map [(int)playlist.DbId] = count;
                    combo_playlist_id_map [count++] = (int) playlist.DbId;
                }
            }

            Add (combo);
            combo.Active = 0;

            combo.Changed += HandleValueChanged;
        }
Beispiel #8
0
        public TimeSpanQueryValueEntry()
            : base()
        {
            spin_button = new SpinButton (0.0, 1.0, 1.0);
            spin_button.Digits = 1;
            spin_button.WidthChars = 4;
            spin_button.SetRange (0.0, Double.MaxValue);
            Add (spin_button);

            combo = new ComboBoxText ();
            combo.AppendText (Catalog.GetString ("seconds"));
            combo.AppendText (Catalog.GetString ("minutes"));
            combo.AppendText (Catalog.GetString ("hours"));
            combo.AppendText (Catalog.GetString ("days"));
            combo.AppendText (Catalog.GetString ("weeks"));
            combo.AppendText (Catalog.GetString ("months"));
            combo.AppendText (Catalog.GetString ("years"));
            combo.Realized += delegate { combo.Active = set_combo; };
            Add (combo);

            spin_button.ValueChanged += HandleValueChanged;
            combo.Changed += HandleValueChanged;
        }
        public SmartPlaylistQueryValueEntry()
            : base()
        {
            combo = new ComboBoxText ();
            combo.WidthRequest = DefaultWidth;

            int count = 0;
            SmartPlaylistSource playlist;
            foreach (Source child in ServiceManager.SourceManager.DefaultSource.Children) {
                playlist = child as SmartPlaylistSource;
                if (playlist != null && playlist.DbId != null) {
                    if (Editor.CurrentlyEditing == null || (Editor.CurrentlyEditing != playlist && !playlist.DependsOn (Editor.CurrentlyEditing))) {
                        combo.AppendText (playlist.Name);
                        playlist_id_combo_map [playlist.DbId.Value] = count;
                        combo_playlist_id_map [count++] = playlist.DbId.Value;
                    }
                }
            }

            Add (combo);
            combo.Active = 0;

            combo.Changed += HandleValueChanged;
        }
Beispiel #10
0
        // TODO: pass in a label which it will update with the name from the combobox?
        public ComboBoxFromConstants(bool showHelp = true, bool vertical = false, bool showSpin = true)
        {
            this.Name = "LynnaLab.ComboBoxFromConstants";

            Gtk.Box box2 = new Gtk.HBox();
            box2.Spacing = 6;

            // Container child LynnaLab.ComboBoxFromConstants.Gtk.Container+ContainerChild
            if (vertical)
            {
                this.box1 = new Gtk.VBox();
            }
            else
            {
                this.box1 = new Gtk.HBox();
            }
            // Container child box1.Gtk.Box+BoxChild
            this.spinButton                          = new LynnaLab.SpinButtonHexadecimal();
            this.spinButton.CanFocus                 = true;
            this.spinButton.Name                     = "spinButton";
            this.spinButton.Adjustment.Upper         = 255D;
            this.spinButton.Adjustment.PageIncrement = 16D;
            this.spinButton.Adjustment.StepIncrement = 1D;
            this.spinButton.ClimbRate                = 1D;
            this.spinButton.Digits                   = 2;
            this.spinButton.Numeric                  = true;
            if (showSpin)
            {
                box2.Add(spinButton);
                box2.SetChildPacking(spinButton, expand: false, fill: false, padding: 0, pack_type: Gtk.PackType.Start);
                box1.Add(box2);
            }

            // Container child box1.Gtk.Box+BoxChild
            this.combobox1      = new Gtk.ComboBoxText();
            this.combobox1.Name = "combobox1";
            this.box1.Add(this.combobox1);
            box1.SetChildPacking(this.combobox1, false, false, 0, Gtk.PackType.Start);

            this.spinButton.ValueChanged += new System.EventHandler(this.OnSpinButtonValueChanged);
            this.combobox1.Changed       += new System.EventHandler(this.OnCombobox1Changed);

            if (showHelp)
            {
                // When clicking the "help" button, create a popup with documentation for
                // possible values. (It checks for a "@values" field in the documentation.)
                Gtk.Button helpButton = new Gtk.Button("?");
                helpButton.CanFocus = false;
                helpButton.Clicked += delegate(object sender, EventArgs e) {
                    if (DefaultDocumentation == null)
                    {
                        return;
                    }

                    DocumentationDialog d = new DocumentationDialog(DefaultDocumentation);
                    d.Run();
                    d.Dispose();
                };

                box2.PackStart(helpButton, false, false, 0);
            }

            Gtk.Frame frame = new Gtk.Frame();
            frame.Add(box1);
            this.Add(frame);
        }
Beispiel #11
0
        public StationEditor(DatabaseTrackInfo track)
            : base()
        {
            AccelGroup accel_group = new AccelGroup ();
            AddAccelGroup (accel_group);

            Title = String.Empty;
            SkipTaskbarHint = true;
            Modal = true;

            this.track = track;

            string title = track == null
                ? Catalog.GetString ("Add new radio station")
                : Catalog.GetString ("Edit radio station");

            BorderWidth = 6;
            DefaultResponse = ResponseType.Ok;
            Modal = true;

            ContentArea.Spacing = 6;

            HBox split_box = new HBox ();
            split_box.Spacing = 12;
            split_box.BorderWidth = 6;

            Image image = new Image ();
            image.IconSize = (int)IconSize.Dialog;
            image.IconName = "radio";
            image.Yalign = 0.0f;
            image.Show ();

            VBox main_box = new VBox ();
            main_box.BorderWidth = 5;
            main_box.Spacing = 10;

            Label header = new Label ();
            header.Markup = String.Format ("<big><b>{0}</b></big>", GLib.Markup.EscapeText (title));
            header.Xalign = 0.0f;
            header.Show ();

            Label message = new Label ();
            message.Text = Catalog.GetString ("Enter the Genre, Title and URL of the radio station you wish to add. A description is optional.");
            message.Xalign = 0.0f;
            message.Wrap = true;
            message.Show ();

            table = new Table (5, 2, false);
            table.RowSpacing = 6;
            table.ColumnSpacing = 6;

            genre_entry = ComboBoxText.NewWithEntry ();

            foreach (string genre in ServiceManager.DbConnection.QueryEnumerable<string> ("SELECT DISTINCT Genre FROM CoreTracks ORDER BY Genre")) {
                if (!String.IsNullOrEmpty (genre)) {
                    genre_entry.AppendText (genre);
                }
            }

            if (track != null && !String.IsNullOrEmpty (track.Genre)) {
                genre_entry.Entry.Text = track.Genre;
            }

            AddRow (Catalog.GetString ("Station Genre:"), genre_entry);

            name_entry        = AddEntryRow (Catalog.GetString ("Station Name:"));
            stream_entry      = AddEntryRow (Catalog.GetString ("Stream URL:"));
            creator_entry     = AddEntryRow (Catalog.GetString ("Station Creator:"));
            description_entry = AddEntryRow (Catalog.GetString ("Description:"));

            rating_entry = new RatingEntry ();
            HBox rating_box = new HBox ();
            rating_box.PackStart (rating_entry, false, false, 0);
            AddRow (Catalog.GetString ("Rating:"), rating_box);

            table.ShowAll ();

            main_box.PackStart (header, false, false, 0);
            main_box.PackStart (message, false, false, 0);
            main_box.PackStart (table, false, false, 0);
            main_box.Show ();

            split_box.PackStart (image, false, false, 0);
            split_box.PackStart (main_box, true, true, 0);
            split_box.Show ();

            ContentArea.PackStart (split_box, true, true, 0);

            Button cancel_button = new Button (Stock.Cancel);
            cancel_button.CanDefault = false;
            cancel_button.UseStock = true;
            cancel_button.Show ();
            AddActionWidget (cancel_button, ResponseType.Close);

            cancel_button.AddAccelerator ("activate", accel_group, (uint)Gdk.Key.Escape,
                0, Gtk.AccelFlags.Visible);

            save_button = new Button (Stock.Save);
            save_button.CanDefault = true;
            save_button.UseStock = true;
            save_button.Sensitive = false;
            save_button.Show ();
            AddActionWidget (save_button, ResponseType.Ok);

            save_button.AddAccelerator ("activate", accel_group, (uint)Gdk.Key.Return,
                0, Gtk.AccelFlags.Visible);

            name_entry.HasFocus = true;

            if (track != null) {
                if (!String.IsNullOrEmpty (track.TrackTitle)) {
                    name_entry.Text = track.TrackTitle;
                }

                if (!String.IsNullOrEmpty (track.Uri.AbsoluteUri)) {
                    stream_entry.Text = track.Uri.AbsoluteUri;
                }

                if (!String.IsNullOrEmpty (track.Comment)) {
                    description_entry.Text = track.Comment;
                }

                if (!String.IsNullOrEmpty (track.ArtistName)) {
                    creator_entry.Text = track.ArtistName;
                }

                rating_entry.Value = track.Rating;
            }

            error_container = new Alignment (0.0f, 0.0f, 1.0f, 1.0f);
            error_container.TopPadding = 6;
            HBox error_box = new HBox ();
            error_box.Spacing = 4;

            Image error_image = new Image ();
            error_image.Stock = Stock.DialogError;
            error_image.IconSize = (int)IconSize.Menu;
            error_image.Show ();

            error = new Label ();
            error.Xalign = 0.0f;
            error.Show ();

            error_box.PackStart (error_image, false, false, 0);
            error_box.PackStart (error, true, true, 0);
            error_box.Show ();

            error_container.Add (error_box);

            table.Attach (error_container, 0, 2, 6, 7, AttachOptions.Expand | AttachOptions.Fill, AttachOptions.Shrink, 0, 0);

            genre_entry.Entry.Changed += OnFieldsChanged;
            name_entry.Changed += OnFieldsChanged;
            stream_entry.Changed += OnFieldsChanged;

            OnFieldsChanged (this, EventArgs.Empty);
        }
Beispiel #12
0
        private void Initialize()
        {
            DefaultResponse = Gtk.ResponseType.Ok;
            AddStockButton (Stock.Cancel, ResponseType.Cancel);
            AddStockButton (Stock.Ok, ResponseType.Ok, true);

            int minimum_width, natural_width;
            GetPreferredWidth (out minimum_width, out natural_width);
            SetGeometryHints (this, new Gdk.Geometry () {
                    MinWidth = minimum_width,
                    MaxWidth = Gdk.Screen.Default.Width,
                    MinHeight = -1,
                    MaxHeight = -1
                }, Gdk.WindowHints.MaxSize | Gdk.WindowHints.MinSize);

            var table = new Table (2, 2, false) {
                RowSpacing = 12,
                ColumnSpacing = 6
            };

            table.Attach (new Label () {
                    Text = Catalog.GetString ("Station _Type:"),
                    UseUnderline = true,
                    Xalign = 0.0f
                }, 0, 1, 0, 1, AttachOptions.Fill, AttachOptions.Shrink, 0, 0);

            table.Attach (arg_label = new Label () {
                    Xalign = 0.0f
                }, 0, 1, 1, 2, AttachOptions.Fill, AttachOptions.Shrink, 0, 0);

            table.Attach (type_combo = new ComboBoxText (),
                1, 2, 0, 1, AttachOptions.Fill | AttachOptions.Expand, AttachOptions.Shrink, 0, 0);

            table.Attach (arg_entry = new Entry (),
                1, 2, 1, 2, AttachOptions.Fill | AttachOptions.Expand, AttachOptions.Shrink, 0, 0);

            VBox.PackStart (table, true, true, 0);
            VBox.Spacing = 12;
            VBox.ShowAll ();

            type_combo.Remove (0);
            int active_type = 0;
            int i = 0;
            foreach (StationType type in StationType.Types) {
                if (!type.SubscribersOnly || lastfm.Account.Subscriber) {
                    type_combo.AppendText (type.Label);
                    if (source != null && type == source.Type) {
                        active_type = i;
                    }
                    i++;
                }
            }

            type_combo.Changed += HandleTypeChanged;
            type_combo.Active = active_type;
            type_combo.GrabFocus ();
        }
Beispiel #13
0
        private void BuildSortCombo()
        {
            var combo = sort_combo = new ComboBoxText ();

            foreach (var sort in sorts) {
                combo.AppendText (sort.Name);
            }
            combo.Active = 0;

            PackStart (new Label (Catalog.GetString ("Sort by:")), false, false, 0);
            PackStart (combo, false, false, 0);
        }
Beispiel #14
0
        public AddinView()
        {
            var hbox = new HBox () { Spacing = 6 };

            var filter_label = new Label (Catalog.GetString ("Show:"));
            var filter_combo = new ComboBoxText ();
            filter_combo.AppendText (Catalog.GetString ("All"));
            filter_combo.AppendText (Catalog.GetString ("Enabled"));
            filter_combo.AppendText (Catalog.GetString ("Not Enabled"));
            filter_combo.Active = 0;

            var search_label = new Label (Catalog.GetString ("Search:"));
            var search_entry = new Banshee.Widgets.SearchEntry () {
                WidthRequest = 160,
                Visible = true,
                Ready = true
            };

            hbox.PackStart (filter_label, false, false, 0);
            hbox.PackStart (filter_combo, false, false, 0);
            hbox.PackEnd   (search_entry, false, false, 0);
            hbox.PackEnd   (search_label, false, false, 0);

            var model = new TreeStore (typeof(bool), typeof(bool), typeof (string), typeof (Addin));

            var addins = AddinManager.Registry.GetAddins ().Where (a => { return
                a.Name != a.Id && a.Description != null &&
                !String.IsNullOrEmpty (a.Description.Category) && !a.Description.Category.StartsWith ("required:") &&
                (!a.Description.Category.Contains ("Debug") || ApplicationContext.Debugging);
            });

            var categorized_addins = addins.GroupBy<Addin, string> (a => a.Description.Category)
                                           .Select (c => new {
                                                Addins = c.OrderBy (a => Catalog.GetString (a.Name)).ToList (),
                                                Name = c.Key,
                                                NameLocalized = Catalog.GetString (c.Key) })
                                           .OrderBy (c => c.NameLocalized)
                                           .ToList ();

            tree_view = new TreeView () {
                FixedHeightMode = false,
                HeadersVisible = false,
                SearchColumn = 1,
                RulesHint = true,
                Model = model
            };

            var update_model = new System.Action (() => {
                string search = search_entry.Query;
                bool? enabled = filter_combo.Active > 0 ? (bool?) (filter_combo.Active == 1 ? true : false) : null;
                model.Clear ();
                foreach (var cat in categorized_addins) {
                    var cat_iter = model.AppendValues (false, false, String.Format ("<b>{0}</b>", GLib.Markup.EscapeText (cat.NameLocalized)), null);
                    bool any = false;
                    foreach (var a in cat.Addins.Matching (search)) {
                        if (enabled == null || (a.Enabled == enabled.Value)) {
                            model.AppendValues (cat_iter, true,
                                a.Enabled,
                                String.Format (
                                    "<b>{0}</b>\n<small>{1}</small>",
                                    GLib.Markup.EscapeText (Catalog.GetString (a.Name)),
                                    GLib.Markup.EscapeText (Catalog.GetString (a.Description.Description))),
                                a
                            );
                            any = true;
                        }
                    }

                    if (!any) {
                        model.Remove (ref cat_iter);
                    }
                }
                tree_view.ExpandAll ();
            });

            var txt_cell = new CellRendererText () { WrapMode = Pango.WrapMode.Word };
            tree_view.AppendColumn ("Name", txt_cell , "markup", Columns.Name);

            var check_cell = new CellRendererToggle () { Activatable = true };
            tree_view.AppendColumn ("Enable", check_cell, "visible", Columns.IsAddin, "active", Columns.IsEnabled);
            check_cell.Toggled += (o, a) => {
                TreeIter iter;
                if (model.GetIter (out iter, new TreePath (a.Path))) {
                    var addin = model.GetValue (iter, 3) as Addin;
                    bool enabled = (bool) model.GetValue (iter, 1);
                    addin.Enabled = !enabled;
                    model.SetValue (iter, 1, addin.Enabled);
                    model.Foreach (delegate (ITreeModel current_model, TreePath path, TreeIter current_iter) {
                        var an = current_model.GetValue (current_iter, 3) as Addin;
                        if (an != null) {
                            current_model.SetValue (current_iter, 1, an.Enabled);
                        }
                        return false;
                    });
                }
            };

            update_model ();
            search_entry.Changed += (o, a) => update_model ();
            filter_combo.Changed += (o, a) => update_model ();

            var tree_scroll = new Hyena.Widgets.ScrolledWindow () {
                HscrollbarPolicy = PolicyType.Never
            };
            tree_scroll.AddWithFrame (tree_view);

            Spacing = 6;
            PackStart (hbox, false, false, 0);
            PackStart (tree_scroll, true, true, 0);
            ShowAll ();
            search_entry.GrabFocus ();

            txt_cell.WrapWidth = 300;
        }
Beispiel #15
0
		protected NoteRecentChanges (NoteManager manager)
: base (Catalog.GetString ("Search All Notes"))
		{
			this.manager = manager;
			this.IconName = "tomboy";
			this.DefaultWidth = 450;
			this.DefaultHeight = 400;
			this.current_matches = new Dictionary<string, int> ();
			this.Resizable = true;

			selected_tags = new Dictionary<Tag, Tag> ();

			AddAccelGroup (Tomboy.ActionManager.UI.AccelGroup);

			menu_bar = CreateMenuBar ();

			Gtk.Label label = new Gtk.Label (Catalog.GetString ("_Search:"));
			label.Xalign = 0.0f;

			find_combo = Gtk.ComboBoxText.NewWithEntry ();
			label.MnemonicWidget = find_combo;
			find_combo.Changed += OnEntryChanged;
			find_combo.Entry.ActivatesDefault = false;
			find_combo.Entry.Activated += OnEntryActivated;
			if (previous_searches != null) {
				foreach (string prev in previous_searches) {
					find_combo.AppendText (prev);
				}
			}

			clear_search_button = new Gtk.Button (new Gtk.Image (Gtk.Stock.Clear,
							      Gtk.IconSize.Menu));
			clear_search_button.Sensitive = false;
			clear_search_button.Clicked += ClearSearchClicked;
			clear_search_button.Show ();

			Gtk.Table table = new Gtk.Table (1, 3, false);
			table.Attach (label, 0, 1, 0, 1,
			              Gtk.AttachOptions.Fill,
			              Gtk.AttachOptions.Expand | Gtk.AttachOptions.Fill,
			              0, 0);
			table.Attach (find_combo, 1, 2, 0, 1,
			              Gtk.AttachOptions.Expand | Gtk.AttachOptions.Fill,
			              Gtk.AttachOptions.Expand | Gtk.AttachOptions.Fill,
			              0, 0);
			table.Attach (clear_search_button,
				      2, 3, 0, 1,
			              Gtk.AttachOptions.Fill,
			              Gtk.AttachOptions.Expand | Gtk.AttachOptions.Fill,
			              0, 0);
			table.ColumnSpacing = 4;
			table.ShowAll ();

			Gtk.HBox hbox = new Gtk.HBox (false, 0);
			hbox.PackStart (table, true, true, 0);
			hbox.ShowAll ();

			// Notebooks Pane
			Gtk.Widget notebooksPane = MakeNotebooksPane ();
			notebooksPane.Show ();

			MakeRecentTree ();
			tree.Show ();

			status_bar = new Gtk.Statusbar ();

			// TODO: fix BUG 585479
			//status_bar.HasResizeGrip = true;
			status_bar.Show ();

			// Update on changes to notes
			manager.NoteDeleted += OnNotesDeleted;
			manager.NoteAdded += OnNotesChanged;
			manager.NoteRenamed += OnNoteRenamed;
			manager.NoteSaved += OnNoteSaved;

			// List all the current notes
			UpdateResults ();

			matches_window = new Gtk.ScrolledWindow ();
			matches_window.ShadowType = Gtk.ShadowType.In;

			matches_window.HscrollbarPolicy = Gtk.PolicyType.Automatic;
			matches_window.VscrollbarPolicy = Gtk.PolicyType.Automatic;
			matches_window.Add (tree);
			matches_window.Show ();

			hpaned = new Gtk.HPaned ();
			hpaned.Position = 150;
			hpaned.Add1 (notebooksPane);
			hpaned.Add2 (matches_window);
			hpaned.Show ();

			RestorePosition ();

			Gtk.VBox vbox = new Gtk.VBox (false, 8);
			vbox.BorderWidth = 6;
			vbox.PackStart (hbox, false, false, 4);
			vbox.PackStart (hpaned, true, true, 0);
			vbox.PackStart (status_bar, false, false, 0);
			vbox.Show ();

			// Use another VBox to place the MenuBar
			// right at thetop of the window.
			content_vbox = new Gtk.VBox (false, 0);
#if !MAC
			content_vbox.PackStart (menu_bar, false, false, 0);
#endif
			content_vbox.PackStart (vbox, true, true, 0);
			content_vbox.Show ();

			this.Add (content_vbox);
			this.DeleteEvent += OnDelete;
			this.KeyPressEvent += OnKeyPressed; // For Escape

			// Watch when notes are added to notebooks so the search
			// results will be updated immediately instead of waiting
			// until the note's QueueSave () kicks in.
			Notebooks.NotebookManager.NoteAddedToNotebook += OnNoteAddedToNotebook;
			Notebooks.NotebookManager.NoteRemovedFromNotebook += OnNoteRemovedFromNotebook;
			
			// Set the focus chain for the top-most containers Bug #512175
			Gtk.Widget[] vbox_focus = new Gtk.Widget[2];
			vbox_focus[0] = hbox;
			vbox_focus[1] = hpaned;
			vbox.FocusChain = vbox_focus;

			// Set focus chain for sub widgits of first top-most container
			Gtk.Widget[] table_focus = new Gtk.Widget[2];
			table_focus[0] = find_combo;
			table_focus[1] = matches_window;
			hbox.FocusChain = table_focus;
			
			// set focus chain for sub widgits of seconf top-most container
			Gtk.Widget[] hpaned_focus = new Gtk.Widget[2];
			hpaned_focus[0] = matches_window;
			hpaned_focus[1] = notebooksPane;
			hpaned.FocusChain = hpaned_focus;
			
			// get back to the beginning of the focus chain
			Gtk.Widget[] scroll_right = new Gtk.Widget[1];
			scroll_right[0] = tree;
			matches_window.FocusChain = scroll_right;
			
			Tomboy.ExitingEvent += OnExitingEvent;
		}
        public void InitializeDialog()
        {
            FillGenreList ();

            AccelGroup accel_group = new AccelGroup ();
            AddAccelGroup (accel_group);

            Title = String.Empty;
            SkipTaskbarHint = true;

            BorderWidth = 6;
            DefaultResponse = ResponseType.Ok;

            ContentArea.Spacing = 6;

            HBox split_box = new HBox ();
            split_box.Spacing = 12;
            split_box.BorderWidth = 6;

            Image image = new Image ();
            image.IconSize = (int)IconSize.Dialog;
            image.IconName = "radio";
            image.Yalign = 0.0f;
            image.Show ();

            VBox main_box = new VBox ();
            main_box.BorderWidth = 5;
            main_box.Spacing = 10;

            Label header = new Label ();
            header.Text = String.Format (AddinManager.CurrentLocalizer.GetString ("{0}Radiostation fetcher{1}\n({2})"),
                "<span weight=\"bold\" size=\"larger\">", "</span>",source_name);
            header.Xalign = 0.0f;
            header.Yalign = 0.0f;
            header.UseMarkup = true;
            header.Wrap = true;
            header.Show ();

            Label message = new Label ();
            message.Text = AddinManager.CurrentLocalizer.GetString ("Choose a genre or enter a text that you wish to be queried, " +
                "then press the Get stations button. Found stations will be added to internet-radio source.");
            message.Xalign = 0.0f;
            message.Wrap = true;
            message.Show ();

            table = new Table (5, 2, false);
            table.RowSpacing = 6;
            table.ColumnSpacing = 6;

            genre_entry = new ComboBoxText ();
            freeText_entry = new Entry ();

            genre_button = new Button (AddinManager.CurrentLocalizer.GetString ("Get stations"));
            freeText_button = new Button (AddinManager.CurrentLocalizer.GetString ("Get stations"));

            genre_button.CanDefault = true;
            genre_button.UseStock = true;
            genre_button.Clicked += OnGenreQueryButtonClick;
            genre_button.Show ();

            freeText_button.CanDefault = true;
            freeText_button.UseStock = true;
            freeText_button.Clicked += OnFreetextQueryButtonClick;
            freeText_button.Show ();

            foreach (string genre in genre_list) {
                if (!String.IsNullOrEmpty (genre))
                    genre_entry.AppendText (genre);
            }

            if (this is IGenreSearchable) {
                AddRow (AddinManager.CurrentLocalizer.GetString ("Query by genre:"), genre_entry, genre_button);
            }

            if (this is IFreetextSearchable) {
                AddRow (AddinManager.CurrentLocalizer.GetString ("Query by free text:"), freeText_entry, freeText_button);
            }

            table.ShowAll ();

            main_box.PackStart (header, false, false, 0);
            main_box.PackStart (message, false, false, 0);
            main_box.PackStart (table, false, false, 0);
            main_box.Show ();

            split_box.PackStart (image, false, false, 0);
            split_box.PackStart (main_box, true, true, 0);
            split_box.Show ();

            ContentArea.PackStart (split_box, true, true, 0);

            close_button = new Button ();
            close_button.Image = new Image ("gtk-close", IconSize.Button);
            close_button.Label = AddinManager.CurrentLocalizer.GetString ("_Close");
            close_button.CanDefault = true;
            close_button.UseStock = true;
            close_button.Show ();
            AddActionWidget (close_button, ResponseType.Close);

            close_button.AddAccelerator ("activate", accel_group, (uint)Gdk.Key.Escape,
                0, Gtk.AccelFlags.Visible);

            close_button.Clicked += OnCloseButtonClick;

            statusbar = new Statusbar ();
            SetStatusBarMessage (source_name);
            main_box.PackEnd (statusbar, false, false, 0);
        }
        public static new ComboBoxText NewWithEntry()
        {
            ComboBoxText result = new ComboBoxText(gtk_combo_box_text_new_with_entry());

            return(result);
        }
Beispiel #18
0
        private HBox BuildMatchHeader()
        {
            HBox header = new HBox ();
            header.Show ();

            terms_enabled_checkbox = new CheckButton (Catalog.GetString ("_Match"));
            terms_enabled_checkbox.Show ();
            terms_enabled_checkbox.Active = true;
            terms_enabled_checkbox.Toggled += OnMatchCheckBoxToggled;
            header.PackStart (terms_enabled_checkbox, false, false, 0);

            terms_logic_combo = new ComboBoxText ();
            terms_logic_combo.AppendText (Catalog.GetString ("all"));
            terms_logic_combo.AppendText (Catalog.GetString ("any"));
            terms_logic_combo.Show ();
            terms_logic_combo.Active = 0;
            header.PackStart (terms_logic_combo, false, false, 0);

            terms_label = new Label (Catalog.GetString ("of the following:"));
            terms_label.Show ();
            terms_label.Xalign = 0.0f;
            header.PackStart (terms_label, true, true, 0);

            header.Spacing = 5;

            return header;
        }
Beispiel #19
0
        private void Initialize()
        {
            DefaultResponse = Gtk.ResponseType.Ok;
            AddStockButton(Stock.Cancel, ResponseType.Cancel);
            AddStockButton(Stock.Ok, ResponseType.Ok, true);

            int minimum_width, natural_width;

            GetPreferredWidth(out minimum_width, out natural_width);
            SetGeometryHints(this, new Gdk.Geometry()
            {
                MinWidth  = minimum_width,
                MaxWidth  = Gdk.Screen.Default.Width,
                MinHeight = -1,
                MaxHeight = -1
            }, Gdk.WindowHints.MaxSize | Gdk.WindowHints.MinSize);

            var table = new Table(2, 2, false)
            {
                RowSpacing    = 12,
                ColumnSpacing = 6
            };

            table.Attach(new Label()
            {
                Text         = Catalog.GetString("Station _Type:"),
                UseUnderline = true,
                Xalign       = 0.0f
            }, 0, 1, 0, 1, AttachOptions.Fill, AttachOptions.Shrink, 0, 0);

            table.Attach(arg_label = new Label()
            {
                Xalign = 0.0f
            }, 0, 1, 1, 2, AttachOptions.Fill, AttachOptions.Shrink, 0, 0);

            table.Attach(type_combo = new ComboBoxText(),
                         1, 2, 0, 1, AttachOptions.Fill | AttachOptions.Expand, AttachOptions.Shrink, 0, 0);

            table.Attach(arg_entry = new Entry(),
                         1, 2, 1, 2, AttachOptions.Fill | AttachOptions.Expand, AttachOptions.Shrink, 0, 0);

            VBox.PackStart(table, true, true, 0);
            VBox.Spacing = 12;
            VBox.ShowAll();

            type_combo.Remove(0);
            int active_type = 0;
            int i           = 0;

            foreach (StationType type in StationType.Types)
            {
                if (!type.SubscribersOnly || lastfm.Account.Subscriber)
                {
                    type_combo.AppendText(type.Label);
                    if (source != null && type == source.Type)
                    {
                        active_type = i;
                    }
                    i++;
                }
            }

            type_combo.Changed += HandleTypeChanged;
            type_combo.Active   = active_type;
            type_combo.GrabFocus();
        }
Beispiel #20
0
 private void InitializeGtkObjects(Gtk.Builder b) {
   m_adjustmentAudioPaddingAfter = (Gtk.Adjustment) b.GetObject("adjustment_audio_padding_after");
   m_adjustmentAudioPaddingBefore = (Gtk.Adjustment) b.GetObject("adjustment_audio_padding_before");
   m_adjustmentMaxImageHeight = (Gtk.Adjustment) b.GetObject("adjustment_max_image_height");
   m_adjustmentMaxImageWidth = (Gtk.Adjustment) b.GetObject("adjustment_max_image_width");
   m_episodeAdjustment = (Gtk.Adjustment) b.GetObject("episode_adjustment");
   m_image1 = (Gtk.Image) b.GetObject("image1");
   m_liststoreImageRescaleOptions = (Gtk.ListStore) b.GetObject("liststore_image_rescale_options");
   m_liststoreLanguages = (Gtk.ListStore) b.GetObject("liststore_languages");
   m_liststoreLines = (Gtk.ListStore) b.GetObject("liststore_lines");
   m_previewWindow = (Gtk.Window) b.GetObject("preview_window");
   m_box5 = (Gtk.Box) b.GetObject("box5");
   m_toolbarPreview = (Gtk.Toolbar) b.GetObject("toolbar_preview");
   m_toolbuttonGo = (Gtk.ToolButton) b.GetObject("toolbutton_go");
   m_toolbuttonRefresh = (Gtk.ToolButton) b.GetObject("toolbutton_refresh");
   m_toolbuttonSeparator1 = (Gtk.SeparatorToolItem) b.GetObject("toolbutton_separator1");
   m_toolbuttonSelectAll = (Gtk.ToolButton) b.GetObject("toolbutton_select_all");
   m_toolbuttonSelectNone = (Gtk.ToolButton) b.GetObject("toolbutton_select_none");
   m_toolbuttonInvert = (Gtk.ToolButton) b.GetObject("toolbutton_invert");
   m_toolbuttonSeparator2 = (Gtk.SeparatorToolItem) b.GetObject("toolbutton_separator2");
   m_toolbuttonToggleActivation = (Gtk.ToolButton) b.GetObject("toolbutton_toggle_activation");
   m_toolbuttonMerge = (Gtk.ToolButton) b.GetObject("toolbutton_merge");
   m_scrolledwindow1 = (Gtk.ScrolledWindow) b.GetObject("scrolledwindow1");
   m_treeviewLines = (Gtk.TreeView) b.GetObject("treeview_lines");
   m_treeviewSelectionLines = (Gtk.TreeSelection) b.GetObject("treeview-selection_lines");
   m_treeviewcolumnTargetLanguage = (Gtk.TreeViewColumn) b.GetObject("treeviewcolumn_target_language");
   m_cellrenderertextTargetLanguage = (Gtk.CellRendererText) b.GetObject("cellrenderertext_target_language");
   m_treeviewcolumnNativeLanguage = (Gtk.TreeViewColumn) b.GetObject("treeviewcolumn_native_language");
   m_cellrenderertextNativeLanguage = (Gtk.CellRendererText) b.GetObject("cellrenderertext_native_language");
   m_treeviewcolumnActors = (Gtk.TreeViewColumn) b.GetObject("treeviewcolumn_actors");
   m_cellrenderertextActors = (Gtk.CellRendererText) b.GetObject("cellrenderertext_actors");
   m_treeviewcolumnStart = (Gtk.TreeViewColumn) b.GetObject("treeviewcolumn_start");
   m_cellrendertextStart = (Gtk.CellRendererText) b.GetObject("cellrendertext_start");
   m_cellrendertextDuration = (Gtk.CellRendererText) b.GetObject("cellrendertext_duration");
   m_frame10 = (Gtk.Frame) b.GetObject("frame10");
   m_alignment10 = (Gtk.Alignment) b.GetObject("alignment10");
   m_grid4 = (Gtk.Grid) b.GetObject("grid4");
   m_buttonReplaceInSub2 = (Gtk.Button) b.GetObject("button_replace_in_sub2");
   m_buttonSelectLinesBySearch = (Gtk.Button) b.GetObject("button_select_lines_by_search");
   m_buttonReplaceInSub1 = (Gtk.Button) b.GetObject("button_replace_in_sub1");
   m_entryLinesSearch = (Gtk.Entry) b.GetObject("entry_lines_search");
   m_entryReplaceRegexTo = (Gtk.Entry) b.GetObject("entry_replace_regex_to");
   m_entryReplaceRegexFrom = (Gtk.Entry) b.GetObject("entry_replace_regex_from");
   m_label5 = (Gtk.Label) b.GetObject("label5");
   m_label17 = (Gtk.Label) b.GetObject("label17");
   m_labelNumCardsSelected = (Gtk.Label) b.GetObject("label_num_cards_selected");
   m_frame11 = (Gtk.Frame) b.GetObject("frame11");
   m_alignment11 = (Gtk.Alignment) b.GetObject("alignment11");
   m_box7 = (Gtk.Box) b.GetObject("box7");
   m_frame12 = (Gtk.Frame) b.GetObject("frame12");
   m_box11 = (Gtk.Box) b.GetObject("box11");
   m_eventboxImagePreview = (Gtk.EventBox) b.GetObject("eventbox_image_preview");
   m_imagePreview = (Gtk.Image) b.GetObject("image_preview");
   m_buttonPlayContent = (Gtk.Button) b.GetObject("button_play_content");
   m_label23 = (Gtk.Label) b.GetObject("label23");
   m_frame13 = (Gtk.Frame) b.GetObject("frame13");
   m_box12 = (Gtk.Box) b.GetObject("box12");
   m_scrolledwindow2 = (Gtk.ScrolledWindow) b.GetObject("scrolledwindow2");
   m_textviewTargetLanguage = (Gtk.TextView) b.GetObject("textview_target_language");
   m_scrolledwindow3 = (Gtk.ScrolledWindow) b.GetObject("scrolledwindow3");
   m_textviewNativeLanguage = (Gtk.TextView) b.GetObject("textview_native_language");
   m_label24 = (Gtk.Label) b.GetObject("label24");
   m_label22 = (Gtk.Label) b.GetObject("label22");
   m_liststoreSubEncoding = (Gtk.ListStore) b.GetObject("liststore_sub_encoding");
   m_liststoreSubStreams = (Gtk.ListStore) b.GetObject("liststore_sub_streams");
   m_subtitleOptionsWindow = (Gtk.Window) b.GetObject("subtitle_options_window");
   m_box13 = (Gtk.Box) b.GetObject("box13");
   m_frame14 = (Gtk.Frame) b.GetObject("frame14");
   m_comboboxSubEncoding = (Gtk.ComboBox) b.GetObject("combobox_sub_encoding");
   m_cellrenderertextSubEncoding = (Gtk.CellRendererText) b.GetObject("cellrenderertext_sub_encoding");
   m_label3 = (Gtk.Label) b.GetObject("label3");
   m_frame15 = (Gtk.Frame) b.GetObject("frame15");
   m_comboboxSubStream = (Gtk.ComboBox) b.GetObject("combobox_sub_stream");
   m_cellrendertextSubStreams = (Gtk.CellRendererText) b.GetObject("cellrendertext_sub_streams");
   m_label4 = (Gtk.Label) b.GetObject("label4");
   m_buttonSubOptionsApply = (Gtk.Button) b.GetObject("button_sub_options_apply");
   m_numericalAdjustmentSub1 = (Gtk.Adjustment) b.GetObject("numerical_adjustment_sub1");
   m_numericalAdjustmentSub2 = (Gtk.Adjustment) b.GetObject("numerical_adjustment_sub2");
   m_mainWindow = (Gtk.Window) b.GetObject("main_window");
   m_box1 = (Gtk.Box) b.GetObject("box1");
   m_menubar1 = (Gtk.MenuBar) b.GetObject("menubar1");
   m_menuitem1 = (Gtk.MenuItem) b.GetObject("menuitem1");
   m_menu1 = (Gtk.Menu) b.GetObject("menu1");
   m_imagemenuitemNew = (Gtk.ImageMenuItem) b.GetObject("imagemenuitem_new");
   m_imagemenuitemOpen = (Gtk.ImageMenuItem) b.GetObject("imagemenuitem_open");
   m_imagemenuitemSave = (Gtk.ImageMenuItem) b.GetObject("imagemenuitem_save");
   m_imagemenuitemSaveAs = (Gtk.ImageMenuItem) b.GetObject("imagemenuitem_save_as");
   m_separatormenuitem1 = (Gtk.SeparatorMenuItem) b.GetObject("separatormenuitem1");
   m_imagemenuitemClose = (Gtk.ImageMenuItem) b.GetObject("imagemenuitem_close");
   m_menuitem3 = (Gtk.MenuItem) b.GetObject("menuitem3");
   m_menu3 = (Gtk.Menu) b.GetObject("menu3");
   m_imagemenuitem10 = (Gtk.ImageMenuItem) b.GetObject("imagemenuitem10");
   m_infobar1 = (Gtk.InfoBar) b.GetObject("infobar1");
   m_infobarActionArea = (Gtk.ButtonBox) b.GetObject("infobar-action_area");
   m_infobarContentArea = (Gtk.Box) b.GetObject("infobar-content_area");
   m_labelInInfobar = (Gtk.Label) b.GetObject("label_in_infobar");
   m_box2 = (Gtk.Box) b.GetObject("box2");
   m_frame1 = (Gtk.Frame) b.GetObject("frame1");
   m_alignment1 = (Gtk.Alignment) b.GetObject("alignment1");
   m_grid1 = (Gtk.Grid) b.GetObject("grid1");
   m_entryTargetLanguage = (Gtk.Entry) b.GetObject("entry_target_language");
   m_entryOutputDirectory = (Gtk.Entry) b.GetObject("entry_output_directory");
   m_entryNativeLanguage = (Gtk.Entry) b.GetObject("entry_native_language");
   m_entryVideoFile = (Gtk.Entry) b.GetObject("entry_video_file");
   m_buttonTargetLanguageChoose = (Gtk.Button) b.GetObject("button_target_language_choose");
   m_buttonDirectoryChoose = (Gtk.Button) b.GetObject("button_directory_choose");
   m_buttonNativeLanguageChoose = (Gtk.Button) b.GetObject("button_native_language_choose");
   m_buttonVideoFileChoose = (Gtk.Button) b.GetObject("button_video_file_choose");
   m_buttonTargetLanguageOptions = (Gtk.Button) b.GetObject("button_target_language_options");
   m_buttonNativeLanguageOptions = (Gtk.Button) b.GetObject("button_native_language_options");
   m_buttonVideoOptions = (Gtk.Button) b.GetObject("button_video_options");
   m_buttonAudioChoose = (Gtk.Button) b.GetObject("button_audio_choose");
   m_entryAudioFile = (Gtk.Entry) b.GetObject("entry_audio_file");
   m_label1 = (Gtk.Label) b.GetObject("label1");
   m_frame2 = (Gtk.Frame) b.GetObject("frame2");
   m_alignment2 = (Gtk.Alignment) b.GetObject("alignment2");
   m_grid5 = (Gtk.Grid) b.GetObject("grid5");
   m_expanderSubtitleOptions = (Gtk.Expander) b.GetObject("expander_subtitle_options");
   m_box9 = (Gtk.Box) b.GetObject("box9");
   m_frame4 = (Gtk.Frame) b.GetObject("frame4");
   m_alignment4 = (Gtk.Alignment) b.GetObject("alignment4");
   m_grid2 = (Gtk.Grid) b.GetObject("grid2");
   m_label8 = (Gtk.Label) b.GetObject("label8");
   m_label9 = (Gtk.Label) b.GetObject("label9");
   m_comboboxtextCorrectTimingsModeSub1 = (Gtk.ComboBoxText) b.GetObject("comboboxtext_correct_timings_mode_sub1");
   m_spinbuttonSub1TimeShift = (Gtk.SpinButton) b.GetObject("spinbutton_sub1_time_shift");
   m_label6 = (Gtk.Label) b.GetObject("label6");
   m_frame5 = (Gtk.Frame) b.GetObject("frame5");
   m_alignment5 = (Gtk.Alignment) b.GetObject("alignment5");
   m_grid3 = (Gtk.Grid) b.GetObject("grid3");
   m_label7 = (Gtk.Label) b.GetObject("label7");
   m_label10 = (Gtk.Label) b.GetObject("label10");
   m_comboboxtextCorrectTimingsModeSub2 = (Gtk.ComboBoxText) b.GetObject("comboboxtext_correct_timings_mode_sub2");
   m_spinbuttonSub2TimeShift = (Gtk.SpinButton) b.GetObject("spinbutton_sub2_time_shift");
   m_label12 = (Gtk.Label) b.GetObject("label12");
   m_frame3 = (Gtk.Frame) b.GetObject("frame3");
   m_alignment3 = (Gtk.Alignment) b.GetObject("alignment3");
   m_box3 = (Gtk.Box) b.GetObject("box3");
   m_checkbuttonUseSub1Timings = (Gtk.CheckButton) b.GetObject("checkbutton_use_sub1_timings");
   m_checkbuttonUseSub2Timings = (Gtk.CheckButton) b.GetObject("checkbutton_use_sub2_timings");
   m_label11 = (Gtk.Label) b.GetObject("label11");
   m_label20 = (Gtk.Label) b.GetObject("label20");
   m_expanderAudioOptions = (Gtk.Expander) b.GetObject("expander_audio_options");
   m_box15 = (Gtk.Box) b.GetObject("box15");
   m_frame17 = (Gtk.Frame) b.GetObject("frame17");
   m_alignment14 = (Gtk.Alignment) b.GetObject("alignment14");
   m_box16 = (Gtk.Box) b.GetObject("box16");
   m_checkbuttonNormalizeAudio = (Gtk.CheckButton) b.GetObject("checkbutton_normalize_audio");
   m_checkbuttonDeactivateAudioClips = (Gtk.CheckButton) b.GetObject("checkbutton_deactivate_audio_clips");
   m_label26 = (Gtk.Label) b.GetObject("label26");
   m_frame16 = (Gtk.Frame) b.GetObject("frame16");
   m_alignment13 = (Gtk.Alignment) b.GetObject("alignment13");
   m_grid6 = (Gtk.Grid) b.GetObject("grid6");
   m_label28 = (Gtk.Label) b.GetObject("label28");
   m_label29 = (Gtk.Label) b.GetObject("label29");
   m_spinbuttonAudioPaddingBefore = (Gtk.SpinButton) b.GetObject("spinbutton_audio_padding_before");
   m_spinbuttonAudioPaddingAfter = (Gtk.SpinButton) b.GetObject("spinbutton_audio_padding_after");
   m_label27 = (Gtk.Label) b.GetObject("label27");
   m_label53 = (Gtk.Label) b.GetObject("label53");
   m_expanderImageOptions = (Gtk.Expander) b.GetObject("expander_image_options");
   m_box17 = (Gtk.Box) b.GetObject("box17");
   m_frame19 = (Gtk.Frame) b.GetObject("frame19");
   m_alignment16 = (Gtk.Alignment) b.GetObject("alignment16");
   m_spinbuttonMaxImageWidth = (Gtk.SpinButton) b.GetObject("spinbutton_max_image_width");
   m_spinbuttonMaxImageHeight = (Gtk.SpinButton) b.GetObject("spinbutton_max_image_height");
   m_comboboxtextRescaleMode = (Gtk.ComboBox) b.GetObject("comboboxtext_rescale_mode");
   m_label13 = (Gtk.Label) b.GetObject("label13");
   m_label2 = (Gtk.Label) b.GetObject("label2");
   m_frame7 = (Gtk.Frame) b.GetObject("frame7");
   m_alignment7 = (Gtk.Alignment) b.GetObject("alignment7");
   m_label16 = (Gtk.Label) b.GetObject("label16");
   m_spinbuttonEpisodeNumber = (Gtk.SpinButton) b.GetObject("spinbutton_episode_number");
   m_entryDeckName = (Gtk.Entry) b.GetObject("entry_deck_name");
   m_label15 = (Gtk.Label) b.GetObject("label15");
   m_buttonPreview = (Gtk.Button) b.GetObject("button_preview");
   m_label18 = (Gtk.Label) b.GetObject("label18");
   m_label19 = (Gtk.Label) b.GetObject("label19");
   m_comboboxTargetLanguage = (Gtk.ComboBox) b.GetObject("combobox_target_language");
   m_label14 = (Gtk.Label) b.GetObject("label14");
   m_windowProgressInfo = (Gtk.Window) b.GetObject("window_progress_info");
   m_alignment12 = (Gtk.Alignment) b.GetObject("alignment12");
   m_box14 = (Gtk.Box) b.GetObject("box14");
   m_progressbarProgressInfo = (Gtk.ProgressBar) b.GetObject("progressbar_progress_info");
   m_buttonCancelOperation = (Gtk.Button) b.GetObject("button_cancel_operation");
 }
		static ComboBox Create_ComboBox (string [] strings)
		{
			/*Menu menu = new Menu ();

			MenuItem menu_item = null;

			foreach (string str in strings) {
				menu_item = new MenuItem (str);
				menu_item.Show ();
				menu.Append (menu_item);
			}

			OptionMenu option_menu = new OptionMenu ();
			option_menu.Menu = menu;

			return option_menu;*/
			ComboBoxText combo_box = new ComboBoxText ();
			foreach (string str in strings) {
				combo_box.AppendText (str);
			}
			
			return combo_box;
		}