diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rwxr-xr-x | src/ephy-statusbar.c | 23 | ||||
-rw-r--r-- | src/ephy-statusbar.h | 3 |
3 files changed, 32 insertions, 2 deletions
@@ -1,3 +1,11 @@ +2005-01-20 Adam Hooper <adamh@cvs.gnome.org> + + * src/ephy-statusbar.c: (ephy_statusbar_add_widget), + (ephy_statusbar_remove_widget): + * src/ephy-statusbar.h: + + Added ephy_statusbar_remove_widget(). + 2005-01-20 Jean-François Rameau <jframeau@cvs.gnome.org> * src/bookmarks/ephy-bookmarks.h: diff --git a/src/ephy-statusbar.c b/src/ephy-statusbar.c index 74ea81226..d45942d97 100755 --- a/src/ephy-statusbar.c +++ b/src/ephy-statusbar.c @@ -300,12 +300,12 @@ ephy_statusbar_set_progress (EphyStatusbar *statusbar, /** * ephy_statusbar_add_widget: - * @statusbar: a #EphyStatusbar + * @statusbar: an #EphyStatusbar * @widget: a #GtkWidget * * Adds the @widget to the statusbar. Use this function whenever you want to * add a widget to the statusbar. You can remove the widget again with - * gtk_container_remove(). + * ephy_statusbar_remove_widget(). **/ void ephy_statusbar_add_widget (EphyStatusbar *statusbar, @@ -326,3 +326,22 @@ ephy_statusbar_add_widget (EphyStatusbar *statusbar, gtk_frame_set_shadow_type (GTK_FRAME (widget), shadow); } } + +/** + * ephy_statusbar_remove_widget: + * @statusbar: an #EphyStatusbar + * @widget: a #GtkWidget + * + * Removes @widget, which must have been added to @statusbar using + * ephy_statusbar_add_widget (). + */ +void +ephy_statusbar_remove_widget (EphyStatusbar *statusbar, + GtkWidget *widget) +{ + g_return_if_fail (EPHY_IS_STATUSBAR (statusbar)); + g_return_if_fail (GTK_IS_WIDGET (widget)); + + gtk_container_remove (GTK_CONTAINER (statusbar->priv->icon_container), + widget); +} diff --git a/src/ephy-statusbar.h b/src/ephy-statusbar.h index 7a1d06c2b..209d8ceb7 100644 --- a/src/ephy-statusbar.h +++ b/src/ephy-statusbar.h @@ -75,6 +75,9 @@ void ephy_statusbar_set_progress (EphyStatusbar *statusbar, void ephy_statusbar_add_widget (EphyStatusbar *statusbar, GtkWidget *widget); +void ephy_statusbar_remove_widget (EphyStatusbar *statusbar, + GtkWidget *widget); + G_END_DECLS #endif |