|
44 | 44 | from gi.repository import GObject # pylint: disable=import-error
|
45 | 45 | from gi.repository import Gdk # pylint: disable=import-error
|
46 | 46 | from gi.repository import Gtk # pylint: disable=import-error
|
47 |
| - |
| 47 | +from gi.repository.GLib import markup_escape_text |
48 | 48 | #-------------------------------------------------------------------------
|
49 | 49 | #
|
50 | 50 | # gramps modules
|
@@ -520,13 +520,13 @@ def button_press_reg(self, obj, event):
|
520 | 520 | if event.type == Gdk.EventType._2BUTTON_PRESS and event.button == 1:
|
521 | 521 | self.__info(obj, self._list_reg)
|
522 | 522 |
|
523 |
| - def filter_str_changed(self, widget): |
| 523 | + def filter_str_changed(self, _widget): |
524 | 524 | """
|
525 | 525 | Called when filter string is changed.
|
526 | 526 | """
|
527 | 527 | self.__rebuild_reg_list(rescan=False)
|
528 | 528 |
|
529 |
| - def _apply_filter(self, model, tr_iter, data): |
| 529 | + def _apply_filter(self, model, tr_iter, _data): |
530 | 530 | """
|
531 | 531 | Check if we need hide or show row acording the filter.
|
532 | 532 | This is for "self._tree_filter.set_visible_func".
|
@@ -569,7 +569,7 @@ def __rebuild_reg_list(self, path=None, rescan=True):
|
569 | 569 | self._list_reg.scroll_to_cell(path, None, True, 0.5, 0)
|
570 | 570 | self._cursor_changed(None)
|
571 | 571 |
|
572 |
| - def _cursor_changed(self, obj): |
| 572 | + def _cursor_changed(self, _obj): |
573 | 573 | model, node = self._selection_reg.get_selected()
|
574 | 574 | if not node:
|
575 | 575 | return
|
@@ -676,8 +676,10 @@ def __populate_reg_list(self):
|
676 | 676 | if hidden:
|
677 | 677 | status_str = "<s>%s</s>" % status_str
|
678 | 678 | 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] |
681 | 683 | addons.append(row)
|
682 | 684 |
|
683 | 685 | fail_list = self._pmgr.get_fail_list()
|
@@ -705,14 +707,16 @@ def __populate_reg_list(self):
|
705 | 707 | if hidden:
|
706 | 708 | status_str = "<s>%s</s>" % status_str
|
707 | 709 | 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]) |
710 | 714 | for row in sorted(addons, key=itemgetter(R_TYPE, R_NAME)):
|
711 | 715 | if self._show_hidden or (row[R_ID] not in self.hidden):
|
712 | 716 | self._model_reg.append(row)
|
713 | 717 | self._selection_reg.select_path('0')
|
714 | 718 |
|
715 |
| - def build_menu_names(self, obj): |
| 719 | + def build_menu_names(self, _obj): |
716 | 720 | return (TITLE, ' ')
|
717 | 721 |
|
718 | 722 |
|
@@ -749,7 +753,7 @@ def __init__(self, uistate, track, data, name):
|
749 | 753 | self.window.get_content_area().add(scrolled_window)
|
750 | 754 | self.show()
|
751 | 755 |
|
752 |
| - def build_menu_names(self, obj): |
| 756 | + def build_menu_names(self, _obj): |
753 | 757 | return (self.name, None)
|
754 | 758 |
|
755 | 759 |
|
@@ -879,5 +883,4 @@ def __init__(self, name, person_id=None):
|
879 | 883 | 'show_builtins': ("=0/1", "Show builtin Plugins",
|
880 | 884 | ["Do not show builtin Plugins",
|
881 | 885 | "Show builtin Plugins"],
|
882 |
| - True), |
883 |
| - } |
| 886 | + True),} |
0 commit comments