Re: GtkEntry and clipboard



On Mon, Aug 06, 2001 at 03:46:49AM -0400, Havoc Pennington wrote:
> 
> Alex Biryukov <alex vabank kiev ua> writes:
> > It's fine, but when ? 
> > I need popup Copy/Cut/Paste menu. I tried catch "event" event for
> > GtkEntry, but selection is cleared before(signal "GDK_SELECTION_CLEAR" 
> > fired before passing to "event" handler).  
> 
> Ah, right. Try "button_press_event" instead of "event" - I believe
> button_press_event handlers get to run first.
> 
> Then override the default behavior by using
> gtk_signal_emit_stop_by_name() to block further signal handlers. (In
> GTK 2 you can also stop further handlers by simply returning TRUE. 
> And of course in nearly all cases handler-blocking is a shortcut to
> avoid subclassing the widget, which would be more elegant in some
> theoretical sense.)
> 
> Actually in GTK 2 the c/c/p menu is there on the entry by default, so 
> I guess the fact that this is easier to implement in GTK 2 isn't
> interesting. ;-)
> 
> Havoc
> 

>:)
Greatest ! It's work !
Thanks a lot Havoc.

Alex.

> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]