Tjaster94 / pywebkitgtk

Automatically exported from code.google.com/p/pywebkitgtk
Other
0 stars 0 forks source link

WebPolicyDecision Missing #27

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I've tried to build and install pywebkitgtk1.1.3 from source tarball,
against the release tarball of webkitgtk1.1.3. Building was successful and
I'm actually able to use it (tabbed_browser.py works). In my application I
use the "navigation-policy-decision-requested" signal, I can connect it
without any error, and my callback function is getting called normally. The
issue arise when I try to use the WebKitPolicyDecision object, and the
following message is dumped to the console : 

Traceback (most recent call last):
  File "test113.py", line 51, in request_decision_policy_cb
    self.use(policyDecision)
AttributeError: 'myWebView' object has no attribute 'use'

The object (WebKitPolicyDecision) exists and a print gives me this result :

<__main__.WebKitWebPolicyDecision object at 0x88643c4
(WebKitWebPolicyDecision at 0x8937960)>

Strange since the object is not in the webkit module.

After having a look at webkit.c I found that there isn't any generated
methode for the policydecision object in that are defined in webkit-1.1.defs :

Really strange, this is the content of webkit.error
Warning: generating old-style constructor for:webkit_network_request_new
Warning: Constructor for WebKitWebHistoryItem needs to be updated to new API
         See http://live.gnome.org/PyGTK_2fWhatsNew28#update-constructors
Warning: Constructor for WebKitNetworkRequest needs to be updated to new API
         See http://live.gnome.org/PyGTK_2fWhatsNew28#update-constructors
***INFO*** There are no declared global functions.
***INFO*** The coverage of methods is 100.00% (105/105)
***INFO*** There are no declared virtual proxies.
***INFO*** There are no declared virtual accessors.
***INFO*** There are no declared interface proxies.

My operating is fedora core 9. Also during configure process,
pygobject-codegen is not found, and it falls back to pygtk codegen.

Any hint about this ?

Original issue reported on code.google.com by Doomed...@gmail.com on 31 Mar 2009 at 10:33

GoogleCodeExporter commented 8 years ago
I've installed pygobject-2 from source, and now pygobject-codegen is 
successfully
detected but the result is the same
a "dir(webkit)" gives the following results :

>>> dir (webkit)
['Download', 'NetworkRequest', 'WebBackForwardList', 'WebFrame', 
'WebHistoryItem',
'WebInspector', 'WebNavigationAction', 'WebSettings', 'WebView', 
'WindowFeatures',
'__doc__', '__file__', '__name__']

Original comment by Doomed...@gmail.com on 31 Mar 2009 at 10:54

GoogleCodeExporter commented 8 years ago
Figured it out
In the file "webkit-1.1-types.defs" line 43, a 'c' is missing :)

The ligne
- (define-objet WebPolicyDecision
should be
+ (define-object WebPolicyDecision

Hope this will help someone :)
Regards

Original comment by Doomed...@gmail.com on 31 Mar 2009 at 2:09

GoogleCodeExporter commented 8 years ago
Hi DoomedFox

Thanks for taking the time to look into this. The fix is now part of PyWebKitGtk
1.1.4 which is available at http://code.google.com/p/pywebkitgtk/downloads/list.

Thanks again,
Jan

Original comment by jmalo...@gmail.com on 1 Apr 2009 at 9:42