gtk

Undefined symbol ‘IA__gdk_drag_context_get_device’

I get those two errors when trying to compile GTK+: ../../gdk/gdkaliasdef.c:1142: error: ‘gdk_drag_context_get_device’ aliased to undefined symbol ‘IA__gdk_drag_context_get_device’ ../../gdk/gdkaliasdef.c:1145: error: ‘gdk_drag_context_set_device’ aliased to undefined symbol ‘IA__gdk_drag_context_set_device’ those lines are: #undef g...

What can I do with Seed?

I found Seed, which is basically a JavaScript environment and binding for programming GTK+. Are there any limitations compared to using e.g. C and C++? Are there any major speed concerns? ...

gtk symbol lookup error

Hello, I have a code for loading data: GFileInputStream* ins; GFile* gf = g_file_new_for_path(file_path); ins = g_file_read(gf, NULL, NULL); mw->pix = gdk_pixbuf_new_from_stream(G_INPUT_STREAM(ins), NULL, NULL); gtk_image_view_set_pixbuf (GTK_IMAGE_VIEW (mw->view), mw->pix, TRUE); g_input_stream_close(G_INPUT_STREAM(ins), NULL, NULL);...

Variable timeouts in GLib

I need to modify a GLib's time-out interval while it is in execution. Is that possible? I took a look to the source code and it seems possible to me, but is required use some non-public functions from GLib internals. Should I reimplement GTimeoutSource or there are a way to do it? ...

gtk+ signal emitted when window/dialog is "presented"

Is there a signal that is emitted when a window/dialog is presented in GTK+? Example: when issuing this command to the GTK widget dialog: dialog.present() is there a resulting signal? Or is there any signal that denotes the "showing" of a window/dialog? ...

Making pygtksourceview work in windows

So, I'm trying to get gtksourceview python bindings work under windows (I'm developing a cross platform gtk application that shows code, so gtksourceview seemed like a natural choice). I have pygtk installed and working (I followed the instructions in http://www.pygtk.org/downloads.html) I tried the instructions in http://projects.gnom...

Reporting library for Linux / C++ / Gtk?

We have a C++ Gtk application that currently has a "homebrew" reporting component. We're looking to step up to a more fully-featured reporting library, preferably with a WYSIWYG designer, print-preview / GUI viewer, and PDF export capabilities. Any recommendations? ...

Determining the mime type of a file

How can I determine the mime-type of a file (in OCaml)? I am trying to set the language for a GtkSourceView control, but to do that, I need to first determine the language. The only way I can see of doing this is using the mime-type - there is a function that will return the correct language as follows: GSourceView.source_languages_ma...

How to truncate a text in a custom GtkCellRenderer?

Hi. I trying to create custom GtkCellRenderer with some text. And I want this text truncated, when a size of GtkCellRenderer is smaller than size of text. For example: How can I do this? Is this some property of CellRenderer or PangoLayout or I need to do this manually? P.S. Sorry for my English. ...

Build GTK with Windows SDK

Hello, how can I compile gtk (itself) with Windows SDK ? ...

Custom GTK widget to bypass GTK layout engine?

I have an application layer that I'd like to port to Gtk that has all it's own layout code and I don't really want to spend 'n' months re-writting it to work with the Gtk layout system, but rather just using the existing internal layout code and have Gtk render the resulting widgets. I've started by writting my own widget after trying s...

Ubuntu quickly (python/gtk) - how to monitor stdin?

I'm starting to work with Ubuntu's "quickly" framework, which is python/gtk based. I want to write a gui wrapper for a textmode C state-machine that uses stdin/stdout. I'm new to gtk. I can see that the python print command will write to the terminal window, so I assume I could redirect that to my C program's stdin. But how can I get m...

[gtk+] run function in another thread than gui

Hello, I have simple C/gtk+ application. I have function in this app which load image in gtkimageview widget: gboolean main_win_open( MainWin* mw, const char* file_path) { ... //loading and displaing image in gtkimageview ... } The loading image is work, but i need to run this function in another thread then main gui fo...

Void pointer cast C++ and GTK

See this GTK callback function: static gboolean callback(GtkWidget *widget, GdkEventButton *event, gpointer *data) { AnyClass *obj = (AnyClass*) data; // using obj works } (please note the gpointer* on the data). And then the signal is connected using: AnyClass *obj2 = new AnyClass(); gtk_signal_connect(/*GTK params (...)*/, ...

Using custom widgets with glade / Gtkbuilder

Hi all. I'm developing an application with Gtk and Glade. My impression is that it's common practice to create a subclass of GtkWindow for your main window, but I'm stuck on how I would construct my subclass from a GtkBuilder definition. Does anyone know how? ...

Is there a good way to copy a Gtk widget?

Is there a way, using the Gtk library in C, to clone a Gtk button (for instance), and pack it somewhere else in the app. I know you can't pack the same widget twice. And that this code obviously wouldn't work, but shows what happens when I attempt a shallow copy of the button: GtkButton *a = g_object_new(GTK_TYPE_BUTTON, "label", "o_0",...

How do I create a Status Icon / System Tray Icon with custom text and transparent background using Python and GTK?

Here is the code that I have so far to define the icon: icon_bg = gtk.gdk.pixbuf_new_from_file('gmail.png') w, h = icon_bg.get_width(), icon_bg.get_height() cmap = gtk.gdk.Colormap(gtk.gdk.visual_get_system(), False) drawable = gtk.gdk.Pixmap(None, w, h, 24) drawable.set_colormap = cmap gc = drawable.new_gc() drawable.draw_pixbuf(gc, i...

MDI in SWT on Linux??!

I'd like to create an MDI application using SWT. I've done extensive searches and reach that the Decorations Object is the one responsable for trying supporting behavior. However, I've a Linux box, and the example provided here: http://java-gui.info/Apress-The.Definitive.Guide.to.SWT.and.JFace/8886final/LiB0070.html#ch08fig02 doesn't wo...

Fetching gtk theme background color

Hi there, I'm almost a gtk newbie, and I'm looking for a way to get the background color for the current theme in gtk. So this code: GdkColor color = gtk_widget_get_style(mainWindowHandle)->bg[GTK_STATE_NORMAL]; works only after the main window is shown, before returns an strange ugly gray. ...

pinvoke to clutter function

I'm trying to pinvoke to a clutter function. The function is defined in the docs as ClutterActor * clutter_texture_new_from_file (const gchar *filename, GError **error); The code I have is as follows: [DllImport ("libclutter-glx-1.0.so.0")] private static extern IntPtr clutter_texture_new_from_file (string filename, IntPtr errorData...