Re: popup window

2006-11-23 Thread Olexiy Avramchenko
On 11/23/06, sunzysjzri [EMAIL PROTECTED] wrote: hi, guys I write an application which has a button , when you click the button popup a new window, i want to add a button in the popup window, which could close the popup window. when i run my application, gtk debuger said that the the

Re: Alternative for gtk_style_get_font

2006-10-31 Thread Olexiy Avramchenko
On 10/31/06, Madhusudan E [EMAIL PROTECTED] wrote: Hi All, The API gtk_style_get_font is deprecated. Can anyone tell us which is the alternative for this API Hello, use GtkStyle::font_desc field: http://developer.gnome.org/doc/API/2.0/gtk/GtkStyle.html#GtkStyle-struct Some useful links,

Re: Glade GUI: changing mechanism

2006-10-31 Thread Olexiy Avramchenko
On 10/31/06, Johan Kohler [EMAIL PROTECTED] wrote: Isn't it possible to inline the .glade file in the compiled code? Ie. Instead of reading from a text file, it reads from a declared constant. I think that one can inline pixmaps in this way using GTK. Sure, it's possible to embed xml into

Re: Catch a global keypress event

2006-10-31 Thread Olexiy Avramchenko
On 10/31/06, Ian Hummel [EMAIL PROTECTED] wrote: I have looked all over and can't figure out how to register a global shortcut key combination for my app. Something like CTRL+~ should bring up a dialog box, in front of all other windows, sort of like the ALT-Tab window. any suggestions on

Re: acces to a member of the principal widget

2006-03-31 Thread Olexiy Avramchenko
Ok I understand I can give more than one argument to a callback function. But my question remains, how can I access to my list. The most used ways: 1. Allocate the structure and pass it to signal's callback, in your case: typedef struct _MyCallbackArgs { GtkWidget *window; GtkWidget

Re: acces to a member of the principal widget

2006-03-27 Thread Olexiy Avramchenko
On 3/27/06, Jerome Le Saux [EMAIL PROTECTED] wrote: Hi, I looked for days my error, and I found it ;). in a menu bar I add item. This item open an gtk_file_chooser_dialog. In the callback of my main I give as argument the pointer of my mani widget pWindow. But how can I access to my list,

Re: Adjusting width of GtkEntry

2006-03-24 Thread Olexiy Avramchenko
On 3/24/06, Sandeep KS [EMAIL PROTECTED] wrote: Hello everyone, I am using GtkEntry widget in my application to take 2 digit number as input from the user. But the width of the widget displayed is very large. How can i set the width of this entry widget? Hi,

Re: Widgets inside a GtkDrawingArea

2006-03-21 Thread Olexiy Avramchenko
On 3/21/06, Sander Marechal [EMAIL PROTECTED] wrote: The button is sitting neatly on top of the playing area now, but it has a small grey box around it. See the screenshot at [1]. I think that the 1 pixel grey border is added by an invisible container widget that holds the button in question

Re: Widgets inside a GtkDrawingArea

2006-03-21 Thread Olexiy Avramchenko
On 3/21/06, Sander Marechal [EMAIL PROTECTED] wrote: I'm also having trouble getting the GtkLayout resized properly if the main window changes size. It looks like GtkLayout and it's container element GtkScrolledWindow do not send out configure_event's when the main GtkWindow is resized. Is

Re: Widgets inside a GtkDrawingArea

2006-03-20 Thread Olexiy Avramchenko
Sander Marechal wrote: Hello, I am writing a hearts game for GNOME using glade and the libglade XML loader. The main playing area is a big GtkDrawingArea. I need to add a button in the middle of the drawing area during the beginning of the game (when you are passing cards to another player).

Re: Find Signal Name, in callback handler.

2006-03-20 Thread Olexiy Avramchenko
Muthiah Annamalai wrote: Dear friend, I want to know if its possible to find Signal Name, in callback handler. Im writing language bindings and I need to evaluate some designs on routing callbacks; with a fair amount of searching on archives of this ML, I dont find this question answered well,

Re: Radio buttons - howto disable callback on deselect?

2006-01-19 Thread Olexiy Avramchenko
On 1/19/06, Daniel Pekelharing [EMAIL PROTECTED] wrote: Hi all, Is there anyway to disable a radio button/menu-item calling the callback function when it gets deselected? In other words when the user selects an option, only call the callback for the newly selected radio item and not for

Re: What is more fast GdkDrawable or GdkPixbuf

2005-12-03 Thread Olexiy Avramchenko
Carlos Eduardo Rodrigues Diogenes wrote: Olexiy Avramchenko wrote: Carlos Eduardo Rodrigues Diogenes wrote: What of these two components are fastest to copy from one to another (GdkDrawable to GdkDrawable or GkdPixbuf to GdkPixbuf)? The fastest case depends on your client's hardware

Re: What is more fast GdkDrawable or GdkPixbuf

2005-11-30 Thread Olexiy Avramchenko
Carlos Eduardo Rodrigues Diogenes wrote: What of these two components are fastest to copy from one to another (GdkDrawable to GdkDrawable or GkdPixbuf to GdkPixbuf)? The fastest case depends on your client's hardware (pixbufs) and X server's hardware (drawables). GdkPixbuf is stored in client

Re: Changing fontsize of a label

2005-11-09 Thread Olexiy Avramchenko
Giuliano Montecarlo wrote: Hi, how can I change the fontsize of a label? And how can I make it bold? You can do it in several ways, one of the easiest is to use special markup language: http://developer.gnome.org/doc/API/2.0/pango/PangoMarkupFormat.html There's a function you have to use to

Re: Retrieving current mouse pointer position?

2005-09-10 Thread Olexiy Avramchenko
Daniel Pekelharing wrote: Hi all, How can I retrieve the current mouse position? I mean without setting up a mouse callback.. Use gdk_window_get_pointer() function. http://developer.gnome.org/doc/API/2.0/gdk/gdk-Windows.html#gdk-window-get-pointer Olexiy

Re: GtkList question

2005-09-06 Thread Olexiy Avramchenko
Faria, Sydney C wrote: ... which is from 2.0 API for Tree Widgets. Eric Harlow's book gives an example that uses gtk_widget_set_usize(list, 250, 250) which is now deprecated. What to I use to set a minumum size for the displayed list since I am going to be starting out with an empty list box

Re: key accelerator bindings

2005-08-30 Thread Olexiy Avramchenko
Boncek, John wrote: We are using GTK 2.2.4 under MontaVista Linux with IceWM. We have been able to assign F1 thru F8, Page Up, Page Down, Enter, and keypad Enter as accelerator keys in our application, using the GTK accelerator group functions. But other keys are not working, including F9

Re: key accelerator bindings

2005-08-30 Thread Olexiy Avramchenko
Boncek, John wrote: It shows that each of the keys is being pressed and released, so it's not just that the physical keys are not working. Well, what code does it show ? GDK_F9 has 0xffc6 code and 'xev' have to show exactly this keysym. It's possible to change keycode-keysym translation.

Re: gtk_key_snooper_install() example

2005-08-29 Thread Olexiy Avramchenko
Greg Breland wrote: I've seen this asked before a while back with no response, so I thought I'd give it a try. Google hasn't been any help at all. I'm trying to install a snooper and it's working just fine, but I get a compiler type warning on the first arg of gtk_key_snooper_install() and I'm

Re: changing the bg of a widget

2005-08-22 Thread Olexiy Avramchenko
Luka Napotnik wrote: Hello. I'm trying to change the background of a vbox but it doesn't change. I call gtk_widget_modify_bg(window_main-box_main, GTK_STATE_NORMAL, bgColor) where bgColor is set to white. Why does this not work? I have a GtkImage with an image in the vbox and that's all. If I

Re: checkbox nightmares

2005-08-22 Thread Olexiy Avramchenko
Stefan Kost wrote: you want to use gtk_toggle_button_set_state() for this. GtkCheckButton is derived from GtkToggleButton. gtk_toggle_button_set_active () ? ;) or g_object_set (toggle_button, active,TRUE/FALSE, NULL) Olexiy ___

Re: where are the stock button images kept?

2005-07-19 Thread Olexiy Avramchenko
Yiannis wrote: Hi, where are the stock button images kept? Hello They're inside libgtk*.so, precompiled. Source *.png files are in gtk+ source tarball gtk/stock-icons subdir. Olexiy ___ gtk-app-devel-list mailing list

Re: alpha for text?

2005-07-18 Thread Olexiy Avramchenko
Paul Pogonyshev wrote: I have not coded it yet, just pondered about it. I was going to render with gdk_draw_layout() to a GdkImage (which is a client-side GdkDrawable, as said in the reference.) And that proceed with GdkPixbuf. So, like you described, except that layout is rendered directly

Re: gtk embedded

2005-07-14 Thread Olexiy Avramchenko
Jirka Pirko wrote: hi i want to use gtk on intel xscale - is it better to use gtk on tinyx or a framebuffer (directfb) ? single graphical application is enought for me, so i can use framebuffer - but it's badly supported :/ Hello Try gtk+-2.2.4 with linux-fb gdk backend, if your video

Re: Disabling Button/Window focus

2005-07-12 Thread Olexiy Avramchenko
Michal Porzuczek wrote: I was wondering if it is possible to temporary disable focus on buttons so they don't work and they do not light up when the mouse hovers over them. gtk_widget_set_sensitive() is the common way. Is it also possible to disable the movement and resizeablilty of a window

Re: How compile resource inside .o file?

2005-07-01 Thread Olexiy Avramchenko
顺珉 吴 wrote: I want all icons and images my programm used be packaged in to the final execute binary file. How can I do this? Use 'gdk-pixbuf-csource' program (comes with gtk source, vendors usually put it in gtk devel package) to translate image to C source code. gdk_pixbuf_new_from_data()

Re: Glade C code a bad thing? (was: root windows)

2005-06-02 Thread Olexiy Avramchenko
Gus Koppel wrote: I only saw messages from people claiming that it's (pretty) easy to do. I haven't seen anyone picking it up or actually planning to do so. That's easy. Why ? Because it was done once. Look at glade and reuse the code or ideas. Why dont I, personally, do this ? Because the

Re: Glade C code a bad thing? (was: root windows)

2005-05-31 Thread Olexiy Avramchenko
Freddie Unpenstein wrote: That doesn't mean generated code shouldn't be available for those who consider it the best solution to their particular needs. Write a utility that reads in .glade files and outputs code. Call it from your Makefile to ensure the source files are kept up to date,

Re: Size of a GtkWidget

2005-05-06 Thread Olexiy Avramchenko
Daniel Pekelharing wrote: Hi all, This is probably a stupid question, but how do I get the exact size of a GtkWidget (in pixels)? Hello Use allocation field of GtkWidget structure. Olexiy ___ gtk-app-devel-list mailing list

Re: threads gdk/Xlib

2005-04-11 Thread Olexiy Avramchenko
Stphane Konstantaropoulos wrote: Hello all, I am programming a testing app for a gtk widget that embeds Xine and I am facing little problems with threads and XLib: the application crashes all the time whith Xlib: unexpected async reply It got fixed only when I called the following functions in the

Re: probelm with static linking

2005-04-09 Thread Olexiy Avramchenko
NAVEEN FRANCIS wrote: Hi.. I am new to gtk. I was trying to develop an GTK application on Fedora. When I am trying to do static linking I am getting an error. Hello, Fedora just doesn't provide static gtk+ libraries. This topic (static linking to GTK+) was discussed many times on gtk-list,

Re: [NEWBIE]How to show popup given a GdkEventButton object?

2005-04-09 Thread Olexiy Avramchenko
Edward Yang wrote: How to turn the x, y members to screen coordinates so that I can show a popup menu? x_root, y_root fields of GdkEventButton structure ? http://developer.gnome.org/doc/API/2.0/gdk/gdk-Event-Structures.html#GdkEventButton BTW, it there an easy way to show a popup menu? I looke an

Re: g_signal_connect isn't working

2005-03-10 Thread Olexiy Avramchenko
Pier-Luc Charbonneau wrote: static gboolean recalculate_psi_consumption(GtkWidget *widget, gpointer data) This is your callback declaration. It takes 2 parameters. g_signal_connect(G_OBJECT(start),key_press_event,G_CALLBACK(recalculate_psi_consumption),(gpointer)psi); key-press-event signal

Re: GTK app with no keyboard/mouse

2005-02-24 Thread Olexiy Avramchenko
Marc Santhoff wrote: According to some postings on this list, some people tried to synthesize GDK events from their code and failed. What exactly did you try to do ? I use gdk_event_put to simulate keyboard events from GIOChannel that reads data from keyboard on serial port. Works well (maybe my

Re: A bug in Gtk+?

2005-02-23 Thread Olexiy Avramchenko
Zeeshan Ali wrote: Hello, On Tue, 22 Feb 2005 15:22:50 +0100, Stefan Kost [EMAIL PROTECTED] wrote: Are you sure? Yeah I am sure and thats why i suspect that it may be pointing to a bug in gtk+. Why don't you try it youself? Shouldn't take 15 mins. :) Hi :) When you create main loop with

Re: A bug in Gtk+?

2005-02-23 Thread Olexiy Avramchenko
Zeeshan Ali wrote: You may call it a nessecity of my laziness :) Sure, L:) Laziness is great power and the reason of why there're so many programming tools and libs avalaible. BTW, you can debug deadlocks with gdb. You just need to attach it to running process. 1. Compile program with '-g'

Re: segmentation fault

2005-02-10 Thread Olexiy Avramchenko
Aaron Yang wrote: hi, thanks for replying after changing, segmentation fault still follows. there's an additional error saying warning: passing arg 2 of `g_timeout_add' from incompatible pointer type Use typecast: g_timeout_add (100, (GSourceFunc)real_draw, drawing_area); compiler expects gboolean

Re: gdk_threads_enter/leave() in threaded and non threaded situation

2005-02-10 Thread Olexiy Avramchenko
Stefan Kost wrote: hi hi, Hello I have a gobject property that is set (via g_object_set()) from within a thread and from the main thread. Further I have signal handlers that watch this via notify::property. These signal handler call gtk functions. Therefore in these signal handlers the gtk part

Re: segmentation fault

2005-02-09 Thread Olexiy Avramchenko
Aaron Yang wrote: void draw_button_clicked ( void ) { 1. You're passing NULL as a parameter for timeout's callback. g_timeout_add (100, real_draw, NULL); } 2. window parameter is NULL (see above). static gint real_draw ( gpointer window ) { GtkWidget *widget; 3. Variable widget is undefined,