gtk

GTK window motion animation?

I want to move my GTK_WINDOW across the screen automatically. Currently I have it in a draw/move loop, but that's terribly choppy. I'm very new to GTK programming (and gui programming in general). What am I missing? ...

Linux / C / GTK+ Set GtkTextView background to the default window colour

I want to set the GtkTexetView background colour to the window's default colour so that it looks like a GtkLabel. Take a look at these images, but please note that I want it for C and not PHP, and I use GNOME, not MS Windows. ...

higher level Python GUI toolkit, e.g. pass dict for TreeView/Grid

Started my first Python pet project using PyGTK. Though it is a really powerful GUI toolkit and looks excellent, I have some pet peeves. So I thought about transitioning to something else, as it's not yet too extensive. Had a look around on SO and python documentation, but didn't get a good overview. What's nice about PyGTK: Glade fil...

Creating columns with editable cells in Gtk treeview using Glade

I am trying to create a simple GUI with table containing x and y coordinates of samples. I use treeview, and I want the cells of the table to be editable by user. Is it possible to specify if the cells should be editable directly in Glade in cellrenderer properties, or do I have to specify it in my code? I use Glade 3.6.1 I have just fo...

gtk drawing set background image

I have a drawing area, and an 'png' image I want to load that image to my drawing area as background. the screen is bigger then my image and the problem is it does not 'tile' my image I have tried adding image as pixbuf and pixmap but it doesnot help i use this line gc.set_tile(pixmap) area.window.draw_drawable(gc, pimap, .....) bu...

Line wrapping in GtkCheckButton or GtkRadioButton labels

Is there any way to get the label of a GtkCheckButton or GtkRadioButton to wrap when its parent container is resized small enough so the label won't fit on one line? ...

Filtering treeview content recursively

Hi I have GUI application with gtk.Treeview component. It's model is set to gtk.Treestore, which I fill with a hierarchical structure. Everything is working fine - the treeview is what I expect it to be. Now I'd like to filter the leaf nodes to contain only a given string. I tried creating model filter like this: self.modelfilter = ...

How to transform a key pressed into a different one in pygtk

I'm trying to make my pygtk application behave the way openoffice calc does, regarding the decimal point. This means that when receiving a KP_Decimal key (the dot in the keypad) I want my entries to show whatever the decimal point is in the current locale (dot or comma, appropriately). I've searched for a long while now, and I haven't ...

missing locale_t

Installing gtk 1.2 (package name gtk1) with macports chokes on the final make, in libintl.h line 440. extern locale_t libintl_newlocale (junk, stuff, stuff) The compiler can't find locale_t, and I'm not doing any better. The file imports locale.h, which doesn't exist, and xlocale.h, which doesn't define this type. Where should loca...

Enable GtkFileChooserDialog to select files OR folders

Using GTK+'s GtkFileChooserDialog, how can I allow the user to select a file or a folder (both are valid here). The actions available are mutually exclusive. ...

Compile GTK+ with Cygwin

I have created an application in linux with GTK2 as GUI. It uses some linux-specific headers (e.g. arpa/inet.h) so to run under Windows I have to compile it with Cygwin. I downloaded the latest installer and choose to install GTK2 and its dependencies. My program compiled fine. But it needs X server to be running! I has old-style, ugly g...

How to send a post request to a Gtk WebView?

This is basically what I've got. var webview = new WebKit.WebView(); content_area.Add(webview); var request = new NetworkRequest("http://example.com/resources/1"); request.Data.Add("description", "a description"); webview.LoadRequest(request); I'm assuming request.Data is where I put variables, but it seems to be going through as a GE...

How to keep a GTK NodeView file browser up to date?

I'm using a TreeNode subclasses in a NodeStore and recursing through the filesystem to be presented in a NodeView. public void update(){ if(project.LocalCopyExists()){ Clear(); readDirectory(project.LocalPath, null); } } void readDirectory (string parent, SourceFileHelper parentHelper...

PyGTK Window not hiding when told to

In my PyGTK application, I am asking a user to find a file so that operations can be performed on it. The application asks the user for the file, and relays that filename to the necessary methods. Unfortunately, when calling the gtk.dispose() method on that dialog, it just hangs there until the method being called upon to perform the f...

Eclipse look&feel configuration in Ubuntu Linux

Hi, I've got problem with look of freshly installed Eclipse in my Ubuntu 10.04. The toolbars and tabs are just too wide, there's lot of empty space above and below text or images on them, so I wish to make them narrower. Fast look in google didn't give the answer how to configure it, so I hope someone has dealt with it. This is same ...

why does my pygtk application crash when copying text on a clipboard?

Hi all, I'm writing a python application using pygtk. I have a main thread who occasionally calls another thread that is supposed to build a string and then copy it on the clipboard before dying. My "slave" thread looks pretty much like this: class Slave(threading.Thread): def run(self): s = build_string() c = gtk.Cl...

How to do Gtk TextIter arithmetic.

I am attempting to use Gtk TextIter objects to lift three-character slices out of a TextBuffer, but am having trouble with the arithmetic. I set up an iterator p to point to the start of the range and want q to point to three characters further on. I have tried... q = p + 3; // Doesn't compile q = p; q += 3; // Do...

Getting coords from Goocanvas::Points

I'm attempting to get the coordinates from an instance of Goocanvas::Points in goocanvasmm. I have this: double x = 0, y = 0; int i; Goocanvas::Points points; Glib::RefPtr<Goocanvas::Item> root = canvaswidget.get_root_item(); Glib::RefPtr<Goocanvas::Polyline> line = Goocanvas::Polyline::create(100, 100, 110, 120); root->add_child(line);...

Help Needed to display stack of cards using GTK!

Hey Guys, I am building a cards game which displays a stack of Cards( Some thing like Solitaire). I was wondering you give me some advise regarding it? Also if you could direct me to a tutorial for stuff like these( I am already going through the gtk doc). ...

Get text from a GtkEntry

I'm getting a segmentation fault trying to compile the following code. My question is, Is this the correct way to get text from a GtkEntry?. If it is, Why am I getting the segmentation fault?. If it´s not, What´s the correct way to retrieve text from a GtkEntry?. void dialogoIngresarDados(GtkWidget *window){ GtkWidget *dialog; GtkWidget...