def delete_package_clicked(self, button, hbox): pkg = hbox.get_children()[0].get_text() if self.delete_package_dialog(pkg): self.package_list_box.remove(hbox) for p in range( len(self.core.current_var["sh"]["packages"]) - 1, -1, -1): if self.core.current_var["sh"]["packages"][p][0] == pkg: self.core.current_var["sh"]["packages"].pop(p) #Compruebo que es accesible via apache, y pregunto si lo borro tambien del servidor exist_in_server = self.core.n4d.app_deb_exist( pkg, self.core.current_var["sh"]["url"]) if exist_in_server[0]: if self.remove_file_dialog(pkg): self.thread = threading.Thread( target=self.delete_package_thread(pkg)) self.thread.daemon = True self.thread.start() main_window = self.core.lri.main_window dialog = Dialog.ApplyingChangesDialog( main_window, title="Lliurex Remote Installer", msg=_("Deleting files.......")) dialog.show() GLib.timeout_add(500, self.check_delete_thread, dialog) else: self.check_delete_thread
def apply_update_button_clicked(self, widget): if self.update_radiobutton_2.get_active(): self.core.current_var["update"]["version"] = (( self.update_label_4.get_label()).replace( 'Current version: ', '')) if self.core.current_var["update"]["version"] == '': self.error_repos_dialog("Mirror") return True else: self.core.current_var["update"]["version"] = (( self.update_label_3.get_label()).replace( 'Current version: ', '')) if self.core.current_var["update"]["version"] == '': self.error_repos_dialog("Lliurex.net") return True self.thread = threading.Thread(target=self.apply_changes_thread) self.thread.daemon = True self.thread.start() #Se crea el mensaje de Apply segun: self.msg1 = _("New sheduled are programed, applying changes.......") main_window = self.core.lri.main_window dialog = Dialog.ApplyingChangesDialog(main_window, title="Lliurex Remote Installer", msg=self.msg1) dialog.show() GLib.timeout_add(500, self.check_apply_thread, dialog)
def apply_changes_button_clicked(self,widget): self.thread_changes=threading.Thread(target=self.apply_changes_thread) self.thread_changes.daemon=True self.thread_changes.start() main_window=self.core.lri.main_window dialog=Dialog.ApplyingChangesDialog(main_window,"Lliurex Remote installer",_("LlX Remote is adding zero-packages.\nUpdating variable,please wait...")) dialog.show() GLib.timeout_add(500,self.check_apply_thread,dialog)
def apply_changes_button_clicked(self, widget): self.thread = threading.Thread(target=self.apply_changes_thread) self.thread.daemon = True self.thread.start() main_window = self.core.lri.main_window dialog = Dialog.ApplyingChangesDialog( main_window, "Lliurex Remote installer", _("Updating repositories and testing packages...")) dialog.show() GLib.timeout_add(500, self.check_apply_thread, dialog)
def apply_exec_button_clicked(self, widget): self.exec_list_init() self.thread = threading.Thread(target=self.apply_changes_thread) self.thread.daemon = True self.thread.start() #Se crea el mensaje de Apply segun si sse suben ficheros o no. self.msg1 = _("Applying changes.......") if self.new_execs not in [None, "", []]: self.msg1 = _("Updating files and applying changes.......") else: self.msg1 = _("Applying changes.......") main_window = self.core.lri.main_window dialog = Dialog.ApplyingChangesDialog(main_window, title="Lliurex Remote Installer", msg=self.msg1) dialog.show() GLib.timeout_add(500, self.check_apply_thread, dialog)
def add_zero_button_clicked(self,widget): try: self.search_activate=False self.entry_zero.set_text('') #Borramos los elementos del Hbox de la pantalla principal for i in self.zero_list_available_box: self.zero_list_available_box.remove(i) except Exception as e: self.core.dprint("[LliureXRemoteInstaller][ZeroBox](generate_element_list) Error: %s"%e) return False self.search_activate=True self.thread_zero=threading.Thread(target=self.add_zero_button_clicked_thread) self.thread_zero.daemon=True self.thread_zero.start() main_window=self.core.lri.main_window dialog=Dialog.ApplyingChangesDialog(main_window,"Lliurex Remote installer",_("Generating list ZMDs availables...")) dialog.show() GLib.timeout_add(500,self.check_add_zero_button_clicked_thread,dialog)