All pastes #337655 Raw Edit

Mine

public text v1 · immutable
#337655 ·published 2007-02-02 22:45 UTC
rendered paste body
Index: mythtv/libs/libmyth/mythwidgets.cpp
===================================================================
--- mythtv/libs/libmyth/mythwidgets.cpp	(revision 12697)
+++ mythtv/libs/libmyth/mythwidgets.cpp	(working copy)
@@ -799,70 +799,74 @@
             endCycle();
             e->ignore();
             break;
+    }
 
+    if (gContext->GetNumSetting("UseRemoteEntry")) {
+        switch (e->key())
+        {
             //  Only eat Key_Space if we are in a cycle
-            
-        case Key_Space:
-            if (active_cycle)
-            {
+            case Key_Space:
+                if (active_cycle)
+                {
+                    handled = true;
+                    endCycle();
+                    e->ignore();
+                }
+                break; 
+    
+                //  If you want to mess arround with other ways to allocate
+                //  key presses you can just add entries between the quotes
+    
+            case Key_1:
+                cycleKeys("_X%-/.?()1");
                 handled = true;
-                endCycle();
-                e->ignore();
-            }
-            break; 
-
-            //  If you want to mess arround with other ways to allocate
-            //  key presses you can just add entries between the quotes
-
-        case Key_1:
-            cycleKeys("_X%-/.?()1");
-            handled = true;
-            break;
-
-        case Key_2:
-            cycleKeys("abc2");
-            handled = true;
-            break;
-
-        case Key_3:
-            cycleKeys("def3"); 
-            handled = true;
-            break;
-
-        case Key_4:
-            cycleKeys("ghi4");
-            handled = true;
-            break;
-
-        case Key_5:
-            cycleKeys("jkl5"); 
-            handled = true;
-            break;
-
-        case Key_6:
-            cycleKeys("mno6"); 
-            handled = true;
-            break;
-
-        case Key_7:
-            cycleKeys("pqrs7");
-            handled = true;
-            break;
-
-        case Key_8:
-            cycleKeys("tuv8"); 
-            handled = true;
-            break;
-
-        case Key_9:
-            cycleKeys("wxyz90"); 
-            handled = true;
-            break;
-
-        case Key_0:
-            toggleShift();
-            handled = true;
-            break;
+                break;
+    
+            case Key_2:
+                cycleKeys("abc2");
+                handled = true;
+                break;
+    
+            case Key_3:
+                cycleKeys("def3"); 
+                handled = true;
+                break;
+    
+            case Key_4:
+                cycleKeys("ghi4");
+                handled = true;
+                break;
+    
+            case Key_5:
+                cycleKeys("jkl5"); 
+                handled = true;
+                break;
+    
+            case Key_6:
+                cycleKeys("mno6"); 
+                handled = true;
+                break;
+    
+            case Key_7:
+                cycleKeys("pqrs7");
+                handled = true;
+                break;
+    
+            case Key_8:
+                cycleKeys("tuv8"); 
+                handled = true;
+                break;
+    
+            case Key_9:
+                cycleKeys("wxyz90"); 
+                handled = true;
+                break;
+    
+            case Key_0:
+                toggleShift();
+                handled = true;
+                break;
+        }
     }
     
     if (!handled)
Index: mythtv/programs/mythfrontend/globalsettings.cpp
===================================================================
--- mythtv/programs/mythfrontend/globalsettings.cpp	(revision 12697)
+++ mythtv/programs/mythfrontend/globalsettings.cpp	(working copy)
@@ -1379,6 +1379,17 @@
     return gc;
 }
 
+static HostCheckBox *UseRemoteEntry()
+{
+    HostCheckBox *gc = new HostCheckBox("UseRemoteEntry");
+    gc->setLabel(QObject::tr("Use remote control number to text input"));
+    gc->setValue(true);
+    gc->setHelpText(QObject::tr("Allows you to enter text using the "
+                    "number buttons on your remote control, similar "
+                    "to a cellphone."));
+    return gc;
+}
+
 static HostComboBox *AllowQuitShutdown()
 {
     HostComboBox *gc = new HostComboBox("AllowQuitShutdown");
@@ -3466,6 +3477,8 @@
     general->addChild(HaltCommand());
     general->addChild(LircKeyPressedApp());
     general->addChild(UseArrowAccels());
+    general->addChild(UseVirtualKeyboard());
+    general->addChild(UseRemoteEntry());
     general->addChild(NetworkControlEnabled());
     general->addChild(NetworkControlPort());
     addChild(general);
@@ -3779,7 +3792,6 @@
     qttheme->addChild(QtFontBig());
     qttheme->addChild(PlayBoxTransparency());
     qttheme->addChild(PlayBoxShading());
-    qttheme->addChild(UseVirtualKeyboard());
     addChild(qttheme );
 
     addChild(new LcdSettings());