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

def webboardlib::webboard::WebBoard::check_lock_cb (   self,
  lock 
)
Check if the publishing is finished, by looking at the lock.

Definition at line 276 of file webboard.py.

                                 :
        """Check if the publishing is finished, by looking at the lock."""
        if lock.locked():
            # The sending isn't finished, return true so we get called again
            # later.
            return True

        if self.ret is False:
            self.statusbar.push(self.context,_("Could not publish the text"\
                                               " at %s") % self.config.pastebin)
            self.toolbutton_copy.set_sensitive(False)
            self.toolbutton_open.set_sensitive(False)
        else:

            # Set message in the statusbar
            self.statusbar.push(self.context,
                    _("Published at %s") % self.url)
            # add to history
            self.history.add_paste(self.post, self.url)
            # copy link to the clipboard
            self.clipboard.set_text(self.url, len=-1)
            self.toolbutton_copy.set_sensitive(True)
            self.toolbutton_open.set_sensitive(True)

        self.window_main.window.set_cursor(None)
        self.window_main.set_sensitive(True)
        self.textview.set_editable(True)
        self.textview.set_sensitive(True)

        # Returning False so we won't get called again
        return False


Generated by  Doxygen 1.6.0   Back to index