Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add UNDO/REDO key bindings to Global context.

Adds UNDO (default Ctrl-Z) and REDO (default Ctrl-Y) key bindings to the
Global context.  These are currently only implemented in the recordings
editor, but placing them in Global contexts allows for code to be
written to use the actions anywhere, including in MythUI text entry
widgets, etc.

Steals Ctrl-Y from TV Playback/PREVSOURCE, if PREVSOURCE is still using
the default key list.  After this change, PREVSOURCE is unmapped by
default (but is still accessible via the OSD menu, and NEXTSOURCE is
still mapped by default).
  • Loading branch information...
commit f354621f1c5680306a90941343c00f4029501c01 1 parent d471d7f
@sphery sphery authored
View
2  mythtv/bindings/perl/MythTV.pm
@@ -114,7 +114,7 @@ package MythTV;
# schema version supported in the main code. We need to check that the schema
# version in the database is as expected by the bindings, which are expected
# to be kept in sync with the main code.
- our $SCHEMA_VERSION = "1268";
+ our $SCHEMA_VERSION = "1269";
# NUMPROGRAMLINES is defined in mythtv/libs/libmythtv/programinfo.h and is
# the number of items in a ProgramInfo QStringList group used by
View
2  mythtv/bindings/python/MythTV/static.py
@@ -5,7 +5,7 @@
"""
OWN_VERSION = (0,25,-1,1)
-SCHEMA_VERSION = 1268
+SCHEMA_VERSION = 1269
NVSCHEMA_VERSION = 1007
MUSICSCHEMA_VERSION = 1018
PROTO_VERSION = '64'
View
13 mythtv/libs/libmythtv/dbcheck.cpp
@@ -21,7 +21,7 @@ using namespace std;
mythtv/bindings/perl/MythTV.pm
*/
/// This is the DB schema version expected by the running MythTV instance.
-const QString currentDatabaseVersion = "1268";
+const QString currentDatabaseVersion = "1269";
static bool UpdateDBVersionNumber(const QString &newnumber, QString &dbver);
static bool performActualUpdate(
@@ -5572,6 +5572,17 @@ NULL
return false;
}
+ if (dbver == "1268")
+ {
+
+ const char *updates[] = {
+"DELETE FROM keybindings WHERE action='PREVSOURCE' AND keylist='Ctrl+Y';",
+NULL
+};
+ if (!performActualUpdate(updates, "1269", dbver))
+ return false;
+ }
+
return true;
}
View
2  mythtv/libs/libmythtv/tv_play.cpp
@@ -514,7 +514,7 @@ void TV::InitKeys(void)
REG_KEY("TV Playback", "NEXTSOURCE", QT_TRANSLATE_NOOP("MythControls",
"Next Video Source"), "Y");
REG_KEY("TV Playback", "PREVSOURCE", QT_TRANSLATE_NOOP("MythControls",
- "Previous Video Source"), "Ctrl+Y");
+ "Previous Video Source"), "");
REG_KEY("TV Playback", "NEXTINPUT", QT_TRANSLATE_NOOP("MythControls",
"Next Input"), "C");
REG_KEY("TV Playback", "NEXTCARD", QT_TRANSLATE_NOOP("MythControls",
View
4 mythtv/libs/libmythui/mythmainwindow.cpp
@@ -1065,6 +1065,10 @@ void MythMainWindow::InitKeys()
,"Copy text from textedit"), "Ctrl+C");
RegisterKey("Global", "PASTE", QT_TRANSLATE_NOOP("MythControls",
"Paste text into textedit"), "Ctrl+V");
+ RegisterKey("Global", "UNDO", QT_TRANSLATE_NOOP("MythControls",
+ "Undo"), "Ctrl+Z");
+ RegisterKey("Global", "REDO", QT_TRANSLATE_NOOP("MythControls",
+ "Redo"), "Ctrl+Y");
RegisterKey("Global", "SEARCH", QT_TRANSLATE_NOOP("MythControls",
"Show incremental search dialog"), "Ctrl+S");
Please sign in to comment.
Something went wrong with that request. Please try again.