def set_chat_background(custom, filename=None): if custom: filename = filename[filename.find("/home"):] new_filename = app_data_path + 'custom_chat_background' + os.path.splitext(filename)[1] shutil.copyfile(filename, new_filename) settings.set('custom_chat_background', new_filename) else: new_filename = False settings.set('custom_chat_background', False) pyotherside.send('on-chat-background-changed', new_filename)
def settings_set(key, value): return settings.set(key, value)