# Path: Extensions/Global.py
# def getDefaultFont():
# def iconFromPath(path):


import os
import ctypes
import shutil
from PyQt4 import QtGui, QtCore, QtXml
from Extensions import Global
from Extensions.Projects.ProjectManager.ProjectView.ProgressWidget import ProgressWidget
            if item.parent() is None:
                pass
            else:
                parentDir = item.parent().text(0)
                path = os.path.join(self.root, parentDir, item.text(0))
                self.fileActivated.emit(path)

    def search(self):
        text = self.searchLine.text().strip()
        if text == '':
            self.viewStack.setCurrentIndex(0)
            return
        self.searchThread.search(text, self.refactor.root,
                                self.projectTree.showAllFilesAct.isChecked())
        self.progressBar.show()

    def updateSearchTree(self, resultsDict):
        self.progressBar.hide()
        self.searchResultsTree.clear()
        self.viewStack.setCurrentIndex(1)
        if len(resultsDict) > 0:
            for folder, fileList in resultsDict.items():
                folderItem = QtGui.QTreeWidgetItem(self.searchResultsTree)
                pathRelativeToProject = folder.partition(
                    self.root + os.path.sep)[-1]
                folderItem.setText(0, pathRelativeToProject)
                folderItem.setForeground(0, QtGui.QBrush(
                    QtGui.QColor("#003366")))
                for i in fileList:
                    fileItem = QtGui.QTreeWidgetItem(folderItem)

# Path: Extensions/Global.py
# def getDefaultFont():
# def iconFromPath(path):


# Path: Extensions/Projects/ProjectManager/ProjectView/ProjectView.py
import os
import ctypes
import shutil
from PyQt4 import QtGui, QtCore, QtXml
from Extensions import Global
from Extensions.Projects.ProjectManager.ProjectView.ProgressWidget import ProgressWidget

            if item.parent() is None:
                pass
            else:
                parentDir = item.parent().text(0)
                path = os.path.join(self.root, parentDir, item.text(0))
                self.fileActivated.emit(path)

    def search(self):
        text = self.searchLine.text().strip()
        if text == '':
            self.viewStack.setCurrentIndex(0)
            return
        self.searchThread.search(text, self.refactor.root,
                                self.projectTree.showAllFilesAct.isChecked())
        self.progressBar.show()

    def updateSearchTree(self, resultsDict):
        self.progressBar.hide()
        self.searchResultsTree.clear()
        self.viewStack.setCurrentIndex(1)
        if len(resultsDict) > 0:
            for folder, fileList in resultsDict.items():
                folderItem = QtGui.QTreeWidgetItem(self.searchResultsTree)
                pathRelativeToProject = folder.partition(
                    self.root + os.path.sep)[-1]
                folderItem.setText(0, pathRelativeToProject)
                folderItem.setForeground(0, QtGui.QBrush(
                    QtGui.QColor("#003366")))
                for i in fileList:
                    fileItem = QtGui.QTreeWidgetItem(folderItem)

                    icon = Global.iconFromPath(os.path.join(folder, i))