[yast-commit] r63948 - in /trunk/fcoe-client/src: FcoeClient.ycp complex.ycp
Author: gs Date: Wed May 11 11:35:14 2011 New Revision: 63948 URL: http://svn.opensuse.org/viewcvs/yast?rev=63948&view=rev Log: store values from edit dialo Modified: trunk/fcoe-client/src/FcoeClient.ycp trunk/fcoe-client/src/complex.ycp Modified: trunk/fcoe-client/src/FcoeClient.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/fcoe-client/src/FcoeClient.ycp?rev=63948&r1=63947&r2=63948&view=diff ============================================================================== --- trunk/fcoe-client/src/FcoeClient.ycp (original) +++ trunk/fcoe-client/src/FcoeClient.ycp Wed May 11 11:35:14 2011 @@ -484,6 +484,11 @@ return network_interfaces; } +global list <string> GetCurrentNetworkCard() +{ + return (list <string>)network_interfaces[ current_card ]:[]; +} + global void SetNetworkCardsValue( integer row, list card ) { network_interfaces[row] = card; @@ -512,6 +517,14 @@ } // +// Set value in fcoe_general_config +// +global void SetFcoeConfigValue( string param, string value ) +{ + fcoe_general_config[ param ] = value; +} + +// // Returns the map containing general FCoE configuration // global map <string, string> GetFcoeConfig() Modified: trunk/fcoe-client/src/complex.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/fcoe-client/src/complex.ycp?rev=63948&r1=63947&r2=63948&view=diff ============================================================================== --- trunk/fcoe-client/src/complex.ycp (original) +++ trunk/fcoe-client/src/complex.ycp Wed May 11 11:35:14 2011 @@ -86,7 +86,8 @@ * Init **/ void InitServicesDialog (string id) { - + y2milestone( "Init services dialog" ); + map status_map = FcoeClient::GetServiceStatus(); if ( status_map["fcoe"]:false == true ) @@ -99,7 +100,6 @@ UI::ChangeWidget( `id( "fcoe_startup_auto" ), `Value, false ); UI::ChangeWidget( `id( "fcoe_startup_manual" ), `Value, true ); } - y2milestone( "Init services dialog" ); } // @@ -325,37 +325,49 @@ FcoeClient::SetServiceStatus( "fcoe", true ); y2milestone( "Setting auto start of FCoE to true"); } - // Check whether FCoE already running and start if required + // Check whether FCoE is already running and start if required integer status = Service::Status("fcoe"); if ( status != 0 ) { - Service::Start("fcoe"); - y2milestone( "Starting FCoE (/etc/init.d/fcoe start)"); + boolean success = Service::Start("fcoe"); + if ( success ) + { + y2milestone( "FCoE started (/etc/init.d/fcoe start)"); + } + else + { + y2error( "Cannot start FCoE service - '/etc/init.d/fcoe start' failed" ); + Popup::Error( "Cannot start FCoE service. +'/etc/init.d/fcoe start' failed" ); + } } else { - y2milestone( "FCoE running"); + y2milestone( "FCoE service is running"); } - - } -void StoreInterfacesDialog (string id, map event) { - y2milestone( "Store interfaces dialog" ); +void StoreInterfacesDialog (string id, map event) +{ + y2milestone( "Store interfaces dialog" ); } -void StoreConfigurationDialog (string id, map event) { - y2milestone( "Store configuration dialog" ); +void StoreConfigurationDialog (string id, map event) +{ + y2milestone( "Store configuration dialog" ); } -void StoreEditDialog (string id, map event) { - y2milestone( "Store edit dialog" ); - - string fcoe_enabled = (string)UI::QueryWidget( `id(`fcoe), `Value ); - string dcb_required = (string)UI::QueryWidget( `id(`dcb), `Value ); - - +void StoreEditDialog (string id, map event) +{ + y2milestone( "Store edit dialog" ); + list <string> card = FcoeClient::GetCurrentNetworkCard(); + string fcoe_enabled = (string)UI::QueryWidget( `id(`fcoe), `Value ); + card[4] = fcoe_enabled; + string dcb_required = (string)UI::QueryWidget( `id(`dcb), `Value ); + card[5] = dcb_required; + + FcoeClient::SetNetworkCardsValue( FcoeClient::current_card, card ); } /* EOF */ -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
gs@svn2.opensuse.org