Kill button as back button when on zavai
authorEnrico Zini <enrico@enricozini.org>
Sun, 16 Aug 2009 10:19:03 +0000 (11:19 +0100)
committerEnrico Zini <enrico@enricozini.org>
Sun, 16 Aug 2009 10:19:03 +0000 (11:19 +0100)
icons/quit_off.png
src/app.vala
src/app_wm.vala

index 4d79a8c5285d276e62e9bedfe1091e64178781a7..203548435f86a81ae30785c18e9b645ea770827a 100644 (file)
Binary files a/icons/quit_off.png and b/icons/quit_off.png differ
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
index 833a4e541679608947d8634e1ffa0daf9223d86e..6882e6567e319258d99c779b314a6bc9386ee282 100644 (file)
@@ -100,6 +100,7 @@ public class CloseOrBack : Gtk.StatusIcon
                if (zavai.app.visibility)
                {
                        // Back
+                       zavai.app.back();
                } else {
                        // Close current app
                        Gdk.Window w = zavai.app.get_screen().get_active_window();