python类BUTTONS_CLOSE的实例源码

gtk2util.py 文件源码 项目:hostapd-mana 作者: adde88 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def _ebFailedLogin(self, reason):
        if isinstance(reason, failure.Failure):
            reason = reason.value
        self.statusMsg(reason)
        if isinstance(reason, (unicode, str)):
            text = reason
        else:
            text = unicode(reason)
        msg = gtk.MessageDialog(self._loginDialog,
                                gtk.DIALOG_DESTROY_WITH_PARENT,
                                gtk.MESSAGE_ERROR,
                                gtk.BUTTONS_CLOSE,
                                text)
        msg.show_all()
        msg.connect("response", lambda *a: msg.destroy())

        # hostname not found
        # host unreachable
        # connection refused
        # authentication failed
        # no such service
        # no such perspective
        # internal server error
gtk2util.py 文件源码 项目:sslstrip-hsts-openwrt 作者: adde88 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def _ebFailedLogin(self, reason):
        if isinstance(reason, failure.Failure):
            reason = reason.value
        self.statusMsg(reason)
        if isinstance(reason, (unicode, str)):
            text = reason
        else:
            text = unicode(reason)
        msg = gtk.MessageDialog(self._loginDialog,
                                gtk.DIALOG_DESTROY_WITH_PARENT,
                                gtk.MESSAGE_ERROR,
                                gtk.BUTTONS_CLOSE,
                                text)
        msg.show_all()
        msg.connect("response", lambda *a: msg.destroy())

        # hostname not found
        # host unreachable
        # connection refused
        # authentication failed
        # no such service
        # no such perspective
        # internal server error
gimp_colorize.py 文件源码 项目:colorize 作者: BruXy 项目源码 文件源码 阅读 30 收藏 0 点赞 0 评论 0
def gui_message(text, message_type):
    """Gtk dialog for error message display"""
    message = gtk.MessageDialog(type=message_type, buttons=gtk.BUTTONS_CLOSE)
    message.set_markup(text)
    message.run()
    message.destroy()
    while gtk.events_pending():
        gtk.main_iteration()
gui.py 文件源码 项目:ecel 作者: ARL-UTEP-OC 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def show_alert_message(parent_window, msg):
    alert = gtk.MessageDialog(parent_window, gtk.DIALOG_DESTROY_WITH_PARENT, gtk.MESSAGE_INFO,
                              gtk.BUTTONS_CLOSE, msg)
    alert.run()
    alert.destroy()
gui.py 文件源码 项目:ecel 作者: ARL-UTEP-OC 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def show_error_message(parent_window, msg):
    alert = gtk.MessageDialog(parent_window, gtk.DIALOG_DESTROY_WITH_PARENT, gtk.MESSAGE_ERROR,
                              gtk.BUTTONS_CLOSE, msg)
    alert.run()
    alert.destroy()
main_gui.py 文件源码 项目:ecel 作者: ARL-UTEP-OC 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def parse_all(self, event):
        for collector in self.engine.collectors:
            collector.parser.parse()
#        alert = gtk.MessageDialog(self, gtk.DIALOG_DESTROY_WITH_PARENT, gtk.MESSAGE_INFO,
#                                       gtk.BUTTONS_CLOSE, "Parsing complete")
#        alert.run()
#        alert.destroy()
dialog.py 文件源码 项目:linkanalysis 作者: jaap-karssenberg 项目源码 文件源码 阅读 26 收藏 0 点赞 0 评论 0
def __init__(self, parent, notebook):
        Dialog.__init__(self, parent,
            _('Pages By Number Of Links'), # T: dialog title
            buttons=gtk.BUTTONS_CLOSE
        )
        self.notebook = notebook

        self.direction_input = gtk.combo_box_new_text()
        for dir in sorted(self.LABELS):
            self.direction_input.append_text(self.LABELS[dir])

        self.uistate.setdefault('link_direction', LINK_DIR_BACKWARD, self.LABELS.keys())
        gtk_combobox_set_active_text(
            self.direction_input,
            self.LABELS[self.uistate['link_direction']]
        )
        self.direction_input.connect('changed', self.on_direction_input_changed)

        hbox = gtk.HBox()
        hbox.pack_start(gtk.Label(_('Trace Links')+':'), False)
        hbox.add(self.direction_input)
        self.vbox.pack_start(hbox, False)

        self.listview = SingleClickTreeView(gtk.ListStore(int, str))
        self.listview.set_reorderable(True)
        for i, label in enumerate((_('#'), _('Page'))):
            column = gtk.TreeViewColumn(label, gtk.CellRendererText(), text=i)
            column.set_sort_column_id(i)
            self.listview.append_column(column)
        # TODO: self.listview.connect('row-activated', self.on_row_activated())

        self.vbox.add(ScrolledWindow(self.listview))
        self.populate_listview()


问题


面经


文章

微信
公众号

扫码关注公众号