diff --git a/src/ObjectDialog.vala b/src/ObjectDialog.vala index 061c675..3075a54 100644 --- a/src/ObjectDialog.vala +++ b/src/ObjectDialog.vala @@ -14,25 +14,30 @@ namespace LAview.Core.Plugins { dialog.destroy_with_parent = true; dialog.transient_for = parent as Window; dialog.modal = true; - //dialog.application = application; - dialog.delete_event.connect ((source) => {return true;}); - dialog.hide_on_delete (); + dialog.delete_event.connect ((source) => { + dialog.hide_on_delete(); + return true; + }); } - - //dialog.response.connect ((response_id) => { - // if (response_id == Gtk.ResponseType.CANCEL || response_id == Gtk.ResponseType.DELETE_EVENT) { - // dialog.hide_on_delete (); - // } - //}); } public void show_all () { dialog.show_all (); } + [CCode (instance_pos = -1)] + public void button_apply_clicked (Button button) { + dialog.hide_on_delete (); + } + [CCode (instance_pos = -1)] public void button_ok_clicked (Button button) { dialog.hide_on_delete (); } + + [CCode (instance_pos = -1)] + public void button_cancel_clicked (Button button) { + dialog.hide_on_delete (); + } } } diff --git a/ui/glade/laview-plugin-object-example.glade b/ui/glade/laview-plugin-object-example.glade index c4d309e..68d3495 100644 --- a/ui/glade/laview-plugin-object-example.glade +++ b/ui/glade/laview-plugin-object-example.glade @@ -21,6 +21,7 @@ True True True + True @@ -35,6 +36,7 @@ True True True + True @@ -49,7 +51,7 @@ True True True - + True