Compare commits

...

2 commits

3 changed files with 15 additions and 0 deletions

@ -0,0 +1 @@
Subproject commit d1146046c0a222d1c278cda5c8852980d79ddd23

View file

@ -1491,6 +1491,7 @@ class MenuPage(Page):
("edit_profile", self.edit_prof, (540, 440, 110, 60)), ("edit_profile", self.edit_prof, (540, 440, 110, 60)),
# ("delete_profile", self.delete_profile, (670, 440, 110, 60)), # ("delete_profile", self.delete_profile, (670, 440, 110, 60)),
("launch", self.launch, (0, 440, 185, 63)), ("launch", self.launch, (0, 440, 185, 63)),
("p2p_request", self.request_func, (10, 433, 185, 73)),
("disconnect", self.disconnect, (200, 433, 185, 73)), ("disconnect", self.disconnect, (200, 433, 185, 73)),
("disconnect_system_wide", self.disconnect, (200, 433, 185, 73)), ("disconnect_system_wide", self.disconnect, (200, 433, 185, 73)),
("just", self.connect, (200, 433, 185, 73)), ("just", self.connect, (200, 433, 185, 73)),
@ -1505,6 +1506,8 @@ class MenuPage(Page):
boton.setIconSize(boton.size()) boton.setIconSize(boton.size())
boton.clicked.connect(functools.partial(function)) boton.clicked.connect(functools.partial(function))
boton.setEnabled(False) boton.setEnabled(False)
if icon_name == "p2p_request":
self.request_button = boton
if icon_name == "disconnect": if icon_name == "disconnect":
boton.setEnabled(True) boton.setEnabled(True)
boton.setVisible(False) boton.setVisible(False)
@ -1555,6 +1558,15 @@ class MenuPage(Page):
else: else:
pass 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): def delete_status_update(self, text):
self.update_status.update_status(text) self.update_status.update_status(text)
self.eliminacion() self.eliminacion()
@ -1990,6 +2002,8 @@ class MenuPage(Page):
profile = self.profile_info.get(profile_name) profile = self.profile_info.get(profile_name)
self.boton_launch.setEnabled(True) self.boton_launch.setEnabled(True)
if hasattr(self, 'request_button'):
self.request_button.setEnabled(True)
self.boton_just.setEnabled(True) self.boton_just.setEnabled(True)
self.boton_just_session.setEnabled(True) self.boton_just_session.setEnabled(True)
self.boton_create.setEnabled(True) self.boton_create.setEnabled(True)

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB