From ac26e44bb6fb9abf74d62cf941f734fca855852c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20=C3=89vrard?= Date: Thu, 27 Jan 2011 15:59:32 +0100 Subject: [PATCH 01/11] Fix typo --- tryton/gui/window/view_form/view/list_gtk/parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tryton/gui/window/view_form/view/list_gtk/parser.py b/tryton/gui/window/view_form/view/list_gtk/parser.py index 817d66b0c7..7583b14d64 100644 --- a/tryton/gui/window/view_form/view/list_gtk/parser.py +++ b/tryton/gui/window/view_form/view/list_gtk/parser.py @@ -827,7 +827,7 @@ class ProgressBar(object): class Button(object): - def __init__(self, treeview, windown, screen, attrs=None): + def __init__(self, treeview, window, screen, attrs=None): super(Button, self).__init__() self.attrs = attrs or {} self.renderer = CellRendererButton(attrs.get('string', _('Unknown'))) From 1571bfabd757fc0a2c65b62c29ad166235d43a0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 28 Jan 2011 10:24:13 +0100 Subject: [PATCH 02/11] Improve size of nested views --- tryton/gui/window/view_form/view/form.py | 13 ++++++++----- .../window/view_form/view/form_gtk/many2many.py | 2 ++ .../window/view_form/view/form_gtk/one2many.py | 2 ++ tryton/gui/window/view_form/view/list.py | 17 +++++++++++++---- 4 files changed, 25 insertions(+), 9 deletions(-) diff --git a/tryton/gui/window/view_form/view/form.py b/tryton/gui/window/view_form/view/form.py index 74ccb77a9d..6c89d77d8b 100644 --- a/tryton/gui/window/view_form/view/form.py +++ b/tryton/gui/window/view_form/view/form.py @@ -35,13 +35,16 @@ class ViewForm(ParserView): scroll = gtk.ScrolledWindow() scroll.add(vp) scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) - self.viewport = gtk.Viewport() - self.viewport.set_shadow_type(gtk.SHADOW_ETCHED_IN) - self.viewport.add(scroll) + scroll.set_placement(gtk.CORNER_TOP_LEFT) + viewport = gtk.Viewport() + viewport.set_shadow_type(gtk.SHADOW_ETCHED_IN) + viewport.add(scroll) width, height = self.widget.size_request() + if isinstance(self.screen.window, gtk.Dialog): + vbox.set_size_request(width or -1, height or -1) + vbox.pack_start(viewport, expand=True, fill=True) + self.widget = vbox - self.widget.set_size_request(width, height) - self.widget.pack_start(self.viewport, expand=True, fill=True) if toolbar and not CONFIG['client.modepda']: hbox = gtk.HBox(homogeneous=False) diff --git a/tryton/gui/window/view_form/view/form_gtk/many2many.py b/tryton/gui/window/view_form/view/form_gtk/many2many.py index e28dd1581b..12298ae648 100644 --- a/tryton/gui/window/view_form/view/form_gtk/many2many.py +++ b/tryton/gui/window/view_form/view/form_gtk/many2many.py @@ -64,6 +64,8 @@ class Many2Many(WidgetInterface): view_type=['tree'], views_preload=attrs.get('views', {}), row_activate=self._on_activate) + if not isinstance(self.screen.window, gtk.Dialog): + self.screen.widget.set_size_request(0, 0) self.widget.pack_start(self.screen.widget, expand=True, fill=True) self.screen.widget.connect('key_press_event', self.on_keypress) diff --git a/tryton/gui/window/view_form/view/form_gtk/one2many.py b/tryton/gui/window/view_form/view/form_gtk/one2many.py index 23c03f77fb..1233258257 100644 --- a/tryton/gui/window/view_form/view/form_gtk/one2many.py +++ b/tryton/gui/window/view_form/view/form_gtk/one2many.py @@ -166,6 +166,8 @@ class One2Many(WidgetInterface): self.screen.signal_connect(self, 'record-message', self._sig_label) menuitem_title.get_child().set_text(attrs.get('string', '')) + if not isinstance(self.screen.window, gtk.Dialog): + self.screen.widget.set_size_request(0, 0) self.widget.pack_start(self.screen.widget, expand=True, fill=True) self.screen.widget.connect('key_press_event', self.on_keypress) diff --git a/tryton/gui/window/view_form/view/list.py b/tryton/gui/window/view_form/view/list.py index 03b5455a46..c72ac8a057 100644 --- a/tryton/gui/window/view_form/view/list.py +++ b/tryton/gui/window/view_form/view/list.py @@ -150,16 +150,25 @@ class ViewList(ParserView): buttons, toolbar, notebooks, cursor_widget) self.store = None self.view_type = 'tree' - self.widget = gtk.VBox() - self.widget_tree = widget + + vbox = gtk.VBox() scroll = gtk.ScrolledWindow() - scroll.add(self.widget_tree) + scroll.add(self.widget) scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) + scroll.set_placement(gtk.CORNER_TOP_LEFT) viewport = gtk.Viewport() viewport.set_shadow_type(gtk.SHADOW_ETCHED_IN) viewport.add(scroll) - self.widget.pack_start(viewport, expand=True, fill=True) + width, height = self.widget.size_request() + self.widget_tree = self.widget + + if isinstance(self.screen.window, gtk.Dialog): + vbox.set_size_request(width or -1, height or -1) + vbox.pack_start(viewport, expand=True, fill=True) + self.widget_tree.screen = screen + + self.widget = vbox self.reload = False self.children = children From 42752f94f51c8c1e39ab50d1ddb3bef0db9cf477 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 28 Jan 2011 10:26:12 +0100 Subject: [PATCH 03/11] Remove "CRITICAL **: pygtk_generic_tree_model_unref_node: assertion `VALID_ITER(iter, tree_model)'" --- tryton/gui/window/view_form/model/group.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tryton/gui/window/view_form/model/group.py b/tryton/gui/window/view_form/model/group.py index c18cb2a615..82671bdfc5 100644 --- a/tryton/gui/window/view_form/model/group.py +++ b/tryton/gui/window/view_form/model/group.py @@ -80,9 +80,13 @@ class Group(SignalEvent, list): self.signal('group-list-changed', ('record-removed', idx)) def clear(self): + if not self.lock_signal: + for record in self: + self.signal('group-list-changed', ('record-removed', 0)) del self[:] if not self.lock_signal: self.signal('group-list-changed', ('group-cleared',)) + self.__id2record = {} self.record_removed = [] self.record_deleted = [] From e6eefd3f2ba73b0574d02523704e33b8947eda0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 28 Jan 2011 10:26:52 +0100 Subject: [PATCH 04/11] Remove "GtkWarning: gtk_misc_set_alignment: assertion `GTK_IS_MISC (misc)' failed" --- tryton/gui/window/tree.py | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/tryton/gui/window/tree.py b/tryton/gui/window/tree.py index 424c24172b..58851f629d 100644 --- a/tryton/gui/window/tree.py +++ b/tryton/gui/window/tree.py @@ -190,20 +190,8 @@ class Tree(SignalEvent): ids.index(y['id']))) radiotb = None for res in results: - radiotb = gtk.RadioToolButton(group=radiotb) - radiotb.set_label_widget(gtk.Label(res['name'])) - - icon = gtk.Image() - try: - icon.set_from_stock(res[icon_name], - gtk.ICON_SIZE_BUTTON) - except Exception: - pass - - hbox = gtk.HBox(spacing=6) - hbox.pack_start(icon) - hbox.pack_start(gtk.Label(res['name'])) - radiotb.set_icon_widget(hbox) + radiotb = gtk.RadioToolButton(radiotb, res[icon_name]) + radiotb.set_label(res['name']) radiotb.show_all() radiotb.set_data('id', res['id']) radiotb.connect('clicked', self.menu_main_clicked) From f2eb3814659c7287be2005a09982a7916dcba90b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 28 Jan 2011 10:28:56 +0100 Subject: [PATCH 05/11] Add initial value to reduce --- tryton/gui/window/view_form/model/record.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tryton/gui/window/view_form/model/record.py b/tryton/gui/window/view_form/model/record.py index b57056457c..26d9944fd7 100644 --- a/tryton/gui/window/view_form/model/record.py +++ b/tryton/gui/window/view_form/model/record.py @@ -44,7 +44,8 @@ class Record(SignalEvent): loading = reduce( lambda x, y: 'eager' if x == y == 'eager' else 'lazy', (field.attrs.get('loading', 'eager') - for field in self.group.fields.itervalues())) + for field in self.group.fields.itervalues()), + []) else: loading = self.group.fields[name].attrs.get('loading', 'eager') if self in self.group and loading == 'eager': From a7d9eb38b2ddc7b062d5de5c55912d239dff0701 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 28 Jan 2011 10:45:31 +0100 Subject: [PATCH 06/11] Remove unused traceback module --- tryton/gui/window/view_form/model/record.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tryton/gui/window/view_form/model/record.py b/tryton/gui/window/view_form/model/record.py index 26d9944fd7..b605500948 100644 --- a/tryton/gui/window/view_form/model/record.py +++ b/tryton/gui/window/view_form/model/record.py @@ -39,7 +39,6 @@ class Record(SignalEvent): def __getitem__(self, name): if name not in self._loaded and self.id > 0: ids = [self.id] - import traceback if name == '*': loading = reduce( lambda x, y: 'eager' if x == y == 'eager' else 'lazy', From fbb9a9fa6b0c1c84cf96e49a149d25c8b22f5925 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 28 Jan 2011 10:52:53 +0100 Subject: [PATCH 07/11] Destroy the dialog after reading value of the widget for issue1837 And call present on the parent window --- tryton/gui/window/form.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tryton/gui/window/form.py b/tryton/gui/window/form.py index a635a50bec..0ed7ffee24 100644 --- a/tryton/gui/window/form.py +++ b/tryton/gui/window/form.py @@ -192,9 +192,10 @@ class Form(SignalEvent): win.show_all() response = win.run() - win.destroy() if response == gtk.RESPONSE_OK: self.screen.display(locale.atoi(entry.get_text()), set_cursor=True) + win.destroy() + self.window.present() def destroy(self): self.screen.signal_unconnect(self) From 344d4342e6b5d237eeb42e59c16c2277f509bbbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 30 Jan 2011 22:58:44 +0100 Subject: [PATCH 08/11] Add communication between boards The communication (refresh) is simply activated by using "_active_%s" in the domain of the act_window (where %s is the id of the other act_window). When the selection of one board is changed, every other board domain are evaluated and if they change the corresponding board is reloaded. --- CHANGELOG | 1 + tryton/gui/window/view_board/action.py | 39 +++++++++++++++++++--- tryton/gui/window/view_board/view_board.py | 14 +++++++- tryton/gui/window/view_tree/view_tree.py | 13 ++++++-- 4 files changed, 58 insertions(+), 9 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index f222a5bc7e..c93645bb21 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,4 @@ +* Add communication between boards * Added domain inversion feature * Handle loading attribute on fields * Use default format for value in wizard form diff --git a/tryton/gui/window/view_board/action.py b/tryton/gui/window/view_board/action.py index 3ec8cee780..cfff94e34c 100644 --- a/tryton/gui/window/view_board/action.py +++ b/tryton/gui/window/view_board/action.py @@ -13,12 +13,14 @@ import tryton.common as common from tryton.pyson import PYSONDecoder import gettext from tryton.config import CONFIG +from tryton.signal_event import SignalEvent _ = gettext.gettext -class Action(object): +class Action(SignalEvent): def __init__(self, window, attrs=None): + super(Action, self).__init__() self.act_id = int(attrs['name']) self._window = window self.screen = None @@ -51,10 +53,8 @@ class Action(object): self.context.update(PYSONDecoder(eval_ctx).decode( self.action.get('pyson_context', '{}'))) - domain_ctx = self.context.copy() - self.domain = PYSONDecoder(domain_ctx).decode( - self.action['pyson_domain']) - + self.domain = [] + self.update_domain([]) self.widget = gtk.Frame() self.widget.set_border_width(0) @@ -151,6 +151,8 @@ class Action(object): alignment.add(self.screen.screen_container.alternate_viewport) name = self.screen.current_view.title self.screen.signal_connect(self, 'record-message', self._sig_label) + self.screen.signal_connect(self, 'record-message', + self._active_changed) elif self.action['view_type'] == 'tree': ctx = {} ctx.update(rpc.CONTEXT) @@ -172,6 +174,8 @@ class Action(object): alignment.add(self.tree.widget_get()) name = self.tree.name self.tree.view.connect('key_press_event', self.sig_key_press) + self.tree.signal_connect(self, 'select-changed', + self._active_changed) if attrs.get('string'): self.title.set_text(attrs['string']) @@ -251,3 +255,28 @@ class Action(object): .get_selected_rows() for path in paths: self.tree.view.expand_row(path, False) + + def _active_changed(self, *args): + self.signal('active-changed') + + def _get_active(self): + if self.screen: + return common.EvalEnvironment(self.screen.current_record, False) + elif self.tree: + return {'id': self.tree.sel_id_get()} + + active = property(_get_active) + + def update_domain(self, actions): + domain_ctx = self.context.copy() + for action in actions: + if action.active: + domain_ctx['_active_%s' % action.act_id] = action.active + new_domain = PYSONDecoder(domain_ctx).decode( + self.action['pyson_domain']) + if self.domain == new_domain: + return + del self.domain[:] + self.domain.extend(new_domain) + if self.screen: + self.screen.search_filter() diff --git a/tryton/gui/window/view_board/view_board.py b/tryton/gui/window/view_board/view_board.py index 152b7aa388..5774b37a37 100644 --- a/tryton/gui/window/view_board/view_board.py +++ b/tryton/gui/window/view_board/view_board.py @@ -2,8 +2,9 @@ #this repository contains the full copyright notices and license terms. 'View board' -from parser import ParserBoard import xml.dom.minidom +from parser import ParserBoard +from tryton.gui.window.view_board.action import Action class ViewBoard(object): 'View board' @@ -18,7 +19,12 @@ class ViewBoard(object): continue self.widget, self.widgets = parser.parse(node) break + self.actions = [x for x in self.widgets if isinstance(x, Action)] + for action in self.actions: + action.signal_connect(self, 'active-changed', + self._active_changed) self.widget.show_all() + self._active_changed(None) def widget_get(self): return self.widget @@ -26,3 +32,9 @@ class ViewBoard(object): def reload(self): for widget in self.widgets: widget.display() + + def _active_changed(self, event_action, *args): + for action in self.actions: + if action == event_action: + continue + action.update_domain(self.actions) diff --git a/tryton/gui/window/view_tree/view_tree.py b/tryton/gui/window/view_tree/view_tree.py index 44093e080f..20418579b0 100644 --- a/tryton/gui/window/view_tree/view_tree.py +++ b/tryton/gui/window/view_tree/view_tree.py @@ -13,6 +13,7 @@ from tryton.common import HM_FORMAT import tryton.common as common from tryton.translate import date_format from tryton.pyson import PYSONDecoder +from tryton.signal_event import SignalEvent FIELDS_LIST_TYPE = { 'boolean': gobject.TYPE_BOOLEAN, @@ -323,11 +324,12 @@ class ViewTreeModel(gtk.GenericTreeModel, gtk.TreeSortable): except Exception: return None -class ViewTree(object): +class ViewTree(SignalEvent): "View tree" def __init__(self, view_info, ids, window, sel_multi=False, context=None): + super(ViewTree, self).__init__() self.window = window self.view = gtk.TreeView() self.view.set_headers_visible(not CONFIG['client.modepda']) @@ -342,10 +344,12 @@ class ViewTree(object): self.name = parse.title self.sel_multi = sel_multi + selection = self.view.get_selection() if sel_multi: - self.view.get_selection().set_mode(gtk.SELECTION_MULTIPLE) + selection.set_mode(gtk.SELECTION_MULTIPLE) else: - self.view.get_selection().set_mode(gtk.SELECTION_SINGLE) + selection.self.view.get_selection().set_mode(gtk.SELECTION_SINGLE) + selection.connect('changed', self.__select_changed) self.view.set_expander_column(self.view.get_column(1)) self.view.set_enable_search(False) self.view.get_column(0).set_visible(False) @@ -413,3 +417,6 @@ class ViewTree(object): if not i: return None return model.get_value(i, col) + + def __select_changed(self, tree_sel): + self.signal('select-changed') From 81c37a3d30133bd2e5f65dff0dc60f687af231ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 2 Feb 2011 00:06:08 +0100 Subject: [PATCH 09/11] Remove wrong usage of data for issue1800 Rename datas into data --- tryton/action/main.py | 62 +++++++++++++++++++------------------------ 1 file changed, 27 insertions(+), 35 deletions(-) diff --git a/tryton/action/main.py b/tryton/action/main.py index 05bfc89a2e..84db20d84b 100644 --- a/tryton/action/main.py +++ b/tryton/action/main.py @@ -25,13 +25,13 @@ class Action(object): context = {} if email is None: email = {} - datas = data.copy() - ids = datas['ids'] - del datas['ids'] + data = data.copy() + ids = data['ids'] + del data['ids'] ctx = rpc.CONTEXT.copy() ctx.update(context) if not ids: - args = ('model', datas['model'], 'search', [], 0, None, None, ctx) + args = ('model', data['model'], 'search', [], 0, None, None, ctx) try: ids = rpc.execute(*args) except Exception, exception: @@ -41,8 +41,8 @@ class Action(object): if ids == []: message(_('Nothing to print!'), window) return False - datas['id'] = ids[0] - args = ('report', name, 'execute', ids, datas, ctx) + data['id'] = ids[0] + args = ('report', name, 'execute', ids, data, ctx) rpcprogress = common.RPCProgress('execute', args, window) try: res = rpcprogress.run() @@ -70,7 +70,7 @@ class Action(object): return True @staticmethod - def execute(act_id, datas, window, action_type=None, context=None): + def execute(act_id, data, window, action_type=None, context=None): if context is None: context = {} ctx = rpc.CONTEXT.copy() @@ -92,40 +92,32 @@ class Action(object): except Exception, exception: common.process_exception(exception, window) return - Action._exec_action(res, window, datas) + Action._exec_action(res, window, data) @staticmethod - def _exec_action(action, window, datas=None, context=None): + def _exec_action(action, window, data=None, context=None): if context is None: context = {} - if datas is None: - datas = {} + if data is None: + data = {} + else: + data = data.copy() if 'type' not in (action or {}): return if action['type'] == 'ir.action.act_window': - for key in ( - 'res_id', - 'res_model', - 'view_type', - 'limit', - 'auto_refresh', - 'search_value', - ): - datas[key] = action.get(key, datas.get(key, None)) - view_ids = False - datas['view_mode'] = None + view_mode = None if action.get('views', []): view_ids = [x[0] for x in action['views']] - datas['view_mode'] = [x[1] for x in action['views']] + view_mode = [x[1] for x in action['views']] elif action.get('view_id', False): view_ids = [action['view_id'][0]] action.setdefault('pyson_domain', '[]') ctx = { - 'active_id': datas.get('id',False), - 'active_ids': datas.get('ids',[]), + 'active_id': data.get('id', False), + 'active_ids': data.get('ids', []), } ctx.update(rpc.CONTEXT) eval_ctx = ctx.copy() @@ -138,9 +130,6 @@ class Action(object): domain_context['context'] = ctx domain = PYSONDecoder(domain_context).decode(action['pyson_domain']) - if datas.get('domain', False): - domain.append(datas['domain']) - search_context = ctx.copy() search_context['context'] = ctx search_value = PYSONDecoder(search_context).decode( @@ -150,26 +139,29 @@ class Action(object): if action.get('window_name', True): name = action.get('name', False) - Window.create(view_ids, datas['res_model'], datas['res_id'], domain, - action['view_type'], window, action_ctx, - datas['view_mode'], name=name, - limit=datas['limit'], auto_refresh=datas['auto_refresh'], + res_model = action.get('res_model', data.get('res_model')) + res_id = action.get('res_id', data.get('res_id')) + + Window.create(view_ids, res_model, res_id, domain, + action['view_type'], window, action_ctx, view_mode, + name=name, limit=action.get('limit'), + auto_refresh=action.get('auto_refresh'), search_value=search_value) elif action['type'] == 'ir.action.wizard': if action.get('window', False): - Window.create_wizard(action['wiz_name'], datas, window, + Window.create_wizard(action['wiz_name'], data, window, direct_print=action.get('direct_print', False), email_print=action.get('email_print', False), email=action.get('email'), name=action.get('name', False), context=context) else: - Wizard.execute(action['wiz_name'], datas, window, + Wizard.execute(action['wiz_name'], data, window, direct_print=action.get('direct_print', False), email_print=action.get('email_print', False), email=action.get('email'), context=context) elif action['type'] == 'ir.action.report': - Action.exec_report(action['report_name'], datas, window, + Action.exec_report(action['report_name'], data, window, direct_print=action.get('direct_print', False), email_print=action.get('email_print', False), email=action.get('email'), context=context) From 307c478be1099d21a142b77d3e7f11c90a4600a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 2 Feb 2011 23:25:53 +0100 Subject: [PATCH 10/11] Fix initial value of reduce to compute loading --- tryton/gui/window/view_form/model/record.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tryton/gui/window/view_form/model/record.py b/tryton/gui/window/view_form/model/record.py index b605500948..8b36b0684d 100644 --- a/tryton/gui/window/view_form/model/record.py +++ b/tryton/gui/window/view_form/model/record.py @@ -44,7 +44,7 @@ class Record(SignalEvent): lambda x, y: 'eager' if x == y == 'eager' else 'lazy', (field.attrs.get('loading', 'eager') for field in self.group.fields.itervalues()), - []) + 'eager') else: loading = self.group.fields[name].attrs.get('loading', 'eager') if self in self.group and loading == 'eager': From fd3d19393b42669269e372be1701a8ae00ef2c40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 3 Feb 2011 00:58:49 +0100 Subject: [PATCH 11/11] Catch exception on db_exist call for issue1843 --- tryton/gui/window/dbcreate.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tryton/gui/window/dbcreate.py b/tryton/gui/window/dbcreate.py index 82b7968d47..5bc3f9a0e3 100644 --- a/tryton/gui/window/dbcreate.py +++ b/tryton/gui/window/dbcreate.py @@ -357,8 +357,13 @@ class DBCreate(object): and langreal \ and passwd \ and admin_passwd.get_text(): - if rpc.db_exec(url_m.group(1), int(url_m.group(2)), - 'db_exist', dbname): + try: + exist = rpc.db_exec(url_m.group(1), + int(url_m.group(2)), 'db_exist', dbname) + except Exception, exception: + common.process_exception(exception, self.dialog) + continue + if exist: common.warning(_("A database with the same name " \ "already exists.\n" \ "Try another database name."), self.dialog,