[gnome-initial-setup/show-password-button: 35/36] driver: Add resource base path



commit 828f782889fbd315408a530231b68b7314828d62
Author: Philip Chimento <philip endlessm com>
Date:   Tue Aug 6 11:36:04 2019 -0700

    driver: Add resource base path
    
    This makes it possible to set up things like icon resource paths
    automatically.
    
    https://phabricator.endlessm.com/T27460

 gnome-initial-setup/gis-driver.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
---
diff --git a/gnome-initial-setup/gis-driver.c b/gnome-initial-setup/gis-driver.c
index 64fe7ba..b8481ed 100644
--- a/gnome-initial-setup/gis-driver.c
+++ b/gnome-initial-setup/gis-driver.c
@@ -331,6 +331,15 @@ monitor_is_small (GdkMonitor *monitor)
   return geom.height < 800;
 }
 
+static void
+gis_driver_constructed (GObject *object)
+{
+  G_OBJECT_CLASS (gis_driver_parent_class)->constructed (object);
+
+  GApplication *app = G_APPLICATION (object);
+  g_application_set_resource_base_path (app, "/org/gnome/initial-setup");
+}
+
 static void
 gis_driver_get_property (GObject      *object,
                          guint         prop_id,
@@ -591,6 +600,7 @@ gis_driver_class_init (GisDriverClass *klass)
   GApplicationClass *application_class = G_APPLICATION_CLASS (klass);
   GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
 
+  gobject_class->constructed = gis_driver_constructed;
   gobject_class->get_property = gis_driver_get_property;
   gobject_class->set_property = gis_driver_set_property;
   gobject_class->dispose = gis_driver_dispose;


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