Re: Pause and resume GtkApplication

2018-01-26 Thread Chris Vine
On Fri, 26 Jan 2018 11:14:36 +0700 "Lucky B.C" wrote: > Well, in the case, I will tell something about me, first I've never > used the GtkApplication just main window maybe sub windows (dialogs) > too, and my programs did not do as what you are trying to do. Second > I'm a C programmer, in my opin

Re: gdk_pixbuf_new_from_inline to Gresource conversion

2017-09-06 Thread Chris Vine
On Tue, 5 Sep 2017 16:39:12 -0600 Charles Curley wrote: [snip] > The second one is new on debian 9. I have several options. The > documentation for gdk_pixbuf_new_from_inline () indicates that it is > deprecated and one should use a Gresource. > > Question: how do I use a Gresource here? I am no

Re: GtkPrintOperation; request for assistance

2017-02-10 Thread Chris Vine
On Fri, 10 Feb 2017 18:55:39 +0100 Norbert de Jonge wrote: [snip] > I'm a fan of GTK+ and have always been a fan. The printing > functionalities are extremely versatile. But it's difficult for me to > understand why there is no function that requires only a buffer (of > any size), font type and fo

Re: watching a file descriptor in gtk3

2017-01-24 Thread Chris Vine
On Mon, 23 Jan 2017 18:10:46 -1000 (HST) rbd wrote: > Eric (cecas...@aol.com) sent me the following earlier today in > response to another discussion thread I started a few days ago re: > GSubProcess: > > > I put together a test example of GSubprocess. ... > > > > > > https://github.com/cecashon

Re: watching a file descriptor in gtk3

2017-01-23 Thread Chris Vine
On Mon, 23 Jan 2017 22:18:19 + Emmanuele Bassi wrote: > Hi; > > On 23 January 2017 at 22:09, rbd wrote: > > >> It is not quite that bad. The documentation for > >> g_source_add_unix_fd() is inadequate, but although not immediately > >> obvious the prepare, check and finalize handlers can i

Re: watching a file descriptor in gtk3

2017-01-23 Thread Chris Vine
On Mon, 23 Jan 2017 09:30:17 -1000 (HST) rbd wrote: > Hi Chris, > > Thanks very much for all of that information -- it was very helpful! > > >> I do not fully understand your question (especially I don't > >> understand your reference to using "g_idle_add_full() and do my > >> own non-blocking s

Re: watching a file descriptor in gtk3

2017-01-23 Thread Chris Vine
On Mon, 23 Jan 2017 00:29:46 + Chris Vine wrote: [snip] > I do not fully understand your question (especially I don't understand > your reference to using "g_idle_add_full() and do my own non-blocking > select() inside my callback", which would not work), but you

Re: watching a file descriptor in gtk3

2017-01-22 Thread Chris Vine
On Sun, 22 Jan 2017 11:05:41 -1000 (HST) rbd wrote: > Hi all, > > I need to monitor a Unix file descriptor for input within my gtk3 > program. I believe that I need to somehow be using > g_source_add_unix_fd() and friends but am finding the documentation > confusing. Are there any simple examples

Re: gtk3 and fork/exec of non-gtk child

2017-01-14 Thread Chris Vine
On Sat, 14 Jan 2017 06:24:18 -1000 (HST) rbd wrote: > Hi Emmanuele, > > Thank you for the suggestion! I have just now looked over the > GSubprocess API. It appears to have the necessary functionality and > would at first inspection integrate well with GUI main loop > processing. > > However, I a

Re: Slackware 14.2 -- configuration can not find gtk3 and gtk2 , unicode will not supported

2017-01-03 Thread Chris Vine
On Tue, 3 Jan 2017 15:39:13 + Chris Vine wrote: > On Tue, 3 Jan 2017 15:31:57 + > "intmai...@gmail.com" wrote: > > Hello, > > > > I use slackware 14.2 and trying to build wxWidget 3.0.2 which > > required gtk. Ther are three packages and versions

Re: Slackware 14.2 -- configuration can not find gtk3 and gtk2 , unicode will not supported

2017-01-03 Thread Chris Vine
On Tue, 3 Jan 2017 15:31:57 + "intmai...@gmail.com" wrote: > Hello, > > I use slackware 14.2 and trying to build wxWidget 3.0.2 which required > gtk. Ther are three packages and versions of gtk installed on the > system: 1, 2 then 3. > > The configuration/compilation achieved without problem

Re: Using fork() in a GTK C/Vala application

2015-09-02 Thread Chris Vine
On Wed, 2 Sep 2015 10:50:43 +0200 Gian Mario Tagliaretti wrote: > On 2 September 2015 at 05:33, Jim Charlton wrote: > > Hi Jim, > > > I have had similar problems and ended up using > > g_spawn_async_with_pipes() with a separate binary. This works well > > for me as I often need to launch sever

Re: Using fork() in a GTK C/Vala application

2015-09-01 Thread Chris Vine
On Tue, 1 Sep 2015 15:33:19 +0200 rastersoft wrote: > Thanks for your answer. Unfortunately, I'm running out of options: > currently I'm using threads, but there is a nasty bug that makes my > program crash sometimes. It is very subtle, because it hapens usually > after being running for two-three

Re: Using fork() in a GTK C/Vala application

2015-09-01 Thread Chris Vine
On Tue, 1 Sep 2015 13:54:34 +0200 rastersoft wrote: > Hi all: > > I'm working on a project which, for several reasons, will use the > Posix fork() call. The question is: if I have an active GTK main loop > in the program before calling fork(), is there something I have to do > after calling it in

Re: GtkFrame has no frame border drawn?

2015-08-10 Thread Chris Vine
On Mon, 10 Aug 2015 15:05:30 +0100 Emmanuele Bassi wrote: > Hi; > > On 10 August 2015 at 14:51, Richard Shann > wrote: > > > Having invested effort in this it is exasperating to discover that > > GTK+ chooses a default theme that cripples one of the widgets - by > > failing to draw a frame arou

Re: GtkFrame has no frame border drawn?

2015-08-10 Thread Chris Vine
On Mon, 10 Aug 2015 09:05:50 +0100 Emmanuele Bassi wrote: > Hi; > > the theme is responsible for drawing the frame. The old Windows theme > engine shows a frame; the default GTK+ theme (Adwaita) does not. The original Adwaita theme did not show frames. More recent versions (for GTK+ versions re

Re: How to use socket conditions ?

2015-07-11 Thread Chris Vine
On Sat, 11 Jul 2015 00:09:54 -0400 Jacques Pelletier wrote: > Hi, > > I'm using a glib socket: when a client (glib) is connected to a > server, the client doesn't get the HUP messages when the server > closes its connection. That's probably because the socket implementation does not provide HUP

Re: Debian 6 with Sudden GTK application crash @ libGDK

2014-12-09 Thread Chris Vine
On Tue, 09 Dec 2014 13:11:59 +0530 venkat wrote: [snip] The problem is almost certainly in your approach to threading. I didn't even know that you could run the gtk+ main loop in other than the main program thread and the one in which you called gtk_init(). One obvious problem is that you hav

Re: GHashTable with function pointers as values

2014-08-23 Thread Chris Vine
On Sat, 23 Aug 2014 11:35:05 +0100 Emmanuele Bassi wrote: > hi; > > On 23 August 2014 11:18, Iñigo Martínez > wrote: > > Yes, it works, but i doesn't look like the best approach: > > > > warning: ISO C forbids passing argument 3 of 'g_hash_table_insert' > > between function pointer and 'void *'

Re: nuts!

2014-07-29 Thread Chris Vine
On Mon, 28 Jul 2014 23:00:34 -0700 Gary Kline wrote: > while I can create several {N} labels, they print centered. how do I > get the labels to print from the left side of the window widget: Use 'gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5)' to align left, and 'gtk_misc_set_alignment(GTK_MIS

Re: GTK+ app development: avahi service browsing and Gtk+ main loop problem

2014-06-17 Thread Chris Vine
On Wed, 18 Jun 2014 02:03:44 +0300 Andrei Macavei wrote: > On 17.06.2014 12:43, Chris Vine wrote: > > I do not know python particularly well but you probably first need > > to explain why you are running two main loops. Can't your program > > just use one, so that yo

Re: GTK+ app development: avahi service browsing and Gtk+ main loop problem

2014-06-17 Thread Chris Vine
On Tue, 17 Jun 2014 10:51:21 +0300 Andrei Macavei wrote: > I am resending the code examples in plain text as the first message > contained some html part which made the code un-copy-paste-able. > > The problem description can be summarized as : when using gtk's main > loop ( Gtk.main() ) how to

Re: GTK signals question.

2014-03-05 Thread Chris Vine
On Wed, 05 Mar 2014 13:43:29 -0500 Chris Moller wrote: > On 03/05/14 12:07, Chris Vine wrote: > > On Wed, 05 Mar 2014 09:44:48 -0500 > > Chris Moller wrote: > >> I was actually writing that testcase when I found a correlation: > >> I'm using gcc and my call

Re: GTK signals question.

2014-03-05 Thread Chris Vine
On Wed, 05 Mar 2014 09:44:48 -0500 Chris Moller wrote: > I was actually writing that testcase when I found a correlation: I'm > using gcc and my callbacks were nested functions. Pull the callbacks > out and make them normal, top-level, functions, and it all works even > without no blocking of

Re: Still confused on new thread starting idle functions to update UI.

2013-12-04 Thread Chris Vine
On Thu, 5 Dec 2013 03:06:59 +1100 Chris Angelico wrote: [snip] > As promised, here's a simple Pike program that listens for socket > connections. > [snip] > > See how much effort goes into > making sure everything's thread-safe? The same amount, because this > isn't even threaded - though it will

Re: Still confused on new thread starting idle functions to update UI.

2013-12-04 Thread Chris Vine
On Tue, 3 Dec 2013 19:59:22 -0800 (PST) David Buchan wrote: > ok, I may be getting somewhere. I did some reading on heap memory > versus stack. > > Here's a vastly simplified example program which doesn't use GTK+, > but I'm using to demonstrate my plan of attack. > > I use a function called pac

Re: Still confused on new thread starting idle functions to update UI.

2013-12-03 Thread Chris Vine
On Tue, 3 Dec 2013 13:15:28 -0800 (PST) David Buchan wrote: [snip] > It is awkward, and probably unnecessary.  Unless you have a very good > reason, that is not the way to do it.  Pass the idle function a string > allocated on the heap, and free it in the idle function when finished > with.  Any o

Re: Still confused on new thread starting idle functions to update UI.

2013-12-03 Thread Chris Vine
On Tue, 3 Dec 2013 11:02:53 -0800 (PST) David Buchan wrote: > These darn threads and idle functions still baffle me. I'm sorry to > be such a pest. > > I want to periodically update a textview as new information comes > available. Sometimes this information can come in quickly (roughly > every t

Re: Delay time to spawn new threads?

2013-11-28 Thread Chris Vine
On Thu, 28 Nov 2013 14:17:00 + Emmanuele Bassi wrote: > GSourceFunc functions should return G_SOURCE_CONTINUE or > G_SOURCE_REMOVE; those are aliases for boolean values, but are much, > much clearer to read. I suggest you put a bug in bugzilla. The documentation for the main loop functions s

Re: Delay time to spawn new threads?

2013-11-28 Thread Chris Vine
On Wed, 27 Nov 2013 19:32:26 -0800 (PST) David Buchan wrote: > I removed the call to g_thread_init() and it still works fine! Great > catch there. You can include it with glib >= 2.32 - it is a no-op then. You should include it if you want your code to be able to run on earlier as well as later

Re: Delay time to spawn new threads?

2013-11-28 Thread Chris Vine
On Thu, 28 Nov 2013 09:11:45 + Osmo Antero wrote: > My audio-recorder that was based on GTK2 had some threads that also > modified the GUI-elements. I had to call > GDK_THREADS_ENTER > / > GDK_THREADS_LEAVE

Re: Delay time to spawn new threads?

2013-11-27 Thread Chris Vine
On Wed, 27 Nov 2013 11:59:23 -0800 (PST) David Buchan wrote: > Hi Michael, > > My 32-bit, GTK+2 version does > >   // Secure glib >   if (!g_thread_supported ()) { >     g_thread_init (NULL); >   } > > at the beginning, and then the thread is spawned via: > > on_button1_clicked (GtkButton *but

Re: Printing with GTK/Cairo produces only empty pages

2013-10-14 Thread Chris Vine
On Mon, 14 Oct 2013 19:34:53 +0200 Satz Klauer wrote: > Hi, > > I try to print some vector data using GTK/Cairo. Unfortunately my > printer only produces empty pages, means there is no print operation, > the paper sheets are just moved. > > That's how I'm initialising everything: > > GtkPrintO

Re: GTK free function doesn't appear to have any affect.

2013-06-16 Thread Chris Vine
On Sun, 16 Jun 2013 12:28:52 +0530 dE wrote: > Apart from that, in the free_ptr? Does memory get freed for anyone > else? > > #include > #include > #define COLS 200 > void free_ptr ( GtkListStore * ); > > int main ( ) { > gtk_init( NULL, NULL ); > int i, j; > char *temp; >

Re: GTK free function doesn't appear to have any affect.

2013-06-14 Thread Chris Vine
On Fri, 14 Jun 2013 23:03:55 +0530 dE wrote: > On 06/14/13 22:09, Chris Vine wrote: > > On Fri, 14 Jun 2013 21:41:05 +0530 > > dE wrote: > >> On 06/14/13 17:02, Matthias Clasen wrote: > >>> On Fri, Jun 14, 2013 at 3:27 AM, dE wrote: > >>>>

Re: GTK free function doesn't appear to have any affect.

2013-06-14 Thread Chris Vine
On Fri, 14 Jun 2013 21:41:05 +0530 dE wrote: > On 06/14/13 17:02, Matthias Clasen wrote: > > On Fri, Jun 14, 2013 at 3:27 AM, dE wrote: > >> I was monitoring the memory usage before and after execution of > >> g_object_unref and gtk_list_store_clear, and it didnt change the > >> memory usage by a

Re: Can I install both GTK+2 and GTK+3?

2013-05-17 Thread Chris Vine
On Fri, 17 May 2013 03:50:57 +0100 Emmanuele Bassi wrote: > hi; > > yes, you most definitely can have gtk 2.x and gtk 3.x installed on the > same machine, without them interfering with each other. the shared > libraries and ancillary files are all parallel installable. > > what you cannot do is

Re: Updating GUI during long operation

2013-04-21 Thread Chris Vine
On Sun, 21 Apr 2013 11:33:45 +0100 Chris Vine wrote: > On Sat, 20 Apr 2013 16:25:50 -0700 > Kip Warner wrote: > > On Sat, 2013-04-20 at 23:35 +0100, Chris Vine wrote: > > > If you have a main loop running, this is completely unnecessary, > > > unless you are doi

Re: Updating GUI during long operation

2013-04-21 Thread Chris Vine
On Sat, 20 Apr 2013 16:25:50 -0700 Kip Warner wrote: > On Sat, 2013-04-20 at 23:35 +0100, Chris Vine wrote: > > If you have a main loop running, this is completely unnecessary, > > unless you are doing something to block the loop, which you > > shouldn't do. > > H

Re: Updating GUI during long operation

2013-04-20 Thread Chris Vine
On Sat, 20 Apr 2013 09:10:11 -0700 Kip Warner wrote: > Hey list, > > I have a separate thread from the main loop that performs some long > and resource intensive operation. The GUI displays an animated GIF > while this process takes place via Gdk.PixbufAnimation. > > Sometimes the animation an

Re: Porting Between Linux and Windows

2012-06-23 Thread Chris Vine
On Sat, 23 Jun 2012 18:13:41 -0400 (EDT) Allin Cottrell wrote: > You say you're learning C++. If you have good reason to do that, > then fine, but note that GTK itself is written in C and is > C-oriented. Using C++ will complicate matters. You say you're new to > this, so let me point out that

Re: How do I fix the window size?

2012-06-05 Thread Chris Vine
On Tue, 5 Jun 2012 11:50:42 -0700 (PDT) Ferdinand Ramirez wrote: > --- On Tue, 6/5/12, James Tappin wrote: > > > I think the solution is to place the treeview in a > > gtk_scrolled_window rather than using an hbox and an explicit > > scrollbar. > > The reason for trying out with an explicit hb

Re: Identifying a structure by reading it's first field.

2012-06-02 Thread Chris Vine
On Sat, 02 Jun 2012 09:10:06 -0400 Ernie Wright wrote: > On 6/2/2012 6:16 AM, Chris Vine wrote: > > > You are probably also interested in the strict aliasing rule, [...] > > This is an alarmingly often overlooked rule. > > In part because it wasn't in the stand

Re: Identifying a structure by reading it's first field.

2012-06-02 Thread Chris Vine
On Sat, 02 Jun 2012 00:04:18 -0400 Ernie Wright wrote: > On 6/1/2012 2:17 PM, Osmo Antero wrote: > > > I have couple of C structures that I want to distinguish between by > > reading the structures' first (type) field. [...] > > > > Q: Can I assume that the "type" field is always first in the

Re: Help with a multi-threaded application. Spot a crash.

2012-06-01 Thread Chris Vine
On Fri, 1 Jun 2012 22:00:35 +0100 jcup...@gmail.com wrote: > On 1 June 2012 20:41, Chris Vine wrote: > > jcup...@gmail.com wrote: > >> That's out of date. g_idle_add() does not need any locking by you. > > > > I think you may be confusing this with the fact

Re: Help with a multi-threaded application. Spot a crash.

2012-06-01 Thread Chris Vine
On Fri, 1 Jun 2012 09:23:35 +0100 jcup...@gmail.com wrote: > Hi again Osmo, > > On 31 May 2012 17:50, Osmo Antero wrote: > > Jcupitt: > > Ok, g_idle_add() seems to need protection by gdk_threads_enter() and > > leave(). > > Ref: > > http://developer.gnome.org/gdk/stable/gdk-Threads.html#gdk-threa

Re: key press events & holding keys down

2012-03-19 Thread Chris Vine
On Mon, 19 Mar 2012 13:37:45 -0800 Christopher Howard wrote: [snip] > So, you mean, receive both key press and key release events, and then > maintain my own tracking of whether or not the key is currently being > held down? Okay, that makes sense to me, provided of course I can be > certain that

Re: key press events & holding keys down

2012-03-19 Thread Chris Vine
On Mon, 19 Mar 2012 20:35:33 +0100 David Nečas wrote: > On Mon, Mar 19, 2012 at 07:25:22PM +0000, Chris Vine wrote: > > Are you saying that on your hardware, holding one key down blocks > > press and release events for all other keys? I am not saying you > > are wrong, but I

Re: key press events & holding keys down

2012-03-19 Thread Chris Vine
On Mon, 19 Mar 2012 11:13:14 -0800 Christopher Howard wrote: > On 03/19/2012 11:02 AM, Chris Vine wrote: > > On Mon, 19 Mar 2012 09:21:27 -0800 > > Christopher Howard wrote: > >> On 03/19/2012 03:34 AM, Chris Vine wrote: > >>> Since GtkWidget objects have key

Re: key press events & holding keys down

2012-03-19 Thread Chris Vine
On Mon, 19 Mar 2012 09:21:27 -0800 Christopher Howard wrote: > On 03/19/2012 03:34 AM, Chris Vine wrote: > > Since GtkWidget objects have key-press-event and a key-release-event > > signals that you can connect to (and from your explanation, clearly > > you have connected t

Re: key press events & holding keys down

2012-03-19 Thread Chris Vine
On Sun, 18 Mar 2012 20:08:12 -0800 Christopher Howard wrote: > On 03/16/2012 04:29 PM, Christopher Howard wrote: > > > > I control the spacecraft with the arrow keys, which I do by > > grabbing the GdkEventKey and then checking it against GDK_KEY_Left, > > GDK_KEY_Right, and so forth. Strictly sp

Re: Beyond GDK threads and gtk_dialog_run - What to use?

2012-03-06 Thread Chris Vine
On Tue, 6 Mar 2012 17:15:21 +0100 Žan Doberšek wrote: > I'm running an effort to add support for modal dialogs in WebKitGTK+, > bug report is located at WebKit's bugzilla[1]. When a web page > requests a modal dialog, the user agent is required to create a new > window that will represent the moda

Re: Are there such tings like custom signals?

2012-01-23 Thread Chris Vine
On Mon, 23 Jan 2012 08:41:22 -0700 Michael Torrie wrote: > On 01/23/2012 02:18 AM, Manuel Ferrero wrote: > > Il 20/01/2012 18.08, Jack ha scritto: > > > >> However, that is separate from knowing that the button has been > >> pushed, so you can then start the communications. For this, is > >> ther

Re: GLIB for a webserver

2011-12-08 Thread Chris Vine
On Thu, 8 Dec 2011 11:13:41 -0200 Marcelo Elias Del Valle - SYSMAP SOLUTIONS - Claro MA-SP - wrote: > - In some forums, people were complaining about the fact glib aborts > when memory allocation fails, which is bad for a 24/7 running web > server. This particular criticism has little going for i

Re: Forcing a G Timeout to be handled by a specific thread

2011-10-05 Thread Chris Vine
On Wed, 05 Oct 2011 14:00:40 +0100 Andrew Wood wrote: > Is there a way to ensure a timeout callback set with g_timeout_add is > always executed by a specific pthread? Timeouts started with g_timeout_add() or g_timeout_add_full() execute in the default main context, which is normally the main con

Re: GtkTree and GtkThread: update and refresh

2011-09-21 Thread Chris Vine
On Wed, 21 Sep 2011 22:53:01 +0200 Paolo wrote: > Hi! I have a problem about the update and refresh of a tree. This is > the situation: I have a populated tree and a button that update the > tree. The button's event calls a function that permorfs the following > things: 1) Reset the treemodel appe

Re: Simple GTKMM front-end

2011-09-21 Thread Chris Vine
On Wed, 21 Sep 2011 16:50:29 +0100 Chris Vine wrote: > [ship] Some developers (the > linux kernel developers in particular) do not like this, and do not > include the "or (at your option) any later version". I should say that I realise that the kernel is released under the G

Re: Simple GTKMM front-end

2011-09-21 Thread Chris Vine
On Wed, 21 Sep 2011 07:13:56 +0100 John Emmas wrote: > An interesting point. Technically, the "Library" GPL and the > "Lesser" GPL aren't the same document - even though they might have > the same wording. Just as a loan agreement signed by me isn't the > same legal instrument as one signed by m

Re: Simple GTKMM front-end

2011-09-20 Thread Chris Vine
On Tue, 20 Sep 2011 21:26:31 +0100 John Emmas wrote: > On 20 Sep 2011, at 07:11, Andy Tai wrote: > > > come on... gtkmm is LGPL... > > > > Interesting I just checked this on the gtkmm web site and > discovered that it's actually released under the "GNU Library General > Public License". A

Re: Can g_file_monitor_file () report events from before it was created?

2011-09-06 Thread Chris Vine
On Tue, 06 Sep 2011 01:42:43 +0100 Peter Clifton wrote: > I'm working on some code to monitor for file changes in our > application, and ran into a bit of a problem today with the Save-As > case. > > The order of operations is something like: > > 1. File monitor exists on the document file which

Re: Can g_file_monitor_file () report events from before it was created?

2011-09-06 Thread Chris Vine
On Tue, 6 Sep 2011 11:40:59 +0100 Chris Vine wrote: > On Tue, 06 Sep 2011 01:42:43 +0100 > Peter Clifton wrote: > > I'm working on some code to monitor for file changes in our > > application, and ran into a bit of a problem today with the Save-As > > case. > &

Re: Strange dead lock with g_threads_enter

2011-03-06 Thread Chris Vine
On Sun, 6 Mar 2011 16:03:43 + Chris Vine wrote: > On Sun, 6 Mar 2011 10:57:24 +0800 > Wei-Ning Huang wrote: [snip] > > I'm starting to think it's the bug of gtk+, or perhaps the kernel? > > btw, I'm using Arch Linux with Kernel 2.6.37(autogroup patched)

Re: Strange dead lock with g_threads_enter

2011-03-06 Thread Chris Vine
On Sun, 6 Mar 2011 10:57:24 +0800 Wei-Ning Huang wrote: > Thanks Chris. I tried to remove any function call in the > compile_thread, i.e: > > // Thread function > // It is signaled to wake up for every 1 second > gpointer motion_compile_thread(gpointer data) { > ... >while (TRUE) { > if

Re: Strange dead lock with g_threads_enter

2011-03-05 Thread Chris Vine
On Sat, 5 Mar 2011 11:58:23 +0800 Wei-Ning Huang wrote: [snip] > From what I can see, the program is stuck because the main thread > locked a mutex in #3. > But from the backtrace, the mutex seems to be locked by > gtk_main_loop_run() which is something I can't control, > and somehow it locked the

Re: Using GSocket in a GTK application

2011-02-23 Thread Chris Vine
On Tue, 22 Feb 2011 23:25:43 -0500 Jacques Pelletier wrote: [snip] > ... > /* Connect asynchronously */ > mySocketClient = g_socket_client_new(); > > g_socket_client_connect_to_host_async( > mySocketClient, > myUrl, > myPort, > NULL, > m

Re: Localization issues

2010-12-30 Thread Chris Vine
On Thu, 30 Dec 2010 10:53:15 + Chris Vine wrote: > On Wed, 29 Dec 2010 17:11:47 +0530 > Lourembam Lenin wrote: > > I have a text in English which i want to convert it into French. > > > > The sequence that i followed are as under: > > > >1. generate

Re: Localization issues

2010-12-30 Thread Chris Vine
On Wed, 29 Dec 2010 17:11:47 +0530 Lourembam Lenin wrote: > I have a text in English which i want to convert it into French. > > The sequence that i followed are as under: > >1. generate all the text using xgettext command in terminal, > creating .pot file >2. creating .po file from .pot

Re: Glib mutex doesn't work on Windows

2010-12-17 Thread Chris Vine
On Fri, 17 Dec 2010 18:30:28 +0100 (CET) Michael T. wrote: > > That is not of itself an error, but it invites the question > > whether, for example, he has called g_thread_init(). > > Yeah, you're right. I called the test function before calling > gtk_init(), which also takes care of the g_thread

Re: Glib mutex doesn't work on Windows

2010-12-16 Thread Chris Vine
On Thu, 16 Dec 2010 21:15:36 + Chris Vine wrote: > On Thu, 16 Dec 2010 12:17:51 -0700 > Kevin DeKorte wrote: > [snip] > > I had this problem developing a GTK application on OpenBSD, it seems > > that GMutex's are not guaranteed to be recursive or non-recursive. >

Re: Glib mutex doesn't work on Windows

2010-12-16 Thread Chris Vine
On Thu, 16 Dec 2010 12:17:51 -0700 Kevin DeKorte wrote: [snip] > I had this problem developing a GTK application on OpenBSD, it seems > that GMutex's are not guaranteed to be recursive or non-recursive. > > I altered my code to work with GConditionals and worked fine. Perhaps, > that will work f

Re: gthreads vs pthread

2010-10-26 Thread Chris Vine
On Tue, 26 Oct 2010 22:41:44 + Juan Pablo L. wrote: > Hello, i m using threads in a glib-only project, a service daemon, i > have implemented them using GThreads, but i see now that GThreads is > only a wrapper around pthreads (with the corresponding overhead from > doing so) and does not prov

Re: poll with timeout 0 in main loop

2010-10-22 Thread Chris Vine
On Fri, 22 Oct 2010 13:53:55 +0100 Chris Vine wrote: > On Fri, 22 Oct 2010 10:37:01 + > Juan Pablo L. wrote: > > i attached the code but did not make thru, here is the server code: > > Something odd is going on. > > I see you are using GIOChannel not to do any

Re: poll with timeout 0 in main loop

2010-10-22 Thread Chris Vine
On Fri, 22 Oct 2010 10:37:01 + Juan Pablo L. wrote: > i attached the code but did not make thru, here is the server code: Something odd is going on. I see you are using GIOChannel not to do any reading, but in order to notify you that a connection is available. poll()/select() of course sup

Re: poll with timeout 0 in main loop

2010-10-22 Thread Chris Vine
On Fri, 22 Oct 2010 02:57:59 + Juan Pablo L. wrote: > hi, this is the code that makes the server socket [snip] There doesn't seem anything especially wrong with this but you have a lot of code missing. In particular, what does your tcp_server_handle_connection_events() callback do, such as w

Re: Performance issues of GDK deprecation in favour of Cairo

2010-08-17 Thread Chris Vine
On Tue, 17 Aug 2010 12:26:04 +0100 James Morris wrote: > On 17 August 2010 11:23, Chris Vine > wrote: > > Can you avoid redrawing the entire list of rectangles on each expose > > event? > > Yes this is what I'm hoping. Though I've been a bit mixed up with

Re: Performance issues of GDK deprecation in favour of Cairo

2010-08-17 Thread Chris Vine
On Tue, 17 Aug 2010 10:01:43 +0100 James Morris wrote: > I see that some GDK drawing functions and graphics contexts have been > deprecated in favour of using Cairo. > > Yesterday I spent a few hours *removing* Cairo code from my fledgling > GTK application and replacing it with gdk_draw_rectang

Re: GtkProgressBar state update issue

2010-05-29 Thread Chris Vine
On Sat, 29 May 2010 06:35:24 - "John Emmas" wrote: > When you call one of the g_idle_add() functions, you're saying to gtk, > "don't execute this function now - but delay it until the GUI thread > has some idle time available and execute it there." By doing that, > you ensure that GUI element

Re: gthreads and file operations

2010-04-14 Thread Chris Vine
On Wed, 14 Apr 2010 10:01:15 +0530 Nischal Rao wrote: > Let me explain the entire scenario. > > I need to be listening to a socket for data from an external program. > I do this using an infinite loop. Once i get the data, i call a > function and after it returns I go back into infinite loop agai

Re: gthreads and file operations

2010-04-13 Thread Chris Vine
On Wed, 14 Apr 2010 00:13:38 +0530 Nischal Rao wrote: > is there any way to listen to signals without calling gtk_main() > (which never returns) ? If so, then i ll be able to get rid of > threads(happily!!) I am new to glib threads and gnome signals.. i > have just been following examples th

Re: g_idle_add(): limits?

2010-03-11 Thread Chris Vine
On Wed, 10 Mar 2010 15:10:50 +0100 "fka...@googlemail.com" wrote: > Chris Vine: > > > > I make heavy use of g_idle_add(), and encounter this problem: > > > It seems that the idle functions aren't called sometimes. > > [...] > > > Assu

Re: g_idle_add(): limits?

2010-03-09 Thread Chris Vine
On Tue, 9 Mar 2010 10:06:19 +0100 "fka...@googlemail.com" wrote: > Hi, > > I make heavy use of g_idle_add(), and encounter this problem: > It seems that the idle functions aren't called sometimes. > > To track that: I used a counter before g_idle_add() and one > inside the idle function (always

Re: Capture console app output into texview?

2009-11-19 Thread Chris Vine
On Thu, 19 Nov 2009 22:11:18 +0100 "Till Harbaum / Lists" wrote: > Hi, > > i am trying to run a text mode application in the background of my > gtk one and display its output in a textview. I know this is supposed > to be done using g_spawn_async_with_pipes and then link to the output > via g_io_

Re: code work wrong when i put it in gtk+ application

2009-11-11 Thread Chris Vine
On Wed, 11 Nov 2009 16:35:23 -0800 (PST) cet cet wrote: > After i updated my system my previously working gtk+ application > start to print wrong result.The problem is atof() i used in the > program.The code is working as expected in a standart c console > version.(Program reads some datas from fi

Re: Detecting whether a widget is displayed.

2009-11-05 Thread Chris Vine
On Thu, 5 Nov 2009 06:28:36 -0800 Daniel Burrows wrote: > > I have what's probably a simple GTK+ problem, and I was wondering if > anyone could give me a tip. > > I'm trying to write a custom widget (in GTK--) that would benefit > from knowing whether it's currently visible or not. It seems

Re: main loop & asynchronous queues

2009-09-24 Thread Chris Vine
On Thu, 24 Sep 2009 14:32:30 -0500 Thomas Stover wrote: [snip] > For anyone in the future searching around for more info on this > topic, here is a variation of the gtk hello world program I was doing > some experiments with. My main question at this point to anyone who > might know is, should the

Re: main loop & asynchronous queues

2009-09-23 Thread Chris Vine
On Wed, 23 Sep 2009 08:44:06 -0500 Thomas Stover wrote: > > Chris Vine wrote: > > In the case of callbacks to execute in the default program > > loop/context (the "main" main loop) a worker thread can use > > g_idle_add()/ g_idle_add_full(). To execute a c

Re: main loop & asynchronous queues

2009-09-23 Thread Chris Vine
On Tue, 22 Sep 2009 18:59:25 -0500 Thomas Stover wrote: > Does glib allow for things like a two threaded program with > inter-thread communication via async queues while each thread has a > separate main loop waiting for both external stimulus and new queue > messages to arrive? In other words, a)

Re: Idle Function Not Getting Called

2009-09-15 Thread Chris Vine
On Mon, 14 Sep 2009 18:02:25 -0400 (EDT) Marshall Lake wrote: > I'll be a son-of-a-gun. Removing the gdk_* calls fixed the problem. > It's something I should have known. The GDK global lock is difficult to use correctly. All GTK+ signal callbacks are entered holding the lock (as is gtk_main(),

Re: Idle Function Not Getting Called

2009-09-14 Thread Chris Vine
On Mon, 14 Sep 2009 13:24:30 -0400 (EDT) Marshall Lake wrote: > I'm using only Linux. > > > I assume you have made the main loop thread-safe by calling > > g_thread_init()? > > The following are the first few lines of my main() ... > > openlog ("gtknsbclient", LOG_NDELAY, LOG_USER); >

Re: Idle Function Not Getting Called

2009-09-14 Thread Chris Vine
On Sun, 13 Sep 2009 18:35:06 -0400 (EDT) Marshall Lake wrote: > I've taken some time to check the mutex and locks/unlocks between the > secondary thread and the idle function. All appear as it should. > The locks/unlocks are being applied in an orderly fashion and as they > should be, and there

Re: Idle Function Not Getting Called

2009-09-13 Thread Chris Vine
On Sat, 12 Sep 2009 17:46:17 -0400 (EDT) Marshall Lake wrote: > >>> The important point in looking at out-of-order locking (or other > >>> locking issues) is that the idle handler runs in the thread in > >>> which the main program loop runs, not the thread which called > >>> g_idle_add()/ g_idle_

Re: Idle Function Not Getting Called

2009-09-12 Thread Chris Vine
On Sat, 12 Sep 2009 12:00:11 -0400 (EDT) Marshall Lake wrote: [...] Me: > > The important point in looking at out-of-order locking (or other > > locking issues) is that the idle handler runs in the thread in > > which the main program loop runs, not the thread which called > > g_idle_add()/ g_idle

Re: Idle Function Not Getting Called

2009-09-12 Thread Chris Vine
On Sat, 12 Sep 2009 00:18:59 -0400 (EDT) Marshall Lake wrote: [snip] > I can't find a non-commercial deadlock checker for Linux. I agree > that the multi-threaded facet of the code is causing my problem but > so far I'm having trouble using breakpoints/debug code to isolate the > exact cause. >

Re: Idle Function Not Getting Called

2009-09-10 Thread Chris Vine
On Wed, 9 Sep 2009 12:23:07 -0400 (EDT) Marshall Lake wrote: > > > >> I tried G_PRIORITY_HIGH_IDLE with similar results ... the idle > >> function is called only with the following code: > >> > >> g_idle_add_full (G_PRIORITY_HIGH_IDLE, (GSourceFunc) > >> idlefunc, NULL, NULL); while (gtk_e

Re: Idle Function Not Getting Called

2009-09-06 Thread Chris Vine
On Sat, 5 Sep 2009 17:39:33 -0400 (EDT) Marshall Lake wrote: > I tried G_PRIORITY_HIGH_IDLE with similar results ... the idle > function is called only with the following code: > > g_idle_add_full (G_PRIORITY_HIGH_IDLE, (GSourceFunc) idlefunc, > NULL, NULL); while (gtk_events_pending ()) >

Re: Idle Function Not Getting Called

2009-09-05 Thread Chris Vine
On Fri, 4 Sep 2009 23:12:24 -0400 (EDT) Marshall Lake wrote: > What stops an idle function from being executed? ... pending events, > right? > > I have a situation where an idle function does NOT get called with > the following code: > > g_idle_add ((GSourceFunc) idlefunc, NULL); > > OR

Re: outstream question [i think]

2009-08-28 Thread Chris Vine
On Fri, 28 Aug 2009 08:16:25 -0400 "Boggess Rod" wrote: > > -Original Message- > > The intent is to have the results go to the gui (as opposed > > to the console). > > > > > > mysql> show columns from customers; > > ++--+--+-+-++ > > |

Re: Why is ChangeValue reentrant on a gtk_dialog_run?

2009-08-11 Thread Chris Vine
On Tue, 11 Aug 2009 09:08:52 -0400 "Boggess Rod" wrote: > > At the risk of beating a dead horse, I've figured out what the problem > is, I just don't understand why it's occurring or how to fix it. > > If I call hscale's value-changed signal callback, I can return TRUE or > FALSE, and it behave

Re: flow control question

2009-07-22 Thread Chris Vine
On Tue, 21 Jul 2009 23:45:38 -0400 (EDT) Allin Cottrell wrote: > On Tue, 21 Jul 2009, Dov Grobgeld wrote: > > > Here are two programs that implement through the text viewer > > widget what you are asking for: > > > >- The Python console in gimp > >- GemTcl - a tcl interpreter > > > > The

Re: inter process communication

2009-07-10 Thread Chris Vine
On Fri, 10 Jul 2009 16:56:28 +0200 Luka Napotnik wrote: > If you need more advanced IPC, take a look at D-BUS. For basic IPC you > could use unix local sockets or shared memory. ... or named pipes/fifos (man 3 mkfifo) for the most basic IPC. Chris ___

  1   2   3   >