Commit 9ecd1d60 authored by Kai Willadsen's avatar Kai Willadsen

filediff: Improve revert dialog file list display

Two changes here: firstly to use the message dialog area that *is* now
available; and secondly to use unicode list bullets.
parent e8a53eaf
......@@ -834,8 +834,7 @@
<property name="skip_taskbar_hint">True</property>
<property name="message_type">question</property>
<property name="text" translatable="yes">Revert unsaved changes to documents?</property>
<property name="secondary_text" translatable="yes">Changes made to the following documents will be permanently lost:
</property>
<property name="secondary_text" translatable="yes">Changes made to the following documents will be permanently lost:</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox2">
<property name="visible">True</property>
......
......@@ -1711,10 +1711,13 @@ class FileDiff(MeldDoc, Component):
dialog = Component("filediff.ui", "revert_dialog")
dialog.widget.set_transient_for(self.widget.get_toplevel())
# FIXME: Should be packed into dialog.widget.get_message_area(),
# but this is unbound on currently required PyGTK.
filelist = "\n".join(["\t" + f for f in unsaved])
dialog.widget.props.secondary_text += filelist
filelist = Gtk.Label("\n".join(["\t• " + f for f in unsaved]))
filelist.props.xalign = 0.0
filelist.show()
message_area = dialog.widget.get_message_area()
message_area.pack_start(filelist, expand=False, fill=True, padding=0)
response = dialog.widget.run()
dialog.widget.destroy()
return response == Gtk.ResponseType.OK
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment