Esempio n. 1
0
        public TagWindow()
            : base(WindowType.Toplevel)
        {
            Tags = new ArrayList();

            Title = "Manage your tags";
            BorderWidth = 5;
            DeleteEvent += OnClose;
            Resizable = false;

            vbox = new VBox();
            vbox.Spacing = 6;
            Add(vbox);

            table = new Table(2, 2, false);
            table.RowSpacing = 6;
            vbox.PackStart(table, false, false, 0);

            bbox = new HButtonBox();
            bbox.Layout = ButtonBoxStyle.End;

            AddTagsCombobox();
            AddFeedTreeView();
            AddButtons();
            vbox.PackStart(bbox, false, false, 0);

            Database.FeedChanged += OnFeedChanged;
        }
        public FeedPropertiesDialog(ISource f)
            : base(WindowType.Toplevel)
        {
            feed = f;

            Title = "\""+feed.Name+"\" Properties";
            Icon = feed.Favicon;
            BorderWidth = 5;
            DeleteEvent += OnClose;

            vbox = new VBox();
            vbox.Spacing = 6;
            Add(vbox);

            notebook = new Notebook();
            vbox.PackStart(notebook, false, false, 0);

            bbox = new HButtonBox();
            bbox.Layout = ButtonBoxStyle.End;
            vbox.PackStart(bbox, false, false, 0);

            AddGeneralTab();
            AddTagsTab();
            AddCloseButton();
        }
Esempio n. 3
0
        public ConfigDialog()
            : base(WindowType.Toplevel)
        {
            Title = "Summa Preferences";
            BorderWidth = 5;
            DeleteEvent += OnClose;

            vbox = new VBox();
            vbox.Spacing = 6;
            Add(vbox);

            notebook = new Notebook();
            vbox.PackStart(notebook, false, false, 0);

            bbox = new HButtonBox();
            bbox.Layout = ButtonBoxStyle.End;
            vbox.PackStart(bbox, false, false, 0);

            AddGeneralTab();
            AddStatusIconTab();
            AddCloseButton();
        }
Esempio n. 4
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");
 }
        public DeleteConfirmationDialog(ISource delfeed)
            : base(WindowType.Toplevel)
        {
            feed = delfeed;

            Title = "Delete feed?";
            IconName = "edit-delete";

            DeleteEvent += OnCancel;

            Resizable = false;
            BorderWidth = 6;

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

            vbox.PackStart(hbox);

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

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

            label = new Label();
            label.Wrap = true;
            label.Markup = "<b><big>Delete feed "+feed.Name+"?</big></b>";
            table.Attach(label, 1, 2, 0, 1);

            warn_label = new Label();
            warn_label.Wrap = true;
            warn_label.Markup = "This cannot be undone.";
            warn_label.SetAlignment(0.0F, 0.5F);
            table.Attach(warn_label, 1, 2, 1, 2);

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

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

            delete_button = new Button(Stock.Delete);
            delete_button.Clicked += new EventHandler(OnDelete);
            bbox.PackEnd(delete_button);
        }
Esempio n. 6
0
        private void BuildInterface()
        {
            VBox usersPane = new VBox ();
            VBox photosPane = new VBox ();
            HBox panes = new HBox ();

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            #region Event Handlers Setup
            this.DeleteEvent += new DeleteEventHandler (OnDelete);
            usersView.CursorChanged += new EventHandler (UsersViewCursorChanged);
            addPhotoButton.Clicked += new EventHandler (AddPhotoButtonClicked);
            #endregion
        }
Esempio n. 7
0
        public EqualizerWindow(Window parent)
            : base(Catalog.GetString ("Equalizer"))
        {
            if (instance == null) {
                instance = this;
            }

            TransientFor = parent;
            WindowPosition = WindowPosition.CenterOnParent;
            TypeHint = Gdk.WindowTypeHint.Dialog;
            SkipPagerHint = true;
            SkipTaskbarHint = true;

            SetDefaultSize (-1, 230);

            VBox box = new VBox ();
            header_box = new HBox ();
            header_box.BorderWidth = 4;
            header_box.Spacing = 2;

            box.PackStart (header_box, false, false, 0);
            box.PackStart (new HSeparator (), false, false, 0);

            eq_view = new EqualizerView ();
            eq_view.BorderWidth = 10;
            eq_view.SetSizeRequest (-1, 110);
            eq_view.Frequencies = ((IEqualizer)ServiceManager.PlayerEngine.ActiveEngine).EqualizerFrequencies;
            eq_view.Show ();

            eq_enabled_checkbox = new CheckButton (Catalog.GetString ("Enabled"));

            eq_preset_combo = new EqualizerPresetComboBox ();
            eq_preset_combo.Changed += OnPresetChanged;
            eq_preset_combo.Show ();

            Button new_preset_button = new Button (new Image (Stock.Add, IconSize.Button));
            new_preset_button.Relief = ReliefStyle.None;
            new_preset_button.Clicked += OnNewPreset;

            delete_preset_button = new Button (new Image (Stock.Remove, IconSize.Button));
            delete_preset_button.Relief = ReliefStyle.None;
            delete_preset_button.Clicked += OnDeletePreset;

            VBox combo_box = new VBox ();
            combo_box.PackStart (eq_preset_combo, true, false, 0);

            header_box.PackStart (combo_box, false, false, 0);
            header_box.PackStart (new_preset_button, false, false, 0);
            header_box.PackStart (delete_preset_button, false, false, 0);
            header_box.PackEnd (eq_enabled_checkbox, false, false, 0);

            box.PackStart (eq_view, true, true, 0);

            var button_box = new ButtonBox (Orientation.Horizontal);
            button_box.Layout = ButtonBoxStyle.End;
            button_box.BorderWidth = 12;
            var button = new Button (Stock.Close) { UseStock = true };
            button.Clicked += delegate { Destroy (); };
            button_box.Add (button);
            box.PackEnd (button_box, false, true, 0);

            eq_enabled_checkbox.Active = EqualizerManager.Instance.IsActive;
            eq_enabled_checkbox.Clicked += OnEnableDisable;
            eq_preset_combo.ActiveEqualizer = EqualizerManager.Instance.SelectedEqualizer;

            int minimum_height, natural_height;
            GetPreferredHeight (out minimum_height, out natural_height);
            Gdk.Geometry limits = new Gdk.Geometry ();
            limits.MinWidth = -1;
            limits.MaxWidth = -1;
            limits.MinHeight = minimum_height;
            limits.MaxHeight = Gdk.Screen.Default.Height;
            SetGeometryHints (this, limits, Gdk.WindowHints.MaxSize);

            KeyPressEvent += OnKeyPress;

            Add (box);
            box.ShowAll ();
        }