aboutsummaryrefslogtreecommitdiffstats
path: root/Rpmdrake
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2013-11-19 21:37:27 +0100
committerThierry Vignaud <thierry.vignaud@gmail.com>2013-12-05 14:16:06 +0100
commit4473fb769b8aa88daede1eaaa4c65e74cbd17401 (patch)
tree51a78dff3cad962195a7a729fcc887d2d73c0c3f /Rpmdrake
parentcc91f03150dba941470fd80c10211eaead298c89 (diff)
downloadrpmdrake-4473fb769b8aa88daede1eaaa4c65e74cbd17401.tar
rpmdrake-4473fb769b8aa88daede1eaaa4c65e74cbd17401.tar.gz
rpmdrake-4473fb769b8aa88daede1eaaa4c65e74cbd17401.tar.bz2
rpmdrake-4473fb769b8aa88daede1eaaa4c65e74cbd17401.tar.xz
rpmdrake-4473fb769b8aa88daede1eaaa4c65e74cbd17401.zip
use Gtk3 namespace instead of Gtk2
Diffstat (limited to 'Rpmdrake')
-rw-r--r--Rpmdrake/edit_urpm_sources.pm126
-rw-r--r--Rpmdrake/gui.pm14
-rw-r--r--Rpmdrake/gurpm.pm2
-rw-r--r--Rpmdrake/init.pm2
-rw-r--r--Rpmdrake/pkg.pm10
-rw-r--r--Rpmdrake/rpmnew.pm22
-rw-r--r--Rpmdrake/widgets.pm2
7 files changed, 89 insertions, 89 deletions
diff --git a/Rpmdrake/edit_urpm_sources.pm b/Rpmdrake/edit_urpm_sources.pm
index bcfe5bd5..024c4da9 100644
--- a/Rpmdrake/edit_urpm_sources.pm
+++ b/Rpmdrake/edit_urpm_sources.pm
@@ -180,7 +180,7 @@ sub add_callback() {
my $notebook = gtknew('Notebook');
$notebook->set_show_tabs(0); $notebook->set_show_border(0);
my ($count_nbs, %pages);
- my $size_group = Gtk2::SizeGroup->new('horizontal');
+ my $size_group = Gtk3::SizeGroup->new('horizontal');
my ($cb1, $cb2);
foreach (@radios_names_ordered) {
my $info = $radios_infos{$_};
@@ -267,7 +267,7 @@ really want to replace it?"), yesno => 1) or return 0;
gtknew('VBox', spacing => 5),
gtknew('Title2', label => N("Adding a medium:")),
gtknew('HBox', children_tight => [
- Gtk2::Label->new(but(N("Type of medium:"))),
+ Gtk3::Label->new(but(N("Type of medium:"))),
gtknew('ComboBox', text_ref => \$type,
list => \@radios_names_ordered,
format => sub { $radios_infos{$_[0]}{name} },
@@ -277,7 +277,7 @@ really want to replace it?"), yesno => 1) or return 0;
gtknew('HSeparator'),
gtkpack(
gtknew('HButtonBox'),
- gtknew('Button', text => N("Cancel"), clicked => sub { $w->{retval} = 0; Gtk2->main_quit }),
+ gtknew('Button', text => N("Cancel"), clicked => sub { $w->{retval} = 0; Gtk3->main_quit }),
gtksignal_connect(
gtknew('Button', text => N("Ok")), clicked => sub {
if ($checkok->()) {
@@ -301,7 +301,7 @@ really want to replace it?"), yesno => 1) or return 0;
? ($info->{login_entry}->get_text . ':' . $info->{pass_entry}->get_text . '@')
: '',
$i{url};
- Gtk2->main_quit;
+ Gtk3->main_quit;
}
},
),
@@ -391,7 +391,7 @@ sub options_callback() {
gtkpack(
gtknew('HButtonBox'),
- gtknew('Button', text => N("Cancel"), clicked => sub { Gtk2->main_quit }),
+ gtknew('Button', text => N("Cancel"), clicked => sub { Gtk3->main_quit }),
gtksignal_connect(
gtknew('Button', text => N("Ok")), clicked => sub {
$urpm->{global_config}{'verify-rpm'} = $verify_rpm;
@@ -400,7 +400,7 @@ sub options_callback() {
$something_changed = 1;
urpm::media::write_config($urpm);
$urpm = fast_open_urpmi_db();
- Gtk2->main_quit;
+ Gtk3->main_quit;
},
),
),
@@ -482,7 +482,7 @@ sub edit_callback() {
{},
[ gtknew('Label_Left', text => N("URL:")), $url_entry = gtkentry($verbatim_medium->{url} || $verbatim_medium->{mirrorlist}) ],
[ gtknew('Label_Left', text => N("Downloader:")),
- my $download_combo = Gtk2::ComboBox->new_with_strings([ urpm::download::available_ftp_http_downloaders() ],
+ my $download_combo = Gtk3::ComboBox->new_with_strings([ urpm::download::available_ftp_http_downloaders() ],
$verbatim_medium->{downloader} || '') ],
),
0, gtknew('HSeparator'),
@@ -490,7 +490,7 @@ sub edit_callback() {
gtknew('HButtonBox'),
gtksignal_connect(
gtknew('Button', text => N("Cancel")),
- clicked => sub { $w->{retval} = 0; Gtk2->main_quit },
+ clicked => sub { $w->{retval} = 0; Gtk3->main_quit },
),
gtksignal_connect(
gtknew('Button', text => N("Save changes")),
@@ -498,7 +498,7 @@ sub edit_callback() {
$w->{retval} = 1;
$url = $url_entry->get_text;
$downloader = $downloader_entry->get_text;
- Gtk2->main_quit;
+ Gtk3->main_quit;
},
),
gtksignal_connect(
@@ -555,7 +555,7 @@ sub proxy_callback {
my ($proxy, $proxy_user) = readproxy($medium_name);
my ($user, $pass) = $proxy_user =~ /^([^:]*):(.*)$/;
my ($proxybutton, $proxyentry, $proxyuserbutton, $proxyuserentry, $proxypasswordentry);
- my $sg = Gtk2::SizeGroup->new('horizontal');
+ my $sg = Gtk3::SizeGroup->new('horizontal');
gtkadd(
$w->{window},
gtkpack__(
@@ -592,12 +592,12 @@ sub proxy_callback {
$proxy = $proxybutton->get_active ? $proxyentry->get_text : '';
$proxy_user = $proxyuserbutton->get_active
? ($proxyuserentry->get_text . ':' . $proxypasswordentry->get_text) : '';
- Gtk2->main_quit;
+ Gtk3->main_quit;
},
),
gtksignal_connect(
gtknew('Button', text => N("Cancel")),
- clicked => sub { $w->{retval} = 0; Gtk2->main_quit },
+ clicked => sub { $w->{retval} = 0; Gtk3->main_quit },
)
)
)
@@ -659,8 +659,8 @@ sub add_callback_ {
gtknew('HSeparator'),
gtkpack(
gtknew('HButtonBox'),
- gtknew('Button', text => N("Ok"), clicked => sub { $w->{retval} = 1; $get_value->(); Gtk2->main_quit }),
- gtknew('Button', text => N("Cancel"), clicked => sub { $w->{retval} = 0; Gtk2->main_quit })
+ gtknew('Button', text => N("Ok"), clicked => sub { $w->{retval} = 1; $get_value->(); Gtk3->main_quit }),
+ gtknew('Button', text => N("Cancel"), clicked => sub { $w->{retval} = 0; Gtk3->main_quit })
)
)
);
@@ -674,11 +674,11 @@ sub edit_parallel {
local $::main_window = $w->{real_window};
my $name_entry;
- my ($medias_ls, $hosts_ls) = (Gtk2::ListStore->new("Glib::String"), Gtk2::ListStore->new("Glib::String"));
+ my ($medias_ls, $hosts_ls) = (Gtk3::ListStore->new("Glib::String"), Gtk3::ListStore->new("Glib::String"));
my ($medias, $hosts) = map {
- my $list = Gtk2::TreeView->new_with_model($_);
- $list->append_column(Gtk2::TreeViewColumn->new_with_attributes(undef, Gtk2::CellRendererText->new, 'text' => 0));
+ my $list = Gtk3::TreeView->new_with_model($_);
+ $list->append_column(Gtk3::TreeViewColumn->new_with_attributes(undef, Gtk3::CellRendererText->new, 'text' => 0));
$list->set_headers_visible(0);
$list->get_selection->set_mode('browse');
$list;
@@ -687,9 +687,9 @@ sub edit_parallel {
$medias_ls->append_set([ 0 => $_ ]) foreach @{$edited->{medias}};
my $add_media = sub {
- my $medias_list_ls = Gtk2::ListStore->new("Glib::String");
- my $medias_list = Gtk2::TreeView->new_with_model($medias_list_ls);
- $medias_list->append_column(Gtk2::TreeViewColumn->new_with_attributes(undef, Gtk2::CellRendererText->new, 'text' => 0));
+ my $medias_list_ls = Gtk3::ListStore->new("Glib::String");
+ my $medias_list = Gtk3::TreeView->new_with_model($medias_list_ls);
+ $medias_list->append_column(Gtk3::TreeViewColumn->new_with_attributes(undef, Gtk3::CellRendererText->new, 'text' => 0));
$medias_list->set_headers_visible(0);
$medias_list->get_selection->set_mode('browse');
$medias_list_ls->append_set([ 0 => $_->{name} ]) foreach @{$urpm->{media}};
@@ -737,8 +737,8 @@ sub edit_parallel {
1, gtknew('Frame', shadow_type => 'in', child =>
gtknew('ScrolledWindow', h_policy => 'never', child => $medias)),
0, gtknew('VBox', children_tight => [
- gtksignal_connect(Gtk2::Button->new(but(N("Add"))), clicked => sub { $add_media->() }),
- gtksignal_connect(Gtk2::Button->new(but(N("Remove"))), clicked => sub {
+ gtksignal_connect(Gtk3::Button->new(but(N("Add"))), clicked => sub { $add_media->() }),
+ gtksignal_connect(Gtk3::Button->new(but(N("Remove"))), clicked => sub {
remove_from_list($medias, $edited->{medias}, $medias_ls);
}) ]) ]) ],
[ N("Hosts:"),
@@ -746,8 +746,8 @@ sub edit_parallel {
1, gtknew('Frame', shadow_type => 'in', child =>
gtknew('ScrolledWindow', h_policy => 'never', child => $hosts)),
0, gtknew('VBox', children_tight => [
- gtksignal_connect(Gtk2::Button->new(but(N("Add"))), clicked => sub { $add_host->() }),
- gtksignal_connect(Gtk2::Button->new(but(N("Remove"))), clicked => sub {
+ gtksignal_connect(Gtk3::Button->new(but(N("Add"))), clicked => sub { $add_host->() }),
+ gtksignal_connect(Gtk3::Button->new(but(N("Remove"))), clicked => sub {
remove_from_list($hosts, $hosts_list, $hosts_ls);
}) ]) ]) ]
),
@@ -759,10 +759,10 @@ sub edit_parallel {
$w->{retval} = 1;
$edited->{name} = $name_entry->get_text;
mapn { $_[0]->get_active and $edited->{protocol} = $_[1] } \@protocols, \@protocols_names;
- Gtk2->main_quit;
+ Gtk3->main_quit;
}
),
- gtknew('Button', text => N("Cancel"), clicked => sub { $w->{retval} = 0; Gtk2->main_quit }))
+ gtknew('Button', text => N("Cancel"), clicked => sub { $w->{retval} = 0; Gtk3->main_quit }))
)
);
$w->{rwindow}->set_size_request(600, -1);
@@ -779,10 +779,10 @@ sub edit_parallel {
sub parallel_callback() {
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);
- each_index { $list->append_column(Gtk2::TreeViewColumn->new_with_attributes($_, Gtk2::CellRendererText->new, 'text' => $::i)) } N("Group"), N("Protocol"), N("Media limit");
- $list->append_column(my $commandcol = Gtk2::TreeViewColumn->new_with_attributes(N("Command"), Gtk2::CellRendererText->new, 'text' => 3));
+ my $list_ls = Gtk3::ListStore->new("Glib::String", "Glib::String", "Glib::String", "Glib::String");
+ my $list = Gtk3::TreeView->new_with_model($list_ls);
+ each_index { $list->append_column(Gtk3::TreeViewColumn->new_with_attributes($_, Gtk3::CellRendererText->new, 'text' => $::i)) } N("Group"), N("Protocol"), N("Media limit");
+ $list->append_column(my $commandcol = Gtk3::TreeViewColumn->new_with_attributes(N("Command"), Gtk3::CellRendererText->new, 'text' => 3));
$commandcol->set_max_width(200);
my $conf;
@@ -808,11 +808,11 @@ sub parallel_callback() {
0, gtkpack__(
gtknew('VBox', spacing => 5),
gtksignal_connect(
- Gtk2::Button->new(but(N("Remove"))),
+ Gtk3::Button->new(but(N("Remove"))),
clicked => sub { remove_parallel(selrow($list), $conf); $reread->() },
),
gtksignal_connect(
- Gtk2::Button->new(but(N("Edit..."))),
+ Gtk3::Button->new(but(N("Edit..."))),
clicked => sub {
my $row = selrow($list);
$row != -1 and edit_parallel($row, $conf);
@@ -820,7 +820,7 @@ sub parallel_callback() {
},
),
gtksignal_connect(
- Gtk2::Button->new(but(N("Add..."))),
+ Gtk3::Button->new(but(N("Add..."))),
clicked => sub { edit_parallel(-1, $conf) and $reread->() },
)
)
@@ -828,7 +828,7 @@ sub parallel_callback() {
0, gtknew('HSeparator'),
0, gtkpack(
gtknew('HButtonBox'),
- gtknew('Button', text => N("Ok"), clicked => sub { Gtk2->main_quit })
+ gtknew('Button', text => N("Ok"), clicked => sub { Gtk3->main_quit })
)
)
);
@@ -840,16 +840,16 @@ sub keys_callback() {
local $::main_window = $w->{real_window};
$w->{real_window}->set_size_request(600, 300);
- my $media_list_ls = Gtk2::ListStore->new("Glib::String");
- my $media_list = Gtk2::TreeView->new_with_model($media_list_ls);
- $media_list->append_column(Gtk2::TreeViewColumn->new_with_attributes(N("Medium"), Gtk2::CellRendererText->new, 'text' => 0));
+ my $media_list_ls = Gtk3::ListStore->new("Glib::String");
+ my $media_list = Gtk3::TreeView->new_with_model($media_list_ls);
+ $media_list->append_column(Gtk3::TreeViewColumn->new_with_attributes(N("Medium"), Gtk3::CellRendererText->new, 'text' => 0));
$media_list->get_selection->set_mode('browse');
my $key_col_size = 200;
- my $keys_list_ls = Gtk2::ListStore->new("Glib::String", "Glib::String");
- my $keys_list = Gtk2::TreeView->new_with_model($keys_list_ls);
+ my $keys_list_ls = Gtk3::ListStore->new("Glib::String", "Glib::String");
+ my $keys_list = Gtk3::TreeView->new_with_model($keys_list_ls);
$keys_list->set_rules_hint(1);
- $keys_list->append_column(my $col = Gtk2::TreeViewColumn->new_with_attributes(N("_:cryptographic keys\nKeys"), my $renderer = Gtk2::CellRendererText->new, 'text' => 0));
+ $keys_list->append_column(my $col = Gtk3::TreeViewColumn->new_with_attributes(N("_:cryptographic keys\nKeys"), my $renderer = Gtk3::CellRendererText->new, 'text' => 0));
$col->set_sizing('fixed');
$col->set_fixed_width($key_col_size);
$renderer->set_property('width' => 1);
@@ -885,9 +885,9 @@ sub keys_callback() {
});
my $add_key = sub {
- my $available_keyz_ls = Gtk2::ListStore->new("Glib::String", "Glib::String");
- my $available_keyz = Gtk2::TreeView->new_with_model($available_keyz_ls);
- $available_keyz->append_column(Gtk2::TreeViewColumn->new_with_attributes(undef, Gtk2::CellRendererText->new, 'text' => 0));
+ my $available_keyz_ls = Gtk3::ListStore->new("Glib::String", "Glib::String");
+ my $available_keyz = Gtk3::TreeView->new_with_model($available_keyz_ls);
+ $available_keyz->append_column(Gtk3::TreeViewColumn->new_with_attributes(undef, Gtk3::CellRendererText->new, 'text' => 0));
$available_keyz->set_headers_visible(0);
$available_keyz->get_selection->set_mode('browse');
$available_keyz_ls->append_set([ 0 => sprintf("%s (%s)", $_, $key_name->($_)), 1 => $_ ]) foreach keys %{$urpm->{keys}};
@@ -930,11 +930,11 @@ sub keys_callback() {
0, gtkpack__(
gtknew('VBox', spacing => 5),
gtksignal_connect(
- Gtk2::Button->new(but(N("Add"))),
+ Gtk3::Button->new(but(N("Add"))),
clicked => \&$add_key,
),
gtksignal_connect(
- Gtk2::Button->new(but(N("Remove"))),
+ Gtk3::Button->new(but(N("Remove"))),
clicked => \&$remove_key,
)
)
@@ -942,7 +942,7 @@ sub keys_callback() {
0, gtknew('HSeparator'),
0, gtkpack(
gtknew('HButtonBox'),
- gtknew('Button', text => N("Ok"), clicked => sub { Gtk2->main_quit })
+ gtknew('Button', text => N("Ok"), clicked => sub { Gtk3->main_quit })
),
),
);
@@ -962,7 +962,7 @@ sub mainwindow() {
[ N("/_File") . N("/_Update"), N("<control>U"), sub { update_callback() and $reread_media->() }, undef, '<Item>', ],
[ N("/_File") . N("/Add a specific _media mirror"), N("<control>M"), sub { easy_add_callback_with_mirror() and $reread_media->() }, undef, '<Item>' ],
[ N("/_File") . N("/_Add a custom medium"), N("<control>A"), sub { add_callback() and $reread_media->() }, undef, '<Item>' ],
- [ N("/_File") . N("/Close"), N("<control>W"), sub { Gtk2->main_quit }, undef, '<Item>', ],
+ [ N("/_File") . N("/Close"), N("<control>W"), sub { Gtk3->main_quit }, undef, '<Item>', ],
[ N("/_Options"), undef, undef, undef, '<Branch>' ],
[ N("/_Options") . N("/_Global options"), N("<control>G"), \&options_callback, undef, '<Item>' ],
[ N("/_Options") . N("/Manage _keys"), N("<control>K"), \&keys_callback, undef, '<Item>' ],
@@ -996,8 +996,8 @@ sub mainwindow() {
),
);
- my $list = Gtk2::ListStore->new("Glib::Boolean", "Glib::Boolean", "Glib::String", "Glib::String", "Glib::Boolean");
- $list_tv = Gtk2::TreeView->new_with_model($list);
+ my $list = Gtk3::ListStore->new("Glib::Boolean", "Glib::Boolean", "Glib::String", "Glib::String", "Glib::Boolean");
+ $list_tv = Gtk3::TreeView->new_with_model($list);
$list_tv->get_selection->set_mode('multiple');
my ($dw_button, $edit_button, $remove_button, $up_button);
$list_tv->get_selection->signal_connect(changed => sub {
@@ -1041,18 +1041,18 @@ sub mainwindow() {
},
);
- $list_tv->append_column(Gtk2::TreeViewColumn->new_with_attributes(N("Enabled"),
- my $tr = Gtk2::CellRendererToggle->new,
+ $list_tv->append_column(Gtk3::TreeViewColumn->new_with_attributes(N("Enabled"),
+ my $tr = Gtk3::CellRendererToggle->new,
'active' => $col{mainw}{is_enabled}));
- $list_tv->append_column(Gtk2::TreeViewColumn->new_with_attributes(N("Updates"),
- my $cu = Gtk2::CellRendererToggle->new,
+ $list_tv->append_column(Gtk3::TreeViewColumn->new_with_attributes(N("Updates"),
+ my $cu = Gtk3::CellRendererToggle->new,
'active' => $col{mainw}{is_update},
activatable => $col{mainw}{activatable}));
- $list_tv->append_column(Gtk2::TreeViewColumn->new_with_attributes(N("Type"),
- Gtk2::CellRendererText->new,
+ $list_tv->append_column(Gtk3::TreeViewColumn->new_with_attributes(N("Type"),
+ Gtk3::CellRendererText->new,
'text' => $col{mainw}{type}));
- $list_tv->append_column(Gtk2::TreeViewColumn->new_with_attributes(N("Medium"),
- Gtk2::CellRendererText->new,
+ $list_tv->append_column(Gtk3::TreeViewColumn->new_with_attributes(N("Medium"),
+ Gtk3::CellRendererText->new,
'text' => $col{mainw}{name}));
my $id;
$id = $tr->signal_connect(
@@ -1128,24 +1128,24 @@ sub mainwindow() {
gtkpack_(
gtknew('VBox', spacing => 5),
0, $menu,
- ($0 =~ /rpm-edit-media|edit-urpm-sources/ ? (0, Gtk2::Banner->new($ugtk3::wm_icon, N("Configure media"))) : ()),
+ ($0 =~ /rpm-edit-media|edit-urpm-sources/ ? (0, Gtk3::Banner->new($ugtk3::wm_icon, N("Configure media"))) : ()),
1, gtkpack_(
gtknew('HBox', spacing => 10),
1, gtknew('ScrolledWindow', child => $list_tv),
0, gtkpack__(
gtknew('VBox', spacing => 5),
gtksignal_connect(
- $remove_button = Gtk2::Button->new(but(N("Remove"))),
+ $remove_button = Gtk3::Button->new(but(N("Remove"))),
clicked => sub { remove_callback() and $reread_media->() },
),
gtksignal_connect(
- $edit_button = Gtk2::Button->new(but(N("Edit"))),
+ $edit_button = Gtk3::Button->new(but(N("Edit"))),
clicked => sub {
my $name = edit_callback(); defined $name and $reread_media->($name);
}
),
gtksignal_connect(
- Gtk2::Button->new(but(N("Add"))),
+ Gtk3::Button->new(but(N("Add"))),
clicked => sub { easy_add_callback() and $reread_media->() },
),
gtkpack(
@@ -1164,8 +1164,8 @@ sub mainwindow() {
),
0, gtknew('HSeparator'),
0, gtknew('HButtonBox', layout => 'edge', children_loose => [
- gtksignal_connect(Gtk2::Button->new(but(N("Help"))), clicked => sub { rpmdrake::open_help('sources') }),
- gtksignal_connect(Gtk2::Button->new(but(N("Ok"))), clicked => sub { Gtk2->main_quit })
+ gtksignal_connect(Gtk3::Button->new(but(N("Help"))), clicked => sub { rpmdrake::open_help('sources') }),
+ gtksignal_connect(Gtk3::Button->new(but(N("Ok"))), clicked => sub { Gtk3->main_quit })
])
)
);
diff --git a/Rpmdrake/gui.pm b/Rpmdrake/gui.pm
index 8a471901..9181a3da 100644
--- a/Rpmdrake/gui.pm
+++ b/Rpmdrake/gui.pm
@@ -113,7 +113,7 @@ sub build_expander {
my $textview;
gtkadd(
gtkshow(my $exp = gtksignal_connect(
- Gtk2::Expander->new(format_field($label)),
+ Gtk3::Expander->new(format_field($label)),
activate => sub {
state $first;
return if $first;
@@ -132,7 +132,7 @@ sub build_expander {
sub get_advisory_link {
my ($update_descr) = @_;
- my $link = gtkshow(Gtk2::LinkButton->new($update_descr->{URL}, N("Security advisory")));
+ my $link = gtkshow(Gtk3::LinkButton->new($update_descr->{URL}, N("Security advisory")));
$link->set_uri_hook(\&run_help_callback);
[ $link ];
}
@@ -226,7 +226,7 @@ sub get_new_deps {
my $deps_textview;
my @a = [ gtkadd(
gtksignal_connect(
- gtkshow(my $dependencies = Gtk2::Expander->new(format_field(N("New dependencies:")))),
+ gtkshow(my $dependencies = Gtk3::Expander->new(format_field(N("New dependencies:")))),
activate => sub {
slow_func($::main_window->window, sub {
my $state = {};
@@ -263,7 +263,7 @@ sub get_url_link {
my @a =
(@{ ugtk3::markup_to_TextView_format(format_field("\n$spacing" . N("URL: "))) },
- [ my $link = gtkshow(Gtk2::LinkButton->new($url, $url)) ]);
+ [ my $link = gtkshow(Gtk3::LinkButton->new($url, $url)) ]);
$link->set_uri_hook(\&run_help_callback);
@a;
}
@@ -295,7 +295,7 @@ sub format_pkg_simplifiedinfo {
push @$s, [ "\n" ];
my $installed_version = eval { find_installed_version($upkg) };
- push @$s, [ gtkadd(gtkshow(my $details_exp = Gtk2::Expander->new(format_field(N("Details:")))),
+ push @$s, [ gtkadd(gtkshow(my $details_exp = Gtk3::Expander->new(format_field(N("Details:")))),
gtknew('TextView', text => get_details($pkg, $upkg, $installed_version, $raw_medium))) ];
$details_exp->set_use_markup(1);
push @$s, [ "\n\n" ];
@@ -736,7 +736,7 @@ sub deps_msg {
interactive_msg(N("More information on package..."), get_info($pkg), scroll => 1);
}) ] } @deps ],
[ gtknew('Button', text => N("Ok"),
- clicked => sub { Gtk2->main_quit }) ]
+ clicked => sub { Gtk3->main_quit }) ]
);
goto deps_msg_again;
} else {
@@ -898,7 +898,7 @@ sub real_quit() {
if (is_there_selected_packages()) {
interactive_msg(N("Some packages are selected."), N("Some packages are selected.") . "\n" . N("Do you really want to quit?"), yesno => 1) or return;
}
- Gtk2->main_quit;
+ Gtk3->main_quit;
}
sub do_action__real {
diff --git a/Rpmdrake/gurpm.pm b/Rpmdrake/gurpm.pm
index 06cfd6b5..af3fb369 100644
--- a/Rpmdrake/gurpm.pm
+++ b/Rpmdrake/gurpm.pm
@@ -105,7 +105,7 @@ sub invalidate_cancel_forever {
$self->{hbox_cancel} or return;
$self->{hbox_cancel}->destroy;
# FIXME: temporary workaround that prevents
- # Gtk2::Label::set_text() set_text_internal() -> queue_resize() ->
+ # Gtk3::Label::set_text() set_text_internal() -> queue_resize() ->
# size_allocate() call chain to mess up when ->shrink_topwindow()
# has been called (#32613):
#$self->shrink_topwindow;
diff --git a/Rpmdrake/init.pm b/Rpmdrake/init.pm
index 4fcd8be8..817f8050 100644
--- a/Rpmdrake/init.pm
+++ b/Rpmdrake/init.pm
@@ -78,7 +78,7 @@ BEGIN { #- for mcc
}
-#- This is needed because text printed by Gtk2 will always be encoded
+#- This is needed because text printed by Gtk3 will always be encoded
#- in UTF-8; we first check if LC_ALL is defined, because if it is,
#- changing only LC_COLLATE will have no effect.
use POSIX qw(setlocale LC_ALL LC_COLLATE strftime);
diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm
index 55895210..0407e498 100644
--- a/Rpmdrake/pkg.pm
+++ b/Rpmdrake/pkg.pm
@@ -366,7 +366,7 @@ sub get_installed_packages {
@installed_pkgs;
}
-urpm::select::add_packages_to_priority_upgrade_list('rpmdrake', 'perl-Glib', 'perl-Gtk2');
+urpm::select::add_packages_to_priority_upgrade_list('rpmdrake', 'perl-Glib', 'perl-Gtk3');
my $priority_state;
our $need_restart;
@@ -437,7 +437,7 @@ sub get_pkgs {
my $gurpm = Rpmdrake::gurpm->new(1 ? N("Please wait") : N("Package installation..."), N("Initializing..."), transient => $::main_window);
my $_gurpm_clean_guard = before_leaving { undef $gurpm };
- #my $_flush_guard = Gtk2::GUI_Update_Guard->new;
+ #my $_flush_guard = Gtk3::GUI_Update_Guard->new;
warn_about_media($w, %options);
@@ -607,7 +607,7 @@ sub display_READMEs_if_needed {
},
),
] } keys %Readmes ],
- [ gtknew('Button', text => N("Ok"), clicked => sub { Gtk2->main_quit }) ]
+ [ gtknew('Button', text => N("Ok"), clicked => sub { Gtk3->main_quit }) ]
);
}
}
@@ -657,7 +657,7 @@ sub perform_installation { #- (partially) duplicated from /usr/sbin/urpmi :-(
my $_restore_sensitive = before_leaving { $w->set_sensitive(1) };
# prevent perl to segfault upon receiving SIGALARM (mga#4918):
- #my $_flush_guard = Gtk2::GUI_Update_Guard->new;
+ #my $_flush_guard = Gtk3::GUI_Update_Guard->new;
if (my $group = get_parallel_group()) {
return perform_parallel_install($urpm, $group, $w, \$statusbar_msg_id);
@@ -794,7 +794,7 @@ sub perform_installation { #- (partially) duplicated from /usr/sbin/urpmi :-(
$done += grep { !/\.src\.rpm$/ } values %$transaction_sources_install; # installs
},
pre_removable => sub {
- # Gtk2::GUI_Update_Guard->new use of alarm() kill us when
+ # Gtk3::GUI_Update_Guard->new use of alarm() kill us when
# running system(), thus making DVD being ejected and printing
# wrong error messages (#30463)
diff --git a/Rpmdrake/rpmnew.pm b/Rpmdrake/rpmnew.pm
index fa81b346..14a01a75 100644
--- a/Rpmdrake/rpmnew.pm
+++ b/Rpmdrake/rpmnew.pm
@@ -87,8 +87,8 @@ sub inspect {
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;
- my $lang_manager = Gtk2::SourceView2::LanguageManager->get_default;
+ require Gtk3::SourceView2;
+ my $lang_manager = Gtk3::SourceView2::LanguageManager->get_default;
gtkadd(
$d->{window},
gtkpack_(
@@ -98,25 +98,25 @@ sub inspect {
gtkpack_(
gtknew('VBox'),
0, gtknew('Label', text_markup => qq(<span font_desc="monospace">$file:</span>)),
- 1, gtknew('ScrolledWindow', child => $texts{file} = Gtk2::SourceView2::View->new),
+ 1, gtknew('ScrolledWindow', child => $texts{file} = Gtk3::SourceView2::View->new),
),
gtkpack_(
gtknew('VBox'),
0, gtknew('Label', text_markup => qq(<span font_desc="monospace">$rpmnew:</span>)),
- 1, gtknew('ScrolledWindow', child => $texts{rpmnew} = Gtk2::SourceView2::View->new),
+ 1, gtknew('ScrolledWindow', child => $texts{rpmnew} = Gtk3::SourceView2::View->new),
),
resize1 => 1,
),
gtkpack_(
gtknew('VBox'),
0, gtknew('Label', text => N("Changes:")),
- 1, gtknew('ScrolledWindow', child => $texts{diff} = Gtk2::SourceView2::View->new),
+ 1, gtknew('ScrolledWindow', child => $texts{diff} = Gtk3::SourceView2::View->new),
),
resize1 => 1,
),
- 0, Gtk2::HSeparator->new,
+ 0, Gtk3::HSeparator->new,
0, gtknew('WrappedLabel',
- # prevent bad sizing of Gtk2::WrappedLabel:
+ # prevent bad sizing of Gtk3::WrappedLabel:
width => $inspect_wsize[0],
text => N("You can either remove the .%s file, use it as main file or do nothing. If unsure, keep the current file (\"%s\").",
$rpmfile, N("Remove .%s", $rpmfile)),
@@ -125,15 +125,15 @@ sub inspect {
gtknew('HButtonBox'),
gtksignal_connect(
gtknew('Button', text => N("Remove .%s", $rpmfile)),
- clicked => sub { $save_wsize->(); unlink $rpmnew; Gtk2->main_quit },
+ clicked => sub { $save_wsize->(); unlink $rpmnew; Gtk3->main_quit },
),
gtksignal_connect(
gtknew('Button', text => N("Use .%s as main file", $rpmfile)),
- clicked => sub { $save_wsize->(); renamef($rpmnew, $file); Gtk2->main_quit },
+ clicked => sub { $save_wsize->(); renamef($rpmnew, $file); Gtk3->main_quit },
),
gtksignal_connect(
gtknew('Button', text => N("Do nothing")),
- clicked => sub { $save_wsize->(); Gtk2->main_quit },
+ clicked => sub { $save_wsize->(); Gtk3->main_quit },
),
)
)
@@ -183,7 +183,7 @@ sub dialog_rpmnew {
} @{$p2r{$pkg}};
} keys %p2r ],
[ gtknew('Button', text => N("Ok"),
- clicked => sub { Gtk2->main_quit }) ]
+ clicked => sub { Gtk3->main_quit }) ]
);
return 0;
}
diff --git a/Rpmdrake/widgets.pm b/Rpmdrake/widgets.pm
index 2c99fd41..98faf09e 100644
--- a/Rpmdrake/widgets.pm
+++ b/Rpmdrake/widgets.pm
@@ -1,4 +1,4 @@
-package Gtk2::Mdv::TextView;
+package Gtk3::Mdv::TextView;
#*****************************************************************************
#
# Copyright (c) 2002 Guillaume Cottenceau