Blob Blame History Raw
From 52abf43ad1869bf1f0893f70a8c05b0b13d477e1 Mon Sep 17 00:00:00 2001
From: Martin Kolman <mkolman@redhat.com>
Date: Tue, 17 May 2016 16:28:51 +0200
Subject: [PATCH 13/13] Use the System hub category provided by Anaconda

Use the Anaconda provides System category - that way the
OSCAP addon the more efficiently fit on the screen,
especially on low resolution displays.

Also remove the Security category as it is no longer used anywhere.

Related: rhbz#1269211
---
 org_fedora_oscap/categories/__init__.py |  0
 org_fedora_oscap/categories/security.py | 39 ---------------------------------
 org_fedora_oscap/gui/spokes/oscap.py    |  4 ++--
 3 files changed, 2 insertions(+), 41 deletions(-)
 delete mode 100644 org_fedora_oscap/categories/__init__.py
 delete mode 100644 org_fedora_oscap/categories/security.py

diff --git a/org_fedora_oscap/categories/__init__.py b/org_fedora_oscap/categories/__init__.py
deleted file mode 100644
index e69de29..0000000
diff --git a/org_fedora_oscap/categories/security.py b/org_fedora_oscap/categories/security.py
deleted file mode 100644
index 083cfb7..0000000
--- a/org_fedora_oscap/categories/security.py
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-# Copyright (C) 2013  Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use,
-# modify, copy, or redistribute it subject to the terms and conditions of
-# the GNU General Public License v.2, or (at your option) any later version.
-# This program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY expressed or implied, including the implied warranties of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
-# Public License for more details.  You should have received a copy of the
-# GNU General Public License along with this program; if not, write to the
-# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301, USA.  Any Red Hat trademarks that are incorporated in the
-# source code or documentation are not subject to the GNU General Public
-# License and may only be used or replicated with the express permission of
-# Red Hat, Inc.
-#
-# Red Hat Author(s): Vratislav Podzimek <vpodzime@redhat.com>
-#
-
-N_ = lambda x: x
-
-from pyanaconda.ui.categories import SpokeCategory
-
-__all__ = ["SecurityCategory"]
-
-class SecurityCategory(SpokeCategory):
-    """
-    Class for the Hello world category. Category groups related spokes
-    together. Both logically and visually (creates a box on a hub). It
-    references a class of the hub it is supposed to be placed on. On the
-    other hand spokes reference a class of the category they should be
-    included in.
-
-    """
-
-    displayOnHubGUI = "SummaryHub"
-    displayOnHubTUI = "SummaryHub"
-    title = N_("SECURITY")
diff --git a/org_fedora_oscap/gui/spokes/oscap.py b/org_fedora_oscap/gui/spokes/oscap.py
index 42fc406..e488a1b 100644
--- a/org_fedora_oscap/gui/spokes/oscap.py
+++ b/org_fedora_oscap/gui/spokes/oscap.py
@@ -27,7 +27,6 @@ N_ = lambda x: x
 
 # the path to addons is in sys.path so we can import things
 # from org_fedora_oscap
-from org_fedora_oscap.categories.security import SecurityCategory
 from org_fedora_oscap import common
 from org_fedora_oscap import data_fetch
 from org_fedora_oscap import rule_handling
@@ -41,6 +40,7 @@ from pyanaconda.ui.gui.spokes import NormalSpoke
 from pyanaconda.ui.communication import hubQ
 from pyanaconda.ui.gui.utils import gtk_action_wait, really_hide, really_show
 from pyanaconda.ui.gui.utils import set_treeview_selection, fire_gtk_action, GtkActionList
+from pyanaconda.ui.categories.system import SystemCategory
 
 from pykickstart.errors import KickstartValueError
 
@@ -158,7 +158,7 @@ class OSCAPSpoke(NormalSpoke):
     helpFile = "SecurityPolicySpoke.xml"
 
     # category this spoke belongs to
-    category = SecurityCategory
+    category = SystemCategory
 
     # spoke icon (will be displayed on the hub)
     # preferred are the -symbolic icons as these are used in Anaconda's spokes
-- 
2.5.5