
    ?g	                        d dl Z d dlZd dlZd dlZd dlmZ d dlZ ej                  dd        ej                  dd       d dlmZm	Z	  ej                  dd	        G d
 d      Zedk(  r! ed        e         ej                          yy)    N)setproctitleGtkz3.0XAppz1.0)r   r   cinnamonz/usr/share/localec                       e Zd ZdZd Zd Zy)
MainWindowz Create the UI c                 X   t        j                         }t        j                  |      j                  }t        j                  |      j
                  }t        j                         | _        | j                  j                  d       | j                  j                  d       | j                  j                  d      | _        | j                  j                  d      | _        | j                  j                  d      | _        | j                  j                  d      | _        | j                  j                  d      | _        | j                  j#                  t%        d             t'        j(                  | j                  d	       | j                  j                  d
      j+                  dt%        d      z         t         j,                  j/                  d|z        r| j                   j1                  d|z         n4| j                   j3                  d	t        j4                  j6                         | j                  j9                  dt        j:                         | j                  j9                  dt        j:                         | j                  j9                  d| j<                         | j                  j9                  d| j<                         | j                  j                  d      j?                  | j                  | j                  f       | j                  jA                          y )Nr   zX/usr/share/cinnamon/cinnamon-screensaver-lock-dialog/cinnamon-screensaver-lock-dialog.uimain_dialogbutton_cancel	button_okentry_away_message
image_facezScreen Lockerzcs-screensaverlabel_descriptionz	<i>%s</i>z/Please type an away message for the lock screenz%s/.facedestroyclickedactivatezdialog-action_area1)!osgetuidpwdgetpwuidpw_namepw_dirr   Builderbuilderset_translation_domainadd_from_file
get_objectwindowr   r   entryimage	set_title_r   set_window_icon_name
set_markuppathexistsset_from_fileset_from_icon_nameIconSizeDIALOGconnect	main_quitlock_screenset_focus_chainshow)selfuser_idusernamehome_dirs       X/usr/share/cinnamon/cinnamon-screensaver-lock-dialog/cinnamon-screensaver-lock-dialog.py__init__zMainWindow.__init__   s*   ))+<<(00<<(//{{}++J7""#}~ll--m<!\\44_E00=\\,,-AB
\\,,\:
a01!!$++/?@ 34??a  QB  OC  AC  	D77>>*x/0JJ$$Z(%:;JJ))*:CLL<O<OPIs}}5""9cmm<y$*:*:;

:t'7'78 56FFX\XjXjGkl    c                     | j                   j                         }|dk7  r2t        j                  ddd| j                   j                         g       nt        j                  ddg       t	        j
                          y )N zcinnamon-screensaver-commandz--lockz--away-message)r   get_text
subprocesscallr   r,   )r0   datamessages      r4   r-   zMainWindow.lock_screen9   s]    **%%'b=OO;XGWY]YcYcYlYlYnopOO;XFGr6   N)__name__
__module____qualname____doc__r5   r-    r6   r4   r   r      s    !Fr6   r   __main__z cinnamon-screensaver-lock-dialog)r   r:   gettextr   r   girequire_versiongi.repositoryr   r   installr   r>   mainrB   r6   r4   <module>rJ      s    
   
 % 	   5%     65 ! # 
/ 0- -^ z34LCHHJ r6   