base,base_setup: improve wizard
- use gtk-dialog-info instead of gtk-info - set default action bzr revid: ced-b18f17b6748fa8ae0146967fd520fb1ce9aad5a8
This commit is contained in:
parent
8dfb2b7a0a
commit
c89f5f515e
|
@ -25,7 +25,6 @@
|
|||
#
|
||||
##############################################################################
|
||||
|
||||
import wizard_install_module
|
||||
import wizard_update_module
|
||||
import wizard_module_upgrade
|
||||
import wizard_module_lang_install
|
||||
|
|
|
@ -36,7 +36,7 @@ import pooler
|
|||
|
||||
view_form_init="""<?xml version="1.0"?>
|
||||
<form string="Export language">
|
||||
<image name="gtk-info" size="64" colspan="2"/>
|
||||
<image name="gtk-dialog-info" colspan="2"/>
|
||||
<group colspan="2" col="4">
|
||||
<separator string="Export translation file" colspan="4"/>
|
||||
<label align="0.0" string="Choose a language to export:" colspan="4"/>
|
||||
|
@ -46,7 +46,7 @@ view_form_init="""<?xml version="1.0"?>
|
|||
|
||||
view_form_finish="""<?xml version="1.0"?>
|
||||
<form string="Export language">
|
||||
<image name="gtk-info" size="64" colspan="2"/>
|
||||
<image name="gtk-dialog-info" colspan="2"/>
|
||||
<group colspan="2" col="4">
|
||||
<separator string="Export done" colspan="4"/>
|
||||
<field name="data" readonly="1" colspan="3"/>
|
||||
|
@ -80,12 +80,22 @@ class wizard_export_lang(wizard.interface):
|
|||
}
|
||||
states={
|
||||
'init':{
|
||||
'actions':[],
|
||||
'result':{'type':'form', 'arch':view_form_init, 'fields': fields_form, 'state':[('end', 'Cancel', 'gtk-cancel'),('finish', 'Ok', 'gtk-ok')]}
|
||||
'actions': [],
|
||||
'result': {'type': 'form', 'arch': view_form_init, 'fields': fields_form,
|
||||
'state': [
|
||||
('end', 'Cancel', 'gtk-cancel'),
|
||||
('finish', 'Ok', 'gtk-ok', True)
|
||||
]
|
||||
}
|
||||
},
|
||||
'finish':{
|
||||
'actions':[_get_file],
|
||||
'result':{'type':'form', 'arch':view_form_finish, 'fields': fields_form_finish, 'state':[('end', 'Close', 'gtk-cancel')]}
|
||||
'actions': [_get_file],
|
||||
'result': {'type': 'form', 'arch': view_form_finish,
|
||||
'fields': fields_form_finish,
|
||||
'state': [
|
||||
('end', 'Close', 'gtk-cancel', True)
|
||||
]
|
||||
}
|
||||
},
|
||||
}
|
||||
wizard_export_lang('module.lang.export')
|
||||
|
|
|
@ -34,7 +34,7 @@ import pooler
|
|||
|
||||
view_form="""<?xml version="1.0"?>
|
||||
<form string="Import language">
|
||||
<image name="gtk-info" size="64" colspan="2"/>
|
||||
<image name="gtk-dialog-info" colspan="2"/>
|
||||
<group colspan="2" col="4">
|
||||
<separator string="Import new language" colspan="4"/>
|
||||
<field name="name"/>
|
||||
|
@ -58,8 +58,13 @@ class wizard_import_lang(wizard.interface):
|
|||
}
|
||||
states={
|
||||
'init':{
|
||||
'actions':[],
|
||||
'result':{'type':'form', 'arch':view_form, 'fields':fields_form, 'state':[('end', 'Cancel', 'gtk-cancel'), ('finish', 'Ok', 'gtk-ok')]}
|
||||
'actions': [],
|
||||
'result': {'type': 'form', 'arch': view_form, 'fields': fields_form,
|
||||
'state':[
|
||||
('end', 'Cancel', 'gtk-cancel'),
|
||||
('finish', 'Ok', 'gtk-ok', True)
|
||||
]
|
||||
}
|
||||
},
|
||||
'finish':{
|
||||
'actions':[],
|
||||
|
|
|
@ -93,10 +93,13 @@ class move_module_wizard(wizard.interface):
|
|||
'init': {
|
||||
'actions': [],
|
||||
'result': {
|
||||
'type':'form',
|
||||
'arch':ask_form,
|
||||
'fields':ask_fields,
|
||||
'state':[('end','Cancel'),('import','Import module')]
|
||||
'type': 'form',
|
||||
'arch': ask_form,
|
||||
'fields': ask_fields,
|
||||
'state': [
|
||||
('end', 'Cancel', 'gtk-cancel'),
|
||||
('import', 'Import module', 'gtk-ok', True)
|
||||
]
|
||||
}
|
||||
},
|
||||
'import': {
|
||||
|
|
|
@ -32,7 +32,7 @@ import tools
|
|||
|
||||
view_form_end = """<?xml version="1.0"?>
|
||||
<form string="Language file loaded.">
|
||||
<image name="gtk-info" size="64" colspan="2"/>
|
||||
<image name="gtk-dialog-info" colspan="2"/>
|
||||
<group colspan="2" col="4">
|
||||
<separator string="Installation done" colspan="4"/>
|
||||
<label align="0.0" string="The selected language has been successfully installed.\nYou must change the preferences of the user and open a new menu to view changes." colspan="4"/>
|
||||
|
@ -41,7 +41,7 @@ view_form_end = """<?xml version="1.0"?>
|
|||
|
||||
view_form = """<?xml version="1.0"?>
|
||||
<form string="System Upgrade">
|
||||
<image name="gtk-info" size="64" colspan="2"/>
|
||||
<image name="gtk-dialog-info" colspan="2"/>
|
||||
<group colspan="2" col="4">
|
||||
<separator string="System Upgrade" colspan="4"/>
|
||||
<label align="0.0" string="Choose a language to install:" colspan="4"/>
|
||||
|
@ -72,11 +72,20 @@ class wizard_lang_install(wizard.interface):
|
|||
states = {
|
||||
'init': {
|
||||
'actions': [],
|
||||
'result': {'type':'form', 'arch':view_form, 'fields': fields_form, 'state':[('end','Cancel','gtk-cancel'),('start','Start installation','gtk-ok')]}
|
||||
'result': {'type': 'form', 'arch': view_form, 'fields': fields_form,
|
||||
'state': [
|
||||
('end', 'Cancel', 'gtk-cancel'),
|
||||
('start', 'Start installation', 'gtk-ok', True)
|
||||
]
|
||||
}
|
||||
},
|
||||
'start': {
|
||||
'actions': [_lang_install],
|
||||
'result': {'type':'form', 'arch':view_form_end, 'fields': {}, 'state':[('end','Ok','gtk-ok')]}
|
||||
'result': {'type': 'form', 'arch': view_form_end, 'fields': {},
|
||||
'state': [
|
||||
('end', 'Ok', 'gtk-ok', True)
|
||||
]
|
||||
}
|
||||
},
|
||||
}
|
||||
wizard_lang_install('module.lang.install')
|
||||
|
|
|
@ -40,7 +40,7 @@ view_form_end = """<?xml version="1.0"?>
|
|||
|
||||
view_form = """<?xml version="1.0"?>
|
||||
<form string="System Upgrade">
|
||||
<image name="gtk-info" size="64" colspan="2"/>
|
||||
<image name="gtk-dialog-info" colspan="2"/>
|
||||
<group colspan="2" col="4">
|
||||
<label align="0.0" string="Your system will be upgraded." colspan="4"/>
|
||||
<label align="0.0" string="Note that this operation my take a few minutes." colspan="4"/>
|
||||
|
@ -81,11 +81,20 @@ class wizard_info_get(wizard.interface):
|
|||
states = {
|
||||
'init': {
|
||||
'actions': [_get_install],
|
||||
'result': {'type':'form', 'arch':view_form, 'fields': view_field, 'state':[('end','Cancel','gtk-cancel'),('start','Start Upgrade','gtk-ok')]}
|
||||
'result': {'type':'form', 'arch':view_form, 'fields': view_field,
|
||||
'state':[
|
||||
('end', 'Cancel', 'gtk-cancel'),
|
||||
('start', 'Start Upgrade', 'gtk-ok', True)
|
||||
]
|
||||
}
|
||||
},
|
||||
'start': {
|
||||
'actions': [_upgrade_module],
|
||||
'result': {'type':'form', 'arch':view_form_end, 'fields': {}, 'state':[('end','Close','gtk-close')]}
|
||||
'result': {'type':'form', 'arch':view_form_end, 'fields': {},
|
||||
'state':[
|
||||
('end', 'Close', 'gtk-close', True)
|
||||
]
|
||||
}
|
||||
},
|
||||
}
|
||||
wizard_info_get('module.upgrade')
|
||||
|
|
|
@ -78,14 +78,20 @@ class wizard_update_module(wizard.interface):
|
|||
states = {
|
||||
'init': {
|
||||
'actions': [_get_repositories],
|
||||
'result': {'type': 'form', 'arch': arch, 'fields': fields, 'state':
|
||||
[('end', 'Cancel', 'gtk-cancel'),
|
||||
('update', 'Check new modules', 'gtk-ok')]}
|
||||
'result': {'type': 'form', 'arch': arch, 'fields': fields,
|
||||
'state': [
|
||||
('end', 'Cancel', 'gtk-cancel'),
|
||||
('update', 'Check new modules', 'gtk-ok', True)
|
||||
]
|
||||
}
|
||||
},
|
||||
'update': {
|
||||
'actions': [_update_module],
|
||||
'result': {'type': 'form', 'arch': arch_module, 'fields': fields_module,
|
||||
'state': [('open_window', 'Ok', 'gtk-ok')]}
|
||||
'state': [
|
||||
('open_window', 'Ok', 'gtk-ok', True)
|
||||
]
|
||||
}
|
||||
},
|
||||
'open_window': {
|
||||
'actions': [],
|
||||
|
|
Loading…
Reference in New Issue