Bring gtk dialog window to front

2010-10-19 Thread Guruprasad Bhat
Hi all,
I have one application that has multiple full screen dialog windows. I am
trying to bring one dialog to front that is already created  showed earlier
 now it is back side of other windows. Can anybody suggest how to bring a
dialog window to front that is already present at back side?

*Warm Regards,*
*  Guruprasad Bhat.*
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Bring gtk dialog window to front

2010-10-19 Thread David Nečas
On Tue, Oct 19, 2010 at 12:10:46PM +0530, Guruprasad Bhat wrote:
 I have one application that has multiple full screen dialog windows. I am
 trying to bring one dialog to front that is already created  showed earlier
  now it is back side of other windows. Can anybody suggest how to bring a
 dialog window to front that is already present at back side?

gtk_window_present() is probably what you need.

Yeti

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


Re: Memory management in gtk

2010-10-19 Thread jcupitt
On 19 October 2010 06:22, Vishak V. Kurup vishak.ku...@nestgroup.net wrote:
 I am having a small problem related to GTK. My application is having
 around 15 windows.  When I start my application and check the memory
 usage using top utility it shows around 19MB. When a new window is
 created it may increase upto 22 MB (varies each time). And after I
 destroy the new window my memory is not getting reduced. Could anyone
 please tell me why memory usage is not decreased even after I destroy
 widget.

top is not the best way to see memory use of a program, or to check for leaks.

When a program starts, the system hands over a large chunk of ram to
the memory library. This library then hands out the memory to the
program in small bits as the program asks for it. If the chunk is
exhausted, the library asks for more memory from the OS. When memory
is freed, the memory library does not return it to the host operating
system (with certain strange exceptions), instead it keeps it around
for reuse. As a result, you will (almost) never see the memuse fall,
as reported by top, for any program.

To check for leaks, you need to use a special tool. In my opinion, the
most useful under Linux is valgrind. Run it with something like:

export G_DEBUG=gc-friendly

This makes Glib clear certain memory areas after using them, too.

export G_SLICE=always-malloc

This completely disables the magazine and slab allocator in Glib,
and makes it use plain malloc()/free() instead.

valgrind --leak-check=yes \
  myprog ...  myprog-vg.log 21

You will get some false positives. I have a suppressions file here:

  http://www.vips.ecs.soton.ac.uk/development/nip2.supp

Which hides all the false positives from the gtk stack.

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


RE: Memory management in gtk

2010-10-19 Thread Vishak V. Kurup
Thank you jhon..i have checked using Valgrind and it is not showing any memory 
leaks. So I was checking the memory usage using top. I will check using ur 
suggestion. Thank you verymuch.

-Original Message-
From: jcup...@gmail.com [mailto:jcup...@gmail.com] 
Sent: Tuesday, October 19, 2010 2:43 PM
To: Vishak V. Kurup
Cc: gtk-app-devel-list@gnome.org
Subject: Re: Memory management in gtk

On 19 October 2010 06:22, Vishak V. Kurup vishak.ku...@nestgroup.net wrote:
 I am having a small problem related to GTK. My application is having
 around 15 windows.  When I start my application and check the memory
 usage using top utility it shows around 19MB. When a new window is
 created it may increase upto 22 MB (varies each time). And after I
 destroy the new window my memory is not getting reduced. Could anyone
 please tell me why memory usage is not decreased even after I destroy
 widget.

top is not the best way to see memory use of a program, or to check for leaks.

When a program starts, the system hands over a large chunk of ram to
the memory library. This library then hands out the memory to the
program in small bits as the program asks for it. If the chunk is
exhausted, the library asks for more memory from the OS. When memory
is freed, the memory library does not return it to the host operating
system (with certain strange exceptions), instead it keeps it around
for reuse. As a result, you will (almost) never see the memuse fall,
as reported by top, for any program.

To check for leaks, you need to use a special tool. In my opinion, the
most useful under Linux is valgrind. Run it with something like:

export G_DEBUG=gc-friendly

This makes Glib clear certain memory areas after using them, too.

export G_SLICE=always-malloc

This completely disables the magazine and slab allocator in Glib,
and makes it use plain malloc()/free() instead.

valgrind --leak-check=yes \
  myprog ...  myprog-vg.log 21

You will get some false positives. I have a suppressions file here:

  http://www.vips.ecs.soton.ac.uk/development/nip2.supp

Which hides all the false positives from the gtk stack.

John
* Confidentiality Statement/Disclaimer *

This message and any attachments is intended for the sole use of the intended 
recipient. It may contain confidential information. Any unauthorized use, 
dissemination or modification is strictly prohibited. If you are not the 
intended recipient, please notify the sender immediately then delete it from 
all your systems, and do not copy, use or print. Internet communications are 
not secure and it is the responsibility of the recipient to make sure that it 
is virus/malicious code exempt.
The company/sender cannot be responsible for any unauthorized alterations or 
modifications made to the contents. If you require any form of confirmation of 
the contents, please contact the company/sender. The company/sender is not 
liable for any errors or omissions in the content of this message.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


moving message on a gtk dialog

2010-10-19 Thread Guruprasad Bhat
Hi all,
I was thinking of a application for showing moving message. In gtk is it
possible to do that? I want a small gtk dialog displaying moving message.
Can any one suggest in this regard.
*Regards,*
*  Guruprasad Bhat.*
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


moving message on a gtk dialog

2010-10-19 Thread James Morris
On 19 October 2010 11:01, Guruprasad Bhat guruprasad...@gmail.com wrote:
 Hi all,
 I was thinking of a application for showing moving message. In gtk is it
 possible to do that? I want a small gtk dialog displaying moving message.
 Can any one suggest in this regard.
 *Regards,*
 *  Guruprasad Bhat.*

The simplest form would scroll the message string itself by placing
the first character of the message string at the end of the message
string and repeating. You'll need a few extra spaces at the end of the
message. Then you'll need an idle callback or timeout to call the
string scrolling routine and then to redisplay it as a label.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list