GIO is striving to provide a modern, easy-to-use VFS API that sits at the right level in the library stack, as well as other generally useful APIs for desktop applications (such as networking and D-Bus support). The goal is to overcome the shortcomings of GnomeVFS and provide an API that is so good that developers prefer it over raw POSIX calls. Among other things that means using GObject.
Questions tagged [gio]
189 questions
4
votes
2 answers
What signals should I catch when scrolling in a Gtk ScrolledWindow?
I'm developing a python plugin for Rhythmbox - this contains a GtkScrolledWindow with a child which is a GtkIconView. The IconView is fed from a Gtk.TreeModel.
It looks like this:
Currently - and somewhat inefficient, every icon is drawn for every…

fossfreedom
- 2,903
- 2
- 19
- 40
4
votes
2 answers
Unicode file I/O with Javascript and gjs?
Can anybody give any working example of how to read/write Unicode text files using Javascript and Gjs, possibly using Gio and/or Glib? I'm experienced in Javascript, but these APIs are still alien to me and being quite new technologies, googling is…

Mehdi
- 1,075
- 1
- 11
- 24
3
votes
1 answer
How to monitor root directory with glib/gio?
I'm trying to do a file monitor on the root file system directory. I use g_file_new_for_path() with / as the path and create the monitor with g_file_monitor(). But at execution no events are reported. If I use the path // events are thrown.
Is is a…

bhuisgen
- 31
- 1
3
votes
1 answer
how to use libxml2 to parse data from GInputStream (GLibGIO/GVFS)?
In a GTK application, I'm using xmlParseFile() from libxml2. However, that function can only read local files. How can I instead make it use the GIO framework, so that it can read remote files as well?
The simplest way is probably to use something…

oliver
- 31
- 1
3
votes
1 answer
How do I listen for a DBus signal in a GTK (python 3, Gio) app?
I'm trying to make my GTK app responsive to network connection state changes. My approach is what I said in the question: Listen on a (NetworkManager) DBus signal.
I have a python3 GTK app (a very minimal one, I should add), using python-gi.
As…

incase1
- 174
- 2
- 4
3
votes
2 answers
Gio.MemoryInputStream does not free memory when closed
Running Python 3.4 on Windows 7, the close function of Gio.MemoryInputStream does not free the memory, as it should. The test code is :
from gi.repository import Gio
import os, psutil
process = psutil.Process(os.getpid())
for i in range (1,10) :
…

Dysmas
- 152
- 11
3
votes
1 answer
Get menu entries of GDBusMenuModel with PyGObject
So because I have the unity-gtk-module installed, all gtk-applications export their menu over the dbus SessionBus. My goal is to extract a list of all available menu entries. I've already implemented this with the help of pydbus, but for some…

encomiastical
- 143
- 13
3
votes
1 answer
spawn async process not working with pkexec
My current gksudo command works with Process.spawn_async_with_pipes. however if I switch gksudo with pkexec it does not show the pkexec window and directly completes the command without the prompt and returns nothing.
When I use…

Siddhartha Das
- 251
- 1
- 8
3
votes
3 answers
How to get paths for relocatable schemas in Gio.Settings?
In Gio.Settings I can list relocatable schemas using
Gio.Settings.list_relocatable_schemas()
and I can use
Gio.Settings.new_with_path(schema_id, path)
to get a Gio.Settings instance. But how can I get all value for path that are currently used for…

Florian Diesch
- 1,025
- 10
- 16
3
votes
1 answer
Registering an Object on DBus using pythons Gio-Bindings
I'm working on a Python-Clone of an existing C-Project. The C-Project Connects to a custom DBus and offers a Object there for getting Callbacks.
I tried to replicate this using Python with code that basically boils down to:
def…

Peter Körner
- 101
- 8
3
votes
1 answer
CULLong-type constructor not visible when installing pango and GIO with cabal on Windows
I'm trying to install Threadscope on Windows 8 in order to follow along the Parallel and Concurrent Programming in Haskell –book.
I successfully installed the GTK+ –bundle and subsequently tried installing threadscope through cabal. The installation…

funky_vodka
- 31
- 2
3
votes
4 answers
Watching sockets with Glib on Windows puts them in non-blocking mode
The following code does not work correctly on Windows (but does on Linux):
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.setblocking(True)
sock.connect(address)
gobject.io_add_watch(
sock.fileno(),
…

Matt Joiner
- 112,946
- 110
- 377
- 526
3
votes
2 answers
How do I create a Gtk Iconview with a custom CellRendererText
I'm investigating how to create in Python (2.7 or above) a GtkIconView that has a custom CellRendererText for the text element of the IconView.
The reason for this, is that I need to override certain properties during the iconview creation.
Looking…

fossfreedom
- 2,903
- 2
- 19
- 40
2
votes
2 answers
g_file_new_for_path () causes segmentation fault
// gcc -o 0 $(pkg-config --cflags --libs gtk+-2.0) 1.c
#include
int main (int argc, char *argv[]) {
GFile *f1 = NULL;
f1 = g_file_new_for_path ("/home/user/1.txt");
g_printf ("File loaded successfully.\n");
return…

5frame
- 101
- 1
- 8
2
votes
0 answers
Update system wide gsettings proxy settings on Ubuntu
Is there a way to get/set system wide gsettings? I'm trying to get/set proxy settings from a C++ program which is owned by root.
Currently within my program I'm making system calls to the following:
gsettings set org.gnome.system.proxy mode…

anshah
- 105
- 9