Re: Please

2007-01-14 Thread Olexiy Avramchenko
You have to unsubscribe from list if you don't want to receive the messages. Visit the link [1], provide your e-mail and password and unsubscribe. [1] http://mail.gnome.org/mailman/listinfo/gtk-list Olexiy ___ gtk-list mailing list

Re: gtk/gdk equivalent of XPutImage ()

2006-11-26 Thread Olexiy Avramchenko
On 11/24/06, Prasanna Kumar K [EMAIL PROTECTED] wrote: Hi, I want to substitute XPutImage() with some equivalent gtk/gdk API in my application. It is not neccessary that gtk/gdk should have an exact match for XPutImage(). Any 2 or more combinations of gtk/gdk API's can solve the problem..

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: GTK static compile

2006-11-23 Thread Olexiy Avramchenko
On 11/23/06, getik too [EMAIL PROTECTED] wrote: I was told that compiling statically will enable my gtk program to run on any system with the same OS as the original compiling OS whether or not GTK is present. I tried this by typing gcc -static -o outputfile file.c `pkg-config --cflags --libs

Re: GEvent - Proposal for a new threading structure for GLib

2006-11-18 Thread Olexiy Avramchenko
On 11/17/06, Matthew Barnes [EMAIL PROTECTED] wrote: ... I've attached a patch that implements and documents GEvent. It closely mimics the Python class, so I won't bother describing the API here. Is GCond not suitable for this purpose? Olexiy ___

Re: DrawingArea - allocating needed space

2006-11-10 Thread Olexiy Avramchenko
On 11/10/06, Piotr Zurek [EMAIL PROTECTED] wrote: Hi there, First of all, sorry for crossposting, but slowly losing hope for getting any answer from gtk-sharp-list. Maybe someone will prove me wrong... Anyway, I need a word of advice on using DrawingArea. In my application the user is supposed

Re: gtk application startup time

2006-11-08 Thread Olexiy Avramchenko
Shyjumon N. wrote: ... times=((tn.tv_sec - tp.tv_sec)/100)+ (tn.tv_usec - tp.tv_usec); ... Hmm, you divide tv_sec field by 10e6. This is probably not what you want. At least with integer types. Olexiy ___ gtk-list mailing

Re: rotating background images on a gtkdrawable

2006-11-01 Thread Olexiy Avramchenko
On 11/1/06, Yianni [EMAIL PROTECTED] wrote: Hello and apologies for the general scope of the quetion but how can I rotate background images on a gtkdrawable? Try cairo (with GTK+ = 2.8.x), see an attached sample. All used functions are documented in GTK+/GDK and cairo references. Olexiy

Re: gtkentry and return key

2006-11-01 Thread Olexiy Avramchenko
On 11/2/06, Mattias Gaertner [EMAIL PROTECTED] wrote: Hi all, The gtkentry emits an 'activate' signal when you press return in it. Can this be deactivated, so that the key is not handled by the gtkentry? I want to use a generic key function. Hello, Mattias There's GtkTextView widget for 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: Entry widget

2006-10-31 Thread Olexiy Avramchenko
Hello, If I understand correctly (you want to get an entry content on button click) you have to do the following in your callback_card() function: 1. Remove gtk_widget_destroy callback on clicked signal. 2. Connect your own callback. Like this: static void my_callback (GtkWidget *button,

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: ali:6128): Gtk-CRITICAL **: gtk_widget_set_events: assertion `!GTK_WIDGET_REALIZ

2006-01-30 Thread Olexiy Avramchenko
On 1/30/06, Faqeer ALI [EMAIL PROTECTED] wrote: ... gtk_widget_set_events (Button[j][i], GDK_EXPOSURE_MASK|GDK_BUTTON_PRESS_MASK); ... Warnings in my code/ (ali:6128): Gtk-CRITICAL **: gtk_widget_set_events: assertion `!GTK_WIDGET_REALIZED

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: About math function

2006-01-18 Thread Olexiy Avramchenko
On 1/19/06, Demon Zhu [EMAIL PROTECTED] wrote: Hello everyone, Although i have used #include math.h, cc compiler reports 'redundant redeclaration' and 'undefined reference to round'. Which header file should be included to using math function? It's not aquestion of gnome, but i

Re: How can I save the pixel of a GdkWindow/GdkWidget to a file?

2005-12-10 Thread Olexiy Avramchenko
[EMAIL PROTECTED] wrote: Hi, Can someone please tell me can I save the pixel of a GdkWindow/GdkWidget to a file? The only think I find is saving from a GdkDrawable (the 2 functions below). But how can I get a GdkDrawable from a GdkWidget/GdkWindow? There's no GdkWidget. GtkWidget has a

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: GtkEditable and utf8 question

2005-11-21 Thread Olexiy Avramchenko
Vincent Torri wrote: Hello, Hi, I would like to force an entry to insert only digit characters. I have tried to modify the insert_text_handler example that is in the GtkEditable API. The result is: static void _insert_numeric (GtkEditable *editable, const gchar *text,

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: Adding a user signal to a widget

2005-09-16 Thread Olexiy Avramchenko
Hans Oesterholt wrote: Can anyone tell me how to add a user signal of type G_RUN_ACTION to a widget? - I can't find G_RUN_ACTION in any header file I have. Use G_SIGNAL_ACTION instead. There was a type in the reference, as I remember. - I can't find |gtk_object_class_user_signal_new |in any

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: Error: cross compile libtiff

2005-09-07 Thread Olexiy Avramchenko
albrecht ellinger wrote: Hello, I still try to cross compile GTK+. GTK+ needs tiff, png and jpeg support. It is optional, by the way. You can turn it off with --without-libjpeg and --without-libtiff configure's options. Just my ₴0.02 :) 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: (no subject)

2005-08-31 Thread Olexiy Avramchenko
sudhindra hebbar wrote: 1)Setting decimal precision to entry widget(gtk 2.4). Use GtkSpinButton widget for the numeric entry. It has gtk_spin_button_set_digits(), gtk_spin_button_get_digits() methods for specifying precision. Precision value is stored in digits property, so you also may want

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: Announcing: Project Ridley

2005-08-23 Thread Olexiy Avramchenko
What about XML support ? Now we have: - basic XML subset in GLib - libxml2 - expat Moving all XML features to GLib doesn't look good, neither looks good having three separate libraries with the same functionality. Olexiy ___ gtk-devel-list

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: Announcing: Project Ridley

2005-08-22 Thread Olexiy Avramchenko
Gustavo J. A. M. Carneiro wrote: On Mon, 2005-08-22 at 16:10 +0200, Christian Neumair wrote: Am Montag, den 22.08.2005, 13:37 +0200 schrieb Rodrigo Moya: there is no reason to force us to do GNOME 3.0, but since many GNOME libraries will be disappearing with Ridley, we might want to call it

Re: Button Labels Test Post

2005-08-22 Thread Olexiy Avramchenko
Rob Wilkens wrote: ... This results, somehow, in the label text (on the button) being WHITE. The box itself is not white (in fact it has black borders I think). You change the foreground of widget-style-fg_gc, this is mistake - it is shared. You should create and use your own gc for drawing

Re: Problems with pango

2005-08-20 Thread Olexiy Avramchenko
David Gasa Castell wrote: Ok, Mr. Olexiy, You are right !. I just compiled Gtk+-2.8 (with Glib-2.8, Pango-1.10, Atk-1.10.1, including Cairo-0.9.2 and Glitz-0.4.4) from source without uninstalling old versions before and then, when tried to compile flin.c, the error was find. Also, I set

Re: libglade and gtk problems

2005-08-19 Thread Olexiy Avramchenko
Kurucz Istvan wrote: ... What's the problem and how can I solve this? Add -Wl,--export-dynamic into your ./compile script. Olexiy ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list

Re: Problems with pango

2005-08-19 Thread Olexiy Avramchenko
David Gasa Castell wrote: Hello to all !, Yesterday I send this message to the mail list: I've tried to compile a program but I get the next error message: []$ gcc -Wall -g flin.c -o flin `pkg-config --cflags --libs gtk+-2.0` /usr/local/lib/libpangoft2-1.0.so.0: undefined reference to

Re: GTK+ 2.8.0 released

2005-08-14 Thread Olexiy Avramchenko
Matthias Clasen wrote: GTK+ 2.8.0 is now available for download at: ftp://ftp.gtk.org/pub/gtk/v2.8/ It would be fine to have the latest pango and atk there. Or links to them. Olexiy ___ gtk-devel-list mailing list gtk-devel-list@gnome.org

Re: GTK+ 2.8.0 released

2005-08-14 Thread Olexiy Avramchenko
Matthias Clasen wrote: GTK+ 2.8.0 is now available for download at: ftp://ftp.gtk.org/pub/gtk/v2.8/ It would be fine to have the latest pango and atk there. Or links to them. Olexiy ___ gtk-list mailing list gtk-list@gnome.org

Re: Compiling pkgconfig with arm-linux-gcc

2005-08-11 Thread Olexiy Avramchenko
Hi, Baurzhan, AFAICU, I need to tell pkg-config where my headers and libraries are. Should it Just Work (tm) if I manually supply a *.pc file pointing to /usr/arm-linux/{include,lib}? It should work. But pointing PKG_CONFIG_PATH to the right location is better solution (anyway autotools stuff

Re: Compiling pkgconfig with arm-linux-gcc

2005-08-10 Thread Olexiy Avramchenko
prakhar vig wrote: Hi All, As I am building gtk package, i downloaded all the dependencies and needful things. But facing some prombles: a)I tried to cofigure pkconfig with arm-linux-gcc but it is giving some problem. Can anyone tell me the command for configuring pkgconfig with arm-linux-gcc.

Re: I thought that gtkCanvas would be in gtk 2.8?

2005-07-22 Thread Olexiy Avramchenko
Owen Taylor wrote: I think one of my papers on Cairo/GTK+ said that a cairo-based Canvas was a future possibility, but it was never planned for 2.8. Is anybody working on something like that now ? Olexiy ___ gtk-devel-list mailing list

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: enviornment variables

2005-07-18 Thread Olexiy Avramchenko
Abhishek Misra wrote: Hello, as recomended i tried to set the following enviornment variables. CPPFLAGS LDFLAGS PKG_CONFIG_PATH LD_LIBRARY_PATH to my surprise i get error st. command not found on running printenv or env the list of variavle,value that i get does not include any of these on

Re: On key pulsation, again

2005-07-18 Thread Olexiy Avramchenko
David Gasa Castell wrote: Thanks a lot for interest... but, you attached me an example which use an other technique (the other): mnemonics. In fact, I'd like to understand the use of accelerators (like gtk_widget_add_accelerator()) for clicking buttons. I've missed your previous post, sorry.

Re: pkg_config_path

2005-07-15 Thread Olexiy Avramchenko
Abhishek Misra wrote: Hello please let me know how to set the PKG_CONFIG_PATH enviornment variable which is required while installing gtk note that when I run env or printenv then no such enviornment variable is displayed . This depends on shell you're using (check with 'echo $SHELL'). With

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: Drawing higher depth images

2005-07-12 Thread Olexiy Avramchenko
David Necas (Yeti) wrote: Is it possible to use Gdk drawing functions (gdk_draw_arc(), etc.) to draw images of higher depth than system and save them? I can save GdkPixbufs. If there were drawing primitives in gdk-pixbuf, it would be everything I need. However I can draw only on GdkDrawables.

Re: Creating a pixbuf from non-BMP image data

2005-07-12 Thread Olexiy Avramchenko
Murray Cumming wrote: gdk_pixbuf_new_from_file() can create a GdkPixbuf from various image formats. But gdk_pixbuf_new_from_data() can only take BMP-formatted images. If I know, for instance, that my buffer contains a PNG image, how can I create a GdkPixbuf for it, so I can display it? Do I

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: what is an image

2005-06-17 Thread Olexiy Avramchenko
Shiraz Baig wrote: I have tried to decipher the picture rendering in GTK, but I am not clear. The ref documents are too brief and the tutorials do not cover this subject well. I have following questions. 1) We have a GtkImage and We have a GdkImage. What is the difference between the two?

Re: Seconds passed since today

2005-06-15 Thread Olexiy Avramchenko
Richard Stellingwerff wrote: What I can not do is: c) Convert the GDate to a GTimeVal (set at the beginning of the day). If I could do the things above, I could: - subtract c from a, and be done with it! Is there a way to do C or is there an easier way to do this? mktime() ? be aware of

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: GdkPixmap

2005-05-19 Thread Olexiy Avramchenko
abhi rocks wrote: [...] Isnt g_object_ref suppose to create a completely new image or does always point to the same image. Maybe thats why the image keeps updating itself. Yes, g_object_ref just increases the reference counter of the object, it doesn't create a new object. Olexiy

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: Would love some feedback on my tutorial...

2005-04-22 Thread Olexiy Avramchenko
Ben Johnson wrote: On Thu, Apr 21, 2005 at 11:11:23AM +0200, Murray Cumming wrote: ... Code generation with Glade is silly. People should use libglade. why do you think code generation is silly? why is libglade better? isn't it sort of like the difference between 6 and a half dozen? I'm just

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: possible memleak with pangoft2?

2005-04-11 Thread Olexiy Avramchenko
Hello, John ;) You're leaking fontmap object. I dont know when fontmap object gets all extra references (just have no time to look inside), but its natural to have only one instance of it per app. static void test( const char *text, const char *font ) { PangoFontMap *fontmap;

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: Why floating point for widget positions

2005-03-23 Thread Olexiy Avramchenko
Tristan Van Berkom wrote: Mike Emmel wrote: I've noticed that the GdkEventMotion x y positions are given in floating point coordinates and was wondering why ? I'd assume that this is just because xlib delivers the value as `double'. Nope, they're defined as integers by Xlib interface (at least for

Re: Why floating point for widget positions

2005-03-23 Thread Olexiy Avramchenko
Michael Natterer wrote: Because extended input devices produce coordinates at sub-pixel positions. Aha, interesting... Now, after I've read [1] and looked into the source, I see that GDK can translate XInput events to GDK_MOTION_NOTIFY events with coordinates that have a fractional part. Can

Re: Why floating point for widget positions

2005-03-23 Thread Olexiy Avramchenko
John Cupitt wrote: I believe GIMP uses the fractional part for (at least) the paintbrush tool. You're right it's not very useful for typical GUI widgets, but application windows can make use of the extended precision. Thanks for the tip, I'll look into the gimp's guts G;) Olexiy

Re: how to cancel an event?

2005-03-19 Thread Olexiy Avramchenko
[EMAIL PROTECTED] wrote: Hi, please help me: for a special purpose, i want to ignore some events. For example, in my multiline text editor, the keys Key Up and Key Down must be ignored in some cases. I tried but failed. Thank you very much for replying. Hello, 1) If you want to completely ignore

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: Posix(?) on numeric entry

2005-02-15 Thread Olexiy Avramchenko
antongiulio wrote: [...] buffer = g_strdup_printf(%g, value); [...] this value appears like: 2,59787 where ',' replaces a '.' I suppose it's related to *_NL locale replaces posix locale. How can I replace ',' with dot notation? Hi, Consider g_ascii_dtostr() function:

Re: Posix(?) on numeric entry

2005-02-15 Thread Olexiy Avramchenko
antongiulio wrote: [...] gdouble value = 4.1; gchar buffer[G_ASCII_DTOSTR_BUF_SIZE]; gtk_entry_set_text (GTK_ENTRY (value_entry), \ g_ascii_dtostr(buffer, G_ASCII_DTOSTR_BUF_SIZE, value)); but on output I got for value - 4.0996 How can I round value? Or g_ascii_formatd(...) is

Re: Posix(?) on numeric entry

2005-02-15 Thread Olexiy Avramchenko
Olexiy Avramchenko wrote: Yes, try smth like: g_formatd(buffer, sizeof(buffer), %.1g, value). err, g_ascii_formatd :) ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list

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,

Re: Can someone tell me how I can copy a binary file

2005-02-07 Thread Olexiy Avramchenko
Kristof Vansant wrote: Can someone tell me how I can copy a binary file. Is glib not good for this? And how should the code be then. A code example would be really welcome! thx If you're using Linux think about sendfile(), 'man sendfile'. This is: +simple, +fast, -nonportable. Olexiy

Re: fontconfig

2005-02-07 Thread Olexiy Avramchenko
Tommy Tam wrote: Has anyone been successful in cross-compiling fontconfig? I'm compiling for the ARM. It is needed for Pango. fontconfig also needs expat and freetype, which I managed to cross-compile fine. I have not been able to find any documentation on how to do this. During the make,

Re: Binary compatibility of GTK+2.4 vs. GTK+2.4 ?

2004-12-28 Thread Olexiy Avramchenko
Jurgen Defurne wrote: Hello, The home page of GTK states that there is binary compatibility between different versions of GTK 2.x. I have, however, a banking application which seems to be linked against GTK 2.2 and now that I have upgraded from Red Hat 9 to Fedora Core 3, does not work anymore. I

Re: gtk doesn't like fprintf )o;

2004-12-17 Thread Olexiy Avramchenko
[EMAIL PROTECTED] wrote: Snif, It seems that when i use some fprintf in a gtk program, a bug comes, floating point numbers are written in french : 90, instead of 90. , it's annoying because my program generates postscript and ghostview doesn't like this writing. I specify that I'm french

Re: forcing window repaints

2004-12-16 Thread Olexiy Avramchenko
Neale Pickett wrote: I'm trying to benchmark GdkImage, and I'm having trouble getting the window to update. It seems like it will update as the result of an expose event, but that's it. Obviously I'm missing something; can anyone be so kind as to tell me what? TIA, Neale Here's the program I'm

Re: compile error

2004-12-16 Thread Olexiy Avramchenko
Aaron Yang wrote: hi everyone, Hello does anyone know why i get the following error: passing arg 2 of `g_timeout_add' makes pointer from integer without a cast when i write my code as such: g_timeout_add (1000, time (NULL), G_OBJECT (button)); Remove (NULL) characters, with them you're

Re: Glib 2.4.8 doesn't seem to include symbols needed by Pango

2004-12-14 Thread Olexiy Avramchenko
William Lahti wrote: I've found a lot of posts about not being able to compile pango because of undefined symbols from glib which people continually say is because of an old version. I had no old version and installed Glib 2.4.8 and it had that problem. nm showed no signs of the culprit symbols in

Re: How to set the GtkTreeViewColumn title font

2004-12-09 Thread Olexiy Avramchenko
Will Heyman wrote: I'm trying to set up a table widget using a GtkTreeView and a GtkListStore. I'd like to reset the font of the whole table. I've been able to set the cell fonts by using g_object_set () on the cell renderers but how do I set the font of the column titles? Also is there a more

Re: How to change the default font of a GtkTextView?

2004-12-09 Thread Olexiy Avramchenko
Juha Nieminen wrote: One would think changing the default font of a newly-created GtkTextView would be a piece of cake, but I simply can't find any way of doing that. There doesn't seem to be any function which would do that directly in either GtkTextView nor in any base classes. My best guess

Re: pango build error : undefined reference to g_type_instance_get_private

2004-12-09 Thread Olexiy Avramchenko
Nomak wrote: Hello, i'm trying to build gtk 2.4 from source. I'm making a script i will post for you to add in the download web page (if i make it work). Anyway, pango can't compile. On this ml, somebody said that it was a too old glib problem but i have followed the version instructions of the

Re: Building errors

2004-12-08 Thread Olexiy Avramchenko
[EMAIL PROTECTED] wrote: Greetings, I got a Tarball of GTK+-2.4.9 and I have the following problem compiling it: While ./configure returns with no errors, 'make' at the enc returns the following: failed to load ./stock_add_16.png: Couldn't recognize the image file format for file

Re: how to remove title bar from window

2004-12-08 Thread Olexiy Avramchenko
Sudha C Naidu wrote: hello! i guess this part of the code does the work..i got segmentation fault code: Window xwin=None,ParentWindow=None; char * list[1] ; int count = 1 ; XTextProperty text ; list[0] = title ;

Re: GtkEntry and numeric floating point input

2004-12-02 Thread Olexiy Avramchenko
Neil Zanella wrote: Hello, I've got a GtkEntry and I need to confine user input into this widget to numeric values which will fit into the underlying C data types. What is the best way to do this? If the values were only allowed to be integers I'd use a GtkSpinBox (I think that's what it's

Re: gtk Treeview tutorial

2004-11-12 Thread Olexiy Avramchenko
weo wu wrote: HI guys: I'm a newbie in gtk+ , I have many questions about the GtkTreeView .Somebody ever told me that the Gtk+ 2.0 Tree View tutorial is usefull,but I could not visit the websit scentric.net/tutorial/treeview-tutorial. pdf which contains the tutorial (is this url is invalid?). I

Re: Alpha-composition of two pixmaps

2004-10-28 Thread Olexiy Avramchenko
Dmitry M. Shatrov wrote: Hello. As I know, XRender extension allows to compose two X drawables. Coldn't find a wrapper in GDK, though (except one 'non-public' function in a CVS version, that draws a filled alpha blended rectangle). Is there any? And, if not, what is ther reason of complete

Re: show/hide widgets

2004-10-12 Thread Olexiy Avramchenko
Christopher Leopold wrote: It would be great if someone could help me here ... Hello, Can you tell what GTK version are you using and give a code sample ? Olexiy ___ gtk-list mailing list [EMAIL PROTECTED]

  1   2   3   >