summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2017-03-31 21:04:21 +0200
committerSébastien Helleu <flashcode@flashtux.org>2017-03-31 21:04:21 +0200
commit36eb3ee3437cb82205487080bccc527f90c00d2a (patch)
treecf2f000e8556506aa49c3c2b0e50f22a17ab8510 /src/gui
parent85bb23f8cb46d29b4fcff4c0b5e65941fcc4f0d2 (diff)
downloadweechat-36eb3ee3437cb82205487080bccc527f90c00d2a.zip
api: add special key "__quiet" in function key_bind
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/gui-key.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/gui/gui-key.c b/src/gui/gui-key.c
index e7255fb96..b4882b258 100644
--- a/src/gui/gui-key.c
+++ b/src/gui/gui-key.c
@@ -798,6 +798,10 @@ gui_key_bind_plugin_hashtable_map_cb (void *data,
if (user_data && key && value)
{
+ /* ignore special key "__quiet" */
+ if (strcmp (key, "__quiet") == 0)
+ return;
+
internal_code = gui_key_get_internal_code (key);
if (internal_code)
{
@@ -825,14 +829,19 @@ int
gui_key_bind_plugin (const char *context, struct t_hashtable *keys)
{
int data[2];
+ const char *ptr_quiet;
data[0] = gui_key_search_context (context);
if (data[0] < 0)
return 0;
- gui_key_verbose = 1;
data[1] = 0;
+
+ ptr_quiet = hashtable_get (keys, "__quiet");
+ gui_key_verbose = (ptr_quiet) ? 0 : 1;
+
hashtable_map (keys, &gui_key_bind_plugin_hashtable_map_cb, data);
+
gui_key_verbose = 0;
return data[1];