gtk

How to disable GTK Drag'n Drop ?

How to complete disable Drag'n Drop from a GtkEntry ? ...

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...

gtk: set cellrenderertext foreground color when a row is highlighted

When I have a gtk.CellRendererText, I can associate its foreground color with one of the tree store's columns, and set the foreground-set attribute to True, to change the color of the text in that column. However, when the row with the colored column is selected, its color disappears, and is the same as any selected cell's color. How do ...

Choosing a Perl GUI Module for maximum cross platform usage

I'm working on a couple of personal project to improve my Perl skills. Among other things they need to provide a GUI interface on different OSes. In the past what little GUI work I did on Perl used TK (and that was just working through some sample projects). I know that beyond TK, Qt and GTK are also options. Are there others? Among...

Get window position relative to the workspace it's placed on in PyGtk

Hi, I'm trying to improve minimize to tray feature of some application and I want to show window on tray icon click if it was minimized to tray or placed not on the current workspace. I encountered the problem that occurs when I try to show (un-minimize) the app's window that's visible on the workspace (let's say 'workspace 1') other th...

Preventing terminal window from popping up when launching program

Hi. I am compiling this program on Windows, with gcc (MinGW) and GTK+: #include <gtk/gtk.h> void *destroy(GtkWidget *widget, gpointer data) { gtk_main_quit(); } int main(int argc, char *argv[]) { // Initalize GTK+ gtk_init(&argc, &argv); // Create GTK+ window GtkWidget *window = gtk_window_new(GTK_WINDOW_TOPLEVEL...

Drawing areas and expose events.

I have a dialogue which contains a drawing area. I wish to redraw the contents of the drawing area if the dialogue is enlarged or shrunk or buried and exposed, as is normal and natural with drawing areas. To this end, I created a method bool on_expose_event (GdkEventExpose *event); in the class. But the presence of this event stops a...

Comparison of GUI developing tools for linux

Hi All, I am fairly new in the domain of GUI designing and development. I do have some prior experience but that is with Visual Basic. I would like to develop a reasonably comprehensive (though not state-of-the-art) GUI application on linux based on a command line app. that I have. Having done some googling, I do find that there a...

Ocaml lablgtk2 custom widget?

Hi everyone. I've been learning Ocaml with lablgtk2 for a while and still searching for a tutorial in which describe a way to create a custom widget (I want to make this widget as a circle filled with color and some text in the center). And this custom widget can be set ~width, ~height, ~label, ~packing,... to another container (as anoth...

Drawing a temporary 'select' rectangle on a drawing area.

I have a complex drawing on a Gtk DrawingArea widget and I wish to provide the user with a way to select a rectangle on it to expand for a closer view. I have managed to get the necessary mouse button events sorted out so that the rectangle can be selected, but it would be desirable to have the actual rectangle drawn on the display, movi...

Zooming at mouse position without messing up scrollbars?

I'm creating an image editing program in GTK\C, and I can't figure out how to make zoom work; I need to zoom my Cairo-based canvas to the mouse cursor's position, but Cairo only zooms to center of the image it displays. The normal way to get around this is to transform, zoom, and then transform back; but that messes up the scrollbars sur...

Can I install gtk on xcode?

Hey there! I've been doing PHP for a long time now and I'd like to make some desktop applications on my Mac. I've never used C before but I installed xcode and I could do some basic things with some terminal apps. I'd like to make an application with a GUI. I don't know how to add libraries or frameworks in xcode though and I don't kno...

GUIs vs TUIs in Python

I'm interested in doing rapid app development in Python. Since this is mainly for prototyping purposes, I'm looking for a way of creating "rough" user interfaces. By this, I mean that they don't have to look professional, they just have to be flexible enough to make it look the way I want. Originally I was going to do this by creating a ...

re-draw a gtk.Widget (GtkFixed)

hi! I've a GtkFixed area with any widgets into. I want to change coordinates of any components when the user press any button. How can I force to "repaint" de fixed area? I tested "fixed.queue_draw()" but doesn't working (seems) I'm using gkt in Python. (PyGTK) ...

Python GTK/threading/sockets error

I'm trying to build a Python application using pyGTK, treads, and sockets. I'm having this weird error, but given all the modules involved, I'm not entirely sure where the error is. I did a little debugging with some print statements to narrow things down a bit and I think the error is somewhere in this snippet of code: self.sock = ...

GTK theme engine: where to start?

I would like to start coding a gtk theme engine, but i'm wondering where i can find some documentation, if any exists. I know how to have look at someone else engine's code, examples, or torture tests and widget factories etc.., what i want instead is any documentation type, design, references, examples or tutorials possibly from reliabl...

How do I include an image in a window with pygtk?

Hello there. I'm trying to make a program in python which creates a fullscreen window and includes an image, but I don't really know how to do that. I've tried to read documentations on pygtk and I've searched in both goodle and stackoverflow, without any success. Here's my current code. def __init__(self): pixbuf = gtk.gdk.pixbuf_n...

Need help writing "backgroundless" widget for wxWidgets (wxGTK) using GTK2

Hi there. My question is concerned with GTK2 and wxWidgets (actually wxGTK). In wxGTK all controls have grey background by default and it is impossible to remove it. I have a textured panel with custom child controls and each of my controls has an ugly grey border which I can't remove. I can only set some background color and make the ...

Gdk.Pixbuf memory leak in Vala, or something else ?

Hi folks, here is a simple question. Can you help me find the memory leak in this Vala code ? If it helps I can post the generated c code too ^^ using GLib; using Gtk; using Gee; void test1 () { Gee.ArrayList<Gdk.Pixbuf> list = new Gee.ArrayList<Gdk.Pixbuf>(); for( int a = 0; a < 10000; a++) { string path = "/usr...

PyGTK - polling GTK table for locations of widgets

I'm working on a Python application involving the use of a GTK table. The application requires that widgets of various sizes be added to a table dynamically. Because of this, I need to be able to ask the table what cells are in use (more accurately, NOT in use) so that I know where I can place a new widget without overlapping. Based...