summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErkin Bahceci <erkinbah@gmail.com>2008-11-11 21:04:29 -0600
committerErkin Bahceci <erkinbah@gmail.com>2008-11-11 21:04:29 -0600
commite12b3d580c568afc96ba3f6f93e81d34e8f90a3c (patch)
tree034aab174289a36d0c6424e716d16c77fd63401c
parent9e9e6d28889a6f83ec5ac1570abc6742141211d9 (diff)
downloadccsm-e12b3d580c568afc96ba3f6f93e81d34e8f90a3c.tar.gz
ccsm-e12b3d580c568afc96ba3f6f93e81d34e8f90a3c.tar.bz2
Fix background icon loading when plugins are filtered early.
This fixes the background loading of plugin icons when the user types something in the filter box right after launching ccsm before icon loading is finished.
-rw-r--r--ccm/Utils.py3
-rw-r--r--ccm/Widgets.py7
2 files changed, 9 insertions, 1 deletions
diff --git a/ccm/Utils.py b/ccm/Utils.py
index b6cec6a..16f8e83 100644
--- a/ccm/Utils.py
+++ b/ccm/Utils.py
@@ -262,7 +262,8 @@ class IdleSettingsParser:
catIndex = self.CategoryLoadIconsList[0]
pluginWindow = self.Main.MainPage.RightWidget
categoryBox = pluginWindow._boxes[catIndex]
- for (pluginIndex, plugin) in enumerate (categoryBox.get_plugins()):
+ for (pluginIndex, plugin) in \
+ enumerate (categoryBox.get_unfiltered_plugins()):
categoryBox._buttons[pluginIndex] = PluginButton (plugin)
categoryBox.rebuild_table (categoryBox._current_cols, True)
pluginWindow.connect_buttons (categoryBox)
diff --git a/ccm/Widgets.py b/ccm/Widgets.py
index f42abc5..51fe828 100644
--- a/ccm/Widgets.py
+++ b/ccm/Widgets.py
@@ -1457,6 +1457,7 @@ class PluginButton (gtk.HBox):
class CategoryBox(gtk.VBox):
_plugins = None
+ _unfiltered_plugins = None
_buttons = None
_context = None
_name = ""
@@ -1485,6 +1486,9 @@ class CategoryBox(gtk.VBox):
self._name = name
text = name or 'Uncategorized'
+ # Keep unfiltered list of plugins for correct background icon loading
+ self._unfiltered_plugins = self._plugins
+
header = gtk.HBox ()
header.set_border_width (5)
header.set_spacing (10)
@@ -1561,6 +1565,9 @@ class CategoryBox(gtk.VBox):
def get_plugins (self):
return self._plugins
+ def get_unfiltered_plugins (self):
+ return self._unfiltered_plugins
+
# Plugin Window
#
class PluginWindow(gtk.ScrolledWindow):