Mailing Lists
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2023
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
List overview
Download
YaST Commits
September 2011
----- 2023 -----
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
yast-commit@lists.opensuse.org
21 participants
701 discussions
Start a n
N
ew thread
[yast-commit] r66190 - /branches/tmp/lslezak/sound/sound/src/joy_dialog.ycp
by lslezak@svn2.opensuse.org
30 Sep '11
30 Sep '11
Author: lslezak Date: Fri Sep 30 14:29:10 2011 New Revision: 66190 URL:
http://svn.opensuse.org/viewcvs/yast?rev=66190&view=rev
Log: gameport joysticks - display the sound card to which it is connected Modified: branches/tmp/lslezak/sound/sound/src/joy_dialog.ycp Modified: branches/tmp/lslezak/sound/sound/src/joy_dialog.ycp URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/lslezak/sound/sound/src/j…
============================================================================== --- branches/tmp/lslezak/sound/sound/src/joy_dialog.ycp (original) +++ branches/tmp/lslezak/sound/sound/src/joy_dialog.ycp Fri Sep 30 14:29:10 2011 @@ -492,9 +492,6 @@ // label above list of joystick types `SelectionBox(`id(`os), _("&Select your joystick type:"), boxitems), - `HSpacing(3), - // button label - `PushButton(`id(`test), `opt(`key_F6), _("&Test")), `HSpacing(3) ), `VSpacing(3) @@ -530,18 +527,6 @@ ")); s = `skip; } - - if (s == `test) - { - integer idx = (integer) UI::QueryWidget(`id(`os), `CurrentItem); - string joymod = joylist[idx,0]:""; - if (joymod == "") - // error message (no joystick selected) - Popup::Message(_("Select the joystick to test.")); - else if (Package::InstallAll(["input-utils"])) - joy_test_popup (card_id, idx, joymod); - } - } while (!contains([`next, `back, `abort, `cancel], s)); if (s == `next) @@ -597,6 +582,7 @@ list<map<string,any> > content = []; foreach(map js, Joystick::Detected(), { + y2milestone("Addind joystick: %1", js); string device = js["dev_name2"]:""; string model = js["model"]:""; list<string> descr = []; @@ -611,9 +597,25 @@ descr = add(descr, sformat(_("Number of buttons: %1"), js["detail","buttons"]:0)); } + string bus = js["bus"]:""; + + if (bus == "Gameport" && size(js["parent_unique_key"]:"") > 0) + { + list<map> soundcards = (list<map>)SCR::Read(.probe.sound); + string unique_id = js["parent_unique_key"]:""; + + map card = find(map c, soundcards, {return c["unique_key"]:"" == unique_id;}); + + if (card != nil) + { + // joystick details, %1 is the sound card name to which is the joystick connected + bus = sformat("%1 (%2)", bus, card["model"]:""); + } + } + map<string,any> j = $[ "id" : device, - "table_descr" : [ js["model"]:"", device, js["bus"]:"" ], + "table_descr" : [ js["model"]:"", device, bus ], "rich_descr" : WizardHW::CreateRichTextDescription(model, descr) ]; @@ -830,7 +832,7 @@ { list<list> extra_buttons = [ // menu item - [`test, _("&Test...")], + [`test, _("&Test selected joystick...")], ]; // dialog title @@ -924,7 +926,7 @@ } } - y2internal("Joystick overview result: %1", ret); + y2milestone("Joystick overview result: %1", ret); return ret; } -- To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
0
0
[yast-commit] r66189 - in /trunk/apparmor: package/yast2-apparmor.changes src/clients/AA_EditProfile.ycp src/clients/apparmor.ycp src/include/apparmor/aa-config.ycp src/include/apparmor/profile_dialogs.ycp
by jsrain@svn2.opensuse.org
30 Sep '11
30 Sep '11
Author: jsrain Date: Fri Sep 30 13:53:18 2011 New Revision: 66189 URL:
http://svn.opensuse.org/viewcvs/yast?rev=66189&view=rev
Log: disabled Reports part due to changes in AppArmor merged editation and deleting of a profile Modified: trunk/apparmor/package/yast2-apparmor.changes trunk/apparmor/src/clients/AA_EditProfile.ycp trunk/apparmor/src/clients/apparmor.ycp trunk/apparmor/src/include/apparmor/aa-config.ycp trunk/apparmor/src/include/apparmor/profile_dialogs.ycp Modified: trunk/apparmor/package/yast2-apparmor.changes URL:
http://svn.opensuse.org/viewcvs/yast/trunk/apparmor/package/yast2-apparmor.…
============================================================================== --- trunk/apparmor/package/yast2-apparmor.changes (original) +++ trunk/apparmor/package/yast2-apparmor.changes Fri Sep 30 13:53:18 2011 @@ -1,5 +1,5 @@ ------------------------------------------------------------------- -Thu Sep 29 12:42:55 UTC 2011 - jsrain@site +Fri Sep 30 11:57:42 UTC 2011 - jsrain@site - fixed enabling/disabling apparmor - fixed setting notifications (and enabling aaeventsd as part of @@ -9,6 +9,8 @@ - don't close the module after running a report (bnc#531512) - run the dialog to select application for profiling without pop-up (bnc#531512) +- disabled Reports part due to changes in AppArmor +- merged editation and deleting of a profile ------------------------------------------------------------------- Thu Sep 22 12:42:09 UTC 2011 - jreidinger(a)suse.com Modified: trunk/apparmor/src/clients/AA_EditProfile.ycp URL:
http://svn.opensuse.org/viewcvs/yast/trunk/apparmor/src/clients/AA_EditProf…
============================================================================== --- trunk/apparmor/src/clients/AA_EditProfile.ycp (original) +++ trunk/apparmor/src/clients/AA_EditProfile.ycp Fri Sep 30 13:53:18 2011 @@ -19,34 +19,44 @@ // Globalz +map profiles = nil; + +define any Reread() { + profiles = (map) SCR::Read (.apparmor_profiles, "all"); + return `next; +} define any MainSequence() ``{ // // Read the profiles from the SCR agent - map profiles = (map) SCR::Read (.apparmor_profiles, "all"); + Reread(); map aliases = $[ "showProfile" : ``(DisplayProfileForm(Settings["CURRENT_PROFILE"]:"", false)), "showHat" : ``(DisplayProfileForm(Settings["CURRENT_HAT"]:"", true)), "chooseProfile" : ``(SelectProfileForm(profiles, _("Please make a selection from the listed profiles and press Next to edit the profile."), _("Edit Profile - Choose profile to edit"), "apparmor_edit_profile" )), - + "reread" : ``(Reread()), ]; map sequence = $[ "ws_start" : "chooseProfile", "chooseProfile" : $[ `abort : `abort, - `next : "showProfile", - `finish : `next, + `edit : "showProfile", + `reread : "reread", + `next : `next, ], "showProfile" : $[ `abort : `abort, - `next : `ws_finish, + `next : "reread", `showhat : "showHat", `finish : `next, ], + "reread" : $[ + `next : "chooseProfile", + ], "showHat" : $[ `abort : `abort, `next : "showProfile", Modified: trunk/apparmor/src/clients/apparmor.ycp URL:
http://svn.opensuse.org/viewcvs/yast/trunk/apparmor/src/clients/apparmor.yc…
============================================================================== --- trunk/apparmor/src/clients/apparmor.ycp (original) +++ trunk/apparmor/src/clients/apparmor.ycp Fri Sep 30 13:53:18 2011 @@ -29,10 +29,12 @@ `item(`id("apparmor-settings"), _("Settings"), true), `item(`id("GenProf"), _("Generate Profile")), `item(`id("LogProf"), _("Update Profile")), - `item(`id("AA_Report"), _("Reports")), - `item(`id("AA_EditProfile"), _("Edit Profile")), - `item(`id("AA_AddProfile"), _("Add Manually Profile")), - `item(`id("AA_DeleteProfile"), _("Delete Profile")) +// disabled, since aa-eventd was removed from main AA package +// and so was Reports.pm +// `item(`id("AA_Report"), _("Reports")), + `item(`id("AA_EditProfile"), _("Manage Existing Profiles")), + `item(`id("AA_AddProfile"), _("Add Manually Profile"))//, +// merged with EditProfile `item(`id("AA_DeleteProfile"), _("Delete Profile")) ]), `VSpacing(3) ), Modified: trunk/apparmor/src/include/apparmor/aa-config.ycp URL:
http://svn.opensuse.org/viewcvs/yast/trunk/apparmor/src/include/apparmor/aa…
============================================================================== --- trunk/apparmor/src/include/apparmor/aa-config.ycp (original) +++ trunk/apparmor/src/include/apparmor/aa-config.ycp Fri Sep 30 13:53:18 2011 @@ -341,7 +341,8 @@ `HSpacing( `opt(`hstretch), 4 ), `VBox( `VSpacing(1), - `Frame ( _("Security Event Notification"), +// event notification disabled due to changes in AppArmor +/* `Frame ( _("Security Event Notification"), `HBox( `VSpacing(1), `HSpacing(1), `HVCenter( `Label( `id(`notifyLabel), evEnStr )), @@ -350,7 +351,7 @@ ) ), `VSpacing(1), `HSpacing(20), - +*/ `Frame ( _("Configure Profile Modes"), `HBox( `VSpacing(1), `HSpacing(1), Modified: trunk/apparmor/src/include/apparmor/profile_dialogs.ycp URL:
http://svn.opensuse.org/viewcvs/yast/trunk/apparmor/src/include/apparmor/pr…
============================================================================== --- trunk/apparmor/src/include/apparmor/profile_dialogs.ycp (original) +++ trunk/apparmor/src/include/apparmor/profile_dialogs.ycp Fri Sep 30 13:53:18 2011 @@ -1088,6 +1088,10 @@ // Settings["PROFILE_MAP"]: map containing the profile // define symbol SelectProfileForm( map profiles, string formhelp, string formtitle, string iconname ) { + // TODO switch to variable in a module + // TODO plain reread does not work here + SCR::UnmountAgent (.apparmor_profiles); + profiles = (map) SCR::Read (.apparmor_profiles, "all"); list<term> profilelisting = []; integer indx = 0; foreach( string p, any ignore, (map<string,any>) profiles, { @@ -1099,8 +1103,14 @@ `VBox( `VSpacing(2), `SelectionBox( `id(`profilelist), `opt(`notify), _("Profile Name"), profilelisting ), - `VSpacing(3) - ); + `VSpacing(3), + `HBox ( + `PushButton (`id (`edit), Label::EditButton()), + `PushButton (`id (`delete), Label::DeleteButton()), + `HStretch() + ) + + ); // // Create the Dialog Window and parse user input @@ -1116,8 +1126,8 @@ { event = UI::WaitForEvent( timeout_millisec ); id = event["ID"]:nil; // We'll need this often - cache it - if ( id == `next || id == `profilelist ) { - profilename = tostring( UI::QueryWidget(`id(`profilelist), `CurrentItem) ); + profilename = tostring( UI::QueryWidget(`id(`profilelist), `CurrentItem) ); + if ( id == `edit ) { if ( profilename != nil && profilename != "" ) { break; } else { @@ -1125,6 +1135,18 @@ continue; } } // TODO ELSE POPUP NO ENTRY SELECTED ERROR + else if ( id == `delete ) { + if (Popup::YesNoHeadline( _("Delete profile confirmation"), + _("Are you sure you want to delete the profile ") + profilename + + _(" ?\nAfter this operation the AppArmor module will reload the profile set.") ) ) + { + y2milestone("Deleted " + profilename ); + boolean result = SCR::Write(.apparmor_profiles.delete, profilename); + any result2 = SCR::Write(.apparmor_profiles.reload, "-"); + } + id = `reread; + break; + } if(id == `abort || id == `cancel) { break; } else if(id == `back) { @@ -1134,10 +1156,9 @@ continue; } } - if ( id == `next || id == `profilelist) { + if ( id == `edit ) { Settings["CURRENT_PROFILE"] = profilename; Settings["PROFILE_MAP"] = profiles[profilename]:nil; - id = `next; } UI::CloseDialog(); return (symbol) id; -- To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
0
0
[yast-commit] r66188 - /trunk/devtools/package/yast2-devtools.changes
by visnov@svn2.opensuse.org
30 Sep '11
30 Sep '11
Author: visnov Date: Fri Sep 30 12:26:48 2011 New Revision: 66188 URL:
http://svn.opensuse.org/viewcvs/yast?rev=66188&view=rev
Log: changelog Modified: trunk/devtools/package/yast2-devtools.changes Modified: trunk/devtools/package/yast2-devtools.changes URL:
http://svn.opensuse.org/viewcvs/yast/trunk/devtools/package/yast2-devtools.…
============================================================================== --- trunk/devtools/package/yast2-devtools.changes (original) +++ trunk/devtools/package/yast2-devtools.changes Fri Sep 30 12:26:48 2011 @@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Fri Sep 30 12:26:20 CEST 2011 - visnov(a)suse.cz + +- added 'y2tool obssync' + +------------------------------------------------------------------- Tue Sep 27 11:23:22 CEST 2011 - visnov(a)suse.cz - dropped all-packages and devel-packages lists -- To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
0
0
[yast-commit] r66187 - /trunk/devtools/devtools/bin/obssync
by visnov@svn2.opensuse.org
30 Sep '11
30 Sep '11
Author: visnov Date: Fri Sep 30 12:25:31 2011 New Revision: 66187 URL:
http://svn.opensuse.org/viewcvs/yast?rev=66187&view=rev
Log: Added y2tool obssync tool - to sync all changed packages from YaST:Head to other projects, typically openSUSE:Factory Added: trunk/devtools/devtools/bin/obssync (with props) Added: trunk/devtools/devtools/bin/obssync URL:
http://svn.opensuse.org/viewcvs/yast/trunk/devtools/devtools/bin/obssync?re…
============================================================================== --- trunk/devtools/devtools/bin/obssync (added) +++ trunk/devtools/devtools/bin/obssync Fri Sep 30 12:25:31 2011 @@ -0,0 +1,84 @@ +#!/bin/bash + +##### +#Usage: +# obssync [<OBS_Project>] +# +##### + +printhelp() +{ + echo "Usage: $0 <target-project>" + echo + echo "Synchronize changes from YaST:Head to target project. To synchronize with factory, use" + echo " $0 openSUSE:Factory" + echo + echo "OPTIONS:" + echo " -h, --help this message" + echo " -a, --api OBS API server" +} + +APIHOST=api.opensuse.org +TARGET_PROJECT="" + +# parse parameters +TEMP=`/usr/bin/getopt -o ha: --long help,api: \ + -n 'obssync' -- "$@"` + +# Note the quotes around `$TEMP': they are essential! +eval set -- "$TEMP" + +while true ; do + case "$1" in + -h|--help) printhelp; exit 0 ;; + -a|--api) APIHOST=$2; shift 2 ;; + --) shift ; TARGET_PROJECT=$1 ; break;; + *) echo "Unrecognized option $1" ; exit 1 ;; + # IMPORTANT: Remember to change that "getopt" call above, too + # if you change anything here! + esac +done + +if [ -z "$TARGET_PROJECT" ]; then + echo "Target project missing" + exit 1 +fi + +DEVEL_PROJECT="YaST:Head" +MESSAGE="Sync packages from YaST:Head devel project to $TARGET_PROJECT (using $APIHOST)" + +echo $MESSAGE +echo "Generating list of candidates..." + +PACKAGES=`osc -A https://$APIHOST list $DEVEL_PROJECT` + +TO_SUBMIT="" + +for package in $PACKAGES; do + + osc -A https://$APIHOST rdiff $DEVEL_PROJECT $package $TARGET_PROJECT | grep \\.changes + + if [ $? -eq 0 ]; then + echo "Changes in $package" + TO_SUBMIT="$TO_SUBMIT $package" + else + echo "Skipping $package" + fi + +done + +echo "Summary:" +echo "========" +echo "$TO_SUBMIT" +echo + +echo -n "Press ENTER to continue" + +read + +for package in $TO_SUBMIT; do + echo -n "$package: " + osc -A https://$APIHOST sr -m "$MESSAGE" $DEVEL_PROJECT $package $TARGET_PROJECT +done + +echo "Done" -- To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
0
0
[yast-commit] r66186 - /branches/tmp/lslezak/sound/sound/src/joy_dialog.ycp
by lslezak@svn2.opensuse.org
30 Sep '11
30 Sep '11
Author: lslezak Date: Fri Sep 30 11:39:07 2011 New Revision: 66186 URL:
http://svn.opensuse.org/viewcvs/yast?rev=66186&view=rev
Log: jousticks - check for uncofigured sound cards with gameport when pressing [Add] Modified: branches/tmp/lslezak/sound/sound/src/joy_dialog.ycp Modified: branches/tmp/lslezak/sound/sound/src/joy_dialog.ycp URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/lslezak/sound/sound/src/j…
============================================================================== --- branches/tmp/lslezak/sound/sound/src/joy_dialog.ycp (original) +++ branches/tmp/lslezak/sound/sound/src/joy_dialog.ycp Fri Sep 30 11:39:07 2011 @@ -28,6 +28,8 @@ list joylist = []; + string usb_notice = _("USB joysticks do not need any configuration, just connect them."); + /** * Update the sound card configuration of joystick * @param start should joystick be used? @@ -751,10 +753,19 @@ UI::CloseDialog(); } + list unconfigured_sound_cards(list gameport_cards) + { + list ret = filter(map card, (list<map>) gameport_cards, { + return Joystick::joystick[ card["card_no"]:0, "model" ]:"" == ""; + }); + + y2milestone("Unconfigured gameport cards: %1", ret); + return ret; + } integer select_sound_card(list gameport_cards) { - list tcont = maplist (map card, (list<map>) gameport_cards, ``{ + list tcont = maplist (map card, (list<map>) gameport_cards, { map jconf = Joystick::joystick[ card["card_no"]:0 ]:$[]; string jmodel = jconf["model"]:""; @@ -849,31 +860,39 @@ if (ret == `add) { list jcards = Sound::GetSoundCardListWithJoy(); + y2milestone("Sound cards with gameport: %1", jcards); // no sound card with gameport if (size(jcards) == 0) { string message = _("There is no soundcard with joystick support (gameport).") - + "\n" + _("USB joysticks do not need any configuration, just plug them."); + + "\n" + usb_notice; Popup::Message(message); } else { - integer selected = nil; + // remove configured cards with joystick + list unconfigured = unconfigured_sound_cards(jcards); + y2milestone("Gamport sound cards without joystick: %1", unconfigured); - if (size(jcards) == 1) + if (size(unconfigured) == 0) { - selected = jcards[0, "card_no"]:0; + string message = _("There is no soundcard with unconfigured joystick.") + + "\n" + usb_notice; + + Popup::Message(message); } else { - selected = select_sound_card(jcards); - } + // if there is just one card just use it otherwise ask user + integer selected = (size(unconfigured) == 1) ? unconfigured[0, "card_no"]:0 : select_sound_card(unconfigured); - if (selected != nil) - { - joy_dialog(selected, `ok); + // selection canceled? + if (selected != nil) + { + joy_dialog(selected, `ok); + } } } } -- To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
0
0
[yast-commit] r66185 - in /branches/tmp/lslezak/sound/sound/src: Joystick.ycp joy_dialog.ycp joystick.ycp
by lslezak@svn2.opensuse.org
30 Sep '11
30 Sep '11
Author: lslezak Date: Fri Sep 30 11:07:25 2011 New Revision: 66185 URL:
http://svn.opensuse.org/viewcvs/yast?rev=66185&view=rev
Log: refactoring joystick configuration, added support for USB joysticks Modified: branches/tmp/lslezak/sound/sound/src/Joystick.ycp branches/tmp/lslezak/sound/sound/src/joy_dialog.ycp branches/tmp/lslezak/sound/sound/src/joystick.ycp Modified: branches/tmp/lslezak/sound/sound/src/Joystick.ycp URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/lslezak/sound/sound/src/J…
============================================================================== --- branches/tmp/lslezak/sound/sound/src/Joystick.ycp (original) +++ branches/tmp/lslezak/sound/sound/src/Joystick.ycp Fri Sep 30 11:07:25 2011 @@ -39,6 +39,13 @@ // database entry global string generic_joystick_translated = _("Generic Analog Joystick"); + list<map> detected_joysticks = []; + + global list<map> Detected() + { + return detected_joysticks; + } + /** * Get list of all required joystick kernel modules * @return list list of modules @@ -173,6 +180,8 @@ } joystick_backup = joystick; + + detected_joysticks = (list<map>)SCR::Read(.probe.joystick); return true; } Modified: branches/tmp/lslezak/sound/sound/src/joy_dialog.ycp URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/lslezak/sound/sound/src/j…
============================================================================== --- branches/tmp/lslezak/sound/sound/src/joy_dialog.ycp (original) +++ branches/tmp/lslezak/sound/sound/src/joy_dialog.ycp Fri Sep 30 11:07:25 2011 @@ -14,12 +14,13 @@ textdomain "sound"; import "Wizard"; + import "WizardHW"; import "Joystick"; import "Sound"; - import "Joystick"; import "Package"; import "Label"; import "Popup"; + import "String"; include "sound/joysticks.ycp"; include "sound/ui.ycp"; @@ -503,6 +504,7 @@ `next : Label::NextButton() ]; + Wizard::OpenNextBackDialog(); Wizard::SetContents (caption, contents, helptext, true, true); Wizard::SetNextButton(`next, nextbutton[button]:Label::NextButton() ); if (!Mode::installation()) Wizard::HideBackButton(); @@ -583,9 +585,329 @@ } if (!Mode::installation()) Wizard::RestoreBackButton(); + Wizard::CloseDialog(); return s; } + define list<map<string,any> > joystick_table() + { + list<map<string,any> > content = []; + foreach(map js, Joystick::Detected(), + { + string device = js["dev_name2"]:""; + string model = js["model"]:""; + list<string> descr = []; + + if (js["detail","axes"]:0 > 0) + { + descr = add(descr, sformat(_("Number of axes: %1"), js["detail","axes"]:0)); + } + + if (js["detail","buttons"]:0 > 0) + { + descr = add(descr, sformat(_("Number of buttons: %1"), js["detail","buttons"]:0)); + } + + map<string,any> j = $[ + "id" : device, + "table_descr" : [ js["model"]:"", device, js["bus"]:"" ], + "rich_descr" : WizardHW::CreateRichTextDescription(model, descr) + ]; + + content = add(content, j); + }); + + return content; + } + + map find_joystick(string device) + { + return find(map j, Joystick::Detected(), {return j["dev_name2"]:"" == device;}); + } + + void test_joystick(string device) + { + map js = find_joystick(device); + if (js == nil) + { + y2error("Cannot find joystick %1", device); + return; + } + + // generate appropriate dialog for the joystick + term joy_attrib = `VBox(); + integer min = -32767; // see js_event.value in linux/joystick.h + integer max = 32767; + integer i = 0; + + while (i < js["detail","axes"]:0) + { + // progress bar label + string widget_name = sformat(_("Axis %1"), i); + string widget_id = sformat("Axis %1", i); + + if (UI::HasSpecialWidget(`Slider)) + { + joy_attrib = add(joy_attrib, `Slider(`id(widget_id), `opt(`disabled), widget_name, min, max, 0)); + } + else + { + joy_attrib = add(joy_attrib, `IntField(`id(widget_id), `opt(`disabled), widget_name, min, max, 0)); + } + + joy_attrib = add(joy_attrib, `VSpacing(0.3)); + i = i + 1; + } + + term joy_buttons = `HBox(); + string not_pressed = " "; + string pressed = UI::Glyph(`CheckMark); + + i = 0; + while (i < js["detail","buttons"]:0) + { + // label + string widget_name = sformat(_("Button %1"), i); + string widget_id = sformat ("Button %1", i); + joy_buttons = add (joy_buttons, + `Label (`id(widget_id), widget_name + " " + not_pressed)); + joy_buttons = add (joy_buttons, `HSpacing(2)); + i = i + 1; + } + joy_attrib = add (joy_attrib, joy_buttons); + + UI::OpenDialog(`opt(`decorated), `HBox(`HSpacing(1.5), + `VSpacing(18), + `VBox( + `HSpacing(50), + `VSpacing(1), + // Popup label + `Heading(_("Joystick Test")), + `VSpacing(1), + joy_attrib, + `VSpacing(1), + `PushButton(`id(`done), `opt(`default), Label::OKButton()), + `VSpacing(1) + ), + `HSpacing(1.5) + )); + + string command = sformat("/usr/bin/jstest --event '%1'", String::Quote(device)); + integer process = (integer)SCR::Execute(.process.start_shell, command); + + symbol ret = nil; + + // read the jstest output until "OK" button is pushed + do + { + if (SCR::Read(.process.running, process) == false) + { + y2error("Unexpected exit"); + break; + } + + string out = (string)SCR::Read(.process.read_line, process); + + if (out != nil) + { + y2debug("jstest output: %1", out); + + // the output is like "Event: type 2, time 26263500, number 0, value 0" + string type_str = regexpsub(out, "type ([0-9]+)", "\\1"); + string number_str = regexpsub(out, "number ([0-9]+)", "\\1"); + string value_str = regexpsub(out, "value ([-]{0,1}[0-9]+)", "\\1"); + + if (type_str != nil && number_str != nil && value_str != nil) + { + integer type = tointeger(type_str); + integer number = tointeger(number_str); + integer value = tointeger(value_str); + + if (type == 1) + { + // button state changed + UI::ChangeWidget(`id(sformat("Button %1", number)), `Value, + // label text ("Button" is joystick's button no. %1) + sformat(_("Button %1"), number) + " " + (value == 1 ? pressed : not_pressed)); + } + else if (type == 2) + { + // change in some axis + UI::ChangeWidget(`id(sformat ("Axis %1", number)), `Value, value) ; + } + } + } + ret = (symbol)UI::PollInput(); + } + while (ret == nil); + + y2milestone ("killing"); + SCR::Execute(.process.kill, process); + + // release the process from the agent + SCR::Execute(.process.release, process); + + UI::CloseDialog(); + } + + + integer select_sound_card(list gameport_cards) + { + list tcont = maplist (map card, (list<map>) gameport_cards, ``{ + map jconf = Joystick::joystick[ card["card_no"]:0 ]:$[]; + string jmodel = jconf["model"]:""; + + // translate generic joystick + if (jmodel == Joystick::generic_joystick) + jmodel = Joystick::generic_joystick_translated; + + return `item( + `id(card["card_no"]:0), + sformat("%1", card["card_no"]:0), + card["name"]:"Sound card", + jmodel + ); + }); + + term dialog = `VBox( + `Heading(_("Configured Sound Cards with Joystick Support")), + `Table(`id(`cards), `header( + // table header (number) + _("No."), + // table header (card name) + _("Sound card"), + // table header (joystick type) + _("Joystick")), tcont + ), + `Label("To add an USB joystick close this dialog and just connect it."), + `ButtonBox( + // button label + `PushButton(`id(`ok), _("&Configure joystick")), + `PushButton(`id(`cancel), Label::CancelButton()) + ) + ); + + UI::OpenDialog(`opt(`decorated), dialog); + + // preselect first card + UI::ChangeWidget (`id(`cards), `CurrentItem, gameport_cards[0,"card_no"]:0); + + symbol ret = (symbol) UI::UserInput(); + y2internal("UI: %1", ret); + + if (ret == `cancel || ret == `abort) { + y2milestone("Sound card selection canceled"); + return nil; + } + + integer joy_card = (integer) UI::QueryWidget(`id(`cards), `CurrentItem); + y2milestone("Selected sound card: %1", joy_card); + + return joy_card; + } + + boolean is_usb(string device) + { + map js = find_joystick(device); + if (js == nil) return false; + + return js["bus"]:"" == "USB"; + } + + define symbol joystick_overview() + { + list<list> extra_buttons = [ + // menu item + [`test, _("&Test...")], + ]; + + // dialog title + WizardHW::CreateHWDialog(_("Joysticks"), + "", + // table header + [_("Model"), _("Device name"), _("Attached to")], + extra_buttons + ); + + // create description for WizardHW + list<map<string,any> > items = joystick_table(); + y2debug("items: %1", items); + + WizardHW::SetContents(items); + + symbol ret = `dummy; + + while (!contains([`abort, `back, `next],ret)) + { + map<string,any> ev = WizardHW::WaitForEvent(); + y2milestone("WaitForEvent: %1", ev); + + ret = (symbol)ev["event","ID"]:nil; + string device = WizardHW::SelectedItem(); + + if (ret == `add) + { + list jcards = Sound::GetSoundCardListWithJoy(); + + // no sound card with gameport + if (size(jcards) == 0) + { + string message = _("There is no soundcard with joystick support (gameport).") + + "\n" + _("USB joysticks do not need any configuration, just plug them."); + + Popup::Message(message); + } + else + { + integer selected = nil; + + if (size(jcards) == 1) + { + selected = jcards[0, "card_no"]:0; + } + else + { + selected = select_sound_card(jcards); + } + + if (selected != nil) + { + joy_dialog(selected, `ok); + } + } + } + else if (ret == `edit) + { + if (is_usb(device)) + { + // popup message - pressed [Edit] when an USB joystick is selected + Popup::Message("USB joysticks do not need any configuration."); + } + else + { + } + } + else if (ret == `delete) + { + if (is_usb(device)) + { + // popup message - pressed [Delete] when an USB joystick is selected + Popup::Message("USB joysticks cannot be deleted, just unplug them."); + } + else + { + } + } + else if (ret == `test) + { + test_joystick(device); + } + } + + y2internal("Joystick overview result: %1", ret); + return ret; + } + /* EOF */ } Modified: branches/tmp/lslezak/sound/sound/src/joystick.ycp URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/lslezak/sound/sound/src/j…
============================================================================== --- branches/tmp/lslezak/sound/sound/src/joystick.ycp (original) +++ branches/tmp/lslezak/sound/sound/src/joystick.ycp Fri Sep 30 11:07:25 2011 @@ -61,6 +61,8 @@ */ define symbol joystick_configuration() ``{ + return joystick_overview(); + // helptext string helptext = _("<P>Two or more sound cards in your system support joysticks.</P> <P>To configure a joystick, select the sound card and press <B>Configure Joystick</B>.</P> -- To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
0
0
[yast-commit] r66184 - /branches/tmp/lslezak/sound/
by lslezak@svn2.opensuse.org
30 Sep '11
30 Sep '11
Author: lslezak Date: Fri Sep 30 11:01:41 2011 New Revision: 66184 URL:
http://svn.opensuse.org/viewcvs/yast?rev=66184&view=rev
Log: temporary copy for refactoring joystick configuration Added: branches/tmp/lslezak/sound/ (props changed) - copied from r66183, trunk/sound/ -- To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
0
0
[yast-commit] r66183 - in /trunk/hardware-detection: package/yast2-hardware-detection.changes src/HwParse.cc
by lslezak@svn2.opensuse.org
29 Sep '11
29 Sep '11
Author: lslezak Date: Thu Sep 29 17:12:28 2011 New Revision: 66183 URL:
http://svn.opensuse.org/viewcvs/yast?rev=66183&view=rev
Log: return joystick details (number of buttons and axes) Modified: trunk/hardware-detection/package/yast2-hardware-detection.changes trunk/hardware-detection/src/HwParse.cc Modified: trunk/hardware-detection/package/yast2-hardware-detection.changes URL:
http://svn.opensuse.org/viewcvs/yast/trunk/hardware-detection/package/yast2…
============================================================================== --- trunk/hardware-detection/package/yast2-hardware-detection.changes (original) +++ trunk/hardware-detection/package/yast2-hardware-detection.changes Thu Sep 29 17:12:28 2011 @@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Thu Sep 29 15:08:59 UTC 2011 - lslezak(a)suse.cz + +- return joystick details (number of buttons and axes) + +------------------------------------------------------------------- Tue Sep 13 10:50:28 CEST 2011 - mvidner(a)suse.cz - Use pr_bios for .probe.bios so that smbios info is included Modified: trunk/hardware-detection/src/HwParse.cc URL:
http://svn.opensuse.org/viewcvs/yast/trunk/hardware-detection/src/HwParse.c…
============================================================================== --- trunk/hardware-detection/src/HwParse.cc (original) +++ trunk/hardware-detection/src/HwParse.cc Thu Sep 29 17:12:28 2011 @@ -1261,6 +1261,23 @@ } } break; +#ifdef HD_VERSION +#if HD_VERSION >= 19 + case hd_detail_joystick: { + joystick_t *info = hd->detail->joystick.data; + + if (info) + { + YCPMap detail; + detail->add (YCPString ("buttons"), YCPInteger (info->buttons)); + detail->add (YCPString ("axes"), YCPInteger (info->axes)); + out->add (YCPString ("detail"), detail); + } + } +#else +#warning "Joystick details not available" +#endif +#endif default: break; } -- To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
0
0
[yast-commit] r66182 - in /trunk/yast2: library/runlevel/src/Service.ycp package/yast2.changes
by lslezak@svn2.opensuse.org
29 Sep '11
29 Sep '11
Author: lslezak Date: Thu Sep 29 17:06:14 2011 New Revision: 66182 URL:
http://svn.opensuse.org/viewcvs/yast?rev=66182&view=rev
Log: - Service::RunInitScriptWithTimeOut() - fixed memory leak, release the process info at the end Modified: trunk/yast2/library/runlevel/src/Service.ycp trunk/yast2/package/yast2.changes Modified: trunk/yast2/library/runlevel/src/Service.ycp URL:
http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/runlevel/src/Servi…
============================================================================== --- trunk/yast2/library/runlevel/src/Service.ycp (original) +++ trunk/yast2/library/runlevel/src/Service.ycp Thu Sep 29 17:06:14 2011 @@ -360,6 +360,9 @@ SCR::Execute(.process.kill, process_pid); } + // release the process from the agent + SCR::Execute(.process.release, process_pid); + return return_code; } Modified: trunk/yast2/package/yast2.changes URL:
http://svn.opensuse.org/viewcvs/yast/trunk/yast2/package/yast2.changes?rev=…
============================================================================== --- trunk/yast2/package/yast2.changes (original) +++ trunk/yast2/package/yast2.changes Thu Sep 29 17:06:14 2011 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Thu Sep 29 14:54:07 UTC 2011 - lslezak(a)suse.cz + +- Service::RunInitScriptWithTimeOut() - fixed memory leak, + release the process info at the end + +------------------------------------------------------------------- Mon Sep 26 10:58:19 UTC 2011 - jsrain(a)suse.cz - simplify usage of save_y2logs (bnc#673990) -- To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
0
0
[yast-commit] r66181 - /trunk/yast2/package/yast2.changes
by lslezak@svn2.opensuse.org
29 Sep '11
29 Sep '11
Author: lslezak Date: Thu Sep 29 17:05:28 2011 New Revision: 66181 URL:
http://svn.opensuse.org/viewcvs/yast?rev=66181&view=rev
Log: yast2.changes - fixed email address Modified: trunk/yast2/package/yast2.changes Modified: trunk/yast2/package/yast2.changes URL:
http://svn.opensuse.org/viewcvs/yast/trunk/yast2/package/yast2.changes?rev=…
============================================================================== --- trunk/yast2/package/yast2.changes (original) +++ trunk/yast2/package/yast2.changes Thu Sep 29 17:05:28 2011 @@ -1,5 +1,5 @@ ------------------------------------------------------------------- -Mon Sep 26 10:58:19 UTC 2011 - jsrain@site +Mon Sep 26 10:58:19 UTC 2011 - jsrain(a)suse.cz - simplify usage of save_y2logs (bnc#673990) -- To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
0
0
← Newer
1
2
3
4
...
71
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
Results per page:
10
25
50
100
200