diff options
author | Murray Cumming <murrayc@murrayc.com> | 2011-07-12 12:34:48 +0200 |
---|---|---|
committer | Murray Cumming <murrayc@murrayc.com> | 2011-07-12 12:34:48 +0200 |
commit | 339c8f73f2a312fbb4f47cf4b82fe275fffa3ba7 (patch) | |
tree | 3c784b1e1563f281730801a0b7d8477b0cb18701 | |
parent | 5cac804b564dc65211ca6dff427bd8b7e2eb6a40 (diff) | |
download | glibmm-339c8f73f2a312fbb4f47cf4b82fe275fffa3ba7.tar.gz |
AppInfo::launch(): Correct the parameter type.
* gio/src/appinfo.hg: g_app_info_launch() takes a GList of GFile, not of
strings. Also use a vector instead of a ListHandle, as per our new convention.
It is acceptable to change this API/ABI because this method could never
possibly have been used by any application without crashes, so this can't
make anything worse.
Also add an overload without the launch_context parameter, using the new {?}
syntax.
Luckily we did not implement the vfuncs, or maybe we disabled them because of
the crashes.
-rw-r--r-- | ChangeLog | 14 | ||||
-rw-r--r-- | gio/src/appinfo.hg | 12 |
2 files changed, 21 insertions, 5 deletions
@@ -1,5 +1,19 @@ 2011-07-12 Murray Cumming <murrayc@murrayc.com> + AppInfo::launch(): Correct the parameter type. + + * gio/src/appinfo.hg: g_app_info_launch() takes a GList of GFile, not of + strings. Also use a vector instead of a ListHandle, as per our new convention. + It is acceptable to change this API/ABI because this method could never + possibly have been used by any application without crashes, so this can't + make anything worse. + Also add an overload without the launch_context parameter, using the new {?} + syntax. + Luckily we did not implement the vfuncs, or maybe we disabled them because of + the crashes. + +2011-07-12 Murray Cumming <murrayc@murrayc.com> + AppInfo::launch_uris(): Corrected (with deprecation) and add overload. * gio/src/appinfo.[hg|ccg]: Deprecate the existing method and add one that diff --git a/gio/src/appinfo.hg b/gio/src/appinfo.hg index 8d383ab1..b248d5e7 100644 --- a/gio/src/appinfo.hg +++ b/gio/src/appinfo.hg @@ -99,8 +99,10 @@ public: g_app_info_get_icon, refreturn, constversion) - _WRAP_METHOD(bool launch(const Glib::ListHandle<std::string>& files, - const Glib::RefPtr<AppLaunchContext>& launch_context), +#m4 _CONVERSION(`const std::vector< Glib::RefPtr<Gio::File> >&',`GList*',`Glib::ListHandler<Glib::RefPtr<Gio::File> >::vector_to_list($3).data ()') + + _WRAP_METHOD(bool launch(const std::vector< Glib::RefPtr<Gio::File> >& files, + const Glib::RefPtr<AppLaunchContext>& launch_context{?}), g_app_info_launch, errthrow) @@ -154,9 +156,9 @@ protected: //_WRAP_VFUNC(std::string get_description() const, "get_description") //_WRAP_VFUNC(std::string get_executable() const, "get_executable") //_WRAP_VFUNC(Glib::RefPtr<Icon> get_icon() const, "get_icon") -#m4 _CONVERSION(`const Glib::ListHandle<std::string>&',`GList*',`$3.data()') -#m4 _CONVERSION(`GList*',`const Glib::ListHandle<std::string>&',`Glib::ListHandle<std::string>($3, Glib::OWNERSHIP_NONE)') - //_WRAP_VFUNC(bool launch(const Glib::ListHandle<std::string>& filenames, const Glib::RefPtr<AppLaunchContext>& launch_context, GError** error), "launch") +//#m4 _CONVERSION(`const Glib::ListHandle<std::string>&',`GList*',`$3.data()') +//#m4 _CONVERSION(`GList*',`const Glib::ListHandle<std::string>&',`Glib::ListHandle<std::string>($3, Glib::OWNERSHIP_NONE)') + //_WRAP_VFUNC(bool launch(const std::vector<Gio::File>& filenames, const Glib::RefPtr<AppLaunchContext>& launch_context, GError** error), "launch") //_WRAP_VFUNC(bool supports_uris() const, "supports_uris") //_WRAP_VFUNC(bool supports_files() const, "supports_files") //_WRAP_VFUNC(bool launch_uris(const Glib::ListHandle<std::string>& uris, const Glib::RefPtr<AppLaunchContext>& launch_context, GError** error), "launch_uris") |