łň oëEc@s0dZddklZdefd„ƒYZdS(s This module documents a class that creates the tab check button for the text editor's preference dialog. @author: Lateef Alabi-Oki @organization: The Scribes Project @copyright: Copyright Š 2005 Lateef Alabi-Oki @license: GNU GPLv2 or Later @contact: mystilleef@gmail.com i˙˙˙˙(t CheckButtontTabCheckButtoncBsDeZdZd„Zd„Zd„Zd„Zd„Zd„ZRS(sŹ This class creates a check button for the text editor's preference dialog. The check button allows users to set whether tabs or spaces should be used for indentation. cCstti|ƒ|i||ƒ|iƒ|iid|iƒ|id|iƒ|_ |i id|i ƒ|_ dS(sŐ Initialize the check button. @param self: Reference to the TabCheckButton instance. @type self: A TabCheckButton object. @param editor: Reference to the text editor. @type editor: An Editor object. s/apps/scribes/use_tabsttoggledtdestroyN( Rt__init__t _TabCheckButton__init_attributest_TabCheckButton__set_propertiest_TabCheckButton__clientt notify_addt_TabCheckButton__use_tabs_cbtconnectt_TabCheckButton__toggled_cbt_TabCheckButton__signal_id_1t_TabCheckButton__managert_TabCheckButton__destroy_cbt_TabCheckButton__signal_id_2(tselftmanagerteditor((s%plugins/Preferences/TabCheckButton.pyR)s  cCs2||_||_|i|_d|_|_dS(sá Initialize the button's data attributes. @param self: Reference to the TabCheckButton instance. @type self: A TabCheckButton object. @param editor: Reference to the text editor. @type editor: An Editor object. N(t_TabCheckButton__editorR t gconf_clientRtNoneR R(RRR((s%plugins/Preferences/TabCheckButton.pyt__init_attributes:s   cCs­t}|iidƒ}ddkl}||ƒo|iidƒ}n|i| ƒddkl}|i |ƒ|i tƒddk l }|i ii||ƒdS(s‘ Define the default behavior of the button. @param self: Reference to the TabCheckButton instance. @type self: A TabCheckButton object. s/apps/scribes/use_tabsi˙˙˙˙(ttruth(tmsg0013(ttab_check_button_tipN(tTrueRtgettoperatorRtget_boolt set_activeti18nRt set_labeltset_use_underlinetSCRIBES.tooltipsRRttiptset_tip(Rtuse_tabstvalueRRR((s%plugins/Preferences/TabCheckButton.pyt__set_propertiesJs   c Csît}|iidƒ}ddkl}||ƒo|iidƒ}n|oK|iƒo|itƒnddk l }|i i i |ddƒnN|iƒtjo|itƒnddk l} |i i i | ddƒdS( s– Handles callback when indentation type changes. @param self: Reference to the TabCheckButton instance. @type self: A TabCheckButton object. s/apps/scribes/use_tabsi˙˙˙˙(R(tmsg0014tsucceedi(tmsg0015N(RRRRRRt get_activeRtFalseRR(Rtfeedbacktupdate_status_messageR*( Rtclienttcnxn_idtentrytdataR%R&RR(R*((s%plugins/Preferences/TabCheckButton.pyt __use_tabs_cb^s  cCs…|iƒ}|o.|iidƒo|iidtƒqqn1|iidƒtjo|iidtƒn|iidƒtS(sM Handles callback when the "toggled" signal is emitted. @param self: Reference to the TabCheckButton instance. @type self: A TabCheckButton object. @param button: Reference to the TabCheckButton. @type button: A TabCheckButton object. @return: True to propagate signals to parent widgets. @type: A Boolean Object. s/apps/scribes/use_tabs(R+RRtset_boolR,Rtnotify(Rtbuttont use_spaces((s%plugins/Preferences/TabCheckButton.pyt __toggled_cbvs cCsZddkl}l}||i|ƒ||i|iƒ|iƒ||ƒ~d}dS(s  Handles callback when the "destroy" signal is emitted. @param self: Reference to the TabCheckButton instance. @type self: A TabCheckButton object. @param manager: Reference to the PreferencesManager instance. @type manager: A PreferencesManager object. i˙˙˙˙(tdisconnect_signaltdelete_attributesN(t SCRIBES.utilsR9R:R RR RR(RRR9R:((s%plugins/Preferences/TabCheckButton.pyt __destroy_cbs   ( t__name__t __module__t__doc__RRRR R R(((s%plugins/Preferences/TabCheckButton.pyR"s     N(R?tgtkRR(((s%plugins/Preferences/TabCheckButton.pyss