Remove unusefull message_box

This commit is contained in:
Cédric Krier committed 2008-10-10 10:50:21 +02:00
1 parent ad8f9e1d03
commit 8b7f4db7be
3 files changed
+2 -101

No files matched your search

-79
View File
@@ -4504,85 +4504,6 @@ Latin1</property>
</widget>
</child>
</widget>
<widget class="GtkDialog" id="dia_message_box">
<property name="width_request">450</property>
<property name="height_request">250</property>
<property name="title" translatable="yes">Tryton Message</property>
<property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
<child internal-child="vbox">
<widget class="GtkVBox" id="dialog-vbox26">
<property name="visible">True</property>
<child>
<widget class="GtkVBox" id="vbox55">
<property name="visible">True</property>
<child>
<widget class="GtkLabel" id="msg_title">
<property name="visible">True</property>
<property name="label">msg_title</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkHSeparator" id="hseparator35">
<property name="visible">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="padding">3</property>
<property name="position">1</property>
</packing>
</child>
<child>
<widget class="GtkScrolledWindow" id="scrolledwindow42">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
<property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
<property name="shadow_type">GTK_SHADOW_IN</property>
<child>
<widget class="GtkTextView" id="msg_tv">
<property name="visible">True</property>
<property name="can_focus">True</property>
</widget>
</child>
</widget>
<packing>
<property name="position">2</property>
</packing>
</child>
</widget>
<packing>
<property name="position">2</property>
</packing>
</child>
<child internal-child="action_area">
<widget class="GtkHButtonBox" id="dialog-action_area30">
<property name="visible">True</property>
<property name="layout_style">GTK_BUTTONBOX_END</property>
<child>
<widget class="GtkButton" id="closebutton2">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="label">gtk-close</property>
<property name="use_stock">True</property>
<property name="response_id">-7</property>
</widget>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="pack_type">GTK_PACK_END</property>
</packing>
</child>
</widget>
</child>
</widget>
<widget class="GtkDialog" id="dialog_concurrency_exception">
<property name="title" translatable="yes">Concurrency exception</property>
<property name="default_width">87</property>
-20
View File
@@ -482,26 +482,6 @@ def message(msg, parent, msg_type=gtk.MESSAGE_INFO):
def to_xml(string):
return string.replace('&','&amp;').replace('<','&lt;').replace('>','&gt;')
def message_box(title, msg, parent):
dia = glade.XML(GLADE, "dia_message_box",
gettext.textdomain())
win = dia.get_widget('dia_message_box')
label = dia.get_widget('msg_title')
label.set_text(title)
buf = dia.get_widget('msg_tv').get_buffer()
iter_start = buf.get_start_iter()
buf.insert(iter_start, msg)
win.set_transient_for(parent)
win.set_icon(TRYTON_ICON)
win.run()
parent.present()
win.destroy()
return True
def warning(msg, parent, title=''):
dialog = gtk.MessageDialog(parent, gtk.DIALOG_DESTROY_WITH_PARENT,
gtk.MESSAGE_WARNING, gtk.BUTTONS_OK)
+2 -2
View File
@@ -214,8 +214,8 @@ class WinImport(object):
buf = ''
for key, val in res[1].items():
buf += ('\t%s: %s\n' % (str(key), str(val)))
common.message_box(_('Importation Error!'),
common.error(_('Importation Error!'), self.parent,
_('Error trying to import this record:\n' \
'%s\nError Message:\n%s\n\n%s') % \
(buf, res[2], res[3]), self.parent)
(buf, res[2], res[3]))
return True