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);
 }
        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;
        }
Beispiel #3
0
        protected override void OnAdded(Gtk.Widget widget)
        {
            base.OnAdded(widget);

            Tiles.TileFlat tile = widget as Tiles.TileFlat;
            if (tile != null)
            {
                col1.AddWidget(tile.SubjectLabel);
                col2.AddWidget(tile.FromLabel);
                col3.AddWidget(tile.DateLabel);
            }
        }
Beispiel #4
0
 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);
 }
Beispiel #5
0
        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;
        }
Beispiel #6
0
 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 ());
 }
        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;
        }
Beispiel #8
0
 protected override void OnAdded(Gtk.Widget widget)
 {
     size_group.AddWidget(widget);
     base.OnAdded(widget);
 }
        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);
                }
            }
        }
        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 ();
        }
 		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);
		}
        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}");
            }
        }
Beispiel #13
0
        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 ();
        }
Beispiel #14
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);
		}