in reply to Gtk stock button translation
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){ 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).#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); } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Gtk stock button translation
by mtl3 (Novice) on Mar 08, 2018 at 19:07 UTC | |
by syphilis (Archbishop) on Mar 09, 2018 at 00:24 UTC | |
by mtl3 (Novice) on Mar 09, 2018 at 05:53 UTC | |
by syphilis (Archbishop) on Mar 09, 2018 at 12:48 UTC | |
by Anonymous Monk on Mar 09, 2018 at 11:02 UTC | |
by mtl3 (Novice) on Mar 10, 2018 at 18:32 UTC | |
|