diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2013-12-05 14:51:04 +0100 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2013-12-05 14:51:04 +0100 |
commit | eaed7e3370f3beaa959f2f24d31ea2860c05e090 (patch) | |
tree | eb84b16fa146f11bfc76db2642c5d3b28ea362d0 /Rpmdrake | |
parent | 0931762e8f336c28b9c42f4a91d7d50e3546c5c4 (diff) | |
download | rpmdrake-eaed7e3370f3beaa959f2f24d31ea2860c05e090.tar rpmdrake-eaed7e3370f3beaa959f2f24d31ea2860c05e090.tar.gz rpmdrake-eaed7e3370f3beaa959f2f24d31ea2860c05e090.tar.bz2 rpmdrake-eaed7e3370f3beaa959f2f24d31ea2860c05e090.tar.xz rpmdrake-eaed7e3370f3beaa959f2f24d31ea2860c05e090.zip |
use introspection for Source too
Diffstat (limited to 'Rpmdrake')
-rw-r--r-- | Rpmdrake/rpmnew.pm | 15 |
1 files changed, 10 insertions, 5 deletions
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(<span font_desc="monospace">$file:</span>)), - 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(<span font_desc="monospace">$rpmnew:</span>)), - 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, ), |