diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2006-12-04 23:44:31 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@src.gnome.org> | 2006-12-04 23:44:31 +0800 |
commit | a197d5aff686b9af1f3564ec37f0ff71776f5147 (patch) | |
tree | cdcd92d8c62d9e4066c64c200cec0d927686fe45 /widgets | |
parent | a39f7ac63aee199d7b5393e24a247ec3b9012445 (diff) | |
download | gsoc2013-evolution-a197d5aff686b9af1f3564ec37f0ff71776f5147.tar.gz gsoc2013-evolution-a197d5aff686b9af1f3564ec37f0ff71776f5147.tar.zst gsoc2013-evolution-a197d5aff686b9af1f3564ec37f0ff71776f5147.zip |
Fixes bug #357970
2006-12-04 Matthew Barnes <mbarnes@redhat.com>
Fixes bug #357970
* e-cell-pixbuf.c:
* e-cell-progress.c:
* e-cell-text.c:
* e-cell-toggle.c:
* e-cell-tree.c:
* e-table-col.c:
* e-table-extras.c:
* e-table-header-item.c:
* e-table-header-utils.c:
* e-table-item.c:
* e-table-memory-store.c:
Don't call deprecated GLib / GDK functions.
svn path=/trunk/; revision=33049
Diffstat (limited to 'widgets')
-rw-r--r-- | widgets/table/ChangeLog | 17 | ||||
-rw-r--r-- | widgets/table/e-cell-pixbuf.c | 17 | ||||
-rw-r--r-- | widgets/table/e-cell-progress.c | 20 | ||||
-rw-r--r-- | widgets/table/e-cell-text.c | 6 | ||||
-rw-r--r-- | widgets/table/e-cell-toggle.c | 23 | ||||
-rw-r--r-- | widgets/table/e-cell-tree.c | 44 | ||||
-rw-r--r-- | widgets/table/e-table-col.c | 4 | ||||
-rw-r--r-- | widgets/table/e-table-extras.c | 6 | ||||
-rw-r--r-- | widgets/table/e-table-header-item.c | 2 | ||||
-rw-r--r-- | widgets/table/e-table-header-utils.c | 6 | ||||
-rw-r--r-- | widgets/table/e-table-item.c | 6 | ||||
-rw-r--r-- | widgets/table/e-table-memory-store.c | 4 |
12 files changed, 85 insertions, 70 deletions
diff --git a/widgets/table/ChangeLog b/widgets/table/ChangeLog index f3cb87b727..16e42bb724 100644 --- a/widgets/table/ChangeLog +++ b/widgets/table/ChangeLog @@ -1,3 +1,20 @@ +2006-12-04 Matthew Barnes <mbarnes@redhat.com> + + Fixes bug #357970 + + * e-cell-pixbuf.c: + * e-cell-progress.c: + * e-cell-text.c: + * e-cell-toggle.c: + * e-cell-tree.c: + * e-table-col.c: + * e-table-extras.c: + * e-table-header-item.c: + * e-table-header-utils.c: + * e-table-item.c: + * e-table-memory-store.c: + Don't call deprecated GLib / GDK functions. + 2006-12-04 Harish Krishnaswamy <kharish@novell.com> * e-table.c: (canvas_vbox_event), (click_to_add_event): diff --git a/widgets/table/e-cell-pixbuf.c b/widgets/table/e-cell-pixbuf.c index 1b1924f297..a87ba5887d 100644 --- a/widgets/table/e-cell-pixbuf.c +++ b/widgets/table/e-cell-pixbuf.c @@ -180,15 +180,14 @@ pixbuf_draw (ECellView *ecell_view, GdkDrawable *drawable, } - gdk_pixbuf_render_to_drawable_alpha (cell_pixbuf, - drawable, - 0, 0, - real_x, real_y, - real_w, real_h, - GDK_PIXBUF_ALPHA_FULL, - 127, - GDK_RGB_DITHER_NORMAL, - 0, 0); + gdk_draw_pixbuf (drawable, + NULL, + cell_pixbuf, + 0, 0, + real_x, real_y, + real_w, real_h, + GDK_RGB_DITHER_NORMAL, + 0, 0); } static gint diff --git a/widgets/table/e-cell-progress.c b/widgets/table/e-cell-progress.c index 8e10d7cc31..ffeac2706b 100644 --- a/widgets/table/e-cell-progress.c +++ b/widgets/table/e-cell-progress.c @@ -97,7 +97,7 @@ eprog_unrealize (ECellView *ecv) { ECellProgressView *progress_view = (ECellProgressView *) ecv; - gdk_gc_unref (progress_view->gc); + g_object_unref (progress_view->gc); progress_view->gc = NULL; } @@ -200,14 +200,14 @@ eprog_draw (ECellView *ecell_view, GdkDrawable *drawable, eprog_draw_bar(progress, progress->red, progress->green, progress->blue, value); - gdk_pixbuf_render_to_drawable_alpha (progress->image, drawable, - 0, 0, - x, y, - progress->width, progress->height, - GDK_PIXBUF_ALPHA_BILEVEL, - 128, - GDK_RGB_DITHER_NORMAL, - x, y); + gdk_draw_pixbuf (drawable, + NULL, + progress->image, + 0, 0, + x, y, + progress->width, progress->height, + GDK_RGB_DITHER_NORMAL, + x, y); } static void @@ -285,7 +285,7 @@ eprog_dispose (GObject *object) { ECellProgress *eprog = E_CELL_PROGRESS (object); - gdk_pixbuf_unref (eprog->image); + g_object_unref (eprog->image); g_free (eprog->image); g_free (eprog->buffer); diff --git a/widgets/table/e-cell-text.c b/widgets/table/e-cell-text.c index 35bce6cf0b..dfa0f4da19 100644 --- a/widgets/table/e-cell-text.c +++ b/widgets/table/e-cell-text.c @@ -406,7 +406,7 @@ ect_unrealize (ECellView *ecv) ECellText *ect = (ECellText*) ecv->ecell; GdkColormap *colormap; - gdk_gc_unref (text_view->gc); + g_object_unref (text_view->gc); text_view->gc = NULL; if (text_view->edit){ @@ -441,7 +441,7 @@ ect_free_color (gchar *color_spec, GdkColor *color, GdkColormap *colormap) if (color != (GdkColor*) 1) { gulong pix = color->pixel; - gdk_colors_free (colormap, &pix, 1, 0); + gdk_colormap_free_colors (colormap, color, 1); /* This frees the memory for the GdkColor. */ gdk_color_free (color); @@ -2603,7 +2603,7 @@ e_cell_text_get_color (ECellTextView *cell_view, gchar *color_spec) colormap = gtk_widget_get_colormap (GTK_WIDGET (cell_view->canvas)); /* Try to allocate the color. */ - if (gdk_color_alloc (colormap, &tmp_color)) + if (gdk_colormap_alloc_color (colormap, &tmp_color, FALSE, TRUE)) color = gdk_color_copy (&tmp_color); } diff --git a/widgets/table/e-cell-toggle.c b/widgets/table/e-cell-toggle.c index 609d097f6f..971ca1f98e 100644 --- a/widgets/table/e-cell-toggle.c +++ b/widgets/table/e-cell-toggle.c @@ -118,7 +118,7 @@ etog_unrealize (ECellView *ecv) { ECellToggleView *toggle_view = (ECellToggleView *) ecv; - gdk_gc_unref (toggle_view->gc); + g_object_unref (toggle_view->gc); toggle_view->gc = NULL; } @@ -169,14 +169,15 @@ check_cache (ECellToggleView *toggle_view, int image_seq, int cache_seq) 1, RGB_COLOR (color), RGB_COLOR (color)); - gdk_pixbuf_render_to_drawable (flat, PIXMAP_CACHE (toggle_view, cache_seq, image_seq), - toggle_view->gc, - 0, 0, - 0, 0, - width, height, - GDK_RGB_DITHER_NORMAL, - 0, 0); - gdk_pixbuf_unref (flat); + gdk_draw_pixbuf (PIXMAP_CACHE (toggle_view, cache_seq, image_seq), + toggle_view->gc, + flat, + 0, 0, + 0, 0, + width, height, + GDK_RGB_DITHER_NORMAL, + 0, 0); + g_object_unref (flat); } } @@ -382,7 +383,7 @@ etog_finalize (GObject *object) int i; for (i = 0; i < etog->n_states; i++) - gdk_pixbuf_unref (etog->images [i]); + g_object_unref (etog->images [i]); g_free (etog->images); @@ -451,7 +452,7 @@ e_cell_toggle_construct (ECellToggle *etog, int border, int n_states, GdkPixbuf for (i = 0; i < n_states; i++){ etog->images [i] = images [i]; - gdk_pixbuf_ref (images [i]); + g_object_ref (images [i]); if (gdk_pixbuf_get_height (images [i]) > max_height) max_height = gdk_pixbuf_get_height (images [i]); diff --git a/widgets/table/e-cell-tree.c b/widgets/table/e-cell-tree.c index 133254dd4b..894c167f60 100644 --- a/widgets/table/e-cell-tree.c +++ b/widgets/table/e-cell-tree.c @@ -190,7 +190,7 @@ ect_unrealize (ECellView *ecv) /* unrealize our subcell view. */ e_cell_unrealize (tree_view->subcell_view); - gdk_gc_unref (tree_view->gc); + g_object_unref (tree_view->gc); tree_view->gc = NULL; if (parent_class->unrealize) @@ -209,16 +209,15 @@ draw_retro_expander (ECellTreeView *ectv, GdkDrawable *drawable, gboolean expand image_width = gdk_pixbuf_get_width(image); image_height = gdk_pixbuf_get_height(image); - gdk_pixbuf_render_to_drawable_alpha (image, - drawable, - rect->x, rect->y, - rect->width - image_width / 2, - rect->height - image_height / 2, - image_width, image_height, - GDK_PIXBUF_ALPHA_BILEVEL, - 128, - GDK_RGB_DITHER_NORMAL, - image_width, 0); + gdk_draw_pixbuf (drawable, + NULL, + image, + rect->x, rect->y, + rect->width - image_width / 2, + rect->height - image_height / 2, + image_width, image_height, + GDK_RGB_DITHER_NORMAL, + image_width, 0); } static void @@ -358,16 +357,15 @@ ect_draw (ECellView *ecell_view, GdkDrawable *drawable, } if (node_image) { - gdk_pixbuf_render_to_drawable_alpha (node_image, - drawable, - 0, 0, - x1 + subcell_offset, - y1 + (y2 - y1) / 2 - node_image_height / 2, - node_image_width, node_image_height, - GDK_PIXBUF_ALPHA_BILEVEL, - 128, - GDK_RGB_DITHER_NORMAL, - node_image_width, 0); + gdk_draw_pixbuf (drawable, + NULL, + node_image, + 0, 0, + x1 + subcell_offset, + y1 + (y2 - y1) / 2 - node_image_height / 2, + node_image_width, node_image_height, + GDK_RGB_DITHER_NORMAL, + node_image_width, 0); subcell_offset += node_image_width; } } @@ -808,11 +806,11 @@ ect_dispose (GObject *object) ect->subcell = NULL; if (ect->open_pixbuf) - gdk_pixbuf_unref (ect->open_pixbuf); + g_object_unref (ect->open_pixbuf); ect->open_pixbuf = NULL; if (ect->closed_pixbuf) - gdk_pixbuf_unref (ect->closed_pixbuf); + g_object_unref (ect->closed_pixbuf); ect->closed_pixbuf = NULL; G_OBJECT_CLASS (parent_class)->dispose (object); diff --git a/widgets/table/e-table-col.c b/widgets/table/e-table-col.c index 67400b19de..4983f70f15 100644 --- a/widgets/table/e-table-col.c +++ b/widgets/table/e-table-col.c @@ -45,7 +45,7 @@ etc_dispose (GObject *object) etc->ecell = NULL; if (etc->pixbuf) - gdk_pixbuf_unref (etc->pixbuf); + g_object_unref (etc->pixbuf); etc->pixbuf = NULL; if (etc->text) @@ -232,7 +232,7 @@ e_table_col_new_with_pixbuf (int col_idx, const char *text, GdkPixbuf *pixbuf, d etc->resizable = resizable; g_object_ref (etc->ecell); - gdk_pixbuf_ref (etc->pixbuf); + g_object_ref (etc->pixbuf); return etc; } diff --git a/widgets/table/e-table-extras.c b/widgets/table/e-table-extras.c index e9c2075508..5b13c4e5f4 100644 --- a/widgets/table/e-table-extras.c +++ b/widgets/table/e-table-extras.c @@ -58,7 +58,7 @@ pixbuf_hash_free(gchar *key, { g_free(key); if (pixbuf) - gdk_pixbuf_unref(pixbuf); + g_object_unref(pixbuf); } static void @@ -281,11 +281,11 @@ e_table_extras_add_pixbuf (ETableExtras *extras, g_hash_table_remove (extras->cells, old_key); g_free (old_key); if (old_pixbuf) - gdk_pixbuf_unref (old_pixbuf); + g_object_unref (old_pixbuf); } if (pixbuf) - gdk_pixbuf_ref(pixbuf); + g_object_ref(pixbuf); g_hash_table_insert (extras->pixbufs, g_strdup(id), pixbuf); } diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c index d42696be83..a355fba09a 100644 --- a/widgets/table/e-table-header-item.c +++ b/widgets/table/e-table-header-item.c @@ -489,7 +489,7 @@ make_shaped_window_from_xpm (const char **xpm) pixbuf = gdk_pixbuf_new_from_xpm_data (xpm); gdk_pixbuf_render_pixmap_and_mask (pixbuf, &pixmap, &bitmap, 128); - gdk_pixbuf_unref (pixbuf); + g_object_unref (pixbuf); gtk_widget_push_colormap (gdk_rgb_get_colormap ()); win = gtk_window_new (GTK_WINDOW_POPUP); diff --git a/widgets/table/e-table-header-utils.c b/widgets/table/e-table-header-utils.c index 7c1ec98f78..2aa05cffc4 100644 --- a/widgets/table/e-table-header-utils.c +++ b/widgets/table/e-table-header-utils.c @@ -187,7 +187,7 @@ make_composite_pixmap (GdkDrawable *drawable, GdkGC *gc, tmp = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, width, height); if (!tmp) { - gdk_pixbuf_unref (fade); + g_object_unref (fade); return NULL; } @@ -202,7 +202,7 @@ make_composite_pixmap (GdkDrawable *drawable, GdkGC *gc, 16, color, color); - gdk_pixbuf_unref (fade); + g_object_unref (fade); } pixmap = gdk_pixmap_new (drawable, width, height, gdk_rgb_get_visual ()->depth); @@ -213,7 +213,7 @@ make_composite_pixmap (GdkDrawable *drawable, GdkGC *gc, gdk_pixbuf_get_pixels (tmp), gdk_pixbuf_get_rowstride (tmp), dither_xofs, dither_yofs); - gdk_pixbuf_unref (tmp); + g_object_unref (tmp); return pixmap; } diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c index 27b48184b8..c095b84c05 100644 --- a/widgets/table/e-table-item.c +++ b/widgets/table/e-table-item.c @@ -1787,11 +1787,11 @@ eti_unrealize (GnomeCanvasItem *item) } } - gdk_gc_unref (eti->fill_gc); + g_object_unref (eti->fill_gc); eti->fill_gc = NULL; - gdk_gc_unref (eti->grid_gc); + g_object_unref (eti->grid_gc); eti->grid_gc = NULL; - gdk_gc_unref (eti->focus_gc); + g_object_unref (eti->focus_gc); eti->focus_gc = NULL; g_object_unref (eti->stipple); eti->stipple = NULL; diff --git a/widgets/table/e-table-memory-store.c b/widgets/table/e-table-memory-store.c index 00a1ff17af..c51d637681 100644 --- a/widgets/table/e-table-memory-store.c +++ b/widgets/table/e-table-memory-store.c @@ -47,7 +47,7 @@ duplicate_value (ETableMemoryStore *etms, int col, const void *val) return g_strdup (val); case E_TABLE_MEMORY_STORE_COLUMN_TYPE_PIXBUF: if (val) - gdk_pixbuf_ref ((void *) val); + g_object_ref ((void *) val); return (void *) val; case E_TABLE_MEMORY_STORE_COLUMN_TYPE_OBJECT: if (val) @@ -72,7 +72,7 @@ free_value (ETableMemoryStore *etms, int col, void *value) break; case E_TABLE_MEMORY_STORE_COLUMN_TYPE_PIXBUF: if (value) - gdk_pixbuf_unref (value); + g_object_unref (value); break; case E_TABLE_MEMORY_STORE_COLUMN_TYPE_OBJECT: if (value) |