gtk

How to find GTK version in PHP-GTK2?

This one is driving me nuts. According to GTK's site, there exists GTK_MAJOR_VERSION, GTK_MINOR_VERSION, and GTK_MICRO_VERSION constants. However, none of these work: echo GTK_MAJOR_VERSION; echo GtK::MAJOR_VERISON; echo Gtk::GTK_MAJOR_VERSION; etc Also, Gtk::check_version(2,12,0) always fails even though I have a higher version. I'...

Is there a way to uncheck all radio buttons in a group? (PyGTK)

Is there a way to uncheck all radio buttons in a group with PyGTK? No radio buttons are checked on startup, so I think there must be a way to return them all to that unchecked state. ...

gobject.timeout_add example

I need to perform some actions periodically on my GTK Ruby program and i am looking for the working example of using gobject.timeout_add() function. ...

GtkNoteBook signal handling problem

I have created one notebook GTK+ widget, and I am trying to set callbacks on some events as follows: m_notebook = gtk_notebook_new(); g_signal_connect( GTK_OBJECT(m_notebook), "move-focus-out", G_CALLBACK( on_notebook_move_focus_out ), NULL ); g_signal_connect( GTK_OBJECT(m_notebook), "focus-tab", G_CALLBACK( on_notebook_focus_tab ), NU...

What does "Unhandled Exception: GLib.GException: Unhandled tag: 'requires'" mean?

I'm trying to get my linux Gtk# application working on Windows. When I try to run it, I get this error message: Unhandled Exception: GLib.GException: Unhandled tag: 'requires' at Gtk.Builder.AddFromFile(String filename) at Interface.MainWindow..ctor() at [My Project Name].MainClass.Main(String[] args) in c:\Path\...

How to sort tree view on click on column header.

I am having a GtkTreeView with GtkTreeStore in it and I want to Sort this entire table (GtkTreeView) when user clicks on any of the column headers I also want to align text in the cells to left side. How to do this? ...

What are the differences between Gtk+ and Qt?

A lot of people seem to have an opinion about which is better. I'm not really asking for these opinions, what I'd like to know are the details: What are the things that make one graphical toolkit different from another, and which of these differences do Qt and Gtk+ have? ...

Library getting information from any active windows into screen

Hi all, I am looking for a library to get some information from the active windows. By "information" I mean the absolute/relative position of the window, the size, the list of all the windows. There is a function in GTK+ called get_window_list_toplevels() or get_root_window() but I get only the windows information realized with GTK. I...

python GTK container for mjpeg stream

I have an mjpeg stream from a web-cam and would like to display it in an application written in python using pygtk. The stream is a string of bytes from the driver. What widget would be best for displaying this and would I need to do some intermediate conversion before putting it in the widget? Should I write my own widget to do this? ...

Problem linking app with wxGTK and Python 3.1?

I have a C++ app that I'm developing with wxGTK 2.9.0 on Ubuntu 9.10. The app also uses the Python 3.1 api. The source files compile just fine but when it comes to linking, I get errors saying that xxx has already been defined, where xxx is a member function in the classes. There are many of these errors. The only libraries I'm linking w...

Fundamentals of Game Programming in C

During the last 2 months I've been trying to learn the basics of game programming. So I coded a few simple games in Java to learn the fundamentals, such as Tetris, Checkers and Pac-Man. Now I want to learn/improve my skills in C, so I have this idea of writing those games in C to learn more about memory management, no OOP, etc. I have d...

Using GTK/GDK to get Pango-rendered pixels

I'm trying to get a bitmap rendered by Pango with a given character, in this case the letter "T". I thought this should work, but it just prints out garbage.. In this code, gtk_window is already initialized as a GTK window. int width, height; PangoLayout *layout = gtk_widget_create_pango_layout(gtk_window, "T"); PangoFontDescription *...

Using local path with WebView (Webkit)

Hi! I'm trying to use Gtk port of Webkit. All works fine. But when I'm using local path in src attribute to load image from my HDD (src="file://...") I'm getting the next warning in console: not allowed to load local resource file://... And image doesn't loading. Any suggestions? P.S. I'm using load_string method with fake base ...

python gtk module opens display on import

I'm using the trick "python -c 'import myscript.py'" to perform a syntax check on a script which uses 'import gtk'. I get the following error when performing the syntax check, which implies that the gtk module is executing a check for the X display, even though all that's being done at this point is to import the module. Traceback (mos...

Submenu items in Nautilus right-click menu

Hello. I am trying to write an extension for nautilus, which add an item to the menu that appears when you right-click a file (as shown in image) However, I would like to add a submenu to my custom menu item. I downloaded a 'nautilus-python' package which includes examples of how to write extensions for Nautilus (and so far it turned...

How do I find what GTK version is installed on Solaris?

How do I find what version of GTK I have installed on a Solaris box? ...

Scaling an image to its parent button size in GTK?

I have a GTK layout with a widget on the left of an HBox deciding the maximum height I want, and a VBox on the right containing three buttons, each containing only an image and no text. The images are a GTK stock icon, and so have the stock storage type. Using expand=True, fill=True packing the buttons without images are exactly the hei...

How to be informed when gtk.paned slider's position changed?

I wanna the hpaned to remember the slider position, then I need to catch the event of hpaned's changing slider position. According to official doc, paned only have a few signals, and none of them is about slider's position. So, is there a event about hpaned's slider? And how to catch it? ...

Multiple Thread Progress Bar Control with gtk

in my C program , download some files from the internet, im using a GTK progress bar to show the download progress. i wanna if i download one file ,my app show one progress bar if i download three files ,my app can show three progress bar. the rest can be done in the same manner. i create UI with glade3. GtkTreeView have 3 colum...

How can i retrieve Window ID of gtk window.

I am having an application where i need to display streaming video using XV. I will pass top-level window ID to underlying video playing application which will Attach/Add child window (child window with streaming videos in it) to my window. So for that I need to get ID of top level window provided by operating system. I am using GTK+ a...