Re: gtk errors !GTK_WIDGET_REALIZED (widget) failed

2007-03-29 Thread 3saul
in libglade to get this working? Paul Pogonyshev wrote: 3saul wrote: when trying to: GdkColormap *colormap = gdk_screen_get_rgba_colormap(screen); gtk_widget_set_colormap(widget, colormap); This is literally as complicated as my program is. Create a window (using libglade), setup

Re: gtk errors !GTK_WIDGET_REALIZED (widget) failed

2007-03-29 Thread 3saul
window in glade as a custom widget (to see if this solves the issue in my original post). If you have any other idea's I'd love to hear them. Thanks Paul Pogonyshev wrote: 3saul wrote: when trying to: GdkColormap *colormap = gdk_screen_get_rgba_colormap(screen); gtk_widget_set_colormap

Re: gtk errors !GTK_WIDGET_REALIZED (widget) failed

2007-03-29 Thread 3saul
. Hoping to help, Jonathan On 3/27/07, 3saul [EMAIL PROTECTED] wrote: I'm doing it to get transparency for the window. The strange thing is is that the window is in fact shown (realized) using gtk_widget_show before I call the colormap stuff. I've managed to get this working using

Move decorationless window with mouse

2007-03-22 Thread 3saul
...from a widget in the window. Is this possible? Can I do something like simulate the pressing of the alt key to achieve this or is there a better way? I don't want the user to have to press ALT. -- View this message in context:

Centering window

2006-07-05 Thread 3saul
Is it possible to have my window always positioned in the centre of the screen but at the top, even when the window is resized? GTK_WIN_POS_CENTER_ALWAYS - seems to centre on both x and y. GTK_WIN_POS_CENTER - doesn't seem to work when resizing. -- View this message in context:

Re: scale GtkImage?

2006-07-02 Thread 3saul
Look at (and in this order) gdk_pixbuf_new_from_file gdk_pixbuf_scale_simple gtk_image_new_from_pixbuf -- View this message in context: http://www.nabble.com/scale-GtkImage--tf1880358.html#a5146293 Sent from the Gtk+ - Apps Dev forum at Nabble.com.

Correct way to free a pixbuf

2006-06-30 Thread 3saul
How do I free the memory occupied by a pixbuf (or don't I need to)? -- View this message in context: http://www.nabble.com/Correct-way-to-free-a-pixbuf-tf1872501.html#a5118198 Sent from the Gtk+ - Apps Dev forum at Nabble.com. ___ gtk-app-devel-list

gtk_window_deiconify

2006-06-30 Thread 3saul
..can I use this function to deiconify the window of another application or only a window belonging to the application that called the function? If it can deiconify other windows how do I get the window name of a specific application? -- View this message in context:

Re: gdk_draw_pixbuf

2006-06-28 Thread 3saul
Ok it's working for me...too a point..I'm segfaulting on the expose event. Here's some code GdkPixbuf **background_pixbuf = NULL; GtkWidget **link_drawable; int i = 0; int total_s = 4; gboolean expose_event_callback (GtkWidget *widget, GdkEventExpose *event, gpointer data) {

gdk_draw_pixbuf

2006-06-26 Thread 3saul
I have two questions regarding drawing: 1. Is it possible to use gdk_draw_pixbuf to draw onto a GTKDrawingArea (the doco states that it's possible but I can't figure out how to) 2. Upon resizing a GTKDrawingArea will it's contents be resized automatically? -- View this message in context:

libegg

2006-06-23 Thread 3saul
Can someone tell me where I can download libegg from? I can't find it anywhere! -- View this message in context: http://www.nabble.com/libegg-t1834586.html#a5006790 Sent from the Gtk+ - Apps Dev forum at Nabble.com. ___ gtk-app-devel-list mailing list

Multi monitor environment

2006-06-23 Thread 3saul
How do I find out which monitor my application is on in a multiple monitor environment? -- View this message in context: http://www.nabble.com/Multi-monitor-environment-t1834631.html#a5006908 Sent from the Gtk+ - Apps Dev forum at Nabble.com. ___

Send keys to system

2006-06-20 Thread 3saul
I'm wanting the user to be able to click a button in my app which in turn sends specific keystrokes to the 'system'. I'm not sure if GTK itself can do this or if it needs to be an X thing. -- View this message in context: http://www.nabble.com/Send-keys-to-system-t1821711.html#a4967740 Sent from

Position window on screen

2006-06-19 Thread 3saul
I need to position my window at the bottom (south) and centre (always) of the screen. I'm using GTK_WIN_POS_CENTER_ALWAYS to keep it centred even when the window resizes but how do I sent it to the bottom of the screen? I tried GDK_GRAVITY_SOUTH but that has no effect for some reason. I found the

Resize image to fit button

2006-06-08 Thread 3saul
I need to add images to buttons, the images will have random sizes but I need to scale them down so that they're about a 10th of their original size...what is the easiest way to do this? -- View this message in context: http://www.nabble.com/Resize-image-to-fit-button-t1758787.html#a4784347 Sent

Re: Resize image to fit button

2006-06-08 Thread 3saul
..I guess the easiest way would be to fit the button.. -- View this message in context: http://www.nabble.com/Resize-image-to-fit-button-t1758787.html#a4784630 Sent from the Gtk+ - Apps Dev forum at Nabble.com. ___ gtk-app-devel-list mailing list

Deleting random number of buttons...

2006-06-06 Thread 3saul
I'm creating some buttons like this GtkWidget ** add_buttons( GtkWidget *parent, int n ) { GtkWidget **buttons = g_new( GtkWidget *, n ); for( i = 0; i n ; i++ ) { char label[256]; snprintf( label, 256, button %d, i ); buttons[i] = gtk_button_new_with_label( label );

gtk_image_new_from_file ()

2006-05-30 Thread 3saul
I've found the doco below on gtk_image_new_from_file (). What I'm wanting to know is besides gif, precisely what other filetypes are supported (animatable filetypes preferably)...thanks http://developer.gnome.org/doc/API/2.0/gtk/GtkImage.html#gtk-image-new-from-file -- View this message in

Memory allocation using g_malloc

2006-05-30 Thread 3saul
I need a little help with memory allocation. What I'm wanting to do is create a multi dimensional array that contains a list of file names from a specific directory. So it needs to be something like this int numfiles = 20; g_malloc (myArray [numfiles] [512]); Is this close to correct? I'm

Re: Memory allocation using g_malloc

2006-05-30 Thread 3saul
Thanks for the response. Let me elaborate a little. I have a list of files in a dir (without knowing how many) a.txt b.txt c.txt I want to be able to put the names of the files into an array so that I can refer to them later like this array[0][0] = a.txt array[0][1] = b.txt and so

Set up callbacks for dynamically created buttons

2006-04-22 Thread 3saul
I'm creating some buttons using: buttons = g_new(GtkWidget*, n); for (i = 0; i n; i++) { buttons[i] = gtk_button_new... gtk_button_whatever(GTK_BUTTON(buttons[i])... ... gtk_box_pack_start(GTK_BOX(some_box), buttons[i]... } how would I set these buttons up with call backs once

Re: Set up callbacks for dynamically created buttons

2006-04-22 Thread 3saul
So how should I implement this with the changes that David pointed out? -- View this message in context: http://www.nabble.com/Set-up-callbacks-for-dynamically-created-buttons-t1490320.html#a4039872 Sent from the Gtk+ - Apps Dev forum at Nabble.com.

Re: Random Number of Buttons

2006-04-20 Thread 3saul
You've solved my problem once more...and with much laughter! I told you last time I'm a beginner *lol* -- View this message in context: http://www.nabble.com/Random-Number-of-Buttons-t1480088.html#a4006487 Sent from the Gtk+ - Apps Dev forum at Nabble.com.

Re: Random Number of Buttons

2006-04-20 Thread 3saul
OK what I'm trying to do is this: 1. Read a directory full of images (the images in the directory will change) 2. Create a table with the correct number of cells. 3. Put a button in each cell with an image on it from the directory 4. In the cell below the image put the name of the file on a

Window Resize..

2006-04-08 Thread 3saul
Hi, I have the following code in a function to resize a window gtk_window_set_resizable (GTK_WINDOW (window1), TRUE); gtk_window_resize (GTK_WINDOW (window1),x * 10, 600); gtk_window_set_resizable (GTK_WINDOW (window1), FALSE); The above code does not work (the window

Re: Window Resize..

2006-04-08 Thread 3saul
Figured it out.. gtk_widget_set_size_request -- View this message in context: http://www.nabble.com/Window-Resize..-t1418895.html#a3824803 Sent from the Gtk+ - Apps Dev forum at Nabble.com. ___ gtk-app-devel-list mailing list

Re: gtk_button_set_label ERROR

2006-04-06 Thread 3saul
Thanks for everybody who has responded. Here is the code that create's the button: button1 = gtk_button_new_with_mnemonic (x); gtk_widget_show (button1); gtk_box_pack_start (GTK_BOX (hbox1), button1, FALSE, FALSE, 0); and here is the function where I'm trying to change the label: gboolean

Re: gtk_button_set_label ERROR

2006-04-06 Thread 3saul
Thanks for everybody who has responded. Here is the code that create's the button: button1 = gtk_button_new_with_mnemonic (x); gtk_widget_show (button1); gtk_box_pack_start (GTK_BOX (hbox1), button1, FALSE, FALSE, 0); and here is the function where I'm trying to change the label: gboolean

Re: gtk_button_set_label ERROR

2006-04-06 Thread 3saul
If I change that to GtkWidget *button1 = x; or GtkWidget *button1; I still get the same error. -- View this message in context: http://www.nabble.com/gtk_button_set_label-ERROR-t1403878.html#a3782179 Sent from the Gtk+ - Apps Dev forum at Nabble.com.

Re: gtk_button_set_label ERROR

2006-04-06 Thread 3saul
you're right it isn't complete...there is an if statement there.. if I put GtkWidget *button1 = x; or GtkWidget *button1; I still get the same result...fail. -- View this message in context: http://www.nabble.com/gtk_button_set_label-ERROR-t1403878.html#a3782228 Sent from the Gtk+ - Apps Dev

RE: gtk_button_set_label ERROR

2006-04-06 Thread 3saul
..thank you so much...making GtkWidget *button1; a global fixed all of my problems... THANKS EVERYBODY! -- View this message in context: http://www.nabble.com/gtk_button_set_label-ERROR-t1403878.html#a3782360 Sent from the Gtk+ - Apps Dev forum at Nabble.com.

RE: gtk_button_set_label ERROR

2006-04-06 Thread 3saul
..3000 buttons! hmmm...that's a lot! -- View this message in context: http://www.nabble.com/gtk_button_set_label-ERROR-t1403878.html#a3782640 Sent from the Gtk+ - Apps Dev forum at Nabble.com. ___ gtk-app-devel-list mailing list

gtk_button_set_label ERROR

2006-04-05 Thread 3saul
Hi all, Whenever I call gtk_button_set_label I get the following error and the function does not succeed. GTK-CRITICAL **: gtk_button_set_label: assertion 'GTK_IS_BUTTON (button) failed. Is there a common reason for this error? I get no errors or warnings when compiling. -- View this message

Re: Update text label

2006-04-04 Thread 3saul
Thanks a lot. However it's for a menu not a button ...here is some code menubar2 = gtk_menu_bar_new (); gtk_widget_show (menubar2); gtk_box_pack_start (GTK_BOX (hbox2), menubar2, FALSE, FALSE, 0); time_date1 = gtk_menu_item_new_with_mnemonic (MENU); gtk_widget_show

Funcamentals of GTK

2006-04-04 Thread 3saul
OK I'm having some trouble understanding how a GTK application actually works. I've created a few terminal based applications in C for linux. When I want my application to continually perform a particular function I set up a loop. Within this loop I call the functions to update data etc So

Re: Fundamentals of GTK

2006-04-04 Thread 3saul
Thanks for the information...that was very helpful. So in terms of how the main function works in a GTK app is it like this: int main( int argc, char *argv[] ) - start here and work down to... gtk_main (); - check to see if anything needs to be done for the gui then loop back up to int main(

Update text label

2006-04-03 Thread 3saul
Hi, I'm very very new to GTK programming. I've created a button which get's it's label from a variable. The text in the variable will change and I need to find out how to 'refresh' the label on the button. Thanks -- View this message in context:

GTK Wizard using Notebook

2006-03-22 Thread 3saul
Hi, I'm new to programing, especially gtk. I'm wanting to create a gtk wizard (without a dependency on Gnome - I'm aware of the druid). I thought the best way might be to create a notebook and have forward and back buttons cycle through the tabs. My question iscan someone give me some