Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 2 additions & 17 deletions lib/PlugsManager.vala
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,8 @@ public class Switchboard.PlugsManager : GLib.Object {

private PlugsManager () {
plugs = new Gee.LinkedList<Switchboard.Plug> ();

string[] prefixes = {
"/usr",
"/usr/local"
Comment on lines -41 to -42

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a random thought but doesn't it work even if you change the order of these two paths?

};
string[] plugin_paths = {};
foreach (unowned string prefix in prefixes) {
var plugin_dir = Path.build_filename (prefix, Build.LIB_DIR, "switchboard-3") + "/";
if (FileUtils.test (plugin_dir, FileTest.EXISTS)) {
debug ("Found plugin directory: %s", plugin_dir);
plugin_paths += plugin_dir ;
}
}

foreach (unowned string path in plugin_paths) {
find_plugins (File.new_for_path (path));
}
var base_folder = File.new_for_path (Build.PLUGS_DIR);
find_plugins (base_folder);
}

private void load (string path) {
Expand Down
1 change: 0 additions & 1 deletion lib/config.vapi
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[CCode (cprefix = "", lower_case_cprefix = "", cheader_filename = "config.h")]
namespace Build {
public const string PLUGS_DIR;
public const string LIB_DIR;
}
1 change: 0 additions & 1 deletion lib/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ config_vapi = meson.get_compiler('vala').find_library('config', dirs: meson.curr

config_data = configuration_data()
config_data.set_quoted('PLUGS_DIR', plugs_dir)
config_data.set_quoted('LIB_DIR', get_option('libdir'))

config_header = configure_file(
configuration: config_data,
Expand Down
Loading