pitivi r1289 - trunk/pitivi/ui
- From: edwardrv svn gnome org
- To: svn-commits-list gnome org
- Subject: pitivi r1289 - trunk/pitivi/ui
- Date: Sat, 27 Sep 2008 17:39:57 +0000 (UTC)
Author: edwardrv
Date: Sat Sep 27 17:39:56 2008
New Revision: 1289
URL: http://svn.gnome.org/viewvc/pitivi?rev=1289&view=rev
Log:
ui/mainwindow : toggle webcam feature dynamically based on whether a webcam
is available or not.
Modified:
trunk/pitivi/ui/mainwindow.py
Modified: trunk/pitivi/ui/mainwindow.py
==============================================================================
--- trunk/pitivi/ui/mainwindow.py (original)
+++ trunk/pitivi/ui/mainwindow.py Sat Sep 27 17:39:56 2008
@@ -106,6 +106,8 @@
# features based on availability (or not) of webcams.
# if no webcams available, hide the webcam action
+ instance.PiTiVi.deviceprobe.connect("device-added", self.__deviceChangeCb)
+ instance.PiTiVi.deviceprobe.connect("device-removed", self.__deviceChangeCb)
if len(instance.PiTiVi.deviceprobe.getVideoSourceDevices()) < 1:
self.webcam_button.set_sensitive(False)
@@ -461,7 +463,13 @@
def _Screencast(self,unused_action):
ScreencastManagerDialog()
-
+
+ ## Devices changed
+ def __deviceChangeCb(self, probe, unused_device):
+ if len(probe.getVideoSourceDevices()) < 1:
+ self.webcam_button.set_sensitive(False)
+ else:
+ self.webcam_button.set_sensitive(True)
## PiTiVi main object callbacks
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]