Remove dialog_concurrency_exception from glade
This commit is contained in:
1 parent
8b7f4db7be
commit
49b325fe9e
2 files changed
+37
-168
No files matched your search
@@ -4504,166 +4504,4 @@ Latin1</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<widget class="GtkDialog" id="dialog_concurrency_exception">
|
||||
<property name="title" translatable="yes">Concurrency exception</property>
|
||||
<property name="default_width">87</property>
|
||||
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
|
||||
<child internal-child="vbox">
|
||||
<widget class="GtkVBox" id="dialog-vbox28">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox84">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<widget class="GtkImage" id="image4169">
|
||||
<property name="width_request">33</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">tryton-dialog-information</property>
|
||||
<property name="icon_size">6</property>
|
||||
</widget>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label46562">
|
||||
<property name="width_request">421</property>
|
||||
<property name="height_request">164</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="yalign">0</property>
|
||||
<property name="xpad">14</property>
|
||||
<property name="label" translatable="yes"><b>
|
||||
Write concurrency warning:
|
||||
</b>
|
||||
This record has been modified while you were editing it.
|
||||
Choose:
|
||||
- "Cancel" to cancel saving.
|
||||
- "Compare" to see the modified version.
|
||||
- "Write anyway" to save your current version.
|
||||
</property>
|
||||
<property name="use_markup">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">6</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child internal-child="action_area">
|
||||
<widget class="GtkHButtonBox" id="dialog-action_area32">
|
||||
<property name="visible">True</property>
|
||||
<property name="layout_style">GTK_BUTTONBOX_END</property>
|
||||
<child>
|
||||
<widget class="GtkButton" id="button_cancel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="label">gtk-cancel</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="response_id">-6</property>
|
||||
</widget>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkButton" id="button93">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="response_id">-10</property>
|
||||
<child>
|
||||
<widget class="GtkAlignment" id="alignment58">
|
||||
<property name="visible">True</property>
|
||||
<property name="xscale">0</property>
|
||||
<property name="yscale">0</property>
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox86">
|
||||
<property name="visible">True</property>
|
||||
<property name="spacing">2</property>
|
||||
<child>
|
||||
<widget class="GtkImage" id="image4171">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">tryton-find-and-replace</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label46561">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Compare</property>
|
||||
<property name="use_underline">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkButton" id="button94">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="response_id">-5</property>
|
||||
<child>
|
||||
<widget class="GtkAlignment" id="alignment57">
|
||||
<property name="visible">True</property>
|
||||
<property name="xscale">0</property>
|
||||
<property name="yscale">0</property>
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox85">
|
||||
<property name="visible">True</property>
|
||||
<property name="spacing">2</property>
|
||||
<child>
|
||||
<widget class="GtkImage" id="image4170">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">tryton-save</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label46560">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Write anyway</property>
|
||||
<property name="use_underline">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="pack_type">GTK_PACK_END</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</glade-interface>
|
||||
+37
-6
@@ -594,15 +594,46 @@ def ask(question, parent, visibility=True):
|
||||
return None
|
||||
|
||||
def concurrency(resource, obj_id, context, parent):
|
||||
dia = glade.XML(GLADE, 'dialog_concurrency_exception', gettext.textdomain())
|
||||
win = dia.get_widget('dialog_concurrency_exception')
|
||||
dialog = gtk.Dialog(_('Concurrency Exception'), parent, gtk.DIALOG_MODAL
|
||||
| gtk.DIALOG_DESTROY_WITH_PARENT | gtk.WIN_POS_CENTER_ON_PARENT
|
||||
| gtk.gdk.WINDOW_TYPE_HINT_DIALOG)
|
||||
dialog.set_icon(TRYTON_ICON)
|
||||
dialog.set_has_separator(True)
|
||||
dialog.set_default_response(gtk.RESPONSE_CANCEL)
|
||||
hbox = gtk.HBox()
|
||||
image = gtk.Image()
|
||||
image.set_from_stock('tryton-dialog-information',
|
||||
gtk.ICON_SIZE_DIALOG)
|
||||
image.set_padding(15, 15)
|
||||
hbox.pack_start(image, False, False)
|
||||
label = gtk.Label()
|
||||
label.set_padding(15, 15)
|
||||
label.set_use_markup(True)
|
||||
label.set_markup(_('''<b>Write Concurrency Warning:</b>
|
||||
|
||||
win.set_transient_for(parent)
|
||||
win.set_icon(TRYTON_ICON)
|
||||
This record has been modified while you were editing it.
|
||||
Choose:
|
||||
- "Cancel" to cancel saving;
|
||||
- "Compare" to see the modified version;
|
||||
- "Write Anyway" to save your current version.'''))
|
||||
hbox.pack_start(label, True, True)
|
||||
dialog.vbox.pack_start(hbox)
|
||||
dialog.add_button('gtk-cancel', gtk.RESPONSE_CANCEL)
|
||||
compare_button = gtk.Button(_('Compare'))
|
||||
image = gtk.Image()
|
||||
image.set_from_stock('tryton-find-replace', gtk.ICON_SIZE_BUTTON)
|
||||
compare_button.set_image(image)
|
||||
dialog.add_action_widget(compare_button, gtk.RESPONSE_APPLY)
|
||||
write_button = gtk.Button(_('Write Anyway'))
|
||||
image = gtk.Image()
|
||||
image.set_from_stock('tryton-save', gtk.ICON_SIZE_BUTTON)
|
||||
write_button.set_image(image)
|
||||
dialog.add_action_widget(write_button, gtk.RESPONSE_OK)
|
||||
dialog.show_all()
|
||||
|
||||
res = win.run()
|
||||
res = dialog.run()
|
||||
parent.present()
|
||||
win.destroy()
|
||||
dialog.destroy()
|
||||
|
||||
if res == gtk.RESPONSE_OK:
|
||||
return True
|
||||
|
||||
Reference in new issue
Block a user