pygobject

Cannot Overlay over Gstreamer Video with Gtk.Overlay

主宰稳场 提交于 2021-01-28 08:36:33
问题 I have a project with Python, PyGObject (Gtk 3), and GStreamer (0.11) I have video in my application, so I'm using a Gtk.Overlay widget so I can put other visual elements over the video background. (I need this, trust me.) (Due to the number of widgets, and the need for specific positioning and overlaying of these widgets, I'm using a Gtk.Fixed container.) However, in using the Gtk.Overlay object with anything added via "overlay.add_overlay(widget)", the video is no longer visible at all. I

Python GTK resizing large image to fit inside a window

 ̄綄美尐妖づ 提交于 2021-01-28 03:17:34
问题 Important note : I'm using PyGObject to get access to the GTK widgets, not PyGTK . That's what makes this question different from similar ones: PyGTK: How do I make an image automatically scale to fit it's parent widget? Scale an image in GTK I want to make a very simple app that displays a label, an image and a button, all stacked on top of each other. The app should be running in fullscreen mode. When I attempted it, I've run into a problem. My image is of very high resolution, so when I

Shutdown system tray icon on PyGObject

岁酱吖の 提交于 2021-01-27 14:22:48
问题 My vision of the program: icon in tray, left click on icon opens a window with shutdown, reboot, etc. buttons. The new Gnome specification advises to use notifications instead. StatusIcon >! (Deprecated since version 3.14: Use notifications) Unfortunately, I didn't find how Notify.Notification can be displayed in the tray. The only thing that I found is AppIndicator3.Indicator, but its constructor can only take a Gtk.Menu, which is unsuitable. Which classes may I use? 回答1: I had used

How do I properly install PyGObject? (OSX)

為{幸葍}努か 提交于 2021-01-01 07:35:09
问题 I want to run existing simple examples and write some simple code using GStreamer - specifically, using its Python bindings. I want to install the packages etc to enable that. Here's an example. http://brettviren.github.io/pygst-tutorial-org/pygst-tutorial.html import gi gi.require_version('Gst', '1.0') from gi.repository import Gst Gst.init(None) # ... my_playbin = Gst.ElementFactory.make("playbin", None) assert my_playbin print my_playbin I can't get PyGObject to work, so I'm stuck right at

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

pygobject-2.28.6 won't configure: No package 'gobject-introspection-1.0' found, how do I resolve?

大兔子大兔子 提交于 2020-06-06 06:05:21
问题 I'm trying to get pygobject-2.28.6 to compile in cygwin (version in repository is 2.28.4 which has some issues). Here is the tail of ./configure: checking for GLIB - version >= 2.24.0... yes (version 2.34.3) checking for ffi... checking for FFI... yes checking for GIO... yes checking for GIOUNIX... yes checking for GI... no configure: error: Package requirements (glib-2.0 >= 2.24.0 gobject-introspection-1.0 >= 0.10.2 ) were not met: No package 'gobject-introspection-1.0' found Consider