aboutsummaryrefslogtreecommitdiffstats
path: root/Rpmdrake
diff options
context:
space:
mode:
Diffstat (limited to 'Rpmdrake')
-rw-r--r--Rpmdrake/edit_urpm_sources.pm26
-rw-r--r--Rpmdrake/formatting.pm4
-rw-r--r--Rpmdrake/gui.pm26
-rw-r--r--Rpmdrake/gurpm.pm10
-rw-r--r--Rpmdrake/icon.pm2
-rw-r--r--Rpmdrake/pkg.pm4
-rw-r--r--Rpmdrake/rpmnew.pm6
-rw-r--r--Rpmdrake/widgets.pm4
8 files changed, 42 insertions, 40 deletions
diff --git a/Rpmdrake/edit_urpm_sources.pm b/Rpmdrake/edit_urpm_sources.pm
index 960ac7f4..bcfe5bd5 100644
--- a/Rpmdrake/edit_urpm_sources.pm
+++ b/Rpmdrake/edit_urpm_sources.pm
@@ -39,8 +39,8 @@ use Exporter;
our @ISA = qw(Exporter);
our @EXPORT = qw(run);
-use mygtk2 qw(gtknew gtkset);
-use ugtk2 qw(:all);
+use mygtk3 qw(gtknew gtkset);
+use ugtk3 qw(:all);
my $urpm;
my ($mainw, $list_tv, $something_changed);
@@ -165,7 +165,7 @@ sub easy_add_callback() {
}
sub add_callback() {
- my $w = ugtk2->new(N("Add a medium"), grab => 1, center => 1, transient => $::main_window);
+ my $w = ugtk3->new(N("Add a medium"), grab => 1, center => 1, transient => $::main_window);
my $prev_main_window = $::main_window;
local $::main_window = $w->{real_window};
my %radios_infos = (
@@ -334,7 +334,7 @@ really want to replace it?"), yesno => 1) or return 0;
}
sub options_callback() {
- my $w = ugtk2->new(N("Global options for package installation"), grab => 1, center => 1, transient => $::main_window);
+ my $w = ugtk3->new(N("Global options for package installation"), grab => 1, center => 1, transient => $::main_window);
local $::main_window = $w->{real_window};
my %verif = (0 => N("never"), 1 => N("always"));
my $verify_rpm = $urpm->{global_config}{'verify-rpm'};
@@ -470,7 +470,7 @@ sub edit_callback() {
my $config = urpm::cfg::load_config_raw($urpm->{config}, 1);
my ($verbatim_medium) = grep { $medium->{name} eq $_->{name} } @$config;
my $old_main_window = $::main_window;
- my $w = ugtk2->new(N("Edit a medium"), grab => 1, center => 1, transient => $::main_window);
+ my $w = ugtk3->new(N("Edit a medium"), grab => 1, center => 1, transient => $::main_window);
local $::main_window = $w->{real_window};
my ($url_entry, $downloader_entry, $url, $downloader);
gtkadd(
@@ -550,7 +550,7 @@ sub update_callback() {
sub proxy_callback {
my ($medium) = @_;
my $medium_name = $medium ? $medium->{name} : '';
- my $w = ugtk2->new(N("Configure proxies"), grab => 1, center => 1, transient => $::main_window);
+ my $w = ugtk3->new(N("Configure proxies"), grab => 1, center => 1, transient => $::main_window);
local $::main_window = $w->{real_window};
my ($proxy, $proxy_user) = readproxy($medium_name);
my ($user, $pass) = $proxy_user =~ /^([^:]*):(.*)$/;
@@ -648,7 +648,7 @@ sub remove_parallel {
sub add_callback_ {
my ($title, $label, $mainw, $widget, $get_value, $check) = @_;
- my $w = ugtk2->new($title, grab => 1, transient => $mainw->{real_window});
+ my $w = ugtk3->new($title, grab => 1, transient => $mainw->{real_window});
local $::main_window = $w->{real_window};
gtkadd(
$w->{window},
@@ -670,7 +670,7 @@ sub add_callback_ {
sub edit_parallel {
my ($num, $conf) = @_;
my $edited = $num == -1 ? {} : $conf->[$num];
- my $w = ugtk2->new($num == -1 ? N("Add a parallel group") : N("Edit a parallel group"), grab => 1, center => 1, transient => $::main_window);
+ my $w = ugtk3->new($num == -1 ? N("Add a parallel group") : N("Edit a parallel group"), grab => 1, center => 1, transient => $::main_window);
local $::main_window = $w->{real_window};
my $name_entry;
@@ -777,7 +777,7 @@ sub edit_parallel {
}
sub parallel_callback() {
- my $w = ugtk2->new(N("Configure parallel urpmi (distributed execution of urpmi)"), grab => 1, center => 1, transient => $mainw->{real_window});
+ my $w = ugtk3->new(N("Configure parallel urpmi (distributed execution of urpmi)"), grab => 1, center => 1, transient => $mainw->{real_window});
local $::main_window = $w->{real_window};
my $list_ls = Gtk2::ListStore->new("Glib::String", "Glib::String", "Glib::String", "Glib::String");
my $list = Gtk2::TreeView->new_with_model($list_ls);
@@ -836,7 +836,7 @@ sub parallel_callback() {
}
sub keys_callback() {
- my $w = ugtk2->new(N("Manage keys for digital signatures of packages"), grab => 1, center => 1, transient => $mainw->{real_window});
+ my $w = ugtk3->new(N("Manage keys for digital signatures of packages"), grab => 1, center => 1, transient => $mainw->{real_window});
local $::main_window = $w->{real_window};
$w->{real_window}->set_size_request(600, 300);
@@ -951,7 +951,7 @@ sub keys_callback() {
sub mainwindow() {
undef $something_changed;
- $mainw = ugtk2->new(N("Configure media"), center => 1, transient => $::main_window, modal => 1);
+ $mainw = ugtk3->new(N("Configure media"), center => 1, transient => $::main_window, modal => 1);
local $::main_window = $mainw->{real_window};
my $reread_media;
@@ -1128,7 +1128,7 @@ sub mainwindow() {
gtkpack_(
gtknew('VBox', spacing => 5),
0, $menu,
- ($0 =~ /rpm-edit-media|edit-urpm-sources/ ? (0, Gtk2::Banner->new($ugtk2::wm_icon, N("Configure media"))) : ()),
+ ($0 =~ /rpm-edit-media|edit-urpm-sources/ ? (0, Gtk2::Banner->new($ugtk3::wm_icon, N("Configure media"))) : ()),
1, gtkpack_(
gtknew('HBox', spacing => 10),
1, gtknew('ScrolledWindow', child => $list_tv),
@@ -1180,7 +1180,7 @@ sub mainwindow() {
sub run() {
# ignore rpmdrake's option regarding ignoring debug media:
local $ignore_debug_media = [ 0 ];
- local $ugtk2::wm_icon = get_icon('rpmdrake-mdk', 'title-media');
+ local $ugtk3::wm_icon = get_icon('rpmdrake-mdk', 'title-media');
my $lock;
{
$urpm = fast_open_urpmi_db();
diff --git a/Rpmdrake/formatting.pm b/Rpmdrake/formatting.pm
index 9ff8d569..1bc6ba0d 100644
--- a/Rpmdrake/formatting.pm
+++ b/Rpmdrake/formatting.pm
@@ -29,7 +29,7 @@ use POSIX qw(strftime);
use rpmdrake;
use lib qw(/usr/lib/libDrakX);
use common;
-use ugtk2 qw(escape_text_for_TextView_markup_format);
+use ugtk3 qw(escape_text_for_TextView_markup_format);
use Exporter;
our @ISA = qw(Exporter);
@@ -105,7 +105,7 @@ sub pkg2medium {
# [ duplicate urpmi's urpm::msg::localtime2changelog() ]
#- strftime returns a string in the locale charset encoding;
-#- but gtk2 requires UTF-8, so we use to_utf8() to ensure the
+#- but gtk3 requires UTF-8, so we use to_utf8() to ensure the
#- output of localtime2changelog() is always in UTF-8
#- as to_utf8() uses LC_CTYPE for locale encoding and strftime() uses LC_TIME,
#- it doesn't work if those two variables have values with different
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"
diff --git a/Rpmdrake/gurpm.pm b/Rpmdrake/gurpm.pm
index ea77d419..c7444c52 100644
--- a/Rpmdrake/gurpm.pm
+++ b/Rpmdrake/gurpm.pm
@@ -25,16 +25,16 @@ package Rpmdrake::gurpm;
use strict;
use lib qw(/usr/lib/libDrakX);
-use mygtk2 qw(gtknew); #- do not import anything else, especially gtkadd() which conflicts with ugtk2 one
-use ugtk2 qw(:all);
-use base qw(ugtk2);
+use mygtk3 qw(gtknew); #- do not import anything else, especially gtkadd() which conflicts with ugtk3 one
+use ugtk3 qw(:all);
+use base qw(ugtk3);
use Time::HiRes;
use feature 'state';
sub new {
my ($self, $title, $initializing, %options) = @_;
- my $mainw = bless(ugtk2->new($title, %options, default_width => 600, width => 600), $self);
+ my $mainw = bless(ugtk3->new($title, %options, default_width => 600, width => 600), $self);
$::main_window = $mainw->{real_window};
$mainw->{label} = gtknew('Label', text => $initializing, alignment => [ 0.5, 0 ]);
# size label's heigh to 2 lines in order to prevent dummy vertical resizing:
@@ -74,7 +74,7 @@ sub progress {
sub DESTROY {
my ($self) = @_;
- mygtk2::may_destroy($self);
+ mygtk3::may_destroy($self);
$self and $self->destroy;
$self = undef;
$self->{cancel} = undef; #- in case we'll do another one later
diff --git a/Rpmdrake/icon.pm b/Rpmdrake/icon.pm
index cd2a75f9..c42b3d2f 100644
--- a/Rpmdrake/icon.pm
+++ b/Rpmdrake/icon.pm
@@ -27,7 +27,7 @@ use strict;
our @ISA = qw(Exporter);
use lib qw(/usr/lib/libDrakX);
use common;
-use mygtk2 qw(gtknew); #- do not import anything else, especially gtkadd() which conflicts with ugtk2 one
+use mygtk3 qw(gtknew); #- do not import anything else, especially gtkadd() which conflicts with ugtk3 one
our @EXPORT = qw(get_icon);
#- /usr/share/rpmlint/config (duplicates are normal, so that we are not too far away from .py)
diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm
index 0af51bc0..55895210 100644
--- a/Rpmdrake/pkg.pm
+++ b/Rpmdrake/pkg.pm
@@ -61,8 +61,8 @@ our @EXPORT = qw(
sort_packages
);
-use mygtk2 qw(gtknew);
-use ugtk2 qw(:all);
+use mygtk3 qw(gtknew);
+use ugtk3 qw(:all);
our $priority_up_alread_warned;
diff --git a/Rpmdrake/rpmnew.pm b/Rpmdrake/rpmnew.pm
index 5a897fe6..fa81b346 100644
--- a/Rpmdrake/rpmnew.pm
+++ b/Rpmdrake/rpmnew.pm
@@ -31,8 +31,8 @@ use Rpmdrake::init;
use Rpmdrake::pkg;
use Rpmdrake::open_db;
use Rpmdrake::formatting;
-use mygtk2 qw(gtknew); #- do not import anything else, especially gtkadd() which conflicts with ugtk2 one
-use ugtk2 qw(:all);
+use mygtk3 qw(gtknew); #- do not import anything else, especially gtkadd() which conflicts with ugtk3 one
+use ugtk3 qw(:all);
use Exporter;
our @ISA = qw(Exporter);
our @EXPORT = qw(dialog_rpmnew do_merge_if_needed);
@@ -84,7 +84,7 @@ sub inspect {
}
my @diff = map { ensure_utf8($_); $_ } `/usr/bin/diff -u '$file' '$rpmnew'`;
@diff = N("(none)") if !@diff;
- my $d = ugtk2->new(N("Inspecting %s", $file), grab => 1, transient => $::main_window);
+ 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 Gtk2::SourceView2;
diff --git a/Rpmdrake/widgets.pm b/Rpmdrake/widgets.pm
index 78e9ec7e..2c99fd41 100644
--- a/Rpmdrake/widgets.pm
+++ b/Rpmdrake/widgets.pm
@@ -27,8 +27,8 @@ use strict;
use MDK::Common::Func 'any';
use lib qw(/usr/lib/libDrakX);
-use mygtk2 qw(gtknew); #- do not import anything else, especially gtkadd() which conflicts with ugtk2 one
-use ugtk2 qw(:all);
+use mygtk3 qw(gtknew); #- do not import anything else, especially gtkadd() which conflicts with ugtk3 one
+use ugtk3 qw(:all);
use Time::HiRes;
use feature 'state';