Skip to content

Commit 6e6eace

Browse files
committed
Add an "Actions" button the the FormGramplet window
1 parent 2ac2478 commit 6e6eace

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Form/formgramplet.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Gramps - a GTK+/GNOME based genealogy program
33
#
44
# Copyright (C) 2009-2015 Nick Hall
5+
# Copyright (C) 2019 Steve Youngs
56
#
67
# This program is free software; you can redistribute it and/or modify
78
# it under the terms of the GNU General Public License as published by
@@ -130,6 +131,10 @@ def __create_gui(self):
130131
edit.connect("clicked", self.__edit_form, view.get_selection())
131132
button_box.add(edit)
132133

134+
actions = Gtk.Button(label=_('_Actions'), use_underline=True)
135+
actions.connect("clicked", self.__form_actions, view.get_selection())
136+
button_box.add(actions)
137+
133138
vbox.pack_start(view, expand=True, fill=True, padding=0)
134139
vbox.pack_end(button_box, expand=False, fill=True, padding=4)
135140

@@ -170,6 +175,18 @@ def __edit_form(self, widget, selection):
170175
except WindowActiveError:
171176
pass
172177

178+
def __form_actions(self, widget, selection):
179+
"""
180+
Display actions for the selected form.
181+
"""
182+
model, iter_ = selection.get_selected()
183+
if iter_:
184+
citation = model.get_value(iter_, 0)
185+
try:
186+
pass
187+
except WindowActiveError:
188+
pass
189+
173190
def main(self):
174191
"""
175192
Called to update the display.

0 commit comments

Comments
 (0)