In progress...
This commit is contained in:
parent
5bf19ff05a
commit
8c518f5f75
|
@ -2,7 +2,7 @@ extern static char SO_PATH[256];
|
|||
|
||||
namespace LAview.Core.Plugins {
|
||||
|
||||
class AppDirs {
|
||||
class AppDirs : Object {
|
||||
|
||||
public static File so_path;
|
||||
public static File exec_dir;
|
||||
|
|
|
@ -1,21 +1,23 @@
|
|||
namespace LAview.Core.Plugins {
|
||||
using Gtk, LAview;
|
||||
|
||||
class ObjectExampleDialog1 {
|
||||
//Dialog dialog;
|
||||
class ObjectExampleDialog : Object {
|
||||
Dialog dialog;
|
||||
|
||||
ObjectExampleDialog1 (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 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 ();
|
||||
// }
|
||||
public void show_all () {
|
||||
dialog.show_all ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ namespace LAview.Core.Plugins {
|
|||
*/
|
||||
public class PluginObjectExample : PluginObject {
|
||||
|
||||
//ObjectExampleDialog1 object_dialog = null;
|
||||
ObjectExampleDialog object_dialog = null;
|
||||
|
||||
/**
|
||||
* Constructs a new ``PluginObjectExample``.
|
||||
|
@ -47,9 +47,9 @@ 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 ObjectExampleDialog1 (null);
|
||||
if (object_dialog == null) object_dialog = new ObjectExampleDialog (null);
|
||||
|
||||
//object_dialog.show_all ();
|
||||
object_dialog.show_all ();
|
||||
|
||||
PluginDataExample data_obj_ex = (host as IHostCore).get_data_object ("DataExample") as PluginDataExample;
|
||||
stdout.puts ("Compose() called\n");
|
||||
|
@ -62,16 +62,10 @@ namespace LAview.Core.Plugins {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
public class MyNameIsVasya {
|
||||
public MyNameIsVasya () {
|
||||
stdout.puts ("My name is Vasya\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[ModuleInit]
|
||||
Type plugin_init (GLib.TypeModule type_module) {
|
||||
stdout.puts ("---ModuleInit called()---\n");
|
||||
return typeof (PluginObjectExample);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue