Category : gtk3

First I wanted to change the default keyboard shortcuts for xed (https://github.com/linuxmint/xed) editor similar to gedit (https://github.com/GNOME/gedit). Gedit has an option to do that via python plugin (https://github.com/foolo/gedit_custom_keys/). The plugin is changing accelerators like add_accelerator (GTK_APPLICATION (application), "win.find-next", "<Primary>G"); add_accelerator (GTK_APPLICATION (application), "win.find-prev", "<Primary><Shift>G") but xed doesn’t have this option. I was trying to change ..

Read more

>>> import gi >>> gi.require_version(‘Gtk’, ‘3.0’) >>> from gi.repository import Gtk Traceback (most recent call last): File "/usr/lib/python3/dist-packages/gi/importer.py", line 138, in load_module introspection_module = get_introspection_module(namespace) File "/usr/lib/python3/dist-packages/gi/module.py", line 275, in get_introspection_module module = IntrospectionModule(namespace, version) File "/usr/lib/python3/dist-packages/gi/module.py", line 122, in __init__ repository.require(namespace, version) gi.RepositoryError: Typelib file for namespace ‘Atk’, version ‘1.0’ not found During handling ..

Read more

I need to run a Python function by using GLib without freezing/interupting the GTK3 GUI. GLib.timeout_add(millisecond, function_name) is not adequate. More control is needed in my code. But it gives a warning and it does not repeat the function in every seconds when the following code is used: import gi gi.require_version(‘Gtk’, ‘3.0’) from gi.repository import ..

Read more