[Xfce4-commits] <midori:master> Upon closer consideration the property "preferences" is redundant

Christian Dywan noreply at xfce.org
Wed Jun 8 20:26:06 CEST 2011


Updating branch refs/heads/master
         to 037db65a3872433ff3fcdfb20be139a34447b5e4 (commit)
       from 092834f65e7821610d190b0ca8567c887375c5a5 (commit)

commit 037db65a3872433ff3fcdfb20be139a34447b5e4
Author: André Stösel <andre at stoesel.de>
Date:   Wed Jun 8 20:16:55 2011 +0200

    Upon closer consideration the property "preferences" is redundant

 midori/midori-extension.c |   31 ++-----------------------------
 midori/midori.vapi        |    2 --
 2 files changed, 2 insertions(+), 31 deletions(-)

diff --git a/midori/midori-extension.c b/midori/midori-extension.c
index 7bf40f9..4eb83ef 100644
--- a/midori/midori-extension.c
+++ b/midori/midori-extension.c
@@ -29,7 +29,6 @@ struct _MidoriExtensionPrivate
     gchar* version;
     gchar* authors;
     gchar* website;
-    gboolean preferences;
 
     MidoriApp* app;
     gint active;
@@ -132,8 +131,7 @@ enum
     PROP_DESCRIPTION,
     PROP_VERSION,
     PROP_AUTHORS,
-    PROP_WEBSITE,
-    PROP_PREFERENCES
+    PROP_WEBSITE
 };
 
 enum {
@@ -266,22 +264,6 @@ midori_extension_class_init (MidoriExtensionClass* class)
                                      NULL,
                                      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));
 }
 
@@ -446,9 +428,6 @@ midori_extension_set_property (GObject*      object,
     case PROP_WEBSITE:
         katze_assign (extension->priv->website, g_value_dup_string (value));
         break;
-    case PROP_PREFERENCES:
-        extension->priv->preferences = g_value_get_boolean (value);
-        break;
     default:
         G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
         break;
@@ -480,9 +459,6 @@ midori_extension_get_property (GObject*    object,
     case PROP_WEBSITE:
         g_value_set_string (value, extension->priv->website);
         break;
-    case PROP_PREFERENCES:
-        g_value_set_boolean (value, extension->priv->preferences);
-        break;
     default:
         G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
         break;
@@ -524,10 +500,7 @@ midori_extension_has_preferences (MidoriExtension* extension)
 {
     g_return_val_if_fail (MIDORI_IS_EXTENSION (extension), FALSE);
 
-    if (extension->priv->preferences
-        && g_signal_has_handler_pending (extension, signals[OPEN_PREFERENCES], 0, FALSE))
-        return TRUE;
-    return FALSE;
+    return g_signal_has_handler_pending (extension, signals[OPEN_PREFERENCES], 0, FALSE);
 }
 
 /**
diff --git a/midori/midori.vapi b/midori/midori.vapi
index cbf145a..bce0b65 100644
--- a/midori/midori.vapi
+++ b/midori/midori.vapi
@@ -101,8 +101,6 @@ namespace Midori {
         public string version { get; set; }
         [NoAccessorMethod]
         public string authors { get; set; }
-        [NoAccessorMethod]
-        public bool preferences { get; set; }
 
         public signal void activate (Midori.App app);
         public signal void deactivate ();



More information about the Xfce4-commits mailing list