1
0
Fork 0

In progress...

This commit is contained in:
Kolan Sh 2016-04-04 03:03:52 +03:00
parent 13f910282d
commit 90a7f934ad
2 changed files with 7 additions and 7 deletions

View File

@ -4,16 +4,16 @@ namespace LAview.Core.Plugins {
class ObjectExampleDialog : Object {
Dialog dialog;
public ObjectExampleDialog (/*Window parent*/) throws Error {
public ObjectExampleDialog (Object 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_bkp") as Dialog;
//if (parent != null) {
// dialog.transient_for = parent;
// dialog.modal = true;
//}
if (parent is Window) {
dialog.transient_for = parent as Window;
dialog.modal = true;
}
}
public void show_all () {

View File

@ -46,8 +46,8 @@ 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);
public override bool compose (Object parent, Gee.HashMap<string, AnswerValue> answers) throws Error {
if (object_dialog == null) object_dialog = new ObjectExampleDialog (parent);
object_dialog.show_all ();