aboutsummaryrefslogtreecommitdiffstats
path: root/Rpmdrake/gui.pm
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2013-11-19 21:37:26 +0100
committerThierry Vignaud <thierry.vignaud@gmail.com>2013-12-05 14:16:06 +0100
commit1a277c56674f3c6d60951c1f2a1312f1cd9235fe (patch)
tree927bfa97152c780879ab9ae4d9e4999e24c9d5a4 /Rpmdrake/gui.pm
parent0eb2e246db5367e5149bec12197e41707aeb7daf (diff)
downloadrpmdrake-1a277c56674f3c6d60951c1f2a1312f1cd9235fe.tar
rpmdrake-1a277c56674f3c6d60951c1f2a1312f1cd9235fe.tar.gz
rpmdrake-1a277c56674f3c6d60951c1f2a1312f1cd9235fe.tar.bz2
rpmdrake-1a277c56674f3c6d60951c1f2a1312f1cd9235fe.tar.xz
rpmdrake-1a277c56674f3c6d60951c1f2a1312f1cd9235fe.zip
use (my|u)gtk3 instead of *tk2
Diffstat (limited to 'Rpmdrake/gui.pm')
-rw-r--r--Rpmdrake/gui.pm26
1 files changed, 14 insertions, 12 deletions
diff --git a/Rpmdrake/gui.pm b/Rpmdrake/gui.pm
index f0ca57bc..8a471901 100644
--- a/Rpmdrake/gui.pm
+++ b/Rpmdrake/gui.pm
@@ -28,9 +28,9 @@ our @ISA = qw(Exporter);
use lib qw(/usr/lib/libDrakX);
use common;
-use mygtk2 qw(gtknew); #- do not import gtkadd which conflicts with ugtk2 version
+use mygtk3 qw(gtknew); #- do not import gtkadd which conflicts with ugtk3 version
-use ugtk2 qw(:helpers :wrappers);
+use ugtk3 qw(:helpers :wrappers);
use rpmdrake;
use Rpmdrake::open_db;
use Rpmdrake::formatting;
@@ -139,7 +139,7 @@ sub get_advisory_link {
sub get_description {
my ($pkg, $update_descr) = @_;
- @{ ugtk2::markup_to_TextView_format(join("\n",
+ @{ ugtk3::markup_to_TextView_format(join("\n",
(eval {
escape_text_for_TextView_markup_format(
$pkg->{description}
@@ -186,7 +186,7 @@ sub get_main_text {
my $txt = get_string_from_keywords($medium, $fullname);
- ugtk2::markup_to_TextView_format(
+ ugtk3::markup_to_TextView_format(
# force align "name - summary" to the right with RTL languages (#33603):
if_(lang::text_direction_rtl(), "\x{200f}") .
join("\n",
@@ -204,7 +204,7 @@ sub get_main_text {
sub get_details {
my ($pkg, $upkg, $installed_version, $raw_medium) = @_;
- my $a = ugtk2::markup_to_TextView_format(
+ my $a = ugtk3::markup_to_TextView_format(
$spacing . join("\n$spacing",
format_field(N("Version: ")) . $upkg->EVR,
($upkg->flag_installed ?
@@ -262,7 +262,7 @@ sub get_url_link {
return if !$url;
my @a =
- (@{ ugtk2::markup_to_TextView_format(format_field("\n$spacing" . N("URL: "))) },
+ (@{ ugtk3::markup_to_TextView_format(format_field("\n$spacing" . N("URL: "))) },
[ my $link = gtkshow(Gtk2::LinkButton->new($url, $url)) ]);
$link->set_uri_hook(\&run_help_callback);
@a;
@@ -270,7 +270,7 @@ sub get_url_link {
sub files_format {
my ($files) = @_;
- ugtk2::markup_to_TextView_format(
+ ugtk3::markup_to_TextView_format(
'<tt>' . $spacing #- to highlight information
. join("\n$spacing", map { "\x{200e}$_" } @$files)
. '</tt>');
@@ -331,7 +331,7 @@ sub format_pkg_info {
)
);
my @max_info = @$max_info_in_descr && $changelog_first ? (@chglo, @files) : (@files, '', @chglo);
- ugtk2::markup_to_TextView_format(join("\n", format_field(N("Name: ")) . $name,
+ ugtk3::markup_to_TextView_format(join("\n", format_field(N("Name: ")) . $name,
format_field(N("Version: ")) . $version,
format_field(N("Architecture: ")) . $upkg->arch,
format_field(N("Size: ")) . N("%s KB", int($upkg->size/1024)),
@@ -367,9 +367,11 @@ sub warn_if_no_pkg {
N("Matching packages:"),
'',
join("\n", sort map {
- #-PO: this is list fomatting: "- <package_name> (medium: <medium_name>)"
- #-PO: eg: "- rpmdrake (medium: "Main Release"
- N("- %s (medium: %s)", $_, pkg2medium($pkgs->{$_}{pkg}, $urpm)->{name});
+ ref($pkgs->{$_}) ?
+ #-PO: this is list fomatting: "- <package_name> (medium: <medium_name>)"
+ #-PO: eg: "- rpmdrake (medium: "Main Release"
+ N("- %s (medium: %s)", $_, pkg2medium($pkgs->{$_}{pkg}, $urpm)->{name})
+ : N("- %s", $_);
} grep { /^$short_name/ } keys %$pkgs),
),
scroll => 1,
@@ -492,7 +494,7 @@ sub toggle_all {
# ask_browse_tree_given_widgets_for_rpmdrake will run gtk+ loop. its main parameter "common" is a hash containing:
# - a "widgets" subhash which holds:
-# o a "w" reference on a ugtk2 object
+# o a "w" reference on a ugtk3 object
# o "tree" & "info" references a TreeView
# o "info" is a TextView
# o "tree_model" is the associated model of "tree"