← Back to team overview

cairo-dock-team team mailing list archive

[Merge] lp:~mycompostpile/cairo-dock-plug-ins-extras/YoutubeDl into lp:cairo-dock-plug-ins-extras

 

Brian has proposed merging lp:~mycompostpile/cairo-dock-plug-ins-extras/YoutubeDl into lp:cairo-dock-plug-ins-extras.

Requested reviews:
  Cairo-Dock Team (cairo-dock-team)

For more details, see:
https://code.launchpad.net/~mycompostpile/cairo-dock-plug-ins-extras/YoutubeDl/+merge/108653

Added tests to ensure URL and Video directories are valid and writeable. Display dialogs if they are not valid.

If the URL directory is not valid user gets a warning. If the user attempts to save the file then an error will be displayed if the file can't be saved.

If the Video directory is not writeable then downloading will be disabled until the user corrects the video directory. This way it ensures the backend downloader has the correct directory name. I still need to do some error handling when the downloader fails.

Corrected a bug for clearing the url list. If a download was active and the list was cleared then there was an issue. Removed the clear list from the right click if a download is in progress.

Corrected the saveas function in the fileDialog.py file to use the same options as the open dialog allowing an initial directory.

Added functionality for saving/loading the url list using an entry dialog if tkinter is not available.

Changed the default URL directory to be the users home folder.

Added tooltips in the YoutubeDl.conf file.

Added the CDApplet.DIALOG_KEY_ENTER to act as if the OK button is pressed in the on_answer_dialog function so the user can press enter as well as press the OK button.

Cleaned up some commented out lines.
-- 
https://code.launchpad.net/~mycompostpile/cairo-dock-plug-ins-extras/YoutubeDl/+merge/108653
Your team Cairo-Dock Team is requested to review the proposed merge of lp:~mycompostpile/cairo-dock-plug-ins-extras/YoutubeDl into lp:cairo-dock-plug-ins-extras.
=== modified file 'YoutubeDl/YoutubeDl'
--- YoutubeDl/YoutubeDl	2012-06-01 22:55:12 +0000
+++ YoutubeDl/YoutubeDl	2012-06-04 22:23:21 +0000
@@ -18,7 +18,6 @@
 #
 
 import gobject
-#from gobject import timeout_add
 from Configuration import Configuration
 from CDApplet import CDApplet, _
 import os, subprocess
@@ -51,6 +50,8 @@
             self.resultSummary = 'No Data'
             self.listAltered = False
             self.__debugMode = False
+            self.validVideoDirectory = False
+            self.validUrlDirectory = False
             self.startDownloader()
             CDApplet.__init__(self)
 
@@ -74,6 +75,7 @@
             if self.__showStatusOnIcon:
                 #self.icon.SetLabel(self.resultSummary)
                 self.icon.SetLabel("YoutubeDl")
+            self.reload()
 	    self.__setTimer()
 
         def end(self):
@@ -85,37 +87,45 @@
                 self.downloadManager.join(1)
 	
 	def on_click(self, iState):
+	    if self.useListView and (len(self.urlList) > self.urlListExceeds):
+	        endingCharacter = ';'
+            else:
+	        endingCharacter = '\n'
 
-	    #super(YoutubeDlPlugin, self).onClick(iState)
-            tempString = '          Current Download;'
+            tempString = '          Current Download' + endingCharacter
             if self.activeDownload:
-                tempString = tempString + '\n      -> '.join(self.urlList[0]) + ';'
+                #tempString = tempString + '\n      -> '.join(self.urlList[0]) + endingCharacter
+                tempString = tempString + '\n      -> '.join(self.urlList[0]) 
                 rangeStart = 1
             else:
-                tempString = tempString + '    -> None;'
+                tempString = tempString + '    -> None' + endingCharacter
                 rangeStart = 0
-            tempString = tempString + '\n          Current URL List;'
+            tempString = tempString + '\n          Current URL List' + endingCharacter
             if len(self.urlList) > rangeStart:
                 tempList = list()
                 for item in range(rangeStart,len(self.urlList)):
-                    #tempList.append('\n      -> '.join(self.urlList[item]))
                     tempList.append('\n      -> '.join(self.urlList[item]))
                 self.messageDebug(tempString)
-                #tempString = tempString + '\n'.join(tempList)
-                tempString = tempString + ';'.join(tempList)
-                self.messageDebug(tempString)
+                tempString = tempString + endingCharacter.join(tempList)
                 self.messageDebug(tempString)
             else:
                 tempString = tempString + '    -> Empty'
                 self.messageDebug(tempString)
-            self.icon.PopupDialog( {"message" : "Youtube Download URL List",
-            "buttons" : "ok",  
-            "icon" : "gtk-stock-edit"},
-            {"visible" : True,
-             "widget-type" : "list",
-             "multi-lines" : True,
-             "editable" : False,
-             "values" : tempString})
+	    if self.useListView and (len(self.urlList) > self.urlListExceeds):
+                self.icon.PopupDialog( {"message" : "Youtube Download URL List",
+                "buttons" : "ok",  
+                "icon" : "gtk-stock-edit"},
+                {"visible" : True,
+                 "widget-type" : "list",
+                 "multi-lines" : True,
+                 "editable" : False,
+                 "values" : tempString})
+            else:
+                self.icon.PopupDialog( {"message" : tempString,
+                "icon" : "gtk-stock-edit"},
+                {"visible" : True,
+                 "multi-lines" : True,
+                 "editable" : False, })
             self.currentDialog = PopupTypes.infoDialog
 	    return True
 
@@ -125,7 +135,7 @@
 	    """
 	    #super(YoutubeDlPlugin, self).onMiddleClick()
             if self.__actionOnMiddleClick == 'Open Video Folder':
-                subprocess.call(['xdg-open','/home/brian/Videos'], shell=False)
+                subprocess.call(['xdg-open',self.__videos_directory], shell=False)
             else:
                 alerts.doUserAlert(self,self.resultSummary,4)
                     
@@ -133,13 +143,32 @@
 	
 	def reload(self):
 
-            if not self.__videos_directory:
-                p = subprocess.Popen(["xdg-user-dir","VIDEOS"],stdout=subprocess.PIPE,stderr=subprocess.PIPE,shell=False)
-                directoryName, errors = p.communicate()
-                directoryName=directoryName.rstrip()
-                self.__videos_directory = os.path.abspath(directoryName)
-            if not self.__urlList_directory:
-                self.__urlList_directory = os.path.abspath('.')
+            if self.isWritable(self.__videos_directory):
+                self.validVideoDirectory = True
+            else:
+                self.validVideoDirectory = False
+                self.__startDownloads = False
+                self.__videos_directory = ''
+                tempString = "Error: Video Directory not writable.\n Please make sure directory is valid and writable"
+                self.icon.PopupDialog( {"message" : tempString,
+                "icon" : "gtk-stock-edit"},
+                {"visible" : True,
+                 "multi-lines" : True,
+                 "editable" : False, })
+                self.currentDialog = PopupTypes.infoDialog
+
+            if self.isWritable(self.__urlList_directory):
+                self.validUrlDirectory = True
+            else:
+                self.validUrlDirectory = False
+                tempString = "Warning:  URL Directory not writable. \nPlease make sure directory is valid and writable"
+                self.icon.PopupDialog( {"message" : tempString,
+                "icon" : "gtk-stock-edit"},
+                {"visible" : True,
+                 "multi-lines" : True,
+                 "editable" : False, })
+                self.currentDialog = PopupTypes.infoDialog
+
             if self.__showProgressOnIcon:
 	        self.icon.SetQuickInfo(str(self.result[0]))
 	
@@ -209,22 +238,22 @@
                 fileName, errors = p.communicate()
                 fileName=fileName.rstrip()
             self.urlList.append([str(cReceivedData),fileName])
-            #self.filenameList.append(fileName)
             self.messageDebug("onDropData: New URL List:\n"+str(self.urlList))
             self.listAltered = True
 
         def startDownload(self, url):
-            try:
-                self.work_queue.put(url)
-                self.messageDebug("startDownload: put url on work queue:\n"+url)
-                if self.__showAlertStartDownloads:
-                    alerts.doUserAlert(self,"Starting Download: "+url,4)
-                self.activeDownload = True
-                self.result = ['Starting','Starting','Starting','Starting']
-	        self.icon.SetQuickInfo(str(self.result[0]))
-            except Queue.Full:
-                self.messageDebug("startDownload: work queue is full:\n"+url)
-                alerts.doUserAlert(self,"Can't Download: Queue is Full",4)
+            if self.validVideoDirectory:
+                try:
+                    self.work_queue.put(url)
+                    self.messageDebug("startDownload: put url on work queue:\n"+url)
+                    if self.__showAlertStartDownloads:
+                        alerts.doUserAlert(self,"Starting Download: "+url,4)
+                    self.activeDownload = True
+                    self.result = ['Starting','Starting','Starting','Starting']
+	            self.icon.SetQuickInfo(str(self.result[0]))
+                except Queue.Full:
+                    self.messageDebug("startDownload: work queue is full:\n"+url)
+                    alerts.doUserAlert(self,"Can't Download: Queue is Full",4)
 
         def on_build_menu(self):
             self.messageDebug("onBuildMenu: context menu called")
@@ -239,10 +268,11 @@
                 {"label": "Save current URL list", 
                  "icon" : "gtk-save",
                  "id"   : menuEntries.saveURLs })
-                items.append(
-                {"label": "Clear current URL list", 
-                 "icon" : "gtk-delete",
-                 "id"   : menuEntries.clearURLs })
+                if not (self.activeDownload):
+                    items.append(
+                    {"label": "Clear current URL list", 
+                     "icon" : "gtk-delete",
+                     "id"   : menuEntries.clearURLs })
             if len(self.urlList) == 0:
                 items.append(
                 {"label": "Load URL list from file", 
@@ -254,10 +284,11 @@
                  "icon" : "gtk-media-pause", 
                  "id"   : menuEntries.pauseDownload })
             else:
-                items.append(
-                {"label": "Enable Downloading", 
-                 "icon" : "gtk-media-play", 
-                 "id"   : menuEntries.enableDownload })
+                if self.validVideoDirectory:
+                    items.append(
+                    {"label": "Enable Downloading", 
+                     "icon" : "gtk-media-play", 
+                     "id"   : menuEntries.enableDownload })
             self.icon.AddMenuItems(items)
 
         def on_menu_select(self,iNumEntry):
@@ -297,6 +328,8 @@
                 self.messageDebug("An unknown menu entry was received")
 
         def on_answer_dialog(self,button, userResponse): 
+            if button == CDApplet.DIALOG_KEY_ENTER:
+                button = 0
             if self.currentDialog == PopupTypes.confirmAbort:
                 self.messageDebug("onAnswerDialog: confirm abort: "+str(button)+" "+str(userResponse))
                 if button == 0:
@@ -310,8 +343,14 @@
                     del self.urlList[:]
             elif self.currentDialog == PopupTypes.saveListFilename:
                 self.messageDebug("onAnswerDialog: save list filename: "+str(button)+" "+str(userResponse))
+                if button == 0:
+                    fileName = os.path.abspath(self.__urlList_directory + "/" + userResponse)
+                    self.saveTheList(fileName)
             elif self.currentDialog == PopupTypes.getListFilename:
                 self.messageDebug("onAnswerDialog: get list filename: "+str(button)+" "+str(userResponse))
+                if button == 0:
+                    fileName = os.path.abspath(self.__urlList_directory + "/" + userResponse)
+                    self.readTheList(fileName)
             elif self.currentDialog == PopupTypes.infoDialog:
                 self.messageDebug("onAnswerDialog: info dialog : "+str(button)+" "+str(userResponse))
             elif self.currentDialog == PopupTypes.showUrlList:
@@ -322,37 +361,80 @@
             self.currentDialog = PopupTypes.infoDialog
 
         def saveURLs(self):
-            fileName=dialogs.saveUrlFilename()
+            fileName=dialogs.saveUrlFilename(self.__urlList_directory)
             if fileName == None:
                 self.messageDebug("returned filename is None")
+                dialog_attributes = {
+                        'message'    : "Please enter URL list filename to save",
+                        'use-markup' : True,
+                        'buttons'    : 'ok;cancel' }
+                widget_attributes = {
+                        'widget-type'   : 'text-entry',
+                        'initial-value' : "",
+                        'multi-lines'   : False}
+                self.icon.PopupDialog (dialog_attributes, widget_attributes)
+                self.currentDialog = PopupTypes.saveListFilename
             elif len(fileName) > 0:
                 self.messageDebug("returned filename is: "+fileName)
+                self.saveTheList(fileName)
             else:
                 self.messageDebug("returned filename is 0 ")
-            if len(fileName) > 0:
-                self.icon.ShowDialog("Saving list",4)
-                saveFile = open(fileName, 'w')
-                for item in range(len(self.urlList)):
-                    saveFile.write("{0}::{1}\n".format(self.urlList[item][0],self.urlList[item][1]))
-                saveFile.close()
-                self.listAltered = False
 
         def loadURLs(self):
             fileName=dialogs.openUrlFilename(self.__urlList_directory)
             if fileName == None:
                 self.messageDebug("returned filename is None")
+                dialog_attributes = {
+                        'message'    : "Please enter URL list file to open",
+                        'use-markup' : True,
+                        'buttons'    : 'ok;cancel' }
+                widget_attributes = {
+                        'widget-type'   : 'text-entry',
+                        'initial-value' : "",
+                        'multi-lines'   : False}
+                self.icon.PopupDialog (dialog_attributes, widget_attributes)
+                self.currentDialog = PopupTypes.getListFilename
             elif len(fileName) > 0:
-                del self.urlList[:]
-                self.urlList = [line.strip().split('::') for line in open(fileName)]
-                self.listAltered = False
-                self.messageDebug("new list is: ")
-                self.messageDebug(self.urlList)
+                self.readTheList(fileName)
             else:
                 self.messageDebug("returned filename is 0 ")
 
+        def saveTheList(self,fileName):
+                try:
+                    saveFile = open(fileName, 'w')
+                    self.icon.ShowDialog("Saving list",4)
+                    for item in range(len(self.urlList)):
+                        saveFile.write("{0}::{1}\n".format(self.urlList[item][0],self.urlList[item][1]))
+                    saveFile.close()
+                    self.listAltered = False
+                except IOError:
+                    tempString = "Error: Not able to save URL list file:\n" + fileName + "\nPlease make sure directory and filename are valid and writable"
+                    self.icon.PopupDialog( {"message" : tempString,
+                    "icon" : "gtk-stock-edit"},
+                    {"visible" : True,
+                     "multi-lines" : True,
+                     "editable" : False, })
+                    self.currentDialog = PopupTypes.infoDialog
+
+        def readTheList(self,fileName):
+                try:
+                    del self.urlList[:]
+                    self.urlList = [line.strip().split('::') for line in open(fileName)]
+                    self.listAltered = False
+                    self.messageDebug("new list is: ")
+                    self.messageDebug(self.urlList)
+                except IOError:
+                    tempString = "Error: Not able to read URL list file:\n" + fileName + "\nPlease make sure directory and filename are valid and readable"
+                    self.icon.PopupDialog( {"message" : tempString,
+                    "icon" : "gtk-stock-edit"},
+                    {"visible" : True,
+                     "multi-lines" : True,
+                     "editable" : False, })
+                    self.currentDialog = PopupTypes.infoDialog
+
         def messageDebug(self, message):
             """
-            I write message to console if I have permission to do this.
+            Write debug message to console.
             """
             if self.__debugMode:
                 print '<%s : %s>' % (self.__name, message)
@@ -365,13 +447,10 @@
             self.__debugMode = True
 
 
-	#def __setConfiguration(self):
 	def get_config(self, keyfile):
 	    """
 	    I reload the configuration.
 	    """
-	    #self.__config.refresh()
-	    #interval = int(self.__config.get('User Interface', 'interval'))
 	    interval = keyfile.getint('User Interface', 'interval')
 	    self.__interval = interval * 1000 # convert in millisecondes.
 	    self.__startDownloads = keyfile.getboolean('User Interface', 'startDownloads')
@@ -380,12 +459,23 @@
 	    self.__showAlertDownloadAbort = keyfile.getboolean('User Interface', 'showAlertDownloadAbort')
 	    self.__showAlertAddURL = keyfile.getboolean('User Interface', 'showAlertAddURL')
 	    self.usePynotify = keyfile.getboolean('User Interface', 'usePynotify')
+	    self.useListView = keyfile.getboolean('User Interface', 'useListView')
+	    self.urlListExceeds = keyfile.getint('User Interface', 'urlListExceeds')
 	    self.__actionOnMiddleClick = keyfile.get('User Interface', 'actionOnMiddleClick')
 	    self.__showProgressOnIcon = keyfile.getboolean('User Interface', 'showProgressOnIcon')
 	    self.__showStatusOnIcon = keyfile.getboolean('User Interface', 'showStatusOnIcon')
 	    self.__videos_directory = keyfile.get('User Interface', 'videos_directory')
 	    self.__urlList_directory = keyfile.get('User Interface', 'urlList_directory')
 	    self.__setTimer()
+
+            if not self.__videos_directory:
+                p = subprocess.Popen(["xdg-user-dir","VIDEOS"],stdout=subprocess.PIPE,stderr=subprocess.PIPE,shell=False)
+                directoryName, errors = p.communicate()
+                directoryName=directoryName.rstrip()
+                self.__videos_directory = os.path.abspath(directoryName)
+                
+            if not self.__urlList_directory:
+                self.__urlList_directory = os.path.expanduser("~")
 	
 	def __setTimer(self):
 	    """
@@ -403,6 +493,21 @@
 	    	gobject.source_remove(self.__timerId)
 	    	gobject.source_remove(self.__timerId)
 
+        def isWritable(self, directory):
+            try:
+                tmp_prefix = "write_tester";
+                count = 0
+                filename = os.path.join(directory, tmp_prefix)
+                while(os.path.exists(filename)):
+                    filename = "{}.{}".format(os.path.join(directory, tmp_prefix),count)
+                    count = count + 1
+                f = open(filename,"w")
+                f.close()
+                os.remove(filename)
+                return True
+            except Exception as e:
+                return False
+
 ############
 ### main ###
 ############

=== modified file 'YoutubeDl/YoutubeDl.conf'
--- YoutubeDl/YoutubeDl.conf	2012-06-02 21:46:21 +0000
+++ YoutubeDl/YoutubeDl.conf	2012-06-04 22:23:21 +0000
@@ -95,6 +95,7 @@
 [User Interface]
 
 #b Start downloading videos imediately? :
+#{Otherwise use right click and enable downloads}
 startDownloads = true
 
 #v
@@ -114,9 +115,11 @@
 mySep =
 
 #b Show download progress on icon? :
+#{Otherwise just use middle click to monitor status}
 showProgressOnIcon = true
 
 #b Show download status in icon label when hovering over icon? :
+#{Otherwise just show the plugin name and use middle click to monitor status}
 showStatusOnIcon = true
 
 #v
@@ -126,20 +129,33 @@
 frame_notify=
 
 #b Show a pop-up message when starting downloads? :
+#{Otherwise quietly start to the next download}
 showAlertStartDownloads = true
 
 #b Show a pop-up message when download is complete? :
+#{Otherwise quietly move finish the download}
 showAlertDownloadComplete = true
 
 #b Show a pop-up message when download is aborted? :
+#{Otherwise quietly abort the download}
 showAlertDownloadAbort = true
 
 #b Show a pop-up message when adding url to queue list? :
+#{Otherwise just quietly add the url to the list}
 showAlertAddURL = false
 
 #b Attempt to use desktop notifications instead of dock messages? :
+#{if pynotify is installed a system notification message will appear, otherwise the standard dock dialogue messages will be used.}
 usePynotify = false
 
+#B- Use list view when URL list exceeds specified number?:
+#{This is usefull if you have long lists of urls to view when you left click on the icon. Otherwise the standard dialogue message is fine.}
+useListView=True
+
+#i[1;30] Use list view when number of URLs exceed:
+#{When the number of URLS exceed this number switch to list view instead of a regular dialogue}
+urlListExceeds = 10
+
 #X
 myDummyFrame =
 #v
@@ -153,23 +169,30 @@
 videos_directory = 
 
 #D Save URL List to this directory:
-#{The path to save the URL list to. Leave it empty to use the default one (currently in the plugin directory).}
+#{The path to save the URL list to. Leave it empty to use the default one (currently in the users home directory).}
 urlList_directory = 
 
 [Download Options]
 #>        Set the download options that will be used for the youtubedl backend
 thisLabel3=
 
-#b Resume partially downloaded files (--continue)?
+#v
+mySep =
+
+#b Resume download (--continue)?
+#{Resume partially downloaded files}
 resumeDownload = true
 
-#b Ignore errors during download (--ignore-errors)?
+#b Ignore errors (--ignore-errors)?
+#{Ignore errors during download and continue processing.}
 ignoreErrors = true
 
-#b Do no overwrite already existing files (--no-overwrites)?
+#b No overwrite (--no-overwrites)?
+#{If file exists fo not attempt to over write the file.}
 noOverwrites = true
 
-#b Use the title of the video in the file name used to download the video (--title)?
+#b Use title (--title)?
+#{Use the title of the video in the file name used to download the video}
 useTitle = true
 
 #v
@@ -178,10 +201,12 @@
 #y[Specify the video format;Limit the maximum quality;Download default format] Which download format to use:
 useFormat=0
 
-#L[H264 - MP4 at 480p;H264 - MP4 at 720p;H264 - MP4 at 1080p;H264 - FLV at 360p;H264 - FLV at 480p;H263 - FLV at 240p;Webm at 480p;Webm at 720p;3GP video] Specify the video format (quality) in which to download the video (--format):
+#L[H264 - MP4 at 480p;H264 - MP4 at 720p;H264 - MP4 at 1080p;H264 - FLV at 360p;H264 - FLV at 480p;H263 - FLV at 240p;Webm at 480p;Webm at 720p;3GP video] Video format (--format):
+#{Specify the video format (quality) in which to download the video.}
 videoFormat=
 
-#L[H264 - MP4 at 480p;H264 - MP4 at 720p;H264 - MP4 at 1080p;H264 - FLV at 360p;H264 - FLV at 480p;H263 - FLV at 240p;Webm at 480p;Webm at 720p;3GP video] Limit the maximum quality of the videos to download to (--max-quality):
+#L[H264 - MP4 at 480p;H264 - MP4 at 720p;H264 - MP4 at 1080p;H264 - FLV at 360p;H264 - FLV at 480p;H263 - FLV at 240p;Webm at 480p;Webm at 720p;3GP video] Maximum quality (--max-quality):
+#{Limit the maximum quality of the videos to download.}
 maxVideoFormat=
 
 #>Download the default format.
@@ -191,15 +216,18 @@
 mySep =
 
 #B- Use the Username and Passwrod authentication process.
+#{Some videos require an account to be downloaded, mostly because they're flagged as mature content.}
 useAuthentication=false
 
 #F[Username/Password]
 authFrame=
 
 #s Username:
+#{Specify the youtube account username UserName.}
 userName=
 
 #p Password:
+#{Like the username, specifies the account password.}
 userPassword=
 
 #F

=== modified file 'YoutubeDl/fileDialogs.py'
--- YoutubeDl/fileDialogs.py	2012-05-31 00:01:58 +0000
+++ YoutubeDl/fileDialogs.py	2012-06-04 22:23:21 +0000
@@ -7,43 +7,28 @@
         # define options for opening or saving a file
         file_opt = options = {}
         options['defaultextension'] = 'txt' # couldn't figure out how this works
-        options['filetypes'] = [('all files', '.*'), ('text files', '.txt')]
+        options['filetypes'] = [('text files', '.txt'), ('all files', '.*')]
         options['initialdir'] = initialDirectory
-        #options['initialfile'] = initialDirectory
         options['title'] = 'Please select a url list file to open'
         options['parent'] = rootDialog
-        #fileName = tkFileDialog.askopenfilename(parent=rootDialog,title='Please select file to open')
         fileName = tkFileDialog.askopenfilename(**file_opt)
         rootDialog.destroy()
         return fileName
 
-    def saveUrlFilename():
+    def saveUrlFilename(initialDirectory):
         rootDialog = Tkinter.Tk()
-        fileName = tkFileDialog.asksaveasfilename(parent=rootDialog,title='Please select file to open')
+        file_opt = options = {}
+        options['defaultextension'] = 'txt' # couldn't figure out how this works
+        options['filetypes'] = [('text files', '.txt'), ('all files', '.*')]
+        options['initialdir'] = initialDirectory
+        options['title'] = 'Please select a url list file to save'
+        options['parent'] = rootDialog
+        fileName = tkFileDialog.askopenfilename(**file_opt)
         rootDialog.destroy()
         return fileName
 
 except ImportError:
-    def openUrlFilename():
-        return None
-    def saveUrlFilename():
-        return None
-    #from PopupDialogTypes import *
-
-    #def openUrlFilename(master):
-        #master.PopupDialog( {"message" : "Enter filename to open:",  
-            #"buttons" : "ok;cancel",  
-            #"icon" : "gtk-stock-edit"},  
-            #{"widget-type" : "text-entry",  
-            #"visible" : False} )
-        #master.currentDialog = PopupDialogTypes.infoDialog
-        #return None
-
-    #def saveUrlFilename(master):
-        #master.PopupDialog( {"message" : "Enter filename to open:",  
-            #"buttons" : "ok;cancel",  
-            #"icon" : "gtk-stock-edit"},  
-            #{"widget-type" : "text-entry",  
-            #"visible" : False} )
-        #master.currentDialog = PopupDialogTypes.infoDialog
-        #return None
+    def openUrlFilename(initialDirectory):
+        return None
+    def saveUrlFilename(initialDirectory):
+        return None


Follow ups