Example #1
0
 public void LoadTrack(EditorTrackInfo track)
 {
     Notebook.NotebookChild notebook_child = dialog.Notebook [this] as Notebook.NotebookChild;
     if (notebook_child == null)
     {
         return;
     }
     notebook_child.TabFill   = false;
     notebook_child.TabExpand = false;
 }
        private void UpdateLabel(EditorTrackInfo track, FieldSlot slot)
        {
            Label label = slot.Label as Label;

            if (label != null && slot.LabelClosure != null)
            {
                string value = slot.LabelClosure(track, slot.Label);
                label.TextWithMnemonic = value ?? String.Empty;
            }
        }
Example #3
0
        private void SaveTrack(EditorTrackInfo track)
        {
            TrackInfo.ExportableMerge(track, track.SourceTrack);
            track.SourceTrack.Update();

            if (track.SourceTrack.TrackEqual(ServiceManager.PlayerEngine.CurrentTrack))
            {
                TrackInfo.ExportableMerge(track, ServiceManager.PlayerEngine.CurrentTrack);
                ServiceManager.PlayerEngine.TrackInfoUpdated();
            }
        }
        public virtual void LoadTrack(EditorTrackInfo track)
        {
            current_track = null;

            foreach (FieldSlot slot in field_slots)
            {
                UpdateLabel(track, slot);
                slot.ReadClosure(track, slot.Field);
            }

            current_track = track;
        }
Example #5
0
        public void ForeachNonCurrentTrack(EditorTrackOperationClosure closure)
        {
            for (int i = 0; i < TrackCount; i++)
            {
                if (i == current_track_index)
                {
                    continue;
                }

                EditorTrackInfo track = LoadTrack(i);
                if (track != null)
                {
                    closure(track);
                }
            }
        }
Example #6
0
        public void ConnectUndo(T entry, EditorTrackInfo track)
        {
            DisconnectUndo();

            if (undo_adapters.ContainsKey(track))
            {
                current_adapter = undo_adapters[track];
            }
            else
            {
                current_adapter = new EditableUndoAdapter <T> (entry);
                undo_adapters.Add(track, current_adapter);
            }

            current_adapter.Connect();
        }
Example #7
0
        public void Save()
        {
            List <int> primary_sources = new List <int> ();

            // TODO: wrap in db transaction
            try {
                DatabaseTrackInfo.NotifySaved = false;

                for (int i = 0; i < TrackCount; i++)
                {
                    // Save any tracks that were actually loaded into the editor
                    EditorTrackInfo track = LoadTrack(i, false);
                    if (track == null || track.SourceTrack == null)
                    {
                        continue;
                    }

                    SaveTrack(track);

                    if (track.SourceTrack is DatabaseTrackInfo)
                    {
                        // If the source track is from the database, save its parent for notification later
                        int id = (track.SourceTrack as DatabaseTrackInfo).PrimarySourceId;
                        if (!primary_sources.Contains(id))
                        {
                            primary_sources.Add(id);
                        }
                    }
                }

                // Finally, notify the affected primary sources
                foreach (int id in primary_sources)
                {
                    PrimarySource psrc = PrimarySource.GetById(id);
                    if (psrc != null)
                    {
                        psrc.NotifyTracksChanged();
                    }
                }
            } finally {
                DatabaseTrackInfo.NotifySaved = true;
            }
        }
Example #8
0
        private EditorTrackInfo LoadTrack(int index, bool alwaysLoad, out TrackInfo sourceTrack)
        {
            sourceTrack = GetTrack(index);
            EditorTrackInfo editor_track = null;

            if (sourceTrack == null)
            {
                // Something bad happened here
                return(null);
            }

            if (!edit_map.TryGetValue(sourceTrack, out editor_track) && alwaysLoad)
            {
                editor_track             = new EditorTrackInfo(sourceTrack);
                editor_track.EditorIndex = index;
                editor_track.EditorCount = TrackCount;
                edit_map.Add(sourceTrack, editor_track);
            }

            return(editor_track);
        }
Example #9
0
        public void LoadTrack(EditorTrackInfo track)
        {
            model = null;
            CreateModel();

            TagLib.File file = track.TaglibFile;

            if (track.Uri.IsLocalPath)
            {
                string path = track.Uri.AbsolutePath;
                AddItem(Catalog.GetString("File Name:"), System.IO.Path.GetFileName(path));
                AddItem(Catalog.GetString("Directory:"), System.IO.Path.GetDirectoryName(path));
                AddItem(Catalog.GetString("Full Path:"), path);
                try {
                    AddFileSizeItem(Banshee.IO.File.GetSize(track.Uri));
                } catch {
                }
            }
            else
            {
                AddItem(Catalog.GetString("URI:"), track.Uri.AbsoluteUri);
                AddFileSizeItem(track.FileSize);
            }

            AddSeparator();

            if (file != null)
            {
                System.Text.StringBuilder builder = new System.Text.StringBuilder();
                Banshee.Sources.DurationStatusFormatters.ConfusingPreciseFormatter(builder, file.Properties.Duration);
                AddItem(Catalog.GetString("Duration:"), String.Format("{0} ({1}ms)",
                                                                      builder, file.Properties.Duration.TotalMilliseconds));

                AddItem(Catalog.GetString("Audio Bitrate:"), String.Format("{0} KB/sec",
                                                                           file.Properties.AudioBitrate));
                AddItem(Catalog.GetString("Audio Sample Rate:"), String.Format("{0} Hz",
                                                                               file.Properties.AudioSampleRate));
                AddItem(Catalog.GetString("Audio Channels:"), file.Properties.AudioChannels);

                if ((file.Properties.MediaTypes & TagLib.MediaTypes.Video) != 0)
                {
                    AddItem(Catalog.GetString("Video Dimensions:"), String.Format("{0}x{1}",
                                                                                  file.Properties.VideoWidth, file.Properties.VideoHeight));
                }

                foreach (TagLib.ICodec codec in file.Properties.Codecs)
                {
                    if (codec != null)
                    {
                        /* Translators: {0} is the description of the codec */
                        AddItem(String.Format(Catalog.GetString("{0} Codec:"),
                                              codec.MediaTypes.ToString()), codec.Description);
                    }
                }

                AddItem(Catalog.GetString("Container Formats:"), file.TagTypes.ToString());
                AddSeparator();
            }

            AddItem(Catalog.GetString("Imported On:"), track.DateAdded > DateTime.MinValue
                ? track.DateAdded.ToString() : Catalog.GetString("Unknown"));
            AddItem(Catalog.GetString("Last Played:"), track.LastPlayed > DateTime.MinValue
                ? track.LastPlayed.ToString() : Catalog.GetString("Unknown"));
            AddItem(Catalog.GetString("Last Skipped:"), track.LastSkipped > DateTime.MinValue
                ? track.LastSkipped.ToString() : Catalog.GetString("Unknown"));
            AddItem(Catalog.GetString("Play Count:"), track.PlayCount);
            AddItem(Catalog.GetString("Skip Count:"), track.SkipCount);
            AddItem(Catalog.GetString("Score:"), track.Score);
        }
Example #10
0
 public override void LoadTrack(EditorTrackInfo track)
 {
     base.LoadTrack (track);
 }
Example #11
0
 public void ConnectUndo(EditorTrackInfo track)
 {
     entry.ConnectUndo(track);
 }
 public void ConnectUndo (EditorTrackInfo track)
 {
     entry.ConnectUndo (track);
 }
        public void LoadTrack(EditorTrackInfo track)
        {
            BorderWidth = 2;

            PodcastTrackInfo info = PodcastTrackInfo.From (track.SourceTrack);
            if (info == null) {
                Hide ();
                return;
            }

            podcast.Markup      = SetInfo (Catalog.GetString ("Podcast"), track.SourceTrack.AlbumTitle);
            author.Markup       = SetInfo (Catalog.GetString ("Author"), track.SourceTrack.ArtistName);
            published.Markup    = SetInfo (Catalog.GetString ("Published"), info.PublishedDate.ToLongDateString ());
            description.Markup  = SetInfo (Catalog.GetString ("Description"), info.Description);
            // IsDownloaded
            // IsNew
            Show ();
        }
Example #14
0
        public virtual void LoadTrack (EditorTrackInfo track)
        {
            current_track = null;

            foreach (FieldSlot slot in field_slots) {
                UpdateLabel (track, slot);
                slot.ReadClosure (track, slot.Field);
            }

            current_track = track;
        }
Example #15
0
        private static void Run(TrackEditorDialog track_editor)
        {
            track_editor.Response += delegate(object o, ResponseArgs args) {
                if (args.ResponseId == ResponseType.Ok)
                {
                    track_editor.Save();
                }
                else
                {
                    int changed_count = 0;
                    for (int i = 0; i < track_editor.TrackCount; i++)
                    {
                        EditorTrackInfo track = track_editor.LoadTrack(i, false);
                        if (track != null)
                        {
                            track.GenerateDiff();
                            if (track.DiffCount > 0)
                            {
                                changed_count++;
                            }
                        }
                    }

                    if (changed_count == 0)
                    {
                        track_editor.Destroy();
                        return;
                    }

                    HigMessageDialog message_dialog = new HigMessageDialog(
                        track_editor, DialogFlags.Modal, MessageType.Warning, ButtonsType.None,

                        String.Format(Catalog.GetPluralString(
                                          "Save the changes made to the open track?",
                                          "Save the changes made to {0} of {1} open tracks?",
                                          track_editor.TrackCount), changed_count, track_editor.TrackCount),

                        String.Empty
                        );

                    UpdateCancelMessage(track_editor, message_dialog);
                    uint timeout = 0;
                    timeout = GLib.Timeout.Add(1000, delegate {
                        bool result = UpdateCancelMessage(track_editor, message_dialog);
                        if (!result)
                        {
                            timeout = 0;
                        }
                        return(result);
                    });

                    message_dialog.AddButton(Catalog.GetString("Close _without Saving"), ResponseType.Close, false);
                    message_dialog.AddButton(Stock.Cancel, ResponseType.Cancel, false);
                    message_dialog.AddButton(Stock.Save, ResponseType.Ok, true);

                    try {
                        switch ((ResponseType)message_dialog.Run())
                        {
                        case ResponseType.Ok:
                            track_editor.Save();
                            break;

                        case ResponseType.Close:
                            break;

                        case ResponseType.Cancel:
                        case ResponseType.DeleteEvent:
                            return;
                        }
                    } finally {
                        if (timeout > 0)
                        {
                            GLib.Source.Remove(timeout);
                        }
                        message_dialog.Destroy();
                    }
                }

                track_editor.Destroy();
            };

            //track_editor.Run ();
            track_editor.Show();
        }
Example #16
0
 public void ConnectUndo (EditorTrackInfo track)
 {
     undo_adapter.ConnectUndo (entry, track);
 }
Example #17
0
 public override void LoadTrack(EditorTrackInfo track)
 {
     BorderWidth       = 2;
     lyrics_entry.Text = "Not supported";
 }
Example #18
0
        public void LoadTrackToEditor()
        {
            TrackInfo       current_track = null;
            EditorTrackInfo editor_track  = LoadTrack(current_track_index, out current_track);

            if (editor_track == null)
            {
                return;
            }

            // Update the Header
            header_title_label.Text  = current_track.DisplayTrackTitle;
            header_artist_label.Text = current_track.DisplayArtistName;
            header_album_label.Text  = current_track.DisplayAlbumTitle;

            if (edit_notif_label != null)
            {
                edit_notif_label.Markup = String.Format(Catalog.GetString("<i>Editing {0} of {1} items</i>"),
                                                        CurrentTrackIndex + 1, TrackCount);
            }

            LoadCoverArt(current_track);

            // Disconnect all the undo adapters
            ForeachWidget <ICanUndo> (delegate(ICanUndo undoable) {
                undoable.DisconnectUndo();
            });

            foreach (ITrackEditorPage page in pages)
            {
                page.LoadTrack(editor_track);
            }

            // Connect all the undo adapters
            ForeachWidget <ICanUndo> (delegate(ICanUndo undoable) {
                undoable.ConnectUndo(editor_track);
            });

            // Update Navigation
            if (TrackCount > 0 && nav_backward_button != null && nav_forward_button != null)
            {
                nav_backward_button.Sensitive = CanGoBackward;
                nav_forward_button.Sensitive  = CanGoForward;
            }

            // If there was a widget focused already (eg the Title entry), GrabFocus on it,
            // which causes its text to be selected, ready for editing.
            Widget child = FocusChild;

            while (child != null)
            {
                Container container = child as Container;
                if (container != null)
                {
                    child = container.FocusChild;
                }
                else if (child != null)
                {
                    child.GrabFocus();
                    child = null;
                }
            }
        }
Example #19
0
 public void LoadTrack(EditorTrackInfo track)
 {
     dialog.Notebook.SetTabLabelPacking(this, false, false, PackType.End);
 }
Example #20
0
        public void LoadTrack (EditorTrackInfo track)
        {
            model = null;
            CreateModel ();

            TagLib.File file = track.GetTaglibFile ();

            if (track.Uri.IsLocalPath) {
                string path = track.Uri.AbsolutePath;
                AddItem (Catalog.GetString ("File Name:"), System.IO.Path.GetFileName (path));
                AddItem (Catalog.GetString ("Directory:"), System.IO.Path.GetDirectoryName (path));
                AddItem (Catalog.GetString ("Full Path:"), path);
                try {
                    AddFileSizeItem (Banshee.IO.File.GetSize (track.Uri));
                } catch {
                }
            } else {
                AddItem (Catalog.GetString ("URI:"), track.Uri.AbsoluteUri);
                AddFileSizeItem (track.FileSize);
            }

            AddSeparator ();

            if (file != null) {
                System.Text.StringBuilder builder = new System.Text.StringBuilder ();
                Banshee.Sources.DurationStatusFormatters.ConfusingPreciseFormatter (builder, file.Properties.Duration);
                AddItem (Catalog.GetString ("Duration:"), String.Format ("{0} ({1}ms)",
                    builder, file.Properties.Duration.TotalMilliseconds));

                AddItem (Catalog.GetString ("Audio Bitrate:"), String.Format ("{0} KB/sec",
                    file.Properties.AudioBitrate));
                AddItem (Catalog.GetString ("Audio Sample Rate:"), String.Format ("{0} Hz",
                    file.Properties.AudioSampleRate));
                AddItem (Catalog.GetString ("Audio Channels:"), file.Properties.AudioChannels);
                if (file.Properties.BitsPerSample > 0) {
                    AddItem (Catalog.GetString ("Bits Per Sample:"), String.Format ("{0} bits",
                        file.Properties.BitsPerSample));
                }

                if ((file.Properties.MediaTypes & TagLib.MediaTypes.Video) != 0) {
                    AddItem (Catalog.GetString ("Video Dimensions:"), String.Format ("{0}x{1}",
                        file.Properties.VideoWidth, file.Properties.VideoHeight));
                }

                foreach (TagLib.ICodec codec in file.Properties.Codecs) {
                    if (codec != null) {
                        /* Translators: {0} is the description of the codec */
                        AddItem (String.Format (Catalog.GetString ("{0} Codec:"),
                            codec.MediaTypes.ToString ()), codec.Description);
                    }
                }

                AddItem (Catalog.GetString ("Container Formats:"), file.TagTypes.ToString ());
                AddSeparator ();
                file.Dispose ();
            }

            AddItem (Catalog.GetString ("Imported On:"), track.DateAdded > DateTime.MinValue
                ? track.DateAdded.ToString () : Catalog.GetString ("Unknown"));
            AddItem (Catalog.GetString ("Last Played:"), track.LastPlayed > DateTime.MinValue
                ? track.LastPlayed.ToString () : Catalog.GetString ("Unknown"));
            AddItem (Catalog.GetString ("Last Skipped:"), track.LastSkipped > DateTime.MinValue
                ? track.LastSkipped.ToString () : Catalog.GetString ("Unknown"));
            AddItem (Catalog.GetString ("Play Count:"), track.PlayCount);
            AddItem (Catalog.GetString ("Skip Count:"), track.SkipCount);
            AddItem (Catalog.GetString ("Score:"), track.Score);
        }
Example #21
0
 public override void LoadTrack(EditorTrackInfo track)
 {
     BorderWidth = 2;
     lyrics_entry.Text = "Not supported";
 }
        protected override void AddFields()
        {
            HBox box   = new HBox();
            VBox left  = EditorUtilities.CreateVBox();
            VBox right = EditorUtilities.CreateVBox();

            box.PackStart(left, true, true, 0);
            box.PackStart(new VSeparator(), false, false, 12);
            box.PackStart(right, false, false, 0);
            box.ShowAll();

            PackStart(box, false, false, 0);

            // Left

            PageNavigationEntry title_entry = new PageNavigationEntry(Dialog);

            AddField(left, title_entry, null,
                     delegate { return(Catalog.GetString("Track _Title:")); },
                     delegate(EditorTrackInfo track, Widget widget) { ((PageNavigationEntry)widget).Text = track.TrackTitle; },
                     delegate(EditorTrackInfo track, Widget widget) { track.TrackTitle = ((PageNavigationEntry)widget).Text; },
                     FieldOptions.NoSync
                     );

            PageNavigationEntry track_artist_entry = new PageNavigationEntry(Dialog, "CoreArtists", "Name");

            FieldPage.FieldSlot track_artist_slot = AddField(left, track_artist_entry,
                                                             Catalog.GetString("Set all track artists to this value"),
                                                             delegate { return(Catalog.GetString("Track _Artist:")); },
                                                             delegate(EditorTrackInfo track, Widget widget) { ((PageNavigationEntry)widget).Text = track.ArtistName; },
                                                             delegate(EditorTrackInfo track, Widget widget) { track.ArtistName = ((PageNavigationEntry)widget).Text; }
                                                             );

            AlbumArtistEntry album_artist_entry = new AlbumArtistEntry(track_artist_slot.SyncButton,
                                                                       title_entry, track_artist_entry);

            AddField(left, null, album_artist_entry,
                     Catalog.GetString("Set all compilation album artists to these values"), null,
                     delegate(EditorTrackInfo track, Widget widget) {
                AlbumArtistEntry entry = widget as AlbumArtistEntry;
                entry.IsCompilation    = track.IsCompilation;
                entry.Text             = track.AlbumArtist;
            },
                     delegate(EditorTrackInfo track, Widget widget) {
                AlbumArtistEntry entry = widget as AlbumArtistEntry;
                track.IsCompilation    = entry.IsCompilation;
                track.AlbumArtist      = entry.Text;
            }
                     );

            track_artist_entry.Changed += delegate {
                if (!album_artist_entry.IsCompilation)
                {
                    album_artist_entry.Text = track_artist_entry.Text;
                }
            };

            AddField(left, new TextEntry("CoreAlbums", "Title"),
                     Catalog.GetString("Set all album titles to this value"),
                     delegate { return(Catalog.GetString("Albu_m Title:")); },
                     delegate(EditorTrackInfo track, Widget widget) { ((TextEntry)widget).Text = track.AlbumTitle; },
                     delegate(EditorTrackInfo track, Widget widget) { track.AlbumTitle = ((TextEntry)widget).Text; }
                     );

            AddField(left, new GenreEntry(),
                     Catalog.GetString("Set all genres to this value"),
                     delegate { return(Catalog.GetString("_Genre:")); },
                     delegate(EditorTrackInfo track, Widget widget) { ((GenreEntry)widget).Value = track.Genre; },
                     delegate(EditorTrackInfo track, Widget widget) { track.Genre = ((GenreEntry)widget).Value; }
                     );

            // Right

            /* Translators: "of" is the word beteen a track/disc number and the total count. */
            AddField(right, new RangeEntry(Catalog.GetString("of"), !MultipleTracks
                ? null as RangeEntry.RangeOrderClosure
                : delegate(RangeEntry entry) {
                for (int i = 0, n = Dialog.TrackCount; i < n; i++)
                {
                    EditorTrackInfo track = Dialog.LoadTrack(i);

                    if (Dialog.CurrentTrackIndex == i)
                    {
                        // In this case the writeClosure is invoked,
                        // which will take care of updating the TrackInfo
                        entry.From.Value = i + 1;
                        entry.To.Value   = n;
                    }
                    else
                    {
                        track.TrackNumber = i + 1;
                        track.TrackCount  = n;
                    }
                }
            }, Catalog.GetString("Automatically set track number and count")),
                     null,
                     delegate { return(Catalog.GetString("Track _Number:")); },
                     delegate(EditorTrackInfo track, Widget widget) {
                RangeEntry entry = (RangeEntry)widget;
                entry.From.Value = track.TrackNumber;
                entry.To.Value   = track.TrackCount;
            },
                     delegate(EditorTrackInfo track, Widget widget) {
                RangeEntry entry  = (RangeEntry)widget;
                track.TrackNumber = (int)entry.From.Value;
                track.TrackCount  = (int)entry.To.Value;
            },
                     FieldOptions.NoSync
                     );

            AddField(right, new RangeEntry(Catalog.GetString("of")),
                     // Catalog.GetString ("Automatically set disc number and count"),
                     Catalog.GetString("Set all disc numbers and counts to these values"),
                     delegate { return(Catalog.GetString("_Disc Number:")); },
                     delegate(EditorTrackInfo track, Widget widget) {
                RangeEntry entry = (RangeEntry)widget;
                entry.From.Value = track.DiscNumber;
                entry.To.Value   = track.DiscCount;
            },
                     delegate(EditorTrackInfo track, Widget widget) {
                RangeEntry entry = (RangeEntry)widget;
                track.DiscNumber = (int)entry.From.Value;
                track.DiscCount  = (int)entry.To.Value;
            },
                     FieldOptions.None
                     );

            Label year_label = EditorUtilities.CreateLabel(null);

            album_artist_entry.LabelWidget.SizeAllocated += delegate {
                year_label.HeightRequest = album_artist_entry.LabelWidget.Allocation.Height;
            };
            SpinButtonEntry year_entry = new SpinButtonEntry(0, 3000, 1);

            year_entry.Numeric = true;
            AddField(right, year_label, year_entry,
                     Catalog.GetString("Set all years to this value"),
                     delegate { return(Catalog.GetString("_Year:")); },
                     delegate(EditorTrackInfo track, Widget widget) { ((SpinButtonEntry)widget).Value = track.Year; },
                     delegate(EditorTrackInfo track, Widget widget) { track.Year = ((SpinButtonEntry)widget).ValueAsInt; },
                     FieldOptions.Shrink
                     );

            AddField(right, new RatingEntry(),
                     Catalog.GetString("Set all ratings to this value"),
                     delegate { return(Catalog.GetString("_Rating:")); },
                     delegate(EditorTrackInfo track, Widget widget) { ((RatingEntry)widget).Value = track.Rating; },
                     delegate(EditorTrackInfo track, Widget widget) { track.Rating = ((RatingEntry)widget).Value; },
                     FieldOptions.Shrink | FieldOptions.NoSync
                     );
        }
Example #23
0
        public void LoadTrackToEditor()
        {
            TrackInfo       current_track = null;
            EditorTrackInfo editor_track  = LoadTrack(current_track_index, out current_track);

            if (editor_track == null)
            {
                return;
            }

            // Update the Header
            header_title_label.Text  = current_track.DisplayTrackTitle;
            header_artist_label.Text = current_track.DisplayArtistName;
            header_album_label.Text  = current_track.DisplayAlbumTitle;

            if (edit_notif_label != null)
            {
                edit_notif_label.Markup = String.Format(Catalog.GetString("<i>Editing {0} of {1} items</i>"),
                                                        CurrentTrackIndex + 1, TrackCount);
            }

            ArtworkManager artwork = ServiceManager.Get <ArtworkManager> ();

            Gdk.Pixbuf cover_art = artwork.LookupScalePixbuf(current_track.ArtworkId, 64);
            header_image.Pixbuf = cover_art;
            if (cover_art == null)
            {
                header_image.IconName         = "media-optical";
                header_image.PixelSize        = 64;
                header_image_frame.ShadowType = ShadowType.None;
            }
            else
            {
                header_image_frame.ShadowType = ShadowType.In;
            }

            // Disconnect all the undo adapters
            ForeachWidget <ICanUndo> (delegate(ICanUndo undoable) {
                undoable.DisconnectUndo();
            });

            foreach (ITrackEditorPage page in pages)
            {
                page.LoadTrack(editor_track);
            }

            // Connect all the undo adapters
            ForeachWidget <ICanUndo> (delegate(ICanUndo undoable) {
                undoable.ConnectUndo(editor_track);
            });

            // Update Navigation
            if (TrackCount > 0 && nav_backward_button != null && nav_forward_button != null)
            {
                nav_backward_button.Sensitive = CanGoBackward;
                nav_forward_button.Sensitive  = CanGoForward;
            }

            // If there was a widget focused already (eg the Title entry), GrabFocus on it,
            // which causes its text to be selected, ready for editing.
            Widget child = FocusChild;

            while (child != null)
            {
                Container container = child as Container;
                if (container != null)
                {
                    child = container.FocusChild;
                }
                else if (child != null)
                {
                    child.GrabFocus();
                    child = null;
                }
            }
        }
Example #24
0
 private void UpdateLabel (EditorTrackInfo track, FieldSlot slot)
 {
     Label label = slot.Label as Label;
     if (label != null && slot.LabelClosure != null) {
         string value = slot.LabelClosure (track, slot.Label);
         label.TextWithMnemonic = value ?? String.Empty;
     }
 }
Example #25
0
 public void ConnectUndo (EditorTrackInfo track)
 {
     this.track = track;
     tap_adapter.Reset ();
     undo_adapter.ConnectUndo (bpm_entry, track);
 }
 public override void LoadTrack(EditorTrackInfo track)
 {
     base.LoadTrack(track);
 }
Example #27
0
 public void ConnectUndo(EditorTrackInfo track)
 {
     undo_adapter.ConnectUndo(Entry, track);
 }
Example #28
0
 public void LoadTrack(EditorTrackInfo track)
 {
     Notebook.NotebookChild notebook_child = dialog.Notebook [this] as Notebook.NotebookChild;
     if (notebook_child == null)
         return;
     notebook_child.TabFill = false;
     notebook_child.TabExpand = false;
 }