Skip to content

Commit a6d91fe

Browse files
PluginsManager: cleanups (#1562)
Co-authored-by: Leonardo Lemos <leonardolemos@live.com>
1 parent dd75c21 commit a6d91fe

1 file changed

Lines changed: 8 additions & 12 deletions

File tree

src/Services/PluginManager.vala

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,6 @@ namespace Scratch.Services {
6565
}
6666

6767
public class PluginsManager : GLib.Object {
68-
Peas.Engine engine;
69-
Peas.ExtensionSet exts;
70-
71-
public Interface plugin_iface { private set; public get; }
72-
public weak MainWindow window {get; construct; }
73-
74-
// Signals
7568
public signal void hook_window (Scratch.MainWindow window);
7669
public signal void hook_share_menu (GLib.MenuModel menu);
7770
public signal void hook_toolbar (Scratch.HeaderBar toolbar);
@@ -82,10 +75,13 @@ namespace Scratch.Services {
8275
public signal void extension_added (Peas.PluginInfo info);
8376
public signal void extension_removed (Peas.PluginInfo info);
8477

78+
private Peas.Engine engine;
79+
80+
public weak MainWindow window { get; construct; }
81+
public Interface plugin_iface { get; private set; }
82+
8583
public PluginsManager (MainWindow _window) {
86-
Object (
87-
window: _window
88-
);
84+
Object (window: _window);
8985
}
9086

9187
construct {
@@ -98,7 +94,7 @@ namespace Scratch.Services {
9894
Scratch.settings.bind ("plugins-enabled", engine, "loaded-plugins", SettingsBindFlags.DEFAULT);
9995

10096
/* Our extension set */
101-
exts = new Peas.ExtensionSet.with_properties (
97+
var exts = new Peas.ExtensionSet.with_properties (
10298
engine,
10399
typeof (ActivatablePlugin),
104100
{"object"},
@@ -143,7 +139,7 @@ namespace Scratch.Services {
143139
});
144140
}
145141

146-
void on_extension_foreach (Peas.ExtensionSet exts, Peas.PluginInfo info, Object ext, void* data) {
142+
private void on_extension_foreach (Peas.ExtensionSet exts, Peas.PluginInfo info, Object ext, void* data) {
147143
((ActivatablePlugin)ext).activate ();
148144
}
149145

0 commit comments

Comments
 (0)