2005-03-18 Richard Taylor <rjt-gramps@thegrindstone.me.uk>
* src/plugins/ScratchPad.py: Tidy up of drag target type handling. * src/EditPerson.py (x_drag_data_received): fixed problem with drag and drop of objects that have srcrefs. svn: r4206
This commit is contained in:
parent
a384bc20b7
commit
25e6c350c8
@ -1,3 +1,8 @@
|
|||||||
|
2005-03-18 Richard Taylor <rjt-gramps@thegrindstone.me.uk>
|
||||||
|
* src/plugins/ScratchPad.py: Tidy up of drag target type handling.
|
||||||
|
* src/EditPerson.py (x_drag_data_received): fixed problem with
|
||||||
|
drag and drop of objects that have srcrefs.
|
||||||
|
|
||||||
2005-03-17 Martin Hawlisch <Martin.Hawlisch@gmx.de>
|
2005-03-17 Martin Hawlisch <Martin.Hawlisch@gmx.de>
|
||||||
* src/GrampsGconfKeys.py (get_bool,get_int,get_string): Raise
|
* src/GrampsGconfKeys.py (get_bool,get_int,get_string): Raise
|
||||||
exception when default value could not be get from gconf schema
|
exception when default value could not be get from gconf schema
|
||||||
|
@ -807,7 +807,7 @@ class EditPerson:
|
|||||||
for src in foo.get_source_references():
|
for src in foo.get_source_references():
|
||||||
base_handle = src.get_base_handle()
|
base_handle = src.get_base_handle()
|
||||||
newbase = self.db.get_source_from_handle(base_handle)
|
newbase = self.db.get_source_from_handle(base_handle)
|
||||||
src.set_base_handle(newbase)
|
src.set_base_handle(newbase.get_handle())
|
||||||
place = foo.get_place_handle()
|
place = foo.get_place_handle()
|
||||||
if place:
|
if place:
|
||||||
foo.set_place_handle(place.get_handle())
|
foo.set_place_handle(place.get_handle())
|
||||||
@ -885,7 +885,7 @@ class EditPerson:
|
|||||||
for src in foo.get_source_references():
|
for src in foo.get_source_references():
|
||||||
base_handle = src.get_base_handle()
|
base_handle = src.get_base_handle()
|
||||||
newbase = self.db.get_source_from_handle(base_handle)
|
newbase = self.db.get_source_from_handle(base_handle)
|
||||||
src.set_base_handle(newbase)
|
src.set_base_handle(newbase.get_handle())
|
||||||
self.alist.append(foo)
|
self.alist.append(foo)
|
||||||
self.lists_changed = True
|
self.lists_changed = True
|
||||||
self.redraw_attr_list()
|
self.redraw_attr_list()
|
||||||
@ -918,7 +918,7 @@ class EditPerson:
|
|||||||
for src in foo.get_source_references():
|
for src in foo.get_source_references():
|
||||||
base_handle = src.get_base_handle()
|
base_handle = src.get_base_handle()
|
||||||
newbase = self.db.get_source_from_handle(base_handle)
|
newbase = self.db.get_source_from_handle(base_handle)
|
||||||
src.set_base_handle(newbase)
|
src.set_base_handle(newbase.get_handle())
|
||||||
self.plist.insert(row,foo)
|
self.plist.insert(row,foo)
|
||||||
|
|
||||||
self.lists_changed = True
|
self.lists_changed = True
|
||||||
|
@ -60,6 +60,12 @@ text_targets = ['text/plain',
|
|||||||
'COMPOUND_TEXT',
|
'COMPOUND_TEXT',
|
||||||
'UTF8_STRING']
|
'UTF8_STRING']
|
||||||
|
|
||||||
|
text_tgts = [('text/plain',0,0),
|
||||||
|
('TEXT', 0, 1),
|
||||||
|
('STRING', 0, 2),
|
||||||
|
('COMPOUND_TEXT', 0, 3),
|
||||||
|
('UTF8_STRING', 0, 4)]
|
||||||
|
|
||||||
gramps_targets = ['url',
|
gramps_targets = ['url',
|
||||||
'pevent',
|
'pevent',
|
||||||
'pattr',
|
'pattr',
|
||||||
@ -70,21 +76,17 @@ pycode_tgts = [('url', 0, 0),
|
|||||||
('pevent', 0, 1),
|
('pevent', 0, 1),
|
||||||
('pattr', 0, 2),
|
('pattr', 0, 2),
|
||||||
('paddr', 0, 3),
|
('paddr', 0, 3),
|
||||||
('srcref', 0, 4),
|
('srcref', 0, 4)] + text_tgts
|
||||||
('text/plain',0,0),
|
|
||||||
('TEXT', 0, 1),
|
|
||||||
('STRING', 0, 2),
|
|
||||||
('COMPOUND_TEXT', 0, 3),
|
|
||||||
('UTF8_STRING', 0, 4)]
|
|
||||||
|
|
||||||
TEXT_TARGET = 'TEXT'
|
TEXT_TARGET = 'TEXT'
|
||||||
|
|
||||||
target_map = {'url':('url', 0, 0),
|
target_map = {'url':[('url', 0, 0)],
|
||||||
'pevent': ('pevent', 0, 1),
|
'pevent': [('pevent', 0, 1)],
|
||||||
'pattr': ('pattr', 0, 2),
|
'pattr': [('pattr', 0, 2)],
|
||||||
'paddr': ('paddr', 0, 3),
|
'paddr': [('paddr', 0, 3)],
|
||||||
'srcref': ('srcref', 0, 4),
|
'srcref': [('srcref', 0, 4)],
|
||||||
TEXT_TARGET: ('TEXT', 0, 1)}
|
TEXT_TARGET: text_tgts}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -281,7 +283,7 @@ class ScratchPadWindow:
|
|||||||
target = target_map[TEXT_TARGET]
|
target = target_map[TEXT_TARGET]
|
||||||
|
|
||||||
self.object_list.drag_source_unset()
|
self.object_list.drag_source_unset()
|
||||||
self.object_list.drag_source_set(BUTTON1_MASK, [target], ACTION_COPY)
|
self.object_list.drag_source_set(BUTTON1_MASK, target, ACTION_COPY)
|
||||||
|
|
||||||
|
|
||||||
def on_update_object_clicked(self, obj):
|
def on_update_object_clicked(self, obj):
|
||||||
|
Loading…
Reference in New Issue
Block a user