~ubuntu-branches/ubuntu/trusty/gnuradio/trusty-updates

« back to all changes in this revision

Viewing changes to grc/gui/Dialogs.py

  • Committer: Package Import Robot
  • Author(s): A. Maitland Bottoms
  • Date: 2012-02-26 21:26:16 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20120226212616-vsfkbi1158xshdql
Tags: 3.5.1-1
* new upstream version, re-packaged from scratch with modern tools
    closes: #642716, #645332, #394849, #616832, #590048, #642580,
    #647018, #557050, #559640, #631863
* CMake build

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
import pygtk
21
21
pygtk.require('2.0')
22
22
import gtk
23
 
import Preferences
24
23
import Utils
25
24
 
26
25
class TextDisplay(gtk.TextView):
57
56
        message_dialog.destroy()
58
57
        return response
59
58
 
 
59
 
 
60
ERRORS_MARKUP_TMPL="""\
 
61
#for $i, $err_msg in enumerate($errors)
 
62
<b>Error $i:</b>
 
63
$encode($err_msg.replace('\t', '  '))
 
64
 
 
65
#end for"""
 
66
def ErrorsDialog(flowgraph): MessageDialogHelper(
 
67
        type=gtk.MESSAGE_ERROR,
 
68
        buttons=gtk.BUTTONS_CLOSE,
 
69
        title='Flow Graph Errors',
 
70
        markup=Utils.parse_template(ERRORS_MARKUP_TMPL, errors=flowgraph.get_error_messages()),
 
71
)
 
72
 
60
73
class AboutDialog(gtk.AboutDialog):
61
74
        """A cute little about dialog."""
62
75
 
98
111
#end if
99
112
"""
100
113
 
101
 
def ColorsDialog(platform): MessageDialogHelper(
 
114
def TypesDialog(platform): MessageDialogHelper(
102
115
        type=gtk.MESSAGE_INFO,
103
116
        buttons=gtk.BUTTONS_CLOSE,
104
 
        title='Colors',
 
117
        title='Types',
105
118
        markup=Utils.parse_template(COLORS_DIALOG_MARKUP_TMPL, colors=platform.get_colors()))