Mercurial > pidgin.yaz
comparison console/libgnt/gntentry.c @ 14876:70623f0d5cdc
[gaim-migrate @ 17645]
Use terminfo/termcap information (from ncurses) as much as possible. There
still need to be some manual 'refinement' based on $TERM. I'll see if I
can get rid of those. Also, I am probably going to allow users to provide
information that terminfo can't provide, like the keycode for ctrl+up etc.
Let me know if any of the keybinding doesn't work.
committer: Tailor Script <tailor@pidgin.im>
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Wed, 01 Nov 2006 03:38:23 +0000 |
parents | a73b2b332ec2 |
children | 065e7ac30338 |
comparison
equal
deleted
inserted
replaced
14875:7357d46ba817 | 14876:70623f0d5cdc |
---|---|
548 parent_class->bindings = g_hash_table_duplicate(parent_class->bindings, g_str_hash, | 548 parent_class->bindings = g_hash_table_duplicate(parent_class->bindings, g_str_hash, |
549 g_str_equal, g_free, (GDestroyNotify)gnt_widget_action_param_free); | 549 g_str_equal, g_free, (GDestroyNotify)gnt_widget_action_param_free); |
550 | 550 |
551 gnt_widget_class_register_action(parent_class, "cursor-home", move_start, | 551 gnt_widget_class_register_action(parent_class, "cursor-home", move_start, |
552 GNT_KEY_CTRL_A, NULL); | 552 GNT_KEY_CTRL_A, NULL); |
553 gnt_widget_register_binding(parent_class, "cursor-home", "\033" GNT_KEY_HOME, NULL); | 553 gnt_widget_register_binding(parent_class, "cursor-home", GNT_KEY_HOME, NULL); |
554 gnt_widget_class_register_action(parent_class, "cursor-end", move_end, | 554 gnt_widget_class_register_action(parent_class, "cursor-end", move_end, |
555 GNT_KEY_CTRL_E, NULL); | 555 GNT_KEY_CTRL_E, NULL); |
556 gnt_widget_register_binding(parent_class, "cursor-end", "\033" GNT_KEY_END, NULL); | 556 gnt_widget_register_binding(parent_class, "cursor-end", GNT_KEY_END, NULL); |
557 gnt_widget_class_register_action(parent_class, "delete-prev", backspace, | 557 gnt_widget_class_register_action(parent_class, "delete-prev", backspace, |
558 GNT_KEY_BACKSPACE, NULL); | 558 GNT_KEY_BACKSPACE, NULL); |
559 gnt_widget_class_register_action(parent_class, "delete-next", delkey, | 559 gnt_widget_class_register_action(parent_class, "delete-next", delkey, |
560 "\033" GNT_KEY_DEL, NULL); | 560 GNT_KEY_DEL, NULL); |
561 gnt_widget_register_binding(parent_class, "delete-next", GNT_KEY_CTRL_D, NULL); | 561 gnt_widget_register_binding(parent_class, "delete-next", GNT_KEY_CTRL_D, NULL); |
562 gnt_widget_class_register_action(parent_class, "delete-start", del_to_home, | 562 gnt_widget_class_register_action(parent_class, "delete-start", del_to_home, |
563 GNT_KEY_CTRL_U, NULL); | 563 GNT_KEY_CTRL_U, NULL); |
564 gnt_widget_class_register_action(parent_class, "delete-end", del_to_end, | 564 gnt_widget_class_register_action(parent_class, "delete-end", del_to_end, |
565 GNT_KEY_CTRL_K, NULL); | 565 GNT_KEY_CTRL_K, NULL); |
570 NULL, 1, NULL); | 570 NULL, 1, NULL); |
571 #endif | 571 #endif |
572 gnt_widget_class_register_action(parent_class, "cursor-prev-word", move_back_word, | 572 gnt_widget_class_register_action(parent_class, "cursor-prev-word", move_back_word, |
573 NULL, NULL); | 573 NULL, NULL); |
574 gnt_widget_class_register_action(parent_class, "cursor-prev", move_back, | 574 gnt_widget_class_register_action(parent_class, "cursor-prev", move_back, |
575 "\033" GNT_KEY_LEFT, NULL); | 575 GNT_KEY_LEFT, NULL); |
576 gnt_widget_register_binding(parent_class, "cursor-prev", GNT_KEY_CTRL_B, NULL); | 576 gnt_widget_register_binding(parent_class, "cursor-prev", GNT_KEY_CTRL_B, NULL); |
577 gnt_widget_class_register_action(parent_class, "cursor-next", move_forward, | 577 gnt_widget_class_register_action(parent_class, "cursor-next", move_forward, |
578 "\033" GNT_KEY_RIGHT, NULL); | 578 GNT_KEY_RIGHT, NULL); |
579 gnt_widget_register_binding(parent_class, "cursor-next", GNT_KEY_CTRL_F, NULL); | 579 gnt_widget_register_binding(parent_class, "cursor-next", GNT_KEY_CTRL_F, NULL); |
580 gnt_widget_class_register_action(parent_class, "suggest-show", suggest_show, | 580 gnt_widget_class_register_action(parent_class, "suggest-show", suggest_show, |
581 "\t", NULL); | 581 "\t", NULL); |
582 gnt_widget_class_register_action(parent_class, "suggest-next", suggest_next, | 582 gnt_widget_class_register_action(parent_class, "suggest-next", suggest_next, |
583 "\033" GNT_KEY_DOWN, NULL); | 583 GNT_KEY_DOWN, NULL); |
584 gnt_widget_class_register_action(parent_class, "suggest-prev", suggest_prev, | 584 gnt_widget_class_register_action(parent_class, "suggest-prev", suggest_prev, |
585 "\033" GNT_KEY_UP, NULL); | 585 GNT_KEY_UP, NULL); |
586 gnt_widget_class_register_action(parent_class, "history-prev", history_prev, | 586 gnt_widget_class_register_action(parent_class, "history-prev", history_prev, |
587 "\033" GNT_KEY_CTRL_DOWN, NULL); | 587 "\033" GNT_KEY_CTRL_DOWN, NULL); |
588 gnt_widget_class_register_action(parent_class, "history-next", history_next, | 588 gnt_widget_class_register_action(parent_class, "history-next", history_next, |
589 "\033" GNT_KEY_CTRL_UP, NULL); | 589 "\033" GNT_KEY_CTRL_UP, NULL); |
590 | 590 |