In progress...
This commit is contained in:
parent
4d65c69f20
commit
fc7673b63d
21
src/ObjectDialog.vala
Normal file
21
src/ObjectDialog.vala
Normal 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 ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -8,6 +8,8 @@ namespace LAview.Core.Plugins {
|
|||||||
*/
|
*/
|
||||||
public class PluginObjectExample : PluginObject {
|
public class PluginObjectExample : PluginObject {
|
||||||
|
|
||||||
|
ObjectExampleDialog object_dialog = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs a new ``PluginObjectExample``.
|
* Constructs a new ``PluginObjectExample``.
|
||||||
*/
|
*/
|
||||||
@ -45,6 +47,10 @@ namespace LAview.Core.Plugins {
|
|||||||
* Compose the object.
|
* Compose the object.
|
||||||
*/
|
*/
|
||||||
public override bool compose (Gee.HashMap<string, AnswerValue> answers) throws Error {
|
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;
|
PluginDataExample data_obj_ex = (host as IHostCore).get_data_object ("DataExample") as PluginDataExample;
|
||||||
stdout.puts ("Compose() called\n");
|
stdout.puts ("Compose() called\n");
|
||||||
foreach (var a in answers.entries) {
|
foreach (var a in answers.entries) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user