def Show_File(self): '''Show contents of the protocol data in text window''' import textFrame self.text_frame=textFrame.textFrame(self) try: #self.text_frame.load_text(self.fileShow.get()) self.text_frame.load_text(self.protocol_textdump) except: import tkMessageBox tkMessageBox.showwarning('No file selected', 'Please load a file first', parent=self.meta_win) return
def Show_File(self): '''Show contents of the protocol data in text window''' import textFrame self.text_frame = textFrame.textFrame(self) try: #self.text_frame.load_text(self.fileShow.get()) self.text_frame.load_text(self.protocol_textdump) except: import tkMessageBox tkMessageBox.showwarning('No file selected', 'Please load a file first', parent=self.meta_win) return
def _createMessageGrid( self, label, text ): """function to create a textFrame which will be added into the grid label: Label shown in the frame header text: Message shown in the text View """ grid = Gtk.Grid() grid.set_orientation( Gtk.Orientation.VERTICAL ) frame = textFrame( label ) frame.addText( text ) frame.set_hexpand( True ) frame.set_halign( Gtk.Align.FILL ) grid.add( frame ) # Show a link for the user to view the web page label=Gtk.Label() label.set_markup( '<a href="http://www.baidu.com">View More</a>') label.set_hexpand( True ) label.set_halign( Gtk.Align.END ) grid.add( label ) self.grid.add( grid )