accelerators do not work?





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]