gtk

adding toolbarItem to GtkToolbar to specific position on toolbar crashes.

i'm using void gtk_toolbar_insert (GtkToolbar *toolbar, GtkToolItem *item, gint pos); If i pass -1 or 0 for pos, it works fine. But if I try any other position, i get assertion failed. gtktoolbar.c line 2244 logical==0. i'm basically followed this code: except for the position. #include int main( int argc, char *argv[]) { ...

Why does Gtk2::Builder mix up my signals?

I'm having this perl code: #!/usr/bin/perl use warnings; use strict; use Data::Dumper; use Gtk2 '-init'; my $data; my $builder_file = "lists.glade"; my $builder = Gtk2::Builder->new(); $builder->add_from_file( $builder_file ) or die "Couldn't read $builder_file"; $builder->connect_signals( undef ); my $window = $builder->get_...

Dump X clipboard data with GTK+ or PyGTK

How do I paste HTML data from the X clipboard using PyGTK/GTK+? I would need something like xclip, but with the ability to output clipboard data as HTML, not just as plain text. I'm using PyGTK, but I am not afraid of plain GTK+ in C. I've read GtkClipboard and PyGTK's gtk.Clipboard references, and I've found this question, but I would...

[pygtk] Get children from gtk.ScrolledWindow

Hi to all. i have Window and gtk.ScrolledWindow on it, and gtk.TextView in this scrooledWindow. How can i get textview? Thank you ...

Display web page using libgtkhtml c c++

I want to display a very simple html page from the web, using libgtkhtml. Can you give an example please? Or some documentation/resources? I found nothing. (C preferred, but C++ also acceptable). Thanks in advance. ...

How do you rotate a gtk widget?

Hello good people, Let's say the widget in question is a VBox containing a Label and two Buttons. Furthermore, let's say the degree of rotation desired is 90°. How does one go about rotating it? I do not think this is possible by default but I do think it is possible. However, I have no idea how to get started. Do I write a custom wi...

'gdk_get_default_root_window' Equivalent in Gtk#?

I was looking at some native C code, and it referenced gdk_get_default_root_window. I found the documentation on gdk_get_default_root_window, but I can't seem to find its managed equivalent. Does anyone know if there is a Gtk# managed equivalent for gdk_get_default_root_window? ...

Programatically firing an event in GTK (With Gtk2Hs).

I am using Gtk2Hs (EventM module) to handle GTK events within Haskell. Is it possible to manually (re-)fire an event? Upon detecting an event on one widget, I want to refire this event on another widget. I am using Gtk2Hs version 0.10.1 and GHC version 6.10.4. ...

Examples of well written simple PyGTK apps?

I'm looking to get my hands dirty with PyGTK and was wondering if anyone can recommend any relatively simple, really cleanly written PyGTK apps that I can look to for best practices or examples? Any type of app will do, as long as it's simple-ish (i.e., please don't recommend a huge app) and generally considered to be well written. The ...

In Gtk, how do I make a CellRendererToggle in a TreeViewColumn with multiple CellRenderers only get toggled when the checkbox itself is clicked?

I have a TreeModel representing a tree of Tags. Each Tag has these properties, among others: string Name bool Active Tag Parent TagList Children //basically just a List<Tag> The TreeView has a single column, with two CellRenderers: a CellRendererToggle for Active, and a CellRendererText for Name. I want them in the same column, becaus...

Gtk Draw Bitmap

I want to draw an image on a window using Cairo. How can I load a bmp or png from disk and create a brush from it? The code below shows where drawing should be made. The expose signal is attached to the window. gboolean OnExpose(GtkWidget *widget, GdkEventExpose *event, gpointer data) { cairo_t *cr; cr = gdk_cairo_create(wi...

Help finding c api.

Im coding a simple c/gtk+ app connected to a mysql database. The gui and db code is done, now I need to make some reports based on database data, I thought the easier way to do this is by using an api that would let me output the data to a Excel or openoffice spreadsheet,PDF would be helpful too. The problem is dont find any. ...

rounded rectangle in pygtk

what is the best way to draw a rounded rectangle in a pygtk application ...

how to render multiple html files in the same page one after the other using webkit

Hi, i am using webkitgtk+ to render HTML files. I am trying to render multiple HTML files into same page (say same gtkscrolledwindow ). What i did is, i put a vbox to gtkscrolledwindow as viewport and put Webkitwebviews to vbox, one after the other. But the problem is the HTML files are no more reflowable. I want to retain reflowable pro...

libgtk version problem on ubuntu

I installed gtk+2.0 version 2.18.3 but when i run command dpkg -i libgtk2.0-dev_2.18.3-1_i386.deb i have the next error but when i checked the /usr/lib/libgtk2.0-0 i found the version of the libgtk is 2.12.9 why the new installtion not override the pre one? and what i should do now? ----------------------------------------ERROR----...

Example code for PyGTKSpell

I'm trying to find examples of PyGTKSpell usage. Googling isn't turning much up. Where can I find some? ...

GTK StatusIcon: Coordinates of left-click?

Hello, how do I get the x/y-coordinates of a left click in a Gtk StatusIcon? This is my first GTK app and I'm stuck. Is there any way to get details about the last button event that occurred? Or is it possible to pass those details to the handler function when connect()ing the "activate" callback? Greets, Philip ...

GLib Hash Table - Pointer

I'm trying to increment the value of some specific key if it was found. For some reason I keep getting the (pointer) address when I dump all keys:values from the hash table. Output a: 153654132 // should be 5 b: 1 c: 153654276 // should be 3 d: 1 e: 1 f: 153654420 // should be 3 int proc() { ...

Authenticating GTK app to run with root permissions

I have a UI app (uses GTK) for Linux that requires to be run as root (it reads and writes /dev/sd*). Instead of requiring the user to open a root shell or use "sudo" manually every time when he launches my app, I wonder if the app can use some OS-provided API to get root permissions. (Note: gtk app's can't use "setuid" mode, so that's n...

Where can I find the gtk-builder-convert script?

I've built a small GUI app for work that uses some .glade files for pop-up windows. Recently, the ground beneath me was shifted - my environment was upgraded. Newer pyGTK versions require GTKBuilder and .xml files instead of Glade and .glade files and now my poor app is broken. I need to convert the .glade file to the newer .xml file....