[gnome-games/wip/exalm/snapshot: 2/6] ui: Rename SavestatesList to SnapshotsList
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/exalm/snapshot: 2/6] ui: Rename SavestatesList to SnapshotsList
- Date: Sun, 8 Mar 2020 14:31:38 +0000 (UTC)
commit 674314ba4d1d8255fcf71ca894c0d9a05ae3399b
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Sun Mar 8 19:05:48 2020 +0500
ui: Rename SavestatesList to SnapshotsList
data/org.gnome.Games.gresource.xml | 2 +-
data/ui/display-box.ui | 4 ++--
data/ui/display-header-bar.ui | 6 +++---
data/ui/{savestates-list.ui => snapshots-list.ui} | 4 ++--
src/meson.build | 2 +-
src/ui/display-box.vala | 14 +++++++-------
src/ui/display-header-bar.vala | 4 ++--
src/ui/display-view.vala | 1 -
src/ui/{savestates-list.vala => snapshots-list.vala} | 4 ++--
9 files changed, 20 insertions(+), 21 deletions(-)
---
diff --git a/data/org.gnome.Games.gresource.xml b/data/org.gnome.Games.gresource.xml
index feacfcda..cba31dd4 100644
--- a/data/org.gnome.Games.gresource.xml
+++ b/data/org.gnome.Games.gresource.xml
@@ -48,9 +48,9 @@
<file preprocess="xml-stripblanks">ui/reset-controller-mapping-dialog.ui</file>
<file preprocess="xml-stripblanks">ui/resume-dialog.ui</file>
<file preprocess="xml-stripblanks">ui/resume-failed-dialog.ui</file>
- <file preprocess="xml-stripblanks">ui/savestates-list.ui</file>
<file preprocess="xml-stripblanks">ui/search-bar.ui</file>
<file preprocess="xml-stripblanks">ui/shortcuts-window.ui</file>
<file preprocess="xml-stripblanks">ui/snapshot-row.ui</file>
+ <file preprocess="xml-stripblanks">ui/snapshots-list.ui</file>
</gresource>
</gresources>
diff --git a/data/ui/display-box.ui b/data/ui/display-box.ui
index 520bc48a..8f025655 100644
--- a/data/ui/display-box.ui
+++ b/data/ui/display-box.ui
@@ -47,11 +47,11 @@
</packing>
</child>
<child type="overlay">
- <object class="GamesSavestatesList" id="savestates_list">
+ <object class="GamesSnapshotsList" id="snapshots_list">
<property name="visible">True</property>
<property name="halign">end</property>
<property name="is-revealed" bind-source="GamesDisplayBox"
bind-property="is-showing-snapshots" bind-flags="bidirectional"/>
- <signal name="size-allocate" handler="on_savestates_list_size_allocate"/>
+ <signal name="size-allocate" handler="on_snapshots_list_size_allocate"/>
<signal name="hidden" handler="on_snapshots_hidden"/>
</object>
</child>
diff --git a/data/ui/display-header-bar.ui b/data/ui/display-header-bar.ui
index 1e50dd2a..41412b77 100644
--- a/data/ui/display-header-bar.ui
+++ b/data/ui/display-header-bar.ui
@@ -132,7 +132,7 @@
</object>
</child>
<child>
- <object class="GtkHeaderBar" id="savestates_header_bar">
+ <object class="GtkHeaderBar" id="snapshots_header_bar">
<property name="visible">True</property>
<property name="title" bind-source="GamesDisplayHeaderBar" bind-property="game-title"
bind-flags="bidirectional"/>
<child>
@@ -152,7 +152,7 @@
</packing>
</child>
<child>
- <object class="GtkButton" id="savestates_back">
+ <object class="GtkButton">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
@@ -161,7 +161,7 @@
<class name="image-button"/>
</style>
<child internal-child="accessible">
- <object class="AtkObject" id="a11y-savestates-back">
+ <object class="AtkObject" id="a11y-snapshots-back">
<property name="accessible-name" translatable="yes">Back</property>
</object>
</child>
diff --git a/data/ui/savestates-list.ui b/data/ui/snapshots-list.ui
similarity index 97%
rename from data/ui/savestates-list.ui
rename to data/ui/snapshots-list.ui
index 77b0752e..22386da2 100644
--- a/data/ui/savestates-list.ui
+++ b/data/ui/snapshots-list.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="3.24"/>
- <template class="GamesSavestatesList" parent="GtkBox">
+ <template class="GamesSnapshotsList" parent="GtkBox">
<signal name="notify::is-revealed" handler="on_revealed_changed"/>
<style>
<class name="background"/>
@@ -10,7 +10,7 @@
<object class="GtkRevealer">
<property name="visible">True</property>
<property name="transition-type">slide-left</property>
- <property name="reveal-child" bind-source="GamesSavestatesList" bind-property="is-revealed"
bind-flags="sync-create|bidirectional"/>
+ <property name="reveal-child" bind-source="GamesSnapshotsList" bind-property="is-revealed"
bind-flags="sync-create|bidirectional"/>
<signal name="notify::child-revealed" handler="on_revealer_transition_end"/>
<child>
<object class="GtkBox">
diff --git a/src/meson.build b/src/meson.build
index adb03498..a63c466b 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -148,10 +148,10 @@ vala_sources = [
'ui/reset-controller-mapping-dialog.vala',
'ui/resume-dialog.vala',
'ui/resume-failed-dialog.vala',
- 'ui/savestates-list.vala',
'ui/search-bar.vala',
'ui/shortcuts-window.vala',
'ui/snapshot-row.vala',
+ 'ui/snapshots-list.vala',
'ui/ui-view.vala',
'utils/composite-cover.vala',
diff --git a/src/ui/display-box.vala b/src/ui/display-box.vala
index e459f3f6..20e398dc 100644
--- a/src/ui/display-box.vala
+++ b/src/ui/display-box.vala
@@ -12,9 +12,9 @@ private class Games.DisplayBox : Gtk.Bin {
set {
_is_fullscreen = value;
- // A top margin is added to the savestates list in fullscreen mode such that
- // the fullscreen header bar doesn't cover the savestates menu
- savestates_list.set_margin (value ? fullscreen_header_bar_height : 0);
+ // A top margin is added to the snapshots list in fullscreen mode
+ // so that the fullscreen header bar doesn't cover it
+ snapshots_list.set_margin (value ? fullscreen_header_bar_height : 0);
}
}
@@ -43,7 +43,7 @@ private class Games.DisplayBox : Gtk.Bin {
var display = runner.get_display ();
set_display (display);
- savestates_list.runner = value;
+ snapshots_list.runner = value;
runner.new_savestate_created.connect (flash_box.flash);
}
@@ -67,7 +67,7 @@ private class Games.DisplayBox : Gtk.Bin {
[GtkChild]
private FlashBox flash_box;
[GtkChild]
- private SavestatesList savestates_list;
+ private SnapshotsList snapshots_list;
private int fullscreen_header_bar_height;
@@ -112,7 +112,7 @@ private class Games.DisplayBox : Gtk.Bin {
return false;
if (is_showing_snapshots)
- return savestates_list.on_key_press_event (keyval, state);
+ return snapshots_list.on_key_press_event (keyval, state);
return runner.key_press_event (keyval, state);
}
@@ -137,7 +137,7 @@ private class Games.DisplayBox : Gtk.Bin {
}
[GtkCallback]
- private void on_savestates_list_size_allocate (Gtk.Allocation allocation) {
+ private void on_snapshots_list_size_allocate (Gtk.Allocation allocation) {
display_bin.horizontal_offset = -allocation.width / 2;
}
diff --git a/src/ui/display-header-bar.vala b/src/ui/display-header-bar.vala
index 6dacf1e5..e0039649 100644
--- a/src/ui/display-header-bar.vala
+++ b/src/ui/display-header-bar.vala
@@ -72,7 +72,7 @@ private class Games.DisplayHeaderBar : Gtk.Bin {
[GtkChild]
private Gtk.MenuButton secondary_menu_button;
[GtkChild]
- private Gtk.HeaderBar savestates_header_bar;
+ private Gtk.HeaderBar snapshots_header_bar;
private Settings settings;
@@ -112,7 +112,7 @@ private class Games.DisplayHeaderBar : Gtk.Bin {
[GtkCallback]
private void on_showing_snapshots_changed () {
if (is_showing_snapshots)
- stack.visible_child = savestates_header_bar;
+ stack.visible_child = snapshots_header_bar;
else
stack.visible_child = ingame_header_bar;
}
diff --git a/src/ui/display-view.vala b/src/ui/display-view.vala
index e77b2dc8..a1a28161 100644
--- a/src/ui/display-view.vala
+++ b/src/ui/display-view.vala
@@ -164,7 +164,6 @@ private class Games.DisplayView : Object, UiView {
return true;
}
- // Shortcuts for the Savestates manager
if (runner == null)
return false;
diff --git a/src/ui/savestates-list.vala b/src/ui/snapshots-list.vala
similarity index 98%
rename from src/ui/savestates-list.vala
rename to src/ui/snapshots-list.vala
index 1132b4c5..1c5be589 100644
--- a/src/ui/savestates-list.vala
+++ b/src/ui/snapshots-list.vala
@@ -1,7 +1,7 @@
// This file is part of GNOME Games. License: GPL-3.0+.
-[GtkTemplate (ui = "/org/gnome/Games/ui/savestates-list.ui")]
-private class Games.SavestatesList : Gtk.Box {
+[GtkTemplate (ui = "/org/gnome/Games/ui/snapshots-list.ui")]
+private class Games.SnapshotsList : Gtk.Box {
public signal void hidden ();
[GtkChild]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]