Am Thu, 08 Jan 2009 15:30:07 +0100 schrieb Zan Dobersek <[email protected]>:
> Luka Napotnik wrote: > > Hello. > > > > I'm trying to disable plugins on the gtk+ port of webkit. I've > > tried to modify the WebKitWebSettings property "enable-plugins" but > > my program segfaults. Here's the code: > > > > WebKitWebSettings *settings; > > ... > > settings = webkit_web_view_get_settings(web_view); > > g_object_set_property(G_OBJECT(settings), "enable-plugins", > > "FALSE"); webkit_web_view_set_settings(web_view, settings); > > > > Am I doing this right or is there another way? > > > > Greets, > > Luka > > > > _______________________________________________ > > webkit-dev mailing list > > [email protected] > > http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev > > > > Similarly to what's being done in DumpRenderTree.cpp [1], you should > use g_object_set: > > > ... > > settings = webkit_web_view_get_settings(web_view); > > g_object_set(G_OBJECT(settings), > > "enable-plugins", FALSE, > > NULL); > > // webkit_web_view_set_settings is now not needed Even better, just write settings = webkit_web_view_get_settings (web_view); g_object_set (settings, "enable-plugins", FALSE, NULL); You don't need to case the first argument since it expects void*. ciao, Christian _______________________________________________ webkit-dev mailing list [email protected] http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

