Mercurial > pidgin.yaz
diff console/libgnt/gntbutton.c @ 14343:0387a167f342
[gaim-migrate @ 17044]
A WM can now act on keystrokes. As an example, the sample WM will toggle
the buddylist on pressing Alt+b.
Mouse clicking and scrolling is now supported in most/all widgets.
To use a WM, you need to add "wm=/path/to/wm.so" under [general] in ~/.gntrc.
committer: Tailor Script <tailor@pidgin.im>
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Sat, 26 Aug 2006 12:54:39 +0000 |
parents | 2d1b41e3cf0d |
children | c374f45f4c94 |
line wrap: on
line diff
--- a/console/libgnt/gntbutton.c Sat Aug 26 07:11:55 2006 +0000 +++ b/console/libgnt/gntbutton.c Sat Aug 26 12:54:39 2006 +0000 @@ -58,6 +58,16 @@ return FALSE; } +static gboolean +gnt_button_clicked(GntWidget *widget, GntMouseEvent event, int x, int y) +{ + if (event == GNT_LEFT_MOUSE_DOWN) { + gnt_widget_activate(widget); + return TRUE; + } + return FALSE; +} + static void gnt_button_class_init(GntWidgetClass *klass) { @@ -66,6 +76,7 @@ parent_class->map = gnt_button_map; parent_class->size_request = gnt_button_size_request; parent_class->key_pressed = gnt_button_key_pressed; + parent_class->clicked = gnt_button_clicked; DEBUG; }