[glibmm] ApplicationCommandLine: Fix print() and print_err().



commit ae969e985a4e557b1cab2d85c07f4e18576b572d
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue Nov 16 18:55:27 2010 +0100

    ApplicationCommandLine: Fix print() and print_err().
    
    	* gio/src/applicationcommandline.[hg|ccg]: These functions take a printf
    	format and arguments, as shown by compiler warnings. So I just used "%s".

 ChangeLog                          |    7 +++++++
 gio/src/applicationcommandline.ccg |   28 ++++++++++++++++++++++++++++
 gio/src/applicationcommandline.hg  |   12 +++++++++---
 3 files changed, 44 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index f9cf60d..6ab4852 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-11-16  Murray Cumming  <murrayc murrayc com>
+
+	ApplicationCommandLine: Fix print() and print_err().
+
+	* gio/src/applicationcommandline.[hg|ccg]: These functions take a printf 
+	format and arguments, as shown by compiler warnings. So I just used "%s".
+
 2010-11-15  José Alburquerque  <jaalburqu svn gnome org>
 
 	DBus[Connection|Proxy]: Use Gio::AsyncInitable::init_async correctly.
diff --git a/gio/src/applicationcommandline.ccg b/gio/src/applicationcommandline.ccg
index 881f17c..4e41294 100644
--- a/gio/src/applicationcommandline.ccg
+++ b/gio/src/applicationcommandline.ccg
@@ -1,5 +1,33 @@
+/* Copyright (C) 2010 Jonathon Jongsma <jonathon quotidian org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+ 
 #include <gio/gio.h>
 
 namespace Gio
 {
+
+void ApplicationCommandLine::print(const Glib::ustring& message)
+{
+  g_application_command_line_print(gobj(), "%s", message.c_str()); 
+}
+
+void ApplicationCommandLine::printerr(const Glib::ustring& message)
+{
+  g_application_command_line_printerr(gobj(), "%s", message.c_str()); 
 }
+
+} //namespace Gio
diff --git a/gio/src/applicationcommandline.hg b/gio/src/applicationcommandline.hg
index 5f1ea4d..f840536 100644
--- a/gio/src/applicationcommandline.hg
+++ b/gio/src/applicationcommandline.hg
@@ -33,7 +33,7 @@ protected:
 
 public:
 
-  _WRAP_METHOD(char** get_arguments(int& argc) const, g_application_command_line_get_arguments);
+  _WRAP_METHOD(char** get_arguments(int& argc) const, g_application_command_line_get_arguments)
   _WRAP_METHOD(Glib::ustring get_cwd() const, g_application_command_line_get_cwd)
   // it seems that h2defs.py has trouble parsing the const gchar * const * type
   //_WRAP_METHOD(std::vector<Glib::ustring> get_environ() const, g_application_command_line_get_environ)
@@ -42,8 +42,14 @@ public:
   //GVariant *               g_application_command_line_get_platform_data
   _WRAP_METHOD(void set_exit_status(int exit_status), g_application_command_line_set_exit_status)
   _WRAP_METHOD(int get_exit_status() const, g_application_command_line_get_exit_status)
-  _WRAP_METHOD(void print(const Glib::ustring& message), g_application_command_line_print)
-  _WRAP_METHOD(void printerr(const Glib::ustring& message), g_application_command_line_printerr)
+  
+  //TODO: Documentation
+  void print(const Glib::ustring& message);
+  _IGNORE(g_application_command_line_print)
+  
+  //TODO: Documentation
+  void printerr(const Glib::ustring& message);
+  _IGNORE(g_application_command_line_printerr)
 };
 
 



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