You are not logged in.

Dear visitor, welcome to Dreamboard. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Sunday, June 17th 2007, 1:18am

Menu in Menu

#
from enigma import *
from Screens.Screen import Screen
from Screens.MessageBox import MessageBox
from Screens.InputBox import InputBox
from Screens.ChoiceBox import ChoiceBox
from Components.ActionMap import ActionMap, NumberActionMap
from Components.ScrollLabel import ScrollLabel
from Components.GUIComponent import *
from Components.MenuList import MenuList
from Components.Input import Input
from Screens.Console import Console
from Plugins.Plugin import PluginDescriptor
from Screens.ImageWizard import ImageWizard
from Plugins.Plugin import PluginDescriptor
from EXTRAS2 import *
import os


def main(session,**kwargs):
try:
session.open(EXTRAS)

def Plugins(**kwargs):
return PluginDescriptor(
name="EXTRAS",
description="plugin to do cron daemon management",
where = PluginDescriptor.WHERE_PLUGINMENU,
fnc = main
)


class EXTRAS(Screen):
skin = """
<screen position="100,100" size="500,400" title="EXTRAS Menu" >
<widget name="menu" position="10,10" size="490,390" scrollbarMode="showOnDemand" />
</screen>"""

def __init__(self, session, args = 0):
self.skin = EXTRAS.skin
self.session = session
Screen.__init__(self, session)
self.menu = args
list = []
list.append((_("Menu 2"), "addwizzard"))
self["menu"] = MenuList(list)
self["actions"] = ActionMap(["WizardActions", "DirectionActions"],{"ok": self.go,"back": self.close,}, -1)

def go(self):
returnValue = self["menu"].l.getCurrentSelection()[1]
if returnValue is not None:
if returnValue is "addwizzard":
EXTRAS2(self.session)



I ve got question


How can I run 2nd Menu from Another file ??

EXTRAS2(self.session)


EXTRAS2 it is name of Class in 2nd file

but it doesn't works

when i run only EXTRAS2 ( as a plugin ) it is working fine

an idea?

2

Sunday, June 17th 2007, 10:47am

self.session.open(EXTRAS2)

try this, like you used to openen EXTRAS. The only different is, that session is in a class accessable with self.session.

3

Sunday, June 17th 2007, 1:53pm

Yeah,

Thanks Dude :D

It is working Fine just now ;)

btw:


Is it possiable to Create

eListbox.Separator like in Enigma 1??

This post has been edited 1 times, last edit by "tracer" (Jun 17th 2007, 1:56pm)