aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2012-02-28 22:48:00 +0100
committerAleksander Morgado <aleksander@lanedo.com>2012-03-16 14:53:18 +0100
commit1701230f5164087bd7c279c35c8797ae1e80f0d5 (patch)
tree5a5035f97c1b067302ad90c24801284e54da8b8e
parent03fbdece7178d3b65e4a8ed2825dc45b4c9527ff (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.
-rw-r--r--plugins/cinterion/mm-plugin-cinterion.c1
-rw-r--r--plugins/iridium/mm-plugin-iridium.c1
-rw-r--r--src/mm-plugin-base.c23
3 files changed, 4 insertions, 21 deletions
diff --git a/plugins/cinterion/mm-plugin-cinterion.c b/plugins/cinterion/mm-plugin-cinterion.c
index d6aa54cd..e712d692 100644
--- a/plugins/cinterion/mm-plugin-cinterion.c
+++ b/plugins/cinterion/mm-plugin-cinterion.c
@@ -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));
}
diff --git a/plugins/iridium/mm-plugin-iridium.c b/plugins/iridium/mm-plugin-iridium.c
index b461ca61..1bfaf522 100644
--- a/plugins/iridium/mm-plugin-iridium.c
+++ b/plugins/iridium/mm-plugin-iridium.c
@@ -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));
}
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));
}