After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 622903 - Migrate from dbus-glib to glib's GDBus
Migrate from dbus-glib to glib's GDBus
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: General
git master
Other Linux
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
: 646777 (view as bug list)
Depends on:
Blocks: 622871
 
 
Reported: 2010-06-27 11:05 UTC by André Klapper
Modified: 2011-12-15 10:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ephy-dbus: half-port to gdbus (27.40 KB, patch)
2011-06-04 19:43 UTC, Diego Escalante Urrelo (not reading bugmail)
none Details | Review
Use a gdbus-codegen generated GDBusProxy to monitor NM state (18.03 KB, patch)
2011-06-23 20:48 UTC, Claudio Saavedra
committed Details | Review
Drop all dbus-glib code (25.43 KB, patch)
2011-06-25 17:03 UTC, Claudio Saavedra
committed Details | Review
Ensure startup_context is not NULL before freeing it (972 bytes, patch)
2011-06-25 17:03 UTC, Claudio Saavedra
committed Details | Review
Mark string parameters in ephy_session_queue_command() as const (2.44 KB, patch)
2011-06-25 17:03 UTC, Claudio Saavedra
committed Details | Review
Bring back dbus activation in the form of GSimpleActions. (4.37 KB, patch)
2011-06-25 17:03 UTC, Claudio Saavedra
none Details | Review
ephy_history_service_get_url_row: don't leak the url strings (1.15 KB, patch)
2011-07-05 11:11 UTC, Claudio Saavedra
rejected Details | Review
EphyHistoryService: don't leak the history-filename string property (939 bytes, patch)
2011-07-05 11:11 UTC, Claudio Saavedra
rejected Details | Review
tests/ephy-history: plug a couple of leaks (1.15 KB, patch)
2011-07-05 11:11 UTC, Claudio Saavedra
rejected Details | Review
EphyHistoryService: fix the disposal of EphyHistoryJobMethod data (1.05 KB, patch)
2011-07-05 11:11 UTC, Claudio Saavedra
rejected Details | Review
ephy_history_service_execute_set_url_title: don't leak the title (1.08 KB, patch)
2011-07-05 11:11 UTC, Claudio Saavedra
rejected Details | Review
Add tests for EphyHistoryService::set_url_title() (3.66 KB, patch)
2011-07-05 11:11 UTC, Claudio Saavedra
rejected Details | Review
Add tests for EphyHistoryService::get_url() (2.87 KB, patch)
2011-07-05 11:11 UTC, Claudio Saavedra
rejected Details | Review

Description André Klapper 2010-06-27 11:05:11 UTC
For GLib 2.25.5 GDBus D-Bus support was merged, providing an API to replace dbus-glib.

See http://library.gnome.org/devel/gio/unstable/gdbus.html and http://library.gnome.org/devel/gio/unstable/ch28.html .

According to a quick grep this module seems to use dbus-glib:

./epiphany/configure.ac:PKG_CHECK_MODULES([DBUS],[dbus-glib-1 >= $DBUS_GLIB_REQUIRED])
Comment 1 Diego Escalante Urrelo (not reading bugmail) 2011-06-04 19:43:00 UTC
Created attachment 189231 [details] [review]
ephy-dbus: half-port to gdbus

Work in progress. Works:
- gets the session name
- installs the org.gnome.Epiphany interface for our remote methods
- calling remote methods work

Doesn't work:
- remote methods don't return until Epiphany quits

Needs cleanup, of course.

Bug #622903
Comment 2 Claudio Saavedra 2011-06-07 08:15:20 UTC
Why do we need this at all, if we use GtkApplication we get this for granted.
Comment 3 Claudio Saavedra 2011-06-07 08:22:06 UTC
*** Bug 646777 has been marked as a duplicate of this bug. ***
Comment 4 Xan Lopez 2011-06-07 08:55:56 UTC
So my understanding is that behind this "move to GDBus" thing there are three sub-goals:

- Unique app
- Remote actions
- The NetworkManager bits

I thought that only the first one was sort of duplicated with GtkApplication, but apparently the two first are. So I guess it's better to just port over the NM stuff and leave the rest for the GtkApplication bug?
Comment 5 Claudio Saavedra 2011-06-08 10:32:11 UTC
Indeed. The only bit that needs clarification, though, is regarding the exposure of the remote actions in the shell, since we don't want to expose all of them in the UI. So far I haven't found any info about this, should probably ask the shell guys.
Comment 6 Claudio Saavedra 2011-06-23 20:48:25 UTC
Created attachment 190534 [details] [review]
Use a gdbus-codegen generated GDBusProxy to monitor NM state

Get rid of the EphyNetMonitor code and instead generate a GDBusProxy
subclass that monitors the StateChanged signal and State property in
org.gnome.NetworkManager. This proxy exports these features as
standard GObject signal and property, respectively, so we can use it
directly through the relevant accessors.
Comment 7 Xan Lopez 2011-06-23 20:53:21 UTC
Review of attachment 190534 [details] [review]:

Wow, amazing :)
Comment 8 Claudio Saavedra 2011-06-23 21:05:47 UTC
Attachment 190534 [details] pushed as 3af15cd - Use a gdbus-codegen generated GDBusProxy to monitor NM state
Comment 9 Claudio Saavedra 2011-06-23 21:09:27 UTC
Thanks for reviewing so quickly. I think that now we only need to land the GtkApplication patch and the dbus-glib code can be dropped.
Comment 10 Claudio Saavedra 2011-06-25 17:03:11 UTC
Created attachment 190655 [details] [review]
Drop all dbus-glib code

We still need to provide equivalent ways to activate epiphany, but we
will use GActions instead.
Comment 11 Claudio Saavedra 2011-06-25 17:03:25 UTC
Created attachment 190656 [details] [review]
Ensure startup_context is not NULL before freeing it
Comment 12 Claudio Saavedra 2011-06-25 17:03:28 UTC
Created attachment 190657 [details] [review]
Mark string parameters in ephy_session_queue_command() as const

ephy_session_queue_command() doesn't take over the strings it
receives, so mark these as const for clarity.
Comment 13 Claudio Saavedra 2011-06-25 17:03:31 UTC
Created attachment 190658 [details] [review]
Bring back dbus activation in the form of GSimpleActions.

This adds some actions that can be activated through
org.gtk.Actions.Activate calls on /org/gnome/Epiphany. The interface
is of course different than the previously exposed through DBus, since
it is now defined by GTK+.
Comment 14 Claudio Saavedra 2011-06-25 17:06:07 UTC
I am not 100% sure that we want/need the last patch; anyone wanting to activate epiphany can use the command-line and the effect will be the same. otoh, please note that the open-uri-list opens everything in new windows, as there is no way to specify otherwise, but this can be added if we really want this.
Comment 15 Xan Lopez 2011-06-26 00:43:28 UTC
Review of attachment 190655 [details] [review]:

Ok.
Comment 16 Xan Lopez 2011-06-26 00:44:15 UTC
Review of attachment 190656 [details] [review]:

Ok.
Comment 17 Xan Lopez 2011-06-26 01:00:14 UTC
Review of attachment 190657 [details] [review]:

Ok.
Comment 18 Claudio Saavedra 2011-06-27 13:31:01 UTC
Attachment 190655 [details] pushed as d40bac5 - Drop all dbus-glib code
Attachment 190656 [details] pushed as 74d64e0 - Ensure startup_context is not NULL before freeing it
Attachment 190657 [details] pushed as 016b699 - Mark string parameters in ephy_session_queue_command() as const
Comment 19 Claudio Saavedra 2011-07-05 11:11:00 UTC
Created attachment 191289 [details] [review]
ephy_history_service_get_url_row: don't leak the url strings
Comment 20 Claudio Saavedra 2011-07-05 11:11:05 UTC
Created attachment 191290 [details] [review]
EphyHistoryService: don't leak the history-filename string property
Comment 21 Claudio Saavedra 2011-07-05 11:11:08 UTC
Created attachment 191291 [details] [review]
tests/ephy-history: plug a couple of leaks
Comment 22 Claudio Saavedra 2011-07-05 11:11:12 UTC
Created attachment 191292 [details] [review]
EphyHistoryService: fix the disposal of EphyHistoryJobMethod data

The GDestroyNotify for the argument data was not even stored in the
job details, leaking the argument data for every single job.
Comment 23 Claudio Saavedra 2011-07-05 11:11:15 UTC
Created attachment 191293 [details] [review]
ephy_history_service_execute_set_url_title: don't leak the title
Comment 24 Claudio Saavedra 2011-07-05 11:11:18 UTC
Created attachment 191294 [details] [review]
Add tests for EphyHistoryService::set_url_title()
Comment 25 Claudio Saavedra 2011-07-05 11:11:21 UTC
Created attachment 191295 [details] [review]
Add tests for EphyHistoryService::get_url()
Comment 26 Xan Lopez 2011-12-15 10:10:49 UTC
I think all this was done.