[gnome-boxes/wip/snapshot-config-changes: 1/6] machine-config-editor: Rename "TextEditor" to "MachineConfigEditor"
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/wip/snapshot-config-changes: 1/6] machine-config-editor: Rename "TextEditor" to "MachineConfigEditor"
- Date: Fri, 9 Oct 2020 12:38:26 +0000 (UTC)
commit c9bc24db97ecf709bec4259337a10eb09dadd809
Author: Felipe Borges <felipeborges gnome org>
Date: Fri Oct 9 11:48:55 2020 +0200
machine-config-editor: Rename "TextEditor" to "MachineConfigEditor"
It is a bit more verbose but much more self explanatory.
data/gnome-boxes.gresource.xml | 2 +-
data/ui/{text-editor.ui => machine-config-editor.ui} | 2 +-
data/ui/properties-toolbar.ui | 6 +++---
data/ui/properties-window.ui | 4 ++--
src/{text-editor.vala => config-editor.vala} | 4 ++--
src/meson.build | 2 +-
src/properties-toolbar.vala | 8 ++++----
src/properties-window.vala | 8 ++++----
8 files changed, 18 insertions(+), 18 deletions(-)
---
diff --git a/data/gnome-boxes.gresource.xml b/data/gnome-boxes.gresource.xml
index 29834a38..66528948 100644
--- a/data/gnome-boxes.gresource.xml
+++ b/data/gnome-boxes.gresource.xml
@@ -35,7 +35,7 @@
<file preprocess="xml-stripblanks">ui/shared-folders.ui</file>
<file preprocess="xml-stripblanks">ui/shared-folder-popover.ui</file>
<file preprocess="xml-stripblanks">ui/snapshot-list-row.ui</file>
- <file preprocess="xml-stripblanks">ui/text-editor.ui</file>
+ <file preprocess="xml-stripblanks">ui/machine-config-editor.ui</file>
<file preprocess="xml-stripblanks">ui/topbar.ui</file>
<file preprocess="xml-stripblanks">ui/transfer-info-row.ui</file>
<file preprocess="xml-stripblanks">ui/transfer-popover.ui</file>
diff --git a/data/ui/text-editor.ui b/data/ui/machine-config-editor.ui
similarity index 97%
rename from data/ui/text-editor.ui
rename to data/ui/machine-config-editor.ui
index 083086ec..afc26a27 100644
--- a/data/ui/text-editor.ui
+++ b/data/ui/machine-config-editor.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.9 -->
- <template class="BoxesTextEditor" parent="GtkScrolledWindow">
+ <template class="BoxesMachineConfigEditor" parent="GtkScrolledWindow">
<property name="visible">True</property>
<property name="vexpand">True</property>
<property name="no-show-all">True</property>
diff --git a/data/ui/properties-toolbar.ui b/data/ui/properties-toolbar.ui
index 14739a54..97ed7edb 100644
--- a/data/ui/properties-toolbar.ui
+++ b/data/ui/properties-toolbar.ui
@@ -100,7 +100,7 @@
<!-- Text Editor page -->
<child>
- <object class="GtkHeaderBar" id="text_editor">
+ <object class="GtkHeaderBar" id="config_editor">
<property name="visible">True</property>
<property name="show-close-button">True</property>
<style>
@@ -164,7 +164,7 @@
<property name="valign">center</property>
<property name="use-underline">True</property>
<property name="label" translatable="yes">_Save</property>
- <signal name="clicked" handler="on_text_editor_save_clicked"/>
+ <signal name="clicked" handler="on_config_editor_save_clicked"/>
<style>
<class name="text-button"/>
</style>
@@ -177,7 +177,7 @@
</object>
<packing>
- <property name="name">text_editor</property>
+ <property name="name">config_editor</property>
</packing>
</child>
diff --git a/data/ui/properties-window.ui b/data/ui/properties-window.ui
index 4b459eef..8a8e63d3 100644
--- a/data/ui/properties-window.ui
+++ b/data/ui/properties-window.ui
@@ -71,12 +71,12 @@
</child>
<child>
- <object class="BoxesTextEditor" id="text_editor">
+ <object class="BoxesMachineConfigEditor" id="config_editor">
<property name="visible">True</property>
</object>
<packing>
- <property name="name">text_editor</property>
+ <property name="name">config_editor</property>
</packing>
</child>
diff --git a/src/text-editor.vala b/src/config-editor.vala
similarity index 97%
rename from src/text-editor.vala
rename to src/config-editor.vala
index 6bbc2abb..d85d2bf6 100644
--- a/src/text-editor.vala
+++ b/src/config-editor.vala
@@ -1,8 +1,8 @@
// This file is part of GNOME Boxes. License: LGPLv2+
using Gtk;
-[GtkTemplate (ui = "/org/gnome/Boxes/ui/text-editor.ui")]
-private class Boxes.TextEditor: Gtk.ScrolledWindow {
+[GtkTemplate (ui = "/org/gnome/Boxes/ui/machine-config-editor.ui")]
+private class Boxes.MachineConfigEditor: Gtk.ScrolledWindow {
private const string BOXES_NS = "boxes";
private const string BOXES_NS_URI = "https://wiki.gnome.org/Apps/Boxes/edited";
private const string MANUALLY_EDITED_XML = "<edited>%u</edited>";
diff --git a/src/meson.build b/src/meson.build
index 9effbabf..8ff0b135 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -89,7 +89,7 @@ vala_sources = [
'selection-toolbar.vala',
'shared-folders.vala',
'spice-display.vala',
- 'text-editor.vala',
+ 'config-editor.vala',
'transfer-info-row.vala',
'transfer-popover.vala',
'troubleshoot-view.vala',
diff --git a/src/properties-toolbar.vala b/src/properties-toolbar.vala
index a2f15d9a..08ccd381 100644
--- a/src/properties-toolbar.vala
+++ b/src/properties-toolbar.vala
@@ -17,7 +17,7 @@
public Gtk.HeaderBar main;
[GtkChild]
- public Gtk.HeaderBar text_editor;
+ public Gtk.HeaderBar config_editor;
[GtkChild]
public Gtk.Button troubleshooting_back_button;
@@ -62,12 +62,12 @@ private void on_copy_clipboard_clicked () requires (page == PropsWindowPage.TROU
[GtkCallback]
private void on_revert_changes_clicked () requires (page == PropsWindowPage.TEXT_EDITOR) {
- props_window.text_editor.revert_to_original ();
+ props_window.config_editor.revert_to_original ();
}
[GtkCallback]
- private void on_text_editor_save_clicked () {
- props_window.text_editor.save ();
+ private void on_config_editor_save_clicked () {
+ props_window.config_editor.save ();
}
[GtkCallback]
diff --git a/src/properties-window.vala b/src/properties-window.vala
index 46f02ec1..96d77a7f 100644
--- a/src/properties-window.vala
+++ b/src/properties-window.vala
@@ -12,7 +12,7 @@
[GtkTemplate (ui = "/org/gnome/Boxes/ui/properties-window.ui")]
private class Boxes.PropertiesWindow: Gtk.Window, Boxes.UI {
- public const string[] page_names = { "main", "troubleshoot_log", "file_chooser", "text_editor" };
+ public const string[] page_names = { "main", "troubleshoot_log", "file_chooser", "config_editor" };
public UIState previous_ui_state { get; protected set; }
public UIState ui_state { get; protected set; }
@@ -35,7 +35,7 @@
[GtkChild]
public TroubleshootLog troubleshoot_log;
[GtkChild]
- public TextEditor text_editor;
+ public MachineConfigEditor config_editor;
public Gtk.FileChooserNative file_chooser;
[GtkChild]
@@ -70,9 +70,9 @@ public void show_troubleshoot_log (string log) {
public void show_editor_view (LibvirtMachine machine) {
page = PropsWindowPage.TEXT_EDITOR;
- text_editor.setup (machine);
+ config_editor.setup (machine);
- topbar.text_editor.set_title (machine.name);
+ topbar.config_editor.set_title (machine.name);
}
public void show_file_chooser (owned FileChosenFunc file_chosen_func) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]