diff --git a/SMS-Exchange-Linux-GUI b/SMS-Exchange-Linux-GUI new file mode 160000 index 0000000..d114604 --- /dev/null +++ b/SMS-Exchange-Linux-GUI @@ -0,0 +1 @@ +Subproject commit d1146046c0a222d1c278cda5c8852980d79ddd23 diff --git a/gui/__main__.py b/gui/__main__.py index 068bf41..a69aeb1 100755 --- a/gui/__main__.py +++ b/gui/__main__.py @@ -1491,6 +1491,7 @@ class MenuPage(Page): ("edit_profile", self.edit_prof, (540, 440, 110, 60)), # ("delete_profile", self.delete_profile, (670, 440, 110, 60)), ("launch", self.launch, (0, 440, 185, 63)), + ("p2p_request", self.request_func, (10, 433, 185, 73)), ("disconnect", self.disconnect, (200, 433, 185, 73)), ("disconnect_system_wide", self.disconnect, (200, 433, 185, 73)), ("just", self.connect, (200, 433, 185, 73)), @@ -1505,6 +1506,8 @@ class MenuPage(Page): boton.setIconSize(boton.size()) boton.clicked.connect(functools.partial(function)) boton.setEnabled(False) + if icon_name == "p2p_request": + self.request_button = boton if icon_name == "disconnect": boton.setEnabled(True) boton.setVisible(False) @@ -1555,6 +1558,15 @@ class MenuPage(Page): else: pass + def request_func(self): + if hasattr(self, 'reverse_id'): + profile_id = self.reverse_id + 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)]) + def delete_status_update(self, text): self.update_status.update_status(text) self.eliminacion() @@ -1990,6 +2002,8 @@ 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) self.boton_just.setEnabled(True) self.boton_just_session.setEnabled(True) self.boton_create.setEnabled(True)