GTK3: allow drag and drop of files on mediaview, fix metadata gramplet

svn: r20106
This commit is contained in:
Benny Malengier 2012-07-27 14:47:09 +00:00
parent f21dd31e91
commit 1d21989810
2 changed files with 18 additions and 1 deletions

View File

@ -168,6 +168,11 @@ class ListView(NavigationView):
[self.drag_dest_info().target()],
Gdk.DragAction.MOVE |
Gdk.DragAction.COPY)
tglist = Gtk.TargetList.new([])
tglist.add(self.drag_dest_info().atom_drag_type,
self.drag_dest_info().target_flags,
self.drag_dest_info().app_id)
self.list.drag_dest_set_target_list(tglist)
scrollwindow = Gtk.ScrolledWindow()
scrollwindow.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)

View File

@ -21,6 +21,19 @@
#
# $Id$
#
#-------------------------------------------------------------------------
#
# GNOME modules
#
#-------------------------------------------------------------------------
from gi.repository import GObject
from gi.repository import Gtk
#-------------------------------------------------------------------------
#
# Gramps modules
#
#-------------------------------------------------------------------------
from gui.listmodel import ListModel
from gen.ggettext import gettext as _
@ -29,7 +42,6 @@ from fractions import Fraction
import gen.lib
import gen.datehandler
import datetime
from gi.repository import Gtk
import pyexiv2
# v0.1 has a different API to v0.2 and above