Logo Search packages:      
Sourcecode: nagstamon version File versions  Download package

def Nagstamon::nagstamonGUI::StatusBar::ShowErrorMessage (   self  ) 

    Shows error message in statusbar

Definition at line 898 of file nagstamonGUI.py.

00898                               :
        """
            Shows error message in statusbar
        """
        
        # us a flag to prevent all threads at once to write to statusbar label in case
        # of lost network connectivity - this leads to a mysterious pango crash
        if self.isShowingError == False:
            try:
                # set flag to locked
                self.isShowingError = True
                # save old label
                label = self.Label.get_label()
                self.Label.set_markup('<span size="%s"> ERROR: Check settings/network </span>' % (self.output.fontsize)) 
                # Windows workaround for non-shrinking desktop statusbar
                self.Resize()
                # change systray icon to error
                self.SysTray.set_from_file(self.output.Resources + "/nagstamon_error" + self.output.BitmapSuffix)
                # delay thread a little bit to give the others time to recognize the set flag
                time.sleep(5)
                # set flag back
                self.isShowingError = False
                # restore label
                self.Label.set_markup(label)
                self.Resize()
            except:
                pass

    def Flash(self):


Generated by  Doxygen 1.6.0   Back to index