muine r1219 - in trunk: . data src
- From: diegoe svn gnome org
- To: svn-commits-list gnome org
- Subject: muine r1219 - in trunk: . data src
- Date: Sun, 28 Sep 2008 13:55:26 +0000 (UTC)
Author: diegoe
Date: Sun Sep 28 13:55:26 2008
New Revision: 1219
URL: http://svn.gnome.org/viewvc/muine?rev=1219&view=rev
Log:
Bug 308208 â Play Album window does not show all albums
Revert an old commit removing only_complete_albums functionality.
You can now choose wheter muine should or should not show incomplete
albums using a gconf key: /apps/muine/only_complete_albums.
This is the old-old-really-old behaviour of muine of including every
album in the list no matter it is not complete.
Modified:
trunk/ChangeLog
trunk/data/muine.schemas.in
trunk/src/Album.cs
trunk/src/SongDatabase.cs
Modified: trunk/data/muine.schemas.in
==============================================================================
--- trunk/data/muine.schemas.in (original)
+++ trunk/data/muine.schemas.in Sun Sep 28 13:55:26 2008
@@ -124,6 +124,17 @@
</locale>
</schema>
<schema>
+ <key>/schemas/apps/muine/only_complete_albums</key>
+ <applyto>/apps/muine/only_complete_albums</applyto>
+ <owner>muine</owner>
+ <type>bool</type>
+ <default>1</default>
+ <locale name="C">
+ <short>Only complete albums</short>
+ <long>Only deal with complete albums in the interface.</long>
+ </locale>
+ </schema>
+ <schema>
<key>/schemas/apps/muine/default_import_folder</key>
<applyto>/apps/muine/default_import_folder</applyto>
<owner>muine</owner>
Modified: trunk/src/Album.cs
==============================================================================
--- trunk/src/Album.cs (original)
+++ trunk/src/Album.cs Sun Sep 28 13:55:26 2008
@@ -212,7 +212,12 @@
/// True if album is complete, False otherwise.
/// </returns>
public override bool Public {
- get { return complete; }
+ get {
+ if (Global.DB.OnlyCompleteAlbums)
+ return complete;
+ else
+ return true;
+ }
}
// Properties :: Key (get;)
Modified: trunk/src/SongDatabase.cs
==============================================================================
--- trunk/src/SongDatabase.cs (original)
+++ trunk/src/SongDatabase.cs Sun Sep 28 13:55:26 2008
@@ -32,6 +32,9 @@
private const string GConfKeyWatchedFolders = "/apps/muine/watched_folders";
private readonly string [] GConfDefaultWatchedFolders = new string [0];
+ private const string GConfKeyOnlyCompleteAlbums = "/apps/muine/only_complete_albums";
+ private const bool GConfDefaultOnlyCompleteAlbums = true;
+
// Events
// Events :: SongAdded
public delegate void SongAddedHandler (Song song);
@@ -68,6 +71,7 @@
private Hashtable songs;
private Hashtable albums;
private string [] watched_folders;
+ private bool only_complete_albums;
// Properties
// When iterating Song or Albums of these don't forget to
@@ -88,12 +92,15 @@
set { Config.Set (GConfKeyWatchedFolders, value); }
get { return watched_folders; }
}
-
+ // Properties :: OnlyCompleteAlbums (get;)
+ public bool OnlyCompleteAlbums {
+ get { return only_complete_albums; }
+ }
// Constructor
public SongDatabase (int version)
{
db = new Database (FileUtils.SongsDBFile, version);
-
+
songs = new Hashtable ();
albums = new Hashtable ();
@@ -102,6 +109,10 @@
Config.AddNotify (GConfKeyWatchedFolders,
new GConf.NotifyEventHandler (OnWatchedFoldersChanged));
+
+ only_complete_albums = (bool) Config.Get (GConfKeyOnlyCompleteAlbums, GConfDefaultOnlyCompleteAlbums);
+ Config.AddNotify (GConfKeyOnlyCompleteAlbums,
+ new GConf.NotifyEventHandler (OnOnlyCompleteAlbumsChanged));
}
// Methods
@@ -621,6 +632,11 @@
new AddFoldersThread (new_dinfos);
}
+ // Handlers :: OnOnlyCompleteAlbumsChanged
+ private void OnOnlyCompleteAlbumsChanged (object o, GConf.NotifyEventArgs args)
+ {
+ only_complete_albums = (bool) args.Value;
+ }
// Delegate Functions
// Delegate Functions :: DecodeFunction
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]