Index: src/ephy-statusbar.h
===================================================================
--- src/ephy-statusbar.h	(revision 7474)
+++ src/ephy-statusbar.h	(working copy)
@@ -34,6 +34,9 @@ G_BEGIN_DECLS
 #define EPHY_IS_STATUSBAR_CLASS(k)	(G_TYPE_CHECK_CLASS_TYPE ((k), EPHY_TYPE_STATUSBAR))
 #define EPHY_STATUSBAR_GET_CLASS(o)	(G_TYPE_INSTANCE_GET_CLASS ((o), EPHY_TYPE_STATUSBAR, EphyStatusbarClass))
 
+#define EPHY_STATUSBAR_POPUPS_MANAGER_WIDGET "popups_manager"
+#define EPHY_STATUSBAR_SECURITY_WIDGET "security"
+
 typedef struct _EphyStatusbar		EphyStatusbar;
 typedef struct _EphyStatusbarPrivate	EphyStatusbarPrivate;
 typedef struct _EphyStatusbarClass	EphyStatusbarClass;
@@ -52,6 +55,7 @@ struct _EphyStatusbarClass
 
 	/* Signals */
 	void (* lock_clicked)	(EphyStatusbar *statusbar);
+	void (* icon_clicked)	(EphyStatusbar *statusbar, const char *name);
 };
 
 GType         ephy_statusbar_get_type			(void);
@@ -77,6 +81,9 @@ void          ephy_statusbar_set_progres
 void	      ephy_statusbar_add_widget			(EphyStatusbar *statusbar,
 							 GtkWidget *widget);
 
+GtkWidget*	ephy_statusbar_get_widget		(EphyStatusbar *statusbar, 
+							const gchar *name);
+
 void	      ephy_statusbar_remove_widget		(EphyStatusbar *statusbar,
 							 GtkWidget *widget);
 
Index: src/ephy-location-action.c
===================================================================
--- src/ephy-location-action.c	(revision 7474)
+++ src/ephy-location-action.c	(working copy)
@@ -48,9 +48,13 @@ struct _EphyLocationActionPrivate
 	GdkPixbuf *icon;
 	char *lock_stock_id;
 	char *lock_tooltip;
+	char *book_stock_id;
+	char *book_tooltip;
 	guint editable : 1;
 	guint show_lock : 1;
 	guint secure : 1;
+	guint show_book : 1;
+	guint bookmark : 1;
 };
 
 static void ephy_location_action_init       (EphyLocationAction *action);
@@ -72,6 +76,10 @@ enum
 	PROP_LOCK_TOOLTIP,
 	PROP_SECURE,
 	PROP_SHOW_LOCK,
+	PROP_BOOK_STOCK,
+	PROP_BOOK_TOOLTIP,
+	PROP_BOOKMARK,
+	PROP_SHOW_BOOK,
 	PROP_WINDOW
 };
 
@@ -278,6 +286,55 @@ sync_show_lock (GtkAction *gaction,
 	ephy_location_entry_set_show_lock (entry, priv->show_lock);
 }
 
+static void
+sync_book_stock_id (GtkAction *gaction,
+		    GParamSpec *pspec,
+		    GtkWidget *proxy)
+{
+	EphyLocationAction *action = EPHY_LOCATION_ACTION (gaction);
+	EphyLocationActionPrivate *priv = action->priv;
+	EphyLocationEntry *entry = EPHY_LOCATION_ENTRY (proxy);
+
+	ephy_location_entry_set_book_stock (entry, priv->book_stock_id);
+}
+
+static void
+sync_book_tooltip (GtkAction *gaction,
+		   GParamSpec *pspec,
+		   GtkWidget *proxy)
+{
+	EphyLocationAction *action = EPHY_LOCATION_ACTION (gaction);
+	EphyLocationActionPrivate *priv = action->priv;
+	EphyLocationEntry *entry = EPHY_LOCATION_ENTRY (proxy);
+
+	ephy_location_entry_set_book_tooltip (entry, priv->book_tooltip);
+}
+
+static void
+sync_bookmark (GtkAction *gaction,
+	     GParamSpec *pspec,
+	     GtkWidget *proxy)
+{
+	EphyLocationAction *action = EPHY_LOCATION_ACTION (gaction);
+	EphyLocationActionPrivate *priv = action->priv;
+	EphyLocationEntry *entry = EPHY_LOCATION_ENTRY (proxy);
+
+	ephy_location_entry_set_bookmark (entry, priv->bookmark);
+}
+
+static void
+sync_show_book (GtkAction *gaction,
+	        GParamSpec *pspec,
+	        GtkWidget *proxy)
+{
+	EphyLocationAction *action = EPHY_LOCATION_ACTION (gaction);
+	EphyLocationActionPrivate *priv = action->priv;
+	EphyLocationEntry *entry = EPHY_LOCATION_ENTRY (proxy);
+	
+	g_print("sync show_book: %d;\n", priv->show_book);
+	ephy_location_entry_set_show_book (entry, priv->show_book);
+}
+
 static char *
 get_location_cb (EphyLocationEntry *entry,
 		EphyLocationAction *action)
@@ -397,6 +454,18 @@ connect_proxy (GtkAction *action, GtkWid
 		g_signal_connect_object (action, "notify::show-lock",
 					 G_CALLBACK (sync_show_lock), proxy, 0);
 
+		g_signal_connect_object (action, "notify::book-stock-id",
+					 G_CALLBACK (sync_book_stock_id), proxy, 0);
+		sync_lock_tooltip (action, NULL, proxy);
+		g_signal_connect_object (action, "notify::book-tooltip",
+					 G_CALLBACK (sync_book_tooltip), proxy, 0);
+		sync_secure (action, NULL, proxy);
+		g_signal_connect_object (action, "notify::bookmark",
+					 G_CALLBACK (sync_bookmark), proxy, 0);
+		sync_show_lock (action, NULL, proxy);
+		g_signal_connect_object (action, "notify::show-book",
+					 G_CALLBACK (sync_show_book), proxy, 0);
+
 		entry = ephy_location_entry_get_entry (lentry);
 		g_signal_connect_object (entry, "activate",
 					 G_CALLBACK (entry_activate_cb),
@@ -459,6 +528,7 @@ ephy_location_action_set_property (GObje
 			}
 			priv->icon = GDK_PIXBUF (g_value_dup_object (value));
 			break;
+			
 		case PROP_LOCK_STOCK:
 			g_free (priv->lock_stock_id);
 			priv->lock_stock_id = g_value_dup_string (value);
@@ -473,6 +543,22 @@ ephy_location_action_set_property (GObje
 		case PROP_SHOW_LOCK:
 			priv->show_lock = g_value_get_boolean (value);
 			break;
+			
+		case PROP_BOOK_STOCK:
+			g_free (priv->book_stock_id);
+			priv->book_stock_id = g_value_dup_string (value);
+			break;
+		case PROP_BOOK_TOOLTIP:
+			g_free (priv->book_tooltip);
+			priv->book_tooltip = g_value_dup_string (value);
+			break;
+		case PROP_BOOKMARK:
+			priv->bookmark = g_value_get_boolean (value);
+			break;
+		case PROP_SHOW_BOOK:
+			priv->show_book = g_value_get_boolean (value);
+			break;
+			
 		case PROP_WINDOW:
 			priv->window = EPHY_WINDOW (g_value_get_object (value));
 			break;
@@ -511,6 +597,19 @@ ephy_location_action_get_property (GObje
 		case PROP_SHOW_LOCK:
 			g_value_set_boolean (value, priv->show_lock);
 			break;
+		case PROP_BOOK_STOCK:
+			g_value_set_string (value, priv->book_stock_id);
+			break;
+		case PROP_BOOK_TOOLTIP:
+			g_value_set_string (value, priv->book_tooltip);
+			break;
+		case PROP_BOOKMARK:
+			g_value_set_boolean (value, priv->bookmark);
+			break;
+		case PROP_SHOW_BOOK:
+			g_print("get_prop show_book: %d;\n", priv->show_book);
+			g_value_set_boolean (value, priv->show_book);
+			break;
 		case PROP_WINDOW:
 			/* not readable */
 			break;
@@ -599,6 +698,38 @@ ephy_location_action_class_init (EphyLoc
 							       G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB));
 
 	g_object_class_install_property (object_class,
+					 PROP_BOOK_STOCK,
+					 g_param_spec_string  ("book-stock-id",
+							       "Book Stock ID",
+							       "Book Stock ID",
+							       NULL,
+							       G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB));
+
+	g_object_class_install_property (object_class,
+					 PROP_BOOK_TOOLTIP,
+					 g_param_spec_string  ("book-tooltip",
+							       "Book Tooltip",
+							       "The icon",
+							       NULL,
+							       G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB));
+
+	g_object_class_install_property (object_class,
+					 PROP_BOOKMARK,
+					 g_param_spec_boolean ("bookmark",
+							       "Bookmark",
+							       "Bookmark",
+							       FALSE,
+							       G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB));
+
+	g_object_class_install_property (object_class,
+					 PROP_SHOW_BOOK,
+					 g_param_spec_boolean ("show-book",
+							       "Show Book",
+							       "Show Book",
+							       FALSE,
+							       G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB));
+
+	g_object_class_install_property (object_class,
 					 PROP_WINDOW,
 					 g_param_spec_object ("window",
 							      "Window",
Index: src/ephy-toolbar.c
===================================================================
--- src/ephy-toolbar.c	(revision 7474)
+++ src/ephy-toolbar.c	(working copy)
@@ -79,6 +79,8 @@ struct _EphyToolbarPrivate
 	guint updating_address : 1;
 	guint show_lock : 1;
 	guint is_secure : 1;
+	guint show_book : 1;
+	guint is_bookmark : 1;
 	guint leave_fullscreen_visible : 1;
 	guint spinning : 1;
 };
@@ -476,6 +478,16 @@ ephy_toolbar_set_navigation_tooltips (Ep
 	g_value_unset (&value);
 }
 
+gboolean
+ephy_toolbar_get_lock_is_shown (EphyToolbar *toolbar)
+{
+	EphyToolbarPrivate *priv = toolbar->priv;
+	gboolean show_lock = FALSE;
+	show_lock = (gboolean) g_object_get_data (G_OBJECT (priv->actions[LOCATION_ACTION]),
+					"show-lock");
+	return show_lock;
+}
+
 void
 ephy_toolbar_set_security_state (EphyToolbar *toolbar,
 				 gboolean is_secure,
@@ -496,6 +508,36 @@ ephy_toolbar_set_security_state (EphyToo
 		      NULL);
 }
 
+gboolean
+ephy_toolbar_get_book_is_shown (EphyToolbar *toolbar)
+{
+	EphyToolbarPrivate *priv = toolbar->priv;
+	gboolean show_book = FALSE;
+	show_book = (gboolean) g_object_get_data (G_OBJECT (priv->actions[LOCATION_ACTION]),
+					"show-book");
+	return show_book;
+}
+
+void
+ephy_toolbar_set_is_bookmark (EphyToolbar *toolbar,
+				 gboolean is_bookmark,
+				 gboolean show_book,
+				 const char *stock_id,
+				 const char *tooltip)
+{
+	EphyToolbarPrivate *priv = toolbar->priv;
+
+	priv->show_book = show_book != FALSE;
+	priv->is_bookmark = is_bookmark != FALSE;
+
+	g_object_set (priv->actions[LOCATION_ACTION],
+		      "book-stock-id", stock_id,
+		      "book-tooltip", tooltip,
+		      "show-book", priv->show_book,
+		      "bookmark", is_bookmark,
+		      NULL);
+}
+
 void
 ephy_toolbar_set_spinning (EphyToolbar *toolbar,
 			   gboolean spinning)
Index: src/ephy-toolbar.h
===================================================================
--- src/ephy-toolbar.h	(revision 7474)
+++ src/ephy-toolbar.h	(working copy)
@@ -96,6 +96,16 @@ void		ephy_toolbar_set_security_state		(
 							 const char *stock_id,
 							 const char *tooltip);
 
+gboolean	ephy_toolbar_get_lock_is_shown		(EphyToolbar *toolbar);
+
+void		ephy_toolbar_set_is_bookmark 		(EphyToolbar *toolbar,
+							 gboolean is_bookmark,
+							 gboolean show_book,
+							 const char *stock_id,
+							 const char *tooltip);
+
+gboolean	ephy_toolbar_get_book_is_shown		(EphyToolbar *toolbar);
+				 
 void		ephy_toolbar_set_spinning		(EphyToolbar *toolbar,
 							 gboolean spinning);
 
Index: src/ephy-window.c
===================================================================
--- src/ephy-window.c	(revision 7474)
+++ src/ephy-window.c	(working copy)
@@ -106,7 +106,9 @@ static void sync_tab_security			(EphyTab
 static void sync_tab_zoom			(EphyTab *tab,
 						 GParamSpec *pspec,
 						 EphyWindow *window);
-
+static void sync_tab_is_bookmark		(EphyTab *tab, 
+						 char *location, 
+						 EphyWindow *window);
 
 static const GtkActionEntry ephy_menu_entries [] = {
 
@@ -701,9 +703,9 @@ ephy_window_fullscreen (EphyWindow *wind
 				  G_CALLBACK (exit_fullscreen_clicked_cb), window);
 
 	action = gtk_action_group_get_action (priv->action_group, "ViewPageSecurityInfo");
-	g_signal_connect_swapped (popup, "lock-clicked",
-				  G_CALLBACK (gtk_action_activate), action);
 
+	g_signal_connect_swapped (popup, "lock-clicked",
+				G_CALLBACK (gtk_action_activate), action);
 	/* sync status */
 	tab = ephy_window_get_active_tab (window);
 	sync_tab_load_status (tab, NULL, window);
@@ -1466,6 +1468,34 @@ sync_tab_message (EphyTab *tab, GParamSp
 		gtk_statusbar_push (s, window->priv->tab_message_cid, message);
 	}
 }
+static void
+sync_tab_is_bookmark (EphyTab *tab, char *location, EphyWindow *window)
+{	
+	EphyBookmarks *bookmarks;
+	EphyNode *node;
+	gboolean lock_is_visible, is_bookmark;
+		
+	EphyToolbar *toolbar;
+	
+	lock_is_visible = is_bookmark = FALSE;
+	toolbar = EPHY_TOOLBAR (ephy_window_get_toolbar (window));
+	bookmarks = ephy_shell_get_bookmarks (ephy_shell);
+
+	node = ephy_bookmarks_find_bookmark (bookmarks, location);
+	
+	lock_is_visible = ephy_toolbar_get_lock_is_shown (toolbar);
+	if (node != NULL)
+		is_bookmark = TRUE;
+	else
+		is_bookmark = FALSE;
+	
+	g_print ("%s; lock_is_visible?: %d; is_bookmark: %d\n", location, lock_is_visible, is_bookmark);
+
+	ephy_toolbar_set_is_bookmark (window->priv->toolbar, is_bookmark,
+					is_bookmark, EPHY_STOCK_BOOKMARK, 
+					location);
+	
+}
 
 static void
 sync_tab_navigation (EphyTab *tab,
@@ -1602,7 +1632,7 @@ sync_tab_security (EphyTab *tab,
 
 	ephy_toolbar_set_security_state (priv->toolbar, is_secure,
 					 show_lock, stock_id, tooltip);
-
+	
 	if (priv->fullscreen_popup != NULL)
 	{
 		ephy_fullscreen_popup_set_security_state
@@ -2218,6 +2248,8 @@ ephy_window_set_active_tab (EphyWindow *
 			(embed, G_CALLBACK (tab_context_menu_cb), window);
 		g_signal_handlers_disconnect_by_func
 			(embed, G_CALLBACK (tab_size_to_cb), window);
+		g_signal_handlers_disconnect_by_func
+			(embed, G_CALLBACK (sync_tab_is_bookmark), window);
 
 	}
 
@@ -2282,6 +2314,9 @@ ephy_window_set_active_tab (EphyWindow *
 		g_signal_connect_object (embed, "size-to",
 					 G_CALLBACK (tab_size_to_cb),
 					 window, 0);
+		g_signal_connect_object (embed, "ge-location",
+					 G_CALLBACK (sync_tab_is_bookmark),
+					 window, 0);
 
 		g_object_notify (G_OBJECT (window), "active-tab");
 	}
@@ -3260,8 +3295,6 @@ ephy_window_constructor (GType type,
 
 	/* Connect lock clicks */
 	action = gtk_action_group_get_action (priv->action_group, "ViewPageSecurityInfo");
-	g_signal_connect_swapped (priv->statusbar, "lock-clicked",
-				  G_CALLBACK (gtk_action_activate), action);
 	g_signal_connect_swapped (priv->toolbar, "lock-clicked",
 				  G_CALLBACK (gtk_action_activate), action);
 
Index: lib/widgets/ephy-location-entry.c
===================================================================
--- lib/widgets/ephy-location-entry.c	(revision 7474)
+++ lib/widgets/ephy-location-entry.c	(working copy)
@@ -64,7 +64,9 @@ struct _EphyLocationEntryPrivate
 	GtkWidget *icon_ebox;
 	GtkWidget *icon;
 	GtkWidget *lock_ebox;
+	GtkWidget *book_ebox;
 	GtkWidget *lock;
+	GtkWidget *book;
 	GdkPixbuf *favicon;
 	GdkColor secure_bg_colour;
 	GdkColor secure_fg_colour;
@@ -905,6 +907,16 @@ ephy_location_entry_construct_contents (
 
 	ephy_icon_entry_pack_widget (priv->icon_entry, priv->icon_ebox, TRUE);
 
+	priv->book_ebox = gtk_event_box_new ();
+	gtk_container_set_border_width (GTK_CONTAINER (priv->book_ebox), 2);
+	gtk_event_box_set_visible_window (GTK_EVENT_BOX (priv->book_ebox), FALSE);
+
+	priv->book = gtk_image_new_from_stock (EPHY_STOCK_BOOKMARK,
+					       GTK_ICON_SIZE_MENU);
+	gtk_container_add (GTK_CONTAINER (priv->book_ebox), priv->book);
+
+	ephy_icon_entry_pack_widget (priv->icon_entry, priv->book_ebox, FALSE);
+	
 	priv->lock_ebox = gtk_event_box_new ();
 	gtk_container_set_border_width (GTK_CONTAINER (priv->lock_ebox), 2);
 	gtk_widget_add_events (priv->lock_ebox, GDK_BUTTON_PRESS_MASK);
@@ -1285,3 +1297,39 @@ ephy_location_entry_set_lock_tooltip (Ep
 
 	gtk_widget_set_tooltip_text (priv->lock_ebox, tooltip);
 }
+//bookmarks
+void
+ephy_location_entry_set_bookmark (EphyLocationEntry *entry,
+				gboolean bookmark)
+{
+	return;
+}
+
+void
+ephy_location_entry_set_show_book (EphyLocationEntry *entry,
+				   gboolean show_book)
+{
+	EphyLocationEntryPrivate *priv = entry->priv;
+	g_print("show_book: %d;\n", show_book);
+	g_object_set (priv->book_ebox, "visible", show_book, NULL);
+}
+
+void
+ephy_location_entry_set_book_stock (EphyLocationEntry *entry,
+				    const char *stock_id)
+
+{
+	EphyLocationEntryPrivate *priv = entry->priv;
+
+	gtk_image_set_from_stock (GTK_IMAGE (priv->book), stock_id,
+				  GTK_ICON_SIZE_MENU);
+}
+
+void
+ephy_location_entry_set_book_tooltip (EphyLocationEntry *entry,
+				      const char *tooltip)
+{
+	EphyLocationEntryPrivate *priv = entry->priv;
+
+	gtk_widget_set_tooltip_text (priv->book_ebox, tooltip);
+}
Index: lib/widgets/ephy-location-entry.h
===================================================================
--- lib/widgets/ephy-location-entry.h	(revision 7474)
+++ lib/widgets/ephy-location-entry.h	(working copy)
@@ -102,6 +102,19 @@ void		ephy_location_entry_set_lock_stock
 
 void		ephy_location_entry_set_lock_tooltip	(EphyLocationEntry *entry,
 							 const char *tooltip);
+							 
+
+void		ephy_location_entry_set_bookmark	(EphyLocationEntry *entry,
+							 gboolean bookmark);
+
+void		ephy_location_entry_set_show_book	(EphyLocationEntry *entry,
+							 gboolean show_book);
+
+void		ephy_location_entry_set_book_stock	(EphyLocationEntry *entry,
+							 const char *stock_id);
+
+void		ephy_location_entry_set_book_tooltip	(EphyLocationEntry *entry,
+							 const char *tooltip);
 
 G_END_DECLS
 
