Unselect album tree after searching.
authorJoel Rosdahl <joel@rosdahl.net>
Sun, 8 Aug 2004 11:02:18 +0000 (11:02 +0000)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 8 Aug 2004 11:02:18 +0000 (11:02 +0000)
src/gkofoto/gkofoto/albums.py
src/gkofoto/gkofoto/mainwindow.py
src/gkofoto/gkofoto/objectcollectionfactory.py

index ee781d2..1123752 100644 (file)
@@ -51,6 +51,8 @@ class Albums:
         self.__loadAlbumTreeHelper()
         env.widgets["albumView"].expand_row(0, False) # Expand root album
 
+    def unselect(self):
+        self.__albumView.get_selection().unselect_all()
 
 ###############################################################################
 ### Callback functions registered by this class but invoked from other classes.
index ba90717..5bb4df4 100644 (file)
@@ -97,6 +97,9 @@ class MainWindow(gtk.Window):
     def reloadAlbumTree(self):
         self.__albums.loadAlbumTree()
 
+    def unselectAlbumTree(self):
+        self.__albums.unselect()
+
     def registerImages(self, widget, data):
         dialog = RegisterImagesDialog()
         if dialog.run() == gtk.RESPONSE_OK:
index ed9b4bd..a1808a0 100644 (file)
@@ -31,6 +31,7 @@ class ObjectCollectionFactory:
                 return self.__albumMembers
             else:
                 self.__searchResult.loadQuery(query)
+                env.mainwindow.unselectAlbumTree()
                 return self.__searchResult
         except AlbumDoesNotExistError, tag:
             errorText = "No such album tag: \"%s\"." % tag