[yast-commit] r51071 - in /trunk/printer/src: dialogs.ycp sharing.ycp
![](https://seccdn.libravatar.org/avatar/4b1b602021abbfa5a5994ab0ad90e8b7.jpg?s=120&d=mm&r=g)
Author: mzugec Date: Thu Sep 11 23:02:24 2008 New Revision: 51071 URL: http://svn.opensuse.org/viewcvs/yast?rev=51071&view=rev Log: handling enable/disable on sharing dialog Modified: trunk/printer/src/dialogs.ycp trunk/printer/src/sharing.ycp Modified: trunk/printer/src/dialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/printer/src/dialogs.ycp?rev=51071&r1=51070&r2=51071&view=diff ============================================================================== --- trunk/printer/src/dialogs.ycp (original) +++ trunk/printer/src/dialogs.ycp Thu Sep 11 23:02:24 2008 @@ -270,7 +270,8 @@ "SHARING" : $[ "widget" : `custom, "custom_widget" : widgetSharing, - "help" : HELPS["sharing_dialog"]:"" + "help" : HELPS["sharing_dialog"]:"", + "handle": handleSharing ], "OPERATIONPOLICY" : $[ "widget" : `custom, Modified: trunk/printer/src/sharing.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/printer/src/sharing.ycp?rev=51071&r1=51070&r2=51071&view=diff ============================================================================== --- trunk/printer/src/sharing.ycp (original) +++ trunk/printer/src/sharing.ycp Thu Sep 11 23:02:24 2008 @@ -72,7 +72,7 @@ ), `VSpacing( 1 ), `Left( `Label( _("Via network interfaces specified below") )), - `Table( `header( _("Interface"), + `Table( `id(`interface_table), `header( _("Interface"), _("Publish printers by default via this interface") ), [ `item( `id(0), "eth0", "no" ), @@ -86,7 +86,7 @@ ), `VSpacing( 1 ), `Left( `Label( _("For hosts / networks specified below") ) ), - `Table( `header( _("IP address"), + `Table( `id(`ip_table), `header( _("IP address"), _("Publish printers by default for this address") ), [ `item( `id(0), "192.168.100.1", "yes" ), @@ -105,7 +105,21 @@ `VSpacing( 1 ) ); - +symbol handleSharing(string key, map event){ + boolean share = (UI::QueryWidget(`deny_or_allow_remote_access, `CurrentButton)==`allow_remote_access_radio_button); + UI::ChangeWidget(`allow_local_network_access_check_box, `Enabled, share); + UI::ChangeWidget(`publish_to_local_network_check_box, `Enabled, share); + UI::ChangeWidget(`interface_table, `Enabled, share); + UI::ChangeWidget(`add_interface, `Enabled, share); + UI::ChangeWidget(`edit_interface, `Enabled, share); + UI::ChangeWidget(`delete_interface, `Enabled, share); + UI::ChangeWidget(`ip_table, `Enabled, share); + UI::ChangeWidget(`add_ip, `Enabled, share); + UI::ChangeWidget(`edit_ip, `Enabled, share); + UI::ChangeWidget(`delete_ip, `Enabled, share); +y2internal("event %1", event); + return nil; +} /* EOF */ } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
mzugec@svn.opensuse.org