~ubuntu-branches/ubuntu/gutsy/gnome-games/gutsy-updates

« back to all changes in this revision

Viewing changes to gnome-sudoku/src/lib/dialog_swallower.py

  • Committer: Package Import Robot
  • Author(s): Aron Sisak
  • Date: 2007-08-29 11:34:55 UTC
  • mfrom: (1.1.36)
  • Revision ID: package-import@ubuntu.com-20070829113455-z6spwaoe3dbezf2s
Tags: 1:2.19.91.1-0ubuntu1
* New upstream release:
  - This is a brand new release of gnome-games, released solely to
    fix a startup crash in glChess: Bug #471238.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
        w.unparent()
29
29
        return self.append_page(w)
30
30
 
 
31
    def response_cb (self, w, response, data=None):
 
32
        gtk.main_quit()
 
33
        self.response = response
 
34
 
31
35
    def swallow_dialog (self, d):
32
 
        action_widgets = d.action_area.get_children()
33
 
        actions = dict([
34
 
            (w,d.get_response_for_widget(w)) for w in action_widgets
35
 
            ])
36
36
        n = self.swallow_window(d)
37
37
        self.swallowed[d] = n
38
 
        def cb (w,*args):
39
 
            gtk.main_quit()
40
 
            self.response = actions[w]
41
38
        self.set_current_page(n)
42
 
        for w in action_widgets: w.connect('clicked',cb)
 
39
        d.connect('response', self.response_cb)
43
40
 
44
41
    def run_dialog (self, d):
45
42
        self.running = d
76
73
    sa = SwappableArea(b)
77
74
    sa.show()
78
75
    w.add(sa)
79
 
    b.connect('clicked', lambda *args: sa.run_dialog(d))
 
76
    b.connect_object('clicked', sa.run_dialog, d)
80
77
    w.show()
81
78
    gtk.main()
82
79