My favorites | Sign in
Project Home Downloads Wiki Issues Source
Checkout   Browse   Changes    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import os
reload(sys)
sys.setdefaultencoding("utf-8")
if sys.path[0]=="":
sys.path.insert(0, sys.path[1])
sys.path.insert(0,sys.path[0]+"/Source")
sys.path.insert(1,sys.path[0]+"/SearchEngines")

import StartupControl
if StartupControl.checkPyQt4Exist():
myUniversals = ""
if StartupControl.checkParameters():
import Settings
Settings.checkSettings()
import Universals
Universals.fillMySettings()
from MyObjects import *
import InputOutputs
if eval(Universals.MySettings["isActivePyKDE4"].title())==True:
from PyKDE4.kdecore import *
from PyKDE4.kdeui import *
appName = "OrganizasyonizM"
programName = ki18n ("OrganizasyonizM")
version = StartupControl.__version__
license = KAboutData.License_GPL_V3
copyright = ki18n (u"Murat DEMİR (mxd@mixdigitall.com)")
kde4LangKode= str(KLocale(Universals.Catalog).language())+"_"+str(KLocale(Universals.Catalog).country()).upper()
text = ki18n ("")
homePage = "www.mixdigitall.com"
bugEmail = u"Murat DEMIR (mxd@mixdigitall.com)"
if InputOutputs.isFile(sys.path[0]+"/Languages/About_"+ kde4LangKode):
aboutFileContent = InputOutputs.readFromFile(sys.path[0]+"/Languages/About_"+ kde4LangKode)
else:
aboutFileContent = InputOutputs.readFromFile(sys.path[0]+"/Languages/About_en_GB")
description = ki18n (aboutFileContent.decode("utf-8"))
aboutOfOrganizasyonizM = KAboutData (appName, Universals.Catalog, programName, version, description,
license, copyright, text, homePage, bugEmail)
aboutOfOrganizasyonizM.addAuthor (ki18n("Murat DEMİR"), ki18n("Project Manager and Project Developer<br>Proje Sorumlusu ve Proje Geliştiricisi"),
"mxd@mixdigitall.com", "www.mixdigitall.com")
aboutOfOrganizasyonizM.addCredit(ki18n("Tolga Balcı"), ki18n("Translate to English. (Voluntary)<br>İngilizce Çevirisi. (Gönüllü) (V0.7.x)"),
"tbalci@gmail.com", "http://www.brighthub.com/members/paladin.aspx")
aboutOfOrganizasyonizM.addCredit(ki18n("Márcio Moraes"), ki18n("Translate to Brazilian Portuguese. (Voluntary)<br>Brezilya Portekizcesi diline çeviri. (Gönüllü) (V0.8.7 - ~)"),
"", "")
aboutOfOrganizasyonizM.setProgramIconName(Universals.themePath + "/Images/OrganizasyonizM.png")
if InputOutputs.isFile(sys.path[0]+"/Languages/License_"+ kde4LangKode):
aboutOfOrganizasyonizM.addLicenseTextFile(sys.path[0]+"/Languages/License_"+ kde4LangKode)
else:
aboutOfOrganizasyonizM.addLicenseTextFile(sys.path[0]+"/Languages/License_en_GB")
KCmdLineArgs.init (sys.argv, aboutOfOrganizasyonizM)
OrganizasyonizMApp = KApplication()
MMainWindow = KMainWindow
kde4LangKode = str(KGlobal.locale().language())
if len(kde4LangKode)!=5: kde4LangKode += "_"+str(KGlobal.locale().country()).upper()
if InputOutputs.getInstalledLanguagesCodes().count(kde4LangKode)==0:
for lcode in InputOutputs.getInstalledLanguagesCodes():
if lcode.find(kde4LangKode[:2])!=-1:
kde4LangKode = lcode
kconf = KGlobal.config()
KGlobal.locale().setLanguage(kde4LangKode, kconf)
if InputOutputs.isFile(sys.path[0]+"/Languages/OrganizasyonizM_"+
str(kde4LangKode+".qm")):
languageFile = MTranslator()
languageFile.load((sys.path[0]+"/Languages/OrganizasyonizM_"+
str(kde4LangKode+".qm")).decode("utf-8"))
OrganizasyonizMApp.installTranslator(languageFile)
Universals.aboutOfOrganizasyonizM = aboutOfOrganizasyonizM
else:
OrganizasyonizMApp = MApplication(sys.argv)
if InputOutputs.isFile(sys.path[0]+"/Languages/About_"+ str(Universals.MySettings["language"])):
aboutFileContent = InputOutputs.readFromFile(sys.path[0]+"/Languages/About_"+ str(Universals.MySettings["language"]))
else:
aboutFileContent = InputOutputs.readFromFile(sys.path[0]+"/Languages/About_en_GB")
Universals.aboutOfOrganizasyonizM = aboutFileContent.decode("utf-8")
if InputOutputs.isFile(sys.path[0]+"/Languages/OrganizasyonizMWithQt_"+
str(Universals.MySettings["language"]+".qm")):
languageFile = MTranslator()
languageFile.load((sys.path[0]+"/Languages/OrganizasyonizMWithQt_"+
str(Universals.MySettings["language"]+".qm")).decode("utf-8"))
OrganizasyonizMApp.installTranslator(languageFile)
OrganizasyonizMApp.setApplicationName("OrganizasyonizM")
OrganizasyonizMApp.setApplicationVersion(StartupControl.__version__)
OrganizasyonizMApp.setOrganizationDomain("mixdigitall.com")
OrganizasyonizMApp.setOrganizationName("MXD mixdigitall")
MApplication.setQuitOnLastWindowClosed(True)
MDir.setSearchPaths("Images", MStringList((Universals.themePath + "/Images/").decode("utf-8")))
MDir.setSearchPaths("Source", MStringList((sys.path[0]+"/").decode("utf-8")))
MDir.setSearchPaths("root", MStringList((sys.path[0]+"/../").decode("utf-8")))
if InputOutputs.isFile(Universals.themePath + "/Style.qss"):
OrganizasyonizMApp.setStyleSheet(InputOutputs.readFromFile(Universals.themePath + "/Style.qss"))
MTextCodec.setCodecForTr(MTextCodec.codecForName("UTF-8"))
OrganizasyonizMApp.setWindowIcon(MIcon("Images:OrganizasyonizM.png"))
MApplication.setStyle(Universals.MySettings["applicationStyle"])
if StartupControl.checkMyModules(OrganizasyonizMApp):
if StartupControl.isQuickMake:
try:
myUniversals = Universals.Universals(OrganizasyonizMApp, None)
import QuickMake
quickMake = QuickMake.QuickMake()
if StartupControl.isQuickMake:
OrganizasyonizMApp.exec_()
except:
import ReportBug
error = ReportBug.ReportBug()
error.show()
OrganizasyonizMApp.exec_()
if StartupControl.isQuickMake == False:
import SpecialTools
import Tables
import FileManager
import Bars
try:
class Main(MMainWindow):
def __init__(self):
MMainWindow.__init__(self, None)
self.setObjectName("RealMainWindow")
myUniversals = Universals.Universals(OrganizasyonizMApp, self)
self.CentralWidget = MWidget()
self.Menu = None
self.MainLayout = MVBoxLayout()
self.Bars = Bars.Bars()
self.ToolsBar = Bars.ToolsBar(self)
self.TableToolsBar = Bars.TableToolsBar(self)
self.FileManager = FileManager.FileManager(self)
self.CentralWidget.setLayout(self.MainLayout)
self.setCentralWidget(self.CentralWidget)
self.Menu = Bars.MenuBar(self)
self.setMenuBar(self.Menu)
self.setStatusBar(Bars.StatusBar(self))
self.Bars.getAllBarsStyleFromMySettings()
self.setCorner(Mt.TopLeftCorner, Mt.LeftDockWidgetArea)
self.setCorner(Mt.BottomLeftCorner, Mt.LeftDockWidgetArea)

def lockForm(self):
self.CentralWidget.setEnabled(False)
for wid in self.findChildren(MDockWidget):
wid.setEnabled(False)
for wid in self.findChildren(MToolBar):
wid.setEnabled(False)
for wid in self.findChildren(MMenuBar):
wid.setEnabled(False)

def unlockForm(self):
self.CentralWidget.setEnabled(True)
for wid in self.findChildren(MDockWidget):
wid.setEnabled(True)
for wid in self.findChildren(MToolBar):
wid.setEnabled(True)
for wid in self.findChildren(MMenuBar):
wid.setEnabled(True)

def closeEvent(self, _event):
try:
MApplication.setQuitOnLastWindowClosed(True)
try:self.PlayerBar.Player.stop()
except:pass
import ReportBug, Records
from Details import MusicDetails, TextDetails
MusicDetails.closeAllMusicDialogs()
TextDetails.closeAllTextDialogs()
if self.Table.checkUnSavedTableValues()==False:
_event.ignore()
Universals.setMySetting(self.Table.hiddenTableColumnsSettingKey,self.Table.hiddenTableColumns)
self.Bars.setAllBarsStyleToMySettings()
if ReportBug.iSClosingInErrorReporting == False:
Records.setRecordType(1)
InputOutputs.writeToFile(Settings.pathOfSettingsDirectory+"LastState", self.saveState())
Records.restoreRecordType()
geometri = [self.geometry().x(), self.geometry().y(), self.geometry().width(), self.geometry().height()]
Universals.setMySetting("MainWindowGeometries",geometri)
Universals.setMySetting("lastDirectory",self.FileManager.currentDirectory)
Universals.setMySetting("isMainWindowMaximized",self.isMaximized())
Universals.setMySetting("isShowAdvancedSelections",self.SpecialTools.isShowAdvancedSelections)
if Tables.tableType==2:
Universals.setMySetting("isRunOnDoubleClick",self.Table.tbIsRunOnDoubleClick.isChecked())
Universals.setMySetting("isOpenDetailsInNewWindow",self.Table.isOpenDetailsOnNewWindow.isChecked())
Universals.setMySetting("isPlayNow",self.Table.isPlayNow.isChecked())
Universals.setMySetting("isShowOldValues",self.Table.isShowOldValues.isChecked())
Universals.setMySetting("isChangeSelected",self.Table.isChangeSelected.isChecked())
Universals.setMySetting("isChangeAll",self.Table.isChangeAll.isChecked())
Universals.setMySetting("tableType", Tables.tableType)
Universals.setMySetting("activeTabNoOfSpecialTools", self.SpecialTools.tabwTabs.currentIndex())
Universals.saveSettings()
Records.saveAllRecords()
Records.checkSize()
Settings.saveUniversalSettings()
except:
import ReportBug
if ReportBug.isClose==False:
error = ReportBug.ReportBug()
error.show()
_event.ignore()

MainWindow=Main()
MainWindow.setWindowTitle(u"OrganizasyonizM "+ MApplication.applicationVersion())
if eval(Universals.MySettings["isActivePyKDE4"].title())==True:
kconf = KGlobal.config()
kconfGroup = KConfigGroup(kconf,"Universals")
MainWindow.setAutoSaveSettings(kconfGroup)
else:
try:
state = MByteArray()
state.append(InputOutputs.readFromBinaryFile(Settings.pathOfSettingsDirectory+"LastState"))
MainWindow.restoreState(state)
except:pass
if eval(Universals.MySettings["isMainWindowMaximized"].title())==False:
geometries = Universals.getListFromStrint(Universals.MySettings["MainWindowGeometries"])
MainWindow.setGeometry(int(geometries[0]),int(geometries[1]), int(geometries[2]),int(geometries[3]))
MainWindow.show()
else:
MainWindow.showMaximized()
StartupControl.checkAfterRunProccess()
Universals.isStartingSuccessfully = True
Universals.isCanBeShowOnMainWindow = True
except:
import ReportBug
error = ReportBug.ReportBug()
error.show()
try:
OrganizasyonizMApp.exec_()
except:
import ReportBug
error = ReportBug.ReportBug()
error.show()
print str(MApplication.translate("ReportBug", "A critical error has occurred.If you want to look into details \"%s\" you can see the file.If possible, we ask you to send us this error details." )) % (error.pathOfReportFile)
print str(MApplication.translate("ReportBug", "Thanks in advance for your interest."))
else:
sys.exit()
else:
sys.exit()
else:
sys.exit()
sys.exit()
else:
sys.exit()

Change log

r499 by mixdigitall on Apr 11, 2010   Diff
Fixed a bug.
Go to: 
Project members, sign in to write a code review

Older revisions

r497 by mixdigitall on Apr 8, 2010   Diff
Fixed few bugs.Complated all
translations.
r494 by mixdigitall on Apr 5, 2010   Diff
Changed MainWindow Design.Fixed a bug.
r491 by mixdigitall on Apr 4, 2010   Diff
Fixed few bugs.Added debug mode(With
Records).Change some toolbar buttons.
All revisions of this file

File info

Size: 14788 bytes, 238 lines

File properties

svn:executable
*
Powered by Google Project Hosting