+ public class Xcls_Button5 : Object
+ {
+ public Gtk.Button el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Button5(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Button();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.icon_name = "edit-undo";
+ this.el.has_frame = false;
+
+ //listeners
+ this.el.clicked.connect( ( ) => {
+
+ GLib.debug("undo clicked");
+ if (_this.windowstate.file.xtype == "PlainFile") {
+ _this.windowstate.code_editor_tab.buffer.el.undo();
+ }
+ if (!_this.windowstate.file.undoStep(-1)) {
+ return;
+ }
+
+
+ _this.windowstate.switchState (WindowState.State.PREVIEW);
+ // this triggers loadItems..
+ _this.windowstate.left_tree.model.loadFile(
+ _this.windowstate.file);
+
+
+
+
+
+ // load it everywhere
+ });
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_Button6 : Object
+ {
+ public Gtk.Button el;
+ private Xcls_MainWindow _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Button6(Xcls_MainWindow _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Button();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.icon_name = "edit-redo";
+ this.el.has_frame = false;
+
+ //listeners
+ this.el.clicked.connect( ( ) => {
+
+ GLib.debug("undo clicked");
+ if (_this.windowstate.file.xtype == "PlainFile") {
+ _this.windowstate.code_editor_tab.buffer.el.redo();
+ }
+ if (!_this.windowstate.file.undoStep(1)) {
+ return;
+ }
+
+
+ _this.windowstate.switchState (WindowState.State.PREVIEW);
+ // this triggers loadItems..
+ _this.windowstate.left_tree.model.loadFile(
+ _this.windowstate.file);
+
+
+
+
+
+ // load it everywhere
+ });
+ }
+
+ // user defined functions
+ }
+