Kill button as back button when on zavai
[gregoa/zavai.git] / src / app.vala
index 88e320c0931f00cdad90c45e77a58b59539bf0f1..2478d2bac4e5d1b576eb03c06d3423e98162d8eb 100644 (file)
@@ -127,6 +127,12 @@ public class Zavai : Gtk.Window, zavai.Resource
                current.show_all();
        }
 
+       public void back()
+       {
+               if (current != null)
+                       current.back();
+       }
+
        public void shutdown()
        {
        }
@@ -227,6 +233,11 @@ public abstract class Applet : Gtk.VBox, Resource
         self.pack_start(widget, True, True)
 */
 
+       public virtual void back()
+       {
+               _back_link.activate();
+       }
+
        public void shutdown()
        {
                stop();
@@ -307,6 +318,11 @@ public abstract class AppletLink : BigButton
 
                clicked += on_clicked;
        }
+
+       public virtual void activate()
+       {
+               on_clicked(this);
+       }
 }
 
 public class AppletStraightLink : AppletLink