Commit 74416104 authored by Cosimo Cecchi's avatar Cosimo Cecchi Committed by Cosimo Cecchi

Fix a huge leak as messages were pushed in the statusbar but almost never

2008-06-29  Cosimo Cecchi  <cosimoc@gnome.org>

	* src/nautilus-window.c: (nautilus_window_set_status):
	Fix a huge leak as messages were pushed in the statusbar but almost
	never popped. Patch by Vincent Untz. (#536968).

svn path=/trunk/; revision=14298
parent 1e27bdf4
2008-06-29 Cosimo Cecchi <cosimoc@gnome.org>
* src/nautilus-window.c: (nautilus_window_set_status):
Fix a huge leak as messages were pushed in the statusbar but almost
never popped. Patch by Vincent Untz. (#536968).
2008-06-29 Christian Neumair <cneumair@gnome.org> 2008-06-29 Christian Neumair <cneumair@gnome.org>
* libnautilus-private/nautilus-icon-container.c * libnautilus-private/nautilus-icon-container.c
......
...@@ -201,27 +201,16 @@ nautilus_window_ui_update (NautilusWindow *window) ...@@ -201,27 +201,16 @@ nautilus_window_ui_update (NautilusWindow *window)
gtk_ui_manager_ensure_update (window->details->ui_manager); gtk_ui_manager_ensure_update (window->details->ui_manager);
} }
static gboolean
nautilus_window_clear_status (gpointer callback_data)
{
NautilusWindow *window;
window = NAUTILUS_WINDOW (callback_data);
gtk_statusbar_pop (GTK_STATUSBAR (window->details->statusbar), 0); /* clear any previous message, underflow is allowed */
return FALSE;
}
void void
nautilus_window_set_status (NautilusWindow *window, const char *text) nautilus_window_set_status (NautilusWindow *window, const char *text)
{ {
g_return_if_fail (NAUTILUS_IS_WINDOW (window)); g_return_if_fail (NAUTILUS_IS_WINDOW (window));
/* clear any previous message, underflow is allowed */
gtk_statusbar_pop (GTK_STATUSBAR (window->details->statusbar), 0);
if (text != NULL && text[0] != '\0') { if (text != NULL && text[0] != '\0') {
gtk_statusbar_push (GTK_STATUSBAR (window->details->statusbar), 0, text); gtk_statusbar_push (GTK_STATUSBAR (window->details->statusbar), 0, text);
} else {
nautilus_window_clear_status (window);
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment