Re: Why do constructors return GtkWidget?

2009-11-04 Thread Andrew Paprocki
2009/11/4 Sven Herzberg : > In my opinion the GTK+ way is really nice (just compare it to GStreamers > element factory, which behaves essentially the same way, just as > GnomeCanvas' gnome_canvas_item_new() function). It's really nice to get > those items returned as the generic type (but Cody told

Re: [PATCH] RFC: adding a #define G_VALUE_INIT for initializing GValue on the stack

2009-03-29 Thread Andrew Paprocki
On Sat, Mar 28, 2009 at 2:09 PM, Sven Neumann wrote: >> I've attached a patch for easy reference. > > I suggest you open an enhancement request for this at bugzilla.gnome.org > and attach your patch there. Sure thing: http://bugzilla.gnome.org/show_bug.cgi?id=577231 Thanks, -Andrew _

[PATCH] RFC: adding a #define G_VALUE_INIT for initializing GValue on the stack

2009-03-27 Thread Andrew Paprocki
On Fri, Mar 27, 2009 at 1:47 PM, Andrew Paprocki wrote: > I checked gvalue.h and I don't see a #define in there containing the > proper initializer list for a GValue to prevent gcc warnings. Rather > than duplicating "GValue v = {0, {{0}}};" everywhere, I'd lik

RFC: adding a #define G_VALUE_INIT for initializing GValue on the stack

2009-03-27 Thread Andrew Paprocki
When a GValue is declared on the stack, the large code base I work with usually does not properly initialize the struct. (e.g. "GValue v = {0,};") This causes gcc to print warnings when 'gcc -Wall -Wextra' is used due to -Wmissing-braces and -Wmissing-field-initializers. I checked gvalue.h and I d

Re: gparamspecs.c param_double_validate() doesn't support NaN/Inf?

2009-01-12 Thread Andrew Paprocki
On Fri, Jan 9, 2009 at 7:11 AM, Michael Natterer wrote: > Would you please file this as enhancement request against GObject? > > An attached patch that follows the coding style nicely plus some > code to test the feature in gobject/tests will increase the > probability of this becoming committed s

Re: gparamspecs.c param_double_validate() doesn't support NaN/Inf?

2009-01-10 Thread Andrew Paprocki
On Sat, Jan 10, 2009 at 7:06 AM, Brian J. Tarricone wrote: > But I don't disagree that NaN or +/- inf should be allowed, assuming > a restriction such as the above isn't in place for the particular > instance of GParamSpecDouble. This brings up an interesting question.. if the GParamSpecDouble mi

Re: gparamspecs.c param_double_validate() doesn't support NaN/Inf?

2009-01-09 Thread Andrew Paprocki
On Fri, Jan 9, 2009 at 7:11 AM, Michael Natterer wrote: >> Should I patch GParamSpecDouble to have two :1 fields for 'allow_nan', >> 'allow_inf' and make param_double_validate do the correct thing with >> isnan()/isinf()? > > I think you have a very good point here and that use case is entirely >

gparamspecs.c param_double_validate() doesn't support NaN/Inf?

2009-01-08 Thread Andrew Paprocki
I have a GObject with a double property that I need to be able to set NaN to in certain circumstances. Right now, GObject prints out a warning when this is done because param_double_validate does not handle NaN/Inf explicitly. ** WARNING **: value "NaN" of type `gdouble' is invalid or out of rang

UTF8 strchug/chomp/strip

2008-08-04 Thread ANDREW PAPROCKI, BLOOMBERG/ 731 LEXIN
I noticed that glib doesn't contain g_utf8_strchug, g_utf8_strchomp, g_utf8_strstrip (macro), which would be UTF8 safe versions of the functions in gstrfuncs.c. Conveniently, these functions already exists in file-roller, which I found here: http://tinyurl.com/6xpjv9 Can these be pulled down

Re: Pidl - an IDL for GObject boilerplate and language bindings

2008-02-12 Thread Andrew Paprocki
Good to see others working on abstractions like this. We have a closed system for internal use, but it was developed to do much of the same by reimplementing/extending the GOB syntax and writing a new "compiler" for it. Simultaneous code is output in both C/C++ with an introspection system added fo

Optimization possible in g_object_set_valist?

2006-12-19 Thread ANDREW PAPROCKI, BLOOMBERG/ 731 LEXIN
wanting to copy the GValue before calling object_set_property()? Thanks, Andrew Paprocki Bloomberg LP ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list

Re: GEvent - Proposal for a new threading structure for GLib

2006-11-17 Thread Andrew Paprocki
On 11/17/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I would suggest that somebody look at what the full requirements are, > and not mimic Python. :-) I agree. I suggest that the use/syntax of .NET's WaitHandle, AutoResetEvent, ManualResetEvent be looked over. .NET/mono make this concept ve

Re: Serialization in libgobject

2006-05-24 Thread Andrew Paprocki
he attributes themselves support attributes, so you can nest them indefinetely if you have a situation that warrants it. (Just like in .NET) Many articles/books on .NET attributes exist, but here is a good description if anyone is interested: http://www.csharphelp.com/archives3/archive558.html Andrew Paprocki Bloomberg LP ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list

UTF8 utils, g_utf8_strstr() g_utf8_strcasestr()?

2006-05-15 Thread Andrew Paprocki
I have and submit the patch. If this already exists in some form, let me know, thanks! Andrew Paprocki Bloomberg LP ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list

Re: Solaris fopen issue

2006-05-10 Thread Andrew Paprocki
their chance to right this particular issue. Andrew Paprocki Bloomberg LP > On Wed, 2006-05-10 at 10:58 -0400, Owen Taylor wrote: > > > The Solaris implementation has a problem with any fopen() which > > >opens a file above the 256 file descriptor. > > > > I&#

g_object_new(G_TYPE_OBJECT, NULL)

2006-03-10 Thread ANDREW PAPROCKI, BLOOMBERG/ 731 LEXIN
to do this? In my opinion, it just *feels* wrong... All over the documentation, GObject is referred to as a "base" class, but that implies abstract to me because the intention is for everyone to created subclassed types. Am I missing something? Andrew Paprocki Bl

Fwd: Re: Re: Depending on C99 (Re: GtkBindingSignal changes)

2006-01-06 Thread ANDREW PAPROCKI, BLOOMBERG/ 731 LEXIN
ted by ISO C90 and was > not supported by GCC versions before GCC 3.0. Yeah, just saw that now.. Now I consider the fact that -std=c89 does not implicitly enable -Wdeclaration-after-statement a bug.. ;) Andrew Paprocki Bloomberg LP ___ g

Fwd: Re: Depending on C99 (Re: GtkBindingSignal changes)

2006-01-06 Thread ANDREW PAPROCKI, BLOOMBERG/ 731 LEXIN
dantic -o g g.c g.c: In function `main': g.c:8: warning: ISO C89 forbids mixed declarations and code This could have changed in newer GCC versions, but this is with 3.3.4. Andrew Paprocki Bloomberg LP ___ gtk-devel-list mailing list gtk-devel-lis

Perennial ISO C99 Validated Products List

2006-01-05 Thread ANDREW PAPROCKI, BLOOMBERG/ 731 LEXIN
5.6 As tested by the Perennial C Compiler Validation Suite. http://www.peren.com/pages/cvsa.htm Andrew Paprocki Bloomberg LP ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list

c99 runtime support on solaris/aix

2006-01-05 Thread ANDREW PAPROCKI, BLOOMBERG/ 731 LEXIN
are running Solaris 10 and IBM AIX 5L 5.3, the OS will not have C99 compliant standard C libraries. Andrew Paprocki Bloomberg LP ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list

Re: Depending on C99 (Re: GtkBindingSignal changes)

2006-01-05 Thread ANDREW PAPROCKI, BLOOMBERG/ 731 LEXIN
VC++8.0 == visual studio .net 2005 Andrew Paprocki Bloomberg LP ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list

Fwd: Re: Fwd: Re: Fwd: Re: Depending on C99 (Re: GtkBindingS

2006-01-05 Thread ANDREW PAPROCKI, BLOOMBERG/ 731 LEXIN
ple), building with c99 requires a certain OS level and runtime libraries be installed, breaking ABI. Andrew Paprocki Bloomberg LP ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list

Fwd: Re: Fwd: Re: Depending on C99 (Re: GtkBindingSignal cha

2006-01-05 Thread ANDREW PAPROCKI, BLOOMBERG/ 731 LEXIN
>does this make? there is no reason why software from the year 2006 >needs to be compiled with compilers from the year 1986. cc: Sun C 5.5 Patch 112760-09 2004/03/31 That does not look like a compiler from 1986 to me. I said we disable c99 features for internal reasons. When you are dealing with

Fwd: Re: Depending on C99 (Re: GtkBindingSignal changes)

2006-01-05 Thread ANDREW PAPROCKI, BLOOMBERG/ 731 LEXIN
I disagree with this completely. We compile all of our code on Solaris/AIX with SunPRO cc & IBM xlc without c99 extensions enabled for our own reasons. Code can take advantage of c99 features, but only if they can be abstracted out in gmacros/config.h/etc. Andrew Paprocki Bloomber

Re: ABI and API for g_object_ref_sink() (Re: GTK_FLOATI

2005-12-15 Thread ANDREW PAPROCKI, BLOOMBERG/ 731 LEXIN
e above be considered as a viable option if it was to wait entirely for 3.x? Andrew Paprocki Bloomberg LP ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list

Fwd: Re: ABI and API for g_object_ref_sink() (Re: GTK_FLOATI

2005-12-15 Thread ANDREW PAPROCKI, BLOOMBERG/ 731 LEXIN
ing functionality?) Andrew Paprocki Bloomberg LP ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list

Fwd: Re: Fwd: Re: GTK_FLOATING broken in 2.9?

2005-12-15 Thread ANDREW PAPROCKI, BLOOMBERG/ 731 LEXIN
ed as to what they expect. The only issue here as far as I'm concerned is how to best deal with the GTK_OBJECT_SET_FLAGS macro problem. If I remember from the original discussion, GtkObject can disappear completely in the next major GTK version, since all of its functionality would n

Fwd: Re: Fwd: Re: GTK_FLOATING broken in 2.9?

2005-12-15 Thread ANDREW PAPROCKI, BLOOMBERG/ 731 LEXIN
object is not floating, and ref_sink internally. So the user's code will look like: object = fancy_not_gtk_object_new(); fancy_container_add(container, object); Andrew Paprocki Bloomberg LP ___ gtk-devel-list mailing list gtk-devel-list@gnome.org h

Fwd: Re: GTK_FLOATING broken in 2.9?

2005-12-14 Thread ANDREW PAPROCKI, BLOOMBERG/ 731 LEXIN
floating behavior that is not dependent on GTK already write their own wrappers, but there is no reason why the underlying object framework should not support it natively, as this benefits all users who write reusable gobject based APIs. Andrew Paprocki Bloomberg LP - Original Message

Re: g_slice_

2005-12-05 Thread Andrew Paprocki
Since we don't/can't use glibc, I wouldn't want to see this functionality disappear if it were supported in glibc. :) Andrew Paprocki Bloomberg LP ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list

Re: g_slice_

2005-12-05 Thread Andrew Paprocki
ntation if they felt it was necessary to stay with the existing code. This is a nice feature in the case of the regular gmem functions, so it would be nice to see something similar for g_slice. Andrew Paprocki Bloomberg LP > To: [EMAIL PROTECTED] > From: [EMAIL PROTECTED] (Morten We

g_list_prepend() does not call g_list_first()

2005-12-01 Thread ANDREW PAPROCKI, BLOOMBERG/ 731 LEXIN
this a possible addition to 2.10 since it would change API behavior? Or has this never been done because the impact was deemed to great versus the benefit? Andrew Paprocki Bloomberg LP ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http

Fwd: Re: comments on g_list_slice / g_list_splice

2005-11-30 Thread ANDREW PAPROCKI, BLOOMBERG/ 731 LEXIN
- Original Message - From: Paul Leonerd Evans <[EMAIL PROTECTED]> At: 11/30 5:49 On Wed, 30 Nov 2005 00:57:42 -0500 "ANDREW PAPROCKI, BLOOMBERG/ 731 LEXIN" <[EMAIL PROTECTED]> wrote: > GList * g_list_slice(GList *list, GList *link, gint n_links); > GList * g_lis

comments on g_list_slice / g_list_splice

2005-11-29 Thread ANDREW PAPROCKI, BLOOMBERG/ 731 LEXIN
uld primarily be looking for remove_slice and splice calls that take ownership. Comments? Andrew Paprocki Bloomberg LP ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list

Sun's fopen() fd limit of 256

2005-11-23 Thread ANDREW PAPROCKI, BLOOMBERG/ 731 LEXIN
the system implementation has an fd limitation? The configure script could detect this and enable it if necessary. Just wondering if anyone else had run into this problem... Thanks, Andrew Paprocki Bloomberg LP ___ gtk-devel-list mailing list gtk-devel-list

GtkNotebook signals

2005-11-22 Thread ANDREW PAPROCKI, BLOOMBERG/ 731 LEXIN
Can someone fill me in if there is proper documentation for the signals on GtkNotebook? Specifically, these: "change-current-page" "focus-tab" "select-page" "switch-page" If an application wishes to prevent the notebook from switching pages if some type of validation fails on the current existi

[PATCH] glib/gmacros.h G_STMT_START/G_STMT_END modification

2005-11-20 Thread ANDREW PAPROCKI, BLOOMBERG/ 731 LEXIN
jections, I ask that this be checked into glib CVS. Thanks, Andrew Paprocki Bloomberg LP --- configure.in18 Nov 2005 14:01:59 - 1.474 +++ configure.in20 Nov 2005 21:11:56 - @@ -700,6 +700,21 @@ }],[g_can_inline=yes],[g_can_inline=no]) AC_MSG_RESULT($g_can_inline)

[PATCH] glib/gtimer: nsleep on AIX, high resolution funcs

2005-11-20 Thread ANDREW PAPROCKI, BLOOMBERG/ 731 LEXIN
resolution timer functions take ~3 cycles. Compared to gettimeofday(), they are about 10x faster. If no one has objections, I ask that this be checked into glib CVS. Thanks, Andrew Paprocki Bloomberg LP --- configure.in18 Nov 2005 14:01:59 - 1.474 +++ configure.in20 Nov 2005 20

Fwd: Re: gtk_container_real_check_resize

2005-11-20 Thread ANDREW PAPROCKI, BLOOMBERG/ 731 LEXIN
ck to 1998 to clear this up.. :) Andrew Paprocki Bloomberg LP - Original Message - From: Nickolay V. Shmyrev <[EMAIL PROTECTED]> At: 11/20 8:26 Hi Andrew Since this code is badly documented, you might want to look at annotated CVS history on cvs.gnome.org Here is the cha

gtk_container_real_check_resize

2005-11-18 Thread ANDREW PAPROCKI, BLOOMBERG/ 731 LEXIN
with insufficient space? Are container implementations supposed to do something special to handle this case? Andrew Paprocki Bloomberg LP ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list

Fwd: Re: G_STMT_START / G_STMT_END on Sun

2005-11-14 Thread ANDREW PAPROCKI, BLOOMBERG/ 731 LEXIN
to propose a patch after I try to track down the explicit compiler version that had a prob. -Andrew - Original Message - From: Manish Singh <[EMAIL PROTECTED]> At: 11/12 15:15 On Sat, Nov 12, 2005 at 02:28:21PM +0100, Tim Janik wrote: > On Fri, 11 Nov 2005, ANDREW PAPROCKI, B

G_STMT_START / G_STMT_END on Sun

2005-11-11 Thread ANDREW PAPROCKI, BLOOMBERG/ 731 LEXIN
l code, but does not mention any version numbers. Next step, dig out the Perl src to see if they have an idea :) Thanks, Andrew Paprocki Bloomberg LP ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list

Re: GObject reference counting / lack of "sink" issue

2005-10-02 Thread Andrew Paprocki
Dave, Using the same container example which needs to take ownership of GObjects passed to the public API -- The problem we have is that much more time and effort goes into crafting the core container objects, and having inconsistent public API (two methods) to add an object to a container is h