GNOME Bugzilla – Bug 680219
Various fixes and cleanups
Last modified: 2012-07-19 02:29:56 UTC
I started by with a very simple fix, and then a half an hour later this happened.
Created attachment 219180 [details] [review] application: Do not pass extra arguments to GtkClutter.init
Created attachment 219181 [details] [review] miners: Port JS proxy code to GDBus Make both miners use the same interface so that we can generalize the code a bit better.
Created attachment 219182 [details] [review] changeMonitor: Port to GDBus
Created attachment 219183 [details] [review] application: Port to gjs inheritance
Review of attachment 219180 [details] [review]: ::: src/application.js @@ +180,3 @@ String.prototype.format = Format.format; + GtkClutter.init(null); Are you sure of this? In C the function is gtk_clutter_init(int *argc, char ***argv)
Review of attachment 219181 [details] [review]: Looks good, thanks! ::: src/miner/gdata-miner-main.c @@ +169,3 @@ + g_dbus_connection_register_object (connection, + "/org/gnome/Documents/GDataMiner", This looks just a stray whitespace change, could you rebase it out of the patch?
(In reply to comment #5) > Review of attachment 219180 [details] [review]: > > ::: src/application.js > @@ +180,3 @@ > String.prototype.format = Format.format; > > + GtkClutter.init(null); > > Are you sure of this? In C the function is > gtk_clutter_init(int *argc, char ***argv) argv has an (array length=argc) annotation, which means that gjs will fill in argc with argv's length automatically
Created attachment 219187 [details] [review] miners: Port JS proxy code to GDBus Make both miners use the same interface so that we can generalize the code a bit better.
Review of attachment 219182 [details] [review]: ::: src/changeMonitor.js @@ +84,2 @@ this._resourceService = new TrackerResourcesService(); + this._resourceService.connectSignal('GraphUpdated', Lang.bind(this, this._onGraphUpdated)); This doesn't work; in the callback I get the following exception JS ERROR: !!! Exception in callback for signal: GraphUpdated JS ERROR: !!! message = '"insertEvents is undefined"' JS ERROR: !!! fileName = '"/opt/jhbuild/share/gnome-documents/js/changeMonitor.js"' JS ERROR: !!! lineNumber = '95' JS ERROR: !!! stack = '"([object _private_Gio_DBusProxy],":1.26",[object Array])@/opt/jhbuild/share/gnome-documents/js/changeMonitor.js:95 wrapper([object _private_Gio_DBusProxy],":1.26",[object Array])@/opt/jhbuild/share/gjs-1.0/lang.js:204 _emit("GraphUpdated",":1.26",[object Array])@/opt/jhbuild/share/gjs-1.0/signals.js:124 _convertToNativeSignal([object _private_Gio_DBusProxy],":1.26","GraphUpdated",[object _private_GLib_Variant])@/opt/jhbuild/share/gjs-1.0/overrides/Gio.js:126 start()@/opt/jhbuild/share/gnome-documents/js/main.js:26 @<command line>:1 "'
Review of attachment 219180 [details] [review]: Go for it then
Review of attachment 219187 [details] [review]: Sure
Created attachment 219188 [details] [review] changeMonitor: Port to GDBus Try this one, then.
(I can't get the signal to fire -- what do I need to do)
Review of attachment 219188 [details] [review]: Works great now, thanks.
Review of attachment 219183 [details] [review]: Looks good, but there was a mid-air collision with some code I just changed in git master, so it doesn't apply anymore.
(In reply to comment #13) > (I can't get the signal to fire -- what do I need to do) Do you have any google docs in a linked online account? If so you should get an updated signal as soon as the miner gets results back from google. Maybe the miner fails to get autostarted in jhbuild, you can run it with GDATA_MINER_PERSIST=1 in another terminal.
Created attachment 219189 [details] [review] application: Port to gjs inheritance Heh. That's a coincidence.
Review of attachment 219189 [details] [review]: Looks good, with the exception of the following...sorry about that, that function wasn't there when you originally wrote the patch. No need to attach another patch again. ::: src/application.js @@ +140,3 @@ }, _initAppMenu: function() { There's another this.application->this to do inside this function
Attachment 219180 [details] pushed as c122aad - application: Do not pass extra arguments to GtkClutter.init Attachment 219187 [details] pushed as adef4f4 - miners: Port JS proxy code to GDBus Attachment 219188 [details] pushed as bec7791 - changeMonitor: Port to GDBus Attachment 219189 [details] pushed as 3bd66e5 - application: Port to gjs inheritance