#! /bin/sh /usr/share/dpatch/dpatch-run
## 03_fix_bond_and_arrow_fixes.dpatch by Guillaume Burel.
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: * bonds.c (add_bond): Set the ending head by default, when drawing an
## DP:   arrow.
## DP: * dialogs.c (edit_bond): Swap the beginning/ending arrow heads, which
## DP:   now fit, what the user sees.

@DPATCH@
diff -urNad easychem-0.6~/bonds.c easychem-0.6/bonds.c
--- easychem-0.6~/bonds.c	2005-05-04 10:10:07.000000000 +0200
+++ easychem-0.6/bonds.c	2006-11-14 22:18:34.000000000 +0100
@@ -676,7 +676,12 @@
   new->y2 = y2;
   new->x3 = 0;
   new->y3 = 0;
-  new->x4 = 0;
+  switch (type) 
+    {
+    case BOND_ARROW: new->x4 = 1; break;
+      
+    default:  new->x4 = 0;
+    };
   new->y4 = 0;
   new->width = 1.0;
   new->color = black;
diff -urNad easychem-0.6~/dialogs.c easychem-0.6/dialogs.c
--- easychem-0.6~/dialogs.c	2006-11-14 22:18:00.000000000 +0100
+++ easychem-0.6/dialogs.c	2006-11-14 22:20:29.000000000 +0100
@@ -528,8 +528,8 @@
 
 #undef ADD_MENU_ITEM
 
-  ADD_ROW (_("Beginning arrowhead:"), p.head1_l, p.head1);
-  ADD_ROW (_("Ending arrowhead:"), p.head2_l, p.head2);
+  ADD_ROW (_("Beginning arrowhead:"), p.head2_l, p.head2);
+  ADD_ROW (_("Ending arrowhead:"), p.head1_l, p.head1);
 
   if (bond->type == BOND_ARROW || bond->type == BOND_ARC)
     gtk_option_menu_set_history (GTK_OPTION_MENU (p.head1), bond->x4);
