³ò ¡ëEc@s0dZddklZdefd„ƒYZdS(s This module documents a class that creates the tab spin 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 SpinButtont TabSpinButtoncBsDeZdZd„Zd„Zd„Zd„Zd„Zd„ZRS(sŽ This class creates a spin button for the text editor's preference dialog. The spin button allows users to set the size of the tab width. cCstti|ƒ|i||ƒ|iƒ|iid|iƒ|id|iƒ|_ |i id|i ƒ|_ dS(sÒ Initialize the spin button. @param self: Reference to the TabSpinButton instance. @type self: A TabSpinButton object. @param editor: Reference to the text editor. @type editor: An Editor object. s/apps/scribes/tabs value-changedtdestroyN( Rt__init__t_TabSpinButton__init_attributest_TabSpinButton__set_propertiest_TabSpinButton__clientt notify_addt#_TabSpinButton__tab_size_changed_cbtconnectt _TabSpinButton__value_changed_cbt_TabSpinButton__signal_id_1t_TabSpinButton__managert_TabSpinButton__destroy_cbt_TabSpinButton__signal_id_2(tselftmanagerteditor((s$plugins/Preferences/TabSpinButton.pyR)s  cCs2||_||_|i|_d|_|_dS(sï Initialize the button's data attributes. @param self: Reference to the PreferencesFontButton instance. @type self: A PreferencesFontButton object. @param editor: Reference to the text editor. @type editor: An Editor object. N(t_TabSpinButton__editorR t gconf_clientRtNoneR R(RRR((s$plugins/Preferences/TabSpinButton.pyt__init_attributes:s   cCsd}|iidƒ}ddkl}||ƒo|iidƒ}n|idƒ|idƒ|idƒ|iddƒ|i dd ƒdd k l }|i |ƒ|i tƒ|itƒ|i|ƒdd kl}|iii||ƒd S( s Define the default behavior of the button. @param self: Reference to the TabSpinButton instance. @type self: A TabSpinButton object. is/apps/scribes/tabiÿÿÿÿ(ttruthiiiii(t UPDATE_ALWAYS(ttab_spin_button_tipN(RtgettoperatorRtget_inttset_max_lengthtset_width_charst set_digitstset_incrementst set_rangetgtkRtset_update_policyt set_numerictTruetset_snap_to_tickst set_valuetSCRIBES.tooltipsRRttiptset_tip(Rttab_sizetvalueRRR((s$plugins/Preferences/TabSpinButton.pyt__set_propertiesJs$        cCs…d}|iidƒ}ddkl}||ƒo|iidƒ}nt|ƒt|iƒƒjo|it|ƒƒndS(sŒ Handles callback when tab size changes. @param self: Reference to the TabSpinButton instance. @type self: A TabSpinButton object. is/apps/scribes/tabiÿÿÿÿ(RN(RRRRRtintt get_valueR&(Rtclienttcnxn_idtentrytdataR*R+R((s$plugins/Preferences/TabSpinButton.pyt__tab_size_changed_cbds cCs‰t|iƒƒ}|iidƒ|jo'|iid|ƒ|iidƒnddkl}||}|ii i |ddƒt S(sO Handles callback when the "value-changed" signal is emitted. @param self: Reference to the TabSpinButton instance. @type self: A TabSpinButton object. @param button: Reference to the TabSpinButton. @type button: A TabSpinButton object. @return: True to propagate signals to parent widgets. @type: A Boolean Object. s/apps/scribes/tabiÿÿÿÿ(tmsg0012tsucceedi( R-R.RRtset_inttnotifyti18nR4Rtfeedbacktupdate_status_messageR$(RtbuttonR*R4tmessage((s$plugins/Preferences/TabSpinButton.pyt__value_changed_cbts  cCsZddkl}l}||i|ƒ||i|iƒ|iƒ||ƒ~d}dS(s  Handles callback when the "destroy" signal is emitted. @param self: Reference to the TabSpinButton instance. @type self: A TabSpinButton object. @param manager: Reference to the PreferencesManager instance. @type manager: A PreferencesManager object. iÿÿÿÿ(tdisconnect_signaltdelete_attributesN(t SCRIBES.utilsR>R?R RR RR(RRR>R?((s$plugins/Preferences/TabSpinButton.pyt __destroy_cbŠs   ( t__name__t __module__t__doc__RRRRR R (((s$plugins/Preferences/TabSpinButton.pyR"s     N(RDR!RR(((s$plugins/Preferences/TabSpinButton.pyss