Ejemplo n.º 1
0
 def __queryQuitEvent__(self, window, event=None):
     """
     @summary: Handle query quit event.
     @param window: GtkWindow that threw event. 
     """
     if (gtk.RESPONSE_YES == FactoryControls.getConfirmMessage(_("Are you sure you want to close PyCamimg?"),
                                                               title=_("Close PyCamimg"),
                                                               parent=self.__mainWindow__)):
         return False
     else:
         return True
Ejemplo n.º 2
0
 def __cancelEvent__(self, b):
     """
     @summary: Handle cancel button.
     @param b: Button that call this function
     """
     if (self.__core__.getState() == STATE_EXEC):
         if (gtk.RESPONSE_YES == FactoryControls.getConfirmMessage(_("Are you sure you want to cancel project?"),
                                                                   title=_("Cancel project"),
                                                                   parent=self)):
             self.__cancelThread__()
             self.__updateOptions__(mode=__MODE_CLOSE__, blockGtk=False)
     else:
         __log__.debug("Execution is just finished")
Ejemplo n.º 3
0
 def __queryClose__(self):
     """
     @summary: Query close.
     """
     if (self.__core__.getState() == STATE_EXEC):               
         if (gtk.RESPONSE_YES == FactoryControls.getConfirmMessage(_("Current project is running. Are you sure you want to exit?"),
                                                                   title=_("Close execution project"),
                                                                   parent=self)):
             return True
         else:
             return False
     
     return True