Tag Info

Hot answers tagged

26

Ways to communicate from an embedded WebKit widget to the controlling Python program Gtk or Qt: set window.status from JavaScript; trap the corresponding event in Python set document.title from JavaScript; trap the corresponding event in Python redirect the page to a custom URL (say, x-my-app:thing1/thing2/thing3); trap ...


15

It's been a while since I played with that but here's what I did: Use something like <form> <select onchange="location.href='mycombo://'+this.value"> <option>foo</option> <option>bar</option> <option>baz</option> </select> </form> in your HTML. So when the user selects ...


10

Well I have answered my own question (again). To correct this frankly stupid behaviour by Evolution one needs to go to ~/.config/gtk-3.0/ Inside that folder there should be a file called gtk.css, if not create it. Add these lines to the file: /* Black on white for HTML messages in Evolution Reader/Composer */ EMailView WebKitWebView, EMailReader ...


6

Here's some working code for a transparent WebKit window. from gi.repository import WebKit, Gtk, Gdk import signal class BackgroundPaneCallbacks: pass class BackgroundPaneWebview(WebKit.WebView): def __init__(self): WebKit.WebView.__init__(self) self.set_transparent(True) ...


5

If you want to install the Switch.pm Perl module into your system Perl config, there are two methods of installing it: Install it through the Ubuntu repositories. Install the .pm through CPAN. At this time, both will provide the current version of this module(2.16). Installing Switch.pm using the Ubuntu repositories: From the command-line, the ...


4

OP has resolved the problem and posted answer as an update to the question; SOLVED: apparently it had to do with lack of audio. While chrome would play the video with no sound, libwebkit wouldn't start video. Adding user to audio and video groups solved the problem.


4

The PPA mentioned in the question is greatly outdated for 12.04 hence you have to disable it and find another instructions on building webkit from source. Additionally, someone has to edit the wiki. Looks like webkit is now in libwebkitgtk-3.0-0. Try these: sudo apt-get build-dep libwebkitgtk-3.0-0 apt-get source libwebkitgtk-3.0-0 cd webkit-* ...


4

There's no built-in equivalent, but you can reproduce this behavior by setting up a message handler in a user script that triggers an event in the DOM that you handle in the HTML document. For each of these steps, the code to be executed is passed along. For a simple example: oxide-test.qml import QtQuick 2.0 import Ubuntu.Components 0.1 import ...


3

Another solution is to install nodejs: sudo apt-get install nodejs npm The above will not always install the most recent version, in which case you can try: sudo apt-get install python-software-properties python g++ make sudo add-apt-repository ppa:chris-lea/node.js sudo apt-get update sudo apt-get install nodejs


3

There are two kinds of quicklist entries: Static: they only depend on static entries in the .desktop files Dynamic: they can be created in the program itself and seem to require PyGI. So for you there seem to be two ways around that: stick with static quicklists write a separate server (very simple, really) that uses gtk3 /PyGI and acts as a bridge ...


3

Yes it's possible. No it's probably not worth it for redistribution. If you did manually update your pygi+webkit you would have to shove that in a ppa and depend on your own packaged version of WebKit in order to "send" the functionality to other users. You would run the risk of breaking other things that depend on the current version in repo, which ...


3

WebKit does not exist on Linux without it being a "port." There is no version of WebKit which doesn't require some toolkit, and thus has integrated API with that toolkit. You'll need to choose which toolkit package you wish to use, and install the appropriate -dev package for that version of WebKit. Also you can't develop for a single API and have it work ...


2

Prefix is a directory under which the compiled application is going to be installed. I'd use something like /opt/WebKitGtk to be sure it does not override anything. Installing in /usr is definitely not a good idea. Also note I corrected a typo in your command example - make should be a separate command. Good luck :)


2

it was "Helvetica" for me. Had to install for some Scribus compatibility and since started noticing fonts overlapping everywhere - documents, web pages, web-based editors. Removing the font fixed the issue. Yet to figure out why the incompatibility but as far as this issue is concerned, look for that font or any other recently installed fonts.


2

I followed this article for running a Firefox-based test framework on a server earlier this year. The Xvfb-stuff is pretty simple, we just need to make sure to turn the access controls off so X doesn't get all uppity. Something like this should get you going: sudo apt-get install xvfb sudo Xvfb :10 -ac export DISPLAY=:10 # run your gubbins Though you ...


2

The HTML5 tutorial is outdated due to code changes in the SDK PPA. Very sorry for the confusion. For example, as you note, at the time the tutorial was written, there were two types of HTML5 app projects you could create: one for Cordova HTML5 apps, one for non Cordova HTML5 apps (which was named "HTML5 Touch UI"). There is now only a single type of HTML5 ...


2

Type quickly design when you are in the application's directory. This should open up glade which gives you a GUI to design your application. When you click on the top-level window, you will see the Window Properties. In this you will find an option for "Window position", assign "center" to this field. This will open the main window of your application in ...


2

If you need to build WebKit from source using the SVN repo, all you have to do is to use the provided build scripts: ./Tools/gtk/install-dependencies ./Tools/Scripts/build-webkit --gtk By default, build-webkit places build products in WebKitBuild. The WEBKIT_OUTPUTDIR environment variable can be used to set a different build products location. If you ...


1

Your package name has a missing 5, its name is libqt5webkit5 not libqtwebkit5: sudo apt-get install libqt5webkit5 Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: xaw3dg xfig-libs Use 'apt-get autoremove' to remove them. The ...


1

With the move from static PyGTK bindings to the dynamic GObject-introspection, you'll have to use the C-docs. Here are the WebKit docs. It might take some time to grasp how to translate these into Python, but it is the most complete documentation you'll find. For example: webkit_web_view_can_go_forward -> WebKit.WebView.can_go_forward ...


1

In Firefox, check your zoom setting and character encoding. Reset the former and the usual default for the latter is UTF-8.


1

Finally! i fixed it. there where some botched fonts installend in my /home/.fonts/ directory. I deleted them now everything is fine.


1

You would need to connect to the switch-page signal on your Gtk.Notebook, and in the callback call load_uri() on your Webkit WebView


1

Here's a rendition of some working code. Note how the settings are instantiated and later the browser is told to set those settings. self._browser = webkit.WebView() browser_settings=webkit.WebSettings() useragent=browser_settings.get_property('user-agent') browser_settings.set_property('user-agent', ' '.'abc') ...


1

From the comments: The 1.9.1 release of webkit (which isn't even in quantal as of this writing) claims to have fixed" Web content (except plugins) should no longer steal focus from other GTK+ widgets." (mail.gnome.org/archives/gnome-announce-list/2012-April/…) Also see bug: bugs.webkit.org/show_bug.cgi?id=77791 – andrewsomething Jun 9 at 20:32



Only top voted, non community-wiki answers of a minimum length are eligible