~ubuntu-branches/ubuntu/utopic/geany/utopic

« back to all changes in this revision

Viewing changes to HACKING

  • Committer: Package Import Robot
  • Author(s): Chow Loong Jin
  • Date: 2011-12-10 07:43:26 UTC
  • mfrom: (3.3.7 sid)
  • Revision ID: package-import@ubuntu.com-20111210074326-s8yqbew5i20h33tf
Tags: 0.21-1ubuntu1
* Merge from Debian Unstable, remaining changes:
  - debian/patches/20_use_evince_viewer.patch:
     + use evince as viewer for pdf and dvi files
  - debian/patches/20_use_x_terminal_emulator.patch:
     + use x-terminal-emulator as terminal
  - debian/control
     + Add breaks on geany-plugins-common << 0.20
* Also fixes bugs:
  - Filter for MATLAB/Octave files filters everythign (LP: 885505)

Show diffs side-by-side

added added

removed removed

Lines of Context:
115
115
Glade
116
116
-----
117
117
Use the code generation features of Glade instead of editing interface.c
118
 
or support.c. Glade 2.12 is recommended as long as we support GTK+ 2.8,
119
 
because later versions of Glade are not 100% compatible with GTK+ 2.8
120
 
(e.g. they may use functions added in GTK+ 2.10).
 
118
or support.c. Glade 2.12 is required as later Glade versions do not
 
119
have the code generation features anymore. At some point we'll switch to
 
120
GtkBuilder, probably.
121
121
 
122
122
You can build Glade 2.12 and run the binary in place, without installing
123
123
it - this should work fine even if you have another version of Glade
126
126
You can download Glade 2.12.2 here:
127
127
http://download.geany.org/glade-2.12.2.tar.gz
128
128
 
129
 
GTK API documentation
130
 
---------------------
131
 
The official GTK 2.8 API documentation is not available online anymore,
132
 
so we put them on http://www.geany.org/manual/gtk/.
133
 
There is also a tarball with all available files for download and use
134
 
with devhelp.
135
 
 
136
 
Using the 2.8 API documentation of the GTK libs (including GLib, GDK and
137
 
Pango) has the advantages that you don't get confused by any newer API
138
 
additions and you don't have to take care about whether you can use
139
 
them or not.
140
 
This is because Geany depends on GTK 2.8. API symbols from newer
141
 
GTK/GLib versions should be avoided to keep the source code building
142
 
against GTK 2.8.
 
129
On recent GTK versions, you need a small patch to make it compile.
 
130
You can get the patch from:
 
131
http://download.geany.org/glade-2.12.2-build-fixes.patch
 
132
 
 
133
And then simply apply it like so::
 
134
 
 
135
    $ /tmp/glade-2.12.2% patch -p1 < glade-2.12.2-build-fixes.patch
 
136
 
 
137
 
 
138
GTK versions & API documentation
 
139
--------------------------------
 
140
Geany requires GTK >= 2.12 and GLib >= 2.16. API symbols from newer 
 
141
GTK/GLib versions should be avoided or made optional to keep the source 
 
142
code building on older systems.
 
143
 
 
144
The official GTK 2.12 API documentation may not be available online 
 
145
anymore, so we put it on http://www.geany.org/manual/gtk/. There 
 
146
is also a tarball with all available files for download and use with 
 
147
devhelp.
 
148
 
 
149
Using the 2.12 API documentation of the GTK libs (including GLib, GDK 
 
150
and Pango) has the advantages that you don't get confused by any 
 
151
newer API additions and you don't have to take care about whether 
 
152
you can use them or not.
143
153
 
144
154
Coding
145
155
------
147
157
  them down into smaller static functions where possible. This makes code
148
158
  much easier to read and maintain.
149
159
* Use GLib types and functions - gint not int, g_free() not free().
150
 
* Your code should build against GLib 2.8 and GTK 2.8. At least for the
151
 
  moment, we want to keep the minimum requirement for GTK at 2.8 (of
 
160
* Your code should build against GLib 2.16 and GTK 2.12. At least for the
 
161
  moment, we want to keep the minimum requirement for GTK at 2.12 (of
152
162
  course, you can use the GTK_CHECK_VERSION macro to protect code using
153
163
  later versions).
154
164
* Variables should be declared before statements. You can use