łň DëEc@s0dZddklZdefd„ƒYZdS(s This module documents a class that creates the text wrap 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 CheckButtontTextWrapCheckButtoncBsDeZdZd„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 the buffer's wrapping properties. cCstti|ƒ|i||ƒ|iƒ|iid|iƒ|id|iƒ|_ |i id|i ƒ|_ dS(sß Initialize the check button. @param self: Reference to the TextWrapCheckButton instance. @type self: A TextWrapCheckButton object. @param editor: Reference to the text editor. @type editor: An Editor object. s/apps/scribes/text_wrappingttoggledtdestroyN( Rt__init__t%_TextWrapCheckButton__init_attributest$_TextWrapCheckButton__set_propertiest_TextWrapCheckButton__clientt notify_addt"_TextWrapCheckButton__wrap_text_cbtconnectt _TextWrapCheckButton__toggled_cbt!_TextWrapCheckButton__signal_id_1t_TextWrapCheckButton__managert _TextWrapCheckButton__destroy_cbt!_TextWrapCheckButton__signal_id_2(tselftmanagerteditor((s&plugins/Preferences/WrapCheckButton.pyR)s  cCs2||_||_|i|_d|_|_dS(së Initialize the button's data attributes. @param self: Reference to the TextWrapCheckButton instance. @type self: A TextWrapCheckButton object. @param editor: Reference to the text editor. @type editor: An Editor object. N(t_TextWrapCheckButton__editorR t gconf_clientRtNoneR R(RRR((s&plugins/Preferences/WrapCheckButton.pyt__init_attributes:s   cCsŹt}|iidƒ}ddkl}||ƒo|iidƒ}n|i|ƒddkl}|i |ƒ|i t ƒddk l }|iii||ƒdS(s› Define the default behavior of the button. @param self: Reference to the TextWrapCheckButton instance. @type self: A TextWrapCheckButton object. s/apps/scribes/text_wrappingi˙˙˙˙(ttruth(tmsg0016(ttw_check_button_tipN(tFalseRtgettoperatorRtget_boolt set_activeti18nRt set_labeltset_use_underlinetTruetSCRIBES.tooltipsRRttiptset_tip(Rt wrap_texttvalueRRR((s&plugins/Preferences/WrapCheckButton.pyt__set_propertiesJs    c Csôt}|iidƒ}ddkl}||ƒo|iidƒ}n||ƒoQ|iƒtjo|itƒnddk l }|i i i |ddƒnH|iƒo|itƒnddk l} |i i i | ddƒdS( s§ Handles callback when text wrapping properties change. @param self: Reference to the TextWrapCheckButton instance. @type self: A TextWrapCheckButton object. s/apps/scribes/text_wrappingi˙˙˙˙(R(tmsg0017tsucceedi(tmsg0018N(RRRRRRt get_activeRR"RR)Rtfeedbacktupdate_status_messageR+( Rtclienttcnxn_idtentrytdataR&R'RR)R+((s&plugins/Preferences/WrapCheckButton.pyt__wrap_text_cb^s   cCs…|iƒ}|o4|iidƒtjo|iidtƒqqn+|iidƒo|iidtƒn|iidƒtS(sa Handles callback when the "toggled" signal is emitted. @param self: Reference to the TextWrapCheckButton instance. @type self: A TextWrapCheckButton object. @param button: Reference to the TextWrapCheckButton. @type button: A TextWrapCheckButton object. @return: True to propagate signals to parent widgets. @type: A Boolean Object. s/apps/scribes/text_wrapping(R,RRRtset_boolR"tnotify(RtbuttonR&((s&plugins/Preferences/WrapCheckButton.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 TextWrapCheckButton instance. @type self: A TextWrapCheckButton object. @param manager: Reference to the PreferencesManager instance. @type manager: A PreferencesManager object. i˙˙˙˙(tdisconnect_signaltdelete_attributesN(t SCRIBES.utilsR8R9R RR RR(RRR8R9((s&plugins/Preferences/WrapCheckButton.pyt __destroy_cbs   ( t__name__t __module__t__doc__RRRR R R(((s&plugins/Preferences/WrapCheckButton.pyR"s     N(R>tgtkRR(((s&plugins/Preferences/WrapCheckButton.pyss