gtk+

Python GTK+ widget name

How do I get a widget's "name"? When I define a GUI using Glade, I can "name" the widgets of the window but how do I recover that property when I have a widget object instance? I've tried get_property(), get_name() and $widget.name to no avail. Update: I am using GtkBuilder file format (i.e. XML format). Resolution: a fix I have used...

Transparent X11 Cursor Theme - Why does the X cursor appear in GTK+ subwindows?

Hi, I am using the transparent cursor theme trick (see http://obiltschnig.com/2010/08/14/hiding-the-gtkx11-mouse-cursor/) to hide the X11 cursor in a fullscreen Linux GTK+ application for a touchscreen-based device. I am basically running a WebKit GTK+-based application using the Xorg server with no window manager in fullscreen mode. No...

Format of activate_time in Gtk.Menu

What is the format of the parameter activate_time in Python GTK+ when using Gtk.Menu.popup() method? I have tried using int(time.time()) but I get a traceback saying an integer is required... ...

Can't scroll to the end of TreeView PyGTK / GTK

When I try to scroll down to the end of my TreeView, which is inside a ScrolledWindow, it doesn't scroll where it should but one or two lines before. I tried several methods and they all provide the same behavior : self.wTree.get_widget("tree_last_log").scroll_to_cell((self.number_results-1,)) # or self.wTree.get_widget("tree_last_log...

gtk: label which goes multi-line instead of expanding horizontally

I have a VBox which looks like this: ImportantWidget HSeparator Label I want this window to be only as wide as ImportantWidget needs to be, and no wider. However, the Label can sometimes grow to be very long. I want the following logic: if Label can fit all its text without expanding the VBox horizontally (after it has grown eno...

Align a GtkLabel relative to a GtkDrawingArea

I have a GtkLabel and a GtkDrawingArea within a VBox, I want to center the label relative to a X-coordinate of the GtkDrawingArea (which is below of the label in the VBox), how can I tell GTK to center that label relative to that "anchor" point ? This point should be the center of the label. ...

gtkmm statusicon quits after creation

Hi, I have to create a simple application that displays an icon in the systray and a menu from which you can do some operations. the problem is that statusicon is closed immediately after creation. What's missing? I put the sleep to make sure it was created. for 3 seconds something appears in systray, even if it is not the icon that I se...

gtk idle_add not running?

I have a two-thread application: GUI, and some background work. I'm trying to send requests to the main thread to do GUI updates (move a progress bar), but it doesn't seem to work. I've boiled it down to a really minimal example: import pygtk pygtk.require('2.0') import glib import gtk import threading import sys import time def idle(...

displaying tiled map in Gtk+ app

Hi I am about to embark on a project that will involve a GUI application that will need to display a map interface, generated from a global map tile cache (on local disk) at different levels of zoom. The app will be written using Gtk, and while I am fairly familiar with the basic Gtk widgets, I am unsure how to approach the map interfa...

system modal dialog in GTK

Hi Experts, I am trying to create GtkDialog with system wide Modal property i.e. when the dialog is opened no other window should get focus. There is an option for making it modal using GtkDialogFlag but that is not system wide modal. Please I need your help urgently. Kind Regards, -Durgesh O Mishra ...

c++ gtk open multiple window

I'm still working on the example at this link: http://stackoverflow.com/questions/3547548/gtkmm-statusicon-quits-after-creation I changed the function in this way to open the traybar different windows, but does not show anything. void Tray::on_statusicon_popup(guint button, guint activate_time) { printf("popup!\n"); Gtk::Window ...

compilation error in webkit-gtk

I am getting following error while compiling webkit-gtk for directfb, any guess how to resolve it? make[1]: Entering directory `/home/sunny/svn/iSense-E/trunk/stable/thirdp/src/webkit-1.2.0/WebKitBuild/Release' /bin/mkdir -p ./.deps/DerivedSources CC WebKitTools/GtkBonker/Programs_GtkBonker-GtkBonker.o CXX WebKitTools/DumpRen...

How to grab 'key-press-event' when the window is not focused?

Hi, I am writing a program using gtk. What the program does is monitor the keystroke the user entered and play a sound. My question is that how do I catch the key-press-event when the window is not focused? I'm planning to let my program stay in tray icon, so I wonder how I can grab any key-press-event from there. Thanks Edit: I finally...

parsing an online document (xml file) in gtk

how do i parse an online document (xml file) in gtk, for example the url : http://www.w3schools.com/XML/note.xml contains the xml file. ...

gtk+-2.0, glade

hi, I am new in the filed of gtk+ programming. I have glade-2.6 installed on my linux system. When i try to build my gui it gives 2 options- C and LibGlade. However for libglade it says that it is deprecated and that i should use intltool instead. What does it mean and why is LibGlade deprecated? ...

Why can I not compile GTK+ using MinGW?

Help me Stackoverflow! So, I feel that I have set up my environment correctly but I cannot build my program! #include <cstdlib> #include <stdio.h> #include <stdlib.h> #include <gtk/gtk.h> using namespace std; /* * simple gtk application * author jan bodnar * date february 17, 2008 */ int main(int argc, char** argv) { GtkWidget *win...

How do you make sub-widgets of gtk custom widgets editable in Glade?

Hi, I'm making custom Gtk+ widgets (in C) for work and one of the requirements is that those widgets have to be editable in Glade. So far it works nicely, I have for example a widget made of a table with buttons in it and with a custom specific behaviour and some custom specific properties that can be edited in Glade correctly. So thi...

Gtk+ and OpenGL bindings

Simple and short: What is the most advanced OpenGL binding for GTK+? I would prefer a widget which allows me to use it similar to QGLWidget. Note: I stumbled upon gtkglext, gtkglarea and clutter. I read the first two have shortcomings/ serious issues. ...

A "better" way of resizing GtkTreeViewColumns... but how do I do it?

I'm trying to create GtkTreeViewColumn resizing functionality like how it is in Thunderbird. Key word here is "trying". So far I haven't succeeded. The easiest way to understand how this resizing works is to fire up Thunderbird and play with resizing the columns yourself, but basically the way it works in Thunderbird is if you drag, say...

Textbox with a label in a GTK+ program

Hello, I am new to GTK+ programming.I wrote a simple GTK+ program where i display a label and a textbox in a window, the label should be to the left of the textbox and i should be able to specify the horizontal length of the textbox. Below is my code so far,the program runs fine but im unable to align the label to the left of the textbo...