aboutsummaryrefslogtreecommitdiffstats
path: root/rpmdrake.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.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.pm')
-rw-r--r--rpmdrake.pm34
1 files changed, 17 insertions, 17 deletions
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;
}