Re: [gtkextra] Disabling middle mouse button paste in GtkSheet



No effect.

I added:

gtk_signal_emit_stop_by_name(GTK_OBJECT(w), "button_press_event");

as the first thing in my callback.  It is doing *something*, because it
prevents the user from selecting cells or a region.  (I only want to put it in
the section of my handler that handles second mouse button events, but this was
suitable for testing).

I also still have no idea why gtk_sheet_set_active_cell() seems to swallow a
button press event going towards double or triple clicks.

Gtk+ signal handling is really rough around the edges.  It's *really* hard to
do anything beyond processing "clicked" events and the occasional select/
unselect_row.  (Like my attempt to hack around severe limitations in the
GtkCombo widget causing XFree86 4.x to crash.)  At least much harder than Motif
is...

Thanks for your help,
John

In message <Pine LNX 4 30 0109281126070 30481-100000 theory4 magnet fsu edu>, A
drian Feiguin writes:

>
>On Fri, 28 Sep 2001 jgotts linuxsavvy com wrote:
>
>> Well, I attached my callback like this:
>>
>> gtk_signal_connect(GTK_OBJECT(sheet), "button_press_event", (GtkSignalFunc) 
>callback, NULL);
>>
>> gboolean
>> callback (GtkWidget *w, GdkEventButton *event, gpointer data) {
>>
>
>gtk_signal_emit_stop_by_name(..."button_press_event"...)
>
>> }
>>
>
>Try this out.
>Saludos,
><ADRIAN>
>
>> return TRUE or FALSE doesn't seem to matter, it still pastes the text.  On a
>> related note, gtk_sheet_set_active_cell() appears to lose one click toward
>> double or triple clicks.  You need to start over.  This kind of sucks becaus
>e I
>> want a single middle mouse button click to do gtk_sheet_set_active_cell() on
>> the clicked cell and a double middle mouse button click to do something else
>,
>> neither of which to paste the text.
>>
>> Perhaps this is a Gtk+ question, so I copied that list.
>>
>> In message <Pine LNX 4 30 0109241147080 19067-100000 theory4 magnet fsu edu>
>, A
>> drian Feiguin writes:
>>
>> >I never tried but surely you can connect the "button press" event signal
>> >to a callback function and interrupt the propagation of the signal.
>> >Saludos,
>> ><ADRIAN>
>> >
>> >On Sun, 23 Sep 2001 jgotts linuxsavvy com wrote:
>> >
>> >> Is is possible to prevent the middle mouse button from pasting the curren
>t
>> >> selection with the GtkSheet widget?  I need this because I'm overriding t
>he
>> >> normal middle button paste functionality.
>> >>
>> >> John
>> >>
>> >>
>> >
>>
>>

-- 
John GOTTS <jgotts linuxsavvy com>  http://linuxsavvy.com/staff/jgotts




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