├── .gitignore ├── data ├── buildsystems │ ├── autotools │ │ ├── buildsystem │ │ │ ├── AUTHORS │ │ │ ├── COPYING │ │ │ ├── NEWS │ │ │ ├── ChangeLog │ │ │ ├── README │ │ │ └── autogen.sh │ │ └── autotools.info │ └── cmake │ │ ├── cmake.info │ │ └── buildsystem │ │ ├── cmake │ │ ├── GlibCompileSchema.cmake.in │ │ ├── GlibCompileSchema_verify.cmake.in │ │ ├── vala │ │ │ ├── FindValadoc.cmake │ │ │ ├── ValaDocs.cmake │ │ │ └── FindVala.cmake │ │ ├── FindIntltool.cmake │ │ └── SimpleUninstall.cmake │ │ └── CMakeLists.txt ├── templates │ ├── plain_lib │ │ ├── plain_lib.png │ │ ├── template │ │ │ ├── src │ │ │ │ └── lib.vala │ │ │ └── template.vlp │ │ └── plain_lib.info │ ├── elementary │ │ ├── elementary.png │ │ ├── template │ │ │ ├── data │ │ │ │ ├── 48 │ │ │ │ │ └── hello.png │ │ │ │ └── hello.desktop │ │ │ ├── vapi │ │ │ │ └── config.vapi │ │ │ ├── template.vlp │ │ │ └── src │ │ │ │ └── main.vala │ │ └── elementary.info │ ├── plain_vala │ │ ├── plain_vala.png │ │ ├── template │ │ │ ├── src │ │ │ │ └── main.vala │ │ │ ├── vapi │ │ │ │ └── config.vapi │ │ │ └── template.vlp │ │ └── plain_vala.info │ ├── clutter │ │ ├── template │ │ │ ├── vapi │ │ │ │ └── config.vapi │ │ │ ├── template.vlp │ │ │ └── src │ │ │ │ └── main.vala │ │ └── clutter.info │ ├── simple_gtk │ │ ├── template │ │ │ ├── vapi │ │ │ │ └── config.vapi │ │ │ ├── template.vlp │ │ │ └── src │ │ │ │ └── main.vala │ │ └── simple_gtk.info │ ├── simple_gst_audio │ │ ├── template │ │ │ ├── vapi │ │ │ │ └── config.vapi │ │ │ ├── src │ │ │ │ └── main.vala │ │ │ └── template.vlp │ │ └── simple_gst_audio.info │ └── simple_gst_video │ │ ├── template │ │ ├── vapi │ │ │ └── config.vapi │ │ ├── template.vlp │ │ └── src │ │ │ └── main.vala │ │ └── simple_gst_video.info ├── valama.desktop.in ├── valama.xml ├── org.valama.gschema.xml ├── layout.xml └── valama.1.in ├── guanako ├── guanako.deps.in ├── guanako.pc.in ├── config.vapi ├── guanako_auto_indent.vala ├── guanako_vapi_discoverer.vala ├── guanako_refactoring.vala ├── data │ └── guanako.lang └── reporter.vala ├── vapi ├── gladeui-2.0.deps └── config.vapi ├── extravapi ├── gdl-3.0 │ └── gdl-3.0.deps ├── webkit2gtk-3.0 │ └── webkit2gtk-3.0.deps ├── gtk+-3.0 │ └── gtk+-3.0.deps └── gtksourceview-3.0 │ └── gtksourceview-3.0.deps ├── tests ├── projectfile │ ├── invalid_empty.vlp │ ├── version_none.vlp │ ├── pathtest.vlp │ ├── version_exact.vlp │ ├── version_high.vlp │ ├── version_low.vlp │ └── invalid_garbage.vlp ├── testmain.vala ├── testcompversion.vala ├── testcase.vala ├── CMakeLists.txt ├── testpathsplit.vala └── testprojectfile.vala ├── AUTHORS ├── pixmaps ├── element-enum-16.png ├── element-class-16.png ├── element-field-16.png ├── element-method-16.png ├── element-signal-16.png ├── element-struct-16.png ├── element-constant-16.png ├── element-delegate-16.png ├── element-interface-16.png ├── element-namespace-16.png ├── element-property-16.png ├── element-enum-public-16.png ├── element-enum_value-16.png ├── element-error_code-16.png ├── element-class-private-16.png ├── element-class-public-16.png ├── element-enum-private-16.png ├── element-error_domain-16.png ├── element-field-private-16.png ├── element-field-public-16.png ├── element-method-private-16.png ├── element-method-public-16.png ├── element-struct-private-16.png ├── element-struct-public-16.png ├── element-constant-private-16.png ├── element-constant-public-16.png ├── element-delegate-private-16.png ├── element-delegate-public-16.png ├── element-interface-public-16.png ├── element-method-protected-16.png ├── element-property-private-16.png ├── element-property-public-16.png ├── element-delegate-protected-16.png ├── element-error_code-private-16.png ├── element-error_code-public-16.png ├── element-error_domain-public-16.png ├── element-interface-private-16.png ├── element-interface-protected-16.png ├── element-property-protected-16.png └── element-error_domain-private-16.png ├── .tx └── config ├── cmake ├── guanako.cmake ├── GlibCompileSchema.cmake.in ├── GlibCompileSchema_verify.cmake.in ├── vala │ ├── FindValadoc.cmake │ ├── ValaDocs.cmake │ └── FindVala.cmake ├── FindIntltool.cmake ├── SimpleUninstall.cmake └── project.cmake ├── .travis.yml ├── src ├── ui │ ├── widgets │ │ └── browser_path.vala │ ├── valadoc_browser.vala │ ├── disabled │ │ └── stylechecker.vala │ ├── welcome_screen │ │ ├── load_project.vala │ │ ├── create_project_packages.vala │ │ ├── create_project_buildsystem.vala │ │ ├── create_project_location.vala │ │ └── main_screen.vala │ ├── app_output.vala │ ├── glade_viewer.vala │ ├── build_output.vala │ └── welcome_screen.vala ├── settings.vala ├── dialogs │ ├── missing_packages.vala │ ├── about.vala │ └── create_file.vala ├── common │ └── args.vala └── buildsystem │ └── plain.vala ├── po └── CMakeLists.txt ├── icons ├── CMakeLists.txt └── V4_logo.svg ├── README.md └── valama.vlp /.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | -------------------------------------------------------------------------------- /data/buildsystems/autotools/buildsystem/AUTHORS: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/buildsystems/autotools/buildsystem/COPYING: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/buildsystems/autotools/buildsystem/NEWS: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /guanako/guanako.deps.in: -------------------------------------------------------------------------------- 1 | @deps_requirements@ 2 | -------------------------------------------------------------------------------- /data/buildsystems/autotools/buildsystem/ChangeLog: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/buildsystems/autotools/buildsystem/README: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /vapi/gladeui-2.0.deps: -------------------------------------------------------------------------------- 1 | gtk+-3.0 2 | gmodule-2.0 3 | -------------------------------------------------------------------------------- /extravapi/gdl-3.0/gdl-3.0.deps: -------------------------------------------------------------------------------- 1 | gtk+-3.0 2 | gio-2.0 3 | -------------------------------------------------------------------------------- /tests/projectfile/invalid_empty.vlp: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /tests/projectfile/version_none.vlp: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /extravapi/webkit2gtk-3.0/webkit2gtk-3.0.deps: -------------------------------------------------------------------------------- 1 | gtk+-3.0 2 | libsoup-2.4 3 | -------------------------------------------------------------------------------- /tests/projectfile/pathtest.vlp: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /tests/projectfile/version_exact.vlp: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /tests/projectfile/version_high.vlp: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /tests/projectfile/version_low.vlp: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Linus Seelinger 2 | Dominique Lasserre 3 | -------------------------------------------------------------------------------- /pixmaps/element-enum-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Valama/valama/HEAD/pixmaps/element-enum-16.png -------------------------------------------------------------------------------- /pixmaps/element-class-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Valama/valama/HEAD/pixmaps/element-class-16.png -------------------------------------------------------------------------------- /pixmaps/element-field-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Valama/valama/HEAD/pixmaps/element-field-16.png -------------------------------------------------------------------------------- /pixmaps/element-method-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Valama/valama/HEAD/pixmaps/element-method-16.png -------------------------------------------------------------------------------- /pixmaps/element-signal-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Valama/valama/HEAD/pixmaps/element-signal-16.png -------------------------------------------------------------------------------- /pixmaps/element-struct-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Valama/valama/HEAD/pixmaps/element-struct-16.png -------------------------------------------------------------------------------- /extravapi/gtk+-3.0/gtk+-3.0.deps: -------------------------------------------------------------------------------- 1 | gio-2.0 2 | atk 3 | cairo 4 | gdk-pixbuf-2.0 5 | gdk-3.0 6 | pango 7 | x11 8 | -------------------------------------------------------------------------------- /pixmaps/element-constant-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Valama/valama/HEAD/pixmaps/element-constant-16.png -------------------------------------------------------------------------------- /pixmaps/element-delegate-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Valama/valama/HEAD/pixmaps/element-delegate-16.png -------------------------------------------------------------------------------- /pixmaps/element-interface-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Valama/valama/HEAD/pixmaps/element-interface-16.png -------------------------------------------------------------------------------- /pixmaps/element-namespace-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Valama/valama/HEAD/pixmaps/element-namespace-16.png -------------------------------------------------------------------------------- /pixmaps/element-property-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Valama/valama/HEAD/pixmaps/element-property-16.png -------------------------------------------------------------------------------- /pixmaps/element-enum-public-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Valama/valama/HEAD/pixmaps/element-enum-public-16.png -------------------------------------------------------------------------------- /pixmaps/element-enum_value-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Valama/valama/HEAD/pixmaps/element-enum_value-16.png -------------------------------------------------------------------------------- /pixmaps/element-error_code-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Valama/valama/HEAD/pixmaps/element-error_code-16.png -------------------------------------------------------------------------------- /pixmaps/element-class-private-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Valama/valama/HEAD/pixmaps/element-class-private-16.png -------------------------------------------------------------------------------- /pixmaps/element-class-public-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Valama/valama/HEAD/pixmaps/element-class-public-16.png -------------------------------------------------------------------------------- /pixmaps/element-enum-private-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Valama/valama/HEAD/pixmaps/element-enum-private-16.png -------------------------------------------------------------------------------- /pixmaps/element-error_domain-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Valama/valama/HEAD/pixmaps/element-error_domain-16.png -------------------------------------------------------------------------------- /pixmaps/element-field-private-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Valama/valama/HEAD/pixmaps/element-field-private-16.png -------------------------------------------------------------------------------- /pixmaps/element-field-public-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Valama/valama/HEAD/pixmaps/element-field-public-16.png -------------------------------------------------------------------------------- /pixmaps/element-method-private-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Valama/valama/HEAD/pixmaps/element-method-private-16.png -------------------------------------------------------------------------------- /pixmaps/element-method-public-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Valama/valama/HEAD/pixmaps/element-method-public-16.png -------------------------------------------------------------------------------- /pixmaps/element-struct-private-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Valama/valama/HEAD/pixmaps/element-struct-private-16.png -------------------------------------------------------------------------------- /pixmaps/element-struct-public-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Valama/valama/HEAD/pixmaps/element-struct-public-16.png -------------------------------------------------------------------------------- /data/templates/plain_lib/plain_lib.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Valama/valama/HEAD/data/templates/plain_lib/plain_lib.png -------------------------------------------------------------------------------- /pixmaps/element-constant-private-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Valama/valama/HEAD/pixmaps/element-constant-private-16.png -------------------------------------------------------------------------------- /pixmaps/element-constant-public-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Valama/valama/HEAD/pixmaps/element-constant-public-16.png -------------------------------------------------------------------------------- /pixmaps/element-delegate-private-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Valama/valama/HEAD/pixmaps/element-delegate-private-16.png -------------------------------------------------------------------------------- /pixmaps/element-delegate-public-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Valama/valama/HEAD/pixmaps/element-delegate-public-16.png -------------------------------------------------------------------------------- /pixmaps/element-interface-public-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Valama/valama/HEAD/pixmaps/element-interface-public-16.png -------------------------------------------------------------------------------- /pixmaps/element-method-protected-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Valama/valama/HEAD/pixmaps/element-method-protected-16.png -------------------------------------------------------------------------------- /pixmaps/element-property-private-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Valama/valama/HEAD/pixmaps/element-property-private-16.png -------------------------------------------------------------------------------- /pixmaps/element-property-public-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Valama/valama/HEAD/pixmaps/element-property-public-16.png -------------------------------------------------------------------------------- /data/buildsystems/autotools/buildsystem/autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -ex 3 | 4 | autoreconf -f -i -Wall,error 5 | ./configure 6 | -------------------------------------------------------------------------------- /data/templates/elementary/elementary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Valama/valama/HEAD/data/templates/elementary/elementary.png -------------------------------------------------------------------------------- /data/templates/plain_vala/plain_vala.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Valama/valama/HEAD/data/templates/plain_vala/plain_vala.png -------------------------------------------------------------------------------- /pixmaps/element-delegate-protected-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Valama/valama/HEAD/pixmaps/element-delegate-protected-16.png -------------------------------------------------------------------------------- /pixmaps/element-error_code-private-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Valama/valama/HEAD/pixmaps/element-error_code-private-16.png -------------------------------------------------------------------------------- /pixmaps/element-error_code-public-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Valama/valama/HEAD/pixmaps/element-error_code-public-16.png -------------------------------------------------------------------------------- /pixmaps/element-error_domain-public-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Valama/valama/HEAD/pixmaps/element-error_domain-public-16.png -------------------------------------------------------------------------------- /pixmaps/element-interface-private-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Valama/valama/HEAD/pixmaps/element-interface-private-16.png -------------------------------------------------------------------------------- /pixmaps/element-interface-protected-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Valama/valama/HEAD/pixmaps/element-interface-protected-16.png -------------------------------------------------------------------------------- /pixmaps/element-property-protected-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Valama/valama/HEAD/pixmaps/element-property-protected-16.png -------------------------------------------------------------------------------- /extravapi/gtksourceview-3.0/gtksourceview-3.0.deps: -------------------------------------------------------------------------------- 1 | atk 2 | gdk-3.0 3 | gdk-pixbuf-2.0 4 | gio-2.0 5 | gtk+-3.0 6 | pango 7 | cairo 8 | -------------------------------------------------------------------------------- /pixmaps/element-error_domain-private-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Valama/valama/HEAD/pixmaps/element-error_domain-private-16.png -------------------------------------------------------------------------------- /data/templates/elementary/template/data/48/hello.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Valama/valama/HEAD/data/templates/elementary/template/data/48/hello.png -------------------------------------------------------------------------------- /data/templates/plain_vala/template/src/main.vala: -------------------------------------------------------------------------------- 1 | using GLib; 2 | 3 | static void main (string[] args) { 4 | stdout.printf ("Hello world!\n"); 5 | } 6 | -------------------------------------------------------------------------------- /data/templates/clutter/template/vapi/config.vapi: -------------------------------------------------------------------------------- 1 | [CCode (cprefix = "", lower_case_cprefix = "")] 2 | namespace Config { 3 | public const string VALA_VERSION; 4 | } 5 | -------------------------------------------------------------------------------- /data/templates/elementary/template/vapi/config.vapi: -------------------------------------------------------------------------------- 1 | [CCode (cprefix = "", lower_case_cprefix = "")] 2 | namespace Config { 3 | public const string VALA_VERSION; 4 | } 5 | -------------------------------------------------------------------------------- /data/templates/plain_vala/template/vapi/config.vapi: -------------------------------------------------------------------------------- 1 | [CCode (cprefix = "", lower_case_cprefix = "")] 2 | namespace Config { 3 | public const string VALA_VERSION; 4 | } 5 | -------------------------------------------------------------------------------- /data/templates/simple_gtk/template/vapi/config.vapi: -------------------------------------------------------------------------------- 1 | [CCode (cprefix = "", lower_case_cprefix = "")] 2 | namespace Config { 3 | public const string VALA_VERSION; 4 | } 5 | -------------------------------------------------------------------------------- /data/templates/simple_gst_audio/template/vapi/config.vapi: -------------------------------------------------------------------------------- 1 | [CCode (cprefix = "", lower_case_cprefix = "")] 2 | namespace Config { 3 | public const string VALA_VERSION; 4 | } 5 | -------------------------------------------------------------------------------- /data/templates/simple_gst_video/template/vapi/config.vapi: -------------------------------------------------------------------------------- 1 | [CCode (cprefix = "", lower_case_cprefix = "")] 2 | namespace Config { 3 | public const string VALA_VERSION; 4 | } 5 | -------------------------------------------------------------------------------- /.tx/config: -------------------------------------------------------------------------------- 1 | [main] 2 | host = https://www.transifex.com 3 | type = PO 4 | minimum_perc = 80 5 | 6 | [valama.valama] 7 | file_filter = po/.po 8 | source_file = po/valama.pot 9 | source_lang = en 10 | 11 | -------------------------------------------------------------------------------- /tests/projectfile/invalid_garbage.vlp: -------------------------------------------------------------------------------- 1 | 2 | InvalidGarbage 3 | autotools 4 | 5 | 2 6 | 4 7 | <1 8 | 9 | 10 | -------------------------------------------------------------------------------- /data/templates/elementary/template/data/hello.desktop: -------------------------------------------------------------------------------- 1 | 2 | [Desktop Entry] 3 | Version=0.1 4 | Type=Application 5 | Name=Hello 6 | _GenericName=Helo_test 7 | _Comment=TEST 8 | Categories=GTK;Office; 9 | Exec=hello 10 | Icon=hello 11 | Terminal=false 12 | Name[de_DE]=hello 13 | -------------------------------------------------------------------------------- /data/valama.desktop.in: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | _Name=Valama 4 | _GenericName=IDE 5 | _Comment=Create Vala projects. 6 | Icon=valama 7 | Exec=valama 8 | MimeType=application/x-valama; 9 | Categories=GNOME;GTK;Development;IDE; 10 | _Keywords=Vala;IDE;Development; 11 | -------------------------------------------------------------------------------- /data/templates/plain_lib/template/src/lib.vala: -------------------------------------------------------------------------------- 1 | using GLib; 2 | 3 | namespace MyNS { 4 | public class Lib : Object { 5 | 6 | public signal void sample_signal(int a, int b); 7 | 8 | public int calc (int a, int b) { 9 | sample_signal (a, b); 10 | return a + b; 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /data/buildsystems/cmake/cmake.info: -------------------------------------------------------------------------------- 1 | 2 | 3 | Dominique Lasserre 4 | lasserre.d@gmail.com 5 | 6 | 7 | CMake 8 | 9 | 10 | CMake buildsystem. 11 | 12 | 13 | -------------------------------------------------------------------------------- /guanako/guanako.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@pc_prefix@ 2 | exec_prefix=@pc_exec_prefix@ 3 | libdir=@pc_libdir@ 4 | includedir=@pc_includedir@ 5 | datarootdir=@pc_datarootdir@ 6 | vapidir=@pc_vapidir@ 7 | 8 | Name: Guanako 9 | Description: Guanako library 10 | Version: @pc_version@ 11 | Requires: @pc_requirements@ 12 | Libs: -L${libdir} -lguanako 13 | Cflags: -I${includedir}/ 14 | -------------------------------------------------------------------------------- /data/buildsystems/autotools/autotools.info: -------------------------------------------------------------------------------- 1 | 2 | 3 | Yannick Inizan 4 | inizan.yannick@gmail.com 5 | 6 | 7 | Autotools 8 | 9 | 10 | Autotools buildsystem. 11 | 12 | 13 | -------------------------------------------------------------------------------- /guanako/config.vapi: -------------------------------------------------------------------------------- 1 | [CCode (cprefix = "", lower_case_cprefix = "")] 2 | namespace Config { 3 | public const string PACKAGE_NAME; 4 | public const string PACKAGE_VERSION; 5 | public const string GETTEXT_PACKAGE; 6 | public const string PACKAGE_DATA_DIR; 7 | 8 | public const string LOCALE_DIR; 9 | 10 | public const string VALA_VERSION; 11 | } 12 | -------------------------------------------------------------------------------- /data/templates/elementary/elementary.info: -------------------------------------------------------------------------------- 1 | 13 | -------------------------------------------------------------------------------- /vapi/config.vapi: -------------------------------------------------------------------------------- 1 | [CCode (cprefix = "", lower_case_cprefix = "")] 2 | namespace Config { 3 | public const string PACKAGE_NAME; 4 | public const string PACKAGE_VERSION; 5 | public const string GETTEXT_PACKAGE; 6 | public const string PACKAGE_DATA_DIR; 7 | public const string PACKAGE_UI_DIR; 8 | 9 | public const string LOCALE_DIR; 10 | public const string PIXMAP_DIR; 11 | 12 | public const string VALA_VERSION; 13 | } 14 | -------------------------------------------------------------------------------- /data/valama.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Valama project file 5 | Valama Projektdatei 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /data/templates/plain_vala/plain_vala.info: -------------------------------------------------------------------------------- 1 | 17 | -------------------------------------------------------------------------------- /data/templates/simple_gtk/simple_gtk.info: -------------------------------------------------------------------------------- 1 | 17 | -------------------------------------------------------------------------------- /data/templates/clutter/clutter.info: -------------------------------------------------------------------------------- 1 | 17 | -------------------------------------------------------------------------------- /data/org.valama.gschema.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 950 6 | Horizontal window size 7 | 8 | 9 | 10 | 11 | 12 | 700 13 | Vertical window size 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /data/templates/plain_lib/plain_lib.info: -------------------------------------------------------------------------------- 1 | 17 | -------------------------------------------------------------------------------- /data/templates/simple_gst_audio/simple_gst_audio.info: -------------------------------------------------------------------------------- 1 | 17 | -------------------------------------------------------------------------------- /data/templates/simple_gst_video/simple_gst_video.info: -------------------------------------------------------------------------------- 1 | 17 | -------------------------------------------------------------------------------- /data/templates/plain_lib/template/template.vlp: -------------------------------------------------------------------------------- 1 | 2 | 3 | autotools 4 | 5 | 0 6 | 0 7 | 0 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | src 16 | 17 | 18 | 19 | 20 | 21 | src/lib.vala 22 | 23 | 24 | -------------------------------------------------------------------------------- /data/templates/simple_gst_audio/template/src/main.vala: -------------------------------------------------------------------------------- 1 | void main (string[] args) 2 | { 3 | if (args.length < 2) 4 | { 5 | print ("usage: main file://path/to/file or main http://radio:8080"); 6 | return; 7 | } 8 | Gst.init (ref args); 9 | var loop = new MainLoop(); 10 | dynamic Gst.Element playbin = Gst.ElementFactory.make ("playbin","playbin"); 11 | playbin.bus.add_watch (0, (bus, message) => { 12 | switch (message.type) 13 | { 14 | case Gst.MessageType.ERROR: 15 | print ("error occured !"); 16 | loop.quit(); 17 | break; 18 | case Gst.MessageType.EOS: 19 | loop.quit(); 20 | break; 21 | } 22 | return false; 23 | }); 24 | playbin.uri = args[1]; 25 | playbin.set_state (Gst.State.PLAYING); 26 | loop.run(); 27 | } 28 | -------------------------------------------------------------------------------- /data/templates/plain_vala/template/template.vlp: -------------------------------------------------------------------------------- 1 | 2 | 3 | cmake 4 | 5 | 0 6 | 0 7 | 0 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | src 16 | vapi 17 | 18 | 19 | ui 20 | 21 | 22 | 23 | cmake 24 | 25 | 26 | src/main.vala 27 | 28 | 29 | -------------------------------------------------------------------------------- /data/templates/simple_gst_audio/template/template.vlp: -------------------------------------------------------------------------------- 1 | 2 | 3 | cmake 4 | 5 | 0 6 | 0 7 | 0 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | src 16 | vapi 17 | 18 | 19 | ui 20 | 21 | 22 | 23 | cmake 24 | 25 | 26 | src/main.vala 27 | 28 | 29 | -------------------------------------------------------------------------------- /cmake/guanako.cmake: -------------------------------------------------------------------------------- 1 | set(project_name "Guanako") 2 | set(Guanako_VERSION "1.0") 3 | set(soversion "1") 4 | set(required_pkgs 5 | "config {nocheck,nolink}" 6 | "gobject-2.0" 7 | "glib-2.0" 8 | "gio-2.0" 9 | "gee-0.8 >= 0.10.5" 10 | "libvala-0.20" 11 | "libvala-0.22" 12 | "libvala-0.24" 13 | "libvala-0.26" 14 | "libvala-0.28" 15 | "libvala-0.30" 16 | "libxml-2.0" 17 | "posix {nocheck,nolink}" 18 | ) 19 | set(srcfiles 20 | "guanako.vala" 21 | "guanako_auto_indent.vala" 22 | "guanako_frankenstein.vala" 23 | "guanako_helpers.vala" 24 | "guanako_iterators.vala" 25 | "guanako_refactoring.vala" 26 | "guanako_vapi_discoverer.vala" 27 | "reporter.vala" 28 | "scanner/valascanner.vala" 29 | "scanner/valaparser.vala" 30 | ) 31 | set(vapifiles 32 | "config.vapi" 33 | ) 34 | -------------------------------------------------------------------------------- /data/templates/clutter/template/template.vlp: -------------------------------------------------------------------------------- 1 | 2 | 3 | cmake 4 | 5 | 0 6 | 0 7 | 0 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | src 17 | vapi 18 | 19 | 20 | ui 21 | 22 | 23 | 24 | cmake 25 | 26 | 27 | src/main.vala 28 | 29 | 30 | -------------------------------------------------------------------------------- /data/templates/simple_gtk/template/template.vlp: -------------------------------------------------------------------------------- 1 | 2 | 3 | cmake 4 | 5 | 0 6 | 0 7 | 0 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | src 17 | vapi 18 | 19 | 20 | ui 21 | 22 | 23 | 24 | cmake 25 | 26 | 27 | src/main.vala 28 | 29 | 30 | -------------------------------------------------------------------------------- /data/templates/simple_gst_video/template/template.vlp: -------------------------------------------------------------------------------- 1 | 2 | 3 | cmake 4 | 5 | 0 6 | 0 7 | 0 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | src 19 | vapi 20 | 21 | 22 | ui 23 | 24 | 25 | 26 | cmake 27 | 28 | 29 | src/main.vala 30 | 31 | 32 | -------------------------------------------------------------------------------- /data/templates/simple_gtk/template/src/main.vala: -------------------------------------------------------------------------------- 1 | using GLib; 2 | using Gtk; 3 | 4 | static Label lbl_hello; 5 | 6 | static void main (string[] args) { 7 | Gtk.init (ref args); 8 | 9 | var window_main = new Window(); 10 | window_main.title = "Hello world!"; 11 | window_main.set_default_size (200, 200); 12 | window_main.destroy.connect (Gtk.main_quit); 13 | 14 | var vbox_main = new Box (Orientation.VERTICAL, 0); 15 | 16 | lbl_hello = new Label ("Hello!"); 17 | var btn_bye = new Button.with_label ("Magic!"); 18 | 19 | btn_bye.clicked.connect (on_btn_bye_clicked); 20 | 21 | vbox_main.pack_start (lbl_hello, true, true); 22 | vbox_main.pack_start (btn_bye, false, true); 23 | 24 | window_main.add (vbox_main); 25 | 26 | window_main.show_all(); 27 | 28 | Gtk.main(); 29 | } 30 | 31 | static void on_btn_bye_clicked() { 32 | lbl_hello.label = "Bye!"; 33 | } 34 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: c 2 | compiler: 3 | - gcc 4 | - clang 5 | branches: 6 | except: 7 | - artwork 8 | - debian 9 | - gh-pages 10 | - packaging 11 | - valamang 12 | before_install: 13 | - sudo apt-get update -qq 14 | - sudo apt-get install update-manager-core software-properties-common 15 | - sudo sed -i 's/^\(Prompt=\).*/\1lts/' /etc/update-manager/release-upgrades 16 | - sudo do-release-upgrade -d -f DistUpgradeViewNonInteractive 17 | - sudo add-apt-repository -y ppa:vala-team/ppa 18 | - sudo apt-get update -qq 19 | - eval $(sed -n '/^On Debian based systems install/{n;n;p}' README.md) valadoc 20 | script: mkdir build && cd build && cmake -DVALADOC_VERBOSE=ON .. && make && make docs-valama 21 | notifications: 22 | irc: 23 | channels: 24 | - "irc.freenode.org#valama" 25 | on_success: change 26 | on_failure: always 27 | use_notice: true 28 | skip_join: true 29 | -------------------------------------------------------------------------------- /data/templates/clutter/template/src/main.vala: -------------------------------------------------------------------------------- 1 | using GLib; 2 | using Clutter; 3 | 4 | static Stage stage; 5 | static Rectangle r; 6 | 7 | static void main (string[] args) { 8 | Clutter.init (ref args); 9 | 10 | stage = new Stage(); 11 | 12 | r = new Rectangle(); 13 | r.width = 100; 14 | r.height = 100; 15 | r.color = Color.from_string ("Green"); 16 | r.reactive = true; 17 | r.button_press_event.connect (() => { 18 | animate_it(); 19 | return false; 20 | }); 21 | 22 | stage.add_child (r); 23 | stage.show(); 24 | 25 | animate_it(); 26 | 27 | Clutter.main(); 28 | } 29 | 30 | static void animate_it() { 31 | r.x = 0; 32 | r.y = 0; 33 | r.animate (AnimationMode.EASE_OUT_BOUNCE, 3000, 34 | x: stage.width - r.width, 35 | y: stage.height - r.height, 36 | rotation_angle_z: r.rotation_angle_z + 90); 37 | } 38 | -------------------------------------------------------------------------------- /data/templates/elementary/template/template.vlp: -------------------------------------------------------------------------------- 1 | 2 | 3 | cmake 4 | 5 | 0 6 | 0 7 | 0 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | src 20 | data 21 | data 22 | vapi 23 | 24 | 25 | ui 26 | 27 | 28 | 29 | cmake 30 | 31 | 32 | src/main.vala 33 | 34 | 35 | -------------------------------------------------------------------------------- /cmake/GlibCompileSchema.cmake.in: -------------------------------------------------------------------------------- 1 | # 2 | # cmake/GlibCompileSchema.cmake 3 | # Copyright (C) 2013, Valama development team 4 | # 5 | # Valama is free software: you can redistribute it and/or modify it 6 | # under the terms of the GNU General Public License as published by the 7 | # Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # Valama is distributed in the hope that it will be useful, but 11 | # WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | # See the GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License along 16 | # with this program. If not, see . 17 | # 18 | 19 | find_program(GLIBCOMPILESCHEMA "glib-compile-schemas") 20 | if(GLIBCOMPILESCHEMA) 21 | execute_process( 22 | COMMAND 23 | "${GLIBCOMPILESCHEMA}" @GSETTINGSDIR@ 24 | ) 25 | endif() 26 | -------------------------------------------------------------------------------- /data/buildsystems/cmake/buildsystem/cmake/GlibCompileSchema.cmake.in: -------------------------------------------------------------------------------- 1 | # 2 | # cmake/GlibCompileSchema.cmake 3 | # Copyright (C) 2013, Valama development team 4 | # 5 | # Valama is free software: you can redistribute it and/or modify it 6 | # under the terms of the GNU General Public License as published by the 7 | # Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # Valama is distributed in the hope that it will be useful, but 11 | # WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | # See the GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License along 16 | # with this program. If not, see . 17 | # 18 | 19 | find_program(GLIBCOMPILESCHEMA "glib-compile-schemas") 20 | if(GLIBCOMPILESCHEMA) 21 | execute_process( 22 | COMMAND 23 | "${GLIBCOMPILESCHEMA}" @GSETTINGSDIR@ 24 | ) 25 | endif() 26 | -------------------------------------------------------------------------------- /tests/testmain.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * tests/testmain.vala 3 | * Copyright (C) 2013, Valama development team 4 | * 5 | * Valama is free software: you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * Valama is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | * See the GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program. If not, see . 17 | * 18 | */ 19 | 20 | using GLib; 21 | 22 | void main (string[] args) { 23 | Test.init (ref args); 24 | 25 | TestSuite.get_root().add_suite (new TestCompVersion().get_suite()); 26 | TestSuite.get_root().add_suite (new TestPathSplit().get_suite()); 27 | TestSuite.get_root().add_suite (new TestProjectfile().get_suite()); 28 | 29 | Test.run(); 30 | } 31 | 32 | // vim: set ai ts=4 sts=4 et sw=4 33 | -------------------------------------------------------------------------------- /src/ui/widgets/browser_path.vala: -------------------------------------------------------------------------------- 1 | using Gtk; 2 | 3 | public class BrowserPath { 4 | TreePath path; 5 | 6 | public BrowserPath (TreePath path) { 7 | this.path = path; 8 | } 9 | 10 | public string to_string() { 11 | return path.to_string(); 12 | } 13 | 14 | public int get (int index) { 15 | return path.get_indices()[index]; 16 | } 17 | 18 | public BrowserPathType path_type { 19 | get { 20 | if (this[0] == 0 && this[1] == 0) 21 | return BrowserPathType.SOURCE; 22 | if (this[0] == 0 && this[1] == 1) 23 | return BrowserPathType.PACKAGE; 24 | if (this[0] == 1) 25 | return BrowserPathType.UI; 26 | if (this[0] == 2) 27 | return BrowserPathType.BUILDSYSTEM; 28 | if (this[0] == 2) 29 | return BrowserPathType.DATA; 30 | return BrowserPathType.NONE; 31 | } 32 | } 33 | 34 | public int size { 35 | get { 36 | return path.get_depth(); 37 | } 38 | } 39 | } 40 | 41 | public enum BrowserPathType { 42 | NONE, SOURCE, PACKAGE, UI, BUILDSYSTEM, DATA 43 | } 44 | -------------------------------------------------------------------------------- /cmake/GlibCompileSchema_verify.cmake.in: -------------------------------------------------------------------------------- 1 | # 2 | # cmake/GlibCompileSchema.cmake.in 3 | # Copyright (C) 2013, Valama development team 4 | # 5 | # Valama is free software: you can redistribute it and/or modify it 6 | # under the terms of the GNU General Public License as published by the 7 | # Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # Valama is distributed in the hope that it will be useful, but 11 | # WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | # See the GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License along 16 | # with this program. If not, see . 17 | # 18 | 19 | execute_process( 20 | COMMAND 21 | "${GLIBCOMPILESCHEMA}" "--dry-run" "--schema-file=${GLIB_SCHEMAFILE}" 22 | ERROR_VARIABLE 23 | stderr 24 | OUTPUT_VARIABLE 25 | stderr 26 | OUTPUT_STRIP_TRAILING_WHITESPACE 27 | ERROR_STRIP_TRAILING_WHITESPACE 28 | ) 29 | if(NOT "${stderr}" STREQUAL "") 30 | message(FATAL_ERROR "Schema validation error: ${stderr}") 31 | endif() 32 | 33 | # vim: set ai ts=2 sts=2 et sw=2 34 | -------------------------------------------------------------------------------- /data/buildsystems/cmake/buildsystem/cmake/GlibCompileSchema_verify.cmake.in: -------------------------------------------------------------------------------- 1 | # 2 | # cmake/GlibCompileSchema.cmake.in 3 | # Copyright (C) 2013, Valama development team 4 | # 5 | # Valama is free software: you can redistribute it and/or modify it 6 | # under the terms of the GNU General Public License as published by the 7 | # Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # Valama is distributed in the hope that it will be useful, but 11 | # WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | # See the GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License along 16 | # with this program. If not, see . 17 | # 18 | 19 | execute_process( 20 | COMMAND 21 | "${GLIBCOMPILESCHEMA}" "--dry-run" "--schema-file=${GLIB_SCHEMAFILE}" 22 | ERROR_VARIABLE 23 | stderr 24 | OUTPUT_VARIABLE 25 | stderr 26 | OUTPUT_STRIP_TRAILING_WHITESPACE 27 | ERROR_STRIP_TRAILING_WHITESPACE 28 | ) 29 | if(NOT "${stderr}" STREQUAL "") 30 | message(FATAL_ERROR "Schema validation error: ${stderr}") 31 | endif() 32 | 33 | # vim: set ai ts=2 sts=2 et sw=2 34 | -------------------------------------------------------------------------------- /src/settings.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * src/settings.vala 3 | * Copyright (C) 2013, Valama development team 4 | * 5 | * Valama is free software: you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * Valama is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | * See the GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program. If not, see . 17 | * 18 | */ 19 | 20 | class ValamaSettings { 21 | 22 | public ValamaSettings() { 23 | settings = new Settings ("org.valama"); 24 | } 25 | Settings settings; 26 | 27 | public int window_size_x { 28 | get { return settings.get_int ("window-size-x"); } 29 | set { settings.set_int ("window-size-x", value); } 30 | } 31 | public int window_size_y { 32 | get { return settings.get_int ("window-size-y"); } 33 | set { settings.set_int ("window-size-y", value); } 34 | } 35 | 36 | } 37 | 38 | // vim: set ai ts=4 sts=4 et sw=4 39 | -------------------------------------------------------------------------------- /data/templates/simple_gst_video/template/src/main.vala: -------------------------------------------------------------------------------- 1 | using Gst; 2 | using Gtk; 3 | 4 | static void main (string[] args) { 5 | if (args.length < 2) 6 | { 7 | // Note: playbin handle uris, no paths. 8 | print ("usage: test file:///path/to/file\n"); 9 | return; 10 | } 11 | 12 | Gtk.init (ref args); 13 | Gst.init (ref args); 14 | 15 | dynamic Element playbin = ElementFactory.make ("playbin", "playbin"); 16 | playbin.uri = args[1]; 17 | 18 | Window window = new Window(); 19 | 20 | playbin.bus.add_watch (0, (bus, message) => { 21 | // get the window id of current GtkWindow for inlay the video. 22 | if (Gst.Video.is_video_overlay_prepare_window_handle_message (message)) 23 | (message.src as Gst.Video.Overlay).set_window_handle ((uint*)Gdk.X11Window.get_xid (window.get_window())); 24 | 25 | switch (message.type) 26 | { 27 | case Gst.MessageType.ERROR: 28 | print ("an error was occured !\n"); 29 | Gtk.main_quit(); 30 | break; 31 | case Gst.MessageType.EOS: 32 | print ("end of current stream. quit ..\n"); 33 | Gtk.main_quit(); 34 | break; 35 | } 36 | return true; 37 | }); 38 | 39 | window.realize.connect(() => { 40 | // when the GtkWindow is shown, set the playbin state at PLAYING. 41 | playbin.set_state (State.PLAYING); 42 | }); 43 | window.show_all(); 44 | Gtk.main(); 45 | } 46 | -------------------------------------------------------------------------------- /cmake/vala/FindValadoc.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # cmake/vala/FindValadocs.cmake 3 | # Copyright (C) 2012, 2013, Valama development team 4 | # 5 | # Valama is free software: you can redistribute it and/or modify it 6 | # under the terms of the GNU General Public License as published by the 7 | # Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # Valama is distributed in the hope that it will be useful, but 11 | # WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | # See the GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License along 16 | # with this program. If not, see . 17 | # 18 | ## 19 | # Add find_package handler for valadoc. 20 | ## 21 | 22 | # Search for the valac executable in the usual system paths. 23 | find_program(VALADOC_EXECUTABLE "valadoc") 24 | mark_as_advanced(VALADOC_EXECUTABLE) 25 | 26 | # Determine the valadoc version 27 | if(VALADOC_EXECUTABLE) 28 | execute_process( 29 | COMMAND 30 | "${VALADOC_EXECUTABLE}" "--version" 31 | OUTPUT_VARIABLE 32 | VALADOC_VERSION 33 | OUTPUT_STRIP_TRAILING_WHITESPACE 34 | ) 35 | string(REPLACE "Valadoc " "" VALADOC_VERSION "${VALADOC_VERSION}") 36 | endif() 37 | 38 | # Add find_package handler for valadoc. 39 | include(FindPackageHandleStandardArgs) 40 | find_package_handle_standard_args(Valadoc 41 | REQUIRED_VARS 42 | VALADOC_EXECUTABLE 43 | VERSION_VAR 44 | VALADOC_VERSION 45 | ) 46 | -------------------------------------------------------------------------------- /data/buildsystems/cmake/buildsystem/cmake/vala/FindValadoc.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # cmake/vala/FindValadocs.cmake 3 | # Copyright (C) 2012, 2013, Valama development team 4 | # 5 | # Valama is free software: you can redistribute it and/or modify it 6 | # under the terms of the GNU General Public License as published by the 7 | # Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # Valama is distributed in the hope that it will be useful, but 11 | # WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | # See the GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License along 16 | # with this program. If not, see . 17 | # 18 | ## 19 | # Add find_package handler for valadoc. 20 | ## 21 | 22 | # Search for the valac executable in the usual system paths. 23 | find_program(VALADOC_EXECUTABLE "valadoc") 24 | mark_as_advanced(VALADOC_EXECUTABLE) 25 | 26 | # Determine the valadoc version 27 | if(VALADOC_EXECUTABLE) 28 | execute_process( 29 | COMMAND 30 | "${VALADOC_EXECUTABLE}" "--version" 31 | OUTPUT_VARIABLE 32 | VALADOC_VERSION 33 | OUTPUT_STRIP_TRAILING_WHITESPACE 34 | ) 35 | string(REPLACE "Valadoc " "" VALADOC_VERSION "${VALADOC_VERSION}") 36 | endif() 37 | 38 | # Add find_package handler for valadoc. 39 | include(FindPackageHandleStandardArgs) 40 | find_package_handle_standard_args(Valadoc 41 | REQUIRED_VARS 42 | VALADOC_EXECUTABLE 43 | VERSION_VAR 44 | VALADOC_VERSION 45 | ) 46 | -------------------------------------------------------------------------------- /po/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # po/CMakeLists.txt 3 | # Copyright (C) 2012, 2013, Valama development team 4 | # 5 | # Valama is free software: you can redistribute it and/or modify it 6 | # under the terms of the GNU General Public License as published by the 7 | # Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # Valama is distributed in the hope that it will be useful, but 11 | # WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | # See the GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License along 16 | # with this program. If not, see . 17 | # 18 | 19 | include(Gettext) 20 | if(XGETTEXT_FOUND) 21 | set(potfile "${CMAKE_CURRENT_SOURCE_DIR}/${project_name_lower}.pot") 22 | gettext_create_pot("${potfile}" 23 | SRCFILES 24 | ${srcfiles} 25 | "guanako/*.vala" 26 | DESKTOPFILES 27 | "data/valama.desktop.in" 28 | GSETTINGSFILES 29 | "data/org.valama.gschema.xml" 30 | ) 31 | option(UPDATE_PO "Update .po files." ON) 32 | if(UPDATE_PO) 33 | set(NOUPDATE) 34 | else() 35 | set(NOUPDATE "NOUPDATE") 36 | endif() 37 | option(INSTALL_INTLTOOL_MERGED "Copy intltoolized files into source tree." OFF) 38 | if(INSTALL_INTLTOOL_MERGED) 39 | set(DESKTOPFILES_INSTALL "DESKTOPFILES_INSTALL") 40 | else() 41 | set(DESKTOPFILES_INSTALL) 42 | endif() 43 | gettext_create_translations("${potfile}" ALL ${NOUPDATE} ${DESKTOPFILES_INSTALL}) 44 | endif() 45 | 46 | # vim: set ai ts=2 sts=2 et sw=2 47 | -------------------------------------------------------------------------------- /cmake/FindIntltool.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # cmake/Intltool.cmake 3 | # Copyright (C) 2013, Valama development team 4 | # 5 | # Valama is free software: you can redistribute it and/or modify it 6 | # under the terms of the GNU General Public License as published by the 7 | # Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # Valama is distributed in the hope that it will be useful, but 11 | # WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | # See the GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License along 16 | # with this program. If not, see . 17 | # 18 | ## 19 | find_program(INTLTOOL_EXTRACT_EXECUTABLE intltool-extract) 20 | find_program(INTLTOOL_MERGE_EXECUTABLE intltool-merge) 21 | mark_as_advanced(INTLTOOL_EXTRACT_EXECUTABLE) 22 | mark_as_advanced(INTLTOOL_MERGE_EXECUTABLE) 23 | 24 | if(INTLTOOL_EXTRACT_EXECUTABLE) 25 | execute_process( 26 | COMMAND 27 | "${INTLTOOL_EXTRACT_EXECUTABLE}" "--version" 28 | OUTPUT_VARIABLE 29 | intltool_version 30 | ERROR_QUIET 31 | OUTPUT_STRIP_TRAILING_WHITESPACE 32 | ) 33 | if(intltool_version MATCHES "^intltool-extract \\(.*\\) [0-9]") 34 | string(REGEX REPLACE "^intltool-extract \\([^\\)]*\\) ([0-9\\.]+[^ \n]*).*" "\\1" INTLTOOL_VERSION_STRING "${intltool_version}") 35 | endif() 36 | unset(intltool_version) 37 | endif() 38 | 39 | include(FindPackageHandleStandardArgs) 40 | find_package_handle_standard_args(Intltool 41 | REQUIRED_VARS 42 | INTLTOOL_EXTRACT_EXECUTABLE 43 | INTLTOOL_MERGE_EXECUTABLE 44 | VERSION_VAR 45 | INTLTOOL_VERSION_STRING 46 | ) 47 | 48 | set(INTLTOOL_OPTIONS_DEFAULT 49 | "--quiet" 50 | ) 51 | -------------------------------------------------------------------------------- /data/buildsystems/cmake/buildsystem/cmake/FindIntltool.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # cmake/Intltool.cmake 3 | # Copyright (C) 2013, Valama development team 4 | # 5 | # Valama is free software: you can redistribute it and/or modify it 6 | # under the terms of the GNU General Public License as published by the 7 | # Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # Valama is distributed in the hope that it will be useful, but 11 | # WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | # See the GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License along 16 | # with this program. If not, see . 17 | # 18 | ## 19 | find_program(INTLTOOL_EXTRACT_EXECUTABLE intltool-extract) 20 | find_program(INTLTOOL_MERGE_EXECUTABLE intltool-merge) 21 | mark_as_advanced(INTLTOOL_EXTRACT_EXECUTABLE) 22 | mark_as_advanced(INTLTOOL_MERGE_EXECUTABLE) 23 | 24 | if(INTLTOOL_EXTRACT_EXECUTABLE) 25 | execute_process( 26 | COMMAND 27 | "${INTLTOOL_EXTRACT_EXECUTABLE}" "--version" 28 | OUTPUT_VARIABLE 29 | intltool_version 30 | ERROR_QUIET 31 | OUTPUT_STRIP_TRAILING_WHITESPACE 32 | ) 33 | if(intltool_version MATCHES "^intltool-extract \\(.*\\) [0-9]") 34 | string(REGEX REPLACE "^intltool-extract \\([^\\)]*\\) ([0-9\\.]+[^ \n]*).*" "\\1" INTLTOOL_VERSION_STRING "${intltool_version}") 35 | endif() 36 | unset(intltool_version) 37 | endif() 38 | 39 | include(FindPackageHandleStandardArgs) 40 | find_package_handle_standard_args(Intltool 41 | REQUIRED_VARS 42 | INTLTOOL_EXTRACT_EXECUTABLE 43 | INTLTOOL_MERGE_EXECUTABLE 44 | VERSION_VAR 45 | INTLTOOL_VERSION_STRING 46 | ) 47 | 48 | set(INTLTOOL_OPTIONS_DEFAULT 49 | "--quiet" 50 | ) 51 | -------------------------------------------------------------------------------- /src/ui/valadoc_browser.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * src/ui/structure_view.vala 3 | * Copyright (C) 2014, Valama development team 4 | * 5 | * Valama is free software: you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * Valama is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | * See the GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program. If not, see . 17 | * 18 | */ 19 | 20 | using GLib; 21 | using Gtk; 22 | using WebKit; 23 | 24 | public class UiValadocBrowser : UiElement { 25 | public UiValadocBrowser() { 26 | var vbox = new Box (Orientation.VERTICAL, 0); 27 | 28 | var sw = new ScrolledWindow (null, null); 29 | vbox.pack_start (sw, true, true); 30 | 31 | var webview = new WebView(); 32 | webview.load_changed.connect ((event) => { 33 | if (event == LoadEvent.STARTED && !webview.get_uri().has_prefix ("http://www.valadoc.org/")) { 34 | webview.stop_loading(); 35 | //TODO: Show visible message. 36 | debug_msg ("Tried to access content outside of documentation domain: %s\n", 37 | webview.get_uri()); 38 | } 39 | }); 40 | //TODO: Make this configurable. 41 | webview.load_uri ("http://www.valadoc.org"); 42 | sw.add (webview); 43 | 44 | widget = vbox; 45 | widget.show_all(); 46 | } 47 | 48 | protected override void build() {} 49 | } 50 | 51 | // vim: set ai ts=4 sts=4 et sw=4 52 | -------------------------------------------------------------------------------- /icons/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # icons/CMakeLists.txt 3 | # Copyright (C) 2012, 2013, Valama development team 4 | # 5 | # Valama is free software: you can redistribute it and/or modify it 6 | # under the terms of the GNU General Public License as published by the 7 | # Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # Valama is distributed in the hope that it will be useful, but 11 | # WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | # See the GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License along 16 | # with this program. If not, see . 17 | # 18 | 19 | include("${CMAKE_SOURCE_DIR}/cmake/Common.cmake") 20 | 21 | # Generate usable application icons. 22 | set(sizeslist "24" "32" "48" "64" "72" "96" "128" "256") 23 | convert_svg_to_png(png_list 24 | ICON 25 | "${CMAKE_CURRENT_SOURCE_DIR}/V4_logo.svg" 26 | SIZES 27 | ${sizeslist} 28 | PNG_NAME 29 | "valama" 30 | ) 31 | add_custom_target(icons 32 | ALL 33 | DEPENDS 34 | ${png_list} 35 | COMMENT 36 | "Generate application icons." VERBATIM 37 | ) 38 | 39 | # Generate logo with text. 40 | set(sizeslist "128") 41 | convert_svg_to_png(textlogo 42 | ICON 43 | "${CMAKE_CURRENT_SOURCE_DIR}/V4.svg" 44 | SIZES 45 | ${sizeslist} 46 | PNG_NAME 47 | "valama-text" 48 | DESTINATION 49 | "${datadir}" 50 | ) 51 | add_custom_target(icons_text 52 | ALL 53 | DEPENDS 54 | ${textlogo} 55 | COMMENT 56 | "Generate text logo." VERBATIM 57 | ) 58 | 59 | 60 | # Install application icon. 61 | if(CONVERT) 62 | install( 63 | FILES 64 | "${CMAKE_CURRENT_BINARY_DIR}/icons/hicolor/32x32/apps/valama.png" 65 | DESTINATION 66 | "${pixrootdir}" 67 | ) 68 | endif() 69 | 70 | # vim: set ai ts=2 sts=2 et sw=2 71 | -------------------------------------------------------------------------------- /src/dialogs/missing_packages.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * src/dialogs/missing_packages.vala 3 | * Copyright (C) 2012, 2013, Valama development team 4 | * 5 | * Valama is free software: you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * Valama is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | * See the GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program. If not, see . 17 | * 18 | */ 19 | 20 | using Gtk; 21 | using GLib; 22 | 23 | /** 24 | * Show dialog with missing packages. 25 | */ 26 | public void ui_missing_packages_dialog (string[] missing_packages) { 27 | var dlg_missing_packages = new Dialog.with_buttons (_("Missing packages"), 28 | window_main, 29 | DialogFlags.MODAL, 30 | _("_Ok"), 31 | ResponseType.OK, 32 | null); 33 | dlg_missing_packages.resizable = false; 34 | 35 | var box_main = new Box (Orientation.VERTICAL, 0); 36 | string dlg = _("The following vala packages are not available on your system:\n"); 37 | foreach (string pkg in missing_packages) 38 | dlg += pkg + "\n"; 39 | dlg += _("Compiling and auto completion might fail!"); 40 | var lbl_packages = new Label (dlg); 41 | box_main.pack_start (lbl_packages, true, true); 42 | box_main.show_all(); 43 | 44 | dlg_missing_packages.get_content_area().pack_start (box_main); 45 | dlg_missing_packages.run(); 46 | dlg_missing_packages.destroy(); 47 | } 48 | 49 | // vim: set ai ts=4 sts=4 et sw=4 50 | -------------------------------------------------------------------------------- /data/layout.xml: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /guanako/guanako_auto_indent.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * guanako/guanako_auto_indent.vala 3 | * Copyright (C) 2012, 2013, Valama development team 4 | * 5 | * Valama is free software: you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * Valama is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | * See the GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program. If not, see . 17 | * 18 | */ 19 | 20 | using GLib; 21 | using Vala; 22 | 23 | namespace Guanako { 24 | public static string auto_indent_buffer (Project project, SourceFile file) { 25 | string[] lines = file.content.split ("\n"); 26 | for (int q = 0; q < lines.length; q++) 27 | lines[q] = lines[q].strip(); 28 | 29 | foreach (var node in file.get_nodes()) { 30 | if (node is Symbol) { 31 | var cls = node as Symbol; 32 | iter_symbol (cls, (smb, depth) => { 33 | if (smb is Subroutine) { 34 | var sr = smb as Subroutine; 35 | iter_subroutine (sr, (s, depth2) => { 36 | for (int q = s.source_reference.begin.line - 1; q <= s.source_reference.end.line - 1; q++) 37 | for (int i = 0; i < 1 + depth2; i++) 38 | lines[q] = " " + lines[q]; 39 | return IterCallbackReturns.CONTINUE; 40 | }); 41 | } 42 | return IterCallbackReturns.CONTINUE; 43 | }); 44 | } 45 | } 46 | 47 | string new_content = ""; 48 | for (int q = 0; q < lines.length; q++) { 49 | new_content += lines[q]; 50 | if (q < lines.length - 1) 51 | new_content += "\n"; 52 | } 53 | return new_content; 54 | } 55 | } 56 | 57 | // vim: set ai ts=4 sts=4 et sw=4 58 | -------------------------------------------------------------------------------- /data/valama.1.in: -------------------------------------------------------------------------------- 1 | .TH VALAMA "1" "@MONTH_DATE@" "Valama @Valama_VERSION@" "User Commands" 2 | .SH NAME 3 | Valama \- Next generation Vala IDE 4 | .SH SYNOPSIS 5 | \fBvalama\fR 6 | [\fB-h\fR|\fB--help\fR] 7 | [\fB-v\fR|\fB--version\fR] 8 | [\fB--syntax\fR \fIfile\fR] 9 | [\fB--templates\fR \fIdirectory\fR] 10 | [\fB--buildsystems\fR \fIdirectory\fR] 11 | [{\fB-d\fR|\fB--debug\fR} [\fIlevel\fR]] 12 | [\fB--force\-old\fR] 13 | [\fB--layout\fR \fIfile\fR] 14 | [\fB--reset\-layout\fR] 15 | [\fIfile\fR ...] 16 | .SH DESCRIPTION 17 | \fBValama\fR is an integrated development environment (IDE) to support 18 | creation of Vala applications. Some features: 19 | .IP 20 | \(bu intelligent code completion (easily extendible syntax definition file) 21 | .IP 22 | \(bu live error checking 23 | .IP 24 | \(bu project templates 25 | .SH OPTIONS 26 | .TP 27 | \fB\-h\fR, \fB\-\-help\fR 28 | Show help. 29 | .TP 30 | \fB\-v\fR, \fB\-\-version\fR 31 | Display version number. 32 | .TP 33 | \fB\-\-syntax\fR \fIfile\fR 34 | Guanako syntax file (used for code completion). 35 | .TP 36 | \fB\-\-templates\fR \fIdirectory\fR 37 | Templates directory. 38 | .TP 39 | \fB\-\-buildsystems\fR \fIdirectory\fR 40 | Build systems directory. 41 | .TP 42 | \fB\-d\fR, \fB\-\-debug\fR \fI[debuglevel]\fR 43 | Output debug information. Be more verbose on higher debug level. 44 | .TP 45 | \fB\-\-force\-old\fR 46 | Force loading of possibly incompatible template or project files. 47 | .TP 48 | \fB\-\-layout\fR \fIfile\fR 49 | Path to GUI layout file. 50 | .TP 51 | \fB\-\-reset\-layout\fR 52 | Load default layout. 53 | .SH FILES 54 | .TP 55 | \fI@DATADIR@syntax\fR 56 | Default Guanako syntax definition file. 57 | .TP 58 | \fI@DATADIR@templates\fR 59 | Default templates directory. Each template has its own subdirectory with a 60 | \fItesttemplate.info\fR file for meta information like supported Vala 61 | versions, package dependencies, etc. In the sub-subdirectory \fItemplate\fR is 62 | the actual template source code. 63 | .TP 64 | \fI@DATADIR@buildsystems\fR 65 | Default build system plug-in directory. Each build system plug-in has its own 66 | subdirectory with a \fItestbuildsystem.info\fR file for meta information. In 67 | the sub-subdirectory \fIbuildsystem\fR is the actual buildsystem template 68 | code. 69 | .TP 70 | \fI@DATADIR@layout.xml\fR 71 | Default GUI layout file to place widgets like the project browser, reporter, 72 | etc. -------------------------------------------------------------------------------- /guanako/guanako_vapi_discoverer.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * guanako/guanako_vapi_discoverer.vala 3 | * Copyright (C) 2012, 2013, Valama development team 4 | * 5 | * Valama is free software: you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * Valama is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | * See the GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program. If not, see . 17 | * 18 | */ 19 | 20 | using GLib; 21 | 22 | namespace Guanako { 23 | public static string? discover_vapi_file (string needle_namespace) { 24 | foreach (string vapipath in get_vapi_dirs()) { 25 | var directory = File.new_for_path (vapipath); 26 | 27 | try { 28 | var enumerator = directory.enumerate_children (FileAttribute.STANDARD_NAME, 0); 29 | 30 | FileInfo file_info; 31 | while ((file_info = enumerator.next_file()) != null) { 32 | if (file_info.get_name().has_suffix (".vapi")) { 33 | var file = File.new_for_path (vapipath + file_info.get_name()); 34 | var dis = new DataInputStream (file.read()); 35 | string line; 36 | /* 37 | * Read lines until end of file (null) is reached. 38 | */ 39 | while ((line = dis.read_line (null)) != null) 40 | if (line.contains ("namespace " + needle_namespace + " ")) 41 | return file_info.get_name().substring (0, file_info.get_name().length - 5); 42 | } 43 | } 44 | } catch (GLib.IOError e) { 45 | errmsg (_("Could not read file: %s"), e.message); 46 | } catch (GLib.Error e) { 47 | errmsg (_("Could not operate on directory: %s"), e.message); 48 | } 49 | } 50 | return null; 51 | } 52 | } 53 | 54 | // vim: set ai ts=4 sts=4 et sw=4 55 | -------------------------------------------------------------------------------- /src/ui/disabled/stylechecker.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * src/ui/stylechecker.vala 3 | * Copyright (C) 2013, Valama development team 4 | * 5 | * Valama is free software: you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * Valama is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | * See the GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program. If not, see . 17 | * 18 | */ 19 | 20 | using GLib; 21 | using Gtk; 22 | 23 | /** 24 | * Code style checker widget. 25 | */ 26 | public class UiStyleChecker : UiElement { 27 | TreeView tree_view; 28 | 29 | public UiStyleChecker() { 30 | tree_view = new TreeView(); 31 | var line_renderer = new CellRendererText(); 32 | line_renderer.yalign = 0; 33 | tree_view.cursor_changed.connect (on_tree_view_cursor_changed); 34 | tree_view.insert_column_with_attributes (-1, 35 | _("Line"), 36 | line_renderer, 37 | "text", 38 | 0, 39 | null); 40 | 41 | tree_view.insert_column_with_attributes (-1, 42 | "", 43 | new CellRendererText(), 44 | "markup", 45 | 1, 46 | null); 47 | 48 | 49 | var box_main = new Box (Orientation.VERTICAL, 0); 50 | 51 | var scrw = new ScrolledWindow (null, null); 52 | scrw.add (tree_view); 53 | box_main.pack_start (scrw, true, true); 54 | 55 | build(); 56 | 57 | widget = box_main; 58 | } 59 | 60 | public override void build() { 61 | debug_msg (_("Checker loaded.\n")); 62 | } 63 | 64 | public void on_tree_view_cursor_changed() {} 65 | } 66 | 67 | // vim: set ai ts=4 sts=4 et sw=4 68 | -------------------------------------------------------------------------------- /tests/testcompversion.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * tests/testcompversion.vala 3 | * Copyright (C) 2013, Valama development team 4 | * 5 | * Valama is free software: you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * Valama is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | * See the GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program. If not, see . 17 | * 18 | */ 19 | 20 | using GLib; 21 | 22 | public class TestCompVersion : TestCase { 23 | public TestCompVersion() { 24 | base ("TestCompVersion"); 25 | add_test ("standard", test_normal); 26 | add_test ("epoch", test_epoch); 27 | } 28 | 29 | public override void set_up() {} 30 | public override void tear_down() {} 31 | 32 | public void test_normal() { 33 | assert (comp_version ("14", "3") == 1); 34 | assert (comp_version ("14", "3.5") == 1); 35 | assert (comp_version ("14", "3.9.8") == 1); 36 | assert (comp_version ("14.1", "3.5") == 1); 37 | 38 | assert (comp_version ("3", "14") == -1); 39 | assert (comp_version ("3.5", "14") == -1); 40 | assert (comp_version ("3.9.8", "14") == -1); 41 | assert (comp_version ("3.5", "14.1") == -1); 42 | 43 | assert (comp_version ("4.1.2", "4.1.3") == -1); 44 | assert (comp_version ("4.10.2", "4.2.0") == 1); 45 | assert (comp_version ("4.1.2.3.6.4.12", "4.1.2.3.6.4.3") == 1); 46 | 47 | assert (comp_version ("4.1.2.3.6.4.2", "4.1.2.3.6.4.2") == 0); 48 | assert (comp_version ("4", "4") == 0); 49 | } 50 | 51 | public void test_epoch() { 52 | assert (comp_version ("1:3.0.0", "4.0") == 1); 53 | assert (comp_version ("1:3.0.0", "3.0.0") == 1); 54 | assert (comp_version ("1:3.0.0", "3.0.1") == 1); 55 | 56 | assert (comp_version ("1:3.0.0", "2:2.0") == -1); 57 | assert (comp_version ("1:3.0.0", "1:3.0.1") == -1); 58 | assert (comp_version ("1:3.0.0", "1:3.1") == -1); 59 | 60 | assert (comp_version ("15:3.0.0", "2:6.1") == 1); 61 | 62 | assert (comp_version ("1:3", "1:3") == 0); 63 | } 64 | } 65 | 66 | // vim: set ai ts=4 sts=4 et sw=4 67 | -------------------------------------------------------------------------------- /cmake/SimpleUninstall.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # cmake/SimpleUninstall.cmake 3 | # Copyright (C) 2013, Valama development team 4 | # 5 | # Valama is free software: you can redistribute it and/or modify it 6 | # under the terms of the GNU General Public License as published by the 7 | # Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # Valama is distributed in the hope that it will be useful, but 11 | # WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | # See the GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License along 16 | # with this program. If not, see . 17 | # 18 | ## 19 | # 20 | # Slightly modified version from: http://www.cmake.org/Wiki/CMake_FAQ 21 | # 22 | 23 | if(NOT EXISTS "${CMAKE_BINARY_DIR}/install_manifest.txt") 24 | message(FATAL_ERROR "Cannot find install manifest: " 25 | "\"${CMAKE_BINARY_DIR}/install_manifest.txt\"") 26 | endif() 27 | 28 | file(READ "${CMAKE_BINARY_DIR}/install_manifest.txt" files) 29 | string(REGEX REPLACE "\n" ";" files "${files}") 30 | 31 | cmake_policy(PUSH) 32 | # Ignore empty list elements. 33 | cmake_policy(SET CMP0007 OLD) 34 | list(REVERSE files) 35 | cmake_policy(POP) 36 | 37 | foreach(file ${files}) 38 | message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"") 39 | if(EXISTS "$ENV{DESTDIR}${file}") 40 | execute_process( 41 | COMMAND 42 | "${CMAKE_COMMAND}" -E remove "$ENV{DESTDIR}${file}" 43 | OUTPUT_VARIABLE 44 | rm_out 45 | RESULT_VARIABLE 46 | rm_retval 47 | ) 48 | if(NOT ${rm_retval} EQUAL 0) 49 | message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"") 50 | endif() 51 | else() 52 | message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.") 53 | endif() 54 | endforeach() 55 | 56 | if(NOT "$ENV{DESTDIR}" AND POSTREMOVE_HOOK) 57 | if (GSETTINGSDIR) 58 | set(compile_schema_file "${CMAKE_BINARY_DIR}/GlibCompileSchema_uninstall.cmake") 59 | if(NOT EXISTS "${compile_schema_file}") 60 | if(NOT CUSTOM_SOURCE_DIR) 61 | set(CUSTOM_SOURCE_DIR "${CMAKE_SOURCE_DIR}") 62 | endif() 63 | configure_file( 64 | "${CUSTOM_SOURCE_DIR}/cmake/GlibCompileSchema.cmake.in" 65 | "${compile_schema_file}" 66 | @ONLY 67 | ) 68 | endif() 69 | endif() 70 | execute_process( 71 | COMMAND 72 | "${CMAKE_COMMAND}" -P "${compile_schema_file}" 73 | ) 74 | endif() -------------------------------------------------------------------------------- /data/buildsystems/cmake/buildsystem/cmake/SimpleUninstall.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # cmake/SimpleUninstall.cmake 3 | # Copyright (C) 2013, Valama development team 4 | # 5 | # Valama is free software: you can redistribute it and/or modify it 6 | # under the terms of the GNU General Public License as published by the 7 | # Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # Valama is distributed in the hope that it will be useful, but 11 | # WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | # See the GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License along 16 | # with this program. If not, see . 17 | # 18 | ## 19 | # 20 | # Slightly modified version from: http://www.cmake.org/Wiki/CMake_FAQ 21 | # 22 | 23 | if(NOT EXISTS "${CMAKE_BINARY_DIR}/install_manifest.txt") 24 | message(FATAL_ERROR "Cannot find install manifest: " 25 | "\"${CMAKE_BINARY_DIR}/install_manifest.txt\"") 26 | endif() 27 | 28 | file(READ "${CMAKE_BINARY_DIR}/install_manifest.txt" files) 29 | string(REGEX REPLACE "\n" ";" files "${files}") 30 | 31 | cmake_policy(PUSH) 32 | # Ignore empty list elements. 33 | cmake_policy(SET CMP0007 OLD) 34 | list(REVERSE files) 35 | cmake_policy(POP) 36 | 37 | foreach(file ${files}) 38 | message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"") 39 | if(EXISTS "$ENV{DESTDIR}${file}") 40 | execute_process( 41 | COMMAND 42 | "${CMAKE_COMMAND}" -E remove "$ENV{DESTDIR}${file}" 43 | OUTPUT_VARIABLE 44 | rm_out 45 | RESULT_VARIABLE 46 | rm_retval 47 | ) 48 | if(NOT ${rm_retval} EQUAL 0) 49 | message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"") 50 | endif() 51 | else() 52 | message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.") 53 | endif() 54 | endforeach() 55 | 56 | if(NOT "$ENV{DESTDIR}" AND POSTREMOVE_HOOK) 57 | if (GSETTINGSDIR) 58 | set(compile_schema_file "${CMAKE_BINARY_DIR}/GlibCompileSchema_uninstall.cmake") 59 | if(NOT EXISTS "${compile_schema_file}") 60 | if(NOT CUSTOM_SOURCE_DIR) 61 | set(CUSTOM_SOURCE_DIR "${CMAKE_SOURCE_DIR}") 62 | endif() 63 | configure_file( 64 | "${CUSTOM_SOURCE_DIR}/cmake/GlibCompileSchema.cmake.in" 65 | "${compile_schema_file}" 66 | @ONLY 67 | ) 68 | endif() 69 | endif() 70 | execute_process( 71 | COMMAND 72 | "${CMAKE_COMMAND}" -P "${compile_schema_file}" 73 | ) 74 | endif() -------------------------------------------------------------------------------- /src/ui/welcome_screen/load_project.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * src/ui/welcome_screen/create_project_location.vala 3 | * Copyright (C) 2013, Valama development team 4 | * 5 | * Valama is free software: you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * Valama is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | * See the GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program. If not, see . 17 | * 18 | */ 19 | 20 | 21 | // Open existing project (using a file chooser widget) 22 | 23 | using GLib; 24 | using Gtk; 25 | namespace WelcomeScreen { 26 | public class OpenProject : TemplatePageWithHeader { 27 | 28 | public string? project_filename = ""; 29 | 30 | public OpenProject () { 31 | heading = _("Open project"); 32 | description = _("Select Valama project file"); 33 | } 34 | 35 | protected override void clean_up() { 36 | } 37 | 38 | protected override Gtk.Widget build_inner_widget() { 39 | var chooser_open = new FileChooserWidget (FileChooserAction.OPEN); 40 | chooser_open.expand = true; 41 | 42 | // Only allow .vlp files 43 | var filter_vlp = new FileFilter(); 44 | filter_vlp.set_filter_name (_("Valama project files (*.vlp)")); 45 | filter_vlp.add_pattern ("*.vlp"); 46 | chooser_open.add_filter (filter_vlp); 47 | chooser_open.set_filter (filter_vlp); // set default filter 48 | 49 | chooser_open.selection_changed.connect (() => { 50 | project_filename = chooser_open.get_filename(); 51 | btn_next.sensitive = project_filename != null && 52 | File.new_for_path (project_filename).query_file_type ( 53 | FileQueryInfoFlags.NONE) == FileType.REGULAR; 54 | }); 55 | chooser_open.file_activated.connect (() => { 56 | if (btn_next.sensitive) //Only procede if valid file is selected 57 | go_to_next_clicked(); 58 | }); 59 | return chooser_open; 60 | } 61 | } 62 | } 63 | 64 | // vim: set ai ts=4 sts=4 et sw=4 -------------------------------------------------------------------------------- /cmake/project.cmake: -------------------------------------------------------------------------------- 1 | # This file was auto generated by Valama 0.1.2. Do not modify it. 2 | set(project_name "Valama") 3 | set(Valama_VERSION "0.1.2") 4 | set(required_pkgs 5 | "atk {nolink}" 6 | "cairo {nolink}" 7 | "clutter-1.0 {nolink}" 8 | "clutter-gtk-1.0" 9 | "cogl-1.0 {nolink}" 10 | "config {nocheck,nolink}" 11 | "gdk-3.0" 12 | "gdk-pixbuf-2.0 {nolink}" 13 | "gdl-3.0 >= 3.8" 14 | "gee-0.8 >= 0.10.5" 15 | "gio-2.0" 16 | "gladeui-2.0" 17 | "glib-2.0 >= 2.32" 18 | "gmodule-2.0 {nolink}" 19 | "gobject-2.0" 20 | "gtk+-3.0 >= 3.9" 21 | "gtksourceview-3.0 >= 3.9" 22 | "guanako" 23 | "json-glib-1.0 {nolink}" 24 | "libsoup-2.4 {nolink}" 25 | "libvala-0.20" 26 | "libvala-0.22" 27 | "libvala-0.24" 28 | "libvala-0.26" 29 | "libvala-0.28" 30 | "libvala-0.30" 31 | "libxml-2.0" 32 | "pango {nolink}" 33 | "pangocairo {nolink}" 34 | "posix {nocheck,nolink}" 35 | "webkit2gtk-3.0" 36 | "x11 {nolink}" 37 | ) 38 | set(srcfiles 39 | "src/buildsystem/autotools.vala" 40 | "src/buildsystem/base.vala" 41 | "src/buildsystem/buildsystem_template.vala" 42 | "src/buildsystem/cmake.vala" 43 | "src/buildsystem/plain.vala" 44 | "src/common/args.vala" 45 | "src/common/common.vala" 46 | "src/common/ui_helpers.vala" 47 | "src/completion_provider.vala" 48 | "src/dialogs/about.vala" 49 | "src/dialogs/create_file.vala" 50 | "src/dialogs/missing_packages.vala" 51 | "src/dialogs/project_settings.vala" 52 | "src/main.vala" 53 | "src/project/build_project.vala" 54 | "src/project/package_management.vala" 55 | "src/project/project.vala" 56 | "src/project/project_file.vala" 57 | "src/project/project_templates.vala" 58 | "src/settings.vala" 59 | "src/ui/app_output.vala" 60 | "src/ui/breakpoints.vala" 61 | "src/ui/build_output.vala" 62 | "src/ui/current_file_structure.vala" 63 | "src/ui/glade_viewer.vala" 64 | "src/ui/project_browser.vala" 65 | "src/ui/reports.vala" 66 | "src/ui/search.vala" 67 | "src/ui/source_viewer.vala" 68 | "src/ui/structure_view.vala" 69 | "src/ui/super_source_view.vala" 70 | "src/ui/symbol_browser.vala" 71 | "src/ui/ui_elements.vala" 72 | "src/ui/valadoc_browser.vala" 73 | "src/ui/welcome_screen.vala" 74 | "src/ui/welcome_screen/create_project_buildsystem.vala" 75 | "src/ui/welcome_screen/create_project_location.vala" 76 | "src/ui/welcome_screen/create_project_packages.vala" 77 | "src/ui/welcome_screen/create_project_template.vala" 78 | "src/ui/welcome_screen/load_project.vala" 79 | "src/ui/welcome_screen/main_screen.vala" 80 | "src/ui/widgets/browser_path.vala" 81 | "src/ui_main.vala" 82 | ) 83 | set(vapifiles 84 | "vapi/config.vapi" 85 | ) 86 | set(uifiles 87 | ) 88 | -------------------------------------------------------------------------------- /src/dialogs/about.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * src/dialogs/about.vala 3 | * Copyright (C) 2013, Valama development team 4 | * 5 | * Valama is free software: you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * Valama is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | * See the GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program. If not, see . 17 | * 18 | */ 19 | 20 | using Gtk; 21 | using Gdk; 22 | using GLib; 23 | 24 | /** 25 | * Show about dialog. 26 | */ 27 | public void ui_about_dialog() { 28 | var dlg = new AboutDialog(); 29 | dlg.resizable = false; 30 | 31 | try { 32 | dlg.logo = new Pixbuf.from_file (Path.build_path (Path.DIR_SEPARATOR_S, 33 | Config.PACKAGE_DATA_DIR, 34 | "valama-text.png")); 35 | } catch (GLib.Error e) { 36 | errmsg ("Could not load pixmap: %s\n", e.message); 37 | } 38 | 39 | //TODO: Generate this automatically from AUTHORS file. 40 | dlg.artists = null; 41 | dlg.authors = {"Linus Seelinger ", 42 | "Dominique Lasserre "}; 43 | dlg.documenters = null; 44 | dlg.translator_credits = 45 | "Overscore (%s)".printf (_("French")) + "\n" + 46 | "Dominique Lasserre (%s)".printf (_("German")); 47 | 48 | dlg.program_name = Config.PACKAGE_NAME; 49 | dlg.comments = _("Next generation Vala IDE"); 50 | dlg.copyright = _("Copyright © 2012, 2013 Valama development team"); 51 | dlg.version = Config.PACKAGE_VERSION; 52 | 53 | dlg.license_type = License.GPL_3_0; 54 | dlg.wrap_license = true; 55 | 56 | dlg.website = "https://github.com/Valama/valama"; 57 | dlg.website_label = _("Github project page"); 58 | 59 | dlg.response.connect ((response_id) => { 60 | switch (response_id) { 61 | case ResponseType.CANCEL: 62 | case ResponseType.DELETE_EVENT: 63 | dlg.destroy(); 64 | break; 65 | default: 66 | bug_msg (_("Unexpected enum value: %s: %u\n"), 67 | "about_dialog - dlg.response.connect", response_id); 68 | break; 69 | } 70 | }); 71 | 72 | dlg.run(); 73 | } 74 | 75 | // vim: set ai ts=4 sts=4 et sw=4 76 | -------------------------------------------------------------------------------- /tests/testcase.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * tests/testcase.vala 3 | * 4 | * Copyright (C) 2009 Julien Peeters 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | * Author: 21 | * Julien Peeters 22 | */ 23 | 24 | public abstract class TestCase : Object { 25 | 26 | private GLib.TestSuite suite; 27 | private Adaptor[] adaptors = new Adaptor[0]; 28 | 29 | public delegate void TestMethod(); 30 | 31 | public TestCase (string name) { 32 | this.suite = new GLib.TestSuite (name); 33 | } 34 | 35 | public void add_test (string name, owned TestMethod test) { 36 | var adaptor = new Adaptor (name, (owned) test, this); 37 | this.adaptors += adaptor; 38 | 39 | this.suite.add (new GLib.TestCase (adaptor.name, 40 | adaptor.set_up, 41 | adaptor.run, 42 | adaptor.tear_down)); 43 | } 44 | 45 | public virtual void set_up() { 46 | } 47 | 48 | public virtual void tear_down() { 49 | } 50 | 51 | public GLib.TestSuite get_suite() { 52 | return this.suite; 53 | } 54 | 55 | private class Adaptor { 56 | [CCode (notify = false)] 57 | public string name { get; private set; } 58 | private TestMethod test; 59 | private TestCase test_case; 60 | 61 | public Adaptor (string name, 62 | owned TestMethod test, 63 | TestCase test_case) { 64 | this.name = name; 65 | this.test = (owned) test; 66 | this.test_case = test_case; 67 | } 68 | 69 | public void set_up (void* fixture) { 70 | this.test_case.set_up(); 71 | } 72 | 73 | public void run (void* fixture) { 74 | this.test(); 75 | } 76 | 77 | public void tear_down (void* fixture) { 78 | this.test_case.tear_down(); 79 | } 80 | } 81 | } 82 | 83 | // vim: set ai ts=4 sts=4 et sw=4 84 | -------------------------------------------------------------------------------- /src/ui/app_output.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * src/ui/build_output.vala 3 | * Copyright (C) 2013, Valama development team 4 | * 5 | * Valama is free software: you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * Valama is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | * See the GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program. If not, see . 17 | * 18 | */ 19 | 20 | using Gtk; 21 | using GLib; 22 | 23 | public class AppOutput : UiElement { 24 | private TextView textview; 25 | private bool focused; 26 | 27 | public AppOutput() { 28 | focused = false; 29 | 30 | var vbox = new Box (Orientation.VERTICAL, 0); 31 | 32 | var toolbar_title = new Toolbar (); 33 | toolbar_title.get_style_context().add_class (STYLE_CLASS_PRIMARY_TOOLBAR); 34 | var ti_title = new ToolItem(); 35 | var plabel = new Label (_("Application output")); 36 | ti_title.add (plabel); 37 | toolbar_title.add(ti_title); 38 | 39 | var separator_stretch = new SeparatorToolItem(); 40 | separator_stretch.set_expand (true); 41 | separator_stretch.draw = false; 42 | toolbar_title.add (separator_stretch); 43 | 44 | var btn_clear = new Gtk.ToolButton (null, null); 45 | btn_clear.icon_name = "edit-clear-all-symbolic"; 46 | toolbar_title.add (btn_clear); 47 | btn_clear.set_tooltip_text (_("Clear output")); 48 | btn_clear.clicked.connect (() => { 49 | textview.buffer.text = ""; 50 | }); 51 | vbox.pack_start (toolbar_title, false, true); 52 | 53 | textview = new TextView(); 54 | textview.override_font (Pango.FontDescription.from_string ("Monospace 10")); 55 | textview.editable = false; 56 | textview.wrap_mode = WrapMode.NONE; 57 | 58 | var scrw = new ScrolledWindow (null, null); 59 | scrw.add (textview); 60 | vbox.pack_start (scrw, true, true); 61 | 62 | widget = vbox; 63 | widget.show_all(); 64 | 65 | project_builder.notify["app-running"].connect (() => { 66 | if (project_builder.app_running) { 67 | if (!focused) { 68 | focused = true; 69 | widget_main.focus_dock_item (this.dock_item); 70 | } 71 | textview.buffer.text = ""; 72 | } else 73 | focused = false; 74 | }); 75 | project_builder.app_output.connect (show_output); 76 | } 77 | 78 | private inline void show_output (string output) { 79 | textview.buffer.insert_at_cursor (output, -1); 80 | } 81 | 82 | protected override void build() {} 83 | } 84 | 85 | // vim: set ai ts=4 sts=4 et sw=4 86 | -------------------------------------------------------------------------------- /data/templates/elementary/template/src/main.vala: -------------------------------------------------------------------------------- 1 | using Gtk; 2 | 3 | namespace Hello{ 4 | public class Hello : Granite.Application{ 5 | 6 | public Window main_window; 7 | private Gtk.Toolbar toolbar; 8 | private Gtk.Box content; 9 | 10 | construct{ 11 | // the name of your program 12 | program_name = "Hello"; 13 | // the name of the executable, usually the name in lower case 14 | exec_name = "Hello"; 15 | 16 | 17 | app_years = "2014"; 18 | /* the icon for your app. you normally ship it with your project 19 | in the data directory and copy it to the icon directory. 20 | You don't include file endings here 21 | (you can also use one of the default icons as I'm doing here) 22 | */ 23 | app_icon = "hello.png"; 24 | // the .desktop file for your app, also in data directory 25 | app_launcher = "hello.desktop"; 26 | // an unique id which will identify your application 27 | application_id = "org.elementary.hello"; 28 | 29 | // those urls will be shown in the automatically 30 | // generated about dialog 31 | main_url = "https://github.com/august0815/valama"; 32 | bug_url = ""; 33 | help_url = "https://github.com/august0815/valama/issues/new"; 34 | translate_url = "https://github.com/august0815/valama/issues/new"; 35 | 36 | // here you can proudly list your own name and the names of 37 | // those who helped you 38 | about_authors = {""}; 39 | about_documenters = {"Mario Marcec "}; 40 | // if you got an icon or a nice mockup from someone 41 | // you can list him here 42 | about_artists = {"Mario Marcec"}; 43 | // a short comment on the app 44 | about_comments = "A simple Hello to you"; 45 | about_translators = "NOBODY YET"; 46 | // this should be one of : 47 | // http://unstable.valadoc.org/#!api=gtk+-3.0/Gtk.License; 48 | // For elementary GPL3 is the default one, 49 | // it’s a good idea to use it 50 | about_license_type = License.GPL_3_0; 51 | } 52 | 53 | public Hello (){ 54 | Gtk.Settings.get_default ().gtk_application_prefer_dark_theme = true; 55 | } 56 | 57 | public override void activate (){ 58 | if (this.main_window == null) 59 | build_and_run (); 60 | } 61 | 62 | public void build_and_run (){ 63 | this.main_window = new Window (); 64 | this.main_window.set_default_size (320, 75); 65 | this.main_window.set_application (this); 66 | this.main_window.window_position = WindowPosition.CENTER; 67 | Gtk.Box container = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); 68 | 69 | this.toolbar = new Gtk.Toolbar(); 70 | var menu = new Gtk.Menu(); 71 | var appmenu = this.create_appmenu (menu); 72 | this.toolbar.add(appmenu); 73 | container.add(this.toolbar); 74 | 75 | var button = new Button.with_label ("Click me!"); 76 | button.clicked.connect (() => { 77 | button.label = "Thank you"; 78 | }); 79 | 80 | this.content = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); 81 | container.add(content); 82 | container.add(button); 83 | this.main_window.add(container); 84 | this.main_window.show_all (); 85 | } 86 | 87 | } 88 | 89 | } 90 | 91 | public static int main (string [] args){ 92 | Gtk.init (ref args); 93 | var hello = new Hello.Hello (); 94 | return hello.run (args); 95 | } 96 | 97 | -------------------------------------------------------------------------------- /src/ui/welcome_screen/create_project_packages.vala: -------------------------------------------------------------------------------- 1 | using Gtk; 2 | 3 | namespace WelcomeScreen { 4 | protected class CreateProjectPackages : TemplatePageWithHeader { 5 | public CreateProjectPackages (ref ProjectCreationInfo info) 6 | { 7 | this.info = info; 8 | listmodel = new Gtk.ListStore (3, typeof (bool), typeof (string), typeof (string)); 9 | go_to_next_clicked.connect (() => { 10 | var pkgs = new string[0]; 11 | listmodel.foreach((m,p,i) => { 12 | Value v1, v2; 13 | m.get_value(i, 0, out v1); 14 | m.get_value(i, 1, out v2); 15 | if((bool)v1) 16 | pkgs += (string)v2; 17 | return false; 18 | }); 19 | this.info.packages = pkgs; 20 | }); 21 | } 22 | 23 | private ProjectCreationInfo info; 24 | Gtk.ListStore listmodel; 25 | 26 | protected override void clean_up(){} 27 | 28 | 29 | 30 | protected override Gtk.Widget build_inner_widget() { 31 | heading = _("Choose packages"); 32 | description = _("packages for current project"); 33 | 34 | var frame = new Frame (null); 35 | var sw = new ScrolledWindow (null, null); 36 | frame.add (sw); 37 | var tree_view = new TreeView(); 38 | tree_view.set_model (listmodel); 39 | CellRendererToggle toggle = new CellRendererToggle(); 40 | toggle.toggled.connect ((toggle, path) => { 41 | TreePath tree_path = new TreePath.from_string (path); 42 | TreeIter iter; 43 | listmodel.get_iter (out iter, tree_path); 44 | listmodel.set (iter, 0, !toggle.active); 45 | }); 46 | TreeViewColumn column = new TreeViewColumn(); 47 | column.pack_start (toggle, false); 48 | column.add_attribute (toggle, "active", 0); 49 | tree_view.append_column (column); 50 | 51 | CellRendererText text = new CellRendererText(); 52 | column = new TreeViewColumn(); 53 | column.title = "Package"; 54 | column.pack_start (text, true); 55 | column.add_attribute (text, "text", 1); 56 | tree_view.append_column (column); 57 | 58 | CellRendererText desc_text = new CellRendererText(); 59 | column = new TreeViewColumn(); 60 | column.title = "Description"; 61 | column.pack_start (desc_text, true); 62 | column.add_attribute (desc_text, "text", 2); 63 | tree_view.append_column (column); 64 | 65 | var pkg_infos = list_all_pkg_config(); 66 | 67 | pkg_infos.foreach (entry => { 68 | if (info.template.vproject.packages.has_key (entry.key)) 69 | return true; 70 | TreeIter iter; 71 | listmodel.append (out iter); 72 | listmodel.set (iter, 0, false, 1, entry.key, 2, entry.value); 73 | return true; 74 | }); 75 | sw.add (tree_view); 76 | return frame; 77 | } 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /guanako/guanako_refactoring.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * guanako/guanako_refactoring.vala 3 | * Copyright (C) 2013, Valama development team 4 | * 5 | * Valama is free software: you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * Valama is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | * See the GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program. If not, see . 17 | * 18 | */ 19 | using Vala; 20 | 21 | namespace Guanako.Refactoring { 22 | public static Symbol? find_declaration (Project project, SourceFile sf, int line, int col) { 23 | 24 | var smb = project.get_symbol_at_pos(sf, line, col); 25 | if (smb is Vala.Subroutine) { 26 | var sr = smb as Vala.Subroutine; 27 | Vala.Statement st = null; 28 | int old_depth = -1; 29 | Guanako.iter_subroutine (sr, (stmt, depth)=>{ 30 | if (!Guanako.inside_source_ref (sf, line, col, stmt.source_reference)) 31 | return Guanako.IterCallbackReturns.CONTINUE; //TODO: abort here? 32 | if (depth > old_depth) { 33 | old_depth = depth; 34 | st = stmt; 35 | } 36 | return Guanako.IterCallbackReturns.CONTINUE; 37 | }); 38 | if (st != null) { 39 | Vala.Expression expression = null; 40 | old_depth = 0; 41 | Guanako.iter_expressions (st, (expr, depth)=>{ 42 | if (!Guanako.inside_source_ref (sf, line, col, expr.source_reference)) 43 | return Guanako.IterCallbackReturns.CONTINUE; 44 | if (depth >= old_depth) { 45 | old_depth = depth; 46 | expression = expr; 47 | } 48 | return Guanako.IterCallbackReturns.CONTINUE; 49 | }); 50 | if (expression != null) 51 | return expression.symbol_reference; 52 | } 53 | } 54 | return null; 55 | } 56 | public static SourceReference[] find_references (Project project, SourceFile sf, Symbol symbol) { 57 | var ret = new SourceReference[0]; 58 | foreach (SourceFile file in project.sourcefiles) 59 | foreach (CodeNode node in file.get_nodes()) 60 | Guanako.iter_symbol ((Symbol)node, (smb, depth) => { 61 | if (smb is Subroutine) { 62 | //stdout.printf("Checking subroutine:" + smb.name + "\n"); 63 | Guanako.iter_subroutine ((Subroutine)smb, (stmt, depth)=>{ 64 | 65 | Guanako.iter_expressions (stmt, (expr, depth)=>{ 66 | if (expr.symbol_reference == symbol) 67 | if (expr.source_reference != null) 68 | ret += expr.source_reference; 69 | return Guanako.IterCallbackReturns.CONTINUE; 70 | }); 71 | 72 | return Guanako.IterCallbackReturns.CONTINUE; 73 | }); 74 | } 75 | return Guanako.IterCallbackReturns.CONTINUE; 76 | }); 77 | 78 | return ret; 79 | } 80 | } 81 | 82 | // vim: set ai ts=4 sts=4 et sw=4 83 | -------------------------------------------------------------------------------- /tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # tests/CMakeLists.txt 3 | # Copyright (C) 2013, Valama development team 4 | # 5 | # Valama is free software: you can redistribute it and/or modify it 6 | # under the terms of the GNU General Public License as published by the 7 | # Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # Valama is distributed in the hope that it will be useful, but 11 | # WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | # See the GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License along 16 | # with this program. If not, see . 17 | # 18 | 19 | 20 | cmake_minimum_required(VERSION "2.8.4") 21 | 22 | set(extra_srcfiles 23 | "../src/project/package_management.vala" 24 | "../src/project/project_file.vala" 25 | "../src/common/args.vala" 26 | "../src/common/common.vala" 27 | ) 28 | set(required_pkgs 29 | "gee-0.8" 30 | "gio-2.0" 31 | "libxml-2.0" 32 | "guanako" 33 | "posix {nocheck}" 34 | ) 35 | set(vapifiles 36 | "../vapi/config.vapi" 37 | ) 38 | set(datadirs 39 | "projectfile" 40 | ) 41 | 42 | if(GUANAKO) 43 | list(REMOVE_ITEM required_pkgs "guanako") 44 | list(APPEND vapifiles "${CMAKE_BINARY_DIR}/guanako/guanako.vapi") 45 | list(APPEND required_pkgs "libvala-${VALA_SHORTVER}") 46 | endif() 47 | 48 | # Custom library version checks. 49 | set(valac_cond) 50 | find_package(PkgConfig) 51 | # Unix or Windows 52 | if(WIN32) 53 | list(APPEND valac_cond "-D;WIN32") 54 | elseif(UNIX) 55 | list(APPEND valac_cond "-D;UNIX") 56 | else() 57 | list(APPEND valac_cond "-D;NOT_UNIX") 58 | list(APPEND valac_cond "-D;NOT_WIN32") 59 | endif() 60 | # glib-2.0 61 | pkg_check_modules(GLIB2.0 REQUIRED "glib-2.0") 62 | 63 | set(default_vala_flags 64 | "--thread" 65 | "--target-glib" "${GLIB2.0_VERSION}" 66 | "--enable-experimental" 67 | "--fatal-warnings" 68 | ${valac_cond} 69 | ) 70 | 71 | include(ValaPkgs) 72 | vala_pkgs(VALA_C 73 | PACKAGES 74 | ${required_pkgs} 75 | SRCFILES 76 | "*.vala" 77 | ${extra_srcfiles} 78 | VAPIS 79 | ${vapifiles} 80 | OPTIONS 81 | ${default_vala_flags} 82 | ) 83 | 84 | # Set common C-macros. 85 | add_definitions(-DPACKAGE_NAME="${project_name}") 86 | add_definitions(-DPACKAGE_VERSION="${${project_name}_VERSION}") 87 | add_definitions(-DGETTEXT_PACKAGE="${project_name_lower}") 88 | add_definitions(-DPACKAGE_DATA_DIR="${install_prefix}${datadir}") 89 | add_definitions(-DLOCALE_DIR="${install_prefix}${localedir}") 90 | add_definitions(-DPIXMAP_DIR="${install_prefix}${pixdir}") 91 | add_definitions(-DVALA_VERSION="${VALA_SHORTVER}") 92 | 93 | add_executable("tests" ${VALA_C}) 94 | target_link_libraries("tests" ${PROJECT_LDFLAGS}) 95 | add_definitions(${PROJECT_C_FLAGS}) 96 | if(GUANAKO) 97 | include_directories("${PROJECT_BINARY_DIR}/guanako") 98 | target_link_libraries("tests" "guanako") 99 | endif() 100 | add_dependencies("tests" "guanako" "valama") 101 | 102 | copy_dirs( 103 | TARGET 104 | "copy_datafiles" 105 | DIRS 106 | ${datadirs} 107 | ) 108 | 109 | add_custom_command( 110 | OUTPUT 111 | "tests.stamp" 112 | COMMAND 113 | "tests" 114 | COMMAND 115 | "${CMAKE_COMMAND}" -E touch "tests.stamp" 116 | DEPENDS 117 | "tests" 118 | "copy_datafiles" 119 | COMMENT 120 | "Run tests" 121 | VERBATIM 122 | ) 123 | 124 | add_custom_target("run_tests" 125 | ALL 126 | DEPENDS 127 | "tests.stamp" 128 | ) 129 | 130 | # enable_testing() 131 | # add_test( 132 | # NAME 133 | # "Run\\ all\\ tests" 134 | # COMMAND 135 | # "tests" 136 | # ) 137 | 138 | # vim: set ai ts=2 sts=2 et sw=2 139 | -------------------------------------------------------------------------------- /src/common/args.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * src/common/args.vala 3 | * Copyright (C) 2013, Valama development team 4 | * 5 | * Valama is free software: you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * Valama is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | * See the GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program. If not, see . 17 | * 18 | */ 19 | 20 | using GLib; 21 | 22 | namespace Args { 23 | public bool version = false; 24 | public string? syntaxfile = null; 25 | [CCode (array_length = false, array_null_terminated = true)] 26 | public string[]? templatesdirs = null; 27 | [CCode (array_length = false, array_null_terminated = true)] 28 | public string[]? buildsystemsdirs = null; 29 | public int debuglevel = 0; 30 | public bool forceold = false; 31 | public string? layoutfile = null; 32 | public bool reset_layout = false; 33 | [CCode (array_length = false, array_null_terminated = true)] 34 | public string[]? projectfiles = null; 35 | 36 | private const OptionEntry[] options = { 37 | {"version", 'v', 0, OptionArg.NONE, ref version, N_("Display version number."), null}, 38 | {"syntax", 0, 0, OptionArg.FILENAME, ref syntaxfile, N_("Guanako syntax file."), N_("FILE")}, 39 | {"templates", 0, 0, OptionArg.FILENAME_ARRAY, ref templatesdirs, N_("Templates directory."), 40 | // TRANSLATORS: Uppercase for variables in command line options. 41 | N_("DIRECTORY")}, 42 | {"buildsystems", 0, 0, OptionArg.FILENAME_ARRAY, ref buildsystemsdirs, N_("Build systems directory."), N_("DIRECTORY")}, 43 | {"debug", 'd', OptionFlags.OPTIONAL_ARG, OptionArg.CALLBACK, (void*) debuglevel_parse, N_("Output debug information."), N_("[DEBUGLEVEL]")}, 44 | {"force-old", 0, 0, OptionArg.NONE, ref forceold, N_("Force loading of possibly incompatible template or project files."), null}, 45 | {"layout", 0, 0, OptionArg.FILENAME, ref layoutfile, N_("Path to layout file."), N_("FILE")}, 46 | {"reset-layout", 0, 0, OptionArg.NONE, ref reset_layout, N_("Load default layout."), null}, 47 | {"", 0, 0, OptionArg.FILENAME_ARRAY, ref projectfiles, N_("Load project from file."), N_("[FILE...]")}, 48 | {null} 49 | }; 50 | 51 | public int parse (string[] args) { 52 | int ret = 0; 53 | 54 | var opt_context = new OptionContext (_("- Valama: next generation Vala IDE")); 55 | opt_context.set_help_enabled (true); 56 | opt_context.add_main_entries (options, null); 57 | try { 58 | opt_context.parse (ref args); 59 | } catch (OptionError e) { 60 | errmsg (_("Error: %s\n"), e.message); 61 | errmsg (_("Run '%s --help' to see a full list of available command line options.\n"), args[0]); 62 | return 1; 63 | } 64 | 65 | if (version) { 66 | msg ("%s: %s\n", Config.PACKAGE_NAME, Config.PACKAGE_VERSION); 67 | ret = -1; 68 | } 69 | 70 | return ret; 71 | } 72 | 73 | internal bool debuglevel_parse (string name, string? val, ref OptionError error) throws OptionError { 74 | if (val == null) { 75 | debuglevel = 1; 76 | return true; 77 | } 78 | var re = /^[+]?[0-9]+$/; 79 | if (!re.match (val, 0, null)) 80 | throw new OptionError.BAD_VALUE (_("'%s' not a positive number"), val); 81 | debuglevel = int.parse (val); 82 | return true; 83 | } 84 | } 85 | 86 | // vim: set ai ts=4 sts=4 et sw=4 87 | -------------------------------------------------------------------------------- /guanako/data/guanako.lang: -------------------------------------------------------------------------------- 1 | 2 | 22 | 23 | 24 | # 25 | 26 | 27 |