Esempio n. 1
0
	def createHeaderBar(self):
		self._headerBar = Gtk.HeaderBar()
		self._headerBar.props.show_close_button = True
		self._headerBar.props.title = PyGMailConfig.getAppNameAndVersion()
		self._window.set_titlebar(self._headerBar)
		
		# Send/Receive button
		srButton = Gtk.Button()
		srButton.connect("clicked", self.onSendReceiveButtonClicked)
		icon = Gio.ThemedIcon(name="mail-send-receive-symbolic")
		image = Gtk.Image.new_from_gicon(icon, Gtk.IconSize.BUTTON)
		srButton.add(image)
		self._headerBar.pack_end(srButton)
Esempio n. 2
0
	def __init__(self,builder,window,sqlMgr):
		self._builder = builder
		self._window = window
		self._sqlMgr = sqlMgr
		
		# Init mutexes
		self.readyLock = threading.Lock()
		self.mbTreeViewLock = threading.Lock()
		self.mlTreeViewLock = threading.Lock()
		self.mTextViewLock = threading.Lock()
		self.footerLock = threading.Lock()

		# Window options
		self._window.set_title(PyGMailConfig.getAppNameAndVersion())
		self._window.set_border_width(10)
		self._window.set_default_size(800, 400)

		# First, create the header bar
		self.createHeaderBar()

		# Now the component grid
		self._footerBar = self._builder.get_object("mwStatusBar")

		self.setFooterText("Initialization in progress...")

		self.createMailboxTreeView()
		self.createMaillistTreeView()
		self.createMailView()

		# Events
		self._window.connect("delete-event", self.closeWindow)

		# Complete
		self._footerBar.show()
		self.setFooterText("Initialization complete")
		
		self.readyLock.acquire()
		self.isReady = True
		self.readyLock.release()