[glibmm] AppInfo::launch(): Correct the parameter type.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] AppInfo::launch(): Correct the parameter type.
- Date: Tue, 12 Jul 2011 10:34:54 +0000 (UTC)
commit 339c8f73f2a312fbb4f47cf4b82fe275fffa3ba7
Author: Murray Cumming <murrayc murrayc com>
Date: Tue Jul 12 12:34:48 2011 +0200
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.
ChangeLog | 14 ++++++++++++++
gio/src/appinfo.hg | 12 +++++++-----
2 files changed, 21 insertions(+), 5 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 3e2bc2f..044aa6b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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 8d383ab..b248d5e 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")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]