Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def qt_code( recent_tags ):
if not self or not QP.isValid( self ):
return
self._last_fetched_tags = recent_tags
self._UpdateTagDisplay()
if len( self._recent_tags.GetTags() ) > 0:
self._recent_tags.SelectTopItem()
def qt_code( ipfs_shares ):
if not self or not QP.isValid( self ):
return
# list of ( multihash, num_files, total_size, note )
self._ipfs_shares.SetData( ipfs_shares )
def qt_code( mappings ):
if not self or not QP.isValid( self ):
return
self._mappings = mappings
self._mappings_list_ctrl.SetData( self._mappings )
self._status_st.setText( '' )
if not self._started_external_ip_fetch:
self._started_external_ip_fetch = True
self._RefreshExternalIP()
def _Refresh( self ):
if not self or not QP.isValid( self ):
return
HG.client_controller.CallToThread( self.THREADFetchInfo, self._service )
def qt_code( splash ):
if splash and QP.isValid( splash ):
splash.hide()
splash.close()
def _Refresh( self ):
if not self or not QP.isValid( self ):
return
port = self._service.GetPort()
if port is None:
status = 'The local booru is not running.'
else:
status = 'The local booru should be running on port {}.'.format( port )
upnp_port = self._service.GetUPnPPort()
def qt_code():
if not self or not QP.isValid( self ):
return
script_names_to_scripts = { script.GetName() : script for script in scripts }
for ( name, script ) in list(script_names_to_scripts.items()):
self._script_choice.addItem( script.GetName(), script )
new_options = HG.client_controller.new_options
favourite_file_lookup_script = new_options.GetNoneableString( 'favourite_file_lookup_script' )
if favourite_file_lookup_script in script_names_to_scripts:
def qt_deliver_result( result ):
if self._win is None or not QP.isValid( self._win ):
self._win = None
return
self._publishResult( result )
def _Refresh( self ):
if not self or not QP.isValid( self ):
return
port = self._service.GetPort()
if port is None:
status = 'The client api is not running.'
else:
status = 'The client api should be running on port {}.'.format( port )
upnp_port = self._service.GetUPnPPort()
if parent is None:
width = min_width
height = min_height
else:
parent_window = parent.window()
# when we initialise, we might not have a frame yet because we haven't done show() yet
# so borrow main gui's
if frame_padding.isEmpty():
main_gui = HG.client_controller.gui
if main_gui is not None and QP.isValid( main_gui ) and not main_gui.isFullScreen():
frame_padding = main_gui.frameGeometry().size() - main_gui.size()
if parent_window.isFullScreen():
parent_available_size = parent_window.size()
else:
parent_frame_size = parent_window.frameGeometry().size()
parent_available_size = parent_frame_size - frame_padding