diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2012-02-28 22:48:00 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-03-16 14:53:18 +0100 |
commit | 1701230f5164087bd7c279c35c8797ae1e80f0d5 (patch) | |
tree | 5a5035f97c1b067302ad90c24801284e54da8b8e /src | |
parent | 03fbdece7178d3b65e4a8ed2825dc45b4c9527ff (diff) |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/mm-plugin-base.c | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/src/mm-plugin-base.c b/src/mm-plugin-base.c index b9447057..deefcd14 100644 --- a/src/mm-plugin-base.c +++ b/src/mm-plugin-base.c @@ -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)); } |