DataExampleDialog->DataExample.PreferencesDialog
This commit is contained in:
parent
db1e427c98
commit
ae35b77787
|
@ -1,17 +1,17 @@
|
|||
namespace LAview.Core.Plugins {
|
||||
using Gtk, LAview;
|
||||
|
||||
class DataExampleDialog : Object {
|
||||
class DataExample.PreferencesDialog : Object {
|
||||
Dialog dialog;
|
||||
|
||||
public bool composed { get; private set; default = false; }
|
||||
|
||||
public DataExampleDialog (Object parent) throws Error {
|
||||
public PreferencesDialog (Object parent) throws Error {
|
||||
var builder = new Builder ();
|
||||
builder.add_from_file (DataExample.AppDirs.ui_dir + "/laview-plugin-data-example.glade");
|
||||
builder.connect_signals (this);
|
||||
|
||||
dialog = builder.get_object ("data_example_dialog") as Dialog;
|
||||
dialog = builder.get_object ("preferences_dialog") as Dialog;
|
||||
if (parent is Window) {
|
||||
dialog.destroy_with_parent = true;
|
||||
dialog.transient_for = parent as Window;
|
|
@ -8,7 +8,7 @@ namespace LAview.Core.Plugins {
|
|||
*/
|
||||
public class PluginDataExample : PluginData {
|
||||
|
||||
DataExampleDialog data_dialog = null;
|
||||
DataExample.PreferencesDialog preferences_dialog = null;
|
||||
|
||||
/**
|
||||
* Constructs a new ``PluginDataExample``.
|
||||
|
@ -48,9 +48,9 @@ namespace LAview.Core.Plugins {
|
|||
// TODO: Open Preferences window.
|
||||
stdout.puts("Data Example preferences () called.\n");
|
||||
|
||||
if (data_dialog == null) data_dialog = new DataExampleDialog (parent);
|
||||
if (preferences_dialog == null) preferences_dialog = new DataExample.PreferencesDialog (parent);
|
||||
|
||||
data_dialog.show_all ();
|
||||
preferences_dialog.show_all ();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!-- Generated with glade 3.20.4 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.16"/>
|
||||
<object class="GtkDialog" id="data_example_dialog">
|
||||
<object class="GtkDialog" id="preferences_dialog">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<child internal-child="vbox">
|
||||
|
@ -22,7 +22,7 @@
|
|||
<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_data_example_dialog_button_apply_clicked" swapped="no"/>
|
||||
<signal name="clicked" handler="laview_core_plugins_data_example_preferences_dialog_button_apply_clicked" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
|
@ -38,7 +38,7 @@
|
|||
<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_data_example_dialog_button_ok_clicked" swapped="no"/>
|
||||
<signal name="clicked" handler="laview_core_plugins_data_example_preferences_dialog_button_ok_clicked" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
|
@ -54,7 +54,7 @@
|
|||
<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_data_example_dialog_button_cancel_clicked" swapped="no"/>
|
||||
<signal name="clicked" handler="laview_core_plugins_data_example_preferences_dialog_button_cancel_clicked" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
|
|
Loading…
Reference in New Issue