[pitivi] mainwindow: remove "removeLayerCb".



commit 30467920dfd6ec08c7d751a69fee6f5c000b97c7
Author: Mathieu Duponchelle <mduponchelle1 gmail com>
Date:   Thu Feb 6 12:14:58 2014 +0100

    mainwindow: remove "removeLayerCb".
    
    It relied on inexistent functions in ControlContainer.
    This functionnality should be evident on the layer control.

 data/ui/mainwindow.xml |    1 -
 pitivi/mainwindow.py   |   13 +------------
 2 files changed, 1 insertions(+), 13 deletions(-)
---
diff --git a/data/ui/mainwindow.xml b/data/ui/mainwindow.xml
index c605dc0..488c414 100644
--- a/data/ui/mainwindow.xml
+++ b/data/ui/mainwindow.xml
@@ -35,7 +35,6 @@
     <menu action="Timeline">
       <placeholder name="Timeline" />
       <separator />
-      <menuitem action="RemoveLayer" />
     </menu>
     <menu action="Help">
       <menuitem action="UserManual" />
diff --git a/pitivi/mainwindow.py b/pitivi/mainwindow.py
index eccadb8..f904f19 100644
--- a/pitivi/mainwindow.py
+++ b/pitivi/mainwindow.py
@@ -278,9 +278,6 @@ class PitiviMainWindow(Gtk.Window, Loggable):
             ("Preferences", Gtk.STOCK_PREFERENCES, None,
             None, None, self._prefsCb),
 
-            ("RemoveLayer", Gtk.STOCK_REMOVE, _("Remove layer"),
-             None, _("Remove the selected layer from the project"), self._removeLayerCb),
-
             ("Quit", Gtk.STOCK_QUIT, None, None, None, self._quitCb),
 
             ("About", Gtk.STOCK_ABOUT, None,
@@ -428,7 +425,7 @@ class PitiviMainWindow(Gtk.Window, Loggable):
         # Now, the lower part: the timeline
         self.timeline_ui = TimelineContainer(self, instance, self.uimanager)
         self.timeline_ui.setProjectManager(self.app.projectManager)
-        self.timeline_ui.controls.connect("selection-changed", self._selectedLayerChangedCb)
+
         self.vpaned.pack2(self.timeline_ui, resize=True, shrink=False)
 
         # Identify widgets for AT-SPI, making our test suite easier to develop
@@ -604,9 +601,6 @@ class PitiviMainWindow(Gtk.Window, Loggable):
         to remove all instances of that clip."""
         self.timeline_ui.purgeObject(asset.get_id())
 
-    def _selectedLayerChangedCb(self, unused_widget, layer):
-        self.main_actions.get_action("RemoveLayer").set_sensitive(layer is not None)
-
 ## Toolbar/Menu actions callback
 
     def _newProjectMenuCb(self, unused_action):
@@ -645,11 +639,6 @@ class PitiviMainWindow(Gtk.Window, Loggable):
     def _projectSettingsCb(self, unused_action):
         self.showProjectSettingsDialog()
 
-    def _removeLayerCb(self, unused_action):
-        layer = self.timeline_ui.controls.getSelectedLayer()
-        timeline = layer.get_timeline()
-        timeline.remove_layer(layer)
-
     def showProjectSettingsDialog(self):
         from pitivi.project import ProjectSettingsDialog
         ProjectSettingsDialog(self, self.app.current_project).window.run()


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