コード例 #1
0
        public EditPlaylistElementProperties(Window parent, IPlaylistElement element)
        {
            TransientFor = parent;
            this.Build ();

            sizegroupLeft = new SizeGroup (SizeGroupMode.Horizontal);
            sizegroupLeft.IgnoreHidden = false;
            foreach (Widget w in vbox2.Children) {
                foreach (Widget t in (w as Table).Children) {
                    if ((t is Label)) {
                        t.ModifyFont (FontDescription.FromString (App.Current.Style.Font + " 10"));
                        sizegroupLeft.AddWidget (t);
                    }
                }
            }

            sizegroupRight = new SizeGroup (SizeGroupMode.Horizontal);
            sizegroupRight.IgnoreHidden = false;
            foreach (Widget w in vbox2.Children) {
                foreach (Widget t in (w as Table).Children) {
                    if (!(t is Label)) {
                        sizegroupRight.AddWidget (t);
                    }
                }
            }

            PlaylistElement = element;
            durationspinbutton.ValueChanged += HandleDurationChanged;
            nameentry.Changed += HandleNameChanged;
        }
コード例 #2
0
        public GroupView() : base(false, 0)
        {
            categories    = new Hashtable();
            tileSizeGroup = new Gtk.SizeGroup(Gtk.SizeGroupMode.Both);

            foreach (TileGroupInfo info in Utils.GroupInfo)
            {
                Category box = null;

                if (info.Group == TileGroup.Conversations)
                {
                    box = new ListCategory(info);
                }
                else
                {
                    box = new TileCategory(info, tileSizeGroup);
                }

                box.NoShowAll       = true;
                box.CategoryToggle += OnCategoryToggle;
                PackStart(box, false, false, 0);

                categories [info.Group] = box;
            }

            maxHeight     = new int[Children.Length];
            displayHeight = new int[Children.Length];
        }
コード例 #3
0
 public GameDescriptionHeader()
 {
     this.Build ();
     SetStyle ();
     namesGroup = new SizeGroup (SizeGroupMode.Horizontal);
     namesGroup.AddWidget (homenamelabel);
     namesGroup.AddWidget (awaynamelabel);
     scoreGroup = new SizeGroup (SizeGroupMode.Horizontal);
     scoreGroup.AddWidget (homescorelabel);
     scoreGroup.AddWidget (awayscorelabel);
 }
コード例 #4
0
        public HotkeysConfiguration()
        {
            int i = 0;
            this.Build ();

            sgroup = new SizeGroup (SizeGroupMode.Horizontal);
            foreach (KeyAction action in Config.Hotkeys.ActionsDescriptions.Keys) {
                AddWidget (action, Config.Hotkeys.ActionsDescriptions [action],
                           Config.Hotkeys.ActionsHotkeys [action], i);
                i++;
            }
        }
コード例 #5
0
		public static Gtk.Window Create ()
		{
			window = new Dialog ();
			window.Title = "Sized groups";
			window.Resizable = false;
			
			VBox vbox = new VBox (false, 5);
			window.VBox.PackStart (vbox, true, true, 0);
			vbox.BorderWidth = 5;

			size_group = new SizeGroup (SizeGroupMode.Horizontal);

			Frame frame = new Frame ("Color Options");
			vbox.PackStart (frame, true, true, 0);

			Table table = new Table (2, 2, false);
			table.BorderWidth = 5;
			table.RowSpacing = 5;
			table.ColumnSpacing = 10;
			frame.Add (table);

			string [] colors = {"Red", "Green", "Blue", };
			string [] dashes = {"Solid", "Dashed", "Dotted", };
			string [] ends = {"Square", "Round", "Arrow", };

			Add_Row (table, 0, size_group, "_Foreground", colors);
			Add_Row (table, 1, size_group, "_Background", colors);

			frame = new Frame ("Line Options");
			vbox.PackStart (frame, false, false, 0);

			table = new Table (2, 2, false);
			table.BorderWidth = 5;
			table.RowSpacing = 5;
			table.ColumnSpacing = 10;
			frame.Add (table);

			Add_Row (table, 0, size_group, "_Dashing", dashes);
			Add_Row (table, 1, size_group, "_Line ends", ends);

			CheckButton check_button = new CheckButton ("_Enable grouping");
			vbox.PackStart (check_button, false, false, 0);
			check_button.Active = true;
			check_button.Toggled += new EventHandler (Button_Toggle_Cb);

			Button close_button = new Button (Stock.Close);
			close_button.Clicked += new EventHandler (Close_Button);
			window.ActionArea.PackStart (close_button, false, false, 0);
			
			window.ShowAll ();
			return window;
		}
コード例 #6
0
		public DemoSizeGroup () : base ("SizeGroup", null, DialogFlags.DestroyWithParent,
						Gtk.Stock.Close, Gtk.ResponseType.Close)
		{
			Resizable = false;

 			VBox vbox = new VBox (false, 5);
 			this.ContentArea.PackStart (vbox, true, true, 0);
 			vbox.BorderWidth = 5;

 			sizeGroup = new SizeGroup (SizeGroupMode.Horizontal);

			// Create one frame holding color options
 			Frame frame = new Frame ("Color Options");
 			vbox.PackStart (frame, true, true, 0);

 			Table table = new Table (2, 2, false);
 			table.BorderWidth = 5;
 			table.RowSpacing = 5;
 			table.ColumnSpacing = 10;
 			frame.Add (table);

 			AddRow (table, 0, sizeGroup, "_Foreground", colors);
 			AddRow (table, 1, sizeGroup, "_Background", colors);

			// And another frame holding line style options
			frame = new Frame ("Line Options");
			vbox.PackStart (frame, false, false, 0);

			table = new Table (2, 2, false);
			table.BorderWidth = 5;
			table.RowSpacing = 5;
			table.ColumnSpacing = 10;
			frame.Add (table);

 			AddRow (table, 0, sizeGroup, "_Dashing", dashes);
 			AddRow (table, 1, sizeGroup, "_Line ends", ends);

			// And a check button to turn grouping on and off
  			CheckButton checkButton = new CheckButton ("_Enable grouping");
  			vbox.PackStart (checkButton, false, false, 0);
  			checkButton.Active = true;
 			checkButton.Toggled += new EventHandler (ToggleGrouping);

			ShowAll ();
		}
コード例 #7
0
ファイル: GroupView.cs プロジェクト: ArsenShnurkov/beagle-1
		public GroupView () : base (false, 0)
		{
			categories = new Hashtable ();
			tileSizeGroup = new Gtk.SizeGroup (Gtk.SizeGroupMode.Both);			

			foreach (TileGroupInfo info in Utils.GroupInfo) {
				Category box = null;
								
				if (info.Group == TileGroup.Conversations)
					box = new ListCategory (info);
				else
					box = new TileCategory (info, tileSizeGroup);

				box.NoShowAll = true;
				box.CategoryToggle += OnCategoryToggle;
				PackStart (box, false, false, 0);

				categories [info.Group] = box;
			}

			maxHeight = new int[Children.Length];
			displayHeight = new int[Children.Length];
		}
コード例 #8
0
ファイル: WelcomePanel.cs プロジェクト: GNOME/longomatch
        void Create()
        {
            // One extra row for our logo
            tablewidget.NRows = (uint)NRows + 1;
            tablewidget.NColumns = StyleConf.WelcomeIconsPerRow;
            sizegroup = new SizeGroup (SizeGroupMode.Horizontal);

            Gtk.Image prefImage = new Gtk.Image (
                                      Helpers.Misc.LoadIcon ("longomatch-preferences",
                                          StyleConf.WelcomeIconSize, 0));
            preferencesbutton.Add (prefImage);
            preferencesbutton.WidthRequest = StyleConf.WelcomeIconSize;
            preferencesbutton.HeightRequest = StyleConf.WelcomeIconSize;

            // Our logo
            logoImage = new Gtk.Image ();
            logoImage.Pixbuf = Config.Background.Scale (StyleConf.WelcomeLogoWidth,
                StyleConf.WelcomeLogoHeight).Value;
            logoImage.WidthRequest = StyleConf.WelcomeLogoWidth;
            logoImage.HeightRequest = StyleConf.WelcomeLogoHeight;
            tablewidget.Attach (logoImage, 0, StyleConf.WelcomeIconsPerRow, 0, 1,
                AttachOptions.Expand | AttachOptions.Fill,
                AttachOptions.Expand | AttachOptions.Fill,
                0, StyleConf.WelcomeIconsVSpacing / 2);

            for (uint i = 0; i < buttons.Length; i++) {
                Widget b;
                uint c, l;

                c = i % StyleConf.WelcomeIconsPerRow;
                l = i / StyleConf.WelcomeIconsPerRow + 1;

                b = CreateButton (buttons [i]);
                tablewidget.Attach (b, c, c + 1, l, l + 1,
                    AttachOptions.Expand | AttachOptions.Fill,
                    AttachOptions.Expand | AttachOptions.Fill,
                    0, StyleConf.WelcomeIconsVSpacing / 2);
                buttonWidgets.Add (b);
            }
        }
コード例 #9
0
        void InitDialog()
        {
            findButton.UseUnderline = true;
            closeButton.UseUnderline = true;

            //set up the size groups
            SizeGroup labels = new SizeGroup(SizeGroupMode.Horizontal);
            SizeGroup combos = new SizeGroup(SizeGroupMode.Horizontal);
            SizeGroup options = new SizeGroup(SizeGroupMode.Horizontal);
            SizeGroup helpButtons = new SizeGroup(SizeGroupMode.Horizontal);
            SizeGroup checkButtons = new SizeGroup(SizeGroupMode.Horizontal);
            labels.AddWidget(label1);
            combos.AddWidget(searchPatternEntry);
            helpButtons.AddWidget(findHelpButton);
            checkButtons.AddWidget(ignoreCaseCheckBox);
            checkButtons.AddWidget(searchWholeWordOnlyCheckBox);
            checkButtons.AddWidget(useSpecialSearchStrategyCheckBox);
            checkButtons.AddWidget(searchLocationLabel);
            options.AddWidget(specialSearchStrategyComboBox);
            options.AddWidget(searchLocationComboBox);

            searchPatternEntry.Completion = new EntryCompletion ();
            searchPatternEntry.Completion.Model = new ListStore (typeof (string));
            searchPatternEntry.Completion.TextColumn = 0;

            // set button sensitivity
            findHelpButton.Sensitive = false;

            // set replace dialog properties
            if (replaceMode)
            {
                replacePatternEntry.Completion = new EntryCompletion ();
                replacePatternEntry.Completion.Model = new ListStore (typeof (string));
                replacePatternEntry.Completion.TextColumn = 0;

                ReplaceDialogPointer = this.ReplaceDialogWidget;
                // set the label properties
                replaceButton.UseUnderline = true;
                replaceAllButton.UseUnderline = true;

                // set te size groups to include the replace dialog
                labels.AddWidget(label2);
                combos.AddWidget(replacePatternEntry);
                helpButtons.AddWidget(replaceHelpButton);

                replaceHelpButton.Sensitive = false;
            }
            else
            {
                ReplaceDialogPointer = this.FindDialogWidget;
                markAllButton.UseUnderline = true;
            }
            ReplaceDialogPointer.TransientFor = (Gtk.Window)WorkbenchSingleton.Workbench;
        }
コード例 #10
0
 public TileCategory(Tiles.TileGroupInfo info, Gtk.SizeGroup size_group) : base(info, 2)
 {
     this.size_group = size_group;
 }
コード例 #11
0
        void InitDialog()
        {
            label1.Text = stringParserService.Parse ("${res:Dialog.NewProject.SearchReplace.FindWhat}");
            searchLocationLabel.Text = stringParserService.Parse ("${res:Dialog.NewProject.SearchReplace.SearchIn}");
            //findButton.Label = stringParserService.Parse ("${res:Dialog.NewProject.SearchReplace.FindNextButton}");
            //closeButton.Label = stringParserService.Parse ("${res:Global.CloseButtonText}");
            findButton.UseUnderline = true;
            closeButton.UseUnderline = true;
            ignoreCaseCheckBox.Label = stringParserService.Parse ("${res:Dialog.NewProject.SearchReplace.CaseSensitive}");
            searchWholeWordOnlyCheckBox.Label = stringParserService.Parse ("${res:Dialog.NewProject.SearchReplace.WholeWord}");
            useSpecialSearchStrategyCheckBox.Label = stringParserService.Parse ("${res:Dialog.NewProject.SearchReplace.UseMethodLabel}");

            //set up the size groups
            SizeGroup labels = new SizeGroup(SizeGroupMode.Horizontal);
            SizeGroup combos = new SizeGroup(SizeGroupMode.Horizontal);
            SizeGroup options = new SizeGroup(SizeGroupMode.Horizontal);
            SizeGroup helpButtons = new SizeGroup(SizeGroupMode.Horizontal);
            SizeGroup checkButtons = new SizeGroup(SizeGroupMode.Horizontal);
            labels.AddWidget(label1);
            combos.AddWidget(searchPatternComboBox);
            helpButtons.AddWidget(findHelpButton);
            checkButtons.AddWidget(ignoreCaseCheckBox);
            checkButtons.AddWidget(searchWholeWordOnlyCheckBox);
            checkButtons.AddWidget(useSpecialSearchStrategyCheckBox);
            checkButtons.AddWidget(searchLocationLabel);
            options.AddWidget(specialSearchStrategyComboBox);
            options.AddWidget(searchLocationComboBox);

            // set button sensitivity
            findHelpButton.Sensitive = false;

            // set replace dialog properties
            if(replaceMode)
            {
                ReplaceDialogPointer = this.ReplaceDialogWidget;
                // set the label properties
                label2.Text = stringParserService.Parse ("${res:Dialog.NewProject.SearchReplace.ReplaceWith}");
                //replaceButton.Label = stringParserService.Parse ("${res:Dialog.NewProject.SearchReplace.ReplaceButton}");
                replaceAllButton.Label = stringParserService.Parse ("${res:Dialog.NewProject.SearchReplace.ReplaceAllButton}");
                replaceButton.UseUnderline = true;
                replaceAllButton.UseUnderline = true;

                // set te size groups to include the replace dialog
                labels.AddWidget(label2);
                combos.AddWidget(replacePatternComboBox);
                helpButtons.AddWidget(replaceHelpButton);

                replaceHelpButton.Sensitive = false;
            }
            else
            {
                ReplaceDialogPointer = this.FindDialogWidget;
                markAllButton.UseUnderline = true;
                markAllButton.Label = stringParserService.Parse ("${res:Dialog.NewProject.SearchReplace.MarkAllButton}");
            }
        }
コード例 #12
0
ファイル: NewProjectPanel.cs プロジェクト: GNOME/longomatch
 void GroupLabels()
 {
     sg = new SizeGroup (SizeGroupMode.Horizontal);
     sg.AddWidget (urilabel);
     sg.AddWidget (outputfilelabel);
     sg.AddWidget (device);
     sg.AddWidget (videoformatlabel);
     sg.AddWidget (deviceformatlabel);
     sg.AddWidget (outputsizelabel);
 }
コード例 #13
0
ファイル: PlayEditor.cs プロジェクト: LongoMatch/longomatch
        void FillTags(ProjectLongoMatch project, TimelineEventLongoMatch evt)
        {
            Dictionary<string, List<Tag>> tagsByGroup;
            SizeGroup sgroup = new SizeGroup (SizeGroupMode.Horizontal);

            if (evt.EventType is AnalysisEventType) {
                tagsByGroup = (evt.EventType as AnalysisEventType).TagsByGroup;
            } else {
                tagsByGroup = new Dictionary<string, List<Tag>> ();
            }

            tagsvbox.PackStart (new HSeparator ());
            foreach (var kv in project.Dashboard.CommonTagsByGroup) {
                AddTagsGroup (evt, kv.Key, kv.Value, sgroup);
            }
            foreach (var kv in tagsByGroup) {
                AddTagsGroup (evt, kv.Key, kv.Value, sgroup);
            }
            tagsvbox.ShowAll ();
        }
コード例 #14
0
        public CategoryProperties()
        {
            this.Build ();
            nameentry.Changed += HandleNameentryChanged;
            colorbutton1.ColorSet += HandleColorSet;
            textcolorbutton.ColorSet += HandleColorSet;
            tagmodecombobox.Changed += HandleTagModeChanged;
            tagscheckbutton.Toggled += HandleTagsToggled;
            tprbutton.ValueChanged += HandleTagsPerRowValueChanged;
            leadtimebutton.ValueChanged += HandleLeadTimeChanged;
            lagtimebutton.ValueChanged += HandleLagTimeChanged;
            changebuton.Clicked += HandleChangeHotkey;
            sortmethodcombobox.Changed += HandleSortMethodChanged;
            fieldcombobox.Changed += HandlePositionChanged;
            hfieldcombobox.Changed += HandlePositionChanged;
            goalcombobox.Changed += HandlePositionChanged;
            shapecombobox.Changed += HandleShapeChanged;
            pointsbutton.Changed += HandlePointsChanged;
            teamcombobox.Changed += HandleTeamChanged;
            groupentry.Changed += HandleGroupChanged;

            postable.NoShowAll = true;
            cattable.NoShowAll = true;
            scoretable.NoShowAll = true;

            sizegroupLeft = new SizeGroup (SizeGroupMode.Horizontal);
            sizegroupLeft.IgnoreHidden = false;
            foreach (Widget w in vbox3.Children) {
                foreach (Widget t in (w as Table).Children) {
                    if ((t is Label)) {
                        t.ModifyFont (FontDescription.FromString (App.Current.Style.Font + " 10"));
                        sizegroupLeft.AddWidget (t);
                    }
                }
            }

            sizegroupRight = new SizeGroup (SizeGroupMode.Horizontal);
            sizegroupRight.IgnoreHidden = false;
            foreach (Widget w in vbox3.Children) {
                foreach (Widget t in (w as Table).Children) {
                    if (!(t is Label)) {
                        sizegroupRight.AddWidget (t);
                    }
                }
            }

            Tagger = null;

            UpdateGui ();
        }
コード例 #15
0
		static void Add_Row (Table table, uint row, SizeGroup size_group,
				     string label_text, string [] options)
		{
			Label label = new Label (label_text);
			label.SetAlignment (0, 1);

			table.Attach (label,
				      0, 1, row, row + 1,
				      AttachOptions.Expand, AttachOptions.Fill,
				      0, 0);

			ComboBox combo_box = Create_ComboBox (options);

			size_group.AddWidget (combo_box);
			table.Attach (combo_box,
				      1, 2, row, row + 1,
				      AttachOptions.Expand, AttachOptions.Expand,
				      0, 0);
		}
コード例 #16
0
 		private void AddRow (Table table, uint row, SizeGroup sizeGroup, string labelText, string [] options)
 		{
 			Label label = new Label (labelText);
 			label.SetAlignment (0, 1);

			table.Attach (label,
				      0, 1, row, row + 1,
				      AttachOptions.Expand | AttachOptions.Fill, 0,
				      0, 0);

			ComboBox combo = CreateComboBox (options);
			label.MnemonicWidget = combo;

			sizeGroup.AddWidget (combo);
			table.Attach (combo,
				      1, 2, row, row + 1,
				      0, 0,
				      0, 0);
		}
コード例 #17
0
		public TileCategory (Tiles.TileGroupInfo info, Gtk.SizeGroup size_group) : base (info, 2)
		{
			this.size_group = size_group;
		}
コード例 #18
0
ファイル: WelcomePanel.cs プロジェクト: LongoMatch/longomatch
        void Create()
        {
            // Check if some additional tools are available that should be added to our buttons list
            Populate ();

            sizegroup = new SizeGroup (SizeGroupMode.Horizontal);

            Gtk.Image prefImage = new Gtk.Image (
                                      Helpers.Misc.LoadIcon ("longomatch-preferences",
                                          StyleConf.WelcomeIconSize, 0));
            preferencesbutton.Add (prefImage);
            preferencesbutton.WidthRequest = StyleConf.WelcomeIconSize;
            preferencesbutton.HeightRequest = StyleConf.WelcomeIconSize;

            // Our logo
            logoImage = new Gtk.Image ();
            logoImage.Pixbuf = App.Current.Background.Scale (StyleConf.WelcomeLogoWidth,
                StyleConf.WelcomeLogoHeight).Value;
            logoImage.WidthRequest = StyleConf.WelcomeLogoWidth;
            logoImage.HeightRequest = StyleConf.WelcomeLogoHeight;

            //Adding the title
            vbox2.Add (logoImage);

            //Create necessary Hboxes for all icons
            List<HBox> hboxList = new List<HBox> ();

            for (int i = 0; i < NRows; i++) {
                Alignment al = new Alignment (0.5F, 0.5F, 0, 0);
                hboxList.Add (new HBox (true, StyleConf.WelcomeIconsHSpacing));
                al.Add (hboxList [i]);
                vbox2.Add (al);
            }

            int hboxRow = 0;
            for (uint i = 0; i < buttons.Count; i++) {
                Widget b;
                if (i >= StyleConf.WelcomeIconsFirstRow && hboxRow == 0) {
                    hboxRow++;
                }
                b = CreateButton (buttons [(int)i]);
                hboxList [hboxRow].Add (b);
            }

            ShowAll ();
        }
コード例 #19
0
		static void Toggle_Grouping (ToggleButton check_button,
					     SizeGroup size_group)
		{
			SizeGroupMode mode;

			if (check_button.Active)
				mode = SizeGroupMode.Horizontal;
			else
				mode = SizeGroupMode.None;

			size_group.Mode = mode;
		}
コード例 #20
0
ファイル: PlayEditor.cs プロジェクト: LongoMatch/longomatch
 void AddTagsGroup(TimelineEventLongoMatch evt, string grp, List<Tag> tags, SizeGroup sgroup)
 {
     HBox box = new HBox ();
     Label label = new Label (String.IsNullOrEmpty (grp) ? Catalog.GetString ("Common tags") : grp);
     Table tagstable = new Table ((uint)(tags.Count / TAGS_PER_ROW), TAGS_PER_ROW, true);
     RadioButton first = null;
     Tag noneTag = new Tag (Catalog.GetString ("None"));
     label.WidthRequest = 200;
     if (!String.IsNullOrEmpty (grp)) {
         tags.Insert (0, noneTag);
     }
     for (int i = 0; i < tags.Count; i++) {
         uint row_top, row_bottom, col_left, col_right;
         Tag t = tags [i];
         CheckButton tb;
         if (String.IsNullOrEmpty (grp)) {
             tb = new CheckButton (t.Value);
         } else {
             if (first == null) {
                 tb = first = new RadioButton (t.Value);
             } else {
                 tb = new RadioButton (first, t.Value);
             }
         }
         tb.Active = evt.Tags.Contains (t);
         tb.Toggled += (sender, e) => {
             if (tb.Active && t != noneTag) {
                 evt.Tags.Add (t);
             } else {
                 evt.Tags.Remove (t);
             }
         };
         row_top = (uint)(i / tagstable.NColumns);
         row_bottom = (uint)row_top + 1;
         col_left = (uint)i % tagstable.NColumns;
         col_right = (uint)col_left + 1;
         tagstable.Attach (tb, col_left, col_right, row_top, row_bottom);
     }
     sgroup.AddWidget (label);
     box.PackStart (label, false, true, 0);
     box.PackEnd (tagstable, true, true, 0);
     box.Spacing = 5;
     tagsvbox.PackStart (box, false, true, 0);
     tagsvbox.PackStart (new HSeparator ());
 }
コード例 #21
0
        public VideoPreferencesPanel()
        {
            this.Build ();

            if (App.Current.Config.FPS_N == 30) {
                fpscombobox.Active = 1;
            } else if (App.Current.Config.FPS_N == 50) {
                fpscombobox.Active = 2;
            } else if (App.Current.Config.FPS_N == 60) {
                fpscombobox.Active = 3;
            } else {
                fpscombobox.Active = 0;
            }
            fpscombobox.Changed += HandleFPSChanged;
            Misc.FillImageFormat (renderimagecombo, VideoStandards.Rendering, App.Current.Config.RenderVideoStandard);
            Misc.FillEncodingFormat (renderenccombo, App.Current.Config.RenderEncodingProfile);
            Misc.FillQuality (renderqualcombo, App.Current.Config.RenderEncodingQuality);

            Misc.FillImageFormat (captureimagecombo, VideoStandards.Capture, App.Current.Config.CaptureVideoStandard);
            Misc.FillEncodingFormat (captureenccombo, App.Current.Config.CaptureEncodingProfile);
            Misc.FillQuality (capturequalcombo, App.Current.Config.CaptureEncodingQuality);

            renderimagecombo.Changed += HandleImageChanged;
            captureimagecombo.Changed += HandleImageChanged;

            renderenccombo.Changed += HandleEncodingChanged;
            captureenccombo.Changed += HandleEncodingChanged;

            renderqualcombo.Changed += HandleQualityChanged;
            capturequalcombo.Changed += HandleQualityChanged;

            enableSound = new CheckButton ();
            rendertable.Attach (enableSound, 1, 2, 3, 4,
                AttachOptions.Fill,
                AttachOptions.Fill, 0, 0);
            enableSound.CanFocus = false;
            enableSound.Show ();
            enableSound.Active = App.Current.Config.EnableAudio;
            enableSound.Toggled += (sender, e) => {
                App.Current.Config.EnableAudio = enableSound.Active;
            };

            overlayTitle = new CheckButton ();
            rendertable.Attach (overlayTitle, 1, 2, 4, 5,
                AttachOptions.Fill,
                AttachOptions.Fill, 0, 0);
            overlayTitle.CanFocus = false;
            overlayTitle.Show ();
            overlayTitle.Active = App.Current.Config.OverlayTitle;
            overlayTitle.Toggled += (sender, e) => {
                App.Current.Config.OverlayTitle = overlayTitle.Active;
            };

            SizeGroup sgroup = new SizeGroup (SizeGroupMode.Horizontal);
            SizeGroup sgroup2 = new SizeGroup (SizeGroupMode.Horizontal);
            foreach (Widget w in generaltable) {
                if (w is Label) {
                    sgroup.AddWidget (w);
                } else {
                    sgroup2.AddWidget (w);
                }
            }
            foreach (Widget w in capturetable) {
                if (w is Label) {
                    sgroup.AddWidget (w);
                } else {
                    sgroup2.AddWidget (w);
                }
            }
            foreach (Widget w in rendertable) {
                if (w is Label) {
                    sgroup.AddWidget (w);
                } else {
                    sgroup2.AddWidget (w);
                }
            }
        }
コード例 #22
0
ファイル: NewProjectPanel.cs プロジェクト: GNOME/longomatch
        void ApplyStyle()
        {
            /* Keep the central box aligned in the center of the widget */
            SizeGroup grp = new  SizeGroup (SizeGroupMode.Horizontal);
            grp.AddWidget (lefttable);
            grp.AddWidget (righttable);

            centerbox.WidthRequest = StyleConf.NewTeamsComboWidth * 2 + StyleConf.NewTeamsSpacing;
            lefttable.RowSpacing = outputfiletable.RowSpacing =
                righttable.RowSpacing = StyleConf.NewTableHSpacing;
            lefttable.ColumnSpacing = righttable.ColumnSpacing = StyleConf.NewTableHSpacing;
            vsimage.WidthRequest = StyleConf.NewTeamsSpacing;
            hometeamscombobox.WidthRequest = awayteamscombobox.WidthRequest = StyleConf.NewTeamsComboWidth;
            hometeamscombobox.HeightRequest = awayteamscombobox.HeightRequest = StyleConf.NewTeamsComboHeight;
            hometeamscombobox.WrapWidth = awayteamscombobox.WrapWidth = 1;
            homealignment.Xscale = awayalignment.Xscale = 0;
            homealignment.Xalign = 0.8f;
            awayalignment.Xalign = 0.2f;
        }
コード例 #23
0
 public ListCategory(Tiles.TileGroupInfo info) : base(info, 1)
 {
     col1 = new Gtk.SizeGroup(Gtk.SizeGroupMode.Horizontal);
     col2 = new Gtk.SizeGroup(Gtk.SizeGroupMode.Horizontal);
     col3 = new Gtk.SizeGroup(Gtk.SizeGroupMode.Horizontal);
 }
コード例 #24
0
		public ListCategory (Tiles.TileGroupInfo info) : base (info, 1)
		{
			col1 = new Gtk.SizeGroup (Gtk.SizeGroupMode.Horizontal);
			col2 = new Gtk.SizeGroup (Gtk.SizeGroupMode.Horizontal);
			col3 = new Gtk.SizeGroup (Gtk.SizeGroupMode.Horizontal);
		}
コード例 #25
0
ファイル: PlayEditor.cs プロジェクト: GNOME/longomatch
        void FillTags(Project project, TimelineEvent evt)
        {
            Dictionary<string, List<Tag>> tagsByGroup;
            SizeGroup sgroup = new SizeGroup (SizeGroupMode.Horizontal);

            if (evt.EventType is AnalysisEventType) {
                tagsByGroup = (evt.EventType as AnalysisEventType).TagsByGroup;
            } else {
                tagsByGroup = new Dictionary<string, List<Tag>> ();
            }

            tagsByGroup = tagsByGroup.Concat (project.Dashboard.CommonTagsByGroup)
                .ToDictionary (x => x.Key, x => x.Value);

            tagsvbox.PackStart (new HSeparator ());
            foreach (string grp in tagsByGroup.Keys) {
                HBox box = new HBox ();
                Label label = new Label (String.IsNullOrEmpty (grp) ? Catalog.GetString ("Common tags") : grp);
                List<Tag> tags = tagsByGroup [grp];
                Table tagstable = new Table ((uint)(tags.Count / TAGS_PER_ROW), TAGS_PER_ROW, true);
                RadioButton first = null;
                Tag noneTag = new Tag (Catalog.GetString ("None"));

                label.WidthRequest = 200;
                if (!String.IsNullOrEmpty (grp)) {
                    tags.Insert (0, noneTag);
                }

                for (int i = 0; i < tags.Count; i++) {
                    uint row_top, row_bottom, col_left, col_right;
                    Tag t = tags [i];
                    CheckButton tb;

                    if (String.IsNullOrEmpty (grp)) {
                        tb = new CheckButton (t.Value);
                    } else {
                        if (first == null) {
                            tb = first = new RadioButton (t.Value);
                        } else {
                            tb = new RadioButton (first, t.Value);
                        }
                    }
                    tb.Active = evt.Tags.Contains (t);
                    tb.Toggled += (sender, e) => {
                        if (tb.Active && t != noneTag) {
                            evt.Tags.Add (t);
                        } else {
                            evt.Tags.Remove (t);
                        }
                    };
                    row_top = (uint)(i / tagstable.NColumns);
                    row_bottom = (uint)row_top + 1;
                    col_left = (uint)i % tagstable.NColumns;
                    col_right = (uint)col_left + 1;
                    tagstable.Attach (tb, col_left, col_right, row_top, row_bottom);
                }
                sgroup.AddWidget (label);
                box.PackStart (label, false, true, 0);
                box.PackEnd (tagstable, true, true, 0);
                box.Spacing = 5;
                tagsvbox.PackStart (box, false, true, 0);
                tagsvbox.PackStart (new HSeparator ());
            }
            tagsvbox.ShowAll ();
        }