Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Switched to render then upload, progress for the upload, code simplif…
…ied and cleaned, abstract uploader class
  • Loading branch information
Mathieu69 authored and feroze committed Aug 26, 2011
1 parent 88896f3 commit 7e421e1
Show file tree
Hide file tree
Showing 4 changed files with 258 additions and 216 deletions.
19 changes: 17 additions & 2 deletions pitivi/ui/mainwindow.py
Expand Up @@ -33,6 +33,19 @@
from urllib import unquote
import webbrowser

try:
import gconf
except:
HAVE_GCONF = False
else:
HAVE_GCONF = True

try:
import gdata.youtube.client
HAVE_GDATA_2 = True
except:
HAVE_GDATA_2 = False

from gettext import gettext as _
from gtk import RecentManager

Expand Down Expand Up @@ -744,7 +757,8 @@ def _projectManagerNewProjectLoadedCb(self, projectManager, project):
self._connectToProjectSources(project.sources)
can_render = project.timeline.duration > 0
self.render_button.set_sensitive(can_render)
self.publish_button.set_sensitive(can_render)
if HAVE_GDATA_2:
self.publish_button.set_sensitive(can_render)
self._syncDoUndo(self.app.action_log)

if self._missingUriOnLoading:
Expand Down Expand Up @@ -1062,7 +1076,8 @@ def _timelineDurationChangedCb(self, timeline, duration):
else:
sensitive = False
self.render_button.set_sensitive(sensitive)
self.publish_button.set_sensitive(sensitive)
if HAVE_GDATA_2:
self.publish_button.set_sensitive(sensitive)

## other

Expand Down
53 changes: 47 additions & 6 deletions pitivi/ui/publishtoyoutubedialog.glade
Expand Up @@ -18,6 +18,9 @@
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<widget class="GtkVBox" id="vbox2">
<property name="visible">True</property>
Expand Down Expand Up @@ -180,7 +183,7 @@
<child>
<widget class="GtkTable" id="table2">
<property name="visible">True</property>
<property name="n_rows">5</property>
<property name="n_rows">7</property>
<property name="n_columns">2</property>
<child>
<widget class="GtkLabel" id="label2">
Expand Down Expand Up @@ -322,6 +325,42 @@
<property name="bottom_attach">5</property>
</packing>
</child>
<child>
<widget class="GtkEntry" id="fileentry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">&#x25CF;</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">6</property>
<property name="bottom_attach">7</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label12">
<property name="visible">True</property>
<property name="label" translatable="yes">Folder :</property>
</widget>
<packing>
<property name="top_attach">5</property>
<property name="bottom_attach">6</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label11">
<property name="visible">True</property>
<property name="label" translatable="yes">File name:</property>
</widget>
<packing>
<property name="top_attach">6</property>
<property name="bottom_attach">7</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
Expand All @@ -339,17 +378,19 @@
<widget class="GtkVBox" id="vbox5">
<property name="visible">True</property>
<child>
<widget class="GtkLabel" id="label12">
<placeholder/>
</child>
<child>
<widget class="GtkProgressBar" id="renderbar">
<property name="visible">True</property>
<property name="label" translatable="yes">Initializing ..</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</widget>
<packing>
<property name="page_type">summary</property>
Expand Down

0 comments on commit 7e421e1

Please sign in to comment.