Permalink
Browse files

gtk: Use an infobar in gtk2 if avariable

  • Loading branch information...
1 parent 15daaa5 commit 8cf56f0b9de6bebb3040d69a74fb2d1ff275b6f0 @pepeleproso pepeleproso committed May 31, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 emesene/gui/gtkui/Preferences.py
@@ -1342,9 +1342,9 @@ def __init__(self, session):
'session.config.b_fb_picture_download')
# box with help message
- if gui.gtkui.check_gtk3():
+ if hasattr(gtk, "InfoBar"):
eventBox = gtk.InfoBar()
- eventBox.set_message_type(gtk.MessageType.INFO)
+ eventBox.set_message_type(gtk.MESSAGE_INFO)
box = eventBox.get_content_area ()
else:
eventBox = gtk.EventBox()
@@ -1388,9 +1388,9 @@ def __init__(self, session):
self.session = session
# box with help message
- if gui.gtkui.check_gtk3():
+ if hasattr(gtk, "InfoBar"):
eventBox = gtk.InfoBar()
- eventBox.set_message_type(gtk.MessageType.INFO)
+ eventBox.set_message_type(gtk.MESSAGE_INFO)
box = eventBox.get_content_area ()
else:
eventBox = gtk.EventBox()

0 comments on commit 8cf56f0

Please sign in to comment.