[glibmm] Gio::Application: Add get/set/unset_resource_base_path() and property.



commit c4faf7c064bdc08359a11631a52254bae8de6998
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue Mar 3 08:47:47 2015 +0100

    Gio::Application: Add get/set/unset_resource_base_path() and property.

 gio/src/application.ccg |    5 +++++
 gio/src/application.hg  |    9 +++++++++
 2 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/gio/src/application.ccg b/gio/src/application.ccg
index 53fc100..1952aba 100644
--- a/gio/src/application.ccg
+++ b/gio/src/application.ccg
@@ -482,4 +482,9 @@ void Application::add_main_option_entry_private(GOptionArg arg, const Glib::ustr
   g_application_add_main_option_entries(gobj(), array);
 }
 
+void Application::unset_resource_base_path()
+{
+  g_application_set_resource_base_path(gobj(), 0 /* see the C docs. */);
+}
+
 } // namespace Gio
diff --git a/gio/src/application.hg b/gio/src/application.hg
index 11661a4..f2b1e66 100644
--- a/gio/src/application.hg
+++ b/gio/src/application.hg
@@ -160,6 +160,14 @@ public:
   _WRAP_METHOD(ApplicationFlags get_flags() const, g_application_get_flags)
   _WRAP_METHOD(void set_flags(ApplicationFlags flags), g_application_set_flags)
 
+  _WRAP_METHOD(std::string get_resource_base_path() const, g_application_get_resource_base_path)
+  _WRAP_METHOD(void set_resource_base_path(const std::string& resource_path), 
g_application_set_resource_base_path)
+
+  /** Disable automatic resource loading functionality.
+   * See set_resource_base_path().
+   */
+  void unset_resource_base_path();
+
   _WRAP_METHOD(void set_action_group(const Glib::RefPtr<ActionGroup>& action_group), 
g_application_set_action_group,
     deprecated "Use the Gio::ActionMap interface instead.")
 
@@ -352,6 +360,7 @@ public:
   _WRAP_PROPERTY("inactivity-timeout", guint)
   _WRAP_PROPERTY("is-registered", bool)
   _WRAP_PROPERTY("is-remote", bool)
+  _WRAP_PROPERTY("resource-base-path", bool)
   _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]