musicguru / cocoa /

# Created By: Virgil Dupras
# Created On: 2006/03/19
# Copyright 2010 Hardcoded Software (
# This software is licensed under the "HS" License as described in the "LICENSE" file, 
# which should be included with this package. The terms are also available at 

import sys
import objc

from hscommon import job
from hscommon.cocoa.inter import signature, PyFairware
from hscommon.cocoa.objcmin import NSObject

from core import app_cocoa, design

# Fix py2app imports which chokes on relative imports
from core import app, fs_utils, sqlfs
from core.sqlfs import _sql, music, strings, utils
from hsfs import auto, stats, tree, music
from hsfs.phys import music
from hsaudiotag import aiff, flac, genres, id3v1, id3v2, mp4, mpeg, ogg, wma

class PyMassRenamePanel(NSObject):
    def setRefDir(self,refdir):
        #You MUST call this before starting to use the class
        self.panel = design.MassRenamePanel(refdir)
    def changeExampleSong(self):
    def getExampleDisplayAfter(self):
        return self.panel.example_after
    def getExampleDisplayBefore(self):
        return self.panel.example_before
    def getModel(self):
        return self.panel.model
    def getWhitespace(self):
        return self.panel.whitespace
    def setCustomModel_(self,model):
        self.panel.custom_model = model
    def setModelSelectedRow_(self,row):
        self.panel.model_index = row
    def setWhitespaceSelectedRow_(self,row):
        self.panel.whitespace_index = row

class PySplitPanel(NSObject):
    def setRefDir(self,refdir):
        #You MUST call this before starting to use the class
        self.panel = design.SplittingPanel(refdir)
    def getGroupingExample(self):
        return self.panel.example
    def getCapacity(self):
        return self.panel.capacity
    def getGroupingLevel(self):
        return self.panel.grouping_level
    def getModel(self):
        return self.panel.model
    def setCapacitySelectedRow_(self,row):
        self.panel.capacity_index = row
    def setCustomCapacity_(self,capacity):
        self.panel.custom_capacity = capacity
    def setCustomModel_(self,model):
        self.panel.custom_model = model
    def setGroupingLevel_(self,level):
        self.panel.grouping_level = level
    def setModelSelectedRow_(self,row):
        self.panel.model_index = row

class PyApp(NSObject):
    pass #fake class

class PyMusicGuru(PyFairware):
    def init(self):
        self = super(PyMusicGuru,self).init() = app_cocoa.MusicGuru()
        return self
    def addLocationWithPath_name_removeable_(self, path, name, removeable):
        return, name, removeable)
    def canAddLocationWithPath_name_(self,path,name):
    def setPath_ofLocationNamed_(self, path, name):, path)
    def locationNamesInBoard_writable_(self,in_board,writable):
    def removeLocationNamed_(self,name):
    def toggleLocation_(self,index):
    def updateLocationNamed_(self, name):
    def conflictCount(self):
        return len(
    def emptyBoard(self):
    def getBoardStats(self):
    def getMassRenamePanel(self):
        result = PyMassRenamePanel.alloc().init()
        return result
    def getSplitPanel(self):
        result = PySplitPanel.alloc().init()
        return result
    def isNodeConflicted_(self,node_path):
    def isBoardSplitted(self):
    def massRenameWithModel_whitespaceType_(self, model, whitespace):, whitespace)
    def moveConflicts(self):
        #Returns true is at least one conflict has been moved
    def moveConflictsAndOriginals(self):
        #Returns true is at least one conflict has been moved
    def moveToIgnoreBox_(self,node_paths):
    def newFolderIn_(self,node_path):
    def performDragFrom_withNodes_to_withNode_(self,source_tag,source_node_paths,dest_tag,dest_node_path):
    def removeEmptyFolders(self):
    def renameNode_to_(self,node_path,new_name):
    def selectBoardSongs_(self,node_paths):
    def splitWithModel_capacity_groupingLevel_(self, model, capacity, grouping_level):
            return, capacity, grouping_level)
    def switchConflictAndOriginal_(self,node_path):
    def unsplit(self):
    def copyOrMove_toPath_onNeedCDPanel_(self,copy,destination,panel):, destination, panel)
    def renameInRespectiveLocations(self):
    def isNodeContainer_(self,node_path):
    def updateCollection(self):
    def getOutlineViewMaxLevel_(self, tag):
        return 0 # no max level
    def getOutlineView_childCountsForPath_(self, tag, node_path):
        return, node_path)
    def getOutlineView_valuesForIndexes_(self,tag,node_path):
    def getOutlineView_markedAtIndexes_(self,tag,node_path):
        return False
    def getTableViewCount_(self,tag):
    def getTableViewMarkedIndexes_(self,tag):
    def getTableView_valuesForRow_(self,tag,row):
    def getJobProgress(self):
    def getJobDesc(self):
    def cancelJob(self): = True
    def jobCompleted_(self, jobid):
    def appName(self):
        return "musicGuru"
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.