action_area.show_all ();
+ add_button ("Copy", 2);
add_button ("Test", 1);
add_button ("Done", Gtk.ResponseType.ACCEPT);
void on_response (int response) {
if (response == 1) {
Timeout.add (200, delayed_spawn);
- return;
- }
- if (response == Gtk.ResponseType.ACCEPT) {
+ } else if (response == 2) {
+ var clipboard = Gtk.Clipboard.@get (Gdk.SELECTION_CLIPBOARD);
+
+ clipboard.set_text (lpv.pattern.dump (), -1);
+ clipboard.store ();
+ Hildon.Banner.show_information (null, null, "Copied");
+ } else if (response == Gtk.ResponseType.ACCEPT) {
if (pattern.dump () != lpv.pattern.dump ()) {
pattern.replace_with (lpv.pattern);
}