plugin-base: remove the SORT_LAST property

Plugins that need to get sorted last by the PluginManager can now be determined
just by looking at the post probing filters.
This commit is contained in:
Aleksander Morgado
2012-03-16 14:53:18 +01:00
parent 03fbdece71
commit 1701230f51
3 changed files with 4 additions and 21 deletions
-1
View File
@@ -101,7 +101,6 @@ mm_plugin_create (void)
MM_PLUGIN_BASE_ALLOWED_VENDOR_STRINGS, vendor_strings,
MM_PLUGIN_BASE_ALLOWED_VENDOR_IDS, vendor_ids,
MM_PLUGIN_BASE_ALLOWED_AT, TRUE,
MM_PLUGIN_BASE_SORT_LAST, TRUE,
NULL));
}
-1
View File
@@ -110,7 +110,6 @@ mm_plugin_create (void)
MM_PLUGIN_BASE_ALLOWED_PRODUCT_STRINGS, product_strings,
MM_PLUGIN_BASE_ALLOWED_VENDOR_IDS, vendor_ids,
MM_PLUGIN_BASE_ALLOWED_AT, TRUE,
MM_PLUGIN_BASE_SORT_LAST, TRUE,
NULL));
}
+4 -19
View File
@@ -57,7 +57,6 @@ typedef struct {
gchar *name;
GUdevClient *client;
GHashTable *tasks;
gboolean sort_last;
/* Plugin-specific setups */
gchar **subsystems;
@@ -87,7 +86,6 @@ enum {
PROP_ALLOWED_QCDM,
PROP_CUSTOM_INIT,
PROP_SEND_DELAY,
PROP_SORT_LAST,
LAST_PROP
};
@@ -206,7 +204,10 @@ get_name (MMPlugin *plugin)
static gboolean
get_sort_last (const MMPlugin *plugin)
{
return MM_PLUGIN_BASE_GET_PRIVATE (plugin)->sort_last;
MMPluginBasePrivate *priv = MM_PLUGIN_BASE_GET_PRIVATE (plugin);
/* If we have any post-probing filter, we need to sort the plugin last */
return (priv->vendor_strings || priv->product_strings);
}
static char *
@@ -824,10 +825,6 @@ set_property (GObject *object, guint prop_id,
/* Construct only */
priv->send_delay = (guint64)g_value_get_uint64 (value);
break;
case PROP_SORT_LAST:
/* Construct only */
priv->sort_last = g_value_get_boolean (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -877,9 +874,6 @@ get_property (GObject *object, guint prop_id,
case PROP_SEND_DELAY:
g_value_set_uint64 (value, priv->send_delay);
break;
case PROP_SORT_LAST:
g_value_set_boolean (value, priv->sort_last);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -1018,13 +1012,4 @@ mm_plugin_base_class_init (MMPluginBaseClass *klass)
"in microseconds",
0, G_MAXUINT64, 100000,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
g_object_class_install_property
(object_class, PROP_SORT_LAST,
g_param_spec_boolean (MM_PLUGIN_BASE_SORT_LAST,
"Sort Last",
"Whether the plugin should be sorted last in the"
"list of plugins loaded",
FALSE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
}