Merge lp:~ballogy/bamf/fix-current-desktop into lp:bamf/0.4
Status: | Merged |
---|---|
Approved by: | Marco Trevisan (Treviño) |
Approved revision: | 504 |
Merged at revision: | 523 |
Proposed branch: | lp:~ballogy/bamf/fix-current-desktop |
Merge into: | lp:bamf/0.4 |
Diff against target: |
38 lines (+11/-2) 1 file modified
src/bamf-matcher.c (+11/-2) |
To merge this branch: | bzr merge lp:~ballogy/bamf/fix-current-desktop |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot (community) | continuous-integration | Approve | |
Marco Trevisan (Treviño) | Approve | ||
Review via email: mp+137762@code.launchpad.net |
Description of the change
This change fixes the following two problems what I experienced while using BAMF on Arch Linux:
1. Fix desktop file table if XDG_CURRENT_DESKTOP environment variable is not available.
Using the vanilla gnome-session without Ubuntu patches, the XDG_CURRENT_DESKTOP is not specified. In this case, all desktop files are ignored which contain the OnlyShowIn property. This isn't the expected behavior, because many GNOME desktop files are ignored in a GNOME session, e.g. nautilus, control center entries. To fix this issue, all desktop files should be added to the desktop file table if no XDG_CURRENT_DESKTOP specified.
2. Fix a critical warning if an empty Exec= line specified in a desktop file.
Without this extra check, the following critical message displayed in this case (e.g. with the unity-scope-
** (bamfdaemon:20159): CRITICAL **: insert_
Thanks for your patch.
27 - if (!exec)
28 + if (!exec || exec[0] == '\0')
In the case that (exec[0] == '\0') you also need to free it.
Overall that's fine. Would you mind also to add a small test case into test-matcher.c?