Skip to content

Instantly share code, notes, and snippets.

Created June 23, 2015 09:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/23cc87aa311df95037c5 to your computer and use it in GitHub Desktop.
Save anonymous/23cc87aa311df95037c5 to your computer and use it in GitHub Desktop.
diff --git a/src/gnome_abrt/views.py b/src/gnome_abrt/views.py
index 95c9639..5330855 100644
--- a/src/gnome_abrt/views.py
+++ b/src/gnome_abrt/views.py
@@ -833,23 +833,17 @@ class OopsWindow(Gtk.ApplicationWindow):
self._builder.lbl_detected_value.set_tooltip_text(
problem['date'].strftime(config.get_configuration()['D_T_FMT']))
- if app.icon:
- self._builder.img_app_icon.set_from_pixbuf(
- Gtk.IconTheme
- .get_default()
- .lookup_by_gicon(app.icon,
- 128,
- Gtk.IconLookupFlags.FORCE_SIZE)
- .load_icon())
- else:
- self._builder.img_app_icon.set_from_pixbuf(
- Gtk.IconTheme
- .get_default()
- .lookup_icon("system-run-symbolic",
- 128,
- Gtk.IconLookupFlags.FORCE_SIZE |
- Gtk.IconLookupFlags.FORCE_SYMBOLIC)
- .load_icon())
+ application_icon = Gtk.IconTheme
+ .get_default()
+ .lookup_by_gicon(app.icon, 128, Gtk.IconLookupFlags.FORCE_SIZE)
+ if !application_icon:
+ application_icon = Gtk.IconTheme
+ .get_default()
+ .lookup_icon("system-run-symbolic",
+ 128,
+ Gtk.IconLookupFlags.FORCE_SIZE |
+ Gtk.IconLookupFlags.FORCE_SYMBOLIC)
+ self._builder.img_app_icon.set_from_pixbuf(application_icon.load_icon())
self._builder.lbl_reported_value.show()
self._builder.lbl_reported.set_text(_("Reported"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment