From a490fde76c660355393bebff2fe48ec4daa3bfd7 Mon Sep 17 00:00:00 2001 From: Jim Evins Date: Mon, 18 Jan 2010 21:33:08 -0500 Subject: [PATCH] Don't allow message bars to stack up in media select widget. Remove old glMessageBar when attempting to load glMediaSelect tree views. This will make sure if a new glMessageBar is needed, it won't just stack up old message bars. --- src/media-select.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/src/media-select.c b/src/media-select.c index 5f1eecdd..8033829a 100644 --- a/src/media-select.c +++ b/src/media-select.c @@ -770,6 +770,14 @@ load_recent_list (glMediaSelect *this, gtk_list_store_clear (store); + + if ( this->priv->recent_info_bar ) + { + gtk_container_remove (GTK_CONTAINER (this->priv->recent_info_vbox), + this->priv->recent_info_bar); + this->priv->recent_info_bar = NULL; + } + if (list) { @@ -808,12 +816,6 @@ load_recent_list (glMediaSelect *this, gtk_tree_model_get_iter_first (GTK_TREE_MODEL (store), &iter); gtk_tree_selection_select_iter (selection, &iter); - if ( this->priv->recent_info_bar ) - { - gtk_container_remove (GTK_CONTAINER (this->priv->recent_info_vbox), - this->priv->recent_info_bar); - this->priv->recent_info_bar = NULL; - } } else { @@ -857,6 +859,13 @@ load_search_all_list (glMediaSelect *this, gtk_list_store_clear (store); + if ( this->priv->search_all_info_bar ) + { + gtk_container_remove (GTK_CONTAINER (this->priv->search_all_info_vbox), + this->priv->search_all_info_bar); + this->priv->search_all_info_bar = NULL; + } + if (list) { @@ -895,12 +904,6 @@ load_search_all_list (glMediaSelect *this, gtk_tree_model_get_iter_first (GTK_TREE_MODEL (store), &iter); gtk_tree_selection_select_iter (selection, &iter); - if ( this->priv->search_all_info_bar ) - { - gtk_container_remove (GTK_CONTAINER (this->priv->search_all_info_vbox), - this->priv->search_all_info_bar); - this->priv->search_all_info_bar = NULL; - } } else { -- 2.39.5