aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-05-17 02:22:43 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-05-17 02:22:43 +0000
commit83e4bbc3b4c2bbcb1b8b0d8de08ddb47c4f3c850 (patch)
treed23f6ce851adf5d0ad3e7d7c1bee10059c709b3a
parent9002a2f4f0d8aa52d58f6a72009067c011a6f3fc (diff)
downloadrpmdrake-83e4bbc3b4c2bbcb1b8b0d8de08ddb47c4f3c850.tar
rpmdrake-83e4bbc3b4c2bbcb1b8b0d8de08ddb47c4f3c850.tar.gz
rpmdrake-83e4bbc3b4c2bbcb1b8b0d8de08ddb47c4f3c850.tar.bz2
rpmdrake-83e4bbc3b4c2bbcb1b8b0d8de08ddb47c4f3c850.tar.xz
rpmdrake-83e4bbc3b4c2bbcb1b8b0d8de08ddb47c4f3c850.zip
Gtk cleanup by Thierry Vignaud
-rwxr-xr-xrpmdrake4
-rw-r--r--rpmdrake.pm9
2 files changed, 8 insertions, 5 deletions
diff --git a/rpmdrake b/rpmdrake
index 8a7f515e..5cf473e3 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -575,6 +575,7 @@ sub run_treeview_dialog {
my (undef, $size_free) = MDK::Common::System::df('/usr');
$w = ugtk2->new(N("Rpmdrake"));
+ $::main_window = $w->{real_window};
my $is_locale_available = sub {
any { $urpm->{depslist}[$_]->flag_selected } keys %{$urpm->{provides}{$_[0]} || {}} and return 1;
@@ -612,6 +613,7 @@ sub run_treeview_dialog {
build_tree => sub {
my ($add_node, $flat, $mode) = @_;
my @elems;
+ gtkflush();
my $wait = wait_msg_(N("Please wait, listing packages..."));
if ($mode eq 'mandrake_choices') {
foreach my $pkg (keys %$pkgs) {
@@ -1114,7 +1116,7 @@ Is it ok to continue?",
my $status = Gtk2::Label->new;
my $checkbox_show_autoselect;
my ($menu, $factory) = create_factory_menu(
- $::isEmbedded ? $::Plug : $w->{rwindow},
+ $w->{real_window},
[ N("/_File"), undef, undef, undef, '<Branch>' ],
if_(
$MODE ne 'remove' && ! $>,
diff --git a/rpmdrake.pm b/rpmdrake.pm
index 488091d0..42cc6796 100644
--- a/rpmdrake.pm
+++ b/rpmdrake.pm
@@ -182,7 +182,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') if !$::isEmbedded;
+ $d->{rwindow}->set_position($options{transient} ? 'center_on_parent' : 'center_always');
$contents = formatAlaTeX($contents) unless $options{scroll}; #- because we'll use a WrappedLabel
gtkadd(
$d->{window},
@@ -297,8 +297,9 @@ 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') if !$::isEmbedded;
+ gtkflush();
+ my $mainw = ugtk2->new('Rpmdrake', 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(
$mainw->{window},
@@ -509,7 +510,7 @@ by Mandriva Linux Official Updates.")
), return '';
my $w = ugtk2->new('rpmdrake', grab => 1);
- $w->{rwindow}->set_position($options{transient} ? 'center_on_parent' : 'center_always') if !$::isEmbedded;
+ $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');