From: Jim Evins Date: Tue, 19 Jan 2010 02:33:08 +0000 (-0500) Subject: Don't allow message bars to stack up in media select widget. X-Git-Tag: glabels-2_3_0~93 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a490fde76c660355393bebff2fe48ec4daa3bfd7;p=glabels 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. --- 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 {