~nagos/openshot/nagos

« back to all changes in this revision

Viewing changes to openshot/windows/MainGTK.py

  • Committer: Jonathan Thomas
  • Date: 2010-01-28 07:39:38 UTC
  • Revision ID: jonathan@jonathan64-20100128073938-xlmzndtbuqwgtama
Bumped version to 1.0.3

Intergrated a patch from Cody to fix some translation
strings missing (i.e. Track 1, Track 2)

Improved the speed of GenerateXML() 1300%.  This was mainly due to 
a very poor project.fps() method, which was slow and used all
over the place.  So, I tried to not call the method as much,
and I implemented some caching of the fps value.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1602
1602
                _ = self._
1603
1603
 
1604
1604
                # Add a new track to the timeline               
1605
 
                self.project.sequences[0].AddTrack(_("Track %s" % str(len(self.project.sequences[0].tracks) + 1)))
 
1605
                self.project.sequences[0].AddTrack(_("Track %s") % str(len(self.project.sequences[0].tracks) + 1))
1606
1606
                self.project.Render()
1607
1607
 
1608
1608
 
1748
1748
                self.project.sequences[0].scale = int(new_zoom_value)
1749
1749
                
1750
1750
                # update zoom label
1751
 
                self.lblZoomDetail.set_text(_("%s seconds" % int(new_zoom_value)))
 
1751
                self.lblZoomDetail.set_text(_("%s seconds") % int(new_zoom_value))
1752
1752
 
1753
1753
                # re-render the timeline with the new scale
1754
1754
                self.project.Render()
1922
1922
 
1923
1923
        def on_treeFiles_button_press_event(self,treeview, event):
1924
1924
                """This shows the right click menu"""
 
1925
                #print "on_treeFiles_button_press_event"
 
1926
                
1925
1927
                if (event.button == 3):
1926
1928
                        # determine which item the user right clicked on
1927
 
                        #path = treeview.get_path_at_pos(int(event.x),int(event.y))
 
1929
                        # path, treecolumn, mouse_x, mouse_y = treeview.get_path_at_pos(int(event.x),int(event.y))
 
1930
                        # treeview.row_activated(path, treecolumn)
 
1931
                        
1928
1932
                        # Get the selection
1929
1933
                        selection = treeview.get_selection()
1930
1934
                        # Get the selected path(s)
1986
1990
                _ = self._
1987
1991
                
1988
1992
                # remove this track from it's parent sequence
1989
 
                self.project.sequences[0].AddTrack(_("Track %s" % str(len(self.project.sequences[0].tracks) + 1)), position="above", existing_track=self.selected_track)
 
1993
                self.project.sequences[0].AddTrack(_("Track %s") % str(len(self.project.sequences[0].tracks) + 1), position="above", existing_track=self.selected_track)
1990
1994
                
1991
1995
                # refresh the interface
1992
1996
                self.project.Render()
1999
2003
                _ = self._
2000
2004
                
2001
2005
                # remove this track from it's parent sequence
2002
 
                self.project.sequences[0].AddTrack(_("Track %s" % str(len(self.project.sequences[0].tracks) + 1)), position="below", existing_track=self.selected_track)
 
2006
                self.project.sequences[0].AddTrack(_("Track %s") % str(len(self.project.sequences[0].tracks) + 1), position="below", existing_track=self.selected_track)
2003
2007
                
2004
2008
                # refresh the interface
2005
2009
                self.project.Render()
2796
2800
 
2797
2801
 
2798
2802
        def showmnu(self, event, widget):
2799
 
                
 
2803
 
2800
2804
                # get correct gettext method
2801
2805
                _ = self._
2802
2806