From 79e28d03f660ff6525b5357f6ea54994408a5438 Mon Sep 17 00:00:00 2001 From: Et0h Date: Fri, 2 Jan 2015 12:14:00 +0000 Subject: [PATCH] Add "load media stream URL" to main GUI menu --- buildPy2exe.py | 3 ++- resources/world_explore.png | Bin 0 -> 987 bytes syncplay/messages.py | 12 +++++++++++- syncplay/ui/gui.py | 10 ++++++++++ 4 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 resources/world_explore.png 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 0000000000000000000000000000000000000000..c9a2bb051247bf4f2a4f36b70a8f974667d82e2f GIT binary patch literal 987 zcmV<110?*3P)pF8gxZibW?9;ba!ELWdKlNX>N2bPDNB8 zb~7$DE-^4L^m3s900UP^L_t(IPi2zZPa9+$hI^r2x%eM=;Xj~Lr-3+)Gnvll7Tq#* z0@=J^0WBF}x=BKXjts(v1IOGrEer-_6jlmtk2+6aS>y)*|NaKjTss&yb8uu(Cir7>2I zV_C(=O^0`n{B-D8s-RaJy@h>Mi(*~Pye@wyjV(oNxzi#)ZRCQpLf<^b1pkGN%6LO!iW zHeAeTsDrnwGL}*Wo8b);mjdNTLlw$?2NrrgMp|$yFxfD@-iM(S#!O&a81k zsl*xYCqsT+=f+)$K5D&}s1BQv&x~=h%}%x|NR1|jHL`))wMw5eNsqt~NKikt zh%wN{t0gb5NW?JuRsJ8*L|ZvGQ9+rzi|h_7Sqe7|;^vXi2KQZSbla2kIuoK`kt(I1 zW>a~pz$`hVIeAzNW5<)!a^8?nk+Be|&cqk(Q^@rR#)4bu=hxBs6ATCAC>+~dzTU}+ zf*1c31*i75kkxfmU1Rx{0e=H!mhX^_8Ys9oLB870d1a6m@fVGzWvbOtDy}PW^;R=1 z%iO(rRPxzg!KZhQ>=VP7y*zjh+sb`f=PZ;DSSi&^b5UjIqGE^}_A(5?Rw}9vVZHhh z5tR((S1)bu6{Pfj{k!|bFm&%!XYRCEn`jvwpn1ed%a{rETpx`VS?cE9)ZJAlo;$1l z=9TU5GbEMi_`k}mc;k~d%U&CNy>x$Em^afb35|gtQl_h)Vzf002ov JPDHLkV1jj}&PD(L literal 0 HcmV?d00001 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"))