[gnome-latex: 41/205] Symbol table: Greek alphabet



commit eb636125ea2bb5f546aae1ba0bdc422e79819a3f
Author: Sébastien Wilmet <sebastien wilmet gmail com>
Date:   Sat Sep 5 19:58:19 2009 +0200

    Symbol table: Greek alphabet

 CMakeLists.txt                 |   5 +-
 TODO                           |   7 +-
 images/CMakeLists.txt          |   3 +
 images/arrows/01.png           | Bin 0 -> 264 bytes
 images/arrows/02.png           | Bin 0 -> 292 bytes
 images/arrows/03.png           | Bin 0 -> 254 bytes
 images/arrows/04.png           | Bin 0 -> 287 bytes
 images/arrows/05.png           | Bin 0 -> 281 bytes
 images/arrows/06.png           | Bin 0 -> 319 bytes
 images/arrows/07.png           | Bin 0 -> 280 bytes
 images/arrows/08.png           | Bin 0 -> 305 bytes
 images/arrows/09.png           | Bin 0 -> 256 bytes
 images/arrows/10.png           | Bin 0 -> 283 bytes
 images/arrows/11.png           | Bin 0 -> 260 bytes
 images/arrows/12.png           | Bin 0 -> 279 bytes
 images/arrows/13.png           | Bin 0 -> 268 bytes
 images/arrows/14.png           | Bin 0 -> 268 bytes
 images/arrows/15.png           | Bin 0 -> 283 bytes
 images/arrows/16.png           | Bin 0 -> 294 bytes
 images/arrows/17.png           | Bin 0 -> 299 bytes
 images/arrows/18.png           | Bin 0 -> 304 bytes
 images/arrows/19.png           | Bin 0 -> 304 bytes
 images/arrows/20.png           | Bin 0 -> 312 bytes
 images/arrows/21.png           | Bin 0 -> 332 bytes
 images/arrows/22.png           | Bin 0 -> 310 bytes
 images/arrows/23.png           | Bin 0 -> 301 bytes
 images/arrows/24.png           | Bin 0 -> 312 bytes
 images/arrows/25.png           | Bin 0 -> 315 bytes
 images/arrows/26.png           | Bin 0 -> 308 bytes
 images/arrows/27.png           | Bin 0 -> 308 bytes
 images/arrows/28.png           | Bin 0 -> 298 bytes
 images/arrows/29.png           | Bin 0 -> 276 bytes
 images/arrows/30.png           | Bin 0 -> 308 bytes
 images/arrows/31.png           | Bin 0 -> 286 bytes
 images/arrows/32.png           | Bin 0 -> 304 bytes
 images/arrows/33.png           | Bin 0 -> 358 bytes
 images/arrows/34.png           | Bin 0 -> 314 bytes
 images/arrows/35.png           | Bin 0 -> 325 bytes
 images/arrows/36.png           | Bin 0 -> 291 bytes
 images/arrows/37.png           | Bin 0 -> 299 bytes
 images/arrows/38.png           | Bin 0 -> 333 bytes
 images/arrows/39.png           | Bin 0 -> 343 bytes
 images/arrows/40.png           | Bin 0 -> 341 bytes
 images/arrows/41.png           | Bin 0 -> 307 bytes
 images/arrows/42.png           | Bin 0 -> 321 bytes
 images/arrows/43.png           | Bin 0 -> 317 bytes
 images/arrows/44.png           | Bin 0 -> 314 bytes
 images/arrows/45.png           | Bin 0 -> 309 bytes
 images/arrows/46.png           | Bin 0 -> 299 bytes
 images/arrows/47.png           | Bin 0 -> 326 bytes
 images/arrows/48.png           | Bin 0 -> 336 bytes
 images/arrows/49.png           | Bin 0 -> 334 bytes
 images/arrows/50.png           | Bin 0 -> 335 bytes
 images/arrows/51.png           | Bin 0 -> 278 bytes
 images/arrows/52.png           | Bin 0 -> 279 bytes
 images/arrows/53.png           | Bin 0 -> 336 bytes
 images/arrows/54.png           | Bin 0 -> 337 bytes
 images/arrows/55.png           | Bin 0 -> 312 bytes
 images/arrows/56.png           | Bin 0 -> 307 bytes
 images/arrows/57.png           | Bin 0 -> 356 bytes
 images/arrows/58.png           | Bin 0 -> 316 bytes
 images/arrows/59.png           | Bin 0 -> 320 bytes
 images/arrows/60.png           | Bin 0 -> 262 bytes
 images/arrows/61.png           | Bin 0 -> 262 bytes
 images/arrows/62.png           | Bin 0 -> 248 bytes
 images/arrows/63.png           | Bin 0 -> 253 bytes
 images/arrows/64.png           | Bin 0 -> 298 bytes
 images/arrows/65.png           | Bin 0 -> 298 bytes
 images/arrows/66.png           | Bin 0 -> 249 bytes
 images/arrows/67.png           | Bin 0 -> 242 bytes
 images/arrows/68.png           | Bin 0 -> 249 bytes
 images/arrows/69.png           | Bin 0 -> 248 bytes
 images/arrows/CMakeLists.txt   |   2 +
 images/greek/01-alpha.png      | Bin 0 -> 303 bytes
 images/greek/02-beta.png       | Bin 0 -> 334 bytes
 images/greek/03-gamma.png      | Bin 0 -> 293 bytes
 images/greek/04-delta.png      | Bin 0 -> 311 bytes
 images/greek/05-epsilon.png    | Bin 0 -> 268 bytes
 images/greek/06-varepsilon.png | Bin 0 -> 294 bytes
 images/greek/07-zeta.png       | Bin 0 -> 300 bytes
 images/greek/08-eta.png        | Bin 0 -> 304 bytes
 images/greek/09-theta.png      | Bin 0 -> 318 bytes
 images/greek/10-vartheta.png   | Bin 0 -> 329 bytes
 images/greek/11-iota.png       | Bin 0 -> 269 bytes
 images/greek/12-kappa.png      | Bin 0 -> 293 bytes
 images/greek/13-lambda.png     | Bin 0 -> 300 bytes
 images/greek/14-mu.png         | Bin 0 -> 312 bytes
 images/greek/15-nu.png         | Bin 0 -> 293 bytes
 images/greek/16-xi.png         | Bin 0 -> 308 bytes
 images/greek/17-o.png          | Bin 0 -> 280 bytes
 images/greek/18-pi.png         | Bin 0 -> 296 bytes
 images/greek/19-varpi.png      | Bin 0 -> 316 bytes
 images/greek/20-rho.png        | Bin 0 -> 305 bytes
 images/greek/21-varrho.png     | Bin 0 -> 313 bytes
 images/greek/22-sigma.png      | Bin 0 -> 297 bytes
 images/greek/23-varsigma.png   | Bin 0 -> 282 bytes
 images/greek/24-tau.png        | Bin 0 -> 271 bytes
 images/greek/25-upsilon.png    | Bin 0 -> 299 bytes
 images/greek/26-phi.png        | Bin 0 -> 321 bytes
 images/greek/27-varphi.png     | Bin 0 -> 318 bytes
 images/greek/28-chi.png        | Bin 0 -> 313 bytes
 images/greek/29-psi.png        | Bin 0 -> 328 bytes
 images/greek/30-omega.png      | Bin 0 -> 307 bytes
 images/greek/31-A.png          | Bin 0 -> 314 bytes
 images/greek/32-B.png          | Bin 0 -> 324 bytes
 images/greek/33-Gamma.png      | Bin 0 -> 255 bytes
 images/greek/34-varGamma.png   | Bin 0 -> 316 bytes
 images/greek/35-Delta.png      | Bin 0 -> 314 bytes
 images/greek/36-varDelta.png   | Bin 0 -> 340 bytes
 images/greek/37-E.png          | Bin 0 -> 326 bytes
 images/greek/38-Z.png          | Bin 0 -> 320 bytes
 images/greek/39-H.png          | Bin 0 -> 321 bytes
 images/greek/40-Theta.png      | Bin 0 -> 335 bytes
 images/greek/41-varTheta.png   | Bin 0 -> 367 bytes
 images/greek/42-I.png          | Bin 0 -> 273 bytes
 images/greek/43-K.png          | Bin 0 -> 338 bytes
 images/greek/44-Lambda.png     | Bin 0 -> 321 bytes
 images/greek/45-varLambda.png  | Bin 0 -> 339 bytes
 images/greek/46-M.png          | Bin 0 -> 366 bytes
 images/greek/47-N.png          | Bin 0 -> 337 bytes
 images/greek/48-Xi.png         | Bin 0 -> 285 bytes
 images/greek/49-varXi.png      | Bin 0 -> 303 bytes
 images/greek/50-O.png          | Bin 0 -> 338 bytes
 images/greek/51-Pi.png         | Bin 0 -> 238 bytes
 images/greek/52-varPi.png      | Bin 0 -> 344 bytes
 images/greek/53-P.png          | Bin 0 -> 314 bytes
 images/greek/54-Sigma.png      | Bin 0 -> 314 bytes
 images/greek/55-varSigma.png   | Bin 0 -> 331 bytes
 images/greek/56-T.png          | Bin 0 -> 306 bytes
 images/greek/57-Upsilon.png    | Bin 0 -> 302 bytes
 images/greek/58-varUpsilon.png | Bin 0 -> 343 bytes
 images/greek/59-Phi.png        | Bin 0 -> 309 bytes
 images/greek/60-varPhi.png     | Bin 0 -> 354 bytes
 images/greek/61-X.png          | Bin 0 -> 327 bytes
 images/greek/62-Psi.png        | Bin 0 -> 323 bytes
 images/greek/63-varPsi.png     | Bin 0 -> 353 bytes
 images/greek/64-Omega.png      | Bin 0 -> 338 bytes
 images/greek/65-varOmega.png   | Bin 0 -> 361 bytes
 images/greek/CMakeLists.txt    |   2 +
 images/icons/CMakeLists.txt    |   2 +
 src/callbacks.c                |  40 ++++++++
 src/callbacks.h                |   1 +
 src/main.c                     | 212 ++++++++++++++++++++++++++++++++++-------
 src/main.h                     |  19 +++-
 144 files changed, 255 insertions(+), 38 deletions(-)
---
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 03e85ed..beff785 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,7 +5,7 @@ PROJECT(latexila)
 # version
 SET(latexila_MAJOR 0)
 SET(latexila_MINOR 0)
-SET(latexila_PATCH 2)
+SET(latexila_PATCH "1.99")
 SET(latexila_VERSION ${latexila_MAJOR}.${latexila_MINOR}.${latexila_PATCH})
 
 MESSAGE(STATUS "*** Building LaTeXila ${latexila_VERSION} ***")
@@ -41,8 +41,7 @@ INCLUDE_DIRECTORIES(${GTK2_INCLUDE_DIRS} ${latexila_BINARY_DIR}/src)
 CONFIGURE_FILE(${latexila_SOURCE_DIR}/src/config.h.cmake ${latexila_BINARY_DIR}/src/config.h)
 
 ADD_SUBDIRECTORY(src)
-
-INSTALL(DIRECTORY images/ DESTINATION "share/latexila/images")
+ADD_SUBDIRECTORY(images)
 
 # packages
 SET(CPACK_GENERATOR "TGZ")
diff --git a/TODO b/TODO
index 3c06e86..565c897 100644
--- a/TODO
+++ b/TODO
@@ -12,7 +12,7 @@ Thu Sep 3, 2009 to Thu Sep 10, 2009
        - various: label, ref, pageref, cite, footnote, index
 
 [-] symbol tables
-       - Greek letters
+       x Greek alphabet
        - arrows
        - relation
        - operators
@@ -21,6 +21,11 @@ Thu Sep 3, 2009 to Thu Sep 10, 2009
        - delimiters
        - ...
 
+[-] save and load dimensions
+       - size of the window
+       - position of the panes
+       - sceen position (center by default)
+
 [-] bugs correction
        - sometimes command output is not UTF-8:
          Gtk-CRITICAL **: gtk_text_buffer_emit_insert: assertion `g_utf8_validate (text, len, NULL)' failed
diff --git a/images/CMakeLists.txt b/images/CMakeLists.txt
new file mode 100644
index 0000000..c156baf
--- /dev/null
+++ b/images/CMakeLists.txt
@@ -0,0 +1,3 @@
+ADD_SUBDIRECTORY(icons)
+ADD_SUBDIRECTORY(greek)
+ADD_SUBDIRECTORY(arrows)
diff --git a/images/arrows/01.png b/images/arrows/01.png
new file mode 100644
index 0000000..171fe3c
Binary files /dev/null and b/images/arrows/01.png differ
diff --git a/images/arrows/02.png b/images/arrows/02.png
new file mode 100644
index 0000000..a671528
Binary files /dev/null and b/images/arrows/02.png differ
diff --git a/images/arrows/03.png b/images/arrows/03.png
new file mode 100644
index 0000000..b8c73f6
Binary files /dev/null and b/images/arrows/03.png differ
diff --git a/images/arrows/04.png b/images/arrows/04.png
new file mode 100644
index 0000000..600f6be
Binary files /dev/null and b/images/arrows/04.png differ
diff --git a/images/arrows/05.png b/images/arrows/05.png
new file mode 100644
index 0000000..09a58e8
Binary files /dev/null and b/images/arrows/05.png differ
diff --git a/images/arrows/06.png b/images/arrows/06.png
new file mode 100644
index 0000000..8ee15eb
Binary files /dev/null and b/images/arrows/06.png differ
diff --git a/images/arrows/07.png b/images/arrows/07.png
new file mode 100644
index 0000000..7db647d
Binary files /dev/null and b/images/arrows/07.png differ
diff --git a/images/arrows/08.png b/images/arrows/08.png
new file mode 100644
index 0000000..c544c49
Binary files /dev/null and b/images/arrows/08.png differ
diff --git a/images/arrows/09.png b/images/arrows/09.png
new file mode 100644
index 0000000..1f44cfc
Binary files /dev/null and b/images/arrows/09.png differ
diff --git a/images/arrows/10.png b/images/arrows/10.png
new file mode 100644
index 0000000..a5c79a7
Binary files /dev/null and b/images/arrows/10.png differ
diff --git a/images/arrows/11.png b/images/arrows/11.png
new file mode 100644
index 0000000..c418d55
Binary files /dev/null and b/images/arrows/11.png differ
diff --git a/images/arrows/12.png b/images/arrows/12.png
new file mode 100644
index 0000000..1e3297c
Binary files /dev/null and b/images/arrows/12.png differ
diff --git a/images/arrows/13.png b/images/arrows/13.png
new file mode 100644
index 0000000..7bf9fda
Binary files /dev/null and b/images/arrows/13.png differ
diff --git a/images/arrows/14.png b/images/arrows/14.png
new file mode 100644
index 0000000..255db52
Binary files /dev/null and b/images/arrows/14.png differ
diff --git a/images/arrows/15.png b/images/arrows/15.png
new file mode 100644
index 0000000..29fb6cb
Binary files /dev/null and b/images/arrows/15.png differ
diff --git a/images/arrows/16.png b/images/arrows/16.png
new file mode 100644
index 0000000..45dea4d
Binary files /dev/null and b/images/arrows/16.png differ
diff --git a/images/arrows/17.png b/images/arrows/17.png
new file mode 100644
index 0000000..860f521
Binary files /dev/null and b/images/arrows/17.png differ
diff --git a/images/arrows/18.png b/images/arrows/18.png
new file mode 100644
index 0000000..f1813c1
Binary files /dev/null and b/images/arrows/18.png differ
diff --git a/images/arrows/19.png b/images/arrows/19.png
new file mode 100644
index 0000000..76d716e
Binary files /dev/null and b/images/arrows/19.png differ
diff --git a/images/arrows/20.png b/images/arrows/20.png
new file mode 100644
index 0000000..08eb1b2
Binary files /dev/null and b/images/arrows/20.png differ
diff --git a/images/arrows/21.png b/images/arrows/21.png
new file mode 100644
index 0000000..b9ac64a
Binary files /dev/null and b/images/arrows/21.png differ
diff --git a/images/arrows/22.png b/images/arrows/22.png
new file mode 100644
index 0000000..d8c3392
Binary files /dev/null and b/images/arrows/22.png differ
diff --git a/images/arrows/23.png b/images/arrows/23.png
new file mode 100644
index 0000000..5b57c2b
Binary files /dev/null and b/images/arrows/23.png differ
diff --git a/images/arrows/24.png b/images/arrows/24.png
new file mode 100644
index 0000000..246f7d5
Binary files /dev/null and b/images/arrows/24.png differ
diff --git a/images/arrows/25.png b/images/arrows/25.png
new file mode 100644
index 0000000..18632b4
Binary files /dev/null and b/images/arrows/25.png differ
diff --git a/images/arrows/26.png b/images/arrows/26.png
new file mode 100644
index 0000000..d780891
Binary files /dev/null and b/images/arrows/26.png differ
diff --git a/images/arrows/27.png b/images/arrows/27.png
new file mode 100644
index 0000000..5155f84
Binary files /dev/null and b/images/arrows/27.png differ
diff --git a/images/arrows/28.png b/images/arrows/28.png
new file mode 100644
index 0000000..8e6669f
Binary files /dev/null and b/images/arrows/28.png differ
diff --git a/images/arrows/29.png b/images/arrows/29.png
new file mode 100644
index 0000000..c516adb
Binary files /dev/null and b/images/arrows/29.png differ
diff --git a/images/arrows/30.png b/images/arrows/30.png
new file mode 100644
index 0000000..0bc534e
Binary files /dev/null and b/images/arrows/30.png differ
diff --git a/images/arrows/31.png b/images/arrows/31.png
new file mode 100644
index 0000000..51658a0
Binary files /dev/null and b/images/arrows/31.png differ
diff --git a/images/arrows/32.png b/images/arrows/32.png
new file mode 100644
index 0000000..bc6b5a3
Binary files /dev/null and b/images/arrows/32.png differ
diff --git a/images/arrows/33.png b/images/arrows/33.png
new file mode 100644
index 0000000..8049f19
Binary files /dev/null and b/images/arrows/33.png differ
diff --git a/images/arrows/34.png b/images/arrows/34.png
new file mode 100644
index 0000000..d88be34
Binary files /dev/null and b/images/arrows/34.png differ
diff --git a/images/arrows/35.png b/images/arrows/35.png
new file mode 100644
index 0000000..9283e3b
Binary files /dev/null and b/images/arrows/35.png differ
diff --git a/images/arrows/36.png b/images/arrows/36.png
new file mode 100644
index 0000000..2b934af
Binary files /dev/null and b/images/arrows/36.png differ
diff --git a/images/arrows/37.png b/images/arrows/37.png
new file mode 100644
index 0000000..4a6563d
Binary files /dev/null and b/images/arrows/37.png differ
diff --git a/images/arrows/38.png b/images/arrows/38.png
new file mode 100644
index 0000000..bb9284c
Binary files /dev/null and b/images/arrows/38.png differ
diff --git a/images/arrows/39.png b/images/arrows/39.png
new file mode 100644
index 0000000..c351e4d
Binary files /dev/null and b/images/arrows/39.png differ
diff --git a/images/arrows/40.png b/images/arrows/40.png
new file mode 100644
index 0000000..031dd86
Binary files /dev/null and b/images/arrows/40.png differ
diff --git a/images/arrows/41.png b/images/arrows/41.png
new file mode 100644
index 0000000..69bc006
Binary files /dev/null and b/images/arrows/41.png differ
diff --git a/images/arrows/42.png b/images/arrows/42.png
new file mode 100644
index 0000000..2c24a7f
Binary files /dev/null and b/images/arrows/42.png differ
diff --git a/images/arrows/43.png b/images/arrows/43.png
new file mode 100644
index 0000000..4e633e8
Binary files /dev/null and b/images/arrows/43.png differ
diff --git a/images/arrows/44.png b/images/arrows/44.png
new file mode 100644
index 0000000..55cb548
Binary files /dev/null and b/images/arrows/44.png differ
diff --git a/images/arrows/45.png b/images/arrows/45.png
new file mode 100644
index 0000000..b857b0d
Binary files /dev/null and b/images/arrows/45.png differ
diff --git a/images/arrows/46.png b/images/arrows/46.png
new file mode 100644
index 0000000..ed6d1a8
Binary files /dev/null and b/images/arrows/46.png differ
diff --git a/images/arrows/47.png b/images/arrows/47.png
new file mode 100644
index 0000000..8494242
Binary files /dev/null and b/images/arrows/47.png differ
diff --git a/images/arrows/48.png b/images/arrows/48.png
new file mode 100644
index 0000000..956bcbb
Binary files /dev/null and b/images/arrows/48.png differ
diff --git a/images/arrows/49.png b/images/arrows/49.png
new file mode 100644
index 0000000..b4f6ad7
Binary files /dev/null and b/images/arrows/49.png differ
diff --git a/images/arrows/50.png b/images/arrows/50.png
new file mode 100644
index 0000000..f9a3fbe
Binary files /dev/null and b/images/arrows/50.png differ
diff --git a/images/arrows/51.png b/images/arrows/51.png
new file mode 100644
index 0000000..7bf9fdc
Binary files /dev/null and b/images/arrows/51.png differ
diff --git a/images/arrows/52.png b/images/arrows/52.png
new file mode 100644
index 0000000..dac9ae5
Binary files /dev/null and b/images/arrows/52.png differ
diff --git a/images/arrows/53.png b/images/arrows/53.png
new file mode 100644
index 0000000..70c9467
Binary files /dev/null and b/images/arrows/53.png differ
diff --git a/images/arrows/54.png b/images/arrows/54.png
new file mode 100644
index 0000000..e1e4ca4
Binary files /dev/null and b/images/arrows/54.png differ
diff --git a/images/arrows/55.png b/images/arrows/55.png
new file mode 100644
index 0000000..c35a84c
Binary files /dev/null and b/images/arrows/55.png differ
diff --git a/images/arrows/56.png b/images/arrows/56.png
new file mode 100644
index 0000000..b717840
Binary files /dev/null and b/images/arrows/56.png differ
diff --git a/images/arrows/57.png b/images/arrows/57.png
new file mode 100644
index 0000000..a64e3b4
Binary files /dev/null and b/images/arrows/57.png differ
diff --git a/images/arrows/58.png b/images/arrows/58.png
new file mode 100644
index 0000000..aac78be
Binary files /dev/null and b/images/arrows/58.png differ
diff --git a/images/arrows/59.png b/images/arrows/59.png
new file mode 100644
index 0000000..c961f38
Binary files /dev/null and b/images/arrows/59.png differ
diff --git a/images/arrows/60.png b/images/arrows/60.png
new file mode 100644
index 0000000..b2c4fba
Binary files /dev/null and b/images/arrows/60.png differ
diff --git a/images/arrows/61.png b/images/arrows/61.png
new file mode 100644
index 0000000..d049087
Binary files /dev/null and b/images/arrows/61.png differ
diff --git a/images/arrows/62.png b/images/arrows/62.png
new file mode 100644
index 0000000..f1f5bd6
Binary files /dev/null and b/images/arrows/62.png differ
diff --git a/images/arrows/63.png b/images/arrows/63.png
new file mode 100644
index 0000000..c9356a4
Binary files /dev/null and b/images/arrows/63.png differ
diff --git a/images/arrows/64.png b/images/arrows/64.png
new file mode 100644
index 0000000..b42cc43
Binary files /dev/null and b/images/arrows/64.png differ
diff --git a/images/arrows/65.png b/images/arrows/65.png
new file mode 100644
index 0000000..9c882c4
Binary files /dev/null and b/images/arrows/65.png differ
diff --git a/images/arrows/66.png b/images/arrows/66.png
new file mode 100644
index 0000000..ee32b8c
Binary files /dev/null and b/images/arrows/66.png differ
diff --git a/images/arrows/67.png b/images/arrows/67.png
new file mode 100644
index 0000000..e6344b4
Binary files /dev/null and b/images/arrows/67.png differ
diff --git a/images/arrows/68.png b/images/arrows/68.png
new file mode 100644
index 0000000..8a44d82
Binary files /dev/null and b/images/arrows/68.png differ
diff --git a/images/arrows/69.png b/images/arrows/69.png
new file mode 100644
index 0000000..f7cc22f
Binary files /dev/null and b/images/arrows/69.png differ
diff --git a/images/arrows/CMakeLists.txt b/images/arrows/CMakeLists.txt
new file mode 100644
index 0000000..e79d2c3
--- /dev/null
+++ b/images/arrows/CMakeLists.txt
@@ -0,0 +1,2 @@
+FILE(GLOB symbols *.png)
+INSTALL(FILES ${symbols} DESTINATION ${DATA_DIR}/images/arrows)
diff --git a/images/greek/01-alpha.png b/images/greek/01-alpha.png
new file mode 100644
index 0000000..fb31745
Binary files /dev/null and b/images/greek/01-alpha.png differ
diff --git a/images/greek/02-beta.png b/images/greek/02-beta.png
new file mode 100644
index 0000000..a04d044
Binary files /dev/null and b/images/greek/02-beta.png differ
diff --git a/images/greek/03-gamma.png b/images/greek/03-gamma.png
new file mode 100644
index 0000000..9d9c436
Binary files /dev/null and b/images/greek/03-gamma.png differ
diff --git a/images/greek/04-delta.png b/images/greek/04-delta.png
new file mode 100644
index 0000000..db1d078
Binary files /dev/null and b/images/greek/04-delta.png differ
diff --git a/images/greek/05-epsilon.png b/images/greek/05-epsilon.png
new file mode 100644
index 0000000..35f7783
Binary files /dev/null and b/images/greek/05-epsilon.png differ
diff --git a/images/greek/06-varepsilon.png b/images/greek/06-varepsilon.png
new file mode 100644
index 0000000..df40955
Binary files /dev/null and b/images/greek/06-varepsilon.png differ
diff --git a/images/greek/07-zeta.png b/images/greek/07-zeta.png
new file mode 100644
index 0000000..25e7417
Binary files /dev/null and b/images/greek/07-zeta.png differ
diff --git a/images/greek/08-eta.png b/images/greek/08-eta.png
new file mode 100644
index 0000000..ee6e6e6
Binary files /dev/null and b/images/greek/08-eta.png differ
diff --git a/images/greek/09-theta.png b/images/greek/09-theta.png
new file mode 100644
index 0000000..4b67121
Binary files /dev/null and b/images/greek/09-theta.png differ
diff --git a/images/greek/10-vartheta.png b/images/greek/10-vartheta.png
new file mode 100644
index 0000000..2d7c550
Binary files /dev/null and b/images/greek/10-vartheta.png differ
diff --git a/images/greek/11-iota.png b/images/greek/11-iota.png
new file mode 100644
index 0000000..ddae288
Binary files /dev/null and b/images/greek/11-iota.png differ
diff --git a/images/greek/12-kappa.png b/images/greek/12-kappa.png
new file mode 100644
index 0000000..1a15cdf
Binary files /dev/null and b/images/greek/12-kappa.png differ
diff --git a/images/greek/13-lambda.png b/images/greek/13-lambda.png
new file mode 100644
index 0000000..a2b7d86
Binary files /dev/null and b/images/greek/13-lambda.png differ
diff --git a/images/greek/14-mu.png b/images/greek/14-mu.png
new file mode 100644
index 0000000..6b0b596
Binary files /dev/null and b/images/greek/14-mu.png differ
diff --git a/images/greek/15-nu.png b/images/greek/15-nu.png
new file mode 100644
index 0000000..a47d62b
Binary files /dev/null and b/images/greek/15-nu.png differ
diff --git a/images/greek/16-xi.png b/images/greek/16-xi.png
new file mode 100644
index 0000000..82887f7
Binary files /dev/null and b/images/greek/16-xi.png differ
diff --git a/images/greek/17-o.png b/images/greek/17-o.png
new file mode 100644
index 0000000..1dda8ff
Binary files /dev/null and b/images/greek/17-o.png differ
diff --git a/images/greek/18-pi.png b/images/greek/18-pi.png
new file mode 100644
index 0000000..2c678db
Binary files /dev/null and b/images/greek/18-pi.png differ
diff --git a/images/greek/19-varpi.png b/images/greek/19-varpi.png
new file mode 100644
index 0000000..5b2bd33
Binary files /dev/null and b/images/greek/19-varpi.png differ
diff --git a/images/greek/20-rho.png b/images/greek/20-rho.png
new file mode 100644
index 0000000..467fe13
Binary files /dev/null and b/images/greek/20-rho.png differ
diff --git a/images/greek/21-varrho.png b/images/greek/21-varrho.png
new file mode 100644
index 0000000..e338f2e
Binary files /dev/null and b/images/greek/21-varrho.png differ
diff --git a/images/greek/22-sigma.png b/images/greek/22-sigma.png
new file mode 100644
index 0000000..1dff100
Binary files /dev/null and b/images/greek/22-sigma.png differ
diff --git a/images/greek/23-varsigma.png b/images/greek/23-varsigma.png
new file mode 100644
index 0000000..fa9bd60
Binary files /dev/null and b/images/greek/23-varsigma.png differ
diff --git a/images/greek/24-tau.png b/images/greek/24-tau.png
new file mode 100644
index 0000000..9c72664
Binary files /dev/null and b/images/greek/24-tau.png differ
diff --git a/images/greek/25-upsilon.png b/images/greek/25-upsilon.png
new file mode 100644
index 0000000..de3dc71
Binary files /dev/null and b/images/greek/25-upsilon.png differ
diff --git a/images/greek/26-phi.png b/images/greek/26-phi.png
new file mode 100644
index 0000000..c4bddfd
Binary files /dev/null and b/images/greek/26-phi.png differ
diff --git a/images/greek/27-varphi.png b/images/greek/27-varphi.png
new file mode 100644
index 0000000..21d6d21
Binary files /dev/null and b/images/greek/27-varphi.png differ
diff --git a/images/greek/28-chi.png b/images/greek/28-chi.png
new file mode 100644
index 0000000..9b11a0d
Binary files /dev/null and b/images/greek/28-chi.png differ
diff --git a/images/greek/29-psi.png b/images/greek/29-psi.png
new file mode 100644
index 0000000..53a1441
Binary files /dev/null and b/images/greek/29-psi.png differ
diff --git a/images/greek/30-omega.png b/images/greek/30-omega.png
new file mode 100644
index 0000000..506c757
Binary files /dev/null and b/images/greek/30-omega.png differ
diff --git a/images/greek/31-A.png b/images/greek/31-A.png
new file mode 100644
index 0000000..5ec0666
Binary files /dev/null and b/images/greek/31-A.png differ
diff --git a/images/greek/32-B.png b/images/greek/32-B.png
new file mode 100644
index 0000000..67443cc
Binary files /dev/null and b/images/greek/32-B.png differ
diff --git a/images/greek/33-Gamma.png b/images/greek/33-Gamma.png
new file mode 100644
index 0000000..8007acd
Binary files /dev/null and b/images/greek/33-Gamma.png differ
diff --git a/images/greek/34-varGamma.png b/images/greek/34-varGamma.png
new file mode 100644
index 0000000..0684ac3
Binary files /dev/null and b/images/greek/34-varGamma.png differ
diff --git a/images/greek/35-Delta.png b/images/greek/35-Delta.png
new file mode 100644
index 0000000..171659f
Binary files /dev/null and b/images/greek/35-Delta.png differ
diff --git a/images/greek/36-varDelta.png b/images/greek/36-varDelta.png
new file mode 100644
index 0000000..f394724
Binary files /dev/null and b/images/greek/36-varDelta.png differ
diff --git a/images/greek/37-E.png b/images/greek/37-E.png
new file mode 100644
index 0000000..d3487c2
Binary files /dev/null and b/images/greek/37-E.png differ
diff --git a/images/greek/38-Z.png b/images/greek/38-Z.png
new file mode 100644
index 0000000..a997e19
Binary files /dev/null and b/images/greek/38-Z.png differ
diff --git a/images/greek/39-H.png b/images/greek/39-H.png
new file mode 100644
index 0000000..3e3db96
Binary files /dev/null and b/images/greek/39-H.png differ
diff --git a/images/greek/40-Theta.png b/images/greek/40-Theta.png
new file mode 100644
index 0000000..efce7b7
Binary files /dev/null and b/images/greek/40-Theta.png differ
diff --git a/images/greek/41-varTheta.png b/images/greek/41-varTheta.png
new file mode 100644
index 0000000..347dc9e
Binary files /dev/null and b/images/greek/41-varTheta.png differ
diff --git a/images/greek/42-I.png b/images/greek/42-I.png
new file mode 100644
index 0000000..e4d2408
Binary files /dev/null and b/images/greek/42-I.png differ
diff --git a/images/greek/43-K.png b/images/greek/43-K.png
new file mode 100644
index 0000000..4e8a7bc
Binary files /dev/null and b/images/greek/43-K.png differ
diff --git a/images/greek/44-Lambda.png b/images/greek/44-Lambda.png
new file mode 100644
index 0000000..efbf113
Binary files /dev/null and b/images/greek/44-Lambda.png differ
diff --git a/images/greek/45-varLambda.png b/images/greek/45-varLambda.png
new file mode 100644
index 0000000..91d5ed2
Binary files /dev/null and b/images/greek/45-varLambda.png differ
diff --git a/images/greek/46-M.png b/images/greek/46-M.png
new file mode 100644
index 0000000..f950c5f
Binary files /dev/null and b/images/greek/46-M.png differ
diff --git a/images/greek/47-N.png b/images/greek/47-N.png
new file mode 100644
index 0000000..c2f6260
Binary files /dev/null and b/images/greek/47-N.png differ
diff --git a/images/greek/48-Xi.png b/images/greek/48-Xi.png
new file mode 100644
index 0000000..9760509
Binary files /dev/null and b/images/greek/48-Xi.png differ
diff --git a/images/greek/49-varXi.png b/images/greek/49-varXi.png
new file mode 100644
index 0000000..4c286f5
Binary files /dev/null and b/images/greek/49-varXi.png differ
diff --git a/images/greek/50-O.png b/images/greek/50-O.png
new file mode 100644
index 0000000..4e27d85
Binary files /dev/null and b/images/greek/50-O.png differ
diff --git a/images/greek/51-Pi.png b/images/greek/51-Pi.png
new file mode 100644
index 0000000..28cc702
Binary files /dev/null and b/images/greek/51-Pi.png differ
diff --git a/images/greek/52-varPi.png b/images/greek/52-varPi.png
new file mode 100644
index 0000000..71e360e
Binary files /dev/null and b/images/greek/52-varPi.png differ
diff --git a/images/greek/53-P.png b/images/greek/53-P.png
new file mode 100644
index 0000000..c2dd25a
Binary files /dev/null and b/images/greek/53-P.png differ
diff --git a/images/greek/54-Sigma.png b/images/greek/54-Sigma.png
new file mode 100644
index 0000000..8195f29
Binary files /dev/null and b/images/greek/54-Sigma.png differ
diff --git a/images/greek/55-varSigma.png b/images/greek/55-varSigma.png
new file mode 100644
index 0000000..d56e95d
Binary files /dev/null and b/images/greek/55-varSigma.png differ
diff --git a/images/greek/56-T.png b/images/greek/56-T.png
new file mode 100644
index 0000000..52eb1f8
Binary files /dev/null and b/images/greek/56-T.png differ
diff --git a/images/greek/57-Upsilon.png b/images/greek/57-Upsilon.png
new file mode 100644
index 0000000..95cb577
Binary files /dev/null and b/images/greek/57-Upsilon.png differ
diff --git a/images/greek/58-varUpsilon.png b/images/greek/58-varUpsilon.png
new file mode 100644
index 0000000..56e1268
Binary files /dev/null and b/images/greek/58-varUpsilon.png differ
diff --git a/images/greek/59-Phi.png b/images/greek/59-Phi.png
new file mode 100644
index 0000000..38af39a
Binary files /dev/null and b/images/greek/59-Phi.png differ
diff --git a/images/greek/60-varPhi.png b/images/greek/60-varPhi.png
new file mode 100644
index 0000000..b998970
Binary files /dev/null and b/images/greek/60-varPhi.png differ
diff --git a/images/greek/61-X.png b/images/greek/61-X.png
new file mode 100644
index 0000000..9ef291f
Binary files /dev/null and b/images/greek/61-X.png differ
diff --git a/images/greek/62-Psi.png b/images/greek/62-Psi.png
new file mode 100644
index 0000000..d585fc6
Binary files /dev/null and b/images/greek/62-Psi.png differ
diff --git a/images/greek/63-varPsi.png b/images/greek/63-varPsi.png
new file mode 100644
index 0000000..2e9bf3a
Binary files /dev/null and b/images/greek/63-varPsi.png differ
diff --git a/images/greek/64-Omega.png b/images/greek/64-Omega.png
new file mode 100644
index 0000000..2173c23
Binary files /dev/null and b/images/greek/64-Omega.png differ
diff --git a/images/greek/65-varOmega.png b/images/greek/65-varOmega.png
new file mode 100644
index 0000000..9c891b8
Binary files /dev/null and b/images/greek/65-varOmega.png differ
diff --git a/images/greek/CMakeLists.txt b/images/greek/CMakeLists.txt
new file mode 100644
index 0000000..9b6b14c
--- /dev/null
+++ b/images/greek/CMakeLists.txt
@@ -0,0 +1,2 @@
+FILE(GLOB symbols *.png)
+INSTALL(FILES ${symbols} DESTINATION ${DATA_DIR}/images/greek)
diff --git a/images/icons/CMakeLists.txt b/images/icons/CMakeLists.txt
new file mode 100644
index 0000000..062bec6
--- /dev/null
+++ b/images/icons/CMakeLists.txt
@@ -0,0 +1,2 @@
+FILE(GLOB symbols *.png)
+INSTALL(FILES ${symbols} DESTINATION ${DATA_DIR}/images/icons)
diff --git a/src/callbacks.c b/src/callbacks.c
index bc38935..e6d60ba 100644
--- a/src/callbacks.c
+++ b/src/callbacks.c
@@ -774,6 +774,46 @@ cb_font_set (GtkFontButton *font_button, gpointer user_data)
        pref_changed = TRUE;
 }
 
+void
+cb_symbol_selected (GtkIconView *icon_view, gpointer user_data)
+{
+       if (latexila.active_doc == NULL)
+       {
+               gtk_icon_view_unselect_all (icon_view);
+               return;
+       }
+
+       GList *selected_items = gtk_icon_view_get_selected_items (icon_view);
+       // unselect the symbol, so the user can insert several times the same symbol
+       gtk_icon_view_unselect_all (icon_view);
+       GtkTreePath *path = g_list_nth_data (selected_items, 0);
+       GtkTreeModel *model = gtk_icon_view_get_model (icon_view);
+       GtkTreeIter iter;
+
+       if (path != NULL && gtk_tree_model_get_iter (model, &iter, path))
+       {
+               gchar *latex_command;
+               gtk_tree_model_get (model, &iter,
+                               COLUMN_SYMBOL_COMMAND, &latex_command,
+                               -1);
+
+               // insert the symbol in the current document
+               GtkTextBuffer *buffer =
+                       GTK_TEXT_BUFFER (latexila.active_doc->source_buffer);
+               gtk_text_buffer_begin_user_action (buffer);
+               gtk_text_buffer_insert_at_cursor (
+                               GTK_TEXT_BUFFER (latexila.active_doc->source_buffer),
+                               latex_command, -1);
+               gtk_text_buffer_end_user_action (buffer);
+
+               g_free (latex_command);
+       }
+
+       // free the GList
+       g_list_foreach (selected_items, (GFunc) gtk_tree_path_free, NULL);
+       g_list_free (selected_items);
+}
+
 void
 open_new_document (const gchar *filename, const gchar *uri)
 {
diff --git a/src/callbacks.h b/src/callbacks.h
index 90b90f9..9869181 100644
--- a/src/callbacks.h
+++ b/src/callbacks.h
@@ -63,6 +63,7 @@ void cb_pref_dialog_close (GtkDialog *dialog, gint response_id,
 void cb_line_numbers (GtkToggleButton *toggle_button, gpointer user_data);
 void cb_command_view (GtkButton *button, gpointer user_data);
 void cb_font_set (GtkFontButton *font_button, gpointer user_data);
+void cb_symbol_selected (GtkIconView *icon_view, gpointer user_data);
 
 void open_new_document (const gchar *filename, const gchar *uri);
 void save_preferences (void);
diff --git a/src/main.c b/src/main.c
index 256911d..67420c6 100644
--- a/src/main.c
+++ b/src/main.c
@@ -34,6 +34,74 @@
 latexila_t latexila = {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
        NULL, NULL, NULL, NULL, NULL, NULL}; 
 
+static struct symbols symbols_greek[] = {
+       {DATA_DIR "/images/greek/01-alpha.png", "\\alpha", NULL},
+       {DATA_DIR "/images/greek/02-beta.png", "\\beta", NULL},
+       {DATA_DIR "/images/greek/03-gamma.png", "\\gamma", NULL},
+       {DATA_DIR "/images/greek/04-delta.png", "\\delta", NULL},
+       {DATA_DIR "/images/greek/05-epsilon.png", "\\epsilon", NULL},
+       {DATA_DIR "/images/greek/06-varepsilon.png", "\\varepsilon", NULL},
+       {DATA_DIR "/images/greek/07-zeta.png", "\\zeta", NULL},
+       {DATA_DIR "/images/greek/08-eta.png", "\\eta", NULL},
+       {DATA_DIR "/images/greek/09-theta.png", "\\theta", NULL},
+       {DATA_DIR "/images/greek/10-vartheta.png", "\\vartheta", NULL},
+       {DATA_DIR "/images/greek/11-iota.png", "\\iota", NULL},
+       {DATA_DIR "/images/greek/12-kappa.png", "\\kappa", NULL},
+       {DATA_DIR "/images/greek/13-lambda.png", "\\lambda", NULL},
+       {DATA_DIR "/images/greek/14-mu.png", "\\mu", NULL},
+       {DATA_DIR "/images/greek/15-nu.png", "\\nu", NULL},
+       {DATA_DIR "/images/greek/16-xi.png", "\\xi", NULL},
+       {DATA_DIR "/images/greek/17-o.png", "o", NULL},
+       {DATA_DIR "/images/greek/18-pi.png", "\\pi", NULL},
+       {DATA_DIR "/images/greek/19-varpi.png", "\\varpi", NULL},
+       {DATA_DIR "/images/greek/20-rho.png", "\\rho", NULL},
+       {DATA_DIR "/images/greek/21-varrho.png", "\\varrho", NULL},
+       {DATA_DIR "/images/greek/22-sigma.png", "\\sigma", NULL},
+       {DATA_DIR "/images/greek/23-varsigma.png", "\\varsigma", NULL},
+       {DATA_DIR "/images/greek/24-tau.png", "\\tau", NULL},
+       {DATA_DIR "/images/greek/25-upsilon.png", "\\upsilon", NULL},
+       {DATA_DIR "/images/greek/26-phi.png", "\\phi", NULL},
+       {DATA_DIR "/images/greek/27-varphi.png", "\\varphi", NULL},
+       {DATA_DIR "/images/greek/28-chi.png", "\\chi", NULL},
+       {DATA_DIR "/images/greek/29-psi.png", "\\psi", NULL},
+       {DATA_DIR "/images/greek/30-omega.png", "\\omega", NULL},
+       {DATA_DIR "/images/greek/31-A.png", "A", NULL},
+       {DATA_DIR "/images/greek/32-B.png", "B", NULL},
+       {DATA_DIR "/images/greek/33-Gamma.png", "\\Gamma", NULL},
+       {DATA_DIR "/images/greek/34-varGamma.png", "\\varGamma", "amsmath"},
+       {DATA_DIR "/images/greek/35-Delta.png", "\\Delta", NULL},
+       {DATA_DIR "/images/greek/36-varDelta.png", "\\varDelta", "amsmath"},
+       {DATA_DIR "/images/greek/37-E.png", "E", NULL},
+       {DATA_DIR "/images/greek/38-Z.png", "Z", NULL},
+       {DATA_DIR "/images/greek/39-H.png", "H", NULL},
+       {DATA_DIR "/images/greek/40-Theta.png", "\\Theta", NULL},
+       {DATA_DIR "/images/greek/41-varTheta.png", "\\varTheta", "amsmath"},
+       {DATA_DIR "/images/greek/42-I.png", "I", NULL},
+       {DATA_DIR "/images/greek/43-K.png", "K", NULL},
+       {DATA_DIR "/images/greek/44-Lambda.png", "\\Lambda", NULL},
+       {DATA_DIR "/images/greek/45-varLambda.png", "\\varLambda", "amsmath"},
+       {DATA_DIR "/images/greek/46-M.png", "M", NULL},
+       {DATA_DIR "/images/greek/47-N.png", "N", NULL},
+       {DATA_DIR "/images/greek/48-Xi.png", "\\Xi", NULL},
+       {DATA_DIR "/images/greek/49-varXi.png", "\\varXi", "amsmath"},
+       {DATA_DIR "/images/greek/50-O.png", "O", NULL},
+       {DATA_DIR "/images/greek/51-Pi.png", "\\Pi", NULL},
+       {DATA_DIR "/images/greek/52-varPi.png", "\\varPi", "amsmath"},
+       {DATA_DIR "/images/greek/53-P.png", "P", NULL},
+       {DATA_DIR "/images/greek/54-Sigma.png", "\\Sigma", NULL},
+       {DATA_DIR "/images/greek/55-varSigma.png", "\\varSigma", "amsmath"},
+       {DATA_DIR "/images/greek/56-T.png", "T", NULL},
+       {DATA_DIR "/images/greek/57-Upsilon.png", "\\Upsilon", NULL},
+       {DATA_DIR "/images/greek/58-varUpsilon.png", "\\varUpsilon", "amsmath"},
+       {DATA_DIR "/images/greek/59-Phi.png", "\\Phi", NULL},
+       {DATA_DIR "/images/greek/60-varPhi.png", "\\varPhi", "amsmath"},
+       {DATA_DIR "/images/greek/61-X.png", "X", NULL},
+       {DATA_DIR "/images/greek/62-Psi.png", "\\Psi", NULL},
+       {DATA_DIR "/images/greek/63-varPsi.png", "\\varPsi", "amsmath"},
+       {DATA_DIR "/images/greek/64-Omega.png", "\\Omega", NULL},
+       {DATA_DIR "/images/greek/65-varOmega.png", "\\varOmega", "amsmath"}
+};
+
 static struct {     
        gchar *filename;     
        gchar *stock_id;     
@@ -49,28 +117,31 @@ static struct {
 
 static gint n_stock_icons = G_N_ELEMENTS (stock_icons);
 
-static void     
-register_my_stock_icons (void)     
-{     
-       GtkIconFactory *icon_factory = gtk_icon_factory_new ();     
-
-       for (gint i = 0; i < n_stock_icons; i++)     
-       {     
-               GtkIconSet *icon_set = gtk_icon_set_new ();     
-               GtkIconSource *icon_source = gtk_icon_source_new ();     
-               gtk_icon_source_set_filename (icon_source, stock_icons[i].filename);     
-               gtk_icon_set_add_source (icon_set, icon_source);     
-               gtk_icon_source_free (icon_source);     
-               gtk_icon_factory_add (icon_factory, stock_icons[i].stock_id, icon_set);     
-               gtk_icon_set_unref (icon_set);     
-       }     
-       gtk_icon_factory_add_default (icon_factory);     
-       g_object_unref (icon_factory);     
+static void
+register_my_stock_icons (void)
+{
+       GtkIconFactory *icon_factory = gtk_icon_factory_new ();
+
+       for (gint i = 0; i < n_stock_icons; i++)
+       {
+               GtkIconSet *icon_set = gtk_icon_set_new ();
+               GtkIconSource *icon_source = gtk_icon_source_new ();
+               gtk_icon_source_set_filename (icon_source, stock_icons[i].filename);
+               gtk_icon_set_add_source (icon_set, icon_source);
+               gtk_icon_source_free (icon_source);
+               gtk_icon_factory_add (icon_factory, stock_icons[i].stock_id, icon_set);
+               gtk_icon_set_unref (icon_set);
+       }
+       gtk_icon_factory_add_default (icon_factory);
+       g_object_unref (icon_factory);
 }
 
 int
 main (int argc, char *argv[])
 {
+       GError *error = NULL;
+       GtkWidget *scrollbar;
+
        gtk_init (&argc, &argv);
 
 #ifdef LATEXILA_NLS_ENABLED
@@ -113,7 +184,7 @@ main (int argc, char *argv[])
        register_my_stock_icons ();
        
        // all the actions (for the menu and the toolbar)
-       // name, stock_id, label, accelerator, tooltip, callback
+       // {name, stock_id, label, accelerator, tooltip, callback}
        // the names come from the XML file
        //
        // TODO try to place "entries" out of the main function without errors
@@ -208,9 +279,8 @@ main (int argc, char *argv[])
 
        // load the xml file
        gchar *xml_file = DATA_DIR "/ui.xml";
-       GError *error = NULL;
        gtk_ui_manager_add_ui_from_file (ui_manager, xml_file, &error);
-       if (error)
+       if (error != NULL)
        {
                print_error ("building menubar and toolbar failed: %s", error->message);
                g_error_free (error);
@@ -232,26 +302,102 @@ main (int argc, char *argv[])
        latexila.undo = gtk_ui_manager_get_action (ui_manager, "/MainMenu/Edit/Undo");
        latexila.redo = gtk_ui_manager_get_action (ui_manager, "/MainMenu/Edit/Redo");
 
+       /* horizontal pane
+        * left: symbol tables
+        * right: the source view and the log zone
+        */
+       GtkWidget *main_hpaned = gtk_hpaned_new ();
+       gtk_paned_set_position (GTK_PANED (main_hpaned), 180);
+       gtk_box_pack_start (GTK_BOX (main_vbox), main_hpaned, TRUE, TRUE, 0);
+
+       /* symbol tables */
+       GtkWidget *symbol_tables = gtk_vbox_new (FALSE, 0);
+       gtk_paned_pack1 (GTK_PANED (main_hpaned), symbol_tables, TRUE, TRUE);
+
+       GtkListStore *greek_symbol_store = gtk_list_store_new (N_COLUMNS_SYMBOL,
+                       GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING);
+
+       // store the data
+       gint nb_greek_letters = G_N_ELEMENTS (symbols_greek);
+       GtkTreeIter iter;
+       for (gint i = 0 ; i < nb_greek_letters ; i++)
+       {
+               GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file (symbols_greek[i].filename,
+                               &error);
+               if (error != NULL)
+               {
+                       print_warning ("impossible to load the symbol: %s", error->message);
+                       g_error_free (error);
+               }
+               else
+               {
+                       gchar *tooltip;
+                       if (symbols_greek[i].package_required != NULL)
+                       {
+                               tooltip = g_strdup_printf ("%s (package %s)",
+                                               symbols_greek[i].latex_command,
+                                               symbols_greek[i].package_required);
+                       }
+                       else
+                               tooltip = g_strdup (symbols_greek[i].latex_command);
+
+                       gtk_list_store_append (greek_symbol_store, &iter);
+                       gtk_list_store_set (greek_symbol_store, &iter,
+                                       COLUMN_SYMBOL_PIXBUF, pixbuf,
+                                       COLUMN_SYMBOL_COMMAND, symbols_greek[i].latex_command,
+                                       COLUMN_SYMBOL_TOOLTIP, tooltip,
+                                       -1);
+                       g_free (tooltip);
+               }
+       }
+
+       // show the symbols
+       GtkWidget *symbol_view = gtk_icon_view_new_with_model (
+                       GTK_TREE_MODEL (greek_symbol_store));
+       gtk_icon_view_set_pixbuf_column (GTK_ICON_VIEW (symbol_view),
+                       COLUMN_SYMBOL_PIXBUF);
+       gtk_icon_view_set_tooltip_column (GTK_ICON_VIEW (symbol_view),
+                       COLUMN_SYMBOL_TOOLTIP);
+       gtk_icon_view_set_selection_mode (GTK_ICON_VIEW (symbol_view),
+                       GTK_SELECTION_SINGLE);
+       gtk_icon_view_set_spacing (GTK_ICON_VIEW (symbol_view), 0);
+       gtk_icon_view_set_row_spacing (GTK_ICON_VIEW (symbol_view), 0);
+       gtk_icon_view_set_column_spacing (GTK_ICON_VIEW (symbol_view), 0);
+
+       g_signal_connect (G_OBJECT (symbol_view), "selection-changed",
+                       G_CALLBACK (cb_symbol_selected), NULL);
+
+       // with a scrollbar
+       scrollbar = gtk_scrolled_window_new (NULL, NULL);
+       gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrollbar),
+                       GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+       gtk_container_add (GTK_CONTAINER (scrollbar), symbol_view);
+       gtk_box_pack_start (GTK_BOX (symbol_tables), scrollbar, TRUE, TRUE, 5);
 
-       /* vertical pane for the source view and the log zone */
+       /* vertical pane
+        * top: source view
+        * bottom: log zone
+        */
        GtkWidget *vpaned = gtk_vpaned_new ();
        gtk_paned_set_position (GTK_PANED (vpaned), 380);
-       gtk_box_pack_start (GTK_BOX (main_vbox), vpaned, TRUE, TRUE, 0);
+       gtk_paned_pack2 (GTK_PANED (main_hpaned), vpaned, TRUE, TRUE);
 
        /* source view with tabs */
        GtkWidget *notebook = gtk_notebook_new ();
+       latexila.notebook = GTK_NOTEBOOK (notebook);
        g_signal_connect (G_OBJECT (notebook), "switch-page",
                        G_CALLBACK (cb_page_change), NULL);
        gtk_paned_pack1 (GTK_PANED (vpaned), notebook, TRUE, TRUE);
-       latexila.notebook = GTK_NOTEBOOK (notebook);
 
        /* log zone */
-       //TODO set default height and width
+       // horizontal pane:
+       // left: action history
+       // right: details
        GtkWidget *hpaned = gtk_hpaned_new ();
        gtk_paned_set_position (GTK_PANED (hpaned), 190);
        gtk_paned_pack2 (GTK_PANED (vpaned), hpaned, TRUE, TRUE);
 
-       // actions list
+       // action history
        GtkListStore *list_store = gtk_list_store_new (N_COLUMNS_ACTION,
                        G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN);
        latexila.list_store = list_store;
@@ -274,11 +420,11 @@ main (int argc, char *argv[])
                        G_CALLBACK (cb_action_list_changed), NULL);
 
        // with a scrollbar
-       GtkWidget *sw1 = gtk_scrolled_window_new (NULL, NULL);
-       gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw1),
+       scrollbar = gtk_scrolled_window_new (NULL, NULL);
+       gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrollbar),
                        GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
-       gtk_paned_pack1 (GTK_PANED (hpaned), sw1, TRUE, TRUE);
-       gtk_container_add (GTK_CONTAINER (sw1), list_view);
+       gtk_paned_pack1 (GTK_PANED (hpaned), scrollbar, TRUE, TRUE);
+       gtk_container_add (GTK_CONTAINER (scrollbar), list_view);
        
        // log details
        GtkWidget *log_view = gtk_text_view_new ();
@@ -288,11 +434,11 @@ main (int argc, char *argv[])
        gtk_text_view_set_editable (GTK_TEXT_VIEW(log_view), FALSE);
        
        // with a scrollbar
-       GtkWidget *sw2 = gtk_scrolled_window_new (NULL, NULL);
-       gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw2),
+       scrollbar = gtk_scrolled_window_new (NULL, NULL);
+       gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrollbar),
                        GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
-       gtk_paned_pack2 (GTK_PANED (hpaned), sw2, TRUE, TRUE);
-       gtk_container_add (GTK_CONTAINER (sw2), log_view);
+       gtk_paned_pack2 (GTK_PANED (hpaned), scrollbar, TRUE, TRUE);
+       gtk_container_add (GTK_CONTAINER (scrollbar), log_view);
 
        latexila.log = GTK_TEXT_VIEW (log_view);
 
diff --git a/src/main.h b/src/main.h
index d3d6c9c..abc5222 100644
--- a/src/main.h
+++ b/src/main.h
@@ -62,7 +62,7 @@ typedef struct
 extern latexila_t latexila;
 
 // for the actions list in the log zone
-enum
+enum action
 {
        COLUMN_ACTION_TITLE,
        COLUMN_ACTION_COMMAND,
@@ -71,4 +71,21 @@ enum
        N_COLUMNS_ACTION
 };
 
+// for the symbol tables
+struct symbols
+{
+       gchar *filename;
+       gchar *latex_command;
+       gchar *package_required;
+};
+
+// for the symbol lists
+enum symbol
+{
+       COLUMN_SYMBOL_PIXBUF,
+       COLUMN_SYMBOL_COMMAND,
+       COLUMN_SYMBOL_TOOLTIP,
+       N_COLUMNS_SYMBOL
+};
+
 #endif /* MAIN_H */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]