Update sensitiveness of the category search button when category
authorJoel Rosdahl <joel@rosdahl.net>
Wed, 21 Jul 2004 16:02:31 +0000 (16:02 +0000)
committerJoel Rosdahl <joel@rosdahl.net>
Wed, 21 Jul 2004 16:02:31 +0000 (16:02 +0000)
selection changes.

src/gkofoto/categories.py

index fecd99e..bb049c0 100644 (file)
@@ -83,6 +83,8 @@ class Categories:
         for item in self._contextMenuGroup:
             self._contextMenu.append(item)
 
+        env.widgets["categorySearchButton"].set_sensitive(False)
+
         # Init menubar items.
         env.widgets["menubarDisconnectFromParent"].connect(
             "activate", self._disconnectCategory, None)
@@ -179,6 +181,8 @@ class Categories:
             except KeyError:
                  self.__selectedCategoriesIds[cid] = [parentId]
         self.__updateContextMenu()
+        env.widgets["categorySearchButton"].set_sensitive(
+            len(selectedCategoryRows) > 0)
 
     def _connectionToggled(self, renderer, path):
         categoryRow = self.__categoryModel[path]