def __init__(self): windows.__init__(self) user_jid = 'Test' password_jid = 'Test' # Read the real passwords xmpp_client.__init__(self, user_jid, password_jid) slandy.__init__(self) self.loadGlade('chat.xml') self.win1 = self.getWidget('ChatWindow') self.itemFriends = [] self.textbufferIM = {} self.viewIM = {} self.liTabs = [] self.uuid = None #print self.dicUser print 'conferences = ', self.dicUser['Conference'] try: nm='Chat' mss = cf.get(nm, "MessageServer").strip() juser = cf.get(nm, "MessageUserName").strip() jpasswd = cf.get(nm, "MessageUserPassword").strip() xmpp_client.__init__(self, juser+'@'+mss,jpasswd) reactor.connectTCP(mss,5222,self.factory) print 'xmpp ok', mss, juser except Exception, params: print Exception, params
def __init__(self, allTables ): windows.__init__(self) self.loadGlade('think.xml','ThinkMainwindow' ) self.win1 = self.getWidget('ThinkMainwindow') self.ModulNumber = self.MN['Think'] self.allTables = allTables self.singleMindmap = SingleMindmap.SingleMindmap(allTables) self.entriesMindmap = 'mindmap.xml' #singleMindmap self.loadEntries(self.entriesMindmap) self.singleMindmap.setEntries(self.getDataEntries( self.entriesMindmap) ) self.singleMindmap.setGladeXml(self.xml) self.singleMindmap.setTreeFields( ['header']) self.singleMindmap.setStore( gtk.ListStore( gobject.TYPE_STRING, gobject.TYPE_UINT) ) self.singleMindmap.setTreeOrder('header') self.singleMindmap.setTree(self.xml.get_widget('tree1') ) self.singleMindmap.setListHeader(['Header']) #print 'Widgets - win = ', `self.win1` #print 'Widgets - tree1 = ', `self.xml.get_widget('tree1')` self.tabMindmap = 0 self.tabThinking = 1 # start self.tabChanged()
def __init__(self, allTables): windows.__init__(self) self.loadGlade('calendar.xml', 'CalendarMainwindow') #self.win1 = self.getWidget('AddressMainwindow') self.win1.maximize() # Set Values for SchedulTree tCal = self.getWidget('tCalendars') #treeview.set_model(liststore) renderer = gtk.CellRendererText() column = gtk.TreeViewColumn(_("Calendar"), renderer, text=0) tCal.append_column(column) # Set Values for AllSchedulTree tAll = self.getWidget('tAllScheduls') #treeview.set_model(liststore) renderer = gtk.CellRendererText() column = gtk.TreeViewColumn(_("Calendar"), renderer, text=0) tAll.append_column(column) # Set Values for SchedulTree tCustom = self.getWidget('tCustom') #treeview.set_model(liststore) renderer = gtk.CellRendererText() column = gtk.TreeViewColumn(_("Calendar"), renderer, text=0) tCustom.append_column(column) self.CalendarChanged()
def __init__(self, servermod = False): windows.__init__(self,servermod ) self.iPB = 0 self.gladeName = self.td.databases_glade_name fname = '../usr/share/cuon/glade/databases.glade2' # self.setLogLevel(self.INFO) self.allTables = {} if servermod: try: self.xml = gtk.Builder() self.xml.add_from_file(fname) except Exception, params: print Exception, params try: self.xml = gtk.glade.XML(fname) except: self.xml = gtk.glade.XML(fnameAlternate) print 'glade loaded' try: self.xml.connect_signals(self) except Exception, params: print Exception, params nameFuncMap = {} for key in dir(self.__class__): nameFuncMap[key] = getattr(self, key) if nameFuncMap: self.xml.signal_autoconnect(nameFuncMap)
def __init__(self, servermod = False): windows.__init__(self) self.iPB = 0 self.gladeName = self.td.databases_glade_name # self.setLogLevel(self.INFO) self.allTables = {} if servermod: self.xml = gtk.glade.XML('../usr/share/cuon/glade/databases.glade2') self.setXmlAutoconnect() else: self.loadGlade('databases.xml') # self.xml.signal_autoconnect({ 'on_close1_activate' : self.on_close1_activate} ) # self.xml.signal_autoconnect({ 'on_dbcheck1_activate' : self.on_dbcheck1_activate} ) # self.xml.signal_autoconnect({ 'on_load_defaults1_activate' : self.on_load_defaults1_activate} ) self.rpc = cuon.XMLRPC.xmlrpc.myXmlRpc() self.rpc.td = self.td self.ta = self.xml.get_widget('tableImportSQLStructure') self.ta.hide() self.fd = self.xml.get_widget('zip_fileselection1') self.fd.hide() # User auf zope setzen #self.oUser.setUserName('zope') #self.oUser.setUserPassword('test') self.dicUser = self.oUser.getSqlDicUser() # set to 0 for disable 'where client = ' self.dicUser['client'] = 0
def __init__(self, eFields): windows.__init__(self) self.eUserName = eFields[0] self.oUser = cuon.User.user.User() self.loadGlade('login.xml') self.win1 = self.getWidget('UserID_Dialog') #self.win1.hide() response = self.win1.run() #while response == gtk.RESPONSE_DELETE_EVENT or response == gtk.RESPONSE_CANCEL: # response = win1.run() while response != gtk.RESPONSE_OK: if response == gtk.RESPONSE_HELP: print "Hilfe" elif response == gtk.RESPONSE_CANCEL: print 'Cancel' self.oUser.setUserName('EMPTY') self.openDB() self.saveObject('User', self.oUser) self.closeDB() self.quitLogin() break ; response = win1.run() if response == gtk.RESPONSE_OK: print 'ok pressed 0' self.okButtonPressed()
def __init__(self, dicFilename, servermod = False): windows.__init__(self) self.close_dialog = None self.ModulNumber = 0 print dicFilename, servermod self.openDB() self.oUser = self.loadObject('User') self.closeDB() if servermod: self.xml = gtk.glade.XML('../usr/share/cuon/glade/editor.glade2') self.setXmlAutoconnect() else: self.loadGlade('editor.xml') self.win1 = self.getWidget('EditorMainwindow') self.textbuffer = self.getWidget('tv1').get_buffer() self.actualTab = 0 if dicFilename: self.dicCurrentFilename = dicFilename self.open_file(dicFilename) else: self.dicCurrentFilename = {'TYPE':'FILE','NAME':'./new.txt'}
def __init__(self,GUI="YES",CuonAdmin="TEST",Password="******"): if GUI == "YES": windows.__init__(self) self.cpParser = ConfigParser.ConfigParser() self.td = cuon.TypeDefs.typedefs_server.typedefs_server() self.oUser = cuon.User.user.User() os.system('rm -Rf inifiles') os.system('mkdir inifiles') if GUI == "YES": self.GUI = "YES" else: self.GUI = "NO" self.rpc = cuon.XMLRPC.xmlrpc.myXmlRpc() self.rpc.td = self.td self.DialogWindow = None self.dicUser = None self.editReport = 'TEXT' self.actualTab = 1 #self.cuon_path = "/Projects/cuon/cuon_client" self.cuon_path = "." self.CuonAdmin = CuonAdmin self.Password = Password
def __init__(self): windows.__init__(self) self.oUser = cuon.User.user.User() os.system('rm -Rf inifiles') os.system('mkdir inifiles')
def __init__(self): windows.__init__(self) self.loadGlade('report.xml', 'ReportMainwindow') self.win1.show() self.ReportChooser = self.getWidget('ReportChooser') self.ReportChooser.hide()
def __init__(self, dicFilename=None, servermod=False, prgmode = False): windows.__init__(self) self.close_dialog = None self.clipboard = gtk.clipboard_get() self.ModulNumber = 0 print dicFilename, servermod self.openDB() self.oUser = self.loadObject('User') self.closeDB() if servermod: try: self.xml = gtk.Builder() self.xml.add_from_file('../usr/share/cuon/glade/editor.glade2') self.xml.set_translation_domain('cuon') except: self.xml = gtk.glade.XML('../usr/share/cuon/glade/editor.glade2') else: if prgmode: self.loadGlade('prgeditor.xml') else: self.loadGlade('editor.xml') self.setXmlAutoconnect() self.win1 = self.getWidget('EditorMainwindow') if prgmode: pass else: if GtkSV: self.textbuffer, self.view = self.getNotesEditor(mime_type = 'text/x-ini-file') self.view.set_indent_on_tab(True) self.view.set_auto_indent(True) Vbox = self.getWidget('vbox1') Scrolledwindow = self.getWidget('scrolledwindow1') Scrolledwindow.remove(self.getWidget('viewport1')) #Vbox.remove(oldScrolledwindow) #Vbox.add(self.view) #Vbox.show_all() Scrolledwindow.add(self.view) self.view.show_all() Scrolledwindow.show_all() else: self.textbuffer = self.getWidget('tv1').get_buffer() self.actualTab = 0 if dicFilename: self.dicCurrentFilename = dicFilename self.open_file(dicFilename) else: self.dicCurrentFilename = {'TYPE':'FILE','NAME':'./new.txt'}
def __init__(self): windows.__init__(self) self.chooseEntry = None self.chooseMenuItem = None self.specialValue = None self.chooseButton = None
def __init__(self, selDialog='addresses_search1.xml'): windows.__init__(self) # self.gladeName = '/usr/share/cuon/glade/addresses_search1.glade2' # self.singleAddress.loadTable() self.loadGlade(selDialog)
def __init__(self, sT): windows.__init__(self) self.sStartType = sT self.Version = {'Major': 0, 'Minor': 32, 'Rev': 4, 'Species': 0, 'Maschine': 'Linux,Windows'} self.sTitle = _("Client PyCuon for C.U.O.N. Version ") + `self.Version['Major']` + '.' + `self.Version['Minor']` + '.' + `self.Version['Rev']` self.allTables = {} self.sDebug = 'NO' self.ModulNumber = self.MN['Mainwindow'] self.extMenucommand = {}
def __init__(self, dicFilename=None, servermod=False, prgmode = False): windows.__init__(self) self.editor = cuon.Windows.textEditor.textEditor() self.close_dialog = None self.clipboard = gtk.clipboard_get() self.ModulNumber = 0 print dicFilename, servermod self.openDB() self.oUser = self.loadObject('User') self.closeDB() if servermod: try: self.xml = gtk.Builder() self.xml.add_from_file('../usr/share/cuon/glade/editor.glade2') self.xml.set_translation_domain('cuon') except: self.xml = gtk.glade.XML('../usr/share/cuon/glade/editor.glade2') else: if prgmode: self.loadGlade('prgeditor.xml') else: self.loadGlade('editor.xml') self.setXmlAutoconnect() self.win1 = self.getWidget('EditorMainwindow') if prgmode: pass else: self.textbuffer, self.view = self.editor.getEditor(mime_type = 'text/x-ini') try: self.view.set_indent_on_tab(True) self.view.set_auto_indent(True) self.view.set_wrap_mode(gtk.WRAP_WORD) except Exception, params: print Exception, params print 'testbuffer = ', self.textbuffer, self.view Vbox = self.getWidget('vbox1') Scrolledwindow = self.getWidget('scrolledwindow1') Scrolledwindow.remove(self.getWidget('viewport1')) #Vbox.remove(oldScrolledwindow) #Vbox.add(self.view) #Vbox.show_all() self.view.set_buffer(self.textbuffer) Scrolledwindow.add(self.view) self.view.show_all() Scrolledwindow.show_all()
def __init__(self, allTables): windows.__init__(self) self.loadGlade('reportGenerator.xml') self.win1 = self.getWidget('reportGeneratorMainwindow') self.drawingarea = self.getWidget('daReportHeader') self.drawingarea.add_events(gtk.gdk.BUTTON_PRESS_MASK ) self.drawingarea.add_events(gtk.gdk.BUTTON_RELEASE_MASK ) self.a = 1 self.dicReportHeader = {} self.reportFile = None
def __init__(self): windows.__init__(self) self.cpParser = ConfigParser.ConfigParser() self.oUser = cuon.User.user.User() os.system("rm -Rf inifiles") os.system("mkdir inifiles") self.rpc = cuon.XMLRPC.xmlrpc.myXmlRpc() self.rpc.td = self.td self.DialogWindow = None
def __init__(self, allTables): windows.__init__(self) #myXmlRpc.__init__(self) #self.singleWebshop = SingleWebshop.SingleWebshop(allTables) self.rpc = cuon.XMLRPC.xmlrpc.myXmlRpc() self.WebTable = self.rpc.callRP('src.Databases.py_getXmlData','countries') print `self.WebTable` self.loadGlade('webshop.xml') self.win1 = self.getWidget('WebshopMainwindow') self.setStatusBar()
def __init__(self): windows.__init__(self) self.cpParser = ConfigParser.ConfigParser() self.oUser = cuon.User.user.User() os.system('rm -Rf inifiles') os.system('mkdir inifiles') self.rpc = cuon.XMLRPC.xmlrpc.myXmlRpc() self.rpc.td = self.td self.DialogWindow = None self.dicUser = None self.editReport = 'TEXT'
def __init__(self, allTables, module = 0, sep_info = None, dicVars={}, dicExtInfo={}): windows.__init__(self) self.ModulNumber = self.MN['Stats'] self.dicVars = dicVars self.dicExtInfo = dicExtInfo self.allTables = allTables self.openDB() self.oUser = self.loadObject('User') self.closeDB() #print self.oUser #print '-.............................' self.loadGlade('stats.xml', 'StatsMainwindow')
def __init__(self, servermod = False,GUI="YES",dicUser = None): windows.__init__(self,servermod ) self.iPB = 0 self.td = cuon.TypeDefs.typedefs_server.typedefs_server() self.gladeName = self.td.databases_glade_name fname = '../usr/share/cuon/glade/databases.glade2' print '1' # self.setLogLevel(self.INFO) self.allTables = {} print '2' self.GUI = GUI if servermod: if self.GUI == "YES" : try: print '11' self.xml = gtk.Builder() self.xml.add_from_file(fname) print '12' except Exception, params: print Exception, params print '13' try: print '21' self.xml = gtk.glade.XML(fname) print '22' except: self.xml = gtk.glade.XML(fnameAlternate) print 'glade loaded' try: print '31' self.xml.connect_signals(self) print '32' except Exception, params: print Exception, params nameFuncMap = {} for key in dir(self.__class__): nameFuncMap[key] = getattr(self, key) if nameFuncMap: self.xml.signal_autoconnect(nameFuncMap)
def __init__(self): windows.__init__(self) self.loadGlade('help.xml') self.win1 = self.getWidget('HelpMainwindow') self.helpmoz = moz.MozEmbed() #sw1 = self.getWidget('swHelp') self.vbox = self.getWidget('vbox2') self.vbox.add(self.helpmoz) self.helpmoz.load_url("http://cuon.org") self.helpmoz.set_size_request(816,600) self.helpmoz.show() self.win1.show_all()
def __init__(self, allTables, module=0, sep_info=None): windows.__init__(self) self.ModulNumber = self.MN["AI"] self.openDB() self.oUser = self.loadObject("User") self.closeDB() self.loadGlade("ai.xml") self.win1 = self.getWidget("AIMainwindow") # self.rpc.callRP('src.XML.py_readDocument','cuon_addresses') self.wQuestion = self.getWidget("tvQuestion") self.wAnswer = self.getWidget("tvAnswer") self.qBuffer = gtk.TextBuffer(None) self.aBuffer = gtk.TextBuffer(None) self.wQuestion.grab_focus()
def __init__(self, eFields, gladePath=None, Username='******', PASSWORD='******', ClientID = 0): windows.__init__(self) self.eUserName = eFields[0] self.oUser = cuon.User.user.User() self.loadGlade('login.xml', None, gladePath) self.win1 = self.getWidget('UserID_Dialog') if Username != "EMPTY": self.getWidget('TUserID').set_text(Username) self.getWidget('TPassword').set_text(PASSWORD) self.activateClick("okbutton1") #while response == gtk.RESPONSE_DELETE_EVENT or response == gtk.RESPONSE_CANCEL: # response = win1.run() response = self.win1.run() while response != gtk.RESPONSE_OK: if response == gtk.RESPONSE_HELP: print "Hilfe" elif response == gtk.RESPONSE_CANCEL: print 'Cancel' self.oUser.setUserName('EMPTY') self.openDB() self.saveObject('User', self.oUser) self.closeDB() self.quitLogin() break ; if response == gtk.RESPONSE_OK: print 'ok pressed 0' self.okButtonPressed() response = win1.run()
def __init__(self): windows.__init__(self) self.loadGlade('help.xml') self.win1 = self.getWidget('HelpMainwindow') s = self.rpc.callRP('Misc.getHelpBook') s = s.decode('utf-8').encode('latin-1') document = gtkhtml2.Document() document.clear() document.open_stream('text/html') document.write_stream(s) document.close_stream() sw1 = self.getWidget('swHelp') view = gtkhtml2.View() view.set_document(document) sw1.add(view) self.win1.show_all()
def __init__(self): windows.__init__(self) self.loadGlade('panda_chat.xml') self.win1 = self.getWidget('3d_chatWindow') print 'win1 = ', self.win1 #Just some groundwork #base = ShowBase() self.base = base #self.base.disableMouse() self._button_pressed = False #establish connection > send/receive updates > update world worldClient = client.Client(9099,"192.168.17.12") self.myTerrain = client.Terrain() N = client.PlayerReg() me = client.Me(self.myTerrain) self.base.camera.setPos(0,0,10) #Attach camera to player box #self.base.camera.reparentTo(me.model) #self.base.camera.setPos(0, 0, 5) #self.base.camera.lookAt(me.model) #base.camera.setZ(self.player.getZ() + 2.0) #self.base.camera.setP(base.camera.getP()) keys = client.Keys() w = client.World() chatReg = client.chatRegulator(worldClient,keys) taskMgr.add(N.updatePlayers,"keep every player where they are supposed to be",extraArgs = [me]) taskMgr.add(me.move,"move our penguin", extraArgs = [keys,self.myTerrain]) taskMgr.add(worldClient.tskReaderPolling,"Poll the connection reader",extraArgs = [me,N,chatReg]) taskMgr.add(w.UpdateWorld,"keep the world up to date",extraArgs = [me,worldClient]) #=============================================================================# #test code for lighting, normal mapping, etc...# #ambient light alight = AmbientLight('alight') alight.setColor(Vec4(0.2, 0.2, 0.2, 1)) alnp = render.attachNewNode(alight) render.setLight(alnp) me.model.setShaderAuto() #me.model.setNormalMap("models/nskinrd-normal.jpg") lightpivot = render.attachNewNode("lightpivot") lightpivot.setPos(0,0,25) plight = PointLight('plight') plight.setColor(Vec4(1, 1, 1, 1)) plnp = lightpivot.attachNewNode(plight) render.setLight(plnp) me.model.setShaderInput("light", plnp) #=============================================================================# Castle = MapObjects.Castle(Vec3(288.96,294.45,30.17), Vec3(119.05,270,0),0.08) Vbox = self.getWidget('vbox1') panda = Panda3DWidget(self.win1) panda.set_size_request(1000, 800) panda.showbase = self.load_showbase() panda.connect("button-press-event", self.button_press) panda.connect("button-release-event", self.button_release) panda.connect("motion-notify-event", self.pointer_motion) panda.show_all() N.win1 = panda Vbox.add(panda) Vbox.show_all() taskMgr.add(self.gtk_iteration, "gtk") self.win1.show_all()
def __init__(self, allTables, dicInvoices=None, newInvoice = False, invoiceid = 0): windows.__init__(self) self.InvoiceID = invoiceid self.singleListOfInvoice = SingleListOfInvoice.SingleListOfInvoice(allTables) self.singleResidue = SingleListOfInvoice.SingleListOfInvoice(allTables) self.singleInpayment = SingleInpayment.SingleInpayment(allTables) self.singleOrder = cuon.Order.SingleOrder.SingleOrder(allTables) self.singleAddress = cuon.Addresses.SingleAddress.SingleAddress(allTables) self.ModulNumber = self.MN['Invoice'] self.loadGlade('invoiceBook.xml', 'InvoiceMainwindow') #self.win1 = self.getWidget('ListOfInvoiceMainwindow') #self.setStatusBar() self.allTables = allTables self.EntriesListOfInvoice = 'list_of_invoices.xml' self.loadEntries(self.EntriesListOfInvoice) self.singleListOfInvoice.setEntries(self.getDataEntries(self.EntriesListOfInvoice) ) self.singleListOfInvoice.setGladeXml(self.xml) self.singleListOfInvoice.setTreeFields( ['invoice_number', 'order_number','date_of_invoice','total_amount'] ) self.singleListOfInvoice.setStore( gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_UINT) ) self.singleListOfInvoice.setTreeOrder('invoice_number desc,order_number desc') self.singleListOfInvoice.setListHeader([_('Invoice-Nr.'), _('Order-Nr.'), _('Date'),_('Amount')]) self.singleListOfInvoice.setTree(self.xml.get_widget('tree1') ) self.EntriesInpayment = 'inpayment.xml' self.loadEntries(self.EntriesInpayment) self.singleInpayment.setEntries(self.getDataEntries(self.EntriesInpayment) ) self.singleInpayment.setGladeXml(self.xml) self.singleInpayment.setTreeFields( ['invoice_number', 'date_of_paid','inpayment','order_id'] ) self.singleInpayment.setStore( gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_UINT) ) self.singleInpayment.setTreeOrder('invoice_number,date_of_paid') self.singleInpayment.setListHeader([_('Invoice-Nr.'), _('Date'), _('Inpayment'),_('Order-ID')]) self.singleInpayment.setTree(self.xml.get_widget('tree1') ) self.EntriesResidue = 'residue.xml' self.loadEntries(self.EntriesResidue) self.singleResidue.setEntries(self.getDataEntries(self.EntriesResidue) ) self.singleResidue.setGladeXml(self.xml) self.singleResidue.bDistinct = True sResidue = "list_of_invoices.total_amount - (case when (select sum(in_payment.inpayment) from in_payment where to_number(in_payment.invoice_number,'999999999') = list_of_invoices.invoice_number and status != 'delete' and client = " + `self.dicUser['client']` + ") != 0 then (select sum(in_payment.inpayment) from in_payment where to_number(in_payment.invoice_number,'999999999') = list_of_invoices.invoice_number and status != 'delete' and client = " + `self.dicUser['client']` + ") else 0 end) " self.singleResidue.setTreeFields( ['list_of_invoices.invoice_number as invoice_number', 'list_of_invoices.order_number as order_number','list_of_invoices.date_of_invoice as date_of_invoice','list_of_invoices.total_amount as total_amount', sResidue + " as residue "] ) self.singleResidue.setStore( gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_UINT) ) self.singleResidue.setTreeOrder('invoice_number') self.singleResidue.setListHeader([_('Invoice-Nr.'),_('Order-Nr.'), _('Date'),_('Amount'),_('Residue')]) self.singleResidue.setTree(self.xml.get_widget('tree1') ) self.singleResidue.sWhere = " where " + sResidue + " > 0.01 " # set values for comboBox # Menu-items self.initMenuItems() # Close Menus for Tab self.addEnabledMenuItems('tabs','list_of_invoices1') self.addEnabledMenuItems('tabs','inpayment1') self.addEnabledMenuItems('tabs','residue1') # seperate Menus self.addEnabledMenuItems('ListOfInvoice','list_of_invoices1') self.addEnabledMenuItems('Inpayment','inpayment1') #self.addEnabledMenuItems('Residue','residue') # enabledMenues for ListOfInvoice self.addEnabledMenuItems('editListOfInvoice','new', self.dicUserKeys['new']) self.addEnabledMenuItems('editListOfInvoice','delete', self.dicUserKeys['delete']) #self.addEnabledMenuItems('editListOfInvoice','print', self.dicUserKeys['print']) self.addEnabledMenuItems('editListOfInvoice','edit', self.dicUserKeys['edit']) # enabledMenues for Inpayment self.addEnabledMenuItems('editInpayment','inpayment_new1', self.dicUserKeys['new']) self.addEnabledMenuItems('editInpayment','inpayment_delete1', self.dicUserKeys['delete']) #self.addEnabledMenuItems('editInpayment', 'inpayment_print1', self.dicUserKeys['print']) self.addEnabledMenuItems('editInpayment','inpayment_edit1', self.dicUserKeys['edit']) # enabledMenues for Residue ## self.addEnabledMenuItems('editInpayment','inpayment_new1', self.dicUserKeys['new']) ## self.addEnabledMenuItems('editInpayment','inpayment_delete1', self.dicUserKeys['delete']) ## self.addEnabledMenuItems('editInpayment', 'inpayment_print1', self.dicUserKeys['print']) ## self.addEnabledMenuItems('editInpayment','inpayment_edit1', self.dicUserKeys['edit']) # enabledMenues for Save self.addEnabledMenuItems('editSave','save', self.dicUserKeys['save']) self.addEnabledMenuItems('editSave','inpayment_save1', self.dicUserKeys['save']) if self.InvoiceID > 0: self.singleListOfInvoice.sWhere = ' where id = ' + `self.InvoiceID` # tabs from notebook self.tabListOfInvoice = 0 self.tabInpayment = 1 self.tabResidue = 2 self.win1.add_accel_group(self.accel_group) print 'self tab changed' self.tabChanged()
def __init__(self): windows.__init__(self) self.oUser = cuon.User.user.User()
def __init__(self, allTables): windows.__init__(self) self.loadGlade('cashAccountBook.xml') self.win1 = self.getWidget('cashAccountBookMainwindow') self.allTables = allTables self.singleAccountSentence = SingleAccountSentence.SingleAccountSentence(allTables) self.singleAccountInfo = SingleAccountInfo.SingleAccountInfo(allTables) self.EntriesCAB = 'cashAccount.xml' self.loadEntries(self.EntriesCAB) self.singleAccountSentence.setEntries(self.getDataEntries(self.EntriesCAB) ) self.singleAccountSentence.setGladeXml(self.xml) self.singleAccountSentence.setTreeFields( ['accounting_date','document_number1','document_number2', 'designation'] ) self.singleAccountSentence.setStore( gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_UINT) ) self.singleAccountSentence.setTreeOrder('accounting_date, document_number1') self.singleAccountSentence.setTree(self.xml.get_widget('tree1') ) self.singleAccountSentence.setListHeader(['date','document_number1','document_number2', 'designation']) # Menu-items self.initMenuItems() # Close Menus for Tab self.addEnabledMenuItems('tabs','cash1') #self.addEnabledMenuItems('tabs','mi_purchase1') #self.addEnabledMenuItems('tabs','mi_sales1') # seperate Menus self.addEnabledMenuItems('cash','cash1') #self.addEnabledMenuItems('purchase','mi_purchase1') #self.addEnabledMenuItems('sales','mi_sales1') # enabledMenues for CashAccountBook self.addEnabledMenuItems('editCash','new1') self.addEnabledMenuItems('editCash','clear1') self.addEnabledMenuItems('editCash','print1') self.addEnabledMenuItems('editCash','delete1') # enabledMenues for ArticlePurchase #self.addEnabledMenuItems('editPurchase','PurchaseNew1') #self.addEnabledMenuItems('editPurchase','PurchaseClear1') #self.addEnabledMenuItems('editPurchase','PurchaseEdit1') # tabs from notebook self.tabCash = 0 # start self.tabChanged() # enabled menus for cash self.addEnabledMenuItems('editCash','new1') self.addEnabledMenuItems('editCash','clear1') self.addEnabledMenuItems('editCash','print1')
def __init__(self): windows.__init__(self) self.chooseEntry = None self.chooseMenuItem = None