GNOME Bugzilla – Bug 599561
Store GjsContext pointer in ShellGlobal
Last modified: 2009-10-28 16:32:10 UTC
Future functionality in ShellGlobal needs access to the GjsContext.
Created attachment 146212 [details] [review] Store GjsContext pointer in ShellGlobal
Review of attachment 146212 [details] [review]: Looks basically OK to me, though it's a little hard to tell without knowing what its intended for. An alternative that might be a little cleaner would be to add gnome_shell_plugin_get_gjs_context(), since we already have a back-pointer from global to shell plugin. (That would obviously require adding a gnome-shell-plugin.h) ::: src/shell-global.c @@ +449,3 @@ +void +_shell_global_set_js_context (ShellGlobal *global, Should be set_gjs_context I think, since JSContext exists as well. @@ +450,3 @@ +void +_shell_global_set_js_context (ShellGlobal *global, + gpointer context) Ugh on the gpointer. Just add the gjs include to the header. ::: src/shell-global.h @@ +60,3 @@ void _shell_global_set_plugin (ShellGlobal *global, MutterPlugin *plugin); +void _shell_global_set_js_context (ShellGlobal *global, gpointer js_context); Formatted wrong.
(In reply to comment #2) > Review of attachment 146212 [details] [review]: > @@ +450,3 @@ > +void > +_shell_global_set_js_context (ShellGlobal *global, > + gpointer context) > > Ugh on the gpointer. Just add the gjs include to the header. I wanted to avoid that because the gjs headers aren't introspectable.
(In reply to comment #3) > (In reply to comment #2) > > Review of attachment 146212 [details] [review] [details]: > > > @@ +450,3 @@ > > +void > > +_shell_global_set_js_context (ShellGlobal *global, > > + gpointer context) > > > > Ugh on the gpointer. Just add the gjs include to the header. > > I wanted to avoid that because the gjs headers aren't introspectable. Then add a private header that isn't included in the introspection scanning.
Attachment 146212 [details] pushed as baf823c - Store GjsContext pointer in ShellGlobal