summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuciana Fujii Pontello <luciana@fujii.eti.br>2010-07-09 22:38:34 (GMT)
committerLuciana Fujii Pontello <luciana@fujii.eti.br>2010-07-09 22:40:43 (GMT)
commit44a574338a1194f74db6c8f00e70900e89817e82 (patch)
treec7d859f5656d4a31fa1a7241bcae1064e3214cf7
parent99b62408261db40c6b0bbde369dc9767862ea0b7 (diff)
downloadsltv-44a574338a1194f74db6c8f00e70900e89817e82.tar.gz
sltv-44a574338a1194f74db6c8f00e70900e89817e82.tar.xz
watermark: setting size to unsensitive when playing
Size cannot be changed during transmistion, so size scale and size label were set to unsensitive to show that.
-rw-r--r--sltv/ui/watermark.py11
-rw-r--r--ui/watermark.ui20
2 files changed, 21 insertions, 10 deletions
diff --git a/sltv/ui/watermark.py b/sltv/ui/watermark.py
index 818f085..65fb7c8 100644
--- a/sltv/ui/watermark.py
+++ b/sltv/ui/watermark.py
@@ -32,6 +32,7 @@ class WaterMarkUI:
self.interface.add_from_file(UI_DIR + "/watermark.ui")
self.widget = self.interface.get_object("table1")
self.button = self.interface.get_object("filechooserbutton")
+ self.size_label = self.interface.get_object("size_label")
self.size_adjustment = gtk.Adjustment(0.5, 0, 0.5, 0.05)
self.size_scale = gtk.HScale(self.size_adjustment)
self.size_scale.set_property("digits", 2)
@@ -52,6 +53,16 @@ class WaterMarkUI:
self.size_scale.connect("value-changed", self._on_size_changed)
self.alpha_scale.connect("value-changed", self._on_alpha_changed)
self.position_selector.connect("changed", self._on_position_changed)
+ self.sltv.connect("preplay", self._on_preplay)
+ self.sltv.connect("stopped", self._on_stopped)
+
+ def _on_preplay(self, sltv):
+ self.size_scale.set_sensitive(False)
+ self.size_label.set_sensitive(False)
+
+ def _on_stopped(self, sltv):
+ self.size_scale.set_sensitive(True)
+ self.size_label.set_sensitive(True)
def _on_file_set(self, button):
self.sltv.set_watermark_location(self.button.get_filename())
diff --git a/ui/watermark.ui b/ui/watermark.ui
index b968a6c..2337a87 100644
--- a/ui/watermark.ui
+++ b/ui/watermark.ui
@@ -54,16 +54,7 @@
</packing>
</child>
<child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <object class="GtkLabel" id="label2">
+ <object class="GtkLabel" id="size_label">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Size</property>
@@ -73,5 +64,14 @@
<property name="right_attach">2</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
</interface>