Author: jreidinger Date: Thu Jun 9 13:23:00 2011 New Revision: 64273 URL: http://svn.opensuse.org/viewcvs/yast?rev=64273&view=rev Log: merge apparmor to one desktop entry (FATE#305278) Added: branches/SuSE-Code-11-SP2-Branch/apparmor/src/clients/apparmor.ycp branches/SuSE-Code-11-SP2-Branch/apparmor/src/desktop/yast2-apparmor.desktop Removed: branches/SuSE-Code-11-SP2-Branch/apparmor/src/desktop/SD_add_profile.desktop branches/SuSE-Code-11-SP2-Branch/apparmor/src/desktop/SD_control_panel.desktop branches/SuSE-Code-11-SP2-Branch/apparmor/src/desktop/SD_delete_profile.desktop branches/SuSE-Code-11-SP2-Branch/apparmor/src/desktop/SD_edit_profile.desktop branches/SuSE-Code-11-SP2-Branch/apparmor/src/desktop/SD_genprof.desktop branches/SuSE-Code-11-SP2-Branch/apparmor/src/desktop/SD_logprof.desktop branches/SuSE-Code-11-SP2-Branch/apparmor/src/desktop/groups/ Modified: branches/SuSE-Code-11-SP2-Branch/apparmor/src/clients/Makefile.am branches/SuSE-Code-11-SP2-Branch/apparmor/src/desktop/Makefile.am Modified: branches/SuSE-Code-11-SP2-Branch/apparmor/src/clients/Makefile.am URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/apparmor/src/clients/Makefile.am?rev=64273&r1=64272&r2=64273&view=diff ============================================================================== --- branches/SuSE-Code-11-SP2-Branch/apparmor/src/clients/Makefile.am (original) +++ branches/SuSE-Code-11-SP2-Branch/apparmor/src/clients/Makefile.am Thu Jun 9 13:23:00 2011 @@ -1,4 +1,5 @@ client_DATA = \ + apparmor.ycp \ GenProf.ycp \ LogProf.ycp \ SD_AddProfile.ycp \ Added: branches/SuSE-Code-11-SP2-Branch/apparmor/src/clients/apparmor.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/apparmor/src/clients/apparmor.ycp?rev=64273&view=auto ============================================================================== --- branches/SuSE-Code-11-SP2-Branch/apparmor/src/clients/apparmor.ycp (added) +++ branches/SuSE-Code-11-SP2-Branch/apparmor/src/clients/apparmor.ycp Thu Jun 9 13:23:00 2011 @@ -0,0 +1,102 @@ +{ +textdomain "yast2-apparmor"; +import "Wizard"; +import "Label"; +import "Popup"; +import "Sequencer"; +include "subdomain/apparmor_packages.ycp"; +include "subdomain/apparmor_profile_check.ycp"; +include "subdomain/profile_dialogs.ycp"; + +any startDialog(){ + /* AppArmor dialog caption */ + string caption = _("App Armor Configuration"); + + /* AppArmor dialog help */ + string help = _("<p>Choose one of the available apparmor modules to configure + the corresponding action and press <b>Launch</b>.</p>"); + + /* AppArmor dialog contents */ + term contents = `HBox( + `HSpacing(8), + /* Frame label */ + //`Frame(_("Available apparmor modules:"), `HBox(`HSpacing(2), + `VBox( + `VSpacing(3), + /* Selection box label */ + `SelectionBox(`id(`modules), `opt(`notify), _("&Available AppArmor Modules:"), [ + /* Selection box items */ + `item(`id("subdomain"), _("Settings"), true), + `item(`id("GenProf"), _("Generate Profile")), + `item(`id("LogProf"), _("Update Profile")), + `item(`id("SD_Report"), _("Repors")), + `item(`id("SD_EditProfile"), _("Edit Profile")), + `item(`id("SD_AddProfile"), _("Add Manually Profile")), + `item(`id("SD_DeleteProfile"), _("Delete Profile")) + ]), + `VSpacing(3) + ), + //`HSpacing(2))), + `HSpacing(8) + ); + + Wizard::CreateDialog(); + Wizard::SetDesktopIcon("apparmor"); + Wizard::SetContentsButtons(caption, contents, help, + Label::BackButton(), /* Label::FinishButton() */ _("&Launch")); + + UI::SetFocus(`id(`modules)); + + any ret = nil; + while(true) { + + ret = UI::UserInput(); + + /* abort? */ + if(ret == `abort || ret == `cancel) { + /* if(ReallyAbort()) break; + else continue; */ + break; + } + /* next */ + else if(ret == `next || ret == `modules) { + /* check_* */ + ret = `next; + break; + } + /* back */ + else if(ret == `back) { + break; + } + else { + y2error("unexpected retcode: %1", ret); + continue; + } + } + + string launch = "lan"; + if(ret == `next) { + launch = (string) UI::QueryWidget(`id(`modules), `CurrentItem); + y2debug("launch=%1", launch); + } + + UI::CloseDialog(); + + if(ret == `next) + return WFM::CallFunction(launch, WFM::Args()); + else + return `back; +} + +any ret = nil; +// no command line support #269891 +if (size(WFM::Args()) > 0 ) +{ + import "CommandLine"; + CommandLine::Init($[], WFM::Args()); + return ret; +} + +ret = startDialog(); +return ret; +} Modified: branches/SuSE-Code-11-SP2-Branch/apparmor/src/desktop/Makefile.am URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/apparmor/src/desktop/Makefile.am?rev=64273&r1=64272&r2=64273&view=diff ============================================================================== --- branches/SuSE-Code-11-SP2-Branch/apparmor/src/desktop/Makefile.am (original) +++ branches/SuSE-Code-11-SP2-Branch/apparmor/src/desktop/Makefile.am Thu Jun 9 13:23:00 2011 @@ -1,14 +1,5 @@ -SUBDIRS = groups - desktop_DATA = \ - SD_add_profile.desktop \ - SD_delete_profile.desktop \ - SD_genprof.desktop \ - SD_Reports.desktop \ - SD_control_panel.desktop \ - SD_edit_profile.desktop \ - SD_logprof.desktop - + yast2-apparmor.desktop rncdir = $(schemadir)/autoyast/rnc rnc_DATA = Added: branches/SuSE-Code-11-SP2-Branch/apparmor/src/desktop/yast2-apparmor.desktop URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/apparmor/src/desktop/yast2-apparmor.desktop?rev=64273&view=auto ============================================================================== --- branches/SuSE-Code-11-SP2-Branch/apparmor/src/desktop/yast2-apparmor.desktop (added) +++ branches/SuSE-Code-11-SP2-Branch/apparmor/src/desktop/yast2-apparmor.desktop Thu Jun 9 13:23:00 2011 @@ -0,0 +1,24 @@ +[Desktop Entry] +Type=Application +Categories=Settings;System;Qt;X-SuSE-YaST;X-SuSE-YaST-AppArmor; + +X-KDE-ModuleType=Library +X-KDE-RootOnly=true +X-KDE-HasReadOnlyMode=true +X-KDE-Library=yast2 +X-SuSE-YaST-Call=apparmor + +X-SuSE-YaST-Group=AppArmor +X-SuSE-YaST-Argument= +X-SuSE-YaST-RootOnly=true +X-SuSE-YaST-AutoInst=none +X-SuSE-YaST-Geometry= +X-SuSE-YaST-SortKey= +X-SuSE-YaST-AutoInstClonable=false + +Icon=apparmor_view_profile +Exec=/sbin/yast2 apparmor + +Name=AppArmor Configuration +GenericName=AppArmor Configuration +StartupNotify=true -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org