/[ascend]/trunk/pygtk/modelview.py
ViewVC logotype

Diff of /trunk/pygtk/modelview.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1148 by johnpye, Wed Jan 3 14:30:27 2007 UTC revision 1149 by johnpye, Tue Jan 16 01:21:08 2007 UTC
# Line 279  class ModelView: Line 279  class ModelView:
279    
280      def on_treeview_event(self,widget,event):      def on_treeview_event(self,widget,event):
281          _contextmenu = False;          _contextmenu = False;
282          if event.type==gtk.gdk.KEY_PRESS and gtk.gdk.keyval_name(event.keyval)=='Menu':          if event.type==gtk.gdk.KEY_PRESS:
283              _contextmenu = True              _keyval = gtk.gdk.keyval_name(event.keyval)
284              _path, _col = self.modelview.get_cursor()              _path, _col = self.modelview.get_cursor()
285              _button = 3;              if _keyval=='Menu':
286                    _contextmenu = True
287                    _button = 3;
288                elif _keyval == 'F2':
289                    print "F2 pressed"
290                    self.modelview.set_cursor(_path,self.tvcolumns[2],1)
291                                                    
292                    return
293          elif event.type==gtk.gdk.BUTTON_PRESS:          elif event.type==gtk.gdk.BUTTON_PRESS:
294              if event.button == 3:              if event.button == 3:
295                  _contextmenu = True                  _contextmenu = True
# Line 293  class ModelView: Line 300  class ModelView:
300                  if _pthinfo == None:                  if _pthinfo == None:
301                      return                      return
302                  _path, _col, _cellx, _celly = _pthinfo                  _path, _col, _cellx, _celly = _pthinfo
303            
         # which button was clicked?  
304          if not _contextmenu:          if not _contextmenu:
305                #print "NOT DOING ANYTHING ABOUT %s" % gtk.gdk.keyval_name(event.keyval)
306              return              return
307    
308          _canpop = False;          _canpop = False;

Legend:
Removed from v.1148  
changed lines
  Added in v.1149

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22