Merge lp:~l-admin-3/switchboard-plug-applications/applications-plug-check-visibility into lp:~elementary-pantheon/switchboard-plug-applications/trunk

Proposed by Marcus Wichelmann
Status: Merged
Approved by: kay van der Zander
Approved revision: 116
Merged at revision: 122
Proposed branch: lp:~l-admin-3/switchboard-plug-applications/applications-plug-check-visibility
Merge into: lp:~elementary-pantheon/switchboard-plug-applications/trunk
Diff against target: 27 lines (+3/-7)
1 file modified
src/Startup/Controller.vala (+3/-7)
To merge this branch: bzr merge lp:~l-admin-3/switchboard-plug-applications/applications-plug-check-visibility
Reviewer Review Type Date Requested Status
kay van der Zander (community) Approve
Review via email: mp+281425@code.launchpad.net

Commit message

Check for NoDisplay key in autostart files

Description of the change

Check for visibility of autostart files the same way like for application files.

To post a comment you must log in.
Revision history for this message
kay van der Zander (kay20) wrote :

i allow the old if code style :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Startup/Controller.vala'
2--- src/Startup/Controller.vala 2014-07-31 15:53:17 +0000
3+++ src/Startup/Controller.vala 2015-12-30 11:44:56 +0000
4@@ -30,8 +30,9 @@
5
6 void setup_view () {
7 foreach (var path in Utils.get_auto_start_files ()) {
8- var app_info = get_app_info_from_path (path);
9- view.add_app (app_info);
10+ var key_file = get_key_file_from_path (path);
11+ if (key_file.show)
12+ view.add_app (key_file.create_app_info ());
13 }
14
15 var app_infos = new Gee.ArrayList <Entity.AppInfo?> ();
16@@ -44,11 +45,6 @@
17 view.init_app_chooser (app_infos);
18 }
19
20- Entity.AppInfo get_app_info_from_path (string path) {
21- var key_file = get_key_file_from_path (path);
22- return key_file.create_app_info ();
23- }
24-
25 void connect_signals () {
26 monitor.file_created.connect (add_app_to_view);
27 monitor.file_deleted.connect (remove_app_from_view);

Subscribers

People subscribed via source and target branches