~ubuntu-branches/ubuntu/precise/gwibber/precise-proposed

« back to all changes in this revision

Viewing changes to gwibber/error.py

  • Committer: Package Import Robot
  • Author(s): Ken VanDine
  • Date: 2012-02-15 16:31:21 UTC
  • mto: This revision was merged to the branch mainline in revision 117.
  • Revision ID: package-import@ubuntu.com-20120215163121-fc08f29qhgnw8hr0
Tags: upstream-3.3.5
ImportĀ upstreamĀ versionĀ 3.3.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
    gettext.bind_textdomain_codeset('gwibber','UTF-8')
27
27
gettext.textdomain('gwibber')
28
28
 
29
 
import gtk
 
29
from gi.repository import Gtk
30
30
 
31
31
class GwibberErrorService:
32
32
 
63
63
 
64
64
        self.notified[service] = type
65
65
        if condition == "info":
66
 
            condition = gtk.MESSAGE_INFO
 
66
            condition = Gtk.MessageType.INFO
67
67
        else:
68
 
            condition = gtk.MESSAGE_ERROR
 
68
            condition = Gtk.MessageType.ERROR
69
69
 
70
70
        if title is None:
71
71
            title = _("Gwibber Error")
72
 
        dialog = gtk.MessageDialog(
 
72
        dialog = Gtk.MessageDialog(
73
73
            parent = None,
74
74
            type = condition,
75
 
            buttons = gtk.BUTTONS_CLOSE,
 
75
            buttons = Gtk.ButtonsType.CLOSE,
76
76
            message_format = message)
77
77
        dialog.set_title(title)
78
 
        dialog.set_position(gtk.WIN_POS_CENTER_ALWAYS)
 
78
        dialog.set_position(Gtk.WindowPosition.CENTER_ALWAYS)
79
79
        dialog.run()
80
80
        dialog.destroy()