~mmcg069/software-center/dialog-improvements

« back to all changes in this revision

Viewing changes to softwarecenter/ui/gtk3/dialogs/__init__.py

  • Committer: Gary Lasker
  • Date: 2011-09-23 03:11:48 UTC
  • mfrom: (2419.1.2 software-center)
  • Revision ID: gary.lasker@canonical.com-20110923031148-83izqnzk1o0ssdc8
* softwarecenter/ui/gtk3/dialogs/__init__.py:
  - fix crash when showing error dialog (LP: #842678)

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
                 primary=None, 
58
58
                 secondary=None, 
59
59
                 details=None,
60
 
                 buttons=Gtk.ResponseType.OK, 
 
60
                 buttons=Gtk.ButtonsType.OK, 
61
61
                 type=Gtk.MessageType.INFO):
62
 
        GObject.GObject.__init__(self, parent, 0, type, buttons, primary)
 
62
        Gtk.MessageDialog.__init__(self, parent, 0, type, buttons, primary)
63
63
        self.set_title(title)
64
64
        if secondary:
65
65
            self.format_secondary_markup(secondary)
70
70
            scroll = Gtk.ScrolledWindow()
71
71
            scroll.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)
72
72
            scroll.add(textview)
73
 
            expand = Gtk.Expander(_("Details"))
 
73
            expand = Gtk.Expander().new(_("Details"))
74
74
            expand.add(scroll)
75
75
            expand.show_all()
76
76
            self.get_content_area().pack_start(expand, True, True, 0)
83
83
                  primary=None, 
84
84
                  secondary=None, 
85
85
                  details=None,
86
 
                  buttons=Gtk.ResponseType.OK, 
 
86
                  buttons=Gtk.ButtonsType.OK, 
87
87
                  type=Gtk.MessageType.INFO,
88
88
                  alternative_action=None):
89
89
    """ run a dialog """