gtk

Need help/guidance about creating a desktop application with gui

I'm planning to do an Desktop application using Python, to learn some Desktop concepts. I'm going to use GTK or Qt, I still haven't decided which one. Fact is: I would like to create an application with the possibility to be called from command line, AND using a GUI. So it would be useful for cmd fans, and GUI users as well. It would b...

Free object/widget in GTK?

I've got a pack box in my GTK application and I'm replacing it every once in a while with a completely new entry (at least for now cause I'm in a hurry). Since I'm replacing it with a new instance, do I need to explicitly free from memory the old pack box contents or is there some garbage collection in GTK? If I do need to explicitly n...

add gtk.widget in a gnome Applet

Hi, I have a question : I write a little gnome applet, and when we click on a button i want to add a gtk.widget under the "gnome-panel" like the calendar of the clock-applet. But I don't know how to do this. It's my code : listButton = gtk.Button(_("lastest")) self.listTwitt = gtk.TreeView() mainLayout = gtk.VBox() mainLayout.pack_s...

Setting opacity on a PyGTK label

Is there a way to make a PyGTK widget partly transparent, so that the widgets behind it can be seen through it? Specifically I'm trying to do this on a label, for typographic effect; I don't want to change the color instead, as it may not look right on all themes. ...

Remove GtkButton's image padding (inner-border)?

In C/GTK, is there a way to remove the inner-border for a GtkButton that has an image using gtk_button_set_image? gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE); sort of did the job but a mouseover showed that it merely hides it. I would prefer to do this without using an RC style, but if there's no other way, an example ...

Remove button box

I'm writing an application in C and I've a GtkLinkButton that contains a GtkStockItem. How can I remove the button box that appears when mouse pointer is on and when I click it? EDIT Thanks very much, but it doesn't work. This is the output: "Gtk-WARNING **: filed to set text from markup due to error parsing markup: Unknow tag 'a' o...

[Linux] Coding a GTK+ application without window manager?

Hi, I want to code sth. that basically works like TiVo. Switch it on, you only see the menu or an output, so no underlying OS or anything else is directly visible to the user. So I want to use Linux as base. Can you suggest a good base distribution? Can I code a frontend without having a window-manager up and running? If yes, is tha...

Ellipse object in GDK

In GDK there's an object called GdkRectangle that is used to draw rectangles. Is there a similar object for ellipses? ...

GtkImageView sample of code

Hello, I want to use GtkImageView in my application, but i can't find some examples of code with using gtkimageview anywhere. Where can i see the sample? Thank you. ...

Does GdkRectangle have an activate event?

I want to make a GdkRectangle clickable so that I can select it and get a dot in every corner of the rectangle, implying that the user can move or resize the rectangle. Is there an event that triggers when a GdkRectangle is clicked? What's the syntax of the accompanying g_signal_connect command? ...

List available languages for PyGTK UI strings

I'm cleaning up some localisation and translation settings in our PyGTK application. The app is only intended to be used under GNU/Linux systems. One of the features we want is for users to select the language used for the applications (some prefer their native language, some prefer English for consistency, some like French because it so...

drawing above gtkentry using cairo

Hi Experts, I want to use cairo to enhance gtkentry look. For this, I have connected a callback to 'expose-event'. In callback, I call gtkentry's original expose-event handler. After that, I create cairo context and draw some lines and destroy the cairo. I return 'TRUE' as return value of callback function so that expose-event does not...

The best ide for gtk+ programming

Hello, Recently i start to studying C/gtk+ programming. And want to ask one question: how do you think, what is the best ide for C/gtk+ development? Thank you. ...

How do I get a GtkTreePath or GtkTreeIter to the last row in a GtkTreeModel?

I want to get a GtkTreePath or GtkTreeIter to the last row in a GtkTreeModel, but GtkTreeModel does not have a function for that. I'll be happy with answers and examples in either C, or Python, or both ;). ...

Update multiple progress bar with gtk c++

I need to output the i progress bars and update them all. But only the last one updates i times. This is the code: static void calculaPi (GtkButton * boton, Datos * dDatos){ const char * threads; GtkWidget * barra, *bot2, *button, *progress, *vbox; threads = gtk_entry_get_text(GTK_ENTRY(dDatos->dthreads )); gint ithread...

Resizing a drawing area in GTK

My application performs a 90 degree rotation on a drawing area, so the width and height of the drawing area need to be swapped. How can I resize the drawing area with GTK in a way so that the new width and height are actually enforced, not just requested? ...

Sending data in a GTK Callback

How can I send data through a GTK callback? I've Googled, and with the information I found created this: #include <gtk/gtk.h> #include <stdio.h> void button_clicked( GtkWidget *widget, GdkEvent *event, gchar *data); int main( int argc, char *argv[]){ GtkWidget *window; GtkWidget *button; gtk_init (&argc, &argv); wi...

GtkUIManager examples

Hello, I need to take GtkUianager screw, rushed, and no normal addicts. The official website for gnome docs only description of the functions, but a full example in particular to the creation of toolbar with GtkUimanger can not find: ( Please,tell my where I can see the examples. Thank you. ...

Ruby GTK fails without display (Python is OK)

it seems that Ruby GTK apps are unable to run in nongraphical environment.. while python apps are able to. oversimplified examples (even without the gtk main loop), demonstrating this behavior: gtktest.py: #! /usr/bin/python import gtk print('the end') gtktest.rb: #! /usr/bin/ruby require "gtk2" puts('the end') X window environme...

Cairo "Could not find libpng in the pkg-config search path"

I'm trying to install GTK-DFB and cairo is a requirement. When I try to build it from source, it throws: checking for cairo's PNG functions feature... configure: WARNING: Could not find libpng in the pkg-config search path checking whether cairo's PNG functions feature could be enabled... no configure: error: recommended PNG functions ...