Changeset 246:bf4298ec3d46 for src
- Timestamp:
- 06/12/12 18:14:19 (12 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- src/mlx/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/common.py
r241 r246 59 59 60 60 WEIGHT_BOLD = pango.WEIGHT_BOLD 61 62 WINDOW_STATE_ICONIFIED = gdk.WINDOW_STATE_ICONIFIED 63 WINDOW_STATE_WITHDRAWN = gdk.WINDOW_STATE_WITHDRAWN 61 64 62 65 pixbuf_new_from_file = gdk.pixbuf_new_from_file … … 112 115 WEIGHT_BOLD = pango.Weight.BOLD 113 116 117 WINDOW_STATE_ICONIFIED = gdk.WindowState.ICONIFIED 118 WINDOW_STATE_WITHDRAWN = gdk.WindowState.WITHDRAWN 119 114 120 pixbuf_new_from_file = gdkPixbuf.Pixbuf.new_from_file 115 121 -
src/mlx/gui/gui.py
r241 r246 544 544 iconified = gdk.WindowState.ICONIFIED if pygobject \ 545 545 else gdk.WINDOW_STATE_ICONIFIED 546 if self.config.hideMinimizedWindow and \ 547 (event.changed_mask&iconified)!=0 and \ 548 (event.new_window_state&iconified)!=0: 546 547 if (event.changed_mask&WINDOW_STATE_WITHDRAWN)!=0: 548 if (event.new_window_state&WINDOW_STATE_WITHDRAWN)!=0: 549 self._statusIcon.mainWindowHidden() 550 else: 551 self._statusIcon.mainWindowShown() 552 553 if self.config.hideMinimizedWindow and not pygobject and \ 554 (event.changed_mask&WINDOW_STATE_ICONIFIED)!=0 and \ 555 (event.new_window_state&WINDOW_STATE_ICONIFIED)!=0: 549 556 self.hideMainWindow(savePosition = False) 550 557 elif (event.changed_mask&WINDOW_STATE_ICONIFIED)!=0 and \ 558 (event.new_window_state&WINDOW_STATE_ICONIFIED)==0: 559 self._mainWindow.present() 560 551 561 def raiseCallback(self): 552 562 """Callback for the singleton handling code.""" … … 554 564 555 565 def raiseMainWindow(self): 556 """S How the main window if invisible, and raise it."""566 """Show the main window if invisible, and raise it.""" 557 567 if not self._mainWindow.get_visible(): 558 568 self.showMainWindow() … … 567 577 self._mainWindowX = self._mainWindowY = None 568 578 self._mainWindow.hide() 569 self._statusIcon.mainWindowHidden()570 579 return True 571 580 … … 575 584 self._mainWindow.move(self._mainWindowX, self._mainWindowY) 576 585 577 self._mainWindow.show() 586 if pygobject: 587 self._mainWindow.show() 588 else: 589 self._mainWindow.present() 578 590 self._mainWindow.deiconify() 579 591 580 self._statusIcon.mainWindowShown()581 582 592 def toggleMainWindow(self): 583 593 """Toggle the main window."""
Note:
See TracChangeset
for help on using the changeset viewer.