[pitivi] Disable undo/redo



commit 8dfae7c25341d3b5244b451288a38eff3c60e3df
Author: Alexandru Băluț <alexandru balut gmail com>
Date:   Fri Oct 23 00:14:22 2015 +0200

    Disable undo/redo
    
    We need to review the undo/redo code and add unittests before
    reenabling.
    
    Differential Revision: https://phabricator.freedesktop.org/D341

 pitivi/application.py |    2 ++
 pitivi/mainwindow.py  |   27 ++++++++++++++-------------
 2 files changed, 16 insertions(+), 13 deletions(-)
---
diff --git a/pitivi/application.py b/pitivi/application.py
index db8cd5b..036b3d0 100644
--- a/pitivi/application.py
+++ b/pitivi/application.py
@@ -356,6 +356,8 @@ class Pitivi(Gtk.Application, Loggable):
 
     def _syncDoUndo(self, action_log):
         can_undo = bool(action_log.undo_stacks)
+        # TODO: Remove this once we revisit undo/redo T3360
+        can_undo = False
         self.undo_action.set_enabled(can_undo)
 
         can_redo = bool(action_log.redo_stacks)
diff --git a/pitivi/mainwindow.py b/pitivi/mainwindow.py
index c5f3db0..0283eb2 100644
--- a/pitivi/mainwindow.py
+++ b/pitivi/mainwindow.py
@@ -423,19 +423,19 @@ class PitiviMainWindow(Gtk.ApplicationWindow, Loggable):
         self.timeline_ui.grab_focus()
 
     def _create_headerbar_buttons(self):
-        self.undo_button = Gtk.Button.new_from_icon_name(
+        undo_button = Gtk.Button.new_from_icon_name(
             "edit-undo-symbolic", Gtk.IconSize.LARGE_TOOLBAR)
-        self.undo_button.set_always_show_image(True)
-        self.undo_button.set_label(_("Undo"))
-        self.undo_button.set_action_name("app.undo")
-        self.undo_button.set_use_underline(True)
+        undo_button.set_always_show_image(True)
+        undo_button.set_label(_("Undo"))
+        undo_button.set_action_name("app.undo")
+        undo_button.set_use_underline(True)
 
-        self.redo_button = Gtk.Button.new_from_icon_name(
+        redo_button = Gtk.Button.new_from_icon_name(
             "edit-redo-symbolic", Gtk.IconSize.LARGE_TOOLBAR)
-        self.redo_button.set_always_show_image(True)
-        self.redo_button.set_label(_("Redo"))
-        self.redo_button.set_action_name("app.redo")
-        self.redo_button.set_use_underline(True)
+        redo_button.set_always_show_image(True)
+        redo_button.set_label(_("Redo"))
+        redo_button.set_action_name("app.redo")
+        redo_button.set_use_underline(True)
 
         separator = Gtk.Separator()
 
@@ -456,9 +456,10 @@ class PitiviMainWindow(Gtk.ApplicationWindow, Loggable):
         self.render_button.set_sensitive(False)  # The only one we have to set.
         self.render_button.connect("clicked", self._renderCb)
 
-        self._headerbar.pack_start(self.undo_button)
-        self._headerbar.pack_start(self.redo_button)
-        self._headerbar.pack_start(separator)
+        # TODO: Add these back once we revisit undo/redo T3360
+        # self._headerbar.pack_start(undo_button)
+        # self._headerbar.pack_start(redo_button)
+        # self._headerbar.pack_start(separator)
         self._headerbar.pack_start(self.save_button)
         self._headerbar.pack_start(self.render_button)
 


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