aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-02-14 15:26:07 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-02-14 15:26:07 +0000
commit157d25f33d81a37617cc047da77fdefae433ea6e (patch)
tree88ce3f16fca8d9ad3848ef4356643ef9fdc2b7ca
parente3cf553b01a691084755d08dc53aa168a618746d (diff)
downloadrpmdrake-157d25f33d81a37617cc047da77fdefae433ea6e.tar
rpmdrake-157d25f33d81a37617cc047da77fdefae433ea6e.tar.gz
rpmdrake-157d25f33d81a37617cc047da77fdefae433ea6e.tar.bz2
rpmdrake-157d25f33d81a37617cc047da77fdefae433ea6e.tar.xz
rpmdrake-157d25f33d81a37617cc047da77fdefae433ea6e.zip
Improve readability
-rwxr-xr-xrpmdrake64
1 files changed, 42 insertions, 22 deletions
diff --git a/rpmdrake b/rpmdrake
index c2a5ee3f..06849373 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -1349,28 +1349,48 @@ sub dialog_rpmnew {
my $d = ugtk2->new(N("Inspecting %s", $file), grab => 1, transient => $w->{rwindow});
my $save_wsize = sub { @inspect_wsize = $d->{rwindow}->get_size };
my %texts;
- gtkadd($d->{window},
- gtkpack_(Gtk2::VBox->new(0, 5),
- 1, create_vpaned(
- create_vpaned(gtkpack_(Gtk2::VBox->new(0, 0),
- 0, gtkset_markup(Gtk2::Label->new, qq(<span font_desc="monospace">$file:</span>)),
- 1, create_scrolled_window($texts{file} = Gtk2::TextView->new)),
- gtkpack_(Gtk2::VBox->new(0, 0),
- 0, gtkset_markup(Gtk2::Label->new, qq(<span font_desc="monospace">$rpmnew:</span>)),
- 1, create_scrolled_window($texts{rpmnew} = Gtk2::TextView->new)),
- resize1 => 1),
- gtkpack_(Gtk2::VBox->new(0, 0),
- 0, Gtk2::Label->new(N("changes:")),
- 1, create_scrolled_window($texts{diff} = Gtk2::TextView->new)),
- resize1 => 1),
- 0, gtkpack__(create_hbox(),
- gtksignal_connect(Gtk2::Button->new(N("Remove .%s", $rpmfile)),
- clicked => sub { $save_wsize->(); unlink $rpmnew; Gtk2->main_quit }),
- gtksignal_connect(Gtk2::Button->new(N("Use .%s as main file", $rpmfile)),
- clicked => sub { $save_wsize->(); renamef($rpmnew, $file); Gtk2->main_quit }),
- gtksignal_connect(Gtk2::Button->new(N("Do nothing")),
- clicked => sub { $save_wsize->(); Gtk2->main_quit }),
- )));
+ gtkadd(
+ $d->{window},
+ gtkpack_(
+ Gtk2::VBox->new(0, 5),
+ 1, create_vpaned(
+ create_vpaned(
+ gtkpack_(
+ Gtk2::VBox->new(0, 0),
+ 0, gtkset_markup(Gtk2::Label->new, qq(<span font_desc="monospace">$file:</span>)),
+ 1, create_scrolled_window($texts{file} = Gtk2::TextView->new),
+ ),
+ gtkpack_(
+ Gtk2::VBox->new(0, 0),
+ 0, gtkset_markup(Gtk2::Label->new, qq(<span font_desc="monospace">$rpmnew:</span>)),
+ 1, create_scrolled_window($texts{rpmnew} = Gtk2::TextView->new),
+ ),
+ resize1 => 1,
+ ),
+ gtkpack_(
+ Gtk2::VBox->new(0, 0),
+ 0, Gtk2::Label->new(N("changes:")),
+ 1, create_scrolled_window($texts{diff} = Gtk2::TextView->new),
+ ),
+ resize1 => 1,
+ ),
+ 0, gtkpack__(
+ create_hbox(),
+ gtksignal_connect(
+ Gtk2::Button->new(N("Remove .%s", $rpmfile)),
+ clicked => sub { $save_wsize->(); unlink $rpmnew; Gtk2->main_quit },
+ ),
+ gtksignal_connect(
+ Gtk2::Button->new(N("Use .%s as main file", $rpmfile)),
+ clicked => sub { $save_wsize->(); renamef($rpmnew, $file); Gtk2->main_quit },
+ ),
+ gtksignal_connect(
+ Gtk2::Button->new(N("Do nothing")),
+ clicked => sub { $save_wsize->(); Gtk2->main_quit },
+ ),
+ )
+ )
+ );
my %contents = (file => scalar(cat_($file)), rpmnew => scalar(cat_($rpmnew)));
gtktext_insert($texts{$_}, [ [ $contents{$_}, { 'font' => 'monospace' } ] ]) foreach keys %contents;
my @regexps = ([ '^(--- )|(\+\+\+ )', 'blue' ], [ '^@@ ', 'darkcyan' ], [ '^-', 'red3' ], [ '^\+', 'green3' ]);