Ignore:
Timestamp:
05/02/12 17:43:02 (13 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Added option to hide the window when minimized

Location:
src/mlx/gui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/gui/gui.py

    r142 r147  
    476476        iconified = gdk.WindowState.ICONIFIED if pygobject \
    477477                    else gdk.WINDOW_STATE_ICONIFIED
    478         if (event.changed_mask&iconified)!=0 and (event.new_window_state&iconified)!=0:
     478        if self.config.hideMinimizedWindow and \
     479           (event.changed_mask&iconified)!=0 and \
     480           (event.new_window_state&iconified)!=0:
    479481            self.hideMainWindow(savePosition = False)
    480482
  • src/mlx/gui/prefs.py

    r139 r147  
    6767        """Setup the dialog from the given configuration."""
    6868        self._setLanguage(config.language)
     69        self._hideMinimizedWindow.set_active(config.hideMinimizedWindow)
    6970        self._onlineGateSystem.set_active(config.onlineGateSystem)
    7071        self._onlineACARS.set_active(config.onlineACARS)
     
    9192        """Setup the given config from the settings in the dialog."""
    9293        config.language = self._getLanguage()
     94        config.hideMinimizedWindow = self._hideMinimizedWindow.get_active()
    9395        config.onlineGateSystem = self._onlineGateSystem.get_active()
    9496        config.onlineACARS = self._onlineACARS.get_active()
     
    145147        self._changingLanguage = False
    146148        self._warnedRestartNeeded = False
     149
     150        self._hideMinimizedWindow = gtk.CheckButton(xstr("prefs_hideMinimizedWindow"))
     151        self._hideMinimizedWindow.set_use_underline(True)
     152        self._hideMinimizedWindow.set_tooltip_text(xstr("prefs_hideMinimizedWindow_tooltip"))
     153        mainBox.pack_start(self._hideMinimizedWindow, False, False, 4)
    147154
    148155        self._onlineGateSystem = gtk.CheckButton(xstr("prefs_onlineGateSystem"))
Note: See TracChangeset for help on using the changeset viewer.