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

learn more… | top users | synonyms

2
votes
0answers
41 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 ...
1
vote
0answers
177 views

python 3.4 import error on gi._gi [closed]

in python 3.4 I get ImportError: No module named 'gi._gi' after trying from gi.repository import Gtk Though I did sudo apt-get install python3-gi previously from terminal. Does anyone know how to ...
2
votes
0answers
171 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: http://stackoverflow.com/questions/13132459 (It had some annoying bugs, too.) I see Midori's ...
2
votes
2answers
43 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.
1
vote
0answers
55 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 ...
1
vote
0answers
30 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 ...
0
votes
1answer
843 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
1
vote
1answer
136 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 ...
0
votes
1answer
103 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/ ...
3
votes
0answers
125 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 ...
6
votes
1answer
478 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 ...
1
vote
1answer
97 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 ...
2
votes
1answer
433 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 ...
1
vote
0answers
739 views

Update manager gone, __init__.py error in terminal (solved) [closed]

When attempting to open the update-manager from the gui, nothing appears. When attempting it from the terminal, i am getting a weird error i have never seen before. I have reinstalled the ...
0
votes
2answers
290 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): ...
6
votes
2answers
901 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 ...
3
votes
1answer
439 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 ...
5
votes
1answer
1k 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 ...
1
vote
0answers
249 views

Keybindings for individual letter keys (not modifier-combinations) on a GtkTextView widget (Gtk3 and PyGI)

I've been able to set several keybord shortcuts for a GtkTextView and a GtkTextEntry using the new css provider system. I'm finding, though, that I only seem to be able to establish keybindings for ...
6
votes
3answers
822 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 ...
5
votes
2answers
711 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 ...
1
vote
2answers
960 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 ...
5
votes
2answers
185 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 ...
0
votes
2answers
341 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: ...
2
votes
1answer
227 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 ...
3
votes
2answers
340 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 ...
1
vote
1answer
345 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
votes
2answers
581 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 ...
2
votes
1answer
89 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)
2
votes
0answers
39 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, ...
0
votes
1answer
101 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 ...
2
votes
1answer
3k 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 ...
2
votes
2answers
661 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 ...
7
votes
1answer
519 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 ...
3
votes
1answer
153 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 ...
5
votes
1answer
375 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 ...
5
votes
2answers
1k 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 ...
14
votes
5answers
8k 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
2answers
5k 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
1answer
533 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
2answers
1k 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 ...