giuspen / x-tile

X Tile
https://www.giuspen.net/x-tile/
Other
70 stars 13 forks source link

Right click on tray icon not working #11

Closed Armag67 closed 4 years ago

Armag67 commented 4 years ago

Hello, I am on Manjaro Linux 19.0.2 Xfce. Right click on the system tray icon of x-tile don't work and throw this Python traceback without terminating the program:

Traceback (most recent call last):
  File "/usr/share/x-tile/modules/core.py", line 427, in on_mouse_button_clicked_systray
    elif event.button == 3: self.ui.get_widget("/SysTrayMenu").popup(None, None, None, event.button, event.time)
TypeError: popup() missing 1 required positional argument: 'activate_time'

There is a "None" argument missing in the popup function ligne 427 of core.py. I suggest this little diff:

--- core.bug.py 2020-03-30 12:24:57.000000000 +0200
+++ core.py 2020-03-30 16:55:27.114733408 +0200
@@ -424,7 +424,7 @@
     def on_mouse_button_clicked_systray(self, widget, event):
         """Catches mouse buttons clicks upon the system tray icon"""
         if event.button == 1: self.toggle_show_hide_main_window()
-        elif event.button == 3: self.ui.get_widget("/SysTrayMenu").popup(None, None, None, event.button, event.time)
+        elif event.button == 3: self.ui.get_widget("/SysTrayMenu").popup(None, None, None, None, event.button, event.time)

     def toggle_show_hide_main_window(self, *args):
         if self.win_on_screen: self.window_hide()
giuspen commented 4 years ago

Thanks I'll fix shortly and issue a new version

giuspen commented 4 years ago

should be fixed now