Make icon setting more rubust
This commit is contained in:
parent
4bad0a6b96
commit
4a1a65dfbd
@ -7,6 +7,7 @@ import pygtk
|
|||||||
pygtk.require('2.0')
|
pygtk.require('2.0')
|
||||||
import gobject
|
import gobject
|
||||||
import gtk
|
import gtk
|
||||||
|
import glib
|
||||||
|
|
||||||
from util import dbg, err
|
from util import dbg, err
|
||||||
from translation import _
|
from translation import _
|
||||||
@ -122,7 +123,7 @@ class Window(Container, gtk.Window):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
icon = icon_theme.load_icon(APP_NAME, 48, 0)
|
icon = icon_theme.load_icon(APP_NAME, 48, 0)
|
||||||
except NameError:
|
except (NameError, glib.GError):
|
||||||
dbg('Unable to load 48px Terminator icon')
|
dbg('Unable to load 48px Terminator icon')
|
||||||
icon = self.render_icon(gtk.STOCK_DIALOG_INFO, gtk.ICON_SIZE_BUTTON)
|
icon = self.render_icon(gtk.STOCK_DIALOG_INFO, gtk.ICON_SIZE_BUTTON)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user