@@ 184,8 184,15 @@ class KeyringWindow:
row.set_margin_start(8)
row.set_margin_end(8)
lbr = Gtk.ListBoxRow()
- lbr.add(row)
+ eb = Gtk.EventBox()
+ eb.add(row)
+ lbr.add(eb)
lbr.pair = pair
+
+ lbr.longpress = Gtk.GestureLongPress.new(eb)
+ lbr.longpress.connect("pressed", self.on_key_row_longpress)
+ lbr.longpress.row = lbr
+
self.keyinfo.insert(lbr, -1)
name = Gtk.Label(pair.key, xalign=0.0)
@@ 239,6 246,9 @@ class KeyringWindow:
self.mainstack.set_visible_child_name('nokey')
dialog.destroy()
+ def on_key_row_longpress(self, widget, x, y):
+ self.on_key_row_activate(widget, widget.row)
+
def on_key_row_activate(self, widget, row):
pair = row.pair
if pair.value is not None: