Exemple #1
0
	def _get_vars(self):
		PLog('_get_vars')
		# get the slideshow window id
		self.winid    = xbmcgui.Window(xbmcgui.getCurrentWindowDialogId())
		PLog('self.winid: ' + str(self.winid))
		self.pos	= 0
		self.stop   	= False
Exemple #2
0
    def __init__(self):
        params = self.get_params()
        if params:
            color_picker = cp.ColorPicker(
                "script-skin_helper_service-ColorPicker.xml", ADDON_PATH,
                "Default", "1080i")
            color_picker.skinstring = params.get("SKINSTRING", "")
            color_picker.win_property = params.get("WINPROPERTY", "")
            color_picker.active_palette = params.get("PALETTE", "")
            color_picker.header_label = params.get("HEADER", "")
            propname = params.get("SHORTCUTPROPERTY", "")
            color_picker.shortcut_property = propname
            color_picker.doModal()

            #special action when we want to set our chosen color into a skinshortcuts property
            if propname and not isinstance(color_picker.result, int):
                self.wait_for_skinshortcuts_window()
                xbmc.sleep(400)
                current_window = xbmcgui.Window(
                    xbmcgui.getCurrentWindowDialogId())
                current_window.setProperty("customProperty", propname)
                current_window.setProperty("customValue",
                                           color_picker.result[0])
                xbmc.executebuiltin("SendClick(404)")
                xbmc.sleep(250)
                current_window.setProperty("customProperty",
                                           "%s.name" % propname)
                current_window.setProperty("customValue",
                                           color_picker.result[1])
                xbmc.executebuiltin("SendClick(404)")
            del color_picker
Exemple #3
0
    def onInit(self):
        self.winid = xbmcgui.Window(xbmcgui.getCurrentWindowDialogId())
        self.winid.setProperty('ss_time', 'okay' if REAL_SETTINGS.getSetting("Time") == 'true' else 'nope')
        self.myPlayer.play(self.buildPlaylist())

        if saveVolume(): 
            setVolume(int(REAL_SETTINGS.getSetting('SetVolume')))
        setRepeat('all')
Exemple #4
0
 def onInit(self):
     self._winID = xbmcgui.getCurrentWindowDialogId()
     BaseFunctions.lastWinID = self._winID
     if self.started:
         self.onReInit()
     else:
         self.started = True
         self.onFirstInit()
    def onInit(self):
        '''Called after initialization, get all colors and build the listing'''
        with busy_dialog():
            self.current_window = xbmcgui.Window(
                xbmcgui.getCurrentWindowDialogId())
            self.colors_list = self.getControl(3110)
            # set header_label
            try:
                self.getControl(1).setLabel(self.header_label)
            except Exception:
                pass

            # get current color that is stored in the skin setting
            curvalue = ""
            curvalue_name = ""
            if self.skinstring:
                curvalue = xbmc.getInfoLabel("Skin.String(%s)" %
                                             self.skinstring)
                curvalue_name = xbmc.getInfoLabel("Skin.String(%s.name)" %
                                                  self.skinstring)
            if self.win_property:
                curvalue = WINDOW.getProperty(self.win_property)
                curvalue_name = xbmc.getInfoLabel('%s.name)' %
                                                  self.win_property)
            if curvalue:
                self.current_window.setProperty("colorstring", curvalue)
                if curvalue != curvalue_name:
                    self.current_window.setProperty("colorname", curvalue_name)
                self.current_window.setProperty("current.colorstring",
                                                curvalue)
                if curvalue != curvalue_name:
                    self.current_window.setProperty("current.colorname",
                                                    curvalue_name)

            # load colors in the list
            self.load_colors_palette(self.active_palette)

            # focus the current color
            if self.current_window.getProperty("colorstring"):
                self.current_window.setFocusId(3010)
            else:
                # no color setup so we just focus the colorslist
                self.current_window.setFocusId(3110)
                self.colors_list.selectItem(0)
                self.current_window.setProperty(
                    "colorstring",
                    self.colors_list.getSelectedItem().getProperty(
                        "colorstring"))
                self.current_window.setProperty(
                    "colorname",
                    self.colors_list.getSelectedItem().getLabel())

            # set opacity slider
            if self.current_window.getProperty("colorstring"):
                self.set_opacity_slider()
Exemple #6
0
 def onInit(self):
     self.winid = xbmcgui.Window(xbmcgui.getCurrentWindowDialogId())
     self.winid.setProperty(
         'unsplash_animation', 'okay'
         if REAL_SETTINGS.getSetting("Animate") == 'true' else 'nope')
     self.winid.setProperty(
         'unsplash_time',
         'okay' if REAL_SETTINGS.getSetting("Time") == 'true' else 'nope')
     self.winid.setProperty(
         'unsplash_overlay', 'okay'
         if REAL_SETTINGS.getSetting("Overlay") == 'true' else 'nope')
     self.startRotation()
Exemple #7
0
 def onInit(self):
     self.winid = xbmcgui.Window(xbmcgui.getCurrentWindowDialogId())
     self.winid.setProperty(
         'bing_time',
         'okay' if REAL_SETTINGS.getSetting("Time") == 'true' else 'nope')
     self.winid.setProperty(
         'bing_animation', 'okay'
         if REAL_SETTINGS.getSetting("Animate") == 'true' else 'nope')
     self.winid.setProperty(
         'bing_overlay', 'okay'
         if REAL_SETTINGS.getSetting("Overlay") == 'true' else 'nope')
     self.PanelItems = self.getControl(101)
     self.PanelItems.addItems(
         list(self.prepareImages(self.openURL(POTD_JSON))))
     self.startRotation()
Exemple #8
0
window = xbmcgui.Window(10000)

dialog = xbmcgui.Dialog()

progressDialog = xbmcgui.DialogProgress()

progressDialogBG = xbmcgui.DialogProgressBG()

windowDialog = xbmcgui.WindowDialog()

button = xbmcgui.ControlButton

image = xbmcgui.ControlImage

getCurrentDialogId = xbmcgui.getCurrentWindowDialogId()

getCurrentWinId = xbmcgui.getCurrentWindowId()

keyboard = xbmc.Keyboard

monitor = xbmc.Monitor()

execute = xbmc.executebuiltin

skin = xbmc.getSkinDir()

player = xbmc.Player()

playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
Exemple #9
0
 def _busy():
     return xbmcgui.getCurrentWindowDialogId() in [10138, 10160]