Re: Stop text view to scroll on pageup/down (Gabriele Greco)



On Tue, Oct 7, 2008 at 4:14 PM, Garth's KidStuff
<garthskidstuff gmail com>wrote:

Thanks for the reply!

the scrolledwindow but without results:

  g_signal_connect(sw, "key-press-event", (GCallback)eat_pageupdown,
NULL);

I just asked a very similar question a few days ago on the list and Murray
was kind enough to point out that I needed to connect my signal *before*
the
regular signal handler (as opposed to after, which is the default).  In
gtkmm, this was easy as the connect function has a parameter for that very
purpose.  I don't see how to so so here.  Sorry :(


g_signal_connect_before doesn't exists because the documentation of
g_signal_connect says:

Connects a GCallback<http://library.gnome.org/devel/gobject/2.6/gobject-Closures.html#GCallback>function
to a signal for a particular object.

The handler will be called before the default handler of the signal.

As far as I've seen gtkmm there is no connect_before() also there, but there
is a boolean flag "after"... Anyway it seems that none of the widget
involved (textview, scrolledwindow, verticalscrollbar) receive
"key-press-event" nor "key-release-event" so connecting it before or after
the default handler will not change the behaviour...

-- 
Bye,
 Gabry



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