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))
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))
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()
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()