initial import for alarm module

its a replacement for eveil. you can set reminders with it
what has changed ?
 - no more useless animations
 - no more countdown feature
 - bugs fixed =)
still some things to fix : first, the module ICON and NAME ... if somebody can help ...

gouloum !


SVN revision: 27016
This commit is contained in:
kiwi 2006-11-08 10:06:38 +00:00 committed by kiwi
commit 5856eaf7d9
29 changed files with 4883 additions and 0 deletions

0
ABOUT-NLS Normal file
View File

5
AUTHORS Normal file
View File

@ -0,0 +1,5 @@
Laurent 'kiwi' Ghigonis
Alarm icon : Kalarm
ooookiwi@gmail.com
http://oooo.zapto.org

340
COPYING Normal file
View File

@ -0,0 +1,340 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 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.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, 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 or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
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 give any other recipients of the Program a copy of this License
along with the Program.
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 Program or any portion
of it, thus forming a work based on the Program, 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) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
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 Program, 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 Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) 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; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, 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 executable. However, as a
special exception, the source code 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.
If distribution of executable or 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 counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program 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.
5. 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 Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program 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 to
this License.
7. 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 Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program 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 Program.
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.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program 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.
9. The Free Software Foundation may publish revised and/or new versions
of the 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 Program
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 Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, 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
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "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 PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. 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 PROGRAM 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 PROGRAM (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 PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

0
ChangeLog Normal file
View File

236
INSTALL Normal file
View File

@ -0,0 +1,236 @@
Installation Instructions
*************************
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
Software Foundation, Inc.
This file is free documentation; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it.
Basic Installation
==================
These are generic installation instructions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, and a
file `config.log' containing compiler output (useful mainly for
debugging `configure').
It can also use an optional file (typically called `config.cache'
and enabled with `--cache-file=config.cache' or simply `-C') that saves
the results of its tests to speed up reconfiguring. (Caching is
disabled by default to prevent problems with accidental use of stale
cache files.)
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If you are using the cache, and at
some point `config.cache' contains results you don't want to keep, you
may remove or edit it.
The file `configure.ac' (or `configure.in') is used to create
`configure' by a program called `autoconf'. You only need
`configure.ac' if you want to change it or regenerate `configure' using
a newer version of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package.
4. Type `make install' to install the programs and any data files and
documentation.
5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that the
`configure' script does not know about. Run `./configure --help' for
details on some of the pertinent environment variables.
You can give `configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here
is an example:
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
*Note Defining Variables::, for more details.
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not support the `VPATH'
variable, you have to compile the package for one architecture at a
time in the source code directory. After you have installed the
package for one architecture, use `make distclean' before reconfiguring
for another architecture.
Installation Names
==================
By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix other than `/usr/local' by giving `configure' the
option `--prefix=PREFIX'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
give `configure' the option `--exec-prefix=PREFIX', the package will
use PREFIX as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=DIR' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Specifying the System Type
==========================
There may be some features `configure' cannot figure out automatically,
but needs to determine by the type of machine the package will run on.
Usually, assuming the package is built to be run on the _same_
architectures, `configure' can figure that out, but if it prints a
message saying it cannot guess the machine type, give it the
`--build=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name which has the form:
CPU-COMPANY-SYSTEM
where SYSTEM can have one of these forms:
OS KERNEL-OS
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the machine type.
If you are _building_ compiler tools for cross-compiling, you should
use the `--target=TYPE' option to select the type of system they will
produce code for.
If you want to _use_ a cross compiler, that generates code for a
platform different from the build platform, you should specify the
"host" platform (i.e., that on which the generated programs will
eventually be run) with `--host=TYPE'.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share, you
can create a site shell script called `config.site' that gives default
values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Defining Variables
==================
Variables not defined in a site shell script can be set in the
environment passed to `configure'. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
them in the `configure' command line, using `VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc
causes the specified `gcc' to be used as the C compiler (unless it is
overridden in the site shell script). Here is a another example:
/bin/bash ./configure CONFIG_SHELL=/bin/bash
Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
configuration-related scripts to be executed by `/bin/bash'.
`configure' Invocation
======================
`configure' recognizes the following options to control how it operates.
`--help'
`-h'
Print a summary of the options to `configure', and exit.
`--version'
`-V'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`--cache-file=FILE'
Enable the cache: use and save the results of the tests in FILE,
traditionally `config.cache'. FILE defaults to `/dev/null' to
disable caching.
`--config-cache'
`-C'
Alias for `--cache-file=config.cache'.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.

42
Makefile.am Normal file
View File

@ -0,0 +1,42 @@
MAINTAINERCLEANFILES = Makefile.in
SUBDIRS = po
EDJE_CC = @edje_cc@
EDJE_FLAGS = -v \
-id $(top_srcdir) \
-fd $(top_srcdir)/fonts
filesdir = $(datadir)
files_DATA = module_icon.png module.edj module.desktop\
$(wildcard alarm.ed?) \
$(wildcard fonts/*.ttf) \
$(wildcard images/*.png)
EXTRA_DIST = $(files_DATA) e_modules-alarm.spec
CONFIG_CLEAN_FILES = e_modules-alarm.spec alarm.edj
# the module .so file
INCLUDES = -I. \
-I$(top_srcdir) \
-I$(includedir) \
@e_cflags@
pkgdir = $(datadir)/$(MODULE_ARCH)
pkg_LTLIBRARIES = module.la
module_la_SOURCES = e_mod_main.c \
e_mod_main.h \
e_mod_config.c \
e_mod_config_alarm.c
module_la_LIBADD = @e_libs@
module_la_LDFLAGS = -module -avoid-version
module_la_DEPENDENCIES = $(top_builddir)/config.h $(top_builddir)/alarm.edj
alarm.edj: Makefile alarm.edc
$(EDJE_CC) $(EDJE_FLAGS) \
$(top_srcdir)/alarm.edc \
$(top_builddir)/alarm.edj
clean-local:
rm -rf alarm.edj *~

0
NEWS Normal file
View File

3
README Normal file
View File

@ -0,0 +1,3 @@
Enlightenment Alarm Module
A module to set Alarms in Enlightenment 17

23
TODO Normal file
View File

@ -0,0 +1,23 @@
-------------------------------------------
BUGS
-------------------------------------------
- MODULE_VERSION don't show up
- module icon and name are screwed up
-------------------------------------------
TODO
-------------------------------------------
- add predefined alarms action like command is not user friendly
- full size popup like exebuf when ringing
- alarm logo like an e, instead of alarm clock image, a bit like on e_module
- ? keep alarms on config change ?
- exact alarm time ring
- pill mode for alarms
- handle alarms wich happend when no E on come back
- 12h time format
- dont share state for icons and detail between instance
and save it

410
alarm.edc Normal file
View File

@ -0,0 +1,410 @@
/* Enlightenment Alarm Module theme */
images
{
image: "images/alarm_enabled.png" COMP;
image: "images/alarm_disabled.png" COMP;
image: "images/alarm_snooze.png" COMP;
}
collections
{
group
{
name: "modules/alarm/main";
script
{
public alarm_state;
public alarm_ringing;
}
parts
{
part
{
name: "alarm_img";
type: IMAGE;
mouse_events: 1;
description
{
state: "default" 0.0;
aspect: 1 1;
aspect_preference: BOTH;
align: 0.0 0.0;
color: 255 255 255 200;
rel1
{
relative: 0.0 0.0;
}
rel2
{
relative: 1.0 1.0;
}
image
{
normal: "images/alarm_disabled.png";
}
fill
{
smooth: 0;
}
}
description
{
state: "enabled" 0.0;
aspect: 1 1;
aspect_preference: BOTH;
align: 0.0 0.0;
color: 255 255 255 200;
rel1
{
relative: 0.0 0.0;
}
rel2
{
relative: 1.0 1.0;
}
image
{
normal: "images/alarm_enabled.png";
}
fill
{
smooth: 0;
}
}
description
{
state: "enabled_little" 0.0;
inherit: "enabled" 0.0;
rel1
{
relative: 0.3 0.3;
}
rel2
{
relative: 0.7 0.7;
}
}
}
part
{
name, "alarm_txt";
type: RECT;
mouse_events: 0;
description
{
state: "default" 0.0;
visible: 0;
rel1
{
relative: 1.0 0.05;
}
rel2
{
relative: 1.0 0.95;
}
color: 255 255 255 255;
}
description
{
state: "enabled" 0.0;
inherit: default 0.0;
visible: 1;
rel1
{
relative: 1.0 0.1;
to_x: "alarm_img";
offset: 2 0;
}
}
}
part
{
name, "alarm_txt_line";
type: TEXT;
effect: OUTLINE_SOFT_SHADOW;
mouse_events: 0;
clip_to: "alarm_txt";
description
{
state: "default" 0.0;
rel1
{
relative: 0.0 0.0;
to: "alarm_txt";
}
rel2
{
relative: 1.0 1.0;
to: "alarm_txt";
}
color: 255 255 255 255;
color2: 0 0 0 96;
color3: 0 0 0 32;
text
{
text: "-- --:--";
font: "VeraBd";
size: 12;
fit: 1 1;
align: 0.0 0.5;
text_class: "module_large";
}
}
}
}
programs
{
program
{
name: "init";
signal: "load";
source: "";
script
{
set_int(alarm_state, 0);
set_int(alarm_ringing, 0);
}
}
program
{
name: "alarm_img_mouse_down";
signal: "mouse,up,1";
source: "alarm_img";
script
{
if (get_int(alarm_state) == 0)
{
run_program(PROGRAM:"alarm_activate");
emit("state,on", "");
}
else
{
if (get_int(alarm_ringing))
{
run_program(PROGRAM:"alarm_ring_stop");
emit("ring,stop", "");
}
else
{
run_program(PROGRAM:"alarm_deactivate");
emit("state,off", "");
}
}
}
}
program
{
name: "alarm_activate";
signal: "state,on";
source: "alarm";
action: STATE_SET "enabled" 0.0;
target: "alarm_img";
after: "alarm_activate_2";
}
program
{
name: "alarm_activate_2";
script
{
set_int(alarm_ringing, 0);
set_int(alarm_state, 1);
}
}
program
{
name: "alarm_deactivate";
signal: "state,off";
source: "alarm";
action: STATE_SET "default" 0.0;
target: "alarm_img";
after: "alarm_deactivate_2";
}
program
{
name: "alarm_deactivate_2";
script
{
set_int(alarm_state, 0);
}
}
program
{
name: "alarm_ring_go";
signal: "ring,start";
source: "alarm";
script
{
set_int(alarm_ringing, 1);
run_program(PROGRAM:"alarm_ring_go_1");
}
}
program
{
name: "alarm_ring_go_1";
action: STATE_SET "enabled_little" 0.0;
transition: SINUSOIDAL .3;
target: "alarm_img";
after: "alarm_ring_go_2";
}
program
{
name: "alarm_ring_go_2";
action: STATE_SET "enabled" 0.0;
transition: SINUSOIDAL .5;
target: "alarm_img";
after: "alarm_ring_go_1";
}
program
{
name: "alarm_ring_stop";
script
{
set_int(alarm_ringing, 0);
set_state(PART:"alarm_img", "enabled", 0.0);
}
}
program
{
name: "alarm_detail_show";
signal: "details,on";
source: "alarm";
action: STATE_SET "enabled" 0.0;
target: "alarm_txt";
}
program
{
name: "alarm_detail_hide";
signal: "details,off";
source: "alarm";
action: STATE_SET "default" 0.0;
target: "alarm_txt";
}
}
}
group
{
name: "modules/alarm/icon/alarm/snooze";
parts
{
part
{
name: "icon";
type: IMAGE;
mouse_events: 1;
description
{
state: "default" 0.0;
aspect: 1 1;
aspect_preference: BOTH;
align: 0.0 0.0;
color: 255 255 255 200;
rel1
{
relative: 0.0 0.0;
offset: 2 2;
}
rel2
{
relative: 1.0 1.0;
offset: -2 -2;
}
image
{
normal: "images/alarm_snooze.png";
}
fill
{
smooth: 1;
}
}
}
}
}
group
{
name: "modules/alarm/icon/alarm/on";
parts
{
part
{
name: "icon";
type: IMAGE;
mouse_events: 1;
description
{
state: "default" 0.0;
aspect: 1 1;
aspect_preference: BOTH;
align: 0.0 0.0;
color: 255 255 255 200;
rel1
{
relative: 0.0 0.0;
}
rel2
{
relative: 1.0 1.0;
}
image
{
normal: "images/alarm_enabled.png";
}
fill
{
smooth: 1;
}
}
}
}
}
group
{
name: "modules/alarm/icon/alarm/off";
parts
{
part
{
name: "icon";
type: IMAGE;
mouse_events: 1;
description
{
state: "default" 0.0;
aspect: 1 1;
aspect_preference: BOTH;
align: 0.0 0.0;
color: 255 255 255 200;
rel1
{
relative: 0.0 0.0;
}
rel2
{
relative: 1.0 1.0;
}
image
{
normal: "images/alarm_disabled.png";
}
fill
{
smooth: 1;
}
}
}
}
}
}

27
autogen.sh Executable file
View File

@ -0,0 +1,27 @@
#!/bin/sh
rm -rf autom4te.cache
rm -f aclocal.m4 ltmain.sh
touch README
echo "Running aclocal..." ; aclocal $ACLOCAL_FLAGS || exit 1
echo "Running autoheader..." ; autoheader || exit 1
echo "Running autoconf..." ; autoconf || exit 1
echo "Running libtoolize..." ; (libtoolize --copy --automake || glibtoolize --automake) || exit 1
echo "Running automake..." ; automake --add-missing --copy --gnu || exit 1
echo "Generating gettext alarm.pot template"; \
xgettext \
--output alarm.pot \
--output-dir=po \
--language=C \
--add-location \
--keyword=D_ \
--sort-by-file \
--copyright-holder="TODO" \
--foreign-user \
`find . -name "*.[ch]" -print` || exit 1
if [ -z "$NOCONFIGURE" ]; then
./configure "$@"
fi

160
configure.in Normal file
View File

@ -0,0 +1,160 @@
dnl Process this file with autoconf to produce a configure script.
# get rid of that stupid cache mechanism
rm -f config.cache
#alarm module version
version="0.1.0"
AC_INIT(configure.in)
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AM_INIT_AUTOMAKE(alarm, $version)
AM_CONFIG_HEADER(config.h)
AC_ISC_POSIX
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_STDC
AC_C_CONST
AM_ENABLE_SHARED
AM_PROG_LIBTOOL
ALL_LINGUAS="eo it ja sv"
AC_SUBST(ALL_LINGUAS)
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION(0.14)
MODULE_ARCH="$host_os-$host_cpu"
AC_SUBST(MODULE_ARCH)
AC_DEFINE_UNQUOTED(MODULE_ARCH, "$MODULE_ARCH", "Module architecture")
AC_DEFINE_UNQUOTED(MODULE_VERSION, "$version", "Module version")
if test "x${bindir}" = 'x${exec_prefix}/bin'; then
if test "x${exec_prefix}" = "xNONE"; then
if test "x${prefix}" = "xNONE"; then
bindir="${ac_default_prefix}/bin";
else
bindir="${prefix}/bin";
fi
else
if test "x${prefix}" = "xNONE"; then
bindir="${ac_default_prefix}/bin";
else
bindir="${prefix}/bin";
fi
fi
fi
if test "x${libdir}" = 'x${exec_prefix}/lib'; then
if test "x${exec_prefix}" = "xNONE"; then
if test "x${prefix}" = "xNONE"; then
libdir="${ac_default_prefix}/lib";
else
libdir="${prefix}/lib";
fi
else
if test "x${prefix}" = "xNONE"; then
libdir="${ac_default_prefix}/lib";
else
libdir="${prefix}/lib";
fi
fi
fi
dnl Set PACKAGE_BIN_DIR in config.h.
if test "x${bindir}" = 'xNONE'; then
if test "x${prefix}" = "xNONE"; then
AC_DEFINE_UNQUOTED(PACKAGE_BIN_DIR, "${ac_default_prefix}/bin", "Package installed binaries destination")
else
AC_DEFINE_UNQUOTED(PACKAGE_BIN_DIR, "${prefix}/bin", "Package installed binaries destination")
fi
else
AC_DEFINE_UNQUOTED(PACKAGE_BIN_DIR, "${bindir}", "Package installed binaries destination")
fi
dnl Set PACKAGE_LIB_DIR in config.h.
if test "x${libdir}" = 'xNONE'; then
if test "x${prefix}" = "xNONE"; then
AC_DEFINE_UNQUOTED(PACKAGE_LIB_DIR, "${ac_default_prefix}/lib", "Package installed libraries destination")
else
AC_DEFINE_UNQUOTED(PACKAGE_LIB_DIR, "${prefix}/lib", "Package installed libraries destination")
fi
else
AC_DEFINE_UNQUOTED(PACKAGE_LIB_DIR, "${libdir}", "Package installed libraries destination")
fi
dnl Set PACKAGE_DATA_DIR in config.h.
if test "x${prefix}" = "xNONE"; then
AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${HOME}/.e/e/modules/${PACKAGE}", "Package installed data destination")
datadir="${HOME}/.e/e/modules/${PACKAGE}"
else
AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${libdir}/enlightenment/modules/${PACKAGE}", "Package installed data destination")
datadir="${libdir}/enlightenment/modules/${PACKAGE}"
fi
AC_PREFIX_DEFAULT(${HOME}/.e/e)
if test "x$prefix" = "xNONE"; then
datarootdir=${ac_default_prefix}
else
datarootdir=${prefix}/share
fi
localedir=${datarootdir}/locale
AC_SUBST(LOCALEDIR, "${localedir}")
AC_DEFINE_UNQUOTED(LOCALEDIR, "${localedir}", [Module Locale Directory])
#AC_CHECK_LIB(dl, dlopen, dlopen_libs=-ldl)
#AC_SUBST(dlopen_libs)
AC_ARG_WITH(edje-config,
[ --with-edje-config=EDJE_CONFIG use edje-config specified ],
[
EDJE_CONFIG=$withval;
echo "using "$EDJE_CONFIG" for edje-config";
/
],[
PROG="edje-config";
AC_PATH_PROG(EDJE_CONFIG, $PROG, "", $PATH)
])
edje_cflags=`$EDJE_CONFIG --cflags`
edje_libs=`$EDJE_CONFIG --libs`
AC_SUBST(edje_cflags)
AC_SUBST(edje_libs)
edje_cc="`$EDJE_CONFIG --prefix`/bin/edje_cc"
AC_ARG_WITH(edje-cc,
[ --with-edje-cc=PATH specify a specific path to edje_cc],
[
v=$withval;
edje_cc=$v
echo " Enlightenment edje_cc explicitly set to "$edje_cc;
],[
edje_cc="`$EDJE_CONFIG --prefix`/bin/edje_cc"
])
AC_SUBST(edje_cc)
AC_ARG_WITH(enlightenment-config,
[ --with-enlightenment-config=E_CONFIG use enlightenment-config specified ],
[
E_CONFIG=$withval;
echo "using "$E_CONFIG" for enlightenment-config";
],[
PROG="enlightenment-config";
AC_PATH_PROG(E_CONFIG, $PROG, "", $PATH)
])
e_cflags=`$E_CONFIG --cflags`
e_libs=`$E_CONFIG --libs`
e_modules=`$E_CONFIG --module-dir`
AC_SUBST(e_cflags)
AC_SUBST(e_libs)
AC_SUBST(e_modules)
AC_OUTPUT([
Makefile
po/Makefile
e_modules-alarm.spec
module.desktop
],[
])

334
e_mod_config.c Normal file
View File

@ -0,0 +1,334 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#include "e.h"
#include "e_mod_main.h"
struct _E_Config_Dialog_Data
{
int time_format;
Evas_Object *alarms_ilist;
E_Config_Dialog *alarms_cfd;
int alarms_active;
int alarms_autoremove_default;
int alarms_details;
int alarms_open_popup_default;
int alarms_run_program_default;
char *alarms_program_default;
};
static void *_create_data(E_Config_Dialog *cfd);
static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
static void _fill_data(E_Config_Dialog_Data *cfdata);
static void _common_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata, Evas_Object *o);
static int _common_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
static Evas_Object *_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
static int _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
static Evas_Object *_advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
static int _advanced_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
static void _cb_alarms_list(void *data);
static void _cb_alarm_add(void *data, void *data2);
static void _cb_alarm_del(void *data, void *data2);
static void _cb_alarm_config(void *data, void *data2);
void
alarm_config_module(void)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
char buf[4096];
v = E_NEW(E_Config_Dialog_View, 1);
v->create_cfdata = _create_data;
v->free_cfdata = _free_data;
v->basic.apply_cfdata = _basic_apply_data;
v->basic.create_widgets = _basic_create_widgets;
v->advanced.apply_cfdata = _advanced_apply_data;
v->advanced.create_widgets = _advanced_create_widgets;
snprintf(buf, sizeof(buf), "%s/module.edj", e_module_dir_get(alarm_config->module));
cfd = e_config_dialog_new(e_container_current_get(e_manager_current_get()),
D_("Alarm Configuration"), "Alarm", "_e_modules_alarm_config_dialog", buf, 0, v, NULL);
alarm_config->config_dialog = cfd;
}
void
alarm_config_refresh_alarms_ilist(E_Config_Dialog_Data *cfdata)
{
Evas_List *l;
int pos;
int wmw, wmh;
pos = e_widget_ilist_selected_get(cfdata->alarms_ilist);
e_widget_ilist_clear(cfdata->alarms_ilist);
for(l=alarm_config->alarms; l; l=evas_list_next(l))
{
Evas_Object *ic;
Alarm *al;
char buf[1024], bufdate[15];
al = evas_list_data(l);
if (al->state == ALARM_STATE_OFF)
ic = NULL;
else
{
ic = e_icon_add(evas_object_evas_get(cfdata->alarms_ilist));
if (!alarm_config->theme) e_util_edje_icon_set(ic, THEME_ICON_ALARM_ON);
else e_icon_file_edje_set(ic, alarm_config->theme, THEME_ICON_ALARM_ON);
}
if (al->sched.type == ALARM_SCHED_DAY)
{
struct tm *st;
time_t t;
t = al->sched.date_epoch - (al->sched.hour*3600) - (al->sched.minute*60);
st = localtime(&t);
strftime(bufdate, sizeof(bufdate), "%m/%d", st);
snprintf(buf, sizeof(buf), "%s (%s %.2d:%.2d)", al->name, bufdate, al->sched.hour, al->sched.minute);
}
else
{
// TODO: show the days of the week
snprintf(buf, sizeof(buf), "%s (Weekly %.2d:%.2d)", al->name, al->sched.hour, al->sched.minute);
}
e_widget_ilist_append(cfdata->alarms_ilist, ic, buf, _cb_alarms_list, cfdata, NULL);
}
e_widget_min_size_get(cfdata->alarms_ilist, &wmw, &wmh);
if (evas_list_count(alarm_config->alarms) > 0)
e_widget_min_size_set(cfdata->alarms_ilist, wmw, 200);
else
e_widget_min_size_set(cfdata->alarms_ilist, 165, 100);
e_widget_ilist_go(cfdata->alarms_ilist);
e_widget_ilist_selected_set(cfdata->alarms_ilist, pos);
}
static void *
_create_data(E_Config_Dialog *cfd)
{
E_Config_Dialog_Data *cfdata;
cfdata = E_NEW(E_Config_Dialog_Data, 1);
_fill_data(cfdata);
return cfdata;
}
static void
_free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
{
free(cfdata->alarms_program_default);
alarm_config->config_dialog = NULL;
free(cfdata);
}
static void
_fill_data(E_Config_Dialog_Data *cfdata)
{
cfdata->time_format = alarm_config->time_format;
if (alarm_config->alarms_state == ALARM_STATE_OFF)
cfdata->alarms_active = ALARM_STATE_OFF;
else
cfdata->alarms_active = ALARM_STATE_ON;
cfdata->alarms_autoremove_default = alarm_config->alarms_autoremove_default;
cfdata->alarms_details = alarm_config->alarms_details;
cfdata->alarms_open_popup_default = alarm_config->alarms_open_popup_default;
cfdata->alarms_run_program_default = alarm_config->alarms_run_program_default;
if (alarm_config->alarms_program_default)
cfdata->alarms_program_default = strdup(alarm_config->alarms_program_default);
else
cfdata->alarms_program_default = strdup("");
}
static void
_common_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata, Evas_Object *o)
{
Evas_Object *of, *ob;
of = e_widget_frametable_add(evas, D_("Alarm"), 0);
ob = e_widget_check_add(evas, D_("Active"), &(cfdata->alarms_active));
e_widget_frametable_object_append(of, ob, 0, 0, 2, 1, 1, 1, 1, 10);
ob = e_widget_ilist_add(evas, 16, 16, NULL);
e_widget_ilist_selector_set(ob, 1);
cfdata->alarms_ilist = ob;
alarm_config_refresh_alarms_ilist(cfdata);
e_widget_frametable_object_append(of, ob, 0, 1, 3, 1, 1, 1, 1, 1);
ob = e_widget_button_add(evas, _("Add"), NULL, _cb_alarm_add, cfdata, NULL);
e_widget_frametable_object_append(of, ob, 0, 2, 1, 1, 1, 1, 1, 1);
ob = e_widget_button_add(evas, _("Delete"), NULL, _cb_alarm_del, cfdata, NULL);
e_widget_frametable_object_append(of, ob, 1, 2, 1, 1, 1, 1, 1, 1);
ob = e_widget_button_add(evas, _("Configure"), NULL, _cb_alarm_config, cfdata, NULL);
e_widget_frametable_object_append(of, ob, 2, 2, 1, 1, 1, 1, 1, 1);
e_widget_table_object_append(o, of, 0, 0, 1, 2, 1, 1, 1, 1);
}
static int
_common_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
{
if (alarm_config->alarms_state != cfdata->alarms_active)
{
alarm_config->alarms_state = cfdata->alarms_active;
if (cfdata->alarms_active)
alarm_edje_signal_emit(EDJE_SIG_SEND_ALARM_STATE_ON);
else
alarm_edje_signal_emit(EDJE_SIG_SEND_ALARM_STATE_OFF);
}
return 1;
}
static Evas_Object *
_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
{
Evas_Object *o;
o = e_widget_table_add(evas, 0);
_common_create_widgets(cfd, evas, cfdata, o);
return o;
}
static int
_basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
{
int ret;
ret = _common_apply_data(cfd, cfdata);
e_config_save_queue();
return ret;
}
static Evas_Object *
_advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
{
Evas_Object *o, *of, *ob;
E_Radio_Group *rg;
o = e_widget_table_add(evas, 1);
_common_create_widgets(cfd, evas, cfdata, o);
of = e_widget_frametable_add(evas, D_("Alarm Options"), 1);
/*
ob = e_widget_label_add(evas, D_("Time format"));
e_widget_frametable_object_append(of, ob, 0, 0, 1, 1, 1, 1, 1, 1);
rg = e_widget_radio_group_new(&(cfdata->time_format));
ob = e_widget_radio_add(evas, D_("12h"), TIME_FORMAT_12, rg);
e_widget_frametable_object_append(of, ob, 1, 0, 1, 1, 1, 1, 1, 1);
ob = e_widget_radio_add(evas, D_("24h"), TIME_FORMAT_24, rg);
e_widget_frametable_object_append(of, ob, 2, 0, 1, 1, 1, 1, 1, 1);
*/
ob = e_widget_check_add(evas, D_("Show next alarm"), &(cfdata->alarms_details));
e_widget_frametable_object_append(of, ob, 0, 1, 1, 1, 1, 1, 1, 1);
e_widget_table_object_append(o, of, 1, 0, 1, 1, 1, 0, 1, 0);
of = e_widget_frametable_add(evas, D_("Alarms Defaults"), 1);
ob = e_widget_check_add(evas, D_("Open popup"), &(cfdata->alarms_open_popup_default));
e_widget_frametable_object_append(of, ob, 0, 0, 1, 1, 1, 1, 1, 1);
ob = e_widget_check_add(evas, D_("Run program"), &(cfdata->alarms_run_program_default));
e_widget_frametable_object_append(of, ob, 0, 1, 1, 1, 1, 1, 1, 1);
ob = e_widget_entry_add(evas, &(cfdata->alarms_program_default));
e_widget_min_size_set(ob, 110, 25);
e_widget_frametable_object_append(of, ob, 0, 2, 1, 1, 1, 1, 1, 1);
ob = e_widget_check_add(evas, D_("Auto-Remove alarms after its passed"), &(cfdata->alarms_autoremove_default));
e_widget_frametable_object_append(of, ob, 0, 3, 1, 1, 1, 1, 1, 1);
e_widget_table_object_append(o, of, 1, 1, 1, 1, 1, 0, 1, 0);
return o;
}
static int
_advanced_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
{
int ret;
ret = _common_apply_data(cfd, cfdata);
alarm_config->time_format = cfdata->time_format;
if (alarm_config->alarms_details != cfdata->alarms_details)
{
alarm_config->alarms_details = cfdata->alarms_details;
alarm_details_change();
}
alarm_config->alarms_autoremove_default = cfdata->alarms_autoremove_default;
alarm_config->alarms_open_popup_default = cfdata->alarms_open_popup_default;
alarm_config->alarms_run_program_default = cfdata->alarms_run_program_default;
if (alarm_config->alarms_program_default)
evas_stringshare_del(alarm_config->alarms_program_default);
alarm_config->alarms_program_default = evas_stringshare_add(cfdata->alarms_program_default);
e_config_save_queue();
return ret;
}
static void
_cb_alarms_list(void *data)
{
E_Config_Dialog_Data *cfdata;
cfdata = data;
}
static void
_cb_alarm_add(void *data, void *data2)
{
if (alarm_config->config_dialog_alarm_new) return;
alarm_config_alarm(NULL);
}
static void
_cb_alarm_del(void *data, void *data2)
{
E_Config_Dialog_Data *cfdata;
Alarm *al;
cfdata = data;
al = evas_list_nth(alarm_config->alarms,
e_widget_ilist_selected_get(cfdata->alarms_ilist));
if (!al)
return;
alarm_alarm_del(al);
e_config_save_queue();
}
static void
_cb_alarm_config(void *data, void *data2)
{
E_Config_Dialog_Data *cfdata;
Alarm *al;
cfdata = data;
al = evas_list_nth(alarm_config->alarms,
e_widget_ilist_selected_get(cfdata->alarms_ilist));
if (!al) return;
if (al->config_dialog) return;
alarm_config_alarm(al);
}

521
e_mod_config_alarm.c Normal file
View File

@ -0,0 +1,521 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#include "e.h"
#include "e_mod_main.h"
struct _E_Config_Dialog_Data
{
int new;
Alarm *al;
char *name;
int state;
char *description;
int autoremove;
int open_popup;
int run_program;
char *program;
struct
{
Alarm_Sched type;
int hour;
int minute;
char *date;
int day_monday;
int day_tuesday;
int day_wenesday;
int day_thursday;
int day_friday;
int day_saturday;
int day_sunday;
} sched;
struct
{
Evas_Object *date;
} sched_gui;
};
static void *_create_data(E_Config_Dialog *cfd);
static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
static void _fill_data(E_Config_Dialog_Data *cfdata, Alarm *al);
static Evas_Object *_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
static int _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
static Evas_Object *_advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
static int _advanced_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
static void _cb_alarm_test(void *data, void *data2);
static void _cb_alarm_today(void *data, void *data2);
static void _cb_alarm_tomorrow(void *data, void *data2);
void
alarm_config_alarm(Alarm *al)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
char buf[4096];
v = E_NEW(E_Config_Dialog_View, 1);
v->create_cfdata = _create_data;
v->free_cfdata = _free_data;
v->basic.apply_cfdata = _basic_apply_data;
v->basic.create_widgets = _basic_create_widgets;
v->advanced.apply_cfdata = _advanced_apply_data;
v->advanced.create_widgets = _advanced_create_widgets;
snprintf(buf, sizeof(buf), "%s/module.edj", e_module_dir_get(alarm_config->module));
cfd = e_config_dialog_new(e_container_current_get(e_manager_current_get()),
D_("Alarm Alarm Configuration"), "Alarm", "_e_modules_alarm_alarm_config_dialog", buf, 0, v, al);
}
static void *
_create_data(E_Config_Dialog *cfd)
{
E_Config_Dialog_Data *cfdata;
cfdata = E_NEW(E_Config_Dialog_Data, 1);
_fill_data(cfdata, cfd->data);
if (cfdata->al)
cfdata->al->config_dialog = cfd;
else
alarm_config->config_dialog_alarm_new = cfd;
return cfdata;
}
static void
_free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
{
free(cfdata->name);
free(cfdata->description);
free(cfdata->program);
if (cfdata->al)
cfdata->al->config_dialog = NULL;
else
alarm_config->config_dialog_alarm_new = NULL;
free(cfdata);
}
static void
_fill_data(E_Config_Dialog_Data *cfdata, Alarm *al)
{
if (al)
{
cfdata->new = 0;
cfdata->al = al;
if (al->state != ALARM_STATE_OFF)
cfdata->state = 1;
else
cfdata->state = 0;
if (al->name)
cfdata->name = strdup(al->name);
else
cfdata->name = strdup("");
cfdata->sched.type = al->sched.type;
cfdata->sched.hour = al->sched.hour;
cfdata->sched.minute = al->sched.minute;
if (al->sched.type == ALARM_SCHED_DAY)
{
struct tm *st;
time_t t;
char buf[20];
t = al->sched.date_epoch - (al->sched.hour*3600) - (al->sched.minute*60);
st = localtime(&t);
strftime(buf, sizeof(buf), "%Y/%m/%d", st);
cfdata->sched.date = strdup(buf);
}
else
cfdata->sched.date = strdup("");
cfdata->sched.day_monday = al->sched.day_monday;
cfdata->sched.day_tuesday = al->sched.day_tuesday;
cfdata->sched.day_wenesday = al->sched.day_wenesday;
cfdata->sched.day_thursday = al->sched.day_thursday;
cfdata->sched.day_friday = al->sched.day_friday;
cfdata->sched.day_saturday = al->sched.day_saturday;
cfdata->sched.day_sunday = al->sched.day_sunday;
cfdata->autoremove = al->autoremove;
if (al->description)
cfdata->description = strdup(al->description);
else
cfdata->description = strdup("");
cfdata->open_popup = al->open_popup;
cfdata->run_program = al->run_program;
if (al->program)
cfdata->program = strdup(al->program);
else
cfdata->program = strdup("");
}
else
{
struct tm *st;
time_t t;
char buf[20];
cfdata->new = 1;
cfdata->state = 1;
cfdata->name = strdup("");
cfdata->sched.type = ALARM_SCHED_DEFAULT;
t = time(NULL);
st = localtime(&t);
strftime(buf, sizeof(buf), "%Y/", st);
cfdata->sched.date = strdup(buf);
cfdata->autoremove = alarm_config->alarms_autoremove_default;
cfdata->description = strdup("");
cfdata->open_popup = alarm_config->alarms_open_popup_default;
if (alarm_config->alarms_run_program_default)
cfdata->run_program = ALARM_RUN_PROGRAM_PARENT;
else
cfdata->run_program = ALARM_RUN_PROGRAM_NO;
cfdata->program = strdup("");
}
}
static void
_common_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata, Evas_Object *o)
{
Evas_Object *of, *of2, *ob;
E_Radio_Group *rg;
of = e_widget_frametable_add(evas, D_("Informations"), 0);
ob = e_widget_check_add(evas, D_("Active"), &(cfdata->state));
e_widget_frametable_object_append(of, ob, 0, 0, 1, 1, 1, 1, 1, 1);
ob = e_widget_label_add(evas, _("Name"));
e_widget_frametable_object_append(of, ob, 0, 1, 1, 1, 1, 1, 1, 1);
ob = e_widget_entry_add(evas, &(cfdata->name));
e_widget_min_size_set(ob, 200, 25);
e_widget_frametable_object_append(of, ob, 1, 1, 1, 1, 1, 1, 1, 1);
ob = e_widget_label_add(evas, D_("Description"));
e_widget_frametable_object_append(of, ob, 0, 2, 1, 1, 1, 1, 1, 1);
ob = e_widget_entry_add(evas, &(cfdata->description));
e_widget_min_size_set(ob, 250, 25);
e_widget_frametable_object_append(of, ob, 0, 3, 2, 1, 1, 1, 1, 1);
e_widget_table_object_append(o, of, 0, 0, 1, 1, 1, 1, 1, 1);
of = e_widget_frametable_add(evas, D_("Schedule"), 0);
ob = e_widget_slider_add(evas, 1, 0, D_("%1.0f hour"), 0.0, 23.0, 1.0, 0,
NULL, &(cfdata->sched.hour), 130);
e_widget_frametable_object_append(of, ob, 0, 0, 2, 1, 1, 0, 1, 0);
ob = e_widget_slider_add(evas, 1, 0, D_("%1.0f minute"), 0.0, 59.0, 1.0, 0,
NULL, &(cfdata->sched.minute), 130);
e_widget_frametable_object_append(of, ob, 0, 1, 2, 1, 1, 0, 1, 0);
rg = e_widget_radio_group_new((int*)&(cfdata->sched.type));
of2 = e_widget_frametable_add(evas, D_("Days of the week"), 0);
ob = e_widget_radio_add(evas, "", ALARM_SCHED_WEEK, rg);
e_widget_frametable_object_append(of2, ob, 0, 1, 2, 1, 1, 1, 1, 1);
ob = e_widget_check_add(evas, D_("Monday"), &(cfdata->sched.day_monday));
e_widget_frametable_object_append(of2, ob, 0, 2, 1, 1, 1, 1, 1, 1);
ob = e_widget_check_add(evas, D_("Tuesday"), &(cfdata->sched.day_tuesday));
e_widget_frametable_object_append(of2, ob, 0, 3, 1, 1, 1, 1, 1, 1);
ob = e_widget_check_add(evas, D_("Wenesday"), &(cfdata->sched.day_wenesday));
e_widget_frametable_object_append(of2, ob, 0, 4, 1, 1, 1, 1, 1, 1);
ob = e_widget_check_add(evas, D_("Thursday"), &(cfdata->sched.day_thursday));
e_widget_frametable_object_append(of2, ob, 0, 5, 1, 1, 1, 1, 1, 1);
ob = e_widget_check_add(evas, D_("Friday"), &(cfdata->sched.day_friday));
e_widget_frametable_object_append(of2, ob, 0, 6, 1, 1, 1, 1, 1, 1);
ob = e_widget_check_add(evas, D_("Saturday"), &(cfdata->sched.day_saturday));
e_widget_frametable_object_append(of2, ob, 1, 2, 1, 1, 1, 1, 1, 1);
ob = e_widget_check_add(evas, D_("Sunday"), &(cfdata->sched.day_sunday));
e_widget_frametable_object_append(of2, ob, 1, 3, 1, 1, 1, 1, 1, 1);
e_widget_frametable_object_append(of, of2, 0, 3, 1, 1, 1, 1, 1, 1);
of2 = e_widget_frametable_add(evas, D_("One day"), 0);
ob = e_widget_radio_add(evas, D_(""), ALARM_SCHED_DAY, rg);
e_widget_frametable_object_append(of2, ob, 0, 0, 1, 1, 1, 1, 1, 1);
ob = e_widget_label_add(evas, D_("Date (YYYY/MM/DD)"));
e_widget_frametable_object_append(of2, ob, 0, 1, 1, 1, 1, 1, 1, 1);
cfdata->sched_gui.date = e_widget_entry_add(evas, &(cfdata->sched.date));
e_widget_min_size_set(cfdata->sched_gui.date, 100, 25);
e_widget_frametable_object_append(of2, cfdata->sched_gui.date, 0, 2, 1, 1, 1, 1, 1, 1);
ob = e_widget_button_add(evas, D_("Today"), NULL, _cb_alarm_today, cfdata, NULL);
e_widget_frametable_object_append(of2, ob, 0, 3, 1, 1, 1, 1, 1, 1);
ob = e_widget_button_add(evas, D_("Tomorrow"), NULL, _cb_alarm_tomorrow, cfdata, NULL);
e_widget_frametable_object_append(of2, ob, 0, 4, 1, 1, 1, 1, 1, 1);
e_widget_frametable_object_append(of, of2, 1, 3, 1, 1, 1, 1, 1, 1);
e_widget_table_object_append(o, of, 0, 1, 1, 1, 1, 1, 1, 1);
}
static int
_common_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
{
Alarm *al;
int error;
al = alarm_alarm_add(cfdata->state, cfdata->name,
cfdata->sched.type,
cfdata->sched.date,
cfdata->sched.day_monday,
cfdata->sched.day_tuesday,
cfdata->sched.day_wenesday,
cfdata->sched.day_thursday,
cfdata->sched.day_friday,
cfdata->sched.day_saturday,
cfdata->sched.day_sunday,
cfdata->sched.hour, cfdata->sched.minute,
cfdata->autoremove,
cfdata->description,
cfdata->open_popup,
cfdata->run_program,
cfdata->program, &error);
if (!al)
{
char buf[4096];
switch (error)
{
case ALARM_ADD_ERROR_UNKNOWN:
snprintf(buf, sizeof(buf),
D_("<hilight>Error, The alarm was not added !</hilight><br><br>"
"There is an error in the informations / schedule of your alarm"));
break;
case ALARM_ADD_ERROR_NAME:
snprintf(buf, sizeof(buf),
D_("<hilight>Error, The alarm was not added !</hilight><br><br>"
"You have to enter a name for the alarm"));
break;
case ALARM_ADD_ERROR_SCHED_WEEK:
snprintf(buf, sizeof(buf),
D_("<hilight>Error, The alarm was not added !</hilight><br><br>"
"You have to select at least one day in the week"));
break;
case ALARM_ADD_ERROR_SCHED_DAY:
snprintf(buf, sizeof(buf),
D_("<hilight>Error, The alarm was not added !</hilight><br><br>"
"The date you entered for the alarm has incorrect syntax<br><br>"
"You have to respect this format :<br>"
" YYYY/MM/DD<br>"
"YYYY is the year on 4 numbers<br>"
"MM is the month on 2 numbers<br>"
"DD is the day on 2 numbers<br>"));
break;
case ALARM_ADD_ERROR_SCHED_BEFORE:
snprintf(buf, sizeof(buf),
D_("<hilight>Error, The alarm was not added !</hilight><br><br>"
"The date you entered is before now"));
break;
}
e_module_dialog_show(alarm_config->module, D_("Alarm Module Error"), buf);
return 0;
}
if (!cfdata->new)
alarm_config->alarms = evas_list_remove(alarm_config->alarms, cfdata->al);
alarm_config->alarms = evas_list_append(alarm_config->alarms, al);
cfdata->new = 0;
cfdata->al = al;
/* refresh things */
if (alarm_config->config_dialog)
{
E_Config_Dialog_Data *mcda;
mcda = alarm_config->config_dialog->cfdata;
alarm_config_refresh_alarms_ilist(mcda);
}
if (alarm_config->alarms_details)
alarm_edje_refresh_details();
return 1;
}
static Evas_Object *
_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
{
Evas_Object *o, *ob;
o = e_widget_table_add(evas, 0);
_common_create_widgets(cfd, evas, cfdata, o);
ob = e_widget_button_add(evas, D_("Test this alarm"), NULL, _cb_alarm_test, cfd, cfdata);
e_widget_table_object_append(o, ob, 0, 2, 1, 1, 1, 1, 1, 1);
return o;
}
static int
_basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
{
int ret;
ret = _common_apply_data(cfd, cfdata);
e_config_save_queue();
return ret;
}
static Evas_Object *
_advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
{
Evas_Object *o, *of, *ob;
E_Radio_Group *rg;
o = e_widget_table_add(evas, 0);
_common_create_widgets(cfd, evas, cfdata, o);
of = e_widget_frametable_add(evas, D_("Ring Options"), 0);
ob = e_widget_label_add(evas, D_("Remove alarm"));
e_widget_frametable_object_append(of, ob, 1, 0, 1, 1, 1, 1, 1, 1);
rg = e_widget_radio_group_new(&(cfdata->autoremove));
if (!alarm_config->alarms_autoremove_default)
{
ob = e_widget_radio_add(evas, _("No [default]"), 0, rg);
e_widget_frametable_object_append(of, ob, 1, 1, 1, 1, 1, 1, 1, 1);
ob = e_widget_radio_add(evas, _("Yes"), 1, rg);
e_widget_frametable_object_append(of, ob, 1, 2, 1, 1, 1, 1, 1, 1);
}
else
{
ob = e_widget_radio_add(evas, _("No"), 0, rg);
e_widget_frametable_object_append(of, ob, 1, 1, 1, 1, 1, 1, 1, 1);
ob = e_widget_radio_add(evas, _("Yes [default]"), 1, rg);
e_widget_frametable_object_append(of, ob, 1, 2, 1, 1, 1, 1, 1, 1);
}
ob = e_widget_label_add(evas, D_("Open popup"));
e_widget_frametable_object_append(of, ob, 0, 0, 1, 1, 1, 1, 1, 1);
rg = e_widget_radio_group_new(&(cfdata->open_popup));
if (!alarm_config->alarms_open_popup_default)
{
ob = e_widget_radio_add(evas, _("No [default]"), 0, rg);
e_widget_frametable_object_append(of, ob, 0, 1, 1, 1, 1, 1, 1, 1);
ob = e_widget_radio_add(evas, _("Yes"), 1, rg);
e_widget_frametable_object_append(of, ob, 0, 2, 1, 1, 1, 1, 1, 1);
}
else
{
ob = e_widget_radio_add(evas, _("No"), 0, rg);
e_widget_frametable_object_append(of, ob, 0, 1, 1, 1, 1, 1, 1, 1);
ob = e_widget_radio_add(evas, _("Yes [default]"), 1, rg);
e_widget_frametable_object_append(of, ob, 0, 2, 1, 1, 1, 1, 1, 1);
}
ob = e_widget_label_add(evas, D_("Run a program"));
e_widget_frametable_object_append(of, ob, 0, 4, 1, 1, 1, 1, 1, 1);
rg = e_widget_radio_group_new(&(cfdata->run_program));
ob = e_widget_radio_add(evas, _("No"), ALARM_RUN_PROGRAM_NO, rg);
e_widget_frametable_object_append(of, ob, 0, 5, 1, 1, 1, 1, 1, 1);
ob = e_widget_radio_add(evas, D_("Run default one"), ALARM_RUN_PROGRAM_PARENT, rg);
e_widget_frametable_object_append(of, ob, 0, 6, 1, 1, 1, 1, 1, 1);
ob = e_widget_radio_add(evas, D_("Run this program"), ALARM_RUN_PROGRAM_OWN, rg);
e_widget_frametable_object_append(of, ob, 0, 7, 1, 1, 1, 1, 1, 1);
ob = e_widget_entry_add(evas, &(cfdata->program));
e_widget_min_size_set(ob, 150, 25);
e_widget_frametable_object_append(of, ob, 1, 7, 1, 1, 1, 1, 1, 1);
e_widget_table_object_append(o, of, 1, 1, 1, 1, 1, 1, 1, 1);
ob = e_widget_button_add(evas, D_("Test this alarm"), NULL, _cb_alarm_test, cfd, cfdata);
e_widget_table_object_append(o, ob, 0, 2, 2, 1, 1, 1, 1, 1);
return o;
}
static int
_advanced_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
{
int ret;
ret = _common_apply_data(cfd, cfdata);
e_config_save_queue();
return ret;
}
static void
_cb_alarm_test(void *data, void *data2)
{
E_Config_Dialog *cfd;
E_Config_Dialog_Data *cfdata;
char buf[4096];
cfd = data;
cfdata = data2;
if(!_basic_apply_data(cfd, cfdata))
return;
if (alarm_alarm_ring(cfdata->al, 1))
{
if (alarm_config->alarms_state == ALARM_STATE_OFF)
snprintf(buf, sizeof(buf),
D_("<hilight>Alarm test SUCCEED !</hilight><br><br>"
"But DONT FORGET to ACTIVATE the alarms<br>"
"via the 'Active' check button on the<br>"
"main Alarm configuration panel."));
else
snprintf(buf, sizeof(buf),
D_("<hilight>Alarm test SUCCEED !</hilight>"));
}
else
{
snprintf(buf, sizeof(buf),
D_("<hilight>Alarm test FAILED !</hilight>"));
}
e_module_dialog_show(alarm_config->module, D_("Alarm Module Test Report"), buf);
}
static void
_cb_alarm_today(void *data, void *data2)
{
E_Config_Dialog_Data *cfdata;
struct tm *st;
time_t t;
char buf[20];
cfdata = data;
t = time(NULL);
st = localtime(&t);
strftime(buf, sizeof(buf), "%Y/%m/%d", st);
e_widget_entry_text_set(cfdata->sched_gui.date, buf);
}
static void
_cb_alarm_tomorrow(void *data, void *data2)
{
E_Config_Dialog_Data *cfdata;
struct tm *st;
time_t t;
char buf[20];
cfdata = data;
t = time(NULL) + 3600*24;
st = localtime(&t);
strftime(buf, sizeof(buf), "%Y/%m/%d", st);
e_widget_entry_text_set(cfdata->sched_gui.date, buf);
}

1130
e_mod_main.c Normal file

File diff suppressed because it is too large Load Diff

163
e_mod_main.h Normal file
View File

@ -0,0 +1,163 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#define D_(str) dgettext(PACKAGE, str)
#ifndef E_MOD_MAIN_H
#define E_MOD_MAIN_H
typedef enum _Alarm_State
{
ALARM_STATE_OFF,
ALARM_STATE_ON,
ALARM_STATE_RINGING,
ALARM_STATE_SNOOZED
} Alarm_State;
typedef enum _Alarm_Sched
{
ALARM_SCHED_DAY,
ALARM_SCHED_WEEK
} Alarm_Sched;
typedef enum _Alarm_Add_Error
{
ALARM_ADD_ERROR_UNKNOWN,
ALARM_ADD_ERROR_NAME,
ALARM_ADD_ERROR_SCHED_DAY,
ALARM_ADD_ERROR_SCHED_WEEK,
ALARM_ADD_ERROR_SCHED_BEFORE
} Alarm_Add_Error;
typedef enum _Alarm_Run_Program
{
ALARM_RUN_PROGRAM_OWN,
ALARM_RUN_PROGRAM_PARENT,
ALARM_RUN_PROGRAM_NO
} Alarm_Run_Program;
typedef enum _Time_Format
{
TIME_FORMAT_12,
TIME_FORMAT_24
} Time_Format;
#define CONFIG_VERSION 7
#define VALUE_PARENT 9999
#define TIME_FORMAT_DEFAULT TIME_FORMAT_24
#define ALARMS_DETAILS_DEFAULT 1
#define ALARMS_AUTOREMOVE_DEFAULT 0
#define ALARMS_OPEN_POPUP_DEFAULT 1
#define ALARMS_RUN_PROGRAM_DEFAULT 0
#define ALARMS_CHECK_TIMER (60)
#define ALARM_SCHED_DEFAULT ALARM_SCHED_DAY
#define ALARM_SNOOZE_HOUR_DEFAULT 0
#define ALARM_SNOOZE_MINUTE_DEFAULT 15
#define THEME_IN_E "base/theme/modules/alarm"
#define THEME_MAIN "modules/alarm/main"
#define THEME_ICON_SNOOZE "modules/alarm/icon/alarm/snooze"
#define THEME_ICON_ALARM_ON "modules/alarm/icon/alarm/on"
#define THEME_ICON_ALARM_OFF "modules/alarm/icon/alarm/off"
#define EDJE_SIG_RECV_ALARM_STATE_ON "state,on", ""
#define EDJE_SIG_RECV_ALARM_STATE_OFF "state,off", ""
#define EDJE_SIG_RECV_ALARM_RING_STOP "ring,stop", ""
#define EDJE_SIG_SEND_ALARM_STATE_ON "state,on", "alarm"
#define EDJE_SIG_SEND_ALARM_STATE_OFF "state,off", "alarm"
#define EDJE_SIG_SEND_ALARM_RING_START "ring,start", "alarm"
#define EDJE_SIG_SEND_ALARM_DETAILS_ON "details,on", "alarm"
#define EDJE_SIG_SEND_ALARM_DETAILS_OFF "details,off", "alarm"
typedef struct _Config Config;
typedef struct _Alarm Alarm;
struct _Alarm
{
const char *name;
Alarm_State state;
E_Config_Dialog *config_dialog;
const char *description;
int autoremove;
int open_popup;
int run_program;
const char *program;
struct
{
Alarm_Sched type;
double date_epoch;
int hour;
int minute;
int day_monday;
int day_tuesday;
int day_wenesday;
int day_thursday;
int day_friday;
int day_saturday;
int day_sunday;
} sched;
struct
{
int hour;
int minute;
int remember;
E_Dialog *dia;
Ecore_Timer *etimer;
} snooze;
};
struct _Config
{
Time_Format time_format;
Alarm_State alarms_state;
Evas_List *alarms;
Ecore_Timer *alarms_ring_etimer;
int alarms_details;
int alarms_autoremove_default;
int alarms_open_popup_default;
int alarms_run_program_default;
const char *alarms_program_default;
int config_version;
char *theme;
int alarms_ringing_nb;
E_Module *module;
E_Config_Dialog *config_dialog;
E_Config_Dialog *config_dialog_alarm_new;
Evas_List *instances;
E_Menu *menu;
};
EAPI extern E_Module_Api e_modapi;
extern Config *alarm_config;
EAPI void *e_modapi_init (E_Module *m);
EAPI int e_modapi_shutdown (E_Module *m);
EAPI int e_modapi_save (E_Module *m);
EAPI int e_modapi_about (E_Module *m);
EAPI int e_modapi_config (E_Module *m);
Alarm *alarm_alarm_add(int state, char *name, int type, char *date, int day_monday, int day_tuesday, int day_wenesday, int day_thursday, int day_friday, int day_saturday, int day_sunday, int hour, int minute, int autoremove, char *description, int open_popup, int run_program, char *program, int *error);
void alarm_alarm_del(Alarm *al);
int alarm_alarm_ring(Alarm *al, int test);
void alarm_alarm_ring_stop(Alarm *al, int check);
void alarm_edje_signal_emit(const char *source, const char *message);
void alarm_edje_text_set(char *part, char *text);
void alarm_edje_refresh_details(void);
void alarm_details_change(void);
void alarm_config_module(void);
void alarm_config_refresh_alarms_ilist(E_Config_Dialog_Data *cfdata);
void alarm_config_alarm(Alarm *al);
#endif

50
e_modules-alarm.spec.in Normal file
View File

@ -0,0 +1,50 @@
%define module_name alarm
Summary: %{module_name} module for the Enlightenment window manager
Name: e_modules-%{module_name}
Version: @VERSION@
Release: 0.%(date '+%Y%m%d')
License: BSD
Group: User Interface/Desktops
URL: http://www.enlightenment.org/
Source: ftp://ftp.enlightenment.org/pub/enlightenment/%{module_name}-%{version}.tar.gz
Packager: %{?_packager:%{_packager}}%{!?_packager:Michael Jennings <mej@eterm.org>}
Vendor: %{?_vendorinfo:%{_vendorinfo}}%{!?_vendorinfo:The Enlightenment Project (http://www.enlightenment.org/)}
Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}}
BuildRequires: ecore-devel, evas-devel, esmart-devel, edje-bin
BuildRequires: edje-devel, eet-devel, enlightenment-devel >= 0.16.999
Requires: enlightenment >= 0.16.999
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
%{module_name} module for the Enlightenment window manager.
%prep
%setup -q -n %{module_name}-%{version}
%build
%{configure}
%{__make} %{?_smp_mflags} %{?mflags}
%install
%{__make} %{?mflags_install} DESTDIR=$RPM_BUILD_ROOT install
%{find_lang} %{module_name} || true > %{module_name}.lang
%clean
test "x$RPM_BUILD_ROOT" != "x/" && rm -rf $RPM_BUILD_ROOT
%post
/sbin/ldconfig
%postun
/sbin/ldconfig
%files -f %{module_name}.lang
%defattr(-, root, root)
%doc AUTHORS ChangeLog COPYING* INSTALL NEWS README
%if "%{module_name}" == "emu"
%{_bindir}/%{module_name}*
%endif
%{_libdir}/enlightenment/modules/%{module_name}*
%changelog

BIN
fonts/vera.ttf Normal file

Binary file not shown.

BIN
images/alarm_disabled.png Normal file

Binary file not shown.

BIN
images/alarm_enabled.png Normal file

Binary file not shown.

BIN
images/alarm_snooze.png Normal file

Binary file not shown.

7
module.desktop.in Normal file
View File

@ -0,0 +1,7 @@
[Desktop Entry]
Name=Alarm
Exec=enlightenment
StartupNotify=false
X-Enlightenment-WaitExit=false
X-Enlightenment-IconClass=alarm,gadget
Icon=./module.edj

BIN
module.edj Normal file

Binary file not shown.

BIN
module_icon.png Normal file

Binary file not shown.

28
po/Makefile.am Normal file
View File

@ -0,0 +1,28 @@
MAINTAINERCLEANFILES = Makefile.in $(PACKAGE).pot
MSGFMT = msgfmt
localedir = @LOCALEDIR@
locale_DATA = $(addsuffix .mo,$(ALL_LINGUAS))
EXTRA_DIST = $(PACKAGE).pot $(addsuffix .po,$(ALL_LINGUAS))
%.mo : %.po
$(MSGFMT) -f -o $@ $<
install-localeDATA:
uninstall-localeDATA:
install-data-local:
for L in $(ALL_LINGUAS); do \
$(mkinstalldirs) $(DESTDIR)$(localedir)/$$L/LC_MESSAGES; \
$(INSTALL_DATA) \
$$L.mo $(DESTDIR)$(localedir)/$$L/LC_MESSAGES/$(PACKAGE).mo; \
done
uninstall:
for L in $(ALL_LINGUAS); do \
rm -f $(DESTDIR)$(localedir)/$$L/LC_MESSAGES/$(PACKAGE).mo; \
done
clean-local:
rm -f *.mo

342
po/eo.po Normal file
View File

@ -0,0 +1,342 @@
# translation of eo.po to
# This file is put in the public domain.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Language-Team: Esperanto <translation-team-eo@lists.sourceforge.net>\n"
"Report-Msgid-Bugs-To: olivierweb@ifrance.com\n"
"Project-Id-Version: eo\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-08-29 10:20+0200\n"
"PO-Revision-Date: 2006-08-30 23:51+0200\n"
"Last-Translator: \n"
"Language-Team: <fr@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.11.2\n"
#: e_mod_config.c:75
msgid "Eveil Configuration"
msgstr "Konfigurajxo de \"Eveil\""
#: e_mod_config.c:188
msgid "Alarm"
msgstr "Alarmi"
#: e_mod_config.c:190 e_mod_config_alarm.c:171
msgid "Active"
msgstr "Aktiva"
#: e_mod_config.c:209
msgid "Timer"
msgstr "Tempoplanilo"
#: e_mod_config.c:212 e_mod_main.c:582
#, c-format
msgid "%1.0f hours"
msgstr "%1.0f horoj"
#: e_mod_config.c:220
#, c-format
msgid "%1.0f min"
msgstr "%1.0f min"
#: e_mod_config.c:228
#, c-format
msgid "%1.0f sec"
msgstr "%1.0f sek"
#: e_mod_config.c:237
msgid "Start !"
msgstr "Ek !"
#: e_mod_config.c:242
msgid "Stop !"
msgstr "Halti !"
#: e_mod_config.c:247
msgid "Zero"
msgstr "Nul"
#: e_mod_config.c:307
msgid "Alarm Options"
msgstr "Alarmaj Opcioj"
#: e_mod_config.c:309 e_mod_config.c:355
msgid "Show icon"
msgstr "Vidigi Piktogramon"
#: e_mod_config.c:312 e_mod_config.c:322 e_mod_config.c:358 e_mod_config.c:368
msgid "Never"
msgstr "Neniam"
#: e_mod_config.c:314 e_mod_config.c:324 e_mod_config.c:360 e_mod_config.c:370
msgid "When enabled"
msgstr "Kiam ebligita"
#: e_mod_config.c:316 e_mod_config.c:326 e_mod_config.c:362 e_mod_config.c:372
msgid "Always"
msgstr "Ĉiam"
#: e_mod_config.c:319 e_mod_config.c:365
msgid "Show details"
msgstr "Vidigi Detalojn"
#: e_mod_config.c:329 e_mod_config.c:375 e_mod_config_alarm.c:365
msgid "Open popup"
msgstr "Malfermi ŝprucon"
#: e_mod_config.c:332 e_mod_config.c:378
msgid "Run program"
msgstr "Lancxi programon"
#: e_mod_config.c:339
msgid "Remove alarm after the date"
msgstr "Forigu alarmon poste la dato"
#: e_mod_config.c:342
msgid "Time format"
msgstr "Tempoformato"
#: e_mod_config.c:345
msgid "12h"
msgstr "12h"
#: e_mod_config.c:347
msgid "24h"
msgstr "24h"
#: e_mod_config.c:353
msgid "Timer Options"
msgstr "Tempoplanilaj Opcioj"
#: e_mod_config_alarm.c:70
msgid "Eveil Alarm Configuration"
msgstr "Konfigurajxo de \"Eveil\" Alarmo"
#: e_mod_config_alarm.c:169
msgid "Informations"
msgstr "Informajxoj"
#: e_mod_config_alarm.c:178
msgid "Description"
msgstr "Priskribo"
#: e_mod_config_alarm.c:188
msgid "Schedule"
msgstr "Plano"
#: e_mod_config_alarm.c:190
#, c-format
msgid "%1.0f hour"
msgstr "%1.0f horo"
#: e_mod_config_alarm.c:193
#, c-format
msgid "%1.0f minute"
msgstr "%1.0f minuto"
#: e_mod_config_alarm.c:199
msgid "Days of the week"
msgstr "Semajntagoj"
#: e_mod_config_alarm.c:201
msgid "Monday"
msgstr "Lundo"
#: e_mod_config_alarm.c:203
msgid "Tuesday"
msgstr "Mardo"
#: e_mod_config_alarm.c:205
msgid "Wenesday"
msgstr "Merkredo"
#: e_mod_config_alarm.c:207
msgid "Thursday"
msgstr "Ĵaŭdo"
#: e_mod_config_alarm.c:209
msgid "Friday"
msgstr "Vendredo"
#: e_mod_config_alarm.c:211
msgid "Saturday"
msgstr "Sabato"
#: e_mod_config_alarm.c:213
msgid "Sunday"
msgstr "Dimanĉo"
#: e_mod_config_alarm.c:216
msgid "One day"
msgstr "Unu tago"
#: e_mod_config_alarm.c:218
msgid "Date (YYYY/MM/DD)"
msgstr "Dato (JJJJ/MM/TT)"
#: e_mod_config_alarm.c:223
msgid "Today"
msgstr "Hodiaŭ"
#: e_mod_config_alarm.c:225
msgid "Tomorrow"
msgstr "Morgaux"
#: e_mod_config_alarm.c:261
msgid ""
"<hilight>Error, The alarm was not added !</hilight><br><br>There is an error "
"in the informations / schedule of your alarm"
msgstr "<hilight>Eraro, alarmo estis aldonita !</hilight><br><br>Estas eraro en informajxoj / plano de via alarmo"
#: e_mod_config_alarm.c:266
msgid ""
"<hilight>Error, The alarm was not added !</hilight><br><br>You have to enter "
"a name for the alarm"
msgstr ""
#: e_mod_config_alarm.c:271
msgid ""
"<hilight>Error, The alarm was not added !</hilight><br><br>You have to "
"select at least one day in the week"
msgstr ""
#: e_mod_config_alarm.c:276
msgid ""
"<hilight>Error, The alarm was not added !</hilight><br><br>The date you "
"entered for the alarm has incorrect syntax<br><br>You have to respect this "
"format :<br> YYYY/MM/DD<br>YYYY is the year on 4 numbers<br>MM is the "
"month on 2 numbers<br>DD is the day on 2 numbers<br>"
msgstr ""
#: e_mod_config_alarm.c:286
msgid ""
"<hilight>Error, The alarm was not added !</hilight><br><br>The date you "
"entered is before now"
msgstr ""
#: e_mod_config_alarm.c:290 e_mod_main.c:348
msgid "Eveil Module Error"
msgstr "Eraro de \"Eveil\" Modulo"
#: e_mod_config_alarm.c:323 e_mod_config_alarm.c:396
msgid "Test this alarm"
msgstr "Provi tiun cxi alarmon"
#: e_mod_config_alarm.c:351
msgid "Ring Options"
msgstr ""
#: e_mod_config_alarm.c:353
msgid "Remove alarm"
msgstr "Forigi alarmon"
#: e_mod_config_alarm.c:360 e_mod_config_alarm.c:372 e_mod_config_alarm.c:384
msgid "Use general settings"
msgstr "Uzi gxeneralajn agordojn"
#: e_mod_config_alarm.c:377
msgid "Run a program"
msgstr "Lancxi programon"
#: e_mod_config_alarm.c:386
msgid "Run this program"
msgstr "Lancxi tiun cxi programon"
#: e_mod_config_alarm.c:430
msgid "<hilight>Alarm test SUCCEED !</hilight>"
msgstr ""
#: e_mod_config_alarm.c:435
msgid "<hilight>Alarm test FAILED !</hilight>"
msgstr ""
#: e_mod_config_alarm.c:437
msgid "Eveil Module Test Report"
msgstr ""
#: e_mod_main.c:184
msgid "Eveil"
msgstr ""
#: e_mod_main.c:319
#, c-format
msgid "<hilight>Alarm : %s</hilight><br><br>%s"
msgstr "<hilight>Alarmo : %s</hilight><br><br>%s"
#: e_mod_main.c:322 e_mod_main.c:941
msgid "Eveil Module Popup"
msgstr ""
#: e_mod_main.c:346
msgid ""
"<hilight>Failed !</hilight><br><br>Eveil couln't launch the program you "
"specified"
msgstr ""
#: e_mod_main.c:578 e_mod_main.c:754
#, c-format
msgid "Snooze %s"
msgstr ""
#: e_mod_main.c:585
#, c-format
#, fuzzy
msgid "%1.0f minutes"
msgstr "minutoj"
#: e_mod_main.c:762
#, c-format
msgid "Snooze %.14s of %.2d:%.2d"
msgstr ""
#: e_mod_main.c:776
msgid "Snooze (No alarm to delay)"
msgstr ""
#: e_mod_main.c:783
msgid "Add an alarm"
msgstr ""
#: e_mod_main.c:792
msgid "Start the timer"
msgstr ""
#: e_mod_main.c:799
msgid "Stop the timer"
msgstr ""
#: e_mod_main.c:939
msgid "<hilight>Timer elapsed !</hilight><br><br>Time for pastas :D"
msgstr ""
#: e_mod_main.c:1083
#, c-format
msgid ""
"<hilight>Eveil module : Configuration Upgraded</hilight><br><br>Your "
"configuration of eveil module<br>has been upgraded<br>Your settings were "
"removed<br>Sorry for the inconvenience<br><br>(%d -> %d)"
msgstr ""
#: e_mod_main.c:1089 e_mod_main.c:1103 e_mod_main.c:1214
msgid "Eveil Module version "
msgstr ""
#: e_mod_main.c:1097
#, c-format
msgid ""
"<hilight>Eveil module : Configuration Downgraded</hilight><br><br>Your "
"configuration of Eveil module<br>has been downgraded<br>Your settings were "
"removed<br>Sorry for the inconvenience<br><br>(%d ->%d)"
msgstr ""
#: e_mod_main.c:1215
msgid ""
"A module to set timers and alarms to alert you<br> when youre pastas are "
"ready<br>or when you need to wake up<br><br>http://oooo.zapto."
"org<br>ooookiwi@free.fr"
msgstr ""

359
po/it.po Normal file
View File

@ -0,0 +1,359 @@
# Italian translation for E17 eveil module.
# This file is put in the public domain.
# Massimo Maiurana <maiurana@inwind.it>, 2006.
#
msgid ""
msgstr ""
"Project-Id-Version: Eveil\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-06-11 20:39+0200\n"
"PO-Revision-Date: 2006-06-11 20:00+0200\n"
"Last-Translator: Massimo Maiurana <maiurana@inwind.it>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: e_mod_config.c:73
msgid "Eveil Configuration"
msgstr "Configurazione di Eveil"
#: e_mod_config.c:186
msgid "Alarm"
msgstr "Allarmi"
#: e_mod_config.c:188 e_mod_config_alarm.c:169
msgid "Active"
msgstr "Attivo"
#: e_mod_config.c:207
msgid "Timer"
msgstr "Timer"
#: e_mod_config.c:210 e_mod_main.c:581
#, c-format
msgid "%1.0f hours"
msgstr "%1.0f ore"
#: e_mod_config.c:218
#, c-format
msgid "%1.0f min"
msgstr "%1.0f min"
#: e_mod_config.c:226
#, c-format
msgid "%1.0f sec"
msgstr "%1.0f sec"
#: e_mod_config.c:235
msgid "Start !"
msgstr "Avvia !"
#: e_mod_config.c:240
msgid "Stop !"
msgstr "Ferma !"
#: e_mod_config.c:245
msgid "Zero"
msgstr "Azzera"
#: e_mod_config.c:305
msgid "Alarm Options"
msgstr "Opzioni della sveglia"
#: e_mod_config.c:307 e_mod_config.c:353
msgid "Show icon"
msgstr "Mostra icona"
#: e_mod_config.c:310 e_mod_config.c:320 e_mod_config.c:356 e_mod_config.c:366
msgid "Never"
msgstr "Mai"
#: e_mod_config.c:312 e_mod_config.c:322 e_mod_config.c:358 e_mod_config.c:368
msgid "When enabled"
msgstr "Se abilitata"
#: e_mod_config.c:314 e_mod_config.c:324 e_mod_config.c:360 e_mod_config.c:370
msgid "Always"
msgstr "Sempre"
#: e_mod_config.c:317 e_mod_config.c:363
msgid "Show details"
msgstr "Mostra dettagli"
#: e_mod_config.c:327 e_mod_config.c:373 e_mod_config_alarm.c:363
msgid "Open popup"
msgstr "Apri popup"
#: e_mod_config.c:330 e_mod_config.c:376
msgid "Run program"
msgstr "Avvia programma"
#: e_mod_config.c:337
msgid "Remove alarm after the date"
msgstr "Rimuovi allarme dopo l'evento"
#: e_mod_config.c:340
msgid "Time format"
msgstr "Formato orologio"
#: e_mod_config.c:343
msgid "12h"
msgstr "12h"
#: e_mod_config.c:345
msgid "24h"
msgstr "24h"
#: e_mod_config.c:351
msgid "Timer Options"
msgstr "Opzioni del timer"
#: e_mod_config_alarm.c:68
msgid "Eveil Alarm Configuration"
msgstr "Configurazione allarme Eveil"
#: e_mod_config_alarm.c:167
msgid "Informations"
msgstr "Informazioni"
#: e_mod_config_alarm.c:176
msgid "Description"
msgstr "Descrizione"
#: e_mod_config_alarm.c:186
msgid "Schedule"
msgstr "Programmazione"
#: e_mod_config_alarm.c:188
#, c-format
msgid "%1.0f hour"
msgstr "%1.0f ore"
#: e_mod_config_alarm.c:191
#, c-format
msgid "%1.0f minute"
msgstr "%1.0f minuti"
#: e_mod_config_alarm.c:197
msgid "Days of the week"
msgstr "Giorni della settimana"
#: e_mod_config_alarm.c:199
msgid "Monday"
msgstr "Lunedì"
#: e_mod_config_alarm.c:201
msgid "Tuesday"
msgstr "Martedì"
#: e_mod_config_alarm.c:203
msgid "Wenesday"
msgstr "Mercoledì"
#: e_mod_config_alarm.c:205
msgid "Thursday"
msgstr "Giovedì"
#: e_mod_config_alarm.c:207
msgid "Friday"
msgstr "Venerdì"
#: e_mod_config_alarm.c:209
msgid "Saturday"
msgstr "Sabato"
#: e_mod_config_alarm.c:211
msgid "Sunday"
msgstr "Domenica"
#: e_mod_config_alarm.c:214
msgid "One day"
msgstr "Giornata singola"
#: e_mod_config_alarm.c:216
msgid "Date (YYYY/MM/DD)"
msgstr "Data (AAAA/MM/GG)"
#: e_mod_config_alarm.c:221
msgid "Today"
msgstr "Oggi"
#: e_mod_config_alarm.c:223
msgid "Tomorrow"
msgstr "Domani"
#: e_mod_config_alarm.c:259
msgid ""
"<hilight>Error, The alarm was not added !</hilight><br><br>There is an error "
"in the informations / schedule of your alarm"
msgstr ""
"<hilight>Errore, l'allarme non è stato aggiunto!</hilight><br><br>C'è un "
"errore nelle sue informazioni/programmazione"
#: e_mod_config_alarm.c:264
msgid ""
"<hilight>Error, The alarm was not added !</hilight><br><br>You have to enter "
"a name for the alarm"
msgstr ""
"<hilight>Errore, l'allarme non è stato aggiunto!</hilight><br><br>Occorre "
"inserire un nome per l'allarme"
#: e_mod_config_alarm.c:269
msgid ""
"<hilight>Error, The alarm was not added !</hilight><br><br>You have to "
"select at least one day in the week"
msgstr ""
"<hilight>Errore, l'allarme non è stato aggiunto!</hilight><br><br>Occorre "
"selezionare almeno un giorno"
#: e_mod_config_alarm.c:274
msgid ""
"<hilight>Error, The alarm was not added !</hilight><br><br>The date you "
"entered for the alarm has incorrect syntax<br><br>You have to respect this "
"format :<br> YYYY/MM/DD<br>YYYY is the year on 4 numbers<br>MM is the "
"month on 2 numbers<br>DD is the day on 2 numbers<br>"
msgstr ""
"<hilight>Errore, l'allarme non è stato aggiunto!</hilight><br><br>La data "
"inserita ha una sintassi sbagliata<br><br>Occorre rispettare questo formato:"
"<br> AAAA/MM/GG<br>AAAA è l'anno in 4 cifre, MM è il mese in 2 cifre<br>e "
"GG è il giorno in 2 cifre<br>"
#: e_mod_config_alarm.c:284
msgid ""
"<hilight>Error, The alarm was not added !</hilight><br><br>The date you "
"entered is before now"
msgstr ""
"<hilight>Errore, l'allarme non è stato aggiunto!</hilight><br><br>La data "
"inserita è già trascorsa"
#: e_mod_config_alarm.c:288 e_mod_main.c:347
msgid "Eveil Module Error"
msgstr "Errore del modulo Eveil"
#: e_mod_config_alarm.c:321 e_mod_config_alarm.c:394
msgid "Test this alarm"
msgstr "Prova quest'allarme"
#: e_mod_config_alarm.c:349
msgid "Ring Options"
msgstr "Opzioni sveglia"
#: e_mod_config_alarm.c:351
msgid "Remove alarm"
msgstr "Rimuovi allarme"
#: e_mod_config_alarm.c:358 e_mod_config_alarm.c:370 e_mod_config_alarm.c:382
msgid "Use general settings"
msgstr "Usa impostazioni generali"
#: e_mod_config_alarm.c:375
msgid "Run a program"
msgstr "Avvia un programma"
#: e_mod_config_alarm.c:384
msgid "Run this program"
msgstr "Avvia questo programma"
#: e_mod_config_alarm.c:428
msgid "<hilight>Alarm test SUCCEED !</hilight>"
msgstr "<hilight>Test allarme RIUSCITO!</hilight>"
#: e_mod_config_alarm.c:433
msgid "<hilight>Alarm test FAILED !</hilight>"
msgstr "<hilight>Test allarme FALLITO!</hilight>"
#: e_mod_config_alarm.c:435
msgid "Eveil Module Test Report"
msgstr "Rapporto test modulo Eveil"
#: e_mod_main.c:183
msgid "Eveil"
msgstr "Eveil"
#: e_mod_main.c:318
#, c-format
msgid "<hilight>Alarm : %s</hilight><br><br>%s"
msgstr "<hilight>Allarme: %s</hilight><br><br>%s"
#: e_mod_main.c:321 e_mod_main.c:940
msgid "Eveil Module Popup"
msgstr "Popup modulo Eveil"
#: e_mod_main.c:345
msgid ""
"<hilight>Failed !</hilight><br><br>Eveil couln't launch the program you "
"specified"
msgstr ""
"<hilight>Fallito!</hilight><br><br>Eveil non ha potuto lanciare il programma "
"specificato"
#: e_mod_main.c:577 e_mod_main.c:753
#, c-format
msgid "Snooze %s"
msgstr "Rinvia %s"
#: e_mod_main.c:584
#, c-format
msgid "%1.0f minutes"
msgstr "%1.0f minuti"
#: e_mod_main.c:761
#, c-format
msgid "Snooze %.14s of %.2d:%.2d"
msgstr "Rinvia %.14s di %.2d:%.2d"
#: e_mod_main.c:775
msgid "Snooze (No alarm to delay)"
msgstr "Rinvio (nulla da rinviare)"
#: e_mod_main.c:782
msgid "Add an alarm"
msgstr "Aggiungi allarme"
#: e_mod_main.c:791
msgid "Start the timer"
msgstr "Avvia timer"
#: e_mod_main.c:798
msgid "Stop the timer"
msgstr "Ferma timer"
#: e_mod_main.c:938
msgid "<hilight>Timer elapsed !</hilight><br><br>Time for pastas :D"
msgstr "<hilight>Tempo scaduto!</hilight><br><br>La pasta è pronta :D"
#: e_mod_main.c:1082
#, c-format
msgid ""
"<hilight>Eveil module : Configuration Upgraded</hilight><br><br>Your "
"configuration of eveil module<br>has been upgraded<br>Your settings were "
"removed<br>Sorry for the inconvenience<br><br>(%d -> %d)"
msgstr ""
"<hilight>Modulo Eveil: aggiornamento configurazione</hilight><br><br>La "
"configurazione del modulo Eveil è stata<br>aggiornata e le vostre "
"impostazioni rimosse.<br>Ci scusiamo per l'inconveniente<br><br>(%d -> %d)"
#: e_mod_main.c:1088 e_mod_main.c:1102 e_mod_main.c:1213
msgid "Eveil Module version "
msgstr "Modulo Eveil versione "
#: e_mod_main.c:1096
#, c-format
msgid ""
"<hilight>Eveil module : Configuration Downgraded</hilight><br><br>Your "
"configuration of Eveil module<br>has been downgraded<br>Your settings were "
"removed<br>Sorry for the inconvenience<br><br>(%d ->%d)"
msgstr ""
"<hilight>Modulo Eveil: ripristino configurazione</hilight><br><br>La "
"configurazione del modulo Eveil è stata<br>ripristinata e le vostre "
"impostazioni rimosse.<br>Ci scusiamo per l'inconveniente<br><br>(%d -> %d)"
#: e_mod_main.c:1214
msgid ""
"A module to set timers and alarms to alert you<br> when youre pastas are "
"ready<br>or when you need to wake up<br><br>http://oooo.zapto."
"org<br>ooookiwi@free.fr"
msgstr ""
"Un modulo per impostare timer e allarmi in modo<br>da svegliarci o avvisarci "
"quando la pasta è pronta<br><br>http://oooo.zapto.org<br>ooookiwi@free.fr"

363
po/ja.po Normal file
View File

@ -0,0 +1,363 @@
# Japanese translation for E17 eveil module.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
# Yasufumi Haga <yasufumi.haga@nifty.com>, 2006
#
msgid ""
msgstr ""
"Project-Id-Version: Eveil\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-07-16 22:09+0900\n"
"PO-Revision-Date: 2006-06-17 13:08+0900\n"
"Last-Translator: Yasufumi Haga <yasufumi.haga@nifty.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: e_mod_config.c:75
msgid "Eveil Configuration"
msgstr "eveilの設定"
#: e_mod_config.c:188
msgid "Alarm"
msgstr "アラーム"
#: e_mod_config.c:190 e_mod_config_alarm.c:171
msgid "Active"
msgstr "作動"
#: e_mod_config.c:209
msgid "Timer"
msgstr "タイマー"
#: e_mod_config.c:212 e_mod_main.c:581
#, c-format
msgid "%1.0f hours"
msgstr "%1.0f 時間"
#: e_mod_config.c:220
#, c-format
msgid "%1.0f min"
msgstr "%1.0f 分"
#: e_mod_config.c:228
#, c-format
msgid "%1.0f sec"
msgstr "%1.0f 秒"
#: e_mod_config.c:237
msgid "Start !"
msgstr "開始"
#: e_mod_config.c:242
msgid "Stop !"
msgstr "終了"
#: e_mod_config.c:247
msgid "Zero"
msgstr "リセット"
#: e_mod_config.c:307
msgid "Alarm Options"
msgstr "アラームオプション"
#: e_mod_config.c:309 e_mod_config.c:355
msgid "Show icon"
msgstr "アイコン表示"
#: e_mod_config.c:312 e_mod_config.c:322 e_mod_config.c:358 e_mod_config.c:368
msgid "Never"
msgstr "しない"
#: e_mod_config.c:314 e_mod_config.c:324 e_mod_config.c:360 e_mod_config.c:370
msgid "When enabled"
msgstr "作動時"
#: e_mod_config.c:316 e_mod_config.c:326 e_mod_config.c:362 e_mod_config.c:372
msgid "Always"
msgstr "常に"
#: e_mod_config.c:319 e_mod_config.c:365
msgid "Show details"
msgstr "詳細表示"
#: e_mod_config.c:329 e_mod_config.c:375 e_mod_config_alarm.c:365
msgid "Open popup"
msgstr "ポップアップを表示する"
#: e_mod_config.c:332 e_mod_config.c:378
msgid "Run program"
msgstr "プログラムを実行する"
#: e_mod_config.c:339
msgid "Remove alarm after the date"
msgstr ""
#: e_mod_config.c:342
msgid "Time format"
msgstr "時刻表示"
#: e_mod_config.c:345
msgid "12h"
msgstr ""
#: e_mod_config.c:347
msgid "24h"
msgstr ""
#: e_mod_config.c:353
msgid "Timer Options"
msgstr "タイマーオプション"
#: e_mod_config_alarm.c:70
msgid "Eveil Alarm Configuration"
msgstr "eveilアラームの設定"
#: e_mod_config_alarm.c:169
msgid "Informations"
msgstr "情報"
#: e_mod_config_alarm.c:178
msgid "Description"
msgstr "説明"
#: e_mod_config_alarm.c:188
msgid "Schedule"
msgstr "スケジュール"
#: e_mod_config_alarm.c:190
#, c-format
msgid "%1.0f hour"
msgstr "%1.0f 時"
#: e_mod_config_alarm.c:193
#, c-format
msgid "%1.0f minute"
msgstr "%1.0f 分"
#: e_mod_config_alarm.c:199
msgid "Days of the week"
msgstr "毎週"
#: e_mod_config_alarm.c:201
msgid "Monday"
msgstr "月曜日"
#: e_mod_config_alarm.c:203
msgid "Tuesday"
msgstr "火曜日"
#: e_mod_config_alarm.c:205
msgid "Wenesday"
msgstr "水曜日"
#: e_mod_config_alarm.c:207
msgid "Thursday"
msgstr "木曜日"
#: e_mod_config_alarm.c:209
msgid "Friday"
msgstr "金曜日"
#: e_mod_config_alarm.c:211
msgid "Saturday"
msgstr "土曜日"
#: e_mod_config_alarm.c:213
msgid "Sunday"
msgstr "日曜日"
#: e_mod_config_alarm.c:216
msgid "One day"
msgstr "指定日のみ"
#: e_mod_config_alarm.c:218
msgid "Date (YYYY/MM/DD)"
msgstr "日付 (年/月/日)"
#: e_mod_config_alarm.c:223
msgid "Today"
msgstr "今日"
#: e_mod_config_alarm.c:225
msgid "Tomorrow"
msgstr "明日"
#: e_mod_config_alarm.c:261
msgid ""
"<hilight>Error, The alarm was not added !</hilight><br><br>There is an error "
"in the informations / schedule of your alarm"
msgstr ""
"<hilight>エラーにより, アラームは設定されませんでした.</hilight><br><br>"
"アラームの情報かスケジュール内容に誤りがあります."
#: e_mod_config_alarm.c:266
msgid ""
"<hilight>Error, The alarm was not added !</hilight><br><br>You have to enter "
"a name for the alarm"
msgstr ""
"<hilight>エラーにより, アラームは設定されませんでした.</hilight><br><br>"
"追加するアラームには名前をつける必要があります."
#: e_mod_config_alarm.c:271
msgid ""
"<hilight>Error, The alarm was not added !</hilight><br><br>You have to "
"select at least one day in the week"
msgstr ""
"<hilight>エラーにより, アラームは設定されませんでした.</hilight><br><br>"
"週のうち最低1日は指定する必要があります."
#: e_mod_config_alarm.c:276
msgid ""
"<hilight>Error, The alarm was not added !</hilight><br><br>The date you "
"entered for the alarm has incorrect syntax<br><br>You have to respect this "
"format :<br> YYYY/MM/DD<br>YYYY is the year on 4 numbers<br>MM is the "
"month on 2 numbers<br>DD is the day on 2 numbers<br>"
msgstr ""
"<hilight>エラーにより, アラームは設定されませんでした.</hilight><br><br>"
"指定された日付は書式が間違っています.<br><br>"
"次の書式に従って下さい.<br>"
" 年/月/日<br>"
"年は西暦4桁、月は数字2桁、日は数字2桁<br>"
#: e_mod_config_alarm.c:286
msgid ""
"<hilight>Error, The alarm was not added !</hilight><br><br>The date you "
"entered is before now"
msgstr ""
"<hilight>エラーにより, アラームは設定されませんでした.</hilight><br><br>"
"指定された日付はもう過ぎてしまいました."
#: e_mod_config_alarm.c:290 e_mod_main.c:347
msgid "Eveil Module Error"
msgstr "eveil モジュールエラー"
#: e_mod_config_alarm.c:323 e_mod_config_alarm.c:396
msgid "Test this alarm"
msgstr "このアラームを試す"
#: e_mod_config_alarm.c:351
msgid "Ring Options"
msgstr "通知オプション"
#: e_mod_config_alarm.c:353
msgid "Remove alarm"
msgstr "アラームを削除する"
#: e_mod_config_alarm.c:360 e_mod_config_alarm.c:372 e_mod_config_alarm.c:384
msgid "Use general settings"
msgstr "標準設定に従う"
#: e_mod_config_alarm.c:377
msgid "Run a program"
msgstr "プログラムを実行する"
#: e_mod_config_alarm.c:386
msgid "Run this program"
msgstr "プログラムを実行する"
#: e_mod_config_alarm.c:430
msgid "<hilight>Alarm test SUCCEED !</hilight>"
msgstr "<hilight>アラームテスト成功</hilight>"
#: e_mod_config_alarm.c:435
msgid "<hilight>Alarm test FAILED !</hilight>"
msgstr "<hilight>アラームテスト失敗</hilight>"
#: e_mod_config_alarm.c:437
msgid "Eveil Module Test Report"
msgstr "eveilモジュールテスト結果"
#: e_mod_main.c:183
msgid "Eveil"
msgstr "Eveil"
#: e_mod_main.c:318
#, c-format
msgid "<hilight>Alarm : %s</hilight><br><br>%s"
msgstr "<hilight>アラーム: %s</hilight><br><br>%s"
#: e_mod_main.c:321 e_mod_main.c:940
msgid "Eveil Module Popup"
msgstr "eveilモジュールポップアップ"
#: e_mod_main.c:345
msgid ""
"<hilight>Failed !</hilight><br><br>Eveil couln't launch the program you "
"specified"
msgstr ""
"<hilight>失敗</hilight><br><br>"
"Eveilから指定のプログラムを起動できませんでした."
#: e_mod_main.c:577 e_mod_main.c:753
#, c-format
msgid "Snooze %s"
msgstr ""
#: e_mod_main.c:584
#, c-format
msgid "%1.0f minutes"
msgstr ""
#: e_mod_main.c:761
#, c-format
msgid "Snooze %.14s of %.2d:%.2d"
msgstr ""
#: e_mod_main.c:775
msgid "Snooze (No alarm to delay)"
msgstr ""
#: e_mod_main.c:782
msgid "Add an alarm"
msgstr "アラームを追加する"
#: e_mod_main.c:791
msgid "Start the timer"
msgstr "タイマーを開始する"
#: e_mod_main.c:798
msgid "Stop the timer"
msgstr "タイマーを止める"
#: e_mod_main.c:938
msgid "<hilight>Timer elapsed !</hilight><br><br>Time for pastas :D"
msgstr "<hilight>タイムアップ</hilight><br><br>時間ですよお"
#: e_mod_main.c:1082
#, c-format
msgid ""
"<hilight>Eveil module : Configuration Upgraded</hilight><br><br>Your "
"configuration of eveil module<br>has been upgraded<br>Your settings were "
"removed<br>Sorry for the inconvenience<br><br>(%d -> %d)"
msgstr ""
"<hilight>eveilモジュール: 設定方法の更新</hilight><br><br>"
"eveilモジュールの設定方法が更新されました.<br>"
"そのため今までの設定内容は削除されました。<br>"
"ご不便をおかけして恐縮です.<br><br>(%d -> %d)"
#: e_mod_main.c:1088 e_mod_main.c:1102 e_mod_main.c:1213
msgid "Eveil Module version "
msgstr "eveilモジュールのバージョン "
#: e_mod_main.c:1096
#, c-format
msgid ""
"<hilight>Eveil module : Configuration Downgraded</hilight><br><br>Your "
"configuration of Eveil module<br>has been downgraded<br>Your settings were "
"removed<br>Sorry for the inconvenience<br><br>(%d ->%d)"
msgstr ""
"<hilight>eveilモジュール: 設定方法の変更</hilight><br><br>"
"eveilモジュールの設定方法が以前の方法に戻ってしまいました.<br>"
"そのため今までの設定内容は削除されました。<br>"
"ご不便をおかけして恐縮です.<br><br>(%d -> %d)"
#: e_mod_main.c:1214
msgid ""
"A module to set timers and alarms to alert you<br> when youre pastas are "
"ready<br>or when you need to wake up<br><br>http://oooo.zapto."
"org<br>ooookiwi@free.fr"
msgstr ""
"タイマーやアラームを設定するモジュールです.<br>"
"パスタを茹でる時にも使えるし目覚し時計にもなりますよ.<br><br>"
"http://oooo.zapto.org<br>ooookiwi@free.fr"

340
po/sv.po Normal file
View File

@ -0,0 +1,340 @@
# Swedish translation of Eveil module for E17.
# This file is put in the public domain.
# Anders Trobäck <enlightenment@troback.com>, 2006.
# , fuzzy
#
#
msgid ""
msgstr ""
"Project-Id-Version: Eveil module for E17 N/A\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-07-05 23:53+0200\n"
"PO-Revision-Date: 2006-07-06 00:07+0200\n"
"Last-Translator: Anders Trobäck <enlightenment@troback.com>\n"
"Language-Team: Swedish\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit"
#: e_mod_config.c:75
msgid "Eveil Configuration"
msgstr "Eveil konfiguration"
#: e_mod_config.c:188
msgid "Alarm"
msgstr "Alarm"
#: e_mod_config.c:190 e_mod_config_alarm.c:171
msgid "Active"
msgstr "Aktiv"
#: e_mod_config.c:209
msgid "Timer"
msgstr "Timer"
#: e_mod_config.c:212 e_mod_main.c:581
#, c-format
msgid "%1.0f hours"
msgstr "%1.0f timmar"
#: e_mod_config.c:220
#, c-format
msgid "%1.0f min"
msgstr "%1.0f minuter"
#: e_mod_config.c:228
#, c-format
msgid "%1.0f sec"
msgstr "%1.0f sekunder"
#: e_mod_config.c:237
msgid "Start !"
msgstr "Start !"
#: e_mod_config.c:242
msgid "Stop !"
msgstr "Stopp !"
#: e_mod_config.c:247
msgid "Zero"
msgstr "Noll"
#: e_mod_config.c:307
msgid "Alarm Options"
msgstr "Alarminställningar"
#: e_mod_config.c:309 e_mod_config.c:355
msgid "Show icon"
msgstr "Visa ikon"
#: e_mod_config.c:312 e_mod_config.c:322 e_mod_config.c:358 e_mod_config.c:368
msgid "Never"
msgstr "Aldrig"
#: e_mod_config.c:314 e_mod_config.c:324 e_mod_config.c:360 e_mod_config.c:370
msgid "When enabled"
msgstr ""
#: e_mod_config.c:316 e_mod_config.c:326 e_mod_config.c:362 e_mod_config.c:372
msgid "Always"
msgstr "Alltid"
#: e_mod_config.c:319 e_mod_config.c:365
msgid "Show details"
msgstr "Visa detaljer"
#: e_mod_config.c:329 e_mod_config.c:375 e_mod_config_alarm.c:365
msgid "Open popup"
msgstr "Öppna popup"
#: e_mod_config.c:332 e_mod_config.c:378
msgid "Run program"
msgstr "Kör program"
#: e_mod_config.c:339
msgid "Remove alarm after the date"
msgstr "Ta bort alarm efter detta datum"
#: e_mod_config.c:342
msgid "Time format"
msgstr "Tidsformat"
#: e_mod_config.c:345
msgid "12h"
msgstr "12 timmar"
#: e_mod_config.c:347
msgid "24h"
msgstr "24 timmar"
#: e_mod_config.c:353
msgid "Timer Options"
msgstr "Timerinställningar"
#: e_mod_config_alarm.c:70
msgid "Eveil Alarm Configuration"
msgstr "Inställningar för Eveil alarm"
#: e_mod_config_alarm.c:169
msgid "Informations"
msgstr "Information"
#: e_mod_config_alarm.c:178
msgid "Description"
msgstr "Beskrivning"
#: e_mod_config_alarm.c:188
msgid "Schedule"
msgstr "Schema"
#: e_mod_config_alarm.c:190
#, c-format
msgid "%1.0f hour"
msgstr "%1.0f timme"
#: e_mod_config_alarm.c:193
#, c-format
msgid "%1.0f minute"
msgstr "%1.0f minut"
#: e_mod_config_alarm.c:199
msgid "Days of the week"
msgstr "Veckodagar"
#: e_mod_config_alarm.c:201
msgid "Monday"
msgstr "Måndag"
#: e_mod_config_alarm.c:203
msgid "Tuesday"
msgstr "Tisdag"
#: e_mod_config_alarm.c:205
msgid "Wenesday"
msgstr "Onsdag"
#: e_mod_config_alarm.c:207
msgid "Thursday"
msgstr "Torsdag"
#: e_mod_config_alarm.c:209
msgid "Friday"
msgstr "Fredag"
#: e_mod_config_alarm.c:211
msgid "Saturday"
msgstr "Lördag"
#: e_mod_config_alarm.c:213
msgid "Sunday"
msgstr "Söndag"
#: e_mod_config_alarm.c:216
msgid "One day"
msgstr "En dag"
#: e_mod_config_alarm.c:218
msgid "Date (YYYY/MM/DD)"
msgstr "Datum (YYYY/MM/DD)"
#: e_mod_config_alarm.c:223
msgid "Today"
msgstr "Idag"
#: e_mod_config_alarm.c:225
msgid "Tomorrow"
msgstr "Imorgon"
#: e_mod_config_alarm.c:261
msgid ""
"<hilight>Error, The alarm was not added !</hilight><br><br>There is an error "
"in the informations / schedule of your alarm"
msgstr ""
#: e_mod_config_alarm.c:266
msgid ""
"<hilight>Error, The alarm was not added !</hilight><br><br>You have to enter "
"a name for the alarm"
msgstr ""
#: e_mod_config_alarm.c:271
msgid ""
"<hilight>Error, The alarm was not added !</hilight><br><br>You have to "
"select at least one day in the week"
msgstr ""
#: e_mod_config_alarm.c:276
msgid ""
"<hilight>Error, The alarm was not added !</hilight><br><br>The date you "
"entered for the alarm has incorrect syntax<br><br>You have to respect this "
"format :<br> YYYY/MM/DD<br>YYYY is the year on 4 numbers<br>MM is the "
"month on 2 numbers<br>DD is the day on 2 numbers<br>"
msgstr ""
#: e_mod_config_alarm.c:286
msgid ""
"<hilight>Error, The alarm was not added !</hilight><br><br>The date you "
"entered is before now"
msgstr ""
#: e_mod_config_alarm.c:290 e_mod_main.c:347
msgid "Eveil Module Error"
msgstr ""
#: e_mod_config_alarm.c:323 e_mod_config_alarm.c:396
msgid "Test this alarm"
msgstr "Testa detta alarm"
#: e_mod_config_alarm.c:351
msgid "Ring Options"
msgstr "Ringinställningar"
#: e_mod_config_alarm.c:353
msgid "Remove alarm"
msgstr "Ta bort alarm"
#: e_mod_config_alarm.c:360 e_mod_config_alarm.c:372 e_mod_config_alarm.c:384
msgid "Use general settings"
msgstr "Använd generella inställningar"
#: e_mod_config_alarm.c:377
msgid "Run a program"
msgstr "Kör ett program"
#: e_mod_config_alarm.c:386
msgid "Run this program"
msgstr "Kör detta program"
#: e_mod_config_alarm.c:430
msgid "<hilight>Alarm test SUCCEED !</hilight>"
msgstr "<hilight>Alarm testet LYCKADES !</hilight>"
#: e_mod_config_alarm.c:435
msgid "<hilight>Alarm test FAILED !</hilight>"
msgstr "<hilight>Alarm testet MISSLYCKADES !</hilight>"
#: e_mod_config_alarm.c:437
msgid "Eveil Module Test Report"
msgstr ""
#: e_mod_main.c:183
msgid "Eveil"
msgstr "Eveil"
#: e_mod_main.c:318
#, c-format
msgid "<hilight>Alarm : %s</hilight><br><br>%s"
msgstr "<hilight>Alarm : %s</hilight><br><br>%s"
#: e_mod_main.c:321 e_mod_main.c:940
msgid "Eveil Module Popup"
msgstr ""
#: e_mod_main.c:345
msgid ""
"<hilight>Failed !</hilight><br><br>Eveil couln't launch the program you "
"specified"
msgstr ""
#: e_mod_main.c:577 e_mod_main.c:753
#, c-format
msgid "Snooze %s"
msgstr "Snooze %s"
#: e_mod_main.c:584
#, c-format
msgid "%1.0f minutes"
msgstr "%1.0f minuter"
#: e_mod_main.c:761
#, c-format
msgid "Snooze %.14s of %.2d:%.2d"
msgstr "Snooze %.14s of %.2d:%.2d"
#: e_mod_main.c:775
msgid "Snooze (No alarm to delay)"
msgstr "Snooze (Inget alarm att fördröja)"
#: e_mod_main.c:782
msgid "Add an alarm"
msgstr "Lägg till ett alarm"
#: e_mod_main.c:791
msgid "Start the timer"
msgstr "Starta timern"
#: e_mod_main.c:798
msgid "Stop the timer"
msgstr "Stoppa timern"
#: e_mod_main.c:938
msgid "<hilight>Timer elapsed !</hilight><br><br>Time for pastas :D"
msgstr ""
#: e_mod_main.c:1082
#, c-format
msgid ""
"<hilight>Eveil module : Configuration Upgraded</hilight><br><br>Your "
"configuration of eveil module<br>has been upgraded<br>Your settings were "
"removed<br>Sorry for the inconvenience<br><br>(%d -> %d)"
msgstr ""
#: e_mod_main.c:1088 e_mod_main.c:1102 e_mod_main.c:1213
msgid "Eveil Module version "
msgstr ""
#: e_mod_main.c:1096
#, c-format
msgid ""
"<hilight>Eveil module : Configuration Downgraded</hilight><br><br>Your "
"configuration of Eveil module<br>has been downgraded<br>Your settings were "
"removed<br>Sorry for the inconvenience<br><br>(%d ->%d)"
msgstr ""
#: e_mod_main.c:1214
msgid ""
"A module to set timers and alarms to alert you<br> when youre pastas are "
"ready<br>or when you need to wake up<br><br>http://oooo.zapto."
"org<br>ooookiwi@free.fr"
msgstr ""