コード例 #1
0
ファイル: Source.cs プロジェクト: rucker/banshee
        private void LoadSortSchema()
        {
            if (ChildSortTypes.Length == 0)
            {
                return;
            }

            if (unique_id == null && type_unique_id == null)
            {
                Hyena.Log.WarningFormat("Trying to LoadSortSchema, but source's id not set! {0}", UniqueId);
                return;
            }

            child_sort_schema = CreateSchema <string> ("child_sort_id", DefaultChildSort.Id, "", "");
            string child_sort_id = child_sort_schema.Get();

            foreach (SourceSortType sort_type in ChildSortTypes)
            {
                if (sort_type.Id == child_sort_id)
                {
                    child_sort = sort_type;
                    break;
                }
            }

            separate_by_type_schema = CreateSchema <bool> ("separate_by_type", false, "", "");
            SortChildSources();
        }
        public static PlaylistFormatDescription GetDefaultExportFormat()
        {
            PlaylistFormatDescription default_format = null;

            try {
                string exportFormat = DefaultExportFormat.Get();
                PlaylistFormatDescription [] formats = PlaylistFileUtil.ExportFormats;
                foreach (PlaylistFormatDescription format in formats)
                {
                    if (format.FileExtension.Equals(exportFormat))
                    {
                        default_format = format;
                        break;
                    }
                }
            } catch {
                // Ignore errors, return our default if we encounter an error.
            } finally {
                if (default_format == null)
                {
                    default_format = M3uPlaylistFormat.FormatDescription;
                }
            }
            return(default_format);
        }
コード例 #3
0
        protected override void Initialize()
        {
            new Cubano.NowPlaying.NowPlayingSource();

            Hyena.Gui.Theming.ThemeEngine.SetCurrentTheme <CubanoTheme> ();

            BuildPrimaryLayout();
            ConnectEvents();

            //ActionService.SourceActions.SourceView = this;

            composite_view.TrackView.HasFocus = true;

            InitialShowPresent();

            DefaultSize = new Gdk.Size(WidthSchema.Get(), HeightSchema.Get());
        }
コード例 #4
0
        private TreeViewColumn NewColumn(string title,
                                         int sortColumn,
                                         SchemaEntry <int> schema)
        {
            TreeViewColumn tmp_column = new TreeViewColumn();

            tmp_column.Resizable    = true;
            tmp_column.Clickable    = true;
            tmp_column.Reorderable  = false;
            tmp_column.Visible      = true;
            tmp_column.Sizing       = TreeViewColumnSizing.Fixed;
            tmp_column.Title        = title;
            tmp_column.SortColumnId = sortColumn;

            tmp_column.FixedWidth = schema.Get();

            schemas.Add(schema);
            columns.Add(tmp_column);

            return(tmp_column);
        }