[Xfce4-commits] <midori:master> Replace katze_object_has_property with real type checks
Christian Dywan
noreply at xfce.org
Thu Mar 7 19:48:02 CET 2013
Updating branch refs/heads/master
to cfcc14ae275c2c09a211ed8fc0946f1012804471 (commit)
from 7bdebfcc54ee83a74b70acd7dbffdf7d0d6bec39 (commit)
commit cfcc14ae275c2c09a211ed8fc0946f1012804471
Author: Christian Dywan <christian at twotoasts.de>
Date: Thu Mar 7 19:47:03 2013 +0100
Replace katze_object_has_property with real type checks
katze/katze-utils.c | 23 -----------------------
katze/katze-utils.h | 4 ----
midori/midori-preferences.c | 2 +-
midori/midori-view.c | 2 +-
4 files changed, 2 insertions(+), 29 deletions(-)
diff --git a/katze/katze-utils.c b/katze/katze-utils.c
index f1a1b7e..0bd45f4 100644
--- a/katze/katze-utils.c
+++ b/katze/katze-utils.c
@@ -1086,29 +1086,6 @@ katze_skip_whitespace (const gchar* str)
}
/**
- * katze_object_has_property:
- * @object: a #GObject
- * @property: the name of the property
- *
- * Determine if @object has a property with the specified name.
- *
- * Return value: a boolean
- *
- * Since: 0.1.2
- **/
-gboolean
-katze_object_has_property (gpointer object,
- const gchar* property)
-{
- GObjectClass* class;
-
- g_return_val_if_fail (G_IS_OBJECT (object), FALSE);
-
- class = G_OBJECT_GET_CLASS (object);
- return g_object_class_find_property (class, property) != NULL;
-}
-
-/**
* katze_object_get_boolean:
* @object: a #GObject
* @property: the name of the property to get
diff --git a/katze/katze-utils.h b/katze/katze-utils.h
index 3bdc59c..7638c40 100644
--- a/katze/katze-utils.h
+++ b/katze/katze-utils.h
@@ -112,10 +112,6 @@ katze_strip_mnemonics (const gchar* original);
const gchar*
katze_skip_whitespace (const gchar* str);
-gboolean
-katze_object_has_property (gpointer object,
- const gchar* property);
-
gint
katze_object_get_boolean (gpointer object,
const gchar* property);
diff --git a/midori/midori-preferences.c b/midori/midori-preferences.c
index 28cb2a4..3749ea3 100644
--- a/midori/midori-preferences.c
+++ b/midori/midori-preferences.c
@@ -307,7 +307,7 @@ midori_preferences_set_settings (MidoriPreferences* preferences,
INDENTED_ADD (label);
entry = katze_property_proxy (settings, "homepage", "address");
SPANNED_ADD (entry);
- if (parent && katze_object_has_property (parent, "uri"))
+ if (parent && MIDORI_IS_BROWSER (parent))
{
#if 0
button = gtk_button_new_with_mnemonic (_("Use _current page"));
diff --git a/midori/midori-view.c b/midori/midori-view.c
index ea35454..3d71470 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -2614,7 +2614,7 @@ midori_view_populate_popup (MidoriView* view,
window = gtk_widget_get_toplevel (GTK_WIDGET (web_view));
i = 0;
- if (katze_object_has_property (window, "search-engines"))
+ if (MIDORI_IS_BROWSER (window))
search_engines = katze_object_get_object (window, "search-engines");
if (search_engines != NULL)
More information about the Xfce4-commits
mailing list