Re: massrotate fontconfig, Gtk2



On Friday, May 21, 2004, at 12:09 AM, Alexy Khrabrov wrote:

The segfault is in pango. Is there a way to avoid using Pango for massrotate -- although it only says use Gtk2, looks like Pango is always there?
gtk+ uses pango for all of its text rendering -- this is at the C 
level, and there's nothing the bindings can do about that.
if you fail to call gtk_init() (or Gtk2->init) in your program, the 
error messages often come from pango instead of something more 
elucidating.  of course, there's a call to init right there on line 27, 
so that's not it, but i think pango often gets blamed for things that 
are not its fault.
like ross says, this sounds like a broken installation.  did you 
install Glib and Gtk2 from source?  if so, did they pass their test 
suites?  in any case, can you run the gtk-demo program?  (don't know 
if/where it gets installed on your system, but in the source dist it's 
Gtk2/gtk-demo/main.pl)

I'm thinking of using small icons for the buttons, instead of names, how can I do that so that the now dreaded Scylla/Charybdis of pango/fontconfig do not open their mouths?
the easiest way, Gtk2::Button->new_from_stock ($stock_id), will still 
give you text on the buttons, so that's not going to help.  you'll have 
to change each button creation from
  my $prevbut = Gtk2::Button->new ("Previous Pic");
  my $nextbut = Gtk2::Button->new ("Next Pic");
  ...

to something like

  my $image;
  my $prevbut = Gtk2::Button->new;
  $image = Gtk2::Image->new_from_stock ('gtk-go-back');
  $prevbut->add ($image);
  my $nextbut = Gtk2::Button->new;
  $image = Gtk2::Image->new_from_stock ('gtk-go-forward');
  $nextbut->add ($image);
  ,,,

the stock items (and their string names) are listed at http://developer.gnome.org/doc/API/2.0/gtk/gtk-Stock-Items.html ...


Come to think of it, is there a way to use the old Gtk in the same way?
you wouldn't want to.


--
Jolt is my co-pilot.
  -- Slogan on a giant paper airplane hung in Lobby 7 at MIT.
     http://hacks.mit.edu/




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