From ae969e985a4e557b1cab2d85c07f4e18576b572d Mon Sep 17 00:00:00 2001 From: Murray Cumming Date: Tue, 16 Nov 2010 18:55:27 +0100 Subject: 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". --- gio/src/applicationcommandline.ccg | 28 ++++++++++++++++++++++++++++ gio/src/applicationcommandline.hg | 12 +++++++++--- 2 files changed, 37 insertions(+), 3 deletions(-) (limited to 'gio') 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 + * + * 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 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 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) }; -- cgit v1.2.1