From 020567dd2b56c9b55c2ebe6722e1e4518e4efc17 Mon Sep 17 00:00:00 2001 From: Kolan Sh Date: Thu, 7 Apr 2016 02:44:43 +0300 Subject: [PATCH] In progress... --- src/ObjectDialog.vala | 8 ++++---- src/main.vala | 5 +---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/ObjectDialog.vala b/src/ObjectDialog.vala index 3804d44..113b5e8 100644 --- a/src/ObjectDialog.vala +++ b/src/ObjectDialog.vala @@ -4,6 +4,8 @@ namespace LAview.Core.Plugins { class ObjectExampleDialog : Object { Dialog dialog; + public bool composed { set; get; default = false; } + public ObjectExampleDialog (Object parent) throws Error { var builder = new Builder (); builder.add_from_file (AppDirs.ui_dir + "/laview-plugin-object-example.glade"); @@ -27,19 +29,17 @@ namespace LAview.Core.Plugins { [CCode (instance_pos = -1)] public void button_apply_clicked (Button button) { - stdout.puts ("button_apply_clicked() called\n"); - dialog.hide (); + composed = true; } [CCode (instance_pos = -1)] public void button_ok_clicked (Button button) { - stdout.puts ("button_ok_clicked() called\n"); + composed = true; dialog.hide (); } [CCode (instance_pos = -1)] public void button_cancel_clicked (Button button) { - stdout.puts ("button_cancel_clicked() called\n"); dialog.hide (); } } diff --git a/src/main.vala b/src/main.vala index 0f52ec4..6b0dd12 100644 --- a/src/main.vala +++ b/src/main.vala @@ -76,13 +76,10 @@ namespace LAview.Core.Plugins { default: break; } - //stdout.printf ("%s ", a.key); } - //stdout.putc ('\n'); - return true; + return object_dialog.composed; } - } }