How do I paste HTML to the clipboard so that it is recognized as HTML in applications such as Open Office and MS Word? It is possible when using gtkhtml or gecko if you've already rendered it, but I need a straight GTK+ solution.
...
I keep getting a broken image (a red 'X' in a paper, it doesn't even start loading the one i want, I don't know if this is clear enough) and don't know why, here is what i tried:
image = gtk_image_new_from_file("abc.png");
gtk_container_add (GTK_CONTAINER (window), image);
gtk_widget_show (image);
gtk_widget_show (window);`
I am a new...
Hi,
I'm using a GtkSheet widget in PyGTK to power my application's spreadsheet, and it gives me an API to pull and push data out of cells. (I looked at using GtkTreeView, but it seemed to be too much work)
What I don't understand is how to intercept paste requests (via ie. CTRL+V) so that I can process them rather than passing it throu...
Can you cast a function pointer of this type:
void (*one)(int a)
to one of this type:
void (*two)(int a, int b)
and then safely invoke the pointed-to function with the additional arguments(s) it has been cast to take? I had thought such a thing was illegal, that both function types had to be compatible. (Meaning the same prototype-...
I am coding a pyGTK application, and I'd like to change an input based on the user's selection from a ComboBox. For example, a user could select truck/car/van, and the input parameters would change corresponding to the type of vehicle.
Is there a way one can define the different sub-panels using Glade? It would be easy to just define a ...
I have created a margin in a gtk.TextView widget. Now I want to make sure that the default event handler for mouse click, which is moving the text cursor to the clicked position, works only when clicked to the right of the margin.
Is this possible?
...
A slow multiple precision implementation of a mandelbrot generator. Threaded, using POSIX threads. Gtk GUI.
I've got a bit lost. This is my first attempt at writing a threaded program. I'm not actually trying to convert the single-threaded version of it yet, just trying to implement the basic framework.
A brief description of how it wo...
I'm having an issue with PyGTK and GTK Builder windows. Here's a simplified version of my code.
class GUI:
def __init__(self,parent):
builder_file = "./ui/window.builder"
self.builder = gtk.Builder()
self.builder.add_from_file(builder_file)
self.window = self.builder.get_object('main')
self.builder.connect_signals( ...
I have the following code that uses GTK+ widget toolkit to display a window with a button. Clicking this button will show a modal dialog. Note that the call to gtk_dialog_run will recursively start another instance of the main loop, i.e. the on_click function will not return until the dialog box is dismissed.
I would like to have two of...
I'm writing this awesome application, at least I think it awesome, in C with the magnificent blend of GObject and after a while I start getting this very, extremely strange error. I also believe to have noticed it not appearing always. However this might just be the IDE's fault. Anyhow...
GCC, apparently, complains: expected ')' before ...
I am new to GTK+ programming. I came across an API called g_main_loop(). I have used it in my code but I am still unaware that how exactly it works. Can somebody explain g_main_loop() with small code snippet?
...
I am trying to develop a GNOME applet (put into panel) using python (pyGTK). I've started by following the tutorial suggested in other SO question.
My plan is to let the applet do something in the background in a repetitive fashion (causing its display to be updated). So I thought I am gonna need threads to do it. I've seen several tut...
I am trying to implement a customized CellRenderer in Ruby/GTK, and I've already found this suggestion:
GObject subclassing in Ruby
However, when I try the following:
class CellRendererCustom < Gtk::CellRendererText
type_register #register within gobject system?
def initialize
super
end
def get_size(widget, cell_area)
...
I wanted to get some ideas one how some of you would approach this problem.
I've got a robot, that is running linux and uses a webcam (with a v4l2 driver) as one of its sensors. I've written a control panel with gtkmm. Both the server and client are written in C++. The server is the robot, client is the "control panel". The image analysi...
I am absolutely terrible at GUIs - can you SO gurus point me to good tutorial material on layout management tips & tricks with Glade for GTK+ ?
(The first google hits on "glade tutorials" do not count)
...
We are trying to make a GUI application in C using GTK that would use google maps api to download a map and find the shortest path between the source and the destination. We have implemented a mini web browser in our application using web toolkit. What is troubling me determining how would our application interact with the google maps ap...
If I just make a standard TextView with the Justification set to Center, it looks something like this:
If I also want to center the text vertically, as well as horizontally, how do I do this?
...
I can use GTK "allocation" function, but that only gives the position relative to its parent. How does one find the absolute position of a GTK widget inside of a window?
Ie, if the widget appears 500 pixels in, and 300 pixels down, but is nested inside various hboxes and tables, how do we find out it is in a 500x300 pixel position?
I ...
In my application I'm trying to use GTK rc file to style the widgets:
style "boxstyle1"
{
bg[ACTIVE] = { 0.0, 1.0, 0.0 }
bg[NORMAL] = { 1.0, 0.0, 0.0 }
bg[PRELIGHT] = { 0.0, 0.0, 1.0 }
}
widget "*.eventbox1" style "boxstyle1"
while the normal color is taken but the other states not. anyone experienced with this problem?
...
Do you know of any serious and clean, (by clean I mean rails like) mvc based ruby GUI application with GTK.
Actually, if there are any ruby gui applications that are clean and mvc based, I would be delighted, no matter what toolkit.
What I am looking for are basically some good open source apps, where I can look at the code, for inspir...