[glibmm/glibmm-2-56] Gio::Application: Add property_resource_base_path_string()



commit 689ecea19363b0c5f87b2efa99b31eb2170f81a6
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date:   Wed Mar 21 12:48:56 2018 +0100

    Gio::Application: Add property_resource_base_path_string()
    
    property_resource_base_path() has the wrong return type, bool instead of
    std::string. It can't be fixed without breaking API/ABI. For now, deprecate
    property_resource_base_path() and add hand-coded
    property_resource_base_path_string() with the correct type. Bug 787496

 gio/src/application.ccg |   10 ++++++++++
 gio/src/application.hg  |   31 +++++++++++++++++++++++++------
 2 files changed, 35 insertions(+), 6 deletions(-)
---
diff --git a/gio/src/application.ccg b/gio/src/application.ccg
index 310ada6..ab639fb 100644
--- a/gio/src/application.ccg
+++ b/gio/src/application.ccg
@@ -504,4 +504,14 @@ Application::unset_resource_base_path()
   g_application_set_resource_base_path(gobj(), nullptr /* see the C docs. */);
 }
 
+Glib::PropertyProxy< std::string > Application::property_resource_base_path_string()
+{
+  return Glib::PropertyProxy< std::string >(this, "resource-base-path");
+}
+
+Glib::PropertyProxy_ReadOnly< std::string > Application::property_resource_base_path_string() const
+{
+  return Glib::PropertyProxy_ReadOnly< std::string >(this, "resource-base-path");
+}
+
 } // namespace Gio
diff --git a/gio/src/application.hg b/gio/src/application.hg
index 4faa475..dd7d06c 100644
--- a/gio/src/application.hg
+++ b/gio/src/application.hg
@@ -364,14 +364,33 @@ public:
   _WRAP_PROPERTY("inactivity-timeout", guint)
   _WRAP_PROPERTY("is-registered", bool)
   _WRAP_PROPERTY("is-remote", bool)
+
   //TODO: Change bool to std::string when we can break API/ABI.
-  /** @note
-   * Don't use %property_resource_base_path(). Use set_resource_base_path() or
-   * get_resource_base_path() instead.
-   * %property_resource_base_path() has got the wrong type.
-   * This bug will be fixed at the next API/ABI break.
+  _WRAP_PROPERTY("resource-base-path", bool, newin "2,44",
+    deprecated "This method has the wrong return type. Will be fixed at the next ABI break. Use 
property_resource_base_path_string() instead.")
+
+  /** The base resource path for the application.
+   *
+   * @newin{2,56}
+   *
+   * Default value: ""
+   *
+   * @return A PropertyProxy that allows you to get or set the value of the property,
+   * or receive notification when the value of the property changes.
    */
-  _WRAP_PROPERTY("resource-base-path", bool, newin "2,44")
+  Glib::PropertyProxy< std::string > property_resource_base_path_string();
+
+  /** The base resource path for the application.
+   *
+   * @newin{2,56}
+   *
+   * Default value: ""
+   *
+   * @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
+   * or receive notification when the value of the property changes.
+   */
+  Glib::PropertyProxy_ReadOnly< std::string > property_resource_base_path_string() const;
+
   _WRAP_PROPERTY("is-busy", bool)
 
 //#m4 _CONVERSION(`const gchar*', `const Glib::ustring&', `Glib::ustring($3)')


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