diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | gio/src/applicationcommandline.ccg | 28 | ||||
-rw-r--r-- | gio/src/applicationcommandline.hg | 12 |
3 files changed, 44 insertions, 3 deletions
@@ -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 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) }; |