Re: Gtk::Stock::CLOSE



<cid:part1.08020504.07030500@netscape.net>OK, I tried the code, but it gave me some error; which, at this point, it is a bonus since it gives me something to work with; instead of the compiler just silently creating an EXE file. The constructor you recommended has the following prototype: 'Button (const StockID& stock_id)', this is all good and dandy. However the documentation says that CANCEL is not a type Gtk::StockID, but a Gtk::BuiltinStockID. You are right the 2.4 version of Gtkmm had no problem compiling when using this constructor, but this new 2.8 version is complaining. I believe that this is something that developers should have a look at. As a matter of fact, I don't think it is not a Gtkmm issue, but a GtkmmWin32 issue.

Am I right?

TIA

ERROR:
g++.exe -D__DEBUG__ -c jaime.cpp -o jaime.o -I"C:/GnuWin32/INCLUDE" -I"C:/GnuWin32/INCLUDE/GTK-2.0" -I"C:/GnuWin32/INCLUDE/GLIB-2.0" -I"C:/GnuWin32/INCLUDE/PANGO-1.0" -I"C:/GnuWin32/INCLUDE/CAIRO" -I"C:/GnuWin32/INCLUDE/ATK-1.0" -I"C:/GnuWin32/INCLUDE/GTKGLEXT-1.0" -I"C:/GnuWin32/LIB/GTK-2.0/INCLUDE" -I"C:/GnuWin32/LIB/GLIB-2.0/INCLUDE" -I"C:/GnuWin32/LIB/GTKGLEXT-1.0/INCLUDE" -I"C:/GnuWin32/INCLUDE/LIBGLADE-2.0" -I"C:/GnuWin32/INCLUDE/LIBXML2" -IC:/GnuWin32/include/gtkmm-2.4 -IC:/GnuWin32/lib/gtkmm-2.4/include -IC:/GnuWin32/include/glibmm-2.4 -IC:/GnuWin32/lib/glibmm-2.4/include -IC:/GnuWin32/include/gdkmm-2.4 -IC:/GnuWin32/lib/gdkmm-2.4/include -IC:/GnuWin32/include/pangomm-1.4 -IC:/GnuWin32/include/atkmm-1.6 -IC:/GnuWin32/include/gtk-2.0 -IC:/GnuWin32/include/sigc++-2.0 -IC:/GnuWin32/lib/sigc++-2.0/include -IC:/GnuWin32/include/glib-2.0 -IC:/GnuWin32/lib/glib-2.0/include -IC:/GnuWin32/lib/gtk-2.0/include -IC:/GnuWin32/include/pango-1.0 -IC:/GnuWin32/include/atk-1.0 -fno-access-control -fexceptions -fverbose-asm -pg -g3

jaime.cpp: In member function `void jme::Jaime::Init()':
jaime.cpp:30: error: `CLOSE' is not a member of `Gtk::StockID'
jaime.cpp:31: error: `HELP' is not a member of `Gtk::StockID'

make.exe: *** [jaime.o] Error 1

Execution terminated

======================



Bob Caryl escribió:

Hey Jamiil,

Ok... here's your code:

Gtk::Button *btnHelp = manage (new Gtk::Button(Gtk::StockID::HELP)); //
this is your help button
Gtk::Button *btnClose = manage (new Gtk::Button(Gtk::StockID::CLOSE));
// this is your close button.

I'm assuming you're creating these buttons in a class derived from
something else like Gtk::Window. You should not need any of the other
calls you're making.

Bob

P.S. For my part, your apology was not necessary. :)

Jamiil wrote:

Yes, reading the message I realize that the point of the message is
bit illusive. However, you were conning enough to realize my true
intentions, laudable.
I have also realize that my initial intention was not to include my
own file as the picture to be displayed in the button, but the default
graphics or ‘stockbutton’ provided by Gtk+/mm, but while tinkering
with the code I got all messed up and lost my trail of thoughts;
adding a line of code that would clearly change the course of my
intentions i.e.
‘btnHelp->add_pixlabel("/icons/Question001.gif","_Help");’

Now, that I have apologized, (in my own way) I would like to post the
question once again, based on the same code:
btnHelp->set_use_underline(true);
btnHelp->set_focus_on_click(true);
btnHelp->set_use_stock(true);
btnHelp->set_label("Question");
btnHelp->add_pixlabel(_Help");

What am I missing? How could I make the button display its
corresponding stockbutton.

Again, thanks so much, not only to B.Hakvoort and Bob Caryl, but also
to everyone involved in the solution to this problem.


B.Hakvoort escribió:

afaik a 'stockbutton' will contain an image and a caption...

If i read his message (which is a bit vague imho ;) ) correctly, he
wants buttons for closing and help containing the icon and the text.
This is exactly what a 'stockbutton' will give you.

cheers,

plors


On Wed, 2005-12-07 at 07:10 -0600, Bob Caryl wrote:


If you look at his code, he doesn't want to create a button from a stock
item.. .he wants a caption AND an image on the button.

Bob

B.Hakvoort wrote:

Hi,

maybe i'm getting you wrong, but creating a button from a stockitem is
very easy. Take a look at :
http://gtkmm.org/docs/gtkmm-2.4/docs/reference/html/classGtk_1_1Button.html#43f938099b8e0ac9df2cc669981bd1b8

good luck,

plors

On Tue, 2005-12-06 at 12:32 -0500, Jamiil wrote:


I hope someone here will be able to help me.
I have a program with two buttons; the buttons are supposed to display its correspoding icon for closing or help. Neither of the buttons display its corresponding icons, and although the porgram compiles I get the following message:
=================================================

Info: resolving Gtk::Stock::CLOSE by linking to __imp___ZN3Gtk5Stock5CLOSEE (auto-import) Info: resolving Gtk::Stock::HELP by linking to __imp___ZN3Gtk5Stock4HELPE (auto-import)

Execution terminated
Compilation successful
===================================================

This are the variables for the help button:

btnHelp->set_use_underline(true);
btnHelp->set_focus_on_click(true);
btnHelp->set_use_stock(true);
btnHelp->set_label("Question");
btnHelp->add_pixlabel("/icons/Question.ico","_Help");
btnHelp->signal_clicked().connect( sigc::mem_fun(*this, &Jaime::UnderDev) );

Any body?

_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list



_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list
_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list


--
* No puedes ejercer tu fuerza hasta el punto de humillar a otros.
                    - Jean Chretien

* No tienes la libertad de desobedecer a Dios, aun mas si desobedeces a tu Señor no puedes llamarte Su servidor, pues te has convertido en un servidor de Satanás y de tus caprichos y vanos deseos.
                  -Sheykg Muhammad ibn ‘Uthaymeen

* Es increíble como la diminuta semilla de desconfianza y malentendido puede producir una bonanza de odio y muerte.
                - Jorge Escalante


Ma'assalama! Adiós!  bye!





--
* No puedes ejercer tu fuerza hasta el punto de humillar a otros.
                     - Jean Chretien

* No tienes la libertad de desobedecer a Dios, aun mas si desobedeces a tu Señor no puedes llamarte Su servidor, pues te has convertido en un servidor de Satanás y de tus caprichos y vanos deseos.
                   -Sheykg Muhammad ibn ‘Uthaymeen

* Es increíble como la diminuta semilla de desconfianza y malentendido puede producir una bonanza de odio y muerte.
                 - Jorge Escalante


Ma'assalama! Adiós!  bye!





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]