diff --git a/buildPy2exe.py b/buildPy2exe.py index b9b586b..3d7ef7b 100644 --- a/buildPy2exe.py +++ b/buildPy2exe.py @@ -624,7 +624,8 @@ guiIcons = ['resources/accept.png', 'resources/arrow_undo.png', 'resources/clock 'resources/mpv.png','resources/vlc.png', 'resources/house.png', 'resources/film_link.png', 'resources/eye.png', 'resources/comments.png', 'resources/cog_delete.png', 'resources/chevrons_right.png', 'resources/user_key.png', 'resources/lock.png', 'resources/key_go.png', 'resources/page_white_key.png', - 'resources/tick.png', 'resources/lock_open.png', 'resources/cross_checkbox.png', 'resources/tick_checkbox.png' + 'resources/tick.png', 'resources/lock_open.png', 'resources/cross_checkbox.png', 'resources/tick_checkbox.png', + 'resources/world_explore.png' ] resources = ["resources/icon.ico", "resources/syncplay.png"] resources.extend(guiIcons) diff --git a/resources/world_explore.png b/resources/world_explore.png new file mode 100644 index 0000000..c9a2bb0 Binary files /dev/null and b/resources/world_explore.png differ diff --git a/syncplay/messages.py b/syncplay/messages.py index 2dadd01..0f3532e 100755 --- a/syncplay/messages.py +++ b/syncplay/messages.py @@ -222,6 +222,7 @@ en = { "file-menu-label" : "&File", # & precedes shortcut key "openmedia-menu-label" : "&Open media file", + "openstreamurl-menu-label" : "Open &media stream URL", "exit-menu-label" : "E&xit", "advanced-menu-label" : "&Advanced", "setoffset-menu-label" : "Set &offset", @@ -234,6 +235,8 @@ en = { "setoffset-msgbox-label" : "Set offset", "offsetinfo-msgbox-label" : "Offset (see http://syncplay.pl/guide/ for usage instructions):", + "promptforstreamurl-msgbox-label" : "Open media stream URL", + "promptforstreamurlinfo-msgbox-label" : "Stream URL", "createcontrolledroom-msgbox-label" : "Create controlled room", "controlledroominfo-msgbox-label" : "Enter name of controlled room\r\n(see http://syncplay.pl/guide/ for usage instructions):", @@ -548,10 +551,11 @@ ru = { "file-menu-label" : u"&Файл", # & precedes shortcut key "openmedia-menu-label" : u"&Открыть видеофайл", + "openstreamurl-menu-label" : u"Open &media stream URL", # TODO: Translate into Russian "exit-menu-label" : u"&Выход", "advanced-menu-label" : u"&Дополнительно", "setoffset-menu-label" : u"Установить &смещение", - "createcontrolledroom-menu-label" : u"&Create controlled room", # TODO: Translate into Russianv + "createcontrolledroom-menu-label" : u"&Create controlled room", # TODO: Translate into Russian "identifyascontroller-menu-label" : u"&Identify as room controller", # TODO: Translate into Russian "help-menu-label" : u"&Помощь", @@ -560,6 +564,9 @@ ru = { "setoffset-msgbox-label" : u"Установить смещение", "offsetinfo-msgbox-label" : u"Смещение (см. как использовать на http://syncplay.pl/guide/):", + "promptforstreamurl-msgbox-label" : u"Open media stream URL", # TODO: Translate into Russian + "promptforstreamurlinfo-msgbox-label" : u"Stream URL", # TODO: Translate into Russian + "createcontrolledroom-msgbox-label" : u"Create controlled room", # TODO: Translate into Russian "controlledroominfo-msgbox-label" : u"Enter name of controlled room\r\n(see http://syncplay.pl/guide/ for usage instructions):", # TODO: Translate into Russian @@ -871,6 +878,7 @@ de = { "file-menu-label" : u"&Datei", # & precedes shortcut key "openmedia-menu-label" : u"&Mediendatei öffnen...", + "openstreamurl-menu-label" : u"Open &media stream URL", # TODO: Translate into German "exit-menu-label" : u"&Beenden", "advanced-menu-label" : u"&Erweitert", "setoffset-menu-label" : u"&Offset einstellen", @@ -883,6 +891,8 @@ de = { "setoffset-msgbox-label" : u"Offset einstellen", "offsetinfo-msgbox-label" : u"Offset (siehe http://syncplay.pl/guide/ für eine Anleitung [Englisch]):", + "promptforstreamurl-msgbox-label" : u"Open media stream URL", # TODO: Translate into German + "promptforstreamurlinfo-msgbox-label" : u"Stream URL", # TODO: Translate into German "createcontrolledroom-msgbox-label" : u"Zentral gesteuerten Raum erstellen", "controlledroominfo-msgbox-label" : u"Namen des zentral gesteuerten Raums eingeben\r\n(siehe http://syncplay.pl/guide/ für eine Anleitung [Englisch]):", diff --git a/syncplay/ui/gui.py b/syncplay/ui/gui.py index 54bf07e..c8f11af 100644 --- a/syncplay/ui/gui.py +++ b/syncplay/ui/gui.py @@ -377,6 +377,13 @@ class MainWindow(QtGui.QMainWindow): self.saveMediaBrowseSettings() self._syncplayClient._player.openFile(fileName) + def promptForStreamURL(self): + streamURL, ok = QtGui.QInputDialog.getText(self, getMessage("promptforstreamurl-msgbox-label"), + getMessage("promptforstreamurlinfo-msgbox-label"), QtGui.QLineEdit.Normal, + "") + if ok and streamURL != '': + self._syncplayClient._player.openFile(streamURL) + def createControlledRoom(self): controlroom, ok = QtGui.QInputDialog.getText(self, getMessage("createcontrolledroom-msgbox-label"), getMessage("controlledroominfo-msgbox-label"), QtGui.QLineEdit.Normal, @@ -580,6 +587,9 @@ class MainWindow(QtGui.QMainWindow): window.openAction = window.fileMenu.addAction(QtGui.QIcon(self.resourcespath + 'folder_explore.png'), getMessage("openmedia-menu-label")) window.openAction.triggered.connect(self.browseMediapath) + window.openAction = window.fileMenu.addAction(QtGui.QIcon(self.resourcespath + 'world_explore.png'), + getMessage("openstreamurl-menu-label")) + window.openAction.triggered.connect(self.promptForStreamURL) window.exitAction = window.fileMenu.addAction(QtGui.QIcon(self.resourcespath + 'cross.png'), getMessage("exit-menu-label"))