Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
13 changes: 2 additions & 11 deletions src/Background/BackgroundCache.vala
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,17 @@
*/

public class Gala.BackgroundCache : Object {
private static BackgroundCache? instance = null;

private static GLib.Once<BackgroundCache> instance;
public static unowned BackgroundCache get_default () {
if (instance == null)
instance = new BackgroundCache ();

return instance;
return instance.once (() => { return new BackgroundCache (); });
}

public signal void file_changed (string filename);

private Gee.HashMap<string,FileMonitor> file_monitors;
private BackgroundSource background_source;

private Animation animation;

public BackgroundCache () {
Object ();
}

construct {
file_monitors = new Gee.HashMap<string,FileMonitor> ();
}
Expand Down
7 changes: 2 additions & 5 deletions src/PluginManager.vala
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,9 @@
*/

public class Gala.PluginManager : Object {
private static PluginManager? instance = null;
private static GLib.Once<PluginManager> instance;
public static unowned PluginManager get_default () {
if (instance == null)
instance = new PluginManager ();

return instance;
return instance.once (() => { return new PluginManager (); });
}

public delegate PluginInfo RegisterPluginFunction ();
Expand Down