aboutsummaryrefslogtreecommitdiff
path: root/lib/actions
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2007-07-12 14:44:34 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2007-07-12 14:44:34 +0000
commit1faa7be4df1726873b4af5ff82ea06404977d065 (patch)
tree42afb6863242e1cc007eb0da7c2be3711776eef6 /lib/actions
parent3da7d7fcbaaaa6bff573893501e297488548e369 (diff)
downloadenigma2-1faa7be4df1726873b4af5ff82ea06404977d065.tar.gz
enigma2-1faa7be4df1726873b4af5ff82ea06404977d065.zip
ignore break or repeat when the make code for this key was not visible
Diffstat (limited to 'lib/actions')
-rw-r--r--lib/actions/action.cpp8
-rw-r--r--lib/actions/action.h4
2 files changed, 11 insertions, 1 deletions
diff --git a/lib/actions/action.cpp b/lib/actions/action.cpp
index cb9e5e05..0eb4cdb1 100644
--- a/lib/actions/action.cpp
+++ b/lib/actions/action.cpp
@@ -2,6 +2,7 @@
#include <lib/base/init.h>
#include <lib/base/init_num.h>
#include <lib/actions/actionids.h>
+#include <lib/driver/rc.h>
/*
@@ -149,9 +150,14 @@ void eActionMap::keyPressed(const std::string &device, int key, int flags)
std::list<call_entry> call_list;
/* iterate active contexts. */
- for (std::multimap<int,eActionBinding>::const_iterator c(m_bindings.begin());
+ for (std::multimap<int,eActionBinding>::iterator c(m_bindings.begin());
c != m_bindings.end(); ++c)
{
+ if (flags == eRCKey::flagMake)
+ c->second.m_prev_seen_make_key = key;
+ else if (c->second.m_prev_seen_make_key != key) // ignore repeat or break when the make code for this key was not visible
+ continue;
+
/* is this a native context? */
if (c->second.m_widget)
{
diff --git a/lib/actions/action.h b/lib/actions/action.h
index f0a6ee49..9628a69a 100644
--- a/lib/actions/action.h
+++ b/lib/actions/action.h
@@ -43,6 +43,9 @@ private:
static eActionMap *instance;
struct eActionBinding
{
+ eActionBinding()
+ :m_prev_seen_make_key(-1)
+ {}
// eActionContext *m_context;
std::string m_context; // FIXME
std::string m_domain;
@@ -51,6 +54,7 @@ private:
eWidget *m_widget;
int m_id;
+ int m_prev_seen_make_key;
};
std::multimap<int, eActionBinding> m_bindings;