--- ugtk2.pm 2003-07-03 12:12:23.000000000 +0200 +++ /usr/lib/libDrakX/ugtk2.pm 2003-07-04 17:51:53.000000000 +0200 @@ -40,7 +40,7 @@ !check_for_xserver() and die "Cannot be run in console mode.\n"; $::one_message_has_been_translated and warn("N() was called from $::one_message_has_been_translated BEFORE gtk2 initialisation, replace it with a N_() AND a translate() later.\n"), c::_exit(1); - Gtk2->init(\ ARGV); + Gtk2->init(); #(\ ARGV); c::bind_textdomain_codeset($_, 'UTF8') foreach 'libDrakX', @::textdomains; $::need_utf8_i18n = 1; } @@ -58,7 +58,7 @@ # you're building. sub gtkdestroy { $_[0] and $_[0]->destroy } -sub gtkflush() { Gtk2->update_ui } +sub gtkflush() { Gtk2->main_iteration while Gtk2->events_pending } sub gtkhide { $_[0]->hide; $_[0] } sub gtkmove { $_[0]->window->move($_[1], $_[2]); $_[0] } sub gtkpack { gtkpowerpack(1, 1, @_) } @@ -150,7 +150,7 @@ sub gtkroot() { my $root if 0; - $root ||= Gtk2::Gdk::Window->foreign_new(Gtk2::Gdk->ROOT_WINDOW); + $root ||= Gtk2::Gdk::get_default_root_window(''); } sub gtkset_text { @@ -167,8 +167,7 @@ sub gtkset_mousecursor { my ($type, $w) = @_; - ($w || gtkroot())->set_cursor(my $c = Gtk2::Gdk::Cursor->new($type)); - $c->unref; + ($w || gtkroot())->set_cursor(Gtk2::Gdk::Cursor->new($type)); } sub gtksignal_connect { @@ -564,7 +563,7 @@ sub gtkfontinfo { my ($widget) = @_; my $context = $widget->get_pango_context; - my $metrics = $context->get_metrics($widget->style->get_font_desc, $context->get_language); + my $metrics = $context->get_metrics($context->get_font_description, $context->get_language); my %fontinfo; foreach (qw(ascent descent approximate_char_width approximate_digit_width)) { no strict;