Commit 9f33f1ca authored by Edward Hervey's avatar Edward Hervey

* pitivi/playground.py:

Connect bus message handler to the default bin too.
* pitivi/ui/mainwindow.py:
Close error message when you click on OK
* pitivi/ui/viewer.py:
Remove error message for failed state change.


git-svn-id: svn+ssh://svn.gnome.org/svn/pitivi/trunk@750 d3729300-e425-0410-8a4c-d956edccc248
parent b1beee54
2006-04-10 Edward Hervey <edward@fluendo.com>
* pitivi/playground.py:
Connect bus message handler to the default bin too.
* pitivi/ui/mainwindow.py:
Close error message when you click on OK
* pitivi/ui/viewer.py:
Remove error message for failed state change.
2006-04-10 Edward Hervey <edward@fluendo.com>
* pitivi/playground.py:
......
......@@ -71,6 +71,9 @@ class PlayGround(gobject.GObject):
# Defaut pipeline if no other pipeline is playing
self.default = SmartDefaultBin()
bus = self.default.get_bus()
bus.add_signal_watch()
bus.connect("message", self._busMessageCb, self.default)
# Current playing pipeline
self.current = None
......
......@@ -150,12 +150,17 @@ class PitiviMainWindow(gtk.Window):
## PlayGround callback
def _errorMessageResponseCb(self, dialogbox, unused_response):
dialogbox.hide()
dialogbox.destroy()
def _playGroundErrorCb(self, unused_playground, error, detail):
dialog = gtk.MessageDialog(None, gtk.DIALOG_MODAL,
gtk.MESSAGE_ERROR,
gtk.BUTTONS_OK,
None)
dialog.set_markup("<b>%s</b>" % error)
dialog.connect("response", self._errorMessageResponseCb)
if detail:
dialog.format_secondary_text(detail)
dialog.show()
......
......@@ -227,22 +227,10 @@ class PitiviViewer(gtk.VBox):
# modify the ratio if it's the timeline that's playing
raise NotImplementedError
def _showErrorDialog(self, mainreason, subreason=None):
dialog = gtk.MessageDialog(None, gtk.DIALOG_MODAL,
gtk.MESSAGE_ERROR,
gtk.BUTTONS_OK, None)
dialog.set_markup("<b>%s</b>" % mainreason)
if subreason:
dialog.format_secondary_text(subreason)
dialog.show()
def _drawingAreaRealizeCb(self, drawingarea):
drawingarea.modify_bg(gtk.STATE_NORMAL, drawingarea.style.black)
self._createSinkThreads()
if instance.PiTiVi.playground.play() == gst.STATE_CHANGE_FAILURE:
gobject.idle_add(self._showErrorDialog,
"Couldn't switch on the main GStreamer pipeline",
"Make sure you have configured your audio/video output sinks correctly")
instance.PiTiVi.playground.play()
## gtk.HScale callbacks for self.slider
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment