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: Strict aliasing, yes or no?

2017-04-19 Thread Chris Vine
On Wed, 19 Apr 2017 22:12:24 +0100 Chris Vine <ch...@cvine.freeserve.co.uk> wrote: > On Wed, 19 Apr 2017 12:21:06 +0100 > That (GArray to GRealArray) does break the strict aliasing rules, > unless done through a union (OK with unions in C99 with Technical > Corrigendum 3 and in C

Re: Strict aliasing, yes or no?

2017-04-19 Thread Chris Vine
On Wed, 19 Apr 2017 12:21:06 +0100 Simon McVittie wrote: > On Tue, 18 Apr 2017 at 23:05:04 +0100, Daniel Boles wrote: > > Well, technically, code that relies on aliasing is > > inherently buggy from the outset, because that violates the > > standard. > > Not relying on

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: gtk_text_iter_forward_search() comparison

2017-01-30 Thread Chris Vine
On Mon, 30 Jan 2017 13:53:46 +0200 "Andrew W. Nosenko" wrote: > On Sun, Jan 29, 2017 at 2:16 AM, Eric Cashon via gtk-devel-list < > gtk-devel-list@gnome.org> wrote: > > > > > I have been working on a little search experimentation. Gave > > writing a case in-sensitive

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: Gtk+4.0

2016-08-14 Thread Chris Vine
On Sun, 14 Aug 2016 22:48:24 +0100 Emmanuele Bassi <eba...@gmail.com> wrote: > On Sunday, 14 August 2016, Chris Vine <ch...@cvine.freeserve.co.uk> > wrote: > > > On Sun, 14 Aug 2016 21:22:06 +0200 > > Sébastien Wilmet <swil...@gnome.org <javascript:;>>

Re: Gtk+4.0

2016-08-14 Thread Chris Vine
On Sun, 14 Aug 2016 21:22:06 +0200 Sébastien Wilmet <swil...@gnome.org> wrote: > On Sun, Aug 14, 2016 at 07:17:34PM +0100, Chris Vine wrote: > > On Sun, 14 Aug 2016 13:40:55 +0200 > > Sébastien Wilmet <swil...@gnome.org> wrote: > > > When GTK+ breaks the API,

Re: Gtk+4.0

2016-08-14 Thread Chris Vine
On Sun, 14 Aug 2016 13:40:55 +0200 Sébastien Wilmet wrote: > On Fri, Aug 12, 2016 at 04:19:30AM +, philip.chime...@gmail.com > wrote: > > 4. Maintainers of libraries that depend on GTK (such as > > GtkSourceView, VTE, WebKitGTK) are concerned about having to > > maintain

Re: g_spawn_async_with_pipes is not thread safe

2016-06-03 Thread Chris Vine
On Fri, 3 Jun 2016 12:30:04 +0100 Simon McVittie <simon.mcvit...@collabora.co.uk> wrote: > On 03/06/16 09:18, Chris Vine wrote: > > POSIX allows only async-signal-safe functions (see signal(7)) to be > > called in the child between fork() and exec(), which drastically >

Re: g_spawn_async_with_pipes is not thread safe

2016-06-03 Thread Chris Vine
On Fri, 3 Jun 2016 10:46:30 +0300 Andrejs Hanins wrote: > I've discovered a subtle, but quite a serious issue with > g_spawn_async_with_pipes API. The problem is that under some > circumstances this API causes memory allocation operations to be > called from the

Re: G_UTF8String: Boxed Type Proposal

2016-03-18 Thread Chris Vine
On Fri, 18 Mar 2016 10:19:08 -0400 Randall Sawyer wrote: > Also - I just discovered that glibmm has a class Glib::ustring > (https://developer.gnome.org/glibmm/stable/classGlib_1_1ustring.html). > I am going to take a look through its source to see what they have >

Re: Memory leak in g_dbus_proxy_new_sync and Gio::DBus::Proxy

2016-01-06 Thread Chris Vine
On Wed, 6 Jan 2016 15:14:32 +0200 Andrejs Hanins wrote: > Hi, > > This is related to the SO question > http://stackoverflow.com/questions/29823097/glib-memory-leak-when-creating-gdbusproxy > > I'm using Glibmm (2.44.0) and also faced a memory leak problem > when

Re: GLib-CRITICAL Source ID 35 was not found when attempting to remove it

2015-09-16 Thread Chris Vine
On Wed, 16 Sep 2015 10:54:15 +0530 Lokesh Chakka wrote: > markku, > > i kept gtk_thread_enter / leave for experimental purpose. > Actually issue was happening irrespective of existence of > gtk_thread_enter / leave. You are missing the point. You must use

Re: GLib-CRITICAL Source ID 35 was not found when attempting to remove it

2015-09-16 Thread Chris Vine
On Wed, 16 Sep 2015 16:35:09 +0100 Chris Vine <ch...@cvine.freeserve.co.uk> wrote: > On Wed, 16 Sep 2015 10:54:15 +0530 > Lokesh Chakka <lvenkatakumarcha...@gmail.com> wrote: > > markku, > > > > i kept gtk_thread_enter / leave for experimental purpo

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: I'm done with O_CLOEXEC

2015-03-22 Thread Chris Vine
On Sat, 21 Mar 2015 20:57:54 + Chris Vine ch...@cvine.freeserve.co.uk wrote: [snip] Given the restrictions on what you can do between a fork and an exec in a multi-threaded program (and gio is multi-threaded) the implementation of GSubprocess looks as if it must be quite clever

Re: I'm done with O_CLOEXEC

2015-03-21 Thread Chris Vine
On Sat, 21 Mar 2015 06:59:41 +0100 Jürg Billeter j...@bitron.ch wrote: On Sat, 2015-03-21 at 01:32 -0400, Ryan Lortie wrote: It seems that this is a (slightly) recent addition. It's documented: F_DUPFD_CLOEXEC (int; since Linux 2.6.24) so I'm sure we'll probably still need

Re: I'm done with O_CLOEXEC

2015-03-21 Thread Chris Vine
On Sat, 21 Mar 2015 13:47:04 + Florian Müllner fmuell...@gnome.org wrote: On Sat, Mar 21, 2015 at 12:31 PM Chris Vine ch...@cvine.freeserve.co.uk wrote: Further, there are cases where porting to GSubprocess does not actually do the job easily because (as I understand

Re: recently-used.xbel

2015-01-28 Thread Chris Vine
On Wed, 28 Jan 2015 15:23:41 + John Emmas john...@tiscali.co.uk wrote: [snip] Thanks guys. I only managed to return to this today but after following your advices, I've managed to set up a working handler function. I can iterate over my Gtk::RecentManager entries and remove any that I

Re: GTK+ brochure for FOSDEM

2015-01-24 Thread Chris Vine
On Sat, 24 Jan 2015 10:07:56 -0500 Paul Davis p...@linuxaudiosystems.com wrote: On Sat, Jan 24, 2015 at 9:40 AM, Sébastien Wilmet swil...@gnome.org wrote: To come back to GLib/GTK+, what would you explain about GTK+ that is not explained in the brochure? Maybe single-instance

Re: GTK+ brochure for FOSDEM

2015-01-23 Thread Chris Vine
On Fri, 23 Jan 2015 21:06:05 +0100 Sébastien Wilmet swil...@gnome.org wrote: Uh, it's quite the contrary IMHO. If a developer chooses the C language and wants to write a GTK+ application, it's advised to write GObject classes to have a good code architecture. Look at gedit for instance, it's

Re: GTK+ brochure for FOSDEM

2015-01-23 Thread Chris Vine
On Fri, 23 Jan 2015 22:29:02 +0100 Sébastien Wilmet swil...@gnome.org wrote: Yes, for a small application it's another possible code architecture. But I would still recommend to write C code in object oriented style (if the C language has been chosen). Just to be clear, I completely disagree.

Re: GTK+ brochure for FOSDEM

2015-01-23 Thread Chris Vine
On Fri, 23 Jan 2015 23:24:18 +0100 Sébastien Wilmet swil...@gnome.org wrote: I said object oriented style, not GObject. You can write C code with an OO style without using GObject. What you actually said was: Uh, it's quite the contrary IMHO. If a developer chooses the C language and wants

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-Message: Failed to load module canberra-gtk-module

2014-03-12 Thread Chris Vine
On Tue, 11 Mar 2014 21:11:16 -0400 Jasper St. Pierre jstpie...@mecheye.net wrote: No, actually. The issue is that the canberra GTK+ module uses an API which we removed. It's been broken like this for quite a while. We patch it away in Fedora, but libcanberra won't accept the patch upstream.

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: How to re-enable icons in menus?

2014-02-04 Thread Chris Vine
On Tue, 04 Feb 2014 09:39:26 +0100 Michael Lipp m...@mnl.de wrote: Am 04.02.2014 01:42, schrieb Matthias Clasen: Hey, you didn't say which environment this struggle is happening in, so I'm just going to assume it is GNOME, and gnome-settings-daemon is running. In that case,

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: Overhead of type casting when using GObject system

2013-02-11 Thread Chris Vine
On Sun, 10 Feb 2013 11:08:31 + Emmanuele Bassi eba...@gmail.com wrote: On 9 February 2013 12:43, Lanoxx lan...@gmx.net wrote: However those cast checks can be disabled at compile time removing the overhead, so GTK_WIDGET(foo) would be equivalent to (GtkWidget *) foo. Ah thats good

Re: building gtk+ 3 on rhel6

2013-01-14 Thread Chris Vine
You are probably trying to build the latest pango (1.32.6). This requires the very latest, just released and still unstable fontconfig-2.10.91. The fix for this is to install pango-1.32.5 instead. Chris On Sun, 13 Jan 2013 19:25:49 -0600 Ted Toth txt...@gmail.com

Re: Forks, slices and threads: Can you make GSlice deadlock?

2012-12-07 Thread Chris Vine
On Thu, 6 Dec 2012 21:25:47 +0100 David Nečas y...@physics.muni.cz wrote: can g_slice_alloc() be made to deadlock simply by some bad sequence of GLib function calls, considering the calling program does not, of course, hold any GLib lock explicitly? (Without a GLib bug, that is.) I am

Re: Forks, slices and threads: Can you make GSlice deadlock?

2012-12-07 Thread Chris Vine
On Fri, 7 Dec 2012 22:37:27 +0100 David Nečas y...@physics.muni.cz wrote: On Fri, Dec 07, 2012 at 08:44:01PM +, Chris Vine wrote: ... So for your scheme to work, the parent before forking must be single threaded. As I have learnt the hard way, this is not something I can ensure even

Re: Mainloop debugging tool idea

2012-11-19 Thread Chris Vine
On Mon, 19 Nov 2012 00:55:49 +0100 Bastien Nocera had...@hadess.net wrote: I had some problems with gnome-shell's responsiveness on particularly dodgy hardware, and was wondering whether the shell was actually blocking at any point. I cannot answer your question about diagnosing this, and I am

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: gdk threads ...

2012-04-25 Thread Chris Vine
On Wed, 25 Apr 2012 09:05:47 -0400 Paul Davis p...@linuxaudiosystems.com wrote: On Wed, Apr 18, 2012 at 6:24 AM, Michael Meek michael.me...@suse.com wrote: [... ] there seems to be some confusion here. I've read back over your posts in the this thread. I don't see you mentioning libreoffice

Re: gdk threads ...

2012-04-25 Thread Chris Vine
On Wed, 25 Apr 2012 14:39:24 -0400 Paul Davis p...@linuxaudiosystems.com wrote: i've never seen anyone remark that attaching a timeout (or other source) to a main loop is thread safe. if it is, then great. i was under the impression that g_idle_add() was special ... All the main loop sources

Re: gdk threads ...

2012-04-25 Thread Chris Vine
On Wed, 25 Apr 2012 15:10:18 -0400 the issue is not the source. its *attaching* it that is the potential source of problems. g_source_attach()'s docs make no mention of whether it can be done safely from another thread. that's also true of the layers above it like g_timeout_add() etc. where

Re: gdk threads ...

2012-04-25 Thread Chris Vine
On Wed, 25 Apr 2012 20:28:31 +0100 Chris Vine ch...@cvine.freeserve.co.uk wrote: The documentation states: GLib itself is internally completely thread-safe (all global data is automatically locked), but individual data structure instances are not automatically locked for performance reasons

Re: RFC: glocal - automatically freeing memory when it goes out of scope

2012-04-05 Thread Chris Vine
On Thu, 05 Apr 2012 10:58:24 -0400 (EDT) Alexander Larsson al...@redhat.com wrote: [snip] I might have been a bit sloppy with my words, but the following C++ code, in a shared library: MyClass my_object; Needs to have the MyClass constructor for the static object my_object run before the

Re: RFC: glocal - automatically freeing memory when it goes out of scope

2012-04-04 Thread Chris Vine
On Tue, 03 Apr 2012 23:35:46 -0400 Colin Walters walt...@verbum.org wrote: On Wed, 2011-11-16 at 21:05 +0100, Mikkel Kamstrup Erlandsen wrote: Hi all, I have been looking at gcc's cleanup attribute[1] that allows one to specify a callback that will be invoked when a variable goes out

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: GLib next cycle update

2011-09-20 Thread Chris Vine
On Mon, 19 Sep 2011 16:14:08 +0200 Jürg Billeter j...@bitron.ch wrote: On Sun, 2011-09-18 at 13:11 -0400, Ryan Lortie wrote: - initialise on the first g_thread_create() call This seems like it would avoid any chance of races in gslice initialisation but it means that we wouldn't

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: GtkApplication and argc/arv

2011-03-10 Thread Chris Vine
On Wed, 9 Mar 2011 08:16:44 + Emmanuele Bassi eba...@gmail.com wrote: On 2011-03-08 at 22:16, Paul Davis wrote: On Tue, Mar 8, 2011 at 9:56 PM, Andrew Cowie and...@operationaldynamics.com wrote: On Tue, 2011-03-08 at 12:06 +0100, Murray Cumming wrote: I would very much like some

Re: GtkApplication and argc/arv

2011-03-10 Thread Chris Vine
On Thu, 10 Mar 2011 14:48:12 +0100 Murray Cumming murr...@murrayc.com wrote: On Thu, 2011-03-10 at 09:59 +, Chris Vine wrote: [snip] The case for having single-instance programs in most cases for programs with a GUI interface seems self-evident to me, since most GUI programs keep some

Re: GtkApplication and argc/arv

2011-03-10 Thread Chris Vine
On Thu, 10 Mar 2011 16:47:59 +0100 Murray Cumming murr...@murrayc.com wrote: If it's most programs then surely you can give some example. I don't think that most applications have to deal with caching, bookmarks, and history like Firefox. I didn't realise you wanted examples, but most programs

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

  1   2   3   >