【发布时间】:2012-10-19 09:45:49
【问题描述】:
我正在使用像 this 这样的 Webkit 浏览器检查器。
当我在 Ubuntu 12.10 中运行它时,我在使用检查器时遇到了错误。例如:
** Message: console message: file:///usr/share/webkitgtk-1.0/webinspector/UIString.js @42: Localized string "Go to line" not found.
** Message: console message: file:///usr/share/webkitgtk-1.0/webinspector/UIString.js @42: Localized string "Filter" not found.
** Message: console message: file:///usr/share/webkitgtk-1.0/webinspector/UIString.js @42: Localized string "Search Previous" not found.
** Message: console message: file:///usr/share/webkitgtk-1.0/webinspector/UIString.js @42: Localized string "Search Next" not found.
** Message: console message: file:///usr/share/webkitgtk-1.0/webinspector/UIString.js @42: Localized string "α:" not found.
** Message: console message: file:///usr/share/webkitgtk-1.0/webinspector/UIString.js @42: Localized string "%d of %d" not found.
(geany:2487): Gdk-CRITICAL **: IA__gdk_error_trap_pop: assertion `gdk_error_traps != NULL' failed
** Message: console message: file:///usr/share/webkitgtk-1.0/webinspector/UIString.js @42: Localized string "Sources Panel" not found.
** Message: console message: file:///usr/share/webkitgtk-1.0/webinspector/UIString.js @42: Localized string "Toggle breakpoint" not found.
** Message: console message: file:///usr/share/webkitgtk-1.0/webinspector/UIString.js @42: Localized string "Painting" not found.
我还注意到,当控制台位于下半部分时,面包屑/滑块栏没有显示:
我不记得在早期版本中,当我使用 GTK3 版本(from gi.repository import WebKit 等)时,它也有类似的问题,更糟糕的是,滚动条在顶部和底部没有箭头。我是否错过了初始化 Webkit 检查器或英语语言环境的步骤?
我想调试这个问题,但由于检查器对象不是 webview 对象,我不确定是否可以向检查器添加检查器? (例如,当检查器是 Chrome/Chromium 中自己的窗口时,您如何使用 F12,这样您就可以调试该检查器)。应该可以,但是maybe not with pyGTK?
更新: 我在 12.04 Ubuntu 上对此进行了测试,并没有注意到上面的问题。我报告了一个错误here。这是与每台 12.10 计算机中的某些包冲突,还是我的配置设置不正确?
更新: 13.04 也出现了同样的问题。
【问题讨论】:
-
这甚至可能是您的 gtk 库可用的主题的问题。如果是这样的话,我不会感到惊讶,因为 gtk 的变化不断变化。当您尝试更改环境的主题然后重新启动应用程序时会发生什么(我猜是 tunesviewer,对吧?)。
-
无论 GTK 主题如何,我都会遇到同样的问题。 Tunesviewer 以及任何基于 Python 的 Webkit 视图中都存在该问题。 (即使是这样一个简单的例子:theravingrick.blogspot.com/2012/04/…)
-
嗯,奇怪。 Here 是我在纯 Debian 系统中看到的。
-
@rbrito 你能检查一下这是在哪个版本的 gtk 和 python-webkit-gtk 上工作的吗?另外,它是哪个版本的 webkit? (
navigator.userAgent会给你 Webkit/版本号) -
这也发生在 Midori(但不是 Chromium)中,所以我认为 Python-GTK 没有任何问题。