[memprof: 72/76] Do not use deprecated GDK functionality.
- From: Holger Hans Peter Freyther <hfreyther src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [memprof: 72/76] Do not use deprecated GDK functionality.
- Date: Sun, 13 Jun 2010 03:44:17 +0000 (UTC)
commit 08bb1cd00ccbf653c1eb25e4e3f2ee84eaa83152
Author: Holger Hans Peter Freyther <zecke selfish org>
Date: Thu Apr 15 09:29:53 2010 +0200
Do not use deprecated GDK functionality.
Use g_object_unref on drawables (GC and Pixmap).
src/detailwin.c | 34 +++++++++++++++++-----------------
1 files changed, 17 insertions(+), 17 deletions(-)
---
diff --git a/src/detailwin.c b/src/detailwin.c
index 2a154f4..971360f 100644
--- a/src/detailwin.c
+++ b/src/detailwin.c
@@ -108,14 +108,14 @@ dw_draw_memstats(ProcessWindow *pwin)
gdk_draw_line(pixmap, gc,
0, y, w, y);
}
- gdk_gc_unref(gc);
+ g_object_unref(gc);
}
state = gtk_widget_get_state (widget);
- gdk_draw_pixmap(gtk_widget_get_window (widget),
+ gdk_draw_drawable(gtk_widget_get_window (widget),
gtk_widget_get_style (widget)->fg_gc[state],
pixmap, 0, 0, 0, 0, w, h);
- gdk_pixmap_unref(pixmap);
+ g_object_unref(pixmap);
}
typedef struct _Mem
@@ -468,21 +468,21 @@ dw_draw_memmap(ProcessWindow *pwin)
g_list_free(mem.regs);
state = gtk_widget_get_state (widget);
- gdk_draw_pixmap(window,
- style->fg_gc[state],
- pixmap, 0, 0, 0, 0, w, h);
+ gdk_draw_drawable(window,
+ style->fg_gc[state],
+ pixmap, 0, 0, 0, 0, w, h);
- gdk_gc_unref(gc_none);
- gdk_gc_unref(gc_bg);
- gdk_gc_unref(gc_bg2);
- gdk_gc_unref(gc_mem);
- gdk_gc_unref(gc_mem2);
- gdk_gc_unref(gc_swapped);
- gdk_gc_unref(gc_present);
- gdk_gc_unref(gc_0);
- gdk_gc_unref(gc_1);
- gdk_pixmap_unref(pixmap);
- gdk_pixmap_unref(stip);
+ g_object_unref(gc_none);
+ g_object_unref(gc_bg);
+ g_object_unref(gc_bg2);
+ g_object_unref(gc_mem);
+ g_object_unref(gc_mem2);
+ g_object_unref(gc_swapped);
+ g_object_unref(gc_present);
+ g_object_unref(gc_0);
+ g_object_unref(gc_1);
+ g_object_unref(pixmap);
+ g_object_unref(stip);
}
gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]