diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2008-06-29 11:04:28 +0000 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@src.gnome.org> | 2008-06-29 11:04:28 +0000 |
commit | c1b01d86d22003aaee7a0f840681cc9c931fe6fb (patch) | |
tree | 6e7fb42e164bb4154e4887ea24e7309b77270e11 | |
parent | c653f6c17c405da29b73a6c041f413d56549bf34 (diff) | |
download | nautilus-c1b01d86d22003aaee7a0f840681cc9c931fe6fb.tar.gz |
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=/branches/gnome-2-22/; revision=14299
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | src/nautilus-window.c | 17 |
2 files changed, 9 insertions, 14 deletions
@@ -1,3 +1,9 @@ +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> * libnautilus-private/nautilus-icon-container.c diff --git a/src/nautilus-window.c b/src/nautilus-window.c index aef006f91..a951f12f7 100644 --- a/src/nautilus-window.c +++ b/src/nautilus-window.c @@ -205,27 +205,16 @@ nautilus_window_ui_update (NautilusWindow *window) 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 nautilus_window_set_status (NautilusWindow *window, const char *text) { 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') { gtk_statusbar_push (GTK_STATUSBAR (window->details->statusbar), 0, text); - } else { - nautilus_window_clear_status (window); } } |