[glibmm] Gio::RemoteActionGroup: Derive from Gio::ActionGroup.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] Gio::RemoteActionGroup: Derive from Gio::ActionGroup.
- Date: Fri, 2 Dec 2016 12:32:39 +0000 (UTC)
commit c516553417160b4ea11d52f649e2523aa03bf21b
Author: Murray Cumming <murrayc murrayc com>
Date: Fri Dec 2 13:22:57 2016 +0100
Gio::RemoteActionGroup: Derive from Gio::ActionGroup.
Because GRemotActionGroup requires GActionGroup:
https://developer.gnome.org/gio/stable/GRemoteActionGroup.html#GRemoteActionGroup.prerequisites
Both are interfaces. This is like Gio::LoadableIcon, which
derives from Gio::Icon because GLoadableIcon requires GIcon.
FileIcon then derives and implements LoadableIcon, but doesn't
explicitly use _IMPLEMENTS_INTERFACE(Icon).
Gio::DBus::ActionGroup: Don't derive directly from ActionGroup
(instead just derive from, and implement Gio::RemoteActionGroup),
just as FileIcon doesn't derive directly from (or implement) Icon.
We can do this now that we can break ABI.
gio/src/dbusactiongroup.hg | 5 ++---
gio/src/remoteactiongroup.hg | 14 ++++----------
tools/m4/convert_gio.m4 | 2 +-
3 files changed, 7 insertions(+), 14 deletions(-)
---
diff --git a/gio/src/dbusactiongroup.hg b/gio/src/dbusactiongroup.hg
index 3872c1c..ecd72ad 100644
--- a/gio/src/dbusactiongroup.hg
+++ b/gio/src/dbusactiongroup.hg
@@ -39,11 +39,10 @@ _GMMPROC_EXTRA_NAMESPACE(DBus)
* @newin{2,32}
*/
class ActionGroup
-: public Glib::Object, public ::Gio::ActionGroup, public RemoteActionGroup
+: public Glib::Object, public Gio::RemoteActionGroup
{
_CLASS_GOBJECT(ActionGroup, GDBusActionGroup, G_DBUS_ACTION_GROUP, Glib::Object, GObject)
- _IMPLEMENTS_INTERFACE(::Gio::ActionGroup)
- _IMPLEMENTS_INTERFACE(RemoteActionGroup)
+ _IMPLEMENTS_INTERFACE(Gio::RemoteActionGroup)
protected:
_CTOR_DEFAULT
diff --git a/gio/src/remoteactiongroup.hg b/gio/src/remoteactiongroup.hg
index 0ce7159..5a70ac6 100644
--- a/gio/src/remoteactiongroup.hg
+++ b/gio/src/remoteactiongroup.hg
@@ -17,10 +17,10 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include <glibmm/interface.h>
+#include <giomm/actiongroup.h>
_DEFS(giomm,gio)
-_PINCLUDE(glibmm/private/interface_p.h)
+_PINCLUDE(giomm/private/actiongroup_p.h)
_PINCLUDE(gio/gio.h)
#ifndef DOXYGEN_SHOULD_SKIP_THIS
@@ -30,12 +30,6 @@ typedef struct _GRemoteActionGroupInterface GRemoteActionGroupInterface;
namespace Gio
{
-
-//TODO: Instead derive from ActionGroup, when we can break ABI,
-//because the GRemoteActionGroup interface requires the GActionGroup interface.
-//LoadableIcon does a similar thing correctly, for instance.
-
-
/** RemoteActionGroup - a ActionGroup that interacts with other processes.
* The RemoteActionGroup interface is implemented by ActionGroup instances that
* either transmit action invocations to other processes or receive action
@@ -57,9 +51,9 @@ namespace Gio
* platform data for action invocations that arrive by way of D-Bus.
* @newin{2,32}
*/
-class RemoteActionGroup : public Glib::Interface
+class RemoteActionGroup : public ActionGroup
{
- _CLASS_INTERFACE(RemoteActionGroup, GRemoteActionGroup, G_REMOTE_ACTION_GROUP, GRemoteActionGroupInterface)
+ _CLASS_INTERFACE(RemoteActionGroup, GRemoteActionGroup, G_REMOTE_ACTION_GROUP,
GRemoteActionGroupInterface, ActionGroup, GActionGroup)
public:
_WRAP_METHOD(void activate_action(const Glib::ustring& action_name, const Glib::VariantBase& parameter,
const Glib::VariantBase& platform_data), g_remote_action_group_activate_action_full)
diff --git a/tools/m4/convert_gio.m4 b/tools/m4/convert_gio.m4
index e6f7cb4..3ff1c4b 100644
--- a/tools/m4/convert_gio.m4
+++ b/tools/m4/convert_gio.m4
@@ -229,7 +229,7 @@ _CONVERSION(`const Glib::RefPtr<MenuModel>&',`GMenuModel*',__CONVERT_CONST_REFPT
# MenuItem
_CONVERSION(`GMenuItem*',`Glib::RefPtr<MenuItem>',`Glib::wrap($3)')
-_CONVERSION(`const Glib::RefPtr<MenuItem>&',`GMenuItem*',__CONVERT_CONST_REFPTR_TO_P)
+_CONVERSION(`const Glib::RefPtr<const MenuItem>&',`GMenuItem*',__CONVERT_CONST_REFPTR_TO_P)
# Mount
_CONVERSION(`GMount*',`Glib::RefPtr<Mount>',`Glib::wrap($3)')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]