[Banshee-List] Show currently playing song
- From: Pat Rondon <pat thepatsite com>
- To: banshee-list gnome org
- Subject: [Banshee-List] Show currently playing song
- Date: Sat, 12 Nov 2005 11:17:03 -0500
Hi,
Here's a small patch that adds a menu item to scroll to the currently
playing song in the playlist view.
- Pat
Index: data/glade/player.glade
===================================================================
RCS file: /cvs/gnome/banshee/data/glade/player.glade,v
retrieving revision 1.31
diff -u -r1.31 player.glade
--- data/glade/player.glade 11 Nov 2005 19:23:13 -0000 1.31
+++ data/glade/player.glade 12 Nov 2005 16:01:59 -0000
@@ -320,6 +320,16 @@
<property name="active">False</property>
<signal name="activate" handler="OnMenuFullScreenActivate" last_modification_time="Sun, 23 Oct 2005 07:23:38 GMT"/>
<accelerator key="F11" modifiers="0" signal="activate"/>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkMenuItem" id="ShowCurrentlyPlayingSong">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Show Currently Playing Song</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="OnMenuShowCurrentlyPlayingSongActivate" last_modification_time="Sat, 12 Nov 2005 15:23:49 GMT"/>
+ <accelerator key="P" modifiers="GDK_CONTROL_MASK" signal="activate"/>
</widget>
</child>
Index: src/PlayerInterface.cs
===================================================================
RCS file: /cvs/gnome/banshee/src/PlayerInterface.cs,v
retrieving revision 1.92
diff -u -r1.92 PlayerInterface.cs
--- src/PlayerInterface.cs 11 Nov 2005 19:22:27 -0000 1.92
+++ src/PlayerInterface.cs 12 Nov 2005 16:01:59 -0000
@@ -835,6 +835,11 @@
}
}
+ private void OnMenuShowCurrentlyPlayingSongActivate(object o, EventArgs args)
+ {
+ playlistView.ScrollToPlaying();
+ }
+
private LogCoreViewer log_viewer = null;
private void OnMenuLoggedEventsActivate(object o, EventArgs args)
{
Index: src/PlaylistView.cs
===================================================================
RCS file: /cvs/gnome/banshee/src/PlaylistView.cs,v
retrieving revision 1.27
diff -u -r1.27 PlaylistView.cs
--- src/PlaylistView.cs 25 Oct 2005 01:26:10 -0000 1.27
+++ src/PlaylistView.cs 12 Nov 2005 16:01:59 -0000
@@ -452,12 +452,17 @@
{
model.PlayPath(path);
QueueDraw();
- ScrollToCell(model.PlayingPath, null, true, 0.5f, 0.0f);
+ ScrollToPlaying();
}
public void UpdateView()
{
QueueDraw();
+ ScrollToPlaying();
+ }
+
+ public void ScrollToPlaying()
+ {
ScrollToCell(model.PlayingPath, null, true, 0.5f, 0.5f);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]