Example #1
0
 def _exim_popup(self, menuitem, callable, id, title_prefix):
     """Show a popup window with the string returned by callable."""
     (success, text) = callable(id)
     if success:
         popup = PopupWindow(title_prefix + id, text)
         popup.show_all()
     else:
         AlertDialog(self._main_win, _("An error occured."),
                 text, error=True).ask()
Example #2
0
 def go(self, logwatcher):
     self.show_all()
     response = self.run()
     args = self.entry.get_text()
     all_logs = self.all_logs.get_active()
     self.destroy()
     if response == gtk.RESPONSE_OK:
         text = logwatcher.runEximstats(args, all_logs)
         popup = PopupWindow("Eximstats", text.strip())
         popup.show_all()
Example #3
0
 def go(self, logwatcher):
     pattern = self.get_input()
     if pattern:
         text = logwatcher.runExigrep(pattern,
                 not self.regexp.get_active(), self.all_logs.get_active())
         if text:
             popup = PopupWindow("Exigrep: " + pattern, text.strip())
             popup.show_all()
         else:
             text = _("Empty output from exigrep.")
             AlertDialog(self._main_win, text,
                   _("exigrep returned no data. You may want to "
                     "refine your search terms or try a search on all "
                     "the log files.")).ask()