diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2005-01-12 12:28:37 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2005-01-12 12:28:37 +0000 |
commit | 0809402734eb9c4db7433dd6feb0dfefac448198 (patch) | |
tree | 1a3ad17ff2bdd2ce379cfa13c342cb91bb6860f6 | |
parent | c860f5bc65eaa88317469da8a19b8b1aa8583fa6 (diff) | |
download | control-center-0809402734eb9c4db7433dd6feb0dfefac448198.tar control-center-0809402734eb9c4db7433dd6feb0dfefac448198.tar.gz control-center-0809402734eb9c4db7433dd6feb0dfefac448198.tar.bz2 control-center-0809402734eb9c4db7433dd6feb0dfefac448198.tar.xz control-center-0809402734eb9c4db7433dd6feb0dfefac448198.zip |
add application_driven_menu flag that make mcc hide its menu bar and its banner
so that the embedded tool can display its own banner and its own menubar
this will be usefull especially for rpmdrake
-rwxr-xr-x | control-center | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/control-center b/control-center index 19ac16b5..ea6e7ac4 100755 --- a/control-center +++ b/control-center @@ -120,6 +120,9 @@ my $isParkRpmDrake = -e "/usr/sbin/park-rpmdrake"; my $isWebAdmin = -e "/usr/bin/mdkwebadmin"; my $isRfbDrake = -e "/usr/X11R6/bin/rfbdrake"; +my $application_driven_menu; + + # { key => { log_exp, binary, embedded?, description ] } # embedded meaning: -1 => not embedded, 0 => external x11 app, 1 => proper embedding my %programs = @@ -1264,6 +1267,7 @@ sub create_hidden_socket { Gtk2::HSeparator->new, ), 1, gtksignal_connect($emb_socket = Gtk2::Socket->new, 'plug-removed' => sub { + $menu->show if $application_driven_menu; $banner->destroy; child_just_exited(); })); @@ -1271,7 +1275,11 @@ sub create_hidden_socket { # signal emitted when embedded apps begin to draw: $emb_socket->signal_connect('plug-added' => sub { $banner_notebook->hide; - $banner->show; + if ($application_driven_menu) { + $menu->hide; + } else { + $banner->show; + } stop_wait_area(); $left_locked = 0; hide_buttons(); @@ -1313,6 +1321,7 @@ sub fork_ { sub compute_exec_string { my ($label, $box, $icon, $text, $tool) = @_; my ($exec, $gtkplug) = @$tool{qw(binary embedded)}; + $application_driven_menu = $tool->{application_driven_menu}; return if $tool_pids{$label}; if (! -x first(split /\s+/, $exec)) { splash_warning(N("cannot fork and exec \"%s\" since it is not executable", $exec)); |