summaryrefslogtreecommitdiff
path: root/gio
diff options
context:
space:
mode:
authorMurray Cumming <murrayc@murrayc.com>2010-11-16 18:55:27 +0100
committerMurray Cumming <murrayc@murrayc.com>2010-11-16 18:55:27 +0100
commitae969e985a4e557b1cab2d85c07f4e18576b572d (patch)
tree413982cb5cbd7605b0f6e44f362f55eb95d50d39 /gio
parent837df318e0faa94aaa2f3d793c9bdc8e77c19c18 (diff)
downloadglibmm-ae969e985a4e557b1cab2d85c07f4e18576b572d.tar.gz
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".
Diffstat (limited to 'gio')
-rw-r--r--gio/src/applicationcommandline.ccg28
-rw-r--r--gio/src/applicationcommandline.hg12
2 files changed, 37 insertions, 3 deletions
diff --git a/gio/src/applicationcommandline.ccg b/gio/src/applicationcommandline.ccg
index 881f17c4..4e41294e 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 5f1ea4d9..f840536b 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)
};