当前位置: 首页>>代码示例>>Python>>正文


Python Configuration.textlimit方法代码示例

本文整理汇总了Python中Configuration.Configuration.textlimit方法的典型用法代码示例。如果您正苦于以下问题:Python Configuration.textlimit方法的具体用法?Python Configuration.textlimit怎么用?Python Configuration.textlimit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Configuration.Configuration的用法示例。


在下文中一共展示了Configuration.textlimit方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from Configuration import Configuration [as 别名]
# 或者: from Configuration.Configuration import textlimit [as 别名]

#.........这里部分代码省略.........
		self.comm.connect('groupXML',self.process_groupXML)
		self.comm.connect('new-statusXML',self.process_new_statusXML)
		self.comm.connect('redent-statusXML',self.process_new_statusXML)
		self.comm.connect('user_is_friendXML',self.process_user_is_friendXML)
		self.comm.connect('user_is_memberXML',self.process_user_is_memberXML)
		self.comm.connect('friendshipXML',self.process_friendshipXML)
		self.comm.connect('exception-caught',self.process_communication_exception)
		self.comm.connect('widget-image',self.process_widget_image)
		self.comm.connect('direct-messageXML',self.process_new_directXML)
		self.comm.connect('verify_credentialsXML',self.process_verifycredentialsXML)
		self.comm.connect('configXML',self.process_configXML)
		#create an image cacher thingy
		self.imagecache = ImageCache()
		self.imagecache.set_disabled( self.conf.get_bool_option('no_avatars') )
		self.imagecache.connect('get-widget-image', self.get_widget_image)
	
		#Create notify-er if has pynotify
		if has_pynotify:
			self.notify = Notify()

		#align the window
		self.align_window()
		# do we need to create the status icon
		if self.conf.get_bool_option('run_as_tray_app'):
			self.create_status_icon()
		
	def build_gui(self):
		#build the GUI 
		self.mainwindow=MainWindow.MainWindow(app_name,version,branch)
		try:
			self.mainwindow.set_icon_from_file(self.default_icon_path)
		except:
			pass
		self.mainwindow.set_textlimit( self.conf.textlimit() )	
		self.mainwindow.set_ctrl_enter( self.conf.get_bool_option('ctrl_enter') )
		self.mainwindow.connect('quit', self.quit_triggered )
		self.mainwindow.connect('window-to-tray', self.window_to_tray )
		self.mainwindow.connect('update-status',self.update_status)
		self.mainwindow.connect('get-conversation',self.get_conversation)
		self.mainwindow.connect('show-user',self.get_user_info)
		self.mainwindow.connect('show-group',self.get_group_info)
		self.mainwindow.connect('notebook-page-change',self.page_change)
		self.mainwindow.connect('follow-user',self.follow_user)
		self.mainwindow.connect('join-group',self.join_group)
		self.mainwindow.connect('clear-respond-to-id',self.clear_respond_to_id)
		#keep track of the window size
		self.mainwindow.connect('size-allocate', self.window_size_allocate)
		#self.mainwindow.connect('window-state-event', self.mainwindow_state_event)
		self.mainwindow.connect('delete-event', self.mainwindow_delete_event)
		
		# local function to create a closeable tab label for closeable tabs
		def closeable_tab_label(caption, tab):
			tablabel = gtk.HBox(False,2)
			tablabel.pack_start(gtk.Label(caption),False,False,0)
			closebutton = gtk.Button()
			closeicon = gtk.Image()
			closeicon.set_from_stock(gtk.STOCK_CLOSE,gtk.ICON_SIZE_MENU)
			closebutton.set_image(closeicon)
			closebutton.set_relief(gtk.RELIEF_NONE)
			tinybutton_style = gtk.RcStyle()
			tinybutton_style.xthickness = 0
			tinybutton_style.ythickness = 0
			closebutton.modify_style(tinybutton_style)
			if tab != None:	# if this isn't a mock-add
				closebutton.connect('clicked',tab.close)
			#don't show a tooltip on maemo
开发者ID:yamatt,项目名称:python-hellobuddy,代码行数:70,代码来源:heybuddy.py


注:本文中的Configuration.Configuration.textlimit方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。