I'm trying to use a Gtk.Switch widget in an app but "activate" signal is not firing by clicks.
It works fine when using the widget with keyboard by hitting reture/space key on it but clicks don't fire the "activate" event.
Any Idea what is to be…
I'm receiving the following warnings in my GTK 3 application:
Gtk-WARNING **: Allocating size to __main__+MCVEWindow 0000000004e93b30 without calling gtk_widget_get_preferred_width/height(). How does the code know the size to allocate?
The…
I'm trying to convert the menubar in my Gtk app so it will use GActions(from the Gio) as opposed of GtkActions in Python3 using GObject Instrospection.
I've been trying to figure it out on my own but so far it seems awfully complicated and I didn't…
I've been fiddling with this on and off for a couple of days but just can't seem to come to grips with what the issues might be.
Essentially I'm trying to style some Gtk Widgets in Gtk3 using CSS style declarations, nothing complicated but just…
I'd been using the answer provided in the PyGTK FAQ, but that doesn't seem to work with PyGObject. For your convenience, here is a test case that works with PyGTK, and then a translated version that doesn't work with PyGObject.
PyGTK Version:
import…
I've recently studied the gtk design patterns, and found the in-app notifications. There is an description on when to use it, but no reference to the gtk api.
I have searched for it, but found just the GNotification and…
I am having trouble in managing the insert-text signal emitted by the Gtk.Entry widget. Consider the following example:
from gi.repository import Gtk
def on_insert_text(entry, new_text, new_text_length, position):
print(position)
entry =…
Recently in one of my programs I got a segmentation fault problem. I managed to find the line that its is causing the problem but I haven't find the way of fixing it.
the line:
self.window_player.add(self.vlc)
where self.vlc is a widget and…
I am looking for a possibility to add autocompletion for gtk3 libs to vim. I have already tried vim-jedi as it seems the state of the art autocompletion mechanism for vim and python (also recommended here), but that does not work for the gtk3 stuff…
I'm trying to apply a patch for meld from https://bugzilla.gnome.org/show_bug.cgi?id=680569 myself, and am having trouble with this:
$ git clone git://git.gnome.org/meld
$ cd meld
$ python setup.py build
$ bin/meld
2014-01-11 16:30:44,736 ERROR…
I'm programming a little application in Python + Gtk3. I'm using a GtkGrid with one column and two rows.
In the first row I put: a GtkScrolledWindow, and inside it a TreeView with two columns.
In the second row I put: a ButtonBox, and inside it a…
First of all, it is important to mention that I'm learning Python and Gtk+ 3, so I'm not an advanced programmer in these languages.
I'm trying to make a graphical interface in Gtk3 for a Python script that creates a png image, and I'd like to…
I am trying to get a treemodel (a liststore in fact) that can be filtered and also sorted. I have the following piece of code
self.modelfilter = self.liststore.filter_new()
self.modelfilter.set_visible_func(\
…
from gi.repository import Gtk
#print Gtk.GTK_MAJOR_VERSION
win = Gtk.Window()
win.connect("delete-event", Gtk.main_quit)
win.show_all()
Gtk.main()
That is my code, how can I know which version of Gtk is being used.
Thank you!
I am trying to load a webkit view on a different thread than main thread for gtk.
I see the example PyGTK, Threads and WebKit
I slightly modify for support PyGObject and GTK3:
from gi.repository import Gtk
from gi.repository import Gdk
from…