pitivi r1338 - in trunk: . pitivi/ui



Author: edwardrv
Date: Fri Oct 17 11:05:49 2008
New Revision: 1338
URL: http://svn.gnome.org/viewvc/pitivi?rev=1338&view=rev

Log:
        * pitivi/ui/mainwindow.py:
        Fix some code that was badly merged. Re-adds proper webcam detection

Modified:
   trunk/ChangeLog
   trunk/pitivi/ui/mainwindow.py

Modified: trunk/pitivi/ui/mainwindow.py
==============================================================================
--- trunk/pitivi/ui/mainwindow.py	(original)
+++ trunk/pitivi/ui/mainwindow.py	Fri Oct 17 11:05:49 2008
@@ -109,6 +109,11 @@
         self.pitivi.playground.connect("error", self._playGroundErrorCb)
         self.pitivi.current.sources.connect("file_added", self._sourcesFileAddedCb)
 
+        # if no webcams available, hide the webcam action
+        self.pitivi.deviceprobe.connect("device-added", self.__deviceChangeCb)
+        self.pitivi.deviceprobe.connect("device-removed", self.__deviceChangeCb)
+        if len(self.pitivi.deviceprobe.getVideoSourceDevices()) < 1:
+            self.webcam_button.set_sensitive(False)
         self.show_all()
 
     def _encodingDialogDestroyCb(self, unused_dialog):
@@ -418,7 +423,7 @@
 
     # Import from Webcam callback
     def _ImportWebcam(self,unused_action):
-        w = WebcamManagerDialog(instance.PiTiVi)
+        w = WebcamManagerDialog(self.pitivi)
         w.show()
 
     # Capture network stream callback



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]