File: utils.py

package info (click to toggle)
update-manager 0.42.2ubuntu22-11
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 4,908 kB
  • ctags: 753
  • sloc: python: 3,738; sh: 2,971; xml: 1,571; makefile: 690; ansic: 38
file content (10 lines) | stat: -rw-r--r-- 356 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
import gtk

def dialog_error(parent, primary, secondary):
    p = "<span weight=\"bold\" size=\"larger\">%s</span>" % primary
    dialog = gtk.MessageDialog(parent,gtk.DIALOG_MODAL,
                               gtk.MESSAGE_ERROR,gtk.BUTTONS_OK,"")
    dialog.set_markup(p);
    dialog.format_secondary_text(secondary);
    dialog.run()
    dialog.hide()