notebooks again



Ok, I think I've figured out how I would like
my notebook to work, but I have a small question.
When a user clicks on a scrollable arrow, I would
like it to do what happens when a user right-clicks
on an arrow. I thought hooking up the button-press-event
of the notebook to a function like this:

gint change_button(GtkWidget *widget, GdkEventButton *event, gpointer data)
{
   if(event->button == 1)
   {
      event->button = 3;
   }
   return FALSE;
}

would work, but it doesn't. What happens is it does
the third button action, but then my GUI will register
change_button anywhere I click on the GUI until I
right-click somewhere, and then the first mouse
button will work normally again.

It works fine for clicking on the tabs as the
first and third button do the same thing. It
just doesn't work for arrows.

I'm wondering how to do this properly. I just don't
understand enough about signals to intercept this
event and change it before the default handler for
the notebook kicks in.

Any help would be greatly appreciated. Thanks.

Jeff "Shippy" Shipman     E-Mail: shippy nmt edu
Computer Science Major    ICQ: 1786493
New Mexico Institute of Mining and Technology
Homepage: http://www.nmt.edu/~shippy





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