[glibmm] AppLaunchContext: Add setenv(), unsetenv() and get_environment().



commit 86defceaa77e9ecd0e72d1a2c064b830c7933208
Author: Murray Cumming <murrayc murrayc com>
Date:   Sat Sep 15 14:47:43 2012 +0200

    AppLaunchContext: Add setenv(), unsetenv() and get_environment().
    
            * gio/src/applaunchcontext.hg: Wrap these C functions.

 ChangeLog                   |    6 ++++++
 gio/src/applaunchcontext.hg |    6 ++++++
 2 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index ac9d841..93daeef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-09-15  Murray Cumming  <murrayc murrayc com>
+
+	AppLaunchContext: Add setenv(), unsetenv() and get_environment().
+
+        * gio/src/applaunchcontext.hg: Wrap these C functions.
+
 2012-09-12  Kjell Ahlstedt  <kjell ahlstedt bredband net>
 
 	Use std::time_t instead of ::time_t.
diff --git a/gio/src/applaunchcontext.hg b/gio/src/applaunchcontext.hg
index c446ffc..1254977 100644
--- a/gio/src/applaunchcontext.hg
+++ b/gio/src/applaunchcontext.hg
@@ -49,6 +49,12 @@ protected:
 public:
   _WRAP_CREATE()
 
+  _WRAP_METHOD(void setenv(const Glib::ustring& variable, const Glib::ustring& value), g_app_launch_context_setenv)
+  _WRAP_METHOD(void unsetenv(const Glib::ustring& variable), g_app_launch_context_unsetenv)
+
+#m4 _CONVERSION(`char**',`std::vector<Glib::ustring>',`Glib::ArrayHandler<Glib::ustring>::array_to_vector($3, Glib::OWNERSHIP_DEEP)')
+  _WRAP_METHOD(std::vector<Glib::ustring> get_environment() const, g_app_launch_context_get_environment)
+
 #m4 _CONVERSION(`const Glib::ListHandle<std::string>&',`GList*',`$3.data()')
   _WRAP_METHOD(std::string get_display(const Glib::RefPtr<AppInfo>& info, const Glib::ListHandle< Glib::RefPtr<Gio::File> >& files),
                g_app_launch_context_get_display)



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