gtk

AppIndicator3.Indicator: is there a way to hide/show it at runtime?

AppIndicator3.Indicator: is there a way to hide/show it at runtime? Question: I am trying to hide the `AppIndicator3.Indicator“ once is shown but so far all my tries have failed. So far I tried to just set the instance to None in the hope that the garbage collector would remove it and I tried to set …

Total answers: 2

Drop file in Python GUI (GTK)

Drop file in Python GUI (GTK) Question: I would like to write a little app who takes a selected number of file, and store the path of everything for future things. Basically: Select mixed (images, audio, video) file from Nautilus (in this case), drag them, drop them in this GUI and get the absolute path …

Total answers: 3

get cairosvg working in windows

get cairosvg working in windows Question: Trying to get this code working: import cairosvg import os path = “D:/PyProjects/Bla/Temp” os.chdir(path) cairosvg.svg2pdf(url=’Pic.svg’, write_to=’image.pdf’) but get errors along similar to this post: Traceback (most recent call last): File “D:/work/lean_python/pdf/other.py”, line 2, in <module> import cairosvg File “D:env_python352libsite-packagescairosvg__init__.py”, line 29, in <module> from . import surface File “D:env_python352libsite-packagescairosvgsurface.py”, …

Total answers: 6

select certain monitor for going fullscreen with gtk

select certain monitor for going fullscreen with gtk Question: I intend to change the monitor where I show a fullscreen window. This is especially interesting when having a projector hooked up. I’ve tried to use fullscreen_on_monitor but that doesn’t produce any visible changes. Here is a non-working example: #!/usr/bin/env python import sys import gi gi.require_version(‘Gtk’, …

Total answers: 2

How do I obtain the Gtk3 selection color of a widget using GtkStyleContext

How do I obtain the Gtk3 selection color of a widget using GtkStyleContext Question: I’m trying to obtain the selection color of a Gtk3 IconView in python but I’m confused how to interpret the existing C++ documentation and how it relates to Python. My current python code is as follows: color = self.iconview.get_style().bg[Gtk.StateType.SELECTED] This works …

Total answers: 3

webkit: is it possible to store cookies to file and reuse it again?

webkit: is it possible to store cookies to file and reuse it again? Question: is it possible to store cookies to file when you use webkit and reuse it again next time when I run my application? Asked By: scythargon || Source Answers: I know its old question and have been looking for the answer …

Total answers: 3

Python GTK: Scrollable Grid with clickable images

Python GTK: Scrollable Grid with clickable images Question: I’m writing an python program (gui in gtk) (linux btw.) I want to have a (scrollable) grid of images that are clickable like buttons. I’m planning to have 3 images per line, show 2 lines and then scroll vertically through the rest. I don’t really know which …

Total answers: 2

Is there a gi.repository documentation for python?

Is there a gi.repository documentation for python? Question: I’m looking for a gi.repository module documentation and I can’t find anything on the internet. All I found is documentation of new Gtk3 libraries for C, or old PyGtk 2.0 Reference Manual I’m looking for something like PyGtk 2.0 Reference Manual but for Gtk3. Is there something …

Total answers: 5

Mysterious GObject warning: assertion `G_IS_OBJECT (object)' failed

Mysterious GObject warning: assertion `G_IS_OBJECT (object)' failed Question: I have a warning when I run my GTK (Python GObject introspection) application and I can’t figure out its source. When the application is loading and I’m populating a GtkListStore, after the very first time I append a row, I get the following warning: /usr/lib/python2.7/site-packages/gi/types.py:44: Warning: g_object_set_qdata: …

Total answers: 3

Has threading in GTK w/ Python changed in PyGObject introspection?

Has threading in GTK w/ Python changed in PyGObject introspection? Question: I’m in the process of converting a program from PyGTK to PyGObject introspection for the first time and I’ve hit a roadblock with threading. I have a process that takes some time to complete, so I pop up a dialog with a progress bar …

Total answers: 1