~ubuntu-branches/ubuntu/jaunty/gdesklets/jaunty-proposed

« back to all changes in this revision

Viewing changes to utils/HIGDialog.py

  • Committer: Bazaar Package Importer
  • Author(s): Loic Minier
  • Date: 2006-06-14 19:19:07 UTC
  • mfrom: (1.1.2 upstream) (2.1.1 dapper)
  • Revision ID: james.westby@ubuntu.com-20060614191907-yktrjkep30abmrfn
Tags: 0.35.3-4
Don't ship /usr/share/mime/mime.cache. (Closes: #373600)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
import gtk
2
 
import NullObject
3
2
 
4
3
 
5
4
class HIGDialog(gtk.Dialog):
6
5
 
7
 
    def __init__(self, type, primary, secondary, buttons):
 
6
    def __init__(self, buttons, type = None, primary = "", secondary = "",
 
7
                 self_destroy = True):
8
8
 
9
9
        gtk.Dialog.__init__(self, "", None, gtk.WINDOW_TOPLEVEL, buttons)
10
10
 
41
41
 
42
42
            label = gtk.Label()
43
43
            label.set_property("use-markup", True)
 
44
            label.set_property("selectable", True)
44
45
            label.set_property("wrap", True)
45
46
            label.set_property("yalign", 0.0)
46
47
            label.set_label(m)
51
52
            if (not isinstance(self.vbox.get_children()[0], gtk.HBox)):
52
53
               self.vbox.pack_start(hbox, False, False, 0)
53
54
 
54
 
        def f(*args): self.destroy()
55
 
        self.connect_after("response", f)
56
 
 
57
 
 
58
 
    def get_vbox(self): return self.vbox
59
 
    def get_hbox(self): return self.hbox
 
55
        if (self_destroy):
 
56
            def f(*args): self.destroy()
 
57
            self.connect_after("response", f)
 
58