Re: Problem with threads in my GTK+ application...

2008-07-11 Thread Andreas Stricker
Dutta, Seemanta schrieb: The way I decided to remedy this problem was with the below steps: 1. Call g_thread_init() in the main function before gtk_init() is called. 2. In the callback for 'clicked' signal for the'Burn' button, I use g_thread_create() to create a new thread which will

Re: Mixing of memory allocation methods with application

2008-05-26 Thread Andreas Stricker
Micah Carrick schrieb: When I am working with a structure from this library, I should be using those same functions on those structures right? Because *my* parts of my application (elsewhere) are using the g_ functions. I won't mix them, depending on circumstance, see below. For

Re: Mixing of memory allocation methods with application

2008-05-26 Thread Andreas Stricker
Andreas Stricker schrieb: Micah Carrick schrieb: I would prefer the later one. The first one can easily lead to errors, especially if the glib allocators don't use libc malloc implementation sometime. I should have looked at a recent glib documentation, where it is clearly defined

Re: Query about handling OS signals

2008-04-10 Thread Andreas Stricker
John M Collins schrieb: The signals are sent by the daemon process to tell the receiving clients you might want to refresh your display. It is for the receiving clients to worry about whether they do need to refresh their displays (the actual data is in shared memory). My first question is:

Re: Quitting an application

2008-03-31 Thread Andreas Stricker
Sujith wrote: 1 * Init various GUI elements including the track treeview. 2 * Read the DB and append elements to the treeview. 3 * call gtk_main() and wait for events. What about: 1. Init various GUI elements including the track treeview. 2. Install a g_idle callback. 3. call gtk_main() and

Re: color of vscrollbar

2007-08-10 Thread Andreas Stricker
Jonathan Winterflood schrieb: Maybe we should try and find out whether many people here are strongly annoyed by these messages and in that case make it list policy (or at least Good Practice) that any post sent to it should not have this message. Yes there are many people strongly annoyed by

Re: Performance of GMainLoop

2007-07-26 Thread Andreas Stricker
Tomasz Jankowski wrote: Second thing is GMainLoop's code. I'd like to know how it works. I read code, but it isn't to understand it for me. Are there any articles about it or so interesting threads in mailing list's archive? If i will find something interesting in archive, please tel me where

Re: type-punning warnings with optimizations turned on?

2007-07-06 Thread Andreas Stricker
Alan M. Evans schrieb: struct MyMutex { GStaticMutex mutex; }; Unless you add a define like typedef MyMutex MyMutex you have to add the struct keyword. Otherwise this is an incomplete type the compiler grouch about: MyMutex * MyMutex_new() {

Re: type-punning warnings with optimizations turned on?

2007-07-06 Thread Andreas Stricker
Jonathan Winterflood schrieb: Wouldn't that be typedef struct MyMutex MyMutex; rather? Or for short : typedex struct _MyMutex { GStaticMutex mutex; } MyMutex; Exactly. I should read my mail again, before sending it Cheers, Andy ___

Re: Gtk with .po files

2007-06-27 Thread Andreas Stricker
David Nečas (Yeti) wrote: Ignore the inti parts there, though. I'd rather point to http://www.gnu.org/software/gettext/manual/gettext.html and after groking the basic concepts, look at any internationalized Gtk+ application as working real world examples are better than tutorials. I

Re: Virtual list boxes (using GtkTreeView or other)

2007-06-01 Thread Andreas Stricker
Nuno Lucas schrieb: How people do with very large list boxes? I was hopping I could have some form of just seting up the column headers and say I have 1 rows and let the widget ask me for the data when it needs it. It seems a bit heavy to add 1 rows one at a time, as it seems I'm

Re: How to create a simple multilingual GUI

2007-05-16 Thread Andreas Stricker
Michelle Konzack wrote: Am 2007-05-14 20:43:42, schrieb David Ne?as (Yeti): On Mon, May 14, 2007 at 08:04:09PM +0200, Michelle Konzack wrote: Does setlocale(LC_ALL, de_DE); not work? It works. Future locale-dependent calls will use the new locale. So if you do this while your

Re: serial ports

2007-05-15 Thread Andreas Stricker
Pavel A. da Mek wrote: When I want to use serial ports, shall I write separate code for Windows and for Linux, or is there some library function which would allow to do it in the platform independent way? I have written portable code for this with timeouts for read and write operations.

Re: Native character isn't supported by gtk+.

2007-04-02 Thread Andreas Stricker
David Nečas (Yeti) schrieb: On Sun, Apr 01, 2007 at 07:58:53PM +0800, Kun Niu wrote: I ran my application in console mode once. No error message appears. If you do not link it as a console app, you won't see anything, the system does not give the program meaningful standard streams even

Re: A few drawing questions

2007-02-20 Thread Andreas Stricker
Mark A. Nicolosi wrote: Hi, I'm working on a game and I was wondering what would be best to use for drawing? I'm having a hard time figuring out how all the different drawing APIs fit together. As far as I can tell there is GDK, Cairo, GnomeCanvas (dead?), and other things like GooCanvas.

Re: gdk_pixbuf_save crash saving JPEG when linking against gtkmozembed libraries

2007-01-12 Thread Andreas Stricker
INC=`pkg-config gtk+-2.0 --cflags` #LIB=`pkg-config gtk+-2.0 --libs` -- works!! LIB=`pkg-config gtk+-2.0 xulrunner-gtkmozembed --libs` -- crash all: gcc -g -Wall example.c $(INC) $(LIB) -o sample When linking without xulrunner-gtkmozembed works fine, but

Re: How to capture mouse movements independend of a Window?

2007-01-11 Thread Andreas Stricker
I need to move my cursor in a curve plotted in the window,using keyboard...how can i do it?? You should have read this whole thread. Then you find this documente here: gdk_display_warp_pointer() http://developer.gnome.org/doc/API/2.0/gdk/GdkDisplay.html#id2533888 The following note is from

Re: How to capture mouse movements independend of a Window?

2007-01-09 Thread Andreas Stricker
[EMAIL PROTECTED] wrote: Yo! hope you started well the new year. Good new year to you too. But the main problem remains: Once the pointer (Pirate!!) touch the border or the window, the mouse coordinate don't change anymore. Well, that's what the fourth argument of GdkPointerGrab is for. If

Re: How to capture mouse movements independend of a Window?

2007-01-03 Thread Andreas Stricker
Yo tomas! OK, here is a rough sketch (tested). As soon as the pointer crosses the window boundary (inward), it is grabbed (the app changes the cursor's appearance to show it). WARNING! IT IS A TRAP! Once your pointer is inside, you won't be let out. See to it that you have a console around

Re: How to capture mouse movements independend of a Window?

2006-12-29 Thread Andreas Stricker
I try to do something that is similar to some 3D projection plan window rotating/shifting function: When a key is pressed, the relative mouse movement should be recorded. I'm primary interested if somebody solved a similar problem or got an idea how to solve this. If you think it's

How to capture mouse movements independend of a Window?

2006-12-27 Thread Andreas Stricker
Hi I try to do something that is similar to some 3D projection plan window rotating/shifting function: When a key is pressed, the relative mouse movement should be recorded. I'm primary interested if somebody solved a similar problem or got an idea how to solve this. I like to use a

Re: Internationalization of GTK Apps (change language)

2006-09-26 Thread Andreas Stricker
John Cupitt wrote: On 9/25/06, Andreas Stricker [EMAIL PROTECTED] wrote: * There is a good howto somewhere, but I can't find it anymore I found these two helpful: http://www.gnome.org/~malcolm/i18n http://developer.gnome.org/doc/tutorials/gnome-i18n/developer.html Don't know

Re: applications working on uid 0

2006-09-25 Thread Andreas Stricker
chabayo wrote: ...the main problem is the execution of program code suppoesed to processed in uid 0 - system is Linux The fact: I tried to handle the events in /proc/acpi/events by my own application which integrates gtk handled display interaction. Because /proc/acpi/events is gid=0

Re: Internationalization of GTK Apps (change language)

2006-09-25 Thread Andreas Stricker
Madhusudan E wrote: Hi All, I want my applications to be internationalized. I have included in my app #include glib/gi18n.h and I have set LC_ALL = zh_TWBig5 And I'm using the following way to describe my labels gtk_label_new ( _(Exit)); But my app is not reflecting the

Re: Subject Prefix in the mailing list

2006-07-03 Thread Andreas Stricker
Sander Marechal schrieb: Adding prefix makes subjects less readable. Ack. Especially because it's a /prefix/: The important part is moved right and cropped in longer subjects. Just filter it by Sender header and put it in different folder. If you use IMAP it can be done on server side (eg. using

Re: debugging information

2006-06-20 Thread Andreas Stricker
Yiannis schrieb: Sorry if this is beyond the scope of this list but on the following message (md:2198): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed which is a runtime error I am wondering what is the (md:2198). Yes md is the program name... but

Re: Application runs slowly, crashes when wiggling the mouse quickly

2006-06-19 Thread Andreas Stricker
[EMAIL PROTECTED] wrote: I just thought of something else. I'm using asynchronous IO, which means that data coming into my serial port (caught via a kernel signal) can interrupt the gui and call some other code, which in turn tells the GUI to update various parts of it. Is it possible that

Re: GtkEntry font in rc file

2006-04-18 Thread Andreas Stricker
All I want to do is change the font of a named GtkEntry widget in a resource file. It used to work in gtk1.2. I have spent hours with various combinations of widget *.name.* etc. to no avail. Does anyone know how to do this in gtk2 ? You didn't describe exactly what you did. What name has

Re: problem: gtk_image gives critical error

2006-04-18 Thread Andreas Stricker
When I print the address of p in the funcl it prints a address. In the callback function it also prints the same for ptr. Then what's the problem. Whether the address keeps the same or not, it points to an invalid position in memory. This is quite basic C skill. Also I use structures to

Re: Screen Resolution

2006-04-10 Thread Andreas Stricker
Sandy K wrote: When i add an image in a window, it is displayed properly only in some screen resolution. I have a screen resolution of 1024 * 768. The window is displayed properly in this resolution. But when the resolution is changed to either 800*600 or 640*480, then the window screen goes

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

2006-03-17 Thread Andreas Stricker
John (J5) Palmieri wrote: Yes. It depends on your application. Some people will subclass a GObject and add the window object plus all of the other widgets as aggregates. If you are feeling more daring you can subclass your main window where your app class would inherit from GtkWindow.

Re: Handling Unix signals in a GTK+ application

2006-03-13 Thread Andreas Stricker
Thomas Okken schrieb: I would like to catch SIGINT in my GTK+ application, to do a graceful exit. I was looking for the GTK+ equivalent of XtNoticeSignal(), but I guess there isn't one; No, I'm missing them too... I read a few articles discussing the use of a pipe, with an input source to

Re: best way to pass data around

2006-01-30 Thread Andreas Stricker
typedef struct Data_To_Be_Sent { GtkWidget *scrolled_window_data_to_be_sent; GtkTextBuffer *buffer; GtkWidget *view_data_to_be_sent; int sockfd; } Data_To_Be_Sent; My question is, is there a better way to do this? Is using a typedef struct a good idea? my grasp

Re: Simple GDK app segfaults for unknown reason

2006-01-20 Thread Andreas Stricker
Laszls Monda schrieb: Hi List, I've just written a simple GDK application that basically converts an input JPEG image to a BMP using a Pixbuf. Unfortunately it segfaults. 8 #include gtk/gtk.h int main(int argc, char *argv[]) { gdk_init(argc, argv); GError **error = NULL;

Re: Fade between two images (dissolve)

2006-01-16 Thread Andreas Stricker
Saul Lethbridge wrote: I'm wanting to load two images and fade between them much like the ImageMagick command: composite --dissolve 100 image1.jpg image2.jpg output.jpg However I'm wanting to display the image as it dissolves from one image to the other - so it will apear as if one image is

Re: Fade between two images (dissolve)

2006-01-16 Thread Andreas Stricker
Justin Clift wrote: Wow, interesting way to encourage a newbie. :( Sorry that was accidental. As Andy suggested, is using the ImageMagick command itself acceptable, then doing some kind of buffer flipping onto screen? To be more obvious: ImageMagick provides a convenient image manipulation

Re: Custom icons

2005-12-12 Thread Andreas Stricker
Luke Biddell wrote: And while working I always have to do a make install if I change either the pixmaps or the glade file so at runtime they can be found. I'd love to know a better solution. Maybe the solution's not the use glade? I'm not aware of another solution. I ended up by letting the

Re: Label text does not span width of container

2005-11-30 Thread Andreas Stricker
Nicodaemus wrote: I have a simple program with a label on the main window. I place some text in the label and set the 'set_line_wrap' property of the label to True. However, when I run the script I notice that the text in the label does not span the entire width of the window, as there are

Re: Setting the background color of a GtkEntry

2005-11-25 Thread Andreas Stricker
Michal Kepien schrieb: The white part of a text-accepting widget uses the base color, not the bg color. The only way I know to set that is with a style: style myEntry { base[NORMAL] = #ff# or whatever } class GtkEntry style myEntry You can load this setting by placing that text in

Re: SIGABRT due double free

2005-11-24 Thread Andreas Stricker
Fernando ApesteguXa schrieb: I'm developing a gtk/gnome application with two threads. An schema of the application is this: [SNIP] thread_func is updating data periodically with a sleep pause. At this point, I suppose the other thread is catching events normally (in fact, tabs of the

Re: assertion `GTK_IS_PROGRESS_BAR (pbar)' failed when closing the window while the progress bar is pulsing

2005-11-11 Thread Andreas Stricker
Colossus schrieb: It appears in my app that when a progress bar is pulsing and I close the window by clicking on the X upper right button I receive the message in the subject. If I wait for the progress bar to finish pulsing I don't get the warning. Why this ? It seems like the window

Re: GTK + Xine

2005-11-10 Thread Andreas Stricker
christophe schrieb: What kind of widget sould i include in my GTK Glade designed application in order to include a libxine based video viewer window ? Are there some basic examples or docs about that ? Custom made widget are added with the custom widget. This one needs a callback function

Re: redirecting output to a file with g_spawn_async

2005-10-06 Thread Andreas Stricker
Colossus wrote: g_io_channel_read_line ( ioc, line, NULL, NULL, NULL ); if (line != NULL ) { fwrite ( line, 1, strlen(line) , fd ); g_free (line); } Come on, read this code carefully: If you assume that you alway extract text-only data,

Re: msgfmt -c

2005-09-20 Thread Andreas Stricker
Roger Leigh wrote: It's also worth mentioning here that glib-gettextize is way out of date and should not be used (it should be removed and replaced with a wrapper around autopoint). Now that gettext provides autopoint, there is no need for glib-gettextize. glib-gettextize doesn't exploit

Re: Changing button-font in rc file

2005-08-19 Thread Andreas Stricker
sadhees kumar wrote: 1. I would like to know how to change the fonts of a button through rcfile. The way which i tried was something like, font = -adobe-helvetica-medium-r-normal--*-100-*-*-*-*-*-* Try font_name instead of font: font_name=Verdana Bold 34 2.In the same example above, I

Re: Changing where the max/min values are on Scale Widgets

2005-07-19 Thread Andreas Stricker
Michal Porzuczek wrote: When you create a gtk_hscale the lower limit is automatically at the top and upper limit at the bottom is there a way of changing this? Have a look at gtk_range_set_inverted() Cheers, Andy ___ gtk-app-devel-list mailing list