コード例 #1
0
ファイル: gmDataPackWidgets.py プロジェクト: jeromecc/gnumed
 def configure_dpl_url(item):
     gmCfgWidgets.configure_string_option(
         parent=parent,
         message=_('Please enter the URL under which to load\n'
                   'the list of available data packs.\n'
                   '\n'
                   'The default URL is:\n'
                   '\n'
                   ' [%s]\n') % default_dpl_url,
         option=dpl_url_option,
         bias=u'workplace',
         default_value=default_dpl_url,
         validator=validate_url)
     return True
コード例 #2
0
ファイル: gmDataPackWidgets.py プロジェクト: sk/gnumed
	def configure_dpl_url(item):
		gmCfgWidgets.configure_string_option (
			parent = parent,
			message = _(
				'Please enter the URL under which to load\n'
				'the list of available data packs.\n'
				'\n'
				'The default URL is:\n'
				'\n'
				' [%s]\n'
			) % default_dpl_url,
			option = dpl_url_option,
			bias = u'workplace',
			default_value = default_dpl_url,
			validator = validate_url
		)
		return True
コード例 #3
0
def configure_visual_progress_note_editor():
    def is_valid(value):

        if value is None:
            gmDispatcher.send(signal='statustext',
                              msg=_('You need to actually set an editor.'),
                              beep=True)
            return False, value

        if value.strip() == u'':
            gmDispatcher.send(signal='statustext',
                              msg=_('You need to actually set an editor.'),
                              beep=True)
            return False, value

        found, binary = gmShellAPI.detect_external_binary(value)
        if not found:
            gmDispatcher.send(signal='statustext',
                              msg=_('The command [%s] is not found.') % value,
                              beep=True)
            return True, value

        return True, binary

    #------------------------------------------
    cmd = gmCfgWidgets.configure_string_option(
        message=_('Enter the shell command with which to start\n'
                  'the image editor for visual progress notes.\n'
                  '\n'
                  'Any "%(img)s" included with the arguments\n'
                  'will be replaced by the file name of the\n'
                  'note template.'),
        option=u'external.tools.visual_soap_editor_cmd',
        bias='user',
        default_value=None,
        validator=is_valid)

    return cmd