diff --git a/Core.py b/Core.py index 6aae249..fc9f7a0 100644 --- a/Core.py +++ b/Core.py @@ -65,6 +65,9 @@ class Core: contextMenu = [(self.localize('Search Control Window'), 'xbmc.RunScript(%s,)' % os.path.join(ROOT, 'controlcenter.py'))] + self.drawItem('< %s >' % self.localize('Search Window') + ' (BETA)', 'searchWindow', + image=self.ROOT + '/icons/kodi.png', isFolder=False) + if self.history_bool: HistorycontextMenu=[] HistorycontextMenu.extend(contextMenu) @@ -84,9 +87,6 @@ class Core: DLScontextMenu.append( (self.localize('Clear %s') % self.localize('Download Status'), ListString % ('DownloadStatus', 'clear', 'addtime', ''))) DLScontextMenu.extend(contextMenu) - if self.debug: - self.drawItem('< %s >' % self.localize('Search Window'), 'searchWindow', - image=self.ROOT + '/icons/settings.png', isFolder=False) self.drawItem('< %s >' % self.localize('Download Status'), 'DownloadStatus', image=self.ROOT + '/icons/download.png', contextMenu=DLScontextMenu, replaceMenu=False) self.drawItem('< %s >' % self.localize('Torrent-client Browser'), 'uTorrentBrowser', diff --git a/Localization.py b/Localization.py index 55e5422..9dd88c2 100644 --- a/Localization.py +++ b/Localization.py @@ -290,7 +290,7 @@ def localize(text): 'Play (from %s)':'Reproducir (desde %s)', 'Play (from start)':'Reproducir (desde el inicio)', }, - 'he': { + 'he': { 'Seeds searching.': 'חיפוש זורעים', 'Please Wait': 'המתן', 'Information': 'מידע', @@ -809,6 +809,7 @@ def localize(text): 'Play (from start)':'Lejátszás (az elejétől)', }, 'ru': { + 'Search Window': 'Окно поиска', 'Seeds searching.': 'Идёт поиск сидов.', 'Please Wait': 'Подождите', 'Information': 'Информация', diff --git a/icons/kodi.png b/icons/kodi.png new file mode 100644 index 0000000..46a33e1 Binary files /dev/null and b/icons/kodi.png differ diff --git a/icons/searchwindow/fcontrolcenter.png b/icons/searchwindow/fcontrolcenter.png new file mode 100644 index 0000000..9b579ae Binary files /dev/null and b/icons/searchwindow/fcontrolcenter.png differ diff --git a/icons/searchwindow/fdownloadstatus.png b/icons/searchwindow/fdownloadstatus.png new file mode 100644 index 0000000..7c09306 Binary files /dev/null and b/icons/searchwindow/fdownloadstatus.png differ diff --git a/icons/searchwindow/fhistory.png b/icons/searchwindow/fhistory.png new file mode 100644 index 0000000..951e241 Binary files /dev/null and b/icons/searchwindow/fhistory.png differ diff --git a/icons/searchwindow/fkeyboard.png b/icons/searchwindow/fkeyboard.png new file mode 100644 index 0000000..8d993d1 Binary files /dev/null and b/icons/searchwindow/fkeyboard.png differ diff --git a/icons/searchwindow/fsearch.png b/icons/searchwindow/fsearch.png new file mode 100644 index 0000000..8e786c2 Binary files /dev/null and b/icons/searchwindow/fsearch.png differ diff --git a/icons/searchwindow/ftorrentclient.png b/icons/searchwindow/ftorrentclient.png new file mode 100644 index 0000000..da2b9ab Binary files /dev/null and b/icons/searchwindow/ftorrentclient.png differ diff --git a/icons/searchwindow/nfcontrolcenter.png b/icons/searchwindow/nfcontrolcenter.png new file mode 100644 index 0000000..b7187f3 Binary files /dev/null and b/icons/searchwindow/nfcontrolcenter.png differ diff --git a/icons/searchwindow/nfdownloadstatus.png b/icons/searchwindow/nfdownloadstatus.png new file mode 100644 index 0000000..664a1f2 Binary files /dev/null and b/icons/searchwindow/nfdownloadstatus.png differ diff --git a/icons/searchwindow/nfhistory.png b/icons/searchwindow/nfhistory.png new file mode 100644 index 0000000..0562056 Binary files /dev/null and b/icons/searchwindow/nfhistory.png differ diff --git a/icons/searchwindow/nfkeyboard.png b/icons/searchwindow/nfkeyboard.png new file mode 100644 index 0000000..a9a8750 Binary files /dev/null and b/icons/searchwindow/nfkeyboard.png differ diff --git a/icons/searchwindow/nfsearch.png b/icons/searchwindow/nfsearch.png new file mode 100644 index 0000000..46284d6 Binary files /dev/null and b/icons/searchwindow/nfsearch.png differ diff --git a/icons/searchwindow/nftorrentclient.png b/icons/searchwindow/nftorrentclient.png new file mode 100644 index 0000000..c472822 Binary files /dev/null and b/icons/searchwindow/nftorrentclient.png differ diff --git a/searchwindow.py b/searchwindow.py index 8d783c9..c45c86c 100644 --- a/searchwindow.py +++ b/searchwindow.py @@ -64,26 +64,33 @@ class SearchWindow(pyxbmct.AddonDialogWindow): else: self.history() - def icon(self, icon): - return '%s/icons/%s.png' %(__root__, icon) + icon = __root__+'/icons/searchwindow/%s.png' def set_controls(self): self.background.setImage('%s/icons/%s.png' %(__root__, 'ContentPanel')) - self.input_search = pyxbmct.Edit("", _alignment=pyxbmct.ALIGN_CENTER_X | pyxbmct.ALIGN_CENTER_Y) - self.placeControl(self.input_search, 0, 0, 1, 5) - self.button_search = pyxbmct.Button("Search") - self.placeControl(self.button_search, 0, 5, 1, 2) - self.button_history = pyxbmct.Button("History") - self.placeControl(self.button_history, 0, 7, 1, 2) - self.button_controlcenter = pyxbmct.Button("Control\r\nCenter") - self.placeControl(self.button_controlcenter, 0, 9, 1, 2) + #Top menu + self.button_downloadstatus = pyxbmct.Button("OFF", textColor = '0xFF0000FF', focusTexture = self.icon % 'fdownloadstatus', noFocusTexture = self.icon % 'nfdownloadstatus') + self.placeControl(self.button_downloadstatus, 0, 2, 1, 1) + self.button_torrentclient = pyxbmct.Button("OFF", textColor = '0xFF0000FF', focusTexture = self.icon % 'ftorrentclient', noFocusTexture = self.icon % 'nftorrentclient') + self.placeControl(self.button_torrentclient, 0, 3, 1, 1) + self.button_keyboard = pyxbmct.Button("", focusTexture = self.icon % 'fkeyboard', noFocusTexture = self.icon % 'nfkeyboard') + self.placeControl(self.button_keyboard, 0, 4, 1, 1) + self.input_search = pyxbmct.Edit("", _alignment=pyxbmct.ALIGN_CENTER_X | pyxbmct.ALIGN_CENTER_Y) + self.placeControl(self.input_search, 0, 5, 1, 5) + self.button_search = pyxbmct.Button("", focusTexture = self.icon % 'fsearch', noFocusTexture = self.icon % 'nfsearch') + self.placeControl(self.button_search, 0, 10, 1, 1) + self.button_history = pyxbmct.Button("", focusTexture = self.icon % 'fhistory', noFocusTexture = self.icon % 'nfhistory') + self.placeControl(self.button_history, 0, 11, 1, 1) + self.button_controlcenter = pyxbmct.Button("", focusTexture = self.icon % 'fcontrolcenter', noFocusTexture = self.icon % 'nfcontrolcenter') + self.placeControl(self.button_controlcenter, 0, 12, 1, 1) + + #Main self.listing = pyxbmct.List(_imageWidth=60, _imageHeight=60, _itemTextXOffset=1, _itemTextYOffset=0, _itemHeight=60, _space=0, _alignmentY=4) self.placeControl(self.listing, 1, 0, 8, 14) - self.logoimg = pyxbmct.Image(__root__ + '/icons/fav.png') - self.placeControl(self.logoimg, 200, 300, 1, 5) + #Right menu self.right_menu() def connect_controls(self): @@ -100,11 +107,15 @@ class SearchWindow(pyxbmct.AddonDialogWindow): def set_navigation(self): #Top menu - self.input_search.setNavigation(self.listing, self.listing, self.last_right_button, self.button_search) + self.button_downloadstatus.setNavigation(self.listing, self.listing, self.last_right_button, self.button_torrentclient) + self.button_torrentclient.setNavigation(self.listing, self.listing, self.button_downloadstatus, self.button_keyboard) + self.button_keyboard.setNavigation(self.listing, self.listing, self.button_torrentclient, self.input_search) + self.input_search.setNavigation(self.listing, self.listing, self.button_keyboard, self.button_search) self.button_search.setNavigation(self.listing, self.listing, self.input_search, self.button_history) self.button_history.setNavigation(self.listing, self.listing, self.button_search, self.button_controlcenter) self.button_controlcenter.setNavigation(self.listing, self.listing, self.button_history, self.last_right_button) - #Listing + + #Main self.listing.setNavigation(self.input_search, self.input_search, self.input_search, self.last_right_button) if self.listing.size(): @@ -430,7 +441,7 @@ class SearchWindow(pyxbmct.AddonDialogWindow): def controlCenter(self, params={}): import controlcenter - controlcenter.main(params) + controlcenter.main() def reconnect(self, event, callable): self.disconnect(event)