diff --git a/SMS-Exchange-Linux-GUI/interact_with_rest_of_app/__pycache__/process_the_proxy.cpython-312.pyc b/SMS-Exchange-Linux-GUI/interact_with_rest_of_app/__pycache__/process_the_proxy.cpython-312.pyc old mode 100755 new mode 100644 index 0abe99e..ce7e463 Binary files a/SMS-Exchange-Linux-GUI/interact_with_rest_of_app/__pycache__/process_the_proxy.cpython-312.pyc and b/SMS-Exchange-Linux-GUI/interact_with_rest_of_app/__pycache__/process_the_proxy.cpython-312.pyc differ diff --git a/gui/__main__.py b/gui/__main__.py index f5706cb..ac3bc01 100755 --- a/gui/__main__.py +++ b/gui/__main__.py @@ -1459,11 +1459,13 @@ class MenuPage(Page): self.button_states = {} self.is_system_connected = False self.profile_button_map = {} + self.p2p_processes = {} self.font_style = f"font-family: '{main_window.open_sans_family}';" if main_window.open_sans_family else "" - # self.label.setStyleSheet("background-color: rgba(0, 255, 0, 51);") - # Establecer el color de fondo y el color del texto utilizando hojas de estilo self.create_interface_elements() + self.p2p_timer = QTimer(self) + self.p2p_timer.timeout.connect(self.update_p2p_button_status) + self.p2p_timer.start(1000) def showEvent(self, event): super().showEvent(event) @@ -1564,11 +1566,24 @@ class MenuPage(Page): def request_func(self): if hasattr(self, 'reverse_id'): profile_id = self.reverse_id + if profile_id in self.p2p_processes and self.p2p_processes[profile_id].poll() is None: + return project_root = os.path.dirname( os.path.dirname(os.path.abspath(__file__))) script_path = os.path.join( project_root, 'SMS-Exchange-Linux-GUI', 'GUI.py') - subprocess.Popen([sys.executable, script_path, str(profile_id)]) + process = subprocess.Popen( + [sys.executable, script_path, str(profile_id)]) + self.p2p_processes[profile_id] = process + if hasattr(self, 'request_button'): + self.request_button.setEnabled(False) + + def update_p2p_button_status(self): + if hasattr(self, 'reverse_id') and hasattr(self, 'request_button'): + is_running = self.reverse_id in self.p2p_processes and self.p2p_processes[self.reverse_id].poll( + ) is None + if self.request_button.isEnabled() == is_running: + self.request_button.setEnabled(not is_running) def delete_status_update(self, text): self.update_status.update_status(text) @@ -2014,7 +2029,9 @@ class MenuPage(Page): profile = self.profile_info.get(profile_name) self.boton_launch.setEnabled(True) if hasattr(self, 'request_button'): - self.request_button.setEnabled(True) + is_running = self.reverse_id in self.p2p_processes and self.p2p_processes[self.reverse_id].poll( + ) is None + self.request_button.setEnabled(not is_running) self.boton_just.setEnabled(True) self.boton_just_session.setEnabled(True) self.boton_create.setEnabled(True) diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..282130f --- /dev/null +++ b/requirements.txt @@ -0,0 +1,19 @@ +aiohappyeyeballs==2.6.1 +aiohttp==3.13.3 +aiosignal==1.4.0 +asyncio==4.0.0 +attrs==25.4.0 +certifi==2026.1.4 +charset-normalizer==3.4.4 +frozenlist==1.8.0 +idna==3.11 +multidict==6.7.0 +propcache==0.4.1 +PyQt6==6.10.2 +PyQt6-Qt6==6.10.1 +PyQt6_sip==13.11.0 +qasync==0.28.0 +requests==2.32.5 +typing_extensions==4.15.0 +urllib3==2.6.3 +yarl==1.22.0