Example #1
0
	def start (self):
		utils.c_info ("Starting %s" % self.__name__)
		
		menu = app.App.get_plugin_menu ()

		self.item = gtk.MenuItem (_("Lang"))
		self.item.connect ('activate', self.on_activated)
		self.item.show ()

		menu.append (self.item)
	def commit_request (self, req):
		c_info (">> %s" % req)
		self.cursor.execute (req)
		ret = self.cursor.fetchall ()
		
		if ret != []:
			c_info ("sbrah =>" % ret)
		
		self.connection.commit ()
		self.refresh_pending_windows ()
Example #3
0
	def filter_func (self, mod, iter):
		filters = list ()
		for i in self.main_db.filter_menu.get_children ():
			if i.active:
				filters.append (i.get_children ()[0].get_text ())
		
		if filters == []:
			return True

		utils.c_info ("Active filters: %s" % filters)
		val = mod.get_value (iter, 2)
		utils.c_info ("Value to be filtered: %s" % val)
		
		if not val:
			return True
		if val in filters:
			return True
		else:
			return False
Example #4
0
				t.INTEGER, t.TEXT, t.DATE, t.TEXT, t.TEXT, t.TEXT, t.DATE, t.VARCHAR + 500
			]
		)
		
		db.set_schema_presents (True)
	
	# L'update su ambiente windows dovrebbe essere fatto direttamente da qui
	# ma mi sa che e' meglio disabilitare l'update per windows
	#merger.check_for_updates () #Controlliamo se ci sono update da fare

	gobject.threads_init ()
	
	app.App = app.Gui()
	app.App.p_engine = engine.PluginEngine ()
	app.App.p_backend = db
	
	#per il momento finche non si sistema non si usa la tray
	app.App.tray_obj = None
	app.App.tray = False
	
	gtk.gdk.threads_enter ()
	app.App.main()
	gtk.gdk.threads_leave ()
	
	utils.c_info (_("Salvo le impostazioni prima di uscire"))
	impostazioni.save ()

if __name__ == "__main__":
	utils.prepare_enviroment ()
	main ()
Example #5
0
	def __init__ (self, filename):
		self.filename = filename
		self.schema_is_ok = False
		c_info ("Initing a backend DB")
	def commit_select (self, req):
		c_info (">> %s" % req)
		self.cursor.execute (req)
		return self.cursor.fetchall ()