[anjuta] project-wizard: gtkmm - Update to 3.0 and add option to build without Gtk::Builder
- From: Johannes Schmid <jhs src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta] project-wizard: gtkmm - Update to 3.0 and add option to build without Gtk::Builder
- Date: Thu, 9 Dec 2010 22:41:10 +0000 (UTC)
commit 745fd2ef58f7b1a29884f1a10f46db9787d81dc0
Author: Johannes Schmid <jhs gnome org>
Date: Thu Dec 9 23:40:40 2010 +0100
project-wizard: gtkmm - Update to 3.0 and add option to build without Gtk::Builder
plugins/project-wizard/templates/Makefile.am | 1 -
plugins/project-wizard/templates/gtkmm-logo.png | Bin 4427 -> 0 bytes
plugins/project-wizard/templates/gtkmm.wiz.in | 15 +++++++++------
.../project-wizard/templates/gtkmm/po/POTFILES.in | 8 ++++----
plugins/project-wizard/templates/gtkmm/src/main.cc | 10 +++++++++-
5 files changed, 22 insertions(+), 12 deletions(-)
---
diff --git a/plugins/project-wizard/templates/Makefile.am b/plugins/project-wizard/templates/Makefile.am
index 3035dc8..51ab8ff 100644
--- a/plugins/project-wizard/templates/Makefile.am
+++ b/plugins/project-wizard/templates/Makefile.am
@@ -34,7 +34,6 @@ wizard_files_DATA = \
gtk-logo.png \
anjuta-plugin-logo.png \
gnome-logo.png \
- gtkmm-logo.png \
wxwin-logo.png \
xlib-logo.png \
gcj-logo.png \
diff --git a/plugins/project-wizard/templates/gtkmm.wiz.in b/plugins/project-wizard/templates/gtkmm.wiz.in
index 9f325a7..415108d 100644
--- a/plugins/project-wizard/templates/gtkmm.wiz.in
+++ b/plugins/project-wizard/templates/gtkmm.wiz.in
@@ -1,13 +1,13 @@
<project-template>
<project-wizard>
- <_name>GTKmm</_name>
- <_description>A generic GTKmm (C++) project</_description>
- <icon>gtkmm-logo.png</icon>
+ <_name>GTKmm (Simple)</_name>
+ <_description>A minimal GTKmm project</_description>
+ <icon>gtk-logo.png</icon>
<category>C++</category>
<required-program>automake</required-program>
<required-program>autoconf</required-program>
<required-program>make</required-program>
- <required-package>gtkmm-2.4 >= 2.16</required-package>
+ <required-package>gtkmm-3.0</required-package>
</project-wizard>
<page name="basic" _label="Basic information" _description="General Project Information">
@@ -31,11 +31,12 @@
<property type="hidden" name="NameCLower" default='[+(string->c-name! (string-substitute (string-downcase (get "Name")) " " "_"))+]'/>
<property type="hidden" name="NameHLower" default='[+(string-substitute (string->c-name! (string-downcase (get "Name"))) " " "-")+]'/>
<property type="hidden" name="HavePackage" default="1"/>
- <property type="hidden" name="PackageModule1" default="gtkmm-2.4 >= 2.12"/>
+ <property type="hidden" name="PackageModule1" default="gtkmm-3.0"/>
<property type="boolean" name="HaveI18n" _label="Add internationalization:" _description="Adds support for internationalization so that your project can have translations in different languages" default="1"/>
<property type="boolean" name="HaveSharedlib" _label="Add shared library support:" _description="Adds support for building shared libraries in your project" default="1"/>
- <property type="boolean" name="HaveGtkDoc" _label="Add gtk-doc system:" _description="gtk-doc is used to compile API documentations for GObject based classes" default="0"/>
+ <property type="hidden" name="HaveGtkDoc" _label="Add gtk-doc system:" _description="gtk-doc is used to compile API documentations for GObject based classes" default="0"/>
<property type="boolean" name="HavePackageExtra" _label="Configure external packages:" _description="Use pkg-config to add library support from other packages" default="0"/>
+ <property type="boolean" name="HaveBuilderUI" _label="Use GtkBuilder for user interface:" _description="Use GtkBuilder to create the user-interface in a graphical way and load it from xml files at runtime" default="1"/>
</page>
[+IF (=(get "HavePackageExtra") "1")+]
@@ -66,7 +67,9 @@
<directory source="gtkmm" destination="[+Destination+]">
<directory source="src">
<file source="main.cc"/>
+ [+IF (=(get "HaveBuilderUI") "1")+]
<file source="project.ui" destination="[+NameHLower+].ui"/>
+ [+ENDIF+]
<file source="Makefile.am.tpl" destination="Makefile.am"/>
</directory>
</directory>
diff --git a/plugins/project-wizard/templates/gtkmm/po/POTFILES.in b/plugins/project-wizard/templates/gtkmm/po/POTFILES.in
index 41ad205..08ad009 100644
--- a/plugins/project-wizard/templates/gtkmm/po/POTFILES.in
+++ b/plugins/project-wizard/templates/gtkmm/po/POTFILES.in
@@ -1,6 +1,6 @@
[+ autogen5 template +]
# List of source files containing translatable strings.
-
-src/main.c
-src/callbacks.c
-src/callbacks.h
+src/main.cc
+[+IF (=(get "HaveBuilderUI") "1")+]
+[type: gettext/glade]src/[+NameHLower+].ui
+[+ENDIF+]
diff --git a/plugins/project-wizard/templates/gtkmm/src/main.cc b/plugins/project-wizard/templates/gtkmm/src/main.cc
index 0b23cb3..79d9eae 100644
--- a/plugins/project-wizard/templates/gtkmm/src/main.cc
+++ b/plugins/project-wizard/templates/gtkmm/src/main.cc
@@ -19,15 +19,18 @@
#endif
[+ENDIF+]
+[+IF (=(get "HaveBuilderUI") "1")+]
/* For testing propose use the local (not installed) ui file */
/* #define UI_FILE PACKAGE_DATA_DIR"/[+NameHLower+]/ui/[+NameHLower+].ui" */
#define UI_FILE "src/[+NameHLower+].ui"
+[+ENDIF+]
int
main (int argc, char *argv[])
{
Gtk::Main kit(argc, argv);
-
+
+[+IF (=(get "HaveBuilderUI") "1")+]
//Load the Glade file and instiate its widgets:
Glib::RefPtr<Gtk::Builder> builder;
try
@@ -41,6 +44,11 @@ main (int argc, char *argv[])
}
Gtk::Window* main_win = 0;
builder->get_widget("main_window", main_win);
+[+ELSE+]
+ Gtk::Window* main_win = new Gtk::Window (Gtk::WINDOW_TOPLEVEL);
+ main_win->set_title ("[+Name+]");
+[+ENDIF+]
+
if (main_win)
{
kit.run(*main_win);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]