Skip to content

Commit

Permalink
Make PluginSettings GType, compact does not work
Browse files Browse the repository at this point in the history
  • Loading branch information
rilian-la-te committed Apr 28, 2015
1 parent 6facc4f commit 3bb506d
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions lib/plugin-settings.vala
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,12 @@ namespace ValaPanel
internal static const string PACK = "pack-type";
internal static const string POSITION = "position";
}
[Compact, CCode (ref_function = "vala_panel_plugin_settings_ref", unref_function = "vala_panel_plugin_settings_unref")]
internal class PluginSettings
{
internal string path_append;
internal GLib.Settings default_settings;
internal GLib.Settings config_settings;
internal uint number;
internal int ref_count = 1;

internal PluginSettings(ToplevelSettings settings, string name, uint num)
{
Expand All @@ -44,19 +42,7 @@ namespace ValaPanel
id, settings.backend, path);
}
}
public unowned PluginSettings @ref ()
{
GLib.AtomicInt.add (ref this.ref_count, 1);
return this;
}
public void unref ()
{
if (GLib.AtomicInt.dec_and_test (ref this.ref_count))
this.free ();
}
private extern void free ();
}
[Compact, CCode (ref_function = "vala_panel_toplevel_settings_ref", unref_function = "vala_panel_toplevel_settings_unref")]
internal class ToplevelSettings
{
internal unowned GLib.SList<PluginSettings> plugins;
Expand All @@ -66,7 +52,6 @@ namespace ValaPanel
internal string root_name;
internal string root_schema;
internal string root_path;
internal int ref_count;
internal ToplevelSettings.full(string file, string schema, string path, string? root)
{
this.filename = file;
Expand Down Expand Up @@ -179,16 +164,5 @@ namespace ValaPanel
return pl;
return null;
}
public unowned ToplevelSettings @ref ()
{
GLib.AtomicInt.add (ref this.ref_count, 1);
return this;
}
public void unref ()
{
if (GLib.AtomicInt.dec_and_test (ref this.ref_count))
this.free ();
}
private extern void free ();
}
}

0 comments on commit 3bb506d

Please sign in to comment.