accelerators do not work?
- From: Robert Wilhelm <robert physiol med tu-muenchen de>
- To: gnome-list gnome org
- Subject: accelerators do not work?
- Date: Tue, 17 Mar 1998 17:24:14 +0100
When pressing the "a" button, nothing happens.
What I am doing wrong here?
Robert
#include <gnome.h>
#include <gdk/gdkkeysyms.h>
GtkWidget *app;
static int press(GtkWidget* widget, GdkEventButton *event, gpointer data)
{
printf("press\n");
}
GnomeUIInfo menu2[] = {
{
GNOME_APP_UI_ITEM,"bla","hint",press,NULL,
NULL, GNOME_APP_PIXMAP_NONE,NULL,GDK_a,0,NULL},
GNOMEUIINFO_END
};
GnomeUIInfo mainmenu[] = {
{GNOME_APP_UI_SUBTREE, N_("Help"), NULL, menu2, NULL, NULL,
GNOME_APP_PIXMAP_NONE, NULL, 0, 0, NULL},
GNOMEUIINFO_END
};
int main(int argc, char *argv[])
{
gnome_init ( "foo", NULL, argc, argv, 0, NULL);
app = gnome_app_new ("foo", "Gnomified foo");
gnome_app_create_menus (GNOME_APP(app),mainmenu);
gtk_widget_show (app);
gtk_main ();
return 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]