GNOME Bugzilla – Bug 769564
autotools-templates: Add i18n to GNOME application template
Last modified: 2016-11-16 07:11:31 UTC
See the commit message.
Created attachment 332813 [details] [review] autotools-templates: Add a GNOME application template This commit adds a template for GNOME applications. It's similar to the Empty Project template but it comes with a main function that creates an empty window, and it includes a flatpak manifest. Hopefully it will help newcomers get started on their first project. In the future we should probably add internationalization, gtk-doc, and GSettings code to the template, possibly as optional components. The flatpak manifest works when used with flatpak-builder but building the template in a flatpak runtime from within Builder doesn't seem to work yet.
Review of attachment 332813 [details] [review]: Excellent! Just a few small nits. ::: plugins/autotools-templates/autotools_templates/resources/ManifestTemplate.flatpak.json @@ +29,3 @@ + { + "type": "git", + "url": "file://{{project_path}}" Not really ideal, but I can't think of a better solution right now either. ::: plugins/autotools-templates/autotools_templates/resources/src/main.c @@ +1,1 @@ +#include <gtk/gtk.h> Add {{include "license.c"}} at the top here to get the standard header for C. (Sorry it's not very obvious). @@ +18,3 @@ +} + +int main(int argc, char *argv[]) int main (int argc, char *argv[]) @@ +20,3 @@ +int main(int argc, char *argv[]) +{ + GtkApplication *app; Let's use g_autoptr(GtkApplication) app = NULL and drop the unref. I very much want to get people in the habit of using autoptr since MSVC portability is not really much of a concern to us. ::: plugins/autotools-templates/autotools_templates/resources/src/main.cpp @@ +1,1 @@ +#include <gtkmm.h> {{include "license.cpp"}} ::: plugins/autotools-templates/autotools_templates/resources/src/main.vala @@ +1,1 @@ +using Gtk; {{include "license.vala"}}
Created attachment 332816 [details] [review] autotools-templates: Add a GNOME application template This commit adds a template for GNOME applications. It's similar to the Empty Project template but it comes with a main function that creates an empty window, and it includes a flatpak manifest. Hopefully it will help newcomers get started on their first project. In the future we should probably add internationalization, gtk-doc, and GSettings code to the template, possibly as optional components. The flatpak manifest works when used with flatpak-builder but building the template in a flatpak runtime from within Builder doesn't seem to work yet.
Pushed as commit 82c47cda95fc48c4b15037db9600048939ecd335, but perhaps we should leave this issue open until we add internationalization, etc.
(In reply to Matthew Leeds from comment #4) > Pushed as commit 82c47cda95fc48c4b15037db9600048939ecd335, but perhaps we > should leave this issue open until we add internationalization, etc. Makes sense. Thanks again!