Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def load_pointer(self, name):
""" Perform the change of pointer using its color name
Args:
name (`str`): Name of the pointer to load
"""
if name in ['pointer_red', 'pointer_green', 'pointer_blue']:
self.pointer = GdkPixbuf.Pixbuf.new_from_file(util.get_icon_path(name + '.png'))
else:
raise ValueError('Wrong color name')
"""
about = Gtk.AboutDialog(transient_for = self.p_win)
pympress = util.get_pympress_meta()
about.set_program_name('pympress')
about.set_version(pympress['version'])
about.set_copyright(_('Contributors:') + '\n' + pympress['contributors'])
about.set_comments(_('pympress is a little PDF reader written in Python ' +
'using Poppler for PDF rendering and GTK for the GUI.\n') +
_('Some preferences are saved in ') + self.config.path_to_config() + '\n' +
_('Resources are loaded from ') + os.path.dirname(util.get_locale_dir()) + '\n' +
_('The log is written to ') + util.get_log_path() + '\n\n' +
_('Media support uses {}.').format(self.medias.backend_version()) + '\n' +
_('Python version {}').format(sys.version))
about.set_website('https://github.com/Cimbali/pympress')
try:
about.set_logo(GdkPixbuf.Pixbuf.new_from_file(util.get_icon_path('pympress-128.png')))
except Exception:
logger.exception(_('Error loading icon for about window'))
about.run()
about.destroy()