Commits

Steve Borho committed 26667d8

thgimport: root browse searches at the current repo root

Almost nothing annoys me more than browse dialogs opening up from C:\Windows

Comments (0)

Files changed (1)

tortoisehg/hgqt/thgimport.py

     def browsefiles(self):
         caption = _("Select patches")
         filelist = QFileDialog.getOpenFileNames(parent=self, caption=caption,
+                                                directory=self.repo.root,
                                                 filter=_FILE_FILTER)
         if filelist:
             # Qt file browser uses '/' in paths, even on Windows.
 
     def browsedir(self):
         caption = _("Select Directory containing patches")
-        path = QFileDialog.getExistingDirectory(parent=self, caption=caption)
+        path = QFileDialog.getExistingDirectory(parent=self,
+                                                directory=self.repo.root,
+                                                caption=caption)
         if path:
             response = str(path.replace('/', os.sep))
             self.src_combo.setEditText(response)