[hbbtv] upgraded.
authorsmlee <smlee@dev3>
Mon, 14 Jul 2014 09:21:16 +0000 (18:21 +0900)
committersmlee <smlee@dev3>
Mon, 14 Jul 2014 12:36:01 +0000 (21:36 +0900)
re-coded for 'opera-hbbtv_0.2.bb'
sorry about confused for miss of name.

36 files changed:
configure.ac
lib/python/Plugins/Extensions/HbbTV/Makefile.am
lib/python/Plugins/Extensions/HbbTV/__init__.py
lib/python/Plugins/Extensions/HbbTV/aitreader.py [changed mode: 0755->0644]
lib/python/Plugins/Extensions/HbbTV/bookmark.py
lib/python/Plugins/Extensions/HbbTV/browser.py [new file with mode: 0644]
lib/python/Plugins/Extensions/HbbTV/hbbtv.py [new file with mode: 0644]
lib/python/Plugins/Extensions/HbbTV/locale/HbbTV.pot
lib/python/Plugins/Extensions/HbbTV/locale/Makefile.am
lib/python/Plugins/Extensions/HbbTV/locale/de.po
lib/python/Plugins/Extensions/HbbTV/locale/en.po
lib/python/Plugins/Extensions/HbbTV/locale/it.po
lib/python/Plugins/Extensions/HbbTV/meta/plugin_hbbtv.xml
lib/python/Plugins/Extensions/HbbTV/plugin.py
lib/python/Plugins/Extensions/HbbTV/vbcfg.py [new file with mode: 0644]
lib/python/Plugins/Extensions/HbbTV/vbipc.py [new file with mode: 0644]
lib/python/Plugins/Extensions/HbbTV/youtube.py [new file with mode: 0644]
lib/python/Plugins/Extensions/Makefile.am
lib/python/Plugins/Extensions/Vbrowser/Makefile.am [deleted file]
lib/python/Plugins/Extensions/Vbrowser/__init__.py [deleted file]
lib/python/Plugins/Extensions/Vbrowser/aitreader.py [deleted file]
lib/python/Plugins/Extensions/Vbrowser/bookmark.py [deleted file]
lib/python/Plugins/Extensions/Vbrowser/browser.py [deleted file]
lib/python/Plugins/Extensions/Vbrowser/hbbtv.py [deleted file]
lib/python/Plugins/Extensions/Vbrowser/keymap.xml [deleted file]
lib/python/Plugins/Extensions/Vbrowser/locale/Makefile.am [deleted file]
lib/python/Plugins/Extensions/Vbrowser/locale/Vbrowser.pot [deleted file]
lib/python/Plugins/Extensions/Vbrowser/locale/de.po [deleted file]
lib/python/Plugins/Extensions/Vbrowser/locale/en.po [deleted file]
lib/python/Plugins/Extensions/Vbrowser/locale/it.po [deleted file]
lib/python/Plugins/Extensions/Vbrowser/meta/Makefile.am [deleted file]
lib/python/Plugins/Extensions/Vbrowser/meta/plugin_vbrowser.xml [deleted file]
lib/python/Plugins/Extensions/Vbrowser/plugin.py [deleted file]
lib/python/Plugins/Extensions/Vbrowser/vbcfg.py [deleted file]
lib/python/Plugins/Extensions/Vbrowser/vbipc.py [deleted file]
lib/python/Plugins/Extensions/Vbrowser/youtube.py [deleted file]

index dbee484..332fc7a 100644 (file)
@@ -201,9 +201,6 @@ lib/python/Plugins/Extensions/BackupSuiteHDD/meta/Makefile
 lib/python/Plugins/Extensions/BackupSuiteHDD/locale/Makefile
 lib/python/Plugins/Extensions/BackupSuiteUSB/Makefile
 lib/python/Plugins/Extensions/BackupSuiteUSB/meta/Makefile
 lib/python/Plugins/Extensions/BackupSuiteHDD/locale/Makefile
 lib/python/Plugins/Extensions/BackupSuiteUSB/Makefile
 lib/python/Plugins/Extensions/BackupSuiteUSB/meta/Makefile
-lib/python/Plugins/Extensions/Vbrowser/Makefile
-lib/python/Plugins/Extensions/Vbrowser/meta/Makefile
-lib/python/Plugins/Extensions/Vbrowser/locale/Makefile
 lib/python/Plugins/SystemPlugins/CleanupWizard/Makefile
 lib/python/Plugins/SystemPlugins/CleanupWizard/meta/Makefile
 lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/Makefile
 lib/python/Plugins/SystemPlugins/CleanupWizard/Makefile
 lib/python/Plugins/SystemPlugins/CleanupWizard/meta/Makefile
 lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/Makefile
index e5292f8..e3a40df 100644 (file)
@@ -7,6 +7,9 @@ install_PYTHON = \
        __init__.py \
        aitreader.py \
        bookmark.py \
        __init__.py \
        aitreader.py \
        bookmark.py \
-       plugin.py 
-
-
+       browser.py \
+       hbbtv.py \
+       plugin.py \
+       vbcfg.py \
+       vbipc.py \
+       youtube.py
index c7f59be..d20c4b3 100644 (file)
@@ -2,18 +2,18 @@ from Components.Language import language
 from Tools.Directories import resolveFilename, SCOPE_PLUGINS, SCOPE_LANGUAGE
 import os,gettext
 
 from Tools.Directories import resolveFilename, SCOPE_PLUGINS, SCOPE_LANGUAGE
 import os,gettext
 
-lang = 'en'
+PluginLanguageDomain = "HbbTV"
+PluginLanguagePath = "Extensions/HbbTV/locale"
+
 def localeInit():
 def localeInit():
-       global lang
        lang = language.getLanguage()[:2]
        os.environ["LANGUAGE"] = lang
        gettext.bindtextdomain("enigma2", resolveFilename(SCOPE_LANGUAGE))
        gettext.textdomain("enigma2")
        lang = language.getLanguage()[:2]
        os.environ["LANGUAGE"] = lang
        gettext.bindtextdomain("enigma2", resolveFilename(SCOPE_LANGUAGE))
        gettext.textdomain("enigma2")
-       gettext.bindtextdomain(lang, '/usr/lib/enigma2/python/Plugins/Extensions/HbbTV/locale')
+       gettext.bindtextdomain(PluginLanguageDomain, resolveFilename(SCOPE_PLUGINS, PluginLanguagePath))
 
 def _(txt):
 
 def _(txt):
-       global lang
-       t = gettext.dgettext(lang, txt)
+       t = gettext.dgettext(PluginLanguageDomain, txt)
        if t == txt:
                t = gettext.gettext(txt)
        return t
        if t == txt:
                t = gettext.gettext(txt)
        return t
old mode 100755 (executable)
new mode 100644 (file)
index f2c2195..757b0f3
@@ -1,7 +1,9 @@
 import os, xml.dom.minidom
 from enigma import iServiceInformation
 
 import os, xml.dom.minidom
 from enigma import iServiceInformation
 
-DUMPBIN = "/usr/lib/enigma2/python/Plugins/Extensions/HbbTV/dumpait"
+import vbcfg
+
+DUMPBIN = vbcfg.PLUGINROOT + "/dumpait"
 class eAITSectionReader:
        def __init__(self, demux, pmtid, sid):
                self.mVuplusBox = False
 class eAITSectionReader:
        def __init__(self, demux, pmtid, sid):
                self.mVuplusBox = False
@@ -39,7 +41,6 @@ class eAITSectionReader:
                        item["orgid"]   = int(self.__item(application, "orgid"))
                        item["appid"]   = int(self.__item(application, "appid"))
                        item["profile"] = int(self.__item(application, "profile"))
                        item["orgid"]   = int(self.__item(application, "orgid"))
                        item["appid"]   = int(self.__item(application, "appid"))
                        item["profile"] = int(self.__item(application, "profile"))
-               #print item
                return item
 
        def doParseApplications(self):
                return item
 
        def doParseApplications(self):
@@ -67,13 +68,16 @@ class eAITSectionReader:
                document = ""
                try:    document = os.popen(self.mCommand).read()
                except Exception, ErrMsg:
                document = ""
                try:    document = os.popen(self.mCommand).read()
                except Exception, ErrMsg:
-                       print ErrMsg
+                       vbcfg.ERR(ErrMsg)
                        return False
                if len(document) == 0:
                        return False
                document = document.decode("cp1252").encode("utf-8")
                        return False
                if len(document) == 0:
                        return False
                document = document.decode("cp1252").encode("utf-8")
-               #print document
-               self.mDocument = xml.dom.minidom.parseString(document)
+               try:
+                       self.mDocument = xml.dom.minidom.parseString(document)
+               except Exception, ErrMsg:
+                       vbcfg.ERR("XML parse: %s" % ErrMsg)
+                       return False
                return True
 
        def doDump(self):
                return True
 
        def doDump(self):
@@ -91,7 +95,8 @@ def unit_test(demux, pmtid, sid):
        if reader.doOpen():
                reader.doParseApplications()
                reader.doDump()
        if reader.doOpen():
                reader.doParseApplications()
                reader.doDump()
-       else:   print "no data!!"
+       else:
+               vbcfg.ERR("no data!!")
 
 #unit_test('0', 0x17d4, 0x2b66)
 
 
 #unit_test('0', 0x17d4, 0x2b66)
 
index 6e5dd7b..5048564 100644 (file)
@@ -1,3 +1,5 @@
+import vbcfg
+
 class BookmarkData:
        def __init__(self, _id, _title, _url, _parent, _type):
                self.mId        = _id
 class BookmarkData:
        def __init__(self, _id, _title, _url, _parent, _type):
                self.mId        = _id
@@ -38,7 +40,6 @@ class SimpleConfigParser:
        def _read(self):
                if self.mDataValid:
                        return
        def _read(self):
                if self.mDataValid:
                        return
-               print "populate!!"
                self.mConfig.read(self.mFileName)
 
                self.mCategoryCurrentIdx = self.getNumber('__SYS__', 'category_current_idx')
                self.mConfig.read(self.mFileName)
 
                self.mCategoryCurrentIdx = self.getNumber('__SYS__', 'category_current_idx')
@@ -52,7 +53,6 @@ class SimpleConfigParser:
                self.mPopulateValid = False
 
        def _del(self, _section, _option=None):
                self.mPopulateValid = False
 
        def _del(self, _section, _option=None):
-               #print _section, ' :', _option
                if _option is None:
                        if not self.exist(_section):
                                return
                if _option is None:
                        if not self.exist(_section):
                                return
@@ -66,7 +66,7 @@ class SimpleConfigParser:
                try:
                        data = self.mConfig.get(_section, _option)
                except Exception, e:
                try:
                        data = self.mConfig.get(_section, _option)
                except Exception, e:
-                       #print e
+                       vbcfg.ERR(e)
                        return _default
                else :  return data
 
                        return _default
                else :  return data
 
@@ -153,8 +153,9 @@ class BookmarkManager(SimpleConfigParser):
                if not self.mDebugEnable:
                        return
                if params is None:
                if not self.mDebugEnable:
                        return
                if params is None:
-                       print format
-               else:   print format % (params)
+                       vbcfg.DEBUG(format)
+               else:
+                       vbcfg.DEBUG(format % (params))
 
        def getBookmark(self, _title):
                self.populate()
 
        def getBookmark(self, _title):
                self.populate()
@@ -287,6 +288,6 @@ class BookmarkManager(SimpleConfigParser):
 
        @staticmethod
        def getInstance():
 
        @staticmethod
        def getInstance():
-               return BookmarkManager('/usr/lib/enigma2/python/Plugins/Extensions/HbbTV/bookmark.ini')
+               return BookmarkManager(vbcfg.PLUGINROOT + "/bookmark.ini")
 
 
 
 
diff --git a/lib/python/Plugins/Extensions/HbbTV/browser.py b/lib/python/Plugins/Extensions/HbbTV/browser.py
new file mode 100644 (file)
index 0000000..1b56e7d
--- /dev/null
@@ -0,0 +1,1185 @@
+from Screens.Screen import Screen
+from Screens.HelpMenu import HelpableScreen
+from Screens.ChoiceBox import ChoiceBox
+from Screens.MessageBox import MessageBox
+from Screens.VirtualKeyBoard import VirtualKeyBoard
+from Components.ActionMap import ActionMap, HelpableActionMap
+from Components.ConfigList import ConfigListScreen
+from Components.Label import Label, MultiColorLabel
+from Components.Language import language
+from Components.MenuList import MenuList
+from Components.Pixmap import Pixmap
+from Components.Sources.StaticText import StaticText
+from Components.config import ConfigText, ConfigSelection, ConfigSlider, getConfigListEntry
+
+import os, vbcfg
+
+from enigma import fbClass, eRCInput, eTimer, getDesktop
+
+from __init__ import _
+from bookmark import BookmarkManager, BookmarkData, CategoryData
+from vbipc import VBController
+
+strIsEmpty = lambda x: x is None or len(x) == 0
+
+class BrowserSetting:
+       def __init__(self):
+               self._settingFileName = '%s/home/setting.ini' % vbcfg.APPROOT
+               self._start = None
+               self._type = None
+               self._keymap = None
+               self._read()
+
+       def _read(self):
+               if not os.path.exists(self._settingFileName):
+                       self.getDefault()
+                       return
+
+               f = open(self._settingFileName)
+               for line in f.readlines():
+                       if line.startswith('start='):
+                               tmp = line[6:len(line)-1].split()
+                               self._start = tmp[0]
+                               if len(tmp) > 1:
+                                       self._type = int(tmp[1])
+                               else:   self._type = 0
+                       elif line.startswith('keymap='):
+                               self._keymap = line[7:len(line)-1]
+               f.close()
+
+       def _write(self):
+               tmpstr = []
+               tmpstr.append('start=%s %d\n' % (self._start, self._type))
+               tmpstr.append('keymap=%s\n' % (self._keymap))
+               f = open(self._settingFileName, 'w')
+               f.writelines(tmpstr)
+               f.close()
+
+       def getDefault(self):
+               self._start = 'http://vuplus.com'
+               self._type = 0
+               self._keymap = 'us-rc'
+
+       def setData(self, start, types=0, keymap="us-rc"):
+               self._start = start
+               self._type = types
+               self._keymap = keymap
+               self._write()
+
+       def getData(self):
+               return {
+                       'start':self._start,
+                       'type':self._type,
+                       'keymap':self._keymap,
+               }
+
+class BrowserPositionSetting:
+       def __init__(self):
+               self._positionFileName = '%s/home/position.cfg' % vbcfg.APPROOT
+               self._left = 0
+               self._width = 0
+               self._top = 0
+               self._height = 0
+               self._read()
+
+       def _read(self):
+               if not os.path.exists(self._positionFileName):
+                       self.getDefault()
+                       return
+
+               f = open(self._positionFileName)
+               str = f.read()
+               f.close()
+
+               pos = str.split();
+               self._left = int(pos[0])
+               self._width = int(pos[1])
+               self._top = int(pos[2])
+               self._height = int(pos[3])
+
+       def _write(self):
+               tmpstr = "%d %d %d %d\n" % (self._left, self._width, self._top, self._height)
+               f = open(self._positionFileName, 'w')
+               f.write(tmpstr)
+               f.close()
+
+       def getDefault(self):
+               self._left = 0
+               self._top = 0
+               self._width = 720
+               self._height = 576
+
+       def setPosition(self, params):
+               self._left = params[0]
+               self._width = params[1]
+               self._top = params[2]
+               self._height = params[3]
+               self._write()
+
+       def getPosition(self):
+               return (self._left, self._width, self._top, self._height)
+
+class BrowserPositionWindow(Screen, ConfigListScreen):
+       skin =  """
+               <screen position="0,0" size="%d,%d" title="Browser Position Setup" backgroundColor="#27d8dee2" >
+                       <ePixmap pixmap="skin_default/buttons/red.png" position="%d,%d" size="140,40" alphatest="on" />
+                       <ePixmap pixmap="skin_default/buttons/green.png" position="%d,%d" size="140,40" alphatest="on" />"
+
+                       <widget source="key_red" render="Label" position="%d,%d" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#9f1313" foregroundColor="#ffffff" transparent="1" />
+                       <widget source="key_green" render="Label" position="%d,%d" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#1f771f" foregroundColor="#ffffff" transparent="1" />
+
+                       <widget name="config" zPosition="2" position="%d,%d" size="500,200" scrollbarMode="showOnDemand" foregroundColor="#1c1c1c" transparent="1" />
+               </screen>
+               """
+       def __init__(self, session):
+               w,h   = session.desktop.size().width(), session.desktop.size().height()
+               cw,ch = w/2, h/2
+               #                             btn_red        btn_green     lb_red         lb_green      config
+               self.skin = self.skin % (w,h, cw-190,ch-110, cw+50,ch-110, cw-190,ch-110, cw+50,ch-110, cw-250,ch-50)
+
+               Screen.__init__(self,session)
+               self.session = session
+               self["shortcuts"] = ActionMap(["ShortcutActions", "SetupActions" ],
+               {
+                       "ok": self.keyOk,
+                       "cancel": self.keyCancel,
+                       "red": self.keyCancel,
+                       "green": self.keyOk,
+               }, -2)
+               self.list = []
+               ConfigListScreen.__init__(self, self.list, session = self.session)
+
+               self["key_red"] = StaticText(_("Cancel"))
+               self["key_green"] = StaticText(_("Save"))
+               self["current"] = StaticText(_(" "))
+               vbcfg.g_position = vbcfg.getPosition()
+               self.createSetup()
+
+       def createSetup(self):
+               self.list = []
+
+               params = BrowserPositionSetting().getPosition()
+               vbcfg.setPosition(params)
+
+               left   = params[0]
+               width  = params[1]
+               top    = params[2]
+               height = params[3]
+
+               self.dst_left   = ConfigSlider(default = left, increment = 5, limits = (0, 720))
+               self.dst_width  = ConfigSlider(default = width, increment = 5, limits = (0, 720))
+               self.dst_top    = ConfigSlider(default = top, increment = 5, limits = (0, 576))
+               self.dst_height = ConfigSlider(default = height, increment = 5, limits = (0, 576))
+
+               self.dst_left_entry   = getConfigListEntry(_("left"), self.dst_left)
+               self.dst_width_entry  = getConfigListEntry(_("width"), self.dst_width)
+               self.dst_top_entry    = getConfigListEntry(_("top"), self.dst_top)
+               self.dst_height_entry = getConfigListEntry(_("height"), self.dst_height)
+
+               self.list.append(self.dst_left_entry)
+               self.list.append(self.dst_width_entry)
+               self.list.append(self.dst_top_entry)
+               self.list.append(self.dst_height_entry)
+
+               self["config"].list = self.list
+               self["config"].l.setList(self.list)
+
+       def resetDisplay(self):
+               for entry in self["config"].getList():
+                       self["config"].l.invalidateEntry(self["config"].getList().index(entry))
+
+       def adjustBorder(self):
+               if self["config"].getCurrent() == self.dst_left_entry:
+                       if self.dst_left.value + self.dst_width.value >720:
+                               self.dst_width.setValue(720-self.dst_left.value)
+                               self.resetDisplay()
+               elif self["config"].getCurrent() == self.dst_width_entry:
+                       if self.dst_left.value + self.dst_width.value >720:
+                               self.dst_left.setValue(720-self.dst_width.value)
+                               self.resetDisplay()
+               elif self["config"].getCurrent() == self.dst_top_entry:
+                       if self.dst_top.value + self.dst_height.value >576:
+                               self.dst_height.setValue(576-self.dst_top.value)
+                               self.resetDisplay()
+               elif self["config"].getCurrent() == self.dst_height_entry:
+                       if self.dst_top.value + self.dst_height.value >576:
+                               self.dst_top.setValue(576-self.dst_height.value)
+                               self.resetDisplay()
+
+       def keyLeft(self):
+               ConfigListScreen.keyLeft(self)
+               self.adjustBorder()
+               params = (int(self.dst_left.value), int(self.dst_width.value), int(self.dst_top.value), int(self.dst_height.value))
+               vbcfg.setPosition(params)
+
+       def keyRight(self):
+               ConfigListScreen.keyRight(self)
+               self.adjustBorder()
+               params = (int(self.dst_left.value), int(self.dst_width.value), int(self.dst_top.value), int(self.dst_height.value))
+               vbcfg.setPosition(params)
+
+       def keyOk(self):
+               params = (int(self.dst_left.value), int(self.dst_width.value), int(self.dst_top.value), int(self.dst_height.value))
+               BrowserPositionSetting().setPosition(params)
+               vbcfg.setPosition(vbcfg.g_position)
+               self.close()
+
+       def keyCancel(self):
+               if self["config"].isChanged():
+                       self.session.openWithCallback(self.cancelConfirm, MessageBox, _("Really close without saving settings?"))
+               else:
+                       vbcfg.setPosition(vbcfg.g_position)
+                       self.close()
+
+       def cancelConfirm(self,ret):
+               if ret:
+                       vbcfg.setPosition(vbcfg.g_position)
+                       self.close()
+
+
+class BrowserPreferenceWindow(ConfigListScreen, Screen):
+       skin = """
+               <screen position="center,120" size="600,350" title="Preference">
+                       <widget name="url" position="5,0" size="590,100" valign="center" font="Regular;20" />
+                       <widget name="config" position="0,100" size="600,200" scrollbarMode="showOnDemand" />
+
+                       <ePixmap pixmap="skin_default/buttons/red.png" position="310,310" size="140,40" alphatest="on" />
+                       <ePixmap pixmap="skin_default/buttons/green.png" position="150,310" size="140,40" alphatest="on" />
+
+                       <widget source="key_red" render="Label" position="310,310" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#9f1313" foregroundColor="#ffffff" transparent="1" />
+                       <widget source="key_green" render="Label" position="150,310" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#1f771f" foregroundColor="#ffffff" transparent="1" />
+               </screen>
+               """
+       def __init__(self, session, currentUrl):
+               self.session = session
+               Screen.__init__(self, session)
+
+               self.menulist = []
+               ConfigListScreen.__init__(self, self.menulist)
+
+               self["actions"] = ActionMap(["OkCancelActions", "ShortcutActions", "WizardActions", "ColorActions", "SetupActions", ], {
+                       "red"    : self.keyRed,
+                       "green"  : self.keyGreen,
+                       "ok"     : self.keyOK,
+                       "cancel" : self.keyRed
+               }, -2)
+               self["key_red"] = StaticText(_("Cancel"))
+               self["key_green"] = StaticText(_("Save"))
+               self["url"] = Label()
+
+               self._currentPageUrl = currentUrl
+               if self._currentPageUrl is None:
+                       self._currentPageUrl = ''
+               self._startPageUrl = None
+               self._keymapType = None
+               self.makeMenuEntry()
+               self.onLayoutFinish.append(self.layoutFinished)
+
+       def layoutFinished(self):
+               self.setTitle(_('Preference'))
+
+       def updateStartPageUrl(self):
+               if self.menuItemStartpage.value == "startpage":
+                       self["url"].setText(self._startPageUrl)
+               elif self.menuItemStartpage.value == "current":
+                       self["url"].setText(self._currentPageUrl)
+               elif self.menuItemStartpage.value == "direct":
+                       self["url"].setText('')
+
+       def keyGreen(self):
+               url = self["url"].getText()
+               if strIsEmpty(url):
+                       self.session.open(MessageBox, _('Invalid URL!!(Empty)\nPlease, Input to the URL.'), type = MessageBox.TYPE_INFO)
+                       return
+               mode = 0
+               if url.find('/usr/local/manual') > 0:
+                       mode = 1
+               self._keymapType = self.menuItemKeyboardLayout.value
+               BrowserSetting().setData(url, mode, self._keymapType)
+               # send contorller
+               #command_util = getCommandUtil()
+               #command_util.sendCommand('OP_BROWSER_NEED_RELOAD_KEYMAP')
+               self.close()
+
+       def keyRed(self):
+               self.close()
+
+       def keyOK(self):
+               def _cb_directInputUrl(data):
+                       if strIsEmpty(data):
+                               return
+                       self["url"].setText(data)
+               if self["config"].l.getCurrentSelectionIndex() == 0 and self.menuItemStartpage.value == "direct":
+                       self.session.openWithCallback(_cb_directInputUrl, VirtualKeyBoard, title=(_("Please enter URL here")), text='http://')
+
+       def keyLeft(self):
+               ConfigListScreen.keyLeft(self)
+               self.updateStartPageUrl()
+
+       def keyRight(self):
+               ConfigListScreen.keyRight(self)
+               self.updateStartPageUrl()
+
+       def getKeymapTypeList(self):
+               types = []
+               for f in os.listdir("%s/keymap" % vbcfg.APPROOT):
+                       filesplit = f.split('.')
+                       if len(filesplit) < 2:
+                               continue
+                       types.append((filesplit[1], filesplit[1]))
+               types.sort()
+               return types
+
+       def makeMenuEntry(self):
+               l = []
+               l.append(("startpage", _("Start Page")))
+               if not strIsEmpty(self._currentPageUrl):
+                       l.append(("current", _("Current Page")))
+               l.append(("direct", _("Direct Input")))
+               self.menuItemStartpage = ConfigSelection(default="startpage", choices = l)
+               self.menuEntryStartpage = getConfigListEntry(_("Startpage"), self.menuItemStartpage)
+
+               kl = self.getKeymapTypeList()
+
+               try:
+                       d = BrowserSetting().getData()
+                       self._startPageUrl = d['start']
+                       self._keymapType = d['keymap']
+                       #d['type']
+               except: self._startPageUrl = 'http://vuplus.com'
+               self.updateStartPageUrl()
+
+               if self._keymapType is None or len(self._keymapType) == 0:
+                       self._keymapType = "us-rc"
+               self.menuItemKeyboardLayout = ConfigSelection(default=self._keymapType, choices = kl)
+               self.menuEntryKeyboardLayout = getConfigListEntry(_("Keyboard Layout"), self.menuItemKeyboardLayout)
+               self.resetMenuList()
+
+       def resetMenuList(self):
+               self.menulist = []
+               self.menulist.append(self.menuEntryStartpage)
+               self.menulist.append(self.menuEntryKeyboardLayout)
+
+               self["config"].list = self.menulist
+               self["config"].l.setList(self.menulist)
+
+class BookmarkEditWindow(ConfigListScreen, Screen):
+       CATEGORY,BOOKMARK = 0,1
+       skin = """
+               <screen position="center,center" size="600,140" title="Bookmark Edit">
+                       <widget name="config" position="0,0" size="600,100" scrollbarMode="showOnDemand" />
+
+                       <ePixmap pixmap="skin_default/buttons/red.png" position="310,100" size="140,40" alphatest="on" />
+                       <ePixmap pixmap="skin_default/buttons/green.png" position="150,100" size="140,40" alphatest="on" />
+
+                       <widget source="key_red" render="Label" position="310,100" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#9f1313" foregroundColor="#ffffff" transparent="1" />
+                       <widget source="key_green" render="Label" position="150,100" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#1f771f" foregroundColor="#ffffff" transparent="1" />
+
+                       <widget name="VKeyIcon" pixmap="skin_default/buttons/key_text.png" position="0,100" zPosition="10" size="35,25" transparent="1" alphatest="on" />
+
+               </screen>
+               """
+       def __init__(self, session, _mode, _type, _data, _bm):
+               self.mMode = _mode
+               self.mType = _type
+               self.mData = _data
+               self.mSession = session
+               self.mBookmarkManager = _bm
+
+               if _data is not None:
+                       vbcfg.DEBUG("0x%x" % _data.mId)
+
+               Screen.__init__(self, session)
+
+               self.menulist = []
+               ConfigListScreen.__init__(self, self.menulist)
+
+               self["actions"] = ActionMap(["OkCancelActions", "ColorActions",], {
+                       "ok"     : self.keyGreen,
+                       "green"  : self.keyGreen,
+                       "red"    : self.keyRed,
+                       "cancel" : self.keyRed,
+               }, -2)
+
+               self["VKeyIcon"] = Pixmap()
+               self["key_red"] = StaticText(_("Cancel"))
+               self["key_green"] = StaticText(_("Save"))
+
+               self.menuItemTitle = None
+               self.menuItemUrl   = None
+               self.menuItemName  = None
+
+               self.menuEntryName = None
+               self.menuEntryTitle = None
+               self.menuEntryUrl = None
+
+               self.makeConfigList()
+               self.onLayoutFinish.append(self.layoutFinished)
+
+       def layoutFinished(self):
+               self.setTitle(_('Bookmark') + ' ' + self.mMode)
+
+       def selectedItem(self):
+               currentPosition = self["config"].getCurrent()
+               if self.mType == BookmarkEditWindow.CATEGORY:
+                       return (_("Name"), self.menuItemName)
+               else:
+                       if currentPosition == self.menuEntryTitle:
+                               return (_("Title"), self.menuItemTitle)
+                       elif currentPosition == self.menuEntryUrl:
+                               return (_("Url"), self.menuItemUrl)
+               return None
+
+       def showMessageBox(self, text):
+               msg = _("Invalid ") + text + _("!!(Empty)\nPlease, Input to the") + " " + text + "."
+               self.mSession.openWithCallback(self.showVKeyWindow, MessageBox, msg, MessageBox.TYPE_INFO)
+               return False
+
+       def showVKeyWindow(self, data=None):
+               itemTitle = ""
+               itemValue = ""
+               selected = self.selectedItem()
+               if selected is not None:
+                       itemValue = selected[1].value
+                       if strIsEmpty(itemValue):
+                               itemValue = ""
+                       itemTitle = selected[0]
+
+               self.session.openWithCallback(self.cbVKeyWindow, VirtualKeyBoard, title=itemTitle, text=itemValue)
+
+       def cbVKeyWindow(self, data=None):
+               if data is not None:
+                       selected = self.selectedItem()
+                       if selected is not None:
+                               selected[1].setValue(data)
+
+       def saveData(self):
+               if self.mType == BookmarkEditWindow.CATEGORY:
+                       if self.mMode == _('Add'):
+                               categoryName = self.menuItemName.value
+                               if strIsEmpty(categoryName):
+                                       return self.showMessageBox(_("Category Name"))
+                               self.mBookmarkManager.addCategory(categoryName)
+                       else:
+                               if strIsEmpty(self.menuItemName.value):
+                                       return self.showMessageBox(_("Category Name"))
+                               self.mData.mName = self.menuItemName.value
+                               self.mBookmarkManager.updateCategory(self.mData)
+               else:
+                       if self.mMode == _('Add'):
+                               bookmarkTitle = self.menuItemTitle.value
+                               bookmarkUrl = self.menuItemUrl.value
+                               if strIsEmpty(bookmarkTitle):
+                                       self["config"].setCurrentIndex(0)
+                                       return self.showMessageBox(_("Bookmark Title"))
+                               if strIsEmpty(bookmarkUrl):
+                                       self["config"].setCurrentIndex(1)
+                                       return self.showMessageBox(_("Bookmark URL"))
+                               self.mBookmarkManager.addBookmark(bookmarkTitle, bookmarkUrl, self.mData.mParent, 0)
+                       else:
+                               if strIsEmpty(self.menuItemTitle.value):
+                                       self["config"].setCurrentIndex(0)
+                                       return self.showMessageBox(_("Bookmark Title"))
+                               if strIsEmpty(self.menuItemUrl.value):
+                                       self["config"].setCurrentIndex(1)
+                                       return self.showMessageBox(_("Bookmark URL"))
+                               self.mData.mTitle = self.menuItemTitle.value
+                               self.mData.mUrl = self.menuItemUrl.value
+                               self.mBookmarkManager.updateBookmark(self.mData)
+               return True
+
+       def keyGreen(self):
+               if not self.saveData():
+                       return
+               self.close(True)
+
+       def keyRed(self):
+               self.close(False)
+
+       def keyLeft(self):
+               ConfigListScreen.keyLeft(self)
+
+       def keyRight(self):
+               ConfigListScreen.keyRight(self)
+
+       def makeConfigList(self):
+               self.menulist = []
+
+               if self.mType == BookmarkEditWindow.CATEGORY:
+                       self.menuItemName = ConfigText(default=self.mData.mName, visible_width=65, fixed_size=False)
+
+                       self.menuEntryName = getConfigListEntry(_("Name"), self.menuItemName)
+
+                       self.menulist.append(self.menuEntryName)
+               else:
+                       self.menuItemTitle = ConfigText(default=self.mData.mTitle, visible_width=65, fixed_size=False)
+                       self.menuItemUrl   = ConfigText(default=self.mData.mUrl, visible_width=65, fixed_size=False)
+
+                       self.menuEntryTitle = getConfigListEntry(_("Title"), self.menuItemTitle)
+                       self.menuEntryUrl = getConfigListEntry(_("Url"), self.menuItemUrl)
+
+                       self.menulist.append(self.menuEntryTitle)
+                       self.menulist.append(self.menuEntryUrl)
+
+               self["config"].list = self.menulist
+               self["config"].l.setList(self.menulist)
+
+class BrowserBookmarkWindow(Screen):
+       skin = """
+               <screen name="BrowserBookmarkWindow" position="center,120" size="600,400" title="Bookmark" >
+                       <widget name="bookmarklist" position="0,0" size="600,200" zPosition="10" scrollbarMode="showOnDemand" />
+
+                       <ePixmap pixmap="skin_default/buttons/key_0.png" position="556,330" size="35,30" alphatest="on" />
+                       <widget source="key_0" render="Label" position="258,330" zPosition="1" size="300,30" font="Regular;20" halign="right" valign="center"/>
+
+                       <ePixmap pixmap="skin_default/buttons/red.png" position="5,360" size="140,40" alphatest="on" />
+                       <ePixmap pixmap="skin_default/buttons/green.png" position="155,360" size="140,40" alphatest="on" />
+                       <ePixmap pixmap="skin_default/buttons/yellow.png" position="305,360" size="140,40" alphatest="on" />
+                       <ePixmap pixmap="skin_default/buttons/blue.png" position="450,360" size="140,40" alphatest="on" />
+
+                       <widget source="key_red" render="Label" position="5,360" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#9f1313" foregroundColor="#ffffff" transparent="1" />
+                       <widget source="key_green" render="Label" position="155,360" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#1f771f" foregroundColor="#ffffff" transparent="1" />
+                       <widget source="key_yellow" render="Label" position="305,360" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#a08500" foregroundColor="#ffffff" transparent="1" />
+                       <widget source="key_blue" render="Label" position="450,360" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#18188b" foregroundColor="#ffffff" transparent="1" />
+               </screen>
+               """
+
+       def __init__(self, _session, _url=None, _title=None):
+               self.mUrl = _url
+               self.mTitle = _title
+               self.mBookmarkManager = BookmarkManager.getInstance()
+               self.mSession = _session
+               Screen.__init__(self, _session)
+               self["actions"] = ActionMap(["DirectionActions", "OkCancelActions","ColorActions", "NumberActions"], {
+                               "ok"    : self.keyOK,
+                               "cancel": self.keyCancel,
+                               "red"   : self.keyRed,
+                               "green" : self.keyGreen,
+                               "yellow": self.keyYellow,
+                               "blue"  : self.keyBlue,
+                               "0" : self.keyNumber,
+                       },-2)
+
+               self["key_red"]    = StaticText(_("Exit"))
+               self["key_green"]  = StaticText(_("Add"))
+               self["key_yellow"] = StaticText(_("Edit"))
+               self["key_blue"]   = StaticText(_("Delete"))
+               self["key_0"]      = StaticText(_("Set as Startpage"))
+
+               self.mBookmarkList = self.setBookmarkList()
+               self["bookmarklist"] = MenuList(self.mBookmarkList)
+
+               self.onLayoutFinish.append(self.layoutFinished)
+
+       def layoutFinished(self):
+               self.setTitle(_('Bookmark'))
+
+       def setBookmarkList(self):
+               l = []
+               #self.mBookmarkManager.dump()
+               cd = self.mBookmarkManager.getBookmarkRoot()
+               for ck in cd.iterkeys():
+                       l.append(('# ' + cd[ck].mName, cd[ck]))
+                       bd = cd[ck].mBookmarks
+                       for bk in bd.iterkeys():
+                               l.append(('    - ' + bd[bk].mTitle, bd[bk]))
+               return l
+
+       def updateBookmarkList(self):
+               self.mBookmarkList = self.setBookmarkList()
+               self["bookmarklist"].setList(self.mBookmarkList)
+
+       def cbEditWindow(self, ret=False):
+               if not ret:
+                       return
+               self.updateBookmarkList()
+
+       def getParentCategory(self):
+               idx = self["bookmarklist"].getSelectedIndex()
+               try:
+                       while idx >= 0:
+                               data = self.mBookmarkList[idx][0].strip()
+                               if data[0] == '#':
+                                       return self.mBookmarkList[idx][1]
+                               idx -= 1
+               except: pass
+               return None
+
+       def isCategoryItem(self):
+               try:
+                       head = self["bookmarklist"].getCurrent()[0].strip()
+                       if head[0] == '#':
+                               return True
+               except: pass
+               return False
+
+       def keyNumber(self):
+               if self.isCategoryItem(): return
+
+               data = self["bookmarklist"].getCurrent()[1]
+               if strIsEmpty(data.mUrl):
+                       msg = _("Invalid URL. Please check again!!")
+                       self.mSession.open(MessageBox, msg, MessageBox.TYPE_INFO)
+                       return
+               def cbSetStartpage(ret=None):
+                       if ret is None: return
+                       if ret:
+                               data = self["bookmarklist"].getCurrent()[1]
+                               BrowserSetting().setData(data.mUrl, data.mType)
+               msg = _("Do you want to set selected url to the Startpage?")
+               self.mSession.openWithCallback(cbSetStartpage, MessageBox, msg, MessageBox.TYPE_YESNO, default=True)
+
+       def keyGreen(self):
+               def cbGreen(data):
+                       if data is None:
+                               return
+                       if data[1] == 1:
+                               parent = self.getParentCategory()
+                               if parent is None:
+                                       return
+                               if strIsEmpty(self.mTitle):
+                                       return
+                               retAdd = self.mBookmarkManager.addBookmark(self.mTitle, self.mUrl, parent.mId, 0)
+                               if not retAdd:
+                                       msg = _("Current page is already exist.")
+                                       self.mSession.open(MessageBox, msg, MessageBox.TYPE_INFO)
+                               self.cbEditWindow(True)
+                       elif data[1] == 2:
+                               parent = self.getParentCategory()
+                               if parent is None:
+                                       return
+                               b = BookmarkData(0, '', '', parent.mId, 0)
+                               self.mSession.openWithCallback(self.cbEditWindow, BookmarkEditWindow, _('Add'), BookmarkEditWindow.BOOKMARK, b, self.mBookmarkManager)
+                       elif data[1] == 3:
+                               c = CategoryData(0, '')
+                               self.mSession.openWithCallback(self.cbEditWindow, BookmarkEditWindow, _('Add'), BookmarkEditWindow.CATEGORY, c, self.mBookmarkManager)
+               if strIsEmpty(self.mUrl):
+                       l = [(_('Direct Input(Bookmark)'),2,), (_('Direct Input(Category)'),3,)]
+               else:   l = [(_('Currentpage(Bookmark)'),1,), (_('Direct Input(Bookmark)'),2,), (_('Direct Input(Category)'),3,)]
+               self.mSession.openWithCallback(cbGreen, ChoiceBox, title=_("Please choose."), list=l)
+
+       def keyYellow(self):
+               data = self["bookmarklist"].getCurrent()[1]
+               if self.isCategoryItem():
+                       self.mSession.openWithCallback(self.cbEditWindow, BookmarkEditWindow, _('Edit'), BookmarkEditWindow.CATEGORY, data, self.mBookmarkManager)
+               else:   self.mSession.openWithCallback(self.cbEditWindow, BookmarkEditWindow, _('Edit'), BookmarkEditWindow.BOOKMARK, data, self.mBookmarkManager)
+
+       def keyBlue(self):
+               def cbBlue(ret=None):
+                       if not ret: return
+                       data = self["bookmarklist"].getCurrent()[1]
+                       if self.isCategoryItem():
+                               self.mBookmarkManager.deleteCategory(data.mId)
+                       else:   self.mBookmarkManager.deleteBookmark(data.mId)
+                       self.updateBookmarkList()
+               if self.isCategoryItem():
+                       msg = _("Do you want to delete the category and the bookmarks?")
+               else:   msg = _("Do you want to delete the bookmark?")
+               self.mSession.openWithCallback(cbBlue, MessageBox, msg, MessageBox.TYPE_YESNO, default=True)
+
+       def keyOK(self):
+               if self.isCategoryItem(): return
+
+               data = self["bookmarklist"].getCurrent()[1]
+               url = data.mUrl.strip()
+               if len(url) == 0:
+                       self.session.open(MessageBox, _("Can't open selected bookmark.\n   - URL data is empty!!"), type = MessageBox.TYPE_INFO)
+                       return
+               mode = data.mType
+               if mode:
+                       lang = language.getLanguage()
+                       if os.path.exists(vbcfg.MANUALROOT + '/' + lang):
+                               url = vbcfg.MANUALROOT + '/' + lang + '/main.html'
+               self.close((url, mode))
+
+       def keyRed(self):
+               self.keyCancel()
+
+       def keyCancel(self):
+               self.close()
+
+class BrowserHelpWindow(Screen, HelpableScreen):
+       MODE_GLOBAL,MODE_KEYBOARD,MODE_MOUSE = 1,2,3
+       skin = """
+               <screen name="BrowserHelpWindow" position="center,center" size="600,40" title="Browser Help" >
+                       <ePixmap pixmap="skin_default/buttons/red.png" position="5,0" size="140,40" alphatest="on" />
+                       <ePixmap pixmap="skin_default/buttons/green.png" position="155,0" size="140,40" alphatest="on" />
+                       <ePixmap pixmap="skin_default/buttons/yellow.png" position="305,0" size="140,40" alphatest="on" />
+                       <ePixmap pixmap="skin_default/buttons/blue.png" position="450,0" size="140,40" alphatest="on" />
+
+                       <widget source="key_red" render="Label" position="5,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#9f1313" foregroundColor="#ffffff" transparent="1" />
+                       <widget source="key_green" render="Label" position="155,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#1f771f" foregroundColor="#ffffff" transparent="1" />
+                       <widget source="key_yellow" render="Label" position="305,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#a08500" foregroundColor="#ffffff" transparent="1" />
+                       <widget source="key_blue" render="Label" position="450,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#18188b" foregroundColor="#ffffff" transparent="1" />
+               </screen>
+               """
+       def __init__(self, session):
+               Screen.__init__(self, session)
+               HelpableScreen.__init__(self)
+
+               self["key_red"]    = StaticText(_("Exit"))
+               self["key_green"]  = StaticText(_("Global"))
+               self["key_yellow"] = StaticText(_("Mouse"))
+               self["key_blue"]   = StaticText(_("Keyboard"))
+
+               self["actions"] = ActionMap(["DirectionActions", "OkCancelActions","ColorActions"], {
+                               "ok"    : self.keyRed,
+                               "cancel": self.keyRed,
+                               "red"   : self.keyRed,
+                               "green" : self.keyGreen,
+                               "yellow": self.keyYellow,
+                               "blue"  : self.keyBlue,
+                       },-2)
+
+               self.showHelpTimer = eTimer()
+               self.showHelpTimer.callback.append(self.cbShowHelpTimerClosed)
+               self.showHelpTimer.start(500)
+
+               self.onLayoutFinish.append(self.layoutFinished)
+
+       def layoutFinished(self):
+               self.setTitle(_('Browser Help'))
+
+       def cbShowHelpTimerClosed(self):
+               self.showHelpTimer.stop()
+               self.setHelpModeActions(self.MODE_GLOBAL)
+
+       def setHelpModeActions(self, _mode=0):
+               self.helpList = []
+               if _mode == self.MODE_GLOBAL:
+                       self["OkCancelActions"] = HelpableActionMap(self, "OkCancelActions", {
+                               "cancel" : (self.keyPass, _("Exit the Browser.")),
+                       })
+                       self["MenuActions"] = HelpableActionMap(self, "MenuActions", {
+                               "menu" : (self.keyPass, _("Show the Menu window.")),
+                       })
+                       self["ColorActions"] = HelpableActionMap(self, "ColorActions", {
+                               "green"  : (self.keyPass, _("Enter Key")),
+                               "yellow" : (self.keyPass, _("Show the Virtual keyboard window.")),
+                               "blue"   : (self.keyPass, _("Backspace Key")),
+                       })
+                       self["EPGSelectActions"] = HelpableActionMap(self, "EPGSelectActions", {
+                               "info" : (self.keyPass, _("Switch to keyboard/mouse mode.")),
+                       })
+
+               elif _mode == self.MODE_MOUSE:
+                       self["DirectionActions"] = HelpableActionMap(self, "DirectionActions", {
+                               "up"    : (self.keyPass, _("It will move the mouse pointer up.")),
+                               "down"  : (self.keyPass, _("It will move the mouse pointer down.")),
+                               "left"  : (self.keyPass, _("It will move the mouse pointer left.")),
+                               "right" : (self.keyPass, _("It will move the mouse pointer right.")),
+                       })
+                       self["OkCancelActions"] = HelpableActionMap(self, "OkCancelActions", {
+                               "ok" : (self.keyPass, _("Left Mouse Button")),
+                       })
+                       self["EPGSelectActions"] = HelpableActionMap(self, "EPGSelectActions", {
+                               "nextBouquet" : (self.keyPass, _("Right Mouse Button")),
+                               "nextService" : (self.keyPass, _("Left Key")),
+                               "prevService" : (self.keyPass, _("Right Key")),
+                       })
+               elif _mode == self.MODE_KEYBOARD:
+                       self["DirectionActions"] = HelpableActionMap(self, "DirectionActions", {
+                               "up"    : (self.keyPass, _("Up Key")),
+                               "down"  : (self.keyPass, _("Down Key")),
+                               "left"  : (self.keyPass, _("Left Key")),
+                               "right" : (self.keyPass, _("Right Key")),
+                       })
+                       self["OkCancelActions"] = HelpableActionMap(self, "OkCancelActions", {
+                               "ok" : (self.keyPass, _("Enter Key")),
+                       })
+                       self["EPGSelectActions"] = HelpableActionMap(self, "EPGSelectActions", {
+                               "nextBouquet" : (self.keyPass, _("PageUp Key")),
+                               "prevBouquet" : (self.keyPass, _("PageDown Key")),
+                               "nextService" : (self.keyPass, _("Go to previous page.")),
+                               "prevService" : (self.keyPass, _("Go to next page.")),
+                       })
+
+               if _mode > 0:
+                       self.showHelp()
+
+       def keyPass(self):
+               pass
+
+       def keyRed(self):
+               self.close()
+
+       def keyGreen(self):
+               self.setHelpModeActions(self.MODE_GLOBAL)
+
+       def keyYellow(self):
+               self.setHelpModeActions(self.MODE_MOUSE)
+
+       def keyBlue(self):
+               self.setHelpModeActions(self.MODE_KEYBOARD)
+
+class Browser(Screen):
+       MENU_ITEM_WIDTH  = 150
+       MENU_ITEM_HEIGHT = 30
+       MENULIST_WIDTH   = 200
+       MENULIST_HEIGHT  = 25
+
+       # menulist->position->y : MENU_ITEM_HEIGHT+30
+       # menulist->size->x     : MENULIST_WIDTH
+
+       size = getDesktop(0).size()
+       WIDTH  = int(size.width())
+       HEIGHT = int(size.height())
+       skin =  """
+               <screen name="OperaBrowser" position="0,0" size="%(width)d,%(height)d" backgroundColor="transparent" flags="wfNoBorder" title="Opera Browser">
+                       <widget name="topArea" zPosition="-1" position="0,0" size="1280,60" font="Regular;20" valign="center" halign="center" backgroundColor="#000000" />
+                       <widget name="menuitemFile" position="30,20" size="150,30" font="Regular;20" valign="center" halign="center" backgroundColor="#000000" foregroundColors="#9f1313,#a08500" />
+                       <widget name="menuitemTool" position="180,20" size="150,30" font="Regular;20" valign="center" halign="center" backgroundColor="#000000" foregroundColors="#9f1313,#a08500" />
+                       <widget name="menuitemHelp" position="330,20" size="150,30" font="Regular;20" valign="center" halign="center" backgroundColor="#000000" foregroundColors="#9f1313,#a08500" />
+                       <widget name="menulist" position="50,60" size="200,150" backgroundColor="#000000" zPosition="10" scrollbarMode="showOnDemand" />
+                       <widget name="submenulist" position="252,60" size="200,150" backgroundColor="#000000" zPosition="10" scrollbarMode="showOnDemand" />
+                       <widget name="bottomArea" position="0,%(bottom_pos_y)d" size="%(bottom_size_x)d,80" font="Regular;20" valign="center" halign="center" backgroundColor="#000000" />
+               </screen>
+               """ % { 'width'  :WIDTH,
+                       'height' :HEIGHT,
+                       'bottom_pos_y'  :HEIGHT-80,
+                       'bottom_size_x' :WIDTH }
+
+       MENULIST_ITEMS = []
+       COMMAND_MAP = {}
+       def __init__(self, session, url=None, is_webapp=False):
+               Screen.__init__(self, session)
+               self["actions"] = ActionMap(["DirectionActions", "MenuActions", "OkCancelActions"], {
+                        "cancel"      : self.keyCancel
+                       ,"ok"          : self.keyOK
+                       ,"left"        : self.keyLeft
+                       ,"right"       : self.keyRight
+                       ,"up"          : self.keyUp
+                       ,"down"        : self.keyDown
+                       ,"menu"        : self.keyMenu
+               }, -2)
+
+               self._cb_update_language()
+
+               self.idx_menu = 0
+               self.is_browser_opened = False
+               self.is_show_top = True
+               self.is_show_menu = False
+
+               self._current_url = None
+               self._current_title = None
+
+               self["topArea"]    = Label()
+               self["bottomArea"] = Label()
+
+               self["menuitemFile"] = MultiColorLabel()
+               self["menuitemTool"] = MultiColorLabel()
+               self["menuitemHelp"] = MultiColorLabel()
+
+               self.top_menus = [self["menuitemFile"], self["menuitemTool"], self["menuitemHelp"]]
+
+               self["menulist"] = MenuList(self.get_menulist_items(self.idx_menu))
+               self["submenulist"] = MenuList(None)
+
+               self.onLayoutFinish.append(self.layoutFinished)
+
+               self._close_timer = eTimer()
+               self._close_timer.callback.append(self._cb_stop_browser)
+
+               self.m_url = url
+               self.m_webapp = is_webapp
+               language.addCallback(self._cb_update_language)
+
+       def layoutFinished(self):
+               self["menuitemFile"].setText(_("File"))
+               self["menuitemTool"].setText(_("Tools"))
+               self["menuitemHelp"].setText(_("Help"))
+
+               self["menulist"].hide()
+               self["submenulist"].hide()
+
+               self["bottomArea"].setText(_("Opera Web Browser Plugin v2.0"))
+               self.setTitle(_("BrowserMain"))
+               self.set_menu_item()
+               vbcfg.LOG("Starting Browser")
+
+               if self.m_url is not None:
+                       self.keyMenu()
+                       if self.m_webapp:
+                               self._cb_start_browser(self.m_url, 1, 'YOUTUBETV_OPENURL')
+                       else:
+                               self._cb_start_browser(self.m_url, 1)
+
+       def _cb_update_language(self):
+               self.MENULIST_ITEMS = [
+                       [(_('Open Startpage'), None), (_('Open URL'), None), (_('Start/Stop'),None), (_('Exit'), None)],
+                       [(_('Bookmark'), None), (_('Preference'), None), (_('Position Setup'), None)],
+                       [(_('About'), None), (_('Help'), None)]
+               ]
+               self.COMMAND_MAP = {}
+               self.COMMAND_MAP[_('Open Startpage')] = self._cmd_OpenStartpage
+               self.COMMAND_MAP[_('Open URL')] = self._cmd_OpenURL
+               self.COMMAND_MAP[_('Start/Stop')] = self._cmd_StartStop
+               self.COMMAND_MAP[_('Exit')] = self._cmd_Exit
+               self.COMMAND_MAP[_('Bookmark')] = self._cmd_Bookmark
+               self.COMMAND_MAP[_('Preference')] = self._cmd_Preference
+               self.COMMAND_MAP[_('Position Setup')] = self._cmd_Position
+               self.COMMAND_MAP[_('About')] = self._cmd_About
+               self.COMMAND_MAP[_('Help')] = self._cmd_Help
+               self.COMMAND_MAP[_('Return')] = self._cmd_Return
+
+       def _cb_set_title(self, title=None):
+               vbcfg.LOG("page title: %s" % title)
+               if title is None:
+                       return
+               self.setTitle(title)
+
+       def _cb_close_window(self):
+               self._close_timer.start(1000)
+
+       def _cb_start_browser(self, data=None, mode=0, opcode='BROWSER_OPENURL'):
+               if not vbcfg.g_main.check_browser():
+                       if self.m_url is not None:
+                               if vbcfg.g_service:
+                                       self.session.nav.playService(vbcfg.g_service)
+                       return
+               vbcfg.LOG("open url: %s %d" % (data, mode))
+               if strIsEmpty(data):
+                       return
+
+               try:
+                       if self._cb_set_title not in vbcfg.g_main.vbhandler.onSetTitleCB:
+                               vbcfg.g_main.vbhandler.onSetTitleCB.append(self._cb_set_title)
+               except Exception:
+                       pass
+
+               try:
+                       if self._cb_close_window not in vbcfg.g_main.vbhandler.onCloseCB:
+                               vbcfg.g_main.vbhandler.onCloseCB.append(self._cb_close_window)
+               except Exception:
+                       pass
+
+               vbcfg.g_position = vbcfg.getPosition()
+               fbClass.getInstance().lock()
+               eRCInput.getInstance().lock()
+
+               self.toggle_top()
+               ret = VBController.command(opcode, data)
+               self._current_url = data
+               if ret:
+                       self.is_browser_opened = True
+               else:
+                       self.is_browser_opened = False
+                       vbcfg.ERR("Failed to open url: %s" % data)
+
+               vbcfg.g_main.vbhandler.soft_volume = -1
+
+       def _cb_stop_browser(self):
+               self._close_timer.stop()
+
+               try:
+                       if self._cb_set_title in vbcfg.g_main.vbhandler.onSetTitleCB:
+                               vbcfg.g_main.vbhandler.onSetTitleCB.remove(self._cb_set_title)
+               except Exception:
+                       pass
+
+               try:
+                       if self._cb_close_window in vbcfg.g_main.vbhandler.onCloseCB:
+                               vbcfg.g_main.vbhandler.onCloseCB.remove(self._cb_close_window)
+               except Exception:
+                       pass
+
+               self.toggle_top()
+
+               from enigma import getDesktop, gMainDC
+               desktop_size = getDesktop(0).size()
+               gMainDC.getInstance().setResolution(desktop_size.width(), desktop_size.height())
+               vbcfg.setPosition(vbcfg.g_position)
+
+               fbClass.getInstance().unlock()
+               eRCInput.getInstance().unlock()
+               self.is_browser_opened = False
+
+               vbcfg.LOG("Stop Browser")
+               self.setTitle(_("BrowserMain"))
+               if self.m_url is not None:
+                       self.keyCancel()
+                       if vbcfg.g_service:
+                               self.session.nav.playService(vbcfg.g_service)
+               else:
+                       self.keyRight()
+                       self.keyLeft()
+
+       def _cb_update_bookmark(self, data=None):
+               if data is None:
+                       return
+               if not vbcfg.g_main.check_browser():
+                       message = _("Opera Browser was not running.\nPlease running browser using [File]>[Start/Stop] menu.")
+                       self.session.open(MessageBox, message, MessageBox.TYPE_INFO)
+                       return
+               (url, mode) = data
+               self._cb_start_browser(url, mode)
+
+       def _cmd_OpenStartpage(self):
+               if not vbcfg.g_main.check_browser():
+                       message = _("Opera Browser was not running.\nPlease running browser using [File]>[Start/Stop] menu.")
+                       self.session.open(MessageBox, message, MessageBox.TYPE_INFO)
+                       return
+               mode = 0
+               #startpage = 'http://vuplus.com'
+               try:
+                       d = BrowserSetting().getData()
+                       start = d['start']
+                       mode = d['type']
+               except:
+                       pass
+               self._cb_start_browser(start, mode)
+
+       def _cmd_OpenURL(self):
+               if not vbcfg.g_main.check_browser():
+                       message = _("Opera Browser was not running.\nPlease running browser using [File]>[Start/Stop] menu.")
+                       self.session.open(MessageBox, message, MessageBox.TYPE_INFO)
+                       return
+               self.session.openWithCallback(self._cb_start_browser, VirtualKeyBoard, title=(_("Please enter URL here")), text='http://')
+
+       def _cmd_StartStop(self):
+               if vbcfg.g_main is None:
+                       return
+               vbcfg.g_main.menu_toggle_browser(self.keyMenu())
+
+       def _cmd_Exit(self):
+               self.close()
+
+       def _cmd_Bookmark(self):
+               url = self._current_url
+               if url is None:
+                       url = ''
+               title = self._current_title
+               if title is None:
+                       title = ''
+               self.session.openWithCallback(self._cb_update_bookmark, BrowserBookmarkWindow, url, title)
+
+       def _cmd_Preference(self):
+               url = self._current_url
+               if url is None:
+                       url = ''
+               self.session.open(BrowserPreferenceWindow, url)
+
+       def _cmd_Position(self):
+               self.session.open(BrowserPositionWindow)
+
+       def _cmd_About(self):
+               self.session.open(MessageBox, _('Opera Web Browser Plugin v2.0'), type = MessageBox.TYPE_INFO)
+
+       def _cmd_Help(self):
+               self.session.open(BrowserHelpWindow)
+
+       def _cmd_Return(self):
+               self.keyCancel()
+
+       def do_command(self, command):
+               try:
+                       self.COMMAND_MAP[command]()
+               except Exception, ErrMsg:
+                       vbcfg.ERR(ErrMsg)
+
+       def get_menulist_items(self, idx=0):
+               l = self.MENULIST_ITEMS[idx]
+               if self.is_browser_opened and idx == 0:
+                       l = [(_("Return"), None)]
+               return l
+
+       def set_menu_item(self):
+               self["menuitemFile"].setForegroundColorNum(0)
+               self["menuitemTool"].setForegroundColorNum(0)
+               self["menuitemHelp"].setForegroundColorNum(0)
+               self.top_menus[self.idx_menu].setForegroundColorNum(1)
+
+       def toggle_top(self):
+               if self.is_show_top:
+                       self.hide()
+               else:
+                       self.show()
+               self.is_show_top = not self.is_show_top
+
+       def toggle_menulist(self):
+               if self.is_show_menu:
+                       self["menulist"].hide()
+               else:
+                       self["menulist"].show()
+               self.is_show_menu = not self.is_show_menu
+
+       def toggle_browser(self, url=None, title=None):
+               self._current_url = url
+               if title is None:
+                       idx = len(url)
+                       if idx > 10:
+                               idx = 10
+                       title = url[:idx]
+               self._current_title = title
+               if self._current_url:
+                       vbcfg.DEBUG(self._current_url)
+
+               self.toggle_top()
+
+               self["menulist"].pageUp()
+               self.keyUp()
+               self.keyDown()
+
+       def keyCancel(self):
+               if self.is_browser_opened:
+                       fbClass.getInstance().lock()
+                       eRCInput.getInstance().lock()
+                       self.toggle_top()
+
+                       VBController.command("BROWSER_MENU_CLOSE")
+                       return
+               self._cmd_Exit()
+
+       def keyOK(self):
+               if not self.is_show_top:
+                       self.keyMenu()
+                       return
+               if not self.is_show_menu:
+                       self.keyDown()
+                       return
+               if self["menulist"].getCurrent()[1] is None:
+                       self.do_command(self["menulist"].getCurrent()[0])
+                       return
+               self.keyRight()
+
+       def keyLeft(self):
+               if self.idx_menu == 0:
+                       self.idx_menu = 2
+               else:
+                       self.idx_menu = self.idx_menu - 1
+
+               if self.is_show_menu:
+                       self["menulist"].pageUp()
+                       self.keyUp()
+                       self.keyDown()
+               self.set_menu_item()
+
+       def keyRight(self):
+               if self.idx_menu == 2:
+                       self.idx_menu = 0
+               else:
+                       self.idx_menu = self.idx_menu + 1
+
+               if self.is_show_menu:
+                       self["menulist"].pageUp()
+                       self.keyUp()
+                       self.keyDown()
+               self.set_menu_item()
+
+       def keyUp(self):
+               if self.is_show_menu and self["menulist"].getSelectedIndex() == 0:
+                       self.toggle_menulist()
+                       return
+               self["menulist"].up()
+
+       def keyDown(self):
+               if not self.is_show_menu:
+                       self["menulist"].setList(self.get_menulist_items(self.idx_menu))
+                       self["menulist"].resize(self.MENULIST_WIDTH, self.MENULIST_HEIGHT*len(self.get_menulist_items(self.idx_menu))+5)
+                       self["menulist"].move(self.MENU_ITEM_WIDTH*self.idx_menu+50,self.MENU_ITEM_HEIGHT+30)
+                       self.toggle_menulist()
+                       return
+               self["menulist"].down()
+
+       def keyMenu(self):
+               self.toggle_top()
diff --git a/lib/python/Plugins/Extensions/HbbTV/hbbtv.py b/lib/python/Plugins/Extensions/HbbTV/hbbtv.py
new file mode 100644 (file)
index 0000000..0e9d96a
--- /dev/null
@@ -0,0 +1,94 @@
+from Screens.Screen import Screen
+
+from enigma import eTimer, fbClass, eRCInput
+
+import struct, vbcfg
+
+from __init__ import _
+from vbipc import VBController
+
+class HbbTVWindow(Screen):
+       skin = """
+               <screen name="HbbTVWindow" position="0,0" size="1280,720" backgroundColor="transparent" flags="wfNoBorder" title="HbbTV Plugin">
+               </screen>
+               """
+       def __init__(self, session, url=None, app_info=None):
+               fbClass.getInstance().lock()
+               eRCInput.getInstance().lock()
+
+               Screen.__init__(self, session)
+
+               self._url = url
+               self._info = app_info
+
+               self.onLayoutFinish.append(self.start_hbbtv_application)
+
+               self._close_timer = eTimer()
+               self._close_timer.callback.append(self.stop_hbbtv_application)
+
+               try:
+                       if self._cb_set_title not in vbcfg.g_main.vbhandler.onSetTitleCB:
+                               vbcfg.g_main.vbhandler.onSetTitleCB.append(self._cb_set_title)
+               except Exception:
+                       pass
+
+               try:
+                       if self._cb_close_window not in vbcfg.g_main.vbhandler.onCloseCB:
+                               vbcfg.g_main.vbhandler.onCloseCB.append(self._cb_close_window)
+               except Exception:
+                       pass
+
+       def _cb_set_title(self, title=None):
+               vbcfg.LOG("pate title: %s" % title)
+               if title is None:
+                       return
+               self.setTitle(title)
+
+       def _cb_close_window(self):
+               self._close_timer.start(1000)
+
+       def start_hbbtv_application(self):
+               vbcfg.g_main.vbhandler.soft_volume = -1
+               self.setTitle(_('HbbTV Plugin'))
+               vbcfg.LOG("Starting HbbTV")
+
+               vbcfg.DEBUG("url : %s" % self._url and self._url)
+               vbcfg.DEBUG("info: %s" % self._info and self._info["url"])
+
+               if self._info and self._info["control"] == 1 and vbcfg.g_channel_info is not None:
+                       (sid, onid, tsid, name) = vbcfg.g_channel_info
+                       params = struct.pack('iiiiii', 0, self._info["orgid"], sid, onid, tsid, 0)
+                       ret = VBController.command('HBBTV_LOADAIT', params)
+               else:
+                       ret = VBController.command('HBBTV_OPENURL', self._url)
+
+               if ret is False:
+                       self._close_timer.start(1000)
+                       vbcfg.ERR("Failed to start hbbtv")
+
+       def stop_hbbtv_application(self):
+               self._close_timer.stop()
+               self._close_timer = None
+
+               try:
+                       if self._cb_set_title in vbcfg.g_main.vbhandler.onSetTitleCB:
+                               vbcfg.g_main.vbhandler.onSetTitleCB.remove(self._cb_set_title)
+               except Exception:
+                       pass
+
+               try:
+                       if self._cb_close_window in vbcfg.g_main.vbhandler.onCloseCB:
+                               vbcfg.g_main.vbhandler.onCloseCB.remove(self._cb_close_window)
+               except Exception:
+                       pass
+
+               from enigma import getDesktop, gMainDC
+               desktop_size = getDesktop(0).size()
+               gMainDC.getInstance().setResolution(desktop_size.width(), desktop_size.height())
+
+               fbClass.getInstance().unlock()
+               eRCInput.getInstance().unlock()
+
+               vbcfg.LOG("Stop HbbTV")
+               self.close()
+
index 8aebac2..2dfcc50 100644 (file)
@@ -5,7 +5,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2012-11-20 18:20+KST\n"
+"POT-Creation-Date: 2014-07-14 18:04+KST\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -15,333 +15,445 @@ msgstr ""
 "Generated-By: pygettext.py 1.5\n"
 
 
 "Generated-By: pygettext.py 1.5\n"
 
 
-#: plugin.py:856
-msgid "HbbTV Plugin"
-msgstr ""
-
-#: plugin.py:969
-msgid ""
-"HbbTV Browser was not running.\n"
-"Please running browser before start HbbTV Application."
+#: browser.py:152 browser.py:266 browser.py:405 youtube.py:134
+msgid "Cancel"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1041
-msgid "No detected HbbTV applications."
+#: browser.py:153 browser.py:267 browser.py:406 youtube.py:135
+msgid "Save"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1042
-msgid "Please choose an HbbTV application."
+#: browser.py:154
+msgid " "
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1053
-msgid "Stop"
+#: browser.py:174
+msgid "left"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1054
-msgid "Start"
+#: browser.py:175
+msgid "width"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1055
-msgid "Please choose one."
+#: browser.py:176
+msgid "top"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1165 plugin.py:1280
-msgid "Cancel"
+#: browser.py:177
+msgid "height"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1166 plugin.py:1281
-msgid "Save"
+#: browser.py:229
+msgid "Really close without saving settings?"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1178 plugin.py:1693 plugin.py:1922
+#: browser.py:279 browser.py:910 browser.py:919
 msgid "Preference"
 msgstr ""
 
 msgid "Preference"
 msgstr ""
 
-#: plugin.py:1197
+#: browser.py:292
 msgid ""
 "Invalid URL!!(Empty)\n"
 "Please, Input to the URL."
 msgstr ""
 
 msgid ""
 "Invalid URL!!(Empty)\n"
 "Please, Input to the URL."
 msgstr ""
 
-#: plugin.py:1214 plugin.py:1870
+#: browser.py:313 browser.py:1037
 msgid "Please enter URL here"
 msgstr ""
 
 msgid "Please enter URL here"
 msgstr ""
 
-#: plugin.py:1226
+#: browser.py:335
 msgid "Start Page"
 msgstr ""
 
 msgid "Start Page"
 msgstr ""
 
-#: plugin.py:1228
+#: browser.py:337
 msgid "Current Page"
 msgstr ""
 
 msgid "Current Page"
 msgstr ""
 
-#: plugin.py:1229
+#: browser.py:338
 msgid "Direct Input"
 msgstr ""
 
 msgid "Direct Input"
 msgstr ""
 
-#: plugin.py:1231
+#: browser.py:340
 msgid "Startpage"
 msgstr ""
 
 msgid "Startpage"
 msgstr ""
 
-#: plugin.py:1295 plugin.py:1446 plugin.py:1693 plugin.py:1921
+#: browser.py:355
+msgid "Keyboard Layout"
+msgstr ""
+
+#: browser.py:420 browser.py:575 browser.py:910 browser.py:918
 msgid "Bookmark"
 msgstr ""
 
 msgid "Bookmark"
 msgstr ""
 
-#: plugin.py:1300 plugin.py:1382
+#: browser.py:425 browser.py:511
 msgid "Name"
 msgstr ""
 
 msgid "Name"
 msgstr ""
 
-#: plugin.py:1303 plugin.py:1389
+#: browser.py:428 browser.py:518
 msgid "Title"
 msgstr ""
 
 msgid "Title"
 msgstr ""
 
-#: plugin.py:1305 plugin.py:1390
+#: browser.py:430 browser.py:519
 msgid "Url"
 msgstr ""
 
 msgid "Url"
 msgstr ""
 
-#: plugin.py:1309
+#: browser.py:434
 msgid ""
 "!!(Empty)\n"
 msgid ""
 "!!(Empty)\n"
-"Please, Input to the "
+"Please, Input to the"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1309
+#: browser.py:434
 msgid "Invalid "
 msgstr ""
 
 msgid "Invalid "
 msgstr ""
 
-#: plugin.py:1333 plugin.py:1344 plugin.py:1435 plugin.py:1516 plugin.py:1519
+#: browser.py:458 browser.py:469 browser.py:564 browser.py:652 browser.py:655
 msgid "Add"
 msgstr ""
 
 msgid "Add"
 msgstr ""
 
-#: plugin.py:1336 plugin.py:1340
+#: browser.py:461 browser.py:465
 msgid "Category Name"
 msgstr ""
 
 msgid "Category Name"
 msgstr ""
 
-#: plugin.py:1349 plugin.py:1357
+#: browser.py:474 browser.py:482
 msgid "Bookmark Title"
 msgstr ""
 
 msgid "Bookmark Title"
 msgstr ""
 
-#: plugin.py:1352 plugin.py:1360
+#: browser.py:477 browser.py:485
 msgid "Bookmark URL"
 msgstr ""
 
 msgid "Bookmark URL"
 msgstr ""
 
-#: plugin.py:1434 plugin.py:1581 plugin.py:1692 plugin.py:1916
+#: browser.py:563 browser.py:720 browser.py:909 browser.py:917
 msgid "Exit"
 msgstr ""
 
 msgid "Exit"
 msgstr ""
 
-#: plugin.py:1436 plugin.py:1527 plugin.py:1528
+#: browser.py:565 browser.py:664 browser.py:665
 msgid "Edit"
 msgstr ""
 
 msgid "Edit"
 msgstr ""
 
-#: plugin.py:1437
+#: browser.py:566
 msgid "Delete"
 msgstr ""
 
 msgid "Delete"
 msgstr ""
 
-#: plugin.py:1438
+#: browser.py:567
 msgid "Set as Startpage"
 msgstr ""
 
 msgid "Set as Startpage"
 msgstr ""
 
-#: plugin.py:1485
+#: browser.py:621
 msgid "Invalid URL. Please check again!!"
 msgstr ""
 
 msgid "Invalid URL. Please check again!!"
 msgstr ""
 
-#: plugin.py:1493
+#: browser.py:629
 msgid "Do you want to set selected url to the Startpage?"
 msgstr ""
 
 msgid "Do you want to set selected url to the Startpage?"
 msgstr ""
 
-#: plugin.py:1508
+#: browser.py:644
 msgid "Current page is already exist."
 msgstr ""
 
 msgid "Current page is already exist."
 msgstr ""
 
-#: plugin.py:1521 plugin.py:1522
+#: browser.py:657 browser.py:658
 msgid "Direct Input(Bookmark)"
 msgstr ""
 
 msgid "Direct Input(Bookmark)"
 msgstr ""
 
-#: plugin.py:1521 plugin.py:1522
+#: browser.py:657 browser.py:658
 msgid "Direct Input(Category)"
 msgstr ""
 
 msgid "Direct Input(Category)"
 msgstr ""
 
-#: plugin.py:1522
+#: browser.py:658
 msgid "Currentpage(Bookmark)"
 msgstr ""
 
 msgid "Currentpage(Bookmark)"
 msgstr ""
 
-#: plugin.py:1523
+#: browser.py:659
 msgid "Please choose."
 msgstr ""
 
 msgid "Please choose."
 msgstr ""
 
-#: plugin.py:1538
+#: browser.py:676
 msgid "Do you want to delete the category and the bookmarks?"
 msgstr ""
 
 msgid "Do you want to delete the category and the bookmarks?"
 msgstr ""
 
-#: plugin.py:1539
+#: browser.py:677
 msgid "Do you want to delete the bookmark?"
 msgstr ""
 
 msgid "Do you want to delete the bookmark?"
 msgstr ""
 
-#: plugin.py:1547
+#: browser.py:686
 msgid ""
 "Can't open selected bookmark.\n"
 "   - URL data is empty!!"
 msgstr ""
 
 msgid ""
 "Can't open selected bookmark.\n"
 "   - URL data is empty!!"
 msgstr ""
 
-#: plugin.py:1582
+#: browser.py:721
 msgid "Global"
 msgstr ""
 
 msgid "Global"
 msgstr ""
 
-#: plugin.py:1583
+#: browser.py:722
 msgid "Mouse"
 msgstr ""
 
 msgid "Mouse"
 msgstr ""
 
-#: plugin.py:1584
+#: browser.py:723
 msgid "Keyboard"
 msgstr ""
 
 msgid "Keyboard"
 msgstr ""
 
-#: plugin.py:1602
+#: browser.py:741
 msgid "Browser Help"
 msgstr ""
 
 msgid "Browser Help"
 msgstr ""
 
-#: plugin.py:1612
-msgid "Exit the Opera browser."
+#: browser.py:751
+msgid "Exit the Browser."
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1615
+#: browser.py:754
 msgid "Show the Menu window."
 msgstr ""
 
 msgid "Show the Menu window."
 msgstr ""
 
-#: plugin.py:1618 plugin.py:1649
+#: browser.py:757 browser.py:788
 msgid "Enter Key"
 msgstr ""
 
 msgid "Enter Key"
 msgstr ""
 
-#: plugin.py:1619
+#: browser.py:758
 msgid "Show the Virtual keyboard window."
 msgstr ""
 
 msgid "Show the Virtual keyboard window."
 msgstr ""
 
-#: plugin.py:1620
+#: browser.py:759
 msgid "Backspace Key"
 msgstr ""
 
 msgid "Backspace Key"
 msgstr ""
 
-#: plugin.py:1623
+#: browser.py:762
 msgid "Switch to keyboard/mouse mode."
 msgstr ""
 
 msgid "Switch to keyboard/mouse mode."
 msgstr ""
 
-#: plugin.py:1628
+#: browser.py:767
 msgid "It will move the mouse pointer up."
 msgstr ""
 
 msgid "It will move the mouse pointer up."
 msgstr ""
 
-#: plugin.py:1629
+#: browser.py:768
 msgid "It will move the mouse pointer down."
 msgstr ""
 
 msgid "It will move the mouse pointer down."
 msgstr ""
 
-#: plugin.py:1630
+#: browser.py:769
 msgid "It will move the mouse pointer left."
 msgstr ""
 
 msgid "It will move the mouse pointer left."
 msgstr ""
 
-#: plugin.py:1631
+#: browser.py:770
 msgid "It will move the mouse pointer right."
 msgstr ""
 
 msgid "It will move the mouse pointer right."
 msgstr ""
 
-#: plugin.py:1634
+#: browser.py:773
 msgid "Left Mouse Button"
 msgstr ""
 
 msgid "Left Mouse Button"
 msgstr ""
 
-#: plugin.py:1637
+#: browser.py:776
 msgid "Right Mouse Button"
 msgstr ""
 
 msgid "Right Mouse Button"
 msgstr ""
 
-#: plugin.py:1638 plugin.py:1645
+#: browser.py:777 browser.py:784
 msgid "Left Key"
 msgstr ""
 
 msgid "Left Key"
 msgstr ""
 
-#: plugin.py:1639 plugin.py:1646
+#: browser.py:778 browser.py:785
 msgid "Right Key"
 msgstr ""
 
 msgid "Right Key"
 msgstr ""
 
-#: plugin.py:1643
+#: browser.py:782
 msgid "Up Key"
 msgstr ""
 
 msgid "Up Key"
 msgstr ""
 
-#: plugin.py:1644
+#: browser.py:783
 msgid "Down Key"
 msgstr ""
 
 msgid "Down Key"
 msgstr ""
 
-#: plugin.py:1652
+#: browser.py:791
 msgid "PageUp Key"
 msgstr ""
 
 msgid "PageUp Key"
 msgstr ""
 
-#: plugin.py:1653
+#: browser.py:792
 msgid "PageDown Key"
 msgstr ""
 
 msgid "PageDown Key"
 msgstr ""
 
-#: plugin.py:1654
+#: browser.py:793
 msgid "Go to previous page."
 msgstr ""
 
 msgid "Go to previous page."
 msgstr ""
 
-#: plugin.py:1655
+#: browser.py:794
 msgid "Go to next page."
 msgstr ""
 
 msgid "Go to next page."
 msgstr ""
 
-#: plugin.py:1692 plugin.py:1919
-msgid "Open URL"
+#: browser.py:888
+msgid "File"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1692 plugin.py:1920
-msgid "Start/Stop"
+#: browser.py:889
+msgid "Tools"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1692 plugin.py:1924
-msgid "Open Startpage"
+#: browser.py:890 browser.py:911 browser.py:922 youtube.py:45
+msgid "Help"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1694 plugin.py:1743 plugin.py:1917
-msgid "Help"
+#: browser.py:895 browser.py:1066
+msgid "Opera Web Browser Plugin v2.0"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1694 plugin.py:1918
-msgid "About"
+#: browser.py:896 browser.py:998
+msgid "BrowserMain"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1741
-msgid "File"
+#: browser.py:909 browser.py:914
+msgid "Open Startpage"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1742
-msgid "Tools"
+#: browser.py:909 browser.py:915
+msgid "Open URL"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1748 plugin.py:1872
-msgid "Opera Web Browser Plugin v1.0"
+#: browser.py:909 browser.py:916
+msgid "Start/Stop"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1749
-msgid "BrowserMain"
+#: browser.py:910 browser.py:920
+msgid "Position Setup"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1768 plugin.py:1923
-msgid "Return"
+#: browser.py:911 browser.py:921
+msgid "About"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1817
-msgid "Opera Browser"
+#: browser.py:923 browser.py:1083
+msgid "Return"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1867 plugin.py:1896
+#: browser.py:1011 browser.py:1019 browser.py:1034
 msgid ""
 "Opera Browser was not running.\n"
 "Please running browser using [File]>[Start/Stop] menu."
 msgstr ""
 
 msgid ""
 "Opera Browser was not running.\n"
 "Please running browser using [File]>[Start/Stop] menu."
 msgstr ""
 
-#: plugin.py:2083
-msgid "HbbTV Applications"
+#: hbbtv.py:52
+msgid "HbbTV Plugin"
+msgstr ""
+
+#: plugin.py:234
+msgid ""
+"HbbTV Browser was not running.\n"
+"Please running browser before start HbbTV Application."
+msgstr ""
+
+#: plugin.py:263
+msgid "Stop"
+msgstr ""
+
+#: plugin.py:265 youtube.py:44
+msgid "Start"
+msgstr ""
+
+#: plugin.py:266
+msgid "Please choose one."
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:2084
+#: plugin.py:289
+msgid "No detected HbbTV applications."
+msgstr ""
+
+#: plugin.py:290
+msgid "Please choose an HbbTV application."
+msgstr ""
+
+#: plugin.py:411 plugin.py:432
+msgid "YouTube TV"
+msgstr ""
+
+#: plugin.py:433 youtube.py:141
+msgid "YouTube TV Settings"
+msgstr ""
+
+#: plugin.py:434
 msgid "Browser Start/Stop"
 msgstr ""
 
 msgid "Browser Start/Stop"
 msgstr ""
 
-#: plugin.py:2085
+#: plugin.py:435
+msgid "HbbTV Applications"
+msgstr ""
+
+#: plugin.py:436
 msgid "Opera Web Browser"
 msgstr ""
 
 msgid "Opera Web Browser"
 msgstr ""
 
-#: plugin.py:2085
+#: plugin.py:436
 msgid "start opera web browser"
 msgstr ""
 
 msgid "start opera web browser"
 msgstr ""
 
+#: youtube.py:54
+msgid "Start YouTube TV"
+msgstr ""
+
+#: youtube.py:55
+msgid "YouTube TV is a new way to watch YouTube videos on Vu+"
+msgstr ""
+
+#: youtube.py:56
+msgid "* Start YouTube TV"
+msgstr ""
+
+#: youtube.py:57
+msgid "* RC Help"
+msgstr ""
+
+#: youtube.py:62
+msgid "Play ther selected the video"
+msgstr ""
+
+#: youtube.py:63
+msgid "Exit the YouTube TV"
+msgstr ""
+
+#: youtube.py:66
+msgid "Move up"
+msgstr ""
+
+#: youtube.py:67
+msgid "Move down"
+msgstr ""
+
+#: youtube.py:68
+msgid "Move left"
+msgstr ""
+
+#: youtube.py:69
+msgid "Move right"
+msgstr ""
+
+#: youtube.py:72
+msgid "Search a video"
+msgstr ""
+
+#: youtube.py:73
+msgid "Skip forward 10 sec"
+msgstr ""
+
+#: youtube.py:74
+msgid "Skip backward 10 sec"
+msgstr ""
+
+#: youtube.py:77
+msgid "Play current video"
+msgstr ""
+
+#: youtube.py:78
+msgid "Pause current video"
+msgstr ""
+
+#: youtube.py:79
+msgid "Stop current video"
+msgstr ""
+
+#: youtube.py:82
+msgid "Back"
+msgstr ""
+
+#: youtube.py:166
+msgid "YouTube TV URL"
+msgstr ""
+
+#: youtube.py:167
+msgid "Do not show YouTube TV Starter again"
+msgstr ""
+
index fc17c88..5a7fd21 100644 (file)
@@ -19,10 +19,10 @@ dist-hook: $(LANGPO)
 install-data-local: $(LANGMO)
        for lang in $(LANGS); do \
                $(mkinstalldirs) $(DESTDIR)$(plugindir)/locale/$$lang/LC_MESSAGES; \
 install-data-local: $(LANGMO)
        for lang in $(LANGS); do \
                $(mkinstalldirs) $(DESTDIR)$(plugindir)/locale/$$lang/LC_MESSAGES; \
-               $(INSTALL_DATA) $$lang.mo $(DESTDIR)$(plugindir)/locale/$$lang/LC_MESSAGES/$$lang.mo; \
+               $(INSTALL_DATA) $$lang.mo $(DESTDIR)$(plugindir)/locale/$$lang/LC_MESSAGES/$(PLUGIN).mo; \
        done
 
 uninstall-local:
        for lang in $(LANGS); do \
        done
 
 uninstall-local:
        for lang in $(LANGS); do \
-               $(RM) $(DESTDIR)$(plugindir)/locale/$$lang/LC_MESSAGES/$$lang.mo; \
+               $(RM) $(DESTDIR)$(plugindir)/locale/$$lang/LC_MESSAGES/$(PLUGIN).mo; \
        done
        done
index 8aebac2..2dfcc50 100644 (file)
@@ -5,7 +5,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2012-11-20 18:20+KST\n"
+"POT-Creation-Date: 2014-07-14 18:04+KST\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -15,333 +15,445 @@ msgstr ""
 "Generated-By: pygettext.py 1.5\n"
 
 
 "Generated-By: pygettext.py 1.5\n"
 
 
-#: plugin.py:856
-msgid "HbbTV Plugin"
-msgstr ""
-
-#: plugin.py:969
-msgid ""
-"HbbTV Browser was not running.\n"
-"Please running browser before start HbbTV Application."
+#: browser.py:152 browser.py:266 browser.py:405 youtube.py:134
+msgid "Cancel"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1041
-msgid "No detected HbbTV applications."
+#: browser.py:153 browser.py:267 browser.py:406 youtube.py:135
+msgid "Save"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1042
-msgid "Please choose an HbbTV application."
+#: browser.py:154
+msgid " "
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1053
-msgid "Stop"
+#: browser.py:174
+msgid "left"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1054
-msgid "Start"
+#: browser.py:175
+msgid "width"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1055
-msgid "Please choose one."
+#: browser.py:176
+msgid "top"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1165 plugin.py:1280
-msgid "Cancel"
+#: browser.py:177
+msgid "height"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1166 plugin.py:1281
-msgid "Save"
+#: browser.py:229
+msgid "Really close without saving settings?"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1178 plugin.py:1693 plugin.py:1922
+#: browser.py:279 browser.py:910 browser.py:919
 msgid "Preference"
 msgstr ""
 
 msgid "Preference"
 msgstr ""
 
-#: plugin.py:1197
+#: browser.py:292
 msgid ""
 "Invalid URL!!(Empty)\n"
 "Please, Input to the URL."
 msgstr ""
 
 msgid ""
 "Invalid URL!!(Empty)\n"
 "Please, Input to the URL."
 msgstr ""
 
-#: plugin.py:1214 plugin.py:1870
+#: browser.py:313 browser.py:1037
 msgid "Please enter URL here"
 msgstr ""
 
 msgid "Please enter URL here"
 msgstr ""
 
-#: plugin.py:1226
+#: browser.py:335
 msgid "Start Page"
 msgstr ""
 
 msgid "Start Page"
 msgstr ""
 
-#: plugin.py:1228
+#: browser.py:337
 msgid "Current Page"
 msgstr ""
 
 msgid "Current Page"
 msgstr ""
 
-#: plugin.py:1229
+#: browser.py:338
 msgid "Direct Input"
 msgstr ""
 
 msgid "Direct Input"
 msgstr ""
 
-#: plugin.py:1231
+#: browser.py:340
 msgid "Startpage"
 msgstr ""
 
 msgid "Startpage"
 msgstr ""
 
-#: plugin.py:1295 plugin.py:1446 plugin.py:1693 plugin.py:1921
+#: browser.py:355
+msgid "Keyboard Layout"
+msgstr ""
+
+#: browser.py:420 browser.py:575 browser.py:910 browser.py:918
 msgid "Bookmark"
 msgstr ""
 
 msgid "Bookmark"
 msgstr ""
 
-#: plugin.py:1300 plugin.py:1382
+#: browser.py:425 browser.py:511
 msgid "Name"
 msgstr ""
 
 msgid "Name"
 msgstr ""
 
-#: plugin.py:1303 plugin.py:1389
+#: browser.py:428 browser.py:518
 msgid "Title"
 msgstr ""
 
 msgid "Title"
 msgstr ""
 
-#: plugin.py:1305 plugin.py:1390
+#: browser.py:430 browser.py:519
 msgid "Url"
 msgstr ""
 
 msgid "Url"
 msgstr ""
 
-#: plugin.py:1309
+#: browser.py:434
 msgid ""
 "!!(Empty)\n"
 msgid ""
 "!!(Empty)\n"
-"Please, Input to the "
+"Please, Input to the"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1309
+#: browser.py:434
 msgid "Invalid "
 msgstr ""
 
 msgid "Invalid "
 msgstr ""
 
-#: plugin.py:1333 plugin.py:1344 plugin.py:1435 plugin.py:1516 plugin.py:1519
+#: browser.py:458 browser.py:469 browser.py:564 browser.py:652 browser.py:655
 msgid "Add"
 msgstr ""
 
 msgid "Add"
 msgstr ""
 
-#: plugin.py:1336 plugin.py:1340
+#: browser.py:461 browser.py:465
 msgid "Category Name"
 msgstr ""
 
 msgid "Category Name"
 msgstr ""
 
-#: plugin.py:1349 plugin.py:1357
+#: browser.py:474 browser.py:482
 msgid "Bookmark Title"
 msgstr ""
 
 msgid "Bookmark Title"
 msgstr ""
 
-#: plugin.py:1352 plugin.py:1360
+#: browser.py:477 browser.py:485
 msgid "Bookmark URL"
 msgstr ""
 
 msgid "Bookmark URL"
 msgstr ""
 
-#: plugin.py:1434 plugin.py:1581 plugin.py:1692 plugin.py:1916
+#: browser.py:563 browser.py:720 browser.py:909 browser.py:917
 msgid "Exit"
 msgstr ""
 
 msgid "Exit"
 msgstr ""
 
-#: plugin.py:1436 plugin.py:1527 plugin.py:1528
+#: browser.py:565 browser.py:664 browser.py:665
 msgid "Edit"
 msgstr ""
 
 msgid "Edit"
 msgstr ""
 
-#: plugin.py:1437
+#: browser.py:566
 msgid "Delete"
 msgstr ""
 
 msgid "Delete"
 msgstr ""
 
-#: plugin.py:1438
+#: browser.py:567
 msgid "Set as Startpage"
 msgstr ""
 
 msgid "Set as Startpage"
 msgstr ""
 
-#: plugin.py:1485
+#: browser.py:621
 msgid "Invalid URL. Please check again!!"
 msgstr ""
 
 msgid "Invalid URL. Please check again!!"
 msgstr ""
 
-#: plugin.py:1493
+#: browser.py:629
 msgid "Do you want to set selected url to the Startpage?"
 msgstr ""
 
 msgid "Do you want to set selected url to the Startpage?"
 msgstr ""
 
-#: plugin.py:1508
+#: browser.py:644
 msgid "Current page is already exist."
 msgstr ""
 
 msgid "Current page is already exist."
 msgstr ""
 
-#: plugin.py:1521 plugin.py:1522
+#: browser.py:657 browser.py:658
 msgid "Direct Input(Bookmark)"
 msgstr ""
 
 msgid "Direct Input(Bookmark)"
 msgstr ""
 
-#: plugin.py:1521 plugin.py:1522
+#: browser.py:657 browser.py:658
 msgid "Direct Input(Category)"
 msgstr ""
 
 msgid "Direct Input(Category)"
 msgstr ""
 
-#: plugin.py:1522
+#: browser.py:658
 msgid "Currentpage(Bookmark)"
 msgstr ""
 
 msgid "Currentpage(Bookmark)"
 msgstr ""
 
-#: plugin.py:1523
+#: browser.py:659
 msgid "Please choose."
 msgstr ""
 
 msgid "Please choose."
 msgstr ""
 
-#: plugin.py:1538
+#: browser.py:676
 msgid "Do you want to delete the category and the bookmarks?"
 msgstr ""
 
 msgid "Do you want to delete the category and the bookmarks?"
 msgstr ""
 
-#: plugin.py:1539
+#: browser.py:677
 msgid "Do you want to delete the bookmark?"
 msgstr ""
 
 msgid "Do you want to delete the bookmark?"
 msgstr ""
 
-#: plugin.py:1547
+#: browser.py:686
 msgid ""
 "Can't open selected bookmark.\n"
 "   - URL data is empty!!"
 msgstr ""
 
 msgid ""
 "Can't open selected bookmark.\n"
 "   - URL data is empty!!"
 msgstr ""
 
-#: plugin.py:1582
+#: browser.py:721
 msgid "Global"
 msgstr ""
 
 msgid "Global"
 msgstr ""
 
-#: plugin.py:1583
+#: browser.py:722
 msgid "Mouse"
 msgstr ""
 
 msgid "Mouse"
 msgstr ""
 
-#: plugin.py:1584
+#: browser.py:723
 msgid "Keyboard"
 msgstr ""
 
 msgid "Keyboard"
 msgstr ""
 
-#: plugin.py:1602
+#: browser.py:741
 msgid "Browser Help"
 msgstr ""
 
 msgid "Browser Help"
 msgstr ""
 
-#: plugin.py:1612
-msgid "Exit the Opera browser."
+#: browser.py:751
+msgid "Exit the Browser."
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1615
+#: browser.py:754
 msgid "Show the Menu window."
 msgstr ""
 
 msgid "Show the Menu window."
 msgstr ""
 
-#: plugin.py:1618 plugin.py:1649
+#: browser.py:757 browser.py:788
 msgid "Enter Key"
 msgstr ""
 
 msgid "Enter Key"
 msgstr ""
 
-#: plugin.py:1619
+#: browser.py:758
 msgid "Show the Virtual keyboard window."
 msgstr ""
 
 msgid "Show the Virtual keyboard window."
 msgstr ""
 
-#: plugin.py:1620
+#: browser.py:759
 msgid "Backspace Key"
 msgstr ""
 
 msgid "Backspace Key"
 msgstr ""
 
-#: plugin.py:1623
+#: browser.py:762
 msgid "Switch to keyboard/mouse mode."
 msgstr ""
 
 msgid "Switch to keyboard/mouse mode."
 msgstr ""
 
-#: plugin.py:1628
+#: browser.py:767
 msgid "It will move the mouse pointer up."
 msgstr ""
 
 msgid "It will move the mouse pointer up."
 msgstr ""
 
-#: plugin.py:1629
+#: browser.py:768
 msgid "It will move the mouse pointer down."
 msgstr ""
 
 msgid "It will move the mouse pointer down."
 msgstr ""
 
-#: plugin.py:1630
+#: browser.py:769
 msgid "It will move the mouse pointer left."
 msgstr ""
 
 msgid "It will move the mouse pointer left."
 msgstr ""
 
-#: plugin.py:1631
+#: browser.py:770
 msgid "It will move the mouse pointer right."
 msgstr ""
 
 msgid "It will move the mouse pointer right."
 msgstr ""
 
-#: plugin.py:1634
+#: browser.py:773
 msgid "Left Mouse Button"
 msgstr ""
 
 msgid "Left Mouse Button"
 msgstr ""
 
-#: plugin.py:1637
+#: browser.py:776
 msgid "Right Mouse Button"
 msgstr ""
 
 msgid "Right Mouse Button"
 msgstr ""
 
-#: plugin.py:1638 plugin.py:1645
+#: browser.py:777 browser.py:784
 msgid "Left Key"
 msgstr ""
 
 msgid "Left Key"
 msgstr ""
 
-#: plugin.py:1639 plugin.py:1646
+#: browser.py:778 browser.py:785
 msgid "Right Key"
 msgstr ""
 
 msgid "Right Key"
 msgstr ""
 
-#: plugin.py:1643
+#: browser.py:782
 msgid "Up Key"
 msgstr ""
 
 msgid "Up Key"
 msgstr ""
 
-#: plugin.py:1644
+#: browser.py:783
 msgid "Down Key"
 msgstr ""
 
 msgid "Down Key"
 msgstr ""
 
-#: plugin.py:1652
+#: browser.py:791
 msgid "PageUp Key"
 msgstr ""
 
 msgid "PageUp Key"
 msgstr ""
 
-#: plugin.py:1653
+#: browser.py:792
 msgid "PageDown Key"
 msgstr ""
 
 msgid "PageDown Key"
 msgstr ""
 
-#: plugin.py:1654
+#: browser.py:793
 msgid "Go to previous page."
 msgstr ""
 
 msgid "Go to previous page."
 msgstr ""
 
-#: plugin.py:1655
+#: browser.py:794
 msgid "Go to next page."
 msgstr ""
 
 msgid "Go to next page."
 msgstr ""
 
-#: plugin.py:1692 plugin.py:1919
-msgid "Open URL"
+#: browser.py:888
+msgid "File"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1692 plugin.py:1920
-msgid "Start/Stop"
+#: browser.py:889
+msgid "Tools"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1692 plugin.py:1924
-msgid "Open Startpage"
+#: browser.py:890 browser.py:911 browser.py:922 youtube.py:45
+msgid "Help"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1694 plugin.py:1743 plugin.py:1917
-msgid "Help"
+#: browser.py:895 browser.py:1066
+msgid "Opera Web Browser Plugin v2.0"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1694 plugin.py:1918
-msgid "About"
+#: browser.py:896 browser.py:998
+msgid "BrowserMain"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1741
-msgid "File"
+#: browser.py:909 browser.py:914
+msgid "Open Startpage"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1742
-msgid "Tools"
+#: browser.py:909 browser.py:915
+msgid "Open URL"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1748 plugin.py:1872
-msgid "Opera Web Browser Plugin v1.0"
+#: browser.py:909 browser.py:916
+msgid "Start/Stop"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1749
-msgid "BrowserMain"
+#: browser.py:910 browser.py:920
+msgid "Position Setup"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1768 plugin.py:1923
-msgid "Return"
+#: browser.py:911 browser.py:921
+msgid "About"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1817
-msgid "Opera Browser"
+#: browser.py:923 browser.py:1083
+msgid "Return"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1867 plugin.py:1896
+#: browser.py:1011 browser.py:1019 browser.py:1034
 msgid ""
 "Opera Browser was not running.\n"
 "Please running browser using [File]>[Start/Stop] menu."
 msgstr ""
 
 msgid ""
 "Opera Browser was not running.\n"
 "Please running browser using [File]>[Start/Stop] menu."
 msgstr ""
 
-#: plugin.py:2083
-msgid "HbbTV Applications"
+#: hbbtv.py:52
+msgid "HbbTV Plugin"
+msgstr ""
+
+#: plugin.py:234
+msgid ""
+"HbbTV Browser was not running.\n"
+"Please running browser before start HbbTV Application."
+msgstr ""
+
+#: plugin.py:263
+msgid "Stop"
+msgstr ""
+
+#: plugin.py:265 youtube.py:44
+msgid "Start"
+msgstr ""
+
+#: plugin.py:266
+msgid "Please choose one."
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:2084
+#: plugin.py:289
+msgid "No detected HbbTV applications."
+msgstr ""
+
+#: plugin.py:290
+msgid "Please choose an HbbTV application."
+msgstr ""
+
+#: plugin.py:411 plugin.py:432
+msgid "YouTube TV"
+msgstr ""
+
+#: plugin.py:433 youtube.py:141
+msgid "YouTube TV Settings"
+msgstr ""
+
+#: plugin.py:434
 msgid "Browser Start/Stop"
 msgstr ""
 
 msgid "Browser Start/Stop"
 msgstr ""
 
-#: plugin.py:2085
+#: plugin.py:435
+msgid "HbbTV Applications"
+msgstr ""
+
+#: plugin.py:436
 msgid "Opera Web Browser"
 msgstr ""
 
 msgid "Opera Web Browser"
 msgstr ""
 
-#: plugin.py:2085
+#: plugin.py:436
 msgid "start opera web browser"
 msgstr ""
 
 msgid "start opera web browser"
 msgstr ""
 
+#: youtube.py:54
+msgid "Start YouTube TV"
+msgstr ""
+
+#: youtube.py:55
+msgid "YouTube TV is a new way to watch YouTube videos on Vu+"
+msgstr ""
+
+#: youtube.py:56
+msgid "* Start YouTube TV"
+msgstr ""
+
+#: youtube.py:57
+msgid "* RC Help"
+msgstr ""
+
+#: youtube.py:62
+msgid "Play ther selected the video"
+msgstr ""
+
+#: youtube.py:63
+msgid "Exit the YouTube TV"
+msgstr ""
+
+#: youtube.py:66
+msgid "Move up"
+msgstr ""
+
+#: youtube.py:67
+msgid "Move down"
+msgstr ""
+
+#: youtube.py:68
+msgid "Move left"
+msgstr ""
+
+#: youtube.py:69
+msgid "Move right"
+msgstr ""
+
+#: youtube.py:72
+msgid "Search a video"
+msgstr ""
+
+#: youtube.py:73
+msgid "Skip forward 10 sec"
+msgstr ""
+
+#: youtube.py:74
+msgid "Skip backward 10 sec"
+msgstr ""
+
+#: youtube.py:77
+msgid "Play current video"
+msgstr ""
+
+#: youtube.py:78
+msgid "Pause current video"
+msgstr ""
+
+#: youtube.py:79
+msgid "Stop current video"
+msgstr ""
+
+#: youtube.py:82
+msgid "Back"
+msgstr ""
+
+#: youtube.py:166
+msgid "YouTube TV URL"
+msgstr ""
+
+#: youtube.py:167
+msgid "Do not show YouTube TV Starter again"
+msgstr ""
+
index 8aebac2..2dfcc50 100644 (file)
@@ -5,7 +5,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2012-11-20 18:20+KST\n"
+"POT-Creation-Date: 2014-07-14 18:04+KST\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -15,333 +15,445 @@ msgstr ""
 "Generated-By: pygettext.py 1.5\n"
 
 
 "Generated-By: pygettext.py 1.5\n"
 
 
-#: plugin.py:856
-msgid "HbbTV Plugin"
-msgstr ""
-
-#: plugin.py:969
-msgid ""
-"HbbTV Browser was not running.\n"
-"Please running browser before start HbbTV Application."
+#: browser.py:152 browser.py:266 browser.py:405 youtube.py:134
+msgid "Cancel"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1041
-msgid "No detected HbbTV applications."
+#: browser.py:153 browser.py:267 browser.py:406 youtube.py:135
+msgid "Save"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1042
-msgid "Please choose an HbbTV application."
+#: browser.py:154
+msgid " "
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1053
-msgid "Stop"
+#: browser.py:174
+msgid "left"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1054
-msgid "Start"
+#: browser.py:175
+msgid "width"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1055
-msgid "Please choose one."
+#: browser.py:176
+msgid "top"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1165 plugin.py:1280
-msgid "Cancel"
+#: browser.py:177
+msgid "height"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1166 plugin.py:1281
-msgid "Save"
+#: browser.py:229
+msgid "Really close without saving settings?"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1178 plugin.py:1693 plugin.py:1922
+#: browser.py:279 browser.py:910 browser.py:919
 msgid "Preference"
 msgstr ""
 
 msgid "Preference"
 msgstr ""
 
-#: plugin.py:1197
+#: browser.py:292
 msgid ""
 "Invalid URL!!(Empty)\n"
 "Please, Input to the URL."
 msgstr ""
 
 msgid ""
 "Invalid URL!!(Empty)\n"
 "Please, Input to the URL."
 msgstr ""
 
-#: plugin.py:1214 plugin.py:1870
+#: browser.py:313 browser.py:1037
 msgid "Please enter URL here"
 msgstr ""
 
 msgid "Please enter URL here"
 msgstr ""
 
-#: plugin.py:1226
+#: browser.py:335
 msgid "Start Page"
 msgstr ""
 
 msgid "Start Page"
 msgstr ""
 
-#: plugin.py:1228
+#: browser.py:337
 msgid "Current Page"
 msgstr ""
 
 msgid "Current Page"
 msgstr ""
 
-#: plugin.py:1229
+#: browser.py:338
 msgid "Direct Input"
 msgstr ""
 
 msgid "Direct Input"
 msgstr ""
 
-#: plugin.py:1231
+#: browser.py:340
 msgid "Startpage"
 msgstr ""
 
 msgid "Startpage"
 msgstr ""
 
-#: plugin.py:1295 plugin.py:1446 plugin.py:1693 plugin.py:1921
+#: browser.py:355
+msgid "Keyboard Layout"
+msgstr ""
+
+#: browser.py:420 browser.py:575 browser.py:910 browser.py:918
 msgid "Bookmark"
 msgstr ""
 
 msgid "Bookmark"
 msgstr ""
 
-#: plugin.py:1300 plugin.py:1382
+#: browser.py:425 browser.py:511
 msgid "Name"
 msgstr ""
 
 msgid "Name"
 msgstr ""
 
-#: plugin.py:1303 plugin.py:1389
+#: browser.py:428 browser.py:518
 msgid "Title"
 msgstr ""
 
 msgid "Title"
 msgstr ""
 
-#: plugin.py:1305 plugin.py:1390
+#: browser.py:430 browser.py:519
 msgid "Url"
 msgstr ""
 
 msgid "Url"
 msgstr ""
 
-#: plugin.py:1309
+#: browser.py:434
 msgid ""
 "!!(Empty)\n"
 msgid ""
 "!!(Empty)\n"
-"Please, Input to the "
+"Please, Input to the"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1309
+#: browser.py:434
 msgid "Invalid "
 msgstr ""
 
 msgid "Invalid "
 msgstr ""
 
-#: plugin.py:1333 plugin.py:1344 plugin.py:1435 plugin.py:1516 plugin.py:1519
+#: browser.py:458 browser.py:469 browser.py:564 browser.py:652 browser.py:655
 msgid "Add"
 msgstr ""
 
 msgid "Add"
 msgstr ""
 
-#: plugin.py:1336 plugin.py:1340
+#: browser.py:461 browser.py:465
 msgid "Category Name"
 msgstr ""
 
 msgid "Category Name"
 msgstr ""
 
-#: plugin.py:1349 plugin.py:1357
+#: browser.py:474 browser.py:482
 msgid "Bookmark Title"
 msgstr ""
 
 msgid "Bookmark Title"
 msgstr ""
 
-#: plugin.py:1352 plugin.py:1360
+#: browser.py:477 browser.py:485
 msgid "Bookmark URL"
 msgstr ""
 
 msgid "Bookmark URL"
 msgstr ""
 
-#: plugin.py:1434 plugin.py:1581 plugin.py:1692 plugin.py:1916
+#: browser.py:563 browser.py:720 browser.py:909 browser.py:917
 msgid "Exit"
 msgstr ""
 
 msgid "Exit"
 msgstr ""
 
-#: plugin.py:1436 plugin.py:1527 plugin.py:1528
+#: browser.py:565 browser.py:664 browser.py:665
 msgid "Edit"
 msgstr ""
 
 msgid "Edit"
 msgstr ""
 
-#: plugin.py:1437
+#: browser.py:566
 msgid "Delete"
 msgstr ""
 
 msgid "Delete"
 msgstr ""
 
-#: plugin.py:1438
+#: browser.py:567
 msgid "Set as Startpage"
 msgstr ""
 
 msgid "Set as Startpage"
 msgstr ""
 
-#: plugin.py:1485
+#: browser.py:621
 msgid "Invalid URL. Please check again!!"
 msgstr ""
 
 msgid "Invalid URL. Please check again!!"
 msgstr ""
 
-#: plugin.py:1493
+#: browser.py:629
 msgid "Do you want to set selected url to the Startpage?"
 msgstr ""
 
 msgid "Do you want to set selected url to the Startpage?"
 msgstr ""
 
-#: plugin.py:1508
+#: browser.py:644
 msgid "Current page is already exist."
 msgstr ""
 
 msgid "Current page is already exist."
 msgstr ""
 
-#: plugin.py:1521 plugin.py:1522
+#: browser.py:657 browser.py:658
 msgid "Direct Input(Bookmark)"
 msgstr ""
 
 msgid "Direct Input(Bookmark)"
 msgstr ""
 
-#: plugin.py:1521 plugin.py:1522
+#: browser.py:657 browser.py:658
 msgid "Direct Input(Category)"
 msgstr ""
 
 msgid "Direct Input(Category)"
 msgstr ""
 
-#: plugin.py:1522
+#: browser.py:658
 msgid "Currentpage(Bookmark)"
 msgstr ""
 
 msgid "Currentpage(Bookmark)"
 msgstr ""
 
-#: plugin.py:1523
+#: browser.py:659
 msgid "Please choose."
 msgstr ""
 
 msgid "Please choose."
 msgstr ""
 
-#: plugin.py:1538
+#: browser.py:676
 msgid "Do you want to delete the category and the bookmarks?"
 msgstr ""
 
 msgid "Do you want to delete the category and the bookmarks?"
 msgstr ""
 
-#: plugin.py:1539
+#: browser.py:677
 msgid "Do you want to delete the bookmark?"
 msgstr ""
 
 msgid "Do you want to delete the bookmark?"
 msgstr ""
 
-#: plugin.py:1547
+#: browser.py:686
 msgid ""
 "Can't open selected bookmark.\n"
 "   - URL data is empty!!"
 msgstr ""
 
 msgid ""
 "Can't open selected bookmark.\n"
 "   - URL data is empty!!"
 msgstr ""
 
-#: plugin.py:1582
+#: browser.py:721
 msgid "Global"
 msgstr ""
 
 msgid "Global"
 msgstr ""
 
-#: plugin.py:1583
+#: browser.py:722
 msgid "Mouse"
 msgstr ""
 
 msgid "Mouse"
 msgstr ""
 
-#: plugin.py:1584
+#: browser.py:723
 msgid "Keyboard"
 msgstr ""
 
 msgid "Keyboard"
 msgstr ""
 
-#: plugin.py:1602
+#: browser.py:741
 msgid "Browser Help"
 msgstr ""
 
 msgid "Browser Help"
 msgstr ""
 
-#: plugin.py:1612
-msgid "Exit the Opera browser."
+#: browser.py:751
+msgid "Exit the Browser."
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1615
+#: browser.py:754
 msgid "Show the Menu window."
 msgstr ""
 
 msgid "Show the Menu window."
 msgstr ""
 
-#: plugin.py:1618 plugin.py:1649
+#: browser.py:757 browser.py:788
 msgid "Enter Key"
 msgstr ""
 
 msgid "Enter Key"
 msgstr ""
 
-#: plugin.py:1619
+#: browser.py:758
 msgid "Show the Virtual keyboard window."
 msgstr ""
 
 msgid "Show the Virtual keyboard window."
 msgstr ""
 
-#: plugin.py:1620
+#: browser.py:759
 msgid "Backspace Key"
 msgstr ""
 
 msgid "Backspace Key"
 msgstr ""
 
-#: plugin.py:1623
+#: browser.py:762
 msgid "Switch to keyboard/mouse mode."
 msgstr ""
 
 msgid "Switch to keyboard/mouse mode."
 msgstr ""
 
-#: plugin.py:1628
+#: browser.py:767
 msgid "It will move the mouse pointer up."
 msgstr ""
 
 msgid "It will move the mouse pointer up."
 msgstr ""
 
-#: plugin.py:1629
+#: browser.py:768
 msgid "It will move the mouse pointer down."
 msgstr ""
 
 msgid "It will move the mouse pointer down."
 msgstr ""
 
-#: plugin.py:1630
+#: browser.py:769
 msgid "It will move the mouse pointer left."
 msgstr ""
 
 msgid "It will move the mouse pointer left."
 msgstr ""
 
-#: plugin.py:1631
+#: browser.py:770
 msgid "It will move the mouse pointer right."
 msgstr ""
 
 msgid "It will move the mouse pointer right."
 msgstr ""
 
-#: plugin.py:1634
+#: browser.py:773
 msgid "Left Mouse Button"
 msgstr ""
 
 msgid "Left Mouse Button"
 msgstr ""
 
-#: plugin.py:1637
+#: browser.py:776
 msgid "Right Mouse Button"
 msgstr ""
 
 msgid "Right Mouse Button"
 msgstr ""
 
-#: plugin.py:1638 plugin.py:1645
+#: browser.py:777 browser.py:784
 msgid "Left Key"
 msgstr ""
 
 msgid "Left Key"
 msgstr ""
 
-#: plugin.py:1639 plugin.py:1646
+#: browser.py:778 browser.py:785
 msgid "Right Key"
 msgstr ""
 
 msgid "Right Key"
 msgstr ""
 
-#: plugin.py:1643
+#: browser.py:782
 msgid "Up Key"
 msgstr ""
 
 msgid "Up Key"
 msgstr ""
 
-#: plugin.py:1644
+#: browser.py:783
 msgid "Down Key"
 msgstr ""
 
 msgid "Down Key"
 msgstr ""
 
-#: plugin.py:1652
+#: browser.py:791
 msgid "PageUp Key"
 msgstr ""
 
 msgid "PageUp Key"
 msgstr ""
 
-#: plugin.py:1653
+#: browser.py:792
 msgid "PageDown Key"
 msgstr ""
 
 msgid "PageDown Key"
 msgstr ""
 
-#: plugin.py:1654
+#: browser.py:793
 msgid "Go to previous page."
 msgstr ""
 
 msgid "Go to previous page."
 msgstr ""
 
-#: plugin.py:1655
+#: browser.py:794
 msgid "Go to next page."
 msgstr ""
 
 msgid "Go to next page."
 msgstr ""
 
-#: plugin.py:1692 plugin.py:1919
-msgid "Open URL"
+#: browser.py:888
+msgid "File"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1692 plugin.py:1920
-msgid "Start/Stop"
+#: browser.py:889
+msgid "Tools"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1692 plugin.py:1924
-msgid "Open Startpage"
+#: browser.py:890 browser.py:911 browser.py:922 youtube.py:45
+msgid "Help"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1694 plugin.py:1743 plugin.py:1917
-msgid "Help"
+#: browser.py:895 browser.py:1066
+msgid "Opera Web Browser Plugin v2.0"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1694 plugin.py:1918
-msgid "About"
+#: browser.py:896 browser.py:998
+msgid "BrowserMain"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1741
-msgid "File"
+#: browser.py:909 browser.py:914
+msgid "Open Startpage"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1742
-msgid "Tools"
+#: browser.py:909 browser.py:915
+msgid "Open URL"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1748 plugin.py:1872
-msgid "Opera Web Browser Plugin v1.0"
+#: browser.py:909 browser.py:916
+msgid "Start/Stop"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1749
-msgid "BrowserMain"
+#: browser.py:910 browser.py:920
+msgid "Position Setup"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1768 plugin.py:1923
-msgid "Return"
+#: browser.py:911 browser.py:921
+msgid "About"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1817
-msgid "Opera Browser"
+#: browser.py:923 browser.py:1083
+msgid "Return"
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:1867 plugin.py:1896
+#: browser.py:1011 browser.py:1019 browser.py:1034
 msgid ""
 "Opera Browser was not running.\n"
 "Please running browser using [File]>[Start/Stop] menu."
 msgstr ""
 
 msgid ""
 "Opera Browser was not running.\n"
 "Please running browser using [File]>[Start/Stop] menu."
 msgstr ""
 
-#: plugin.py:2083
-msgid "HbbTV Applications"
+#: hbbtv.py:52
+msgid "HbbTV Plugin"
+msgstr ""
+
+#: plugin.py:234
+msgid ""
+"HbbTV Browser was not running.\n"
+"Please running browser before start HbbTV Application."
+msgstr ""
+
+#: plugin.py:263
+msgid "Stop"
+msgstr ""
+
+#: plugin.py:265 youtube.py:44
+msgid "Start"
+msgstr ""
+
+#: plugin.py:266
+msgid "Please choose one."
 msgstr ""
 
 msgstr ""
 
-#: plugin.py:2084
+#: plugin.py:289
+msgid "No detected HbbTV applications."
+msgstr ""
+
+#: plugin.py:290
+msgid "Please choose an HbbTV application."
+msgstr ""
+
+#: plugin.py:411 plugin.py:432
+msgid "YouTube TV"
+msgstr ""
+
+#: plugin.py:433 youtube.py:141
+msgid "YouTube TV Settings"
+msgstr ""
+
+#: plugin.py:434
 msgid "Browser Start/Stop"
 msgstr ""
 
 msgid "Browser Start/Stop"
 msgstr ""
 
-#: plugin.py:2085
+#: plugin.py:435
+msgid "HbbTV Applications"
+msgstr ""
+
+#: plugin.py:436
 msgid "Opera Web Browser"
 msgstr ""
 
 msgid "Opera Web Browser"
 msgstr ""
 
-#: plugin.py:2085
+#: plugin.py:436
 msgid "start opera web browser"
 msgstr ""
 
 msgid "start opera web browser"
 msgstr ""
 
+#: youtube.py:54
+msgid "Start YouTube TV"
+msgstr ""
+
+#: youtube.py:55
+msgid "YouTube TV is a new way to watch YouTube videos on Vu+"
+msgstr ""
+
+#: youtube.py:56
+msgid "* Start YouTube TV"
+msgstr ""
+
+#: youtube.py:57
+msgid "* RC Help"
+msgstr ""
+
+#: youtube.py:62
+msgid "Play ther selected the video"
+msgstr ""
+
+#: youtube.py:63
+msgid "Exit the YouTube TV"
+msgstr ""
+
+#: youtube.py:66
+msgid "Move up"
+msgstr ""
+
+#: youtube.py:67
+msgid "Move down"
+msgstr ""
+
+#: youtube.py:68
+msgid "Move left"
+msgstr ""
+
+#: youtube.py:69
+msgid "Move right"
+msgstr ""
+
+#: youtube.py:72
+msgid "Search a video"
+msgstr ""
+
+#: youtube.py:73
+msgid "Skip forward 10 sec"
+msgstr ""
+
+#: youtube.py:74
+msgid "Skip backward 10 sec"
+msgstr ""
+
+#: youtube.py:77
+msgid "Play current video"
+msgstr ""
+
+#: youtube.py:78
+msgid "Pause current video"
+msgstr ""
+
+#: youtube.py:79
+msgid "Stop current video"
+msgstr ""
+
+#: youtube.py:82
+msgid "Back"
+msgstr ""
+
+#: youtube.py:166
+msgid "YouTube TV URL"
+msgstr ""
+
+#: youtube.py:167
+msgid "Do not show YouTube TV Starter again"
+msgstr ""
+
index dcfa9d8..a389211 100644 (file)
@@ -1,3 +1,7 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR ORGANIZATION
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
 msgid ""
 msgstr ""
 "Project-Id-Version: \n"
 msgid ""
 msgstr ""
 "Project-Id-Version: \n"
@@ -15,55 +19,44 @@ msgstr ""
 "X-Poedit-Language: Italian\n"
 "X-Poedit-SearchPath-0: .\n"
 
 "X-Poedit-Language: Italian\n"
 "X-Poedit-SearchPath-0: .\n"
 
-#: plugin.py:864
-msgid "HbbTV Plugin"
-msgstr "Plugin HbbTV"
 
 
-#: plugin.py:977
-msgid ""
-"HbbTV Browser was not running.\n"
-"Please running browser before start HbbTV Application."
-msgstr ""
-"Il Browser per HbbTV non è attivo.\n"
-"Lancia il browser Opera prima di avviare l'applicazione HbbTV."
+#: browser.py:152 browser.py:266 browser.py:405 youtube.py:134
+msgid "Cancel"
+msgstr "Annulla"
 
 
-#: plugin.py:1049
-msgid "No detected HbbTV applications."
-msgstr "Nessuna applicazione HbbTV trovata."
+#: browser.py:153 browser.py:267 browser.py:406 youtube.py:135
+msgid "Save"
+msgstr "Salva"
 
 
-#: plugin.py:1050
-msgid "Please choose an HbbTV application."
-msgstr "Seleziona un'applicazione HbbTV."
+#: browser.py:154
+msgid " "
+msgstr " "
 
 
-#: plugin.py:1061
-msgid "Stop"
-msgstr "Chiudi"
+#: browser.py:174
+msgid "left"
+msgstr ""
 
 
-#: plugin.py:1062
-msgid "Start"
-msgstr "Avvia"
+#: browser.py:175
+msgid "width"
+msgstr ""
 
 
-#: plugin.py:1063
-msgid "Please choose one."
-msgstr "Seleziona"
+#: browser.py:176
+msgid "top"
+msgstr ""
 
 
-#: plugin.py:1179
-#: plugin.py:1317
-msgid "Cancel"
-msgstr "Annulla"
+#: browser.py:177
+msgid "height"
+msgstr ""
 
 
-#: plugin.py:1180
-#: plugin.py:1318
-msgid "Save"
-msgstr "Salva"
+#: browser.py:229
+msgid "Really close without saving settings?"
+msgstr ""
 
 
-#: plugin.py:1192
-#: plugin.py:1730
-#: plugin.py:1968
+#: browser.py:279 browser.py:910 browser.py:919
 msgid "Preference"
 msgstr "Preferenze"
 
 msgid "Preference"
 msgstr "Preferenze"
 
-#: plugin.py:1205
+#: browser.py:292
 msgid ""
 "Invalid URL!!(Empty)\n"
 "Please, Input to the URL."
 msgid ""
 "Invalid URL!!(Empty)\n"
 "Please, Input to the URL."
@@ -71,148 +64,127 @@ msgstr ""
 "Indirizzo non valido!!\n"
 "Devi inserire un indirizzo (URL)."
 
 "Indirizzo non valido!!\n"
 "Devi inserire un indirizzo (URL)."
 
-#: plugin.py:1225
-#: plugin.py:1916
+#: browser.py:313 browser.py:1037
 msgid "Please enter URL here"
 msgstr "Inserisci indirizzo (url)."
 
 msgid "Please enter URL here"
 msgstr "Inserisci indirizzo (url)."
 
-#: plugin.py:1247
+#: browser.py:335
 msgid "Start Page"
 msgstr "Pagina iniziale"
 
 msgid "Start Page"
 msgstr "Pagina iniziale"
 
-#: plugin.py:1249
+#: browser.py:337
 msgid "Current Page"
 msgstr "Pagina corrente"
 
 msgid "Current Page"
 msgstr "Pagina corrente"
 
-#: plugin.py:1250
+#: browser.py:338
 msgid "Direct Input"
 msgstr "Input diretto"
 
 msgid "Direct Input"
 msgstr "Input diretto"
 
-#: plugin.py:1252
+#: browser.py:340
 msgid "Startpage"
 msgstr "Pagina iniziale"
 
 msgid "Startpage"
 msgstr "Pagina iniziale"
 
-#: plugin.py:1267
+#: browser.py:355
 msgid "Keyboard Layout"
 msgstr "Layout tastiera."
 
 msgid "Keyboard Layout"
 msgstr "Layout tastiera."
 
-#: plugin.py:1332
-#: plugin.py:1483
-#: plugin.py:1730
-#: plugin.py:1967
+#: browser.py:420 browser.py:575 browser.py:910 browser.py:918
 msgid "Bookmark"
 msgstr "Preferiti"
 
 msgid "Bookmark"
 msgstr "Preferiti"
 
-#: plugin.py:1337
-#: plugin.py:1419
+#: browser.py:425 browser.py:511
 msgid "Name"
 msgstr "Nome"
 
 msgid "Name"
 msgstr "Nome"
 
-#: plugin.py:1340
-#: plugin.py:1426
+#: browser.py:428 browser.py:518
 msgid "Title"
 msgstr "Titolo"
 
 msgid "Title"
 msgstr "Titolo"
 
-#: plugin.py:1342
-#: plugin.py:1427
+#: browser.py:430 browser.py:519
 msgid "Url"
 msgstr "Url"
 
 msgid "Url"
 msgstr "Url"
 
-#: plugin.py:1346
-msgid "Invalid "
-msgstr "Non valido"
-
-#: plugin.py:1346
+#: browser.py:434
 msgid ""
 "!!(Empty)\n"
 msgid ""
 "!!(Empty)\n"
-"Please, Input to the "
+"Please, Input to the"
 msgstr ""
 "!!(Vuoto)\n"
 msgstr ""
 "!!(Vuoto)\n"
-"Inserisici in "
+"Inserisici in"
+
+#: browser.py:434
+msgid "Invalid "
+msgstr "Non valido"
 
 
-#: plugin.py:1370
-#: plugin.py:1381
-#: plugin.py:1472
-#: plugin.py:1553
-#: plugin.py:1556
+#: browser.py:458 browser.py:469 browser.py:564 browser.py:652 browser.py:655
 msgid "Add"
 msgstr "Aggiungi"
 
 msgid "Add"
 msgstr "Aggiungi"
 
-#: plugin.py:1373
-#: plugin.py:1377
+#: browser.py:461 browser.py:465
 msgid "Category Name"
 msgstr "Nome Categoria"
 
 msgid "Category Name"
 msgstr "Nome Categoria"
 
-#: plugin.py:1386
-#: plugin.py:1394
+#: browser.py:474 browser.py:482
 msgid "Bookmark Title"
 msgstr "Titolo bookmark"
 
 msgid "Bookmark Title"
 msgstr "Titolo bookmark"
 
-#: plugin.py:1389
-#: plugin.py:1397
+#: browser.py:477 browser.py:485
 msgid "Bookmark URL"
 msgstr "Indirizzo Bookmark"
 
 msgid "Bookmark URL"
 msgstr "Indirizzo Bookmark"
 
-#: plugin.py:1471
-#: plugin.py:1618
-#: plugin.py:1729
-#: plugin.py:1962
+#: browser.py:563 browser.py:720 browser.py:909 browser.py:917
 msgid "Exit"
 msgstr "Esci"
 
 msgid "Exit"
 msgstr "Esci"
 
-#: plugin.py:1473
-#: plugin.py:1564
-#: plugin.py:1565
+#: browser.py:565 browser.py:664 browser.py:665
 msgid "Edit"
 msgstr "Modifica"
 
 msgid "Edit"
 msgstr "Modifica"
 
-#: plugin.py:1474
+#: browser.py:566
 msgid "Delete"
 msgstr "Cancella"
 
 msgid "Delete"
 msgstr "Cancella"
 
-#: plugin.py:1475
+#: browser.py:567
 msgid "Set as Startpage"
 msgstr "Configura come Home page"
 
 msgid "Set as Startpage"
 msgstr "Configura come Home page"
 
-#: plugin.py:1522
+#: browser.py:621
 msgid "Invalid URL. Please check again!!"
 msgstr "Indirizzo non valido, riprova."
 
 msgid "Invalid URL. Please check again!!"
 msgstr "Indirizzo non valido, riprova."
 
-#: plugin.py:1530
+#: browser.py:629
 msgid "Do you want to set selected url to the Startpage?"
 msgstr "Vuoi Configurare l'indirizzo selezionato come pagina iniziale?"
 
 msgid "Do you want to set selected url to the Startpage?"
 msgstr "Vuoi Configurare l'indirizzo selezionato come pagina iniziale?"
 
-#: plugin.py:1545
+#: browser.py:644
 msgid "Current page is already exist."
 msgstr "La pagina corrente è già esistente."
 
 msgid "Current page is already exist."
 msgstr "La pagina corrente è già esistente."
 
-#: plugin.py:1558
-#: plugin.py:1559
+#: browser.py:657 browser.py:658
 msgid "Direct Input(Bookmark)"
 msgstr "Inserimento diretto(Bookmark)"
 
 msgid "Direct Input(Bookmark)"
 msgstr "Inserimento diretto(Bookmark)"
 
-#: plugin.py:1558
-#: plugin.py:1559
+#: browser.py:657 browser.py:658
 msgid "Direct Input(Category)"
 msgstr "Inserimento diretto(Categoria)"
 
 msgid "Direct Input(Category)"
 msgstr "Inserimento diretto(Categoria)"
 
-#: plugin.py:1559
+#: browser.py:658
 msgid "Currentpage(Bookmark)"
 msgstr "Pagina corrente(Bookmark)"
 
 msgid "Currentpage(Bookmark)"
 msgstr "Pagina corrente(Bookmark)"
 
-#: plugin.py:1560
+#: browser.py:659
 msgid "Please choose."
 msgstr "Scegli."
 
 msgid "Please choose."
 msgstr "Scegli."
 
-#: plugin.py:1575
+#: browser.py:676
 msgid "Do you want to delete the category and the bookmarks?"
 msgstr "Vuoi davvero cancellare la categoria e i suoi preferiti ?"
 
 msgid "Do you want to delete the category and the bookmarks?"
 msgstr "Vuoi davvero cancellare la categoria e i suoi preferiti ?"
 
-#: plugin.py:1576
+#: browser.py:677
 msgid "Do you want to delete the bookmark?"
 msgstr "Vuoi davvero cancellare il Bookmark ?"
 
 msgid "Do you want to delete the bookmark?"
 msgstr "Vuoi davvero cancellare il Bookmark ?"
 
-#: plugin.py:1584
+#: browser.py:686
 msgid ""
 "Can't open selected bookmark.\n"
 "   - URL data is empty!!"
 msgid ""
 "Can't open selected bookmark.\n"
 "   - URL data is empty!!"
@@ -220,159 +192,147 @@ msgstr ""
 "Impossibile apreire il Bookmark selezionato.\n"
 "   - l'indirizzo URL è mancante!!"
 
 "Impossibile apreire il Bookmark selezionato.\n"
 "   - l'indirizzo URL è mancante!!"
 
-#: plugin.py:1619
+#: browser.py:721
 msgid "Global"
 msgstr "Globale"
 
 msgid "Global"
 msgstr "Globale"
 
-#: plugin.py:1620
+#: browser.py:722
 msgid "Mouse"
 msgstr "Mouse"
 
 msgid "Mouse"
 msgstr "Mouse"
 
-#: plugin.py:1621
+#: browser.py:723
 msgid "Keyboard"
 msgstr "Tastiera"
 
 msgid "Keyboard"
 msgstr "Tastiera"
 
-#: plugin.py:1639
+#: browser.py:741
 msgid "Browser Help"
 msgstr "Aiuto Browser"
 
 msgid "Browser Help"
 msgstr "Aiuto Browser"
 
-#: plugin.py:1649
-msgid "Exit the Opera browser."
-msgstr "Esci da Opera."
+#: browser.py:751
+msgid "Exit the Browser."
+msgstr "Esci da Browser"
 
 
-#: plugin.py:1652
+#: browser.py:754
 msgid "Show the Menu window."
 msgstr "Mostra i Menu."
 
 msgid "Show the Menu window."
 msgstr "Mostra i Menu."
 
-#: plugin.py:1655
-#: plugin.py:1686
+#: browser.py:757 browser.py:788
 msgid "Enter Key"
 msgstr "Tasto Invio"
 
 msgid "Enter Key"
 msgstr "Tasto Invio"
 
-#: plugin.py:1656
+#: browser.py:758
 msgid "Show the Virtual keyboard window."
 msgstr "Mostra la tastiera virtuale."
 
 msgid "Show the Virtual keyboard window."
 msgstr "Mostra la tastiera virtuale."
 
-#: plugin.py:1657
+#: browser.py:759
 msgid "Backspace Key"
 msgstr "Tasto Backsapce"
 
 msgid "Backspace Key"
 msgstr "Tasto Backsapce"
 
-#: plugin.py:1660
+#: browser.py:762
 msgid "Switch to keyboard/mouse mode."
 msgstr "Usa modalità tastiera/mouse."
 
 msgid "Switch to keyboard/mouse mode."
 msgstr "Usa modalità tastiera/mouse."
 
-#: plugin.py:1665
+#: browser.py:767
 msgid "It will move the mouse pointer up."
 msgstr "Muove il puntatore del mouse verso l'alto."
 
 msgid "It will move the mouse pointer up."
 msgstr "Muove il puntatore del mouse verso l'alto."
 
-#: plugin.py:1666
+#: browser.py:768
 msgid "It will move the mouse pointer down."
 msgstr "Muove il puntatore del mouse verso il basso."
 
 msgid "It will move the mouse pointer down."
 msgstr "Muove il puntatore del mouse verso il basso."
 
-#: plugin.py:1667
+#: browser.py:769
 msgid "It will move the mouse pointer left."
 msgstr "Muove il puntatore del mouse a sinistra."
 
 msgid "It will move the mouse pointer left."
 msgstr "Muove il puntatore del mouse a sinistra."
 
-#: plugin.py:1668
+#: browser.py:770
 msgid "It will move the mouse pointer right."
 msgstr "Muove il puntatore del mouse a destra."
 
 msgid "It will move the mouse pointer right."
 msgstr "Muove il puntatore del mouse a destra."
 
-#: plugin.py:1671
+#: browser.py:773
 msgid "Left Mouse Button"
 msgstr "Bottone sinistro mouse"
 
 msgid "Left Mouse Button"
 msgstr "Bottone sinistro mouse"
 
-#: plugin.py:1674
+#: browser.py:776
 msgid "Right Mouse Button"
 msgstr "Bottone destro mouse"
 
 msgid "Right Mouse Button"
 msgstr "Bottone destro mouse"
 
-#: plugin.py:1675
-#: plugin.py:1682
+#: browser.py:777 browser.py:784
 msgid "Left Key"
 msgstr "Tasto freccia sinistra"
 
 msgid "Left Key"
 msgstr "Tasto freccia sinistra"
 
-#: plugin.py:1676
-#: plugin.py:1683
+#: browser.py:778 browser.py:785
 msgid "Right Key"
 msgstr "Tasto freccia destra"
 
 msgid "Right Key"
 msgstr "Tasto freccia destra"
 
-#: plugin.py:1680
+#: browser.py:782
 msgid "Up Key"
 msgstr "Tasto freccia alto"
 
 msgid "Up Key"
 msgstr "Tasto freccia alto"
 
-#: plugin.py:1681
+#: browser.py:783
 msgid "Down Key"
 msgstr "Tasto freccia basso"
 
 msgid "Down Key"
 msgstr "Tasto freccia basso"
 
-#: plugin.py:1689
+#: browser.py:791
 msgid "PageUp Key"
 msgstr "Tasto pagina precedente"
 
 msgid "PageUp Key"
 msgstr "Tasto pagina precedente"
 
-#: plugin.py:1690
+#: browser.py:792
 msgid "PageDown Key"
 msgstr "Tasto pagina successiva"
 
 msgid "PageDown Key"
 msgstr "Tasto pagina successiva"
 
-#: plugin.py:1691
+#: browser.py:793
 msgid "Go to previous page."
 msgstr "Vai alla pagina precedente."
 
 msgid "Go to previous page."
 msgstr "Vai alla pagina precedente."
 
-#: plugin.py:1692
+#: browser.py:794
 msgid "Go to next page."
 msgstr "Vai alla pagina successiva."
 
 msgid "Go to next page."
 msgstr "Vai alla pagina successiva."
 
-#: plugin.py:1729
-#: plugin.py:1970
+#: browser.py:888
+msgid "File"
+msgstr "File"
+
+#: browser.py:889
+msgid "Tools"
+msgstr "Strumenti"
+
+#: browser.py:890 browser.py:911 browser.py:922 youtube.py:45
+msgid "Help"
+msgstr "Aiuto"
+
+#: browser.py:895 browser.py:1066
+msgid "Opera Web Browser Plugin v2.0"
+msgstr "Plugin Opera Web Browser v1.0"
+
+#: browser.py:896 browser.py:998
+msgid "BrowserMain"
+msgstr "Browser"
+
+#: browser.py:909 browser.py:914
 msgid "Open Startpage"
 msgstr "Apri pagina iniziale"
 
 msgid "Open Startpage"
 msgstr "Apri pagina iniziale"
 
-#: plugin.py:1729
-#: plugin.py:1965
+#: browser.py:909 browser.py:915
 msgid "Open URL"
 msgstr "Apri Url"
 
 msgid "Open URL"
 msgstr "Apri Url"
 
-#: plugin.py:1729
-#: plugin.py:1966
+#: browser.py:909 browser.py:916
 msgid "Start/Stop"
 msgstr "Avvia/Chiudi"
 
 msgid "Start/Stop"
 msgstr "Avvia/Chiudi"
 
-#: plugin.py:1731
-#: plugin.py:1964
+#: browser.py:910 browser.py:920
+msgid "Position Setup"
+msgstr ""
+
+#: browser.py:911 browser.py:921
 msgid "About"
 msgstr "Informazioni"
 
 msgid "About"
 msgstr "Informazioni"
 
-#: plugin.py:1731
-#: plugin.py:1782
-#: plugin.py:1963
-msgid "Help"
-msgstr "Aiuto"
-
-#: plugin.py:1780
-msgid "File"
-msgstr "File"
-
-#: plugin.py:1781
-msgid "Tools"
-msgstr "Strumenti"
-
-#: plugin.py:1787
-#: plugin.py:1918
-msgid "Opera Web Browser Plugin v1.0"
-msgstr "Plugin Opera Web Browser v1.0"
-
-#: plugin.py:1788
-msgid "BrowserMain"
-msgstr "Browser"
-
-#: plugin.py:1811
-#: plugin.py:1969
+#: browser.py:923 browser.py:1083
 msgid "Return"
 msgstr "Indietro"
 
 msgid "Return"
 msgstr "Indietro"
 
-#: plugin.py:1860
-msgid "Opera Browser"
-msgstr "Browser Opera"
-
-#: plugin.py:1913
-#: plugin.py:1942
+#: browser.py:1011 browser.py:1019 browser.py:1034
 msgid ""
 "Opera Browser was not running.\n"
 "Please running browser using [File]>[Start/Stop] menu."
 msgid ""
 "Opera Browser was not running.\n"
 "Please running browser using [File]>[Start/Stop] menu."
@@ -380,19 +340,135 @@ msgstr ""
 "Il Browser non è attivo.\n"
 "Lancia il browser dal menu  [File]>[Avvia/Chiudi]."
 
 "Il Browser non è attivo.\n"
 "Lancia il browser dal menu  [File]>[Avvia/Chiudi]."
 
-#: plugin.py:2161
-msgid "HbbTV Applications"
-msgstr "Applicazioni HbbTV"
+#: hbbtv.py:52
+msgid "HbbTV Plugin"
+msgstr "Plugin HbbTV"
+
+#: plugin.py:234
+msgid ""
+"HbbTV Browser was not running.\n"
+"Please running browser before start HbbTV Application."
+msgstr ""
+"Il Browser per HbbTV non è attivo.\n"
+"Lancia il browser Opera prima di avviare l'applicazione HbbTV."
+
+#: plugin.py:263
+msgid "Stop"
+msgstr "Chiudi"
+
+#: plugin.py:265 youtube.py:44
+msgid "Start"
+msgstr "Avvia"
+
+#: plugin.py:266
+msgid "Please choose one."
+msgstr "Seleziona"
 
 
-#: plugin.py:2162
+#: plugin.py:289
+msgid "No detected HbbTV applications."
+msgstr "Nessuna applicazione HbbTV trovata."
+
+#: plugin.py:290
+msgid "Please choose an HbbTV application."
+msgstr "Seleziona un'applicazione HbbTV."
+
+#: plugin.py:411 plugin.py:432
+msgid "YouTube TV"
+msgstr ""
+
+#: plugin.py:433 youtube.py:141
+msgid "YouTube TV Settings"
+msgstr ""
+
+#: plugin.py:434
 msgid "Browser Start/Stop"
 msgstr "Avvia/Chiudi browser"
 
 msgid "Browser Start/Stop"
 msgstr "Avvia/Chiudi browser"
 
-#: plugin.py:2163
+#: plugin.py:435
+msgid "HbbTV Applications"
+msgstr "Applicazioni HbbTV"
+
+#: plugin.py:436
 msgid "Opera Web Browser"
 msgstr "Web Browser Opera"
 
 msgid "Opera Web Browser"
 msgstr "Web Browser Opera"
 
-#: plugin.py:2163
+#: plugin.py:436
 msgid "start opera web browser"
 msgid "start opera web browser"
-msgstr "avvia il browser Opera"
+msgstr "avvia il browser opera"
+
+#: youtube.py:54
+msgid "Start YouTube TV"
+msgstr ""
+
+#: youtube.py:55
+msgid "YouTube TV is a new way to watch YouTube videos on Vu+"
+msgstr ""
+
+#: youtube.py:56
+msgid "* Start YouTube TV"
+msgstr ""
+
+#: youtube.py:57
+msgid "* RC Help"
+msgstr ""
+
+#: youtube.py:62
+msgid "Play ther selected the video"
+msgstr ""
+
+#: youtube.py:63
+msgid "Exit the YouTube TV"
+msgstr ""
+
+#: youtube.py:66
+msgid "Move up"
+msgstr ""
+
+#: youtube.py:67
+msgid "Move down"
+msgstr ""
+
+#: youtube.py:68
+msgid "Move left"
+msgstr ""
+
+#: youtube.py:69
+msgid "Move right"
+msgstr ""
+
+#: youtube.py:72
+msgid "Search a video"
+msgstr ""
+
+#: youtube.py:73
+msgid "Skip forward 10 sec"
+msgstr ""
+
+#: youtube.py:74
+msgid "Skip backward 10 sec"
+msgstr ""
+
+#: youtube.py:77
+msgid "Play current video"
+msgstr ""
+
+#: youtube.py:78
+msgid "Pause current video"
+msgstr ""
+
+#: youtube.py:79
+msgid "Stop current video"
+msgstr ""
+
+#: youtube.py:82
+msgid "Back"
+msgstr ""
+
+#: youtube.py:166
+msgid "YouTube TV URL"
+msgstr ""
+
+#: youtube.py:167
+msgid "Do not show YouTube TV Starter again"
+msgstr ""
 
 
index 830b46e..193fdea 100644 (file)
@@ -1,21 +1,16 @@
 <default>
 <default>
-         <prerequisites>
-                    <tag type="Network" />
-         </prerequisites>
-          <info>
-                    <author>kos</author>
-                    <name>HbbTV</name>
-                    <packagename>enigma2-plugin-extensions-hbbtv</packagename>
-                    <shortdescription>this is hbbtv plugin</shortdescription>
-                    <description>this is hbbtv plugin</description>
-          </info>
-         <files type="package"> <!-- without version, without .ipk -->
+       <prerequisites>
+               <tag type="Network" />
+       </prerequisites>
+       <info>
+               <author>smlee</author>
+               <name>HbbTV</name>
+               <packagename>enigma2-plugin-extensions-hbbtv</packagename>
+               <shortdescription>this is hbbtv plugin</shortdescription>
+               <description>this is hbbtv plugin</description>
+       </info>
+       <files type="package"> <!-- without version, without .ipk -->
                <file type="package" name="enigma2-plugin-extensions-hbbtv" />
                <file type="package" name="enigma2-plugin-extensions-hbbtv" />
-                <file type="package" name="libgmp3" />
-                <file type="package" name="libmpfr1" />
-                <file type="package" name="tslib-conf" />
-                <file type="package" name="libts-1.0-0" />
-                <file type="package" name="libsysfs2" />
-                <file type="package" name="directfb" />
-         </files>
+               <file type="package" name="opera-hbbtv" />
+       </files>
 </default>
 </default>
index 96d19cc..7b40106 100644 (file)
 from Plugins.Plugin import PluginDescriptor
 from Plugins.Plugin import PluginDescriptor
-
 from Screens.Screen import Screen
 from Screens.InfoBar import InfoBar
 from Screens.ChoiceBox import ChoiceBox
 from Screens.Screen import Screen
 from Screens.InfoBar import InfoBar
 from Screens.ChoiceBox import ChoiceBox
+from Screens.HelpMenu import HelpableScreen
 from Screens.MessageBox import MessageBox
 from Screens.VirtualKeyBoard import VirtualKeyBoard
 from Screens.MessageBox import MessageBox
 from Screens.VirtualKeyBoard import VirtualKeyBoard
-from Screens.HelpMenu import HelpableScreen
-from Screens.ChannelSelection import service_types_tv
-
+from Components.config import config
+from Components.ActionMap import ActionMap
 from Components.Language import language
 from Components.Language import language
-from Components.PluginComponent import plugins
-from Components.Button import Button
-from Components.Sources.StaticText import StaticText
-from Components.ActionMap import NumberActionMap, ActionMap, HelpableActionMap
 from Components.ServiceEventTracker import ServiceEventTracker
 from Components.ServiceEventTracker import ServiceEventTracker
-from Components.MenuList import MenuList
-from Components.Label import Label, MultiColorLabel
-from Components.ConfigList import ConfigListScreen
 from Components.VolumeControl import VolumeControl
 from Components.VolumeControl import VolumeControl
-from Components.Pixmap import Pixmap
-from Components.config import config, ConfigYesNo, ConfigSubsection, ConfigPosition, getConfigListEntry, ConfigBoolean, ConfigInteger, ConfigText, ConfigSelection, configfile
-
-from enigma import eTimer, eConsoleAppContainer, getDesktop, eServiceReference, iPlayableService, iServiceInformation, RT_HALIGN_LEFT, RT_HALIGN_RIGHT, RT_HALIGN_CENTER, RT_VALIGN_CENTER, getPrevAsciiCode, eRCInput, fbClass, eServiceCenter
 
 
-from bookmark import BookmarkManager, BookmarkData, CategoryData
+from enigma import eTimer, fbClass, eRCInput, iServiceInformation, iPlayableService
 
 
-import os, struct, threading, stat, select, time, socket, select
+import os, struct, vbcfg
 
 from __init__ import _
 
 from __init__ import _
+from hbbtv import HbbTVWindow
+from browser import Browser
+from youtube import YoutubeTVWindow, YoutubeTVSettings
+from vbipc import VBController, VBServerThread, VBHandlers
 
 strIsEmpty = lambda x: x is None or len(x) == 0
 
 
 strIsEmpty = lambda x: x is None or len(x) == 0
 
-HBBTVAPP_PATH = "/usr/local/hbb-browser"
-COMMAND_PATH = '/tmp/.sock.hbbtv.cmd'
-
-_g_helper = None
-
-class GlobalValues:
-       command_util   = None
-       command_server = None
-
-       before_service = None
-
-       channel_info_sid   = None
-       channel_info_onid  = None
-       channel_info_tsid  = None
-       channel_info_name  = None
-       channel_info_orgid = None
-
-       hbbtv_handelr = None
-
-       packet_m  = 0xBBADBEE
-       packet_h  = '!IIII'
-       packet_hl = struct.calcsize(packet_h)
-
-       need_restart = False
-       plugin_browser = None
-
-       resX = 0
-       resY = 0
-       def UpdateInfoBar(self):
-               if self.resX == 1024 and self.resY == 720:
-                       return
-               try:
-                       infobar = InfoBar.instance
-                       if infobar._InfoBarShowHide__state != 3:
-                               return
-                       infobar.doTimerHide()
-                       infobar.serviceStarted()
-               except: pass
-       
-__gval__ = GlobalValues()
-
-def setDefaultResolution(x, y):
-       global __gval__
-       __gval__.resX = x
-       __gval__.resY = y
-
-def setResolution(xres, yres):
-       global __gval__
-       if __gval__.resX == 1280 and __gval__.resY == 720:
-               return
-       from enigma import gMainDC
-       gMainDC.getInstance().setResolution(xres, yres)
-
-def restoreResolution():
-       global __gval__
-       setResolution(1280, 720)
-       setResolution(__gval__.resX, __gval__.resY)
-
-       if __gval__.resX == 1280 and __gval__.resY == 720:
-               return
-       __gval__.UpdateInfoBar()
-
-def setPluginBrowser(browser=None):
-       global __gval__
-       __gval__.plugin_browser = browser
-def getPluginBrowser():
-       global __gval__
-       return __gval__.plugin_browser
-
-def getPacketHeaders():
-       global __gval__
-       return (__gval__.packet_m, __gval__.packet_h, __gval__.packet_hl)
-
-def setChannelInfo(sid, onid, tsid, name, orgid):
-       if sid is None:   sid   = 0
-       if onid is None:  onid  = 0
-       if tsid is None:  tsid  = 0
-       if name is None:  name  = ""
-       if orgid is None: orgid = 0
-       global __gval__
-       __gval__.channel_info_sid   = sid
-       __gval__.channel_info_onid  = onid
-       __gval__.channel_info_tsid  = tsid
-       __gval__.channel_info_name  = name
-       __gval__.channel_info_orgid = orgid
-       print "Set Channel Info >> sid : %X, onid : %X, tsid : %X, name : %s, orgid : %d " % (sid, onid, tsid, name, orgid)
-def getChannelInfos():
-       global __gval__
-       print "Get Channel Info >> sid : %X, onid : %X, tsid : %X, name : %s, orgid : %d " % (__gval__.channel_info_sid,
-               __gval__.channel_info_onid, __gval__.channel_info_tsid, __gval__.channel_info_name, __gval__.channel_info_orgid)
-       return (__gval__.channel_info_sid,
-               __gval__.channel_info_onid,
-               __gval__.channel_info_tsid,
-               __gval__.channel_info_name,
-               __gval__.channel_info_orgid)
-
-def isNeedRestart():
-       global __gval__
-       print "Need Restart(GET) : ", __gval__.need_restart
-       return __gval__.need_restart
-def setNeedRestart(n):
-       global __gval__
-       __gval__.need_restart = n
-       print "Need Restart(SET) : ", __gval__.need_restart
-
-def getCommandUtil():
-       global __gval__
-       return __gval__.command_util
-def getCommandServer():
-       global __gval__
-       return __gval__.command_server
-
-def setBeforeService(s):
-       global __gval__
-       __gval__.before_service = s
-def getBeforeService():
-       global __gval__
-       return __gval__.before_service
-
-def _unpack(packed_data):
-       (mg, h, hlen) = getPacketHeaders()
-
-       if strIsEmpty(packed_data):
-               return None
-       (m, o, l, s) = struct.unpack(h, packed_data[:hlen])
-       if m != mg:
-               return None
-       d = 0
-       if l > 0:
-               d = packed_data[hlen:hlen+l]
-       return (o,d,s)
-
-def _pack(opcode, params=None, reserved=0):
-       (m, h, hlen) = getPacketHeaders()
-       if strIsEmpty(params):
-               params = ''
-       packed_data = struct.pack(h, m, opcode, len(params), reserved)
-       return packed_data + params
-
-class OpCodeSet:
-       def __init__(self):
-               self._opcode_ = {
-                        "OP_UNKNOWN"                                           : 0x0000
-                       ,"OP_HBBTV_EXIT"                                        : 0x0001
-                       ,"OP_HBBTV_OPEN_URL"                            : 0x0002
-                       ,"OP_HBBTV_LOAD_AIT"                            : 0x0003
-                       ,"OP_HBBTV_UNLOAD_AIT"                          : 0x0004
-                       ,"OP_HBBTV_FULLSCREEN"                          : 0x0005
-                       ,"OP_HBBTV_TITLE"                                       : 0x0006
-                       ,"OP_HBBTV_RETRY_OPEN_URL"                      : 0x0009
-                       ,"OP_HBBTV_CHANGE_CHANNEL"                      : 0x000A
-                       ,"OP_HBBTV_ABORT_SIG"                           : 0x000B
-                       ,"OP_OIPF_GET_CHANNEL_INFO_URL"         : 0x0101
-                       ,"OP_OIPF_GET_CHANNEL_INFO_AIT"         : 0x0102
-                       ,"OP_OIPF_GET_CHANNEL_INFO_LIST"        : 0x0103
-                       ,"OP_VOD_URI"                                           : 0x0201
-                       ,"OP_VOD_PLAY"                                          : 0x0202
-                       ,"OP_VOD_STOP"                                          : 0x0203
-                       ,"OP_VOD_PAUSE"                                         : 0x0204
-                       ,"OP_VOD_STATUS"                                        : 0x0205
-                       ,"OP_VOD_FORBIDDEN"                                     : 0x0206
-                       ,"OP_VOD_STOPED"                                        : 0x0207
-                       ,"OP_VOD_SPEED_CTRL"                            : 0x0208
-                       ,"OP_VOD_SEEK_CTRL"                                     : 0x0209
-                       ,"OP_BROWSER_OPEN_URL"                          : 0x0301
-                       ,"OP_BROWSER_VKBD_REQ"                          : 0x0309
-                       ,"OP_BROWSER_VKBD_RES"                          : 0x030A
-                       ,"OP_BROWSER_VKBD_PASTE_REQ"            : 0x030B
-                       ,"OP_BROWSER_VKBD_PASTE_KEY"            : 0x030C
-                       ,"OP_BROWSER_VKBD_PASTE_MOUSE"          : 0x030D
-                       ,"OP_BROWSER_MENU_REQ"                          : 0x030E
-                       ,"OP_BROWSER_MENU_RES"                          : 0x030F
-                       ,"OP_BROWSER_NEED_RELOAD_KEYMAP"        : 0x0313
-                       ,"OP_DVBAPP_VOL_UP"                                     : 0x0401
-                       ,"OP_DVBAPP_VOL_DOWN"                           : 0x0402
-                       ,"OP_DVBAPP_SET_VOL"                            : 0x0403
-                       ,"OP_SYSTEM_OUT_OF_MEMORY"                      : 0x0501
-                       ,"OP_SYSTEM_NOTIFY_MY_PID"                      : 0x0502
-                       ,"OP_VIDEOBACKEND_ENABLE"                       : 0x0601
-                       ,"OP_VIDEOBACKEND_DISABLE"                      : 0x0602
-                       ,"OP_BROWSER_OPEN_YOUTUBETV"            : 0x0603
-               }
-               self._opstr_ = {
-                        0x0000 : "OP_UNKNOWN"
-                       ,0x0001 : "OP_HBBTV_EXIT"
-                       ,0x0002 : "OP_HBBTV_OPEN_URL"
-                       ,0x0003 : "OP_HBBTV_LOAD_AIT"
-                       ,0x0004 : "OP_HBBTV_UNLOAD_AIT"
-                       ,0x0005 : "OP_HBBTV_FULLSCREEN"
-                       ,0x0006 : "OP_HBBTV_TITLE"
-                       ,0x0009 : "OP_HBBTV_RETRY_OPEN_URL"
-                       ,0x000A : "OP_HBBTV_CHANGE_CHANNEL"
-                       ,0x000B : "OP_HBBTV_ABORT_SIG"
-                       ,0x0101 : "OP_OIPF_GET_CHANNEL_INFO_URL"
-                       ,0x0102 : "OP_OIPF_GET_CHANNEL_INFO_AIT"
-                       ,0x0103 : "OP_OIPF_GET_CHANNEL_INFO_LIST"
-                       ,0x0201 : "OP_VOD_URI"
-                       ,0x0202 : "OP_VOD_PLAY"
-                       ,0x0203 : "OP_VOD_STOP"
-                       ,0x0204 : "OP_VOD_PAUSE"
-                       ,0x0205 : "OP_VOD_STATUS"
-                       ,0x0206 : "OP_VOD_FORBIDDEN"
-                       ,0x0207 : "OP_VOD_STOPED"
-                       ,0x0208 : "OP_VOD_SPEED_CTRL"
-                       ,0x0209 : "OP_VOD_SEEK_CTRL"
-                       ,0x0301 : "OP_BROWSER_OPEN_URL"
-                       ,0x0309 : "OP_BROWSER_VKBD_REQ"
-                       ,0x030A : "OP_BROWSER_VKBD_RES"
-                       ,0x030B : "OP_BROWSER_VKBD_PASTE_REQ"
-                       ,0x030C : "OP_BROWSER_VKBD_PASTE_KEY"
-                       ,0x030D : "OP_BROWSER_VKBD_PASTE_MOUSE"
-                       ,0x030E : "OP_BROWSER_MENU_REQ"
-                       ,0x030F : "OP_BROWSER_MENU_RES"
-                       ,0x0313 : "OP_BROWSER_NEED_RELOAD_KEYMAP"
-                       ,0x0401 : "OP_DVBAPP_VOL_UP"
-                       ,0x0402 : "OP_DVBAPP_VOL_DOWN"
-                       ,0x0403 : "OP_DVBAPP_SET_VOL"
-                       ,0x0501 : "OP_SYSTEM_OUT_OF_MEMORY"
-                       ,0x0502 : "OP_SYSTEM_NOTIFY_MY_PID"
-                       ,0x0601 : "OP_VIDEOBACKEND_ENABLE"
-                       ,0x0602 : "OP_VIDEOBACKEND_DISABLE"
-                       ,0x0603 : "OP_BROWSER_OPEN_YOUTUBETV"
-               }
-
-       def get(self, opstr):
-               try:
-                       return self._opcode_[opstr]
-               except: pass
-               return self._opcode_["OP_UNKNOWN"]
-
-       def what(self, opcode):
-               try:
-                       return self._opstr_[opcode]
-               except: pass
-               return self._opstr_["0x0000"]
-
-class SocketParams:
-       def __init__(self):
-               self.protocol = None
-               self.type = None
-               self.addr = None
-               self.buf_size = 4096
-               self.handler = None
-               self.timeout = 5
-               self.destroy = None
-
-class StreamServer:
-       def __init__(self, params):
-               self._protocol = params.protocol
-               self._type = params.type
-               self._addr = params.addr
-               self._buf_size = params.buf_size
-               self._handler = params.handler
-               self._timeout = params.timeout
-               self._destroy = params.destroy
-
-               self._terminated = False
-               self._server_thread = None
-
-               self.onHbbTVCloseCB = []
-               self.onSetPageTitleCB = []
-
-       def __del__(self):
-               if self._destroy is not None:
-                       self._destroy(self._addr)
-
-       def stop(self):
-               self._terminated = True
-               if self._server_thread is not None:
-                       self._server_thread.join()
-                       self._server_thread = None
-
-       def start(self):
-               self._socket = socket.socket(self._protocol, self._type)
-               self._socket.settimeout(self._timeout)
-               self._socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
-               self._socket.bind(self._addr)
-               self._socket.listen(True)
-
-               self._server_thread = threading.Thread(target=self._listen)
-               self._server_thread.start()
-
-       def _listen(self):
-               select_list = [self._socket]
-               def _accept():
-                       try:
-                               conn, addr = self._socket.accept()
-                               self._client(conn, addr)
-                       except Exception, ErrMsg:
-                               print "ServerSocket Error >>", ErrMsg
-                               pass
-
-               while not self._terminated:
-                       readable, writable, errored = select.select(select_list, [], [], self._timeout)
-                       for s in readable:
-                               if s is self._socket:
-                                       _accept()
-
-       def _client(self, conn, addr):
-               try:
-                       send_data = ''
-                       received_data = conn.recv(self._buf_size)
-                       if self._handler is not None and not strIsEmpty(received_data):
-                               send_data = self._handler.doHandle(received_data, self.onHbbTVCloseCB, self.onSetPageTitleCB)
-                       self._send(conn, send_data)
-               except Exception, ErrMsg:
-                       try: conn.close()
-                       except:pass
-                       if self._handler is not None:
-                               self._handler.printError(ErrMsg)
-       def _send(self, conn, data) :
-               conn.send(data)
-               conn.close()
-
-class ServerFactory:
-       def doListenUnixTCP(self, name, handler):
-               def destroy(name):
-                       try:
-                               if os.path.exists(name):
-                                       os.unlink(name)
-                                       print "Removed ", name
-                       except: pass
-               destroy(name)
-
-               params = SocketParams()
-               params.protocol = socket.AF_UNIX
-               params.type = socket.SOCK_STREAM
-               params.addr = name
-               params.handler = handler
-               params.destroy = destroy
-
-               streamServer = StreamServer(params)
-               streamServer.start()
-               return streamServer
-
-       def doListenInetTCP(self, ip, port, handler):
-               print "Not implemented yet!!"
-       def doListenUnixDGRAM(self, name, handler):
-               print "Not implemented yet!!"
-       def doListenInetDGRAM(self, ip, port, handler):
-               print "Not implemented yet!!"
-
-class Handler:
-       def doUnpack(self, data):
-               return _unpack(data)
-
-       def doPack(self, opcode, params, reserved=0):
-               return _pack(opcode, params, reserved)
-
-       def doHandle(self, data, onCloseCB):
-               opcode, params = 0x0, 'Invalid Request!!'
-               return _pack(opcode, params)
-
-       def printError(self, reason):
-               print reason
-
-class BrowserCommandUtil(OpCodeSet):
-       def __init__(self):
-               self._fd = None
-               OpCodeSet.__init__(self)
-
-       def isConnected(self):
-               if self._fd is None:
-                       return False
-               return True
-
-       def doConnect(self, filename):
-               if not os.path.exists(filename):
-                       print "File not exists :", filename
-                       return False
-               try:
-                       self._fd = os.open(filename, os.O_WRONLY|os.O_NONBLOCK)
-                       if self._fd is None:
-                               print "Fail to open file :", filename
-                               return False
-               except Exception, ErrMsg:
-                       print ErrMsg
-                       self._fd = None
-                       return False
-               return True
-
-       def doDisconnect(self):
-               if self._fd is None:
-                       return
-               os.close(self._fd)
-               self._fd = None
-
-       def doSend(self, command, params=None, reserved=0):
-               if self._fd is None:
-                       print "No found pipe!!"
-                       return False
-               data = ''
-               try:
-                       data = _pack(self.get(command), params, reserved)
-                       if data is None:
-                               return False
-                       os.write(self._fd, data)
-                       print "Send OK!! :", command
-               except: return False
-               return True
-
-       def sendCommand(self, command, params=None, reserved=0):
-               if not self.isConnected():
-                       global COMMAND_PATH
-                       self.doConnect(COMMAND_PATH)
-               result = self.doSend(command, params, reserved)
-               self.doDisconnect()
-               return result
-
-class HandlerHbbTV(Handler):
-       _vod_service = None
+vbcfg.SOCKETFILE = '/tmp/.browser.support'
+vbcfg.CONTROLFILE = '/tmp/.browser.controller'
+_OPCODE_LIST = [
+               'CONTROL_BACK',
+               'CONTROL_FORWARD',
+               'CONTROL_STOP',
+               'CONTROL_RELOAD',
+               'CONTROL_OPENURL',
+               'CONTROL_EXIT',
+               'CONTROL_TITLE',
+               'CONTROL_OK',
+               'CONTROL_OUT_OF_MEMORY',
+               'CONTROL_GET_VOLUME',
+               'CONTROL_SET_VOLUME',
+               'CONTROL_VOLUME_UP',
+               'CONTROL_VOLUME_DOWN',
+               'HBBTV_LOADAIT',
+               'HBBTV_OPENURL',
+               'YOUTUBETV_OPENURL',
+               'BROWSER_OPENURL',
+               'BROWSER_MENU_OPEN',
+               'BROWSER_MENU_CLOSE',
+               'BROWSER_VKB_OPEN',
+               'BROWSER_VKB_CLOSE',
+               'OOIF_GET_CURRENT_CHANNEL',
+               'OOIF_BROADCAST_PLAY',
+               'OOIF_BROADCAST_STOP',
+               'OOIF_BROADCAST_CHECK',
+               'OPCODE_END'
+               ]
+
+class VBHandler(VBHandlers):
        def __init__(self, session):
                self._session = session
        def __init__(self, session):
                self._session = session
-               self.opcode = OpCodeSet()
-               self.handle_map = {
-                        0x0001 : self._cb_handleCloseHbbTVBrowser
-                       ,0x0006 : self._cb_handleSetPageTitle
-                       ,0x0009 : self._cb_handleHbbTVRetryOpen
-                       ,0x000A : self._cb_handleHbbTVChangeChannel
-                       ,0x000B : self._cb_handleHbbTVAbortSig
-                       ,0x0101 : self._cb_handleGetChannelInfoForUrl
-                       ,0x0102 : self._cb_handleGetChannelInfoForAIT
-                       ,0x0103 : self._cb_handleGetChannelInfoList
-                       ,0x0201 : self._cb_handleVODPlayerURI
-                       ,0x0202 : self._cb_handleVODPlayerPlay
-                       ,0x0203 : self._cb_handleVODPlayerStop
-                       ,0x0204 : self._cb_handleVODPlayerPlayPause
-                       ,0x0401 : self._cb_handleDVBAppVolUp
-                       ,0x0402 : self._cb_handleDVBAppVolDown
-                       ,0x0403 : self._cb_handleDVBAppSetVol
-                       ,0x0208 : self._cb_handleVODSpeedCtrl
-                       ,0x0209 : self._cb_handleVODSeekCtrl
-                       ,0x0501 : self._cb_handleSystemOutOfMemory
-                       ,0x0502 : self._cb_handleSystemNotufyMyPID
-                       ,0x0309 : self._cb_handleShowVirtualKeyboard
-                       ,0x030B : self._cb_handlePasteVirtualKeyboard
-                       ,0x030E : self._cb_handleBrowserMenuReq
-                       ,0x0601 : self._cb_handleVideobackendEnable
-                       ,0x0602 : self._cb_handleVideobackendDisable
-               }
-               self._on_close_cb = None
-               self._on_set_title_cb = None
-
-               self._vod_uri = None
-
-               self._retry_open_url = None
-               self._timer_retry_open = eTimer()
-               self._timer_paste_vkbd = eTimer()
-               self._curren_title = None
-               self._max_volume  = -1
-               self._soft_volume = -1
-               self._videobackend_activate = False
-
-       def _handle_dump(self, handle, opcode, data=None):
-               if True: return
-               print str(handle)
-               try:
-                       print "    - opcode : ", self.opcode.what(opcode)
-               except: pass
-               print "    - data   : ", data
-
-       def doHandle(self, data, onCloseCB, onSetPageTitleCB):
-               opcode, params, reserved = None, None, 0
-               self._on_close_cb = onCloseCB
-               self._on_set_title_cb = onSetPageTitleCB
-               try:
-                       datas  = self.doUnpack(data)
-               except Exception, ErrMsg:
-                       print "Unpacking packet ERR :", ErrMsg
-                       params = 'fail to unpack packet!!'
-                       opcode = self.opcode.get("OP_UNKNOWN")
-                       return self.doPack(opcode, params)
+               self.current_title = None
+               self.max_volume = -1
+               self.soft_volume = -1
+               self.videobackend_activate = False
+               self.onSetTitleCB = []
+               self.onCloseCB = []
+               VBHandlers.__init__(self, _OPCODE_LIST, '_CB_')
+
+       def set_volume(self, volume):
+               if self.max_volume < 0:
+                       self.max_volume = VolumeControl.instance.volctrl.getVolume()
+
+               self.max_volume += volume
+               if self.max_volume > 100:
+                       self.max_volume = 100
+               elif self.max_volume < 0:
+                       self.max_volume = 0
+
+               if self.soft_volume > 0:
+                       v = int((self.max_volume * self.soft_volume) / 100)
+                       VolumeControl.instance.volctrl.setVolume(v, v)
                else:
                else:
-                       opcode = datas[0]
-                       params = datas[1]
-               self.opcode.what(opcode)
+                       VolumeControl.instance.volctrl.setVolume(self.max_volume, self.max_volume)
 
 
-               try:
-                       #print self.handle_map[opcode]
-                       (reserved, params) = self.handle_map[opcode](opcode, params)
-               except Exception, ErrMsg:
-                       print "Handling packet ERR :", ErrMsg
-                       params = 'fail to handle packet!!'
-                       opcode = self.opcode.get("OP_UNKNOWN")
-                       return self.doPack(opcode, params)
-               self._on_close_cb = None
-               self._on_set_title_cb = None
-               return self.doPack(opcode, params, reserved)
-
-       def _cb_handleVideobackendEnable(self, opcode, data):
-               self._handle_dump(self._cb_handleVideobackendEnable, opcode, data)
-               service = self._session.nav.getCurrentlyPlayingServiceReference()
-               setBeforeService(service)
-               self._session.nav.stopService()
-               self._videobackend_activate = True
-               return (0, "OK")
-
-       def _cb_handleVideobackendDisable(self, opcode, data):
-               self._handle_dump(self._cb_handleVideobackendDisable, opcode, data)
-               before_service = getBeforeService()
-               if before_service is not None:
-                       self._session.nav.playService(before_service)
-               self._videobackend_activate = False
-               return (0, "OK")
-
-       def _cb_handleHbbTVChangeChannel(self, opcode, data):
-               self._handle_dump(self._cb_handleHbbTVChangeChannel, opcode, data)
-               global _g_helper
-               if _g_helper is None:
-                       return (0, "NOK")
-               dataItems = data.split(":")
-               sid = dataItems[0]
-               tsid = dataItems[1]
-               if not _g_helper.doChangeChannel(sid, tsid):
-                       return (0, "NOK")
-               return (0, "OK")
-
-       def _cb_handleBrowserMenuReq(self, opcode, data):
-               self._handle_dump(self._cb_handleBrowserMenuReq, opcode, data)
-               #restoreResolution()
-               fbClass.getInstance().unlock()
-               eRCInput.getInstance().unlock()
-               browser = getPluginBrowser()
-               if browser is not None:
-                       browser.setCurrentPageUrl(data, self._curren_title)
-               return (0, "OK")
-
-       def _cb_handlePasteVirtualKeyboard(self, opcode, data):
-               self._handle_dump(self._cb_handlePasteVirtualKeyboard, opcode, data)
-               def _cb_PasteRefocusVirtualKeyboard():
-                       self._timer_paste_vkbd.stop()
-                       command_util = getCommandUtil()
-                       command_util.sendCommand('OP_BROWSER_VKBD_PASTE_MOUSE')
-                       try:
-                               self._timer_paste_vkbd.callback.remove(_cb_PasteMouseVirtualKeyboard)
-                       except: pass
-               def _cb_PasteKeyVirtualKeyboard():
-                       self._timer_paste_vkbd.stop()
-                       command_util = getCommandUtil()
-                       command_util.sendCommand('OP_BROWSER_VKBD_PASTE_KEY')
-                       try:
-                               self._timer_paste_vkbd.callback.remove(_cb_PasteKeyVirtualKeyboard)
-                       except: pass
-                       self._timer_paste_vkbd.callback.append(_cb_PasteRefocusVirtualKeyboard)
-                       self._timer_paste_vkbd.start(100)
-               def _cb_PasteMouseVirtualKeyboard():
-                       self._timer_paste_vkbd.stop()
-                       command_util = getCommandUtil()
-                       command_util.sendCommand('OP_BROWSER_VKBD_PASTE_MOUSE')
-                       #time.sleep(1)
-                       #command_util.sendCommand('OP_BROWSER_VKBD_PASTE_MOUSE')
-                       try:
-                               self._timer_paste_vkbd.callback.remove(_cb_PasteMouseVirtualKeyboard)
-                       except: pass
-                       #self._timer_paste_vkbd.callback.append(_cb_PasteKeyVirtualKeyboard)
-                       #self._timer_paste_vkbd.start(1000)
-               self._timer_paste_vkbd.callback.append(_cb_PasteMouseVirtualKeyboard)
-               self._timer_paste_vkbd.start(50)
-               return (0, "OK")
-
-       def _cb_virtualKeyboardClosed(self, data=None):
+       def close_vkb(self, data=""):
                fbClass.getInstance().lock()
                eRCInput.getInstance().lock()
                fbClass.getInstance().lock()
                eRCInput.getInstance().lock()
-               #setResolution(1280, 720)
-               command_util = getCommandUtil()
-               command_util.sendCommand('OP_BROWSER_VKBD_RES', data)
-
-       def _cb_handleShowVirtualKeyboard(self, opcode, data):
-               self._handle_dump(self._cb_handleShowVirtualKeyboard, opcode, data)
-               #restoreResolution()
-               fbClass.getInstance().unlock()
-               eRCInput.getInstance().unlock()
-               if data == 0 or strIsEmpty(data):
-                       data = ""
-               self._session.openWithCallback(self._cb_virtualKeyboardClosed, VirtualKeyBoard, title=("Please enter URL here"), text=data)
-               return (0, "OK")
-
-       def _cb_handleVODSeekCtrl(self, opcode, data):
-               self._handle_dump(self._cb_handleVODSeekCtrl, opcode, data)
-               headLen = struct.calcsize('!I')
-               unpackedData = struct.unpack('!I', data[:headLen])
-               seekTime = unpackedData[0]
-               service = self._session.nav.getCurrentService()
-               seekable = service.seek()
-               if seekable is None or not seekable.isCurrentlySeekable():
-                       raise Exception("This stream is not support manual seek.")
-               pts = seekTime
-               seekable.seekRelative(pts<0 and -1 or 1, abs(pts))
-               return (0, "OK")
-
-       def _cb_handleHbbTVRetryOpen(self, opcode, data):
-               def _cb_HbbTVRetryOpenURL():
-                       self._timer_retry_open.stop()
-                       if self._retry_open_url is not None:
-                               command_util = getCommandUtil()
-                               command_util.sendCommand('OP_HBBTV_RETRY_OPEN_URL', params=self._retry_open_url)
-                       self._retry_open_url = None
-                       try:
-                               self._timer_retry_open.callback.remove(_cb_HbbTVRetryOpenURL)
-                       except: pass
-               self._handle_dump(self._cb_handleHbbTVRetryOpen, opcode, data)
-               headLen = struct.calcsize('!I')
-               unpackedData = struct.unpack('!I', data[:headLen])
-               delayTime = unpackedData[0]
-               restartUrl = data[headLen:]
-
-               self._retry_open_url = restartUrl.strip()
-               self._timer_retry_open.callback.append(_cb_HbbTVRetryOpenURL)
-               self._timer_retry_open.start(delayTime*1000)
-               return (0, "OK")
-
-       def _cb_handleSystemNotufyMyPID(self, opcode, data):
-               self._handle_dump(self._cb_handleSystemNotufyMyPID, opcode, data)
-               return (0, "OK")
-
-       def _cb_handleSystemOutOfMemory(self, opcode, data):
-               self._handle_dump(self._cb_handleSystemOutOfMemory, opcode, data)
-               setNeedRestart(True)
-               return (0, "OK")
-
-       def _cb_handleVODSpeedCtrl(self, opcode, data):
-               self._handle_dump(self._cb_handleVODSpeedCtrl, opcode, data)
-               headLen = struct.calcsize('!I')
-               unpackedData = struct.unpack('!I', data[:headLen])
-               playSpeed = unpackedData[0]
-               service = self._session.nav.getCurrentService()
-               pauseable = service.pause()
-               if playSpeed > 2:
-                       playSpeed = 2
-               if pauseable.setFastForward(playSpeed) == -1:
-                       pauseable.setFastForward(1)
-                       raise Exception("This stream is not support trick play.")
-               return (0, "OK")
-
-       def SetVolume(self, volume):
-               if self._max_volume < 0:
-                       self._max_volume = VolumeControl.instance.volctrl.getVolume()
-
-               self._max_volume += volume
-               if self._max_volume > 100:
-                       self._max_volume = 100
-               elif self._max_volume < 0:
-                       self._max_volume = 0
-
-               if self._soft_volume > 0:
-                       v = int((self._max_volume * self._soft_volume) / 100)
-                       VolumeControl.instance.volctrl.setVolume(v, v)
-               else:   VolumeControl.instance.volctrl.setVolume(self._max_volume, self._max_volume)
-
-       def _cb_handleDVBAppVolUp(self, opcode, data):
-               self._handle_dump(self._cb_handleDVBAppVolUp, opcode, data)
-               self.SetVolume(5)
-               return (0, "OK")
-
-       def _cb_handleDVBAppVolDown(self, opcode, data):
-               self._handle_dump(self._cb_handleDVBAppVolDown, opcode, data)
-               self.SetVolume(-5)
-               return (0, "OK")
 
 
-       def _cb_handleDVBAppSetVol(self, opcode, data):
-               self._handle_dump(self._cb_handleDVBAppSetVol, opcode, data)
-               if self._max_volume < 0:
-                       self._max_volume = VolumeControl.instance.volctrl.getVolume()
-               self._soft_volume = int(data)
-
-               v = 0
-               if self._soft_volume > 0 and self._max_volume > 0:
-                       v = int((self._max_volume * self._soft_volume) / 100)
-               VolumeControl.instance.volctrl.setVolume(v, v)
-               return (0, "OK")
-
-       def _cb_handleGetChannelInfoForUrl(self, opcode, data):
-               self._handle_dump(self._cb_handleGetChannelInfoForUrl, opcode, data)
-               (sid, onid, tsid, name, orgid) = getChannelInfos()
-               namelen = len(name)
-               return (0, struct.pack('!IIII', sid, onid, tsid, namelen) + name)
-
-       def _cb_handleGetChannelInfoForAIT(self, opcode, data):
-               self._handle_dump(self._cb_handleGetChannelInfoForAIT, opcode, data)
-               (sid, onid, tsid, name, orgid) = getChannelInfos()
-               namelen = len(name)
-               return (0, struct.pack('!IIIII', orgid, sid, onid, tsid, namelen) + name)
-
-       def _cb_handleGetChannelInfoList(self, opcode, data):
-               self._handle_dump(self._cb_handleGetChannelInfoList, opcode, data)
-               (sid, onid, tsid, name, orgid) = getChannelInfos()
-               namelen = len(name)
-               channel_list_size = 1
-               return (channel_list_size, struct.pack('!IIII', sid, onid, tsid, namelen) + name)
-
-       def _cb_handleSetPageTitle(self, opcode, data):
-               self._handle_dump(self._cb_handleSetPageTitle, opcode, data)
-               if data.startswith('file://') or data.startswith('http://'):
-                       return "OK"
-               if self._on_set_title_cb is not None:
-                       for x in self._on_set_title_cb:
-                               try:
-                                       x(data)
-                                       self._curren_title = data
-                               except Exception, ErrMsg:
-                                       if x in self._on_set_title_cb:
-                                               self._on_set_title_cb.remove(x)
-               return (0, "OK")
-
-       def _cb_handleHbbTVAbortSig(self, opcode, data):
-               self._cb_handleCloseHbbTVBrowser(opcode, data)
-               global __gval__
-               return (0, struct.pack('!II', __gval__.resX, __gval__.resY));
-
-       def _cb_handleCloseHbbTVBrowser(self, opcode, data):
-               self._timer_retry_open.stop()
-               try:
-                       self._timer_retry_open.callback.remove(_cb_HbbTVRetryOpenURL)
-               except: pass
-               self._handle_dump(self._cb_handleCloseHbbTVBrowser, opcode, data)
+               if strIsEmpty(data):
+                       data = ""
+               VBController.command("BROWSER_VKB_CLOSE", data)
 
 
-               if self._on_close_cb:
-                       for x in self._on_close_cb:
+       def _CB_CONTROL_EXIT(self, result, packet):
+               if self.onCloseCB:
+                       for x in self.onCloseCB:
                                try:
                                        x()
                                try:
                                        x()
-                               except Exception, ErrMsg:
-                                       if x in self._on_close_cb:
-                                               self._on_close_cb.remove(x)
-
-               command_util = getCommandUtil()
-               command_util.sendCommand('OP_HBBTV_FULLSCREEN', None)
-               if self._videobackend_activate == False:
-                       before_service = getBeforeService()
-                       if before_service is not None:
-                               self._session.nav.playService(before_service)
-                               self._vod_uri = None
-
-               #restoreResolution()
-               return (0, "OK")
-
-       def _cb_handleVODPlayerURI(self, opcode, data):
-               self._vod_uri = None
-               hl = struct.calcsize('!II')
-               datas = struct.unpack('!II', data[:hl])
-               uriLength = datas[1]
-               vodUri = data[hl:hl+uriLength]
-               self._handle_dump(self._cb_handleVODPlayerURI, opcode, vodUri)
-               self._vod_uri = vodUri
-               return (0, "OK")
-
-       def doStop(self, restoreBeforeService=True, needStop=True):
-               if needStop == True:
-                       self._session.nav.stopService()
-               if self._vod_service is not None and restoreBeforeService:
-                       before_service = getBeforeService()
-                       self._session.nav.playService(before_service)
-                       self._vod_uri = None
-               self._vod_service = None
-
-       def getUrl(self):
-               return self._vod_uri
-
-       def doRetryOpen(self, url):
-               if url is None:
-                       return False
-               for ii in range(5):
-                       self._vod_service = None
+                               except Exception:
+                                       if x in self.onCloseCB:
+                                               self.onCloseCB.remove(x)
+               if self.videobackend_activate is False:
+                       if vbcfg.g_service is not None:
+                               self._session.nav.playService(vbcfg.g_service)
+               return (True, None)
+
+       def _CB_CONTROL_TITLE(self, result, packet):
+               if packet.startswith('file://') or packet.startswith('http://'):
+                       return (True, None)
+               for x in self.onSetTitleCB:
                        try:
                        try:
-                               #print "Try to open vod [%d] : %s" % (ii, url)
-                               print "Try to open vod"
-                               self._vod_service = eServiceReference(4097, 0, url)
-                               self._session.nav.playService(self._vod_service)
-                               if self._vod_service is not None:
-                                       return True
-                       except Exception, ErrMsg:
-                               print "OpenVOD ERR :", ErrMsg
-                       time.sleep(1)
-               return False
-
-       def _cb_handleVODPlayerPlay(self, opcode, data):
-               self._handle_dump(self._cb_handleVODPlayerPlay, opcode, data)
-               self.doStop(restoreBeforeService=False)
-               if self.doRetryOpen(url=self._vod_uri) == False:
-                       self.doStop()
-               return (0, "OK")
-
-       def _cb_handleVODPlayerStop(self, opcode, data):
-               self._handle_dump(self._cb_handleVODPlayerStop, opcode, data)
-               self.doStop()
-               return (0, "OK")
-
-       def _cb_handleVODPlayerPlayPause(self, opcode, data):
-               self._handle_dump(self._cb_handleVODPlayerPlayPause, opcode, data)
-               service = self._session.nav.getCurrentService()
-               try:
-                       pauseFlag = data[0]
-                       servicePause = service.pause()
-                       if pauseFlag == 'U':
-                               servicePause.unpause()
-                       elif pauseFlag == 'P':
-                               servicePause.pause()
-               except Exception, ErrMsg:
-                       print "onPause ERR :", ErrMsg
-               return (0, "OK")
-
-from libshm import SimpleSharedMemory
-_g_ssm_ = None
-class HbbTVWindow(Screen):
-       skin = """
-               <screen name="HbbTVWindow" position="0,0" size="1280,720" backgroundColor="transparent" flags="wfNoBorder" title="HbbTV Plugin">
-               </screen>
-               """
-       def __init__(self, session, url=None, cbf=None, useAIT=False, profile=0):
-               self._session = session
-               setResolution(1280, 720)
-               fbClass.getInstance().lock()
-               eRCInput.getInstance().lock()
-
-               Screen.__init__(self, session)
-               self.__event_tracker = ServiceEventTracker(screen = self, eventmap = {
-                       iPlayableService.evStart: self._serviceStarted,
-                       iPlayableService.evEOF: self._serviceEOF,
-               })
-
-               self._url = url
-               self._use_ait = useAIT
-               self._profile = profile
-               self._cb_closed_func = cbf
-               self.onLayoutFinish.append(self._layoutFinished)
+                               x(packet)
+                               self.current_title = packet
+                       except Exception:
+                               if x in self.onSetTitleCB:
+                                       self.onSetTitleCB.remove(x)
+               return (True, None)
+
+       def _CB_CONTROL_OK(self, result, packet):
+               if vbcfg.g_browser and packet.startswith('stop'):
+                       vbcfg.g_browser.keyOK()
+               return (True, None)
+
+       def _CB_CONTROL_OUT_OF_MEMORY(self, result, packet):
+               vbcfg.need_restart = True;
+               return (True, None)
+
+       def _CB_CONTROL_SET_VOLUME(self, result, packet):
+               if self.max_volume < 0:
+                       self.max_volume = VolumeControl.instance.volctrl.getVolume()
+               self.soft_volume = int(packet)
 
 
-               command_server = getCommandServer()
-               if self._cb_set_page_title not in command_server.onSetPageTitleCB:
-                       command_server.onSetPageTitleCB.append(self._cb_set_page_title)
-
-               if self._cb_close_window not in command_server.onHbbTVCloseCB:
-                       command_server.onHbbTVCloseCB.append(self._cb_close_window)
-
-               self._closeTimer = eTimer()
-               self._closeTimer.callback.append(self._do_close)
-
-               self._currentServicePositionTimer = eTimer()
-               self._currentServicePositionTimer.callback.append(self._cb_currentServicePosition)
-               self._vodLength = 0
-
-               global _g_ssm_
-               self._ssm = _g_ssm_
-               self._vod_length = 0
-
-       def getVodPlayTime(self):
-               try:
-                       service = self._session.nav.getCurrentService()
-                       seek = service and service.seek()
-                       l = seek.getLength()
-                       p = seek.getPlayPosition()
-                       if(not l[0] and not p[0]):
-                               return (p[1], l[1])
-                       return (90000,90000)
-               except: pass
-               return (-1,-1)
-
-       def _cb_currentServicePosition(self):
-               def getTimeString(t):
-                       t = time.localtime(t/90000)
-                       return "%2d:%02d:%02d" % (t.tm_hour, t.tm_min, t.tm_sec)
-               position,length = 0,0
-               try:
-                       (position,length) = self.getVodPlayTime()
-                       self._vod_length = length
-                       if position == -1 and length == -1:
-                               raise Exception("Can't get play status")
-                       #print position, "/", length, " - ", getTimeString(position), "/", getTimeString(length)
-                       self._ssm.setStatus(position, length, 1)
-               except Exception, ErrMsg:
-                       print ErrMsg
-                       self._serviceEOF()
+               v = 0
+               if self.soft_volume > 0 and self.max_volume > 0:
+                       v = int((self.max_volume * self.soft_volume) / 100)
+               VolumeControl.instance.volctrl.setVolume(v, v)
+               return (True, None)
+
+       def _CB_CONTROL_VOLUME_UP(self, result, packet):
+               self.set_volume(5)
+               return (True, None)
+
+       def _CB_CONTROL_VOLUME_DOWN(self, result, packet):
+               self.set_volume(-5)
+               return (True, None)
+
+       def _CB_BROWSER_MENU_OPEN(self, result, packet):
+               if vbcfg.g_browser and vbcfg.g_browser.is_browser_opened:
+                       vbcfg.setPosition(vbcfg.g_position)
+                       fbClass.getInstance().unlock()
+                       eRCInput.getInstance().unlock()
+
+                       vbcfg.g_browser.toggle_browser(packet, self.current_title)
+               return (True, None)
+
+       def _CB_BROWSER_VKB_OPEN(self, result, packet):
+               if vbcfg.g_browser and vbcfg.g_browser.is_browser_opened:
+                       vbcfg.setPosition(vbcfg.g_position)
+                       fbClass.getInstance().unlock()
+                       eRCInput.getInstance().unlock()
+
+                       if strIsEmpty(packet):
+                               packet = ""
+                       self._session.openWithCallback(self.close_vkb, VirtualKeyBoard, title=("Please enter URL here"), text=str(packet))
+               return (True, None)
+
+       def _CB_OOIF_GET_CURRENT_CHANNEL(self, result, packet):
+               if (vbcfg.g_channel_info):
+                       try:
+                               data = struct.pack('iiii', vbcfg.g_channel_info[1], vbcfg.g_channel_info[2], vbcfg.g_channel_info[0], len(vbcfg.g_channel_info[3])) + vbcfg.g_channel_info[3]
+                       except Exception, err:
+                               vbcfg.ERR(err)
+                               return (False, None)
+               else:
+                       return (False, None)
+               return (True, data)
 
 
-       def _serviceStarted(self):
-               try:
-                       self._ssm.setStatus(0, 0, 0)
-                       self._currentServicePositionTimer.start(1000)
-               except Exception, ErrMsg:
-                       print ErrMsg
-
-       def _serviceEOF(self):
-               (position,length) = self.getVodPlayTime()
-               self._ssm.setStatus(length, length, 1)
-               print "service EOF"
-               self._currentServicePositionTimer.stop()
-
-       def _layoutFinished(self):
-               global __gval__
-               __gval__.hbbtv_handelr._soft_volume = -1
-               self.setTitle(_('HbbTV Plugin'))
-               command_util = getCommandUtil()
-               profile = self._profile
-               (sid, onid, tsid, name, orgid) = getChannelInfos()
-               params = struct.pack('!IIIIII', orgid, profile, sid, onid, tsid, len(name)) + name
-               if self._use_ait:
-                       command_util.sendCommand('OP_HBBTV_UNLOAD_AIT')
-                       time.sleep(1)
-                       command_util.sendCommand('OP_HBBTV_LOAD_AIT', params, 1)
-                       return
-               command_util.sendCommand('OP_HBBTV_LOAD_AIT', params)
-               time.sleep(1)
-               command_util.sendCommand('OP_HBBTV_OPEN_URL', self._url)
+       def _CB_OOIF_BROADCAST_PLAY(self, result, packet):
+               if vbcfg.g_service is not None:
+                       self._session.nav.playService(vbcfg.g_service)
+               self.videobackend_activate = False
+               return (True, None)
 
 
-       def _cb_close_window(self):
-               self._closeTimer.start(1000)
+       def _CB_OOIF_BROADCAST_STOP(self, result, packet):
+               vbcfg.g_service = self._session.nav.getCurrentlyPlayingServiceReference()
+               self._session.nav.stopService()
+               self.videobackend_activate = True
+               return (True, None)
 
 
-       def _do_close(self):
-               self._closeTimer.stop()
-               command_server = getCommandServer()
-               try:
-                       if self._cb_set_page_title in command_server.onSetPageTitleCB:
-                               command_server.onSetPageTitleCB.remove(self._cb_set_page_title)
-               except Exception, ErrMsg: pass
-               try:
-                       if self._cb_close_window in command_server.onHbbTVCloseCB:
-                               command_server.onHbbTVCloseCB.remove(self._cb_close_window)
-               except Exception, ErrMsg: pass
-               try:
-                       if self._cb_closed_func is not None:
-                               self._cb_closed_func()
-               except: pass
-               restoreResolution()
-               fbClass.getInstance().unlock()
-               eRCInput.getInstance().unlock()
-               self.close()
-
-       def _cb_set_page_title(self, title=None):
-               print "page title :",title
-               if title is None:
-                       return
-               self.setTitle(title)
+       def _CB_OOIF_BROADCAST_CHECK(self, result, packet):
+               if self._session.nav.getCurrentService() is None:
+                       return (False, None)
+               return (True, None)
 
 
-class HbbTVHelper(Screen):
-       skin = """<screen name="HbbTVHelper" position="0,0" size="0,0" backgroundColor="transparent" flags="wfNoBorder" title=" "></screen>"""
+class VBMain(Screen):
+       skin = """<screen name="VBMAIN" position="0,0" size="0,0" backgroundColor="transparent" flags="wfNoBorder" title=" "></screen>"""
        def __init__(self, session):
        def __init__(self, session):
-               global __gval__
-               __gval__.hbbtv_handelr = HandlerHbbTV(session)
-               __gval__.command_server = ServerFactory().doListenUnixTCP('/tmp/.sock.hbbtv.url', __gval__.hbbtv_handelr)
-
                Screen.__init__(self, session)
 
                Screen.__init__(self, session)
 
-               self._session = session
+               self.vbcallback = None
+               self.vbhandler = VBHandler(session)
+               self.vbserver = VBServerThread()
+               self.vbserver.open(1)
+               self.vbserver.start()
 
 
-               self._restart_opera()
+               # comment for dev
+               self.restart_browser()
+               vbcfg.LOG("browser start")
 
                self._timer_infobar = eTimer()
 
                self._timer_infobar = eTimer()
-               self._timer_infobar.callback.append(self._cb_registrate_infobar)
+               self._timer_infobar.callback.append(self._cb_register_infobar)
                self._timer_infobar.start(1000)
 
                self._timer_infobar.start(1000)
 
-               self._excuted_browser = False
-               self._profile = 0
-
-               __gval__.command_util = BrowserCommandUtil()
-
-               global _g_ssm_
-               if _g_ssm_ is None:
-                       _g_ssm_ = SimpleSharedMemory()
-                       _g_ssm_.doConnect()
-
-               self._callbackStartStop = None
-
-               self.__et = ServiceEventTracker(screen=self, eventmap={
-                               iPlayableService.evHBBTVInfo: self._cb_detectedAIT,
-                               iPlayableService.evUpdatedInfo: self._cb_updateInfo
+               self._event = ServiceEventTracker(screen=self, eventmap={
+                               iPlayableService.evHBBTVInfo: self._cb_ait_detected,
+                               iPlayableService.evUpdatedInfo: self._cb_info_updated
                        })
                self._applicationList = None
                        })
                self._applicationList = None
+               self._app_info = None
 
                try:
                        from Screens.InfoBarGenerics import gHbbtvApplication
 
                try:
                        from Screens.InfoBarGenerics import gHbbtvApplication
-                       self.mVuplusBox = gHbbtvApplication.getUseAit()
+                       self.m_vuplus = gHbbtvApplication.getUseAit()
                except:
                except:
-                       self.mVuplusBox = False
+                       self.m_vuplus = False
 
 
-       def _cb_detectedAIT(self):
-               name = self._cb_ready_for_ait()
-               if name is not None and self.mVuplusBox:
-                       from Screens.InfoBarGenerics import gHbbtvApplication
-                       gHbbtvApplication.setApplicationName(str(name))
-
-       def _cb_updateInfo(self):
-               if not self._excuted_browser:
-                       command_util = getCommandUtil()
-                       command_util.sendCommand('OP_HBBTV_UNLOAD_AIT')
-               if self.mVuplusBox:
-                       from Screens.InfoBarGenerics import gHbbtvApplication
-                       gHbbtvApplication.setApplicationName("")
-               #self._applicationList = None
-
-       def _cb_registrate_infobar(self):
+       def _cb_register_infobar(self):
                if InfoBar.instance:
                        self._timer_infobar.stop()
                        if self._cb_hbbtv_activated not in InfoBar.instance.onHBBTVActivation:
                                InfoBar.instance.onHBBTVActivation.append(self._cb_hbbtv_activated)
                if InfoBar.instance:
                        self._timer_infobar.stop()
                        if self._cb_hbbtv_activated not in InfoBar.instance.onHBBTVActivation:
                                InfoBar.instance.onHBBTVActivation.append(self._cb_hbbtv_activated)
+               vbcfg.DEBUG("registred HbbTV in InfoBar")
 
 
-       def _cb_ready_for_ait(self):
-               setChannelInfo(None, None, None, None, None)
-
-               service = self._session.nav.getCurrentService()
-               info = service and service.info()
-               if info is not None:
-                       sid = info.getInfo(iServiceInformation.sSID)
-                       onid = info.getInfo(iServiceInformation.sONID)
-                       tsid = info.getInfo(iServiceInformation.sTSID)
-                       name = info.getName()
-                       if name is None:
-                               name = ""
-
-                       pmtid = info.getInfo(iServiceInformation.sPMTPID)
-                       demux = info.getInfoString(iServiceInformation.sLiveStreamDemuxId)
-
-                       from aitreader import eAITSectionReader
-                       reader = eAITSectionReader(demux, pmtid, sid)
-                       if reader.doOpen(info, self.mVuplusBox):
-                               reader.doParseApplications()
-                               reader.doDump()
-                       else:   print "no data!!"
-
-                       try:
-                               self._applicationList = reader.getApplicationList()
-                               if len(self._applicationList) > 0:
-                                       orgid = int(self._applicationList[0]["orgid"])
-                                       setChannelInfo(sid, onid, tsid, name, orgid)
-                                       return self._applicationList[0]["name"]
-                       except: pass
-               return None
-
-       def _cb_hbbtv_activated(self, title=None, url=None):
-               if not self._is_browser_running():
+       def _cb_hbbtv_activated(self, url=None, app_info=None):
+               if not self.check_browser():
                        message = _("HbbTV Browser was not running.\nPlease running browser before start HbbTV Application.")
                        message = _("HbbTV Browser was not running.\nPlease running browser before start HbbTV Application.")
-                       self._session.open(MessageBox, message, MessageBox.TYPE_INFO)
-                       return
-               service = self._session.nav.getCurrentlyPlayingServiceReference()
-               setBeforeService(service)
-               self._start_hbbtv_application(title, url)
-
-       def _start_hbbtv_application(self, title, url):
-               use_ait = False
-               tmp_url = self.getStartHbbTVUrl()
-               if url is None:
-                       url = tmp_url
-               if strIsEmpty(url):
-                       print "can't get url of hbbtv!!"
-                       return
-               print "success to get url of hbbtv!! >>", url
-               if self._excuted_browser:
-                       print "already excuted opera browser!!"
+                       self.session.open(MessageBox, message, MessageBox.TYPE_INFO)
                        return
                        return
+               self.start_hbbtv_application(url, app_info)
 
 
-               if isNeedRestart():
-                       self._restart_opera()
-                       time.sleep(2)
-                       setNeedRestart(False)
-
-               for x in self._applicationList:
-                       control_code = int(x["control"])
-                       tmp_url = x["url"]
-                       if tmp_url == url and control_code == 1:
-                               use_ait = True
-               self._excuted_browser = True
-               self._session.open(HbbTVWindow, url, self._cb_closed_browser, use_ait, self._profile)
-
-       def _cb_closed_browser(self):
-               self._excuted_browser = False
-
-       def _start_opera(self):
-               if not self._is_browser_running():
-                       global HBBTVAPP_PATH
-                       global __gval__
-                       start_command = '%s/launcher start %d %d'%(HBBTVAPP_PATH, __gval__.resX, __gval__.resY)
-                       os.system(start_command)
-               return True
-
-       def _stop_opera(self):
-               global HBBTVAPP_PATH
-               try:    os.system('%s/launcher stop'%(HBBTVAPP_PATH))
-               except: pass
-               return True
+       def _cb_ait_detected(self):
+               vbcfg.g_channel_info = None
+               self._applicationList = None
+               self._app_info = self.get_autostart_application()
+               vbcfg.DEBUG("detected AIT")
+
+       def _cb_info_updated(self):
+               vbcfg.g_service = self.session.nav.getCurrentlyPlayingServiceReference()
+               vbcfg.DEBUG("updated channel info")
+
+       def start_hbbtv_application(self, url, app_info):
+               if vbcfg.need_restart:
+                       self.restart_browser()
+                       os.time.sleep(2)
+                       vbcfg.need_restart = False
+
+               if not app_info:
+                       app_info = self._app_info
+               self.session.open(HbbTVWindow, url, app_info)
+
+       def menu_toggle_browser(self, callback=None):
+               mode = []
+               self.vbcallback = callback
+               if self.check_browser():
+                       mode.append((_('Stop'), 'Stop'))
+               else:
+                       mode.append((_('Start'), 'Start'))
+               self.session.openWithCallback(self.toggle_browser, ChoiceBox, title=_("Please choose one."), list=mode)
 
 
-       def _restart_opera(self):
-               global HBBTVAPP_PATH
-               global __gval__
-               try:    os.system('%s/launcher restart %d %d'%(HBBTVAPP_PATH, __gval__.resX, __gval__.resY))
-               except: pass
-               return True
+       def toggle_browser(self, selected):
+               if selected is not None:
+                       if self.vbcallback:
+                               self.vbcallback()
+                       try:
+                               mode = selected[1]
+                               if mode == 'Start':
+                                       if not self.check_browser():
+                                               self.start_browser()
+                               elif mode == 'Stop':
+                                       self.stop_browser()
 
 
-       def getStartHbbTVUrl(self):
-               url, self._profile = None, 0
-               if self._applicationList is not None:
-                       for u in self._applicationList:
-                               if u["control"] in (1, -1):
-                                       url = u["url"]
-                                       self._profile = u["profile"]
-               if url is None:
-                       service = self._session.nav.getCurrentService()
-                       info = service and service.info()
-                       if info:
-                               url = info.getInfoString(iServiceInformation.sHBBTVUrl)
-               return url
+                       except Exception, ErrMsg:
+                               vbcfg.ERR("toggle browser: %s" % ErrMsg)
 
 
-       def showApplicationSelectionBox(self):
+       def menu_hbbtv_applications(self):
                applications = []
                applications = []
-
-               if self.getStartHbbTVUrl():
+               if self._applicationList is not None:
                        for x in self._applicationList:
                                applications.append((x["name"], x))
                        for x in self._applicationList:
                                applications.append((x["name"], x))
-               else: applications.append((_("No detected HbbTV applications."), None))
-               self._session.openWithCallback(self._application_selected, ChoiceBox, title=_("Please choose an HbbTV application."), list=applications)
+               else:
+                       applications.append((_("No detected HbbTV applications."), None))
+               self.session.openWithCallback(self.start_application_selected, ChoiceBox, title=_("Please choose an HbbTV application."), list=applications)
 
 
-       def _application_selected(self, selected):
-               print selected
-               try:
-                       if selected[1] is None: return
-                       self._cb_hbbtv_activated(selected[1]["name"], selected[1]["url"])
-               except Exception, ErrMsg: print ErrMsg
-
-       def showBrowserConfigBox(self, callback=None):
-               start_stop_mode = []
-               self._callbackStartStop = callback
-               if self._is_browser_running():
-                       start_stop_mode.append((_('Stop'),'Stop'))
-               else:   start_stop_mode.append((_('Start'),'Start'))
-               self._session.openWithCallback(self._browser_config_selected, ChoiceBox, title=_("Please choose one."), list=start_stop_mode)
-
-       def _browser_config_selected(self, selected):
-               if selected is None:
-                       return
-               if self._callbackStartStop is not None:
-                       self._callbackStartStop()
-               try:
-                       mode = selected[1]
-                       if mode == 'Start':
-                               if not self._is_browser_running():
-                                       self._start_opera()
-                       elif mode == 'Stop':
-                               self._stop_opera()
-               except Exception, ErrMsg: print "Config ERR :", ErrMsg
-
-       def _is_browser_running(self):
+       def start_application_selected(self, selected):
+               vbcfg.DEBUG(selected)
                try:
                try:
-                       global HBBTVAPP_PATH
-                       ret = os.popen('%s/launcher check'%(HBBTVAPP_PATH)).read()
-                       return ret.strip() != "0"
+                       if selected[1] is not None:
+                               self._cb_hbbtv_activated(selected[1]["url"], selected[1])
                except Exception, ErrMsg:
                except Exception, ErrMsg:
-                       print "Check Browser Running ERR :", ErrMsg
-               return False
-
-       def doChangeChannel(self, _sid, _tsid):
-               root = eServiceReference(service_types_tv)
-               if root is None:
-                       return False
-               serviceList = eServiceCenter.getInstance().list(root)
-               if serviceList is None:
-                       return False
-               while True:
-                       service = serviceList.getNext()
-                       if service is None or not service.valid():
-                               break
-
-                       #1:0:19:2840:3FB:1:C00000:0:0:0:
-                       serviceRef = service.toString()
-                       if strIsEmpty(serviceRef):
-                               continue
-                       serviceRefItems = serviceRef.split(":")
-                       if len(serviceRefItems) < 5:
-                               continue
-
-                       sid      = serviceRefItems[3]
-                       tsid = serviceRefItems[4]
-                       if sid == _sid and tsid == _tsid:
-                               self._session.nav.playService(eServiceReference(serviceRef))
-                               service = self._session.nav.getCurrentlyPlayingServiceReference()
-                               setBeforeService(service)
-                               return True
-               return False
+                       vbcfg.ERR(ErrMsg)
 
 
-class OperaBrowserSetting:
-       def __init__(self):
-               self._settingFileName = '/usr/local/hbb-browser/home/setting.ini'
-               self._start = None
-               self._type = None
-               self._keymap = None
-               self._read()
-       def _read(self):
-               f = open(self._settingFileName)
-               for line in f.readlines():
-                       if line.startswith('start='):
-                               tmp = line[6:len(line)-1].split()
-                               self._start = tmp[0]
-                               if len(tmp) > 1:
-                                       self._type = int(tmp[1])
-                               else:   self._type = 0
-                       elif line.startswith('keymap='):
-                               self._keymap = line[7:len(line)-1]
-               f.close()
-       def _write(self):
-               tmpstr = []
-               tmpstr.append('start=%s %d\n' % (self._start, self._type))
-               tmpstr.append('keymap=%s\n' % (self._keymap))
-               f = open(self._settingFileName, 'w')
-               f.writelines(tmpstr)
-               f.close()
-       def setData(self, start, types=0, keymap="us-rc"):
-               self._start = start
-               self._type = types
-               self._keymap = keymap
-               self._write()
-       def getData(self):
-               return {
-                       'start':self._start,
-                       'type':self._type,
-                       'keymap':self._keymap,
-               }
-
-class OperaBrowserPreferenceWindow(ConfigListScreen, Screen):
-       skin = """
-               <screen position="center,120" size="600,350" title="Preference">
-                       <widget name="url" position="5,0" size="590,100" valign="center" font="Regular;20" />
-                       <widget name="config" position="0,100" size="600,200" scrollbarMode="showOnDemand" />
-
-                       <ePixmap pixmap="skin_default/buttons/red.png" position="310,310" size="140,40" alphatest="on" />
-                       <ePixmap pixmap="skin_default/buttons/green.png" position="150,310" size="140,40" alphatest="on" />
-
-                       <widget source="key_red" render="Label" position="310,310" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#9f1313" foregroundColor="#ffffff" transparent="1" />
-                       <widget source="key_green" render="Label" position="150,310" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#1f771f" foregroundColor="#ffffff" transparent="1" />
-               </screen>
-               """
-       def __init__(self, session, currentUrl):
-               self.session = session
-               Screen.__init__(self, session)
-
-               self.menulist = []
-               ConfigListScreen.__init__(self, self.menulist)
-
-               self["actions"] = ActionMap(["OkCancelActions", "ShortcutActions", "WizardActions", "ColorActions", "SetupActions", ], {
-                       "red"    : self.keyRed,
-                       "green"  : self.keyGreen,
-                       "ok"     : self.keyOK,
-                       "cancel" : self.keyRed
-               }, -2)
-               self["key_red"] = StaticText(_("Cancel"))
-               self["key_green"] = StaticText(_("Save"))
-               self["url"] = Label()
-
-               self._currentPageUrl = currentUrl
-               if self._currentPageUrl is None:
-                       self._currentPageUrl = ''
-               self._startPageUrl = None
-               self._keymapType = None
-               self.makeMenuEntry()
-               self.onLayoutFinish.append(self.layoutFinished)
-
-       def layoutFinished(self):
-               self.setTitle(_('Preference'))
-
-       def updateStartPageUrl(self):
-               if self.menuItemStartpage.value == "startpage":
-                       self["url"].setText(self._startPageUrl)
-               elif self.menuItemStartpage.value == "current":
-                       self["url"].setText(self._currentPageUrl)
-               elif self.menuItemStartpage.value == "direct":
-                       self["url"].setText('')
-
-       def keyGreen(self):
-               url = self["url"].getText()
-               if strIsEmpty(url):
-                       self.session.open(MessageBox, _('Invalid URL!!(Empty)\nPlease, Input to the URL.'), type = MessageBox.TYPE_INFO)
-                       return
-               mode = 0
-               if url.find('/usr/local/manual') > 0:
-                       mode = 1
-               self._keymapType = self.menuItemKeyboardLayout.value
-               OperaBrowserSetting().setData(url, mode, self._keymapType)
-               command_util = getCommandUtil()
-               command_util.sendCommand('OP_BROWSER_NEED_RELOAD_KEYMAP')
-               self.close()
-
-       def keyRed(self):
-               self.close()
-
-       def keyOK(self):
-               def _cb_directInputUrl(data):
-                       if strIsEmpty(data):
-                               return
-                       self["url"].setText(data)
-               if self.menuItemStartpage.value == "direct":
-                       self.session.openWithCallback(_cb_directInputUrl, VirtualKeyBoard, title=(_("Please enter URL here")), text='http://')
-
-       def keyLeft(self):
-               ConfigListScreen.keyLeft(self)
-               self.updateStartPageUrl()
-
-       def keyRight(self):
-               ConfigListScreen.keyRight(self)
-               self.updateStartPageUrl()
-
-       def getKeymapTypeList(self):
-               types = []
-               for f in os.listdir("/usr/local/hbb-browser/keymap"):
-                       filesplit = f.split('.')
-                       if len(filesplit) < 2:
-                               continue
-                       types.append((filesplit[1], filesplit[1]))
-               types.sort()
-               return types
-
-       def makeMenuEntry(self):
-               l = []
-               l.append(("startpage", _("Start Page")))
-               if not strIsEmpty(self._currentPageUrl):
-                       l.append(("current", _("Current Page")))
-               l.append(("direct", _("Direct Input")))
-               self.menuItemStartpage = ConfigSelection(default="startpage", choices = l)
-               self.menuEntryStartpage = getConfigListEntry(_("Startpage"), self.menuItemStartpage)
-
-               kl = self.getKeymapTypeList()
-
-               try:
-                       d = OperaBrowserSetting().getData()
-                       self._startPageUrl = d['start']
-                       self._keymapType = d['keymap']
-                       #d['type']
-               except: self._startPageUrl = 'http://vuplus.com'
-               self.updateStartPageUrl()
-
-               if self._keymapType is None or len(self._keymapType) == 0:
-                       self._keymapType = "us-rc"
-               self.menuItemKeyboardLayout = ConfigSelection(default=self._keymapType, choices = kl)
-               self.menuEntryKeyboardLayout = getConfigListEntry(_("Keyboard Layout"), self.menuItemKeyboardLayout)
-               self.resetMenuList()
-
-       def resetMenuList(self):
-               self.menulist = []
-               self.menulist.append(self.menuEntryStartpage)
-               self.menulist.append(self.menuEntryKeyboardLayout)
-
-               self["config"].list = self.menulist
-               self["config"].l.setList(self.menulist)
-
-class BookmarkEditWindow(ConfigListScreen, Screen):
-       CATEGORY,BOOKMARK = 0,1
-       skin = """
-               <screen position="center,center" size="600,140" title="Bookmark Edit">
-                       <widget name="config" position="0,0" size="600,100" scrollbarMode="showOnDemand" />
-
-                       <ePixmap pixmap="skin_default/buttons/red.png" position="310,100" size="140,40" alphatest="on" />
-                       <ePixmap pixmap="skin_default/buttons/green.png" position="150,100" size="140,40" alphatest="on" />
-
-                       <widget source="key_red" render="Label" position="310,100" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#9f1313" foregroundColor="#ffffff" transparent="1" />
-                       <widget source="key_green" render="Label" position="150,100" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#1f771f" foregroundColor="#ffffff" transparent="1" />
-
-                       <widget name="VKeyIcon" pixmap="skin_default/buttons/key_text.png" position="0,100" zPosition="10" size="35,25" transparent="1" alphatest="on" />
-
-               </screen>
-               """
-       def __init__(self, session, _mode, _type, _data, _bm):
-               self.mMode = _mode
-               self.mType = _type
-               self.mData = _data
-               self.mSession = session
-               self.mBookmarkManager = _bm
-
-               if _data is not None:
-                       print _data.mId
-
-               Screen.__init__(self, session)
-
-               self.menulist = []
-               ConfigListScreen.__init__(self, self.menulist)
-
-               self["actions"] = ActionMap(["OkCancelActions", "ColorActions",], {
-                       "ok"     : self.keyGreen,
-                       "green"  : self.keyGreen,
-                       "red"    : self.keyRed,
-                       "cancel" : self.keyRed,
-               }, -2)
-
-               self["VKeyIcon"] = Pixmap()
-               self["key_red"] = StaticText(_("Cancel"))
-               self["key_green"] = StaticText(_("Save"))
-
-               self.menuItemTitle = None
-               self.menuItemUrl   = None
-               self.menuItemName  = None
-
-               self.menuEntryName = None
-               self.menuEntryTitle = None
-               self.menuEntryUrl = None
-
-               self.makeConfigList()
-               self.onLayoutFinish.append(self.layoutFinished)
+       def get_autostart_application(self):
+               if self._applicationList is None:
+                       service = self.session.nav.getCurrentService()
+                       info = service and service.info()
+                       if info is not None:
+                               sid = info.getInfo(iServiceInformation.sSID)
+                               onid = info.getInfo(iServiceInformation.sONID)
+                               tsid = info.getInfo(iServiceInformation.sTSID)
+                               name = info.getName()
+                               vbcfg.g_channel_info = (sid, onid, tsid, name)
+
+                               pmtid = info.getInfo(iServiceInformation.sPMTPID)
+                               demux = info.getInfoString(iServiceInformation.sLiveStreamDemuxId)
+                               vbcfg.DEBUG("demux = %s, pmtid = 0x%x, sid = 0x%x" % (demux, pmtid, sid))
+
+                               from aitreader import eAITSectionReader
+                               reader = eAITSectionReader(demux, pmtid, sid)
+                               if reader.doOpen(info, self.m_vuplus):
+                                       reader.doParseApplications()
+                                       reader.doDump()
+                               else:
+                                       vbcfg.ERR("no AIT")
 
 
-       def layoutFinished(self):
-               self.setTitle(_('Bookmark') + ' ' + self.mMode)
+                               try:
+                                       self._applicationList = reader.getApplicationList()
+                               except:
+                                       pass
 
 
-       def selectedItem(self):
-               currentPosition = self["config"].getCurrent()
-               if self.mType == BookmarkEditWindow.CATEGORY:
-                       return (_("Name"), self.menuItemName)
-               else:
-                       if currentPosition == self.menuEntryTitle:
-                               return (_("Title"), self.menuItemTitle)
-                       elif currentPosition == self.menuEntryUrl:
-                               return (_("Url"), self.menuItemUrl)
+               if self._applicationList is not None:
+                       for app in self._applicationList:
+                               if app["control"] in (1, -1):
+                                       return app
                return None
 
                return None
 
-       def showMessageBox(self, text):
-               msg = _("Invalid ") + text + _("!!(Empty)\nPlease, Input to the") + " " + text + "."
-               self.mSession.openWithCallback(self.showVKeyWindow, MessageBox, msg, MessageBox.TYPE_INFO)
-               return False
-
-       def showVKeyWindow(self, data=None):
-               itemTitle = ""
-               itemValue = ""
-               selected = self.selectedItem()
-               if selected is not None:
-                       itemValue = selected[1].value
-                       if strIsEmpty(itemValue):
-                               itemValue = ""
-                       itemTitle = selected[0]
-
-               self.session.openWithCallback(self.cbVKeyWindow, VirtualKeyBoard, title=itemTitle, text=itemValue)
-
-       def cbVKeyWindow(self, data=None):
-               if data is not None:
-                       selected = self.selectedItem()
-                       if selected is not None:
-                               selected[1].setValue(data)
-
-       def saveData(self):
-               if self.mType == BookmarkEditWindow.CATEGORY:
-                       if self.mMode == _('Add'):
-                               categoryName = self.menuItemName.value
-                               if strIsEmpty(categoryName):
-                                       return self.showMessageBox(_("Category Name"))
-                               self.mBookmarkManager.addCategory(categoryName)
-                       else:
-                               if strIsEmpty(self.menuItemName.value):
-                                       return self.showMessageBox(_("Category Name"))
-                               self.mData.mName = self.menuItemName.value
-                               self.mBookmarkManager.updateCategory(self.mData)
-               else:
-                       if self.mMode == _('Add'):
-                               bookmarkTitle = self.menuItemTitle.value
-                               bookmarkUrl = self.menuItemUrl.value
-                               if strIsEmpty(bookmarkTitle):
-                                       self["config"].setCurrentIndex(0)
-                                       return self.showMessageBox(_("Bookmark Title"))
-                               if strIsEmpty(bookmarkUrl):
-                                       self["config"].setCurrentIndex(1)
-                                       return self.showMessageBox(_("Bookmark URL"))
-                               self.mBookmarkManager.addBookmark(bookmarkTitle, bookmarkUrl, self.mData.mParent, 0)
-                       else:
-                               if strIsEmpty(self.menuItemTitle.value):
-                                       self["config"].setCurrentIndex(0)
-                                       return self.showMessageBox(_("Bookmark Title"))
-                               if strIsEmpty(self.menuItemUrl.value):
-                                       self["config"].setCurrentIndex(1)
-                                       return self.showMessageBox(_("Bookmark URL"))
-                               self.mData.mTitle = self.menuItemTitle.value
-                               self.mData.mUrl = self.menuItemUrl.value
-                               self.mBookmarkManager.updateBookmark(self.mData)
+       def start_browser(self):
+               if not self.check_browser():
+                       os.system("%s/%s start"%(vbcfg.APPROOT, vbcfg.APP_RUN))
                return True
 
                return True
 
-       def keyGreen(self):
-               if not self.saveData():
-                       return
-               self.close(True)
-       def keyRed(self):
-               self.close(False)
-       def keyLeft(self):
-               ConfigListScreen.keyLeft(self)
-       def keyRight(self):
-               ConfigListScreen.keyRight(self)
-       def makeConfigList(self):
-               self.menulist = []
-
-               if self.mType == BookmarkEditWindow.CATEGORY:
-                       self.menuItemName = ConfigText(default=self.mData.mName, visible_width=65, fixed_size=False)
-
-                       self.menuEntryName = getConfigListEntry(_("Name"), self.menuItemName)
-
-                       self.menulist.append(self.menuEntryName)
-               else:
-                       self.menuItemTitle = ConfigText(default=self.mData.mTitle, visible_width=65, fixed_size=False)
-                       self.menuItemUrl   = ConfigText(default=self.mData.mUrl, visible_width=65, fixed_size=False)
-
-                       self.menuEntryTitle = getConfigListEntry(_("Title"), self.menuItemTitle)
-                       self.menuEntryUrl = getConfigListEntry(_("Url"), self.menuItemUrl)
-
-                       self.menulist.append(self.menuEntryTitle)
-                       self.menulist.append(self.menuEntryUrl)
-
-               self["config"].list = self.menulist
-               self["config"].l.setList(self.menulist)
-
-class OperaBrowserBookmarkWindow(Screen):
-       skin = """
-               <screen name="HbbTVBrowserBookmarkWindow" position="center,120" size="600,400" title="Bookmark" >
-                       <widget name="bookmarklist" position="0,0" size="600,200" zPosition="10" scrollbarMode="showOnDemand" />
-
-                       <ePixmap pixmap="skin_default/buttons/key_0.png" position="556,330" size="35,30" alphatest="on" />
-                       <widget source="key_0" render="Label" position="258,330" zPosition="1" size="300,30" font="Regular;20" halign="right" valign="center"/>
-
-                       <ePixmap pixmap="skin_default/buttons/red.png" position="5,360" size="140,40" alphatest="on" />
-                       <ePixmap pixmap="skin_default/buttons/green.png" position="155,360" size="140,40" alphatest="on" />
-                       <ePixmap pixmap="skin_default/buttons/yellow.png" position="305,360" size="140,40" alphatest="on" />
-                       <ePixmap pixmap="skin_default/buttons/blue.png" position="450,360" size="140,40" alphatest="on" />
-
-                       <widget source="key_red" render="Label" position="5,360" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#9f1313" foregroundColor="#ffffff" transparent="1" />
-                       <widget source="key_green" render="Label" position="155,360" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#1f771f" foregroundColor="#ffffff" transparent="1" />
-                       <widget source="key_yellow" render="Label" position="305,360" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#a08500" foregroundColor="#ffffff" transparent="1" />
-                       <widget source="key_blue" render="Label" position="450,360" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#18188b" foregroundColor="#ffffff" transparent="1" />
-               </screen>
-               """
-
-       def __init__(self, _session, _url=None, _title=None):
-               self.mUrl = _url
-               self.mTitle = _title
-               self.mBookmarkManager = BookmarkManager.getInstance()
-               self.mSession = _session
-               Screen.__init__(self, _session)
-               self["actions"] = ActionMap(["DirectionActions", "OkCancelActions","ColorActions", "NumberActions"], {
-                               "ok"    : self.keyOK,
-                               "cancel": self.keyCancel,
-                               "red"   : self.keyRed,
-                               "green" : self.keyGreen,
-                               "yellow": self.keyYellow,
-                               "blue"  : self.keyBlue,
-                               "0" : self.keyNumber,
-                       },-2)
-
-               self["key_red"]    = StaticText(_("Exit"))
-               self["key_green"]  = StaticText(_("Add"))
-               self["key_yellow"] = StaticText(_("Edit"))
-               self["key_blue"]   = StaticText(_("Delete"))
-               self["key_0"]      = StaticText(_("Set as Startpage"))
-
-               self.mBookmarkList = self.setBookmarkList()
-               self["bookmarklist"] = MenuList(self.mBookmarkList)
-
-               self.onLayoutFinish.append(self.layoutFinished)
-
-       def layoutFinished(self):
-               self.setTitle(_('Bookmark'))
-
-       def setBookmarkList(self):
-               l = []
-               #self.mBookmarkManager.dump()
-               cd = self.mBookmarkManager.getBookmarkRoot()
-               for ck in cd.iterkeys():
-                       l.append(('# ' + cd[ck].mName, cd[ck]))
-                       bd = cd[ck].mBookmarks
-                       for bk in bd.iterkeys():
-                               l.append(('    - ' + bd[bk].mTitle, bd[bk]))
-               return l
-       def updateBookmarkList(self):
-               self.mBookmarkList = self.setBookmarkList()
-               self["bookmarklist"].setList(self.mBookmarkList)
-       def cbEditWindow(self, ret=False):
-               if not ret:
-                       return
-               self.updateBookmarkList()
-       def getParentCategory(self):
-               idx = self["bookmarklist"].getSelectedIndex()
-               try:
-                       while idx >= 0:
-                               data = self.mBookmarkList[idx][0].strip()
-                               if data[0] == '#':
-                                       return self.mBookmarkList[idx][1]
-                               idx -= 1
-               except: pass
-               return None
-       def isCategoryItem(self):
-               try:
-                       head = self["bookmarklist"].getCurrent()[0].strip()
-                       if head[0] == '#':
-                               return True
-               except: pass
-               return False
-       def keyNumber(self):
-               data = self["bookmarklist"].getCurrent()[1]
-               if strIsEmpty(data.mUrl):
-                       msg = _("Invalid URL. Please check again!!")
-                       self.mSession.open(MessageBox, msg, MessageBox.TYPE_INFO)
-                       return
-               def cbSetStartpage(ret=None):
-                       if ret is None: return
-                       if ret:
-                               data = self["bookmarklist"].getCurrent()[1]
-                               OperaBrowserSetting().setData(data.mUrl, data.mType)
-               msg = _("Do you want to set selected url to the Startpage?")
-               self.mSession.openWithCallback(cbSetStartpage, MessageBox, msg, MessageBox.TYPE_YESNO, default=True)
-
-       def keyGreen(self):
-               def cbGreen(data):
-                       if data is None:
-                               return
-                       if data[1] == 1:
-                               parent = self.getParentCategory()
-                               if parent is None:
-                                       return
-                               if strIsEmpty(self.mTitle):
-                                       return
-                               retAdd = self.mBookmarkManager.addBookmark(self.mTitle, self.mUrl, parent.mId, 0)
-                               if not retAdd:
-                                       msg = _("Current page is already exist.")
-                                       self.mSession.open(MessageBox, msg, MessageBox.TYPE_INFO)
-                               self.cbEditWindow(True)
-                       elif data[1] == 2:
-                               parent = self.getParentCategory()
-                               if parent is None:
-                                       return
-                               b = BookmarkData(0, '', '', parent.mId, 0)
-                               self.mSession.openWithCallback(self.cbEditWindow, BookmarkEditWindow, _('Add'), BookmarkEditWindow.BOOKMARK, b, self.mBookmarkManager)
-                       elif data[1] == 3:
-                               c = CategoryData(0, '')
-                               self.mSession.openWithCallback(self.cbEditWindow, BookmarkEditWindow, _('Add'), BookmarkEditWindow.CATEGORY, c, self.mBookmarkManager)
-               if strIsEmpty(self.mUrl):
-                       l = [(_('Direct Input(Bookmark)'),2,), (_('Direct Input(Category)'),3,)]
-               else:   l = [(_('Currentpage(Bookmark)'),1,), (_('Direct Input(Bookmark)'),2,), (_('Direct Input(Category)'),3,)]
-               self.mSession.openWithCallback(cbGreen, ChoiceBox, title=_("Please choose."), list=l)
-       def keyYellow(self):
-               data = self["bookmarklist"].getCurrent()[1]
-               if self.isCategoryItem():
-                       self.mSession.openWithCallback(self.cbEditWindow, BookmarkEditWindow, _('Edit'), BookmarkEditWindow.CATEGORY, data, self.mBookmarkManager)
-               else:   self.mSession.openWithCallback(self.cbEditWindow, BookmarkEditWindow, _('Edit'), BookmarkEditWindow.BOOKMARK, data, self.mBookmarkManager)
-       def keyBlue(self):
-               def cbBlue(ret=None):
-                       if not ret: return
-                       data = self["bookmarklist"].getCurrent()[1]
-                       if self.isCategoryItem():
-                               self.mBookmarkManager.deleteCategory(data.mId)
-                       else:   self.mBookmarkManager.deleteBookmark(data.mId)
-                       self.updateBookmarkList()
-               if self.isCategoryItem():
-                       msg = _("Do you want to delete the category and the bookmarks?")
-               else:   msg = _("Do you want to delete the bookmark?")
-               self.mSession.openWithCallback(cbBlue, MessageBox, msg, MessageBox.TYPE_YESNO, default=True)
-       def keyOK(self):
-               if self.isCategoryItem(): return
-
-               data = self["bookmarklist"].getCurrent()[1]
-               url = data.mUrl.strip()
-               if len(url) == 0:
-                       self.session.open(MessageBox, _("Can't open selected bookmark.\n   - URL data is empty!!"), type = MessageBox.TYPE_INFO)
-                       return
-               mode = data.mType
-               if mode:
-                       lang = language.getLanguage()
-                       if lang == 'ru_RU' and os.path.exists('/usr/local/manual/ru_RU'):
-                               url = '/usr/local/manual/ru_RU/main.html'
-                       elif lang == 'de_DE' and os.path.exists('/usr/local/manual/de_DE'):
-                               url = '/usr/local/manual/de_DE/main.html'
-               self.close((url, mode))
-       def keyRed(self):
-               self.keyCancel()
-       def keyCancel(self):
-               self.close()
-
-class BrowserHelpWindow(Screen, HelpableScreen):
-       MODE_GLOBAL,MODE_KEYBOARD,MODE_MOUSE = 1,2,3
-       skin = """
-               <screen name="BrowserHelpWindow" position="center,center" size="600,40" title="Browser Help" >
-                       <ePixmap pixmap="skin_default/buttons/red.png" position="5,0" size="140,40" alphatest="on" />
-                       <ePixmap pixmap="skin_default/buttons/green.png" position="155,0" size="140,40" alphatest="on" />
-                       <ePixmap pixmap="skin_default/buttons/yellow.png" position="305,0" size="140,40" alphatest="on" />
-                       <ePixmap pixmap="skin_default/buttons/blue.png" position="450,0" size="140,40" alphatest="on" />
-
-                       <widget source="key_red" render="Label" position="5,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#9f1313" foregroundColor="#ffffff" transparent="1" />
-                       <widget source="key_green" render="Label" position="155,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#1f771f" foregroundColor="#ffffff" transparent="1" />
-                       <widget source="key_yellow" render="Label" position="305,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#a08500" foregroundColor="#ffffff" transparent="1" />
-                       <widget source="key_blue" render="Label" position="450,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#18188b" foregroundColor="#ffffff" transparent="1" />
-               </screen>
-               """
-       def __init__(self, session):
-               Screen.__init__(self, session)
-               HelpableScreen.__init__(self)
-
-               self["key_red"]    = StaticText(_("Exit"))
-               self["key_green"]  = StaticText(_("Global"))
-               self["key_yellow"] = StaticText(_("Mouse"))
-               self["key_blue"]   = StaticText(_("Keyboard"))
-
-               self["actions"] = ActionMap(["DirectionActions", "OkCancelActions","ColorActions"], {
-                               "ok"    : self.keyRed,
-                               "cancel": self.keyRed,
-                               "red"   : self.keyRed,
-                               "green" : self.keyGreen,
-                               "yellow": self.keyYellow,
-                               "blue"  : self.keyBlue,
-                       },-2)
-
-               self.showHelpTimer = eTimer()
-               self.showHelpTimer.callback.append(self.cbShowHelpTimerClosed)
-               self.showHelpTimer.start(500)
-
-               self.onLayoutFinish.append(self.layoutFinished)
-
-       def layoutFinished(self):
-               self.setTitle(_('Browser Help'))
-
-       def cbShowHelpTimerClosed(self):
-               self.showHelpTimer.stop()
-               self.setHelpModeActions(self.MODE_GLOBAL)
-
-       def setHelpModeActions(self, _mode=0):
-               self.helpList = []
-               if _mode == self.MODE_GLOBAL:
-                       self["OkCancelActions"] = HelpableActionMap(self, "OkCancelActions", {
-                               "cancel" : (self.keyPass, _("Exit the Opera browser.")),
-                       })
-                       self["MenuActions"] = HelpableActionMap(self, "MenuActions", {
-                               "menu" : (self.keyPass, _("Show the Menu window.")),
-                       })
-                       self["ColorActions"] = HelpableActionMap(self, "ColorActions", {
-                               "green"  : (self.keyPass, _("Enter Key")),
-                               "yellow" : (self.keyPass, _("Show the Virtual keyboard window.")),
-                               "blue"   : (self.keyPass, _("Backspace Key")),
-                       })
-                       self["EPGSelectActions"] = HelpableActionMap(self, "EPGSelectActions", {
-                               "info" : (self.keyPass, _("Switch to keyboard/mouse mode.")),
-                       })
-
-               elif _mode == self.MODE_MOUSE:
-                       self["DirectionActions"] = HelpableActionMap(self, "DirectionActions", {
-                               "up"    : (self.keyPass, _("It will move the mouse pointer up.")),
-                               "down"  : (self.keyPass, _("It will move the mouse pointer down.")),
-                               "left"  : (self.keyPass, _("It will move the mouse pointer left.")),
-                               "right" : (self.keyPass, _("It will move the mouse pointer right.")),
-                       })
-                       self["OkCancelActions"] = HelpableActionMap(self, "OkCancelActions", {
-                               "ok" : (self.keyPass, _("Left Mouse Button")),
-                       })
-                       self["EPGSelectActions"] = HelpableActionMap(self, "EPGSelectActions", {
-                               "nextBouquet" : (self.keyPass, _("Right Mouse Button")),
-                               "nextService" : (self.keyPass, _("Left Key")),
-                               "prevService" : (self.keyPass, _("Right Key")),
-                       })
-               elif _mode == self.MODE_KEYBOARD:
-                       self["DirectionActions"] = HelpableActionMap(self, "DirectionActions", {
-                               "up"    : (self.keyPass, _("Up Key")),
-                               "down"  : (self.keyPass, _("Down Key")),
-                               "left"  : (self.keyPass, _("Left Key")),
-                               "right" : (self.keyPass, _("Right Key")),
-                       })
-                       self["OkCancelActions"] = HelpableActionMap(self, "OkCancelActions", {
-                               "ok" : (self.keyPass, _("Enter Key")),
-                       })
-                       self["EPGSelectActions"] = HelpableActionMap(self, "EPGSelectActions", {
-                               "nextBouquet" : (self.keyPass, _("PageUp Key")),
-                               "prevBouquet" : (self.keyPass, _("PageDown Key")),
-                               "nextService" : (self.keyPass, _("Go to previous page.")),
-                               "prevService" : (self.keyPass, _("Go to next page.")),
-                       })
-
-               if _mode > 0:
-                       self.showHelp()
-
-       def keyPass(self):
-               pass
-
-       def keyRed(self):
-               self.close()
-       def keyGreen(self):
-               self.setHelpModeActions(self.MODE_GLOBAL)
-       def keyYellow(self):
-               self.setHelpModeActions(self.MODE_MOUSE)
-       def keyBlue(self):
-               self.setHelpModeActions(self.MODE_KEYBOARD)
-
-class OperaBrowser(Screen):
-       MENUBAR_ITEM_WIDTH  = 150
-       MENUBAR_ITEM_HEIGHT = 30
-       SUBMENULIST_WIDTH   = 200
-       SUBMENULIST_HEIGHT  = 25
-       SUBMENULIST_NEXT    = 2
-
-       # menulist->position->y : MENUBAR_ITEM_HEIGHT+30
-       # menulist->size->x     : SUBMENULIST_WIDTH
-       # submenulist->position->x : SUBMENULIST_WIDTH+50+SUBMENULIST_NEXT
-       # submenulist->position->y : MENUBAR_ITEM_HEIGHT+30
-       # submenulist->size->x  : SUBMENULIST_WIDTH
-
-       size = getDesktop(0).size()
-       WIDTH  = int(size.width())
-       HEIGHT = int(size.height())
-       skin =  """
-               <screen name="OperaBrowser" position="0,0" size="%(width)d,%(height)d" backgroundColor="transparent" flags="wfNoBorder" title="Opera Browser">
-                       <widget name="topArea" zPosition="-1" position="0,0" size="1280,60" font="Regular;20" valign="center" halign="center" backgroundColor="#000000" />
-                       <widget name="menuitemFile" position="30,20" size="150,30" font="Regular;20" valign="center" halign="center" backgroundColor="#000000" foregroundColors="#9f1313,#a08500" />
-                       <widget name="menuitemTool" position="180,20" size="150,30" font="Regular;20" valign="center" halign="center" backgroundColor="#000000" foregroundColors="#9f1313,#a08500" />
-                       <widget name="menuitemHelp" position="330,20" size="150,30" font="Regular;20" valign="center" halign="center" backgroundColor="#000000" foregroundColors="#9f1313,#a08500" />
-                       <widget name="menulist" position="50,60" size="200,150" backgroundColor="#000000" zPosition="10" scrollbarMode="showOnDemand" />
-                       <widget name="submenulist" position="252,60" size="200,150" backgroundColor="#000000" zPosition="10" scrollbarMode="showOnDemand" />
-                       <widget name="bottomArea" position="0,%(bottom_pos_y)d" size="%(bottom_size_x)d,80" font="Regular;20" valign="center" halign="center" backgroundColor="#000000" />
-               </screen>
-               """ % { 'width'  :WIDTH,
-                       'height' :HEIGHT,
-                       'bottom_pos_y'  :HEIGHT-80,
-                       'bottom_size_x' :WIDTH }
-
-       COMMAND_MAP = {}
-       MENUITEMS_LIST =[]
-       def __init__(self, session, url=None, isWebAppMode=False):
-               Screen.__init__(self, session)
-               self["actions"] = ActionMap(["DirectionActions", "MenuActions", "OkCancelActions"], {
-                        "cancel"      : self.keyCancel
-                       ,"ok"          : self.keyOK
-                       ,"left"        : self.keyLeft
-                       ,"right"       : self.keyRight
-                       ,"up"          : self.keyUp
-                       ,"down"        : self.keyDown
-                       ,"menu"        : self.keyMenu
-               }, -2)
-
-               self.UpdateLanguageCB()
-
-               self._terminatedBrowser = True
-               self._enableKeyEvent = True
-               self._currentPageUrl = None
-               self._currentPageTitle = None
-               self.menubarCurrentIndex = 0
-               self.lvMenuItems = []
-               self.lvSubMenuItems = []
-
-               self["topArea"]    = Label()
-               self["bottomArea"] = Label()
-
-               self["menuitemFile"] = MultiColorLabel()# modify menu
-               self["menuitemTool"] = MultiColorLabel()
-               self["menuitemHelp"] = MultiColorLabel()
-
-               self["menulist"] = MenuList(self.setListOnView())
-               self["submenulist"] = MenuList(self.setSubListOnView())
-
-               self.toggleMainScreenFlag = True
-               self.toggleListViewFlag = False
-               self.toggleSubListViewFlag = False
-               self.currentListView = self["menulist"]
-
-               self.onLayoutFinish.append(self.layoutFinished)
-
-               self._onCloseTimer = eTimer()
-               self._onCloseTimer.callback.append(self._cb_onClose)
-
-               self.paramUrl = url
-               self.paramIsWebAppMode = isWebAppMode
-               language.addCallback(self.UpdateLanguageCB)
-
-       def UpdateLanguageCB(self):
-               # modify menu
-               self.MENUITEMS_LIST = [
-                       [(_('Open Startpage'), None), (_('Open URL'), None), (_('Start/Stop'),None), (_('Exit'), None)],
-                       [(_('Bookmark'), None), (_('Preference'), None)],
-                       [(_('About'), None), (_('Help'), None)]]
-               self.COMMAND_MAP = {}
-               self.COMMAND_MAP[_('Exit')] = self._cmd_on_Exit
-               self.COMMAND_MAP[_('Help')] = self._cmd_on_Help
-               self.COMMAND_MAP[_('About')] = self._cmd_on_About
-               self.COMMAND_MAP[_('Open URL')] = self._cmd_on_OpenUrl
-               self.COMMAND_MAP[_('Start/Stop')] = self._cmd_on_StartStop
-               self.COMMAND_MAP[_('Bookmark')] = self._cmd_on_Bookmark
-               self.COMMAND_MAP[_('Preference')] = self._cmd_on_Preference
-               self.COMMAND_MAP[_('Return')] = self._cmd_on_ReturnToBrowser
-               self.COMMAND_MAP[_('Open Startpage')] = self._cmd_on_OpenStartpage
-
-       def enableRCMouse(self, mode): #mode=[0|1]|[False|True]
-               rcmouse_path = "/proc/stb/fp/mouse"
-               if os.path.exists(rcmouse_path):
-                       os.system("echo %d > %s" % (mode, rcmouse_path))
-
-       def layoutFinished(self):
-               self["menuitemFile"].setText(_("File"))# modify menu
-               self["menuitemTool"].setText(_("Tools"))
-               self["menuitemHelp"].setText(_("Help"))
-
-               self["menulist"].hide()
-               self["submenulist"].hide()
-
-               self["bottomArea"].setText(_("Opera Web Browser Plugin v1.0"))
-               self.setTitle(_("BrowserMain"))
-               self.selectMenuitem()
-
-               if self.paramUrl is not None:
-                       self.keyMenu()
-                       if self.paramIsWebAppMode:
-                               self.cbUrlText(data=self.paramUrl, mode=1, opcode='OP_BROWSER_OPEN_YOUTUBETV')
-                       else:   self.cbUrlText(data=self.paramUrl, mode=1)
-
-       def selectMenuitem(self):
-               tmp = [self["menuitemFile"], self["menuitemTool"], self["menuitemHelp"]]# modify menu
-               self["menuitemFile"].setForegroundColorNum(0)
-               self["menuitemTool"].setForegroundColorNum(0)
-               self["menuitemHelp"].setForegroundColorNum(0)
-               tmp[self.menubarCurrentIndex].setForegroundColorNum(1)
-
-       def popupCloseAll(self):
-               self.keyLeft()
-               self.keyLeft()
-               self.keyUp()
-               self.keyCancel()
-
-       def setListOnView(self):
-               l = self.MENUITEMS_LIST[self.menubarCurrentIndex]
-               if not self._terminatedBrowser and self.menubarCurrentIndex == 0: # running
-                       l = [(_('Return'), None)]
-               self.lvMenuItems = l #self.MENUITEMS_LIST[self.menubarCurrentIndex]
-               return self.lvMenuItems
-
-       def setSubListOnView(self):
-               self.lvSubMenuItems = []
-               xl = self["menulist"].getCurrent()[1]
-               if xl is None: return []
-               for x in xl:
-                       self.lvSubMenuItems.append((x,None))
-               return self.lvSubMenuItems
-
-       def toggleMainScreen(self):
-               if not self.toggleMainScreenFlag:
-                       self.show()
-               else:   self.hide()
-               self.toggleMainScreenFlag = not self.toggleMainScreenFlag
-
-       def toggleListView(self):
-               if not self.toggleListViewFlag:
-                       self["menulist"].show()
-               else:   self["menulist"].hide()
-               self.toggleListViewFlag = not self.toggleListViewFlag
-
-       def toggleSubListView(self):
-               if not self.toggleSubListViewFlag:
-                       self["submenulist"].show()
-               else:   self["submenulist"].hide()
-               self.toggleSubListViewFlag = not self.toggleSubListViewFlag
-
-       def setCurrentListView(self, listViewIdx):
-               if listViewIdx == 0:
-                       self.currentListView = None
-               elif listViewIdx == 1:
-                       self.currentListView = self["menulist"]
-               elif listViewIdx == 2:
-                       self.currentListView = self["submenulist"]
-
-       def _cb_onClose(self):
-               self._onCloseTimer.stop()
-               command_server = getCommandServer()
-               try:
-                       if self._on_close_window in command_server.onHbbTVCloseCB:
-                               command_server.onHbbTVCloseCB.remove(self._on_close_window)
-               except Exception, ErrMsg: pass
+       def stop_browser(self):
+               VBController.command('CONTROL_EXIT')
+               return True
                try:
                try:
-                       if self._on_setPageTitle in command_server.onSetPageTitleCB:
-                               command_server.onSetPageTitleCB.remove(self._on_setPageTitle)
-               except Exception, ErrMsg: pass
-               self._on_setPageTitle(_('Opera Browser'))
-               self.enableRCMouse(False)
-               self.toggleMainScreen()
-               restoreResolution()
-               fbClass.getInstance().unlock()
-               eRCInput.getInstance().unlock()
-               self._terminatedBrowser = True
-               self._enableKeyEvent = True
-               #if not self.toggleListViewFlag:
-               #       self.keyDown()
-
-               self._currentPageUrl = ''
-               if self.paramUrl is not None:
-                       self.keyCancel()
-               else:
-                       self.keyRight()
-                       self.keyLeft()
-
-       def _on_setPageTitle(self, title=None):
-               print "Title :",title
-               if title is None:
-                       return
-               self.setTitle(title)
-
-       def cbUrlText(self, data=None, mode=0, opcode='OP_BROWSER_OPEN_URL'):
-               global _g_helper
-               if not _g_helper._is_browser_running():
-                       return
-               print "Inputed Url :", data, mode
-               if strIsEmpty(data):
-                       return
-               #self.hideSubmenu()
-               command_server = getCommandServer()
-               if self._on_setPageTitle not in command_server.onSetPageTitleCB:
-                       command_server.onSetPageTitleCB.append(self._on_setPageTitle)
-               if self._on_close_window not in command_server.onHbbTVCloseCB:
-                       command_server.onHbbTVCloseCB.append(self._on_close_window)
-               self.toggleMainScreen()
-               self.enableRCMouse(True)
-
-               fbClass.getInstance().lock()
-               eRCInput.getInstance().lock()
-
-               #setResolution(1280, 720)
-
-               command_util = getCommandUtil()
-               command_util.sendCommand(opcode, data, mode)
-               self._terminatedBrowser = False
-               self._enableKeyEvent = False
-
-               global __gval__
-               __gval__.hbbtv_handelr._soft_volume = -1
-
-       def _on_close_window(self):
-               self._onCloseTimer.start(1000)
-
-       def _cb_bookmarkWindowClosed(self, data=None):
-               if data is None:
-                       return
-               (url, mode) = data
-               global _g_helper
-               if not _g_helper._is_browser_running():
-                       message = _("Opera Browser was not running.\nPlease running browser using [File]>[Start/Stop] menu.")
-                       self.session.open(MessageBox, message, MessageBox.TYPE_INFO)
-                       return
-               self.cbUrlText(url, mode)
+                       os.system("%s/%s stop"%(vbcfg.APPROOT, vbcfg.APP_RUN))
+               except:
+                       pass
+               return True
 
 
-       def _cmd_on_OpenUrl(self):
-               global _g_helper
-               if not _g_helper._is_browser_running():
-                       message = _("Opera Browser was not running.\nPlease running browser using [File]>[Start/Stop] menu.")
-                       self.session.open(MessageBox, message, MessageBox.TYPE_INFO)
-                       return
-               self.session.openWithCallback(self.cbUrlText, VirtualKeyBoard, title=(_("Please enter URL here")), text='http://')
-       def _cmd_on_About(self):
-               self.session.open(MessageBox, _('Opera Web Browser Plugin v1.0'), type = MessageBox.TYPE_INFO)
-       def _cmd_on_Exit(self):
-               self.close()
-       def _cb_cmdOnStartSTop(self):
-               self.keyMenu()
-       def _cmd_on_StartStop(self):
-               global _g_helper
-               if _g_helper is None: 
-                       return
-               _g_helper.showBrowserConfigBox(self._cb_cmdOnStartSTop)
-
-       def _cmd_on_Bookmark(self):
-               url = self._currentPageUrl
-               if url is None:
-                       url = ''
-               title = self._currentPageTitle
-               if title is None:
-                       title = ''
-               self.session.openWithCallback(self._cb_bookmarkWindowClosed, OperaBrowserBookmarkWindow, url, title)
-       def _cmd_on_Preference(self):
-               url = self._currentPageUrl
-               if url is None:
-                       url = ''
-               self.session.open(OperaBrowserPreferenceWindow, url)
-       def _cmd_on_OpenStartpage(self):
-               global _g_helper
-               if not _g_helper._is_browser_running():
-                       message = _("Opera Browser was not running.\nPlease running browser using [File]>[Start/Stop] menu.")
-                       self.session.open(MessageBox, message, MessageBox.TYPE_INFO)
-                       return
-               mode = 0
-               start = 'http://vuplus.com'
+       def check_browser(self):
                try:
                try:
-                       d = OperaBrowserSetting().getData()
-                       start = d['start']
-                       mode = d['type']
-               except: pass
-               self.cbUrlText(start, mode)
-       def _cmd_on_ReturnToBrowser(self):
-               self.keyCancel()
-
-       def _cmd_on_Help(self):
-               self.session.open(BrowserHelpWindow)
+                       ret = os.popen('%s/%s check'%(vbcfg.APPROOT, vbcfg.APP_RUN)).read()
+                       return ret.strip() != "0"
+               except Exception, ErrMsg:
+                       vbcfg.ERR("check browser running: %s" % ErrMsg)
+               return False
 
 
-       def doCommand(self, command):
+       def restart_browser(self):
                try:
                try:
-                       self.COMMAND_MAP[command]()
-               except Exception, ErrMsg: print ErrMsg
-
-       def keyOK(self):
-               if not self.toggleMainScreenFlag:
-                       self.keyMenu()
-                       return
-               if not self.toggleListViewFlag:
-                       self.keyDown()
-                       return
-               if self.currentListView.getCurrent()[1] is None:
-                       self.doCommand(self.currentListView.getCurrent()[0])
-                       #self.session.open(MessageBox, _(self.currentListView.getCurrent()[0]), type = MessageBox.TYPE_INFO)
-                       return
-               self.keyRight()
-
-       def updateSelectedMenuitem(self, status):
-               if self.menubarCurrentIndex == 0 and status < 0:
-                       self.menubarCurrentIndex = 2 # modify menu
-               elif self.menubarCurrentIndex == 2 and status > 0: # modify menu
-                       self.menubarCurrentIndex = 0
-               else:   self.menubarCurrentIndex += status
-               self.selectMenuitem()
-
-       def keyLeft(self):
-               if not self.toggleMainScreenFlag:
-                       return
-               if not self.toggleListViewFlag:
-                       self.updateSelectedMenuitem(-1)
-                       return
-               if self.toggleSubListViewFlag:
-                       self.setCurrentListView(1)
-                       self.toggleSubListView()
-                       return
-               #if self.currentListView.getSelectedIndex():
-               self.currentListView.pageUp()
-               self.keyUp()
-               self.keyLeft()
-               self.keyDown()
-
-       def keyRight(self):
-               if not self.toggleMainScreenFlag:
-                       return
-               if not self.toggleListViewFlag:
-                       self.updateSelectedMenuitem(1)
-                       return
-               if self.currentListView is None:
-                       return
-               if self.currentListView.getCurrent()[1] is not None:
-                       parentSelectedIndex = self.currentListView.getSelectedIndex()
-                       self.setCurrentListView(2)
-                       self.currentListView.setList(self.setSubListOnView())
-                       self.currentListView.resize(self.SUBMENULIST_WIDTH, self.SUBMENULIST_HEIGHT*len(self.lvSubMenuItems)+5)
-                       self.currentListView.move(self.MENUBAR_ITEM_WIDTH*self.menubarCurrentIndex + self.SUBMENULIST_WIDTH+self.SUBMENULIST_NEXT + 50,self.MENUBAR_ITEM_HEIGHT+30+(parentSelectedIndex*self.SUBMENULIST_HEIGHT))
-                       self.toggleSubListView()
-                       return
-               self.currentListView.pageUp()
-               self.keyUp()
-               self.keyRight()
-               self.keyDown()
+                       os.system("%s/%s restart"%(vbcfg.APPROOT, vbcfg.APP_RUN))
+               except:
+                       pass
+               return True
 
 
-       def keyDown(self):
-               if not self.toggleMainScreenFlag:
-                       return
-               if self.currentListView is None:
-                       return
-               if not self.toggleListViewFlag:
-                       self.currentListView.setList(self.setListOnView())
-                       self.currentListView.resize(self.SUBMENULIST_WIDTH, self.SUBMENULIST_HEIGHT*len(self.lvMenuItems)+5)
-                       self.currentListView.move(self.MENUBAR_ITEM_WIDTH*self.menubarCurrentIndex+1+ 50,self.MENUBAR_ITEM_HEIGHT+30)
-                       self.toggleListView()
-                       return
-               self.currentListView.down()
+def HelpableScreen__init__(self):
+       if isinstance(self, HelpableScreen):
+               HelpableScreen.showManual = showManual
 
 
-       def keyUp(self):
-               if not self.toggleMainScreenFlag:
-                       return
-               if self.currentListView is None:
-                       return
-               if self.currentListView == self["menulist"]:
-                       if self.currentListView.getSelectedIndex() == 0:
-                               self.toggleListView()
-                               return
-               self.currentListView.up()
-
-       def keyCancel(self):
-               if not self._terminatedBrowser:
-                       #self._session.openWithCallback(self._cb_virtualKeyboardClosed, VirtualKeyBoard, title=("Please enter URL here"), text="")
-                       fbClass.getInstance().lock()
-                       eRCInput.getInstance().lock()
-                       #setResolution(1280, 720)
-                       if self.toggleListViewFlag:
-                               self.toggleMainScreen()
-                       self._currentPageUrl   = None
-                       self._currentPageTitle = None
-                       command_util = getCommandUtil()
-                       command_util.sendCommand('OP_BROWSER_MENU_RES')
-                       return
-               self.close()
-
-       def keyMenu(self):
-               self.toggleMainScreen()
-
-       def setCurrentPageUrl(self, url, title=None):
-               self._currentPageUrl = url
-               if title is None:
-                       idx = len(url)
-                       if idx > 10: idx = 10
-                       title = url[:idx]
-               self._currentPageTitle = title
-               print self._currentPageUrl
-               self.toggleMainScreen()
-               self.hideSubmenu()
-               self.keyDown()
-
-       def hideSubmenu(self):
-               self.currentListView.pageUp()
-               self.keyUp()
-
-config.plugins.youtubetv = ConfigSubsection()
-config.plugins.youtubetv.showhelp = ConfigYesNo(default = False)
-config.plugins.youtubetv.uri = ConfigText(default = "http://www.youtube.com/tv", visible_width = 50, fixed_size = False)
-class YoutubeTVWindow(Screen, HelpableScreen):
-        skin = """
-                <screen name="YoutubeTVWindow" position="center,center" size="550,160" title="Start YouTube TV" >
-                       <widget name="infomation" position="5,0" size="540,80" valign="center" halign="center" font="Regular;20" />
-                       <widget name="startdesc" position="10,80" size="395,40" valign="center" font="Regular;20" />
-                       <widget name="helpdesc" position="10,120" size="395,40" valign="center" font="Regular;20" />
-                       <ePixmap pixmap="skin_default/buttons/green.png" position="400,80" size="140,40" alphatest="on" />
-                       <ePixmap pixmap="skin_default/buttons/yellow.png" position="400,120" size="140,40" alphatest="on" />
-                       <widget source="key_green" render="Label" position="400,80" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#1f771f" foregroundColor="#ffffff" transparent="1" />
-                       <widget source="key_yellow" render="Label" position="400,120" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#a08500" foregroundColor="#ffffff" transparent="1" />
-                </screen>
-               """
-        def __init__(self, session):
-                Screen.__init__(self, session)
-               HelpableScreen.__init__(self)
-
-               self["actions"] = ActionMap(["WizardActions", "DirectionActions", "OkCancelActions","ColorActions", "EPGSelectActions",], {
-                               "cancel": self.keyCancel,
-                               "red"   : self.keyCancel,
-                               "green" : self.keyGreen,
-                               "yellow": self.keyYellow,
-                       },-2)
-
-               self["key_green"]  = StaticText(_("Start"))
-               self["key_yellow"] = StaticText(_("Help"))
-
-               self["infomation"] = Label()
-               self["startdesc"]  = Label()
-               self["helpdesc"]   = Label()
-
-               self.onLayoutFinish.append(self.layoutFinished)
-
-       def layoutFinished(self):
-               self.setTitle(_('Start YouTube TV'))
-               self["infomation"].setText(_("YouTube TV is a new way to watch YouTube videos on Vu+"))
-               self["startdesc" ].setText(_("* Start YouTube TV"))
-               self["helpdesc"  ].setText(_("* RC Help"))
-
-       def setHelpModeActions(self):
-               self.helpList = []
-               self["OkCancelActions"] = HelpableActionMap(self, "OkCancelActions", {
-                       "ok"    : (self.keyPass, _("Play ther selected the video")),
-                       "cancel": (self.keyPass, _("Exit the YouTube TV")),
-               })
-               self["EventViewActions"] = HelpableActionMap(self, "EventViewActions", {
-                       "pageUp"    : (self.keyPass, _("Move up")),
-                       "pageDown"  : (self.keyPass, _("Move down")),
-                       "prevEvent" : (self.keyPass, _("Move left")),
-                       "nextEvent" : (self.keyPass, _("Move right")),
-               })
-               self["EPGSelectActions"] = HelpableActionMap(self, "EPGSelectActions", {
-                       "info"        : (self.keyPass, _("Search a video")),
-                       "nextService" : (self.keyPass, _("Skip forward 10 sec")),
-                       "prevService" : (self.keyPass, _("Skip backward 10 sec")),
-               })
-               self["MediaPlayerActions"] = HelpableActionMap(self, "MediaPlayerActions", {
-                       "play"  : (self.keyPass, _("Play current video")),
-                       "pause" : (self.keyPass, _("Pause current video")),
-                       "stop"  : (self.keyPass, _("Stop current video")),
-               })
-               self["ColorActions"] = HelpableActionMap(self, "ColorActions", {
-                       "red"   : (self.keyPass, _("Back")),
-               })
-               self.showHelp()
-
-       def keyPass(self):
-               pass
-       def keyCancel(self):
-               config.plugins.youtubetv.showhelp.cancel()
-               self.close(False)
-       def keyGreen(self):
-               config.plugins.youtubetv.showhelp.save()
-               config.plugins.youtubetv.save()
-               config.plugins.save()
-               self.close(True)
-       def keyYellow(self):
-               self.setHelpModeActions()
-       def keyBlue(self):
-               if config.plugins.youtubetv.showhelp.value == True :
-                       config.plugins.youtubetv.showhelp.setValue(False)
-               else:   config.plugins.youtubetv.showhelp.setValue(True)
-
-class YoutubeTVSettings(ConfigListScreen, Screen):
-    skin=   """
-       <screen position="center,center" size="600,140" title="YouTube TV Settings">
-           <widget name="config" position="0,0" size="600,100" scrollbarMode="showOnDemand" />
-
-           <ePixmap pixmap="skin_default/buttons/red.png" position="310,100" size="140,40" alphatest="on" />
-           <ePixmap pixmap="skin_default/buttons/green.png" position="150,100" size="140,40" alphatest="on" />
-
-           <widget source="key_red" render="Label" position="310,100" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#9f1313" foregroundColor="#ffffff" transparent="1" />
-           <widget source="key_green" render="Label" position="150,100" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#1f771f" foregroundColor="#ffffff" transparent="1" />
-       </screen>
-       """
-    def __init__(self, session):
-       self.session = session
-       Screen.__init__(self, session)
-
-       self.menulist = []
-       ConfigListScreen.__init__(self, self.menulist)
-
-       self["actions"] = ActionMap(["OkCancelActions", "ColorActions",], {
-           "ok"     : self.keyGreen,
-           "green"  : self.keyGreen,
-           "red"    : self.keyRed,
-           "cancel" : self.keyRed,
+               self["helpActions"] = ActionMap(["HelpbuttonActions"], {
+                       "help_b" : self.showHelp,
+                       "help_l" : self.showManual,
<