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

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: 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: 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: 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: 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: 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: 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: 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: 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: 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: [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: 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: 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: 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: 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: [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: Scree Updating - Updating toooo soooow

2005-07-26 Thread Tristan Van Berkom
John Cupitt wrote: On 7/26/05, Przemysław Więckowski [EMAIL PROTECTED] wrote: Could you please tell me. What would be faster: directly putting prepared pixmap using gdk_draw_drawable(..) as rectangle or drawing rectangle using gdk_draw_rectangle(..)?? ( i heve't tested it so i ask...) You

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

2005-07-28 Thread Tristan Van Berkom
The Saltydog wrote: [...] Yes, I have just realized that! I am changing to G_TYPE_UINT64. But, do you think that this could generate a segfault on PowerPc and amd64, and NOT on i386? Absolutely, try doing calling : g_object_set (object, long-property, (gchar *value),

Re: Providing gtk_main() with asynchronous data

2005-08-01 Thread Tristan Van Berkom
Pat Mahoney wrote: [...] The GSourceFuncs prepare and check are only passed the GSource and no other data. Thus, the only way they can check any variable is through a global variable. Now, my program would like to dynamically create several (likely never more than 3-5) threads to feed the

Re: GdkEvent -- XEvent

2005-08-03 Thread Tristan Van Berkom
Brian J. Tarricone wrote: [...] I'm relatively sure the XEvent is indeed lost by the time you see it in your event handler. If you'll look at the various XEvent and GdkEvent structures, however, you'll note that they're fairly similar (I think it's safe to assume GdkEvent was originally based

Re: I don't think I need a custom widget

2005-08-03 Thread Tristan Van Berkom
Greg Breland wrote: [...] This sounds like a workable idea as long as it won't alter the allocation request of the child widget. You mean the size-request (aka GtkRequisition) ? Usually a size-request isn't needed on a widget, but you shoulnt allow a widget to have an allocation that is

Re: gdk threads enter/leave not enough?

2005-08-11 Thread Tristan Van Berkom
Fe Kater wrote: This sounds very strange, are you wrapping all your gtk+ api accessing code in enter/leave in all threads (including the parent) and only from event sources (i.e. not in signal handlers that are fired by gtk widgets) ? I never call gtk+ directly but have my own wrappers

Re: gdk threads enter/leave not enough?

2005-08-15 Thread Tristan Van Berkom
Felix Kater wrote: Tristan Van Berkom [EMAIL PROTECTED] wrote: I never call gtk+ directly but have my own wrappers which take care of gdk_threads_enter/leave. So I am sure I haven't forgotton it somewhere. This could be dangerous, you'll deadlock if you call threads_enter from a signal

Re: gobject reference question

2005-08-15 Thread Tristan Van Berkom
Wallace Owen wrote: How can I see what the current reference count is, so I can be sure I'm using g_object_ref() and g_object_unref() correctly? You can check G_OBJECT (object)-ref_count, note that it is fundementally wrong to do any conditional code based on this (for the same reason you cant

Re: gdk threads enter/leave not enough?

2005-08-15 Thread Tristan Van Berkom
Felix Kater wrote: [...] b. It is not possible to savely call gtk/gdk functions from different threads using gdk_threads_enter/leave only (see my original post). In this case a thread enters gdk_threads_enter() although is shouldn't. My workaround: Use flags and let gtk functions be called from

Re: XGrabKey

2005-08-17 Thread Tristan Van Berkom
Alex Levin wrote: Hi Mario. I did something very similar in my app. Now that you are using X functions to process those keys, you need to handle them with X instead of GTK. So, keep your GTK key handler for regular keys, but for the keys you've grabbed use something like the following. I'm

Re: Resizing an image widget

2005-08-22 Thread Tristan Van Berkom
LaundroMat wrote: Hi all - First time here, thanks for having a look at this. I have a window, consisting of a horizontal box, with 3 vboxes in it. One vbox contains an image, another a set of labels and the third has text entry widgets. How can I resize the image to the unexpanded size of

Re: GdkPixbuf and FIFO's

2005-08-22 Thread Tristan Van Berkom
Alex Levin wrote: Hi everyone. I'm trying to pass a GdkPixbuf object through a FIFO from one thread to another. Does anyone have any code snippets which does something similar to this? Thanks in advance. You should be able to serialize what you need by only piping a GdkPixData struct

Re: Resizing an image widget

2005-08-22 Thread Tristan Van Berkom
LaundroMat wrote: I realise I wasn' t too clear in my mail. The thing is, I have a window with essentially 3 boxes: A B C A = image B = labels C = text entry The height of B (and C for that matter) is smaller than that of A. But I would like to resize A to the height of C. If you set the

Re: gtk_button_set_markup / animation / background color

2005-08-25 Thread Tristan Van Berkom
ramare wrote: Dear all, I'm working on the look and feel of my gtk application. -- first : many thanks for those who developped this stuff :-) -- second : gtk_label_set_markup is great but how do I do that with button instead ? The only way is to put a label

Re: TreeView expander questions (again)

2005-09-01 Thread Tristan Van Berkom
Wallace Owen wrote: I'd like all the data I put in a treeview visible all the time (fully expanded). Is there a way to make new child rows in my treeview expended when the model tells the view that the row has been added, or must I call gtk_tree_view_expand_all()? Is there a way to make the

Re: simple question: are const gchar* arguments hold as copies internally?

2005-09-06 Thread Tristan Van Berkom
Felix Kater wrote: Hi, these two functions take const gchar pointers: void gtk_label_set_text([...] const gchar *str); void g_key_file_set_value([...] const gchar *group_name, [...]) Does that mean that the arguments are *not* hold as copies internally so that I have to care for the allocated

Re: Focus on Notebook tab

2005-09-09 Thread Tristan Van Berkom
sadhees kumar wrote: Friends, I am using GtkNotebook widget, it has 7 pages.i want to navigate all the pages.In my project i am using GDK_Tab key for navigating to next page. This is done in the GtkNotebook widget's keypress callback function. The problem is i'm not getting the focus in

Re: Focus on Notebook tab

2005-09-09 Thread Tristan Van Berkom
Tristan Van Berkom wrote: sadhees kumar wrote: Friends, I am using GtkNotebook widget, it has 7 pages.i want to navigate all the pages.In my project i am using GDK_Tab key for navigating to next page. This is done in the GtkNotebook widget's keypress callback function. The problem is i'm

Re: widget's signal callback: inside gdk lock?

2005-09-19 Thread Tristan Van Berkom
Fe Kater wrote: Hi, I wonder if the callback function I connect to a widget's signal (like toggled signal of a checkbutton) is already inside the gdk lock--or if I have to take care of gdk_threads_enter/leave with any code inside this callback function? Since signals are run synchronously

Re: widget's signal callback: inside gdk lock?

2005-09-19 Thread Tristan Van Berkom
Felix Kater wrote: [...] a. The lock is already aquired by gtk when the button is toggled by the user's mouse click--so the callback is already (automatically) inside the lock from the client programmer's view. b. The lock has to be aquired explicitly by the client programmer who is using gtk

Re: keeping track of time.

2005-09-20 Thread Tristan Van Berkom
John Vetterli wrote: [...] Use g_timeout_add to execute a callback function periodically. http://developer.gnome.org/doc/API/2.0/glib/glib-The-Main-Event-Loop.html The interval may not be terribly accurate, but if I understand your needs, this is not important. The callbacks would only cause

Re: GtkExpander label widgets (using buttons as)

2005-09-25 Thread Tristan Van Berkom
David Caldwell wrote: I have a GtkExpander and I set its label widget to an hbox to which I added a label and 2 buttons. They all display nicely, but the buttons don't work properly. When I click on them it activates the expander instead of the buttons themselves. Actually, a couple of the

Re: Displaying intermediate button images.

2005-09-26 Thread Tristan Van Berkom
Rich Burridge wrote: [...] What do I need to do to make the intermediate images appear? You should read a little of this: http://developer.gnome.org/doc/API/2.0/glib/glib-The-Main-Event-Loop.html The problem is that you are hijacking the mainloop, in GTK+ programming, you must let GTK+

Re: Displaying intermediate button images.

2005-09-27 Thread Tristan Van Berkom
Rich Burridge wrote: [...] Can I ask a favour please? Could you adjust the reve_sleep() routine in the attached small program to use a g_timeout_add() to do the pausing? The problem with your program is not with reve_sleep(), the problem is that you have a reve_sleep() function at all, in

Re: Displaying intermediate button images.

2005-09-27 Thread Tristan Van Berkom
Rich Burridge wrote: Hi Tristan, Can I ask a favour please? Could you adjust the reve_sleep() routine in the attached small program to use a g_timeout_add() to do the pausing? You seemed to have ignored the revised small attached program that I sent you and gone back to my first version.

gtk_window_set_position [ was (no subject) ]

2005-10-06 Thread Tristan Van Berkom
Kurucz Istvan wrote: Hy! I would like that, the visiting-card window is present in the middle of modaled main window. I no purpose use the gtk_window_set_position (MainWindow, GTK_WIN_POS_CENTER_ON_PARENT) funciton, the visiting-card window always present an other, outside of the main

Re: Text Label on top of button Image

2005-10-11 Thread Tristan Van Berkom
Bill Sousan wrote: [...] I tried using both the button's label and image. However, it always appeared to want to push the image to one side of the button, and push the label to the other side of the button. I was not able to find a way to overlay the label on top of the button image.

Re: Multithreading and GTK widgets

2005-10-17 Thread Tristan Van Berkom
Alan M. Evans wrote: [...] I would have the GUI thread update the list/tree models, but the GUI thread spends most of its time sitting in gtk_main. Ofcourse it does, Anything that a GTK+ gui does is inside gtk_main(), you can get the gui thread to do the updating by passing the appropriate

Re: multiple calls to g_io_channel_read_line and g_free question

2005-10-18 Thread Tristan Van Berkom
Colossus wrote: Hi, I have a doubt. I call g_io_channel_read_line several times this way: g_io_channel_read_line ( ioc, line, NULL, NULL, NULL ); //do some things on line //shall I g_free (line) here ? g_io_channel_read_line ( ioc, line, NULL, NULL, NULL ); //ecc My doubt is: shall I free

Re: Programming style

2005-10-24 Thread Tristan Van Berkom
Gus Koppel wrote: Tristan Van Berkom wrote: Every widget callback comes with a user_data argument, and you can pass the desired data through that argument (which is just as fast as using a global variable and is just as clean as using a lookup_widget type of routine). Right. However

Re: data acqusition, display and control

2005-10-25 Thread Tristan Van Berkom
Premsagar C wrote: [...] Tristian, A timeouthandler did the job howvever I still have a few bugs. My data acuqisition is working and getstting displayed on my text widget as I have included my timeout in the main . On clicking a button i require to stop the data acqusition and do a few other

Re: data acqusition, display and control

2005-10-25 Thread Tristan Van Berkom
Premsagar C wrote: [...] Tristan, Heres the basic gist of my prgram My data acquistion is done in a dialog box called teleop defined by the function teleop void teleop { // define my 6 text boxes to dispaly values from my 6 ckts plus my snap shot button and another textbox obj and a menu button

Re: Problem sending data to gtk_button on clicked event

2005-11-09 Thread Tristan Van Berkom
Evan Behar wrote: I've been getting seg-faults when I try to work with data in my button clicked callback functions, so as a test, I compiled and ran the following program: Be carefull how you prototype your callbacks, for example; the GtkButtonClass's closure for the clicked signal will

Re: swap images on click event.

2005-11-28 Thread Tristan Van Berkom
Craig Harding wrote: Hi, I'm trying to change an image with another when I click on my applet button, but it doesn't work, can anyone help me out? CODE: play_button = gtk_image_new_from_file (/usr/local/pixmaps/play.png); pause_button = gtk_image_new_from_file(/usr/local/pixmaps/pause.png);

Re: signals and threads

2005-12-05 Thread Tristan Van Berkom
Dmitry A. Yanko wrote: Hi! I develop the app, that needs to run 2 same windows, each in separate thread. I have a same signal handlers in each thread. The difference is only in thread specific data, because i need to make a different things in different threads. Example: ...

Re: signals and threads

2005-12-05 Thread Tristan Van Berkom
Dmitry A. Yanko wrote: On Mon, Dec 05, 2005 at 11:55:57AM -0500, Daniel Atallah wrote: You can use g_idle_add() to trigger your UI updates from your data processing threads. Ok. Thanks a lot. I will try. Will it also resolve my hignal handlers problem? Every signal callback registered to a

Re: signals and threads

2005-12-07 Thread Tristan Van Berkom
Dmitry A. Yanko wrote: On Mon, Dec 05, 2005 at 01:50:40PM -0500, Tristan Van Berkom wrote: [...] My app architecture: Main: g_thread_init(); gdk_threads_init(); Thread_A: gtk_init(); gtk_main(); Thread_B: g_idle_add(); - create window

Re: signals and threads

2005-12-07 Thread Tristan Van Berkom
Dmitry A. Yanko wrote: [...] Its better to use the gthread api only; while using pthreads directly might work, it wont be portable it wont be garaunteed to work properly either. Ok. What about a sockets and file io? Glib has such support, but it's more convenient for me to make direct calls

Re: Events and derived objects

2005-12-14 Thread Tristan Van Berkom
Eduardo M Kalinowski wrote: [...] I've achieved capturing some specials keys, but letting everything else work as normally in the TextView by connecting a handler to a key-press-event of the TextView inside the derived widget's implementation, but I have'nt discovered how to propagate keys

Re: Events and derived objects

2005-12-15 Thread Tristan Van Berkom
Eduardo M KALINOWSKI wrote: [...] What is happening is that the user signal handler is being run only after the default handler, even if g_signal_connect (not after) is used, but it should happen before. Hi, what you're saying stikes me as odd; this is the declaration of key-press-event

Re: Events and derived objects

2005-12-16 Thread Tristan Van Berkom
Eduardo M KALINOWSKI wrote: [...] However, I find that solution not nice. The derived object structure should be considered opaque, for example. I would like to connect the signal to the derived object iself, not to widgets inside it: g_signal_connect(G_OBJECT(derived_object), ...) and have

Re: If this starts another flamewar please ignore: Why do you think Linus Torvalds made the statement against Gnome?

2005-12-20 Thread Tristan Van Berkom
Yiannis wrote: For those not knowing the story... Linus Torvalds made the following statement and is posted on 13/12/05 This 'users are idiots, and are confused by functionality' mentality of Gnome is a disease. If you think your users are idiots, only idiots will use it. I don't use Gnome,

Re: Button can't be clicked.

2005-12-21 Thread Tristan Van Berkom
[EMAIL PROTECTED] wrote: [...] Under the above condition, I operate a pointing device(mouse cursor) as follows. 1. Focused on the button. 2. Clicked the button. - then the sensitive of the button turns FALSE. 3. Focused out from the button. 4. Again, focused back in to the button. -

Re: is it possible to have a widget act as insensitive but look as it is sensitive?

2005-12-27 Thread Tristan Van Berkom
Yiannis wrote: Hi, is it possible to have a widget (a toggle button in particular) act as insensitive but look as it is sensitive. More specific is it possible to have a toggle button act as insensitive once activated but look sensitive, ie without the grey shade? Whatever you're doing,

Re: is it possible to have a widget act as insensitive but look as it is sensitive?

2005-12-30 Thread Tristan Van Berkom
Yiannis wrote: Sorry for posting back but my code failed :) [...] Try doing: static GdkColor *insensitive_colour = NULL; static GdkColor *normal_colour = NULL; /* ... When initializing ... */ label = gtk_label_new (); insensitive_colour = gdk_color_copy ((GTK_WIDGET

Re: Tiled Image with GdkFill?

2006-01-04 Thread Tristan Van Berkom
Ronald Vincent Tarrant wrote: Hi all, Does anyone know how to tile an image as a background in a widget? I'm thinking it has something to do with GdkFill types (such as GDK_TILED) but I don't see any example code. In fact, I'm not at all clear on how to use a GdkFill type at all. Any

Re: array of entry?

2006-01-09 Thread Tristan Van Berkom
Juan Pablo wrote: [...] Thank you all for your help...and pacience!!! :D I think you want GtkTable. Cheers, -Tristan ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org

Re: Tell me about difference between g_signal_connect and g_signal_connect_after

2006-01-12 Thread Tristan Van Berkom
Cool Guy wrote: In reference, g_signal_connect : The handler will be called before the default handler of the signal. g_signal_connect_after : The handler will be called after the default handler of the signal. But, I don't know why is different g_signal_connect and g_signal_connect_after.

Re: images inside labels

2006-01-30 Thread Tristan Van Berkom
devel wrote: I have a gtknotebook that I would like to put small images inside the tab labels. I've looked around, but haven't seen how to do that. I am willing to bet that it can't be done, but I'll just ask as a last resort. Thanks. Hmmm how much you wanna bet ? heh, so do you want images

Re: images inside labels

2006-01-30 Thread Tristan Van Berkom
Stefan Kost wrote: hi, you need to put in an event box first. the tab has no window. eventbox(hbox(icon,label)) Hmmm, are you certain of this ? I think GtkLabel is also GTK_NO_WINDOW, and is usually the type of widget for tab-label's in the notebook... I would expect this requirement to be

Re: GTK and threaded applications

2006-01-31 Thread Tristan Van Berkom
kornelix wrote: Following the guidelines in the FAQ, I constructed my application threads as follows: gdk_threads_enter();// enter thread (do some work, including GTK calls) gdk_flush();// exit thread gdk_threads_leave(); return 0;

Re: Urgent help required

2006-02-01 Thread Tristan Van Berkom
Lalit Kumar wrote: Dear all, when compiling my application which contain following code snippets shows an error error: request for member 'widget' in something not a structure or union . gnome_app_create_menus (GNOME_APP (spell_chk_win), menubar1_uiinfo); gtk_widget_ref

Re: Threads/IPC/???

2006-02-13 Thread Tristan Van Berkom
Ed Kutrzyba wrote: I am developing an application that controls a Data Collection System. I used glade and anjuta for my GUI and C backend control coding. My program works great, but I need to add some extra backround tasks: 1) I need to run a script (perl or bash) on demand without

Re: Activate a row in GtkTreeView manually?

2006-02-15 Thread Tristan Van Berkom
Noonan, Michael (DCOI) wrote: Hey everyone, I was wondering if I could trouble you all for some help with a GtkTreeView. Is there a function to activate a row in a GtkTreeView manually. I have an application that updates on changed signals from user input. However I need to change the

Re: Threads and waits

2006-02-15 Thread Tristan Van Berkom
Fernando Apesteguía wrote: Hi, I have an app. that runs two threads, the main one and other thread that collects information from files. I launch the thread by calling pthread_create and here comes my first question ¿Should I use g_thread_create instead? Now I have no problems with these

Re: How to identify the idle state of the GTK+ application?

2006-02-15 Thread Tristan Van Berkom
Gus Koppel wrote: sadhees kumar wrote: In my GTK application, If no action(event) is taken place in the screen, I need to turn OFF the backlight of an TFT monitor. If any key pressed, or mouse movement occured, I need to turn ON the backlight. I have the API for toggling the

Re: Message dialog wont close

2006-02-15 Thread Tristan Van Berkom
Mathew Bielejeski wrote: [...] This code is run in its own thread and these are the only gtk calls that are made in the entire program. Do I need to have a gtk_main() in order for it to work? Yes; you need to run gtk_main(). Cheers, -Tristan

Re: Problem with GValue

2006-02-17 Thread Tristan Van Berkom
Maciej Piechotka wrote: On 2/17/06, Fernando Apesteguía [EMAIL PROTECTED] wrote: Sorry if this is so trivial... Did you try to g_free it? Best regards! Sorry. I didn't understand g_value_init function. Sorry. Wait... hold your horses ! ;-) If a GValue has been

Re: When do i have to use g_signal_stop_emission_by_name () ?

2006-02-17 Thread Tristan Van Berkom
Juan Pablo wrote: Just that. In short: Hope you never do :) I actually thought the description here makes sence: http://developer.gnome.org/doc/API/2.0/gobject/gobject-Signals.html#g-signal-stop-emission Umm, lets see... not to delve too far: o Many handlers may be connected to the

Re: tooltips

2006-02-19 Thread Tristan Van Berkom
Paul Pogonyshev wrote: Tristan Van Berkom wrote: Paul Pogonyshev wrote: [...] But I have many areas, the widget is much like two-dimensional grid. There can easily be like 100 areas. Think of GtkTreeView with many columns. Besides, it seems that GtkTooltips works only with widgets

Re: strstr for g_strrstr?

2006-02-22 Thread Tristan Van Berkom
Juan Pablo wrote: should i use g_strrstr to do strstr search? definitely not, g_strrstr will find the laste occurence, strstr will find the first ! should i take into account something about the utf8 stuff?? Well that depends; are you displaying the charachters in this string ? are they

Re: Can a treeview do this?

2006-03-01 Thread Tristan Van Berkom
Gus Koppel wrote: kadil wrote: [...] (1) the first child to be in the column next to the parent. (2) subsequent children to be below the first child (3) parent cells are to vertically span the child rows (4) I need visible borders between the cells (5) Just to be difficult, I want to code in

Re: box around a GtkLabel

2006-03-06 Thread Tristan Van Berkom
Wallace Owen wrote: On Fri, 2006-03-03 at 17:27 -0500, Zvi Sebrow wrote: Wally, I thought about using a frame, but i couldnt find a way change the width of the lines (of the framei), or the color of the lines. Is there a way to do that? If you want your stuff to deviate from the default

Re: problems when using g_main_loop_quit from different thread

2006-03-09 Thread Tristan Van Berkom
Armin Bauer wrote: Hi everyone, i am experiencing random problems here if i use g_main_loop_quit from a different thread than where the GMainLoop runs. my program looks like this: 1. in main: create a new context and a new loop 2. spawn a thread 3. call g_main_loop_run in the thread on the

Re: problems when using g_main_loop_quit from different thread

2006-03-09 Thread Tristan Van Berkom
Tristan Van Berkom wrote: My guess is that it just doent make sence to remove the mainloop while the other thread is sleeping in poll(), sure the code will lock its mutex and everything; but when the other thread wakes up; how could it deal with a gone mainloop ? Scratch that; doesnt make any

Re: problems when using g_main_loop_quit from different thread

2006-03-09 Thread Tristan Van Berkom
Armin Bauer wrote: Is this a known problem or am i doing something wrong? Heh, I think I figured it out; I think that after calling g_main_loop_quit(); if the thread is sleeping, you'll have to call g_main_context_wakeup() on it for _run() to return; I wonder if that is a bug or should be

Re: Possible to use a gtk_timeout without a gtk_main loop

2006-03-13 Thread Tristan Van Berkom
Noonan, Michael (DCOI) wrote: Hi Folks, I was wondering would it be possible to have a gtk_timer running outside of the gtk_main loop. I have a separate process that needs to interact with a Gtk application every n seconds and I was wondering if I could set a gtk_timer using gtk_timeout_add()

Re: what's the best way to handle variables and objects?

2006-03-15 Thread Tristan Van Berkom
Andreas Kotowicz wrote: [...] but what should I do if I want to modify any other variables in this function as well? let's say that in the part where I created the g_signal_connect there are also some variables A and B which might be of interest in clear_timer_cb. should I create a struct

  1   2   3   4   5   >