aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table
diff options
context:
space:
mode:
authorIain Holmes <iain@src.gnome.org>2000-10-13 08:11:27 +0800
committerIain Holmes <iain@src.gnome.org>2000-10-13 08:11:27 +0800
commita053aa88b946563ceb08ab1e750c484de19f7c9b (patch)
tree53d477fcef07fd8c67de7237d07162ded68e3e8f /widgets/table
parent15349adfcccbe182940e5cb8cd69670a22fa784a (diff)
downloadgsoc2013-evolution-a053aa88b946563ceb08ab1e750c484de19f7c9b.tar
gsoc2013-evolution-a053aa88b946563ceb08ab1e750c484de19f7c9b.tar.gz
gsoc2013-evolution-a053aa88b946563ceb08ab1e750c484de19f7c9b.tar.bz2
gsoc2013-evolution-a053aa88b946563ceb08ab1e750c484de19f7c9b.tar.lz
gsoc2013-evolution-a053aa88b946563ceb08ab1e750c484de19f7c9b.tar.xz
gsoc2013-evolution-a053aa88b946563ceb08ab1e750c484de19f7c9b.tar.zst
gsoc2013-evolution-a053aa88b946563ceb08ab1e750c484de19f7c9b.zip
Fixed gdk-font refcounting
Added font_e argument to e-text Fixed the header-item drawing the pixmap incorrectly svn path=/trunk/; revision=5894
Diffstat (limited to 'widgets/table')
-rw-r--r--widgets/table/e-cell-text.c1
-rw-r--r--widgets/table/e-table-header-item.c37
2 files changed, 21 insertions, 17 deletions
diff --git a/widgets/table/e-cell-text.c b/widgets/table/e-cell-text.c
index 07b543808a..4a4b90ce08 100644
--- a/widgets/table/e-cell-text.c
+++ b/widgets/table/e-cell-text.c
@@ -328,6 +328,7 @@ ect_new_view (ECell *ecell, ETableModel *table_model, void *e_table_item_view)
text_view->font = e_font_from_gdk_name (ect->font_name);
}
if (!text_view->font){
+ gdk_font_ref (GTK_WIDGET (canvas)->style->font);
text_view->font = e_font_from_gdk_font (GTK_WIDGET (canvas)->style->font);
}
diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c
index c728baa747..a64d0dd380 100644
--- a/widgets/table/e-table-header-item.c
+++ b/widgets/table/e-table-header-item.c
@@ -746,23 +746,26 @@ draw_button (ETableHeaderItem *ethi, ETableCol *col,
case E_TABLE_COL_ARROW_UP:
case E_TABLE_COL_ARROW_DOWN:
- gtk_paint_arrow (
- gtk_widget_get_style (GTK_WIDGET(GNOME_CANVAS_ITEM(ethi)->canvas)),
- drawable,
- GTK_STATE_NORMAL,
- GTK_SHADOW_IN,
- &clip,
- GTK_WIDGET(GNOME_CANVAS_ITEM(ethi)->canvas),
- "header",
- (arrow == E_TABLE_COL_ARROW_UP) ? GTK_ARROW_UP : GTK_ARROW_DOWN,
- TRUE,
- x + HEADER_PADDING / 2 + clip.width - MIN_ARROW_SIZE - 2,
- y + (ethi->height - MIN_ARROW_SIZE) / 2,
- MIN_ARROW_SIZE,
- MIN_ARROW_SIZE);
-
- clip.width -= (MIN_ARROW_SIZE + 2 + HEADER_PADDING);
- break;
+ if (!col->is_pixbuf ||
+ (col->is_pixbuf && gdk_pixbuf_get_width (col->pixbuf) <= clip.width)) {
+ gtk_paint_arrow (
+ gtk_widget_get_style (GTK_WIDGET(GNOME_CANVAS_ITEM(ethi)->canvas)),
+ drawable,
+ GTK_STATE_NORMAL,
+ GTK_SHADOW_IN,
+ &clip,
+ GTK_WIDGET(GNOME_CANVAS_ITEM(ethi)->canvas),
+ "header",
+ (arrow == E_TABLE_COL_ARROW_UP) ? GTK_ARROW_UP : GTK_ARROW_DOWN,
+ TRUE,
+ x + HEADER_PADDING / 2 + clip.width - MIN_ARROW_SIZE - 2,
+ y + (ethi->height - MIN_ARROW_SIZE) / 2,
+ MIN_ARROW_SIZE,
+ MIN_ARROW_SIZE);
+
+ clip.width -= (MIN_ARROW_SIZE + 2 + HEADER_PADDING);
+ break;
+ }
}
if (col->is_pixbuf){