i-nex / I-Nex

System information tool written in gambas3, python, bash
http://i-nex.linux.pl/
174 stars 24 forks source link

Network TX popup doesn't close when application is closed #18

Closed dvejmz closed 8 years ago

dvejmz commented 8 years ago

Problem

Exiting the application doesn't close the popup which appears when clicking on Show Receive and Transmit in Network tab.

How to Reproduce

  1. Launch i-nex
  2. Navigate to Network tab. Any network interface will do.
  3. Click on Show Receive and Transmit button: network TX window will appear.
  4. Close i-nex without closing the popup first.
  5. Popup will stay even after the application main window is gone.

    Environment Info

    • OS: Arch Linux
    • Desktop Environment: None
    • Window Manager: awesome 3.5.6
    • X Version: 1.18.0

      Additional Comments

I noticed the TX window is the only popup which doesn't have its own "Close" button. Is that intentional?

alphastar868 commented 8 years ago

One correction: at least on CentOS 7 1511, the Network Tx window has a close 'X' in the top right corner, but not a Close button with a red 'X' in front at the bottom of the window, like other I-Nex windows. Perhaps this is a function of your Desktop Environment on Arch Linux?

However, I can confirm that ALL of the 'pop-up' I-Nex windows I tested DO remain open after the application is closed - including the 4 main buttons in the bottom left of the main I-nex app (Take a screenshot, Options, Generate report, About this app).

alphastar868 commented 8 years ago

The patch below corrects the issue with I-Nex windows remaining open after the main app window has closed:

i-nex-7.4.0-closewin.patch

--- ./I-Nex/i-nex/.src/Finfosys.class   2016-08-14 10:44:36.000000000 -0400
+++ ./I-Nex/i-nex/.src/Finfosys.class   2016-08-15 20:23:19.021599530 -0400
@@ -1152,7 +1152,7 @@
 End

 Public Sub Button1_Click()
-  Form_Close()
+ Form_Close()
 End

 Public Sub Form_Move()
@@ -1162,8 +1162,28 @@

 End

+Public Sub Form_CloseWindows()
+
+  FCopyUrl.Close
+  FInputDate.Close
+  FDirDialog.Close
+  FFileDialog.Close
+
+  FModules.Close
+  FEDID.Close
+  FNET_R_T.Close
+  FSystemInfo.Close
+
+  FValidate.Close
+  ScreenShot.Close
+  FReport_Gen.Close
+  About.Close
+
+End
+
 Public Sub Form_Close()

+  Form_CloseWindows() 
   Settings["Window/X"] = Me.X
   Settings["Window/Y"] = Me.Y
   Settings["Tab/Pos"] = TabStrip1.Orientation