banshee r3317 - in trunk/banshee: . src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea src/Libraries/Lastfm.Gui/Lastfm.Gui
- From: ahixon svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r3317 - in trunk/banshee: . src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea src/Libraries/Lastfm.Gui/Lastfm.Gui
- Date: Sun, 24 Feb 2008 04:28:27 +0000 (GMT)
Author: ahixon
Date: Sun Feb 24 04:28:26 2008
New Revision: 3317
URL: http://svn.gnome.org/viewvc/banshee?rev=3317&view=rev
Log:
2008-02-23 Alexander Hixon <hixon alexander mediati org>
* src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea/X11NotificationAreaBox.cs:
Get track duration and progress information before showing the popup
and relying on the fact that we're playing to determine the progress
label text. Showing the popup during a paused song now works.
* src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea/TrackInfoPopup.cs:
Add some padding around the TrackInfoDisplay to pretty things up
slightly and line up the cover art.
* src/Libraries/Lastfm.Gui/Lastfm.Gui/AccountLoginForm.cs: Don't try
to run Account.Save if the username or password haven't changed
since the time the dialog was opened till the time it closed.
Prevents reconnecting if you simply open the dialog and close it
again.
Modified:
trunk/banshee/ChangeLog
trunk/banshee/src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea/TrackInfoPopup.cs
trunk/banshee/src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea/X11NotificationAreaBox.cs
trunk/banshee/src/Libraries/Lastfm.Gui/Lastfm.Gui/AccountLoginForm.cs
Modified: trunk/banshee/src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea/TrackInfoPopup.cs
==============================================================================
--- trunk/banshee/src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea/TrackInfoPopup.cs (original)
+++ trunk/banshee/src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea/TrackInfoPopup.cs Sun Feb 24 04:28:26 2008
@@ -73,7 +73,8 @@
header = new TrackInfoDisplay ();
header.SetSizeRequest (320, 64);
- Alignment alignment = new Alignment (1.0f, 0.5f, 0.0f, 0.0f);
+ Alignment alignment = new Alignment (1.0f, 1.0f, 0.0f, 0.0f);
+ alignment.SetPadding (6, 3, 6, 3);
alignment.Add (header);
alignment.Show ();
Modified: trunk/banshee/src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea/X11NotificationAreaBox.cs
==============================================================================
--- trunk/banshee/src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea/X11NotificationAreaBox.cs (original)
+++ trunk/banshee/src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea/X11NotificationAreaBox.cs Sun Feb 24 04:28:26 2008
@@ -114,6 +114,18 @@
popup = new TrackInfoPopup ();
PositionPopup ();
+ // Get initial track progress information.
+ if (ServiceManager.PlayerEngine.CurrentTrack != null) {
+ popup.Duration = (uint)ServiceManager.PlayerEngine.CurrentTrack.Duration.TotalSeconds;
+ // Minus one second because PlayerEngine is weird and adds +1 sec if we're paused.
+ // If we're unpaused, the TrackInfoPopup should fix itself to the real value
+ // before it displays properly, anyway. It's a win-win! :)
+ popup.Position = (ServiceManager.PlayerEngine.Position / 1000) - 1;
+ } else {
+ popup.Duration = 0;
+ popup.Position = 0;
+ }
+
popup.Show ();
}
Modified: trunk/banshee/src/Libraries/Lastfm.Gui/Lastfm.Gui/AccountLoginForm.cs
==============================================================================
--- trunk/banshee/src/Libraries/Lastfm.Gui/Lastfm.Gui/AccountLoginForm.cs (original)
+++ trunk/banshee/src/Libraries/Lastfm.Gui/Lastfm.Gui/AccountLoginForm.cs Sun Feb 24 04:28:26 2008
@@ -104,7 +104,7 @@
Resize (3, 2);
signup_button = new LinkButton ("Sign Up for Last.fm");
- //signup_button.Clicked += delegate { Account.SignUp (); };
+ signup_button.Clicked += delegate { account.SignUp (); };
signup_button.Show ();
Attach (signup_button, 1, 2, 2, 3, AttachOptions.Shrink, AttachOptions.Shrink, 0, 0);
}
@@ -126,9 +126,13 @@
private void UpdateLogin ()
{
- account.UserName = username_entry.Text.Trim ();
- account.Password = password_entry.Text.Trim ();
- account.Save ();
+ if (account.UserName != username_entry.Text.Trim () ||
+ account.Password != password_entry.Text.Trim ()) {
+
+ account.UserName = username_entry.Text.Trim ();
+ account.Password = password_entry.Text.Trim ();
+ account.Save ();
+ }
}
public bool SaveOnEdit {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]