Skip to content

Commit 529b539

Browse files
committed
Fix PluginManager for odd characters in descriptions
1 parent 3c6ba87 commit 529b539

File tree

4 files changed

+27
-24
lines changed

4 files changed

+27
-24
lines changed

GraphView/graphview.gpr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
name = _("Graph View"),
3333
category = ("Ancestry", _("Charts")),
3434
description = _("Dynamic and interactive graph of relations"),
35-
version = '1.0.96',
35+
version = '1.0.97',
3636
gramps_target_version = "5.1",
3737
status = STABLE,
3838
fname = 'graphview.py',

PluginManager/PluginManager.gpr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
name = _("Plugin Manager Enhanced"),
3030
description = _("An Addon/Plugin Manager with several additional "
3131
"capabilities"),
32-
version = '1.0.20',
32+
version = '1.0.21',
3333
gramps_target_version = '5.1',
3434
fname = "PluginManagerLoad.py",
3535
authors = ["Paul Culley"],

PluginManager/PluginManager.py

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
from gi.repository import GObject # pylint: disable=import-error
4545
from gi.repository import Gdk # pylint: disable=import-error
4646
from gi.repository import Gtk # pylint: disable=import-error
47-
47+
from gi.repository.GLib import markup_escape_text
4848
#-------------------------------------------------------------------------
4949
#
5050
# gramps modules
@@ -520,13 +520,13 @@ def button_press_reg(self, obj, event):
520520
if event.type == Gdk.EventType._2BUTTON_PRESS and event.button == 1:
521521
self.__info(obj, self._list_reg)
522522

523-
def filter_str_changed(self, widget):
523+
def filter_str_changed(self, _widget):
524524
"""
525525
Called when filter string is changed.
526526
"""
527527
self.__rebuild_reg_list(rescan=False)
528528

529-
def _apply_filter(self, model, tr_iter, data):
529+
def _apply_filter(self, model, tr_iter, _data):
530530
"""
531531
Check if we need hide or show row acording the filter.
532532
This is for "self._tree_filter.set_visible_func".
@@ -569,7 +569,7 @@ def __rebuild_reg_list(self, path=None, rescan=True):
569569
self._list_reg.scroll_to_cell(path, None, True, 0.5, 0)
570570
self._cursor_changed(None)
571571

572-
def _cursor_changed(self, obj):
572+
def _cursor_changed(self, _obj):
573573
model, node = self._selection_reg.get_selected()
574574
if not node:
575575
return
@@ -676,8 +676,10 @@ def __populate_reg_list(self):
676676
if hidden:
677677
status_str = "<s>%s</s>" % status_str
678678
status |= HIDDEN
679-
row = [_(plugin_dict["t"]), status_str, plugin_dict["n"],
680-
plugin_dict["d"], plugin_dict["i"], status]
679+
row = [_(plugin_dict["t"]), status_str,
680+
markup_escape_text(plugin_dict["n"]),
681+
markup_escape_text(plugin_dict["d"]),
682+
plugin_dict["i"], status]
681683
addons.append(row)
682684

683685
fail_list = self._pmgr.get_fail_list()
@@ -705,14 +707,16 @@ def __populate_reg_list(self):
705707
if hidden:
706708
status_str = "<s>%s</s>" % status_str
707709
status |= HIDDEN
708-
addons.append([typestr, status_str, pdata.name,
709-
pdata.description, pdata.id, status])
710+
addons.append([typestr, status_str,
711+
markup_escape_text(pdata.name),
712+
markup_escape_text(pdata.description),
713+
pdata.id, status])
710714
for row in sorted(addons, key=itemgetter(R_TYPE, R_NAME)):
711715
if self._show_hidden or (row[R_ID] not in self.hidden):
712716
self._model_reg.append(row)
713717
self._selection_reg.select_path('0')
714718

715-
def build_menu_names(self, obj):
719+
def build_menu_names(self, _obj):
716720
return (TITLE, ' ')
717721

718722

@@ -749,7 +753,7 @@ def __init__(self, uistate, track, data, name):
749753
self.window.get_content_area().add(scrolled_window)
750754
self.show()
751755

752-
def build_menu_names(self, obj):
756+
def build_menu_names(self, _obj):
753757
return (self.name, None)
754758

755759

@@ -879,5 +883,4 @@ def __init__(self, name, person_id=None):
879883
'show_builtins': ("=0/1", "Show builtin Plugins",
880884
["Do not show builtin Plugins",
881885
"Show builtin Plugins"],
882-
True),
883-
}
886+
True),}

PluginManager/po/template.pot

Lines changed: 10 additions & 10 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-01-22 09:28-0600\n"
11+
"POT-Creation-Date: 2019-09-18 11:31-0500\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"
@@ -53,7 +53,7 @@ msgstr ""
5353
msgid "Reload"
5454
msgstr ""
5555

56-
#: PluginManager/PluginManager.py:174 PluginManager/PluginManager.py:735
56+
#: PluginManager/PluginManager.py:174 PluginManager/PluginManager.py:739
5757
msgid "_Close"
5858
msgstr ""
5959

@@ -106,7 +106,7 @@ msgstr ""
106106
msgid "Hidden"
107107
msgstr ""
108108

109-
#: PluginManager/PluginManager.py:304 PluginManager/PluginManager.py:699
109+
#: PluginManager/PluginManager.py:304 PluginManager/PluginManager.py:701
110110
msgid "Failed"
111111
msgstr ""
112112

@@ -215,31 +215,31 @@ msgstr ""
215215
msgid "*Available"
216216
msgstr ""
217217

218-
#: PluginManager/PluginManager.py:688
218+
#: PluginManager/PluginManager.py:690
219219
msgid "Built-in"
220220
msgstr ""
221221

222-
#: PluginManager/PluginManager.py:693
222+
#: PluginManager/PluginManager.py:695
223223
msgid "*Installed"
224224
msgstr ""
225225

226-
#: PluginManager/PluginManager.py:702
226+
#: PluginManager/PluginManager.py:704
227227
msgid "Update Available"
228228
msgstr ""
229229

230-
#: PluginManager/PluginManager.py:729
230+
#: PluginManager/PluginManager.py:733
231231
#, python-format
232232
msgid "%(str1)s: %(str2)s"
233233
msgstr ""
234234

235-
#: PluginManager/PluginManager.py:729
235+
#: PluginManager/PluginManager.py:733
236236
msgid "Detailed Info"
237237
msgstr ""
238238

239-
#: PluginManager/PluginManager.py:828
239+
#: PluginManager/PluginManager.py:832
240240
msgid "Updated"
241241
msgstr ""
242242

243-
#: PluginManager/PluginManager.py:839
243+
#: PluginManager/PluginManager.py:843
244244
msgid "updates|New"
245245
msgstr ""

0 commit comments

Comments
 (0)