Skip to content
Merged
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
2 changes: 1 addition & 1 deletion lib/Drawing/StyleManager.vala
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class Gala.Drawing.StyleManager : Object {

private static GLib.Once<StyleManager> instance;
public static StyleManager get_instance () {
return instance.once (() => {return new StyleManager ();});
return instance.once (() => new StyleManager ());
}

public ColorScheme prefers_color_scheme { get; private set; default = LIGHT; }
Expand Down
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 (() => 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 (() => new PluginManager ());
}

public delegate PluginInfo RegisterPluginFunction ();
Expand Down
2 changes: 1 addition & 1 deletion src/Widgets/MultitaskingView/StaticWindowContainer.vala
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
public class Gala.StaticWindowContainer : ActorTarget {
private static GLib.Once<StaticWindowContainer> instance;
public static StaticWindowContainer get_instance (Meta.Display display) {
return instance.once (() => { return new StaticWindowContainer (display); });
return instance.once (() => new StaticWindowContainer (display));
}

public signal void window_changed (Meta.Window window, bool is_static);
Expand Down
2 changes: 1 addition & 1 deletion src/WindowDragProvider.vala
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
public class Gala.WindowDragProvider : Object {
private static GLib.Once<WindowDragProvider> instance;
public static WindowDragProvider get_instance () {
return instance.once (() => { return new WindowDragProvider (); });
return instance.once (() => new WindowDragProvider ());
}

public signal void enter (uint64 window_id);
Expand Down