Merge lp://qastaging/~davidc3/unity-scope-tomboy/tomboy-dbus-wakeup into lp://qastaging/unity-scope-tomboy

Proposed by David Callé
Status: Work in progress
Proposed branch: lp://qastaging/~davidc3/unity-scope-tomboy/tomboy-dbus-wakeup
Merge into: lp://qastaging/unity-scope-tomboy
Diff against target: 13 lines (+2/-1)
1 file modified
src/unity_tomboy_daemon.py (+2/-1)
To merge this branch: bzr merge lp://qastaging/~davidc3/unity-scope-tomboy/tomboy-dbus-wakeup
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Submarine Pending
Review via email: mp+212116@code.qastaging.launchpad.net

Commit message

Add flags to the dbus connection to avoid starting new tomboy instances on connection.

Description of the change

Add flags to the dbus connection to avoid starting new tomboy instances on connection.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Bruno Nova (brunonova) wrote :

I applied this patch directly to /usr/share/unity-scopes/tomboy/unity_tomboy_daemon.py to test it.

If Tomboy is already running when I search for "tomboy:something" in the Dash, everything works fine.

But if Tomboy not running yet, the bug still exists, and multiple Tomboy instances are started.
Which is strange, because I opened a python3 interpreter and executed:

from gi.repository import Gio, GLib
session_bus = Gio.bus_get_sync (Gio.BusType.SESSION, None)
flags = Gio.DBusProxyFlags.DO_NOT_CONNECT_SIGNALS | Gio.DBusProxyFlags.DO_NOT_LOAD_PROPERTIES
b = Gio.DBusProxy.new_sync ( session_bus, flags, None, name, path, iface, None)
b2 = Gio.DBusProxy.new_sync ( session_bus, flags, None, name, path, iface, None) # executed again to test
b.ListAllNotes()

and it worked correctly. The first "Gio.DBusProxy.new_sync()" call started Tomboy, the second didn't start a second instance, and b.ListAllNotes() returned all notes correctly.

Unmerged revisions

32. By David Callé

Add flags to prevent tomboy to be started multiple times

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: