2007-07-17 Don Allingham <don@gramps-project.org>

* src/Editors/_EditSourceRef.py: remove text tab
	* src/Editors/_EditRepoRef.py: Add privacy to reporef
	* src/Lru.py: pylint
	* src/Selectors/_BaseSelector.py: set sort column
	* src/DbManager.py: clean up of dnd
	* src/glade/gramps.glade: Add privacy to reporef
	* src/DisplayModels/_PeopleModel.py: try to speed up sorts using
	mapper values
	* src/GrampsDbUtils/_GedcomParse.py: handle source text citations
	* src/GrampsDbUtils/_ReadGedcom.py: type check
	* src/GrampsDbUtils/_GedcomLex.py: handle broken conc
	* src/GrampsDbUtils/_WriteGedcom.py: handle source text citations



svn: r8734
This commit is contained in:
Don Allingham
2007-07-18 04:17:30 +00:00
parent 8638e1d326
commit 582c56e11e
13 changed files with 135 additions and 55 deletions

View File

@@ -134,6 +134,7 @@ class DbManager:
self.active = None
self.selection = self.dblist.get_selection()
self.dblist.set_rules_hint(True)
self.current_names = []
@@ -155,6 +156,8 @@ class DbManager:
self.selection.connect('changed', self.__selection_changed)
self.dblist.connect('button-press-event', self.__button_press)
self.top.connect('drag_data_received', self.__drag_data_received)
self.top.connect('drag_motion', self.__drag_motion)
self.top.connect('drag_drop', self.__drop_cb)
if RCS_FOUND:
self.rcs.connect('clicked', self.__rcs)
@@ -646,29 +649,27 @@ class DbManager:
start_editing=True)
return new_path
def __drag_motion(self, wid, context, x, y, time):
context.drag_status(gtk.gdk.ACTION_COPY, time)
return True
def __drop_cb(self, wid, context, x, y, time):
context.finish(True, False, time)
return True
def __drag_data_received(self, widget, context, xpos, ypos, selection,
info, rtime):
"""
Handle the reception of drag data
"""
# The selection object contains the appropriate information.
# Unfortunately, not all file managers work the same. Nautilus
# stores the file name as the text item in selection, while
# thunar holds it in uris.
# Check for Thunar
uris = selection.get_uris()
if uris: # Thunar
drag_value = uris[0]
elif selection.get_text(): # Nautilus
drag_value = selection.get_text().strip()
else:
return True
drag_value = selection.data
print drag_value
# we are only interested in this if it is a file:// URL.
if drag_value[0:7] == "file://":
if drag_value and drag_value[0:7] == "file://":
drag_value = drag_value.strip()
# deterimine the mime type. If it is one that we are interested in,
# we process it