diff options
author | Witold Filipczyk <gglater62@gmail.com> | 2015-03-27 09:36:19 +0000 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2015-03-27 09:36:19 +0000 |
commit | befa5e6ed356e019fa82b7ebf9be90913aad3edb (patch) | |
tree | 5157bdd1ad1c4f54eda26894af6843afc7050322 /atari/toolbar.c | |
parent | 9d6ab0475f6cd259bc6135696900bad9295f5bcb (diff) | |
download | netsurf-befa5e6ed356e019fa82b7ebf9be90913aad3edb.tar.gz netsurf-befa5e6ed356e019fa82b7ebf9be90913aad3edb.tar.bz2 |
To avoid namespace conflicts with ncurses add NetSurf key prefix.
Adds a NetSurf key code prefix of NS_ to all key codes.
Diffstat (limited to 'atari/toolbar.c')
-rw-r--r-- | atari/toolbar.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/atari/toolbar.c b/atari/toolbar.c index 56d49de03..02861818f 100644 --- a/atari/toolbar.c +++ b/atari/toolbar.c @@ -696,7 +696,7 @@ bool toolbar_key_input(struct s_toolbar *tb, short nkc) ret = textarea_keypress(tb->url.textarea, ucs4); } } - else if (ik == KEY_CR || ik == KEY_NL) { + else if (ik == NS_KEY_CR || ik == NS_KEY_NL) { nsurl *url; char tmp_url[PATH_MAX]; if ( textarea_get_text( tb->url.textarea, tmp_url, PATH_MAX) > 0 ) { @@ -713,7 +713,7 @@ bool toolbar_key_input(struct s_toolbar *tb, short nkc) ret = true; } } - else if (ik == KEY_COPY_SELECTION) { + else if (ik == NS_KEY_COPY_SELECTION) { // copy whole text char * text; int len; @@ -725,7 +725,7 @@ bool toolbar_key_input(struct s_toolbar *tb, short nkc) free( text ); } } - else if ( ik == KEY_PASTE) { + else if ( ik == NS_KEY_PASTE) { char * clip = scrap_txt_read(); if ( clip != NULL ){ int clip_length = strlen( clip ); @@ -744,9 +744,9 @@ bool toolbar_key_input(struct s_toolbar *tb, short nkc) free( clip ); } } - else if (ik == KEY_ESCAPE) { - textarea_keypress( tb->url.textarea, KEY_SELECT_ALL ); - textarea_keypress( tb->url.textarea, KEY_DELETE_LEFT ); + else if (ik == NS_KEY_ESCAPE) { + textarea_keypress( tb->url.textarea, NS_KEY_SELECT_ALL ); + textarea_keypress( tb->url.textarea, NS_KEY_DELETE_LEFT ); } else { ret = textarea_keypress( tb->url.textarea, ik ); |