summaryrefslogtreecommitdiffstats
path: root/abs/mv-core/myth/stable/mythtv-release-fixes/pop_be_restart.cpp.patch
blob: a7a532643da7b885efc34ad9c6fbb88bf33034b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
--- libs/libmythui/myththemedmenu.cpp.orig	2008-03-17 15:54:00.000000000 -0500
+++ libs/libmythui/myththemedmenu.cpp	2008-03-17 15:54:09.000000000 -0500
@@ -2615,12 +2615,14 @@
         m_menuPopup->SetReturnEvent(this,"popmenu_exit");
         m_menuPopup->AddButton("Shutdown");
         m_menuPopup->AddButton("Reboot");
+        m_menuPopup->AddButton("MythBackend restart");
         m_menuPopup->AddButton("About");
         m_menuPopup->AddButton("Cancel");
     }
     else
     {
         m_menuPopup->SetReturnEvent(this,"popmenu_noexit");
+        m_menuPopup->AddButton("MythBackend restart");
         m_menuPopup->AddButton("About");
         m_menuPopup->AddButton("Cancel");
     }
@@ -2655,6 +2657,11 @@
     }
 }
 
+void MythThemedMenu::Restartmythbackend()
+{
+    system("/usr/MythVantage/bin/mythbeselect -restart");
+}
+
 void MythThemedMenu::customEvent(QCustomEvent *event)
 {
     if (event->type() == kMythDialogBoxCompletionEventType)
@@ -2684,6 +2691,10 @@
 
             if (buttonnum == 2)
             {
+                Restartmythbackend();
+            }
+            if (buttonnum == 3)
+            {
                 aboutScreen();
             }
         }
@@ -2691,6 +2702,10 @@
         if (resultid == "popmenu_noexit")
         {
             if (buttonnum == 0)
+            {
+                Restartmythbackend();
+            }
+            if (buttonnum == 1)
                 aboutScreen();
         }