gtk+

How do I create multiple but independent modal dialogs in GTK+?

I have the following code that uses GTK+ widget toolkit to display a window with a button. Clicking this button will show a modal dialog. Note that the call to gtk_dialog_run will recursively start another instance of the main loop, i.e. the on_click function will not return until the dialog box is dismissed. I would like to have two of...

Python GTK+: create custom signals?

Is it possible to create new signals in Python GTK+ ? I'd like a skeleton code example, please. ...

Gtk_entry mouse click signal

Hi, I want to do a g_signal_connect to capture a mouse click in a gtk_entry widget. Something like this: entry = gtk_entry_new ( ); gtk_box_pack_end ( GTK_BOX ( hBox ), entry, TRUE, TRUE, 1 ); gtk_widget_show ( entry ); // This is the one I'm not sure about g_signal_connect ( GTK_OBJECT ( entry ), "????????????", GTK_SIGNAL_FUNC ( E...

Access to widget in GTK+

Building a GTK+ widget dynamically from code allows for easy access to the child widgets directly. Now, how do I access to the child widgets when building a GTK+ Dialog (as example) from a .glade file? class ConfigDialog(object): def __init__(self, glade_file, testing=False): self.testing=testing builder = gtk.Build...

Connecting signals in GTK+: anonymous way?

After reading "Using your signals" I am wondering if it is possible to connect the signals to "sinks" in an "anonymous" way? In order words, if the example following (snippet from reference above): aCar = Car() aCar.connect('engine-started', myCallback) Is it possible just to connect myCallback to all the signal engine-started sourc...

How do you find the absolute position of a GTK widget in a window?

I can use GTK "allocation" function, but that only gives the position relative to its parent. How does one find the absolute position of a GTK widget inside of a window? Ie, if the widget appears 500 pixels in, and 300 pixels down, but is nested inside various hboxes and tables, how do we find out it is in a 500x300 pixel position? I ...

GTK+ widget state not updated?

In my application I'm trying to use GTK rc file to style the widgets: style "boxstyle1" { bg[ACTIVE] = { 0.0, 1.0, 0.0 } bg[NORMAL] = { 1.0, 0.0, 0.0 } bg[PRELIGHT] = { 0.0, 0.0, 1.0 } } widget "*.eventbox1" style "boxstyle1" while the normal color is taken but the other states not. anyone experienced with this problem? ...

C++, GTK+, and String types

Excuse my ignorance here but I know neither C++ nor GTK+. Which String type is used when setting Strings in GTK+ widgets? In .NET, Strings passed to a control are obviously .NET System.String. In Cocoa, Strings passed to a control are NSString. But I understand C++ does not have a standardized String type (but indeed several, depending...

GIO example for opening a server port?

Can you please tell me if there is any example for using GIO Server Socket (the one which I can open a port and listen on socket requests)? I would like to use it to 'remote-control' my GTK+ application. ...

Eclipse/GTK+ wasting screen real estate

Eclipse on Linux (GTK+) has rather large UI elements which wastes screen real estate. Compare the Linux version (taken on Ubuntu 9.10): with the Windows version: Note the vertical size of the Project Explorer tab, the menubar, and the toolbar. Is it possible to tweak this somehow? How does this look in other Linux distributions? ...

Convert Line Number Into its corresponding co-ordinates

I have a application written in PyGtk. I need to convert a particular line number into its corresponding window co-ordinates in a GtkTextView. How can this be done? ...

GTK+ compile in Bloodshed Dev-C++ compiler error

Hi, I'm trying to compile a C program using GTK+ in bloodshed Dev-C++ 4.9.9.2. I've added all the include files in the compiler options plus all compiler options, but I get the following error: Compiler: Default compiler Building Makefile: "C:\Dev-Cpp\Projects\Makefile.win" Executing make... make.exe -f "C:\Dev-Cpp\Projects\Makefile....

GTK+ FT_Select_Size error

Hi! I have installed GTK+ 2.16 and Code::Blocks, trying to run a simple GTK+ program it gives me the following runtime error: "The procedure entry point FT_Select_Size could not be located in the dynamic link library freetype6.dll" I have checked the library exists, which it does, but I cannot seem to figure out how to fix this issue?...

GTK : How to set the Height of a VBox?

Hi I'm making an app using GTKMM. The screenshot is below: Screenshot The Problem is, I'm not able to position the "My Label" to align at the top, just below the Search box. I'm packing Name,Search box, Search Button into a HBox, which is packed into a VBox, and then MyLabel is packed into the VBox. I think the problem is that the V...

[GTK+] Change progress bar with circular wait image

Hi, Is it possible to skin the GTK+ progress bar widget such that it shows a custom image (an AJAX style animated gif maybe)? If so how and if not, is there any other option/control which can achieve this effect? ...

Gtk::MessageDialog Run throws a segmentation fault

Hi I'm trying to show an error mesaage using a dialogbox. However when I run the code I get segmentation fault. Here's the function: void ShowErrorMessage(string message) { Gtk::MessageDialog dialog(message,true,Gtk::MESSAGE_ERROR,Gtk::BUTTONS_CLOSE,true); dialog.run(); } I try to open a file, if the file can not be open I wanna ...

GTK+ libgio-2.0.so.0 not installed on the target machine

Hi - I have an application which uses gtkmm. The client's machine does not have this library installed. When he runs my application on his Red Hat Linux he gets the error: libgio-2.0.so.0: cannot open share d object file: No such file or directory How can i install it on the client's machine? I know I can do yum install, but since its R...

Easiest way to get GTK+ to run in Windows with IDE

Hello! I've been trying to get GTK+ to compile using Dev-C++ or Code::Blocks IDE, but I cannot get either to work. I wondered if there's someone that knows an IDE where GTK+ is installed as part of the IDE, and it just works? Its got to be running under windows. ...

undefined reference to...

Hi I have the following C GTK+ code and I get the following error trying to compile: undefined reference to gdk_pixbuf_new_from_file_utf8 Code: #include <stdlib.h> #include <gtk/gtk.h> GdkPixbuf *create_pixbuf(const gchar *filename) { GdkPixbuf *pixbuf; GError *error = NULL; pixbuf = gdk_pixbuf_new_from_file(filename, &...

Compile gtk+ & gtkmm in Vista at cmd prompt

Hi Can someone please help me with compiling gtk+ (& gtkmm) at Vista cmd prompt? I have tried recently & cannot get this to work. I feel I have all dependencies and paths correct but I obviously haven't or am missing something! I have searched the internet but haven't found specific help for this (I am also trying to compile in cygwin- b...