Re: Stocks don't seem
- From: muppet <scott asofyet org>
- To: Peter Simon <simon peter gprsec hu>
- Cc: gtk-perl-list gnome org
- Subject: Re: Stocks don't seem
- Date: Sun, 16 Oct 2005 01:05:17 -0400
On Oct 16, 2005, at 12:26 AM, Peter Simon wrote:
muppet 2005. október 16. 05.07 dátummal ezt írta:
What we don't know:
- What theme are you using?  (Themes and gtkrcs can disable  
showing stock items in buttons.)
At first there wasn't any set theme, just default. After I switched  
with
'switch' program to GTK Revisited Bubbles theme just for try, but  
issue was
same: no stocks on buttons.
- 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.
I suspect your theme or other distro setup merely has "stock items in
buttons" turned off someplace.
It seems like it possibility "turned off" only for Perl-Gtk2. (Eg.:  
Gimp2.02
works fine.) But I think it is not reason of the trouble.
(I don't really hold to eg. Gtk2::Button->new_from_stock ('gtk- 
help') method
if there's an other way for showing of stock items, but that's will  
be the
last what I would do.)
Thanks, muppet. Do you have other ideas?
I really can't conceive of a plausible way for the problem to be with  
the bindings.
Gtk2::Button::new_from_stock() is a *very* thin wrapper around  
gtk_button_new_from_stock().  Basically, we discard the class  
argument, pull the stock-id string off the stack, and pass it to gtk 
+, then marshal the return value back to perl.  And, in fact, we  
don't even control writing that boilerplate code -- xsubpp does.
I'd ask if you're absolutely certain that the id strings are correct,  
but you said that you see the problem in gtk-demo, which has the  
right strings.
That eliminates pretty much any possibility that it has to do with  
gtk2-perl.  All of the work is done in gtk+.
Since gtk+ 2.6, GtkButton looks for a GtkSetting property called "gtk- 
button-images" to determine whether to display the image in the  
button.  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.
Try this code:
  #!/usr/bin/perl -w
  use strict;
  use Gtk2 -init;
  my $dialog = Gtk2::Dialog->new ($0, undef, [],
                  'gtk-preferences' => 1,
                  'gtk-close' => 'close');
  my $settings = $dialog->get_settings;
  my $label = Gtk2::Label->new;
  changed ();
  $dialog->vbox->add ($label);
  $label->show;
  $label->signal_connect ('notify::gtk-button-images' => \&changed);
  while ("1" eq $dialog->run) {
      $settings -> set ('gtk-button-images', ! $settings-> get ('gtk- 
button-images'));
  }
  sub changed {
      $label->set_text ("gtk-button-images = ".($settings->get ('gtk- 
button-images')));
  }
--
How come hair colors for women take an hour, but "wash out the gray"  
stuff for men only five minutes?  This is so unfair!
    -- Elysse, complaining about commercials
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]