Changes between Version 1 and Version 2 of Submitting/wxGUI
- Timestamp:
- 06/11/14 20:27:57 (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Submitting/wxGUI
v1 v2 6 6 directory. 7 7 8 3.Remember that functionality such as generating plots should be primarily8 Remember that functionality such as generating plots should be primarily 9 9 provided by library or modules not GUI. 10 10 11 12 4. Try to create create also g.gui.* module for the new GUI component. It helps 11 Try to create create also `g.gui.*` module for the new GUI component. It helps 13 12 advanced users to access functionality and developers to test it. Moreover, 14 13 it helps to keep components separated and thus, it supports re-usability. … … 16 15 == File structure == 17 16 18 5.Add a header section to each file you submit and make sure you17 Add a header section to each file you submit and make sure you 19 18 include the copyright. The purpose section is meant to contain a 20 19 general over view of the code in the file to assist other … … 29 28 #!python 30 29 """! 31 30 @package dir.example 32 31 33 32 @brief Short example package description 34 33 35 36 34 Classes: 35 - example::ExampleClass 37 36 38 37 (C) 2012 by the GRASS Development Team 39 38 40 41 39 This program is free software under the GNU General Public License 40 (>=v2). Read the file COPYING that comes with GRASS for details. 42 41 43 44 45 46 42 @author First Author <first somewhere.com> 43 @author Second Author <second somewhere.com> 44 @author Some Other <third somewhere.com> (some particular change) 45 """ 47 46 }}} 48 47 49 48 == Documentation and comments == 50 49 50 When using class Signal from `grass.pydispatch.signal`, write a short description to as a constructor parameter and describe implementation details in standard comments 51 before the definition. Note the signal in each function which is invoking it. 51 52 52 53 == Writing the code == … … 54 55 Do not use print command unless you know what are you doing. 55 56 56 Use wx.ID_ANYinstead of `-1`.57 Use `wx.ID_ANY` instead of `-1`. 57 58 58 Use GError, GWarning and GMessage instead of wx.MessageBox()59 Use `GError`, `GWarning` and `GMessage` instead of `wx.MessageBox()` 59 60 60 Do not use grass.run_command() or grass.read_command().61 Use functions and classes which use threads such as RunCommand.61 Do not use `grass.run_command()` or `grass.read_command()`. 62 Use functions and classes which use threads such as `RunCommand`. 62 63 63 When using AddGrowableCol/AddGrowableRowwith sizers, put it after64 When using `AddGrowableCol` and/or `AddGrowableRow` with sizers, put it after 64 65 adding widgets into the sizer, not just after creating of the sizer 65 66 (needed for wxPython >= 2.9). … … 69 70 == See also == 70 71 71 === Related submitting rules == 72 === Related submitting rules === 72 73 73 74 * wiki:Submitting/General general GRASS and svn instructions