I have a simple GtkStatusBar created with glade,and want to add a simple message with the date of the last update of the database (just a simple and plain date).
I don't want to use the whole stacks, context and all the other things that gtk developers put on the statusbar code.
(I could simply use a label but I would like to keep the ...
I need to use Gtk2 for a project. I will be using python/ruby for it. The problem is that packing seems kind of mystical to me. I tried using a VBox so that I could have the following widgets in my window ( in the following order ):
menubar
toolbar
text view/editor control
I've managed to "guess" my way with pack_start and get the la...
So I am basically doing the following and I want SomeText to have red forground color. How to achieve this:
GtkWidget *menu_item =gtk_menu_item_new_with_labelex("SomeText");
I am using GDK 2.0
Thanks
...
what is the difference between these two function calls:
menu_item_new_with_labelex vs gtk_menu_item_new_with_label
...
that is how I build it: gcc pkg-config --cflags --libs gtk+-2.0 -o spawn spawn_with_pipes.c
In the snippet of example below, I get an error: syntax error before "Data - it refers to data= g_slice_new(Data);
#include <gtk/gtk.h>
typedef struct
{
/* Buffers that will display output */
GtkTextBuffer *out;
GtkTextBuffer *err...
I'd like to write a Perl GTK+ application which will:
0.1) Press button A
0.2) Disable A
0.3) start threads 1 and 2
0.4) start thread 3
Thread 3 does the following:
3.1) join thread 1
3.2) join thread 2
3.3) Enable A
On completion of thread 3, the button A should be enabled again.
Now, this kind of approach is perf...
I keep getting a 'uninitialize GLib::Object' error from my code.
Here's the code:
class MainWindow < Gtk::Window
def initialize
title = "I'm The Title Of An Application! Yay!"
border_width = 10
set_size_request(600, 300)
signal_connect("destroy") { Gtk.main_quit }
@vbox = Gtk::VBox.new(fals...
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'...
I am trying to save user's bold/italic/font/etc tags in a GtkTextView.
Using GtkTextBuffer.get_text() does not return the tags.
The best documentation I have found on this is:
http://www.pygtk.org/docs/pygtk/class-gtktextbuffer.html#method-gtktextbuffer--register-serialize-format
However, I do not understand the function arguments.
It ...
Rather than sending an actual pointer to a value, the value is cast to a pointer. I found these examples in the GUI interface code of a GTK program.
g_signal_connect (pastebutton[pane],
"clicked",
G_CALLBACK(on_paste_button_pressed),
(void*)((long)pane<<4));
In the above example, I...
I've been trying to get an Gtk2::Image object in this Perl Gtk2 application to get to react to button presses, but to no avail. The image shows as expected but the button events don't get handled. What am I missing?
my $img = Gtk2::Image->new_from_file( $file );
$img->set_property( sensitive => 1 );
$img->can_focus( 1 );
$img->...
Not sure if yall can help this time, as I'm just using this particular program not coding with it...
I downloaded Deluge, a free torrent app, and it requires GTK2 Runtime which I've also installed. Unfortunately, on my English WinXP with East Asian Language support Deluge sets itself to Chinese menus and has no option to alter the langu...
My purpose is to install ruby/gnome2 and make it work with ruby1.9 on Ubuntu9.10.
I already have ruby/gnome2 working with ruby1.8, but I need to make it work with ruby1.9. I also have ruby1.9 working. When I run within ruby-gnome2-all-0.19.3:
ruby1.9 extconf.rb
it eventually gives me:
Target libraries: glib, gdkpixbuf, pango, atk, gt...
Being resonably new to using GTK+, im not fully aware of all its functionality.
Basically, I have a GtkTreeView widget that has 4 Columns. I need to update the text displayed in the 4 columns every couple of seconds, but im not aware how to do this in GTK+.
I'm aware that I could flush the data using gtk_tree_store_clear, but I'm not ...
I want to be able to make a line graph using GTK+ but I'm unsure how to approach this. Has anyone got any hints or tips?
...
The install of Gtk2 and Glib mentioned above is only the first part. What I really want to do is install a piece of software called Chart in my Ubuntu Hardy machine. Here is the instruction:
"To run Chart you need Perl 5.10, Gtk2-Perl 1.220, and a list of Perl modules as long as your arm, per the Makefile.PL in the sources, all availa...
Hi,
In Gtk application, there is 1 main loop which listens for events (e.g. mouse click, keyboard, etc). And when a modal dialog popup, the main loop is blocked until user clicks 'OK' in the dialog, right? (i.e. nothing will happen when user clicks on the main window). Is that correct?
My question is how can firefox did its modal dia...
I'm trying to sort a column of data in a GTK tree view non-alphabetically. I can't seem to find a function in the GTK+ libraries that cant do such a thing.
Does anyone here know of a way to do this?
UPDATE:
Below is the code im currently trying to use:
column = gtk_tree_view_column_new();
gtk_tree_view_column_set_title(column, "Mem...
Hi Guys,
More GTK questions, im trying to compile some code and im getting the following error:
error: invalid use of member (did you forget the ‘&’ ?)
This is comming from the g_signal_connect call:
g_signal_connect ((gpointer) Drawing_Area_CPU, "expose-event",
G_CALLBACK (graph_expose), NULL);
Drawing_Area_CPU is a GtkW...
Hi Guys,
Im having some problems with a GTK program im trying to build.
When i compile it i keep getting this error:
This probably reflects a bug in the program.
The error was 'BadAlloc (insufficient resources for operation)'.
(Details: serial 195 error_code 11 request_code 53 minor_code 0)
Ive traced it down to the following comman...