GtkInfobars for a GTK+ application
I'd move all of those message into an external resource file something like:

&lt;message id="file.open.fail" type="warning" icon="error" delay="5"&gt;
    &lt;b&gt;Error. Could not open file:&lt;i&gt;&lt;tt&gt;&lt;small&gt;{filename}&lt;/small&gt;&lt;/tt&gt;&lt;/i&gt;&lt;/b&gt;
&lt;/message&gt;


Then I'd simply pop the message using:

self.infobar('file.open.fail', filename = filename)


That should cleanup the calls to infobar, and make it easier to do things like provide strings for a different language. 

EDIT:

Quick hack of an implementation

from xml.etree.ElementTree import XML, tostring

# of course, you'd want to load this from an external file
message_file = XML("""
&lt;messages&gt;
    &lt;message id="file.open.fail" type="warning" icon="error" delay="5"&gt;
        &lt;b&gt;Error. Could not open file:&lt;i&gt;&lt;tt&gt;&lt;small&gt;{filename}&lt;/small&gt;&lt;/tt&gt;&lt;/i&gt;&lt;/b&gt;
    &lt;/message&gt;
    &lt;message id="file.open.good" type="warning" icon="error" delay="5"&gt;
        &lt;b&gt;File opened!&lt;/b&gt;
    &lt;/message&gt;
&lt;/messages&gt;
""")

messages = {}
for message in message_file.findall("message"):
    messages[message.attrib['id']] = message

def message(id, **kwargs):
    message_detail = messages[id]
    text = ''.join( tostring(node) for node in message_detail)
    return text.strip().format(**kwargs)

print message('file.open.fail', filename = 'file.txt')
print message('file.open.good', filename = 'file.txt')


Doesn't try to handle type/icon/delay. You'll probably also want to consider how you want to do whitespace.