Allow Copying of text fields for Details tabs (#575)
Allow selection of text fields from details tab in selected views with Details gramplets. - Person Details - Place Details - Repository Details Resolves #7874
This commit is contained in:
parent
2a297623f2
commit
e5a5f212bc
@ -62,6 +62,7 @@ class PersonDetails(Gramplet):
|
|||||||
self.photo.show()
|
self.photo.show()
|
||||||
self.name = Gtk.Label(halign=Gtk.Align.START)
|
self.name = Gtk.Label(halign=Gtk.Align.START)
|
||||||
self.name.override_font(Pango.FontDescription('sans bold 12'))
|
self.name.override_font(Pango.FontDescription('sans bold 12'))
|
||||||
|
self.name.set_selectable(True)
|
||||||
vbox.pack_start(self.name, fill=True, expand=False, padding=7)
|
vbox.pack_start(self.name, fill=True, expand=False, padding=7)
|
||||||
self.grid = Gtk.Grid(orientation=Gtk.Orientation.VERTICAL)
|
self.grid = Gtk.Grid(orientation=Gtk.Orientation.VERTICAL)
|
||||||
self.grid.set_column_spacing(10)
|
self.grid.set_column_spacing(10)
|
||||||
@ -77,8 +78,10 @@ class PersonDetails(Gramplet):
|
|||||||
"""
|
"""
|
||||||
label = Gtk.Label(label=title + COLON, halign=Gtk.Align.END,
|
label = Gtk.Label(label=title + COLON, halign=Gtk.Align.END,
|
||||||
valign=Gtk.Align.START)
|
valign=Gtk.Align.START)
|
||||||
|
label.set_selectable(True)
|
||||||
label.show()
|
label.show()
|
||||||
value = Gtk.Label(label=value, halign=Gtk.Align.START)
|
value = Gtk.Label(label=value, halign=Gtk.Align.START)
|
||||||
|
value.set_selectable(True)
|
||||||
value.show()
|
value.show()
|
||||||
self.grid.add(label)
|
self.grid.add(label)
|
||||||
self.grid.attach_next_to(value, label, Gtk.PositionType.RIGHT, 1, 1)
|
self.grid.attach_next_to(value, label, Gtk.PositionType.RIGHT, 1, 1)
|
||||||
@ -176,6 +179,7 @@ class PersonDetails(Gramplet):
|
|||||||
"""
|
"""
|
||||||
label = Gtk.Label(label='')
|
label = Gtk.Label(label='')
|
||||||
label.override_font(Pango.FontDescription('sans 4'))
|
label.override_font(Pango.FontDescription('sans 4'))
|
||||||
|
label.set_selectable(True)
|
||||||
label.show()
|
label.show()
|
||||||
self.grid.add(label)
|
self.grid.add(label)
|
||||||
|
|
||||||
|
@ -56,6 +56,7 @@ class PlaceDetails(Gramplet):
|
|||||||
self.photo = Photo(self.uistate.screen_height() < 1000)
|
self.photo = Photo(self.uistate.screen_height() < 1000)
|
||||||
self.title = Gtk.Label(halign=Gtk.Align.START)
|
self.title = Gtk.Label(halign=Gtk.Align.START)
|
||||||
self.title.override_font(Pango.FontDescription('sans bold 12'))
|
self.title.override_font(Pango.FontDescription('sans bold 12'))
|
||||||
|
self.title.set_selectable(True)
|
||||||
vbox.pack_start(self.title, False, True, 7)
|
vbox.pack_start(self.title, False, True, 7)
|
||||||
self.grid = Gtk.Grid(orientation=Gtk.Orientation.VERTICAL)
|
self.grid = Gtk.Grid(orientation=Gtk.Orientation.VERTICAL)
|
||||||
self.grid.set_column_spacing(10)
|
self.grid.set_column_spacing(10)
|
||||||
@ -71,8 +72,10 @@ class PlaceDetails(Gramplet):
|
|||||||
"""
|
"""
|
||||||
label = Gtk.Label(label=title + COLON, halign=Gtk.Align.END,
|
label = Gtk.Label(label=title + COLON, halign=Gtk.Align.END,
|
||||||
valign=Gtk.Align.START)
|
valign=Gtk.Align.START)
|
||||||
|
label.set_selectable(True)
|
||||||
label.show()
|
label.show()
|
||||||
value = Gtk.Label(label=value, halign=Gtk.Align.START)
|
value = Gtk.Label(label=value, halign=Gtk.Align.START)
|
||||||
|
value.set_selectable(True)
|
||||||
value.show()
|
value.show()
|
||||||
self.grid.add(label)
|
self.grid.add(label)
|
||||||
self.grid.attach_next_to(value, label, Gtk.PositionType.RIGHT, 1, 1)
|
self.grid.attach_next_to(value, label, Gtk.PositionType.RIGHT, 1, 1)
|
||||||
@ -157,6 +160,7 @@ class PlaceDetails(Gramplet):
|
|||||||
"""
|
"""
|
||||||
label = Gtk.Label(label='')
|
label = Gtk.Label(label='')
|
||||||
label.override_font(Pango.FontDescription('sans 4'))
|
label.override_font(Pango.FontDescription('sans 4'))
|
||||||
|
label.set_selectable(True)
|
||||||
label.show()
|
label.show()
|
||||||
self.grid.add(label)
|
self.grid.add(label)
|
||||||
|
|
||||||
|
@ -52,6 +52,7 @@ class RepositoryDetails(Gramplet):
|
|||||||
vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
|
vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
|
||||||
self.name = Gtk.Label(halign=Gtk.Align.START)
|
self.name = Gtk.Label(halign=Gtk.Align.START)
|
||||||
self.name.override_font(Pango.FontDescription('sans bold 12'))
|
self.name.override_font(Pango.FontDescription('sans bold 12'))
|
||||||
|
self.name.set_selectable(True)
|
||||||
vbox.pack_start(self.name, fill=True, expand=False, padding=7)
|
vbox.pack_start(self.name, fill=True, expand=False, padding=7)
|
||||||
self.grid = Gtk.Grid(orientation=Gtk.Orientation.VERTICAL)
|
self.grid = Gtk.Grid(orientation=Gtk.Orientation.VERTICAL)
|
||||||
self.grid.set_column_spacing(10)
|
self.grid.set_column_spacing(10)
|
||||||
@ -66,8 +67,10 @@ class RepositoryDetails(Gramplet):
|
|||||||
"""
|
"""
|
||||||
label = Gtk.Label(label=title + COLON, halign=Gtk.Align.END,
|
label = Gtk.Label(label=title + COLON, halign=Gtk.Align.END,
|
||||||
valign=Gtk.Align.START)
|
valign=Gtk.Align.START)
|
||||||
|
label.set_selectable(True)
|
||||||
label.show()
|
label.show()
|
||||||
value = Gtk.Label(label=value, halign=Gtk.Align.START)
|
value = Gtk.Label(label=value, halign=Gtk.Align.START)
|
||||||
|
value.set_selectable(True)
|
||||||
value.show()
|
value.show()
|
||||||
self.grid.add(label)
|
self.grid.add(label)
|
||||||
self.grid.attach_next_to(value, label, Gtk.PositionType.RIGHT, 1, 1)
|
self.grid.attach_next_to(value, label, Gtk.PositionType.RIGHT, 1, 1)
|
||||||
@ -153,5 +156,6 @@ class RepositoryDetails(Gramplet):
|
|||||||
"""
|
"""
|
||||||
label = Gtk.Label(label='')
|
label = Gtk.Label(label='')
|
||||||
label.override_font(Pango.FontDescription('sans 4'))
|
label.override_font(Pango.FontDescription('sans 4'))
|
||||||
|
label.set_selectable(True)
|
||||||
label.show()
|
label.show()
|
||||||
self.grid.add(label)
|
self.grid.add(label)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user