Re: Error in GTK+ documentation
2007/11/20, Dan H <[EMAIL PROTECTED]>: Hi Dan, > This needs to be changed in the docs. Maybe someone on this list can bring it > to the attention of whoever is responsible. please just file a bug into bugzilla [1] product GTK component docs. cheers -- Gian Mario Tagliaretti +++ [1] http://bugzilla.gnome.org/ ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Error in GTK+ documentation
Hello, Sez the GTK+ documentation (in my case it's version 2.8.20, but the current API doc hasn't changed in this respect): void gtk_container_child_get (GtkContainer *container, GtkWidget *child, const gchar *first_prop_name, ...); ... : a NULL-terminated list of property names and GValue*, starting with first_prop_name. Well, the latter ain't true. I tried to get position information about things packed into a gtk_table using the above function and found that the call made the passed-in GValue pointers invalid. Just for giggles I passed pointers to the appropriate child property types (guint in this case), and presto, got out the right values. The first member of a GValue struct is the GType, not the content, so no wonder if some function stuffs junk into that it messes up the GType system. This needs to be changed in the docs. Maybe someone on this list can bring it to the attention of whoever is responsible. Thanks, --D. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: How to get stuff out of a GValue?
On Tue, 20 Nov 2007 01:11:17 +0100 Benoît Dejean <[EMAIL PROTECTED]> wrote: > > - GValue left_attach; > > + GValue left_attach = { 0, }; > > + > > + g_value_init (&left_attach); > > + > > I always though that this requirement was error prone. You just get > to initialize your GValue twice to make it OK. A lot of beginners > hit this error. The doc says "A zero-filled (uninitialized) GValue > structure." which looks like an oxymoron :) Yeah, the GValue stuff is something one really needs to dig first. Although I've found out the hard way that in this case I didn't need a GValue in the first place. I was mislead by a mistake in the docs (will make a separate post about that). Thanks, --D. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: GUI problem.
Hi Alberto, Sorry, I've accidentally not replied to all. But to punish myself for doing this again I'll answer your question myself. In general, what happens when you write a multi-threaded application (that is not multi-thread safe) you'll see unpredictable results. Sometimes you will see a bug, but change a line of unrelated code and the bug will disappear. Usually the bug will just manifest itself in other ways. This is what I think is happening to you. UI lock-ups are a classic sign of a non-multithread safe application. I can debug your application but I am going to make a recommendation to you, Do not update the UI from any other thread other than the main thread! Take my advice, or leave it, either way I will help you but it's easier to change your application now, in its infancy, rather than later. Typically, multi-threaded applications are really hard to debug because the offending code is related to the way the whole application is written. Do you have a SVN repository or a tarball that you can send me? Thanks, Michael On 20/11/2007, alberto barbaro <[EMAIL PROTECTED]> wrote: > Now until the various functions works the GUI don't responde and stay in a > gray state. > How can I resolv it? > Thanks > > > 2007/11/20, alberto barbaro < [EMAIL PROTECTED]>: > > Well now it works. > > Thanks to all. > > > > > > 2007/11/20, alberto barbaro <[EMAIL PROTECTED]>: > > > > > yes. > > > gdk_threads_enter() > > > function(); > > > gdk_threads_leave() > > > > > > Have you a complete example? Only a small piace of code where there is > an GUI's update. > > > > > > Thanks > > > > > > > > > 2007/11/20, Michael Lamothe < [EMAIL PROTECTED]>: > > > > > > > Are you locking with gdk_threads_enter/leave()? > > > > > > > > Thanks, > > > > > > > > Michael > > > > > > > > On 20/11/2007, alberto barbaro <[EMAIL PROTECTED]> wrote: > > > > > Hi. I'm trying to develop a small application. > > > > > > > > > > Problem: > > > > > > > > > > I have a table with some buttons. I pass the pointer to the table in > a > > > > > thread, in that thread i would update the table with a some new > buttons. The > > > > > buttons will appeare but are not 'clickable'! Why? if I try return > thay > > > > > works but with the mouse no. Someone can help me? > > > > > > > > > > Thanks > > > > > ___ > > > > > gtk-app-devel-list mailing list > > > > > gtk-app-devel-list@gnome.org > > > > > > http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list > > > > > > > > > > > > > > > > > > > > > ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: GUI problem.
Hi Alberto, Sorry, I'm not sure that I follow you. I think that you are saying that you want to write the C file by yourself. I was simply hoping to give you some pointers/recommendations. If you still don't want to offer-up the source then maybe you can explain what your application does, where it calls a thread(s), what you are doing in that thread, and what things are going on in the main thread. Make sure that you mention where you are calling gtk_threads_*() and how you have called g_main_loop_run()/gtk_main(). I have written a few multi-threaded applications that call multi-threaded UI libraries. I'm the upstream for Me TV (https://launchpad.net/me-tv) and I have been bitten hard by multi-threaded bugs. This might not be a multi-threaded issue, it's just a hunch. Thanks, Michael On 20/11/2007, alberto barbaro <[EMAIL PROTECTED]> wrote: > Thanks for all but i will the .c by myself. > I can't update the GUI from the main because i use the thread. If I comment > the istruction where I launch the thread the problem will not disappeare and > i don't know why. > > You can write a small .c where in a thread the program change a part of the > GUI or you can tell to me what use insted the thread. > Maybe will be better. > > Thanks > > 2007/11/20, Michael Lamothe < [EMAIL PROTECTED]>: > > Hi Alberto, > > > > Sorry, I've accidentally not replied to all. But to punish myself for > > doing this again I'll answer your question myself. > > > > In general, what happens when you write a multi-threaded application > > (that is not multi-thread safe) you'll see unpredictable results. > > Sometimes you will see a bug, but change a line of unrelated code and > > the bug will disappear. Usually the bug will just manifest itself in > > other ways. This is what I think is happening to you. UI lock-ups > > are a classic sign of a non-multithread safe application. > > > > I can debug your application but I am going to make a recommendation to > you, > > > > Do not update the UI from any other thread other than the main thread! > > > > Take my advice, or leave it, either way I will help you but it's > > easier to change your application now, in its infancy, rather than > > later. > > > > Typically, multi-threaded applications are really hard to debug > > because the offending code is related to the way the whole application > > is written. Do you have a SVN repository or a tarball that you can > > send me? > > > > Thanks, > > > > Michael > > > > > > On 20/11/2007, alberto barbaro < [EMAIL PROTECTED]> wrote: > > > Now until the various functions works the GUI don't responde and stay in > a > > > gray state. > > > How can I resolv it? > > > Thanks > > > > > > > > > 2007/11/20, alberto barbaro < [EMAIL PROTECTED]>: > > > > Well now it works. > > > > Thanks to all. > > > > > > > > > > > > 2007/11/20, alberto barbaro < [EMAIL PROTECTED]>: > > > > > > > > > yes. > > > > > gdk_threads_enter() > > > > > function(); > > > > > gdk_threads_leave() > > > > > > > > > > Have you a complete example? Only a small piace of code where there > is > > > an GUI's update. > > > > > > > > > > Thanks > > > > > > > > > > > > > > > 2007/11/20, Michael Lamothe < [EMAIL PROTECTED]>: > > > > > > > > > > > Are you locking with gdk_threads_enter/leave()? > > > > > > > > > > > > Thanks, > > > > > > > > > > > > Michael > > > > > > > > > > > > On 20/11/2007, alberto barbaro <[EMAIL PROTECTED]> wrote: > > > > > > > Hi. I'm trying to develop a small application. > > > > > > > > > > > > > > Problem: > > > > > > > > > > > > > > I have a table with some buttons. I pass the pointer to the > table in > > > a > > > > > > > thread, in that thread i would update the table with a some new > > > buttons. The > > > > > > > buttons will appeare but are not 'clickable'! Why? if I try > return > > > thay > > > > > > > works but with the mouse no. Someone can help me? > > > > > > > > > > > > > > Thanks > > > > > > > ___ > > > > > > > gtk-app-devel-list mailing list > > > > > > > gtk-app-devel-list@gnome.org > > > > > > > > > > > http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: GUI problem.
Have a dekko at this: http://library.gnome.org/devel/gdk/unstable/gdk-Threads.html. Thanks, Michael On 21/11/2007, alberto barbaro <[EMAIL PROTECTED]> wrote: > Well. I did a small debug on my program. > I understand this: > > If i don't call the function updateGUI() all works but if i call it i have > the problem. > Before the calling i should call gdk_thread_enter()? > Type and example please. > Thanks for all! > > > 2007/11/20, Michael Lamothe <[EMAIL PROTECTED]>: > > Hi Alberto, > > > > Sorry, I'm not sure that I follow you. I think that you are saying > > that you want to write the C file by yourself. I was simply hoping to > > give you some pointers/recommendations. If you still don't want to > > offer-up the source then maybe you can explain what your application > > does, where it calls a thread(s), what you are doing in that thread, > > and what things are going on in the main thread. Make sure that you > > mention where you are calling gtk_threads_*() and how you have called > > g_main_loop_run()/gtk_main(). > > > > I have written a few multi-threaded applications that call > > multi-threaded UI libraries. I'm the upstream for Me TV > > (https://launchpad.net/me-tv ) and I have been bitten hard by > > multi-threaded bugs. > > > > This might not be a multi-threaded issue, it's just a hunch. > > > > Thanks, > > > > Michael > > > > > > On 20/11/2007, alberto barbaro < [EMAIL PROTECTED]> wrote: > > > Thanks for all but i will the .c by myself. > > > I can't update the GUI from the main because i use the thread. If I > comment > > > the istruction where I launch the thread the problem will not disappeare > and > > > i don't know why. > > > > > > You can write a small .c where in a thread the program change a part of > the > > > GUI or you can tell to me what use insted the thread. > > > Maybe will be better. > > > > > > Thanks > > > > > > 2007/11/20, Michael Lamothe < [EMAIL PROTECTED]>: > > > > Hi Alberto, > > > > > > > > Sorry, I've accidentally not replied to all. But to punish myself for > > > > doing this again I'll answer your question myself. > > > > > > > > In general, what happens when you write a multi-threaded application > > > > (that is not multi-thread safe) you'll see unpredictable results. > > > > Sometimes you will see a bug, but change a line of unrelated code and > > > > the bug will disappear. Usually the bug will just manifest itself in > > > > other ways. This is what I think is happening to you. UI lock-ups > > > > are a classic sign of a non-multithread safe application. > > > > > > > > I can debug your application but I am going to make a recommendation > to > > > you, > > > > > > > > Do not update the UI from any other thread other than the main > thread! > > > > > > > > Take my advice, or leave it, either way I will help you but it's > > > > easier to change your application now, in its infancy, rather than > > > > later. > > > > > > > > Typically, multi-threaded applications are really hard to debug > > > > because the offending code is related to the way the whole application > > > > is written. Do you have a SVN repository or a tarball that you can > > > > send me? > > > > > > > > Thanks, > > > > > > > > Michael > > > > > > > > > > > > On 20/11/2007, alberto barbaro < [EMAIL PROTECTED]> wrote: > > > > > Now until the various functions works the GUI don't responde and > stay in > > > a > > > > > gray state. > > > > > How can I resolv it? > > > > > Thanks > > > > > > > > > > > > > > > 2007/11/20, alberto barbaro < [EMAIL PROTECTED]>: > > > > > > Well now it works. > > > > > > Thanks to all. > > > > > > > > > > > > > > > > > > 2007/11/20, alberto barbaro < [EMAIL PROTECTED]>: > > > > > > > > > > > > > yes. > > > > > > > gdk_threads_enter() > > > > > > > function(); > > > > > > > gdk_threads_leave() > > > > > > > > > > > > > > Have you a complete example? Only a small piace of code where > there > > > is > > > > > an GUI's update. > > > > > > > > > > > > > > Thanks > > > > > > > > > > > > > > > > > > > > > 2007/11/20, Michael Lamothe < [EMAIL PROTECTED]>: > > > > > > > > > > > > > > > Are you locking with gdk_threads_enter/leave()? > > > > > > > > > > > > > > > > Thanks, > > > > > > > > > > > > > > > > Michael > > > > > > > > > > > > > > > > On 20/11/2007, alberto barbaro <[EMAIL PROTECTED]> wrote: > > > > > > > > > Hi. I'm trying to develop a small application. > > > > > > > > > > > > > > > > > > Problem: > > > > > > > > > > > > > > > > > > I have a table with some buttons. I pass the pointer to the > > > table in > > > > > a > > > > > > > > > thread, in that thread i would update the table with a some > new > > > > > buttons. The > > > > > > > > > buttons will appeare but are not 'clickable'! Why? if I try > > > return > > > > > thay > > > > > > > > > works but with the mouse no. Someone can help me? > > > > > > > > > > > > > > > > > > Thanks > > > > > > > > > > ___ > > > > > > > > > gtk-app-devel-list mailing list
How to display Video in main window
Hi all, I am working on multimedia application. I want to display video in main window. window = gtk_window_new (GTK_WINDOW_TOPLEVEL); I am receiving video frames in buffer.So how can I do that..which widget should i use?? regards, sumit ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
exec application in windows
Hi: I am trying exec a exe in windows like this: GError *error; gboolean ii=g_spawn_comand_line_async ("C:/""Archivos de programa""/GlobalMapper8/global_mapper8.exe",&error); and so: GError *error; gboolean ii=g_spawn_comand_line_async ("C:/""Archivos de programa""/GlobalMapper8/global_mapper8.exe",&error); . but nothing works... In MS-DOS this works fine: C:/"Archivos de programa"/GlobalMapper8/global_mapper8.exe The problem it´s the spaces in windows This line works fine: GError *error; gboolean ii=g_spawn_comand_line_async ("C:/folder1/global_mapper8.exe",&error); regards. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: exec application in windows
Have you tried, gboolean ii=g_spawn_comand_line_async ("C:/Archivos de programa/GlobalMapper8/global_mapper8.exe",&error); Thanks, Michael On 21/11/2007, Martin (OpenGeoMap) <[EMAIL PROTECTED]> wrote: > Hi: > > I am trying exec a exe in windows like this: > > GError *error; > gboolean ii=g_spawn_comand_line_async ("C:/""Archivos de > programa""/GlobalMapper8/global_mapper8.exe",&error); > > > > and so: > > GError *error; > gboolean ii=g_spawn_comand_line_async ("C:/""Archivos de > programa""/GlobalMapper8/global_mapper8.exe",&error); > > > . but nothing works... > > > > In MS-DOS this works fine: > C:/"Archivos de programa"/GlobalMapper8/global_mapper8.exe > > The problem it´s the spaces in windows > > > This line works fine: > GError *error; > gboolean ii=g_spawn_comand_line_async > ("C:/folder1/global_mapper8.exe",&error); > > > regards. > ___ > gtk-app-devel-list mailing list > gtk-app-devel-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list > ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: exec application in windows
> Have you tried, > > gboolean ii=g_spawn_comand_line_async ("C:/Archivos de > programa/GlobalMapper8/global_mapper8.exe",&error); > > Thanks, > > Michael > > > Yes, but don´t work Regards. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: exec application in windows
If you want to put a quote in in your string you should be using \", right? Not "". Also try, gboolean ii=g_spawn_comand_line_async ("\"C:/Archivos de programa/GlobalMapper8/global_mapper8.exe\"",&error); I would've thought that one of those would work. Thanks, Michael On 21/11/2007, Michael Lamothe <[EMAIL PROTECTED]> wrote: > Have you tried, > > gboolean ii=g_spawn_comand_line_async ("C:/Archivos de > programa/GlobalMapper8/global_mapper8.exe",&error); > > Thanks, > > Michael > > On 21/11/2007, Martin (OpenGeoMap) <[EMAIL PROTECTED]> wrote: > > Hi: > > > > I am trying exec a exe in windows like this: > > > > GError *error; > > gboolean ii=g_spawn_comand_line_async ("C:/""Archivos de > > programa""/GlobalMapper8/global_mapper8.exe",&error); > > > > > > > > and so: > > > > GError *error; > > gboolean ii=g_spawn_comand_line_async ("C:/""Archivos de > > programa""/GlobalMapper8/global_mapper8.exe",&error); > > > > > > . but nothing works... > > > > > > > > In MS-DOS this works fine: > > C:/"Archivos de programa"/GlobalMapper8/global_mapper8.exe > > > > The problem it´s the spaces in windows > > > > > > This line works fine: > > GError *error; > > gboolean ii=g_spawn_comand_line_async > > ("C:/folder1/global_mapper8.exe",&error); > > > > > > regards. > > ___ > > gtk-app-devel-list mailing list > > gtk-app-devel-list@gnome.org > > http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list > > > ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: exec application in windows
Michael Lamothe wrote: > > gboolean ii=g_spawn_comand_line_async ("C:/Archivos de > programa/GlobalMapper8/global_mapper8.exe",&error); > >> gboolean ii=g_spawn_comand_line_async ("C:/""Archivos de >> programa""/GlobalMapper8/global_mapper8.exe",&error); >> The two are exactly the same, C (preprocessor?) concatenates strings. tom ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: exec application in windows
Ohhh ... my bad, never tried it. Apologies, Michael On 21/11/2007, Tomas Carnecky <[EMAIL PROTECTED]> wrote: > Michael Lamothe wrote: > > > > gboolean ii=g_spawn_comand_line_async ("C:/Archivos de > > programa/GlobalMapper8/global_mapper8.exe",&error); > > > >> gboolean ii=g_spawn_comand_line_async ("C:/""Archivos de > >> programa""/GlobalMapper8/global_mapper8.exe",&error); > >> > > The two are exactly the same, C (preprocessor?) concatenates strings. > > tom > ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: exec application in windows
thanks!! This works fine: gboolean ii=g_spawn_command_line_async ("\"C:/Archivos de programa/GlobalMapper8/global_mapper8.exe\" \"C:/Archivos de programa/files/file1.txt\"",&error); Regards. ;-) ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
getting a pango tabarray for a specific line of text
Hi all, My application has non-uniform tabs of different sizes on different lines. Does anyone know how I should go about getting a pango tabarray for a specific line of text in a textbuffer? Thanks in advance, Nick ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: getting a pango tabarray for a specific line of text
On Wed, 2007-11-21 at 01:32 +0100, Nick Gravgaard wrote: > Hi all, > > My application has non-uniform tabs of different sizes on different > lines. Does anyone know how I should go about getting a pango tabarray > for a specific line of text in a textbuffer? Hi, That's not possible. If you have explicit line breaks (as I guess you have), just use separate layout objects. > Thanks in advance, > Nick -- behdad http://behdad.org/ "Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety." -- Benjamin Franklin, 1759 ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: How to display Video in main window
Hi Sumit, Recently i also had the same task to do n i tried a lot many things for doing this. We finally used a gtk drawing area with gdkpixbuf. U can attach a gdkpixbuf with the drawing area and then use ur frames to update the pixbuf as they arrive. Do sum simple search on pixbuf to know more. Regards, Prateek Mathur "sumit kumar" <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 11/20/2007 07:45 PM To gtk-app-devel-list@gnome.org cc Subject How to display Video in main window Hi all, I am working on multimedia application. I want to display video in main window. window = gtk_window_new (GTK_WINDOW_TOPLEVEL); I am receiving video frames in buffer.So how can I do that..which widget should i use?? regards, sumit ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list __ __ ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list