From 2670cca5781bff5b414590a6227ed378ba6578cd Mon Sep 17 00:00:00 2001 From: James Bunton Date: Sat, 14 Jan 2012 11:18:54 +1100 Subject: [PATCH] Version 1.8 * Added Edit menu the usual copy/paste goo * Added Choose Folder to file menu * Better error message on first run if sync is clicked with no folder selected --- English.lproj/NotiPod.xib | 323 +++++++++++++++++++++++++++++++++++--- Info.plist | 4 +- notipod_cli.py | 2 +- notipod_gui.py | 21 ++- 4 files changed, 320 insertions(+), 30 deletions(-) diff --git a/English.lproj/NotiPod.xib b/English.lproj/NotiPod.xib index edbf8b2..b82a05f 100644 --- a/English.lproj/NotiPod.xib +++ b/English.lproj/NotiPod.xib @@ -12,9 +12,9 @@ YES - - + + YES @@ -186,6 +186,25 @@ + + + Choose Folder + C + 1048576 + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + Close @@ -1279,45 +1298,101 @@ 539 + + + performClose: + + + + 605 + + + + undo: + + + + 610 + + + + redo: + + + + 611 + + + + cut: + + + + 612 + copy: - + - 586 + 613 - selectAll: - - + paste: + + - 587 + 614 - performClose: + delete: - + - 605 + 615 + + + + selectAll: + + + + 616 + + + + link + + + + 619 - performClick: - + doSync: + - 608 + 620 - performClick: - + doPreview: + - 609 + 621 + + + + doSelectFolder: + + + + 622 @@ -1872,6 +1947,8 @@ + + @@ -1890,6 +1967,16 @@ + + 618 + + + + + 617 + + + @@ -1945,6 +2032,7 @@ 396.IBPluginDependency 411.IBPluginDependency 412.IBPluginDependency + 413.IBEditorWindowLastContentRect 413.IBPluginDependency 413.editorWindowContentRectSynchronizationRect 414.IBPluginDependency @@ -2011,6 +2099,8 @@ 597.ImportedFromIB2 606.IBPluginDependency 607.IBPluginDependency + 617.IBPluginDependency + 618.IBPluginDependency YES @@ -2047,9 +2137,9 @@ {74, 862} {{529, 476}, {148, 20}} - {{329, 160}, {381, 527}} + {{485, 95}, {381, 527}} com.apple.InterfaceBuilder.CocoaPlugin - {{329, 160}, {381, 527}} + {{485, 95}, {381, 527}} {{505, 213}, {252, 190}} @@ -2063,6 +2153,7 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + {{503, 173}, {335, 33}} com.apple.InterfaceBuilder.CocoaPlugin {{89, 581}, {211, 33}} com.apple.InterfaceBuilder.CocoaPlugin @@ -2121,7 +2212,7 @@ com.apple.InterfaceBuilder.CocoaPlugin - {{414, 687}, {177, 63}} + {{414, 657}, {189, 93}} com.apple.InterfaceBuilder.CocoaPlugin {{323, 672}, {199, 203}} @@ -2129,6 +2220,8 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin @@ -2147,7 +2240,7 @@ - 609 + 622 @@ -2346,6 +2439,194 @@ + + YES + + FolderModel + NSObject + + doSelectFolder: + id + + + doSelectFolder: + + doSelectFolder: + id + + + + YES + + YES + folderPopup + window + + + YES + id + id + + + + YES + + YES + folderPopup + window + + + YES + + folderPopup + id + + + window + id + + + + + IBDocumentRelativeSource + notipod.app/Contents/Resources/notipod_gui.py + + + + NotiPodController + NSObject + + YES + + YES + doCancel: + doPreview: + doSync: + + + YES + id + id + id + + + + YES + + YES + doCancel: + doPreview: + doSync: + + + YES + + doCancel: + id + + + doPreview: + id + + + doSync: + id + + + + + YES + + YES + folderModel + loadingIndicator + loadingLabel + loadingSheet + playlistModel + previewText + previewWindow + window + + + YES + id + id + id + id + id + id + id + id + + + + YES + + YES + folderModel + loadingIndicator + loadingLabel + loadingSheet + playlistModel + previewText + previewWindow + window + + + YES + + folderModel + id + + + loadingIndicator + id + + + loadingLabel + id + + + loadingSheet + id + + + playlistModel + id + + + previewText + id + + + previewWindow + id + + + window + id + + + + + + + PlaylistModel + NSObject + + outlineView + id + + + outlineView + + outlineView + id + + + + + 0 IBCocoaFramework diff --git a/Info.plist b/Info.plist index d3b1369..e16abbd 100644 --- a/Info.plist +++ b/Info.plist @@ -17,11 +17,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.7 + 1.8 CFBundleSignature ???? CFBundleVersion - 1.7 + 1.8 NSMainNibFile NotiPod NSPrincipalClass diff --git a/notipod_cli.py b/notipod_cli.py index 0d7c44e..70a3413 100755 --- a/notipod_cli.py +++ b/notipod_cli.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -VERSION = "1.7" +VERSION = "1.8" import logging import optparse diff --git a/notipod_gui.py b/notipod_gui.py index e5ea98b..54cf425 100644 --- a/notipod_gui.py +++ b/notipod_gui.py @@ -186,12 +186,22 @@ class NotiPodController(NSObject): def doCancel_(self, sender): self.runningGenerator = False + def getDestFolder(self): + folders = self.folders() + if not folders: + NSRunAlertPanel("Error!", "You must choose a folder first!", "Ok", None, None) + return + folder = folders[0] + if not os.path.isdir(folder.encode("utf-8")): + NSRunAlertPanel("Error!", "Destination " + folder + " does not exist, try mounting it first?", "Ok", None, None) + return + return folder + def doPreviewThread(self): yield "Calculating changes..." - folder = self.folders()[0] - if not os.path.isdir(folder.encode("utf-8")): - NSRunAlertPanel("Error!", "Destination " + folder + " does not exist, try mounting it first?", "Ok", None, None) + folder = self.getDestFolder() + if not folder: return all_tracks = [] @@ -222,9 +232,8 @@ class NotiPodController(NSObject): @objc.IBAction def doSync_(self, sender): - folder = self.folders()[0] - if not os.path.isdir(folder.encode("utf-8")): - NSRunAlertPanel("Error!", "Destination " + folder + " does not exist, try mounting it first?", "Ok", None, None) + folder = self.getDestFolder() + if not folder: return all_tracks = [] -- 2.39.2