#NEWLINE# def rssWatchControl( self , start = False , stop = False , close = False ) : #NEWLINE# #INDENT# from arelle.ModelDocument import Type #NEWLINE# from arelle import WatchRss #NEWLINE# if ( not self . modelManager . rssWatchOptions . get ( 'feedSourceUri' ) ) : #NEWLINE# #INDENT# tkinter . messagebox . showwarning ( _ ( 'RSS Watch Control Error' ) , _ ( 'RSS Feed is not set up, please select options and select feed' ) , parent = self . parent ) #NEWLINE# return False #NEWLINE# #UNINDENT# rssModelXbrl = None #NEWLINE# for loadedModelXbrl in self . modelManager . loadedModelXbrls : #NEWLINE# #INDENT# if ( ( loadedModelXbrl . modelDocument . type == Type . RSSFEED ) and ( loadedModelXbrl . modelDocument . uri == self . modelManager . rssWatchOptions . get ( 'feedSourceUri' ) ) ) : #NEWLINE# #INDENT# rssModelXbrl = loadedModelXbrl #NEWLINE# break #NEWLINE# #UNINDENT# #UNINDENT# if self : #NEWLINE# #INDENT# if ( not rssModelXbrl ) : #NEWLINE# #INDENT# rssModelXbrl = self . modelManager . create ( Type . RSSFEED , self . modelManager . rssWatchOptions . get ( 'feedSourceUri' ) ) #NEWLINE# self . showLoadedXbrl ( rssModelXbrl , False ) #NEWLINE# #UNINDENT# if ( not hasattr ( rssModelXbrl , 'watchRss' ) ) : #NEWLINE# #INDENT# WatchRss . initializeWatcher ( rssModelXbrl ) #NEWLINE# #UNINDENT# rssModelXbrl . watchRss . start ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if stop : #NEWLINE# #INDENT# if ( rssModelXbrl and rssModelXbrl . watchRss ) : #NEWLINE# #INDENT# rssModelXbrl . watchRss . stop ( )