From ae35b77787c0441247582be5fbfb12a8bb1dfa63 Mon Sep 17 00:00:00 2001 From: Kolan Sh Date: Fri, 27 Apr 2018 16:48:32 +0300 Subject: [PATCH] DataExampleDialog->DataExample.PreferencesDialog --- src/{DataDialog.vala => PreferencesDialog.vala} | 6 +++--- src/main.vala | 6 +++--- ui/glade/laview-plugin-data-example.glade | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) rename src/{DataDialog.vala => PreferencesDialog.vala} (84%) diff --git a/src/DataDialog.vala b/src/PreferencesDialog.vala similarity index 84% rename from src/DataDialog.vala rename to src/PreferencesDialog.vala index a04249e..da53052 100644 --- a/src/DataDialog.vala +++ b/src/PreferencesDialog.vala @@ -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; diff --git a/src/main.vala b/src/main.vala index ac610e5..3db3382 100644 --- a/src/main.vala +++ b/src/main.vala @@ -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 (); } /** diff --git a/ui/glade/laview-plugin-data-example.glade b/ui/glade/laview-plugin-data-example.glade index 629c569..aa750d8 100644 --- a/ui/glade/laview-plugin-data-example.glade +++ b/ui/glade/laview-plugin-data-example.glade @@ -2,7 +2,7 @@ - + False dialog @@ -22,7 +22,7 @@ True True True - + True @@ -38,7 +38,7 @@ True True True - + True @@ -54,7 +54,7 @@ True True True - + True