1
0
Fork 0

In progress...

This commit is contained in:
Kolan Sh 2016-04-04 00:47:42 +03:00
parent 4d65c69f20
commit fc7673b63d
2 changed files with 27 additions and 0 deletions

21
src/ObjectDialog.vala Normal file
View File

@ -0,0 +1,21 @@
namespace LAview.Core.Plugins {
using Gtk, LAview;
public class ObjectExampleDialog {
Dialog dialog;
public ObjectExampleDialog (Window parent) throws Error {
var builder = new Builder ();
builder.add_from_file (AppDirs.ui_dir + "/laview-plugin-object-example.glade");
builder.connect_signals (this);
dialog = builder.get_object ("object_example_dialog") as Dialog;
if (parent != null) dialog.transient_for = parent;
dialog.modal = true;
}
public void show_all () {
dialog.show_all ();
}
}
}

View File

@ -8,6 +8,8 @@ namespace LAview.Core.Plugins {
*/
public class PluginObjectExample : PluginObject {
ObjectExampleDialog object_dialog = null;
/**
* Constructs a new ``PluginObjectExample``.
*/
@ -45,6 +47,10 @@ namespace LAview.Core.Plugins {
* Compose the object.
*/
public override bool compose (Gee.HashMap<string, AnswerValue> answers) throws Error {
if (object_dialog == null) object_dialog = new ObjectExampleDialog (null);
object_dialog.show_all ();
PluginDataExample data_obj_ex = (host as IHostCore).get_data_object ("DataExample") as PluginDataExample;
stdout.puts ("Compose() called\n");
foreach (var a in answers.entries) {