[connections/wip/cdavis/status-page: 3/3] Use HdyStatusPage instead of custom empty view




commit 5e687cf0ceb092d5691bf4a98d8e44d04abf03d3
Author: Christopher Davis <christopherdavis gnome org>
Date:   Mon Oct 18 15:08:08 2021 -0700

    Use HdyStatusPage instead of custom empty view
    
    We have a standard widget now for status pages.

 src/connections.gresource.xml |  1 -
 src/empty-view.vala           | 26 -----------------------
 src/meson.build               |  3 +--
 src/ui/empty-view.ui          | 48 -------------------------------------------
 src/ui/window.ui              |  5 ++++-
 src/window.vala               |  2 +-
 6 files changed, 6 insertions(+), 79 deletions(-)
---
diff --git a/src/connections.gresource.xml b/src/connections.gresource.xml
index 2b61f57..5304a1c 100644
--- a/src/connections.gresource.xml
+++ b/src/connections.gresource.xml
@@ -6,7 +6,6 @@
     <file>ui/collection-view.ui</file>
     <file>ui/collection-view-child.ui</file>
     <file>ui/display-view.ui</file>
-    <file>ui/empty-view.ui</file>
     <file>ui/notification.ui</file>
     <file>ui/rdp-preferences.ui</file>
     <file>ui/vnc-preferences.ui</file>
diff --git a/src/meson.build b/src/meson.build
index b43f623..8688374 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -7,7 +7,6 @@ connections_sources = [
   'collection-view-child.vala',
   'database.vala',
   'display-view.vala',
-  'empty-view.vala',
   'main.vala',
   'notifications.vala',
   'onboarding-dialog.vala',
@@ -30,7 +29,7 @@ connections_deps = [
   dependency('gio-2.0', version: '>= 2.50'),
   dependency('gtk+-3.0', version: '>= 3.22'),
   dependency('gtk-vnc-2.0', version: '> 0.4.4'),
-  dependency('libhandy-1', version: '>= 1.0.0'),
+  dependency('libhandy-1', version: '>= 1.2.0'),
   dependency ('libxml-2.0', version: '>= 2.7.8'),
 ]
 
diff --git a/src/ui/window.ui b/src/ui/window.ui
index 8f0bc57..b6fd1b0 100644
--- a/src/ui/window.ui
+++ b/src/ui/window.ui
@@ -46,8 +46,11 @@
                   </child>
 
                   <child>
-                    <object class="ConnectionsEmptyView" id="empty_view">
+                    <object class="HdyStatusPage" id="empty_view">
                       <property name="visible">True</property>
+                      <property name="icon-name">org.gnome.Connections-symbolic</property>
+                      <property name="title" translatable="yes">Welcome to Connections</property>
+                      <property name="description" translatable="yes">Just hit the &lt;b&gt;+&lt;/b&gt; 
button to make your first connection.</property>
                     </object>
                   </child>
 
diff --git a/src/window.vala b/src/window.vala
index 3f9dfec..64bfb0e 100644
--- a/src/window.vala
+++ b/src/window.vala
@@ -29,7 +29,7 @@ namespace Connections {
         private unowned Gtk.Stack stack;
 
         [GtkChild]
-        private unowned EmptyView empty_view;
+        private unowned Hdy.StatusPage empty_view;
 
         [GtkChild]
         public unowned CollectionView collection_view;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]