aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table-field-chooser-item.c
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@gnome-db.org>2011-10-05 19:57:30 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-10-05 19:57:30 +0800
commit4ec46cc05fcb94d181fb9c2412984a1446647c85 (patch)
treed16ce30e77dd539c03509237dd4c723d46aea97a /widgets/table/e-table-field-chooser-item.c
parent5ea7e23aef0c239af2600c95419ba0bda0f08b3c (diff)
parent19163c2b71e6128fc9b32287b99b1f4422324c2d (diff)
downloadgsoc2013-evolution-4ec46cc05fcb94d181fb9c2412984a1446647c85.tar.gz
gsoc2013-evolution-4ec46cc05fcb94d181fb9c2412984a1446647c85.tar.zst
gsoc2013-evolution-4ec46cc05fcb94d181fb9c2412984a1446647c85.zip
Merge from master
Diffstat (limited to 'widgets/table/e-table-field-chooser-item.c')
-rw-r--r--widgets/table/e-table-field-chooser-item.c32
1 files changed, 6 insertions, 26 deletions
diff --git a/widgets/table/e-table-field-chooser-item.c b/widgets/table/e-table-field-chooser-item.c
index ecc414853c..78d8461b5f 100644
--- a/widgets/table/e-table-field-chooser-item.c
+++ b/widgets/table/e-table-field-chooser-item.c
@@ -491,17 +491,12 @@ etfci_draw (GnomeCanvasItem *item,
gint rows;
gint y1, y2;
gint row;
- GtkStyle *style;
- GtkStateType state;
if (etfci->combined_header == NULL)
return;
rows = e_table_header_count (etfci->combined_header);
- style = gtk_widget_get_style (GTK_WIDGET (canvas));
- state = gtk_widget_get_state (GTK_WIDGET (canvas));
-
y1 = y2 = 0;
for (row = 0; row < rows; row++, y1 = y2) {
ETableCol *ecol;
@@ -519,10 +514,7 @@ etfci_draw (GnomeCanvasItem *item,
if (y2 < y)
continue;
- cairo_save (cr);
-
e_table_header_draw_button (cr, ecol,
- style, state,
GTK_WIDGET (canvas),
-x, y1 - y,
width, height,
@@ -567,9 +559,6 @@ etfci_start_drag (ETableFieldChooserItem *etfci,
GtkWidget *widget = GTK_WIDGET (GNOME_CANVAS_ITEM (etfci)->canvas);
GtkTargetList *list;
GdkDragContext *context;
- GdkWindow *window;
- GtkStyle *style;
- GtkStateType state;
ETableCol *ecol;
cairo_surface_t *cs;
cairo_t *cr;
@@ -604,28 +593,19 @@ etfci_start_drag (ETableFieldChooserItem *etfci,
g_free ((gpointer) etfci_drag_types[0].target);
button_height = e_table_header_compute_height (ecol, widget);
- window = gtk_widget_get_window (widget);
- cs = gdk_window_create_similar_surface (
- window, CAIRO_CONTENT_COLOR, etfci->width, button_height);
-
- style = gtk_widget_get_style (widget);
- state = gtk_widget_get_state (widget);
+ cs = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
+ etfci->width, button_height);
+ cr = cairo_create (cs);
cr = cairo_create (cs);
e_table_header_draw_button (
- cr, ecol, style,
- state, widget, 0, 0,
+ cr, ecol,
+ widget, 0, 0,
etfci->width, button_height,
etfci->width, button_height,
E_TABLE_COL_ARROW_NONE);
- pixbuf = gdk_pixbuf_get_from_window (window, 0, 0, etfci->width, button_height);
- gtk_drag_set_icon_pixbuf (
- context,
- pixbuf,
- etfci->width / 2,
- button_height / 2);
- g_object_unref (pixbuf);
+ gtk_drag_set_icon_surface (context, cs);
cairo_surface_destroy (cs);
cairo_destroy (cr);