[epiphany] ephy-location-controller: add a boolean "show-icon" property



commit f676e68517dd300f6537ee15bd747665d6f05163
Author: Claudio Saavedra <csaavedra igalia com>
Date:   Wed May 9 18:22:40 2012 +0300

    ephy-location-controller: add a boolean "show-icon" property
    
    https://bugzilla.gnome.org/show_bug.cgi?id=678405

 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 aed7e9c..f0a7a60 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.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]