! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
[patch] Port to GDBus
Status:
RESOLVED: FIXED
Product:
Mousepad
Component:
General

Comments

Description Arkadiy Illarionov 2018-04-14 13:36:04 CEST
Created attachment 7664 
Port to GDBus

According to freedesktop.org DBus-GLib is obsolete and [new] applications should use GDBus.
This patch changes dependency from dbus-glib to dbus.
Comment 1 Theo Linkspfeifer editbugs 2019-04-26 02:04:06 CEST
After applying the patch to git master I had to add the changes to main.c manually.

Also, it was necessary to make the following change, so that make would not complain:
<-mousepad-dbus-infos.[ch]: mousepad-dbus-infos.xml Makefile
->mousepad-dbus-infos.h mousepad-dbus-infos.c: mousepad-dbus-infos.xml Makefile
Comment 2 Arkadiy Illarionov 2019-04-26 09:31:54 CEST
Created attachment 8458 
Port to GDBus

Rebase on current master, fixed make targets.
Comment 3 Theo Linkspfeifer editbugs 2019-04-26 14:02:05 CEST
Thanks. I can verify that it works as intended. Tested with these D-Bus method calls:

gdbus call --session --dest=org.xfce.Mousepad --object-path /org/xfce/Mousepad --method org.xfce.Mousepad.Terminate
gdbus call --session --dest=org.xfce.Mousepad --object-path /org/xfce/Mousepad --method org.xfce.Mousepad.LaunchFiles "/tmp" "['/tmp/foo.txt']"
Comment 4 Arkadiy Illarionov 2019-05-17 23:22:21 CEST
Created attachment 8531 
Port to GDBus

Fix merge conflict with current master.
Comment 5 Andre Miranda editbugs 2019-05-19 00:59:03 CEST
Created attachment 8537 
updated patch

- Updated to git master
- Fixed whitespace warning

The patch looks good, both dbus methods work as expected, I'm just concerned about the check on "dbus-1", I don't think it's necessary except for the conditional flag it creates. What I see in other Xfce components is this check:
AC_CHECK_PROG([GDBUS_CODEGEN],[gdbus-codegen],[gdbus-codegen])
Comment 6 Andre Miranda editbugs 2019-06-18 03:56:32 CEST
Created attachment 8647 
mousepad-gdbus.patch

Now configure checks for gdbus-codegen, but it is still possible to disable DBUS support.
I also removed client code that used dbus-glib.
Comment 7 Maurizio Galli 2019-07-20 20:34:37 CEST
(In reply to Andre Miranda from comment #6)
> Created attachment 8647 
> mousepad-gdbus.patch
> 
> Now configure checks for gdbus-codegen, but it is still possible to disable
> DBUS support.
> I also removed client code that used dbus-glib.

I tested this patch and seems to work fine including when building an rpm package.
Comment 8 Git Bot editbugs 2019-07-24 02:40:01 CEST
Arkadiy Illarionov referenced this bugreport in commit e9e4e30777a4bb24f9e6045942bdfb8937a1a571

Port to GDBus (Bug #14337)

https://git.xfce.org/apps/mousepad/commit?id=e9e4e30777a4bb24f9e6045942bdfb8937a1a571

Bug #14337

Reported by:
Arkadiy Illarionov
Reported on: 2018-04-14
Last modified on: 2019-07-24

People

Assignee:
Matthew Brush
CC List:
4 users

Version

Target Milestone:
Mousepad 0.4.x

Attachments

Port to GDBus (15.23 KB, patch)
2018-04-14 13:36 CEST , Arkadiy Illarionov
no flags
Port to GDBus (15.33 KB, patch)
2019-04-26 09:31 CEST , Arkadiy Illarionov
no flags
Port to GDBus (15.29 KB, patch)
2019-05-17 23:22 CEST , Arkadiy Illarionov
no flags
updated patch (15.32 KB, patch)
2019-05-19 00:59 CEST , Andre Miranda
no flags
mousepad-gdbus.patch (23.88 KB, patch)
2019-06-18 03:56 CEST , Andre Miranda
no flags

Additional information