comparison finch/libgnt/gntwidget.c @ 22307:d270b6aebabc

Right-clicking on a widget should trigger the context-menu.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sun, 17 Feb 2008 17:14:29 +0000
parents add12afc3140
children 95308e1b47d1
comparison
equal deleted inserted replaced
22300:cccdcc7e5642 22307:d270b6aebabc
405 gboolean 405 gboolean
406 gnt_widget_clicked(GntWidget *widget, GntMouseEvent event, int x, int y) 406 gnt_widget_clicked(GntWidget *widget, GntMouseEvent event, int x, int y)
407 { 407 {
408 gboolean ret; 408 gboolean ret;
409 g_signal_emit(widget, signals[SIG_CLICKED], 0, event, x, y, &ret); 409 g_signal_emit(widget, signals[SIG_CLICKED], 0, event, x, y, &ret);
410 if (!ret && event == GNT_RIGHT_MOUSE_DOWN)
411 ret = gnt_bindable_perform_action_named(GNT_BINDABLE(widget), "context-menu", NULL);
410 return ret; 412 return ret;
411 } 413 }
412 414
413 void 415 void
414 gnt_widget_expose(GntWidget *widget, int x, int y, int width, int height) 416 gnt_widget_expose(GntWidget *widget, int x, int y, int width, int height)