[Gtk-sharp-list] Gtk.Toolbar.InsertStock() : Help Needed

Matt@Vitalit.co.uk Matt@Vitalit.co.uk
Fri, 23 Jul 2004 04:24:47 +0100

Fredrik, First of all thanks for that info - it's pointing me in the right
direction I think.
I'll be honest and say that I've not tried the InsertStock() method, perhaps
a little explanation is in order.

In order to proceed with a project that I have in mind (dont want to say too
much just in case I need to scrap it but if I go ahead it will be GPL :-) )
I need a comprehensive understanding of all the standard Gtk widget
constructors(especially stock items).  When I saw that InsertStock() was
marked as deprecated in the documentation, I made the (probably unsound)
assumption that it had already been replaced (logic being that it must have
been replaced in order for it to be marked as deprecated).  Hence my post.

Since it now looks like InsertStock's replacement does not yet exist, I am
unsure as to why it is deprecated without a suitable replacement method
being ready.  Stock items *seem* to be an such integral part of rapidly
building Gtk apps I fail to see the logic.

I'm sure there *must* be a logic to it, but coming from an MS.net background
it escapes me.  Perhaps deprecated doesn't mean "going out of use - use the
new way" which is what I understood it to be ?

The more I think about it - the more sure I become that this is a
fundemental error in logic on my part, and any help anyone can give I'd


(A "trying hard" to convert C# developer)

----- Original Message ----- 
From: "Fredrik Nilsson" <jymdman@home.se>
To: <gtk-sharp@Vitalit.co.uk>
Cc: "gtk-sharp-list" <gtk-sharp-list@lists.ximian.com>
Sent: Friday, July 23, 2004 2:43 AM
Subject: Re: [Gtk-sharp-list] Gtk.Toolbar.InsertStock() : Help Needed

> On tor, 2004-07-22 at 23:14 +0100, wrote:
> > Hi,
> >     I'm trying to figure out what the "new" method is that replaces
> > Gtk.Toolbar.InsertStock() since this has been deprecated.  Unlike
> > ImageMenuItem() which has an additional constructor that specifically
> > mentions stock items, I seem to be having trouble locating the
> > for Gtk.Toolbar. Please can anyone point me in the right direction ?
> >
> > Setup :
> > Fedora Core 2
> > Mono 1.0 / GTK# / MonoDevelop (From the Ximian yum repository)
> >
> > Many Thanks In Advance
> >
> > Matt
> Hi Matt,
> I may be wrong here, but I think the InsertStock method is ok to use for
> gtk# 1.0 (gtk 2.2), and InsertStock will be deprecated for gtk# 2.0 (gtk
> 2.4).
> Why are you asking? Doesn't the method work as expected, or what?
> I haven't tried to use InsertStock myself, instead I do it another way:
> button = new Button (Stock.Open);
> button.Relief = ReliefStyle.None;
> toolbar.AppendWidget (button, "Open", "Open");
> You could also use PrependWidget and InsertWidget.
> /Fredrik