diff options
-rwxr-xr-x | edit-urpm-sources.pl | 2 | ||||
-rwxr-xr-x | rpmdrake | 2 | ||||
-rw-r--r-- | rpmdrake.pm | 12 | ||||
-rw-r--r-- | rpmdrake.spec | 3 |
4 files changed, 13 insertions, 6 deletions
diff --git a/edit-urpm-sources.pl b/edit-urpm-sources.pl index 6b80e3da..af0e2883 100755 --- a/edit-urpm-sources.pl +++ b/edit-urpm-sources.pl @@ -78,7 +78,7 @@ sub add_callback { if_($info->{dirsel}, 0, gtksignal_connect(Gtk2::Button->new(but(N("Browse..."))), clicked => sub { $info->{url_entry}->set_text(ask_dir()) })), if_($info->{securitysel}, 0, gtksignal_connect(Gtk2::Button->new(but(N("Choose a mirror..."))), - clicked => sub { my $m = choose_mirror(); + clicked => sub { my $m = choose_mirror(transient => $w->{rwindow}); if ($m) { $info->{url_entry}->set_text(make_url_mirror($m)); $info->{hdlist_entry}->set_text('../base/hdlist.cz'); @@ -971,7 +971,7 @@ Then, restart MandrakeUpdate.")); myexit(-1); } mu_retry_another_mirror: - my $m = choose_mirror(); + my $m = choose_mirror(if_(exists $w->{rwindow}, transient => $w->{rwindow})); $m or interactive_msg_(N("How to choose manually your mirror"), N("You may also choose your desired mirror manually: to do so, launch the Software Media Manager, and then add a `Security diff --git a/rpmdrake.pm b/rpmdrake.pm index c7487df0..8232ce76 100644 --- a/rpmdrake.pm +++ b/rpmdrake.pm @@ -106,6 +106,7 @@ sub writeconf { sub interactive_msg { my ($title, $contents, %options) = @_; my $d = ugtk2->new($title, grab => 1, if_(exists $options{transient}, transient => $options{transient})); + $d->{rwindow}->set_position($options{transient} ? 'center_on_parent' : 'center_always'); gtkadd($d->{window}, gtkpack_(Gtk2::VBox->new(0,5), 1, $options{scroll} ? gtkadd(gtkset_shadow_type(Gtk2::Frame->new, 'in'), @@ -130,6 +131,7 @@ sub interactive_packtable { my ($title, $parent_window, $top_label, $lines, $action_buttons) = @_; my $w = ugtk2->new($title, grab => 1, transient => $parent_window); + $w->{rwindow}->set_position('center_on_parent'); my $packtable = create_packtable({}, @$lines); gtkadd($w->{window}, @@ -149,6 +151,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})); + $d->{rwindow}->set_position($options{transient} ? 'center_on_parent' : 'center_always'); my @radios = gtkradio('', @$list); my $vbradios = $callback ? create_packtable({}, mapn { my $n = $_[1]; @@ -178,10 +181,10 @@ sub fatal_msg { sub wait_msg { my ($msg, %options) = @_; my $mainw = ugtk2->new('rpmdrake', grab => 1, if_(exists $options{transient}, transient => $options{transient})); + $mainw->{rwindow}->set_position($options{transient} ? 'center_on_parent' : 'center_always'); my $label = ref($msg) =~ /^Gtk/ ? $msg : Gtk2::Label->new($msg); gtkadd($mainw->{window}, gtkpack__(gtkadd(Gtk2::VBox->new(0, 5), $label, if_(exists $options{widgets}, @{$options{widgets}})))); $label->signal_connect(expose_event => sub { $mainw->{displayed} = 1; 0 }); - $mainw->{rwindow}->set_position('center_always'); $mainw->sync until $mainw->{displayed}; gtkset_mousecursor_wait($mainw->{rwindow}->window); $mainw->flush; @@ -297,6 +300,7 @@ sub mirrors { } sub choose_mirror { + my (%options) = @_; interactive_msg('', N("I need to contact MandrakeSoft website to get the mirrors list. Please check that your network is currently running. @@ -325,6 +329,7 @@ the case when the architecture of your processor is not supported by Mandrake Linux Official Updates.")), return ''; my $w = ugtk2->new('rpmdrake', grab => 1); + $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); $tree->get_selection->set_mode('browse'); @@ -434,8 +439,9 @@ sub update_sources_check { } sub update_sources_interactive { - my ($urpm, %opts) = @_; - my $w = ugtk2->new(N("Update media"), grab => 1, center => 1, %opts); + my ($urpm, %options) = @_; + my $w = ugtk2->new(N("Update media"), grab => 1, center => 1, %options); + $w->{rwindow}->set_position($options{transient} ? 'center_on_parent' : 'center_always'); my @buttons; my @media; gtkadd($w->{window}, diff --git a/rpmdrake.spec b/rpmdrake.spec index 72aec928..d77c5f9d 100644 --- a/rpmdrake.spec +++ b/rpmdrake.spec @@ -117,9 +117,10 @@ rm -rf $RPM_BUILD_ROOT %{_sbindir}/park-rpmdrake %changelog -* Mon Feb 9 2004 Guillaume Cottenceau <gc@mandrakesoft.com> 2.1.2-3mdk +* Wed Feb 11 2004 Guillaume Cottenceau <gc@mandrakesoft.com> 2.1.2-3mdk - some #7472-alike progressbar sizing fixes - menu: specify that gurpmi.addmedia handles application/x-urpmi-media +- fix #7425: center-always or center-on-parent popup windows * Wed Jan 21 2004 Guillaume Cottenceau <gc@mandrakesoft.com> 2.1.2-2mdk - remove unneeded stuff from grpmi/po/*.po |