lib/core/stream: LineIterator use CachedIterator
[nit.git] / lib / linux / ui.nit
index 7c56e22..8a6cc81 100644 (file)
@@ -64,7 +64,6 @@ redef class App
        do
                app.on_create
                app.on_restore_state
-               app.on_start
                app.on_resume
 
                gtk_main
@@ -72,7 +71,6 @@ redef class App
                app.on_pause
                app.on_stop
                app.on_save_state
-               app.on_destroy
        end
 
        # Spacing between GTK controls, default at 2
@@ -317,6 +315,9 @@ redef class CheckBox
        redef type NATIVE: GtkCheckButton
        redef var native = new GtkCheckButton
 
+       redef fun signal(sender, data) do notify_observers new ToggleEvent(self)
+       init do native.signal_connect("toggled", self, null)
+
        redef fun text do return native.text
        redef fun text=(value) do native.text = (value or else "").to_s
 
@@ -340,3 +341,7 @@ redef class TextInput
                super
        end
 end
+
+redef class Text
+       redef fun open_in_browser do system("xdg-open '{self.escape_to_sh}' &")
+end