gtk

PHP GTK short path

I have the following PHP GTK code located in C:\gtk <?php if (!class_exists('gtk')) { die("Please load the php-gtk2 module in your php.ini\r\n"); } $wnd = new GtkWindow(); $wnd->set_title('Background'); $wnd->set_resizable(false); $wnd->set_position(GTK_WIN_POS_CENTER); $wnd->connect_simple('destroy', array('gtk', 'main_quit')); ...

PHP GTK button click

I'm trying to make this button change background when you click it and this is what I have: <?php if (!class_exists('gtk')) { die("Please load the php-gtk2 module in your php.ini\r\n"); } function loc(){ return dirname(__FILE__); }; $wnd = new GtkWindow(); $wnd->set_title('Picture Viewer'); $wnd->set_resizable(false); $wnd->set_...

How do you make sub-widgets of gtk custom widgets editable in Glade?

Hi, I'm making custom Gtk+ widgets (in C) for work and one of the requirements is that those widgets have to be editable in Glade. So far it works nicely, I have for example a widget made of a table with buttons in it and with a custom specific behaviour and some custom specific properties that can be edited in Glade correctly. So thi...

display a buffer of pixels using pixbuf

I have a buffer of pixel values. Is it possible to display that buffer as an image using pixbuf in gtk. i will be using c language. ...

A "better" way of resizing GtkTreeViewColumns... but how do I do it?

I'm trying to create GtkTreeViewColumn resizing functionality like how it is in Thunderbird. Key word here is "trying". So far I haven't succeeded. The easiest way to understand how this resizing works is to fire up Thunderbird and play with resizing the columns yourself, but basically the way it works in Thunderbird is if you drag, say...

Issue using CMake : gtk module

I'm attempting to compile zzogl using CMake and I keep running into issues. My first issue stated that I needed pkgconfig, so I installed that, for which I also had to install MacPorts. Then it said I needed gtk+-2.0 module, so I got that too. After that took forever to install, I still get this error: checking for module 'gtk+-2.0' ...

gtkProgressBar in RGtk2

Hi everyone, I am trying to add a gtkProgressBar to a little interface I created for an R script (using the RGtk2 package). If I do something simple, as: for (i in 1:50) { gtkProgressBarSetFraction(progress, i/50) Sys.sleep(1) } everything runs smoothly and the bar is updated every second. However, when I go to my ac...

gtk: nicer way to make cellrenderercombo finish editing as soon as an entry is selected

I have a TreeView with a CellRendererCombo in it. Currently, I've connected the editing signal to a function which changes the underlying model and does some other actions based on the new value. However, this is annoying for the user. Dropping down the list and clicking on a new item does not seem to cause editing to "finish". Instead t...

Override theme settings of gnome-settings-daemon in GTK

In a pygtk app, I'm using rc_parse_string to adjust the appearance of my GUI. (Mostly to make it look more native under Windows, and to theme individual widgets.) This, for example, would change the icon theme for my application: gtk.rc_parse_string(""" gtk-icon-theme-name = "Galaxy" """) This works under Windows, but ...

Simple ListBox w/ PyGTK Issues

Environment: PyGTK Glade Problem: After following several tutorials detailing how to get a ListBox up and running using the GtkTreeView widget alongside a gtk.ListStore object I still can't seem to get my data from the ListStore to show up in the GtkTreeView. Request: Anyone have a link to a thorough tutorial I can follow or willin...

pygtk: What class should my custom widgets inherit from?

When making a custom widget in pygtk, what class should it inherit from? I want to be able to put the widget inside other widgets, but I don't want other people to put stuff in mine. Usually I make my widgets inherit from gtk.HBox or gtk.VBox, and that works fine, but it is possible then for someone to do a pack_start() on my widget and ...

gtk: why does my treeview sort func receive a row with None in it?

I've set up a gtk.TreeView with a gtk.TreeStore. One column contains formatted dollar amounts, and I've set up sorting by that column as follows: def sortmon(model, i1, i2): v1 = model[i1][COL_MONEY] v2 = model[i2][COL_MONEY] return cmp(float(v1.replace("$","").replace(",","")), float(v2.re...

GTK+ user interface testing

I have created a user interface using GTK+ and C. I was wondering if there are any testing frameworks for testing this interface, similar to how selenium (a software testing framework for web applications) can be used for testing the interfaces of web applications. I want to create some regression tests for my GTK+ interface. Thanks! ...

Preventing window overlap in GTK

I've got a Python/Linux application that displays bits of info I need in a GTK window. For the purposes of this discussion, it should behave exactly like a dock - exists on all virtual desktops, and maximized windows do not overlap it. The first point is pretty easy, but I have spent days bashing my head against my monitor trying to ...

Mono GTK Label useMarkup not working under Windows

(This may not be the site for this issue however i've already asked in the official mono forums and got no response) Hello: I have a GTK Label with useMarkup set to true and it works perfectly in Ubuntu 10.04 however in Windows 7 x64 it just shows the plain html text and not the representation of it (Both my Ubuntu and Windows PC's ha...

dispaly an image in gtk - is gtk drawing area required?

I'm trying to dispaly an image that i load from a pixbuf( from data in memory) and the image gets updated everytime (as the pixbuf is also changing with time). My question is that since the window will only contain the image( which is being updated periodically) , do i need a gtk drawable or a drawing area for this? or can i simply displ...

GtkTextView can't wrap line.

Hello I'm using Gtk on C, I need to have a GtkTextView in the middle of my window with many other widgets, I can't make the widget wrap lines. This is a very annoying behavior, anyone have any idea of what am I missing? This is the code I'm using to set it's properties: gtk_text_view_set_left_margin(GTK_TEXT_VIEW(commentsTextView),20); ...

How to change text on gtk.label in frequent intervals - PyGTK

I am coding a desktop application which shows contents from text file in a gtk.label, i update that text file, say once in every 15 mints. Are are there any methods to make the application to read the text file in constant intervals and display it without restarting the window ...

GtkButton just shows text but no image

Hi, I have a GtkButton inside a GtkHButtonBox that doesn't show the image I'm adding to it. It just shows the text. Here's the code: GtkImage *image = (GtkImage *) gtk_image_new_from_file("Gateway-LT21-netbook-2-540x359"); GtkButton *button = (GtkButton *) gtk_button_new_with_label("test"); gtk_button_set_image(button, (GtkWidget *) i...

GTK Widget object naming

I am writting a PyGTK application. I am using the glade interface designer for layouts. I want to know if there is any standard way of naming a Widget object. eg : For a button called "Configure" how should I name it ? eg : ConfigureBt, ButtonConfigure, ConfigureButton, etc I want the app to be accepted in the default ubuntu/debian/gn...