
    ?g	q                     J   d dl Z d dlmZ d dl d dl dZdZdZdZdZ	d	Z
d
ZdZdZdZd ZdZdZd ZdZdZi Z ed       ed       ed       ed       ed      dZded<   dd ed      fdd ed      ffed<   dd ed      fd d! ed"      fd#d$ ed%      ffed&<   d'd' ed(      fd)d) ed*      fd+d+ ed,      fd-d- ed.      ffed/<   d0d0 ed1      fd2d2 ed3      ffed4<   i Zg d5ed<   g d6ed!<   g d7ed-<   g d8ed'<   g d9ed:<   d; ed<       ed=      fd> ed?       ed@      fdA edB       edC      fdD ed%       edE      fdF edG       edH      fgZdI edJ      fdK edL      fdM edN      fdO edP      fdQ edR      fdS edT      fdU edV      fdW edX      fdY edZ      fd[ ed\      fd] ed^      fd_ ed`      fda edG      fgZ G db dcej8                        Z G dd deej<                        Z G df dgej@                        Z! G dh diejD                        Z# G dj dkejD                        Z$ G dl dmejJ                        Z& G dn doejD                        Z' G dp dqejD                        Z( G dr dsejR                        Z* G dt du      Z+ G dv dwe,      Z-y)x    N)SidePage)*zautorun-neverzautorun-x-content-start-appzautorun-x-content-ignorezautorun-x-content-open-folderzcc-item-askzcc-item-do-nothingzcc-item-open-folderz#org.cinnamon.desktop.media-handlingz2org.cinnamon.desktop.default-applications.terminalz4org.cinnamon.desktop.default-applications.calculator      AccessibilityInternet
MultimediaOfficeSystem)accessibilityinternet
multimediaofficesystem r   x-scheme-handler/httpWebzx-scheme-handler/mailtoMailr   audio/x-vorbis+oggaudioMusicvideo/x-ogm+oggvideoVideoz
image/jpegimagePhotosr   application/mswordWordzapplication/msexcelSpreadsheetzapplication/pdfPDFtext/x-pythonzSource Coder   zinode/directoryzFile Managerz
text/plainz
Plain Textr   ) z
audio/3gppz	audio/aacz	audio/ac3z
audio/flacz	audio/m4az
audio/midiz	audio/mp3z	audio/mp4zaudio/mp4a-latmz
audio/mpegzaudio/mpeg3z	audio/mpgz	audio/oggzaudio/vorbisz	audio/wavz
audio/wavez
audio/webmzaudio/x-aaczaudio/x-aiffzaudio/x-flaczaudio/x-mp3zaudio/x-mpegzaudio/x-mpeg-3zaudio/x-mpgzaudio/x-ms-asfzaudio/x-ms-wmazaudio/x-oggzaudio/x-oggflaczaudio/x-vorbisr   zaudio/x-wavzaudio/x-wavpack)%z	video/3gpz
video/3gppz
video/divxz	video/flvz	video/mp4zvideo/mp4v-esz
video/mpegzvideo/msvideoz	video/oggzvideo/quicktimez
video/vivozvideo/vnd.divxzvideo/vnd.rn-realvideoz
video/webmzvideo/x-animzvideo/x-avizvideo/x-flczvideo/x-flizvideo/x-fliczvideo/x-flvzvideo/x-m4vzvideo/x-matroskazvideo/x-mngzvideo/x-mpegzvideo/x-mpeg2zvideo/x-ms-afszvideo/x-ms-asfzvideo/x-ms-asxzvideo/x-ms-wmzvideo/x-ms-wmvzvideo/x-ms-wvxzvideo/x-ms-wvxvideozvideo/x-msvideozvideo/x-nsvr   zvideo/x-theorazvideo/x-theora+ogg)ztext/x-chdrztext/x-csrcztext/x-c++hdrztext/x-c++srcztext/x-javaztext/x-dsrcztext/x-pascalztext/x-perlr!   zapplication/x-phpzapplication/x-httpd-php3zapplication/x-httpd-php4zapplication/x-httpd-php5zapplication/xmlz
text/x-sqlztext/x-diffzapplication/x-rubyzapplication/x-shellscriptzapplication/javascriptztext/x-makefileztext/cssztext/turtleztext/x-fortranz	text/yamlzapplication/x-m4z	text/x-vbztext/x-csharp)	r   z'application/vnd.oasis.opendocument.textzGapplication/vnd.openxmlformats-officedocument.wordprocessingml.documentz0application/vnd.oasis.opendocument.text-templatezapplication/rtfz#application/vnd.stardivision.writerzapplication/vnd.wordperfectzapplication/vnd.ms-workszapplication/x-abiword)application/vnd.ms-excelz.application/vnd.oasis.opendocument.spreadsheetzAapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheetzDapplication/vnd.openxmlformats-officedocument.spreadsheetml.templatez7application/vnd.oasis.opendocument.spreadsheet-templatez!application/vnd.stardivision.calcr"   zx-content/audio-cddazCD audioz#Select an application for audio CDszx-content/video-dvdz	DVD videoz$Select an application for video DVDszx-content/audio-playerzMusic playerz=Select an application to run when a music player is connectedzx-content/image-dcfz7Select an application to run when a camera is connectedzx-content/unix-softwareSoftwarez&Select an application for software CDszx-content/audio-dvdz	audio DVDzx-content/blank-bdzblank Blu-ray disczx-content/blank-cdzblank CD disczx-content/blank-dvdzblank DVD disczx-content/blank-hddvdzblank HD DVD disczx-content/video-blurayzBlu-ray video disczx-content/ebook-readerze-book readerzx-content/video-hddvdzHD DVD video disczx-content/image-picturecdz
Picture CDzx-content/video-svcdzSuper Video CDzx-content/video-vcdzVideo CDzx-content/win32-softwarezWindows softwarezx-content/softwarec                        e Zd Z fdZ xZS )	ColumnBoxc                 &   t         t        |           t        j                  j                  d      }|j                  d|z         |j                  dd       | j                  d       | j                  |ddd       | j                  |ddd       y )N z
<b>%s
</b>      ?F   Tr   )superr%   __init__GtkLabelnew
set_markupset_alignmentset_homogeneous
pack_startpack_end)selftitlecontentlabel	__class__s       ;/usr/share/cinnamon/cinnamon-settings/modules/cs_default.pyr+   zColumnBox.__init__   sw    i')		b!./C%U#ueQ/gtT1-    __name__
__module____qualname__r+   __classcell__r8   s   @r9   r%   r%      s    	. 	.r:   r%   c                   *     e Zd Z fdZd Zd Z xZS )ButtonTablec                 V   t         t        |   |dd       | j                  d       | j	                  d       | j                  t        j                  j                  d      ddd|t        j                  j                  t        j                  j                  z  ddd	       d| _        y )	Nr   F)n_rows	n_columnshomogeneous      r'      r   )r*   rB   r+   set_row_spacingsset_col_spacingsattachr,   r-   r.   AttachOptionsEXPANDFILLrow)r4   linesr8   s     r9   r+   zButtonTable.__init__   s    k4)5aW\)]a b!CIIMM"%q!Qs7H7H7O7OPSPaPaPfPf7fhiklnopr:   c                    |rot        ||      }| j                  |dd| j                  | j                  dz   t        j                  j
                  t        j                  j                  z  ddd	       | j                  |dd| j                  | j                  dz   t        j                  j                  ddd	       | xj                  dz  c_        y )Nr   r   r   )MnemonicLabelrL   rP   r,   rM   rN   rO   )r4   r7   buttons      r9   addRowzButtonTable.addRow   s    !%0EKKq!TXXtxxz3;L;L;S;STWTeTeTjTj;jlmoprstFAq$((DHHQJ8I8I8N8NPQSTVWXAr:   c                 .    | xj                   dz  c_         y )Nr   )rP   r4   s    r9   	forgetRowzButtonTable.forgetRow   s    Ar:   )r<   r=   r>   r+   rU   rX   r?   r@   s   @r9   rB   rB      s    r:   rB   c                        e Zd Z fdZ xZS )rS   c                 
   t         t        |   d       | j                  |       | j	                  |       | j                  dd       | j                  t        j                  j                         | j                  d       y )Nr'   )r7   g        r(   T)r*   rS   r+   set_text_with_mnemonicset_mnemonic_widgetr0   
set_valignr,   AlignCENTERset_line_wrap)r4   textwidgetr8   s      r9   r+   zMnemonicLabel.__init__   se    mT+B+7##D)  (3$		(()4 r:   r;   r@   s   @r9   rS   rS      s    ! !r:   rS   c                   ,     e Zd Z fdZddZd Z xZS )DefaultAppChooserButtonc                     t         t        |   |       || _        || _        | j                  d       | j                  d       | j                  d| j                         y )Ncontent_typeTchanged)	r*   rd   r+   rg   generic_content_typeset_show_default_itemset_show_dialog_itemconnect	onChanged)r4   rg   gen_content_typer8   s      r9   r+   z DefaultAppChooserButton.__init__   sT    %t5<5P($4!""4(!!$'Y/r:   c                 D    t         j                  j                  | |       y Nr,   Widgetdo_scroll_eventr4   eventdatas      r9   rs   z'DefaultAppChooserButton.do_scroll_event        	

""4/r:   c                    |j                         }|rJt        d|j                         z         |j                         }d }| j                  t
        v rt
        | j                     }g }|kt        |      D ]]  }|j                  | j                        s|j                  |      r t        d|z         |j                  |       Pt        d|z         _ |Ct        |      D ]5  }||vs|j                  |      rt        d|z         (t        d|z         7 | j                  dk(  r3|j                  d      s!t        d|j                         ddd	       y y y y )
Nz%s: z!  Set as default for supported %sz/  Failed to set as default application for '%s'z!  Set as default for hardcoded %sr   zx-scheme-handler/httpsz  Failed to set 'z"' as the default application for '')get_app_infoprintget_nameget_supported_typesri   	mimetypessorted
startswithset_as_default_for_typeappendrg   )r4   rT   infosupported_mimetypeshardcoded_mimetypes	set_mimests          r9   rm   z!DefaultAppChooserButton.onChanged  sm   ""$&4==?*+"&":":"<"&((I5&/0I0I&J#I #. 34 YA||D$=$=>77;!"E"IJ%,,Q/!"SVW"WXY #. 34 YA	)77;!"E"IJ!"SVW"WXY   $;;334LMX\XeXeXg  jB  C  D N <= r:   rp   r<   r=   r>   r+   rs   rm   r?   r@   s   @r9   rd   rd      s    00#Dr:   rd   c                   ,     e Zd Z fdZddZd Z xZS )DefaultTerminalButtonc                 B   t         t        |           | j                  d| j                         t
        j                         }g | _        g | _        t
        j                  j                  t              | _        | j                  j                  d      | _        d}| j                  w|t        |      k  rg||   | _        t
        j                   j#                  | j                        }t
        j                   j                  | j                  d      }t
        j                   j                  | j                  d      }t
        j                   j                  | j                  d      }|d|v r|||d|vr|| j                  vru| j%                  ||t
        j&                  j                  |             | j                  j)                  |       | j                  |k(  r| j+                  | j                         |d	z  }| j                  |t        |      k  rey y y y )
Nrh   execr   ExecNameIconTerminalEmulatorgksur   )r*   r   r+   rl   rm   Gioapp_info_get_all	this_itemactive_itemsSettingsr.   TERMINAL_SCHEMAsettings
get_string	key_valuelenDesktopAppInfoget_categoriesappend_custom_item
ThemedIconr   set_active_custom_item)r4   appscount_upcat_valexec_valname_valicon_valr8   s          r9   r+   zDefaultTerminalButton.__init__)  s   #T35Y/##%((911&9nn(XD	-A!(^DN((77GG))44T^^VLH))44T^^VLH))44T^^VLH"'9W'D'H,@XEY^dlt^t  zB  JN  J[  J[  z[++Hh@R@RS[@\]%%,,X6~~133DNNCMH nn(XD	-A(-A(r:   c                 D    t         j                  j                  | |       y rp   rq   rt   s      r9   rs   z%DefaultTerminalButton.do_scroll_eventD  rw   r:   c                 z    |j                         }| j                  |   }| j                  j                  d|       y Nr   
get_activer   r   
set_stringr4   rT   	index_numcommand_keys       r9   rm   zDefaultTerminalButton.onChangedL  4    %%'	''	2  5r:   rp   r   r@   s   @r9   r   r   '  s    606r:   r   c                   $     e Zd Z fdZd Z xZS )TerminalExecArgEntryc                    t         t        |           | j                  d| j                         t
        j                  j                  t              | _	        | j                  j                  d      | _        | j                         j                  | j                  d       | j                  d       | j                  t!        d             y )Nrh   exec-argzECommand-line option for your terminal to execute a passed-in command.)r*   r   r+   rl   rm   r   r   r.   r   r   r   r   
get_bufferset_textset_placeholder_textset_tooltip_text_)r4   r8   s    r9   r+   zTerminalExecArgEntry.__init__R  s    "D24Y/((911*=""4>>26!!*-a ghir:   c                 t    | j                   j                  d|j                         j                                y )Nr   )r   r   r   get_text)r4   entrys     r9   rm   zTerminalExecArgEntry.onChanged_  s(      U-=-=-?-H-H-JKr:   r<   r=   r>   r+   rm   r?   r@   s   @r9   r   r   Q  s    jLr:   r   c                   $     e Zd Z fdZd Z xZS )DefaultCalculatorButtonc                    t         t        |           t        j	                         }g | _        g | _        t        j                  j                  t              | _
        | j                  j                  d      | _        | j                  d| j                         d}| j
                  )|t        |      k  r||   | _        t        j                   j#                  | j
                        }t        j                   j                  | j
                  d      }t        j                   j                  | j
                  d      }t        j                   j                  | j
                  d      }t        j                   j                  | j
                  d      }|d|v s<|d	|j%                         v s(|d	|j%                         v s|d	|j%                         v r|||t&        j(                  j+                  |      r=t        j,                  j                  t        j.                  j1                  |            }nt        j2                  j                  |      }| j5                  |||       | j                  j7                  |       | j                  |k(  r| j9                  | j                         |d
z  }| j
                  |t        |      k  ry y y y )Nr   rh   r   r   r   r   Comment
Calculator	alculatorr   )r*   r   r+   r   r   r   r   r   r.   CALCULATOR_SCHEMAr   r   r   rl   rm   r   r   r   lowerospathexistsFileIconFilenew_for_pathr   r   r   r   )
r4   r   r   r   r   r   r   comment_valiconr8   s
            r9   r+   z DefaultCalculatorButton.__init__c  s+   %t57##%(():;11&9Y/nn(XD	-A!(^DN((77GG))44T^^VLH))44T^^VLH))44T^^VLH,,77	RK#(?$8H)H$8H)H'K;;L;L;N,N'H,@XEYww~~h/"||//0E0Eh0OP"~~11(;++HhE%%,,X6~~133DNNCMH- nn(XD	-A(-A(r:   c                 z    |j                         }| j                  |   }| j                  j                  d|       y r   r   r   s       r9   rm   z!DefaultCalculatorButton.onChanged  r   r:   r   r@   s   @r9   r   r   b  s     D6r:   r   c                   D     e Zd Zd fd	Zd Zd Zd Zd Zd Zd Z	 xZ
S )	CustomAppChooserButtonc                    t         t        |   |       || _        | j	                         }| j                  t        j                  j                         | j                         \  }}}| xr | xr | }| j                         }|r| j                          t        j                  j                  d      }	| j                  t         t#        d      |	       t        j                  j                  d      }	| j                  t$        t#        d      |	       t        j                  j                  d      }	| j                  t&        t#        d      |	       | j)                  d       | j+                  |       |r| j-                  t                n/|r| j-                  t&               n|r| j-                  t$               | j/                  d	| j0                         | j/                  d
| j2                         y )Nrf   zdialog-questionzAsk what to dofolderzOpen folderz
gtk-cancelz
Do nothingTrh   zcustom-item-activated)r*   r   r+   media_settingsget_content_typer]   r,   r^   r_   getPreferencesrz   append_separatorr   r   r.   r   CUSTOM_ITEM_ASKr   CUSTOM_ITEM_OPEN_FOLDERCUSTOM_ITEM_DO_NOTHINGrk   set_headingr   rl   rm   onCustomItemActivated)r4   r   rg   headingpref_start_apppref_ignorepref_open_folderpref_askr   r   r8   s             r9   r+   zCustomAppChooserButton.__init__  s   $d4,4O,,,.		(() ;?:M:M:O7&6%%Rk/RBR>R  " !!#~~!!"343C1DdK~~!!(+ 7=9I4P~~!!,/ 6,N!!$'!''8''(>?''(?@Y/,d.H.HIr:   c                     | j                         }|r5| j                         }| j                  ddd       |j                  |       y y )NTF)rz   r   setPreferencesr   )r4   rT   r   rg   s       r9   rm   z CustomAppChooserButton.onChanged  sF      "002LeU3((6 r:   c                     | j                         }|t        k(  r| j                  ddd       y |t        k(  r| j                  ddd       y |t        k(  r| j                  ddd       y y )NFT)r   r   r   r   r   )r4   rT   itemrg   s       r9   r   z,CustomAppChooserButton.onCustomItemActivated  se    ,,.?"ue4,,ud3++tU3 ,r:   c                 h    | j                   j                  |      }|d uxr | j                         |v S rp   )r   get_strvr   )r4   settings_keystrvs      r9   getPreferencez$CustomAppChooserButton.getPreference  s6    ""++L94CD$9$9$;t$CCr:   c                     | j                  t              }| j                  t              }| j                  t              }|||fS rp   )r   &PREF_MEDIA_AUTORUN_X_CONTENT_START_APP#PREF_MEDIA_AUTORUN_X_CONTENT_IGNORE(PREF_MEDIA_AUTORUN_X_CONTENT_OPEN_FOLDERr4   r   r   r   s       r9   r   z%CustomAppChooserButton.getPreferences  sD    ++-ST(()LM--.VW{,<<<r:   c                     | j                   j                  |      }| j                         }|D cg c]
  }||k7  s	| }}|r|j                  |       | j                   j	                  ||       y c c}w rp   )r   r   r   r   set_strv)r4   
pref_valuer   arrayrg   vs         r9   setPreferencez$CustomAppChooserButton.setPreference  sj    ##,,\:,,."9a<&7!99LL&$$\59 :s
   
A1A1c                     | j                  |t               | j                  |t               | j                  |t               y rp   )r   r   r   r   r   s       r9   r   z%CustomAppChooserButton.setPreferences  s6    >+QR;(KL+-UVr:   rp   )r<   r=   r>   r+   rm   r   r   r   r   r   r?   r@   s   @r9   r   r     s*    #JJ74D=:Wr:   r   c                   H     e Zd Z fdZd Zd Zd Zd Zd Zd Z	d Z
 xZS )	OtherTypeDialogc                    t         t        |   t        d      |dd       | j	                  t        d      t
        j                  j                         | j                  dd       || _	        t
        j                  t        t              }|j                  dt
        j                  j                         t
        j                  j!                  |      | _        d | _        t&        j)                         }|D ]6  }| j+                  |      s|j-                  | j/                  |      |g       8 t
        j1                         }| j"                  j3                  |d	       | j"                  j5                  |d
d       | j"                  j7                  d       t9        d      }|j;                  t        d      | j"                         || _        | j>                  j3                  tA        t        d      |      d	d	d       | j>                  jC                          | j"                  jE                  d| jF                         y )NzOther Mediar)   r   )r5   transient_forborder_widthflagsClosei^  d   r   Tra   Fr   zType:z(Select how other media should be handledrh   )$r*   r   r+   r   
add_buttonr,   ResponseTypeOKset_default_sizer   	ListStorestrset_sort_column_idSortType	ASCENDINGComboBoxnew_with_model
type_comboapplication_combor   content_types_get_registeredacceptContentTyper   getDescriptionCellRendererTextr2   add_attribute
set_activerB   rU   tablevboxr%   showrl   onTypeComboChanged)	r4   r   transient_parent
list_storecontent_typesrg   rendererr  r8   s	           r9   r+   zOtherTypeDialog.__init__  s   ot-a6F>N=>67 	. 	9 	'
C$4$4$7$78c3',]]3,
%%q#,,*@*@A,,55jA!%88:) 	UL%%l3!!4#6#6|#Dl"ST	U '')""8T2%%x:""5)AQwZ1
		Yq)S'TV[\^bdhjkl			4+B+BCr:   c                 |    |j                  d      syt        D ]!  }t        j                  ||t                 s! y y)Nz
x-content/FT)r   removable_media_defsr   content_type_is_aDEF_CONTENT_TYPE)r4   rg   ds      r9   r  z!OtherTypeDialog.acceptContentType  s@    &&|4% 	A$$\15E3FG	 r:   c                     d }t         D ]?  }||t           k(  s|t           }|t        |      k(  rt        j                  |      }n|} n |#t        d|z         t        j                  |      S |S )Nz0Content type '%s' is missing from the info panel)
other_defsr  	DEF_LABELr   r   content_type_get_descriptionr{   )r4   rg   descriptionr  ss        r9   r  zOtherTypeDialog.getDescription  s}     	Aq!122iL!9"%"B"B<"PK"#K	 D|ST33LAAr:   c                 .   | j                  |       | j                  d       | j                  d| j                         | j                  d| j                         | j                  | j                         | j                          | j                          y )NTresponsezdelete-event)	set_transient_for	set_modalrl   
onResponseonDeleter  r
  presentshow_all)r4   topLevels     r9   doShowzOtherTypeDialog.doShow  sd    x(tZ1^T]]30r:   c                 "    | j                         S rp   )hide_on_delete)r4   argss     r9   r*  zOtherTypeDialog.onDelete!  s    ""$$r:   c                     | j                          | j                  <| j                  j                          d | _        | j                  j	                          y y rp   )hider  destroyr  rX   rW   s    r9   doHidezOtherTypeDialog.doHide$  sF    		!!-""**,%)D"JJ  " .r:   c                 $    | j                          y rp   )r5  )r4   dialogr&  s      r9   r)  zOtherTypeDialog.onResponse+  s    r:   c                 
   |j                         }|sy |j                         }|sy |j                  |d      }|j                  |d      }t        j	                         }| j
                  4| j
                  j                          | j                  j                          t        | j                  ||      | _        | j
                  j                          | j                  j                  t        d      | j
                         y )Nr   r   z_Action:)get_active_iter	get_model	get_valuer,   HBoxr  r4  r  rX   r   r   r  rU   r   )r4   r
  itermodelx_content_typer   action_containers          r9   r  z"OtherTypeDialog.onTypeComboChanged.  s    ))+$$&q1//$*88:!!-""**,JJ  "!78K8K^]d!e##%

!J-)?)?@r:   )r<   r=   r>   r+   r  r  r.  r*  r5  r)  r  r?   r@   s   @r9   r   r     s.    #DJ"%#Ar:   r   c                   <    e Zd ZdZdZ ed      Zd Zd Zd Z	d Z
y)	ModuledefaultprefsPreferred Applicationsc                 \    t        d      }t        t        d      d||d|       }|| _        y )Nzmedia, defaults, applications, programs, removable, browser, email, calendar, music, videos, photos, images, cd, autoplay, favorite, appsrE  zcs-default-applicationsi0  )module)r   r   sidePage)r4   content_boxkeywordsrH  s       r9   r+   zModule.__init__I  s9      a  bA679RT\^iknw{| r:   c                    | j                   st        d       t        j                  j	                  t
              | _        t        | j                  | j                  j                        | _
        t               | j                  _        | j                  j                  | j                  j                         t               }| j                  j                  j                  |dt!        d             t"        j$                  j	                  t"        j&                  j(                        }t*        D ]  }t*        |   }t-        |      dkD  s|j/                  t0        |         }|D ]  }t3               }t5        |t6           |t8                 }t;        |t<           |      }	|j                  |       |j?                  |	ddd       |jA                  |ddd       |jC                         r|jE                  |        |jG                         dk(  st3               }tI               }t;        t!        d      |      }	|j                  |       |j?                  |	ddd       |jA                  |ddd       |jE                  |       t3               }tK               }t;        t!        d      |      }	t"        jM                  d	t!        d
      z  dd      }
|
jO                         jQ                  d       tS               }t"        jU                  t"        jV                  j(                  d      }|j?                  |
ddd       |j?                  |ddd       t"        jY                         }|j?                  |ddd       |j?                  |ddd       |j                  |       |j?                  |	ddd       |jA                  |ddd       |jE                  |        t               }| j                  j                  j                  |dt!        d             t[        dt
        t\              }|j^                  ja                  dt!        d      z         |jc                          |je                  |       tg        t!        d            }|jh                  je                  |       |j?                  |jh                  ddd       t"        j$                  j	                  t"        j&                  j(                        }tj        D ]  }t3               }tm        | j                  |tn           |tp                 }t;        |t<           |      }	|j                  |       |j?                  |	ddd       |jA                  |ddd       |jE                  |        ts        t!        d      ju                  d      | jv                        }|jE                  |       y y )NzLoading Default module	preferredzPreferred applicationsr   Fr   r   Terminalz	<i>%s</i>	Arguments   T)r7   
margin_end
use_markupz	dim-labelr)   )orientation
margin_top	removablezRemovable mediar'   z	<b>%s</b>z+Prompt or start programs on media insertionz_Other Media...r   )<loadedr{   r   r   r.   MEDIA_HANDLING_SCHEMAr   r   rH  windowother_type_dialogSettingsStackstack
add_widgetSettingsPage
add_titledr   r,   	SizeGroupSizeGroupMode
HORIZONTALpreferred_app_defsr   add_sectiontranslated_categoriesSettingsWidgetrd   PREF_CONTENT_TYPEPREF_GEN_CONTENT_TYPErS   
PREF_LABELr2   r3   r   add_rowr   r   r   r-   get_style_context	add_classr   BoxOrientationVBoxInvertedSwitchPREF_MEDIA_AUTORUN_NEVERr7   r/   fill_rowaddSettingsSectionrevealerr  r   r  DEF_HEADINGButtonstriponMoreClicked)r4   page
size_groupnameitemsr   r   rb   rT   r7   entry_labelr   	entry_boxboxswitchr  s                   r9   on_module_selectedzModule.on_module_selectedN  s   {{*+"%,,"2"23H"ID%4T5H5H$--J^J^%_D""//DMMMM$$T]]%8%89  >DMM**4a@X>YZ**3+<+<+G+GHJ* .1*40u:>#//0Ed0KLH % 	5!/!1!8>O9PRVWlRm!n -d:.> G"--f5))%qAua@%002$,,V4	5 zz|x/ "0!1!8!: -aov F"--f5))%qAua@ ((0 "0!1!6!8 -a
mV D&)iikAkN6R_`mqi&r#557AA+N 4 6$'GG8R8R_`G$a	!,,[%J!,,UD$B!hhjvueQ?y%B"--c2))%qAUE1= ((0].1f  >DMM**4a@Q>RS#B(=?WXFLL##K!4a2b$bcOOHHV&q):';<HOO)OOFOOUE1=**3+<+<+G+GHJ) )')/0C0CQGWEXZ[\gZhi%a
mV<%%f-!!%q9ua8  () A/066s;T=O=OPFV$y r:   c                 V    | j                   j                  |j                                y rp   )rX  r.  get_toplevel)r4   rb   s     r9   rw  zModule.onMoreClicked  s    %%f&9&9&;<r:   c                 &    || j                   _        y rp   )rH  rW  )r4   rW  s     r9   _setParentRefzModule._setParentRef  s    %r:   N)r<   r=   r>   rz  categoryr   commentr+   r  rw  r  r   r:   r9   rB  rB  D  s-    DH()G!
]%~=&r:   rB  c                   $     e Zd Z fdZd Z xZS )rn  c                 F   || _         t        t        |           t	               | _        t        j                         | _        | j                  j                  d| j                         t        j                  |      | _        | j                  | j                  ddd       | j                  | j                  ddd       t        j                   j#                  |      | _        | j                  j'                  | j$                  j)                  | j                                 y )Nznotify::activeFr   )keyr*   rn  r+   SettingsRevealerrs  r,   Switchcontent_widgetrl   on_my_value_changedr-   r7   r2   r3   r   r   r.   r   r  get_boolean)r4   r7   schemar  r8   s       r9   r+   zInvertedSwitch.__init__  s    nd,.(*!jjl##$4d6N6NOYYu%


E5!4d))5%;((0&&DMM,E,Edhh,O'PQr:   c                     |j                         }| j                  j                  | j                  |        | j                  j                  |       y rp   )r   r   set_booleanr  rs  set_reveal_child)r4   rb   gparamactives       r9   r  z"InvertedSwitch.on_my_value_changed  s<    ""$!!$((J7&&v.r:   )r<   r=   r>   r+   r  r?   r@   s   @r9   rn  rn    s    R/r:   rn  ).r   SettingsWidgetsr   xapp.GSettingsWidgetsgi.repositoryro  r   r   r   r   r   r   rV  r   r   re  rf  rg  r  r!  rt  ra  r   rc  r~   r  r   r,   rm  r%   TablerB   r-   rS   AppChooserButtonrd   r   Entryr   r   r   Dialogr   rB  rd  rn  r   r:   r9   <module>r     s   
 $ # * )F &&@ #+J (- / = FJ   
 	  'z]|_x[x[ ' ? # !8QuXG!:QvYH" :  QwZIQwZIQx[J$ <   !5QvYH!6Q}=MO!2QuXGQ}=MO	  8  !2Q~=NPQ|_N  8 
 	!	' F&	' P	/ #	
 )	
$ % AjM:_8`aAkN:`8acAn$5:y8z|AhK:s8tvAjM:b8ce  AkN4A&:$;=Ao$68A&6$79A&9$:<A&:$;=Ao$68A&9$:<!AlO5A&6$79AjM3 A&8$9;AjM3#
(
. 
.#)) $!CII !4Dc22 4Dl(6C00 (6TL399 L"&6c22 &6PMWS11 MW^iAcjj iAVm& m&^/^ /r:   