if (plugin != null) {
if (old_owner != "" && new_owner == "") {
- debug ("Service '%s' going down, marking it as unavailable",
+ debug ("Service '%s' going down, deactivating it",
name);
- plugin.available = false;
+ plugin.active = false;
} else if (old_owner == "" && new_owner != "") {
- debug ("Service '%s' up again, marking it as available", name);
- plugin.available = true;
+ debug ("Service '%s' up again, activating it", name);
+ plugin.active = true;
}
} else if (name.has_prefix (SERVICE_PREFIX)) {
// Ah, new plugin available, lets use it
public void on_plugin_available (Plugin plugin, Plugin our_plugin) {
if (plugin.name == TRACKER_PLUGIN &&
- our_plugin.available == plugin.available) {
- if (plugin.available) {
- message ("Disabling plugin '%s' in favor of plugin '%s'",
+ our_plugin.active == plugin.active) {
+ if (plugin.active) {
+ message ("Deactivating plugin '%s' in favor of plugin '%s'",
OUR_PLUGIN,
TRACKER_PLUGIN);
try {
}
} catch (Error error) {};
} else {
- message ("Plugin '%s' disabled, enabling '%s' plugin",
+ message ("Plugin '%s' inactivate, activating '%s' plugin",
TRACKER_PLUGIN,
OUR_PLUGIN);
}
- our_plugin.available = !plugin.available;
+ our_plugin.active = !plugin.active;
}
}
warning ("Could not create root container: %s. " +
"Disabling plugin",
error.message);
- this.available = false;
+ this.active = false;
}
return new NullContainer ();
if (plugin != null) {
if (old_owner != "" && new_owner == "") {
- debug ("Service '%s' going down, marking it as unavailable",
+ debug ("Service '%s' going down, Deactivating it",
name);
- plugin.available = false;
+ plugin.active = false;
} else if (old_owner == "" && new_owner != "") {
- debug ("Service '%s' up again, marking it as available", name);
- plugin.available = true;
+ debug ("Service '%s' up again, activating it", name);
+ plugin.active = true;
}
} else if (name.has_prefix (SERVICE_PREFIX)) {
// Ah, new plugin available, lets use it
try {
var device = factory.create (plugin);
- device.available = plugin.available;
+ device.available = plugin.active;
this.root_devices.add (device);
- plugin.notify["available"].connect (this.on_plugin_notify);
+ plugin.notify["active"].connect (this.on_plugin_active_notify);
} catch (GLib.Error error) {
warning (_("Failed to create RootDevice for %s. Reason: %s"),
plugin.name,
}
}
- private void on_plugin_notify (Object obj,
- ParamSpec spec) {
+ private void on_plugin_active_notify (Object obj,
+ ParamSpec spec) {
var plugin = obj as Plugin;
foreach (var device in this.root_devices) {
if (device.resource_factory == plugin) {
- device.available = plugin.available;
+ device.available = plugin.active;
}
}
}
// Path to description document
public string desc_path;
- public bool available { get; set; }
+ public bool active { get; set; }
public ArrayList<ResourceInfo> resource_infos;
public ArrayList<IconInfo> icon_infos;
this.title = title;
this.description = description;
- this.available = true;
+ this.active = true;
if (title == null) {
this.title = name;