Mercurial > pidgin
comparison finch/libgnt/gntwidget.c @ 18566:3c634117a7ef
Allow disabling the widget actions on specific widgets. This allows, for
example, to search in the tree without triggering some action.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Fri, 20 Jul 2007 21:46:29 +0000 |
parents | 980d6e1b2d21 |
children | 44b4e8bd759b |
comparison
equal
deleted
inserted
replaced
18565:980d6e1b2d21 | 18566:3c634117a7ef |
---|---|
391 { | 391 { |
392 gboolean ret; | 392 gboolean ret; |
393 if (!GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_CAN_TAKE_FOCUS)) | 393 if (!GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_CAN_TAKE_FOCUS)) |
394 return FALSE; | 394 return FALSE; |
395 | 395 |
396 if (gnt_bindable_perform_action_key(GNT_BINDABLE(widget), keys)) | 396 if (!GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_DISABLE_ACTIONS) && |
397 gnt_bindable_perform_action_key(GNT_BINDABLE(widget), keys)) | |
397 return TRUE; | 398 return TRUE; |
398 | 399 |
399 keys = gnt_bindable_remap_keys(GNT_BINDABLE(widget), keys); | 400 keys = gnt_bindable_remap_keys(GNT_BINDABLE(widget), keys); |
400 g_signal_emit(widget, signals[SIG_KEY_PRESSED], 0, keys, &ret); | 401 g_signal_emit(widget, signals[SIG_KEY_PRESSED], 0, keys, &ret); |
401 return ret; | 402 return ret; |