/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to window.py

  • Committer: Szilveszter Farkas (Phanatic)
  • Date: 2007-02-16 17:17:28 UTC
  • mto: (157.1.9 trunk) (170.1.3 trunk)
  • mto: This revision was merged to the branch mainline in revision 160.
  • Revision ID: szilveszter.farkas@gmail.com-20070216171728-i97utnlbukrkvzli
Updated genpot.sh. Regenerated POT file. Old Hungarian translation removed.

We have to encourage people to translate bzr-gtk/Olive through Rosetta. (The Olive product is already translatable, but bzr-gtk is still not.)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
import pygtk
3
 
import gtk
4
 
 
5
 
class Window(gtk.Window):
6
 
 
7
 
    def __init__(self, parent=None):
8
 
        gtk.Window.__init__(self, gtk.WINDOW_TOPLEVEL)
9
 
        self._parent = parent
10
 
        
11
 
        self.connect('key-press-event', self._on_key_press)
12
 
        
13
 
    def _on_key_press(self, widget, event):
14
 
        keyname = gtk.gdk.keyval_name(event.keyval)
15
 
        if event.state & gtk.gdk.CONTROL_MASK:
16
 
            if keyname is "w":
17
 
                self.destroy()
18
 
                if self._parent is None:
19
 
                    gtk.main_quit()
20
 
            elif keyname is "q":
21
 
                gtk.main_quit()
22