g_idle_add() used for scrolling of text view to the end iter

2007-05-03 Thread ibrar ahmed
Hello,

In message log window i used g_idle_add() method for the purpose of scrolling 
to the end iter. 
During progress bar it works fine for the hard disk but when i goes to work on 
FTP there is some warnings across "word_wrap" and  
"wide_margins" in Log window during progress.

Any body can help me out for this.

How i can scroll window automatically to end iter when messages put on log 
window during process. 

Kind Regards,
Ibrar Ahmed

   
-
Ahhh...imagining that irresistible "new car" smell?
 Check outnew cars at Yahoo! Autos.___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


How to compile all icons used in programm

2007-05-03 Thread Rafael Pacheco

hi all
i need compile my icons into application
how can i do it and how to access ?

tks all
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


RE: Hello and win32 g_io_channel help needed

2007-05-03 Thread Burke.Daniel
Failing this method I am moving to have my platform specific code handle the 
send and receiving, however I would still really like to use some kind of a 
callback like g_io_add_watch.

I can easily achieve this under Linux with a little re-organisation to separate 
out the platform specific portions.

Does anyone have a fairly straightforward approach to do the same under 
windows?  If I cannot add a watch to the serial port I am afraid I may have to 
either fake it with a poll?

Regards,
Burkey


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Burke.Daniel
Sent: Friday, 4 May 2007 10:11
To: gtk-list@gnome.org
Subject: RE: Hello and win32 g_io_channel help needed

Actually I changed it to use the win32 one but it behaves the same.

This seems to be a difficult one to answer, so far nobody has been able to even 
suggest anything.


-Original Message-
From: Chris Vine [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 3 May 2007 20:15
To: Burke.Daniel
Cc: gtk-list@gnome.org
Subject: Re: Hello and win32 g_io_channel help needed

On Thu, 2007-05-03 at 14:04 +1000, Burke.Daniel wrote:
> Hail!  I am new.. so gday to everyone here.
>
> I am after some assistance with getting my event-driven serial port
> input working on Windows.
> 
> The project is a portable serial tool for internal use within our
> company, I am writing it using libglademm since I love C++ and am a
> big Gnome/GTK fan (my laptop being Ubuntu Gnome based)

> On Linux I am using open and termios to handle the serial port setup,
> finally returning a GIOChannel for monitoring and so far.. so good.
> However I am now trying to get the evil version of it running and am
> not so happy.  Here I am using CreateFile to open and configure my
> port, then use:
>
> m_PortDescriptor = _open_osfhandle((long)m_PortHandle, 0);
> 
> channel = g_io_channel_unix_new(m_PortDescriptor);

> to get the channel.  Later on I use g_io_add_watch to setup a monitor
> which seems to compile and run ok, however when I send data using
> g_io_channel_write_chars it seems to crash and I also don’t seem to be
> receiving data (often resulting another application halt)

You mention that you are using Windows, so is there any reason why you
are calling g_io_channel_unix_new() instead of the
g_io_channel_win32_new*() functions to create the GIOChannel object?

Chris




___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


RE: Hello and win32 g_io_channel help needed

2007-05-03 Thread Burke.Daniel
Actually I changed it to use the win32 one but it behaves the same.

This seems to be a difficult one to answer, so far nobody has been able to even 
suggest anything.


-Original Message-
From: Chris Vine [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 3 May 2007 20:15
To: Burke.Daniel
Cc: gtk-list@gnome.org
Subject: Re: Hello and win32 g_io_channel help needed

On Thu, 2007-05-03 at 14:04 +1000, Burke.Daniel wrote:
> Hail!  I am new.. so gday to everyone here.
>
> I am after some assistance with getting my event-driven serial port
> input working on Windows.
> 
> The project is a portable serial tool for internal use within our
> company, I am writing it using libglademm since I love C++ and am a
> big Gnome/GTK fan (my laptop being Ubuntu Gnome based)

> On Linux I am using open and termios to handle the serial port setup,
> finally returning a GIOChannel for monitoring and so far.. so good.
> However I am now trying to get the evil version of it running and am
> not so happy.  Here I am using CreateFile to open and configure my
> port, then use:
>
> m_PortDescriptor = _open_osfhandle((long)m_PortHandle, 0);
> 
> channel = g_io_channel_unix_new(m_PortDescriptor);

> to get the channel.  Later on I use g_io_add_watch to setup a monitor
> which seems to compile and run ok, however when I send data using
> g_io_channel_write_chars it seems to crash and I also don’t seem to be
> receiving data (often resulting another application halt)

You mention that you are using Windows, so is there any reason why you
are calling g_io_channel_unix_new() instead of the
g_io_channel_win32_new*() functions to create the GIOChannel object?

Chris




___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: GObject: Freeing memory of instance members?

2007-05-03 Thread Alexandre Moreira
On 5/3/07, Øystein Johansen <[EMAIL PROTECTED]> wrote:
> David Nečas (Yeti) wrote:
> > On Thu, May 03, 2007 at 10:40:17PM +0200, ??ystein Johansen wrote:
> >> Aha, but how/where to I set the pointer to the finalize() function?
> >
> > In my_class_init() where you override all other methods.
> > See (almost) any Gtk+ widget for examples.
>
> Aha again! I guess I can free private members in the same method as well?
>
> static void
> neural_net_finalize (GObject *object)
> {
>   NeuralNet *nn;
>
>   g_return_if_fail (IS_NEURAL_NET(object));
>
>   nn = NEURAL_NET(object);
>
>   g_free(nn->priv->weight_h);
>   g_free(nn->priv->weight_o);
>   g_free(nn->priv->bias_h);
>   g_free(nn->priv->bias_o);
>   g_free(nn->priv->filename);
>   g_free(nn->priv);
>
>   g_message("This is the finalize method and I've freed the instance
> members!\n");
>
> }
>
> static void
> neural_net_class_init (NeuralNetClass *klass){
> GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
> gobject_class->finalize = neural_net_finalize;
> g_type_class_add_private (klass, sizeof (NeuralNetPrivate));
> }
>
> I think this looks ok, doesn't it? No, wait a minite What about the
> parent? This class has GObjectClass as parent, how do I call it's finalize?

At your class_init you should peek (g_type_class_peek_parent, using
your class pointer as parameter) a pointer to your parent class and
keep it in a global storage, accessible to your finalize.

Then, in your finalize method you call the finalize method on this
pointer you just got from peek_parent, something like:

G_OBJECT_CLASS(parent_class)->finalize(pointer_to_the_object_being_finalized);

I hope this helps.
Alexandre Moreira.

>
> Thanks,
> -Øystein
>
> ___
> gtk-list mailing list
> gtk-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gtk-list
>
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: GObject: Freeing memory of instance members?

2007-05-03 Thread Alexandre Moreira
On 5/3/07, David Nečas (Yeti) <[EMAIL PROTECTED]> wrote:
> On Thu, May 03, 2007 at 10:40:17PM +0200, ??ystein Johansen wrote:
> >
> > Aha, but how/where to I set the pointer to the finalize() function?
>
> In my_class_init() where you override all other methods.
> See (almost) any Gtk+ widget for examples.

Hey Yeti, since you're on the subject of object destruction, could you
explain me the difference between the finalize and dispose methods ? I
use finalize for everything but I believe I should be using dispose
somewhere, it wouldn't exist if it were useless...I guess :)

Thanks,
Alexandre Moreira.

>
> Yeti
>
> --
> http://gwyddion.net/
> ___
> gtk-list mailing list
> gtk-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gtk-list
>
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: GObject: Freeing memory of instance members?

2007-05-03 Thread Øystein Johansen
David Nečas (Yeti) wrote:
> On Thu, May 03, 2007 at 10:40:17PM +0200, ??ystein Johansen wrote:
>> Aha, but how/where to I set the pointer to the finalize() function?
> 
> In my_class_init() where you override all other methods.
> See (almost) any Gtk+ widget for examples.

Aha again! I guess I can free private members in the same method as well?

static void
neural_net_finalize (GObject *object)
{
  NeuralNet *nn;

  g_return_if_fail (IS_NEURAL_NET(object));

  nn = NEURAL_NET(object);

  g_free(nn->priv->weight_h);
  g_free(nn->priv->weight_o);
  g_free(nn->priv->bias_h);
  g_free(nn->priv->bias_o);
  g_free(nn->priv->filename);
  g_free(nn->priv);

  g_message("This is the finalize method and I've freed the instance
members!\n");

}

static void
neural_net_class_init (NeuralNetClass *klass){
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
gobject_class->finalize = neural_net_finalize;
g_type_class_add_private (klass, sizeof (NeuralNetPrivate));
}

I think this looks ok, doesn't it? No, wait a minite What about the
parent? This class has GObjectClass as parent, how do I call it's finalize?

Thanks,
-Øystein

___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: GObject: Freeing memory of instance members?

2007-05-03 Thread Yeti
On Thu, May 03, 2007 at 10:40:17PM +0200, ??ystein Johansen wrote:
> 
> Aha, but how/where to I set the pointer to the finalize() function?

In my_class_init() where you override all other methods.
See (almost) any Gtk+ widget for examples.

Yeti

--
http://gwyddion.net/
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: GObject: Freeing memory of instance members?

2007-05-03 Thread Øystein Johansen
David Nečas (Yeti) wrote:
> On Thu, May 03, 2007 at 09:51:05PM +0200, ?ystein Johansen wrote:
>> I have an instance struct that has a pointer to a some data that's
>> dynamically allocated in a method. How can I free this memory when the
>> object is finalzed? Is this done automatically in g_object_unref() (when
>> refcounter is zero) ?
> 
> When the reference count reaches zero and the object is
> finalized, its finalize() method is called.  And that's
> where you should free any possibly allocated memory.

Aha, but how/where to I set the pointer to the finalize() function?

> Remember to chain up parent class finalize() method in your
> finalize().

I will! :-)

-Øystein

___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: GObject: Freeing memory of instance members?

2007-05-03 Thread Yeti
On Thu, May 03, 2007 at 09:51:05PM +0200, ?ystein Johansen wrote:
> 
> I have an instance struct that has a pointer to a some data that's
> dynamically allocated in a method. How can I free this memory when the
> object is finalzed? Is this done automatically in g_object_unref() (when
> refcounter is zero) ?

When the reference count reaches zero and the object is
finalized, its finalize() method is called.  And that's
where you should free any possibly allocated memory.
Remember to chain up parent class finalize() method in your
finalize().

> I see a pointer to a func in the info struct called base_finalize and
> another called class_finalize, but these seems to be used for cleaning
> up when I have base_init and class_init.

Ignore these, they are related to class initialization and
finalization.

Yeti

--
http://gwyddion.net/
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: GLib 2.12.12 released

2007-05-03 Thread Michael Ekstrand
On Thu, 2007-05-03 at 12:41 -0700, Sergei Steshenko wrote:
> I can try, but I'm definitely missing the point, which is:
> 
> * 'make' CAN detect that it's GNU libiconv;
> * 'configure' can NOT detect that it's GNU libiconv

'make' does not detect that it is GNU libiconv.  'make' does not detect
anything.  The file that is being compiled does a little consistency
check - it makes sure that the type of iconv header it has is consistent
with the type of iconv that configure said it is supposed to be building
with.  'configure' does try to detect the type of iconv.  It evidently
determined that your system had a non-GNU (native) iconv.  But when the
actual compilation happened, it went "whoops, this isn't supposed to be
a GNU iconv header we have problems."  It looks like your iconv
library and the iconv header that the compiler finds don't match, most
likely.  Either that, or there's something else weird with your iconv &
build setups.

> So, what is the point in having such a configure script  - 'configure'
> is supposed to detect such things.

Things like this are what configure options are for - to guide configure
along when it doesn't make the right choice.  It is neither practical
nor, in many cases, possible for configure to provide a 100% guarantee
that its success will imply a successful 'make'.  It is not intended for
it to provide such a guarantee.  It merely tries to configure the
software and sets up the Makefiles - if it couldn't make sense of your
setup, it may not create appropriate Makefiles.  It can't detect every
possible contingency.  It did reasonable checks to see which iconv your
system has, and then that turned out to be inconsistent.

In this case, it may be practical to add a test.  That's up to the GTK+
devs.  But in general, asking configure to detect every possible 'make'
problem is essentially asking it to try to compile the program.  That's
make's job.  And you only want to run 'make' once.

- Michael

-- 
Michael Ekstrand
Research Assistant, Scalable Computing Laboratory
Goanna, compute cluster and InfiniBand network monitor tool:
http://www.scl.ameslab.gov/Projects/Monitor/

___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


GObject: Freeing memory of instance members?

2007-05-03 Thread Øystein Johansen
Hi,

I've just started to use GObject, and I think I understand most of it by
now. There's still some questions remaining. Here's one:

I have an instance struct that has a pointer to a some data that's
dynamically allocated in a method. How can I free this memory when the
object is finalzed? Is this done automatically in g_object_unref() (when
refcounter is zero) ?

-Øystein

PS:
I see a pointer to a func in the info struct called base_finalize and
another called class_finalize, but these seems to be used for cleaning
up when I have base_init and class_init.
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: GLib 2.12.12 released

2007-05-03 Thread Sergei Steshenko

--- Andrew Sobala <[EMAIL PROTECTED]> wrote:

> Sergei Steshenko wrote:
> 
> >This is a broken release - 'make' fails with these messages:
> >
> >"
> >gconvert.c:48:2: error: #error GNU libiconv not in use but included iconv.h 
> >is from libiconv
> >
> 
> Try --with-libiconv=gnu in configure.
> 
> And please keep an eye on how many lists you crosspost to!
> 
> -- 
> Andrew
> 

I can try, but I'm definitely missing the point, which is:

* 'make' CAN detect that it's GNU libiconv;
* 'configure' can NOT detect that it's GNU libiconv
.

So, what is the point in having such a configure script  - 'configure' is 
supposed
to detect such things.

Regards,
  Sergei.


Applications From Scratch: http://appsfromscratch.berlios.de/

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: GLib 2.12.12 released

2007-05-03 Thread Andrew Sobala
Sergei Steshenko wrote:

>This is a broken release - 'make' fails with these messages:
>
>"
>gconvert.c:48:2: error: #error GNU libiconv not in use but included iconv.h is 
>from libiconv
>

Try --with-libiconv=gnu in configure.

And please keep an eye on how many lists you crosspost to!

-- 
Andrew
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Hello and win32 g_io_channel help needed

2007-05-03 Thread Chris Vine
On Thu, 2007-05-03 at 14:04 +1000, Burke.Daniel wrote:
> Hail!  I am new.. so gday to everyone here.
>
> I am after some assistance with getting my event-driven serial port
> input working on Windows.
> 
> The project is a portable serial tool for internal use within our
> company, I am writing it using libglademm since I love C++ and am a
> big Gnome/GTK fan (my laptop being Ubuntu Gnome based)

> On Linux I am using open and termios to handle the serial port setup,
> finally returning a GIOChannel for monitoring and so far.. so good.
> However I am now trying to get the evil version of it running and am
> not so happy.  Here I am using CreateFile to open and configure my
> port, then use:
>
> m_PortDescriptor = _open_osfhandle((long)m_PortHandle, 0);
> 
> channel = g_io_channel_unix_new(m_PortDescriptor);

> to get the channel.  Later on I use g_io_add_watch to setup a monitor
> which seems to compile and run ok, however when I send data using
> g_io_channel_write_chars it seems to crash and I also don’t seem to be
> receiving data (often resulting another application halt)

You mention that you are using Windows, so is there any reason why you
are calling g_io_channel_unix_new() instead of the
g_io_channel_win32_new*() functions to create the GIOChannel object?

Chris




___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: gtk accessibility on Windows

2007-05-03 Thread Steve Lee
Thanks, I've added some info to the bug.

On 5/3/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Lainaus Steve Lee <[EMAIL PROTECTED]>:
>
> > What is the status of accessibility on the Windows port of gtk?
>
> See http://bugzilla.gnome.org/show_bug.cgi?id=303304
>
> Basically, only the trivially portable plumbing (atk, gail) has been ported, 
> but
> the real interface to MSAA (or whatever else) nobody has worked on.
>
> --tml
>


-- 
Steve Lee
www.fullmeasure.co.uk
www.oatsoft.org
www.schoolforge.org.uk
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: GLib 2.12.12 released

2007-05-03 Thread Sergei Steshenko

--- Matthias Clasen <[EMAIL PROTECTED]> wrote:

> GLib 2.12.12 is now available for download at:
> 
>  ftp://ftp.gtk.org/pub/glib/2.12/
>  http://download.gnome.org/sources/glib/2.12/
> 
> glib-2.12.12.tar.bz2   md5sum: 0b3a42098243d054475ff6eb51ed2be1
> glib-2.12.12.tar.gzmd5sum: 6c6a61e4b08fb4b110ca7953f71c8b5e
> 
> This is a bug fix release in the 2.12 series.
> 
> GLib is the low-level core library that forms the basis for projects
> such as GTK+ and GNOME. It provides data structure handling for C,
> portability wrappers, and interfaces for such runtime functionality as
> an event loop, threads, dynamic loading, and an object system.
> 
> More information about GLib is available at:
> 
>  http://www.gtk.org/
> 
> An installation guide for the GTK+ libraries, including GLib, can
> be found at:
> 
>  http://developer.gnome.org/doc/API/2.0/gtk/gtk-building.html
> 
> 
> Overview of Changes from GLib 2.12.11 to GLib 2.12.12
> =
> 
> * Bug fixes:
>  418862 g_base64_decode will give critical warning when first par...
>  356843 "make check" fails if /bin/sh is pdksh
>  418217 g_unichar_toupper/_totitle broken for single to multiple ...
>  432895 param_string_validate() frees and modifies static strings
>  420686 g_key_file_to_data alters original data
> 
> * Translation updates: (da,es,eu,gl,ja,ro,ru,sr,
>   [EMAIL PROTECTED],ta,zh_CN)
> 
> 
> A list of all the fixed bugs can be found at:
> http://bugzilla.gnome.org/buglist.cgi?bug_id=418862,420686,418217,356843,432895
> 
> 
> Thanks to everybody who contributed to this release:
> Halton Huo
> Chris Wilson
> Denis Jacquerye
> Paul Jarc
> Tor Lillqvist
> Michael Natterer
> 
> 
> Matthias Clasen
> May 1, 2007
> 
> 
> ___
> gtk-list mailing list
> gtk-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gtk-list
> 

This is a broken release - 'make' fails with these messages:

"
gconvert.c:48:2: error: #error GNU libiconv not in use but included iconv.h is 
from libiconv
make[4]: *** [gconvert.lo] Error 1
make[4]: Leaving directory 
`/maxtor5/sergei/AppsFromScratchWD/build/glib-2.12.12/glib'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory 
`/maxtor5/sergei/AppsFromScratchWD/build/glib-2.12.12/glib'
make[2]: *** [all] Error 2
make[2]: Leaving directory 
`/maxtor5/sergei/AppsFromScratchWD/build/glib-2.12.12/glib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory 
`/maxtor5/sergei/AppsFromScratchWD/build/glib-2.12.12'
make: *** [all] Error 2
"

even though 'configure' is OK.

Each and every release of each and every library is broken by definition
in case 'configure' is OK and 'make' fails.

This didn't happen with 2.12.11.

I am routinely rebuilding packages using AppsFromScratch whenever new releases 
are
announced, so the problem was discovered during such a rebuild.

Regards,
  Sergei.

Applications From Scratch: http://appsfromscratch.berlios.de/

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list