[meld] misc: Remove old run_dialog helper
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] misc: Remove old run_dialog helper
- Date: Wed, 31 Dec 2014 23:33:27 +0000 (UTC)
commit 61edf5c15e8bc20d66cb183363dbb741fbc46762
Author: Kai Willadsen <kai willadsen gmail com>
Date: Mon Dec 29 09:30:18 2014 +1000
misc: Remove old run_dialog helper
meld/misc.py | 31 -------------------------------
1 files changed, 0 insertions(+), 31 deletions(-)
---
diff --git a/meld/misc.py b/meld/misc.py
index f5278a3..be472a0 100644
--- a/meld/misc.py
+++ b/meld/misc.py
@@ -100,37 +100,6 @@ def modal_dialog(
return response
-def run_dialog( text, parent=None, messagetype=Gtk.MessageType.WARNING, buttonstype=Gtk.ButtonsType.OK,
extrabuttons=()):
- """Run a dialog with text 'text'.
- Extra buttons are passed as tuples of (button label, response id).
- """
- escaped = GObject.markup_escape_text(text)
- d = Gtk.MessageDialog(
- None,
- Gtk.DialogFlags.DESTROY_WITH_PARENT,
- messagetype,
- buttonstype)
- markup = '<span weight="bold" size="larger">%s</span>' % escaped
- d.set_markup(markup)
- if parent and isinstance(parent, Gtk.Window):
- d.set_transient_for(parent.widget.get_toplevel())
- for b, rid in extrabuttons:
- d.add_button(b, rid)
- d.vbox.set_spacing(12)
- hbox = d.vbox.get_children()[0]
- hbox.set_spacing(12)
- try:
- d.props.image.set_alignment(0.5, 0)
- d.props.image.set_padding(12, 12)
- except AttributeError:
- # FIXME: This is ridiculous. Possibly distribution-specific patches,
- # or just... bad things. This needs to go away.
- pass
- ret = d.run()
- d.destroy()
- return ret
-
-
# Taken from epiphany
def position_menu_under_widget(menu, widget):
container = widget.get_ancestor(Gtk.Container)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]