aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/table')
-rw-r--r--widgets/table/e-cell-text.c4
-rw-r--r--widgets/table/e-cell-toggle.c6
-rw-r--r--widgets/table/e-table-field-chooser-item.c4
-rw-r--r--widgets/table/e-table-field-chooser.c2
-rw-r--r--widgets/table/e-table-header-item.c12
-rw-r--r--widgets/table/e-table-header-utils.c4
-rw-r--r--widgets/table/e-table-item.c2
-rw-r--r--widgets/table/e-table.c2
-rw-r--r--widgets/table/e-tree-memory.c9
-rw-r--r--widgets/table/e-tree-sorted.c9
-rw-r--r--widgets/table/e-tree.c2
11 files changed, 23 insertions, 33 deletions
diff --git a/widgets/table/e-cell-text.c b/widgets/table/e-cell-text.c
index 31d5f91dc4..35bce6cf0b 100644
--- a/widgets/table/e-cell-text.c
+++ b/widgets/table/e-cell-text.c
@@ -414,9 +414,9 @@ ect_unrealize (ECellView *ecv)
}
if (text_view->stipple)
- gdk_bitmap_unref (text_view->stipple);
+ g_object_unref (text_view->stipple);
- gdk_cursor_destroy (text_view->i_cursor);
+ gdk_cursor_unref (text_view->i_cursor);
if (ect->colors) {
colormap = gtk_widget_get_colormap (GTK_WIDGET (text_view->canvas));
diff --git a/widgets/table/e-cell-toggle.c b/widgets/table/e-cell-toggle.c
index 2892b18598..609d097f6f 100644
--- a/widgets/table/e-cell-toggle.c
+++ b/widgets/table/e-cell-toggle.c
@@ -97,7 +97,7 @@ etog_kill_view (ECellView *ecell_view)
for (i = 0; i < etog->n_states * CACHE_SEQ_COUNT; i++)
if (toggle_view->pixmap_cache[i])
- gdk_pixmap_unref (toggle_view->pixmap_cache[i]);
+ g_object_unref (toggle_view->pixmap_cache[i]);
g_free (toggle_view->pixmap_cache);
g_free (ecell_view);
}
@@ -236,7 +236,7 @@ etog_draw (ECellView *ecell_view, GdkDrawable *drawable,
height = gdk_pixbuf_get_height (image);
}
- gdk_draw_pixmap (drawable, toggle_view->gc,
+ gdk_draw_drawable (drawable, toggle_view->gc,
pixmap,
0, 0,
x, y,
@@ -369,7 +369,7 @@ etog_style_set (ECellView *ecell_view, GtkStyle *previous_style)
for (i = 0; i < toggle->n_states * CACHE_SEQ_COUNT; i++) {
if (toggle_view->pixmap_cache[i]) {
- gdk_pixmap_unref (toggle_view->pixmap_cache[i]);
+ g_object_unref (toggle_view->pixmap_cache[i]);
toggle_view->pixmap_cache[i] = NULL;
}
}
diff --git a/widgets/table/e-table-field-chooser-item.c b/widgets/table/e-table-field-chooser-item.c
index 435b7c63c2..0d72dc7ad8 100644
--- a/widgets/table/e-table-field-chooser-item.c
+++ b/widgets/table/e-table-field-chooser-item.c
@@ -564,12 +564,12 @@ etfci_start_drag (ETableFieldChooserItem *etfci, GdkEvent *event, double x, doub
E_TABLE_COL_ARROW_NONE);
gtk_drag_set_icon_pixmap (context,
- gdk_window_get_colormap (widget->window),
+ gdk_drawable_get_colormap (GDK_DRAWABLE (widget->window)),
pixmap,
NULL,
etfci->width / 2,
button_height / 2);
- gdk_pixmap_unref (pixmap);
+ g_object_unref (pixmap);
etfci->maybe_drag = FALSE;
}
diff --git a/widgets/table/e-table-field-chooser.c b/widgets/table/e-table-field-chooser.c
index b3554f86cf..786e0420b7 100644
--- a/widgets/table/e-table-field-chooser.c
+++ b/widgets/table/e-table-field-chooser.c
@@ -167,7 +167,7 @@ e_table_field_chooser_init (ETableFieldChooser *etfc)
gtk_widget_reparent(widget,
GTK_WIDGET(etfc));
- gtk_widget_push_colormap (gdk_rgb_get_cmap ());
+ gtk_widget_push_colormap (gdk_rgb_get_colormap ());
etfc->canvas = GNOME_CANVAS(glade_xml_get_widget(gui, "canvas-buttons"));
diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c
index 1e6d9bad29..d42696be83 100644
--- a/widgets/table/e-table-header-item.c
+++ b/widgets/table/e-table-header-item.c
@@ -491,7 +491,7 @@ make_shaped_window_from_xpm (const char **xpm)
gdk_pixbuf_render_pixmap_and_mask (pixbuf, &pixmap, &bitmap, 128);
gdk_pixbuf_unref (pixbuf);
- gtk_widget_push_colormap (gdk_rgb_get_cmap ());
+ gtk_widget_push_colormap (gdk_rgb_get_colormap ());
win = gtk_window_new (GTK_WINDOW_POPUP);
pix = gtk_image_new_from_pixmap (pixmap, bitmap);
@@ -500,8 +500,8 @@ make_shaped_window_from_xpm (const char **xpm)
gtk_widget_shape_combine_mask (win, bitmap, 0, 0);
gtk_widget_pop_colormap ();
- gdk_pixmap_unref (pixmap);
- gdk_bitmap_unref (bitmap);
+ g_object_unref (pixmap);
+ g_object_unref (bitmap);
return win;
}
@@ -950,7 +950,7 @@ ethi_unrealize (GnomeCanvasItem *item)
gtk_drag_dest_unset (GTK_WIDGET (item->canvas));
if (ethi->stipple){
- gdk_bitmap_unref (ethi->stipple);
+ g_object_unref (ethi->stipple);
ethi->stipple = NULL;
}
@@ -1216,12 +1216,12 @@ ethi_start_drag (ETableHeaderItem *ethi, GdkEvent *event)
arrows, GINT_TO_POINTER (ecol->col_idx)));
gtk_drag_set_icon_pixmap (
context,
- gdk_window_get_colormap (widget->window),
+ gdk_drawable_get_colormap (GDK_DRAWABLE (widget->window)),
pixmap,
NULL,
col_width / 2,
ethi->height / 2);
- gdk_pixmap_unref (pixmap);
+ g_object_unref (pixmap);
ethi->maybe_drag = FALSE;
g_hash_table_destroy (arrows);
diff --git a/widgets/table/e-table-header-utils.c b/widgets/table/e-table-header-utils.c
index 9eaba9d843..7c1ec98f78 100644
--- a/widgets/table/e-table-header-utils.c
+++ b/widgets/table/e-table-header-utils.c
@@ -455,12 +455,12 @@ e_table_header_draw_button (GdkDrawable *drawable, ETableCol *ecol,
gdk_gc_set_clip_rectangle (gc, NULL);
if (pixmap) {
- gdk_draw_pixmap (drawable, gc, pixmap,
+ gdk_draw_drawable (drawable, gc, pixmap,
0, 0,
xpos,
inner_y + (inner_height - clip_height) / 2,
clip_width, clip_height);
- gdk_pixmap_unref (pixmap);
+ g_object_unref (pixmap);
}
} else {
e_table_draw_elided_string (drawable, gc, widget,
diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c
index f17108ed4a..27b48184b8 100644
--- a/widgets/table/e-table-item.c
+++ b/widgets/table/e-table-item.c
@@ -1793,7 +1793,7 @@ eti_unrealize (GnomeCanvasItem *item)
eti->grid_gc = NULL;
gdk_gc_unref (eti->focus_gc);
eti->focus_gc = NULL;
- gdk_bitmap_unref (eti->stipple);
+ g_object_unref (eti->stipple);
eti->stipple = NULL;
eti_unrealize_cell_views (eti);
diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c
index 2122a015ca..cc64d854e1 100644
--- a/widgets/table/e-table.c
+++ b/widgets/table/e-table.c
@@ -1533,7 +1533,7 @@ et_real_construct (ETable *e_table, ETableModel *etm, ETableExtras *ete,
e_table->model = etm;
g_object_ref (etm);
- gtk_widget_push_colormap (gdk_rgb_get_cmap ());
+ gtk_widget_push_colormap (gdk_rgb_get_colormap ());
connect_header (e_table, state);
e_table->horizontal_scrolling = specification->horizontal_scrolling;
diff --git a/widgets/table/e-tree-memory.c b/widgets/table/e-tree-memory.c
index 2e87c8da86..7de48802fd 100644
--- a/widgets/table/e-tree-memory.c
+++ b/widgets/table/e-tree-memory.c
@@ -38,10 +38,7 @@
#include "e-tree-memory.h"
-#define TREEPATH_CHUNK_AREA_SIZE (30 * sizeof (ETreeMemoryPath))
-
static ETreeModelClass *parent_class;
-static GMemChunk *node_chunk;
enum {
FILL_IN_CHILDREN,
@@ -358,8 +355,6 @@ e_tree_memory_class_init (ETreeMemoryClass *klass)
parent_class = g_type_class_peek_parent (klass);
- node_chunk = g_mem_chunk_create (ETreeMemoryPath, TREEPATH_CHUNK_AREA_SIZE, G_ALLOC_AND_FREE);
-
signals [FILL_IN_CHILDREN] =
g_signal_new ("fill_in_children",
E_OBJECT_CLASS_TYPE (object_class),
@@ -509,7 +504,7 @@ e_tree_memory_node_insert (ETreeMemory *tree_model,
if (!tree_model->priv->frozen)
e_tree_model_pre_change(E_TREE_MODEL(tree_model));
- new_path = g_chunk_new0 (ETreeMemoryPath, node_chunk);
+ new_path = g_slice_new0 (ETreeMemoryPath);
new_path->node_data = node_data;
new_path->children_computed = FALSE;
@@ -584,7 +579,7 @@ child_free(ETreeMemory *etree, ETreeMemoryPath *node)
etree->priv->destroy_func (node->node_data, etree->priv->destroy_user_data);
}
- g_chunk_free(node, node_chunk);
+ g_slice_free (ETreeMemoryPath, node);
}
/**
diff --git a/widgets/table/e-tree-sorted.c b/widgets/table/e-tree-sorted.c
index 56af65dd7d..b5c67dc906 100644
--- a/widgets/table/e-tree-sorted.c
+++ b/widgets/table/e-tree-sorted.c
@@ -47,12 +47,9 @@
/* maximum insertions between an idle event that we will do without scheduling an idle sort */
#define ETS_INSERT_MAX (4)
-#define TREEPATH_CHUNK_AREA_SIZE (30 * sizeof (ETreeSortedPath))
-
#define d(x)
static ETreeModel *parent_class;
-static GMemChunk *node_chunk;
enum {
NODE_RESORTED,
@@ -365,7 +362,7 @@ static void
free_path (ETreeSortedPath *path)
{
free_children(path);
- g_chunk_free(path, node_chunk);
+ g_slice_free(ETreeSortedPath, path);
}
static ETreeSortedPath *
@@ -373,7 +370,7 @@ new_path (ETreeSortedPath *parent, ETreePath corresponding)
{
ETreeSortedPath *path;
- path = g_chunk_new0 (ETreeSortedPath, node_chunk);
+ path = g_slice_new0 (ETreeSortedPath);
path->corresponding = corresponding;
path->parent = parent;
@@ -1157,8 +1154,6 @@ e_tree_sorted_class_init (ETreeSortedClass *klass)
parent_class = g_type_class_peek_parent (klass);
- node_chunk = g_mem_chunk_create (ETreeSortedPath, TREEPATH_CHUNK_AREA_SIZE, G_ALLOC_AND_FREE);
-
klass->node_resorted = NULL;
object_class->dispose = ets_dispose;
diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c
index afbb484964..c3be4f0c24 100644
--- a/widgets/table/e-tree.c
+++ b/widgets/table/e-tree.c
@@ -1376,7 +1376,7 @@ et_real_construct (ETree *e_tree, ETreeModel *etm, ETableExtras *ete,
et_connect_to_etta (e_tree);
- gtk_widget_push_colormap (gdk_rgb_get_cmap ());
+ gtk_widget_push_colormap (gdk_rgb_get_colormap ());
e_tree->priv->sorter = e_sorter_new();