diff options
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | Rpmdrake/rpmnew.pm | 15 |
2 files changed, 12 insertions, 5 deletions
@@ -1,3 +1,5 @@ +- use introspection for Source too + Version 6.0 - 5 December 2013, Thierry Vignaud - convert from gtk2 to gtk3 (needs urpmi >= 7.30) 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, ), |