[yast-commit] r63898 - in /trunk/fcoe-client/src: FcoeClient.ycp complex.ycp wizards.ycp
Author: gs Date: Wed May 4 12:05:21 2011 New Revision: 63898 URL: http://svn.opensuse.org/viewcvs/yast?rev=63898&view=rev Log: init edit dialog Modified: trunk/fcoe-client/src/FcoeClient.ycp trunk/fcoe-client/src/complex.ycp trunk/fcoe-client/src/wizards.ycp Modified: trunk/fcoe-client/src/FcoeClient.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/fcoe-client/src/FcoeClient.ycp?rev=63898&r1=63897&r2=63898&view=diff ============================================================================== --- trunk/fcoe-client/src/FcoeClient.ycp (original) +++ trunk/fcoe-client/src/FcoeClient.ycp Wed May 4 12:05:21 2011 @@ -129,6 +129,8 @@ // Define all the variables necessary to hold +global integer current_card = 0; // currently selected card, means row in list of cards + global string NOT_CONFIGURED = "not configured"; // map containing information about networks cards and VLAN, FCoE aand DCB status @@ -204,11 +206,11 @@ foreach( string line, (list<string>)lines, { if ( regexpmatch( line, "^FCOE_ENABLE" ) ) { - status_map = add( status_map, "FCOE_ENABLE", substring( line, 12 ) ); + status_map = add( status_map, "FCOE_ENABLE", deletechars( substring(line, 12), "\"") ); } if ( regexpmatch( line, "^DCB_REQUIRED" ) ) { - status_map = add( status_map, "DCB_REQUIRED", substring( line, 13 ) ); + status_map = add( status_map, "DCB_REQUIRED", deletechars( substring( line, 13 ),"\"") ); } }); } Modified: trunk/fcoe-client/src/complex.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/fcoe-client/src/complex.ycp?rev=63898&r1=63897&r2=63898&view=diff ============================================================================== --- trunk/fcoe-client/src/complex.ycp (original) +++ trunk/fcoe-client/src/complex.ycp Wed May 4 12:05:21 2011 @@ -142,6 +142,7 @@ UI::ChangeWidget( `id(`interfaces), `Items, table_items ); UI::ChangeWidget( `id(`interfaces), `CurrentItem, `id(0) ); + FcoeClient::current_card = 0; AdjustButtons(); } @@ -175,7 +176,21 @@ y2error( "Cannot read /etc/fcoe/config"); } } - + +// +// InitEditDialog +// +void InitEditDialog( string id ) +{ + y2milestone( "Init edit dialog" ); + map <integer, list> cards = FcoeClient::GetNetworkCards(); + list card = cards[ FcoeClient::current_card ]:[]; + + // set values for 'FCoE Enabled' and 'DCB Required' + UI::ChangeWidget( `id(`fcoe), `Value, card[4]:"" ); + UI::ChangeWidget( `id(`dcb), `Value, card[5]:"" ); +} + /** * Handle **/ @@ -198,6 +213,7 @@ } else if ( action == `interfaces ) { + FcoeClient::current_card = (integer)UI::QueryWidget( `id(`interfaces), `CurrentItem ); AdjustButtons(); } else if ( action == `create ) @@ -227,6 +243,12 @@ return nil; } +symbol HandleEditDialog( string id, map event ) +{ + any action = event["ID"]:nil; + return nil; +} + /** * Store **/ @@ -243,5 +265,9 @@ y2milestone( "Store configuration dialog" ); } +void StoreEditDialog (string id, map event) { + y2milestone( "Store edit dialog" ); +} + /* EOF */ } Modified: trunk/fcoe-client/src/wizards.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/fcoe-client/src/wizards.ycp?rev=63898&r1=63897&r2=63898&view=diff ============================================================================== --- trunk/fcoe-client/src/wizards.ycp (original) +++ trunk/fcoe-client/src/wizards.ycp Wed May 4 12:05:21 2011 @@ -144,7 +144,10 @@ "edit" : $[ "widget": `custom, "custom_widget": EditDialogContents(), - "help" : HELPS["change"]:"" + "help" : HELPS["change"]:"", + "init" : InitEditDialog, + "handle" : HandleEditDialog, + "store" : StoreEditDialog, ] ]; @@ -156,7 +159,7 @@ Wizard::SetContentsButtons( caption, contents, - "", // help HELP["edit"] + "", // help HELP["change"] Label::BackButton(), Label::NextButton()); -- 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