diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2008-06-29 11:03:44 +0000 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@src.gnome.org> | 2008-06-29 11:03:44 +0000 |
commit | 744161046c02bec9e298da10f70451518ecac0ae (patch) | |
tree | da868dd909d0a459d8211dfbf1edc28239ba0ccb | |
parent | 1e27bdf4d51077812bd86dd0ca0da6f9d931c7cc (diff) | |
download | nautilus-744161046c02bec9e298da10f70451518ecac0ae.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=/trunk/; revision=14298
-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 bfd81168e..30b46daf1 100644 --- a/src/nautilus-window.c +++ b/src/nautilus-window.c @@ -201,27 +201,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); } } |