[glibmm] Gio::Application: Change ApplicationFlags to Application::Flags.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] Gio::Application: Change ApplicationFlags to Application::Flags.
- Date: Tue, 18 Apr 2017 20:03:03 +0000 (UTC)
commit fe4baf895fbbefc34caf979ae2d35e1efadb02cd
Author: Murray Cumming <murrayc murrayc com>
Date: Tue Apr 18 11:07:11 2017 +0200
Gio::Application: Change ApplicationFlags to Application::Flags.
gio/src/application.ccg | 4 +++-
gio/src/application.hg | 14 ++++++++------
tools/m4/convert_gio.m4 | 2 +-
3 files changed, 12 insertions(+), 8 deletions(-)
---
diff --git a/gio/src/application.ccg b/gio/src/application.ccg
index 97f1c27..0810450 100644
--- a/gio/src/application.ccg
+++ b/gio/src/application.ccg
@@ -24,6 +24,8 @@
#include <mutex>
#include <vector>
+using Flags = Gio::Application::Flags;
+
namespace // anonymous
{
// TODO: At the next ABI break, implement the pimpl idiom. Then we need not use
@@ -274,7 +276,7 @@ Application::custom_class_init()
return application_class_.init();
}
-Application::Application(const Glib::ustring& application_id, ApplicationFlags flags)
+Application::Application(const Glib::ustring& application_id, Flags flags)
: // Mark this class as non-derived to allow C++ vfuncs to be skipped.
Glib::ObjectBase(nullptr),
Glib::Object(Glib::ConstructParams(custom_class_init(), "application_id",
diff --git a/gio/src/application.hg b/gio/src/application.hg
index fc3d693..6fc4d49 100644
--- a/gio/src/application.hg
+++ b/gio/src/application.hg
@@ -35,7 +35,6 @@ _PINCLUDE(glibmm/private/object_p.h)
namespace Gio
{
-_WRAP_ENUM(ApplicationFlags, GApplicationFlags, NO_GTYPE, s#^FLAGS_##)
/** Application - Core application class.
* An Application is the foundation of an application, unique for a given
@@ -90,6 +89,9 @@ class Application : public Glib::Object, public ActionGroup, public ActionMap
_IMPLEMENTS_INTERFACE(ActionGroup)
_IMPLEMENTS_INTERFACE(ActionMap)
+public:
+ _WRAP_ENUM(Flags, GApplicationFlags, NO_GTYPE, s#^FLAGS_##)
+
protected:
/** Constructs an application instance.
* If no application ID is given then some features (most notably application uniqueness) will be disabled.
@@ -97,7 +99,7 @@ protected:
* @param application_id The application ID.
* @param flags The application flags.
*/
- explicit Application(const Glib::ustring& application_id = Glib::ustring(), ApplicationFlags flags =
ApplicationFlags::NONE);
+ explicit Application(const Glib::ustring& application_id = Glib::ustring(), Flags flags = Flags::NONE);
_IGNORE(g_application_new)
public:
@@ -136,7 +138,7 @@ public:
* @param application_id The application ID.
* @param flags The application flags.
*/
- _WRAP_CREATE(const Glib::ustring& application_id = Glib::ustring(), ApplicationFlags flags =
ApplicationFlags::NONE)
+ _WRAP_CREATE(const Glib::ustring& application_id = Glib::ustring(), Flags flags = Flags::NONE)
_WRAP_METHOD(static bool id_is_valid(const Glib::ustring& application_id), g_application_id_is_valid)
@@ -152,8 +154,8 @@ public:
_WRAP_METHOD(guint get_inactivity_timeout() const, g_application_get_inactivity_timeout)
_WRAP_METHOD(void set_inactivity_timeout(guint inactivity_timeout), g_application_set_inactivity_timeout)
- _WRAP_METHOD(ApplicationFlags get_flags() const, g_application_get_flags)
- _WRAP_METHOD(void set_flags(ApplicationFlags flags), g_application_set_flags)
+ _WRAP_METHOD(Flags get_flags() const, g_application_get_flags)
+ _WRAP_METHOD(void set_flags(Flags flags), g_application_set_flags)
_WRAP_METHOD(std::string get_resource_base_path() const, g_application_get_resource_base_path, newin
"2,44")
_WRAP_METHOD(void set_resource_base_path(const std::string& resource_path),
g_application_set_resource_base_path, newin "2,44")
@@ -360,7 +362,7 @@ public:
_IGNORE_PROPERTY("action-group")
_WRAP_PROPERTY("application-id", Glib::ustring)
- _WRAP_PROPERTY("flags", ApplicationFlags)
+ _WRAP_PROPERTY("flags", Flags)
_WRAP_PROPERTY("inactivity-timeout", guint)
_WRAP_PROPERTY("is-registered", bool)
_WRAP_PROPERTY("is-remote", bool)
diff --git a/tools/m4/convert_gio.m4 b/tools/m4/convert_gio.m4
index 5e22f9f..b72c764 100644
--- a/tools/m4/convert_gio.m4
+++ b/tools/m4/convert_gio.m4
@@ -26,7 +26,7 @@ _CONV_INCLASS_ENUM(`Gio::DBus',`$1',`$2',`m4_ifelse(`$3',,`GDBus$1$2',`$3')')
')dnl
_CONV_GIO_ENUM(AppInfoCreateFlags)
-_CONV_GIO_ENUM(ApplicationFlags)
+_CONV_GIO_INCLASS_ENUM(Application,Flags)
_CONV_GIO_ENUM(AskPasswordFlags)
_CONV_GIO_ENUM(BusType)
_CONV_GIO_ENUM(ConverterFlags)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]