1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-13 07:34:50 +00:00
freebsd-ports/graphics/diacanvas2/files/patch-diacanvas_dia-undo-manager.c
Koop Mast 1889c7cb03 Fix build with glib 2.34 [1] and while here make it build with clang.
Also add support for GNOME print which wasn't handled.

Submitted by:	pointyhat via miwi [1]
2013-05-21 11:35:49 +00:00

33 lines
1.1 KiB
C

--- diacanvas/dia-undo-manager.c.orig 2013-05-21 09:01:02.000000000 +0000
+++ diacanvas/dia-undo-manager.c 2013-05-21 09:03:46.000000000 +0000
@@ -195,7 +195,8 @@ dia_undo_manager_base_init (gpointer ifa
gboolean
dia_undo_manager_in_transaction (DiaUndoManager *undo_manager)
{
- g_return_if_fail (DIA_IS_UNDO_MANAGER (undo_manager));
+ if (!DIA_IS_UNDO_MANAGER (undo_manager))
+ return FALSE;
if (!DIA_UNDO_MANAGER_GET_IFACE (undo_manager)->in_transaction)
return FALSE;
@@ -214,7 +215,8 @@ dia_undo_manager_in_transaction (DiaUndo
gboolean
dia_undo_manager_can_undo (DiaUndoManager *undo_manager)
{
- g_return_if_fail (DIA_IS_UNDO_MANAGER (undo_manager));
+ if (!DIA_IS_UNDO_MANAGER (undo_manager))
+ return FALSE;
if (!DIA_UNDO_MANAGER_GET_IFACE (undo_manager)->can_undo)
return FALSE;
@@ -233,7 +235,8 @@ dia_undo_manager_can_undo (DiaUndoManage
gboolean
dia_undo_manager_can_redo (DiaUndoManager *undo_manager)
{
- g_return_if_fail (DIA_IS_UNDO_MANAGER (undo_manager));
+ if (!DIA_IS_UNDO_MANAGER (undo_manager))
+ return FALSE;
if (!DIA_UNDO_MANAGER_GET_IFACE (undo_manager)->can_redo)
return FALSE;