| 289 | | # toggle visible/hidden for roster window |
| 290 | | if win.get_property('visible'): # visible in ANY virtual desktop? |
| 291 | | |
| 292 | | # we could be in another VD right now. eg vd2 |
| 293 | | # and we want to show it in vd2 |
| 294 | | if not gtkgui_helpers.possibly_move_window_in_current_desktop(win): |
| 295 | | win.hide() # else we hide it from VD that was visible in |
| | 290 | if len(gajim.events.get_systray_events()) == 0: |
| | 291 | #We check if there is present at least one inconming message |
| | 292 | #There's no need to check settings if there is not. |
| | 293 | #And we always change the visibility of roster |
| | 294 | if win.get_property('visible'): # visible in ANY virtual desktop? |
| | 295 | # we could be in another VD right now. eg vd2 |
| | 296 | # and we want to show it in vd2 |
| | 297 | if not gtkgui_helpers.possibly_move_window_in_current_desktop(win): |
| | 298 | win.hide() # else we hide it from VD that was visible in |
| | 299 | else: |
| | 300 | # in Windows (perhaps other Window Managers too) minimize state |
| | 301 | # is remembered, so make sure it's not minimized (iconified) |
| | 302 | # because user wants to see roster |
| | 303 | win.deiconify() |
| | 304 | win.present() |
| 297 | | # in Windows (perhaps other Window Managers too) minimize state |
| 298 | | # is remembered, so make sure it's not minimized (iconified) |
| 299 | | # because user wants to see roster |
| 300 | | win.deiconify() |
| 301 | | win.present() |
| | 306 | if on_left_click_recive == False: |
| | 307 | # use middle click to recive, so toggle visible/hidden for roster window |
| | 308 | if win.get_property('visible'): # visible in ANY virtual desktop? |
| | 309 | |
| | 310 | # we could be in another VD right now. eg vd2 |
| | 311 | # and we want to show it in vd2 |
| | 312 | if not gtkgui_helpers.possibly_move_window_in_current_desktop(win): |
| | 313 | win.hide() # else we hide it from VD that was visible in |
| | 314 | else: |
| | 315 | # in Windows (perhaps other Window Managers too) minimize state |
| | 316 | # is remembered, so make sure it's not minimized (iconified) |
| | 317 | # because user wants to see roster |
| | 318 | win.deiconify() |
| | 319 | win.present() |
| | 320 | else: |
| | 321 | #if user prefers to recive by left click, do it |
| | 322 | self.handle_first_event() |
| | 323 | |