Merge lp:~larsu/indicator-messages/fix-blacklist into lp:indicator-messages/0.3
Status: | Merged |
---|---|
Approved by: | Ted Gould on 2012-03-21 |
Approved revision: | 253 |
Merged at revision: | 259 |
Proposed branch: | lp:~larsu/indicator-messages/fix-blacklist |
Merge into: | lp:indicator-messages/0.3 |
Diff against target: |
99 lines (+22/-23) 1 file modified
src/messages-service.c (+22/-23) |
To merge this branch: | bzr merge lp:~larsu/indicator-messages/fix-blacklist |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ted Gould (community) | 2012-02-23 | Approve on 2012-03-21 | |
Review via email:
|
Description of the change
The blacklist hash map used desktop file contents as keys, but checked for file paths when checking whether an etnry should be hidden. This patch makes it use the link target, which should be something in /usr/share/
I'm not sure about this approach though. Maybe someone with more insight into i-messages can tell me whether this makes sense at all.
Also, hidden menuitems are still visible for me (only the label is gone). A bug in libindicator?
Lars Karlitski (larsu) wrote : | # |
To be honest, I think this whole approach is kind of clunky and error-prone. Can't we just use a gsetting for that (like unity-panel-service does for the system tray whitelist)? This would make the i-messages code a lot cleaner and also make it easier for users to edit the blacklist.
Ted Gould (ted) wrote : | # |
On Fri, 2012-03-09 at 10:22 +0000, Lars Uebernickel wrote:
> To be honest, I think this whole approach is kind of clunky and
> error-prone.. Can't we just use a gsetting for that (like
> unity-panel-service does for the system tray whitelist)? This would
> make the i-messages code a lot cleaner and also make it easier for
> users to edit the blacklist.
The problem with using lists in GSettings is that it's impossible to
upgrade them. If a user ever sets that list, the default is
unreachable. By using directories we get this "merging" feature for
free. It's on the slate to make it into DConf at some point, but we
haven't budgeted the time for that yet.
Also, when this code was written GSettings didn't exist :-)
I think if we use the directory listing like this "list of keys" we're
almost doing the same thing, although not as cleanly for sure.
- 253. By Lars Karlitski on 2012-03-14
-
Use basename of the desktop file as key in the blacklist hash table
This is superior to using symlinks, as this also allows copying the desktop
files into the blacklist directory. Copying is the default when dragging and
dropping an application into that folder.
Lars Karlitski (larsu) wrote : | # |
Pushed a fix that uses basenames instead of symlink targets.
By the way, applications that are running are always displayed, even if they are in the blacklist. Is that correct or also a bug? (Or did I introduce this with my patch?)
Ted Gould (ted) wrote : | # |
Nope, that's been there. I kinda feel if the application is putting itself there, you either need to disable that in the app, but it's not our responsibility to not show it. Looks good!
I think that instead of using the symlink targets we should probably use basename's to match the desktop file names. I think that some people might have done a copy of the desktop files instead of linking them, while I think linking would be better, I don't think we can use that alone.