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 |