Re: GError and gettext. Should I or shouldn't I?

2005-07-26 Thread Tristan Van Berkom
Uzytkownik wrote: Should I use gettext in GError messages? In message is position of error in file. Or it will be print on stdout or for example on GUI show fragment of file. Heh, You made me jump, I've been using error-message to display save/load errors in glade3, dont worry; I just

Re: Doubt about free or dont free

2005-07-26 Thread Tristan Van Berkom
Greg Breland wrote: [...] What really needs to happen(and I believe is in the works) is that the GTK manual needs user comments or wiki goodness. This would solve almost everything except that each function might have too much information before too long. :) While we're on a rant about API

Re: Where the stock items are stored?

2005-07-26 Thread Tristan Van Berkom
Hazael Maldonado Torres wrote: Hi guys Can anyone tell me where are *.[png|xpm] files for the stock items? This mailing list, this week: http://mail.gnome.org/archives/gtk-app-devel-list/2005-July/msg00238.html Cheers, -Tristan

Re: To spawn or not to spawn? This is the question...

2005-07-26 Thread Tristan Van Berkom
The Saltydog wrote: I have an application that performs deep directory recurrent scanning. During such scan, at each iteration, I execute while (gtk_events_pending()) { gtk_main_iteration(); }in order to keep the GUI updated from the directory scans results. It works fine, at an

Re: simple example of gtk-scrolled-window not working

2005-07-26 Thread Tristan Van Berkom
David Morse wrote: [...] The source is attached, hehe, no its not. you can quickly find the changed lines because the originals are commented with the c++ '//' comments. Basically I replaced gtk_window_new() with gtk_scrolled_window_new(), and also gtk_container_add() with

Re: [GObject] Error in unref

2005-07-25 Thread Tristan Van Berkom
Uzytkownik wrote: [...] It's print address, but after it's error of memory. What do you mean by error of memory ? What do I do wrong? finalize isn't calling What does WocPagerParser derive from ? If there is GtkObject in the heirarchy, then gtk_object_sink() needs to be called (or

Re: calling gtk_menu_popup from a button's clicked signal

2005-07-25 Thread Tristan Van Berkom
Hubert SokoĊ‚owski wrote: Hi! I have a GtkMenu which I want to popup when a user clicks a button. my function that is called when user clicks the button looks like this void on_zamowienia_button_print_clicked (GtkButton *button, gpointer

Re: Window Visibility Signal

2005-07-25 Thread Tristan Van Berkom
Kevin DeKorte wrote: What Signal is issued when a window becomes visible or invisible. Say I have a window and other window covers it up, is there signal that is emitted or if a window is uncovered? You'll recieve expose-event whenever X needs to redraw a widget, I think that in cases where

Re: calling gtk_menu_popup from a button's clicked signal

2005-07-25 Thread Tristan Van Berkom
Greg Breland wrote: [...] For example, our product helps users keep track of customers and what they've done for these customers. When our user's phone rings, they instantly hit F6 which is an activity dialog that lets them pick the customer and enter in free form notes. The user is only given

Re: Window Visibility Signal

2005-07-25 Thread Tristan Van Berkom
Kevin DeKorte wrote: [...] Nice tip, but unfortunately the expose event does not signal when the object is covered up. Only when revealed. I even hooked event and event-after and nothing was emitted when I covered up the window. Only events were triggered when I moved the mouse into the window

Re: Question? Broadcast to widget in a window

2005-07-20 Thread Tristan Van Berkom
Carsten Rasmussen wrote: I am new in GUI programming! I just want to know if the is a function in GTK which can broadcast a signal to all member widget of the Window. What do you mean by broadcast a signal ? Do you just want a function to be called for every widget in a container ? You can

Re: getting real widget sizes how and when

2005-07-18 Thread Tristan Van Berkom
Karl H. Beckers wrote: Hi all, Hi, I'm afraid I havent the time to try and deciepher your email, I can see that your having trouble getting the allocated size of your widgets in a viewport. There is a good chance that a widget will never get an allocation untill its actualy shown. I'm

Re: getting real widget sizes how and when

2005-07-18 Thread Tristan Van Berkom
Karl H. Beckers wrote: [...] So maybe the solution to your problem is: Widgets in an area of a GtkViewport that is not shown (i.e. not in part of the scrolled window) /dont have a size/. Well, I've realized that and AM doing a gtk_widget_show before attempting to get the sizes. But the dialog

Re: cloning an object ...

2005-07-11 Thread Tristan Van Berkom
Antonio Gomes wrote: [...] Depending on what you are trying to acomplish, you probably want to forget about cloning objects and take some other approach, but you are welcome to take a look at the `glade_widget_dup()' function in glade-widget.c (cvs co glade3). hu ... I got it. Well, being

Re: cloning an object ...

2005-07-11 Thread Tristan Van Berkom
Antonio Gomes wrote: [...] ANSWER from the list : Make an item with the same name to all the menus, and connect the same callback to both/all of them. This is the only way to do this currently, in the future you can do it with *GtkUIManager* magic, but that's in the future... :( so , there is

Re: Will this create a memory leak? Can't determine from top.

2005-06-28 Thread Tristan Van Berkom
Bartek Kostrzewa wrote: Should I define an array of char pointers *message[TABLE_SIZE][TABLE_SIZE] to hold the pointers created by g_strdup_printf or would that just be a waste of memory? I guess you want to free the string when the object emmiting the signal is finalized, in that case you

Re: Will this create a memory leak? Can't determine from top.

2005-06-28 Thread Tristan Van Berkom
Tristan Van Berkom wrote: Bartek Kostrzewa wrote: Should I define an array of char pointers *message[TABLE_SIZE][TABLE_SIZE] to hold the pointers created by g_strdup_printf or would that just be a waste of memory? I guess you want to free the string when the object emmiting the signal

Re: [GObject, long] Gtype for enum + runtime init or by init function.

2005-06-22 Thread Tristan Van Berkom
Uzytkownik wrote: Hi, You should start off by reading: http://www.le-hacker.org/papers/gobject/ 1. In g_param_spec_enum I must have GType of this enum. a) Why this function need it? Its needed to register metadata about the enum type to the type system, furthermore the object will

Re: What key is now pressed?

2005-06-21 Thread Tristan Van Berkom
Jan wrote: The main idea to know that key press or down in whole system, not only if my window have focus. I think this is as close as it gets using GTK+: http://developer.gnome.org/doc/API/2.0/gtk/gtk-General.html#gtk-key-snooper-install This callback will be called for every key press /that

Re: Any way to disable window decorations (including X button)?

2005-06-08 Thread Tristan Van Berkom
Paul Santa Maria wrote: Hi - I'm implementing a kiosk-style application in GTK+, and it's important to *disable* window resize, minimize, maximize, etc. Is there any way to simply remove window decorations (especially the X close button) from a GTK+ window? Hi, IMO, the kiosk itself

Re: Clarification about gtk_main() and running simultaneous non-gtk functions

2005-06-06 Thread Tristan Van Berkom
Michal Porzuczek wrote: Correct me if I'm wrong but the gtk_main() acts like an infinite while loop that waits for callbacks to the widgets that have been created before gtk_main() was called. gtk_main will run a GMainLoop:

Re: Memory problems with gdk_pixbuf

2005-06-06 Thread Tristan Van Berkom
John Coppens wrote: Hello people. A few weeks ago I posted a message about memory leaking. I haven't solved the problem yet (thanks for a few privately received suggestions though). The example below is taken largely from the GGAD manual, but, if the segment is called repeatedly, allocates

Re: g_thread_init question

2005-06-01 Thread Tristan Van Berkom
Alan M. Evans wrote: Hello all! The docs on developer.gnome.org state that g_thread_init() will abort if called twice and suggest the following construct to avoid multiple calls: if (!g_thread_supported ()) g_thread_init (NULL); Has nobody noticed that there's a race condition there? If I

Re: g_thread_init question

2005-06-01 Thread Tristan Van Berkom
Alan M. Evans wrote: [...] The comparison lacks parity, in my opinion. It seems unlikely to me that a class which uses GtkWidget would be used in a non-GTK+ program. (Class in the C++ sense, not the GObject sense.) I am tempted to argue that class in the c++ sence *is* the same as a class in

Re: Arguments in GObject-based object constructor

2005-05-30 Thread Tristan Van Berkom
Jacob Kroon wrote: [...] What does it mean by delay initialization completion until the property is set ? You can override the constructor in your class_init function see: le-hacker.org/papers/gobject/ and read about the constructor, it is important that you chain up to the real gobject

Re: Newbey Question

2005-04-07 Thread Tristan Van Berkom
Jamiil Abdullah-Alkadir wrote: [...] //Register CallBacks == **Here is the problem 8) gtk_signal_connect(GTK_OBJECT(btnExit), clicked, Quit, NULL); gtk_signal_connect uses functions with any signatures, they must all be cast to `void (*) ()' though first. try:

Re: Using arguments in callbacks

2005-03-23 Thread Tristan Van Berkom
Irwin Michael G DLVA wrote: I'm not sure what exactly you mean by not supporting dlsym lookups for user data. If I just want to pass a single integer as an argument to my callback, is that even possible? And if so, how do I do it? You are correct that I am trying to build the source with glade.

Re: Large files and asynchronous IO

2005-03-18 Thread Tristan Van Berkom
Alexander Lyakas wrote: Hi all, I have been really impressed with GLib, portability and all. There are, however, two features I need, but I am not sure whether they exist. 1) Can I create large files with GLib? (Over 2 GB) That should depend on the filesystem you are using, otherwise; A quick

Re: Pixmaps transparency

2005-03-17 Thread Tristan Van Berkom
Peter Zhelezniakov wrote: Hello GTK developers, I have an external library that draws possibly transparent/translucent images to a GdkDrawable only. I want to capture these images in a pixbuf, but when i try to copy pixels from the drawable (a pixmap), all information about transparency is

Re: can I pass user data to a button callback?

2005-02-15 Thread Tristan Van Berkom
On Tue, 15 Feb 2005 09:32:46 -0800, Paolo Costabel [EMAIL PROTECTED] wrote: [...] can I pass (a pointer to) user data to a button's callback? The compiler wants me to create button callbacks like void (*)(void) -- but what I need is void (*)(void*), at least for the pressed and released

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

2005-02-11 Thread Tristan Van Berkom
On Fri, 11 Feb 2005 09:46:41 +0200, Olexiy Avramchenko [EMAIL PROTECTED] wrote: 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.

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

2005-02-11 Thread Tristan Van Berkom
On Fri, 11 Feb 2005 19:06:44 +0100, Stefan Kost [EMAIL PROTECTED] wrote: [...] The g_object_set() is called from a signal callback that gets triggered by user action and thus already runs gdk_mutex protected. Wrapping this with enter/leave would block. I can wrap the g_object_notify() with the

<    1   2   3   4   5