meta-plugin: Remove "disabled" feature

It's just code cruft that nobody's using

https://bugzilla.gnome.org/show_bug.cgi?id=676855
This commit is contained in:
Jasper St. Pierre 2012-04-05 01:25:46 -04:00
parent 9fa5aa9889
commit 574c0c3287
3 changed files with 59 additions and 95 deletions

View File

@ -205,8 +205,7 @@ meta_plugin_manager_kill_window_effects (MetaPluginManager *plugin_mgr,
MetaPlugin *plugin = l->data;
MetaPluginClass *klass = META_PLUGIN_GET_CLASS (plugin);
if (!meta_plugin_disabled (plugin)
&& klass->kill_window_effects)
if (klass->kill_window_effects)
klass->kill_window_effects (plugin, actor);
l = l->next;
@ -223,7 +222,7 @@ meta_plugin_manager_kill_switch_workspace (MetaPluginManager *plugin_mgr)
MetaPlugin *plugin = l->data;
MetaPluginClass *klass = META_PLUGIN_GET_CLASS (plugin);
if (!meta_plugin_disabled (plugin) && klass->kill_switch_workspace)
if (klass->kill_switch_workspace)
klass->kill_switch_workspace (plugin);
l = l->next;
@ -256,16 +255,13 @@ meta_plugin_manager_event_simple (MetaPluginManager *plugin_mgr,
MetaPlugin *plugin = l->data;
MetaPluginClass *klass = META_PLUGIN_GET_CLASS (plugin);
if (!meta_plugin_disabled (plugin))
{
switch (event)
{
case META_PLUGIN_MINIMIZE:
if (klass->minimize)
{
retval = TRUE;
meta_plugin_manager_kill_window_effects (
plugin_mgr,
meta_plugin_manager_kill_window_effects (plugin_mgr,
actor);
_meta_plugin_effect_started (plugin);
@ -276,8 +272,7 @@ meta_plugin_manager_event_simple (MetaPluginManager *plugin_mgr,
if (klass->map)
{
retval = TRUE;
meta_plugin_manager_kill_window_effects (
plugin_mgr,
meta_plugin_manager_kill_window_effects (plugin_mgr,
actor);
_meta_plugin_effect_started (plugin);
@ -295,7 +290,6 @@ meta_plugin_manager_event_simple (MetaPluginManager *plugin_mgr,
default:
g_warning ("Incorrect handler called for event %lu", event);
}
}
l = l->next;
}
@ -333,16 +327,13 @@ meta_plugin_manager_event_maximize (MetaPluginManager *plugin_mgr,
MetaPlugin *plugin = l->data;
MetaPluginClass *klass = META_PLUGIN_GET_CLASS (plugin);
if (!meta_plugin_disabled (plugin))
{
switch (event)
{
case META_PLUGIN_MAXIMIZE:
if (klass->maximize)
{
retval = TRUE;
meta_plugin_manager_kill_window_effects (
plugin_mgr,
meta_plugin_manager_kill_window_effects (plugin_mgr,
actor);
_meta_plugin_effect_started (plugin);
@ -355,8 +346,7 @@ meta_plugin_manager_event_maximize (MetaPluginManager *plugin_mgr,
if (klass->unmaximize)
{
retval = TRUE;
meta_plugin_manager_kill_window_effects (
plugin_mgr,
meta_plugin_manager_kill_window_effects (plugin_mgr,
actor);
_meta_plugin_effect_started (plugin);
@ -368,7 +358,6 @@ meta_plugin_manager_event_maximize (MetaPluginManager *plugin_mgr,
default:
g_warning ("Incorrect handler called for event %lu", event);
}
}
l = l->next;
}
@ -402,7 +391,7 @@ meta_plugin_manager_switch_workspace (MetaPluginManager *plugin_mgr,
MetaPlugin *plugin = l->data;
MetaPluginClass *klass = META_PLUGIN_GET_CLASS (plugin);
if (!meta_plugin_disabled (plugin) && klass->switch_workspace)
if (klass->switch_workspace)
{
retval = TRUE;
meta_plugin_manager_kill_switch_workspace (plugin_mgr);

View File

@ -44,7 +44,6 @@ enum
{
PROP_0,
PROP_SCREEN,
PROP_DISABLED,
PROP_DEBUG_MODE,
};
@ -54,7 +53,6 @@ struct _MetaPluginPrivate
gint running;
gboolean disabled : 1;
gboolean debug : 1;
};
@ -71,9 +69,6 @@ meta_plugin_set_property (GObject *object,
case PROP_SCREEN:
priv->screen = g_value_get_object (value);
break;
case PROP_DISABLED:
priv->disabled = g_value_get_boolean (value);
break;
case PROP_DEBUG_MODE:
priv->debug = g_value_get_boolean (value);
break;
@ -96,9 +91,6 @@ meta_plugin_get_property (GObject *object,
case PROP_SCREEN:
g_value_set_object (value, priv->screen);
break;
case PROP_DISABLED:
g_value_set_boolean (value, priv->disabled);
break;
case PROP_DEBUG_MODE:
g_value_set_boolean (value, priv->debug);
break;
@ -125,14 +117,6 @@ meta_plugin_class_init (MetaPluginClass *klass)
META_TYPE_SCREEN,
G_PARAM_READWRITE));
g_object_class_install_property (gobject_class,
PROP_DISABLED,
g_param_spec_boolean ("disabled",
"Plugin disabled",
"Plugin disabled",
FALSE,
G_PARAM_READWRITE));
g_object_class_install_property (gobject_class,
PROP_DEBUG_MODE,
g_param_spec_boolean ("debug-mode",
@ -152,14 +136,6 @@ meta_plugin_init (MetaPlugin *self)
self->priv = priv = META_PLUGIN_GET_PRIVATE (self);
}
gboolean
meta_plugin_disabled (MetaPlugin *plugin)
{
MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
return priv->disabled;
}
gboolean
meta_plugin_running (MetaPlugin *plugin)
{

View File

@ -123,7 +123,6 @@ struct _MetaPluginInfo
GType meta_plugin_get_type (void);
gboolean meta_plugin_disabled (MetaPlugin *plugin);
gboolean meta_plugin_running (MetaPlugin *plugin);
gboolean meta_plugin_debug_mode (MetaPlugin *plugin);