gtk+

How to set text editable in GtkEntry

Hi Guys, Pretty straight foward question, I have a GtkEntry widget that i want to set to be editable. I know the function i should use is: gtk_editable_set_editable But i dont know how to make it take a GtkEntry widget as an arguement Can anyone help me? Regards Paul UPDATE: Ok, so here is the code im using: GtkWidget *TextEnt...

GtkComboBox related qusestion.

Hello, How to set GtkComboBox default selectio? How to Adjust X, Y location of Drop Down menu of GtkComboBox? I want to display Drop Down menu at the lower edge of GtkComoBox. Also I want to set text color of Selected text in combo box to white. Thank, PP. ...

GTK+ and GdkPixbuf

Hi all, I think I've got an understanding problem of GTK. My simple application has a stream of images and I'd like to display them within my GTK Window. Up to now, it looks like this: GdkPixbuf *pb = gdk_pixbuf_new_from_data(img2, GDK_COLORSPACE_RGB, FALSE, 24/3, 320, 240, 320*3, NULL, NULL);...

Can g_time_out add be given a member function of a class?

The question is simply in the title, if I have a function I want to use via a g_timeout_add(), but this function is a class member function, is there any way I can use it with g_timeout_add()? ...

Gtk, Does deleting builder pointer deletes all the Widgets created using it.

I am creating builder pointer as follows. GtkBuilder *builder_ptr; builder_ptr = gtk_builder_new(); if( ! gtk_builder_add_from_file(builder_ptr, "Test.glade", &error ) ) printf("\n Error Builder, Exit!\n"); and i am deleting this builder pointer as follows: g_object_unref(G_OBJECT(m_builder)); this builder pointer contains 2-3 ...

Using `g_object_set_data` for passing user name.

I am using g_object_set_data to set user name with event_box so in call back i can get it with in event_box pointer. g_object_set_data(G_OBJECT(event_box), "user_name", (gpointer)(user_name) ); but problem is that i am setting user_name which is not an pointer allocated string. It is an local string (not allocated on hip) which gets d...

Unable to access any widgets in an window.

I have one GtkWindow with one GtkVBox and GtkEntry. Some times it happens that i am unable to access buttons Buttons, lists, entries. But i am able to add widgets to GtkVBox and it gets updated with new widgets too. Looks like it loses Focus. i tries with setting focus but it does not helps. What might be wrong. ...

Change the label of GtkButton

I want to be able to change the label of a GtkButton after the widget has been shown char *ButtonStance == "Connect"; GtkWidget *EntryButton = gtk_button_new_with_label(ButtonStance); gtk_box_pack_start(GTK_BOX(ButtonVbox), EntryButton, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(TopVbox), ButtonVbox, TRUE, TRUE, 0); gtk_widget_show_a...

Difficulty of making Space Invaders in GTK+?

What are the difficulties of making Space Invaders using GTK+ (latest stable) in C? I did it once in high school with Visual Basic so I figured it wouldn't be that hard with GTK, but now I'm confused on even where to get started? Can someone point me in the right directly, perhaps like how to put 1 alien on the screen and have it go ba...

trouble setting up TreeViews in pygtk

I've got some code in a class that extends gtk.TreeView, and this is the init method. I want to create a tree view that has 3 columns. A toggle button, a label, and a drop down box that the user can type stuff into. The code below works, except that the toggle button doesn't react to mouse clicks and the label and the ComboEntry aren't d...

Inserting newlines into a GtkTextView widget (GTK+ programming)

I've got a button which when clicked copies and appends the text from a GtkEntry widget into a GtkTextView widget. (This code is a modified version of an example found in the "The Text View Widget" chapter of Foundations of GTK+ Development.) I'm looking to insert a newline character before the text which gets copied and appended, such ...

converting an array of characters to a const gchar*

I've got an array of characters which contains a string: char buf[MAXBUFLEN]; buf[0] = 'f'; buf[1] = 'o'; buf[2] = 'o'; buf[3] = '\0'; I'm looking to pass this string as an argument to the gtk_text_buffer_insert function in order to insert it into a GtkTextBuffer. What I can't figure out is how to convert it to a const gchar *, which ...

Gtk+ vs Qt language bindings

Put shortly: For those familiar with language bindings in Qt and Gtk+. E.g. python and ruby. Are there any quality or capability difference? More background: I know C++ and Qt very well. Minimal experience with Gtk+. I know C++ is not ideal for language bindings due to the lack of a well defined ABI (application binary interface). I als...

MVC in Qt vs Gtk+

I am a Qt C++ programmer with some interest in Gtk+. I wonder how Gtk+ has implemented Model-View-Controller. In Qt they basically screwed it up, and have basically admitted that themselves. I can try to explain the flaws in Qt and for those who know Gtk+ perhaps you can answer whether Gtk+ has the same or worse problems: Access to any ...

update table in gtk

I have window that contains a table on screen, now I want to attach a widget to that table I use gtk_table_attach(GTK_TABLE(table), label, ...) the function is correct and it runs without any error but table does not respond to that line I mean there is no change on my table, I think I need something to tell that table update it self...

GNU/Emacs for gtk+ programming

Hello, I want to start C/gtk+ programming in GNU/Emacs. Where can i find manual, how to configure GNU/Emacs for C and gtk+ programming. I want to make GNU/Emacs IDE for gtk+ programming Thank you. ...

What's up with GTK+ windows having so many memory leaks according to Valgrind?

Whenever I load any GTK+-powered application in valgrind, it reports a lot of memory leaks. What's up with that? Is GTK+ buggy? ...

Where is a good place for a code review?

Hi, all! A few colleagues and I created a simple packet capturing application based on libpcap, GTK+ and sqlite as a project for a Networks Engineering course at our university. While it (mostly) works, I am trying to improve my programming skills and would appreciate it if members of the community could look at what we've put together....

Compiling simple gtk+ application

Hello, I try to compile simple gtk+ application in Anjuta IDE. Application is a simple window: # include <gtk/gtk.h> int main( int argc, char *argv[]) { GtkWidget *label; GtkWidget *window; gtk_init(&argc, &argv); window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(window), "Здравству...

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