gtk

How to embed a flash player in a GTK app?

Hi, has anyone tried to embed a Adobes FlashPlayer into a c-written Gtk-Application? Is it possible? Are there any good points to start? P.S.: I do not want to embed the WebKit or Gecko renderengine into my application! ...

How to do GUI for bash scripts?

I want to do some graphic dialogs for my script but don't know how. I hear something about GTK-Server or something like that. If someone know how to link bash with tcl/tk I also be satisfied. Please do not post something like "change to C++" because my project must be a script in BASH, there are no other option. Any ideas? P.S. Sorry ...

In D, how to pass an empty string? (to gtkD)

Using D1 with phobos I have a text entry field, instance of gtk.Entry.Entry, calling setText("") raises a run time error Gtk-CRITICAL **: gtk_entry_set_text: assertion `text != NULL' failed Why? It seems to be a problem with D, I tried this: string empty = ""; assert (empty != null); my_entry.setText(empty) The program terminated...

Valgrind: Invaild read of size 8

I have been working on an open source project for awhile, http://gtkworkbook.sourceforge.net/, and recently ran into an issue that just seems like I am going in circles. I'm pretty sure there is a heap problem but I have been looking at this code too long to figure out exactly what it is. So, in brief, what I am doing is reallocating a...

How to copy Gdk.image?

Is it possible to make a copy of Gdk.image object using lablgtk2 for Ocaml? I tried to find 'copy' or 'clone' methods but failed. ...

What is the fasted way to draw an image in Gtk+?

I have an image/pixbuf that I want to draw into a gtk.DrawingArea and refresh frequently, so the blitting operation has to be fast. Doing it the easy way: def __init__(self): self.drawing_area = gtk.DrawingArea() self.image = gtk.gdk.pixbuf_new_from_file("image.png") def area_expose_cb(self, area, event): self.drawing_area.window...

where can I find GladeGen?

I'd like to design a GUI using Glade, and generate python code from it. The thing is, I can't find GladeGen. Does anyone know where it can be downloaded from? ...

How do I use 'F' keys in gtk Accelerators?

I'm trying (in python) to use gtk.Widget.add_accelerator... what should I pass as accel_key to use the F keys? Have attempted to check the docs to no avail. Thanks ...

pygtk: How to set the height of pop-up window in gtk.EntryCompletion

I use gtk.EntryCompletion to implement the autocomletion function. But the list is so long that the pop-up window touches the bottom of screen. And I cant find the method of set the height of pop-up window in doc of pygtk. How to set the height of pop-up window in gtk.EntryCompletion? ...

Is there a way to make a toplevel GTK window smaller than the default minimum size?

I need to draw a few small undecorated windows on top of another app's window. Each of these windows contains just a short label. It works fine but the windows are too big for my purpose. It seems as if Windows doesn't allow smaller than 104 x 27 toplevel windows, I might be wrong. I haven't tested on another backends. I'd like to shrink...

Drawing directly to the screen via GTK or GDK

I am working on a demo application for a library me and two colleagues are writing to allow GNOME applications that run audio events though libCanberra to allow users to select visual events to replace them. This is an accessibility-minded effort to help both visually and aurally impaired users gain the benefits of audio alerts and such....

Imitating a context menu in Gtk#/gtk-sharp

Is there some way to use the Menu.AttachToWidget(...) function of a gtk menu item to attach the menu to say a Gtk.Textview and have it handle showing the menu when needed. Or is creating an event handler for ButtonPressEvent and showing the menu there the only way to do it? Or is there a third possibility that I'm missing? Thanks in Ad...

How can I get cross-thread communication in a Perl GTK program?

I have a Perl program that has a GTK2 GUI (via the Gtk2 package). This program also opens a network socket (actually via LWP) in another thread, and continuously makes a request for a certain URL, waiting for an event to happen. If an event occurs, then its data must be processed and interpreted, and an appropriate callback function use...

How to integrate Boost.Asio main loop in GUI framework like Qt4 or GTK

Hello, Is there any way to integrate Boost.Asio with Qt4 (prefered) or GTK main loop? GTK provides poll(2) like API so technically is should be possible. Qt provides its own networking layer, however I prefer to use existing code written for Boost.Asio. I want to integrate them without using an additional thread. Is there any reference...

ruby glade/gtkbuilder example?

hello I was using ruby and glade2 to design the user interface for a while in the new version of glade3 i can use gtkbuilder format to generated xml file instead of libglade. is there any example? i searched google but i had no luck! ...

PHP desktop applications

Hi, I have quite a few years experience of developing PHP web applications, and have recently started to delve into Python as well. Recently I've been interested in getting into desktop applications as well, but have absolutely no experience in that area. I've seen very little written about PHP-gtk and wonder whether it's really a good ...

clearing newline char from gtk.Textbuffer

I have a gtk.TextBuffer which is supposed to be cleared after pressing Enter, similar to the input box on most chat programs. I'm just setting the buffer back to a blank string. The newline character from Enter isn't removed though, and a blank line ends up above the cursor during the next input. Moving the cursor to the first gtk.Iter ...

If I have two instances of Glib::IOChannel, they block until both written. What is the correct way to do this?

I have modified the example found here to use two io channels. None of the callbacks seem to be called before I have written to both channels. After that they are called individually when writing to the fifos. Am I forgetting something? Start the test program in one shell window. Write echo "abc" > testfifo1 in second shell window. -> ...

Java JComboBox Custom Renderer and GTK

I have a list of Customer objects that I need to have selectable from a JComboBox. From what I read I need to implement a custom renderer to have the fields I want displayed in the list. I want my JComboBox to have entries formatted as such: +----------------------------------------------+ | Customer Name - Contact - City, State V...

Run a function every X minutes - Python

Hello. I'm using Python and PyGTK. I'm interested in running a certain function, which gets data from a serial port and saves it, every several minutes. Currently, I'm using the sleep() function in the time library. In order to be able to do processing, I have my system set up like this: import time waittime = 300 # 5 minutes while(1)...