Stefan Schuermans commited on 2013-11-24 16:12:00
Showing 6 changed files, with 95 additions and 51 deletions.
... | ... |
@@ -4,12 +4,12 @@ cd "$(dirname "$0")" |
4 | 4 |
|
5 | 5 |
DATE="$(date "+%Y%m%d")" |
6 | 6 |
|
7 |
-mkdir -p zips/sync_gui_$DATE |
|
7 |
+mkdir -p zips/stage_director_$DATE |
|
8 | 8 |
|
9 |
-cp *.glade *.png *.py *.txt zips/sync_gui_$DATE |
|
9 |
+cp *.glade *.png *.py *.txt zips/stage_director_$DATE |
|
10 | 10 |
|
11 | 11 |
cd zips |
12 |
-zip -r sync_gui_$DATE.zip sync_gui_$DATE |
|
12 |
+zip -r stage_director_$DATE.zip stage_director_$DATE |
|
13 | 13 |
|
14 |
-rm -rf sync_gui_$DATE |
|
14 |
+rm -rf stage_director_$DATE |
|
15 | 15 |
|
... | ... |
@@ -1,7 +1,6 @@ |
1 | 1 |
#! /usr/bin/env python |
2 | 2 |
|
3 |
-# BlinkenArea Sync GUI |
|
4 |
-# version 0.1.0 date 2013-11-23 |
|
3 |
+# BlinkenArea Stage Director |
|
5 | 4 |
# Copyright 2013 Stefan Schuermans <stefan@blinkenarea.org> |
6 | 5 |
# Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html |
7 | 6 |
# a blinkenarea.org project - https://www.blinkenarea.org/ |
... | ... |
@@ -1,10 +1,46 @@ |
1 | 1 |
<?xml version="1.0" encoding="UTF-8"?> |
2 | 2 |
<interface> |
3 | 3 |
<!-- interface-requires gtk+ 3.0 --> |
4 |
+ <object class="GtkAboutDialog" id="DialogAbout"> |
|
5 |
+ <property name="can_focus">False</property> |
|
6 |
+ <property name="border_width">5</property> |
|
7 |
+ <property name="title" translatable="yes">About BlinkenArea Stage Director</property> |
|
8 |
+ <property name="type_hint">dialog</property> |
|
9 |
+ <property name="program_name">BlinkenArea Stage Director</property> |
|
10 |
+ <property name="version">0.1.1</property> |
|
11 |
+ <property name="copyright" translatable="yes">Copyright 2013 Stefan Schuermans <stefan@blinkenarea.org> |
|
12 |
+Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html |
|
13 |
+a blinkenarea.org project - https://www.blinkenarea.org/</property> |
|
14 |
+ <property name="website">https://www.blinkenarea.org</property> |
|
15 |
+ <property name="website_label" translatable="yes">BlinkenArea Homepage</property> |
|
16 |
+ <property name="logo">logo.png</property> |
|
17 |
+ <child internal-child="vbox"> |
|
18 |
+ <object class="GtkBox" id="DiaAboutVBox"> |
|
19 |
+ <property name="can_focus">False</property> |
|
20 |
+ <property name="orientation">vertical</property> |
|
21 |
+ <property name="spacing">2</property> |
|
22 |
+ <child internal-child="action_area"> |
|
23 |
+ <object class="GtkButtonBox" id="DiaAboutAction"> |
|
24 |
+ <property name="can_focus">False</property> |
|
25 |
+ <property name="layout_style">end</property> |
|
26 |
+ </object> |
|
27 |
+ <packing> |
|
28 |
+ <property name="expand">False</property> |
|
29 |
+ <property name="fill">True</property> |
|
30 |
+ <property name="pack_type">end</property> |
|
31 |
+ <property name="position">0</property> |
|
32 |
+ </packing> |
|
33 |
+ </child> |
|
34 |
+ <child> |
|
35 |
+ <placeholder/> |
|
36 |
+ </child> |
|
37 |
+ </object> |
|
38 |
+ </child> |
|
39 |
+ </object> |
|
4 | 40 |
<object class="GtkDialog" id="DialogDestination"> |
5 | 41 |
<property name="can_focus">False</property> |
6 | 42 |
<property name="border_width">5</property> |
7 |
- <property name="title" translatable="yes">BlinkenArea Sync GUI - Extras Destination Address...</property> |
|
43 |
+ <property name="title" translatable="yes">BlinkenArea Stage Director - Extras Destination Address...</property> |
|
8 | 44 |
<property name="type_hint">dialog</property> |
9 | 45 |
<child internal-child="vbox"> |
10 | 46 |
<object class="GtkBox" id="DiaDestVBox"> |
... | ... |
@@ -173,7 +209,7 @@ |
173 | 209 |
<object class="GtkWindow" id="MainWindow"> |
174 | 210 |
<property name="visible">True</property> |
175 | 211 |
<property name="can_focus">False</property> |
176 |
- <property name="title" translatable="yes">BlinkenArea Sync GUI</property> |
|
212 |
+ <property name="title" translatable="yes">BlinkenArea Stage Director</property> |
|
177 | 213 |
<signal name="destroy" handler="onDestroy" swapped="no"/> |
178 | 214 |
<child> |
179 | 215 |
<object class="GtkBox" id="MainVbox"> |
... | ... |
@@ -249,6 +285,16 @@ |
249 | 285 |
<signal name="activate" handler="onExtrasDestination" swapped="no"/> |
250 | 286 |
</object> |
251 | 287 |
</child> |
288 |
+ <child> |
|
289 |
+ <object class="GtkMenuItem" id="MiExtrasAbout"> |
|
290 |
+ <property name="use_action_appearance">False</property> |
|
291 |
+ <property name="visible">True</property> |
|
292 |
+ <property name="can_focus">False</property> |
|
293 |
+ <property name="label" translatable="yes">_About</property> |
|
294 |
+ <property name="use_underline">True</property> |
|
295 |
+ <signal name="activate" handler="onExtrasAbout" swapped="no"/> |
|
296 |
+ </object> |
|
297 |
+ </child> |
|
252 | 298 |
</object> |
253 | 299 |
</child> |
254 | 300 |
</object> |
... | ... |
@@ -392,11 +438,7 @@ |
392 | 438 |
<object class="GtkImage" id="LogoStop"> |
393 | 439 |
<property name="visible">True</property> |
394 | 440 |
<property name="can_focus">False</property> |
395 |
- <property name="tooltip_text" translatable="yes">BlinkenArea Sync GUI |
|
396 |
-version 0.1.0 date 2013-11-23 |
|
397 |
-Copyright 2013 Stefan Schuermans <stefan@blinkenarea.org> |
|
398 |
-Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html |
|
399 |
-a blinkenarea.org project - https://www.blinkenarea.org/</property> |
|
441 |
+ <property name="tooltip_text" translatable="yes">stopped</property> |
|
400 | 442 |
<property name="pixbuf">logo_o.png</property> |
401 | 443 |
</object> |
402 | 444 |
<packing> |
... | ... |
@@ -408,11 +450,7 @@ a blinkenarea.org project - https://www.blinkenarea.org/</property> |
408 | 450 |
<child> |
409 | 451 |
<object class="GtkImage" id="LogoPlay"> |
410 | 452 |
<property name="can_focus">False</property> |
411 |
- <property name="tooltip_text" translatable="yes">BlinkenArea Sync GUI |
|
412 |
-version 0.1.0 date 2013-11-23 |
|
413 |
-Copyright 2013 Stefan Schuermans <stefan@blinkenarea.org> |
|
414 |
-Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html |
|
415 |
-a blinkenarea.org project - https://www.blinkenarea.org/</property> |
|
453 |
+ <property name="tooltip_text" translatable="yes">playing</property> |
|
416 | 454 |
<property name="pixbuf">logo_g.png</property> |
417 | 455 |
</object> |
418 | 456 |
<packing> |
... | ... |
@@ -448,8 +486,8 @@ a blinkenarea.org project - https://www.blinkenarea.org/</property> |
448 | 486 |
</packing> |
449 | 487 |
</child> |
450 | 488 |
<child> |
451 |
- <object class="GtkButton" id="Stop"> |
|
452 |
- <property name="label">gtk-media-stop</property> |
|
489 |
+ <object class="GtkButton" id="Play"> |
|
490 |
+ <property name="label">gtk-media-play</property> |
|
453 | 491 |
<property name="use_action_appearance">False</property> |
454 | 492 |
<property name="visible">True</property> |
455 | 493 |
<property name="can_focus">True</property> |
... | ... |
@@ -458,7 +496,7 @@ a blinkenarea.org project - https://www.blinkenarea.org/</property> |
458 | 496 |
<property name="use_action_appearance">False</property> |
459 | 497 |
<property name="use_stock">True</property> |
460 | 498 |
<property name="image_position">top</property> |
461 |
- <signal name="clicked" handler="onStop" swapped="no"/> |
|
499 |
+ <signal name="clicked" handler="onPlay" swapped="no"/> |
|
462 | 500 |
</object> |
463 | 501 |
<packing> |
464 | 502 |
<property name="expand">True</property> |
... | ... |
@@ -485,8 +523,8 @@ a blinkenarea.org project - https://www.blinkenarea.org/</property> |
485 | 523 |
</packing> |
486 | 524 |
</child> |
487 | 525 |
<child> |
488 |
- <object class="GtkButton" id="Play"> |
|
489 |
- <property name="label">gtk-media-play</property> |
|
526 |
+ <object class="GtkButton" id="Stop"> |
|
527 |
+ <property name="label">gtk-media-stop</property> |
|
490 | 528 |
<property name="use_action_appearance">False</property> |
491 | 529 |
<property name="visible">True</property> |
492 | 530 |
<property name="can_focus">True</property> |
... | ... |
@@ -495,7 +533,7 @@ a blinkenarea.org project - https://www.blinkenarea.org/</property> |
495 | 533 |
<property name="use_action_appearance">False</property> |
496 | 534 |
<property name="use_stock">True</property> |
497 | 535 |
<property name="image_position">top</property> |
498 |
- <signal name="clicked" handler="onPlay" swapped="no"/> |
|
536 |
+ <signal name="clicked" handler="onStop" swapped="no"/> |
|
499 | 537 |
</object> |
500 | 538 |
<packing> |
501 | 539 |
<property name="expand">True</property> |
... | ... |
@@ -1,7 +1,6 @@ |
1 | 1 |
#! /usr/bin/env python |
2 | 2 |
|
3 |
-# BlinkenArea Sync GUI |
|
4 |
-# version 0.1.0 date 2013-11-23 |
|
3 |
+# BlinkenArea Stage Director |
|
5 | 4 |
# Copyright 2013 Stefan Schuermans <stefan@blinkenarea.org> |
6 | 5 |
# Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html |
7 | 6 |
# a blinkenarea.org project - https://www.blinkenarea.org/ |
... | ... |
@@ -24,7 +23,7 @@ class SyncGui: |
24 | 23 |
def __init__(self): |
25 | 24 |
"""construct a SyncGui object""" |
26 | 25 |
self.builder = Gtk.Builder() |
27 |
- self.builder.add_from_file(scriptdir + "/sync_gui.glade") |
|
26 |
+ self.builder.add_from_file(scriptdir + "/stage_director.glade") |
|
28 | 27 |
self.widMainWindow = self.builder.get_object("MainWindow") |
29 | 28 |
self.widPlaylistView = self.builder.get_object("PlaylistView") |
30 | 29 |
self.widPlaylistStore = self.builder.get_object("PlaylistStore") |
... | ... |
@@ -32,8 +31,8 @@ class SyncGui: |
32 | 31 |
self.widPositionScale = self.builder.get_object("PositionScale") |
33 | 32 |
self.widPositionAt = self.builder.get_object("PositionAt") |
34 | 33 |
self.widPositionRemaining = self.builder.get_object("PositionRemaining") |
35 |
- self.widBtnPause = self.builder.get_object("Pause") |
|
36 | 34 |
self.widBtnPlay = self.builder.get_object("Play") |
35 |
+ self.widBtnPause = self.builder.get_object("Pause") |
|
37 | 36 |
self.widLogoStop = self.builder.get_object("LogoStop") |
38 | 37 |
self.widLogoPlay = self.builder.get_object("LogoPlay") |
39 | 38 |
self.widLogoUdpErr = self.builder.get_object("LogoUdpErr") |
... | ... |
@@ -44,12 +43,13 @@ class SyncGui: |
44 | 43 |
"onFileOpen": self.onFileOpen, |
45 | 44 |
"onFileExit": self.onFileExit, |
46 | 45 |
"onExtrasDestination": self.onExtrasDestination, |
46 |
+ "onExtrasAbout": self.onExtrasAbout, |
|
47 | 47 |
"onPlaylistDblClick": self.onPlaylistDblClick, |
48 | 48 |
"onNewPosition": self.onNewPosition, |
49 | 49 |
"onPrevious": self.onPrevious, |
50 |
- "onStop": self.onStop, |
|
51 |
- "onPause": self.onPause, |
|
52 | 50 |
"onPlay": self.onPlay, |
51 |
+ "onPause": self.onPause, |
|
52 |
+ "onStop": self.onStop, |
|
53 | 53 |
"onNext": self.onNext, |
54 | 54 |
} |
55 | 55 |
self.builder.connect_signals(handlers) |
... | ... |
@@ -144,8 +144,8 @@ class SyncGui: |
144 | 144 |
|
145 | 145 |
def updateButtonVisibility(self): |
146 | 146 |
"""update the visibility of the buttons based on if playing or not""" |
147 |
- self.widBtnPause.set_visible(self.stPlaying) |
|
148 | 147 |
self.widBtnPlay.set_visible(not self.stPlaying) |
148 |
+ self.widBtnPause.set_visible(self.stPlaying) |
|
149 | 149 |
self.widLogoStop.set_visible(not self.stPlaying) |
150 | 150 |
self.widLogoPlay.set_visible(self.stPlaying) |
151 | 151 |
|
... | ... |
@@ -180,10 +180,10 @@ class SyncGui: |
180 | 180 |
|
181 | 181 |
def onFileOpen(self, widget): |
182 | 182 |
"""File Open clicked in menu""" |
183 |
- #print("DEBUG sync_gui File Open") |
|
183 |
+ #print("DEBUG stage_director File Open") |
|
184 | 184 |
# create and run file chooser dialog |
185 | 185 |
dialog = Gtk.FileChooserDialog( |
186 |
- "BlinkenArea Sync GUI - File Open...", |
|
186 |
+ "BlinkenArea Stage Director - File Open...", |
|
187 | 187 |
self.widMainWindow, Gtk.FileChooserAction.OPEN, |
188 | 188 |
(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL, |
189 | 189 |
Gtk.STOCK_OPEN, Gtk.ResponseType.OK)) |
... | ... |
@@ -207,12 +207,12 @@ class SyncGui: |
207 | 207 |
|
208 | 208 |
def onFileExit(self, widget): |
209 | 209 |
"""File Exit clicked in menu""" |
210 |
- #print("DEBUG sync_gui File Exit") |
|
210 |
+ #print("DEBUG stage_director File Exit") |
|
211 | 211 |
Gtk.main_quit() |
212 | 212 |
|
213 | 213 |
def onExtrasDestination(self, widget): |
214 | 214 |
"""Extras Destination Address clicked in menu""" |
215 |
- #print("DEBUG sync_gui Extras Destination") |
|
215 |
+ #print("DEBUG stage_director Extras Destination") |
|
216 | 216 |
# run input dialog to ask for new destination |
217 | 217 |
dialog = self.builder.get_object("DialogDestination") |
218 | 218 |
cur = self.builder.get_object("DiaDestCur") |
... | ... |
@@ -227,6 +227,14 @@ class SyncGui: |
227 | 227 |
# re-create UDP socket |
228 | 228 |
self.setupSock() |
229 | 229 |
|
230 |
+ def onExtrasAbout(self, widget): |
|
231 |
+ """Extras About clicked in menu""" |
|
232 |
+ #print("DEBUG stage_director Extras About") |
|
233 |
+ # run about dialog |
|
234 |
+ dialog = self.builder.get_object("DialogAbout") |
|
235 |
+ dialog.run() |
|
236 |
+ dialog.hide() |
|
237 |
+ |
|
230 | 238 |
def onPlaylistDblClick(self, widget, row, col): |
231 | 239 |
"""playlist entry has been double-clicked""" |
232 | 240 |
# get index of selected entry |
... | ... |
@@ -236,7 +244,7 @@ class SyncGui: |
236 | 244 |
(model, it) = sel.get_selected() |
237 | 245 |
if it is not None: |
238 | 246 |
(idx,) = model.get(it, 0) |
239 |
- #print("DEBUG sync_gui playlist double-click idx=%d" % (idx)) |
|
247 |
+ #print("DEBUG stage_director playlist double-click idx=%d" % (idx)) |
|
240 | 248 |
# update playlist entry |
241 | 249 |
self.stEntryIdx = idx |
242 | 250 |
# set position to zero if playing |
... | ... |
@@ -247,7 +255,7 @@ class SyncGui: |
247 | 255 |
|
248 | 256 |
def onNewPosition(self, widget, scroll, value): |
249 | 257 |
"""slider has been moved to a new position""" |
250 |
- #print("DEBUG sync_gui new position " + str(value)); |
|
258 |
+ #print("DEBUG stage_director new position " + str(value)); |
|
251 | 259 |
# clamp position to valid range |
252 | 260 |
if value < 0: |
253 | 261 |
value = 0 |
... | ... |
@@ -260,7 +268,7 @@ class SyncGui: |
260 | 268 |
|
261 | 269 |
def onPrevious(self, widget): |
262 | 270 |
"""previous button as been pressed""" |
263 |
- #print("DEBUG sync_gui previous") |
|
271 |
+ #print("DEBUG stage_director previous") |
|
264 | 272 |
# go to begin of previous entry (with wrap around) |
265 | 273 |
self.stPosition = 0 |
266 | 274 |
self.stEntryIdx = self.stEntryIdx - 1 |
... | ... |
@@ -268,30 +276,30 @@ class SyncGui: |
268 | 276 |
self.stEntryIdx = len(self.playlist.entries) - 1 |
269 | 277 |
self.updateEntry() |
270 | 278 |
|
271 |
- def onStop(self, widget): |
|
272 |
- """stop button has been pressed""" |
|
273 |
- #print("DEBUG sync_gui stop") |
|
274 |
- self.stPlaying = False |
|
275 |
- self.stPosition = 0 # stop goes back to begin |
|
279 |
+ def onPlay(self, widget): |
|
280 |
+ """play button has been pressed""" |
|
281 |
+ #print("DEBUG stage_director play") |
|
282 |
+ self.stPlaying = True |
|
276 | 283 |
self.updatePosition() |
277 | 284 |
self.updateButtonVisibility() |
278 | 285 |
|
279 | 286 |
def onPause(self, widget): |
280 | 287 |
"""pause button has been pressed""" |
281 |
- #print("DEBUG sync_gui pause") |
|
288 |
+ #print("DEBUG stage_director pause") |
|
282 | 289 |
self.stPlaying = False |
283 | 290 |
self.updateButtonVisibility() |
284 | 291 |
|
285 |
- def onPlay(self, widget): |
|
286 |
- """play button has been pressed""" |
|
287 |
- #print("DEBUG sync_gui play") |
|
288 |
- self.stPlaying = True |
|
292 |
+ def onStop(self, widget): |
|
293 |
+ """stop button has been pressed""" |
|
294 |
+ #print("DEBUG stage_director stop") |
|
295 |
+ self.stPlaying = False |
|
296 |
+ self.stPosition = 0 # stop goes back to begin |
|
289 | 297 |
self.updatePosition() |
290 | 298 |
self.updateButtonVisibility() |
291 | 299 |
|
292 | 300 |
def onNext(self, widget): |
293 | 301 |
"""next button has been pressed""" |
294 |
- #print("DEBUG sync_gui next") |
|
302 |
+ #print("DEBUG stage_director next") |
|
295 | 303 |
# go to begin of next entry (with wrap around) |
296 | 304 |
self.stPosition = 0 |
297 | 305 |
self.stEntryIdx = self.stEntryIdx + 1 |
... | ... |
@@ -1,7 +1,6 @@ |
1 | 1 |
#! /usr/bin/env python |
2 | 2 |
|
3 |
-# BlinkenArea Sync GUI |
|
4 |
-# version 0.1.0 date 2013-11-23 |
|
3 |
+# BlinkenArea Stage Director |
|
5 | 4 |
# Copyright 2013 Stefan Schuermans <stefan@blinkenarea.org> |
6 | 5 |
# Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html |
7 | 6 |
# a blinkenarea.org project - https://www.blinkenarea.org/ |
8 | 7 |