Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- add scripts/mkuidefaults.py to create ui_defaults.h from current setting - default ui state with two toolbar rows (fixes #8117) - update plugin registry state of nsis installer
- Loading branch information
Showing
7 changed files
with
140 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
from PyQt4.QtCore import QCoreApplication, QSettings | ||
|
||
def chunks(l, n): | ||
for i in xrange(0, len(l), n): | ||
yield l[i:i+n] | ||
|
||
QCoreApplication.setOrganizationName( "QGIS" ) | ||
QCoreApplication.setOrganizationDomain( "qgis.org" ) | ||
QCoreApplication.setApplicationName( "QGIS2" ) | ||
|
||
s = QSettings() | ||
|
||
ba = s.value("/UI/geometry").toByteArray() | ||
|
||
f = open("src/app/ui_defaults.h", "w") | ||
|
||
f.write( "#ifndef UI_DEFAULTS_H\n#define UI_DEFAULTS_H\n\nstatic const unsigned char defaultUIgeometry[] =\n{\n" ) | ||
|
||
for chunk in chunks(ba,16): | ||
f.write( " %s,\n" % ", ".join( map( lambda x : "0x%02x" % ord(x), chunk ) ) ) | ||
|
||
f.write( "};\n\nstatic const unsigned char defaultUIstate[] =\n{\n" ) | ||
|
||
ba = s.value("/UI/state").toByteArray() | ||
|
||
for chunk in chunks(ba,16): | ||
f.write( " %s,\n" % ", ".join( map( lambda x : "0x%02x" % ord(x), chunk ) ) ) | ||
|
||
f.write( "};\n\n#endif // UI_DEFAULTS_H\n" ) | ||
|
||
f.close() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.