
    ?g(                         d dl Z  e j                  dd        e j                  dd       d dlmZmZmZ d dlmZ d dl  G d d	      Z	y)
    NGtkz3.0CDesktopEnums)Gior   r   )SidePage)*c                   0    e Zd ZdZdZ ed      Zd Zd Zy)ModulewindowsprefszManage window preferencesc                 Z    t        d      }t        t        d      d|||       }|| _        y )Nz@windows, titlebar, edge, switcher, window list, attention, focusWindowsz
cs-windows)module)_r   sidePage)selfcontent_boxkeywordsr   s       ;/usr/share/cinnamon/cinnamon-settings/modules/cs_windows.py__init__zModule.__init__   s+    WXAiL,+VZ[     c                      j                   	skt        d       t                j                  _         j                  j                   j                  j                         t               } j                  j                  j                  |dt        d             t        j                  j                  t        j                  j                        }|j                  t        d            }g }t        j                  j!                         t        j"                  j$                  k(  r9|j'                  dt        d      g       |j'                  dt        d      g       n8|j'                  dt        d      g       |j'                  dt        d      g       |j'                  d	t        d
      g       |j'                  dt        d      g       t)        t        d      dd||      }|j+                  |       |j                  t        d            }dt        d      gdt        d      gdt        d      gdt        d      gdt        d      gdt        d      gdt        d      gd t        d!      gd"t        d#      gd$t        d%      gg
}t)        t        d&      dd'||      }|j+                  |       t)        t        d(      dd)||      }|j+                  |       t)        t        d*      dd+||      }|j+                  |       d$t        d,      gd-t        d.      gd/t        d0      gg}t)        t        d1      dd2||      }|j+                  |       t-        t        d3      dd4t        d5            }|j/                  |       t1        j2                  d      |j4                  _        |j4                  j6                  j9                  d2|j4                  d6t0        j:                  j<                  d7 d        t               } j                  j                  j                  |d8t        d9             |j                  t        d:            }d;t        d<      gd=t        d>      gd?t        d@      gg}	t)        t        dA      ddB|	      }|j?                  t        dC             |j+                  |       tA        t        dD      ddE      }|j/                  |       t1        j2                  d      |j4                  _        |j4                  j6                  j9                  dB|j4                  d6t0        j:                  j<                  dF d        tA        t        dG      dHdI      }|j+                  |       tC        t        dJ            }|j?                  t        dK             |j+                  |       |jE                  d      |jF                  dL _$         fdM}
 fdN}jK                  dO|       jK                  dP|
        |
dQ       tA        t        dR      dHdS      }|j+                  |       |j                  t        dT            }t        j                  j                  t        j                  j                        }dUt        dV      gdWt        dX      gdYt        dZ      gd[t        d\      gg}t)        t        d]      dHd^||      }|j+                  |       d_t        d`      gdadagdbdbgdcdcgg}t)        t        dd      dde||      }|j?                  t        df             |j+                  |       tM        t        dg      dHdht        di      t        dj      dkdldLm      }|jF                  j?                  t        dn             |jO                  dot        jP                  jR                  d        |j+                  |       t               } j                  j                  j                  |dpt        dq             |j                  t        dq            }drt        ds      gdtt        du      gdvt        dw      gdxt        dy      gdzt        d{      gd|t        d}      gd~t        d      gg}t)        t        d      dd|      }|j+                  |       tA        t        d      dd      }|j+                  |       tA        t        d      dd      }|j+                  |       t-        t        d      ddt        d      dddd      }|j+                  |       tA        t        d      dd      }|j+                  |       tA        t        d      dd      }|j+                  |       y y )NzLoading Windows moduletitlebarTitlebarButtonsz:minimize,maximize,closeLeftzclose,maximize,minimize:Rightz:closeGnomezclose:minimize,maximizezClassic MaczButtons layoutz#org.cinnamon.desktop.wm.preferenceszbutton-layout)
size_groupActionsztoggle-shadezToggle Shadeztoggle-maximizezToggle Maximizeztoggle-maximize-horizontallyzToggle Maximize Horizontallyztoggle-maximize-verticallyzToggle Maximize Verticallyztoggle-stuckzToggle on all workspacesztoggle-abovezToggle always on topminimizeMinimizemenuMenulowerLowernoneNonez Action on title bar double-clickzaction-double-click-titlebarz Action on title bar middle-clickzaction-middle-click-titlebarzAction on title bar right-clickzaction-right-click-titlebarNothingshadezShade and unshadeopacityzAdjust opacityz%Action on title bar with mouse scrollzaction-scroll-titlebarzMinimum opacityzmin-window-opacity%zreveal-childc                     | dk(  S )Nr*    xs    r   <lambda>z+Module.on_module_selected.<locals>.<lambda>L   s      TU  Yb  Tb r   behaviorBehaviorzWindow FocusclickClicksloppySloppymouseMousezWindow focus modez
focus-modeaR  The window focus mode indicates how windows are activated. It has three possible values; "click" means windows must be clicked in order to focus them, "sloppy" means windows are focused when the mouse enters the window, and "mouse" means windows are focused when the mouse enters the window and unfocused when the mouse leaves the window.z#Automatically raise focused windowsz
auto-raisec                 
    | dv S )N)r5   r7   r-   r.   s    r   r0   z+Module.on_module_selected.<locals>.<lambda>^   s      LM  Qd  Ld r   z>Bring windows which require attention to the current workspacezorg.cinnamon.muffinz"bring-windows-to-current-workspacez2Give focus to new windows launched from a terminalzNormally, all windows created by the user are given initial focus. This controls whether or not to include programs launched from a terminal.Fc                     j                   ry d_         j                  j                  |      t        j                  j
                  k(         d_         y )NTF)updating
set_activeget_enumr   FocusNewWindowsSMART)settingskey	gsettingsreal_switchr   s     r   update_switchz0Module.on_module_selected.<locals>.update_switchm   sE    == $&&y'9'9#'>-B_B_BeBe'ef %r   c                     j                   ry d_         j                  dj                         rt        j                  j
                  nt        j                  j                         d_         y )NTfocus-new-windowsF)r;   set_enum
get_activer   r>   r?   STRICT)widgetpspecrB   rC   r   s     r   update_settingz1Module.on_module_selected.<locals>.update_settingt   sf    == $""#6JUJ`J`Jb=#@#@#F#Fhu  iF  iF  iM  iMN %r   znotify::activezchanged::focus-new-windowsrF   z*Attach dialog windows to the parent windowzattach-modal-dialogszMoving and Resizing Windows	automatic	AutomaticpointerCursormanualManualcenterCenterz Location of newly opened windowszplacement-mode Disabledz<Alt>z<Super>z	<Control>z&Special key to move and resize windowszmouse-button-modifierz|While the special key is pressed, windows can be dragged with the left mouse button and resized with the right mouse button.zDraggable border widthzdraggable-border-widthNarrowerWider   @   )
show_valuezNThis adjusts the width of that portion of the window border used for resizing.
   alttabzAlt-Tabiconsz
Icons only
thumbnailszThumbnails onlyzicons+thumbnailszIcons and thumbnailszicons+previewzIcons and window previewpreviewzWindow preview (no icons)	coverflowzCoverflow (3D)timelinezTimeline (3D)zAlt-Tab switcher stylezorg.cinnamonzalttab-switcher-stylezMDisplay the alt-tab switcher on the primary monitor instead of the active onez'alttab-switcher-enforce-primary-monitorz9Move minimized windows to the end of the alt-tab switcherzalttab-minimized-awarez,Delay before displaying the alt-tab switcherzalttab-switcher-delaymillisecondsr   i  2      )unitsminimaxisteppagez Show windows from all workspacesz#alttab-switcher-show-all-workspacesz,Warp mouse pointer to the new focused windowz"alttab-switcher-warp-mouse-pointer)*loadedprintSettingsStackr   stack
add_widgetSettingsPage
add_titledr   r   	SizeGroupnewSizeGroupMode
HORIZONTALadd_sectionWidgetget_default_directionTextDirectionRTLappendGSettingsComboBoxadd_rowGSettingsSpinButtonadd_reveal_rowr   Settingsrevealerr@   bind_with_mappingSettingsBindFlagsGETset_tooltip_textGSettingsSwitchSwitchget_settingscontent_widgetr;   connectGSettingsRangeadd_markPositionTypeTOP)r   rj   r   r@   button_optionsrJ   action_optionsscroll_optionsspinfocus_optionsrD   rL   placement_optionsspecial_key_optionsalttab_stylesrB   rC   s   `              @@r   on_module_selectedzModule.on_module_selected   s	   {{*+"//DMMMM$$T]]%8%89  >DMM**4Qz]K**3+<+<+G+GHJ'')5HNzz//1S5F5F5J5JJ%%'A1V9&MN%%'A1W:&NO%%'A1W:&NO%%'A1V9&MN!!8QwZ"89!!#<a>N"OP&q)9':<acr  uC  PZ  [FV$'')5H-q/@ADUWXYjWkCl=qA_?`a  eA  CD  Ea  Cb  dc-q1K/LMP^`abx`yOz)1Z=9FAfI;NQXZ[\cZdPehnpqrxpygz|N
 'q)K'LNs  vT  Vd  q{  |FV$&q)K'LNs  vT  Vd  q{  |FV$&q)J'KMr  uR  Tb  oy  zFV$%q|4gqAT?U5VXacdeucvWwxN&q)P'QSx  {S  Uc  pz  {FV$&q):';=bdxz{|  {A  BD##D)%(\\2W%XDMM"MM""445Mt}}^lnq  oD  oD  oH  oH  Jb  dh  i  >DMM**4Qz]K''.(9:H%qz2Xq{4KgWXY`WaMbcM&q)<'=?dfr  uB  CF##A  'A  %B  CV$$Q'L%MOt  wC  DF##F+'*||4Y'ZFOO$OO$$66|V__Vdfif{f{ff  Bd  fj  k$Q'g%hj  Bf  gFV$ ARSTF##A 's %t uV$++,QRI //K!DM&&  0.A:MJ)%89 %Q'S%TVk  nD  EFV$''*G(HIH**3+<+<+G+GHJ"-q~!>AhK@X[cefgoepZqt|~  AI  J  tK  !L&q)K'LNceu  xI  V`  aFV$$&*#6'8JIW`Kacnp{b|"}&q)Q'RTy  |S  Uh  u  @F##A  'e  %f  gV$#A&>$?AVXprst~r  BC  DK  BL$%re=F!!221  6F  4G  HOOB 0 0 4 4d;V$  >DMM**41Y<H'')5H !L/*q!234#Q'=%>? !$>"?@A9:;a 012Q/0M 'q)A'BNTkmz{FV$$Q'v%w  zH  Js  tFV$$Q'b%ces  vN  OFV$(+Y)Z\j  mD  LM  N\  L]  de  lp  wy  @C  DFV$$Q'I%JN  ]B  CFV$$Q'U%VXf  iM  NFV$A r   N)	__name__
__module____qualname__namecategoryr   commentr   r   r-   r   r   r	   r	      s"    DH+,G!
a%r   r	   )
girequire_versiongi.repositoryr   r   r   SettingsWidgetsr   xapp.GSettingsWidgetsr	   r-   r   r   <module>r      sF    
   5%     ?E * 1 1 $ #k% k%r   