[gtk2-perl-xs] Gtk2::Style::font_desc
- From: Tom Hargreaves <hex freezone co uk>
- To: gtk-perl-list gnome org
- Subject: [gtk2-perl-xs] Gtk2::Style::font_desc
- Date: Mon, 16 Jun 2003 15:34:30 +0100
Hi there. Gtk2::Style::font_desc seems broken currently. I'm pretty
new to both GTK2 and XS, but the following patch seems to help:
--- Gtk2-0.22/xs/GtkStyle.xs 2003-06-16 01:55:08.000000000 +0100
+++ Gtk2-0.22/xs/GtkStyle.xs 2003-05-22 15:23:24.000000000 +0100
@@ -48,7 +48,7 @@
/* FIXME: is it correct to _copy these */
case 1: RETVAL = newSVGdkColor_copy (&(style->black)); break;
case 2: RETVAL = newSVGdkColor_copy (&(style->white)); break;
- case 3: RETVAL = newSVPangoFontDescription_copy (style->font_desc); break;
+ case 3: RETVAL = newSVPangoFontDescription_copy (&(style->font_desc)); break;
case 4: RETVAL = newSViv (style->xthickness); break;
case 5: RETVAL = newSViv (style->ythickness); break;
case 6: RETVAL = newSVGdkGC (style->black_gc); break;
Test program:
#!/usr/bin/perl -wl
use strict;
use Gtk2;
Gtk2->init;
my $window=new Gtk2::Window 'toplevel';
my $entry=new Gtk2::Entry;
$window->add($entry);
$window->show_all;
my $desc=$entry->style->font_desc;
print $desc->to_string;
I've not tested any of the other fields.
Nice work so far, btw. :)
Tom.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]