how to add accelerator for GtkToolItem descendents?



Hi,

I have just used the following code to add accelerator to a GtkToolButton.

....
gdk_accelerator_parse ("<control>O", &keyval, &mod_type);

if (keyval)
  gtk_widget_add_accelerator (my_tool_button, "activate", accel_group,
keyval, mod_type, 0);
...

When I run the program, I get the following warning and the
"my_tool_button" is not activated when "<control>O" is pressed..

GtkWarning:**** the widget "GtkToolButton" doesn't have "activate"
signal with no arguments...

I got this method from testgtk... and it is working there.... They
have used GtkButton and "clicked" signal.... I think "clicked" does
also require arguments.. isn't it?

Then what is the actual problem? I am manually creating the toolbar in
this case... So I can not used GtkActionEntry... stuff ..

please help me... thanks in advance...



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