Пример #1
0
    def thread_help(self, tid):
        if not self.ps:
            self.ps = procfs.pidstats()

        if not ps.has_key(tid):
            print "tuna: " + _("thread %d doesn't exists!") % tid
            return

        pinfo = ps[tid]
        cmdline = procfs.process_cmdline(pinfo)
        help, title = tuna.kthread_help_plain_text(tid, cmdline)
        print "%s\n\n%s" % (title, _(help))
Пример #2
0
def thread_help(tid):
    global ps
    if not ps:
        ps = procfs.pidstats()

    if not ps.has_key(tid):
        print "tuna: " + _("thread %d doesn't exists!") % tid
        return

    pinfo = ps[tid]
    cmdline = procfs.process_cmdline(pinfo)
    help, title = tuna.kthread_help_plain_text(tid, cmdline)
    print "%s\n\n%s" % (title, _(help))
Пример #3
0
    def help_dialog(self, a):
        ret = self.treeview.get_path_at_pos(self.last_x, self.last_y)
        if not ret:
            return
        path, col, xpos, ypos = ret
        if not path:
            return
        row = self.tree_store.get_iter(path)
        pid = self.tree_store.get_value(row, self.COL_PID)
        if not self.ps.has_key(pid):
            return

        cmdline = self.tree_store.get_value(row, self.COL_CMDLINE)
        help, title = tuna.kthread_help_plain_text(pid, cmdline)

        dialog = gtk.MessageDialog(
            None, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,
            gtk.MESSAGE_INFO, gtk.BUTTONS_OK, _(help))
        dialog.set_title(title)
        ret = dialog.run()
        dialog.destroy()
Пример #4
0
	def help_dialog(self, a):
		ret = self.treeview.get_path_at_pos(self.last_x, self.last_y)
		if not ret:
			return
		path, col, xpos, ypos = ret
		if not path:
			return
		row = self.tree_store.get_iter(path)
		pid = self.tree_store.get_value(row, self.COL_PID)
		if not self.ps.has_key(pid):
			return

		cmdline = self.tree_store.get_value(row, self.COL_CMDLINE)
		help, title = tuna.kthread_help_plain_text(pid, cmdline)

		dialog = gtk.MessageDialog(None,
					   gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,
					   gtk.MESSAGE_INFO,
					   gtk.BUTTONS_OK, _(help))
		dialog.set_title(title)
		ret = dialog.run()
		dialog.destroy()