Re: Stocks don't seem



Hi,

muppet 2005. október 16. 07.05 dátummal ezt írta:
- Does this malady afflict other gtk+ / gnome programs not written
in gtk2-perl?

There wasn't any running other gtk+/gnome program, so there
couldn't be
running malfunctioning program.

Not quite what i meant.

Sorry, I missunderstood you. Yes, the rest gtk+ / gnome programs work well.

Since gtk+ 2.6, GtkButton looks for a GtkSetting property called "gtk-
button-images" to determine whether to display the image in the
button.

You mean gtk+ 2.0-2.6.x > ? (I've got gtk+ 2.0-2.8.3)
And how can I set it?

This can be set by code, but it can also be set by a gtkrc 
file.

Look for gtkrc files in ~/.gtkrc, /etc/gtk, /etc/gnome, etc.

I've found ~/.gtkrc file but it only contains informations for the set GTK 
Revisited Bubble theme.


Try this code:
......

Yess!! When it starts there were two push buttons (Preferences and Close) 
without stocks. After I pushed Preferences, buttons got stocks. :) Next push 
hided stocks, etc.

Muppet, maybe you know what happend I don't. :( Would you please explain how 
to use/overwrite the "standard" eg.:

$mainwin_setup_butt =  Gtk2::Button->new_from_stock ('gtk-preferences');

And how can I define new stocks items? I used this earlier:

@stock_variables=("connect", "$cl[1]", 
        "$gprs_shared_path/gprsec/images/stocks/stock_connect.xpm");
stocks_set (@stock_variables);

sub stocks_set {
        my $stock_id = $_[0];
        Gtk2::Stock->add ({
                stock_id => $stock_id,
                label    => "_$_[1]",
                modifier => [],
                keyval   => $Gtk2::Gdk::Keysyms{C},
                translation_domain => 'gtk2-perl-example',
        });
        my $icon_set = Gtk2::IconSet->new_from_pixbuf (
        Gtk2::Gdk::Pixbuf->new_from_file($_[2]));
        my $icon_factory = Gtk2::IconFactory->new;
        $icon_factory->add ($stock_id, $icon_set);
        $icon_factory->add_default;
}


I would like to keep it's compatibility for the eralier gtk versions...


Many thanks

-- 
Sincerely

Péter Simon (Pepó)

GPRS Easy Connect team
mail: simon peter gprsec hu
web: http://www.gprsec.hu
Skype: callto://tazmanordog



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