Unfortunately, the documentation (or I should say the absence of documentation) has left me clueless
Did you grab the demo program from the page you linked to ?
The relevant part is:
#create a vbox that will contain all the stock buttons
my $vbox_stock = Gtk2::VBox->new(FALSE,5);
foreach my $val(sort Gtk2::Stock->list_ids){
my $btn_stock = Gtk2::Button->new_from_stock($val);
$vbox_stock->pack_start($btn_stock,FALSE,FALSE,4);
}
I changed that to:
#create a vbox that will contain all the stock buttons
my $vbox_stock = Gtk2::VBox->new(FALSE,5);
foreach my $val(sort Gtk2::Stock->list_ids){
print "$val\n"; # List available stock buttons
if($val eq 'gtk-add' || $val eq 'gtk-cancel') {
my $btn_stock = Gtk2::Button->new_from_stock($val);
$vbox_stock->pack_start($btn_stock,FALSE,FALSE,4);
}
}
On perl-5.26.0, for me that modification behaves as expected and creates only the "Add" and "Cancel" buttons (with labels).
My understanding is that those labels will be written in the language that the computer's locale setting specifies.
Hopefully you can utilise that demo program to help achieve your desired result.
If not, you could try the gtk-perl mailing list if you can't get good help here.
For me, on an older version of perl (5.16.0) the same demo (both original and modified) provided the buttons with labels only (no icons).
Same versions of Gtk and Gtk2 modules. Either a difference in perl itself, or something different in the environments.
Cheers, Rob |