diff options
author | Claudio Saavedra <csaavedra@igalia.com> | 2012-05-09 23:22:40 +0800 |
---|---|---|
committer | Claudio Saavedra <csaavedra@igalia.com> | 2012-06-20 03:15:47 +0800 |
commit | f676e68517dd300f6537ee15bd747665d6f05163 (patch) | |
tree | 2632c691b001f9b063723c8a37446d133284c08a /src | |
parent | 3916712fac2b29e3825058288954f771a7fb3709 (diff) | |
download | gsoc2013-epiphany-f676e68517dd300f6537ee15bd747665d6f05163.tar gsoc2013-epiphany-f676e68517dd300f6537ee15bd747665d6f05163.tar.gz gsoc2013-epiphany-f676e68517dd300f6537ee15bd747665d6f05163.tar.bz2 gsoc2013-epiphany-f676e68517dd300f6537ee15bd747665d6f05163.tar.lz gsoc2013-epiphany-f676e68517dd300f6537ee15bd747665d6f05163.tar.xz gsoc2013-epiphany-f676e68517dd300f6537ee15bd747665d6f05163.tar.zst gsoc2013-epiphany-f676e68517dd300f6537ee15bd747665d6f05163.zip |
ephy-location-controller: add a boolean "show-icon" property
https://bugzilla.gnome.org/show_bug.cgi?id=678405
Diffstat (limited to 'src')
-rw-r--r-- | src/ephy-location-controller.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/ephy-location-controller.c b/src/ephy-location-controller.c index aed7e9c98..f0a7a60c3 100644 --- a/src/ephy-location-controller.c +++ b/src/ephy-location-controller.c @@ -54,6 +54,7 @@ struct _EphyLocationControllerPrivate GdkPixbuf *icon; char *lock_stock_id; guint editable : 1; + guint show_icon : 1; guint show_lock : 1; gboolean sync_address_is_blocked; }; @@ -73,6 +74,7 @@ enum PROP_ADDRESS, PROP_EDITABLE, PROP_ICON, + PROP_SHOW_ICON, PROP_LOCK_STOCK, PROP_SHOW_LOCK, PROP_WINDOW, @@ -381,6 +383,10 @@ ephy_location_controller_constructed (GObject *object) priv->location_entry, "favicon", G_BINDING_SYNC_CREATE); + g_object_bind_property (controller, "show-icon", + priv->location_entry, "show-favicon", + G_BINDING_SYNC_CREATE); + g_object_bind_property (controller, "lock-stock-id", priv->location_entry, "lock-stock-id", G_BINDING_SYNC_CREATE); @@ -430,6 +436,9 @@ ephy_location_controller_set_property (GObject *object, } priv->icon = GDK_PIXBUF (g_value_dup_object (value)); break; + case PROP_SHOW_ICON: + priv->show_icon = g_value_get_boolean (value); + break; case PROP_LOCK_STOCK: g_free (priv->lock_stock_id); priv->lock_stock_id = g_value_dup_string (value); @@ -572,6 +581,19 @@ ephy_location_controller_class_init (EphyLocationControllerClass *class) G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); /** + * EphyLocationController:show-icon: + * + * If we should show the page icon. + */ + g_object_class_install_property (object_class, + PROP_SHOW_ICON, + g_param_spec_boolean ("show-icon", + "Show Icon", + "Whether to show the favicon", + TRUE, + G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); + + /** * EphyLocationController:lock-stock-id: * * Stock id of the security icon. |