epiphany r8802 - trunk/lib/widgets



Author: xan
Date: Sun Feb 22 16:31:03 2009
New Revision: 8802
URL: http://svn.gnome.org/viewvc/epiphany?rev=8802&view=rev

Log:
ephy-location-entry: fix security icon visibility.

GtkEntry has no distinction between the visibility of the icons and
the icon to be used, meaning that the way to make them invisible is to
unset them. Keep a private boolean with the visibility status so we
can update our icon type without altering its visibility.

Modified:
   trunk/lib/widgets/ephy-location-entry.c

Modified: trunk/lib/widgets/ephy-location-entry.c
==============================================================================
--- trunk/lib/widgets/ephy-location-entry.c	(original)
+++ trunk/lib/widgets/ephy-location-entry.c	Sun Feb 22 16:31:03 2009
@@ -71,6 +71,7 @@
 	guint secure : 1;
 	guint apply_colours : 1;
 	guint needs_reset : 1;
+	guint show_lock : 1;
 };
 
 static const GtkTargetEntry url_drag_types [] =
@@ -975,6 +976,7 @@
 	p->block_update = FALSE;
 	p->saved_text = NULL;
 	p->search_terms = NULL;
+	p->show_lock = FALSE;
 	
 	ephy_location_entry_construct_contents (le);
 
@@ -1576,6 +1578,8 @@
 
 	priv = entry->priv;
 
+	priv->show_lock = show_lock != FALSE;
+
 	gtk_entry_set_icon_from_stock (GTK_ENTRY (priv->entry),
 				       GTK_ENTRY_ICON_SECONDARY,
 				       show_lock ? priv->lock_stock_id : NULL);
@@ -1599,9 +1603,10 @@
 
 	entry->priv->lock_stock_id = (char*)stock_id;
 
-	gtk_entry_set_icon_from_stock (GTK_ENTRY (entry->priv->entry),
-				       GTK_ENTRY_ICON_SECONDARY,
-				       stock_id);
+	if (entry->priv->show_lock)
+		gtk_entry_set_icon_from_stock (GTK_ENTRY (entry->priv->entry),
+					       GTK_ENTRY_ICON_SECONDARY,
+					       stock_id);
 }
 
 /**



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