[Esbox-commits] r106 - in trunk/org.indt.esbox.ui/templates: .
HildonGUIApplication MaemoPad MaemoPad/data MaemoPad/debian
MaemoPad/po MaemoPad/src MaemoPad/src/ui
raul at garage.maemo.org
raul at garage.maemo.org
Mon Oct 8 23:40:12 EEST 2007
Author: raul
Date: 2007-10-08 23:40:11 +0300 (Mon, 08 Oct 2007)
New Revision: 106
Added:
trunk/org.indt.esbox.ui/templates/MaemoPad/
trunk/org.indt.esbox.ui/templates/MaemoPad/COPYING
trunk/org.indt.esbox.ui/templates/MaemoPad/Makefile.am
trunk/org.indt.esbox.ui/templates/MaemoPad/autogen.sh
trunk/org.indt.esbox.ui/templates/MaemoPad/configure.ac
trunk/org.indt.esbox.ui/templates/MaemoPad/data/
trunk/org.indt.esbox.ui/templates/MaemoPad/data/Makefile.am
trunk/org.indt.esbox.ui/templates/MaemoPad/data/PACKAGE.desktop.in
trunk/org.indt.esbox.ui/templates/MaemoPad/data/com.nokia.PACKAGE.service.in
trunk/org.indt.esbox.ui/templates/MaemoPad/debian/
trunk/org.indt.esbox.ui/templates/MaemoPad/debian/changelog
trunk/org.indt.esbox.ui/templates/MaemoPad/debian/control
trunk/org.indt.esbox.ui/templates/MaemoPad/debian/copyright
trunk/org.indt.esbox.ui/templates/MaemoPad/debian/postinst
trunk/org.indt.esbox.ui/templates/MaemoPad/debian/rules.in
trunk/org.indt.esbox.ui/templates/MaemoPad/po/
trunk/org.indt.esbox.ui/templates/MaemoPad/po/ChangeLog
trunk/org.indt.esbox.ui/templates/MaemoPad/po/Makefile.am
trunk/org.indt.esbox.ui/templates/MaemoPad/po/Makefile.in.in
trunk/org.indt.esbox.ui/templates/MaemoPad/po/POTFILES.in
trunk/org.indt.esbox.ui/templates/MaemoPad/po/en_GB.po
trunk/org.indt.esbox.ui/templates/MaemoPad/po/porules.mk.in
trunk/org.indt.esbox.ui/templates/MaemoPad/src/
trunk/org.indt.esbox.ui/templates/MaemoPad/src/Makefile.am
trunk/org.indt.esbox.ui/templates/MaemoPad/src/appdata.h
trunk/org.indt.esbox.ui/templates/MaemoPad/src/main.c
trunk/org.indt.esbox.ui/templates/MaemoPad/src/ui/
trunk/org.indt.esbox.ui/templates/MaemoPad/src/ui/callbacks.c
trunk/org.indt.esbox.ui/templates/MaemoPad/src/ui/callbacks.h
trunk/org.indt.esbox.ui/templates/MaemoPad/src/ui/interface.c
trunk/org.indt.esbox.ui/templates/MaemoPad/src/ui/interface.h
trunk/org.indt.esbox.ui/templates/MaemoPad/template.properties
trunk/org.indt.esbox.ui/templates/MaemoPad/template.xml
Modified:
trunk/org.indt.esbox.ui/templates/HildonGUIApplication/Makefile.am
Log:
new templates added.
Modified: trunk/org.indt.esbox.ui/templates/HildonGUIApplication/Makefile.am
===================================================================
--- trunk/org.indt.esbox.ui/templates/HildonGUIApplication/Makefile.am 2007-10-07 22:25:02 UTC (rev 105)
+++ trunk/org.indt.esbox.ui/templates/HildonGUIApplication/Makefile.am 2007-10-08 20:40:11 UTC (rev 106)
@@ -21,12 +21,12 @@
# /Binary
# Sources
-%PACKAGE_SOURCES = \
+$(packageName)_SOURCES = \
src/main.c
# /Sources
# LDADD
-%PACKAGE_LDADD = \
+$(packageName)_LDADD = \
$(DEPS_LIBS) $(HILDON_LIBS) $(OSSO_LIBS) $(HILDONFM_LIBS)
# /LDADD
Added: trunk/org.indt.esbox.ui/templates/MaemoPad/COPYING
===================================================================
--- trunk/org.indt.esbox.ui/templates/MaemoPad/COPYING (rev 0)
+++ trunk/org.indt.esbox.ui/templates/MaemoPad/COPYING 2007-10-08 20:40:11 UTC (rev 106)
@@ -0,0 +1,447 @@
+GNU LESSER GENERAL PUBLIC LICENSE
+Version 2.1, February 1999
+
+
+Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Everyone is permitted to copy and distribute verbatim copies
+of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+as the successor of the GNU Library Public License, version 2, hence
+the version number 2.1.]
+
+Preamble
+The licenses for most software are designed to take away your freedom
+to share and change it. By contrast, the GNU General Public Licenses
+are intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.
+
+This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations
+below.
+
+When we speak of free software, we are referring to freedom of use, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish); that you receive source code or can get it
+if you want it; that you can change the software and use pieces of it
+in new free programs; and that you are informed that you can do these
+things.
+
+To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+For example, if you distribute copies of the library, whether gratis or
+for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+To protect each distributor, we want to make it very clear that there
+is no warranty for the free library. Also, if the library is modified
+by someone else and passed on, the recipients should know that what
+they have is not the original version, so that the original author's
+reputation will not be affected by problems that might be introduced by
+others.
+
+Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that any
+patent license obtained for a version of the library must be consistent
+with the full freedom of use specified in this license.
+
+Most GNU software, including some libraries, is covered by the ordinary
+GNU General Public License. This license, the GNU Lesser General Public
+License, applies to certain designated libraries, and is quite
+different from the ordinary General Public License. We use this license
+for certain libraries in order to permit linking those libraries into
+non-free programs.
+
+When a program is linked with a library, whether statically or using a
+shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less of
+an advantage over competing non-free programs. These disadvantages are
+the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it
+becomes a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free library
+does the same job as widely used non-free libraries. In this case,
+there is little to gain by limiting the free library to free software
+only, so we use the Lesser General Public License.
+
+In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of free
+software. For example, permission to use the GNU C Library in non-free
+programs enables many more people to use the whole GNU operating
+system, as well as its variant, the GNU/Linux operating system.
+
+Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run that
+program using a modified version of the Library.
+
+The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+
+TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or other
+authorized party saying it may be distributed under the terms of this
+Lesser General Public License (also called "this License"). Each
+licensee is addressed as "you".
+
+A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+The "Library", below, refers to any such software library or work which
+has been distributed under these terms. A "work based on the Library"
+means either the Library or any derivative work under copyright law:
+that is to say, a work containing the Library or a portion of it,
+either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+"Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control
+compilation and installation of the library.
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of running
+a program using the Library is not restricted, and output from such a
+program is covered only if its contents constitute a work based on the
+Library (independent of the use of the Library in a tool for writing
+it). Whether that is true depends on what the Library does and what the
+program that uses the Library does.
+
+1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and distribute a copy of this License along with the Library.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+2. You may modify your copy or copies of the Library or any portion of
+it, thus forming a work based on the Library, and copy and distribute
+such modifications or work under the terms of Section 1 above, provided
+that you also meet all of these conditions:
+
+
+a) The modified work must itself be a software library.
+b) You must cause the files modified to carry prominent notices stating
+that you changed the files and the date of any change.
+c) You must cause the whole of the work to be licensed at no charge to
+all third parties under the terms of this License.
+d) If a facility in the modified Library refers to a function or a
+table of data to be supplied by an application program that uses the
+facility, other than as an argument passed when the facility is
+invoked, then you must make a good faith effort to ensure that, in the
+event an application does not supply such function or table, the
+facility still operates, and performs whatever part of its purpose
+remains meaningful.
+(For example, a function in a library to compute square roots has a
+purpose that is entirely well-defined independent of the application.
+Therefore, Subsection 2d requires that any application-supplied
+function or table used by this function must be optional: if the
+application does not supply it, the square root function must still
+compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of a
+storage or distribution medium does not bring the other work under the
+scope of this License.
+
+3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+Once this change is made in a given copy, it is irreversible for that
+copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+This option is useful when you wish to copy part of the code of the
+Library into a program that is not a library.
+
+4. You may copy and distribute the Library (or a portion or derivative
+of it, under Section 2) in object code or executable form under the
+terms of Sections 1 and 2 above provided that you accompany it with the
+complete corresponding machine-readable source code, which must be
+distributed under the terms of Sections 1 and 2 above on a medium
+customarily used for software interchange.
+
+If distribution of object code is made by offering access to copy from
+a designated place, then offering equivalent access to copy the source
+code from the same place satisfies the requirement to distribute the
+source code, even though third parties are not compelled to copy the
+source along with the object code.
+
+5. A program that contains no derivative of any portion of the Library,
+but is designed to work with the Library by being compiled or linked
+with it, is called a "work that uses the Library". Such a work, in
+isolation, is not a derivative work of the Library, and therefore falls
+outside the scope of this License.
+
+However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License. Section
+6 states terms for distribution of such executables.
+
+When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+If such an object file uses only numerical parameters, data structure
+layouts and accessors, and small macros and small inline functions (ten
+lines or less in length), then the use of the object file is
+unrestricted, regardless of whether it is legally a derivative work.
+(Executables containing this object code plus portions of the Library
+will still fall under Section 6.)
+
+Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6, whether
+or not they are linked directly with the Library itself.
+
+6. As an exception to the Sections above, you may also combine or link
+a "work that uses the Library" with the Library to produce a work
+containing portions of the Library, and distribute that work under
+terms of your choice, provided that the terms permit modification of
+the work for the customer's own use and reverse engineering for
+debugging such modifications.
+
+You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+
+a) Accompany the work with the complete corresponding machine-readable
+source code for the Library including whatever changes were used in the
+work (which must be distributed under Sections 1 and 2 above); and, if
+the work is an executable linked with the Library, with the complete
+machine-readable "work that uses the Library", as object code and/or
+source code, so that the user can modify the Library and then relink to
+produce a modified executable containing the modified Library. (It is
+understood that the user who changes the contents of definitions files
+in the Library will not necessarily be able to recompile the
+application to use the modified definitions.)
+b) Use a suitable shared library mechanism for linking with the
+Library. A suitable mechanism is one that (1) uses at run time a copy
+of the library already present on the user's computer system, rather
+than copying library functions into the executable, and (2) will
+operate properly with a modified version of the library, if the user
+installs one, as long as the modified version is interface-compatible
+with the version that the work was made with.
+c) Accompany the work with a written offer, valid for at least three
+years, to give the same user the materials specified in Subsection 6a,
+above, for a charge no more than the cost of performing this
+distribution.
+d) If distribution of the work is made by offering access to copy from
+a designated place, offer equivalent access to copy the above specified
+materials from the same place.
+e) Verify that the user has already received a copy of these materials
+or that you have already sent this user a copy.
+For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies the
+executable.
+
+It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise permitted,
+and provided that you do these two things:
+
+
+a) Accompany the combined library with a copy of the same work based on
+the Library, uncombined with any other library facilities. This must be
+distributed under the terms of the Sections above.
+b) Give prominent notice with the combined library of the fact that
+part of it is a work based on the Library, and explaining where to find
+the accompanying uncombined form of the same work.
+8. You may not copy, modify, sublicense, link with, or distribute the
+Library except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense, link with, or distribute the
+Library is void, and will automatically terminate your rights under
+this License. However, parties who have received copies, or rights,
+from you under this License will not have their licenses terminated so
+long as such parties remain in full compliance.
+
+9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying the
+Library or works based on it.
+
+10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent license
+would not permit royalty-free redistribution of the Library by all
+those who receive copies directly or indirectly through you, then the
+only way you could satisfy both it and this License would be to refrain
+entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply, and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is implemented
+by public license practices. Many people have made generous
+contributions to the wide range of software distributed through that
+system in reliance on consistent application of that system; it is up
+to the author/donor to decide if he or she is willing to distribute
+software through any other system and a licensee cannot impose that
+choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may
+add an explicit geographical distribution limitation excluding those
+countries, so that distribution is permitted only in or among countries
+not thus excluded. In such case, this License incorporates the
+limitation as if written in the body of this License.
+
+13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time. Such
+new versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a license
+version number, you may choose any version ever published by the Free
+Software Foundation.
+
+14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free Software
+Foundation; we sometimes make exceptions for this. Our decision will be
+guided by the two goals of preserving the free status of all
+derivatives of our free software and of promoting the sharing and reuse
+of software generally.
+
+NO WARRANTY
+
+15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND,
+EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
+ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH
+YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
+NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+
+END OF TERMS AND CONDITIONS
\ No newline at end of file
Added: trunk/org.indt.esbox.ui/templates/MaemoPad/Makefile.am
===================================================================
--- trunk/org.indt.esbox.ui/templates/MaemoPad/Makefile.am (rev 0)
+++ trunk/org.indt.esbox.ui/templates/MaemoPad/Makefile.am 2007-10-08 20:40:11 UTC (rev 106)
@@ -0,0 +1,53 @@
+# Copyright (c) 2003 Nokia Oyj
+EXTRA_DIST = \
+ autogen.sh \
+ intltool-extract.in \
+ intltool-merge.in \
+ intltool-update.in \
+ debian/postinst \
+ debian/copyright \
+ debian/control \
+ debian/rules \
+ debian/changelog
+
+SUBDIRS = src data po
+
+.PHONY: po
+#po:
+# $(MAKE) -C po
+
+
+INCLUDES = $(DEPS_CFLAGS) $(HILDON_CFLAGS) $(OSSO_CFLAGS) $(HILDONFM_CFLAGS)
+
+all: po
+
+CATALOGS = @CATALOGS@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+
+po/$(GETTEXT_PACKAGE).pot:
+ make -C po `pwd`/po/$(GETTEXT_PACKAGE).pot
+# pot-file won't be generated, if there are no messages to be translated.
+# This will get us into troubles.
+
+po/%.po: po/$(GETTEXT_PACKAGE).pot
+ if [ ! -f $@ ]; \
+ then \
+ cp $< $@; \
+ fi
+
+.PHONY: po
+# $(addprefix po/,$CATALOGS)
+
+po: $(subst $(CATOBJEXT),.po,$(addprefix po/,$(CATALOGS)))
+ $(MAKE) -C po update-po
+
+
+debian/rules: debian/rules.in
+ sed "s/^ALL_LINGUAS.*$$/ALL_LINGUAS=@ALL_LINGUAS@/" debian/rules.in > debian/rules
+ sed -i "s/^package=.*$$/package=@PACKAGE_NAME@/" debian/rules
+
+deb: dist
+ -mkdir $(top_builddir)/debian-build
+ cd $(top_builddir)/debian-build && tar zxf ../$(top_builddir)/$(PACKAGE)-$(VERSION).tar.gz
+ cd $(top_builddir)/debian-build/$(PACKAGE)-$(VERSION) && dpkg-buildpackage -rfakeroot
+ rm -rf $(top_builddir)/debian-build/$(PACKAGE)-$(VERSION)
Added: trunk/org.indt.esbox.ui/templates/MaemoPad/autogen.sh
===================================================================
--- trunk/org.indt.esbox.ui/templates/MaemoPad/autogen.sh (rev 0)
+++ trunk/org.indt.esbox.ui/templates/MaemoPad/autogen.sh 2007-10-08 20:40:11 UTC (rev 106)
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -x
+glib-gettextize --copy -f
+libtoolize --automake
+intltoolize --copy --force --automake
+aclocal-1.8
+autoconf
+autoheader
+automake-1.8 --add-missing --foreign
+./configure
Added: trunk/org.indt.esbox.ui/templates/MaemoPad/configure.ac
===================================================================
--- trunk/org.indt.esbox.ui/templates/MaemoPad/configure.ac (rev 0)
+++ trunk/org.indt.esbox.ui/templates/MaemoPad/configure.ac 2007-10-08 20:40:11 UTC (rev 106)
@@ -0,0 +1,71 @@
+dnl Process this file with autoconf to produce a configure script.
+
+AC_INIT(Makefile.am)
+AM_CONFIG_HEADER(config.h)
+
+PACKAGE=$(packageName)
+VERSION=$(version)
+
+AM_INIT_AUTOMAKE($PACKAGE,$VERSION)
+
+AC_PROG_CC
+AC_STDC_HEADERS
+AC_PROG_INSTALL
+dnl AC_PREFIX_DEFAULT(/var/lib/install/usr)
+AC_PREFIX_DEFAULT(/usr)
+
+CFLAGS="$CFLAGS -Wall -ansi -pedantic -Wmissing-prototypes -Wmissing-declarations"
+
+PKG_CHECK_MODULES(DEPS, gtk+-2.0 >= 2.2 glib-2.0 >= 2.2)
+AC_SUBST(DEPS_CFLAGS)
+AC_SUBST(DEPS_LIBS)
+
+PKG_CHECK_MODULES(HILDON, hildon-libs >= 0.8.4)
+AC_SUBST(HILDON_LIBS)
+AC_SUBST(HILDON_CFLAGS)
+
+PKG_CHECK_MODULES(OSSO, libosso >= 0.8.4 gnome-vfs-2.0 >= 2.2 libossohelp)
+AC_SUBST(OSSO_LIBS)
+AC_SUBST(OSSO_CFLAGS)
+
+PKG_CHECK_MODULES(HILDONFM, hildon-fm >= 0.8.4)
+AC_SUBST(HILDONFM_LIBS)
+AC_SUBST(HILDONFM_CFLAGS)
+
+
+PKG_CHECK_MODULES(OSSOSETTINGS, osso-af-settings >= 0.8.4)
+
+localedir=`$PKG_CONFIG osso-af-settings --variable=localedir`
+hildondesktopentrydir=/usr/share/dbus-1/services
+hildoncpdesktopentrydir=/usr/
+hildonstatusbarplugindir=`$PKG_CONFIG hildon-status-bar-lib --variable=pluginlibdir`
+hildoncplibdir=`$PKG_CONFIG hildon-control-panel --variable=pluginlibdir`
+hildoniconthemedir=$HOME/.icons/hicolor
+
+# Localization-related
+AC_PROG_INTLTOOL([0.23])
+GETTEXT_PACKAGE=$(packageName)
+AC_SUBST( GETTEXT_PACKAGE )
+AC_DEFINE_UNQUOTED( GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Name of gettext package ])
+ALL_LINGUAS="en_GB en_US"
+AC_SUBST(ALL_LINGUAS)
+AM_GLIB_GNU_GETTEXT
+
+
+AC_SUBST(localedir)
+AC_DEFINE_UNQUOTED(localedir,"$localedir",[localedir])
+AC_SUBST(desktopentrydir)
+AC_SUBST(hildondesktopentrydir)
+AC_SUBST(hildoncpdesktopentrydir)
+AC_SUBST(hildonstatusbarplugindir)
+AC_SUBST(hildoncplibdir)
+AC_SUBST(hildoniconthemedir)
+
+AC_OUTPUT([
+ Makefile
+ data/Makefile
+ src/Makefile
+ po/Makefile.in
+ data/com.nokia.$(packageName).service
+ data/$(packageName).desktop
+])
Added: trunk/org.indt.esbox.ui/templates/MaemoPad/data/Makefile.am
===================================================================
--- trunk/org.indt.esbox.ui/templates/MaemoPad/data/Makefile.am (rev 0)
+++ trunk/org.indt.esbox.ui/templates/MaemoPad/data/Makefile.am 2007-10-08 20:40:11 UTC (rev 106)
@@ -0,0 +1,23 @@
+# This software is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public License
+# as published by the Free Software Foundation; either version 2.1 of
+# the License, or (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this software; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+# 02110-1301 USA
+#
+
+dbusdir=$(datadir)/dbus-1/services
+dbus_DATA=com.nokia.$(packageName).service
+
+desktopdir=$(datadir)/applications/hildon
+desktop_DATA = $(packageName).desktop
+
+EXTRA_DIST = $(dbus_DATA) $(desktop_DATA)
Added: trunk/org.indt.esbox.ui/templates/MaemoPad/data/PACKAGE.desktop.in
===================================================================
--- trunk/org.indt.esbox.ui/templates/MaemoPad/data/PACKAGE.desktop.in (rev 0)
+++ trunk/org.indt.esbox.ui/templates/MaemoPad/data/PACKAGE.desktop.in 2007-10-08 20:40:11 UTC (rev 106)
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Name=%PACKAGE
+Exec=@prefix@/bin/$(packageName)
+Icon=qgn_list_documents
+X-Window-Icon=maemopad-window
+X-Window-Icon-Dimmed=maemopad-window-dimmed
+X-Osso-Service=maemopad
+X-Osso-Type=application/x-executable
Added: trunk/org.indt.esbox.ui/templates/MaemoPad/data/com.nokia.PACKAGE.service.in
===================================================================
--- trunk/org.indt.esbox.ui/templates/MaemoPad/data/com.nokia.PACKAGE.service.in (rev 0)
+++ trunk/org.indt.esbox.ui/templates/MaemoPad/data/com.nokia.PACKAGE.service.in 2007-10-08 20:40:11 UTC (rev 106)
@@ -0,0 +1,3 @@
+[D-BUS Service]
+Name=com.nokia.$(packageName)
+Exec=@prefix@/bin/$(packageName)
Added: trunk/org.indt.esbox.ui/templates/MaemoPad/debian/changelog
===================================================================
--- trunk/org.indt.esbox.ui/templates/MaemoPad/debian/changelog (rev 0)
+++ trunk/org.indt.esbox.ui/templates/MaemoPad/debian/changelog 2007-10-08 20:40:11 UTC (rev 106)
@@ -0,0 +1,5 @@
+maemopad (1.1) unstable; urgency=low
+
+ * Updated version number
+
+ -- Nokia <Nokia> Sun, 20 Mar 2005 14:30:34 +0200
Added: trunk/org.indt.esbox.ui/templates/MaemoPad/debian/control
===================================================================
--- trunk/org.indt.esbox.ui/templates/MaemoPad/debian/control (rev 0)
+++ trunk/org.indt.esbox.ui/templates/MaemoPad/debian/control 2007-10-08 20:40:11 UTC (rev 106)
@@ -0,0 +1,12 @@
+Source: $(packageName)
+Section: user/other
+Priority: optional
+Maintainer: $(author) $(authorEmail)
+Build-Depends: debhelper (>= 4.0.0), intltool, hildon-base-lib-dev, hildon-libs-dev, hildon-fm-dev,
+ libgtk2.0-dev, libosso-gnomevfs2-dev, libglib2.0-dev, libdbus-glib-1-dev, libosso-dev
+Standards-Version: 3.6.0
+
+Package: $(packageName)
+Architecture: any
+#Depends: maemo
+Description: text editor application for editing plain-text documents.
Added: trunk/org.indt.esbox.ui/templates/MaemoPad/debian/copyright
===================================================================
--- trunk/org.indt.esbox.ui/templates/MaemoPad/debian/copyright (rev 0)
+++ trunk/org.indt.esbox.ui/templates/MaemoPad/debian/copyright 2007-10-08 20:40:11 UTC (rev 106)
@@ -0,0 +1,7 @@
+Copyright: (c) 2005 Nokia Corporation
+
+This package is licensed under the GNU LGPL license
+For further information please refer to the COPYING file
+
+
+
Added: trunk/org.indt.esbox.ui/templates/MaemoPad/debian/postinst
===================================================================
--- trunk/org.indt.esbox.ui/templates/MaemoPad/debian/postinst (rev 0)
+++ trunk/org.indt.esbox.ui/templates/MaemoPad/debian/postinst 2007-10-08 20:40:11 UTC (rev 106)
@@ -0,0 +1,9 @@
+#!/bin/sh
+#update the icon cache
+gtk-update-icon-cache -f /usr/share/icons/hicolor
+
+# copy the desktop file for use
+( cd /usr/share/applications/hildon/ && mv $(packageName).inactive $(packageName).desktop )
+
+# select the installation folder
+maemo-select-menu-location $(packageName).desktop
\ No newline at end of file
Added: trunk/org.indt.esbox.ui/templates/MaemoPad/debian/rules.in
===================================================================
--- trunk/org.indt.esbox.ui/templates/MaemoPad/debian/rules.in (rev 0)
+++ trunk/org.indt.esbox.ui/templates/MaemoPad/debian/rules.in 2007-10-08 20:40:11 UTC (rev 106)
@@ -0,0 +1,104 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# GNU copyright 1997 to 1999 by Joey Hess.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+
+# These are used for cross-compiling and for saving the configure script
+# from having to guess our platform (since we know it already)
+DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+
+CFLAGS = -Wall -g
+PACKAGENAME = $(packageName)
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+ INSTALL_PROGRAM += -s
+endif
+
+config.status: configure
+ dh_testdir
+ # Add here commands to configure the package.
+ CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
+
+
+build: build-stamp
+
+build-stamp: config.status
+ dh_testdir
+
+ # Add here commands to compile the package.
+ $(MAKE)
+ touch build-stamp
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp
+
+ # Add here commands to clean up after the build process.
+ -$(MAKE) distclean
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+
+ # Add here commands to install the package into debian/tmp
+ #$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp/var/lib/install
+ $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
+
+ # See postinst for why we do this.
+ ( cd $(CURDIR)/debian/tmp/usr/share/applications/hildon \
+ && mv $(packageName).desktop $(packageName).inactive \
+ )
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+# dh_installchangelogs
+# dh_installdocs
+# dh_installexamples
+# dh_install
+# dh_installmenu
+# dh_installdebconf
+# dh_installlogrotate
+# dh_installemacsen
+# dh_installpam
+# dh_installmime
+# dh_installinit
+# dh_installcron
+# dh_installinfo
+# dh_installman
+ dh_link
+ dh_strip
+ dh_compress
+ dh_fixperms
+# dh_perl
+# dh_python
+ dh_makeshlibs
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install
Added: trunk/org.indt.esbox.ui/templates/MaemoPad/po/ChangeLog
===================================================================
--- trunk/org.indt.esbox.ui/templates/MaemoPad/po/ChangeLog (rev 0)
+++ trunk/org.indt.esbox.ui/templates/MaemoPad/po/ChangeLog 2007-10-08 20:40:11 UTC (rev 106)
@@ -0,0 +1 @@
+
Added: trunk/org.indt.esbox.ui/templates/MaemoPad/po/Makefile.am
===================================================================
Added: trunk/org.indt.esbox.ui/templates/MaemoPad/po/Makefile.in.in
===================================================================
--- trunk/org.indt.esbox.ui/templates/MaemoPad/po/Makefile.in.in (rev 0)
+++ trunk/org.indt.esbox.ui/templates/MaemoPad/po/Makefile.in.in 2007-10-08 20:40:11 UTC (rev 106)
@@ -0,0 +1,260 @@
+# Makefile for program source directory in GNU NLS utilities package.
+# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper at gnu.ai.mit.edu>
+#
+# This file file be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
+#
+# - Modified by Owen Taylor <otaylor at redhat.com> to use GETTEXT_PACKAGE
+# instead of PACKAGE and to look for po2tbl in ./ not in intl/
+#
+# - Modified by jacob berkman <jacob at ximian.com> to install
+# Makefile.in.in and po2tbl.sed.in for use with glib-gettextize
+
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+
+SHELL = /bin/sh
+ at SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+top_builddir = ..
+VPATH = @srcdir@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+datadir = @datadir@
+libdir = @libdir@
+localedir = $(libdir)/locale
+gnulocaledir = $(datadir)/locale
+gettextsrcdir = $(datadir)/glib-2.0/gettext/po
+subdir = po
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+MKINSTALLDIRS = $(top_srcdir)/@MKINSTALLDIRS@
+
+CC = @CC@
+GENCAT = @GENCAT@
+GMSGFMT = @GMSGFMT@
+MSGFMT = @MSGFMT@
+XGETTEXT = @XGETTEXT@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
+GENPOT = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
+
+DEFS = @DEFS@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+
+INCLUDES = -I.. -I$(top_srcdir)/intl
+
+COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
+
+SOURCES =
+POFILES = @POFILES@
+GMOFILES = @GMOFILES@
+DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(GETTEXT_PACKAGE).pot \
+$(POFILES) $(GMOFILES) $(SOURCES)
+
+POTFILES = \
+
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+INSTOBJEXT = @INSTOBJEXT@
+
+.SUFFIXES:
+.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat
+
+%.po: $(GETTEXT_PACKAGE).pot
+ if [ ! -f $@ ]; \
+ then \
+ cp $< $@; \
+ fi
+
+.c.o:
+ $(COMPILE) $<
+
+.po.pox:
+ $(MAKE) $(GETTEXT_PACKAGE).pot
+ $(MSGMERGE) $< $(srcdir)/$(GETTEXT_PACKAGE).pot -o $*pox
+
+.po.mo:
+ $(MSGFMT) -o $@ $<
+
+.po.gmo:
+ file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
+ && rm -f $$file && $(GMSGFMT) -o $$file $<
+
+.po.cat:
+ sed -f ../intl/po2msg.sed < $< > $*.msg \
+ && rm -f $@ && $(GENCAT) $@ $*.msg
+
+
+all: all- at USE_NLS@
+
+all-yes: $(CATALOGS)
+all-no:
+
+$(srcdir)/$(GETTEXT_PACKAGE).pot: $(POTFILES)
+ $(GENPOT)
+
+install: install-exec install-data
+install-exec:
+install-data: install-data- at USE_NLS@
+install-data-no: all
+install-data-yes: all
+ if test -r "$(MKINSTALLDIRS)"; then \
+ $(MKINSTALLDIRS) $(DESTDIR)$(datadir); \
+ else \
+ $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \
+ fi
+ @catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ case "$$cat" in \
+ *.gmo) destdir=$(gnulocaledir);; \
+ *) destdir=$(localedir);; \
+ esac; \
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ dir=$(DESTDIR)$$destdir/$$lang/LC_MESSAGES; \
+ if test -r "$(MKINSTALLDIRS)"; then \
+ $(MKINSTALLDIRS) $$dir; \
+ else \
+ $(SHELL) $(top_srcdir)/mkinstalldirs $$dir; \
+ fi; \
+ if test -r $$cat; then \
+ $(INSTALL_DATA) $$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
+ echo "installing $$cat as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \
+ else \
+ $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
+ echo "installing $(srcdir)/$$cat as" \
+ "$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \
+ fi; \
+ if test -r $$cat.m; then \
+ $(INSTALL_DATA) $$cat.m $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
+ echo "installing $$cat.m as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \
+ else \
+ if test -r $(srcdir)/$$cat.m ; then \
+ $(INSTALL_DATA) $(srcdir)/$$cat.m \
+ $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
+ echo "installing $(srcdir)/$$cat as" \
+ "$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \
+ else \
+ true; \
+ fi; \
+ fi; \
+ done
+ if test "$(PACKAGE)" = "glib"; then \
+ if test -r "$(MKINSTALLDIRS)"; then \
+ $(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \
+ else \
+ $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(gettextsrcdir); \
+ fi; \
+ $(INSTALL_DATA) $(srcdir)/Makefile.in.in \
+ $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
+ else \
+ : ; \
+ fi
+
+# Define this as empty until I found a useful application.
+installcheck:
+
+uninstall:
+ catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
+ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
+ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
+ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
+ done
+ if test "$(PACKAGE)" = "glib"; then \
+ rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
+ fi
+
+check: all
+
+dvi info tags TAGS ID:
+
+mostlyclean:
+ rm -f core core.* *.pox $(GETTEXT_PACKAGE).po *.old.po cat-id-tbl.tmp
+ rm -fr *.o
+ rm -f .intltool-merge-cache
+
+clean: mostlyclean
+
+distclean: clean
+ rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m
+
+maintainer-clean: distclean
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+ rm -f $(GMOFILES)
+
+distdir = ../$(GETTEXT_PACKAGE)-$(VERSION)/$(subdir)
+dist distdir: update-po $(DISTFILES)
+ dists="$(DISTFILES)"; \
+ for file in $$dists; do \
+ ln $(srcdir)/$$file $(distdir) 2> /dev/null \
+ || cp -p $(srcdir)/$$file $(distdir); \
+ done
+
+update-po: Makefile
+ $(MAKE) $(GETTEXT_PACKAGE).pot
+ tmpdir=`pwd`; \
+ cd $(srcdir); \
+ catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ echo "$$lang:"; \
+ if $$tmpdir/$(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist -o $$tmpdir/$$lang.new.po $$lang; then \
+ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
+ rm -f $$tmpdir/$$lang.new.po; \
+ else \
+ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
+ :; \
+ else \
+ echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
+ rm -f $$tmpdir/$$lang.new.po; \
+ exit 1; \
+ fi; \
+ fi; \
+ else \
+ echo "msgmerge for $$cat failed!"; \
+ rm -f $$tmpdir/$$lang.new.po; \
+ fi; \
+ done
+
+# POTFILES is created from POTFILES.in by stripping comments, empty lines
+# and Intltool tags (enclosed in square brackets), and appending a full
+# relative path to them
+POTFILES: POTFILES.in
+ ( if test 'x$(srcdir)' != 'x.'; then \
+ posrcprefix='$(top_srcdir)/'; \
+ else \
+ posrcprefix="../"; \
+ fi; \
+ rm -f $@-t $@ \
+ && (sed -e '/^#/d' \
+ -e "s/^\[.*\] +//" \
+ -e '/^[ ]*$$/d' \
+ -e "s at .*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \
+ | sed -e '$$s/\\$$//') > $@-t \
+ && chmod a-w $@-t \
+ && mv $@-t $@ )
+
+Makefile: Makefile.in.in ../config.status POTFILES
+ cd .. \
+ && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
+ $(SHELL) ./config.status
+
+# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Added: trunk/org.indt.esbox.ui/templates/MaemoPad/po/POTFILES.in
===================================================================
--- trunk/org.indt.esbox.ui/templates/MaemoPad/po/POTFILES.in (rev 0)
+++ trunk/org.indt.esbox.ui/templates/MaemoPad/po/POTFILES.in 2007-10-08 20:40:11 UTC (rev 106)
@@ -0,0 +1,4 @@
+# List of MaemoPad source files to be localized
+
+src/main.c
+src/ui/interface.c
Added: trunk/org.indt.esbox.ui/templates/MaemoPad/po/en_GB.po
===================================================================
--- trunk/org.indt.esbox.ui/templates/MaemoPad/po/en_GB.po (rev 0)
+++ trunk/org.indt.esbox.ui/templates/MaemoPad/po/en_GB.po 2007-10-08 20:40:11 UTC (rev 106)
@@ -0,0 +1,91 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+#: ../src/main.c:60
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2005-04-14 00:16-0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+
+#: ../src/ui/interface.c:123
+msgid "maemopad_save_changes_made"
+msgstr "Save changes?"
+
+#: ../src/ui/interface.c:124
+msgid "maemopad_yes"
+msgstr "Yes"
+
+#: ../src/ui/interface.c:125
+msgid "maemopad_no"
+msgstr "No"
+
+#: ../src/ui/interface.c:143
+msgid "maemopad_invalid_uri"
+msgstr "Invalid URI!"
+
+#: ../src/ui/interface.c:147
+msgid "maemopad_save_failed"
+msgstr "Save failed!"
+
+#: ../src/ui/interface.c:151
+msgid "maemopad_open_failed"
+msgstr "Open failed!"
+
+#: ../src/ui/interface.c:190
+msgid "File"
+msgstr "File"
+
+#: ../src/ui/interface.c:191
+msgid "New"
+msgstr "New"
+
+#: ../src/ui/interface.c:192
+msgid "Open"
+msgstr "Open"
+
+#: ../src/ui/interface.c:193
+msgid "Save"
+msgstr "Save"
+
+#: ../src/ui/interface.c:194
+msgid "Save As..."
+msgstr "Save As..."
+
+#: ../src/ui/interface.c:195
+msgid "Edit"
+msgstr "Edit"
+
+#: ../src/ui/interface.c:196
+msgid "Cut"
+msgstr "Cut"
+
+#: ../src/ui/interface.c:197
+msgid "Copy"
+msgstr "Copy"
+
+#: ../src/ui/interface.c:198
+msgid "Paste"
+msgstr "Paste"
+
+#: ../src/ui/interface.c:199
+msgid "Font"
+msgstr "Font"
+
+#: ../src/ui/interface.c:200
+msgid "Full Screen"
+msgstr "Full Screen"
+
+#: ../src/ui/interface.c:202
+msgid "Close"
+msgstr "Close"
Added: trunk/org.indt.esbox.ui/templates/MaemoPad/po/porules.mk.in
===================================================================
--- trunk/org.indt.esbox.ui/templates/MaemoPad/po/porules.mk.in (rev 0)
+++ trunk/org.indt.esbox.ui/templates/MaemoPad/po/porules.mk.in 2007-10-08 20:40:11 UTC (rev 106)
@@ -0,0 +1,284 @@
+# Makefile for program source directory in GNU NLS utilities package.
+# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper at gnu.ai.mit.edu>
+#
+# This file file be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
+#
+
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+
+SHELL = /bin/sh
+
+prefix = /usr
+exec_prefix = ${prefix}
+datadir = ${prefix}/share
+gnulocaledir = $(datadir)/locale
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+MKINSTALLDIRS = mkdir -p
+
+GENCAT = @GENCAT@
+GMSGFMT = @GMSGFMT@
+MSGFMT = @MSGFMT@
+XGETTEXT = @XGETTEXT@
+MSGMERGE = msgmerge
+
+
+POFILES = @POFILES@
+GMOFILES = @GMOFILES@
+POFILES = $(addfuffix .po, at ALL_LINGUAS@)
+GMOFILES = $(addfuffix .gmo, at ALL_LINGUAS@)
+DISTFILES = $(GMOFILES)
+
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+INSTOBJEXT = @INSTOBJEXT@
+
+.SUFFIXES:
+.SUFFIXES: .po .gmo .mo
+
+.po.mo:
+ $(MSGFMT) -o $@ $<
+
+.po.gmo:
+ file=`echo $* | sed 's,.*/,,'`.gmo \
+ && rm -f $$file && $(GMSGFMT) -o $$file $<
+
+all: all-yes
+
+all-yes: $(CATALOGS)
+all-no:
+
+install: install-exec install-data
+install-exec:
+install-data: install-data-yes
+install-data-no: all
+install-data-yes: all
+ $(MKINSTALLDIRS) $(DESTDIR)$(datadir)
+ @catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ case "$$cat" in \
+ *.gmo) destdir=$(gnulocaledir);; \
+ *) destdir=$(localedir);; \
+ esac; \
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ dir=$(DESTDIR)$$destdir/$$lang/LC_MESSAGES; \
+ $(MKINSTALLDIRS) $$dir; \
+ if test -r $$cat; then \
+ $(INSTALL_DATA) $$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
+ echo "installing $$cat as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \
+ else \
+ $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
+ echo "installing $(srcdir)/$$cat as" \
+ "$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \
+ fi; \
+ if test -r $$cat.m; then \
+ $(INSTALL_DATA) $$cat.m $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
+ echo "installing $$cat.m as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \
+ else \
+ if test -r $(srcdir)/$$cat.m ; then \
+ $(INSTALL_DATA) $(srcdir)/$$cat.m \
+ $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
+ echo "installing $(srcdir)/$$cat as" \
+ "$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \
+ else \
+ true; \
+ fi; \
+ fi; \
+ done
+
+
+# Define this as empty until I found a useful application.
+installcheck:
+
+uninstall:
+ catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
+ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
+ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
+ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
+ done
+ if test "$(PACKAGE)" = "glib"; then \
+ rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
+ fi
+
+check: all
+
+dvi info tags TAGS ID:
+
+mostlyclean:
+ rm -f core core.* *.pox $(GETTEXT_PACKAGE).po *.old.po cat-id-tbl.tmp
+ rm -fr *.o
+
+clean: mostlyclean
+
+distclean: clean
+ rm -f *.gmo *.mo *.msg *.cat *.cat.m
+
+maintainer-clean: distclean
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+ rm -f $(GMOFILES)
+
+distdir = ../$(GETTEXT_PACKAGE)-$(VERSION)/$(subdir)
+dist distdir: update-po $(DISTFILES)
+ dists="$(DISTFILES)"; \
+ for file in $$dists; do \
+ ln $(srcdir)/$$file $(distdir) 2> /dev/null \
+ || cp -p $(srcdir)/$$file $(distdir); \
+ done
+
+# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
+# Makefile for program source directory in GNU NLS utilities package.
+# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper at gnu.ai.mit.edu>
+#
+# This file file be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
+#
+
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+
+SHELL = /bin/sh
+
+prefix = /usr
+exec_prefix = ${prefix}
+datadir = ${prefix}/share
+gnulocaledir = $(datadir)/locale
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+MKINSTALLDIRS = mkdir -p
+
+GENCAT = @GENCAT@
+GMSGFMT = @GMSGFMT@
+MSGFMT = @MSGFMT@
+XGETTEXT = @XGETTEXT@
+MSGMERGE = msgmerge
+
+
+POFILES = @POFILES@
+GMOFILES = @GMOFILES@
+POFILES = $(addfuffix .po, at ALL_LINGUAS@)
+GMOFILES = $(addfuffix .gmo, at ALL_LINGUAS@)
+DISTFILES = $(GMOFILES)
+
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+INSTOBJEXT = @INSTOBJEXT@
+
+.SUFFIXES:
+.SUFFIXES: .po .gmo .mo
+
+.po.mo:
+ $(MSGFMT) -o $@ $<
+
+.po.gmo:
+ file=`echo $* | sed 's,.*/,,'`.gmo \
+ && rm -f $$file && $(GMSGFMT) -o $$file $<
+
+all: all-yes
+
+all-yes: $(CATALOGS)
+all-no:
+
+install: install-exec install-data
+install-exec:
+install-data: install-data-yes
+install-data-no: all
+install-data-yes: all
+ $(MKINSTALLDIRS) $(DESTDIR)$(datadir)
+ @catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ case "$$cat" in \
+ *.gmo) destdir=$(gnulocaledir);; \
+ *) destdir=$(localedir);; \
+ esac; \
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ dir=$(DESTDIR)$$destdir/$$lang/LC_MESSAGES; \
+ $(MKINSTALLDIRS) $$dir; \
+ if test -r $$cat; then \
+ $(INSTALL_DATA) $$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
+ echo "installing $$cat as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \
+ else \
+ $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
+ echo "installing $(srcdir)/$$cat as" \
+ "$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \
+ fi; \
+ if test -r $$cat.m; then \
+ $(INSTALL_DATA) $$cat.m $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
+ echo "installing $$cat.m as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \
+ else \
+ if test -r $(srcdir)/$$cat.m ; then \
+ $(INSTALL_DATA) $(srcdir)/$$cat.m \
+ $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
+ echo "installing $(srcdir)/$$cat as" \
+ "$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \
+ else \
+ true; \
+ fi; \
+ fi; \
+ done
+
+
+# Define this as empty until I found a useful application.
+installcheck:
+
+uninstall:
+ catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
+ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
+ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
+ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
+ done
+ if test "$(PACKAGE)" = "glib"; then \
+ rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
+ fi
+
+check: all
+
+dvi info tags TAGS ID:
+
+mostlyclean:
+ rm -f core core.* *.pox $(GETTEXT_PACKAGE).po *.old.po cat-id-tbl.tmp
+ rm -fr *.o
+
+clean: mostlyclean
+
+distclean: clean
+ rm -f *.gmo *.mo *.msg *.cat *.cat.m
+
+maintainer-clean: distclean
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+ rm -f $(GMOFILES)
+
+distdir = ../$(GETTEXT_PACKAGE)-$(VERSION)/$(subdir)
+dist distdir: update-po $(DISTFILES)
+ dists="$(DISTFILES)"; \
+ for file in $$dists; do \
+ ln $(srcdir)/$$file $(distdir) 2> /dev/null \
+ || cp -p $(srcdir)/$$file $(distdir); \
+ done
+
+# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Added: trunk/org.indt.esbox.ui/templates/MaemoPad/src/Makefile.am
===================================================================
--- trunk/org.indt.esbox.ui/templates/MaemoPad/src/Makefile.am (rev 0)
+++ trunk/org.indt.esbox.ui/templates/MaemoPad/src/Makefile.am 2007-10-08 20:40:11 UTC (rev 106)
@@ -0,0 +1,52 @@
+# This file is part of $(packageName)
+#
+# Copyright (C) 2005 Nokia Corporation.
+#
+# This software is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public License
+# as published by the Free Software Foundation; either version 2.1 of
+# the License, or (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this software; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+# 02110-1301 USA
+#
+
+# Includes
+INCLUDES = $(HILDON_CFLAGS) $(OSSO_CFLAGS) $(MB_CFLAGS) \
+ -DLOCALEDIR=\"$(localedir)\" $(HILDONLGPL_CFLAGS) \
+ $(HILDONFM_CFLAGS)
+
+# Binary
+bin_PROGRAMS = \
+ $(packageName)
+# /Binary
+
+# please dont give ldadd before sources, creating debian packet breaks otherwise :P
+# Sources
+$(packageName)_SOURCES = \
+ main.c \
+ appdata.h \
+ ui/interface.h \
+ ui/interface.c \
+ ui/callbacks.h \
+ ui/callbacks.c
+# /Sources
+
+# LDADD
+$(packageName)_LDADD = $(HILDON_LIBS) $(OSSO_LIBS) $(MB_LIBS) $(HILDONLGPL_LIBS) \
+$(HILDONFM_LIBS)
+
+# /LDADD
+
+$(packageName)_CFLAGS= $(INCLUDES) \
+ -DMAEMOPADLOCALEDIR=\"$(maemopadlocaledir)\"\
+ -DPREFIX=\"$(prefix)\" -I$(top_srcdir)
+
+servicefiledir=`$(PKG_CONFIG) --variable=libdir dbus-glib-1`/dbus-1.0/services
Added: trunk/org.indt.esbox.ui/templates/MaemoPad/src/appdata.h
===================================================================
--- trunk/org.indt.esbox.ui/templates/MaemoPad/src/appdata.h (rev 0)
+++ trunk/org.indt.esbox.ui/templates/MaemoPad/src/appdata.h 2007-10-08 20:40:11 UTC (rev 106)
@@ -0,0 +1,38 @@
+/*
+ * This file is part of maemopad
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ *
+ * This software is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifndef MAEMOPAD_APPDATA_H
+#define MAEMOPAD_APPDATA_H
+
+#include <libosso.h>
+
+typedef struct _AppData AppData;
+
+struct _AppData
+{
+ HildonProgram *program; /* handle to application */
+ HildonWindow *window; /* handle to app's window */
+ osso_context_t *osso; /* handle to osso */
+};
+
+#endif
Added: trunk/org.indt.esbox.ui/templates/MaemoPad/src/main.c
===================================================================
--- trunk/org.indt.esbox.ui/templates/MaemoPad/src/main.c (rev 0)
+++ trunk/org.indt.esbox.ui/templates/MaemoPad/src/main.c 2007-10-08 20:40:11 UTC (rev 106)
@@ -0,0 +1,104 @@
+/*
+ * This file is part of maemopad
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ *
+ * This software is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include <ui/interface.h>
+#include <appdata.h>
+
+#include <gtk/gtkmain.h>
+
+#include <hildon-widgets/hildon-program.h>
+
+#include <libintl.h>
+#include <locale.h>
+#include <libosso.h>
+
+#define _(String) gettext(String)
+
+#include <config.h>
+
+/*
+ * create our application specific data
+ * This consists of allocating some space
+ * for the AppData structure, and also
+ * creating the list store that will act
+ * as a model for the contact list.
+ * The other elements of the AppData structure
+ * are implicitly set by the call to g_new0
+ * which zeroes the memory of the AppData, thereby
+ * setting create_new to FALSE, and iter to NULL.
+ *
+ */
+
+static AppData *create_data ()
+{
+ AppData *result = g_new0( AppData, 1 );
+
+ result->osso = osso_initialize ( PACKAGE, VERSION, TRUE, NULL );
+ g_assert ( result->osso );
+ return result;
+}
+
+/* Here we clean up all the data that we allocated */
+static void destroy_data ( AppData *data )
+{
+ g_free ( data );
+}
+
+int main( int argc, char* argv[] )
+{
+ AppData* data;
+ HildonProgram* program;
+ MainView* main_view;
+
+ /* Initialise the locale stuff */
+ setlocale ( LC_ALL, "" );
+ bindtextdomain ( GETTEXT_PACKAGE, LOCALEDIR );
+ bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
+ textdomain ( GETTEXT_PACKAGE );
+
+ /* Init the gtk - must be called before any hildon stuff */
+ gtk_init( &argc, &argv );
+
+ /* Create the hildon application and setup the title */
+ program = HILDON_PROGRAM ( hildon_program_get_instance () );
+ g_set_application_name ( _("MaemoPad") );
+
+ /* Create the data and views for our application */
+ data = create_data ();
+ data->program = program;
+ main_view = interface_main_view_new ( data );
+ hildon_program_add_window( data->program, data->window );
+
+ gtk_signal_connect( G_OBJECT(data->window), "delete_event", gtk_main_quit, NULL );
+
+ /* Begin the main app */
+ gtk_widget_show ( GTK_WIDGET ( program ) );
+ gtk_main();
+
+ /* Clean up */
+ interface_main_view_destroy ( main_view );
+ destroy_data ( data );
+
+ return 0;
+}
+
Added: trunk/org.indt.esbox.ui/templates/MaemoPad/src/ui/callbacks.c
===================================================================
--- trunk/org.indt.esbox.ui/templates/MaemoPad/src/ui/callbacks.c (rev 0)
+++ trunk/org.indt.esbox.ui/templates/MaemoPad/src/ui/callbacks.c 2007-10-08 20:40:11 UTC (rev 106)
@@ -0,0 +1,303 @@
+/*
+ * This file is part of maemopad
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ *
+ * This software is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include <ui/callbacks.h>
+#include <ui/interface.h>
+#include <gtk/gtk.h>
+#include <libintl.h>
+/* strlen needed from string.h */
+#include <string.h>
+/* Gnome VFS for file i/o */
+#include <libgnomevfs/gnome-vfs.h>
+
+/* Privates: */
+void read_file_to_buffer ( MainView* mainview );
+void write_buffer_to_file ( MainView* mainview );
+
+/* cut */
+void callback_edit_cut( GtkAction * action, gpointer data )
+{
+ /* connect pointer to our MainView struct */
+ MainView *mainview = NULL;
+ mainview = ( MainView * ) data;
+ g_assert(mainview != NULL && mainview->data != NULL );
+
+ /* do cut */
+ gtk_text_buffer_cut_clipboard(GTK_TEXT_BUFFER(mainview->buffer), mainview->clipboard, TRUE);
+}
+
+/* copy */
+void callback_edit_copy( GtkAction * action, gpointer data )
+{
+ /* connect pointer to our MainView struct */
+ MainView *mainview = NULL;
+ mainview = ( MainView * ) data;
+ g_assert(mainview != NULL && mainview->data != NULL );
+
+ /* do copy */
+ gtk_text_buffer_copy_clipboard (GTK_TEXT_BUFFER(mainview->buffer), mainview->clipboard);
+}
+
+/* paste */
+void callback_edit_paste( GtkAction * action, gpointer data )
+{
+ /* connect pointer to our MainView struct */
+ MainView *mainview = NULL;
+ mainview = ( MainView * ) data;
+ g_assert(mainview != NULL && mainview->data != NULL );
+
+ /* do paste */
+ gtk_text_buffer_paste_clipboard (GTK_TEXT_BUFFER (mainview->buffer), mainview->clipboard, NULL, TRUE);
+}
+
+/* new */
+void callback_file_new(GtkAction * action, gpointer data)
+{
+ gint answer;
+ MainView *mainview = NULL;
+ mainview = ( MainView * ) data;
+ g_assert(mainview != NULL && mainview->data != NULL );
+
+ /* save changes note if file is edited */
+ if( mainview->file_edited ) {
+ answer = interface_save_changes_note( mainview );
+ if( answer == CONFRESP_YES ) {
+ if( mainview->file_name == NULL ) {
+ mainview->file_name = interface_file_chooser ( mainview, GTK_FILE_CHOOSER_ACTION_SAVE );
+ }
+ write_buffer_to_file ( mainview );
+ }
+ }
+ /* clear buffer, filename and free buffer text */
+ gtk_text_buffer_set_text ( GTK_TEXT_BUFFER (mainview->buffer), "", -1 );
+ mainview->file_name = NULL;
+ mainview->file_edited = FALSE;
+}
+
+/* open */
+void callback_file_open(GtkAction * action, gpointer data)
+{
+ gint answer;
+ gchar* filename = NULL;
+ MainView *mainview = NULL;
+ mainview = ( MainView * ) data;
+ g_assert(mainview != NULL && mainview->data != NULL );
+
+ /* save changes note if file is edited */
+ if( mainview->file_edited ) {
+ answer = interface_save_changes_note( mainview );
+ if( answer == CONFRESP_YES ) {
+ /* check is we had a new file */
+ if( mainview->file_name == NULL ) {
+ mainview->file_name = interface_file_chooser ( mainview, GTK_FILE_CHOOSER_ACTION_SAVE );
+ }
+ write_buffer_to_file ( mainview );
+ }
+ }
+
+ /* open new file */
+ filename = interface_file_chooser ( mainview, GTK_FILE_CHOOSER_ACTION_OPEN );
+
+ /* if we got a file name from chooser -> open file */
+ if( filename != NULL ) {
+ mainview->file_name = filename;
+ read_file_to_buffer ( mainview );
+ mainview->file_edited = FALSE;
+ }
+}
+
+/* save */
+void callback_file_save(GtkAction * action, gpointer data)
+{
+ gchar* filename = NULL;
+ MainView *mainview = NULL;
+ mainview = ( MainView * ) data;
+ g_assert(mainview != NULL && mainview->data != NULL );
+
+ /* check is we had a new file */
+ if( mainview->file_name != NULL ) {
+ write_buffer_to_file ( mainview );
+ } else {
+ filename = interface_file_chooser ( mainview, GTK_FILE_CHOOSER_ACTION_SAVE );
+ /* if we got a file name from chooser -> save file */
+ if( filename != NULL ) {
+ mainview->file_name = filename;
+ write_buffer_to_file ( mainview );
+ mainview->file_edited = FALSE;
+ }
+ }
+}
+
+/* save as... */
+void callback_file_saveas(GtkAction * action, gpointer data)
+{
+ gchar* filename = NULL;
+ MainView *mainview = NULL;
+ mainview = ( MainView * ) data;
+ g_assert(mainview != NULL && mainview->data != NULL );
+
+ filename = interface_file_chooser ( mainview, GTK_FILE_CHOOSER_ACTION_SAVE );
+
+ /* if we got a file name from chooser -> save file */
+ if( filename != NULL ) {
+ mainview->file_name = filename;
+ write_buffer_to_file ( mainview );
+ mainview->file_edited = FALSE;
+ }
+}
+
+/* font */
+void callback_font( GtkAction * action, gpointer data )
+{
+ PangoFontDescription* new_font = NULL;
+ MainView *mainview = NULL;
+ mainview = ( MainView * ) data;
+ g_assert(mainview != NULL && mainview->data != NULL );
+
+ new_font = interface_font_chooser( mainview );
+
+ /* if we got a new font from chooser -> change font */
+ if( new_font != NULL ) {
+ mainview->font_desc = new_font;
+ gtk_widget_modify_font ( mainview->textview, mainview->font_desc );
+ }
+}
+
+/* fullscreen */
+void callback_fullscreen( GtkAction * action, gpointer data )
+{
+ /* connect pointer to our MainView struct */
+ MainView *mainview = NULL;
+ mainview = ( MainView * ) data;
+ g_assert(mainview != NULL && mainview->data != NULL );
+
+ /* toggle fullscreen on<->off */
+ mainview->fullscreen = !mainview->fullscreen;
+
+ if (mainview->fullscreen) {
+ gtk_window_fullscreen(GTK_WINDOW(mainview->data->window));
+ } else {
+ gtk_window_unfullscreen(GTK_WINDOW(mainview->data->window));
+ }
+}
+
+/* help */
+void callback_help( GtkAction * action, gpointer data )
+{
+ osso_return_t retval;
+
+ /* connect pointer to our MainView struct */
+ MainView *mainview = NULL;
+ mainview = ( MainView * ) data;
+ g_assert(mainview != NULL && mainview->data != NULL );
+
+ retval = ossohelp_show(
+ mainview->data->osso, /* osso_context */
+ HELP_TOPIC_ID, /* topic id */
+ OSSO_HELP_SHOW_DIALOG);
+}
+
+/* buffer edited */
+void callback_buffer_modified ( GtkAction * action, gpointer data )
+{
+ /* connect pointer to our MainView struct */
+ MainView *mainview = NULL;
+ mainview = ( MainView * ) data;
+ g_assert(mainview != NULL && mainview->data != NULL );
+
+ /* change state */
+ mainview->file_edited = TRUE;
+}
+
+/* Privates */
+
+/* read file */
+void read_file_to_buffer ( MainView* mainview )
+{
+ GnomeVFSResult vfs_result;
+ GnomeVFSHandle *handle = NULL;
+ GnomeVFSFileSize in_bytes;
+ GnomeVFSFileInfo finfo;
+ gchar *temp_buffer = NULL;
+ g_assert( mainview != NULL );
+
+ /* try to get file info */
+ vfs_result = gnome_vfs_get_file_info(mainview->file_name, &finfo, GNOME_VFS_FILE_INFO_DEFAULT);
+ if ( vfs_result != GNOME_VFS_OK ) {
+ interface_error( MAEMOPAD_ERROR_OPEN_FAILED, mainview );
+ return;
+ }
+ /* try to create handle to file */
+ vfs_result = gnome_vfs_open(&handle, mainview->file_name, GNOME_VFS_OPEN_READ);
+ if ( vfs_result != GNOME_VFS_OK ) {
+ interface_error( MAEMOPAD_ERROR_OPEN_FAILED, mainview );
+ return;
+ }
+
+ /* allocate memory for temp_buffer */
+ temp_buffer = g_malloc(finfo.size + 1);
+ memset(temp_buffer, 0, finfo.size + 1);
+
+ /* read from file to buffer */
+ gnome_vfs_read(handle, temp_buffer, finfo.size, &in_bytes);
+
+ /* set text to screen */
+ gtk_text_buffer_set_text( GTK_TEXT_BUFFER (mainview->buffer), temp_buffer, -1);
+
+ /* free temp, close file and return */
+ g_free(temp_buffer);
+ gnome_vfs_close(handle);
+}
+
+
+
+/* write to file */
+void write_buffer_to_file ( MainView* mainview )
+{
+ GnomeVFSResult vfs_result;
+ GnomeVFSHandle *handle = NULL;
+ GnomeVFSFileSize out_bytes;
+ gchar *temp_buffer = NULL;
+ GtkTextIter start, end;
+ g_assert( mainview != NULL );
+
+ /* try to create handle to file */
+ vfs_result = gnome_vfs_create(&handle, mainview->file_name, GNOME_VFS_OPEN_WRITE, 0, 0600);
+ if ( vfs_result != GNOME_VFS_OK ) {
+ interface_error( MAEMOPAD_ERROR_SAVE_FAILED, mainview );
+ return;
+ }
+
+ /* find start and end of text */
+ gtk_text_buffer_get_bounds( GTK_TEXT_BUFFER (mainview->buffer), &start, &end);
+
+ /* copy all text from screen to temp_buffer */
+ temp_buffer = gtk_text_buffer_get_slice( GTK_TEXT_BUFFER (mainview->buffer), &start, &end, TRUE);
+
+ /* write text to file */
+ gnome_vfs_write(handle, temp_buffer, strlen(temp_buffer), &out_bytes);
+
+ /* free temp, close file and return */
+ g_free(temp_buffer);
+ gnome_vfs_close(handle);
+}
Added: trunk/org.indt.esbox.ui/templates/MaemoPad/src/ui/callbacks.h
===================================================================
--- trunk/org.indt.esbox.ui/templates/MaemoPad/src/ui/callbacks.h (rev 0)
+++ trunk/org.indt.esbox.ui/templates/MaemoPad/src/ui/callbacks.h 2007-10-08 20:40:11 UTC (rev 106)
@@ -0,0 +1,53 @@
+/*
+ * This file is part of maemopad
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ *
+ * This software is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifndef CALLBACKS_H
+#define CALLBACKS_H
+
+#include <ui/interface.h>
+#include <gtk/gtk.h>
+#include <appdata.h>
+#include <osso-helplib.h>
+
+#define HELP_TOPIC_ID "Example_MaemoPad_Content"
+
+/* edit-> cut/copy/paste */
+void callback_edit_cut ( GtkAction * action, gpointer data );
+void callback_edit_copy ( GtkAction * action, gpointer data );
+void callback_edit_paste ( GtkAction * action, gpointer data );
+/* file-> new/open/save */
+void callback_file_new ( GtkAction * action, gpointer data );
+void callback_file_open ( GtkAction * action, gpointer data );
+void callback_file_save ( GtkAction * action, gpointer data );
+void callback_file_saveas ( GtkAction * action, gpointer data );
+/* font */
+void callback_font ( GtkAction * action, gpointer data );
+/* fullscreen */
+void callback_fullscreen ( GtkAction * action, gpointer data );
+/* help */
+void callback_help ( GtkAction * action, gpointer data );
+
+/* buffer modified */
+void callback_buffer_modified ( GtkAction * action, gpointer data );
+
+#endif
Added: trunk/org.indt.esbox.ui/templates/MaemoPad/src/ui/interface.c
===================================================================
--- trunk/org.indt.esbox.ui/templates/MaemoPad/src/ui/interface.c (rev 0)
+++ trunk/org.indt.esbox.ui/templates/MaemoPad/src/ui/interface.c 2007-10-08 20:40:11 UTC (rev 106)
@@ -0,0 +1,376 @@
+/*
+ * This file is part of maemopad
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ *
+ * This software is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include <ui/interface.h>
+#include <ui/callbacks.h>
+#include <gtk/gtk.h>
+#include <libintl.h>
+
+#include <hildon-widgets/hildon-file-chooser-dialog.h>
+#include <hildon-widgets/hildon-note.h>
+#include <hildon-widgets/hildon-font-selection-dialog.h>
+
+
+/* Privates: */
+
+static void create_menu( MainView *main );
+static void create_toolbar( MainView *main );
+void create_textarea( MainView *main );
+
+/* Creates and initialises a main_view */
+MainView* interface_main_view_new( AppData *data )
+{
+ /* Zero memory with g_new0 */
+ MainView* result = g_new0( MainView, 1 );
+ /* Create GTK vbox which will be our text area */
+ GtkWidget *main_vbox = gtk_vbox_new( FALSE, 0 );
+ result->clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
+ gtk_clipboard_set_can_store(result->clipboard, NULL, 0);
+
+ /* Initialize interface data */
+ result->file_edited = FALSE;
+ /* Store handle to app's data to view's data */
+ result->data = data;
+ /* Store handle to hildon_window to app's data */
+ result->data->window = HILDON_WINDOW(hildon_window_new());
+ /* Create all our necessary parts */
+ create_textarea( result );
+ create_toolbar( result );
+ create_menu( result );
+ /* Put GTK vbox to app's view */
+ gtk_container_add( GTK_CONTAINER( result->data->window ), main_vbox );
+ /* Put scrolledwindow to GTK vbox and show it */
+ gtk_box_pack_start( GTK_BOX( main_vbox ), result->scrolledwindow, TRUE, TRUE, 0 );
+ gtk_widget_show( main_vbox );
+ /* Focus on textarea */
+ gtk_widget_grab_focus( GTK_WIDGET(result->textview ));
+ /* Initialize our textview's file (no file opened yet) */
+ result->file_edited=FALSE;
+ result->file_name=NULL;
+ /* Return with new mainview handle */
+ return result;
+}
+
+/* clean up the allocated memory */
+void interface_main_view_destroy( MainView *main )
+{
+ g_free( main );
+}
+
+/* File chooser */
+gchar* interface_file_chooser(MainView * mainview, GtkFileChooserAction action)
+{
+ GtkWidget *dialog;
+ gchar* filename = NULL;
+
+ dialog = hildon_file_chooser_dialog_new( GTK_WINDOW(mainview->data->program), action);
+ gtk_widget_show_all (GTK_WIDGET(dialog));
+ if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK)
+ {
+ filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
+ }
+ gtk_widget_destroy (dialog);
+ return filename;
+}
+
+/* Font chooser */
+PangoFontDescription* interface_font_chooser( MainView * main )
+{
+ HildonFontSelectionDialog *dialog = NULL;
+
+ PangoFontDescription *font = NULL;
+ gint size;
+ gboolean bold, italic;
+ gchar *family = NULL;
+
+ font = pango_font_description_new();
+
+ /* create dialog */
+ dialog = HILDON_FONT_SELECTION_DIALOG ( hildon_font_selection_dialog_new( NULL, NULL ) );
+
+ gtk_widget_show_all (GTK_WIDGET(dialog));
+ if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK)
+ {
+ g_object_get(G_OBJECT(dialog),
+ "family", &family,
+ "size", &size,
+ "bold", &bold,
+ "italic", &italic,
+ NULL);
+ pango_font_description_set_family(font, family);
+ pango_font_description_set_size(font, size * PANGO_SCALE);
+ if (bold) {
+ pango_font_description_set_weight(font, PANGO_WEIGHT_BOLD);
+ } else {
+ pango_font_description_set_weight(font, PANGO_WEIGHT_NORMAL);
+ }
+ if (italic) {
+ pango_font_description_set_style(font, PANGO_STYLE_ITALIC);
+ } else {
+ pango_font_description_set_style(font, PANGO_STYLE_NORMAL);
+ }
+ }
+ gtk_widget_destroy(GTK_WIDGET(dialog));
+
+ return font;
+}
+
+/* Save changes note */
+gint interface_save_changes_note(MainView * main)
+{
+ HildonNote *hn = NULL;
+ gint response = FALSE;
+
+ g_assert(main != NULL && main->data->program != NULL);
+
+ hn = HILDON_NOTE(hildon_note_new_confirmation_add_buttons
+ (GTK_WINDOW(main->data->program),
+ _("maemopad_save_changes_made"),
+ _("maemopad_yes"), CONFRESP_YES,
+ _("maemopad_no"), CONFRESP_NO,
+ NULL, NULL));
+ response = gtk_dialog_run(GTK_DIALOG(hn));
+ gtk_widget_destroy(GTK_WIDGET(hn));
+ return response;
+}
+
+/* Error note */
+void interface_error( MaemopadError me, MainView *main )
+{
+ GtkWidget *dialog = NULL;
+ gchar *msg = NULL;
+
+ switch (me) {
+
+ case MAEMOPAD_ERROR_INVALID_URI:
+ msg = g_strdup( _("maemopad_invalid_uri") );
+ break;
+
+ case MAEMOPAD_ERROR_SAVE_FAILED:
+ msg = g_strdup( _("maemopad_save_failed") );
+ break;
+
+ case MAEMOPAD_ERROR_OPEN_FAILED:
+ msg = g_strdup( _("maemopad_open_failed") );
+ break;
+
+ case MAEMOPAD_NO_ERROR:
+ return;
+
+ default:
+ g_assert_not_reached();
+ }
+
+ dialog = hildon_note_new_information( GTK_WINDOW( main->data->program ), msg );
+
+ gtk_dialog_run( GTK_DIALOG( dialog ) );
+ gtk_widget_destroy( dialog );
+ g_free( msg );
+}
+
+/* Privates */
+
+/* Create the menu items needed for the drop down menu */
+static void create_menu( MainView *main )
+{
+ /* Create needed handles */
+ GtkMenu *main_menu;
+ GtkWidget *file_menu, *edit_menu;
+ GtkWidget *separator = NULL;
+ GtkWidget *help = NULL, *close = NULL;
+
+ /* Create main menu and new menus for submenus in our drop down menu */
+ main_menu = GTK_MENU( gtk_menu_new () );
+ file_menu = gtk_menu_new ();
+ edit_menu = gtk_menu_new ();
+
+ /* Create the menu items */
+ main->file_item = gtk_menu_item_new_with_label ( _("File") );
+ main->new_item = gtk_menu_item_new_with_label ( _("New") );
+ main->open_item = gtk_menu_item_new_with_label ( _("Open") );
+ main->save_item = gtk_menu_item_new_with_label ( _("Save") );
+ main->saveas_item = gtk_menu_item_new_with_label ( _("Save As...") );
+ main->edit_item = gtk_menu_item_new_with_label ( _("Edit") );
+ main->cut_item = gtk_menu_item_new_with_label ( _("Cut") );
+ main->copy_item = gtk_menu_item_new_with_label ( _("Copy") );
+ main->paste_item = gtk_menu_item_new_with_label ( _("Paste") );
+ main->font_item = gtk_menu_item_new_with_label ( _("Font") );
+ main->fullscreen_item = gtk_menu_item_new_with_label ( _("Full Screen") );
+ separator = gtk_separator_menu_item_new();
+ help = gtk_menu_item_new_with_label( _("Help") );
+ close = gtk_menu_item_new_with_label( _("Close") );
+
+ /* Add menu items to right menus */
+ gtk_menu_append( main_menu, main->file_item );
+ gtk_menu_append( file_menu, main->new_item );
+ gtk_menu_append( file_menu, main->open_item );
+ gtk_menu_append( file_menu, main->save_item );
+ gtk_menu_append( file_menu, main->saveas_item );
+ gtk_menu_append( main_menu, main->edit_item );
+ gtk_menu_append( edit_menu, main->cut_item );
+ gtk_menu_append( edit_menu, main->copy_item );
+ gtk_menu_append( edit_menu, main->paste_item );
+ gtk_menu_append( main_menu, main->font_item );
+ gtk_menu_append( main_menu, main->fullscreen_item );
+ gtk_menu_append( main_menu, separator );
+ gtk_menu_append( main_menu, help );
+ gtk_menu_append( main_menu, close );
+
+ /* Add submenus to the right items */
+ gtk_menu_item_set_submenu( GTK_MENU_ITEM (main->file_item), file_menu );
+ gtk_menu_item_set_submenu( GTK_MENU_ITEM (main->edit_item), edit_menu );
+
+ /* Attach the callback functions to the activate signal */
+ g_signal_connect( G_OBJECT( main->new_item ), "activate",
+ G_CALLBACK ( callback_file_new), main );
+ g_signal_connect( G_OBJECT( main->open_item ), "activate",
+ G_CALLBACK ( callback_file_open), main );
+ g_signal_connect( G_OBJECT( main->save_item ), "activate",
+ G_CALLBACK ( callback_file_save), main );
+ g_signal_connect( G_OBJECT( main->saveas_item ), "activate",
+ G_CALLBACK ( callback_file_saveas), main );
+ g_signal_connect( G_OBJECT( main->cut_item ), "activate",
+ G_CALLBACK ( callback_edit_cut), main );
+ g_signal_connect( G_OBJECT( main->copy_item ), "activate",
+ G_CALLBACK( callback_edit_copy ), main );
+ g_signal_connect( G_OBJECT( main->paste_item ), "activate",
+ G_CALLBACK( callback_edit_paste ), main );
+ g_signal_connect( G_OBJECT( main->font_item ), "activate",
+ G_CALLBACK ( callback_font ), main );
+ g_signal_connect( G_OBJECT( main->fullscreen_item ), "activate",
+ G_CALLBACK ( callback_fullscreen ), main );
+ g_signal_connect( G_OBJECT( help ), "activate",
+ G_CALLBACK ( callback_help ), main );
+ g_signal_connect( G_OBJECT( close ), "activate", gtk_main_quit, NULL );
+
+ /* Add menu to HildonWindow */
+ hildon_window_set_menu(main->data->window, main_menu);
+
+ /* We need to show menu items */
+ gtk_widget_show_all( GTK_WIDGET( main_menu ) );
+}
+
+
+/* Create toolbar to mainview */
+static void create_toolbar ( MainView *main )
+{
+ /* Create new GTK toolbar */
+ main->toolbar = gtk_toolbar_new ();
+
+ /* Set toolbar properties */
+ gtk_toolbar_set_orientation( GTK_TOOLBAR(main->toolbar), GTK_ORIENTATION_HORIZONTAL);
+ gtk_toolbar_set_style( GTK_TOOLBAR(main->toolbar), GTK_TOOLBAR_BOTH_HORIZ);
+
+ /* Make menus and buttons to toolbar: */
+ /* Create toolitems using defined items from stock */
+ main->new_tb = gtk_tool_button_new_from_stock(GTK_STOCK_NEW);
+ main->open_tb = gtk_tool_button_new_from_stock(GTK_STOCK_OPEN);
+ main->save_tb = gtk_tool_button_new_from_stock(GTK_STOCK_SAVE);
+ main->saveas_tb = gtk_tool_button_new_from_stock(GTK_STOCK_SAVE_AS);
+ main->separator_tb1 = gtk_separator_tool_item_new();
+ main->cut_tb = gtk_tool_button_new_from_stock(GTK_STOCK_CUT);
+ main->copy_tb = gtk_tool_button_new_from_stock(GTK_STOCK_COPY);
+ main->paste_tb = gtk_tool_button_new_from_stock(GTK_STOCK_PASTE);
+ main->separator_tb2 = gtk_separator_tool_item_new();
+ main->font_tb = gtk_tool_button_new_from_stock( GTK_STOCK_SELECT_FONT );
+ main->fullscreen_tb = gtk_tool_button_new_from_stock( GTK_STOCK_ZOOM_FIT );
+
+ /* Insert items to toolbar */
+ gtk_toolbar_insert ( GTK_TOOLBAR(main->toolbar), main->new_tb, -1);
+ gtk_toolbar_insert ( GTK_TOOLBAR(main->toolbar), main->open_tb, -1);
+ gtk_toolbar_insert ( GTK_TOOLBAR(main->toolbar), main->save_tb, -1);
+ gtk_toolbar_insert ( GTK_TOOLBAR(main->toolbar), main->saveas_tb, -1);
+ gtk_toolbar_insert ( GTK_TOOLBAR(main->toolbar), main->separator_tb1, -1);
+ gtk_toolbar_insert ( GTK_TOOLBAR(main->toolbar), main->cut_tb, -1);
+ gtk_toolbar_insert ( GTK_TOOLBAR(main->toolbar), main->copy_tb, -1);
+ gtk_toolbar_insert ( GTK_TOOLBAR(main->toolbar), main->paste_tb, -1);
+ gtk_toolbar_insert ( GTK_TOOLBAR(main->toolbar), main->separator_tb2, -1);
+ gtk_toolbar_insert ( GTK_TOOLBAR(main->toolbar), main->font_tb, -1);
+ gtk_toolbar_insert ( GTK_TOOLBAR(main->toolbar), main->fullscreen_tb, -1);
+
+ /* Connect signals to buttons */
+ g_signal_connect(G_OBJECT(main->new_tb), "clicked",
+ G_CALLBACK(callback_file_new), main);
+ g_signal_connect(G_OBJECT(main->open_tb), "clicked",
+ G_CALLBACK(callback_file_open), main);
+ g_signal_connect(G_OBJECT(main->save_tb), "clicked",
+ G_CALLBACK(callback_file_save), main);
+ g_signal_connect(G_OBJECT(main->saveas_tb), "clicked",
+ G_CALLBACK(callback_file_saveas), main);
+ g_signal_connect(G_OBJECT(main->cut_tb), "clicked",
+ G_CALLBACK(callback_edit_cut), main);
+ g_signal_connect(G_OBJECT(main->copy_tb), "clicked",
+ G_CALLBACK(callback_edit_copy), main);
+ g_signal_connect(G_OBJECT(main->paste_tb), "clicked",
+ G_CALLBACK(callback_edit_paste), main);
+ g_signal_connect(G_OBJECT(main->font_tb), "clicked",
+ G_CALLBACK(callback_font), main);
+ g_signal_connect(G_OBJECT(main->fullscreen_tb), "clicked",
+ G_CALLBACK(callback_fullscreen), main);
+
+ /* Add toolbar to the HildonWindow */
+ hildon_window_add_toolbar(main->data->window, GTK_TOOLBAR(main->toolbar));
+
+ /* Show toolbar */
+ gtk_widget_show_all (GTK_WIDGET(main->toolbar));
+ gtk_widget_show_all (GTK_WIDGET(main->data->window) );
+}
+
+/* Create the text area */
+void create_textarea( MainView *main )
+{
+ /* Scrolled window */
+ main->scrolledwindow = gtk_scrolled_window_new(NULL, NULL);
+ gtk_widget_show(main->scrolledwindow);
+ gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(main->scrolledwindow),
+ GTK_POLICY_AUTOMATIC,
+ GTK_POLICY_AUTOMATIC);
+ /* Text view */
+ main->textview = gtk_text_view_new ();
+
+ /* Some text view settings */
+ gtk_text_view_set_editable ( GTK_TEXT_VIEW (main->textview), TRUE );
+ gtk_text_view_set_left_margin (GTK_TEXT_VIEW (main->textview), 10 );
+ gtk_text_view_set_right_margin (GTK_TEXT_VIEW (main->textview), 10 );
+
+ /* Get handle */
+ main->buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (main->textview));
+
+ /* Enable Rich Text Support */
+ gtk_text_buffer_set_can_paste_rich_text ( main->buffer, TRUE );
+ gtk_text_buffer_set_rich_text_format ( main->buffer, "RTF" );
+
+ /* Put textview under scrolledwindow and show it*/
+ gtk_container_add(GTK_CONTAINER(main->scrolledwindow), main->textview);
+ gtk_widget_show(main->textview);
+
+ /* Change default font throughout the widget */
+ main->font_desc = pango_font_description_from_string ("Monospace Regular 22");
+ gtk_widget_modify_font (main->textview, main->font_desc);
+
+ /* Connect signals */
+ g_signal_connect (G_OBJECT (main->buffer), "modified-changed",
+ G_CALLBACK(callback_buffer_modified), main);
+ g_signal_connect (G_OBJECT (main->buffer), "changed",
+ G_CALLBACK(callback_buffer_modified), main);
+}
Added: trunk/org.indt.esbox.ui/templates/MaemoPad/src/ui/interface.h
===================================================================
--- trunk/org.indt.esbox.ui/templates/MaemoPad/src/ui/interface.h (rev 0)
+++ trunk/org.indt.esbox.ui/templates/MaemoPad/src/ui/interface.h 2007-10-08 20:40:11 UTC (rev 106)
@@ -0,0 +1,107 @@
+/*
+ * This file is part of maemopad
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ *
+ * This software is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifndef INTERFACE_H
+#define INTERFACE_H
+
+#include <gtk/gtk.h>
+#include <hildon-widgets/hildon-program.h>
+#include <appdata.h>
+
+#define _(String) gettext(String)
+
+/* confirmation responses */
+#define CONFRESP_YES 1
+#define CONFRESP_NO 2
+#define CONFRESP_OK 3
+#define CONFRESP_CANCEL 4
+#define CONFRESP_ERROR 5
+
+#define MAIN_VIEW_NAME "MainView"
+
+typedef enum {
+ MAEMOPAD_NO_ERROR = 0,
+ MAEMOPAD_ERROR_INVALID_URI,
+ MAEMOPAD_ERROR_SAVE_FAILED,
+ MAEMOPAD_ERROR_OPEN_FAILED
+} MaemopadError;
+
+/* Struct to include view's information */
+typedef struct _MainView MainView;
+struct _MainView
+{
+ /* Handle to app's data */
+ AppData *data;
+
+ /* Fullscreen mode is on (TRUE) or off (FALSE) */
+ gboolean fullscreen;
+
+ /* Items for menu */
+ GtkWidget *file_item;
+ GtkWidget *new_item;
+ GtkWidget *open_item;
+ GtkWidget *save_item;
+ GtkWidget *saveas_item;
+ GtkWidget *edit_item;
+ GtkWidget *cut_item;
+ GtkWidget *copy_item;
+ GtkWidget *paste_item;
+ GtkWidget *font_item;
+ GtkWidget *fullscreen_item;
+
+ /* Toolbar */
+ GtkWidget* toolbar;
+ GtkWidget* iconw;
+ GtkToolItem* new_tb;
+ GtkToolItem* open_tb;
+ GtkToolItem* save_tb;
+ GtkToolItem* saveas_tb;
+ GtkToolItem* separator_tb1;
+ GtkToolItem* cut_tb;
+ GtkToolItem* copy_tb;
+ GtkToolItem* paste_tb;
+ GtkToolItem* separator_tb2;
+ GtkToolItem* font_tb;
+ GtkToolItem* fullscreen_tb;
+
+ /* Textview related */
+ GtkWidget* scrolledwindow; /* textview is under this widget */
+ GtkWidget* textview; /* widget that shows the text */
+ GtkTextBuffer* buffer; /* buffer that contains the text */
+ GtkClipboard* clipboard; /* clipboard for copy/paste */
+
+ PangoFontDescription* font_desc; /* font used in textview */
+
+ gboolean file_edited; /* tells is our file on view edited */
+ gchar* file_name; /* directory/file under editing */
+};
+
+/* Publics: */
+MainView* interface_main_view_new( AppData* data );
+void interface_main_view_destroy( MainView* main );
+char* interface_file_chooser( MainView* main, GtkFileChooserAction action );
+PangoFontDescription* interface_font_chooser( MainView * main );
+gint interface_save_changes_note( MainView* main );
+void interface_error( MaemopadError me, MainView *main );
+
+#endif
Added: trunk/org.indt.esbox.ui/templates/MaemoPad/template.properties
===================================================================
--- trunk/org.indt.esbox.ui/templates/MaemoPad/template.properties (rev 0)
+++ trunk/org.indt.esbox.ui/templates/MaemoPad/template.properties 2007-10-08 20:40:11 UTC (rev 106)
@@ -0,0 +1,24 @@
+#Template Default Values
+MaemoPad.Ctemplate.label=MaemoPad Project
+MaemoPad.Ctemplate.description=MaemoPad Project
+MaemoPad.basics.label=Basic Settings
+MaemoPad.basics.description=Basic properties of a project
+MaemoPad.author.label=Author
+MaemoPad.authorEmail.description=Name of the author
+MaemoPad.authorEmail.label=Author E-mail
+MaemoPad.authorEmail.description=E-mail of the author
+MaemoPad.copyright.label=Copyright notice
+MaemoPad.copyright.description=Your copyright notice
+MaemoPad.copyright.default=Your copyright notice
+MaemoPad.message.default=Hello World!!!
+MaemoPad.message.description=Your hello world greeting message
+MaemoPad.message.label=Hello world greeting
+MaemoPad.applicationName.label=Application Name
+MaemoPad.applicationName.description=Name of application
+MaemoPad.applicationName.default=MaemoPad
+MaemoPad.packageName.label=Package Name
+MaemoPad.packageName.description=Name of the package
+MaemoPad.packageName.default=maemopad
+MaemoPad.version.label=Version
+MaemoPad.version.description=Version of application
+MaemoPad.version.default=0.1
\ No newline at end of file
Added: trunk/org.indt.esbox.ui/templates/MaemoPad/template.xml
===================================================================
--- trunk/org.indt.esbox.ui/templates/MaemoPad/template.xml (rev 0)
+++ trunk/org.indt.esbox.ui/templates/MaemoPad/template.xml 2007-10-08 20:40:11 UTC (rev 106)
@@ -0,0 +1,203 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<template type="ProjTempl" version="1.0" supplier="Eclipse.org" revision="1.0" author="Intel Corporation"
+ copyright="Copyright (c) 2007 Intel Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html"
+ id="MaemoPadProject" label="%MaemoPad.Ctemplate.label" description="%MaemoPad.Ctemplate.description"
+ help="help.html">
+ <property-group id="basics" label="%MaemoPad.basics.label" description="%MaemoPad.basics.description" type="PAGES-ONLY" help="help.html">
+ <property id="author"
+ label="%MaemoPad.author.label"
+ description="%MaemoPad.author.description"
+ type="input"
+ pattern=".*"
+ default=""
+ hidden="false"
+ persist="true"/>
+ <property id="authorEmail"
+ label="%MaemoPad.authorEmail.label"
+ description="%MaemoPad.authorEmail.description"
+ type="input"
+ pattern=".*"
+ default=""
+ hidden="false"
+ persist="true"/>
+ <property id="copyright"
+ label="%MaemoPad.copyright.label"
+ description="%MaemoPad.copyright.description"
+ type="input"
+ pattern=".*"
+ default="%MaemoPad.copyright.default"
+ hidden="false"
+ persist="true"/>
+ <property id="message"
+ label="%MaemoPad.message.label"
+ description="%MaemoPad.message.description"
+ type="input"
+ pattern=".*"
+ default="%MaemoPad.message.default"
+ hidden="false"
+ persist="true"/>
+ <property id="applicationName"
+ label="%MaemoPad.applicationName.label"
+ description="%MaemoPad.applicationName.description"
+ type="input"
+ pattern=".*"
+ default="$(projectName)"
+ hidden="false"
+ persist="true"/>
+ <property id="packageName"
+ label="%MaemoPad.packageName.label"
+ description="%MaemoPad.packageName.description"
+ type="input"
+ pattern=".*"
+ default="$(projectName)"
+ hidden="false"
+ persist="true"/>
+ <property id="version"
+ label="%MaemoPad.version.label"
+ description="%MaemoPad.version.description"
+ type="input"
+ pattern=".*"
+ default="%MaemoPad.version.default"
+ hidden="false"
+ persist="true"/>
+
+ </property-group>
+
+ <process type="org.eclipse.cdt.core.CreateSourceFolder">
+ <simple name="projectName" value="$(projectName)"/>
+ <simple name="path" value="src"/>
+ </process>
+
+ <process type="org.eclipse.cdt.core.AddFiles">
+ <simple name="projectName" value="$(projectName)"/>
+ <complex-array name="files">
+ <element>
+ <simple name="source" value="autogen.sh"/>
+ <simple name="target" value="autogen.sh"/>
+ <simple name="replaceable" value="false"/>
+ </element>
+ <element>
+ <simple name="source" value="configure.ac"/>
+ <simple name="target" value="configure.ac"/>
+ <simple name="replaceable" value="true"/>
+ </element>
+ <element>
+ <simple name="source" value="Makefile.am"/>
+ <simple name="target" value="Makefile.am"/>
+ <simple name="replaceable" value="true"/>
+ </element>
+ <element>
+ <simple name="source" value="COPYING"/>
+ <simple name="target" value="COPYING"/>
+ <simple name="replaceable" value="false"/>
+ </element>
+ <element>
+ <simple name="source" value="src/main.c"/>
+ <simple name="target" value="src/main.c"/>
+ <simple name="replaceable" value="false"/>
+ </element>
+ <element>
+ <simple name="source" value="src/Makefile.am"/>
+ <simple name="target" value="src/Makefile.am"/>
+ <simple name="replaceable" value="true"/>
+ </element>
+ <element>
+ <simple name="source" value="src/appdata.h"/>
+ <simple name="target" value="src/appdata.h"/>
+ <simple name="replaceable" value="false"/>
+ </element>
+ <element>
+ <simple name="source" value="src/ui/callbacks.c"/>
+ <simple name="target" value="src/ui/callbacks.c"/>
+ <simple name="replaceable" value="false"/>
+ </element>
+ <element>
+ <simple name="source" value="src/ui/callbacks.h"/>
+ <simple name="target" value="src/ui/callbacks.h"/>
+ <simple name="replaceable" value="false"/>
+ </element>
+ <element>
+ <simple name="source" value="src/ui/interface.c"/>
+ <simple name="target" value="src/ui/interface.c"/>
+ <simple name="replaceable" value="false"/>
+ </element>
+ <element>
+ <simple name="source" value="src/ui/interface.h"/>
+ <simple name="target" value="src/ui/interface.h"/>
+ <simple name="replaceable" value="false"/>
+ </element>
+ <element>
+ <simple name="source" value="po/ChangeLog"/>
+ <simple name="target" value="po/ChangeLog"/>
+ <simple name="replaceable" value="false"/>
+ </element>
+ <element>
+ <simple name="source" value="po/en_GB.po"/>
+ <simple name="target" value="po/en_GB.po"/>
+ <simple name="replaceable" value="false"/>
+ </element>
+ <element>
+ <simple name="source" value="po/Makefile.am"/>
+ <simple name="target" value="po/Makefile.am"/>
+ <simple name="replaceable" value="false"/>
+ </element>
+ <element>
+ <simple name="source" value="po/Makefile.in.in"/>
+ <simple name="target" value="po/Makefile.in.in"/>
+ <simple name="replaceable" value="false"/>
+ </element>
+ <element>
+ <simple name="source" value="po/porules.mk.in"/>
+ <simple name="target" value="po/porules.mk.in"/>
+ <simple name="replaceable" value="false"/>
+ </element>
+ <element>
+ <simple name="source" value="po/POTFILES.in"/>
+ <simple name="target" value="po/POTFILES.in"/>
+ <simple name="replaceable" value="false"/>
+ </element>
+ <element>
+ <simple name="source" value="debian/control"/>
+ <simple name="target" value="debian/control"/>
+ <simple name="replaceable" value="true"/>
+ </element>
+ <element>
+ <simple name="source" value="debian/copyright"/>
+ <simple name="target" value="debian/copyright"/>
+ <simple name="replaceable" value="false"/>
+ </element>
+ <element>
+ <simple name="source" value="debian/postinst"/>
+ <simple name="target" value="debian/postinst"/>
+ <simple name="replaceable" value="true"/>
+ </element>
+ <element>
+ <simple name="source" value="debian/rules.in"/>
+ <simple name="target" value="debian/rules.in"/>
+ <simple name="replaceable" value="true"/>
+ </element>
+ <element>
+ <simple name="source" value="debian/changelog"/>
+ <simple name="target" value="debian/changelog"/>
+ <simple name="replaceable" value="true"/>
+ </element>
+ <element>
+ <simple name="source" value="data/com.nokia.PACKAGE.service.in"/>
+ <simple name="target" value="data/com.nokia.$(packageName).service.in"/>
+ <simple name="replaceable" value="true"/>
+ </element>
+ <element>
+ <simple name="source" value="data/Makefile.am"/>
+ <simple name="target" value="data/Makefile.am"/>
+ <simple name="replaceable" value="true"/>
+ </element>
+ <element>
+ <simple name="source" value="data/PACKAGE.desktop.in"/>
+ <simple name="target" value="data/$(packageName).desktop.in"/>
+ <simple name="replaceable" value="true"/>
+ </element>
+ </complex-array>
+ </process>
+
+</template>
+
More information about the Esbox-commits
mailing list