Merge lp:~cjcurran/indicator-sound/default-player-in-menu into lp:indicator-sound/sound-menu-v2

Proposed by Conor Curran
Status: Merged
Merged at revision: 154
Proposed branch: lp:~cjcurran/indicator-sound/default-player-in-menu
Merge into: lp:indicator-sound/sound-menu-v2
Diff against target: 32 lines (+8/-2)
1 file modified
src/familiar-players-db.vala (+8/-2)
To merge this branch: bzr merge lp:~cjcurran/indicator-sound/default-player-in-menu
Reviewer Review Type Date Requested Status
Kalle Valo (community) Approve
Review via email: mp+40082@code.launchpad.net

Description of the change

Fixes attached bug

To post a comment you must log in.
Revision history for this message
Kalle Valo (kvalo) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/familiar-players-db.vala'
2--- src/familiar-players-db.vala 2010-09-07 14:12:08 +0000
3+++ src/familiar-players-db.vala 2010-11-04 13:06:07 +0000
4@@ -29,6 +29,7 @@
5 {
6 private const string GROUP_NAME = "Seen Database";
7 private const string KEY_NAME = "DesktopFiles";
8+ private const string DEFAULT_APP_DESKTOP = "/usr/share/applications/rhythmbox.desktop";
9 private HashMap<string, bool> players_DB;
10 private string file_name;
11 private string dir_name;
12@@ -38,13 +39,18 @@
13 public FamiliarPlayersDB()
14 {
15 this.write_id = 0;
16- this.players_DB = new HashMap<string, bool>();
17+ this.players_DB = new HashMap<string, bool>();
18+ if ( !create_key_file() ){
19+ this.players_DB.set(DEFAULT_APP_DESKTOP, true);
20+ this.write_db();
21+ }
22+
23 this.dir_name = build_filename(get_user_cache_dir(), "indicators", "sound");
24 this.file_name = build_filename(this.dir_name, "familiar-players-db.keyfile");
25 if(create_key_file() && check_for_keys() && load_data_from_key_file()){
26 debug("keyfiles in place and ready for action");
27 }
28- else{
29+ else{
30 this.key_file = null;
31 warning("FamiliarPlayersDB:: problems loading key file - can't go any further");
32 }

Subscribers

People subscribed via source and target branches

to all changes: