From e9c441c62fea325e88a8c885a468b8d9758d0718 Mon Sep 17 00:00:00 2001 From: Bastien Jacquet Date: Fri, 31 Oct 2014 20:05:01 +0100 Subject: [PATCH] Allow to drag a person by dragging the "Father/Mother/Spouse" label or around Add/edt/share buttons Signed-off-by: Bastien Jacquet --- gramps/plugins/view/relview.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/gramps/plugins/view/relview.py b/gramps/plugins/view/relview.py index cf112e470..0c766244d 100644 --- a/gramps/plugins/view/relview.py +++ b/gramps/plugins/view/relview.py @@ -882,7 +882,12 @@ class RelationshipView(NavigationView): Gtk.STOCK_REMOVE) delete.set_tooltip_text(del_msg) hbox.pack_start(delete, False, True, 0) - self.attach.attach(hbox, _BTN_START, _BTN_STOP, self.row, self.row+1) + + eventbox = Gtk.EventBox() + if family is not None: + self._set_draggable_family(eventbox, family.handle) + eventbox.add(hbox) + self.attach.attach(eventbox, _BTN_START, _BTN_STOP, self.row, self.row+1) self.row += 1 ###################################################################### @@ -1070,7 +1075,12 @@ class RelationshipView(NavigationView): x_align=1, y_align=0) if self._config.get('preferences.releditbtn'): label.set_padding(0, 5) - self.attach.attach(label, _PLABEL_START, _PLABEL_STOP, self.row, + + eventbox = Gtk.EventBox() + if handle is not None: + self._set_draggable_person(eventbox, handle) + eventbox.add(label) + self.attach.attach(eventbox, _PLABEL_START, _PLABEL_STOP, self.row, self.row+1, xoptions=Gtk.AttachOptions.FILL|Gtk.AttachOptions.SHRINK, yoptions=Gtk.AttachOptions.FILL|Gtk.AttachOptions.SHRINK)