diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 67ed12f50..c3c6ab547 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,8 @@ +2006-03-26 Don Allingham + * src/DataViews/_PedigreeView.py: start of dnd-icon - not working yet + * src/DataViews/_PersonView.py: set dnd icon + * src/PageView.py: set dnd icon + 2006-03-25 Martin Hawlisch * src/DataViews/_PedigreeView.py: Add DnD support to the person boxes; copy person data into clipboard; Open FamilyEditor to add missing diff --git a/gramps2/src/DataViews/_PedigreeView.py b/gramps2/src/DataViews/_PedigreeView.py index 9289ab640..ba68b114a 100644 --- a/gramps2/src/DataViews/_PedigreeView.py +++ b/gramps2/src/DataViews/_PedigreeView.py @@ -102,11 +102,15 @@ class _PersonWidget_base: self.force_mouse_over = False if self.person: self.connect("drag_data_get", self.drag_data_get) + #self.connect('drag_begin', self.drag_begin) self.drag_source_set(gtk.gdk.BUTTON1_MASK, [DdTargets.PERSON_LINK.target()]+ [t.target() for t in DdTargets._all_text_types], gtk.gdk.ACTION_COPY) + def drag_begin(self, widget, context, data): + self.drag_source_set_icon_stock('gramps-person') + def drag_data_get(self, widget, context, sel_data, info, time): if sel_data.target == DdTargets.PERSON_LINK.drag_type: data = (DdTargets.PERSON_LINK.drag_type, id(self), self.person.get_handle(), 0) diff --git a/gramps2/src/DataViews/_PersonView.py b/gramps2/src/DataViews/_PersonView.py index 7b04d8934..616d7d0a0 100644 --- a/gramps2/src/DataViews/_PersonView.py +++ b/gramps2/src/DataViews/_PersonView.py @@ -170,6 +170,7 @@ class PersonView(PageView.PersonNavView): self.build_columns() self.tree.connect('button-press-event', self.button_press) self.tree.connect('drag_data_get', self.drag_data_get) + self.tree.connect('drag_begin', self.drag_begin) self.selection = self.tree.get_selection() self.selection.set_mode(gtk.SELECTION_MULTIPLE) @@ -182,6 +183,9 @@ class PersonView(PageView.PersonNavView): self.setup_filter() return self.vbox + def drag_begin(self, widget, *data): + widget.drag_source_set_icon_stock(self.get_stock()) + def ui_definition(self): """ Specifies the UIManager XML code that defines the menus and buttons diff --git a/gramps2/src/PageView.py b/gramps2/src/PageView.py index 0a2192f23..b7540b987 100644 --- a/gramps2/src/PageView.py +++ b/gramps2/src/PageView.py @@ -354,6 +354,9 @@ class ListView(PageView): def drag_info(self): return None + + def drag_begin(self, widget, *data): + widget.drag_source_set_icon_stock(self.get_stock()) def column_order(self): assert False @@ -380,6 +383,7 @@ class ListView(PageView): self.list.connect('key-press-event',self.key_press) if self.drag_info(): self.list.connect('drag_data_get', self.drag_data_get) + self.list.connect('drag_begin', self.drag_begin) scrollwindow = gtk.ScrolledWindow() scrollwindow.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)