sound: Avoid second warning when no theme

When the freedesktop sound theme isn't installed, avoid warnings
on startup above and beyond the existing one.
This commit is contained in:
Bastien Nocera 2010-11-18 15:20:23 +00:00
parent 1444735b6e
commit adc34ac019
2 changed files with 7 additions and 0 deletions

View file

@ -573,6 +573,8 @@ gvc_level_bar_draw (GtkWidget *widget,
g_return_val_if_fail (GVC_IS_LEVEL_BAR (widget), FALSE);
g_message ("gvc_level_bar_draw");
bar = GVC_LEVEL_BAR (widget);
gtk_widget_get_allocation (widget, &allocation);

View file

@ -237,6 +237,11 @@ set_combox_for_theme_name (GvcSoundThemeChooser *chooser,
}
model = gtk_combo_box_get_model (GTK_COMBO_BOX (chooser->priv->combo_box));
if (model == NULL) {
/* No theme was installed, don't warn again
* See setup_theme_selector() */
return;
}
if (gtk_tree_model_get_iter_first (model, &iter) == FALSE) {
return;