I have been trying to prepare a development where I can use GTK and WebKit in python for the past few days. I have given up on ubuntu and now I just want to focus on mac first. I have installed the pygobject3 and I can load the GTK 3.0. But I can't…
I'm trying to get pygobject installed, but one of the dependencies is py3cairo. I've already installed it for use with Python 3.4, but now I want to use it with Python 3.6.
I know I can install it with sudo apt-get install python3-cairo, but it…
I've been trying to resize a label's width for a while, but it seems IMPOSSIBLE, or at least incomprehensible for me...
I'll explain my situation with images for the sake of clarity.
This is how the Window looks with a "Normal" Label...
This is…
Below are two questions on the same component:
Which signal is triggered when the mouse passes over a Gio.MenuItem?
How to implement a tooltip for Gio.MenuItem?
I use PyGObject/PyGI and GStreamer to show a video in my GUI. The video is shown in a Gtk.DrawingArea and therefore I need to get it's window-handle in the realize-signal-handler. On Linux I can simply use…
When using the Python 3 bindings of GTK3, is it possible to implement gobject.GInterface interfaces by subclassing them?
In my specific case, I want to write a custom Gtk.TreeModel implementation. Is it sufficient to just subclass it and implement…
I created a GtkPopoverMenu and added some text buttons to it, but I can't get it to follow the same padding as other popovers, like the one in Nautilus.
The default style classes are being applied, and GtkInspector shows the same padding values as…
I need to write a program on my Raspberry Pi to get a video and audio stream with Gstreamer from network and play them.(I have two stream. one for video and one for audio) and i need a custom GUI. I followed the below link…
I am trying to "freeze" a Python 3 file that uses PyGObject and Gdk/Gtk. Here is the Python script:
from gi.repository import Gtk, Gdk
class Handler:
def onDeleteWindow(self, *args):
Gtk.main_quit(*args)
def searchPressed(self,…
I need to get the font color of the current theme.
I found this question that explains it how to do it in C with gtk_style_lookup_color, but it seems that the function is deprecated.
Making more researches I found the new function…
I am trying to create a working dialog box in Python 2.7/GTK+ 3 (PyGObject). I found an online tutorial which offered the following code...
md = Gtk.MessageDialog(window,
Gtk.DIALOG_DESTROY_WITH_PARENT,
Gtk.MESSAGE_INFO,
…
I'd like to copy HTML (and a plain text equivalent) to the clipboard in a Linux GUI environment. Cross-platform is ideal, although Linux is my immediate target. I'd also like to use something that works in Python 3.x as well as 2.x.
According to…
I cannot make Python3 work with GTK3. I'm in a cluster context and I had everything recompiled from the sources.
When I run a simple example :
from gi.repository import Gtk
win = Gtk.Window()
win.connect("delete-event",…
I'm following http://www.micahcarrick.com/gsettings-python-gnome-3.html to use GSettings from python, and I've succeeded to read a value:
from gi.repository import…
I am trying to port sample drag and drop example from pygtk FAQ to pygobject.
from gi.repository import Gtk as gtk
import urllib
import os
TARGET_TYPE_URI_LIST = 80
dnd_list = [ ( 'text/uri-list', 0, TARGET_TYPE_URI_LIST ) ]
def…