ui/gtk/menu.c

branch
newapi
changeset 388
473c03f85197
parent 322
22f6dadd9f46
child 389
d15eca5fd8b3
equal deleted inserted replaced
387:80edb1a93f7a 388:473c03f85197
353 353
354 /* 354 /*
355 * widget menu functions 355 * widget menu functions
356 */ 356 */
357 357
358 /*
358 static gboolean ui_button_press_event(GtkWidget *widget, GdkEvent *event, GtkMenu *menu) { 359 static gboolean ui_button_press_event(GtkWidget *widget, GdkEvent *event, GtkMenu *menu) {
359 if(event->type == GDK_BUTTON_PRESS) { 360 if(event->type == GDK_BUTTON_PRESS) {
360 GdkEventButton *e = (GdkEventButton*)event; 361 GdkEventButton *e = (GdkEventButton*)event;
361 if(e->button == 3) { 362 if(e->button == 3) {
362 gtk_widget_show_all(GTK_WIDGET(menu)); 363 gtk_widget_show_all(GTK_WIDGET(menu));
387 gtk_menu_popup_at_pointer(menu, NULL); 388 gtk_menu_popup_at_pointer(menu, NULL);
388 #else 389 #else
389 gtk_menu_popup(menu, NULL, NULL, 0, 0, 0, gtk_get_current_event_time()); 390 gtk_menu_popup(menu, NULL, NULL, 0, 0, 0, gtk_get_current_event_time());
390 #endif 391 #endif
391 } 392 }
393 */
392 394
393 void ui_widget_menuitem(UiObject *obj, char *label, ui_callback f, void *userdata) { 395 void ui_widget_menuitem(UiObject *obj, char *label, ui_callback f, void *userdata) {
394 ui_widget_menuitem_gr(obj, label, f, userdata, -1); 396 ui_widget_menuitem_gr(obj, label, f, userdata, -1);
395 } 397 }
396 398

mercurial