From 94d94a06022ede096cfaadde40a6e45f7900a18d Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Thu, 3 Sep 2020 22:07:12 +0200 Subject: [PATCH] plugins: add option for software manage integration NOTE: bitmask enumeration should be better for more flexibility Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/5e0f9d0e97688d8a0cfeac2d5f5a7854090ae785 Author: Thilo Graf Date: 2020-09-03 (Thu, 03 Sep 2020) --- src/gui/update_menue.cpp | 8 +++++++- src/plugin.h | 13 +++++++------ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/gui/update_menue.cpp b/src/gui/update_menue.cpp index 5b010a5d9..091bb57e1 100644 --- a/src/gui/update_menue.cpp +++ b/src/gui/update_menue.cpp @@ -122,14 +122,20 @@ int CSoftwareUpdate::showSoftwareUpdate() softUpdate.addItem(mf); #endif + unsigned int nextShortcut = (unsigned int)softUpdate.getNextShortcut(); + #ifdef BOXMODEL_CST_HD2 softUpdate.addItem(GenericMenuSeparatorLine); - mf = new CMenuDForwarder(LOCALE_FLASHUPDATE_CREATEIMAGE_MENU, true, NULL, new CFlashExpertSetup(), NULL, CRCInput::convertDigitToKey(1)); + mf = new CMenuDForwarder(LOCALE_FLASHUPDATE_CREATEIMAGE_MENU, true, NULL, new CFlashExpertSetup(), NULL, CRCInput::convertDigitToKey(nextShortcut)); mf->setHint("", LOCALE_MENU_HINT_SOFTUPDATE_CREATEIMAGE_MENU); softUpdate.addItem(mf); #endif + // plugins with software manage integration + nextShortcut = (unsigned int)softUpdate.getNextShortcut(); + softUpdate.integratePlugins(PLUGIN_INTEGRATION_SOFTWARE_MANAGE, nextShortcut); + int res = softUpdate.exec (NULL, ""); return res; } diff --git a/src/plugin.h b/src/plugin.h index 37916f495..37c474c28 100644 --- a/src/plugin.h +++ b/src/plugin.h @@ -15,12 +15,13 @@ enum // plugin integration as defined in plugin's cfg enum { - PLUGIN_INTEGRATION_DISABLED = 0, - PLUGIN_INTEGRATION_MAIN = 1, - PLUGIN_INTEGRATION_MULTIMEDIA = 2, - PLUGIN_INTEGRATION_SETTING = 3, - PLUGIN_INTEGRATION_SERVICE = 4, - PLUGIN_INTEGRATION_INFORMATION = 5 + PLUGIN_INTEGRATION_DISABLED = 0, + PLUGIN_INTEGRATION_MAIN = 1, + PLUGIN_INTEGRATION_MULTIMEDIA = 2, + PLUGIN_INTEGRATION_SETTING = 3, + PLUGIN_INTEGRATION_SERVICE = 4, + PLUGIN_INTEGRATION_INFORMATION = 5, + PLUGIN_INTEGRATION_SOFTWARE_MANAGE = 6 }; #endif // __plugin_h__