From eaed7e3370f3beaa959f2f24d31ea2860c05e090 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Thu, 5 Dec 2013 14:51:04 +0100 Subject: use introspection for Source too --- Rpmdrake/rpmnew.pm | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'Rpmdrake') diff --git a/Rpmdrake/rpmnew.pm b/Rpmdrake/rpmnew.pm index 14a01a75..9395a84d 100644 --- a/Rpmdrake/rpmnew.pm +++ b/Rpmdrake/rpmnew.pm @@ -31,6 +31,7 @@ use Rpmdrake::init; use Rpmdrake::pkg; use Rpmdrake::open_db; use Rpmdrake::formatting; +use Glib::Object::Introspection; use mygtk3 qw(gtknew); #- do not import anything else, especially gtkadd() which conflicts with ugtk3 one use ugtk3 qw(:all); use Exporter; @@ -87,8 +88,12 @@ sub inspect { my $d = ugtk3->new(N("Inspecting %s", $file), grab => 1, transient => $::main_window); my $save_wsize = sub { @inspect_wsize = $d->{rwindow}->get_size }; my %texts; - require Gtk3::SourceView2; - my $lang_manager = Gtk3::SourceView2::LanguageManager->get_default; + + Glib::Object::Introspection->setup ( + basename => 'GtkSource', + version => '3.0', + package => 'Gtk3::Source'); + my $lang_manager = Gtk3::Source::LanguageManager->get_default; gtkadd( $d->{window}, gtkpack_( @@ -98,19 +103,19 @@ sub inspect { gtkpack_( gtknew('VBox'), 0, gtknew('Label', text_markup => qq($file:)), - 1, gtknew('ScrolledWindow', child => $texts{file} = Gtk3::SourceView2::View->new), + 1, gtknew('ScrolledWindow', child => $texts{file} = Gtk3::Source::View->new), ), gtkpack_( gtknew('VBox'), 0, gtknew('Label', text_markup => qq($rpmnew:)), - 1, gtknew('ScrolledWindow', child => $texts{rpmnew} = Gtk3::SourceView2::View->new), + 1, gtknew('ScrolledWindow', child => $texts{rpmnew} = Gtk3::Source::View->new), ), resize1 => 1, ), gtkpack_( gtknew('VBox'), 0, gtknew('Label', text => N("Changes:")), - 1, gtknew('ScrolledWindow', child => $texts{diff} = Gtk3::SourceView2::View->new), + 1, gtknew('ScrolledWindow', child => $texts{diff} = Gtk3::Source::View->new), ), resize1 => 1, ), -- cgit v1.2.1