Upon closer consideration the property "preferences" is redundant

This commit is contained in:
André Stösel 2011-06-08 20:16:55 +02:00 committed by Christian Dywan
parent 092834f65e
commit 037db65a38
2 changed files with 2 additions and 31 deletions

View file

@ -29,7 +29,6 @@ struct _MidoriExtensionPrivate
gchar* version; gchar* version;
gchar* authors; gchar* authors;
gchar* website; gchar* website;
gboolean preferences;
MidoriApp* app; MidoriApp* app;
gint active; gint active;
@ -132,8 +131,7 @@ enum
PROP_DESCRIPTION, PROP_DESCRIPTION,
PROP_VERSION, PROP_VERSION,
PROP_AUTHORS, PROP_AUTHORS,
PROP_WEBSITE, PROP_WEBSITE
PROP_PREFERENCES
}; };
enum { enum {
@ -266,22 +264,6 @@ midori_extension_class_init (MidoriExtensionClass* class)
NULL, NULL,
flags)); flags));
/**
* MidoriExtension:preferences:
*
* True if the extension can handle the preferences signal.
*
* Since: 0.4.0
*/
g_object_class_install_property (gobject_class,
PROP_PREFERENCES,
g_param_spec_boolean (
"preferences",
"Preferences",
"True if the extension can handle the preferences signal.",
FALSE,
flags));
g_type_class_add_private (class, sizeof (MidoriExtensionPrivate)); g_type_class_add_private (class, sizeof (MidoriExtensionPrivate));
} }
@ -446,9 +428,6 @@ midori_extension_set_property (GObject* object,
case PROP_WEBSITE: case PROP_WEBSITE:
katze_assign (extension->priv->website, g_value_dup_string (value)); katze_assign (extension->priv->website, g_value_dup_string (value));
break; break;
case PROP_PREFERENCES:
extension->priv->preferences = g_value_get_boolean (value);
break;
default: default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break; break;
@ -480,9 +459,6 @@ midori_extension_get_property (GObject* object,
case PROP_WEBSITE: case PROP_WEBSITE:
g_value_set_string (value, extension->priv->website); g_value_set_string (value, extension->priv->website);
break; break;
case PROP_PREFERENCES:
g_value_set_boolean (value, extension->priv->preferences);
break;
default: default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break; break;
@ -524,10 +500,7 @@ midori_extension_has_preferences (MidoriExtension* extension)
{ {
g_return_val_if_fail (MIDORI_IS_EXTENSION (extension), FALSE); g_return_val_if_fail (MIDORI_IS_EXTENSION (extension), FALSE);
if (extension->priv->preferences return g_signal_has_handler_pending (extension, signals[OPEN_PREFERENCES], 0, FALSE);
&& g_signal_has_handler_pending (extension, signals[OPEN_PREFERENCES], 0, FALSE))
return TRUE;
return FALSE;
} }
/** /**

View file

@ -101,8 +101,6 @@ namespace Midori {
public string version { get; set; } public string version { get; set; }
[NoAccessorMethod] [NoAccessorMethod]
public string authors { get; set; } public string authors { get; set; }
[NoAccessorMethod]
public bool preferences { get; set; }
public signal void activate (Midori.App app); public signal void activate (Midori.App app);
public signal void deactivate (); public signal void deactivate ();