[PATCH 1/5] Use GtkActionList when populating filesystem store

Vratislav Podzimek vpodzime at redhat.com
Fri Mar 14 11:34:20 UTC 2014


It is slightly faster then using fire_gtk_action.

Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
---
 pyanaconda/ui/gui/spokes/custom.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index cda362d..dc54154 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -80,7 +80,7 @@ from pyanaconda.ui.gui.spokes.lib.custom_storage_helpers import get_container_ty
 from pyanaconda.ui.gui.spokes.lib.custom_storage_helpers import AddDialog, ConfirmDeleteDialog, DisksDialog, ContainerDialog, HelpDialog
 
 from pyanaconda.ui.gui.utils import setViewportBackground, enlightbox, fancy_set_sensitive, ignoreEscape
-from pyanaconda.ui.gui.utils import really_hide, really_show, fire_gtk_action
+from pyanaconda.ui.gui.utils import really_hide, really_show, GtkActionList
 from pyanaconda.ui.gui.categories.system import SystemCategory
 
 from gi.repository import Gdk, Gtk
@@ -268,6 +268,7 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
 
     def _initialize(self):
         self._fs_types = []
+        actions = GtkActionList()
         for cls in device_formats.itervalues():
             obj = cls()
 
@@ -278,9 +279,11 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
                             (isinstance(obj, FS) or
                              obj.type in ["biosboot", "prepboot", "swap"]))
             if supported_fs:
-                fire_gtk_action(self._fsCombo.append_text, obj.name)
+                actions.add_action(self._fsCombo.append_text, obj.name)
                 self._fs_types.append(obj.name)
 
+        actions.fire()
+
     @property
     def _clearpartDevices(self):
         return [d for d in self._devices if d.name in self.data.clearpart.drives and d.partitioned]
-- 
1.8.5.3



More information about the anaconda-patches mailing list