[libgd] icon-view: Don't clear attributes on no model
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgd] icon-view: Don't clear attributes on no model
- Date: Thu, 5 Sep 2013 00:02:17 +0000 (UTC)
commit 62f9b8b92599b38d986bd26d5780edd400d318c9
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Wed Sep 4 16:41:15 2013 +0300
icon-view: Don't clear attributes on no model
No point in clearing the existing attributes in set_attributes_from_model
if we are not going to actually set any. Besides this fixes a crash in
Boxes (on app exit).
libgd/gd-main-icon-view.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/libgd/gd-main-icon-view.c b/libgd/gd-main-icon-view.c
index 90443fe..5b230ed 100644
--- a/libgd/gd-main-icon-view.c
+++ b/libgd/gd-main-icon-view.c
@@ -64,12 +64,12 @@ set_attributes_from_model (GdMainIconView *self)
GtkCellLayout *layout = GTK_CELL_LAYOUT (self);
GType icon_gtype;
- gtk_cell_layout_clear_attributes (layout, self->priv->pixbuf_cell);
- gtk_cell_layout_clear_attributes (layout, self->priv->text_cell);
-
if (!model)
return;
+ gtk_cell_layout_clear_attributes (layout, self->priv->pixbuf_cell);
+ gtk_cell_layout_clear_attributes (layout, self->priv->text_cell);
+
gtk_cell_layout_add_attribute (layout, self->priv->pixbuf_cell,
"active", GD_MAIN_COLUMN_SELECTED);
gtk_cell_layout_add_attribute (layout, self->priv->pixbuf_cell,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]