Re: [pygtk] Context Menu in CellRendererText
On Wed, Jul 23, 2003 at 06:55:36AM -0700, David Mortensen wrote: My question is this: is there a simple way I can keep the right click event from triggering an edited signal? Is there some other means for getting my desired result (pop-up menu and updates on edits)? You should be able to prevent the event from propogating by returning gtk.TRUE from your button-press-event callback. http://tinyurl.com/hvzy untested code: def on_button_press_event(self, widget, event): if event.type==gtk.gdk.BUTTON_PRESS and event.button==3: # do stuff return gtk.TRUE Dave Cook ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
[pygtk] Context Menu in CellRendererText
Hi, I am currently having a problem with popup menus in editable CellRendererText cells (in a TreeView). When one right clicks in a cell that is currently being edited (in hopes of calling up the context menu and changing the input method) this sends out the edited signal. In my particular case, this signal must be connected to a callback that updates the data model (ListStore). Changing the data model sends out another signal which makes the pop-up think its work is done, so it simply flashes on the screen for a fraction of a second. My question is this: is there a simple way I can keep the right click event from triggering an edited signal? Is there some other means for getting my desired result (pop-up menu and updates on edits)? -- David Mortensen STEDT/Department of Linguistics 1203 Dwinelle Hall; University of California at Berkeley Berkeley, CA 94720-2650 OFFICE: (510)643-9910 CELL: (510)427-2952 AIM: vamchoj ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/