Questions tagged [pygi]

PyGI (Python GObject Introspection) is the replacement for PyGTK, compatible with GTK+3.x and the new GObject-Introspection technology.

Filter by
Sorted by
Tagged with
0 votes
1 answer
160 views

cool python cairo screen widget needs to be ported from PyGTK to PyGI

I am running Ubuntu 20.04 Mate Desktop. I found a cool old screen widget which shows clock, cpu, memory, Wi-Fi strength. It doesn't have any dependency to screenlet package. Though it's very old I ...
  • 4,924
0 votes
0 answers
60 views

Is using call_soon_threadsafe and GLib.idle_add together the correct way to safely call GTK code from asyncio, or is it overkill?

I have an application that runs in an asyncio event loop and I want to add a feature that interacts with my Gnome Shell, in particular sending a notification. Since GTK has its own (incompatible, I ...
  • 141
2 votes
0 answers
950 views

How to install pygobject in python virtual env

I've created a python virtual env and I want to intall gi into it. But it returns this error to me. newtron@newtron:~/Documents/PythonProjects/PyQt/rasp-media$ ./bin/python3 -m pip install PyGObject ...
1 vote
2 answers
5k views

Nautilus gives a warning when opened in the current directory from the terminal [duplicate]

I have referred this link: How to open Nautilus at current command line directory? but ever since I upgraded to 17.10, running nautilus ., when I am already in a particular directory using cd in the ...
  • 1,024
2 votes
0 answers
635 views

How to solve old GLIB error while installing "pygobject" using jhbuild

I am trying to install pygobject using jhbuild. And I am getting this error: configure: error: Package requirements (glib-2.0 >= 2.48.0) were not met: Requested 'glib-2.0 >= 2.48.0' but version ...
  • 21
2 votes
1 answer
213 views

Glade: glib GError when trying to use object attributes [closed]

I'm using Ubuntu 14.10 but with the lubuntu desktop (LXDE) installed manually. I've designed my Python application's UI using Glade. Everything is working fine as long as I don't use attributes (<...
  • 123
1 vote
1 answer
809 views

How update pygobject without breaking any dependency?

I want update the Pygobject of my system from the official repository. The last version on official repository is 3.16.1, but in the official package for Ubuntu is 3.12.0. I tried uninstall this ...
  • 13
2 votes
0 answers
190 views

How can I dynamically add a widget that I can then fetch with a Gtk.Builder instance?

If I want to dynamically add a row to a vbox and populate it... I need a way to see if that row already exists. So the thought train is "Try to fetch the box with builder instance. If it fails, add ...
  • 28.3k
2 votes
0 answers
641 views

Why does Ubuntu's webkit inspector look (and work) just like Safari?

In older Ubuntu, the python-webkit inspector looked like Chrome, as you can see in these screenshots: https://stackoverflow.com/questions/13132459 (It had some annoying bugs, too.) I see Midori's ...
  • 1,310
4 votes
2 answers
223 views

Is there an ubuntu package for pygobject demos?

I know that there is a package for Pygtk demos (sudo apt-get install gtk2.0-examples) but I can't found an equivalent one for PyGObject.
  • 77
1 vote
0 answers
119 views

Recommended way to check/fire alarm in Python (PyGI/PyGTK)

I am learning to develop an application by using Quickly (quickly create ubuntu-application). This application will stay in Application Indicator / Notification Bar and only work when a defined "alarm"...
  • 1,175
1 vote
0 answers
61 views

How can I export a .ui file for a pygi window that I build dynamically?

I understand that building things with the MVC mindset is a good thing. I also understand that if you separate code maintenance and UI, that Glade UI files make it easier for non-programming people ...
  • 28.3k
2 votes
1 answer
5k views

How to change Gtk.Notebook Tabs

There is a way to change the default Gtk.Notebook Tab? I want to realize a flat tab button
  • 145
1 vote
1 answer
557 views

How can I use pygi Webkit on a headless server install?

I have a set of scripts that works on my laptop that works fine as long as I'm booted in to an X session, but if I'm running on a headless server install I get loads of critical fails from Gtk. I'm ...
  • 28.3k
0 votes
1 answer
310 views

Quickly can't package, but raises no errors

I am trying to make a .deb package for my project in quickly. This is what I get: ilya@ilya-laptop:~/Projects/online-translator$ quickly package ...........Ubuntu packaging created in debian/ ...........
  • 391
4 votes
0 answers
372 views

Appindicator Icon Animation

I'm writing a software using pygobject for GTK+3 (Ubuntu 12.04, stable repo package versions for all dev tools) and I'd like my application to have animated AppIndicator icon. It's easy to make GLib....
7 votes
1 answer
1k views

What are the design guidelines for appindicator icons?

I am creating a Unity AppIndicator using Python + PyGObject, but I wish for it's icon to be in standard Ubuntu style. Where can I find appropriate guidelines for using colours (or is it just white/...
  • 391
1 vote
1 answer
211 views

How to get Ubuntu AppIndicator icon coordinates

I'm working on Ubuntu Linux 12.04 and create software built on top of GTK+ 3 using pygobject. I've got a task of showing popup windows just below the app indicator icon of my application and I can't ...
3 votes
1 answer
1k views

How to change menu entries in AppIndicator, when it is running?

There is a similar question at StackOverflow, but it didn't help me: Changing items while running. I tried asking at StackOverflow, but people there where not too active: How to change GTK menu in ...
  • 391
1 vote
2 answers
1k views

pygi how to toggle button without running function

I'm writing this application using quickly. I'm looking for a way to toggle button without running function which is connected to this button. def on_button_text_italic_toggled(self, widget): ...
9 votes
2 answers
3k views

PYGTK to PYGI: gtk.timeout_add equivalent

I have converted some Python code to use PYGI but I can't figure out how to convert this line: gtk.timeout_add(PING_FREQUENCY * 1000, self.doWork) To by clear, since I don't really know the ...
5 votes
1 answer
2k views

Add dependency from ppa to package

I'am building simple dropdown terminal emulator application with PythonGI + GTK+3.0, I am using libkeybinder3.0 and gir1.2-keybinder3.0 packages for global keybinding these packages not available in ...
6 votes
1 answer
7k views

How can I make my own custom desktop widgets?

A simple solution like HTML widgets and a transparent Webkit window would be ideal. I'm trying to make a simple background widget framework such that I can easily customize my desktop with some CSS ...
  • 28.3k
7 votes
3 answers
2k views

What package do I need to install to develop plugins for gedit?

I'm using Ubuntu 12.04 with python 2.7.3 and PyGObject and I'd like to develop plugins for Gedit in python. I found a simple looking tutorial for this sort of thing here. According to the tutorial, I ...
  • 369
6 votes
2 answers
1k views

How to get rid of the background gradient of the inline GtkToolbar?

When you run the below code, it will show an inline toolbar in a window. Notice how the inline toolbar has a stand-out backbround. Is there a way to apply CSS to get rid of it and make blend with ...
  • 9,627
3 votes
2 answers
5k views

Change font programmatically for GTK3 TextView (quickly-widgets TextEditor)

In an app using PyGI and GTK3, I'm trying to let the user set the font family and size in a TextView through my app's settings dialog. In PyGI the TextView object has "set" methods for several ...
  • 3,585
5 votes
2 answers
596 views

How to rename an application while developing with Quickly

I've been developing an application using PyGI and Quickly, and I now need to rename it. Is there any quick way to change all of the app name references in a Quickly application, or will I just need ...
  • 3,585
0 votes
2 answers
591 views

Apply primary-toolbar background behind GtkEntry widget with GTK3

In PyGI (GTK3), how can I make a GtkEntry widget appear against the same background applied (by the user's theme) to the primary toolbar. I tried adding the same style class like this: entry....
  • 3,585
4 votes
1 answer
410 views

PyGObject: Gio.File.copy_async() doesn't exist in Ubuntu 12.04

According to GIO Reference Manual Gio.File has a methode copy_async. In Ubuntu 12.04 I'm getting an AttributeError when I try to call this method. What should I use instead to for asynchronous ...
6 votes
2 answers
932 views

How can I programatically show/hide my app window with global shortcut key?

I'm writing a Notational Velocity clone for Gnome/Ubuntu using Quickly (PyGI) and I want to allow users to set a global shortcut key that will toggle the visibility of the app window when the app is ...
  • 3,585
2 votes
1 answer
878 views

GObject (GTK3) TreeView: how can I activate row programmatically?

I've got a working TreeView with a ListStore as its model and selection set to SINGLE. How do I emit a signal to activate a specific row? I'm using PyGI. (Sorry if this is basic; it's not in the ...
  • 3,585
4 votes
2 answers
2k views

How does a Python DBus session service know the user is logging out?

Say you have a DBus service on the session bus (the per-user bus). Your service might get started via an /etc/xdg/autostart/* file, or it might get started the first time some app tries to use your ...
  • 659
2 votes
1 answer
120 views

Is there a simple way with pygi to make an entire window a drop target for external input?

Example: Drop a file in a glade designed window and it triggers Handler.open_from_path(path)
  • 28.3k
2 votes
0 answers
55 views

How should an OSD be coded with PyGI?

How is an OSD meant to be coded, using pygobject? Is it just an undecorated window that is application-paintable? Please provide all the details that you can (e.g. whether one has to use cairo, ...
  • 536
0 votes
1 answer
140 views

Which packing constant to use for set_child_packing() in Python

I want to change a child of a box's padding; so I am using set_child_packing on the box holding the child. I can't figure out what to use as the constant for for the pack_type. Using PACK_START from ...
  • 165
5 votes
1 answer
6k views

How to draw on mouse click in Gtk.DrawingArea using pygi

I am writing a small application using PyGI which will interactively draw a line on a Gtk.DrawingArea between mouse clicks. But I am unable to figure out how to draw using the cairo context at the ...
  • 53
3 votes
2 answers
1k views

Trying to create a GtkTreeView from Python, doesn't seem to work

I'm writing an app using Gtk/PyGI, and I need to create a sidebar with a Nautilus-like tree. However, Gtk refuses to cooperate with me. I tried both with Glade and GtkBuilder (creating the ...
  • 356
7 votes
1 answer
1k views

How do I add a Notebook to a Box in a VBox?

I have created an empty box in Glade to add a Notebook to. The reason I am not adding the actual Notebook in Glade is because I hear that you cannot add pages to a Notebook made in Glade. So, in ...
  • 2,906
4 votes
1 answer
312 views

Get child elements of a Notebook

I have a Notebook element and TextView elements inside them. Because the pages on the notebook will be constantly switched between. I need to be able to have in a variable the currently selected ...
  • 2,906
5 votes
1 answer
707 views

Why does creating a new tab give me 'TypeError: Expected Gtk.Widget, but got GObjectMeta'?

def on_btn_new_subject_activate(self, widget): self.subjects.append_page(Gtk.TextView(), "Testing") I am trying to create a new tab on a text area but I whenever the signal is called by the event ...
  • 2,906
5 votes
2 answers
3k views

How to dynamically resize GTK notebook pages

I've got a Python app that uses a Gtk.Notebook widget to display different pages. Each of these pages contain a different set of widgets, and I've noticed that the 'tallest' widget in terms of ...
16 votes
5 answers
16k views

How to run asynchronous tasks in Python GObject Introspection apps

I'm writing a Python + GObject app that needs to read a non-trivial amount of data from disk upon start. The data is read synchronously and it takes about 10 seconds to finish the read operation, ...
6 votes
2 answers
13k views

How to programmatically get a list of wireless SSIDs in range from NetworkManager

I'm writing a small little app that I want to submit to the Ubuntu App Review board, and one thing I'd like to do is for it to show the names of the detected Wireless SSIDs in a combo box. It's a PyGI ...
7 votes
1 answer
1k views

How to embed a GtkAboutDialog's content in a GtkNotebook widget

I'm writing a Python app that is tab-based, and I don't want it to have any additional pop-up dialogs. I'd like to use the Gtk.AboutDialog functionality, but I don't want it to appear as a separate ...
5 votes
2 answers
2k views

Porting "import gobject" to use GObject-Introspection. (PyGTK to PyGI and GTK 3)

I've been trying to port a library from PyGTK to use GI and GTK3. The problem is I can't find any resources specific to the gobject imports, but only for GTK. I was hoping that if someone would ...