aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xMageiaUpdate8
-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
-rwxr-xr-xgurpmi.addmedia2
-rwxr-xr-xrpmdrake12
-rw-r--r--rpmdrake.pm34
12 files changed, 70 insertions, 68 deletions
diff --git a/MageiaUpdate b/MageiaUpdate
index dea9090b..6192c5d9 100755
--- a/MageiaUpdate
+++ b/MageiaUpdate
@@ -37,8 +37,8 @@ use Rpmdrake::formatting;
use Rpmdrake::pkg;
use Rpmdrake::widgets;
-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 Gtk2::SimpleList;
# make Rpmdrake::gui aware MageiaUpdate do not use the same columns ids as rpmdrake:
@@ -53,7 +53,7 @@ use Gtk2::SimpleList;
importance => 7,
);
-$ugtk2::wm_icon = get_icon('MageiaUpdate', "title-$MODE");
+$ugtk3::wm_icon = get_icon('MageiaUpdate', "title-$MODE");
our $w;
our $statusbar;
@@ -124,7 +124,7 @@ sub toggle {
$list->{data}[$data{$name}][$pkg_columns{selected}] = !$list->{data}[$data{$name}][$pkg_columns{selected}] if !$done;
}
-$w = ugtk2->new(N("Software Management"));
+$w = ugtk3->new(N("Software Management"));
$w->{rwindow}->show_all if $::isEmbedded;
$::main_window = $w->{real_window};
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';
diff --git a/gurpmi.addmedia b/gurpmi.addmedia
index 4a084639..8679b10e 100755
--- a/gurpmi.addmedia
+++ b/gurpmi.addmedia
@@ -59,7 +59,7 @@ require_root_capability();
use rpmdrake;
use Getopt::Long;
-use ugtk2 qw(:all);
+use ugtk3 qw(:all);
$::isStandalone = 1;
readconf();
diff --git a/rpmdrake b/rpmdrake
index 2ed87b97..7e064b32 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -40,13 +40,13 @@ use Rpmdrake::formatting;
use Rpmdrake::pkg;
use urpm::media;
-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 Gtk2::Gdk::Keysyms;
use Rpmdrake::widgets;
use feature 'state';
-$ugtk2::wm_icon = get_icon('installremoverpm', "title-$MODE");
+$ugtk3::wm_icon = get_icon('installremoverpm', "title-$MODE");
our $w;
our $statusbar;
@@ -94,7 +94,7 @@ sub do_search($$$$$$$) {
}
} else {
my $searchstop;
- my $searchw = ugtk2->new(N("Software Management"), grab => 1, transient => $w->{real_window});
+ my $searchw = ugtk3->new(N("Software Management"), grab => 1, transient => $w->{real_window});
gtkadd(
$searchw->{window},
gtkpack__(
@@ -741,7 +741,7 @@ sub run_treeview_dialog {
gtktext_insert($info, [
[ $info->render_icon('gtk-dialog-info', 'GTK_ICON_SIZE_DIALOG', undef) ],
- @{ ugtk2::markup_to_TextView_format(
+ @{ ugtk3::markup_to_TextView_format(
formatAlaTeX(join("\n\n\n", format_header(N("Quick Introduction")),
N("You can browse the packages through the categories tree on the left."),
N("You can view information about a package by clicking on it on the right list."),
@@ -794,7 +794,7 @@ if (my $pid = is_running('rpmdrake')) {
exit(0);
}
-$w = ugtk2->new(N("Software Management"));
+$w = ugtk3->new(N("Software Management"));
$w->{rwindow}->show_all if $::isEmbedded;
readconf();
diff --git a/rpmdrake.pm b/rpmdrake.pm
index 8dcd76f8..da349b36 100644
--- a/rpmdrake.pm
+++ b/rpmdrake.pm
@@ -104,9 +104,9 @@ our $dont_show_selections;
# i18n: IMPORTANT: to get correct namespace (rpmdrake instead of libDrakX)
BEGIN { unshift @::textdomains, qw(rpmdrake urpmi rpm-summary-main rpm-summary-contrib rpm-summary-devel rpm-summary-non-free) }
-use mygtk2 qw(gtknew);
-use ugtk2 qw(:all);
-ugtk2::add_icon_path('/usr/share/rpmdrake/icons');
+use mygtk3 qw(gtknew);
+use ugtk3 qw(:all);
+ugtk3::add_icon_path('/usr/share/rpmdrake/icons');
Locale::gettext::bind_textdomain_codeset('rpmdrake', 'UTF8');
@@ -125,7 +125,7 @@ our $myname_update = $branded ? N("Software Update") : N("Mageia Update");
sub rpmdrake::prompt::prompt {
my ($self) = @_;
my @answers;
- my $d = ugtk2->new("", grab => 1, if_($::main_window, transient => $::main_window));
+ my $d = ugtk3->new("", grab => 1, if_($::main_window, transient => $::main_window));
$d->{rwindow}->set_position('center_on_parent');
gtkadd(
$d->{window},
@@ -153,7 +153,7 @@ $urpm::download::PROMPT_PROXY = new rpmdrake::prompt(
sub myexit {
writeconf();
- ugtk2::exit(undef, @_);
+ ugtk3::exit(undef, @_);
}
my ($root) = grep { $_->[2] == 0 } list_passwd();
@@ -236,7 +236,7 @@ sub getbanner() {
install => N("Software Packages Installation"),
};
}
- Gtk2::Banner->new($ugtk2::wm_icon, $::MODE eq 'update' ? N("Software Packages Update") : N("Software Management"));
+ Gtk2::Banner->new($ugtk3::wm_icon, $::MODE eq 'update' ? N("Software Packages Update") : N("Software Management"));
}
# return value:
@@ -247,10 +247,10 @@ sub interactive_msg {
my ($title, $contents, %options) = @_;
$options{transient} ||= $::main_window if $::main_window;
local $::isEmbedded;
- my $d = ugtk2->new($title, grab => 1, if_(exists $options{transient}, transient => $options{transient}));
+ my $d = ugtk3->new($title, grab => 1, if_(exists $options{transient}, transient => $options{transient}));
$d->{rwindow}->set_position($options{transient} ? 'center_on_parent' : 'center_always');
if ($options{scroll}) {
- $contents = ugtk2::markup_to_TextView_format($contents) if !ref $contents;
+ $contents = ugtk3::markup_to_TextView_format($contents) if !ref $contents;
} else { #- because we'll use a WrappedLabel
$contents = formatAlaTeX($contents) if !ref $contents;
}
@@ -307,7 +307,7 @@ sub interactive_msg {
sub interactive_packtable {
my ($title, $parent_window, $top_label, $lines, $action_buttons) = @_;
- my $w = ugtk2->new($title, grab => 1, transient => $parent_window);
+ my $w = ugtk3->new($title, grab => 1, transient => $parent_window);
local $::main_window = $w->{real_window};
$w->{rwindow}->set_position($parent_window ? 'center_on_parent' : 'center');
my $packtable = create_packtable({}, @$lines);
@@ -328,7 +328,7 @@ sub interactive_packtable {
sub interactive_list {
my ($title, $contents, $list, $callback, %options) = @_;
- my $d = ugtk2->new($title, grab => 1, if_(exists $options{transient}, transient => $options{transient}));
+ my $d = ugtk3->new($title, grab => 1, if_(exists $options{transient}, transient => $options{transient}));
$d->{rwindow}->set_position($options{transient} ? 'center_on_parent' : 'center_always');
my @radios = gtkradio('', @$list);
my $vbradios = $callback ? create_packtable(
@@ -382,7 +382,7 @@ sub wait_msg {
gtkflush();
$options{transient} ||= $::main_window if $::main_window;
local $::isEmbedded;
- my $mainw = ugtk2->new(N("Please wait"), grab => 1, if_(exists $options{transient}, transient => $options{transient}));
+ my $mainw = ugtk3->new(N("Please wait"), grab => 1, if_(exists $options{transient}, transient => $options{transient}));
$mainw->{real_window}->set_position($options{transient} ? 'center_on_parent' : 'center_always');
my $label = ref($msg) =~ /^Gtk/ ? $msg : Gtk2::WrappedLabel->new($msg);
gtkadd(
@@ -412,7 +412,7 @@ sub slow_func ($&) {
my ($param, $func) = @_;
if (ref($param) =~ /^Gtk/) {
gtkset_mousecursor_wait($param);
- ugtk2::flush();
+ ugtk3::flush();
$func->();
gtkset_mousecursor_normal($param);
} else {
@@ -667,7 +667,7 @@ the case when the architecture of your processor is not supported
by Mageia Official Updates.")), %options
), return '';
- my $w = ugtk2->new(N("Mirror choice"), grab => 1, @transient_options);
+ my $w = ugtk3->new(N("Mirror choice"), grab => 1, @transient_options);
$w->{rwindow}->set_position($options{transient} ? 'center_on_parent' : 'center_always');
my $tree_model = Gtk2::TreeStore->new("Glib::String");
my $tree = Gtk2::TreeView->new_with_model($tree_model);
@@ -820,7 +820,7 @@ sub update_sources_check {
sub update_sources_interactive {
my ($urpm, %options) = @_;
- my $w = ugtk2->new(N("Update media"), grab => 1, center => 1, %options);
+ my $w = ugtk3->new(N("Update media"), grab => 1, center => 1, %options);
$w->{rwindow}->set_position($options{transient} ? 'center_on_parent' : 'center_always');
my @buttons;
my @media = grep { ! $_->{ignore} } @{$urpm->{media}};
@@ -984,11 +984,11 @@ sub run_drakbug {
run_program::raw({ detach => 1, as_user => 1 }, 'drakbug', '--report', $id);
}
-mygtk2::add_icon_path('/usr/share/mcc/themes/default/');
+mygtk3::add_icon_path('/usr/share/mcc/themes/default/');
sub get_icon {
my ($mcc_icon, $fallback_icon) = @_;
- my $icon = eval { mygtk2::_find_imgfile($mcc_icon) };
- $icon ||= eval { mygtk2::_find_imgfile($fallback_icon) };
+ my $icon = eval { mygtk3::_find_imgfile($mcc_icon) };
+ $icon ||= eval { mygtk3::_find_imgfile($fallback_icon) };
$icon;
}