Fix Dashboard for adding Gramplet crash in Slovenian (#978)
Fixes #11491
This commit is contained in:
parent
09e89549de
commit
1a8406e2e4
@ -1473,7 +1473,7 @@ class GrampletPane(Gtk.ScrolledWindow):
|
||||
plugs.sort(key=lambda x: x.name)
|
||||
for plug in plugs:
|
||||
action_name = valid_action_name(plug.id)
|
||||
a_menuitems += menuitem % (action_name, plug.name)
|
||||
a_menuitems += menuitem % (action_name, escape(plug.name))
|
||||
actions.append((action_name,
|
||||
make_callback(self.add_gramplet, plug.name)))
|
||||
names = [gramplet.title for gramplet in self.closed_gramplets]
|
||||
@ -1484,7 +1484,7 @@ class GrampletPane(Gtk.ScrolledWindow):
|
||||
# 'name' could be non-ASCII when in non-English language
|
||||
# action names must be in ASCII, so use 'id' instead.
|
||||
action_name = valid_action_name(str(id(name)))
|
||||
r_menuitems += menuitem % (action_name, name)
|
||||
r_menuitems += menuitem % (action_name, escape(name))
|
||||
actions.append((action_name,
|
||||
make_callback(self.restore_gramplet,
|
||||
name)))
|
||||
|
Loading…
Reference in New Issue
Block a user