Questions tagged [pygi]

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

PyGI (Python GObject Introspection) is the replacement for PyGTK, compatible with GTK+3.x and the new GObject-Introspection technology. It allows for tighter integration with GTK+ through introspection instead of bindings, and thus will always support new features and should allow for better code and a better experience for users. It is not yet supported by the GLADE designer.

45 questions
16
votes
5 answers

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, during which time the loading of the UI is…
9
votes
2 answers

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 difference between PYGTK and PYGI, my new code uses from…
7
votes
1 answer

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/transparent?), or at least icons of standard…
Phlya
  • 391
  • 3
  • 15
7
votes
3 answers

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 need the Gedit module to interact with the plugin…
Wes
  • 409
7
votes
1 answer

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 Glade I have created a Box in an empty slot in a…
njallam
  • 3,024
7
votes
1 answer

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 window. Rather, I'd like it to be embedded in one…
6
votes
1 answer

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 widgets and not worry about the separate…
RobotHumans
  • 30,112
6
votes
2 answers

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 regular window color? #!/usr/bin/python3 from…
Dima
  • 9,955
6
votes
2 answers

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 running (something like Tilda does for its…
monotasker
  • 3,695
6
votes
2 answers

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 app. Has anyone got any pointers on how I can…
5
votes
2 answers

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 translate the following for me, I would get a grasp of…
5
votes
1 answer

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 default repository, they had special ppa. I dont…
Özcan Esen
  • 153
  • 3
5
votes
2 answers

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 to do it by hand?
monotasker
  • 3,695
5
votes
1 answer

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 coordinates returned by the mouse click event. How…
csrins
  • 53
  • 1
  • 3
5
votes
1 answer

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 (I click the button), this happens: TypeError:…
njallam
  • 3,024
1
2 3