From 1b1a0a4434e2eb4adadd651d5ca3b55a0bcb444c Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Thu, 6 Sep 2012 17:28:54 +0000 Subject: drop support for Enterprise media (mga#6292) --- mgaapplet | 52 ++-------------------------------------------------- 1 file changed, 2 insertions(+), 50 deletions(-) (limited to 'mgaapplet') diff --git a/mgaapplet b/mgaapplet index dbf31fff..2ed974bd 100755 --- a/mgaapplet +++ b/mgaapplet @@ -156,11 +156,6 @@ my %state = ( menu => [ 'check' ], tt => [ N_("No medium found. You must add some media through 'Software Media Manager'.") ], }, - no_enterprise_update_medium => { - colour => [ 'noconf' ], - menu => [ 'add_enterprise_update_medium' , 'check' ], - tt => [ N("An additional package medium is available for your distribution.") ] - }, no_enabled_medium => { colour => [ 'noconf' ], menu => [ 'check' ], @@ -214,17 +209,11 @@ my %comm_codes = ( status => 'unconfigured_restricted_media', log => "Missing restricted media\n", }, - no_enterprise_update_medium => { - code => 10, - status => 'no_enterprise_update_medium', - log => "Missing enterprise update media\n", - }, ); my %actions = ( 'update' => { name => N("Install updates"), launch => \&installUpdates }, 'add_restricted_media' => { name => N("Add additional package medium"), launch => \&prepare_add_restricted }, - 'add_enterprise_update_medium' => { name => N("Add additional package medium"), launch => \&prepare_add_enterprise_update_media }, 'check' => { name => N("Check Updates"), launch => \&checkUpdates }, 'confNetwork' => { name => N("Configure Network"), launch => \&configNetwork }, 'upgrade_distro' => { name => N("Upgrade the system"), launch => \&upgrade }, @@ -240,7 +229,6 @@ $icon->signal_connect(activate => sub { my %click_actions = ( unconfigured_restricted_media => \&prepare_add_restricted, no_update_medium => \&add_media, - no_enterprise_update_medium => \&prepare_add_enterprise_update_media, no_enabled_medium => \&add_media, updates => \&installUpdates, new_distribution => \&upgrade, @@ -376,7 +364,7 @@ sub process_state { $locked_count = 0; } - # busy critical delayed disabled disconnected locked loop_locked new_distribution no_enabled_medium no_enterprise_update_medium no_more_supported no_update_medium notsupported okay unconfigured_restricted_media update + # busy critical delayed disabled disconnected locked loop_locked new_distribution no_enabled_medium no_more_supported no_update_medium notsupported okay unconfigured_restricted_media update if (!member($sub_state, qw(okay))) { go2State($sub_state); } elsif ($no_more_supported @@ -770,11 +758,7 @@ sub silentCheck() { } if (!@update_medias) { - if (is_enterprise_media_supported()) { - checker_exit('no_enterprise_update_medium'); - } else { - checker_exit('no_update_medium'); - } + checker_exit('no_update_medium'); } elsif (!any { ! $_->{ignore} } @update_medias) { checker_exit('no_enabled_medium'); } @@ -928,8 +912,6 @@ sub setState { $bubble->add_action('clicked', N("Install updates"), \&installUpdates); } elsif ($state eq 'unconfigured_restricted_media') { $bubble->add_action('clicked', N("More Information"), \&prepare_add_restricted); - } elsif ($state eq 'no_enterprise_update_medium') { - $bubble->add_action('clicked', N("More Information"), \&prepare_add_enterprise_update_media); } elsif (member($state, qw(no_enabled_medium no_update_medium))) { $bubble->add_action('clicked', N("Add media"), \&add_media); } @@ -1019,33 +1001,3 @@ sub prepare_add_restricted() { $local_config{DO_NOT_ASK_FOR_RESTRICTED} = bool2text($warn_me); $res ? really_prepare_add_restricted() : 0; } - - -sub really_prepare_add_enterprise() { - $mdv_update_pid = run_program::raw( - { detach => 1 }, - 'mgaapplet-add-media-helper', - join('', @$product_id{qw(type product version)}) - ); -} - -sub prepare_add_enterprise_update_media() { - my $warn_me = text2bool($local_config{DO_NOT_ASK_FOR_ENTERPRISE_UPDATE_MEDIA}); - return if $warn_me; - my $w = new_portable_dialog(N("New medium available")); - my $res = - fill_n_run_portable_dialog( - $w, - [ - get_banner(N("New medium available")), - gtknew('Label_Left', text => - N("You use '%s' distribution and therefore have privileged access to additional software.", - N_("Mageia Enterprise Server")) . "\n\n" . - N("Do you want to install this additional software repository?"), @common), - gtknew('CheckButton', text => N("Do not ask me next time"), active_ref => \$warn_me), - create_okcancel($w, N("Next"), N("Cancel")), - ]); - setVar('DO_NOT_ASK_FOR_ENTERPRISE_UPDATE_MEDIA', bool2text($warn_me)); - $local_config{DO_NOT_ASK_FOR_ENTERPRISE_UPDATE_MEDIA} = bool2text($warn_me); - $res ? really_prepare_add_enterprise() : 0; -} -- cgit v1.2.1