In progress...
This commit is contained in:
parent
1e682efaf0
commit
03156ad027
|
@ -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 ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue