summaryrefslogtreecommitdiffstats
path: root/abs/extra/community/mythtv-vdpau/myththemedmenu.cpp.patch
diff options
context:
space:
mode:
authorMichael Hanson <mihanson@linhes.org>2011-11-04 19:21:13 (GMT)
committerMichael Hanson <mihanson@linhes.org>2011-11-04 19:21:13 (GMT)
commit94f21428c8ed60129ee5e14b1914a8cfe1bcdb2a (patch)
tree27c63c2fa679256dbc46bbff241c41db98e9d244 /abs/extra/community/mythtv-vdpau/myththemedmenu.cpp.patch
parente3a0f9ba95aa059d76a57c7821a5ccc6a80a5f84 (diff)
parent67989fe1be117ac23fa3a98acbc2794a17d7d0ed (diff)
downloadlinhes_pkgbuild-94f21428c8ed60129ee5e14b1914a8cfe1bcdb2a.zip
linhes_pkgbuild-94f21428c8ed60129ee5e14b1914a8cfe1bcdb2a.tar.gz
linhes_pkgbuild-94f21428c8ed60129ee5e14b1914a8cfe1bcdb2a.tar.bz2
Merge branch 'testing' of knoppmyth.net:linhes_pkgbuild into testing
Diffstat (limited to 'abs/extra/community/mythtv-vdpau/myththemedmenu.cpp.patch')
-rw-r--r--abs/extra/community/mythtv-vdpau/myththemedmenu.cpp.patch125
1 files changed, 0 insertions, 125 deletions
diff --git a/abs/extra/community/mythtv-vdpau/myththemedmenu.cpp.patch b/abs/extra/community/mythtv-vdpau/myththemedmenu.cpp.patch
deleted file mode 100644
index e5c57ef..0000000
--- a/abs/extra/community/mythtv-vdpau/myththemedmenu.cpp.patch
+++ /dev/null
@@ -1,125 +0,0 @@
---- libs/libmythui/myththemedmenu.cpp.orig 2008-01-31 15:26:38.000000000 +0000
-+++ libs/libmythui/myththemedmenu.cpp 2008-02-07 22:24:27.000000000 +0000
-@@ -2102,6 +2102,10 @@
- }
- lastbutton = NULL;
- }
-+ else if (action == "MENU")
-+ {
-+ parent->doMenu();
-+ }
- else if (action == "EJECT")
- {
- myth_eject();
-@@ -2482,6 +2486,8 @@
-
- if (d->foundtheme)
- d->parseMenu(menufile);
-+
-+ m_menuPopup = NULL;
- }
-
- MythThemedMenu::~MythThemedMenu(void)
-@@ -2592,3 +2598,102 @@
- MythScreenType::aboutToShow();
- d->updateLCD();
- }
-+void MythThemedMenu::doMenu()
-+{
-+ int allowsd = gContext->GetNumSetting("AllowQuitShutdown");
-+ if (m_menuPopup)
-+ return;
-+ QString label = "System Menu";
-+ MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack();
-+ m_menuPopup = new MythDialogBox(label, mainStack, "menuPopup");
-+ if (m_menuPopup->Create())
-+ mainStack->AddScreen(m_menuPopup);
-+
-+ //changed line to always show shutdown/reboot
-+ if ( allowsd != 10 && allowsd !=14 )
-+ {
-+ m_menuPopup->SetReturnEvent(this,"popmenu_exit");
-+ m_menuPopup->AddButton("Power off");
-+ m_menuPopup->AddButton("Reboot");
-+ m_menuPopup->AddButton("About");
-+ m_menuPopup->AddButton("Cancel");
-+ }
-+ else
-+ {
-+ m_menuPopup->SetReturnEvent(this,"popmenu_noexit");
-+ m_menuPopup->AddButton("About");
-+ m_menuPopup->AddButton("Cancel");
-+ }
-+}
-+
-+void MythThemedMenu::aboutScreen()
-+{
-+{
-+ extern const char *myth_source_version;
-+ extern const char *myth_source_path;
-+ QString distro_line;
-+ distro_line="";
-+
-+ QFile file("/etc/os_myth_release");
-+ if ( file.open(IO_ReadOnly | IO_Translate) )
-+ {
-+ QTextStream t( &file ); // use a text stream
-+ distro_line = t.readLine();
-+ file.close();
-+ }
-+
-+ QString label = "";
-+ label.append(QObject::tr("Revision: ") + myth_source_version + " \n Branch:" + myth_source_path + "\n" + distro_line );
-+
-+ MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack();
-+ m_menuPopup = new MythDialogBox(label, mainStack, "About");
-+ if (m_menuPopup->Create())
-+ mainStack->AddScreen(m_menuPopup);
-+
-+ m_menuPopup->SetReturnEvent(this,"About");
-+ m_menuPopup->AddButton("OK!");
-+ }
-+}
-+
-+void MythThemedMenu::customEvent(QCustomEvent *event)
-+{
-+ if (event->type() == kMythDialogBoxCompletionEventType)
-+ {
-+ DialogCompletionEvent *dce =
-+ dynamic_cast<DialogCompletionEvent*>(event);
-+
-+ QString resultid= dce->GetId();
-+ int buttonnum = dce->GetResult();
-+ if (resultid == "popmenu_exit")
-+ {
-+ if (buttonnum == 0)
-+ {
-+ QString halt_cmd = gContext->GetSetting("HaltCommand",
-+ "sudo /sbin/halt -p");
-+ if (!halt_cmd.isEmpty())
-+ system(halt_cmd.ascii());
-+ }
-+
-+ if (buttonnum == 1)
-+ {
-+ QString reboot_cmd = gContext->GetSetting("RebootCommand",
-+ "sudo /sbin/reboot");
-+ if (!reboot_cmd.isEmpty())
-+ system(reboot_cmd.ascii());
-+ }
-+
-+ if (buttonnum == 2)
-+ {
-+ aboutScreen();
-+ }
-+ }
-+
-+ if (resultid == "popmenu_noexit")
-+ {
-+ if (buttonnum == 0)
-+ aboutScreen();
-+ }
-+
-+ m_menuPopup = NULL;
-+ }
-+}