gtk3

ValueError: Namespace Gtk not available

蹲街弑〆低调 提交于 2020-08-27 07:14:33
问题 When following the instructions 2. Getting Started — Python GTK+ 3 Tutorial 3.4 documentation Tries In [6]: import gi ...: gi.require_version('Gtk', '3.0') ...: from gi.repository import Gtk it report errors: ~/anaconda3/lib/python3.7/site-packages/gi/__init__.py in require_version(namespace, version) 128 available_versions = repository.enumerate_versions(namespace) 129 if not available_versions: --> 130 raise ValueError('Namespace %s not available' % namespace) 131 132 if version not in

How to make title-change call work in webkit2gtk?

两盒软妹~` 提交于 2020-08-11 11:05:11
问题 I am trying to port an old GTK webkit code written in python2 to webkit2 and python3 (Ubuntu has removed old webkit v1). The js code changes the title of the html, and python detected it to close it. However, it is not working in webkit2. In the old code, there is the line self.webview.connect('title-changed', title_changed) #title_changed is a python function, which will do something which shows TypeError: <WebKit2.WebView object at 0x7f14b687ecd0 (WebKitWebView at 0x557297cdb7c0)>: unknown

Configured eclipse for gtkmm and gtk+ on ubuntu

送分小仙女□ 提交于 2020-07-10 09:57:32
问题 I am trying to configure latest Eclipse for C++ (Oxygen) to work with gtkmm. How can I remove errors from Eclipse such as unresolved symbols and gtkmm header files. I am able to compile from command line using g++ and pkg-config flags. How can I do same thing from the Eclipse IDE? I am using latest IDE 2019 version. 回答1: I have been using gtkmm and Eclipse for a while now. Here is how I set it up to get both working properly together. To illustrate this, I will take the basic example from the

GTK3 custom cell renderer, that outputs widgets

ⅰ亾dé卋堺 提交于 2020-07-10 07:52:21
问题 I'm looking for a way to output random widgets in the TreeView cells. The lifecycle of these widgets is 100% controlled by me manually outside of the parent TreeView. Don't care about keyboard navigation and accessibility (so far). What I got by now is a modified official example. Header: #include <gtk/gtk.h> #define TYPE_RECKLESS_CELL_RENDERER (reckless_cell_renderer_get_type()) #define RECKLESS_CELL_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), TYPE_RECKLESS_CELL_RENDERER,

GTK3 custom cell renderer, that outputs widgets

為{幸葍}努か 提交于 2020-07-10 07:50:42
问题 I'm looking for a way to output random widgets in the TreeView cells. The lifecycle of these widgets is 100% controlled by me manually outside of the parent TreeView. Don't care about keyboard navigation and accessibility (so far). What I got by now is a modified official example. Header: #include <gtk/gtk.h> #define TYPE_RECKLESS_CELL_RENDERER (reckless_cell_renderer_get_type()) #define RECKLESS_CELL_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), TYPE_RECKLESS_CELL_RENDERER,