Stefan Schuermans commited on 2013-11-23 22:39:08
Showing 2 changed files, with 52 additions and 20 deletions.
... | ... |
@@ -388,10 +388,45 @@ |
388 | 388 |
<property name="visible">True</property> |
389 | 389 |
<property name="can_focus">False</property> |
390 | 390 |
<property name="border_width">3</property> |
391 |
+ <child> |
|
392 |
+ <object class="GtkImage" id="LogoStop"> |
|
393 |
+ <property name="visible">True</property> |
|
394 |
+ <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> |
|
400 |
+ <property name="pixbuf">logo_o.png</property> |
|
401 |
+ </object> |
|
402 |
+ <packing> |
|
403 |
+ <property name="expand">False</property> |
|
404 |
+ <property name="fill">False</property> |
|
405 |
+ <property name="position">0</property> |
|
406 |
+ </packing> |
|
407 |
+ </child> |
|
408 |
+ <child> |
|
409 |
+ <object class="GtkImage" id="LogoPlay"> |
|
410 |
+ <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> |
|
416 |
+ <property name="pixbuf">logo_g.png</property> |
|
417 |
+ </object> |
|
418 |
+ <packing> |
|
419 |
+ <property name="expand">False</property> |
|
420 |
+ <property name="fill">False</property> |
|
421 |
+ <property name="position">1</property> |
|
422 |
+ </packing> |
|
423 |
+ </child> |
|
391 | 424 |
<child> |
392 | 425 |
<object class="GtkBox" id="ButtonBox"> |
393 | 426 |
<property name="visible">True</property> |
394 | 427 |
<property name="can_focus">False</property> |
428 |
+ <property name="margin_left">3</property> |
|
429 |
+ <property name="margin_right">3</property> |
|
395 | 430 |
<property name="homogeneous">True</property> |
396 | 431 |
<child> |
397 | 432 |
<object class="GtkButton" id="Previous"> |
... | ... |
@@ -475,7 +510,6 @@ |
475 | 510 |
<property name="visible">True</property> |
476 | 511 |
<property name="can_focus">True</property> |
477 | 512 |
<property name="receives_default">True</property> |
478 |
- <property name="margin_right">3</property> |
|
479 | 513 |
<property name="use_action_appearance">False</property> |
480 | 514 |
<property name="use_stock">True</property> |
481 | 515 |
<property name="image_position">top</property> |
... | ... |
@@ -491,40 +525,32 @@ |
491 | 525 |
<packing> |
492 | 526 |
<property name="expand">False</property> |
493 | 527 |
<property name="fill">True</property> |
494 |
- <property name="position">0</property> |
|
528 |
+ <property name="position">2</property> |
|
495 | 529 |
</packing> |
496 | 530 |
</child> |
497 | 531 |
<child> |
498 |
- <object class="GtkImage" id="LogoO"> |
|
532 |
+ <object class="GtkImage" id="LogoUdpErr"> |
|
499 | 533 |
<property name="visible">True</property> |
500 | 534 |
<property name="can_focus">False</property> |
501 |
- <property name="tooltip_text" translatable="yes">BlinkenArea Sync GUI |
|
502 |
-version 0.1.0 date 2013-11-23 |
|
503 |
-Copyright 2013 Stefan Schuermans <stefan@blinkenarea.org> |
|
504 |
-Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html |
|
505 |
-a blinkenarea.org project - https://www.blinkenarea.org/</property> |
|
535 |
+ <property name="tooltip_text" translatable="yes">UDP output ERROR</property> |
|
506 | 536 |
<property name="pixbuf">logo_o.png</property> |
507 | 537 |
</object> |
508 | 538 |
<packing> |
509 | 539 |
<property name="expand">False</property> |
510 | 540 |
<property name="fill">False</property> |
511 |
- <property name="position">1</property> |
|
541 |
+ <property name="position">3</property> |
|
512 | 542 |
</packing> |
513 | 543 |
</child> |
514 | 544 |
<child> |
515 |
- <object class="GtkImage" id="LogoG"> |
|
545 |
+ <object class="GtkImage" id="LogoUdpOk"> |
|
516 | 546 |
<property name="can_focus">False</property> |
517 |
- <property name="tooltip_text" translatable="yes">BlinkenArea Sync GUI |
|
518 |
-version 0.1.0 date 2013-11-23 |
|
519 |
-Copyright 2013 Stefan Schuermans <stefan@blinkenarea.org> |
|
520 |
-Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html |
|
521 |
-a blinkenarea.org project - https://www.blinkenarea.org/</property> |
|
547 |
+ <property name="tooltip_text" translatable="yes">UDP output okay</property> |
|
522 | 548 |
<property name="pixbuf">logo_g.png</property> |
523 | 549 |
</object> |
524 | 550 |
<packing> |
525 | 551 |
<property name="expand">False</property> |
526 | 552 |
<property name="fill">False</property> |
527 |
- <property name="position">2</property> |
|
553 |
+ <property name="position">4</property> |
|
528 | 554 |
</packing> |
529 | 555 |
</child> |
530 | 556 |
</object> |
... | ... |
@@ -34,8 +34,10 @@ class SyncGui: |
34 | 34 |
self.widPositionRemaining = self.builder.get_object("PositionRemaining") |
35 | 35 |
self.widBtnPause = self.builder.get_object("Pause") |
36 | 36 |
self.widBtnPlay = self.builder.get_object("Play") |
37 |
- self.widLogoO = self.builder.get_object("LogoO") |
|
38 |
- self.widLogoG = self.builder.get_object("LogoG") |
|
37 |
+ self.widLogoStop = self.builder.get_object("LogoStop") |
|
38 |
+ self.widLogoPlay = self.builder.get_object("LogoPlay") |
|
39 |
+ self.widLogoUdpErr = self.builder.get_object("LogoUdpErr") |
|
40 |
+ self.widLogoUdpOk = self.builder.get_object("LogoUdpOk") |
|
39 | 41 |
self.widStatus = self.builder.get_object("Status") |
40 | 42 |
handlers = { |
41 | 43 |
"onDestroy": self.onDestroy, |
... | ... |
@@ -144,11 +146,13 @@ class SyncGui: |
144 | 146 |
"""update the visibility of the buttons based on if playing or not""" |
145 | 147 |
self.widBtnPause.set_visible(self.stPlaying) |
146 | 148 |
self.widBtnPlay.set_visible(not self.stPlaying) |
147 |
- self.widLogoO.set_visible(not self.stPlaying) |
|
148 |
- self.widLogoG.set_visible(self.stPlaying) |
|
149 |
+ self.widLogoStop.set_visible(not self.stPlaying) |
|
150 |
+ self.widLogoPlay.set_visible(self.stPlaying) |
|
149 | 151 |
|
150 | 152 |
def closeSock(self): |
151 | 153 |
"""close UDP socket""" |
154 |
+ self.widLogoUdpErr.set_visible(True) |
|
155 |
+ self.widLogoUdpOk.set_visible(False) |
|
152 | 156 |
self.widStatus.remove_all(0) |
153 | 157 |
self.widStatus.push(0, "UDP output ERROR") |
154 | 158 |
if self.sock is not None: |
... | ... |
@@ -165,6 +169,8 @@ class SyncGui: |
165 | 169 |
self.widStatus.remove_all(0) |
166 | 170 |
self.widStatus.push(0, "UDP output to \"" + self.stDestination + |
167 | 171 |
"\" port 5740") |
172 |
+ self.widLogoUdpErr.set_visible(False) |
|
173 |
+ self.widLogoUdpOk.set_visible(True) |
|
168 | 174 |
except: |
169 | 175 |
self.closeSock() |
170 | 176 |
|
171 | 177 |