Example #1
0
 protected void SetupMainView()
 {
     main_view = new TrackListView();
     main_view.HeaderVisible = true;
     main_expander           = CreateScrollableExpander(main_view);
     main_expander.Expanded  = ClutterFlowSchemas.ExpandTrackList.Get();
 }
Example #2
0
        static public bool NewVersionAvailable(Version currentVersion, Version latestVersion,
                                               string downloadURL, string changeLog, Widget parent = null)
        {
            string message = string.Format(
                Catalog.GetString("Version {0} is available!\n" +
                                  "(You are using version {1})\n" +
                                  "<a href=\"{2}\">Click here to get it.</a>"),
                latestVersion, currentVersion, downloadURL);

            bool checkState = false;

            PopupMessage(parent, MessageType.Info, message, (dialog) => {
                dialog.Title = Catalog.GetString("New version available");
                VBox vbox    = dialog.MessageDialogGetMessageArea();

                var expander = new Gtk.Expander(Catalog.GetString("Changes:"));
                expander.Add(new Label(changeLog));
                vbox.Add(expander);

                var check      = new CheckButton(Catalog.GetString("Do not notify me again until next version"));
                check.Toggled += delegate {
                    checkState = check.Active;
                };
                vbox.Add(check);

                vbox.ShowAll();
            });

            return(checkState);
        }
Example #3
0
		public Category (Tiles.TileGroupInfo info, int columns)
		{
			WidgetFlags |= WidgetFlags.NoWindow;

			header = new Gtk.HBox (false, 0);

			headerExpander = new Gtk.Expander ("<big><b>" + GLib.Markup.EscapeText (info.Name) + "</b></big>");
			((Gtk.Label) headerExpander.LabelWidget).SetAlignment (0.0f, 0.5f);
			headerExpander.UseMarkup = true;
			headerExpander.UseUnderline = true;
			headerExpander.Show ();
			header.PackStart (headerExpander, true, true, 0);

			headerExpander.Activated += OnActivated;
			
			scope = Tiles.Utils.TileGroupToScopeType(info.Group);
			
			position = new Gtk.Label ();
			position.ModifyFg (Gtk.StateType.Normal, position.Style.Base (Gtk.StateType.Selected));
			header.PackStart (position, false, false, 0);
			position.Show ();

			prev = MakeButton (header, Gtk.Stock.GoBack, OnPrev);
			next = MakeButton (header, Gtk.Stock.GoForward, OnNext);

			header.Show ();
			header.Parent = this;
			header.SizeRequested += HeaderSizeRequested;

			tiles = new SortedTileList (Beagle.Search.SortType.Relevance);
			Columns = columns;

			UpdateButtons ();
			Expanded = true;	
		}
Example #4
0
 private void build()
 {
     this.Modal         = true;
     this.HeightRequest = 400;
     this.WidthRequest  = 600;
     this.Title         = "Battle Preferences";
     this.IconName      = Stock.Preferences;
     this.vb1           = new VBox(true, 1);
     this.sw1           = new ScrolledWindow();
     this.generalExp    = new Expander("General Options");
     this.generalExp.Add(new Label("Print some options description here"));
     this.sourcesExp    = new Expander("Sources");
     this.generationExp = new Expander("Generation Options");
     this.printExp      = new Expander("Print Options");
     this.reportExp     = new Expander("Report Options");
     this.vb1.PackStart(generalExp, false, true, 1);
     this.vb1.PackStart(sourcesExp, false, true, 1);
     this.vb1.PackStart(generationExp, false, true, 1);
     this.vb1.PackStart(printExp, false, true, 1);
     this.vb1.PackStart(reportExp, false, true, 1);
     this.sw1.Add(this.vb1);
     this.cancelBtn       = new Button("Cancel");
     this.applyBtn        = new Button("Apply");
     this.saveBtn         = new Button("Save");
     this.cancelBtn.Image = new Image(Stock.Cancel, Gtk.IconSize.Button);
     this.applyBtn.Image  = new Image(Stock.Apply, Gtk.IconSize.Button);
     this.saveBtn.Image   = new Image(Stock.Save, IconSize.Button);
     this.ActionArea.PackStart(cancelBtn, false, false, 1);
     this.ActionArea.PackStart(applyBtn, false, false, 1);
     this.ActionArea.PackEnd(saveBtn, false, false, 1);
     this.VBox.PackStart(this.sw1, true, true, 1);
     this.ShowAll();
 }
Example #5
0
 private void build()
 {
     this.Modal = true;
     this.HeightRequest = 400;
     this.WidthRequest = 600;
     this.Title = "Battle Preferences";
     this.IconName = Stock.Preferences;
     this.vb1 = new VBox(true, 1);
     this.sw1 = new ScrolledWindow();
     this.generalExp = new Expander("General Options");
     this.generalExp.Add(new Label("Print some options description here"));
     this.sourcesExp = new Expander("Sources");
     this.generationExp = new Expander("Generation Options");
     this.printExp = new Expander("Print Options");
     this.reportExp = new Expander("Report Options");
     this.vb1.PackStart(generalExp, false, true, 1);
     this.vb1.PackStart(sourcesExp, false, true, 1);
     this.vb1.PackStart(generationExp, false, true, 1);
     this.vb1.PackStart(printExp, false, true, 1);
     this.vb1.PackStart(reportExp, false, true, 1);
     this.sw1.Add(this.vb1);
     this.cancelBtn = new Button("Cancel");
     this.applyBtn = new Button("Apply");
     this.saveBtn = new Button("Save");
     this.cancelBtn.Image = new Image(Stock.Cancel, Gtk.IconSize.Button);
     this.applyBtn.Image = new Image(Stock.Apply, Gtk.IconSize.Button);
     this.saveBtn.Image = new Image(Stock.Save, IconSize.Button);
     this.ActionArea.PackStart(cancelBtn, false, false, 1);
     this.ActionArea.PackStart(applyBtn, false, false, 1);
     this.ActionArea.PackEnd(saveBtn, false, false, 1);
     this.VBox.PackStart(this.sw1, true, true, 1);
     this.ShowAll();
 }
Example #6
0
        public Category(Tiles.TileGroupInfo info, int columns)
        {
            WidgetFlags |= WidgetFlags.NoWindow;

            header = new Gtk.HBox(false, 0);

            headerExpander = new Gtk.Expander("<big><b>" + GLib.Markup.EscapeText(info.Name) + "</b></big>");
            ((Gtk.Label)headerExpander.LabelWidget).SetAlignment(0.0f, 0.5f);
            headerExpander.UseMarkup    = true;
            headerExpander.UseUnderline = true;
            headerExpander.Show();
            header.PackStart(headerExpander, true, true, 0);

            headerExpander.Activated += OnActivated;

            scope = Tiles.Utils.TileGroupToScopeType(info.Group);

            position = new Gtk.Label();
            position.ModifyFg(Gtk.StateType.Normal, position.Style.Base(Gtk.StateType.Selected));
            header.PackStart(position, false, false, 0);
            position.Show();

            prev = MakeButton(header, Gtk.Stock.GoBack, OnPrev);
            next = MakeButton(header, Gtk.Stock.GoForward, OnNext);

            header.Show();
            header.Parent         = this;
            header.SizeRequested += HeaderSizeRequested;

            tiles   = new SortedTileList(Beagle.Search.SortType.Relevance);
            Columns = columns;

            UpdateButtons();
            Expanded = true;
        }
Example #7
0
        void ExpansionChanged(object obj, GLib.NotifyArgs args)
        {
            Gtk.Expander exp = obj as Gtk.Expander;

            int ind = lines.IndexOf(exp);

            if (ind == -1)
            {
                return;
            }

            ind++;
            while (ind < lines.Count && !(lines[ind] is Gtk.Expander))
            {
                if (lines[ind] is Widget)
                {
                    Widget w = (Widget)lines[ind];
                    if (exp.Expanded)
                    {
                        w.Show();
                    }
                    else
                    {
                        w.Hide();
                    }
                }
                else if (lines[ind] is Pair)
                {
                    Pair p = (Pair)lines[ind];
                    if (exp.Expanded)
                    {
                        p.Label.Show();
                        p.Editor.Show();
                    }
                    else
                    {
                        p.Label.Hide();
                        p.Editor.Hide();
                    }
                }
                ind++;
            }

            QueueDraw();
        }
Example #8
0
		// TODO: Possible to make Tomboy not crash if quit while dialog is up?
		public SyncDialog ()
: base (string.Empty,
		        null,
		        Gtk.DialogFlags.DestroyWithParent)
		{
			progressBarTimeoutId = 0;

			SetSizeRequest (400, -1);
			HasSeparator = false;

			// Outer box. Surrounds all of our content.
			VBox outerVBox = new VBox (false, 12);
			outerVBox.BorderWidth = 6;
			outerVBox.Show ();
			VBox.PackStart (outerVBox, true, true, 0);

			// Top image and label
			HBox hbox = new HBox (false, 12);
			hbox.Show ();
			outerVBox.PackStart (hbox, false, false, 0);

			image = new Image (GuiUtils.GetIcon ("tomboy", 48));
			image.Xalign = 0;
			image.Yalign = 0;
			image.Show ();
			hbox.PackStart (image, false, false, 0);

			// Label header and message
			VBox vbox = new VBox (false, 6);
			vbox.Show ();
			hbox.PackStart (vbox, true, true, 0);

			headerLabel = new Label ();
			headerLabel.UseMarkup = true;
			headerLabel.Xalign = 0;
			headerLabel.UseUnderline = false;
			headerLabel.LineWrap = true;
			headerLabel.Show ();
			vbox.PackStart (headerLabel, false, false, 0);

			messageLabel = new Label ();
			messageLabel.Xalign = 0;
			messageLabel.UseUnderline = false;
			messageLabel.LineWrap = true;
			messageLabel.SetSizeRequest (250, -1);
			messageLabel.Show ();
			vbox.PackStart (messageLabel, false, false, 0);

			progressBar = new Gtk.ProgressBar ();
			progressBar.Orientation = Gtk.ProgressBarOrientation.LeftToRight;
			progressBar.BarStyle = ProgressBarStyle.Continuous;
			progressBar.ActivityBlocks = 30;
			progressBar.Show ();
			outerVBox.PackStart (progressBar, false, false, 0);

			progressLabel = new Label ();
			progressLabel.UseMarkup = true;
			progressLabel.Xalign = 0;
			progressLabel.UseUnderline = false;
			progressLabel.LineWrap = true;
			progressLabel.Wrap = true;
			progressLabel.Show ();
			outerVBox.PackStart (progressLabel, false, false, 0);

			// Expander containing TreeView
			expander = new Gtk.Expander (Catalog.GetString ("Details"));
			expander.Spacing = 6;
			expander.Activated += OnExpanderActivated;
			expander.Show ();
			outerVBox.PackStart (expander, true, true, 0);

			// Contents of expander
			Gtk.VBox expandVBox = new Gtk.VBox ();
			expandVBox.Show ();
			expander.Add (expandVBox);

			// Scrolled window around TreeView
			Gtk.ScrolledWindow scrolledWindow = new Gtk.ScrolledWindow ();
			scrolledWindow.ShadowType = Gtk.ShadowType.In;
			scrolledWindow.SetSizeRequest (-1, 200);
			scrolledWindow.Show ();
			expandVBox.PackStart (scrolledWindow, true, true, 0);

			// Create model for TreeView
			model = new Gtk.TreeStore (typeof (string), typeof (string));

			// Create TreeView, attach model
			Gtk.TreeView treeView = new Gtk.TreeView ();
			treeView.Model = model;
			treeView.RowActivated += OnRowActivated;
			treeView.Show ();
			scrolledWindow.Add (treeView);

			// Set up TreeViewColumns
			Gtk.TreeViewColumn column = new Gtk.TreeViewColumn (
			        Catalog.GetString ("Note Title"),
			        new Gtk.CellRendererText (), "text", 0);
			column.SortColumnId = 0;
			column.Resizable = true;
			treeView.AppendColumn (column);

			column = new Gtk.TreeViewColumn (
			        Catalog.GetString ("Status"),
			        new Gtk.CellRendererText (), "text", 1);
			column.SortColumnId = 1;
			column.Resizable = true;
			treeView.AppendColumn (column);

			// Button to close dialog.
			closeButton = (Gtk.Button) AddButton (Gtk.Stock.Close, Gtk.ResponseType.Close);
			closeButton.Sensitive = false;
		}
Example #9
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");
 }
Example #10
0
        // TODO: Possible to make Tomboy not crash if quit while dialog is up?
        public SyncDialog()
            : base(string.Empty,
                   null,
                   Gtk.DialogFlags.DestroyWithParent)
        {
            progressBarTimeoutId = 0;

            SetSizeRequest(400, -1);
            HasSeparator = false;

            // Outer box. Surrounds all of our content.
            VBox outerVBox = new VBox(false, 12);

            outerVBox.BorderWidth = 6;
            outerVBox.Show();
            VBox.PackStart(outerVBox, true, true, 0);

            // Top image and label
            HBox hbox = new HBox(false, 12);

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

            image        = new Image(GuiUtils.GetIcon("tomboy", 48));
            image.Xalign = 0;
            image.Yalign = 0;
            image.Show();
            hbox.PackStart(image, false, false, 0);

            // Label header and message
            VBox vbox = new VBox(false, 6);

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

            headerLabel              = new Label();
            headerLabel.UseMarkup    = true;
            headerLabel.Xalign       = 0;
            headerLabel.UseUnderline = false;
            headerLabel.LineWrap     = true;
            headerLabel.Show();
            vbox.PackStart(headerLabel, false, false, 0);

            messageLabel              = new Label();
            messageLabel.Xalign       = 0;
            messageLabel.UseUnderline = false;
            messageLabel.LineWrap     = true;
            messageLabel.SetSizeRequest(250, -1);
            messageLabel.Show();
            vbox.PackStart(messageLabel, false, false, 0);

            progressBar                = new Gtk.ProgressBar();
            progressBar.Orientation    = Gtk.ProgressBarOrientation.LeftToRight;
            progressBar.BarStyle       = ProgressBarStyle.Continuous;
            progressBar.ActivityBlocks = 30;
            progressBar.Show();
            outerVBox.PackStart(progressBar, false, false, 0);

            progressLabel              = new Label();
            progressLabel.UseMarkup    = true;
            progressLabel.Xalign       = 0;
            progressLabel.UseUnderline = false;
            progressLabel.LineWrap     = true;
            progressLabel.Wrap         = true;
            progressLabel.Show();
            outerVBox.PackStart(progressLabel, false, false, 0);

            // Expander containing TreeView
            expander            = new Gtk.Expander(Catalog.GetString("Details"));
            expander.Spacing    = 6;
            expander.Activated += OnExpanderActivated;
            expander.Show();
            outerVBox.PackStart(expander, true, true, 0);

            // Contents of expander
            Gtk.VBox expandVBox = new Gtk.VBox();
            expandVBox.Show();
            expander.Add(expandVBox);

            // Scrolled window around TreeView
            Gtk.ScrolledWindow scrolledWindow = new Gtk.ScrolledWindow();
            scrolledWindow.ShadowType = Gtk.ShadowType.In;
            scrolledWindow.SetSizeRequest(-1, 200);
            scrolledWindow.Show();
            expandVBox.PackStart(scrolledWindow, true, true, 0);

            // Create model for TreeView
            model = new Gtk.TreeStore(typeof(string), typeof(string));

            // Create TreeView, attach model
            Gtk.TreeView treeView = new Gtk.TreeView();
            treeView.Model         = model;
            treeView.RowActivated += OnRowActivated;
            treeView.Show();
            scrolledWindow.Add(treeView);

            // Set up TreeViewColumns
            Gtk.TreeViewColumn column = new Gtk.TreeViewColumn(
                Catalog.GetString("Note Title"),
                new Gtk.CellRendererText(), "text", 0);
            column.SortColumnId = 0;
            column.Resizable    = true;
            treeView.AppendColumn(column);

            column = new Gtk.TreeViewColumn(
                Catalog.GetString("Status"),
                new Gtk.CellRendererText(), "text", 1);
            column.SortColumnId = 1;
            column.Resizable    = true;
            treeView.AppendColumn(column);

            // Button to close dialog.
            closeButton           = (Gtk.Button)AddButton(Gtk.Stock.Close, Gtk.ResponseType.Close);
            closeButton.Sensitive = false;
        }
 protected void SetupMainView()
 {
     main_view = new TrackListView ();
     main_view.HeaderVisible = true;
     main_expander = CreateScrollableExpander (main_view);
     main_expander.Expanded = ClutterFlowSchemas.ExpandTrackList.Get ();
 }