X-Git-Url: https://git.donarmstrong.com/?p=xournal.git;a=blobdiff_plain;f=src%2Fxo-misc.c;fp=src%2Fxo-misc.c;h=43279f24e8ee333f6d5244f5944e2d51e0a2db4c;hp=3d866cf37da202002da89588a5711ceeb5d1f6e3;hb=6bfe4867a794590561e788e99e28752e7a8c76fe;hpb=18f362c5e128d06d7979cc8b19f11f20df65068a diff --git a/src/xo-misc.c b/src/xo-misc.c index 3d866cf..43279f2 100644 --- a/src/xo-misc.c +++ b/src/xo-misc.c @@ -65,7 +65,7 @@ struct Page *new_page(struct Page *template) pg->bg = (struct Background *)g_memdup(template->bg, sizeof(struct Background)); pg->bg->canvas_item = NULL; if (pg->bg->type == BG_PIXMAP || pg->bg->type == BG_PDF) { - gdk_pixbuf_ref(pg->bg->pixbuf); + g_object_ref(pg->bg->pixbuf); refstring_ref(pg->bg->filename); } pg->group = (GnomeCanvasGroup *) gnome_canvas_item_new( @@ -204,7 +204,7 @@ void clear_redo_stack(void) else if (redo->type == ITEM_NEW_BG_ONE || redo->type == ITEM_NEW_BG_RESIZE || redo->type == ITEM_NEW_DEFAULT_BG) { if (redo->bg->type == BG_PIXMAP || redo->bg->type == BG_PDF) { - if (redo->bg->pixbuf!=NULL) gdk_pixbuf_unref(redo->bg->pixbuf); + if (redo->bg->pixbuf!=NULL) g_object_unref(redo->bg->pixbuf); refstring_unref(redo->bg->filename); } g_free(redo->bg); @@ -276,7 +276,7 @@ void clear_undo_stack(void) else if (undo->type == ITEM_NEW_BG_ONE || undo->type == ITEM_NEW_BG_RESIZE || undo->type == ITEM_NEW_DEFAULT_BG) { if (undo->bg->type == BG_PIXMAP || undo->bg->type == BG_PDF) { - if (undo->bg->pixbuf!=NULL) gdk_pixbuf_unref(undo->bg->pixbuf); + if (undo->bg->pixbuf!=NULL) g_object_unref(undo->bg->pixbuf); refstring_unref(undo->bg->filename); } g_free(undo->bg); @@ -333,7 +333,7 @@ void delete_page(struct Page *pg) if (pg->group!=NULL) gtk_object_destroy(GTK_OBJECT(pg->group)); // this also destroys the background's canvas items if (pg->bg->type == BG_PIXMAP || pg->bg->type == BG_PDF) { - if (pg->bg->pixbuf != NULL) gdk_pixbuf_unref(pg->bg->pixbuf); + if (pg->bg->pixbuf != NULL) g_object_unref(pg->bg->pixbuf); if (pg->bg->filename != NULL) refstring_unref(pg->bg->filename); } g_free(pg->bg);