Skip to content

Commit 7b7f4ce

Browse files
committed
Type Cleanup: add help button
1 parent 364462e commit 7b7f4ce

File tree

3 files changed

+49
-35
lines changed

3 files changed

+49
-35
lines changed

TypeCleanup/po/template.pot

Lines changed: 38 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: PACKAGE VERSION\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2019-12-26 10:52-0600\n"
11+
"POT-Creation-Date: 2019-12-27 13:30-0600\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language-Team: LANGUAGE <[email protected]>\n"
@@ -25,132 +25,136 @@ msgstr ""
2525
msgid "Clean up (remove) custom types"
2626
msgstr ""
2727

28-
#: TypeCleanup/type_cleanup.py:94
28+
#: TypeCleanup/type_cleanup.py:96
2929
msgid "Event Attributes"
3030
msgstr ""
3131

32-
#: TypeCleanup/type_cleanup.py:95
32+
#: TypeCleanup/type_cleanup.py:97
3333
msgid "Family Attributes"
3434
msgstr ""
3535

36-
#: TypeCleanup/type_cleanup.py:96
36+
#: TypeCleanup/type_cleanup.py:98
3737
msgid "Media Attributes"
3838
msgstr ""
3939

40-
#: TypeCleanup/type_cleanup.py:97
40+
#: TypeCleanup/type_cleanup.py:99
4141
msgid "Person Attributes"
4242
msgstr ""
4343

44-
#: TypeCleanup/type_cleanup.py:99
44+
#: TypeCleanup/type_cleanup.py:101
4545
msgid "Event Roles"
4646
msgstr ""
4747

48-
#: TypeCleanup/type_cleanup.py:100
48+
#: TypeCleanup/type_cleanup.py:102
4949
msgid "Event Types"
5050
msgstr ""
5151

52-
#: TypeCleanup/type_cleanup.py:101
52+
#: TypeCleanup/type_cleanup.py:103
5353
msgid "Family Relation Types"
5454
msgstr ""
5555

56-
#: TypeCleanup/type_cleanup.py:102
56+
#: TypeCleanup/type_cleanup.py:104
5757
msgid "Child reference Types"
5858
msgstr ""
5959

60-
#: TypeCleanup/type_cleanup.py:103
60+
#: TypeCleanup/type_cleanup.py:105
6161
msgid "Name Origin Types"
6262
msgstr ""
6363

64-
#: TypeCleanup/type_cleanup.py:104
64+
#: TypeCleanup/type_cleanup.py:106
6565
msgid "Name Types"
6666
msgstr ""
6767

68-
#: TypeCleanup/type_cleanup.py:105
68+
#: TypeCleanup/type_cleanup.py:107
6969
msgid "Note Types"
7070
msgstr ""
7171

72-
#: TypeCleanup/type_cleanup.py:106
72+
#: TypeCleanup/type_cleanup.py:108
7373
msgid "Place Types"
7474
msgstr ""
7575

76-
#: TypeCleanup/type_cleanup.py:107
76+
#: TypeCleanup/type_cleanup.py:109
7777
msgid "Repository Types"
7878
msgstr ""
7979

80-
#: TypeCleanup/type_cleanup.py:108
80+
#: TypeCleanup/type_cleanup.py:110
8181
msgid "Source Attributes"
8282
msgstr ""
8383

84-
#: TypeCleanup/type_cleanup.py:109
84+
#: TypeCleanup/type_cleanup.py:111
8585
msgid "Source Media Types"
8686
msgstr ""
8787

88-
#: TypeCleanup/type_cleanup.py:110
88+
#: TypeCleanup/type_cleanup.py:112
8989
msgid "URL Types"
9090
msgstr ""
9191

92-
#: TypeCleanup/type_cleanup.py:122
92+
#: TypeCleanup/type_cleanup.py:124
9393
msgid "Types Cleanup Tool"
9494
msgstr ""
9595

96-
#: TypeCleanup/type_cleanup.py:158
96+
#: TypeCleanup/type_cleanup.py:160
97+
msgid "Help"
98+
msgstr ""
99+
100+
#: TypeCleanup/type_cleanup.py:164
97101
msgid "Remove"
98102
msgstr ""
99103

100-
#: TypeCleanup/type_cleanup.py:160
104+
#: TypeCleanup/type_cleanup.py:166
101105
msgid ""
102106
"Remove the selected type from the db.\n"
103107
"This does not change any referenced objects."
104108
msgstr ""
105109

106-
#: TypeCleanup/type_cleanup.py:168
110+
#: TypeCleanup/type_cleanup.py:174
107111
msgid ""
108112
"Select a new name for the current type, prior to renaming the type in the "
109113
"referenced objects."
110114
msgstr ""
111115

112-
#: TypeCleanup/type_cleanup.py:176
116+
#: TypeCleanup/type_cleanup.py:182
113117
msgid "Rename"
114118
msgstr ""
115119

116-
#: TypeCleanup/type_cleanup.py:179
120+
#: TypeCleanup/type_cleanup.py:185
117121
msgid "Rename the selected type in all referenced objects."
118122
msgstr ""
119123

120-
#: TypeCleanup/type_cleanup.py:182
124+
#: TypeCleanup/type_cleanup.py:188
121125
msgid "Close"
122126
msgstr ""
123127

124-
#: TypeCleanup/type_cleanup.py:183
128+
#: TypeCleanup/type_cleanup.py:189
125129
msgid "Close the Type Cleanup Tool"
126130
msgstr ""
127131

128-
#: TypeCleanup/type_cleanup.py:189
132+
#: TypeCleanup/type_cleanup.py:195
129133
msgid "Types"
130134
msgstr ""
131135

132-
#: TypeCleanup/type_cleanup.py:208
136+
#: TypeCleanup/type_cleanup.py:214
133137
msgid "Type"
134138
msgstr ""
135139

136-
#: TypeCleanup/type_cleanup.py:215
140+
#: TypeCleanup/type_cleanup.py:221
137141
msgid "References"
138142
msgstr ""
139143

140-
#: TypeCleanup/type_cleanup.py:236
144+
#: TypeCleanup/type_cleanup.py:242
141145
msgid "Type Cleanup Tool"
142146
msgstr ""
143147

144-
#: TypeCleanup/type_cleanup.py:265
148+
#: TypeCleanup/type_cleanup.py:275
145149
msgid "Reading database..."
146150
msgstr ""
147151

148-
#: TypeCleanup/type_cleanup.py:377
152+
#: TypeCleanup/type_cleanup.py:387
149153
#, python-format
150154
msgid "Changing type from %(old_type)s to %(new_type)s."
151155
msgstr ""
152156

153-
#: TypeCleanup/type_cleanup.py:422
157+
#: TypeCleanup/type_cleanup.py:432
154158
msgid ""
155159
"Removing this custom type will eliminate it from the type selection drop "
156160
"down lists\n"
@@ -160,10 +164,10 @@ msgid ""
160164
"If you want to change it in referenced items, use 'Rename'."
161165
msgstr ""
162166

163-
#: TypeCleanup/type_cleanup.py:427
167+
#: TypeCleanup/type_cleanup.py:437
164168
msgid "_Remove"
165169
msgstr ""
166170

167-
#: TypeCleanup/type_cleanup.py:427
171+
#: TypeCleanup/type_cleanup.py:437
168172
msgid "_Stop"
169173
msgstr ""

TypeCleanup/type_cleanup.gpr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
id = 'typecleanup',
2929
name = _("Type Cleanup"),
3030
description = _("Clean up (remove) custom types"),
31-
version = '1.0.2',
31+
version = '1.0.3',
3232
gramps_target_version = '5.1',
3333
status = STABLE,
3434
fname = 'type_cleanup.py',

TypeCleanup/type_cleanup.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
from gramps.gen.lib.grampstype import GrampsType
4545
from gramps.gen.utils.db import navigation_label
4646
from gramps.gui.dialog import QuestionDialog2
47+
from gramps.gui.display import display_url
4748
from gramps.gui.editors import EditNote
4849
from gramps.gui.plug import tool
4950
from gramps.gui.managedwindow import ManagedWindow
@@ -82,6 +83,7 @@
8283
except ValueError:
8384
_trans = glocale.translation
8485
_ = _trans.gettext
86+
WIKI_PAGE = ('https://gramps-project.org/wiki/index.php/Types_Cleanup_Tool')
8587

8688

8789
#-------------------------------------------------------------------------
@@ -154,6 +156,10 @@ def __init__(self, dbstate, user, options_class, name, callback=None):
154156
# Buttons etc.
155157
bbox = Gtk.ButtonBox(orientation=Gtk.Orientation.HORIZONTAL)
156158
vbox.pack_start(bbox, False, False, 5)
159+
# Help
160+
help_btn = Gtk.Button(label=_('Help'))
161+
help_btn.connect('clicked', self.on_help_clicked)
162+
bbox.add(help_btn)
157163
# Delete
158164
self.del_btn = Gtk.Button(label=_('Remove'))
159165
self.del_btn.set_tooltip_text(
@@ -235,6 +241,10 @@ def build_menu_names(self, _obj):
235241
"""Override :class:`.ManagedWindow` method."""
236242
return (_('Type Cleanup Tool'), None)
237243

244+
def on_help_clicked(self, dummy):
245+
""" Button: Display the relevant portion of GRAMPS manual"""
246+
display_url(WIKI_PAGE)
247+
238248
def model_load(self):
239249
""" populate the tree with types """
240250
r_indx = 0

0 commit comments

Comments
 (0)