ObjectExample Dialog [Preferences Button] -> Preferences Dialog.
This commit is contained in:
parent
a846158937
commit
308dee4232
|
@ -3,6 +3,7 @@ namespace LAview.Core.Plugins {
|
|||
|
||||
class ObjectExampleDialog : Object {
|
||||
Dialog dialog;
|
||||
ObjectExample.PreferencesDialog preferences_dialog;
|
||||
|
||||
public bool composed { get; private set; default = false; }
|
||||
|
||||
|
@ -43,5 +44,12 @@ namespace LAview.Core.Plugins {
|
|||
public void button_cancel_clicked (Button button) {
|
||||
dialog.hide ();
|
||||
}
|
||||
|
||||
[CCode (instance_pos = -1)]
|
||||
public void button_preferences_clicked (Button button) {
|
||||
if (preferences_dialog == null) preferences_dialog = new ObjectExample.PreferencesDialog (dialog);
|
||||
|
||||
preferences_dialog.show_all ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,6 +14,22 @@
|
|||
<object class="GtkButtonBox" id="dialog-action_area1">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="layout_style">end</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="button_preferences">
|
||||
<property name="label">gtk-preferences</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="always_show_image">True</property>
|
||||
<signal name="clicked" handler="laview_core_plugins_object_example_dialog_button_preferences_clicked" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button_apply">
|
||||
<property name="label">gtk-apply</property>
|
||||
|
@ -27,7 +43,7 @@
|
|||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
|
@ -43,7 +59,7 @@
|
|||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
|
@ -59,7 +75,7 @@
|
|||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
|
|
Loading…
Reference in New Issue