Bug#306040: dia: Please include patch to fix display references
Hervé Cauwelier
Hervé Cauwelier <hcauwelier@oursours.net>, 306040@bugs.debian.org
Sat, 23 Apr 2005 23:59:15 +0200
This is a multi-part message in MIME format.
--------------080601060405030201040009
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit
Package: dia
Severity: wishlist
Tags: patch
Quoting Hans Breuer <hans@breuer.org>:
"* app/display.c : stop special casing the first display of
a diagram. Every display now has it's own refernce. The initial
reference gets dropped when there is no display anymore. See
diagram_remove_ddisplay(). Fixes bug #300744."
The change is attached as a dpatch file.
--
Hervé Cauwelier
http://www.oursours.net/
--------------080601060405030201040009
Content-Type: text/plain;
name="02_stop-special-casing-the-first-display-of-a-diagram.dpatch"
Content-Transfer-Encoding: 8bit
Content-Disposition: inline;
filename="02_stop-special-casing-the-first-display-of-a-diagram.dpatch"
#! /bin/sh /usr/share/dpatch/dpatch-run
## 02_stop-special-casing-the-first-display-of-a-diagram.dpatch by Hervé Cauwelier <hcauwelier@oursours.net>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.
@DPATCH@
diff -urNad dia-0.94.0/app/display.c /tmp/dpep.FoO912/dia-0.94.0/app/display.c
--- dia-0.94.0/app/display.c 2004-08-16 09:56:03.000000000 +0200
+++ /tmp/dpep.FoO912/dia-0.94.0/app/display.c 2005-04-23 20:02:56.961314800 +0200
@@ -131,8 +131,7 @@
memset (&ddisp->updatable_menu_items, 0, sizeof (UpdatableMenuItems));
ddisp->diagram = dia;
- if (dia->display_count > 1)
- /* The first display gets the initial ref */
+ /* Every display has it's own reference */
g_object_ref(dia);
ddisp->grid.visible = prefs.grid.visible;
--------------080601060405030201040009--