[gnome-games] collection-box: Add reveal_error_info_bar()
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] collection-box: Add reveal_error_info_bar()
- Date: Mon, 11 Mar 2019 10:49:17 +0000 (UTC)
commit 781f9590a542d3ee42ca134a4c49385a6006fd2d
Author: Yetizone <andreii lisita gmail com>
Date: Mon Feb 18 16:43:18 2019 +0200
collection-box: Add reveal_error_info_bar()
data/ui/collection-box.ui | 3 +++
src/ui/collection-box.vala | 7 +++++++
2 files changed, 10 insertions(+)
---
diff --git a/data/ui/collection-box.ui b/data/ui/collection-box.ui
index 12c4c1c4..bab24792 100644
--- a/data/ui/collection-box.ui
+++ b/data/ui/collection-box.ui
@@ -12,6 +12,9 @@
<signal name="notify::text" handler="on_search_text_notify"/>
</object>
</child>
+ <child>
+ <object class="GamesErrorInfoBar" id="error_info_bar"/>
+ </child>
<child>
<object class="GtkOverlay">
<property name="visible">True</property>
diff --git a/src/ui/collection-box.vala b/src/ui/collection-box.vala
index 792cb3e9..0d91bef3 100644
--- a/src/ui/collection-box.vala
+++ b/src/ui/collection-box.vala
@@ -8,6 +8,8 @@ private class Games.CollectionBox : Gtk.Box {
public bool search_mode { get; set; }
public bool loading_notification { get; set; }
+ [GtkChild]
+ private ErrorInfoBar error_info_bar;
[GtkChild]
private SearchBar search_bar;
[GtkChild]
@@ -64,6 +66,11 @@ private class Games.CollectionBox : Gtk.Box {
BindingFlags.DEFAULT);
}
+ public void reveal_error_info_bar (string error_message) {
+ error_info_bar.message = error_message;
+ error_info_bar.revealed = true;
+ }
+
public bool gamepad_button_press_event (Manette.Event event) {
if (!get_mapped ())
return false;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]