[yast-commit] r49554 - in /trunk/ldap-server/src: LdapServer.pm dialogs.ycp tree_structure.ycp
Author: rhafer Date: Thu Jul 31 17:15:29 2008 New Revision: 49554 URL: http://svn.opensuse.org/viewcvs/yast?rev=49554&view=rev Log: Fixed firewall settings Modified: trunk/ldap-server/src/LdapServer.pm trunk/ldap-server/src/dialogs.ycp trunk/ldap-server/src/tree_structure.ycp Modified: trunk/ldap-server/src/LdapServer.pm URL: http://svn.opensuse.org/viewcvs/yast/trunk/ldap-server/src/LdapServer.pm?rev=49554&r1=49553&r2=49554&view=diff ============================================================================== --- trunk/ldap-server/src/LdapServer.pm (original) +++ trunk/ldap-server/src/LdapServer.pm Thu Jul 31 17:15:29 2008 @@ -26,6 +26,7 @@ our %TYPEINFO; YaST::YCP::Import ("Progress"); +YaST::YCP::Import ("SuSEFirewall"); YaST::YCP::Import ("Service"); my %error = ( msg => undef, details => undef ); @@ -141,6 +142,7 @@ sub Read { y2milestone(""); + SuSEFirewall->Read(); my $progressItems = [ "Reading Startup Configuration", "Reading Configuration Backend", "Reading Configuration Data" ]; @@ -346,7 +348,7 @@ { SCR->Write('.sysconfig.openldap.OPENLDAP_START_LDAPS', 'no'); } - + SuSEFirewall->Write(); my $wasEnabled = Service->Enabled("ldap"); if ( !$wasEnabled && $serviceEnabled ) { @@ -475,6 +477,7 @@ return 0; } Progress->Finish(); + SuSEFirewall->Write(); } else { my $wasEnabled = Service->Enabled("ldap"); if ( $wasEnabled && !$serviceEnabled ) @@ -519,6 +522,7 @@ SCR->Write('.sysconfig.openldap.OPENLDAP_START_LDAPS', 'no'); } + SuSEFirewall->Write(); if( ! SCR->Execute('.ldapserver.commitChanges' ) ) { my $err = SCR->Error(".ldapserver"); Modified: trunk/ldap-server/src/dialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/ldap-server/src/dialogs.ycp?rev=49554&r1=49553&r2=49554&view=diff ============================================================================== --- trunk/ldap-server/src/dialogs.ycp (original) +++ trunk/ldap-server/src/dialogs.ycp Thu Jul 31 17:15:29 2008 @@ -184,7 +184,9 @@ `VBox( `Frame( _("Firewall Settings"), `VBox( - fw_widget["custom_widget"]:`Empty(), + `ReplacePoint( `id( `rp_firewall ), + `Empty() + ), `HStretch() ) ) @@ -201,8 +203,12 @@ map<string, any> firewall_widget = CWMFirewallInterfaces::CreateOpenFirewallWidget (firewall_settings); - Wizard::SetContentsButtons( caption, dlg_service_initial, HELPS["service_dialog"]:"help not found", - Label::BackButton(), Label::NextButton() ); + Wizard::SetContentsButtons( caption, dlg_service_initial, HELPS["service_dialog"]:"help not found", Label::BackButton(), Label::NextButton() ); + + UI::ReplaceWidget(`rp_firewall, + firewall_widget["custom_widget"]:`Empty() + ); + CWMFirewallInterfaces::OpenFirewallInit (firewall_widget, ""); if( (boolean)defaults["serviceEnabled"]:true ) { @@ -213,7 +219,6 @@ UI::ChangeWidget( `cb_register_slp, `Enabled, false ); } - CWMFirewallInterfaces::OpenFirewallInit (firewall_widget, ""); any ret = nil; map event = $[]; while( true ) @@ -447,12 +452,21 @@ callHandler( current_tree_item, "cb_read" ); rebuild_widget_tree = false; } - ret = UI::UserInput(); + map event = UI::WaitForEvent(); + ret = event["ID"]:nil; y2milestone( "TreeDialog: seeing return value %1", ret ); + if( is( ret, string ) || ret == `wizardTree ) { string new_item = Wizard::QueryTreeItem(); + // workaround to catch changes in the firewall widget + if ( is( ret, string) && ( issubstring( (string)ret, "firewall" ) ) ) + { + CWMFirewallInterfaces::OpenFirewallHandle (fw_widget, "", event); + continue; + } + //check values of current tree item y2milestone( "wizard-->current item is %1", current_tree_item ); Modified: trunk/ldap-server/src/tree_structure.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/ldap-server/src/tree_structure.ycp?rev=49554&r1=49553&r2=49554&view=diff ============================================================================== --- trunk/ldap-server/src/tree_structure.ycp (original) +++ trunk/ldap-server/src/tree_structure.ycp Thu Jul 31 17:15:29 2008 @@ -85,6 +85,7 @@ ``{ y2milestone("calling read handler for item \"daemon\""); boolean enabled = LdapServer::ReadServiceEnabled(); + CWMFirewallInterfaces::OpenFirewallInit (fw_widget, ""); if ( enabled ) { UI::ChangeWidget( `rb_service_enable, `CurrentButton, `rb_yes ); @@ -146,6 +147,7 @@ y2milestone("calling write handler for item \"daemon\""); symbol serviceEnabled = (symbol)UI::QueryWidget(`id(`rb_service_enable), `CurrentButton); + CWMFirewallInterfaces::OpenFirewallStore (fw_widget, "", $[]); if ( serviceEnabled == `rb_yes ) { LdapServer::SetServiceEnabled( true ); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
rhafer@svn.opensuse.org