예제 #1
0
 def on_remove_clicked(self, widget):
     """
         This will remove a package from the list.
         Only Custom packages can be removed.
     """
     iter, selected = self.get_selected_iter()
     if selected:
         if gui.question_message(constants.MESSAGE_0008 % selected.package, self.controller.get_main_window()):
             self.store.remove_package(iter)
             self.update_parent_count()
     return
예제 #2
0
 def is_aptoncd_media(self, from_Path):
     try:
         # creates a cdinfo object to check media
         cdinfo = mediainfo.MediaInfo(utils.join_path(from_Path, "aptoncd.info"))
         result, msgError = cdinfo.infoFromFile()
         if result:
             isValid, strMsg = cdinfo.compare_version()
             if isValid:
                 return True, strMsg
             else:
                 if gui.question_message(strMsg + "\n\n" + constants.MESSAGE_0071):
                     return True, strMsg
                 else:
                     return False, strMsg
         else:
             return False, msgError
     except Exception, eMsg:
         return False, eMsg