/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: 2006-07-21 18:18:20 UTC
  • mto: (0.14.1 main) (93.1.1 win32.bialix)
  • mto: This revision was merged to the branch mainline in revision 83.
  • Revision ID: Szilveszter.Farkas@gmail.com-20060721181820-450b5e29bb2614d9
2006-07-21  Szilveszter Farkas <Szilveszter.Farkas@gmail.com>

    * olive/olive.glade: some UI refreshment (push, remove and commit dialog)
    * olive/frontend/gtk/push.py: implemented 'push' functionality
    * olive/frontend/gtk/commit.py: implemented 'commit' functionality
    * olive/frontend/gtk/remove.py: implemented 'remove' functionality
    * olive/frontend/gtk/add.py: implemented 'add' functionality
    * olive/frontend/gtk/handler.py: implemented 'init' functionality
    * olive/backend/fileops.py: added recursive mode to add(), added
      NotBranchError exception to add() and remove()

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