1
0
Fork 0

In progress...

This commit is contained in:
Kolan Sh 2016-04-07 02:18:43 +03:00
parent 1e682efaf0
commit 03156ad027
2 changed files with 17 additions and 10 deletions

View File

@ -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 ();
}
}
}

View File

@ -21,6 +21,7 @@
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
<signal name="activate" handler="laview_core_plugins_object_example_dialog_button_apply_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
@ -35,6 +36,7 @@
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
<signal name="activate" handler="laview_core_plugins_object_example_dialog_button_ok_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
@ -49,7 +51,7 @@
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
<signal name="activate" handler="l" swapped="no"/>
<signal name="activate" handler="laview_core_plugins_object_example_dialog_button_cancel_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>