[glibmm] Gio: Move AppLaunchContext into its own header file.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] Gio: Move AppLaunchContext into its own header file.
- Date: Mon, 26 Mar 2012 08:11:17 +0000 (UTC)
commit dd87cf35aba1b8dd611f49fcce5cc8f7104f3e44
Author: Murray Cumming <murrayc murrayc com>
Date: Sun Mar 25 23:13:46 2012 +0200
Gio: Move AppLaunchContext into its own header file.
* gio/src/appinfo.[hg|ccg]: Move the AppLaunchContext class into:
* gio/src/applaunchcontext.[hg|ccg]:
This helps gmmproc, for instance when deriving from it for
Gdk::AppLaunchContext.
ChangeLog | 9 ++++++
gio/src/appinfo.hg | 29 ++-----------------
gio/src/applaunchcontext.ccg | 25 ++++++++++++++++
gio/src/applaunchcontext.hg | 63 ++++++++++++++++++++++++++++++++++++++++++
gio/src/filelist.am | 1 +
5 files changed, 101 insertions(+), 26 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 70e9a7a..570b9b6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2012-03-25 Murray Cumming <murrayc murrayc com>
+
+ Gio: Move AppLaunchContext into its own header file.
+
+ * gio/src/appinfo.[hg|ccg]: Move the AppLaunchContext class into:
+ * gio/src/applaunchcontext.[hg|ccg]:
+ This helps gmmproc, for instance when deriving from it for
+ Gdk::AppLaunchContext.
+
2012-03-25 Josà Alburquerque <jaalburquerque gmail com>
Action, DBusObject: Ensure vfunc callbacks return valid memory.
diff --git a/gio/src/appinfo.hg b/gio/src/appinfo.hg
index ebf93c6..45700b7 100644
--- a/gio/src/appinfo.hg
+++ b/gio/src/appinfo.hg
@@ -17,6 +17,8 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include <giomm/applaunchcontext.h>
+
#include <exception>
#include <string>
@@ -40,34 +42,8 @@ namespace Gio
_WRAP_ENUM(AppInfoCreateFlags, GAppInfoCreateFlags, NO_GTYPE)
-class AppInfo;
class File;
-/** This is used to handle, for instance, startup notification and launching of the new application on the same screen as the launching window.
- * See also AppInfo.
- *
- * @newin{2,16}
- */
-class AppLaunchContext : public Glib::Object
-{
- _CLASS_GOBJECT(AppLaunchContext, GAppLaunchContext, G_APP_LAUNCH_CONTEXT, Glib::Object, GObject)
-
-protected:
- _CTOR_DEFAULT()
-
-public:
- _WRAP_CREATE()
-
-#m4 _CONVERSION(`const Glib::ListHandle<std::string>&',`GList*',`$3.data()')
- _WRAP_METHOD(std::string get_display(const Glib::RefPtr<AppInfo>& info, const Glib::ListHandle< Glib::RefPtr<Gio::File> >& files),
- g_app_launch_context_get_display)
-
- _WRAP_METHOD(std::string get_startup_notify_id(const Glib::RefPtr<AppInfo>& info, const Glib::ListHandle< Glib::RefPtr<Gio::File> >& files),
- g_app_launch_context_get_startup_notify_id)
- _WRAP_METHOD(void launch_failed(const std::string& startup_notify_id),
- g_app_launch_context_launch_failed)
-};
-
/** Application information, to describe applications installed on the system,
* and launch them.
* See also AppLaunchContext.
@@ -168,6 +144,7 @@ public:
_WRAP_METHOD(bool supports_uris() const, g_app_info_supports_uris)
_WRAP_METHOD(bool supports_files() const, g_app_info_supports_files)
+#m4 _CONVERSION(`const Glib::ListHandle<std::string>&',`GList*',`$3.data()')
_WRAP_METHOD(bool launch_uris(const Glib::ListHandle<std::string>& uris,
GAppLaunchContext* launch_context),
g_app_info_launch_uris,
diff --git a/gio/src/applaunchcontext.ccg b/gio/src/applaunchcontext.ccg
new file mode 100644
index 0000000..d0fa26a
--- /dev/null
+++ b/gio/src/applaunchcontext.ccg
@@ -0,0 +1,25 @@
+/* Copyright (C) 2007 The gtkmm Development Team
+ *
+ * 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 <giomm/appinfo.h>
+#include <giomm/file.h>
+#include <gio/gio.h>
+
+namespace Gio
+{
+
+} // namespace Gio
diff --git a/gio/src/applaunchcontext.hg b/gio/src/applaunchcontext.hg
new file mode 100644
index 0000000..c446ffc
--- /dev/null
+++ b/gio/src/applaunchcontext.hg
@@ -0,0 +1,63 @@
+/* Copyright (C) 2007 The gtkmm Development Team
+ *
+ * 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 <exception>
+
+#include <string>
+
+#include <glibmm/interface.h>
+#include <glibmm/listhandle.h>
+#include <glibmm/object.h>
+//#include <giomm/file.h>
+#include <giomm/icon.h>
+
+_DEFS(giomm,gio)
+_PINCLUDE(glibmm/private/object_p.h)
+
+namespace Gio
+{
+
+class AppInfo;
+class File;
+
+/** This is used to handle, for instance, startup notification and launching of the new application on the same screen as the launching window.
+ * See also AppInfo.
+ *
+ * @newin{2,16}
+ */
+class AppLaunchContext : public Glib::Object
+{
+ _CLASS_GOBJECT(AppLaunchContext, GAppLaunchContext, G_APP_LAUNCH_CONTEXT, Glib::Object, GObject)
+
+protected:
+ _CTOR_DEFAULT()
+
+public:
+ _WRAP_CREATE()
+
+#m4 _CONVERSION(`const Glib::ListHandle<std::string>&',`GList*',`$3.data()')
+ _WRAP_METHOD(std::string get_display(const Glib::RefPtr<AppInfo>& info, const Glib::ListHandle< Glib::RefPtr<Gio::File> >& files),
+ g_app_launch_context_get_display)
+
+ _WRAP_METHOD(std::string get_startup_notify_id(const Glib::RefPtr<AppInfo>& info, const Glib::ListHandle< Glib::RefPtr<Gio::File> >& files),
+ g_app_launch_context_get_startup_notify_id)
+ _WRAP_METHOD(void launch_failed(const std::string& startup_notify_id),
+ g_app_launch_context_launch_failed)
+};
+
+} // namespace Gio
+
diff --git a/gio/src/filelist.am b/gio/src/filelist.am
index ee2334a..7cd36b7 100644
--- a/gio/src/filelist.am
+++ b/gio/src/filelist.am
@@ -16,6 +16,7 @@ giomm_files_any_hg = \
action.hg \
actiongroup.hg \
actionmap.hg \
+ applaunchcontext.hg \
appinfo.hg \
application.hg \
applicationcommandline.hg \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]