[pitivi] RenderDialog: remove existing implementation



commit 4f9edf4fe3ba8471397efe8f02e545e3e411b174
Author: Brandon Lewis <brandon_lewis alum berkeley edu>
Date:   Fri Nov 19 18:31:16 2010 +0000

    RenderDialog: remove existing implementation

 pitivi/ui/encodingdialog.py |   72 -------------------------------------------
 1 files changed, 0 insertions(+), 72 deletions(-)
---
diff --git a/pitivi/ui/encodingdialog.py b/pitivi/ui/encodingdialog.py
index f50842c..9916e6e 100644
--- a/pitivi/ui/encodingdialog.py
+++ b/pitivi/ui/encodingdialog.py
@@ -26,20 +26,12 @@ Encoding dialog
 import os
 import gtk
 import gst
-from urlparse import urlparse
-import urllib
 
 from gettext import gettext as _
 
 import pitivi.configure as configure
 from pitivi.log.loggable import Loggable
-from pitivi.ui.exportsettingswidget import ExportSettingsDialog
 from pitivi.ui.glade import GladeWindow
-from pitivi.action import render_action_for_uri, ViewAction
-from pitivi.factories.base import SourceFactory
-from pitivi.factories.timeline import TimelineSourceFactory
-from pitivi.settings import export_settings_to_render_settings
-from pitivi.stream import VideoStream, AudioStream
 from pitivi.actioner import Renderer
 
 class EncodingDialog(GladeWindow, Renderer):
@@ -53,14 +45,6 @@ class EncodingDialog(GladeWindow, Renderer):
         self.app = app
 
         # UI widgets
-        self.progressbar = self.widgets["progressbar"]
-        self.filebutton = self.widgets["filebutton"]
-        self.settingsbutton = self.widgets["settingsbutton"]
-        self.cancelbutton = self.widgets["cancelbutton"]
-        self.recordbutton = self.widgets["recordbutton"]
-        self.recordbutton.set_sensitive(False)
-        self.vinfo = self.widgets["videoinfolabel"]
-        self.ainfo = self.widgets["audioinfolabel"]
         self.window.set_icon_from_file(configure.get_pixmap_dir() + "/pitivi-render-16.png")
 
         Renderer.__init__(self, project, pipeline)
@@ -70,47 +54,9 @@ class EncodingDialog(GladeWindow, Renderer):
 
         self.window.connect("delete-event", self._deleteEventCb)
 
-    def _shutDown(self):
-        self.debug("shutting down")
-        # Abort recording
-        self.removeAction()
-        self.destroy()
 
     def _displaySettings(self):
-        if self.have_video:
-            self.vinfo.set_markup(self.settings.getVideoDescription())
-        else:
-            self.vinfo.set_markup("no video")
-
-        if self.have_audio:
-            self.ainfo.set_markup(self.settings.getAudioDescription())
-        else:
-            self.ainfo.set_markup("no audio")
-
-    def _fileButtonClickedCb(self, button):
-        dialog = gtk.FileChooserDialog(title=_("Choose file to render to"),
-                                       parent=self.window,
-                                       buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT,
-                                                gtk.STOCK_OK, gtk.RESPONSE_ACCEPT),
-                                       action=gtk.FILE_CHOOSER_ACTION_SAVE)
-        dialog.set_icon_name("pitivi")
-        if self.outfile:
-            fullfilename = urlparse(self.outfile).path
-            dialog.set_filename(urllib.url2pathname(fullfilename))
-            dialog.set_current_name(urllib.url2pathname(os.path.basename(fullfilename)))
-        else:
-            dialog.set_current_folder(self.app.settings.lastExportFolder)
 
-        res = dialog.run()
-        dialog.hide()
-        if res == gtk.RESPONSE_ACCEPT:
-            self.outfile = dialog.get_uri()
-            shortfilename = os.path.basename(urlparse(self.outfile).path)
-            button.set_label(urllib.url2pathname(shortfilename))
-            self.recordbutton.set_sensitive(True)
-            self.progressbar.set_text("")
-            self.app.settings.lastExportFolder = dialog.get_current_folder()
-        dialog.destroy()
 
     def updatePosition(self, fraction, text):
         self.progressbar.set_fraction(fraction)
@@ -118,16 +64,7 @@ class EncodingDialog(GladeWindow, Renderer):
         if text is not None:
             self.progressbar.set_text(_("About %s left") % text)
 
-    def _recordButtonClickedCb(self, unused_button):
         self.startAction()
-        if self.acting:
-            self.cancelbutton.set_label("gtk-cancel")
-            self.progressbar.set_text(_("Rendering"))
-            # xgettext:no-python-format
-            self.window.set_title(_("0% rendered"))
-            self.recordbutton.set_sensitive(False)
-            self.filebutton.set_sensitive(False)
-            self.settingsbutton.set_sensitive(False)
 
     def _settingsButtonClickedCb(self, unused_button):
         dialog = ExportSettingsDialog(self.app, self.settings)
@@ -139,18 +76,9 @@ class EncodingDialog(GladeWindow, Renderer):
         dialog.destroy()
 
     def updateUIOnEOS(self):
-        self.progressbar.set_text(_("Rendering Complete"))
-        self.window.set_title(_("Rendering Complete"))
-        self.progressbar.set_fraction(1.0)
-        self.recordbutton.set_sensitive(False)
-        self.filebutton.set_sensitive(True)
-        self.settingsbutton.set_sensitive(True)
-        self.cancelbutton.set_label("gtk-close")
 
     def _cancelButtonClickedCb(self, unused_button):
         self.debug("Cancelling !")
-        self._shutDown()
 
     def _deleteEventCb(self, window, event):
         self.debug("delete event")
-        self._shutDown()



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