Catch when recent file type is not supported. See #192.

This commit is contained in:
Juan Pablo Caram 2016-02-29 14:18:50 -05:00
parent 0cc60576ab
commit ced43df1bc

View File

@ -3428,6 +3428,7 @@ class App(QtCore.QObject):
for recent in self.recent:
filename = recent['filename'].split('/')[-1].split('\\')[-1]
try:
action = QtGui.QAction(QtGui.QIcon(icons[recent["kind"]]), filename, self)
# Attach callback
@ -3436,6 +3437,9 @@ class App(QtCore.QObject):
self.ui.recent.addAction(action)
except KeyError:
App.log.error("Unsupported file type: %s" % recent["kind"])
# self.builder.get_object('open_recent').set_submenu(recent_menu)
# self.ui.menufilerecent.set_submenu(recent_menu)
# recent_menu.show_all()