can GtkWindow be a child of another GtkWindow?

2007-12-13 Thread Binary Chen
Hi,

I have a GtkWindow with type GTK_WINDOW_POPUP, I want it to be a child
of a GtkWindow, the effect will be the pop up window can only move
within the scope of the parent window. And if I invoke the position
function for the popup window, the coordinat parameters is relative to
the parent window.

Is it possible? Or any alternative way to achieve this?

Thanks.
Bin

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


Re: Gtk on Embedded Device Query

2007-12-13 Thread Saroj Kumar
> Hi,
>
> I ported X11 and Gtk with X11 support on Embedded board(arm-linux).
> The problem I am facing now is setting the fontconfig. Because I have
> fontconfig and freetype libraries for X11 and I compiled Gtk with those
> libraries.
>
> The following error is produced when I tried to run gtkdemo application.
>
> *(gtk-demo:1152): Gdk-WARNING **: Error converting from UTF-8 to STRING:
> Could not open converter from 'UTF-8' to 'ISO-8859-'
>
> (gtk-demo:1152): Gdk-WARNING **: Error converting from UTF-8 to STRING:
> Conversion from character set 'UTF-8' to 'ISO-8859-d
> Fontconfig warning: line 32: unknown element "cachedir"
> Fontconfig warning: line 33: unknown element "cachedir"
> Fontconfig error: "conf.d", line 1: no element found
>
> (gtk-demo:1152): Gdk-WARNING **: Error converting from UTF-8 to STRING:
> Conversion from character set 'UTF-8' to 'ISO-8859-d
>
> (gtk-demo:1152): Gdk-WARNING **: Error converting from UTF-8 to STRING:
> Conversion from character set 'UTF-8' to 'ISO-8859-d
>
> (gtk-demo:1152): Gdk-WARNING **: Error converting from UTF-8 to STRING:
> Conversion from character set 'UTF-8' to 'ISO-8859-d
> Segmentation fault
> *
>
> What I am doing is correct or not. Pls. suggest some solution for this.
>
> Thanks and Regards,
> Saroz
>
>
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Memory debugging -- which tool?

2007-12-13 Thread Michael Lamothe
Valgrind for most of it.  However, be warned, if you have a
multi-threaded application and you're trying to debug a
multi-threading issue, Valgrind is not going to work for you.
Valgrind does some hocus-pocus to simulate multi-threading, but you
will not get the same conditions as when your application is running
bare.

Thanks,

Michael

On 13/12/2007, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> On Dec 13, 2007 9:25 AM, Dan H <[EMAIL PROTECTED]> wrote:
> > I'm trying to use valgrind to track down this issue; however, this slows 
> > down my app to the point where it takes close to a minute for the GUI to 
> > start up, and then another minute to get to the crash. I've used ccmalloc 
> > with good success in the past, it has very little overhead, but it doesn't 
> > seem to support gcc-2.4.1 any more. I need something faster than valgrind.
>
> I used to use efence, but it's valgrind all the way for me now.
>
> efence is fast but VERY memory hungry. I have a 64-bit machine now and
> valgrind works wonderfully well. My app needs at least 70MB of RAM on
> startup and that's enough for efence to run out of space on an 8 GB
> machine :-( valgrind is bit sluggish, but you can just go for a coffee
> while waiting for it to spot something.
>
> A good tip is to make a careful suppressions file so valgrind only
> stops your program for your errors. It makes using it much more
> hands-off.
>
> John
> ___
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
>
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: C vs C++ for GTK

2007-12-13 Thread Murray Cumming

On Thu, 2007-12-13 at 22:06 +0100, Dan H wrote:
> On Thu, 13 Dec 2007 11:40:41 -0700
> Michael L Torrie <[EMAIL PROTECTED]> wrote:
> 
> > Dan H wrote:
> 
> > > Isn't "smart pointers" just a reference counting scheme?
> > 
> > Yup.  Poor-man's garbage collection.  Turns out to be just the
> > ticket, though, for GUI programming.  Because of that, I'd put
> > productivity with GTKmm to be right up there with PyGTK or GTK#.
> 
> Reference counting is already a feature of the underlying GTK+/C layer. As 
> always somewhat more verbose than C++.

The difference is that GTK+ in C requires you to think about it. And you
will make a mistake that will be difficult to debug. But with gtkmm you
don't need to think about it and you can't get it wrong. (There are
plenty of other things you can get wrong instead, in any language.)

-- 
[EMAIL PROTECTED]
www.murrayc.com
www.openismus.com

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


Re: C vs C++ for GTK

2007-12-13 Thread Dan H
On Thu, 13 Dec 2007 11:40:41 -0700
Michael L Torrie <[EMAIL PROTECTED]> wrote:

> Dan H wrote:

> > Isn't "smart pointers" just a reference counting scheme?
> 
> Yup.  Poor-man's garbage collection.  Turns out to be just the
> ticket, though, for GUI programming.  Because of that, I'd put
> productivity with GTKmm to be right up there with PyGTK or GTK#.

Reference counting is already a feature of the underlying GTK+/C layer. As 
always somewhat more verbose than C++.

--D.


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


Re: C vs C++ for GTK

2007-12-13 Thread Michael L Torrie
Dan H wrote:
> On Wed, 12 Dec 2007 09:26:25 -0700
> Michael L Torrie <[EMAIL PROTECTED]> wrote:
> 
>> GTKmm is based on some very nice C++ abstractions around pointers,
>> providing many of the same benefits as any managed language with
>> pure C++.  They are called smart pointers and for GUI development,
>> they work very very well.
> 
> Isn't "smart pointers" just a reference counting scheme?

Yup.  Poor-man's garbage collection.  Turns out to be just the ticket,
though, for GUI programming.  Because of that, I'd put productivity with
GTKmm to be right up there with PyGTK or GTK#.

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


-- 
Michael Torrie
Assistant CSR, System Administrator
Chemistry and Biochemistry Department
Brigham Young University
Provo, UT 84602
+1.801.422.5771

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


Setting a background image for GtkCellRenderer.

2007-12-13 Thread Srikanth Nallamothu
Hi,
Am facing problem setting a background image to a GtkCellRenderer, trying to
set the background image for GtkCellRenderer, using the rc file,
 my intention is to set a background image(a transparent one) to a cell
which is selected,

This is the part of the rc file i am using.
style "sample-cellrenderer" {
engine "pixmap" {
  image {
  function= FOCUS
 file= "sample.png"
  border  = { 0, 0, 0, 0 }
  stretch = TRUE
  }
}
}
widget "GtkCellRenderer" style "sample-cellrenderer".

can some help me through this.

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


Monitoring keyboard by an application in System Tray

2007-12-13 Thread Sundaram
Hi all,
I want to know the procedure to monitor the keyboard for a particular key 
combination, by an application that sits on the System Tray. Can it be done 
thru' registering for signalling /callback? How is this possible in a GTK+ 
application?

Thanks!

Best Regards,
Sundar




  

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Memory debugging -- which tool?

2007-12-13 Thread jcupitt
On Dec 13, 2007 9:25 AM, Dan H <[EMAIL PROTECTED]> wrote:
> I'm trying to use valgrind to track down this issue; however, this slows down 
> my app to the point where it takes close to a minute for the GUI to start up, 
> and then another minute to get to the crash. I've used ccmalloc with good 
> success in the past, it has very little overhead, but it doesn't seem to 
> support gcc-2.4.1 any more. I need something faster than valgrind.

I used to use efence, but it's valgrind all the way for me now.

efence is fast but VERY memory hungry. I have a 64-bit machine now and
valgrind works wonderfully well. My app needs at least 70MB of RAM on
startup and that's enough for efence to run out of space on an 8 GB
machine :-( valgrind is bit sluggish, but you can just go for a coffee
while waiting for it to spot something.

A good tip is to make a careful suppressions file so valgrind only
stops your program for your errors. It makes using it much more
hands-off.

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


Memory debugging -- which tool?

2007-12-13 Thread Dan H
Hello,

I've written some C code which at some point seems to be trampling over memory 
that belongs to GTK-related stuff, which causes erratic crashed at some 
unrelated point much later. This is of course not a GTK issue, just a 
well-known phenomenon in general.

I'm trying to use valgrind to track down this issue; however, this slows down 
my app to the point where it takes close to a minute for the GUI to start up, 
and then another minute to get to the crash. I've used ccmalloc with good 
success in the past, it has very little overhead, but it doesn't seem to 
support gcc-2.4.1 any more. I need something faster than valgrind.

What tools do you guys use?

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


Re: C vs C++ for GTK

2007-12-13 Thread Dan H
On Wed, 12 Dec 2007 09:26:25 -0700
Michael L Torrie <[EMAIL PROTECTED]> wrote:

> GTKmm is based on some very nice C++ abstractions around pointers,
> providing many of the same benefits as any managed language with
> pure C++.  They are called smart pointers and for GUI development,
> they work very very well.

Isn't "smart pointers" just a reference counting scheme?

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