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

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

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 >

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. ... > > > > > >

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

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

Re: watching a file descriptor in gtk3

2017-01-23 Thread Chris Vine
On Mon, 23 Jan 2017 00:29:46 + Chris Vine <ch...@cvine.freeserve.co.uk> 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

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

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 >

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 <ch...@cvine.freeserve.co.uk> wrote: > On Tue, 3 Jan 2017 15:31:57 + > "intmai...@gmail.com" <intmai...@gmail.com> wrote: > > Hello, > > > > I use slackware 14.2 and trying to build wxWidget 3.0.2 w

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

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

Re: GtkFrame has no frame border drawn?

2015-08-10 Thread Chris Vine
On Mon, 10 Aug 2015 15:05:30 +0100 Emmanuele Bassi eba...@gmail.com wrote: Hi; On 10 August 2015 at 14:51, Richard Shann rich...@rshann.plus.com wrote: Having invested effort in this it is exasperating to discover that GTK+ chooses a default theme that cripples one of the widgets - by

Re: GtkFrame has no frame border drawn?

2015-08-10 Thread Chris Vine
On Mon, 10 Aug 2015 09:05:50 +0100 Emmanuele Bassi eba...@gmail.com 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

Re: How to use socket conditions ?

2015-07-11 Thread Chris Vine
On Sat, 11 Jul 2015 00:09:54 -0400 Jacques Pelletier jpellet...@ieee.org 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

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 venka...@vortexindia.co.in 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

Re: GHashTable with function pointers as values

2014-08-23 Thread Chris Vine
On Sat, 23 Aug 2014 11:35:05 +0100 Emmanuele Bassi eba...@gmail.com wrote: hi; On 23 August 2014 11:18, Iñigo Martínez inigomarti...@gmail.com 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

Re: nuts!

2014-07-29 Thread Chris Vine
On Mon, 28 Jul 2014 23:00:34 -0700 Gary Kline kl...@thought.org 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

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 andrei.macave...@gmail.com 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

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 andrei.macave...@gmail.com 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 you can use

Re: GTK signals question.

2014-03-05 Thread Chris Vine
On Wed, 05 Mar 2014 09:44:48 -0500 Chris Moller mol...@mollerware.com 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

Re: GTK signals question.

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

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 pdbuc...@yahoo.com 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

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 ros...@gmail.com 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 -

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 pdbuc...@yahoo.com 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

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 pdbuc...@yahoo.com 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

Re: Delay time to spawn new threads?

2013-11-28 Thread Chris Vine
On Thu, 28 Nov 2013 09:11:45 + Osmo Antero osm...@gmail.com wrote: My audio-recorder that was based on GTK2 had some threads that also modified the GUI-elements. I had to call GDK_THREADS_ENTERhttps://developer.gnome.org/gdk3/3.10/gdk3-Threads.html#GDK-THREADS-ENTER:CAPS /

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 pdbuc...@yahoo.com 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

Re: Delay time to spawn new threads?

2013-11-28 Thread Chris Vine
On Thu, 28 Nov 2013 14:17:00 + Emmanuele Bassi eba...@gmail.com 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

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 pdbuc...@yahoo.com 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

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 satzkla...@googlemail.com 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

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 de.tec...@gmail.com wrote: Apart from that, in the free_ptr? Does memory get freed for anyone else? #include stdio.h #include gtk/gtk.h #define COLS 200 void free_ptr ( GtkListStore * ); int main ( ) { gtk_init( NULL, NULL ); int i, j;

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 de.tec...@gmail.com wrote: On 06/14/13 17:02, Matthias Clasen wrote: On Fri, Jun 14, 2013 at 3:27 AM, dE de.tec...@gmail.com wrote: I was monitoring the memory usage before and after execution of g_object_unref and gtk_list_store_clear, and it didnt

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 de.tec...@gmail.com wrote: On 06/14/13 22:09, Chris Vine wrote: On Fri, 14 Jun 2013 21:41:05 +0530 dEde.tec...@gmail.com wrote: On 06/14/13 17:02, Matthias Clasen wrote: On Fri, Jun 14, 2013 at 3:27 AM, dEde.tec...@gmail.com wrote: I

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 eba...@gmail.com 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

Re: Updating GUI during long operation

2013-04-21 Thread Chris Vine
On Sat, 20 Apr 2013 16:25:50 -0700 Kip Warner k...@thevertigo.com 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. Hey Chris. Although

Re: Updating GUI during long operation

2013-04-21 Thread Chris Vine
On Sun, 21 Apr 2013 11:33:45 +0100 Chris Vine ch...@cvine.freeserve.co.uk wrote: On Sat, 20 Apr 2013 16:25:50 -0700 Kip Warner k...@thevertigo.com 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

Re: Updating GUI during long operation

2013-04-20 Thread Chris Vine
On Sat, 20 Apr 2013 09:10:11 -0700 Kip Warner k...@thevertigo.com 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

Re: Porting Between Linux and Windows

2012-06-23 Thread Chris Vine
On Sat, 23 Jun 2012 18:13:41 -0400 (EDT) Allin Cottrell cottr...@wfu.edu 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

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 ramirez.ferdin...@yahoo.com wrote: --- On Tue, 6/5/12, James Tappin jtap...@gmail.com 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

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 ern...@comcast.net 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

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 ern...@comcast.net 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 standard prior to C99, which

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 osm...@gmail.com wrote: Jcupitt: Ok, g_idle_add() seems to need protection by gdk_threads_enter() and leave(). Ref:

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 ch...@cvine.freeserve.co.uk 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 that with glib

Re: key press events holding keys down

2012-03-19 Thread Chris Vine
On Sun, 18 Mar 2012 20:08:12 -0800 Christopher Howard christopher.how...@frigidcode.com 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,

Re: key press events holding keys down

2012-03-19 Thread Chris Vine
On Mon, 19 Mar 2012 09:21:27 -0800 Christopher Howard christopher.how...@frigidcode.com 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

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 zandober...@gmail.com 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

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 torr...@gmail.com 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

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 a@me.com 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

Re: Simple GTKMM front-end

2011-09-21 Thread Chris Vine
On Wed, 21 Sep 2011 07:13:56 +0100 John Emmas john...@tiscali.co.uk 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

Re: Simple GTKMM front-end

2011-09-21 Thread Chris Vine
On Wed, 21 Sep 2011 16:50:29 +0100 Chris Vine ch...@cvine.freeserve.co.uk 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

Re: GtkTree and GtkThread: update and refresh

2011-09-21 Thread Chris Vine
On Wed, 21 Sep 2011 22:53:01 +0200 Paolo pra...@gmail.com 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

Re: Simple GTKMM front-end

2011-09-20 Thread Chris Vine
On Tue, 20 Sep 2011 21:26:31 +0100 John Emmas john...@tiscali.co.uk 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

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 pc...@cam.ac.uk 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

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 aitjc...@gmail.com 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) {

Re: Strange dead lock with g_threads_enter

2011-03-06 Thread Chris Vine
On Sun, 6 Mar 2011 16:03:43 + Chris Vine ch...@cvine.freeserve.co.uk wrote: On Sun, 6 Mar 2011 10:57:24 +0800 Wei-Ning Huang aitjc...@gmail.com 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-05 Thread Chris Vine
On Sat, 5 Mar 2011 11:58:23 +0800 Wei-Ning Huang aitjc...@gmail.com 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

Re: Using GSocket in a GTK application

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

Re: Localization issues

2010-12-30 Thread Chris Vine
On Wed, 29 Dec 2010 17:11:47 +0530 Lourembam Lenin lenin...@gmail.com 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

Re: Localization issues

2010-12-30 Thread Chris Vine
On Thu, 30 Dec 2010 10:53:15 + Chris Vine ch...@cvine.freeserve.co.uk wrote: On Wed, 29 Dec 2010 17:11:47 +0530 Lourembam Lenin lenin...@gmail.com 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: Glib mutex doesn't work on Windows

2010-12-16 Thread Chris Vine
On Thu, 16 Dec 2010 12:17:51 -0700 Kevin DeKorte kdeko...@gmail.com 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,

Re: Glib mutex doesn't work on Windows

2010-12-16 Thread Chris Vine
On Thu, 16 Dec 2010 21:15:36 + Chris Vine ch...@cvine.freeserve.co.uk wrote: On Thu, 16 Dec 2010 12:17:51 -0700 Kevin DeKorte kdeko...@gmail.com 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

Re: gthreads vs pthread

2010-10-26 Thread Chris Vine
On Tue, 26 Oct 2010 22:41:44 + Juan Pablo L. jpablolorenze...@hotmail.com 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

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. jpablolorenze...@hotmail.com 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.

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 ch...@cvine.freeserve.co.uk wrote: On Fri, 22 Oct 2010 10:37:01 + Juan Pablo L. jpablolorenze...@hotmail.com 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

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 ja...@jwm-art.net 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

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 ja...@jwm-art.net wrote: On 17 August 2010 11:23, Chris Vine ch...@cvine.freeserve.co.uk 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 how

Re: GtkProgressBar state update issue

2010-05-29 Thread Chris Vine
On Sat, 29 May 2010 06:35:24 - John Emmas john...@tiscali.co.uk 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

Re: gthreads and file operations

2010-04-14 Thread Chris Vine
On Wed, 14 Apr 2010 10:01:15 +0530 Nischal Rao rao.nisc...@gmail.com 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

Re: gthreads and file operations

2010-04-13 Thread Chris Vine
On Wed, 14 Apr 2010 00:13:38 +0530 Nischal Rao rao.nisc...@gmail.com 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

Re: g_idle_add(): limits?

2010-03-11 Thread Chris Vine
On Wed, 10 Mar 2010 15:10:50 +0100 fka...@googlemail.com 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. [...] Assuming that is right, any sources you add before calling

Re: g_idle_add(): limits?

2010-03-09 Thread Chris Vine
On Tue, 9 Mar 2010 10:06:19 +0100 fka...@googlemail.com 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

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 li...@harbaum.org 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

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 xni...@yahoo.com 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

Re: Detecting whether a widget is displayed.

2009-11-05 Thread Chris Vine
On Thu, 5 Nov 2009 06:28:36 -0800 Daniel Burrows dburr...@algebraicthunk.net 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

Re: main loop asynchronous queues

2009-09-24 Thread Chris Vine
On Thu, 24 Sep 2009 14:32:30 -0500 Thomas Stover tho...@wsinnovations.com 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

Re: main loop asynchronous queues

2009-09-23 Thread Chris Vine
On Tue, 22 Sep 2009 18:59:25 -0500 Thomas Stover tho...@wsinnovations.com 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

Re: main loop asynchronous queues

2009-09-23 Thread Chris Vine
On Wed, 23 Sep 2009 08:44:06 -0500 Thomas Stover tho...@wsinnovations.com 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 callback in other

Re: Idle Function Not Getting Called

2009-09-15 Thread Chris Vine
On Mon, 14 Sep 2009 18:02:25 -0400 (EDT) Marshall Lake ml...@mlake.net 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

Re: Idle Function Not Getting Called

2009-09-14 Thread Chris Vine
On Sun, 13 Sep 2009 18:35:06 -0400 (EDT) Marshall Lake ml...@mlake.net 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

Re: Idle Function Not Getting Called

2009-09-14 Thread Chris Vine
On Mon, 14 Sep 2009 13:24:30 -0400 (EDT) Marshall Lake ml...@mlake.net 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-13 Thread Chris Vine
On Sat, 12 Sep 2009 17:46:17 -0400 (EDT) Marshall Lake ml...@mlake.net 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()/

Re: Idle Function Not Getting Called

2009-09-12 Thread Chris Vine
On Sat, 12 Sep 2009 00:18:59 -0400 (EDT) Marshall Lake ml...@mlake.net 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

Re: Idle Function Not Getting Called

2009-09-12 Thread Chris Vine
On Sat, 12 Sep 2009 12:00:11 -0400 (EDT) Marshall Lake ml...@mlake.net 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

Re: Idle Function Not Getting Called

2009-09-10 Thread Chris Vine
On Wed, 9 Sep 2009 12:23:07 -0400 (EDT) Marshall Lake ml...@mlake.net 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

Re: Idle Function Not Getting Called

2009-09-06 Thread Chris Vine
On Sat, 5 Sep 2009 17:39:33 -0400 (EDT) Marshall Lake ml...@mlake.net 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

Re: Idle Function Not Getting Called

2009-09-05 Thread Chris Vine
On Fri, 4 Sep 2009 23:12:24 -0400 (EDT) Marshall Lake ml...@mlake.net 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);

Re: outstream question [i think]

2009-08-28 Thread Chris Vine
On Fri, 28 Aug 2009 08:16:25 -0400 Boggess Rod rbogg...@corefurnace.com 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 rbogg...@corefurnace.com 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

Re: flow control question

2009-07-22 Thread Chris Vine
On Tue, 21 Jul 2009 23:45:38 -0400 (EDT) Allin Cottrell cottr...@wfu.edu 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 luka.napot...@gmail.com 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

Re: Bringing a GtkWindow to the current desktop with libwnck

2009-07-05 Thread Chris Vine
On Sun, 5 Jul 2009 11:51:19 +0200 Vivien Malerba vmale...@gmail.com wrote: 2009/7/3 Jim George jimgeo...@gmail.com Hi all, I'm writing a program that needs to be single-instance. The program will only run on gnome desktop machines. I'm using dbus to ensure this, by having the program

Re: Where is Glib::strfreev()?

2009-05-01 Thread Chris Vine
On Fri, 1 May 2009 22:34:48 +0300 sledge hammer sledgehammer_...@hotmail.com wrote: Hello, I use Gtk::SelectionData::get_uris() and in the docs says that if I get a non-0 result I should use Glib::strfreev() to free it. The problem is there is no documentation about Glib::strfreev() and

Re: A few quick questions about gtkprint

2009-04-15 Thread Chris Vine
On Wed, 15 Apr 2009 07:02:07 +0530 Vamsi Krishna Davuluri vamsi.davul...@gmail.com wrote: hello, I am a gsoc applicant for sugar, and doing a project which adds print support to our applications. The idea is to convert our mime types to a more printable format and print them. So, now

Re: A few quick questions about gtkprint

2009-04-15 Thread Chris Vine
On Wed, 15 Apr 2009 15:33:03 +0530 Vamsi Krishna Davuluri vamsi.davul...@gmail.com wrote: Thanks for your effort and time Chris! That pretty much answers all of my questions, one question though, will poppler and such libs really be necessary when the file can already be viewed by an

Re: A few quick questions about gtkprint

2009-04-15 Thread Chris Vine
On Wed, 15 Apr 2009 10:24:13 +0100 Chris Vine ch...@cvine.freeserve.co.uk wrote: At the library user level, gtk-print doesn't convert to ps or pdf in order to print. It uses cairo/pango-cairo to write each page to a cairo context. It becomes clearer if you look at the documentation

Re: A few quick questions about gtkprint

2009-04-15 Thread Chris Vine
On Wed, 15 Apr 2009 17:48:18 +0530 Vamsi Krishna Davuluri vamsi.davul...@gmail.com wrote: Thank you again! Here is the code I was talking about; my code pretty much does the job of printing .txt files and related mime types, http://pastebin.be/17838 But I would love to see your code as well.

Re: A few quick questions about gtkprint

2009-04-15 Thread Chris Vine
On Wed, 15 Apr 2009 19:03:17 +0530 Vamsi Krishna Davuluri vamsi.davul...@gmail.com wrote: Oh, the thing is sugar has bindings for the evince classes, which we use as import modules. And I will look into it for modules on printing. Thanks for your time. If you are on the #gtk+, can you tell me

Re: g_io_channel_win32_new_messages() WaitForSingleObject()

2009-04-03 Thread Chris Vine
On Thu, 02 Apr 2009 19:49:48 -0500 Thomas Stover tho...@wsinnovations.com wrote: Some notes for anyone else who is just figuring out several things like myself: -a real new source would have a constructor that would do the allocation and setup -it would also have its own functions for

Re: g_io_channel_win32_new_messages() WaitForSingleObject()

2009-04-02 Thread Chris Vine
On Thu, 02 Apr 2009 16:53:11 -0500 Thomas Stover tho...@wsinnovations.com wrote: Well if any lone googlers ever find this, and want to know what happened. I did fix it with this, but I still think the right way is to some how create a new structure that is inherits the GSourceFuncs and

  1   2   >